@sankhyalabs/sankhyablocks 5.1.3 → 5.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/{SnkMessageBuilder-47185d5d.js → SnkMessageBuilder-c6bd8bc7.js} +9 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/sankhyablocks.cjs.js +1 -1
- package/dist/cjs/snk-application.cjs.entry.js +1 -1
- package/dist/cjs/snk-config-options.cjs.entry.js +2 -1
- package/dist/cjs/snk-configurator.cjs.entry.js +3 -2
- package/dist/cjs/snk-crud.cjs.entry.js +10 -3
- package/dist/cjs/snk-data-exporter.cjs.entry.js +10 -1
- package/dist/cjs/snk-data-unit-3b6ab2ad.js +436 -0
- package/dist/cjs/snk-data-unit.cjs.entry.js +6 -411
- package/dist/cjs/snk-detail-view.cjs.entry.js +7 -2
- package/dist/cjs/snk-field-config.cjs.entry.js +2 -4
- package/dist/cjs/snk-filter-bar.cjs.entry.js +3 -1
- package/dist/cjs/snk-filter-param-config.cjs.entry.js +2 -1
- package/dist/cjs/snk-form-config.cjs.entry.js +6 -5
- package/dist/cjs/snk-form.cjs.entry.js +2 -1
- package/dist/cjs/snk-grid.cjs.entry.js +6 -4
- package/dist/cjs/{snk-guides-viewer-6225bb73.js → snk-guides-viewer-8a6743d6.js} +8 -5
- package/dist/cjs/snk-guides-viewer.cjs.entry.js +1 -1
- package/dist/cjs/snk-simple-crud.cjs.entry.js +2 -1
- package/dist/cjs/snk-tab-config.cjs.entry.js +2 -1
- package/dist/cjs/snk-taskbar.cjs.entry.js +3 -1
- package/dist/collection/components/snk-application/snk-application.js +2 -2
- package/dist/collection/components/snk-configurator/snk-configurator.js +23 -2
- package/dist/collection/components/snk-crud/snk-crud.js +30 -3
- package/dist/collection/components/snk-crud/subcomponents/snk-detail-view.js +27 -2
- package/dist/collection/components/snk-crud/subcomponents/snk-guides-viewer.js +29 -6
- package/dist/collection/components/snk-data-exporter/snk-data-exporter.js +29 -1
- package/dist/collection/components/snk-data-unit/snk-data-unit.js +64 -3
- package/dist/collection/components/snk-filter-bar/snk-filter-bar.js +23 -1
- package/dist/collection/components/snk-form/snk-form.js +22 -1
- package/dist/collection/components/snk-form/subcomponents/snk-config-options/snk-config-options.js +22 -1
- package/dist/collection/components/snk-form/subcomponents/snk-field-config/snk-field-config.js +23 -5
- package/dist/collection/components/snk-form/subcomponents/snk-form-config/snk-form-config.js +26 -5
- package/dist/collection/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.js +22 -1
- package/dist/collection/components/snk-grid/snk-grid.js +26 -4
- package/dist/collection/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.js +26 -1
- package/dist/collection/components/snk-simple-crud/snk-simple-crud.js +22 -1
- package/dist/collection/components/snk-taskbar/snk-taskbar.js +23 -1
- package/dist/collection/lib/message/SnkMessageBuilder.js +9 -2
- package/dist/components/SnkMessageBuilder.js +9 -2
- package/dist/components/snk-application2.js +1 -1
- package/dist/components/snk-config-options2.js +3 -1
- package/dist/components/snk-configurator2.js +4 -2
- package/dist/components/snk-crud.js +11 -3
- package/dist/components/snk-data-exporter2.js +10 -1
- package/dist/components/snk-data-unit2.js +25 -4
- package/dist/components/snk-detail-view2.js +17 -7
- package/dist/components/snk-field-config2.js +5 -6
- package/dist/components/snk-filter-bar2.js +4 -1
- package/dist/components/snk-filter-param-config.js +3 -1
- package/dist/components/snk-form-config2.js +7 -5
- package/dist/components/snk-form.js +3 -1
- package/dist/components/snk-grid2.js +7 -4
- package/dist/components/snk-simple-crud.js +3 -1
- package/dist/components/snk-tab-config2.js +3 -1
- package/dist/components/snk-taskbar2.js +4 -1
- package/dist/esm/{SnkMessageBuilder-ec0850af.js → SnkMessageBuilder-68bbf0ae.js} +9 -2
- package/dist/esm/loader.js +1 -1
- package/dist/esm/sankhyablocks.js +1 -1
- package/dist/esm/snk-application.entry.js +1 -1
- package/dist/esm/snk-config-options.entry.js +2 -1
- package/dist/esm/snk-configurator.entry.js +3 -2
- package/dist/esm/snk-crud.entry.js +10 -3
- package/dist/esm/snk-data-exporter.entry.js +10 -1
- package/dist/esm/snk-data-unit-a8093f95.js +434 -0
- package/dist/esm/snk-data-unit.entry.js +5 -414
- package/dist/esm/snk-detail-view.entry.js +7 -2
- package/dist/esm/snk-field-config.entry.js +3 -5
- package/dist/esm/snk-filter-bar.entry.js +3 -1
- package/dist/esm/snk-filter-param-config.entry.js +2 -1
- package/dist/esm/snk-form-config.entry.js +6 -5
- package/dist/esm/snk-form.entry.js +2 -1
- package/dist/esm/snk-grid.entry.js +6 -4
- package/dist/esm/{snk-guides-viewer-73b9eb29.js → snk-guides-viewer-d8654e2a.js} +9 -6
- package/dist/esm/snk-guides-viewer.entry.js +1 -1
- package/dist/esm/snk-simple-crud.entry.js +2 -1
- package/dist/esm/snk-tab-config.entry.js +2 -1
- package/dist/esm/snk-taskbar.entry.js +3 -1
- package/dist/sankhyablocks/p-046b2563.entry.js +1 -0
- package/dist/sankhyablocks/p-0a1e7f75.entry.js +1 -0
- package/dist/sankhyablocks/{p-28c800b9.js → p-0d70c017.js} +1 -1
- package/dist/sankhyablocks/p-1a16426f.js +1 -0
- package/dist/sankhyablocks/{p-9ce550b7.entry.js → p-21a6c546.entry.js} +1 -1
- package/dist/sankhyablocks/p-280b1321.entry.js +1 -0
- package/dist/sankhyablocks/p-32599159.entry.js +1 -0
- package/dist/sankhyablocks/p-5b84b0c5.entry.js +1 -0
- package/dist/sankhyablocks/p-601e6920.entry.js +1 -0
- package/dist/sankhyablocks/p-69af76d4.entry.js +1 -0
- package/dist/sankhyablocks/p-76f04efe.entry.js +1 -0
- package/dist/sankhyablocks/p-93d8fe00.entry.js +1 -0
- package/dist/sankhyablocks/p-a12d74dc.entry.js +1 -0
- package/dist/sankhyablocks/p-a7468f4b.js +1 -0
- package/dist/sankhyablocks/p-a80c766c.entry.js +1 -0
- package/dist/sankhyablocks/p-b686e91a.entry.js +1 -0
- package/dist/sankhyablocks/p-b80cf644.entry.js +1 -0
- package/dist/sankhyablocks/p-d65809d5.entry.js +1 -0
- package/dist/sankhyablocks/{p-b9fe5ed3.entry.js → p-e999631f.entry.js} +2 -2
- package/dist/sankhyablocks/p-f29caa0a.entry.js +1 -0
- package/dist/sankhyablocks/sankhyablocks.esm.js +1 -1
- package/dist/types/components/snk-application/snk-application.d.ts +1 -4
- package/dist/types/components/snk-configurator/snk-configurator.d.ts +5 -0
- package/dist/types/components/snk-crud/snk-crud.d.ts +6 -0
- package/dist/types/components/snk-crud/subcomponents/snk-detail-view.d.ts +2 -3
- package/dist/types/components/snk-crud/subcomponents/snk-guides-viewer.d.ts +5 -1
- package/dist/types/components/snk-data-exporter/snk-data-exporter.d.ts +5 -0
- package/dist/types/components/snk-data-unit/snk-data-unit.d.ts +13 -2
- package/dist/types/components/snk-filter-bar/snk-filter-bar.d.ts +5 -0
- package/dist/types/components/snk-form/snk-form.d.ts +5 -0
- package/dist/types/components/snk-form/subcomponents/snk-config-options/snk-config-options.d.ts +5 -0
- package/dist/types/components/snk-form/subcomponents/snk-field-config/snk-field-config.d.ts +5 -2
- package/dist/types/components/snk-form/subcomponents/snk-form-config/snk-form-config.d.ts +5 -0
- package/dist/types/components/snk-form/subcomponents/snk-tab-config/snk-tab-config.d.ts +5 -0
- package/dist/types/components/snk-grid/snk-grid.d.ts +5 -0
- package/dist/types/components/snk-personalized-filter/subcomponents/snk-filter-param-config/snk-filter-param-config.d.ts +5 -0
- package/dist/types/components/snk-simple-crud/snk-simple-crud.d.ts +5 -0
- package/dist/types/components/snk-taskbar/snk-taskbar.d.ts +5 -0
- package/dist/types/components.d.ts +126 -12
- package/dist/types/lib/message/SnkMessageBuilder.d.ts +4 -2
- package/package.json +1 -1
- package/dist/sankhyablocks/p-0154ae58.entry.js +0 -1
- package/dist/sankhyablocks/p-10be1b2a.entry.js +0 -1
- package/dist/sankhyablocks/p-12d2dccf.entry.js +0 -1
- package/dist/sankhyablocks/p-193b0fa5.entry.js +0 -1
- package/dist/sankhyablocks/p-31d4e5d4.entry.js +0 -1
- package/dist/sankhyablocks/p-68507ace.entry.js +0 -1
- package/dist/sankhyablocks/p-72277163.entry.js +0 -1
- package/dist/sankhyablocks/p-7d4bb27a.entry.js +0 -1
- package/dist/sankhyablocks/p-94fef424.entry.js +0 -1
- package/dist/sankhyablocks/p-983fef8f.js +0 -1
- package/dist/sankhyablocks/p-af8cf505.entry.js +0 -1
- package/dist/sankhyablocks/p-c88c4f80.entry.js +0 -1
- package/dist/sankhyablocks/p-dd90bd52.entry.js +0 -1
- package/dist/sankhyablocks/p-eb7b2496.entry.js +0 -1
- package/dist/sankhyablocks/p-ecd3cad5.entry.js +0 -1
- package/dist/sankhyablocks/p-f9ca6d74.entry.js +0 -1
@@ -0,0 +1 @@
|
|
1
|
+
import{r as t,c as i,h as o,F as a,H as n,g as s}from"./p-b9667fbe.js";import{d as c}from"./p-b6d6b172.js";import{ApplicationContext as e,ElementIDUtils as b}from"@sankhyalabs/core";import{C as r,K as l,b as f,T as g}from"./p-f587a454.js";import"./p-112455b1.js";const h=class{constructor(o){t(this,o),this.ezTabChange=i(this,"ezTabChange",7),this.editionTitleTab=i(this,"editionTitleTab",7),this.deleteTab=i(this,"deleteTab",7),this.hideTab=i(this,"hideTab",7),this.ezOrderChange=i(this,"ezOrderChange",7),this.canStartDrag=i(this,"canStartDrag",7),this._refTabActions=[],this._processedTabs=void 0,this._activeEditText=void 0,this._activeEditTextIndex=void 0,this._actionsHide=[],this._actionsShow=[],this.selectedIndex=void 0,this.selectedTab=void 0,this.tabs=void 0,this.messagesBuilder=void 0}getMessage(t,i){return this.messagesBuilder.getMessage(t,i)}controlSortableTab(){this._sortableTab&&this._sortableTab.destroy(),this._sortableTab=new c.Sortable(this._hostElem.querySelectorAll('[data-draggable-parent="tab"]'),{draggable:'[data-draggable-element="tab"]',mirror:{constrainDimensions:!0}}),this._sortableTab.on(r.dragStart,(t=>this.controlStartDraggingTab(t))),this._sortableTab.on(r.dragStop,(t=>this.controlStopDraggingTab(t)))}controlStartDraggingTab(t){var i,o;const a=null===(i=null==t?void 0:t.dragEvent)||void 0===i?void 0:i.originalEvent,n=null==a?void 0:a.target,s=null===(o=null==n?void 0:n.tagName)||void 0===o?void 0:o.toUpperCase();!0===this._activeEditText||"EZ-ACTIONS-BUTTON"===s?null==t||t.cancel():this.canStartDrag.emit()}controlStopDraggingTab(t){t.data.newIndex!==t.data.oldIndex&&setTimeout((()=>{this.ezOrderChange.emit((t.data.newIndex||0)+1)}),500)}handleTabClick(t){this.selectedIndex=t.index,this._focusedIndex=t.index,this.selectedTab=t.tabKey,this.ezTabChange.emit(t),this.setFocusedBtn(!1,t.index),this.setFocusedTab(t.index)}handleSlotChange(t){const i=t.target.assignedElements()[0];i&&i.classList.add("tab-config__slot")}scrollBackward(){const t=this._scrollContainer;t&&(t.scrollLeft-=t.clientWidth)}scrollFoward(){const t=this._scrollContainer;if(t){let i=null;t.querySelectorAll(".tab-config__tab").forEach((o=>{o.getBoundingClientRect().right<t.clientWidth&&(i=o)})),t.scrollLeft=i.offsetLeft+i.offsetWidth}}updateScroll(){const t=this._scrollContainer;if(t){const{scrollWidth:i,clientWidth:o,scrollLeft:a}=t,n=i-o-Math.ceil(a);this._startHidden=t.scrollLeft>0,this._endHidden=n>0,this._startHidden?this._backwardButton.classList.remove("tab-config__hidden"):this._backwardButton.classList.add("tab-config__hidden"),this._endHidden?this._forwardButton.classList.remove("tab-config__hidden"):this._forwardButton.classList.add("tab-config__hidden")}}domScrollHandler(){window.clearTimeout(this._scrollCallBackScroll),this._scrollCallBackScroll=window.setTimeout((()=>{this.updateScroll()}),200)}setFocusedTab(t){window.clearTimeout(this._scrollCallBackFocus),this._scrollCallBackFocus=window.setTimeout((()=>{this._scrollContainer.querySelector(`#tab${t}`).scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}),200)}controlKeyEventEnter(t){t.preventDefault();const i=this._processedTabs[this._focusedIndex];this.handleTabClick(i),this.setFocusedTab(i.index)}controlKeyEventArrow(t){let i;if(t.key===l.arrowLeft)i=!1;else{if(t.key!==l.arrowRight)return;i=!0}this._focusedIndex=void 0===this._focusedIndex?!1===i?void 0!==this.selectedIndex?this.selectedIndex-1:void 0:void 0!==this.selectedIndex?this.selectedIndex+1:void 0:!1===i?this._focusedIndex-1:this._focusedIndex+1,this._focusedIndex<0?this._focusedIndex=0:this._focusedIndex>this._processedTabs.length-1&&(this._focusedIndex=this._processedTabs.length-1),this.setFocusedBtn(!0,this._focusedIndex),this.setFocusedTab(this._focusedIndex)}controlKeyEventEscape(t){t.preventDefault();const i=this._processedTabs[this.selectedIndex];this._focusedIndex=void 0,this.handleTabClick(i),this.setFocusedTab(this.selectedIndex)}setFocusedParam(t){!0!==this._activeEditText&&null!=t&&(t.key!==l.enter?t.key!==l.arrowLeft&&t.key!==l.arrowRight?t.key!==l.tab&&t.key!==l.escape||this.controlKeyEventEscape(t):this.controlKeyEventArrow(t):this.controlKeyEventEnter(t))}setFocusedBtn(t,i){this._scrollContainer.querySelectorAll(".tab-config__tab").forEach((o=>{o.classList.remove("tab-config__tab--is-focused"),o.id==="tab"+i&&t&&o.classList.add("tab-config__tab--is-focused")}))}getStyledLabel(t){const i=this._hostElem.querySelector(`#${t}`);if(null!=i)return{fontSize:window.getComputedStyle(i).getPropertyValue("font-size"),fontWeight:window.getComputedStyle(i).getPropertyValue("font-weight"),fontFamily:window.getComputedStyle(i).getPropertyValue("font-family")}}cancelEditText(){var t;this._activeEditText=!1,null!=this._scrollContainer&&(null===(t=this._scrollContainer.querySelector(".tab-config__tab--is-active"))||void 0===t||t.focus())}handleActions(t,i){const{value:o}=t.detail;o===f.rename?(this._activeEditText=!0,this._activeEditTextIndex=i.index):o===f.hide||o===f.show?this.hideTab.emit(i):o===f.delete&&this.deleteTab.emit(i)}handleSaveEditionText(t){const{value:i,newValue:o}=t.detail;i!==o?this._processedTabs.forEach((a=>{a.label===i&&(a.label=o,this.cancelEditText(),this.editionTitleTab.emit(t))})):this.cancelEditText()}onHideActions(t){const i=this._refTabActions[t];i&&i.isOpened().then((t=>{t&&(null==i||i.hideActions())}))}componentWillLoad(){this._application=e.getContextValue("__SNK__APPLICATION__"),null!=this._application&&(this._actionsHide=[{value:f.rename,label:this.getMessage("snkTabConfig.labelRename")},{value:f.hide,label:this.getMessage("snkTabConfig.labelHide")},{value:f.delete,label:this.getMessage("snkTabConfig.labelDelete")}],this._actionsShow=[{value:f.rename,label:this.getMessage("snkTabConfig.labelRename")},{value:f.show,label:this.getMessage("snkTabConfig.labelShow")},{value:f.delete,label:this.getMessage("snkTabConfig.labelDelete")}])}componentWillRender(){null==this._processedTabs&&(this._processedTabs=[],this.tabs&&this.tabs.split(",").forEach((t=>{t=t.trim(),this._processedTabs.push({label:t,tabKey:t,index:this._processedTabs.length})})),this._hostElem.querySelectorAll("snk-tab").forEach((t=>{const i=t.getAttribute("tabKey"),o=t.getAttribute("label")!==g.main?t.getAttribute("label"):this.getMessage("snkFormConfig.form.mainArea"),a=t.hasAttribute("visible"),n={label:o,tabKey:i,index:this._processedTabs.length,visible:a},s=t.firstChild;s&&(s.setAttribute("slot","tab"+n.index),this._hostElem.appendChild(s)),this._processedTabs.push(n)})))}componentDidRender(){this.updateScroll(),this.controlSortableTab()}componentDidLoad(){b.addIDInfo(this._hostElem,"itemConfig"),this._processedTabs.forEach(((t,i)=>{const o={id:t.label};b.addIDInfo(this._hostElem.querySelector(`#tab${i}`),"itemConfig",o)}))}render(){return o(n,null,o("button",{class:"tab-config__backward-button",ref:t=>this._backwardButton=t,onClick:()=>this.scrollBackward()}),o("div",{class:"tab-config__lower-bar"}),o("div",{class:"tab-config__scroll",ref:t=>this._scrollContainer=t,onScroll:()=>this.domScrollHandler(),onKeyDown:t=>this.setFocusedParam(t),"data-draggable-parent":"tab"},this._processedTabs.map(((t,i)=>{const n="tab"+i,s=i===this.selectedIndex||this.selectedTab&&t.tabKey===this.selectedTab;return s&&(this.selectedTab=t.tabKey,this.selectedIndex=i),o("button",{id:n,class:"tab-config__tab"+(s?" tab-config__tab--is-active":""),onClick:()=>this.handleTabClick(t),onDblClick:()=>{this._activeEditText=!0,this._activeEditTextIndex=i},"data-draggable-element":i>0?"tab":"",onMouseLeave:()=>this.onHideActions(i)},!0===this._activeEditText&&this._activeEditTextIndex===i&&i>0||o(a,null,i>0&&o("ez-icon",{iconName:t.leftIcon||"drag-indicator",class:"tab-config__left-icon"}),!1===t.visible&&i>0&&o("ez-icon",{iconName:t.leftIcon||"eye-off",class:"tab-config__left-icon tab-config__left-icon--eye-off"}),o("span",{class:"tab-config__tab-label"+(!1===t.visible&&i>0?" tab-config__tab-label-disabled":""),title:t.label},t.label),i>0&&o("ez-actions-button",{class:"tab-config__actions-button",size:"small",ref:t=>this._refTabActions[i]=t,actions:!1===t.visible?this._actionsShow:this._actionsHide,isTransparent:!0,arrowActive:!0,onEzAction:i=>this.handleActions(i,t)}),o("slot",{name:n,onSlotchange:t=>{this.handleSlotChange(t)}})),!0===this._activeEditText&&i>0&&this._activeEditTextIndex===i&&o("ez-text-edit",{value:t.label,styled:this.getStyledLabel(n),class:"tab-config__edit-text",onSaveEdition:t=>this.handleSaveEditionText(t),onCancelEdition:()=>this.cancelEditText()}))}))),o("button",{class:"tab-config__forward-button",ref:t=>this._forwardButton=t,onClick:()=>this.scrollFoward()}))}get _hostElem(){return s(this)}};h.style='@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}.sc-snk-tab-config-h{--snk-tab-config--backward-icon:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z"/></svg>\');--snk-tab-config--forward-icon:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="10px"><path d="M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z"/></svg>\');--snk-tab-config__lower-bar--background-color:var(--color--disable-primary, #e5eaf0);--snk-tab-config__lower-bar--border:2px solid var(--color--disable-primary, #e5eaf0);--snk-tab-config__tab--color:var(--text--primary, #626e82);--snk-tab-config__tab--font-family:var(--font-pattern, "Roboto");--snk-tab-config__tab--font-size:var(--title--small, 14px);--snk-tab-config__tab--padding:var(--space--small, 6px) var(--space--medium, 12px);--snk-tab-config__tab-is-active--color:var(--color--primary, #008561);--snk-tab-config__tab-hover--color:var(--color--secondary, #383c45);--snk-tab-config__tab-is-focused--border:1px dashed var(--color--primary, #008561);--snk-tab-config__tab-label--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--snk-tab-config__tab-label--margin-bottom:var(--space--extra-small, 3px);--snk-tab-config__new-button-icon--color:var(--color--secondary-700, #1C1D22);--snk-tab-config__forward-button--background-color:var(--text--primary, #626e82);--snk-tab-config__forward-button-hover--background-color:var(--color--primary, #008561);--snk-tab-config__left-icon--padding-right:var(--space--small, 6px);--snk-tab-config__left-icon--color:var(--text--disable, #AFB6C0);--snk-tab-config__tab-label-disabled--color:var(--text--disable, #AFB6C0);--snk-tab-config__slot--margin-left:var(--space--small, 6px);display:flex;position:relative;width:100%;overflow:hidden}.tab-config__scroll.sc-snk-tab-config{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.tab-config__lower-bar.sc-snk-tab-config{position:absolute;left:0%;right:0%;top:91%;bottom:0%;border-radius:2px;background-color:var(--snk-tab-config__lower-bar--background-color);border:var(--snk-tab-config__lower-bar--border)}.tab-config__tab.sc-snk-tab-config{display:flex;border:none;background-color:unset;cursor:pointer;align-items:center;justify-content:center;min-width:fit-content;color:var(--snk-tab-config__tab--color);font-family:var(--snk-tab-config__tab--font-family);font-size:var(--snk-tab-config__tab--font-size);padding:var(--snk-tab-config__tab--padding)}.tab-config__tab.sc-snk-tab-config:focus,.tab-config__forward-button.sc-snk-tab-config,.tab-config__backward-button.sc-snk-tab-config{outline:none}.tab-config__tab--is-active.sc-snk-tab-config{position:relative;color:var(--snk-tab-config__tab-is-active--color)}.tab-config__tab.sc-snk-tab-config:hover{color:var(--snk-tab-config__tab-hover--color)}.tab-config__tab--is-active.sc-snk-tab-config:hover{color:var(--snk-tab-config__tab-is-active--color)}.tab-config__tab--is-active.sc-snk-tab-config::after{content:"";position:absolute;width:100%;height:100%;clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out;background-color:var(--snk-tab-config__tab-is-active--color)}.tab-config__tab--is-focused.sc-snk-tab-config{border:var(--snk-tab-config__tab-is-focused--border)}.tab-config__tab-label.sc-snk-tab-config{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--snk-tab-config__tab-label--text-shadow);margin-bottom:var(--snk-tab-config__tab-label--margin-bottom)}.tab-config__forward-button.sc-snk-tab-config,.tab-config__backward-button.sc-snk-tab-config{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.tab-config__new-button.sc-snk-tab-config{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.tab-config__new-button.sc-snk-tab-config ez-icon.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__new-button-icon--color)}.tab-config__backward-button.sc-snk-tab-config{left:0px;box-shadow:10px 10px 5px 5px white;background:white}.tab-config__forward-button.sc-snk-tab-config{box-shadow:10px 10px 5px 20px white;background:white}.tab-config__forward-button.sc-snk-tab-config::after,.tab-config__backward-button.sc-snk-tab-config::after{content:\'\';display:flex;width:10px;height:16px;background-color:var(--snk-tab-config__forward-button--background-color)}.tab-config__forward-button.sc-snk-tab-config::after{-webkit-mask-image:var(--snk-tab-config--forward-icon);mask-image:var(--snk-tab-config--forward-icon)}.tab-config__backward-button.sc-snk-tab-config::after{-webkit-mask-image:var(--snk-tab-config--backward-icon);mask-image:var(--snk-tab-config--backward-icon)}.tab-config__forward-button.sc-snk-tab-config:hover::after,.tab-config__backward-button.sc-snk-tab-config:hover::after{background-color:var(--snk-tab-config__forward-button-hover--background-color)}.tab-config__new-button.sc-snk-tab-config:hover ez-icon.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__forward-button-hover--background-color)}.tab-config__hidden.sc-snk-tab-config{display:none}.tab-config__scroll.sc-snk-tab-config::-webkit-scrollbar{display:none}.tab-config__left-icon.sc-snk-tab-config{padding-right:var(--snk-tab-config__left-icon--padding-right);--ez-icon--color:var(--snk-tab-config__left-icon--color)}.tab-config__left-icon--eye-off.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__left-icon--color)}.tab-config__right-icon.sc-snk-tab-config{visibility:hidden;padding-left:var(--snk-tab-config__left-icon--padding-right)}.tab-config__tab.sc-snk-tab-config:hover .tab-config__right-icon.sc-snk-tab-config{visibility:visible}.tab-config__tab--is-active.sc-snk-tab-config .tab-config__right-icon.sc-snk-tab-config{visibility:visible;--ez-icon--color:var(--snk-tab-config__tab-is-active--color)}.tab-config__tab.sc-snk-tab-config:hover .tab-config__right-icon.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__tab-hover--color)}.tab-config__tab--is-active.sc-snk-tab-config:hover .tab-config__right-icon.sc-snk-tab-config{--ez-icon--color:var(--snk-tab-config__tab-is-active--color)}.tab-config__actions-button.sc-snk-tab-config{--ez-actions-button__btn-action--min-width:100px;visibility:hidden;opacity:0;transition:visibility 1s linear, opacity 0.3s linear}.tab-config__tab.sc-snk-tab-config:hover .tab-config__actions-button.sc-snk-tab-config{visibility:visible;opacity:1;transition:visibility 0.2s linear, opacity 0.10s linear}[data-draggable-element].sc-snk-tab-config{cursor:grab}.tab-config__tab-label-disabled.sc-snk-tab-config{color:var(--snk-tab-config__tab-label-disabled--color)}.tab-config__slot.sc-snk-tab-config{margin-left:var(--snk-tab-config__slot--margin-left)}';export{h as snk_tab_config}
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as t,c as s,h as i,H as e,g as r}from"./p-b9667fbe.js";import{StringUtils as a,ApplicationContext as h,ElementIDUtils as n}from"@sankhyalabs/core";import{A as o}from"./p-dc36cfbf.js";import{T as l,V as k,A as d,b,a as m}from"./p-74724fa7.js";import{P as c}from"./p-f132e371.js";import"./p-98f7f796.js";const u=class{constructor(i){t(this,i),this.actionClick=s(this,"actionClick",7),this._titleKeyByElement={[l.UPDATE]:"snkTaskbar.titleUpdate",[l.PREVIOUS]:"snkTaskbar.titlePrevious",[l.NEXT]:"snkTaskbar.titleNext",[l.REFRESH]:"snkTaskbar.titleRefresh",[l.CLONE]:"snkTaskbar.titleClone",[l.REMOVE]:"snkTaskbar.titleRemove",[l.MORE_OPTIONS]:"snkTaskbar.titleMoreOptions",[l.INSERT]:"snkTaskbar.titleInsert",[l.CANCEL]:"snkTaskbar.titleCancel",[l.SAVE]:"snkTaskbar.titleSave",[l.GRID_MODE]:"snkTaskbar.titleGridMode",[l.FORM_MODE]:"snkTaskbar.titleFormMode",[l.CONFIGURATOR]:"snkTaskbar.titleConfigurator"},this._permissions=void 0,this.configName=void 0,this.buttons=void 0,this.customButtons=void 0,this.actionsList=void 0,this.primaryButton=void 0,this.disabledButtons=void 0,this.dataUnit=void 0,this.presentationMode=c.PRIMARY,this.messagesBuilder=void 0}observeButtons(){this._definitions=void 0}elementsFromString(t){const s=[];return null==t||t.split(",").forEach((t=>{t=t.trim(),(k[t]||this.isAllowed(t))&&s.push(t.trim())})),s}isAllowed(t){return t===d.CONFIGURATOR?!!this._permissions&&(this._permissions.isSup||this._permissions[o.CONFIG_GRID]||this._permissions[o.CONFIG]):!d[t]||!!this._permissions&&(this._permissions.isSup||this._permissions[t])}getTitle(t){var s;let i;return i=this.isAllowed(t)?this._titleKeyByElement[t]:"snkTaskbar.forbidden",i?null===(s=this.messagesBuilder)||void 0===s?void 0:s.getMessage(i,{}):""}elementClick(t){if(this.dataUnit)switch(t){case l.PREVIOUS:this.dataUnit.previousRecord();break;case l.NEXT:this.dataUnit.nextRecord();break;case l.REFRESH:this.dataUnit.loadData();break;case l.CLONE:this.dataUnit.copySelected();break;case l.REMOVE:this.dataUnit.removeSelectedRecords();break;case l.INSERT:this.dataUnit.addRecord();break;case l.CANCEL:this.dataUnit.cancelEdition();break;case l.SAVE:this.dataUnit.saveData()}this.actionClick.emit(t)}isEnabled(t){return!(!this.isAllowed(t)||this.disabledButtons&&this.disabledButtons.includes(t))}validatePresentationMode(){Object.values(c).includes(this.presentationMode)||(this.presentationMode=c.PRIMARY)}getElement(t,s){let i=s===this.primaryButton?"ez-button--primary ":"";return t>1&&(i+="ez-padding-left--medium"),l[s.toString()]?b(s,i,this.getIdElemBtnNative(s),(t=>this.getTitle(t)),(t=>this.elementClick(t)),(t=>this.isEnabled(t)),this.actionsList,this.configName,this.presentationMode):m(s,i,this.getIdElemBtnCustom(s),(t=>this.elementClick(t)),(t=>this.isEnabled(t)))}getIdElemBtnNative(t){return a.toCamelCase(t)}getIdElemBtnCustom(t){return a.toCamelCase(t.name)}isDivider(t){var s;return void 0!==t&&(null===(s=t.t)||void 0===s?void 0:s["data-taskbar-divider"])}removeEmpty(t){let s;return t.filter((t=>!(null==t||this.isDivider(s)&&this.isDivider(t)||(s=t,0))))}componentWillLoad(){this._application=h.getContextValue("__SNK__APPLICATION__"),this._application?this._application.getAllAccess().then((t=>this._permissions=t)):this._permissions={}}componentWillRender(){null==this._definitions&&this._permissions&&(this._definitions=this.elementsFromString(this.buttons)),this.validatePresentationMode()}componentDidLoad(){n.addIDInfo(this._element,null,{dataUnit:this.dataUnit})}render(){if(void 0===this._definitions)return;let t=0;return i(e,null,this.removeEmpty(this._definitions.map((s=>(s===l.DIVIDER?t=0:t++,l[s]?this.getElement(t,l[s]):this.customButtons.has(s)?this.getElement(t,this.customButtons.get(s)):i("slot",{name:s}))))))}get _element(){return r(this)}static get watchers(){return{buttons:["observeButtons"]}}};u.style=".sc-snk-taskbar-h{display:flex}";export{u as snk_taskbar}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
import{r as t,c as e,h as s,g as r}from"./p-b9667fbe.js";import{WaitingChangeException as n,WarningException as i,ErrorException as a,ObjectUtils as o,DataUnit as c,StringUtils as h,DataType as l,DataUnitStorage as u,ChangeOperation as d,DateUtils as p,DependencyType as m,ElementIDUtils as f,ApplicationContext as y,ErrorTracking as w}from"@sankhyalabs/core";import{d as _,D as v,U as g}from"./p-7e475a6f.js";import{ApplicationUtils as I}from"@sankhyalabs/ezui/dist/collection/utils";import{P}from"./p-75a83156.js";import{
|
1
|
+
import{r as t,c as e,h as s,g as r}from"./p-b9667fbe.js";import{WaitingChangeException as n,WarningException as i,ErrorException as a,ObjectUtils as o,DataUnit as c,StringUtils as h,DataType as l,DataUnitStorage as u,ChangeOperation as d,DateUtils as p,DependencyType as m,ElementIDUtils as f,ApplicationContext as y,ErrorTracking as w}from"@sankhyalabs/core";import{d as _,D as v,U as g}from"./p-7e475a6f.js";import{ApplicationUtils as I}from"@sankhyalabs/ezui/dist/collection/utils";import{P}from"./p-75a83156.js";import{G as D,C as $}from"./p-5fc11c5d.js";import{R as b}from"./p-86667fdf.js";import{S as A}from"./p-0d70c017.js";import"./p-112455b1.js";class S{constructor(t){this._app=t,window.addEventListener("error",(t=>this.errorHandler(t))),window.addEventListener("unhandledrejection",(t=>this.rejectionHandler(t)))}rejectionHandler(t){const e=t.reason;e instanceof n||(e?this.processException(e):this._app.isDebugMode().then((t=>{t&&this._app.error("Promise rejeitada","Erro interno: Uma promise foi rejeitada sem razão determinada.")})))}errorHandler(t){this.processException(t.error)}buildErrorCodeHTML(t){return'<br><a href="#" onclick="try{window.workspace.openHelp(\'_tbcode:'+t.errorCode+"')} catch(e){alert('Não é possível abrir a ajuda fora do workspace Sankhya');}\">Código: "+t.errorCode+"</a>"}processException(t){t.errorCode&&(t.message+=this.buildErrorCodeHTML(t)),t instanceof n||t instanceof i?this._app.alert(t.title,t.message):t instanceof a?this._app.error(t.title,t.message):this._app.isDebugMode().then((e=>{if(e)if(t instanceof Error)this._app.error(t.name,t.message);else{const e=(null==t?void 0:t.title)||"Erro detectado",s="string"==typeof t?t:t.message||`Erro interno "${o.objectToString(t)}"`;this._app.error(e,s)}}))}}function T(){const t=["2909523kXwted","CompanyName=Sankhya Jiva Tecnologia e Inovao Ltda,LicensedApplication=Sankhya Gestao,LicenseType=SingleApplication,LicensedConcurrentDeveloperCount=2,LicensedProductionInstancesCount=0,AssetReference=AG-019460,ExpiryDate=9_November_2022_[v2]_MTY2Nzk1MjAwMDAwMA==10487151e296ee4360f80961ca960869","1131048CARoeW","502909mLEPmu","447255iQEXuN","428UHbJwW","270AFTxAV","194369jhGqTI","1540nWuTrj","2044062GicUQI","30CkXPWg"];return(T=function(){return t})()}const C=E;function E(t,e){const s=T();return(E=function(t){return s[t-=392]})(t,e)}!function(){const t=E,e=T();for(;;)try{if(951926==-parseInt(t(398))/1+-parseInt(t(393))/2+parseInt(t(395))/3+-parseInt(t(400))/4*(parseInt(t(392))/5)+-parseInt(t(401))/6*(-parseInt(t(402))/7)+parseInt(t(397))/8+-parseInt(t(399))/9*(-parseInt(t(394))/10))break;e.push(e.shift())}catch(t){e.push(e.shift())}}();const U=C(396);class O{constructor(){this.templateByQuery=new Map,this.buldTemplates()}buldTemplates(){this.templateByQuery.set("fetchTotals",_.gql`query($filters: [InputFilter!] $name: String!) {
|
2
2
|
$queryAlias$: fetchTotals(name: $name, filters: $filters ){
|
3
3
|
name
|
4
4
|
value
|
@@ -80,4 +80,4 @@ import{r as t,c as e,h as s,g as r}from"./p-b9667fbe.js";import{WaitingChangeExc
|
|
80
80
|
name
|
81
81
|
resource
|
82
82
|
}
|
83
|
-
}`)}async getParam(t){const e=`param://application?params=${t}`;return v.get().callGraphQL({values:{name:e},query:this.templateByQuery.get("fetchParam")})}async asString(t){const e=await this.getParam(t);return this.getValue(e)}async asInteger(t){const e=await this.getParam(t);return parseInt(this.getValue(e))}async asFloat(t){const e=await this.getParam(t);return parseFloat(this.getValue(e))}async asBoolean(t){const e=await this.getParam(t);return"S"===this.getValue(e)}async asDate(t){const e=await this.getParam(t);return p.strToDate(this.getValue(e))}async getBatchParams(t){const e=await this.getParam(t.join(",")),s={};return e.forEach((t=>s[t.name]=t.resource)),s}getValue(t={}){if(Array.isArray(t)&&t.length>0&&(t=t[0]),h.isEmpty(t.resource))return"";try{const e=o.stringToObject(t.resource),[s]=Object.keys(e);return e[s]}catch(t){console.warn("Erro ao converter string JSON.")}}}const k=F;function F(t,e){const s=M();return(F=function(t){return s[t-=378]})(t,e)}function M(){const t=["true","863GKWjmo","parse","56355fjjjAm","isSup","putAccess","4324480sjuCdS","hasOwnProperty","239748okvJLB","name","6055770tXeRaU","actions","forEach","7RPRvzn","1042CHxkUw","2988126NIwRMm","20MTNzmH","authorizationSf","item","string","hasAccess","isArray","Objeto não pode ser indefinido.","3071943fWslZp","parseFromJSON"];return(M=function(){return t})()}!function(){const t=F,e=M();for(;;)try{if(281287==parseInt(t(399))/1*(-parseInt(t(387))/2)+-parseInt(t(401))/3+parseInt(t(381))/4*(-parseInt(t(389))/5)+parseInt(t(388))/6*(-parseInt(t(386))/7)+parseInt(t(379))/8+parseInt(t(396))/9+parseInt(t(383))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class x{[k(397)](t){const e=k;if(typeof(t=utxt(t[e(390)]))==e(392)&&(t=JSON[e(400)](t)),null==t)throw Error(e(395));const s=new z("S"===t[e(402)]||!0===t[e(402)]);return Array[e(394)](t[e(391)])&&t[e(391)][e(385)]((t=>s.putAccess(t[e(382)],String(t.status)==e(398)))),s}}class z{constructor(t){const e=k;this.isSup=t,this[e(384)]={}}[k(378)](t,e){this[k(384)][t]=e}[k(393)](t){const e=k;if(this[e(402)])return!0;let s=!0;return this[e(384)][e(380)](t)&&(s=this.actions[t]),s}isUserSup(){return this.isSup}}class G extends A{getData(t){const e=`cfg://auth/${t}`;return new Promise(((t,s)=>{this.loadResource(e).then((e=>{let s=o.stringToObject(e);s&&"object"==typeof s&&t(s)})).catch((t=>{s(t)}))}))}}var H;!function(t){t.INSERT="I",t.UPDATE="A",t.REMOVE="E",t.SHOW="C",t.CONFIG="F",t.CONFIG_NUMBER="N",t.CLONE="D",t.CONFIG_GRID="G"}(H||(H={}));const J=class{constructor(s){t(this,s),this.applicationLoaded=e(this,"applicationLoaded",7),this.applicationLoading=e(this,"applicationLoading",7),this._authPromises=[],this._duCache=new Map,this._duPromises=new Map,this._requestListener=new W,this.messagesBuilder=void 0,this.configName=void 0}get parameters(){return this._parameters||(this._parameters=new L),this._parameters}get resourceID(){return this._resourceID||(this._resourceID=this.urlParams.get("workspaceResourceID")||this.urlParams.get("resourceID")||j.resourceID||"unknown.resource.id"),this._resourceID}get auth(){return this._auth?Promise.resolve(this._auth):new Promise(((t,e)=>{const s=this._authPromises.length>0;this._authPromises.push(new B(t,e)),s||this.authFetcher.getData(this.resourceID).then((t=>{for(this._auth=t;this._authPromises.length>0;)this._authPromises.pop().resolve(this._auth)})).catch((t=>{for(;this._authPromises.length>0;)this._authPromises.pop().reject(t)}))}))}async isUserSup(){return new Promise(((t,e)=>{this.auth.then((s=>{this.getAuthList(s).then((e=>{t(e.isSup)})).catch((t=>e(t)))}))}))}async hasAccess(t){return new Promise(((e,s)=>{this.auth.then((r=>{this.getAuthList(r).then((s=>{e(s.isSup||s.actions[t])})).catch((t=>s(t)))}))}))}async getAllAccess(){return new Promise(((t,e)=>{this.auth.then((s=>{this.getAuthList(s).then((e=>{const s={};s.isSup=e.isSup,Object.entries(H).forEach((t=>{s[t[0]]=e.actions[t[1]]||!1})),t(s)})).catch((t=>e(t)))}))}))}async getStringParam(t){return this.parameters.asString(t)}async getIntParam(t){return this.parameters.asInteger(t)}async getFloatParam(t){return this.parameters.asFloat(t)}async getBooleanParam(t){return this.parameters.asBoolean(t)}async getDateParam(t){return this.parameters.asDate(t)}async showPopUp(t,e="full",s=!0){this.clearContent(this._popUp),this._popUp.appendChild(t),this._popUp.opened=!0,this._popUp.heightMode=e,this._popUp.useHeader=s,"EZ-MODAL-CONTAINER"===t.tagName&&(this._popUp.useHeader=!1)}async showModal(t){this.clearContent(this._rightModal),this._rightModal.appendChild(t),this._rightModal.opened=!0}async closeModal(){this.clearContent(this._rightModal),this._rightModal.opened=!1}async closePopUp(){this.clearContent(this._popUp),this._popUp.opened=!1,this._popUp.useHeader=!0,this._popUp.heightMode="full"}async temOpcional(t){const e=t.split(",");return new Promise(((t,s)=>{this.getAttributeFromHTMLWrapper("opc0009").then((r=>{"1"===r?t(!0):Promise.all(e.map((t=>this.getAttributeFromHTMLWrapper("opc"+t)))).then((e=>{t(e.includes("1"))})).catch((t=>{s(t)}))})).catch((t=>{s(t)}))}))}async getConfig(t){let e={serviceName:"SystemUtilsSP.getConf",requestBody:{config:{chave:t,tipo:"T"}}};return new Promise(((t,s)=>{v.get().callServiceBroker("SystemUtilsSP.getConf",JSON.stringify(e)).then((e=>{var s;return t(null===(s=e.config)||void 0===s?void 0:s.data)})).catch((t=>s(t)))}))}async saveConfig(t,e){let s={serviceName:"SystemUtilsSP.saveConf",requestBody:{config:{chave:t,tipo:"T",data:e}}};return new Promise(((t,e)=>{v.get().callServiceBroker("SystemUtilsSP.saveConf",JSON.stringify(s)).then((e=>t(e))).catch((t=>e(t)))}))}async getAttributeFromHTMLWrapper(t){return Promise.resolve(window[t])}async openApp(t,e){j.openAppActivity(t,e)}async webConnection(t,e,s){this.getStringParam(t).then((t=>{q.webConnectionCaller(t,e,s)}))}getDuPromissesStack(t){let e;return t&&(e=this._duPromises.get(t),e||(e=[],this._duPromises.set(t,e))),e||[]}async createDataunit(t,e,s){return new Promise(((r,n)=>{const i=this.getDuPromissesStack(e),a=i.length>0;if(i.push(new B(r,n)),!a){const r=this.dataUnitFetcher.getDataUnit(t,this.resourceID,s);r.loadMetadata().then((()=>{for(e&&this.updateDataunitCache(void 0,e,r);i.length>0;)i.pop().resolve(r)})).catch((t=>{for(;i.length>0;)i.pop().reject(t)}))}}))}async updateDataunitCache(t,e,s){t&&this._duCache.delete(t),this._duCache.set(e,s)}async getDataUnit(t,e,s){return new Promise(((r,n)=>{const i=this._duCache.get(e);i?r(i):this.createDataunit(t,e,s).then((t=>{r(t)})).catch((t=>n(t)))}))}async addClientEvent(t,e){return new Promise((s=>{v.addClientEvent(t,e),s()}))}async removeClientEvent(t){return new Promise((e=>{v.removeClientEvent(t),e()}))}async hasClientEvent(t){return new Promise((e=>{e(v.hasClientEvent(t))}))}async getResourceID(){return Promise.resolve(this.resourceID)}async getUserID(){return Promise.resolve(window.UID)}async alert(t,e,s,r){return I.alert(t,e,s,r)}async error(t,e,s,r){return I.error(t,e,s,r)}async success(t,e,s,r){return I.success(t,e,s,r)}async message(t,e,s,r){return I.message(t,e,s,r)}async confirm(t,e,s,r,n){return I.confirm(t,e,s,r,n)}async info(t,e){return I.info(t,e)}async loadGridConfig(t){return this.gridConfigFetcher.getConfig(t,this.resourceID)}async loadTotals(t,e,s){return this.totalsFetcher.fetchTotals(t,e,s)}async getAuthList(t){return await(new x).parseFromJSON(t)}get urlParams(){return this._urlParams||(this._urlParams=g.getQueryParams(location.search)),this._urlParams}get dataUnitFetcher(){return this._dataUnitFetcher||(this._dataUnitFetcher=new R),this._dataUnitFetcher}get gridConfigFetcher(){return this._gridConfigFetcher||(this._gridConfigFetcher=new $),this._gridConfigFetcher}get totalsFetcher(){return this._totalsFetcher||(this._totalsFetcher=new O),this._totalsFetcher}get pesquisaFetcher(){return this._pesquisaFetcher||(this._pesquisaFetcher=new P),this._pesquisaFetcher}get authFetcher(){return this._authFetcher||(this._authFetcher=new G),this._authFetcher}async executeSearch(t,e,s){const r=null==s?void 0:s.getField(e);if(r){const{mode:e,argument:n}=t,{ENTITYNAME:i,CODEFIELD:a,DESCRIPTIONFIELD:o,ROOTENTITY:c,DESCRIPTIONENTITY:h}=r.properties,u=r.dependencies;let d;const p={rootEntity:c,descriptionFieldName:o,codeFieldName:a,showInactives:!1,dataUnitId:s.dataUnitId};return null==u||u.filter((t=>t.masterFields)).forEach((t=>{var e;t.type===m.SEARCHING&&(null===(e=t.masterFields)||void 0===e?void 0:e.length)>0&&(d={expression:t.expression,params:t.masterFields.map((t=>{const e=s.getField(t),r=(null==e?void 0:e.dataType)||l.TEXT,n=s.getFieldValue(t);if(null==n)throw this.alert("Erro ao pesquisar",`É necessario informar o campo ${e.label} para executar a pesquisa.`),new Error(`É necessario informar o campo ${e.label} para executar a pesquisa.`);return{name:t,value:n,dataType:r}}))})})),this.executePreparedSearch(e,n,{entity:i,entityDescription:h,criteria:d,searchOptions:p})}}async executePreparedSearch(t,e,s){const{entity:r,entityDescription:n,criteria:i,searchOptions:a}=s;return"ADVANCED"===t?new Promise((t=>{const s=document.createElement("snk-pesquisa");s[f.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=`entity_${r}`,s.argument=e,s.searchLoader=t=>this.pesquisaFetcher.loadAdvancedSearch(r,t,i,a),s.selectItem=e=>{t(e),this.clearPopUpTitle(),this.closePopUp()},this.setPopUpTitle(n),this.showPopUp(s)})):this.pesquisaFetcher.loadSearchOptions(r,e,i,a)}async isDebugMode(){return new Promise((t=>{t(window.isDebugMode)}))}async getAppLabel(){return j.getAppLabel(this._resourceID)}addSearchListener(t,e,s){return new Promise((r=>{r(this.pesquisaFetcher.addSearchListener(t,e.dataUnitId,s))}))}clearContent(t){t&&Array.from(t.children).forEach((e=>{t.removeChild(e)}))}clearPopUpTitle(){this._popUp.ezTitle=""}setPopUpTitle(t){this._popUp.ezTitle=t}componentWillLoad(){this._errorHandler=new S(this),this.messagesBuilder=new D,y.setContextValue("__EZUI__UPLOAD__ADD__URL__",`${g.getUrlBase()}/mge/upload/file`),y.setContextValue("__EZUI__SEARCH__OPTION__LOADER__",((t,e,s)=>this.executeSearch(t,e,s))),y.setContextValue("__EZUI__GRID_LICENSE__",U),w.init(),b.get()}connectedCallback(){y.setContextValue("__SNK__APPLICATION__",this),v.addRequestListener(this._requestListener)}disconnectedCallback(){v.removeRequestListener(this._requestListener)}componentDidLoad(){this.applicationLoading.emit(!0),window.requestAnimationFrame((()=>{this.applicationLoaded.emit(!0)})),f.addIDInfo(this._element,`resource_${this._resourceID}`)}render(){return s("div",null,s("ez-loading-bar",{ref:t=>this._requestListener.loadingBar=t}),s("ez-popup",{opened:!1,ref:t=>this._popUp=t,onEzClosePopup:()=>this.closePopUp()}),s("ez-modal",{opened:!1,ref:t=>this._rightModal=t,"modal-size":"small",closeOutsideClick:!0,closeEsc:!0}))}get _element(){return r(this)}};class W{constructor(){this._debounceTime=1e3,this._ignoredNameTypes=["totals"],this._countRequest=0}onRequestStart(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest++,this.loadingBar.show(),this._timerLoading&&clearTimeout(this._timerLoading))}onRequestEnd(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest--,this._timerLoading=setTimeout((()=>{this._countRequest<=0&&this.loadingBar.hide()}),this._debounceTime))}isIgnoreLoadingOnRequest(t){var e;if(1==(null===(e=null==t?void 0:t.requestBody)||void 0===e?void 0:e.length)){const{name:e}=t.requestBody[0].variables;if(e){const t=e.split(":");return this._ignoredNameTypes.indexOf(t[0])>=0}}return!1}}class B{constructor(t,e){this.resolve=t,this.reject=e}}J.style=".sc-snk-application-h{display:flex;flex-direction:column;height:100%}";export{J as snk_application}
|
83
|
+
}`)}async getParam(t){const e=`param://application?params=${t}`;return v.get().callGraphQL({values:{name:e},query:this.templateByQuery.get("fetchParam")})}async asString(t){const e=await this.getParam(t);return this.getValue(e)}async asInteger(t){const e=await this.getParam(t);return parseInt(this.getValue(e))}async asFloat(t){const e=await this.getParam(t);return parseFloat(this.getValue(e))}async asBoolean(t){const e=await this.getParam(t);return"S"===this.getValue(e)}async asDate(t){const e=await this.getParam(t);return p.strToDate(this.getValue(e))}async getBatchParams(t){const e=await this.getParam(t.join(",")),s={};return e.forEach((t=>s[t.name]=t.resource)),s}getValue(t={}){if(Array.isArray(t)&&t.length>0&&(t=t[0]),h.isEmpty(t.resource))return"";try{const e=o.stringToObject(t.resource),[s]=Object.keys(e);return e[s]}catch(t){console.warn("Erro ao converter string JSON.")}}}const k=F;function F(t,e){const s=M();return(F=function(t){return s[t-=378]})(t,e)}function M(){const t=["true","863GKWjmo","parse","56355fjjjAm","isSup","putAccess","4324480sjuCdS","hasOwnProperty","239748okvJLB","name","6055770tXeRaU","actions","forEach","7RPRvzn","1042CHxkUw","2988126NIwRMm","20MTNzmH","authorizationSf","item","string","hasAccess","isArray","Objeto não pode ser indefinido.","3071943fWslZp","parseFromJSON"];return(M=function(){return t})()}!function(){const t=F,e=M();for(;;)try{if(281287==parseInt(t(399))/1*(-parseInt(t(387))/2)+-parseInt(t(401))/3+parseInt(t(381))/4*(-parseInt(t(389))/5)+parseInt(t(388))/6*(-parseInt(t(386))/7)+parseInt(t(379))/8+parseInt(t(396))/9+parseInt(t(383))/10)break;e.push(e.shift())}catch(t){e.push(e.shift())}}();class x{[k(397)](t){const e=k;if(typeof(t=utxt(t[e(390)]))==e(392)&&(t=JSON[e(400)](t)),null==t)throw Error(e(395));const s=new z("S"===t[e(402)]||!0===t[e(402)]);return Array[e(394)](t[e(391)])&&t[e(391)][e(385)]((t=>s.putAccess(t[e(382)],String(t.status)==e(398)))),s}}class z{constructor(t){const e=k;this.isSup=t,this[e(384)]={}}[k(378)](t,e){this[k(384)][t]=e}[k(393)](t){const e=k;if(this[e(402)])return!0;let s=!0;return this[e(384)][e(380)](t)&&(s=this.actions[t]),s}isUserSup(){return this.isSup}}class G extends b{getData(t){const e=`cfg://auth/${t}`;return new Promise(((t,s)=>{this.loadResource(e).then((e=>{let s=o.stringToObject(e);s&&"object"==typeof s&&t(s)})).catch((t=>{s(t)}))}))}}var H;!function(t){t.INSERT="I",t.UPDATE="A",t.REMOVE="E",t.SHOW="C",t.CONFIG="F",t.CONFIG_NUMBER="N",t.CLONE="D",t.CONFIG_GRID="G"}(H||(H={}));const J=class{constructor(s){t(this,s),this.applicationLoaded=e(this,"applicationLoaded",7),this.applicationLoading=e(this,"applicationLoading",7),this._authPromises=[],this._duCache=new Map,this._duPromises=new Map,this._requestListener=new W,this.messagesBuilder=void 0,this.configName=void 0}get parameters(){return this._parameters||(this._parameters=new L),this._parameters}get resourceID(){return this._resourceID||(this._resourceID=this.urlParams.get("workspaceResourceID")||this.urlParams.get("resourceID")||j.resourceID||"unknown.resource.id"),this._resourceID}get auth(){return this._auth?Promise.resolve(this._auth):new Promise(((t,e)=>{const s=this._authPromises.length>0;this._authPromises.push(new B(t,e)),s||this.authFetcher.getData(this.resourceID).then((t=>{for(this._auth=t;this._authPromises.length>0;)this._authPromises.pop().resolve(this._auth)})).catch((t=>{for(;this._authPromises.length>0;)this._authPromises.pop().reject(t)}))}))}async isUserSup(){return new Promise(((t,e)=>{this.auth.then((s=>{this.getAuthList(s).then((e=>{t(e.isSup)})).catch((t=>e(t)))}))}))}async hasAccess(t){return new Promise(((e,s)=>{this.auth.then((r=>{this.getAuthList(r).then((s=>{e(s.isSup||s.actions[t])})).catch((t=>s(t)))}))}))}async getAllAccess(){return new Promise(((t,e)=>{this.auth.then((s=>{this.getAuthList(s).then((e=>{const s={};s.isSup=e.isSup,Object.entries(H).forEach((t=>{s[t[0]]=e.actions[t[1]]||!1})),t(s)})).catch((t=>e(t)))}))}))}async getStringParam(t){return this.parameters.asString(t)}async getIntParam(t){return this.parameters.asInteger(t)}async getFloatParam(t){return this.parameters.asFloat(t)}async getBooleanParam(t){return this.parameters.asBoolean(t)}async getDateParam(t){return this.parameters.asDate(t)}async showPopUp(t,e="full",s=!0){this.clearContent(this._popUp),this._popUp.appendChild(t),this._popUp.opened=!0,this._popUp.heightMode=e,this._popUp.useHeader=s,"EZ-MODAL-CONTAINER"===t.tagName&&(this._popUp.useHeader=!1)}async showModal(t){this.clearContent(this._rightModal),this._rightModal.appendChild(t),this._rightModal.opened=!0}async closeModal(){this.clearContent(this._rightModal),this._rightModal.opened=!1}async closePopUp(){this.clearContent(this._popUp),this._popUp.opened=!1,this._popUp.useHeader=!0,this._popUp.heightMode="full"}async temOpcional(t){const e=t.split(",");return new Promise(((t,s)=>{this.getAttributeFromHTMLWrapper("opc0009").then((r=>{"1"===r?t(!0):Promise.all(e.map((t=>this.getAttributeFromHTMLWrapper("opc"+t)))).then((e=>{t(e.includes("1"))})).catch((t=>{s(t)}))})).catch((t=>{s(t)}))}))}async getConfig(t){let e={serviceName:"SystemUtilsSP.getConf",requestBody:{config:{chave:t,tipo:"T"}}};return new Promise(((t,s)=>{v.get().callServiceBroker("SystemUtilsSP.getConf",JSON.stringify(e)).then((e=>{var s;return t(null===(s=e.config)||void 0===s?void 0:s.data)})).catch((t=>s(t)))}))}async saveConfig(t,e){let s={serviceName:"SystemUtilsSP.saveConf",requestBody:{config:{chave:t,tipo:"T",data:e}}};return new Promise(((t,e)=>{v.get().callServiceBroker("SystemUtilsSP.saveConf",JSON.stringify(s)).then((e=>t(e))).catch((t=>e(t)))}))}async getAttributeFromHTMLWrapper(t){return Promise.resolve(window[t])}async openApp(t,e){j.openAppActivity(t,e)}async webConnection(t,e,s){this.getStringParam(t).then((t=>{q.webConnectionCaller(t,e,s)}))}getDuPromissesStack(t){let e;return t&&(e=this._duPromises.get(t),e||(e=[],this._duPromises.set(t,e))),e||[]}async createDataunit(t,e,s){return new Promise(((r,n)=>{const i=this.getDuPromissesStack(e),a=i.length>0;if(i.push(new B(r,n)),!a){const r=this.dataUnitFetcher.getDataUnit(t,this.resourceID,s);r.loadMetadata().then((()=>{for(e&&this.updateDataunitCache(void 0,e,r);i.length>0;)i.pop().resolve(r)})).catch((t=>{for(;i.length>0;)i.pop().reject(t)}))}}))}async updateDataunitCache(t,e,s){t&&this._duCache.delete(t),this._duCache.set(e,s)}async getDataUnit(t,e,s){return new Promise(((r,n)=>{const i=this._duCache.get(e);i?r(i):this.createDataunit(t,e,s).then((t=>{r(t)})).catch((t=>n(t)))}))}async addClientEvent(t,e){return new Promise((s=>{v.addClientEvent(t,e),s()}))}async removeClientEvent(t){return new Promise((e=>{v.removeClientEvent(t),e()}))}async hasClientEvent(t){return new Promise((e=>{e(v.hasClientEvent(t))}))}async getResourceID(){return Promise.resolve(this.resourceID)}async getUserID(){return Promise.resolve(window.UID)}async alert(t,e,s,r){return I.alert(t,e,s,r)}async error(t,e,s,r){return I.error(t,e,s,r)}async success(t,e,s,r){return I.success(t,e,s,r)}async message(t,e,s,r){return I.message(t,e,s,r)}async confirm(t,e,s,r,n){return I.confirm(t,e,s,r,n)}async info(t,e){return I.info(t,e)}async loadGridConfig(t){return this.gridConfigFetcher.getConfig(t,this.resourceID)}async loadTotals(t,e,s){return this.totalsFetcher.fetchTotals(t,e,s)}async getAuthList(t){return await(new x).parseFromJSON(t)}get urlParams(){return this._urlParams||(this._urlParams=g.getQueryParams(location.search)),this._urlParams}get dataUnitFetcher(){return this._dataUnitFetcher||(this._dataUnitFetcher=new R),this._dataUnitFetcher}get gridConfigFetcher(){return this._gridConfigFetcher||(this._gridConfigFetcher=new D),this._gridConfigFetcher}get totalsFetcher(){return this._totalsFetcher||(this._totalsFetcher=new O),this._totalsFetcher}get pesquisaFetcher(){return this._pesquisaFetcher||(this._pesquisaFetcher=new P),this._pesquisaFetcher}get authFetcher(){return this._authFetcher||(this._authFetcher=new G),this._authFetcher}async executeSearch(t,e,s){const r=null==s?void 0:s.getField(e);if(r){const{mode:e,argument:n}=t,{ENTITYNAME:i,CODEFIELD:a,DESCRIPTIONFIELD:o,ROOTENTITY:c,DESCRIPTIONENTITY:h}=r.properties,u=r.dependencies;let d;const p={rootEntity:c,descriptionFieldName:o,codeFieldName:a,showInactives:!1,dataUnitId:s.dataUnitId};return null==u||u.filter((t=>t.masterFields)).forEach((t=>{var e;t.type===m.SEARCHING&&(null===(e=t.masterFields)||void 0===e?void 0:e.length)>0&&(d={expression:t.expression,params:t.masterFields.map((t=>{const e=s.getField(t),r=(null==e?void 0:e.dataType)||l.TEXT,n=s.getFieldValue(t);if(null==n)throw this.alert("Erro ao pesquisar",`É necessario informar o campo ${e.label} para executar a pesquisa.`),new Error(`É necessario informar o campo ${e.label} para executar a pesquisa.`);return{name:t,value:n,dataType:r}}))})})),this.executePreparedSearch(e,n,{entity:i,entityDescription:h,criteria:d,searchOptions:p})}}async executePreparedSearch(t,e,s){const{entity:r,entityDescription:n,criteria:i,searchOptions:a}=s;return"ADVANCED"===t?new Promise((t=>{const s=document.createElement("snk-pesquisa");s[f.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=`entity_${r}`,s.argument=e,s.searchLoader=t=>this.pesquisaFetcher.loadAdvancedSearch(r,t,i,a),s.selectItem=e=>{t(e),this.clearPopUpTitle(),this.closePopUp()},this.setPopUpTitle(n),this.showPopUp(s)})):this.pesquisaFetcher.loadSearchOptions(r,e,i,a)}async isDebugMode(){return new Promise((t=>{t(window.isDebugMode)}))}async getAppLabel(){return j.getAppLabel(this._resourceID)}addSearchListener(t,e,s){return new Promise((r=>{r(this.pesquisaFetcher.addSearchListener(t,e.dataUnitId,s))}))}clearContent(t){t&&Array.from(t.children).forEach((e=>{t.removeChild(e)}))}clearPopUpTitle(){this._popUp.ezTitle=""}setPopUpTitle(t){this._popUp.ezTitle=t}componentWillLoad(){this._errorHandler=new S(this),this.messagesBuilder=new A,y.setContextValue("__EZUI__UPLOAD__ADD__URL__",`${g.getUrlBase()}/mge/upload/file`),y.setContextValue("__EZUI__SEARCH__OPTION__LOADER__",((t,e,s)=>this.executeSearch(t,e,s))),y.setContextValue("__EZUI__GRID_LICENSE__",U),w.init(),$.get()}connectedCallback(){y.setContextValue("__SNK__APPLICATION__",this),v.addRequestListener(this._requestListener)}disconnectedCallback(){v.removeRequestListener(this._requestListener)}componentDidLoad(){this.applicationLoading.emit(!0),window.requestAnimationFrame((()=>{this.applicationLoaded.emit(!0)})),f.addIDInfo(this._element,`resource_${this._resourceID}`)}render(){return s("div",null,s("ez-loading-bar",{ref:t=>this._requestListener.loadingBar=t}),s("ez-popup",{opened:!1,ref:t=>this._popUp=t,onEzClosePopup:()=>this.closePopUp()}),s("ez-modal",{opened:!1,ref:t=>this._rightModal=t,"modal-size":"small",closeOutsideClick:!0,closeEsc:!0}))}get _element(){return r(this)}};class W{constructor(){this._debounceTime=1e3,this._ignoredNameTypes=["totals"],this._countRequest=0}onRequestStart(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest++,this.loadingBar.show(),this._timerLoading&&clearTimeout(this._timerLoading))}onRequestEnd(t){this.isIgnoreLoadingOnRequest(t)||(this._countRequest--,this._timerLoading=setTimeout((()=>{this._countRequest<=0&&this.loadingBar.hide()}),this._debounceTime))}isIgnoreLoadingOnRequest(t){var e;if(1==(null===(e=null==t?void 0:t.requestBody)||void 0===e?void 0:e.length)){const{name:e}=t.requestBody[0].variables;if(e){const t=e.split(":");return this._ignoredNameTypes.indexOf(t[0])>=0}}return!1}}class B{constructor(t,e){this.resolve=t,this.reject=e}}J.style=".sc-snk-application-h{display:flex;flex-direction:column;height:100%}";export{J as snk_application}
|
@@ -0,0 +1 @@
|
|
1
|
+
import{r as i,c as o,h as n,H as e,g as s}from"./p-b9667fbe.js";import{ElementIDUtils as l}from"@sankhyalabs/core";import{A as f}from"./p-f587a454.js";const t=class{constructor(n){i(this,n),this.ezClickIcon=o(this,"ezClickIcon",7),this._lang="pt",this.isConfigActive=!1,this.fieldConfig=void 0,this.modeInsertion=!0,this.dataUnit=void 0,this.messagesBuilder=void 0}handleAction(i,o){i.preventDefault(),i.stopPropagation();const n=this.fieldConfig;o!==f.configuration&&(n.group=void 0),this.ezClickIcon.emit({field:n,type:o})}getMessage(i){return this.messagesBuilder.getMessage(i,{})}isRequired(){var i,o;const n=this.dataUnit&&this.dataUnit.getField(null===(i=this.fieldConfig)||void 0===i?void 0:i.name);return!0===(null==n?void 0:n.required)||!0===(null===(o=this.fieldConfig)||void 0===o?void 0:o.required)}componentDidLoad(){l.addIDInfo(this._element)}render(){if(null!=this.fieldConfig)return n(e,null,n("div",{class:"field-config"},n("div",{class:"field-config__draggable"},n("ez-icon",{iconName:"drag-indicator",size:"small"})),n("div",{class:"field-config__label"},n("span",{class:"field-config__label-text",lang:this._lang,title:this.fieldConfig.label},this.fieldConfig.label),this.isRequired()&&n("span",{class:"field-config__label-required"},"*")),this.modeInsertion?n("div",{class:"field-config__add"},n("ez-button",{onClick:i=>this.handleAction(i,f.add),mode:"icon",class:"ez-button--tertiary",iconName:"plus",size:"large",title:this.getMessage("snkFieldConfig.titleAdd")})):n("div",{class:"field-config__options"+(this.isConfigActive?" field-config__options--is-active":" ")},n("ez-button",{mode:"icon",class:"ez-button--tertiary field-config__remove-icon",onClick:i=>this.handleAction(i,f.remove),iconName:"minus",size:"large",title:this.getMessage("snkFieldConfig.titleRemove")}),n("ez-button",{id:"buttonConfig_"+this.fieldConfig.name,mode:"icon",class:"ez-button--tertiary",onClick:i=>this.handleAction(i,f.configuration),iconName:this.isConfigActive?"chevron-up":"settings-inverted",size:"large",title:this.getMessage("snkFieldConfig.titleConfigurations")}))),this.isConfigActive&&n("div",{class:"field-config__config-popover"},n("div",{class:"field-config__config-outer-arrow"},n("div",{class:"field-config__config-inner-arrow"}))))}get _element(){return s(this)}};t.style=".sc-snk-field-config-h{--snk-field-config--height:42px;--snk-field-config--width:100%;--snk-field-config__icon--width:48px;--snk-field-config-slim--height:32px;--snk-field-config--border-radius:var(--border--radius-medium, 12px);--snk-field-config--font-size:var(--text--medium, 14px);--snk-field-config--font-family:var(--font-pattern, Arial);--snk-field-config--font-weight:var(--text-weight--medium, 400);--snk-field-config--color:var(--title--primary, #000);--snk-field-config--padding-left:var(--space--medium, 6px);--snk-field-config__input--background-color:var(--background--medium, #e0e0e0);--snk-field-config__input--border:var(--border--medium, 2px solid);--snk-field-config__input--border-color:var(--background--xlight, #fff);--snk-field-config__required--color:var(--color--error, #FF0000);--snk-field-config__label--gap:var(--space--extra-small, 3px);--snk-field-config__transition--visibility:var(--transition, 0.2s linear);--snk-field-config__transition--opacity:var(--transition, 0.15s linear);--snk-field-config__config-popover--z-index:var(--more-visible, 2);--snk-field-config__config-outer-arrow--background-color:var(--color--secondary-200, #D2D3DA);--snk-field-config__draggable--padding-right:var(--space--small, 6px);display:flex;flex-wrap:wrap;position:relative;width:var(--snk-field-config--width)}.field-config.sc-snk-field-config{width:100%;box-sizing:border-box;display:flex;align-items:center;padding-left:var(--snk-field-config--padding-left);font-weight:var(--snk-field-config--font-weight);height:var(--snk-field-config--height);border-radius:var(--snk-field-config--border-radius);font-family:var(--snk-field-config--font-family);font-size:var(--snk-field-config--font-size);border:var(--snk-field-config__input--border);border-color:var(--snk-field-config__input--border-color);background-color:var(--snk-field-config__input--background-color);color:var(--snk-field-config--color)}.field-config__config-popover.sc-snk-field-config{width:40px;margin-left:auto;z-index:var(--snk-field-config__config-popover--z-index)}.field-config__label.sc-snk-field-config{display:flex;flex-direction:row-reverse;line-height:calc(var(--snk-field-config--font-size) + 2px);gap:var(--snk-field-config__label--gap)}.field-config__label-text.sc-snk-field-config{overflow:hidden;-webkit-hyphens:auto;-ms-hyphens:auto;hyphens:auto;height:auto;-webkit-box-orient:vertical;-webkit-line-clamp:2;line-clamp:2;display:-webkit-box;-o-text-overflow:ellipsis;text-overflow:ellipsis;word-break:break-word}.field-config__label-required.sc-snk-field-config{color:var(--snk-field-config__required--color)}.field-config__add.sc-snk-field-config{display:flex;margin-left:auto;visibility:hidden;opacity:0;transition:visibility var(--snk-field-config__transition--visibility), opacity var(--snk-field-config__transition--opacity)}.field-config__options.sc-snk-field-config{display:flex;margin-left:auto;visibility:hidden;opacity:0;transition:visibility var(--snk-field-config__transition--visibility), opacity var(--snk-field-config__transition--opacity)}.field-config__options--is-active.sc-snk-field-config{display:flex;visibility:visible;opacity:1}.field-config__remove-icon.sc-snk-field-config{margin-right:-15px}.field-config.sc-snk-field-config:hover .field-config__options.sc-snk-field-config{display:flex;visibility:visible;opacity:1}.field-config.sc-snk-field-config:hover .field-config__add.sc-snk-field-config{visibility:visible;opacity:1}.field-config__draggable.sc-snk-field-config{padding-right:var(--snk-field-config__draggable--padding-right)}.field-config__config-outer-arrow.sc-snk-field-config{clip-path:polygon(50% 0, 90% 100%, 10% 100%);border-radius:0.25em 0 0 0;width:30px;height:15px;padding-top:3px;border-bottom:1px solid #FFFFFF;background-color:var(--snk-field-config__config-outer-arrow--background-color)}.field-config__config-inner-arrow.sc-snk-field-config{background-color:#FFFFFF;clip-path:polygon(50% 0, 90% 100%, 10% 100%);border-radius:0.25em 0 0 0;width:30px;height:15px}.ez-box__container.sc-snk-field-config ez-collapsible-box.sc-snk-field-config{--snk-collapsible-box__header--padding-left:6px}ez-icon.sc-snk-field-config{--snk-icon--color:var(--snk-field-config--color)}ez-popover.sc-snk-field-config{--snk-popover__box--background-color:transparent;--snk-popover__box--box-shadow:none}.field-config__options.sc-snk-field-config ez-button.sc-snk-field-config{--snk-button--background-color:transparent;--snk-button--focus--border:none;--snk-button--focus--box-shadow:none}@media screen and (min-width: 1200px){.field-config__label.sc-snk-field-config{flex-direction:row}}";export{t as snk_field_config}
|
@@ -1 +1 @@
|
|
1
|
-
import{p as e,b as t}from"./p-b9667fbe.js";export{s as setNonce}from"./p-b9667fbe.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-
|
1
|
+
import{p as e,b as t}from"./p-b9667fbe.js";export{s as setNonce}from"./p-b9667fbe.js";(()=>{const t=import.meta.url,a={};return""!==t&&(a.resourcesUrl=new URL(".",t).href),e(a)})().then((e=>t([["p-a12d74dc",[[6,"snk-simple-crud",{dataState:[16],dataUnit:[16],mode:[2],taskbarManager:[16],messagesBuilder:[1040],_currentViewMode:[32],_config:[32],goToView:[64],setMetadata:[64],setRecords:[64],getRecords:[64]},[[0,"actionClick","actionClickListener"]]]]],["p-e551b19a",[[1,"teste-pesquisa"]]],["p-86d29b6f",[[0,"snk-filter-binary-select",{value:[1544],config:[16],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-79d22df0",[[2,"snk-filter-field-search",{searchable:[4],breadcrumbItems:[32],linkItems:[32],fieldItems:[32],setDataSource:[64],filterDataSource:[64]}]]],["p-ee82c157",[[0,"snk-filter-multi-select",{value:[1544],config:[16],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-ad51bf1c",[[0,"snk-filter-number",{config:[16],value:[2],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-93d8fe00",[[2,"snk-filter-param-config",{messagesBuilder:[1040],_opened:[32],_configType:[32],_expressionItem:[32],_informedInstance:[32],_canSave:[32],open:[64],close:[64]}]]],["p-5fc55684",[[0,"snk-filter-period",{config:[16],value:[8],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-d5c9c1f8",[[0,"snk-filter-personalized",{config:[16],value:[1040],fix:[16],unfix:[16],show:[64]}]]],["p-5e62a17b",[[0,"snk-filter-search",{config:[16],value:[16],show:[64]},[[0,"ezChange","ezChangeListener"]]]]],["p-c336170d",[[0,"snk-filter-text",{config:[16],value:[1]},[[0,"ezChange","ezChangeListener"]]]]],["p-b3e71248",[[6,"snk-simple-bar",{label:[1],breadcrumbItens:[16]}]]],["p-b686e91a",[[2,"snk-detail-view",{formConfigManager:[1040],dataUnitName:[1,"data-unit-name"],guideItemPath:[16],entityName:[1,"entity-name"],label:[1],dataUnit:[1040],selectedForm:[1025,"selected-form"],dataState:[1040],messagesBuilder:[1040],branchGuide:[16],_disabledButtons:[32],changeViewMode:[64],configGrid:[64],showUp:[64]},[[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-32599159",[[2,"snk-configurator",{configName:[1,"config-name"],viewMode:[2,"view-mode"],messagesBuilder:[1040],_opened:[32],_permissions:[32],open:[64],close:[64]}]]],["p-e701646c",[[2,"snk-pesquisa",{searchLoader:[16],selectItem:[16],argument:[1025],_itemList:[32],_startLoading:[32]}]]],["p-5b84b0c5",[[2,"snk-filter-bar",{dataUnit:[1040],configName:[1,"config-name"],filterConfig:[1040],messagesBuilder:[1040],allowDefault:[32],scrollerLocked:[32]},[[0,"filterChange","filterChangeListener"]]]]],["p-6ad356c2",[[2,"snk-grid-config",{selectedIndex:[1026,"selected-index"],application:[16],columns:[1040],config:[1040],configName:[1,"config-name"]}]]],["p-0a1e7f75",[[2,"snk-config-options",{fieldConfig:[16],idConfig:[513,"id-config"],dataUnit:[16],messagesBuilder:[1040],_defaultType:[32]}]]],["p-601e6920",[[2,"snk-data-unit",{dataState:[1040],messagesBuilder:[1040],dataUnitName:[1,"data-unit-name"],entityName:[1,"entity-name"],pageSize:[2,"page-size"],dataUnit:[1040],beforeSave:[16],afterSave:[16],getDataUnit:[64],getSelectedRecordsIDsInfo:[64]}]]],["p-f29caa0a",[[2,"snk-field-config",{isConfigActive:[16],fieldConfig:[16],modeInsertion:[516,"mode-insertion"],dataUnit:[16],messagesBuilder:[1040]}]]],["p-b80cf644",[[6,"snk-tab-config",{selectedIndex:[1538,"selected-index"],selectedTab:[1537,"selected-tab"],tabs:[1],messagesBuilder:[1040],_processedTabs:[32],_activeEditText:[32],_activeEditTextIndex:[32],_actionsHide:[32],_actionsShow:[32]}]]],["p-046b2563",[[2,"snk-form-config",{dataUnit:[16],configManager:[16],messagesBuilder:[1040],_formConfigOptions:[32],_fieldConfigSelected:[32],_layoutFormConfig:[32],_fieldsAvailable:[32],_formConfig:[32],_formConfigChanged:[32],_optionFormConfigSelected:[32],_optionFormConfigChanged:[32],_tempGroups:[32]}]]],["p-d65809d5",[[6,"snk-taskbar",{configName:[1,"config-name"],buttons:[1],customButtons:[16],actionsList:[16],primaryButton:[1,"primary-button"],disabledButtons:[16],dataUnit:[16],presentationMode:[1537,"presentation-mode"],messagesBuilder:[1040],_permissions:[32]}]]],["p-3a2ce158",[[0,"snk-filter-item",{config:[1040],getMessage:[16],detailIsVisible:[32],showUp:[64],hideDetail:[64]},[[2,"click","clickListener"],[2,"mousedown","mouseDownListener"],[0,"filterChange","filterChangeListener"]]]]],["p-093febff",[[4,"snk-filter-list",{label:[1],iconName:[1,"icon-name"],items:[16],getMessage:[16],emptyText:[1,"empty-text"],findFilterText:[1,"find-filter-text"],buttonClass:[1,"button-class"],_filterArgument:[32],_showAll:[32],hideDetail:[64]},[[2,"keydown","keyDownHandler"]]]]],["p-3169584f",[[1,"snk-select-box",{selectedOption:[1,"selected-option"]}]]],["p-22e44b9d",[[0,"snk-exporter-email-sender",{getMessage:[16],_config:[32],_opened:[32],_currentStep:[32],open:[64],close:[64]}]]],["p-a80c766c",[[2,"snk-data-exporter",{provider:[16],messagesBuilder:[1040],_items:[32],_showDropdown:[32],_releasedToExport:[32]}]]],["p-21a6c546",[[2,"snk-guides-viewer",{_guideBuilders:[16],dataUnit:[16],dataState:[16],configName:[1,"config-name"],entityPath:[1,"entity-path"],actionsList:[16],recordsValidator:[16],masterFormConfig:[1040],selectedGuide:[16],taskbarManager:[16],messagesBuilder:[1040],presentationMode:[1,"presentation-mode"],_breadcrumbItems:[32],_guides:[32],_formEditorConfigManager:[32],_formEditorDataUnit:[32],showFormConfig:[64]},[[2,"actionClick","onActionClick"],[0,"snkContentCardChanged","onContentCardChanged"]]]]],["p-69af76d4",[[6,"snk-crud",{configName:[1025,"config-name"],actionsList:[16],taskbarManager:[16],recordsValidator:[16],statusResolver:[16],multipleSelection:[4,"multiple-selection"],presentationMode:[1,"presentation-mode"],messagesBuilder:[1040],_dataUnit:[32],_dataState:[32],_currentViewMode:[32],goToView:[64]}]]],["p-76f04efe",[[2,"snk-form",{configName:[1,"config-name"],recordsValidator:[16],messagesBuilder:[1040],_dataUnit:[32],_dataState:[32],_showFormConfig:[32],_configManager:[32],showConfig:[64],hideConfig:[64]}]]],["p-e999631f",[[2,"snk-application",{messagesBuilder:[1040],configName:[1,"config-name"],isUserSup:[64],hasAccess:[64],getAllAccess:[64],getStringParam:[64],getIntParam:[64],getFloatParam:[64],getBooleanParam:[64],getDateParam:[64],showPopUp:[64],showModal:[64],closeModal:[64],closePopUp:[64],temOpcional:[64],getConfig:[64],saveConfig:[64],getAttributeFromHTMLWrapper:[64],openApp:[64],webConnection:[64],createDataunit:[64],updateDataunitCache:[64],getDataUnit:[64],addClientEvent:[64],removeClientEvent:[64],hasClientEvent:[64],getResourceID:[64],getUserID:[64],alert:[64],error:[64],success:[64],message:[64],confirm:[64],info:[64],loadGridConfig:[64],loadTotals:[64],executeSearch:[64],executePreparedSearch:[64],isDebugMode:[64],getAppLabel:[64],addSearchListener:[64]}]]],["p-afba9bbe",[[0,"snk-filter-detail",{config:[1040],getMessage:[16],show:[64]}]]],["p-280b1321",[[6,"snk-grid",{configName:[1,"config-name"],actionsList:[16],isDetail:[4,"is-detail"],taskbarManager:[16],statusResolver:[16],multipleSelection:[4,"multiple-selection"],presentationMode:[1,"presentation-mode"],messagesBuilder:[1040],_dataUnit:[32],_dataState:[32],_gridConfig:[32],_popUpGridConfig:[32],showConfig:[64],hideConfig:[64],setConfig:[64]}]]],["p-900b2889",[[2,"snk-form-summary",{fixed:[1540],contracted:[1540],summary:[16]}]]],["p-9ebb164d",[[6,"snk-form-view",{levelPath:[1,"level-path"],label:[1],name:[1],fields:[16],formMetadata:[8,"form-metadata"],dataUnit:[16],contracted:[4],fixed:[1540],summaryFields:[16],canExpand:[4,"can-expand"],canFix:[4,"can-fix"],recordsValidator:[16],showUp:[64]}]]],["p-73e830cf",[[0,"snk-filter-modal",{getMessage:[16],items:[1040],modalTitle:[1,"modal-title"],modalSubTitle:[1,"modal-sub-title"],cancelButtonLabel:[1,"cancel-button-label"],okButtonLabel:[1,"ok-button-label"],infoText:[1,"info-text"],useSearch:[4,"use-search"],processModalAction:[16],_filterArgument:[32]}]]]],e)));
|
@@ -7,7 +7,6 @@ import { IOption, ISearchArgument } from "@sankhyalabs/ezui/dist/types/component
|
|
7
7
|
import { SnkErrorHandler } from "./errorhandler/snk-error-handler";
|
8
8
|
import { IRemoveSearchListener, ISearchListener, PesquisaFetcher } from "../../lib/http/data-fetcher/fetchers/pesquisa-fetcher";
|
9
9
|
import { TotalsFetcher } from "../../lib/http/data-fetcher/fetchers/totals-fetcher";
|
10
|
-
import { SnkMessageBuilder } from "../../lib/message/SnkMessageBuilder";
|
11
10
|
import { SnkFilterItemConfig } from "../snk-filter-bar/filter-item/snk-filter-item";
|
12
11
|
import DataUnitFetcher from "../../lib/http/data-fetcher/fetchers/dataunit-fetcher";
|
13
12
|
import { IAppletCallerParams } from "../../lib/applet-caller/applet-caller";
|
@@ -16,6 +15,7 @@ import GridConfigFetcher from "../../lib/http/data-fetcher/fetchers/grid-config-
|
|
16
15
|
import AuthFetcher, { AutorizationType } from "../../lib/http/data-fetcher/fetchers/auth-fetcher";
|
17
16
|
import { IClientEventResponse } from "../../lib/http/data-fetcher/interfaces/IClientEventResponse";
|
18
17
|
import { IDataFetcherRecaller } from "../../lib/http/data-fetcher/recaller/IDataFetcherRecaller";
|
18
|
+
import { SnkMessageBuilder } from "../../lib/message/SnkMessageBuilder";
|
19
19
|
export declare class SnkApplication {
|
20
20
|
_parameters: ParametersFetcher;
|
21
21
|
_urlParams: Map<string, any>;
|
@@ -39,9 +39,6 @@ export declare class SnkApplication {
|
|
39
39
|
private get resourceID();
|
40
40
|
private get auth();
|
41
41
|
private _element;
|
42
|
-
/**
|
43
|
-
* Responsável por flexibilizar e padronizar o uso de mensagens nos blocos de construção.
|
44
|
-
*/
|
45
42
|
messagesBuilder: SnkMessageBuilder;
|
46
43
|
/**
|
47
44
|
* Usado para salvar as configurações dos blocos de construção.
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
2
2
|
import { VIEW_MODE } from '../../lib/utils/constants';
|
3
|
+
import { SnkMessageBuilder } from '../../lib/message/SnkMessageBuilder';
|
3
4
|
export interface IConfigurator {
|
4
5
|
viewMode: number;
|
5
6
|
openConfig?: boolean;
|
@@ -24,6 +25,10 @@ export declare class SnkConfigurator {
|
|
24
25
|
* Emitido quando clica para abrir a configuração.
|
25
26
|
*/
|
26
27
|
openConfig: EventEmitter<VIEW_MODE>;
|
28
|
+
/**
|
29
|
+
* Responsável por flexibilizar e padronizar o uso de mensagens nos blocos de construção.
|
30
|
+
*/
|
31
|
+
messagesBuilder: SnkMessageBuilder;
|
27
32
|
/**
|
28
33
|
* Exibe a janela de configuração.
|
29
34
|
*/
|
@@ -6,6 +6,7 @@ import { DataState } from '../snk-data-unit/snk-data-unit';
|
|
6
6
|
import { Action, TaskbarManager } from '../snk-taskbar/snk-taskbar';
|
7
7
|
import { PresentationMode } from '../../lib';
|
8
8
|
import { VIEW_MODE } from '../../lib/utils/constants';
|
9
|
+
import { SnkMessageBuilder } from '../../lib/message/SnkMessageBuilder';
|
9
10
|
export declare class SnkCrud {
|
10
11
|
_viewStack: HTMLEzViewStackElement;
|
11
12
|
_snkConfigurator: HTMLSnkConfiguratorElement;
|
@@ -47,6 +48,10 @@ export declare class SnkCrud {
|
|
47
48
|
* Altera o modo de apresentação dos botões do snk-taskbar.
|
48
49
|
*/
|
49
50
|
presentationMode: PresentationMode;
|
51
|
+
/**
|
52
|
+
* Responsável por flexibilizar e padronizar o uso de mensagens nos blocos de construção.
|
53
|
+
*/
|
54
|
+
messagesBuilder: SnkMessageBuilder;
|
50
55
|
/**
|
51
56
|
* Emitido pela taskbar sempre que houver click de botão ou ação.
|
52
57
|
*/
|
@@ -63,5 +68,6 @@ export declare class SnkCrud {
|
|
63
68
|
insertionModeHandler(): void;
|
64
69
|
cancelHandler(): void;
|
65
70
|
componentWillLoad(): void;
|
71
|
+
private initDataUnit;
|
66
72
|
render(): any;
|
67
73
|
}
|
@@ -5,6 +5,7 @@ import { IFormCardConfig } from '@sankhyalabs/ezui/dist/types/utils/form/interfa
|
|
5
5
|
import { DataState } from '../../snk-data-unit/snk-data-unit';
|
6
6
|
import { IGuideItem } from '@sankhyalabs/ezui/dist/types/components/ez-guide-navigator/interfaces';
|
7
7
|
import { VIEW_MODE } from '../../../lib/utils/constants';
|
8
|
+
import { SnkMessageBuilder } from '../../../lib/message/SnkMessageBuilder';
|
8
9
|
import { GuideBuilder } from './GuideBuilder';
|
9
10
|
export declare class SnkDetailView {
|
10
11
|
private static REGEX_FORM_ID;
|
@@ -46,9 +47,7 @@ export declare class SnkDetailView {
|
|
46
47
|
* Representa o estado do dataUnit detail.
|
47
48
|
*/
|
48
49
|
dataState: DataState;
|
49
|
-
|
50
|
-
* Galho a partir do qual o detail está preso.
|
51
|
-
*/
|
50
|
+
messagesBuilder: SnkMessageBuilder;
|
52
51
|
branchGuide: IGuideItem;
|
53
52
|
observerDataState(newValue: DataState, oldValue: DataState): void;
|
54
53
|
/**
|
@@ -8,9 +8,9 @@ import { IBreadcrumbItem } from "@sankhyalabs/ezui/dist/types/components/ez-brea
|
|
8
8
|
import { IGuideItem } from "@sankhyalabs/ezui/dist/types/components/ez-guide-navigator/interfaces";
|
9
9
|
import { Action, TaskbarManager } from "../../snk-taskbar/snk-taskbar";
|
10
10
|
import { PresentationMode } from "../../../lib";
|
11
|
+
import { SnkMessageBuilder } from "../../../lib/message/SnkMessageBuilder";
|
11
12
|
import { GuideBuilder } from "./GuideBuilder";
|
12
13
|
export declare class SnkGuidesViewer {
|
13
|
-
private _application;
|
14
14
|
private _configManager;
|
15
15
|
private _masterFormMetadata;
|
16
16
|
private _guideNavigator;
|
@@ -57,6 +57,10 @@ export declare class SnkGuidesViewer {
|
|
57
57
|
* ou mesmo gerenciar o estado dos botões.
|
58
58
|
*/
|
59
59
|
taskbarManager: TaskbarManager;
|
60
|
+
/**
|
61
|
+
* Responsável por flexibilizar e padronizar o uso de mensagens nos blocos de construção.
|
62
|
+
*/
|
63
|
+
messagesBuilder: SnkMessageBuilder;
|
60
64
|
/**
|
61
65
|
* Altera o modo de apresentação dos botões do snk-taskbar.
|
62
66
|
*/
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { IExporterProvider } from './interfaces/IExporterProvider';
|
2
|
+
import { SnkMessageBuilder } from '../../lib/message/SnkMessageBuilder';
|
2
3
|
export declare class SnkDataExporter {
|
3
4
|
private _ezButton;
|
4
5
|
private _dropdownParent;
|
@@ -16,6 +17,10 @@ export declare class SnkDataExporter {
|
|
16
17
|
* Provedor das informações para exportação dos dados.
|
17
18
|
*/
|
18
19
|
provider: IExporterProvider;
|
20
|
+
/**
|
21
|
+
* Responsável por flexibilizar e padronizar o uso de mensagens nos blocos de construção.
|
22
|
+
*/
|
23
|
+
messagesBuilder: SnkMessageBuilder;
|
19
24
|
private exportByEmail;
|
20
25
|
/**
|
21
26
|
* Conforme mecanismo de mensagens, é possível customizar as mensagens dos blocos de construção
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
2
2
|
import { DataUnit, DataUnitAction, DUActionInterceptor, Record, SelectionInfo } from '@sankhyalabs/core';
|
3
3
|
import { SnkApplication } from '../snk-application/snk-application';
|
4
|
+
import { SnkMessageBuilder } from '../../lib/message/SnkMessageBuilder';
|
4
5
|
import { IRecordID } from '../snk-data-exporter/interfaces/IRecordID';
|
5
6
|
export declare class SnkDataUnit implements DUActionInterceptor {
|
6
7
|
_onDataUnitResolve: Array<(dataUnit: DataUnit) => void>;
|
@@ -11,8 +12,12 @@ export declare class SnkDataUnit implements DUActionInterceptor {
|
|
11
12
|
element: HTMLSnkDataUnitElement;
|
12
13
|
/**
|
13
14
|
* Controla o estado atual dos dados.
|
14
|
-
|
15
|
+
*/
|
15
16
|
dataState: DataState;
|
17
|
+
/**
|
18
|
+
* Responsável por flexibilizar e padronizar o uso de mensagens nos blocos de construção.
|
19
|
+
*/
|
20
|
+
messagesBuilder: SnkMessageBuilder;
|
16
21
|
/**
|
17
22
|
* Usado para criar o dataUnit uma única vez.
|
18
23
|
* Se omitido, será usado o próprio nome da entidade.
|
@@ -44,6 +49,7 @@ export declare class SnkDataUnit implements DUActionInterceptor {
|
|
44
49
|
observeEntityName(newValue: string, oldValue: string): void;
|
45
50
|
observeDataState(newValue: DataState, oldValue: DataState): void;
|
46
51
|
observeDataUnit(): void;
|
52
|
+
observeMessagesBuilder(newValue: SnkMessageBuilder): void;
|
47
53
|
/**
|
48
54
|
* Emitido quando há qualquer mudança de estado no DataUnit.
|
49
55
|
*/
|
@@ -52,6 +58,10 @@ export declare class SnkDataUnit implements DUActionInterceptor {
|
|
52
58
|
* Emitido quando o DataUnit está pronto.
|
53
59
|
*/
|
54
60
|
dataUnitReady: EventEmitter<DataUnit>;
|
61
|
+
/**
|
62
|
+
* Emitido quando o DataUnit está pronto.
|
63
|
+
*/
|
64
|
+
messagesBuilderUpdated: EventEmitter<SnkMessageBuilder>;
|
55
65
|
/**
|
56
66
|
* Emitido quando um registro é adicionado ou copiado.
|
57
67
|
*/
|
@@ -87,6 +97,7 @@ export declare class SnkDataUnit implements DUActionInterceptor {
|
|
87
97
|
loadDataUnit(): Promise<void>;
|
88
98
|
private getParentSnkDataUnit;
|
89
99
|
private handlerLinkFields;
|
100
|
+
static getNearestInstance(element: HTMLElement): HTMLSnkDataUnitElement;
|
90
101
|
componentWillLoad(): void;
|
91
102
|
disconnectedCallback(): void;
|
92
103
|
componentDidLoad(): void;
|
@@ -99,7 +110,7 @@ export interface DataState {
|
|
99
110
|
hasDirtyRecords: boolean;
|
100
111
|
hasNext: boolean;
|
101
112
|
hasPrevious: boolean;
|
102
|
-
selectionInfo
|
113
|
+
selectionInfo?: SelectionInfo;
|
103
114
|
selectedRecord: Record;
|
104
115
|
/**
|
105
116
|
* @deprecated - Utilize o atributo `selectionInfo` para obter os registros selecionados.
|
@@ -2,6 +2,7 @@ import { DataUnit } from '@sankhyalabs/core';
|
|
2
2
|
import { Filter, FilterProvider } from '@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata';
|
3
3
|
import { SnkApplication } from '../snk-application/snk-application';
|
4
4
|
import { SnkFilterItemConfig } from './filter-item/snk-filter-item';
|
5
|
+
import { SnkMessageBuilder } from '../../lib/message/SnkMessageBuilder';
|
5
6
|
export declare class SnkFilterBar implements FilterProvider {
|
6
7
|
_element: HTMLElement;
|
7
8
|
_application: SnkApplication;
|
@@ -26,6 +27,10 @@ export declare class SnkFilterBar implements FilterProvider {
|
|
26
27
|
* Lista todos os filtros disponíveis ao usuário.
|
27
28
|
*/
|
28
29
|
filterConfig: Array<SnkFilterItemConfig>;
|
30
|
+
/**
|
31
|
+
* Responsável por flexibilizar e padronizar o uso de mensagens nos blocos de construção.
|
32
|
+
*/
|
33
|
+
messagesBuilder: SnkMessageBuilder;
|
29
34
|
allowDefault: boolean;
|
30
35
|
scrollerLocked: boolean;
|
31
36
|
observeFilterConfig(newValue: Array<SnkFilterItemConfig>, oldValue: Array<SnkFilterItemConfig>): void;
|
@@ -3,6 +3,7 @@ import { IRecordValidator } from '@sankhyalabs/ezui/dist/types/utils/form/interf
|
|
3
3
|
import { EventEmitter } from '../../stencil-public-runtime';
|
4
4
|
import { DataState } from '../snk-data-unit/snk-data-unit';
|
5
5
|
import { SnkFormConfigManager } from './SnkFormConfigManager';
|
6
|
+
import { SnkMessageBuilder } from '../../lib/message/SnkMessageBuilder';
|
6
7
|
export declare class SnkForm {
|
7
8
|
private _snkDataUnit;
|
8
9
|
_element: HTMLElement;
|
@@ -18,6 +19,10 @@ export declare class SnkForm {
|
|
18
19
|
* Validador responsável por checar a integridade das informações do registro.
|
19
20
|
*/
|
20
21
|
recordsValidator: IRecordValidator;
|
22
|
+
/**
|
23
|
+
* Responsável por flexibilizar e padronizar o uso de mensagens nos blocos de construção.
|
24
|
+
*/
|
25
|
+
messagesBuilder: SnkMessageBuilder;
|
21
26
|
/**
|
22
27
|
* Emitido quando o botão de voltar é acionado.
|
23
28
|
*/
|
package/dist/types/components/snk-form/subcomponents/snk-config-options/snk-config-options.d.ts
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
import { EventEmitter } from "../../../../stencil-public-runtime";
|
2
2
|
import { DataUnit, UserInterface } from '@sankhyalabs/core';
|
3
3
|
import { IFieldConfig } from "@sankhyalabs/ezui/dist/types/utils/form/interfaces";
|
4
|
+
import { SnkMessageBuilder } from "../../../../lib/message/SnkMessageBuilder";
|
4
5
|
export declare class SnkConfigOptions {
|
5
6
|
private _application;
|
6
7
|
private _fieldProperties;
|
@@ -18,6 +19,10 @@ export declare class SnkConfigOptions {
|
|
18
19
|
* Repositório de dados responsável por controlar a manipulação dos dados.
|
19
20
|
*/
|
20
21
|
dataUnit: DataUnit;
|
22
|
+
/**
|
23
|
+
* Responsável por flexibilizar e padronizar o uso de mensagens nos blocos de construção.
|
24
|
+
*/
|
25
|
+
messagesBuilder: SnkMessageBuilder;
|
21
26
|
/**
|
22
27
|
* Emitido ao realizar alguma alteração nos campos.
|
23
28
|
*/
|
@@ -1,8 +1,8 @@
|
|
1
1
|
import { DataUnit } from "@sankhyalabs/core";
|
2
2
|
import { EventEmitter } from "../../../../stencil-public-runtime";
|
3
3
|
import { IFieldConfig } from "@sankhyalabs/ezui/dist/types/utils/form/interfaces";
|
4
|
+
import { SnkMessageBuilder } from "../../../../lib/message/SnkMessageBuilder";
|
4
5
|
export declare class SnkFieldConfig {
|
5
|
-
private _application;
|
6
6
|
private _lang;
|
7
7
|
private _element;
|
8
8
|
/**
|
@@ -21,6 +21,10 @@ export declare class SnkFieldConfig {
|
|
21
21
|
* Repositório de dados, controla a manipulação dos dados.
|
22
22
|
*/
|
23
23
|
dataUnit: DataUnit;
|
24
|
+
/**
|
25
|
+
* Responsável por flexibilizar e padronizar o uso de mensagens nos blocos de construção.
|
26
|
+
*/
|
27
|
+
messagesBuilder: SnkMessageBuilder;
|
24
28
|
/**
|
25
29
|
* Emitido ao clicar no ícone do botão.
|
26
30
|
*/
|
@@ -34,7 +38,6 @@ export declare class SnkFieldConfig {
|
|
34
38
|
*/
|
35
39
|
private getMessage;
|
36
40
|
private isRequired;
|
37
|
-
componentWillLoad(): void;
|
38
41
|
componentDidLoad(): void;
|
39
42
|
render(): any;
|
40
43
|
}
|
@@ -2,6 +2,7 @@ import { EventEmitter } from "../../../../stencil-public-runtime";
|
|
2
2
|
import { DataUnit } from '@sankhyalabs/core';
|
3
3
|
import { IFieldConfig, IFormConfig } from "@sankhyalabs/ezui/dist/types/utils/form/interfaces";
|
4
4
|
import { SnkFormConfigManager } from "../../SnkFormConfigManager";
|
5
|
+
import { SnkMessageBuilder } from "../../../../lib/message/SnkMessageBuilder";
|
5
6
|
export declare class SnkFormConfig {
|
6
7
|
private _tabConfig;
|
7
8
|
private _filterFieldsAvailable;
|
@@ -42,6 +43,10 @@ export declare class SnkFormConfig {
|
|
42
43
|
* Campos de configuração de formulário.
|
43
44
|
*/
|
44
45
|
configManager: SnkFormConfigManager;
|
46
|
+
/**
|
47
|
+
* Responsável por flexibilizar e padronizar o uso de mensagens nos blocos de construção.
|
48
|
+
*/
|
49
|
+
messagesBuilder: SnkMessageBuilder;
|
45
50
|
/**
|
46
51
|
* Emitido ao salvar as configurações.
|
47
52
|
*/
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { EventEmitter } from "../../../../stencil-public-runtime";
|
2
|
+
import { SnkMessageBuilder } from "../../../../lib/message/SnkMessageBuilder";
|
2
3
|
export declare class SnkTabConfig {
|
3
4
|
private _scrollContainer;
|
4
5
|
private _backwardButton;
|
@@ -29,6 +30,10 @@ export declare class SnkTabConfig {
|
|
29
30
|
* Define o nome das abas do componente separadas por vírgulas ",".
|
30
31
|
*/
|
31
32
|
tabs: string;
|
33
|
+
/**
|
34
|
+
* Responsável por flexibilizar e padronizar o uso de mensagens nos blocos de construção.
|
35
|
+
*/
|
36
|
+
messagesBuilder: SnkMessageBuilder;
|
32
37
|
/**
|
33
38
|
* Emitido ao clicar para abrir o popup.
|
34
39
|
*/
|
@@ -6,6 +6,7 @@ import { Action, TaskbarManager } from '../snk-taskbar/snk-taskbar';
|
|
6
6
|
import { SnkApplication } from '../snk-application/snk-application';
|
7
7
|
import { PresentationMode } from '../../lib/@types';
|
8
8
|
import TaskbarProcessor from '../snk-taskbar/processor/taskbar-processor';
|
9
|
+
import { SnkMessageBuilder } from '../../lib/message/SnkMessageBuilder';
|
9
10
|
export declare class SnkGrid {
|
10
11
|
_grid: HTMLEzGridElement;
|
11
12
|
_snkDataUnit: HTMLSnkDataUnitElement;
|
@@ -50,6 +51,10 @@ export declare class SnkGrid {
|
|
50
51
|
* Altera o modo de apresentação dos botões do snk-taskbar.
|
51
52
|
*/
|
52
53
|
presentationMode: PresentationMode;
|
54
|
+
/**
|
55
|
+
* Responsável por flexibilizar e padronizar o uso de mensagens nos blocos de construção.
|
56
|
+
*/
|
57
|
+
messagesBuilder: SnkMessageBuilder;
|
53
58
|
/**
|
54
59
|
* Emitido sempre que houver click de botão ou ação.
|
55
60
|
*/
|
@@ -1,4 +1,5 @@
|
|
1
1
|
import { IExpressionItem } from "./interfaces/IExpressionItem";
|
2
|
+
import { SnkMessageBuilder } from "../../../../lib/message/SnkMessageBuilder";
|
2
3
|
export declare class SnkFilterParamConfig {
|
3
4
|
private _application;
|
4
5
|
private _promiseResolver;
|
@@ -13,6 +14,10 @@ export declare class SnkFilterParamConfig {
|
|
13
14
|
private _expressionItem;
|
14
15
|
private _informedInstance;
|
15
16
|
private _canSave;
|
17
|
+
/**
|
18
|
+
* Responsável por flexibilizar e padronizar o uso de mensagens nos blocos de construção.
|
19
|
+
*/
|
20
|
+
messagesBuilder: SnkMessageBuilder;
|
16
21
|
open(expressionItem: IExpressionItem): Promise<IExpressionItem>;
|
17
22
|
close(): Promise<IExpressionItem>;
|
18
23
|
/**
|
@@ -5,6 +5,7 @@ import { DataState } from '../snk-data-unit/snk-data-unit';
|
|
5
5
|
import TaskbarProcessor from '../snk-taskbar/processor/taskbar-processor';
|
6
6
|
import { TaskbarManager } from '../snk-taskbar/snk-taskbar';
|
7
7
|
import InMemoryLoader from '../../lib/dataUnit/InMemoryLoader';
|
8
|
+
import { SnkMessageBuilder } from '../../lib/message/SnkMessageBuilder';
|
8
9
|
export declare class SnkSimpleCrud {
|
9
10
|
private readonly REGULAR_DEFAULT_BTNS;
|
10
11
|
private readonly REGULAR_SELECTED_BTNS;
|
@@ -31,6 +32,10 @@ export declare class SnkSimpleCrud {
|
|
31
32
|
* ou mesmo gerenciar o estado dos botões.
|
32
33
|
*/
|
33
34
|
taskbarManager: TaskbarManager;
|
35
|
+
/**
|
36
|
+
* Responsável por flexibilizar e padronizar o uso de mensagens nos blocos de construção.
|
37
|
+
*/
|
38
|
+
messagesBuilder: SnkMessageBuilder;
|
34
39
|
_taskbarProcessor: TaskbarProcessor;
|
35
40
|
resolveInMemoryBtns(taskbarButtons: Array<string>): Array<string>;
|
36
41
|
/**
|
@@ -4,6 +4,7 @@ import { SnkApplication } from '../snk-application/snk-application';
|
|
4
4
|
import { DataState } from '../snk-data-unit/snk-data-unit';
|
5
5
|
import { TaskbarElement } from './elements/taskbar-elements';
|
6
6
|
import { PresentationMode } from '../../lib/@types';
|
7
|
+
import { SnkMessageBuilder } from '../../lib/message/SnkMessageBuilder';
|
7
8
|
export declare class SnkTaskbar {
|
8
9
|
_application: SnkApplication;
|
9
10
|
_definitions: Array<string>;
|
@@ -42,6 +43,10 @@ export declare class SnkTaskbar {
|
|
42
43
|
* Altera o modo de apresentação dos botões do snk-taskbar.
|
43
44
|
*/
|
44
45
|
presentationMode: PresentationMode;
|
46
|
+
/**
|
47
|
+
* Responsável por flexibilizar e padronizar o uso de mensagens nos blocos de construção.
|
48
|
+
*/
|
49
|
+
messagesBuilder: SnkMessageBuilder;
|
45
50
|
/**
|
46
51
|
* Emitido sempre que houver click de botão ou ação.
|
47
52
|
*/
|