@sankhyalabs/ezui 1.1.74 → 1.1.77

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 (186) hide show
  1. package/dist/cjs/ApplicationUtils-d1c1db56.js +35 -0
  2. package/dist/cjs/AssetsUtils-dd585fba.js +24 -0
  3. package/dist/cjs/DataUnit-fdd7c70e.js +474 -0
  4. package/dist/cjs/DateUtils-716769e0.js +46 -0
  5. package/dist/cjs/ez-action-chip.cjs.entry.js +1 -1
  6. package/dist/cjs/ez-application.cjs.entry.js +28 -0
  7. package/dist/cjs/ez-button_11.cjs.entry.js +111771 -0
  8. package/dist/cjs/ez-calendar.cjs.entry.js +212 -0
  9. package/dist/cjs/ez-collapsible-box_6.cjs.entry.js +630 -0
  10. package/dist/cjs/ez-combo-box.cjs.entry.js +250 -0
  11. package/dist/cjs/ez-date-time-input.cjs.entry.js +144 -0
  12. package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
  13. package/dist/cjs/ez-form.cjs.entry.js +1838 -0
  14. package/dist/cjs/ez-label-chip.cjs.entry.js +1 -1
  15. package/dist/cjs/ez-number-input.cjs.entry.js +61 -190
  16. package/dist/cjs/ez-popover.cjs.entry.js +3 -3
  17. package/dist/cjs/ez-popup.cjs.entry.js +2 -2
  18. package/dist/cjs/ez-time-input.cjs.entry.js +9 -8
  19. package/dist/cjs/ez-toast.cjs.entry.js +1 -1
  20. package/dist/cjs/ezui.cjs.js +3 -3
  21. package/dist/cjs/form-metadata.cjs.entry.js +129 -0
  22. package/dist/cjs/index-262d703b.js +7442 -0
  23. package/dist/cjs/{index-4d2896bb.js → index-4e4bae01.js} +3 -5
  24. package/dist/cjs/loader.cjs.js +3 -3
  25. package/dist/collection/collection-manifest.json +8 -3
  26. package/dist/collection/components/ez-application/ez-application.css +3 -0
  27. package/dist/collection/components/ez-application/ez-application.js +37 -0
  28. package/dist/collection/components/ez-button/ez-button.css +78 -44
  29. package/dist/collection/components/ez-button/ez-button.js +36 -4
  30. package/dist/collection/components/ez-calendar/ez-calendar.css +132 -65
  31. package/dist/collection/components/ez-calendar/ez-calendar.js +180 -33
  32. package/dist/collection/components/ez-check/ez-check.css +78 -78
  33. package/dist/collection/components/ez-check/ez-check.js +3 -3
  34. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +34 -34
  35. package/dist/collection/components/ez-collapsible-box/ez-collapsible-box.js +12 -12
  36. package/dist/collection/components/ez-combo-box/ez-combo-box.css +67 -51
  37. package/dist/collection/components/ez-combo-box/ez-combo-box.js +1 -0
  38. package/dist/collection/components/ez-date-input/ez-date-input.css +17 -3
  39. package/dist/collection/components/ez-date-input/ez-date-input.js +2 -2
  40. package/dist/collection/components/ez-date-time-input/ez-date-time-input.css +49 -0
  41. package/dist/collection/components/ez-date-time-input/ez-date-time-input.js +254 -0
  42. package/dist/collection/components/ez-form/ez-form.js +37 -35
  43. package/dist/collection/components/ez-form/store/Form.actions.js +16 -16
  44. package/dist/collection/components/ez-form/store/Form.reducer.js +17 -17
  45. package/dist/collection/components/ez-form/subcomponents/DataUnit.js +11 -11
  46. package/dist/collection/components/ez-form/subcomponents/form-metadata.js +12 -12
  47. package/dist/collection/components/ez-form/subcomponents/place-holder.js +1 -1
  48. package/dist/collection/components/ez-form/subcomponents/structure/Field.js +22 -22
  49. package/dist/collection/components/ez-form/subcomponents/structure/FormSheet.js +1 -1
  50. package/dist/collection/components/ez-form/subcomponents/structure/NavigationBar.js +9 -9
  51. package/dist/collection/components/ez-grid/controller/DataUnitBridge.js +21 -0
  52. package/dist/collection/components/ez-grid/controller/EzGridController.js +1 -0
  53. package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +203 -0
  54. package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +41 -0
  55. package/dist/collection/components/ez-grid/controller/ag-grid/i18n/pt-BR.js +75 -0
  56. package/dist/collection/components/ez-grid/controller/ag-grid/mock/Server.js +69 -0
  57. package/dist/collection/components/ez-grid/controller/ag-grid/template/HeaderColumnTemplate.js +12 -0
  58. package/dist/collection/components/ez-grid/ez-grid.css +15 -0
  59. package/dist/collection/components/ez-grid/ez-grid.js +414 -0
  60. package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +105 -0
  61. package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.js +354 -0
  62. package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +7 -0
  63. package/dist/collection/components/ez-grid/subcomponents/select-box/select-box.js +66 -0
  64. package/dist/collection/components/ez-icon/ez-icon.css +1 -1
  65. package/dist/collection/components/ez-list/ez-list.css +227 -44
  66. package/dist/collection/components/ez-list/ez-list.js +529 -149
  67. package/dist/collection/components/ez-modal/ez-modal.css +4 -4
  68. package/dist/collection/components/ez-modal/ez-modal.js +1 -1
  69. package/dist/collection/components/ez-number-input/ez-number-input.css +7 -162
  70. package/dist/collection/components/ez-number-input/ez-number-input.js +90 -281
  71. package/dist/collection/components/ez-popover/ez-popover.css +10 -6
  72. package/dist/collection/components/ez-popup/ez-popup.css +25 -27
  73. package/dist/collection/components/ez-tabselector/ez-tabselector.css +0 -1
  74. package/dist/collection/components/ez-tabselector/ez-tabselector.js +3 -3
  75. package/dist/collection/components/ez-text-area/ez-text-area.js +1 -0
  76. package/dist/collection/components/ez-text-input/ez-text-input.css +60 -60
  77. package/dist/collection/components/ez-text-input/ez-text-input.js +17 -16
  78. package/dist/collection/components/ez-time-input/ez-time-input.js +3 -2
  79. package/dist/collection/components/ez-upload/ez-upload.css +41 -41
  80. package/dist/collection/components/ez-upload/ez-upload.js +55 -52
  81. package/dist/collection/components/test-du/test-du.css +3 -0
  82. package/dist/collection/components/test-du/test-du.js +45 -0
  83. package/dist/collection/servidor.js +94 -94
  84. package/dist/collection/utils/{Application.js → ApplicationUtils.js} +4 -4
  85. package/dist/collection/utils/AssetsUtils.js +19 -0
  86. package/dist/custom-elements/index.d.ts +36 -6
  87. package/dist/custom-elements/index.js +121017 -3022
  88. package/dist/esm/ApplicationUtils-01280a9d.js +33 -0
  89. package/dist/esm/AssetsUtils-3803e935.js +22 -0
  90. package/dist/esm/DataUnit-1cd45202.js +464 -0
  91. package/dist/esm/DateUtils-0a1bbd7a.js +44 -0
  92. package/dist/esm/ez-action-chip.entry.js +1 -1
  93. package/dist/esm/ez-application.entry.js +24 -0
  94. package/dist/esm/ez-button_11.entry.js +111757 -0
  95. package/dist/esm/ez-calendar.entry.js +208 -0
  96. package/dist/esm/ez-collapsible-box_6.entry.js +621 -0
  97. package/dist/esm/ez-combo-box.entry.js +246 -0
  98. package/dist/esm/ez-date-time-input.entry.js +140 -0
  99. package/dist/esm/ez-dialog.entry.js +1 -1
  100. package/dist/esm/ez-form.entry.js +1834 -0
  101. package/dist/esm/ez-label-chip.entry.js +1 -1
  102. package/dist/esm/ez-number-input.entry.js +61 -190
  103. package/dist/esm/ez-popover.entry.js +3 -3
  104. package/dist/esm/ez-popup.entry.js +2 -2
  105. package/dist/esm/ez-time-input.entry.js +4 -3
  106. package/dist/esm/ez-toast.entry.js +1 -1
  107. package/dist/esm/ezui.js +3 -3
  108. package/dist/esm/form-metadata.entry.js +125 -0
  109. package/dist/esm/{index-33153059.js → index-1dacecd3.js} +3 -6
  110. package/dist/esm/index-cfd5e193.js +7433 -0
  111. package/dist/esm/loader.js +3 -3
  112. package/dist/ezui/ezui.esm.js +1 -1
  113. package/dist/ezui/p-1ea8187e.entry.js +369 -0
  114. package/dist/ezui/p-37a611ea.js +1 -0
  115. package/dist/ezui/p-45689464.entry.js +1 -0
  116. package/dist/ezui/{p-34d288d0.entry.js → p-516d0e0f.entry.js} +1 -1
  117. package/dist/ezui/p-57291f97.entry.js +1 -0
  118. package/dist/ezui/{p-0d476efb.entry.js → p-5a86e18a.entry.js} +1 -1
  119. package/dist/ezui/{p-47406a6e.entry.js → p-5da66d3e.entry.js} +1 -1
  120. package/dist/ezui/p-69416bec.entry.js +1 -0
  121. package/dist/ezui/p-7107d7ef.js +1 -0
  122. package/dist/ezui/p-7ef97c5f.entry.js +1 -0
  123. package/dist/ezui/p-88f45a83.entry.js +1 -0
  124. package/dist/ezui/p-8c51a6aa.entry.js +1 -0
  125. package/dist/ezui/p-8f4851a6.js +1 -0
  126. package/dist/ezui/p-9dfd537e.js +1 -0
  127. package/dist/ezui/{p-8818da66.entry.js → p-a18a2d7b.entry.js} +1 -1
  128. package/dist/ezui/p-a223eed8.entry.js +1 -0
  129. package/dist/ezui/p-b36308e7.js +1 -0
  130. package/dist/ezui/p-c0af195b.entry.js +1 -0
  131. package/dist/ezui/p-c6d469fc.entry.js +1 -0
  132. package/dist/ezui/p-c89629eb.js +1 -0
  133. package/dist/ezui/p-e7ee2836.entry.js +1 -0
  134. package/dist/ezui/p-f7b835cf.entry.js +1 -0
  135. package/dist/types/components/ez-application/ez-application.d.ts +12 -0
  136. package/dist/types/components/ez-button/ez-button.d.ts +5 -0
  137. package/dist/types/components/ez-calendar/ez-calendar.d.ts +25 -1
  138. package/dist/types/components/ez-check/ez-check.d.ts +1 -1
  139. package/dist/types/components/ez-collapsible-box/ez-collapsible-box.d.ts +3 -3
  140. package/dist/types/components/ez-date-time-input/ez-date-time-input.d.ts +42 -0
  141. package/dist/types/components/ez-form/ez-form.d.ts +9 -9
  142. package/dist/types/components/ez-form/subcomponents/DataUnit.d.ts +1 -1
  143. package/dist/types/components/ez-form/subcomponents/form-metadata.d.ts +1 -1
  144. package/dist/types/components/ez-grid/controller/DataUnitBridge.d.ts +8 -0
  145. package/dist/types/components/ez-grid/controller/EzGridController.d.ts +195 -0
  146. package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +34 -0
  147. package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +11 -0
  148. package/dist/types/components/ez-grid/controller/ag-grid/i18n/pt-BR.d.ts +2 -0
  149. package/dist/types/components/ez-grid/controller/ag-grid/mock/Server.d.ts +8 -0
  150. package/dist/types/components/ez-grid/ez-grid.d.ts +78 -0
  151. package/dist/types/components/ez-grid/subcomponents/gridconfig/grid-config.d.ts +30 -0
  152. package/dist/types/components/ez-grid/subcomponents/select-box/select-box.d.ts +9 -0
  153. package/dist/types/components/ez-list/ez-list.d.ts +70 -17
  154. package/dist/types/components/ez-number-input/ez-number-input.d.ts +33 -50
  155. package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +1 -1
  156. package/dist/types/components/ez-text-input/ez-text-input.d.ts +1 -1
  157. package/dist/types/components/ez-upload/ez-upload.d.ts +10 -7
  158. package/dist/types/components/test-du/test-du.d.ts +6 -0
  159. package/dist/types/components.d.ts +321 -149
  160. package/dist/types/stencil-public-runtime.d.ts +6 -4
  161. package/dist/types/utils/{Application.d.ts → ApplicationUtils.d.ts} +1 -1
  162. package/dist/types/utils/AssetsUtils.d.ts +1 -0
  163. package/package.json +10 -8
  164. package/react/components.d.ts +6 -1
  165. package/react/components.js +6 -1
  166. package/react/components.js.map +1 -1
  167. package/dist/cjs/RequestMetadata-2cd01e8a.js +0 -531
  168. package/dist/cjs/ez-button_16.cjs.entry.js +0 -4065
  169. package/dist/cjs/ez-list.cjs.entry.js +0 -174
  170. package/dist/cjs/ez-modal.cjs.entry.js +0 -65
  171. package/dist/collection/components/ez-numeric-input/ez-numeric-input.css +0 -13
  172. package/dist/collection/components/ez-numeric-input/ez-numeric-input.js +0 -185
  173. package/dist/esm/RequestMetadata-c265c9d5.js +0 -527
  174. package/dist/esm/ez-button_16.entry.js +0 -4046
  175. package/dist/esm/ez-list.entry.js +0 -170
  176. package/dist/esm/ez-modal.entry.js +0 -61
  177. package/dist/ezui/p-061d21ba.entry.js +0 -1
  178. package/dist/ezui/p-15743b09.entry.js +0 -1
  179. package/dist/ezui/p-25953d44.entry.js +0 -1
  180. package/dist/ezui/p-4df6f855.js +0 -1
  181. package/dist/ezui/p-50464bdf.entry.js +0 -1
  182. package/dist/ezui/p-67410dfa.entry.js +0 -1
  183. package/dist/ezui/p-7f3bc6d9.entry.js +0 -1
  184. package/dist/ezui/p-907de194.entry.js +0 -1
  185. package/dist/ezui/p-9dfccb16.js +0 -1
  186. package/dist/types/components/ez-numeric-input/ez-numeric-input.d.ts +0 -45
@@ -0,0 +1 @@
1
+ import{r as a,c as e,f as r,h as l}from"./p-8f4851a6.js";import"./p-b36308e7.js";import{F as t}from"./p-ddd0ef12.js";let i=class{constructor(r){a(this,r),this.ezChange=e(this,"ezChange",7),this._firstRender=!0,this._todayLabel="Hoje",this._weekDayLabels=["D","S","T","Q","Q","S","S"],this._monthLabels=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],this._hoursLabel=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],this._minutosLabel=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"],this.value=new Date,this.floating=!1,this.time=!1,this.showSeconds=!1}async show(a,e,r,l){this.floating&&(this._floatingID=t.float(this._box,this._container,{autoClose:!0,top:a,left:e,bottom:r,right:l}),window.requestAnimationFrame((()=>{this._box.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})))}async fitVertical(a,e){const r=this._container.getBoundingClientRect().bottom+this._calendarHeight;(window.innerHeight||document.documentElement.clientHeight)>r?this.show(a+"px",void 0,"unset"):this.show("unset",void 0,e+"px")}async hide(){void 0!==this._floatingID&&(t.close(this._floatingID),this._floatingID=void 0)}valueChanged(){this.value&&(this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1))}getMonthLabel(){return this._monthLabels[this._currentPosition.getMonth()]+" "+this._currentPosition.getFullYear()}isSelectedDate(a){return!!this.value&&this.value.getDate()==a.getDate()&&this.value.getMonth()==a.getMonth()&&this.value.getFullYear()==a.getFullYear()}changeMonth(a){this._currentPosition.setMonth(this._currentPosition.getMonth()+a),r(this)}selectDate(a){let e=a;this.value&&(e.setHours(this.value.getHours()),e.setMinutes(this.value.getMinutes()),e.setSeconds(this.value.getSeconds())),this.value=e,this.ezChange.emit()}selectHours(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),a,this.value.getMinutes(),this.value.getSeconds()),this.ezChange.emit()}selectMinutes(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),a,this.value.getSeconds()),this.ezChange.emit()}selectSeconds(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),this.value.getMinutes(),a),this.ezChange.emit()}updateScroll(a){if(a){const{scrollHeight:e,clientHeight:r,scrollTop:l}=a;e-r-Math.ceil(l)>0?a.classList.add("endHidden"):a.classList.remove("endHidden")}}componentDidRender(){this.floating&&this._firstRender&&(this._calendarHeight=this._box.clientHeight,this._box.remove(),this._firstRender=!1),this.updateScroll(this._hoursScroll),this.updateScroll(this._minutesScroll),this.updateScroll(this._secondsScroll)}componentDidLoad(){(this.time||this.showSeconds)&&(this._hoursScroll.scrollTop=this._hoursSelect.offsetTop-64,this._minutesScroll.scrollTop=this._minutesSelect.offsetTop-64,this.showSeconds&&(this._secondsScroll.scrollTop=this._secondsSelect.offsetTop-64))}render(){null==this._currentPosition&&(this._currentPosition=new Date,this.value&&this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1));const a=new Date;return a.setTime(this._currentPosition.getTime()),a.setDate(1-a.getDay()),l("section",{ref:a=>this._container=a},l("div",{ref:a=>this._box=a,style:{display:"flex"}},l("div",{class:"calendar"},l("div",{class:"calendar__header"},l("button",{class:"calendar__btn-previous",onClick:()=>this.changeMonth(-1)}),l("label",{class:"calendar__lbl-month"},this.getMonthLabel()),l("button",{class:"calendar__btn-next",onClick:()=>this.changeMonth(1)})),l("div",{class:"calendar__body"},l("div",{class:"calendar__line"},this._weekDayLabels.map((a=>l("div",{class:"calendar__cell calendar__cell--unselectable"},a)))),[0,7,14,21,28,35].map((e=>l("div",{class:"calendar__line"},[0,1,2,3,4,5,6].map((r=>{const t=new Date;t.setTime(a.getTime()),t.setDate(t.getDate()+e+r);let i="calendar__cell";return this._currentPosition.getMonth()!=t.getMonth()?i+=" calendar__cell--secondary":this.isSelectedDate(t)&&(i+=" calendar__cell--selected"),l("div",{class:i,onClick:()=>this.selectDate(t)},t.getDate())})))))),l("div",{class:"calendar__footer"},l("button",{class:"calendar__btn-today",onClick:()=>this.selectDate(new Date)},this._todayLabel))),(this.time||this.showSeconds)&&l("div",{class:"calendarTime"},l("div",{class:"calendarTime__header"},l("div",null,"H"),l("div",{class:"separatorTime"},":"),l("div",null,"M"),this.showSeconds&&l("div",{class:"separatorTime"},":"),this.showSeconds&&l("div",null,"S")),l("div",{class:"calendar__body ",style:{display:"flex",paddingLeft:"6px",paddingRight:"6px"}},l("div",{class:"calendar__column",ref:a=>this._hoursScroll=a,onScroll:()=>this.updateScroll(this._hoursScroll)},this._hoursLabel.map(((a,e)=>e===this.value.getHours()?l("div",{style:{display:"flex"},ref:a=>this._hoursSelect=a},l("div",{class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectHours(e)},a),l("div",{class:"separatorTime"},":")):l("div",{style:{display:"flex"}},l("div",{class:"calendar__cell",onClick:()=>this.selectHours(e)},a),l("div",{class:"separatorTime"},":"))))),l("div",{class:"calendar__column",ref:a=>this._minutesScroll=a,onScroll:()=>this.updateScroll(this._minutesScroll)},this._minutosLabel.map(((a,e)=>e===this.value.getMinutes()?l("div",{style:{display:"flex"},ref:a=>this._minutesSelect=a},l("div",{class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectMinutes(e)},a),this.showSeconds&&l("div",{class:"separatorTime"},":")):l("div",{style:{display:"flex"}},l("div",{class:"calendar__cell",onClick:()=>this.selectMinutes(e)},a),this.showSeconds&&l("div",{class:"separatorTime"},":"))))),this.showSeconds&&l("div",{class:"calendar__column",ref:a=>this._secondsScroll=a,onScroll:()=>this.updateScroll(this._secondsScroll)},this._minutosLabel.map(((a,e)=>e===this.value.getSeconds()?l("div",{class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectSeconds(e),ref:a=>this._secondsSelect=a},a):l("div",{class:"calendar__cell",onClick:()=>this.selectSeconds(e)},a))))))))}static get watchers(){return{value:["valueChanged"]}}};i.style=':host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__Time--background-color:var(--background--xlight, #FAFAFA);--ez-calendar__body--padding:var(--space--medium, 12px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-calendar__header-line--stroke:2px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image: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>\');--ez-calendar__nav-btn--next-image: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>\');--ez-calendar__cell--margin:0px var(--space--small, 12px);--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:var(--space--extra-small, 3px) 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--strokes, #E2F4EF);--ez-calendar__cell--outset--color:var(--color--strokes, #C0C0C0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--strokes, #E2F4EF);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar{z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--medium, 12px);margin:var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:\'\';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--large, 600);font-size:var(--title--medium, 16px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--small, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__body{padding:var(--space--small, 6px) 0px}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;font-weight:var(--text-weight--large, 600);font-size:var(--title--small);padding:var(--space--extra-small, 6px);font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}section{display:flex}.calendarTime{margin-left:-10px;display:flex;flex-direction:column;padding:12px 6px;padding-left:16px;padding-bottom:0px;background-color:var(--ez-calendar__Time--background-color);border-top-right-radius:var(--ez-calendar__body--border-radius);border-bottom-right-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__column{height:180px;padding:0px;margin:0px;overflow:auto}.calendar__column::-webkit-scrollbar{width:0px;max-width:0px;min-width:0px}.calendarTime__header{padding-left:6px;padding-right:6px;display:flex;justify-content:space-between;padding-bottom:var(--space--medium, 12px);margin:var(--space--small, 6px) var(--space--, 12px);font-weight:var(--text-weight--large, 600);font-size:var(--title--medium, 16px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.separatorTime{color:#A2ABB9}.endHidden{-webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%)}';export{i as ez_calendar}
@@ -0,0 +1 @@
1
+ import{r as t,c as o,h as i,H as e}from"./p-8f4851a6.js";let l=class{constructor(i){t(this,i),this.ezClosePopup=o(this,"ezClosePopup",7),this.sizeClasses={"x-small":"col--sd-3",small:"col--sd-5",medium:"col--sd-6",large:"col--sd-9","x-large":"col--sd-11"},this.size="medium",this.opened=!1,this.useHeader=!1}getGridSize(){return this.sizeClasses[this.size]||this.sizeClasses.medium}render(){return this.opened?i(e,null,i("div",{class:"overlay"},i("div",{class:"popup col "+this.getGridSize()},i("div",{class:"popup__container"},i("div",{class:"popup__content"},i("div",{class:"popup__header"},this.ezTitle?i("div",{class:"popup__title"},this.ezTitle):void 0,i("button",{class:this.ezTitle?"btn-close":"btn-close btn-close--solo",onClick:()=>{this.opened=!1,this.ezClosePopup.emit()}})),i("div",{class:"popup__expandable-content"},i("slot",null))))))):null}};l.style=':host{display:flex;--ez-popup-z-index:var(--most-visible, 3);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--large, 24px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, "\'Sora\', \'Algerian\'");--ez-popup__title--font-size:var(--title--extra-large, 24px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url(\'data:image/svg+xml;utf8,<svg width="14" height="14" viewBox="0 0 14 14" xmlns="http://www.w3.org/2000/svg"><path d="M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z"/></svg>\')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__content{box-sizing:border-box;max-height:100%;width:100%;display:grid;grid-template-rows:auto 1fr}.popup__expandable-content{box-sizing:border-box;overflow-y:auto;height:100%;width:100%}.popup__header{padding-bottom:var(--ez-popup__header--padding-bottom);width:100%;display:flex}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:\'\';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}';export{l as ez_popup}
@@ -0,0 +1 @@
1
+ class e{static clearTime(t,r=!0){const d=new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0);return r?e.adjustDLST(d):d}static strToDate(t,r=!0,d=!1){let a;if(a=d?/^(1[0-2]|0[1-9]|[1-9])[^\d]?(\d{2}|\d{4})(?:\s(\d{1,2}):(\d{1,2}):?(\d{0,2}))?$/.exec(t):/^(3[01]|[1-2]\d|0[1-9]|[1-9])[^\d]?(1[0-2]|0[1-9]|[1-9])[^\d]?(\d{2}|\d{4})(?:\s(\d{1,2}):(\d{1,2}):?(\d{0,2}))?$/.exec(t),!a)return;var s=d?1:Number(a[1]),u=Number(a[d?1:2]),n=Number(a[d?2:3]),m=Number(a[d?3:4]||0),b=Number(a[d?4:5]||0),c=Number(a[d?5:6]||0);n<100&&(n+=n<30?2e3:1900);let D=new Date(n,u-1,s,m,b,c,0);return!0!==r||d||0!=m||(D=e.adjustDLST(D)),D}static adjustDLST(e){return 23==e.getHours()?new Date(e.getFullYear(),e.getMonth(),e.getDate()+1,1,0,0,0):e}}export{e as D}
@@ -0,0 +1 @@
1
+ import{h,r as registerInstance,f as forceUpdate,g as getElement}from"./p-8f4851a6.js";import{D as DependencyType,s as selectIsCollapsedFieldSet,c as collapseExpandGroup,a as selectCurrentTab,b as selectVisibleButtons,d as changeTab$1,f as formLoad,e as showHideNavigationButtons,g as DataUnit,i as invalidField$1}from"./p-9dfd537e.js";import{c as createCommonjsModule,g as getDefaultExportFromCjs}from"./p-b36308e7.js";import{A as ApplicationUtils}from"./p-7107d7ef.js";import{D as DateUtils}from"./p-c89629eb.js";function _defineProperty(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function ownKeys(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function _objectSpread2(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?ownKeys(Object(r),!0).forEach((function(t){_defineProperty(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):ownKeys(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function formatProdErrorMessage(e){return"Minified Redux error #"+e+"; visit https://redux.js.org/Errors?code="+e+" for the full message or use the non-minified dev environment for full errors. "}var $$observable="function"==typeof Symbol&&Symbol.observable||"@@observable",randomString=function(){return Math.random().toString(36).substring(7).split("").join(".")},ActionTypes={INIT:"@@redux/INIT"+randomString(),REPLACE:"@@redux/REPLACE"+randomString(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+randomString()}};function isPlainObject(e){if("object"!=typeof e||null===e)return!1;for(var t=e;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}function createStore(e,t,r){var n;if("function"==typeof t&&"function"==typeof r||"function"==typeof r&&"function"==typeof arguments[3])throw new Error(formatProdErrorMessage(0));if("function"==typeof t&&void 0===r&&(r=t,t=void 0),void 0!==r){if("function"!=typeof r)throw new Error(formatProdErrorMessage(1));return r(createStore)(e,t)}if("function"!=typeof e)throw new Error(formatProdErrorMessage(2));var o=e,i=t,a=[],c=a,s=!1;function l(){c===a&&(c=a.slice())}function u(){if(s)throw new Error(formatProdErrorMessage(3));return i}function d(e){if("function"!=typeof e)throw new Error(formatProdErrorMessage(4));if(s)throw new Error(formatProdErrorMessage(5));var t=!0;return l(),c.push(e),function(){if(t){if(s)throw new Error(formatProdErrorMessage(6));t=!1,l();var r=c.indexOf(e);c.splice(r,1),a=null}}}function f(e){if(!isPlainObject(e))throw new Error(formatProdErrorMessage(7));if(void 0===e.type)throw new Error(formatProdErrorMessage(8));if(s)throw new Error(formatProdErrorMessage(9));try{s=!0,i=o(i,e)}finally{s=!1}for(var t=a=c,r=0;r<t.length;r++)(0,t[r])();return e}function b(e){if("function"!=typeof e)throw new Error(formatProdErrorMessage(10));o=e,f({type:ActionTypes.REPLACE})}function h(){var e,t=d;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(formatProdErrorMessage(11));function r(){e.next&&e.next(u())}return r(),{unsubscribe:t(r)}}})[$$observable]=function(){return this},e}return f({type:ActionTypes.INIT}),(n={dispatch:f,subscribe:d,getState:u,replaceReducer:b})[$$observable]=h,n}function assertReducerShape(e){Object.keys(e).forEach((function(t){var r=e[t];if(void 0===r(void 0,{type:ActionTypes.INIT}))throw new Error(formatProdErrorMessage(12));if(void 0===r(void 0,{type:ActionTypes.PROBE_UNKNOWN_ACTION()}))throw new Error(formatProdErrorMessage(13))}))}function combineReducers(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++){var o=t[n];"function"==typeof e[o]&&(r[o]=e[o])}var i,a=Object.keys(r);try{assertReducerShape(r)}catch(e){i=e}return function(e,t){if(void 0===e&&(e={}),i)throw i;for(var n=!1,o={},c=0;c<a.length;c++){var s=a[c],l=e[s],u=(0,r[s])(l,t);if(void 0===u)throw new Error(formatProdErrorMessage(14));o[s]=u,n=n||u!==l}return(n=n||a.length!==Object.keys(e).length)?o:e}}function compose(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return 0===t.length?function(e){return e}:1===t.length?t[0]:t.reduce((function(e,t){return function(){return e(t.apply(void 0,arguments))}}))}function applyMiddleware(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return function(e){return function(){var r=e.apply(void 0,arguments),n=function(){throw new Error(formatProdErrorMessage(15))},o={getState:r.getState,dispatch:function(){return n.apply(void 0,arguments)}},i=t.map((function(e){return e(o)}));return n=compose.apply(void 0,i)(r.dispatch),_objectSpread2(_objectSpread2({},r),{},{dispatch:n})}}}function createThunkMiddleware(e){return function(t){var r=t.dispatch,n=t.getState;return function(t){return function(o){return"function"==typeof o?o(r,n,e):t(o)}}}}var thunk=createThunkMiddleware();thunk.withExtraArgument=createThunkMiddleware;var actions=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),t.ActionCreators=t.ActionTypes=void 0;var r={UNDO:"@@redux-undo/UNDO",REDO:"@@redux-undo/REDO",JUMP_TO_FUTURE:"@@redux-undo/JUMP_TO_FUTURE",JUMP_TO_PAST:"@@redux-undo/JUMP_TO_PAST",JUMP:"@@redux-undo/JUMP",CLEAR_HISTORY:"@@redux-undo/CLEAR_HISTORY"};t.ActionTypes=r,t.ActionCreators={undo:function(){return{type:r.UNDO}},redo:function(){return{type:r.REDO}},jumpToFuture:function(e){return{type:r.JUMP_TO_FUTURE,index:e}},jumpToPast:function(e){return{type:r.JUMP_TO_PAST,index:e}},jump:function(e){return{type:r.JUMP,index:e}},clearHistory:function(){return{type:r.CLEAR_HISTORY}}}})),helpers=createCommonjsModule((function(e,t){function r(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Array.isArray(e)?e:"string"==typeof e?[e]:t}Object.defineProperty(t,"__esModule",{value:!0}),t.parseActions=r,t.isHistory=function(e){return void 0!==e.present&&void 0!==e.future&&void 0!==e.past&&Array.isArray(e.future)&&Array.isArray(e.past)},t.includeAction=function(e){var t=r(e);return function(e){return t.indexOf(e.type)>=0}},t.excludeAction=function(e){var t=r(e);return function(e){return t.indexOf(e.type)<0}},t.combineFilters=function(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return t.reduce((function(e,t){return function(r,n,o){return e(r,n,o)&&t(r,n,o)}}),(function(){return!0}))},t.groupByActionTypes=function(e){var t=r(e);return function(e){return t.indexOf(e.type)>=0?e.type:null}},t.newHistory=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return{past:e,present:t,future:r,group:n,_latestUnfiltered:t,index:e.length,limit:e.length+r.length+1}}})),debug=createCommonjsModule((function(e,t){function r(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var n,o;Object.defineProperty(t,"__esModule",{value:!0}),t.set=function(e){n=e},t.start=function(e,t){o={header:[],prev:[],action:[],next:[],msgs:[]},n&&(console.group?(o.header=["%credux-undo","font-style: italic","action",e.type],o.action=s("action",a,e),o.prev=s("prev history",i,t)):(o.header=["redux-undo action",e.type],o.action=["action",e],o.prev=["prev history",t]))},t.end=function(e){var t,i,a,l,u,d,f,b,h,p,m,v,g,O,j;n&&(o.next=console.group?s("next history",c,e):["next history",e],m=o.header,v=o.prev,g=o.next,O=o.action,j=o.msgs,console.group?((t=console).groupCollapsed.apply(t,r(m)),(i=console).log.apply(i,r(v)),(a=console).log.apply(a,r(O)),(l=console).log.apply(l,r(g)),(u=console).log.apply(u,r(j)),console.groupEnd()):((d=console).log.apply(d,r(m)),(f=console).log.apply(f,r(v)),(b=console).log.apply(b,r(O)),(h=console).log.apply(h,r(g)),(p=console).log.apply(p,r(j))))},t.log=function(){if(n){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];o.msgs=o.msgs.concat([].concat(t,["\n"]))}};var i="#9E9E9E",a="#03A9F4",c="#4CAF50";function s(e,t,r){return["%c".concat(e),"color: ".concat(t,"; font-weight: bold"),r]}})),reducer=createCommonjsModule((function(e,t){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Object.defineProperty(t,"__esModule",{value:!0}),t.default=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.set(t.debug);var r,o=a({limit:void 0,filter:function(){return!0},groupBy:function(){return null},undoType:actions.ActionTypes.UNDO,redoType:actions.ActionTypes.REDO,jumpToPastType:actions.ActionTypes.JUMP_TO_PAST,jumpToFutureType:actions.ActionTypes.JUMP_TO_FUTURE,jumpType:actions.ActionTypes.JUMP,neverSkipReducer:!1,ignoreInitialState:!1,syncFilter:!1},t,{initTypes:(0,helpers.parseActions)(t.initTypes,["@@redux-undo/INIT"]),clearHistoryType:(0,helpers.parseActions)(t.clearHistoryType,[actions.ActionTypes.CLEAR_HISTORY])}),i=o.neverSkipReducer?function(t,r){for(var n=arguments.length,o=new Array(n>2?n-2:0),i=2;i<n;i++)o[i-2]=arguments[i];return a({},t,{present:e.apply(void 0,[t.present,r].concat(o))})}:function(e){return e};return function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:r,a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};n.start(a,t);for(var c,s=t,p=arguments.length,m=new Array(p>2?p-2:0),v=2;v<p;v++)m[v-2]=arguments[v];if(!r){if(n.log("history is uninitialized"),void 0===t){var g={type:"@@redux-undo/CREATE_HISTORY"},O=e.apply(void 0,[t,g].concat(m));return s=l(O,o.ignoreInitialState),n.log("do not set initialState on probe actions"),n.end(s),s}(0,helpers.isHistory)(t)?(s=r=o.ignoreInitialState?t:(0,helpers.newHistory)(t.past,t.present,t.future),n.log("initialHistory initialized: initialState is a history",r)):(s=r=l(t,o.ignoreInitialState),n.log("initialHistory initialized: initialState is not a history",r))}switch(a.type){case void 0:return s;case o.undoType:return c=b(s,-1),n.log("perform undo"),n.end(c),i.apply(void 0,[c,a].concat(m));case o.redoType:return c=b(s,1),n.log("perform redo"),n.end(c),i.apply(void 0,[c,a].concat(m));case o.jumpToPastType:return c=f(s,a.index),n.log("perform jumpToPast to ".concat(a.index)),n.end(c),i.apply(void 0,[c,a].concat(m));case o.jumpToFutureType:return c=d(s,a.index),n.log("perform jumpToFuture to ".concat(a.index)),n.end(c),i.apply(void 0,[c,a].concat(m));case o.jumpType:return c=b(s,a.index),n.log("perform jump to ".concat(a.index)),n.end(c),i.apply(void 0,[c,a].concat(m));case h(a.type,o.clearHistoryType):return c=l(s.present,o.ignoreInitialState),n.log("perform clearHistory"),n.end(c),i.apply(void 0,[c,a].concat(m));default:if(c=e.apply(void 0,[s.present,a].concat(m)),o.initTypes.some((function(e){return e===a.type})))return n.log("reset history due to init action"),n.end(r),r;if(s._latestUnfiltered===c)return s;var j="function"==typeof o.filter&&!o.filter(a,c,s);if(j){var y=(0,helpers.newHistory)(s.past,c,s.future,s.group);return o.syncFilter||(y._latestUnfiltered=s._latestUnfiltered),n.log("filter ignored action, not storing it in past"),n.end(y),y}var E=o.groupBy(a,c,s);if(null!=E&&E===s.group){var w=(0,helpers.newHistory)(s.past,c,s.future,s.group);return n.log("groupBy grouped the action with the previous action"),n.end(w),w}return s=u(s,c,o.limit,E),n.log("inserted new state into history"),n.end(s),s}}};var n=function(e){if(e&&e.__esModule)return e;if(null===e||"object"!==r(e)&&"function"!=typeof e)return{default:e};var t=o();if(t&&t.has(e))return t.get(e);var n={},i=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var a in e)if(Object.prototype.hasOwnProperty.call(e,a)){var c=i?Object.getOwnPropertyDescriptor(e,a):null;c&&(c.get||c.set)?Object.defineProperty(n,a,c):n[a]=e[a]}return n.default=e,t&&t.set(e,n),n}(debug);function o(){if("function"!=typeof WeakMap)return null;var e=new WeakMap;return o=function(){return e},e}function i(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function a(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?i(Object(r),!0).forEach((function(t){c(e,t,r[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):i(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}function c(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function s(e){return function(e){if(Array.isArray(e)){for(var t=0,r=new Array(e.length);t<e.length;t++)r[t]=e[t];return r}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function l(e,t){var r=(0,helpers.newHistory)([],e,[]);return t&&(r._latestUnfiltered=null),r}function u(e,t,r,o){var i=e.past.length+1;n.log("inserting",t),n.log("new free: ",r-i);var a=e._latestUnfiltered,c=e.past.slice(r&&r<=i?1:0),l=null!=a?[].concat(s(c),[a]):c;return(0,helpers.newHistory)(l,t,[],o)}function d(e,t){if(t<0||t>=e.future.length)return e;var r=e.future,n=e._latestUnfiltered,o=[].concat(s(e.past),[n],s(r.slice(0,t))),i=r[t],a=r.slice(t+1);return(0,helpers.newHistory)(o,i,a)}function f(e,t){if(t<0||t>=e.past.length)return e;var r=e.past,n=e.future,o=e._latestUnfiltered,i=r.slice(0,t),a=[].concat(s(r.slice(t+1)),[o],s(n));return(0,helpers.newHistory)(i,r[t],a)}function b(e,t){return t>0?d(e,t-1):t<0?f(e,e.past.length+t):e}function h(e,t){return t.indexOf(e)>-1?e:!e}})),lib=createCommonjsModule((function(e,t){Object.defineProperty(t,"__esModule",{value:!0}),Object.defineProperty(t,"ActionTypes",{enumerable:!0,get:function(){return actions.ActionTypes}}),Object.defineProperty(t,"ActionCreators",{enumerable:!0,get:function(){return actions.ActionCreators}}),Object.defineProperty(t,"parseActions",{enumerable:!0,get:function(){return helpers.parseActions}}),Object.defineProperty(t,"isHistory",{enumerable:!0,get:function(){return helpers.isHistory}}),Object.defineProperty(t,"includeAction",{enumerable:!0,get:function(){return helpers.includeAction}}),Object.defineProperty(t,"excludeAction",{enumerable:!0,get:function(){return helpers.excludeAction}}),Object.defineProperty(t,"combineFilters",{enumerable:!0,get:function(){return helpers.combineFilters}}),Object.defineProperty(t,"groupByActionTypes",{enumerable:!0,get:function(){return helpers.groupByActionTypes}}),Object.defineProperty(t,"newHistory",{enumerable:!0,get:function(){return helpers.newHistory}}),Object.defineProperty(t,"default",{enumerable:!0,get:function(){return n.default}});var r,n=(r=reducer)&&r.__esModule?r:{default:r}}));const undoable=getDefaultExportFromCjs(lib),inicialHistState={currentTabIndex:{},currentRecordIndex:{},changes:{},collapsedGroups:{},newRecordIndex:{}},inicialNonHistState={dataLoading:{},invalidFields:{},visibleButtons:{previousVisible:!0,nextVisible:!0,addVisible:!0,removeVisible:!0,saveVisible:!0,cancelVisible:!0,reloadVisible:!1}};function formReducer(e=inicialHistState,t){switch(t.type){case"FORM/COLLAPSEGROUP":return collapseGroup(e,t.payload);case"FORM/CHANGETAB":return changeTab(e,t.payload.formId,t.payload.index);case"FORM/NAVIGATE":return navigate(e,t.payload);case"FORM/INSERT":return insertRecord(e,t.payload);case"FORM/CHANGEFIELD":return changeFieldValue(e,t.payload);case"FORM/CLEAREDITION":return clearEdition(e,t.payload);case"FORM/INVALIDFIELD":return navigateToInvalid(e,t.payload);default:return e}}function formNonHistoricReducer(e=inicialNonHistState,t){switch(t.type){case"FORM/DATALOADING":return dataLoading(e,t.payload);case"FORM/DATALOADED":return dataLoaded(e,t.payload);case"FORM/SAVINGCHANGES":return savingChanges(e,t.payload);case"FORM/CHANGESSAVED":return changesSaved(e,t.payload);case"FORM/REMOVINGRECORD":return removingRecord(e,t.payload);case"FORM/RECORDREMOVED":return recordRemoved(e,t.payload);case"FORM/INVALIDFIELD":return invalidField(e,t.payload);case"FORM/CLEAREDITION":return clearAllInvalidFields(e,t.payload);case"FORM/CHANGEFIELD":return clearInvalidField(e,t.payload);case"FORM/SHOWHIDENAVBTN":return showHideNavBtn(e,t.payload);default:return e}}function collapseGroup(e,{collapseId:t,collapsed:r}){const n=Object.assign({},e.collapsedGroups);return r?n[t]=!0:delete n[t],Object.assign(Object.assign({},e),{collapsedGroups:n})}function changeTab(e,t,r){const n=Object.assign({},e.currentTabIndex);return n[t]=r,Object.assign(Object.assign({},e),{currentTabIndex:n})}function navigate(e,{dataUnit:t,limit:r,backward:n}){const o=Object.assign({},e.currentRecordIndex)[t]||0;return gotoIndex(e,t,n?Math.max(r,o-1):Math.min(r,o+1))}function gotoIndex(e,t,r){const n=Object.assign({},e.currentRecordIndex);return n[t]=r,Object.assign(Object.assign({},e),{currentRecordIndex:n})}function insertRecord(e,{dataUnit:t,insertionIndex:r}){const n=Object.assign({},e.currentRecordIndex),o=Object.assign({},e.newRecordIndex);return n[t]=r,o[t]=(e.newRecordIndex[t]||0)+1,Object.assign(Object.assign({},e),{currentRecordIndex:n,newRecordIndex:o})}function changeFieldValue(e,{dataUnit:t,recordId:r,fieldName:n,value:o}){const i=Object.assign({},e.changes),a=Object.assign({},i[t]),c=Object.assign({},a[r]);c[n]=o,a[r]=c,i[t]=a;const s=Object.assign({},e.invalidFields),l=Object.assign({},s[t]),u=Object.assign({},l[r]);return delete u[n],l[r]=u,s[t]=l,Object.assign(Object.assign({},e),{changes:i,invalidFields:s,invalidFieldSelected:void 0})}function clearEdition(e,{dataUnit:t,recordsLimit:r}){const n=Object.assign({},e.changes),o=Object.assign({},e.newRecordIndex),i=Object.assign({},e.currentRecordIndex);return delete n[t],delete o[t],i[t]=Math.min(r,i[t]||0),Object.assign(Object.assign({},e),{changes:n,newRecordIndex:o,currentRecordIndex:i})}function navigateToInvalid(e,t){let r=Object.assign({},e);return void 0===r.invalidFieldSelected&&(r.invalidFieldSelected=!0,r=gotoIndex(r,t.dataUnit,t.recordIndex),r=changeTab(r,t.tabController,t.tabIndex)),r}function dataLoading(e,{dataUnit:t}){const r=Object.assign({},e.dataLoading);return r[t]=!0,Object.assign(Object.assign({},e),{dataLoading:r})}function dataLoaded(e,{dataUnit:t}){const r=Object.assign({},e.dataLoading);return delete r[t],Object.assign(Object.assign({},e),{dataLoading:r})}function savingChanges(e,{dataUnit:t}){const r=Object.assign({},e.dataLoading);return r[t]=!0,Object.assign(Object.assign({},e),{dataLoading:r})}function changesSaved(e,{dataUnit:t}){const r=Object.assign({},e.dataLoading);return delete r[t],Object.assign(Object.assign({},e),{dataLoading:r})}function removingRecord(e,{dataUnit:t}){const r=Object.assign({},e.dataLoading);return r[t]=!0,Object.assign(Object.assign({},e),{dataLoading:r})}function recordRemoved(e,{dataUnit:t}){const r=Object.assign({},e.dataLoading);return delete r[t],Object.assign(Object.assign({},e),{dataLoading:r})}function invalidField(e,{dataUnit:t,recordId:r,fieldName:n,errorMessage:o}){const i=Object.assign({},e.invalidFields),a=Object.assign({},i[t]),c=Object.assign({},a[r]);return c[n]=o,a[r]=c,i[t]=a,Object.assign(Object.assign({},e),{invalidFields:i})}function clearAllInvalidFields(e,{dataUnit:t}){const r=Object.assign({},e.invalidFields);return delete r[t],Object.assign(Object.assign({},e),{invalidFields:r})}function clearInvalidField(e,{dataUnit:t,recordId:r,fieldName:n}){const o=Object.assign({},e.invalidFields),i=Object.assign({},o[t]),a=Object.assign({},i[r]);return delete a[n],i[r]=a,o[t]=i,Object.assign(Object.assign({},e),{invalidFields:o})}function showHideNavBtn(e,{buttonName:t,status:r}){const n=Object.assign({},e.visibleButtons);return n[t]=r,Object.assign(Object.assign({},e),{visibleButtons:n})}function removeHandler(e){ApplicationUtils.confirm("Exclusão de registro","Tem certeza que deseja Remover?",null,!0).then((t=>{t&&e.remove()}))}function saveHandler(e){setTimeout((()=>{e.save()}),50)}const NavigationBar=({dataUnit:e,buttonProps:t,enabled:r})=>t.previousVisible||t.nextVisible||t.addVisible||t.removeVisible||t.saveVisible||t.cancelVisible||t.reloadVisible?h("div",{class:"col col--sd-12 align--right"},t.previousVisible?h("ez-button",{key:e.name+"_previous",title:"Registro anterior",mode:"icon",enabled:r&&e.hasPrevious(),onClick:()=>e.previous(),image:"/themes/default/images/icons/actions-sprite.svg#previous-circle-inverted",class:"button--secondary margin-right--medium"}):null,t.nextVisible?h("ez-button",{key:e.name+"_next",title:"Próximo registro",mode:"icon",enabled:r&&e.hasNext(),onClick:()=>e.next(),image:"/themes/default/images/icons/actions-sprite.svg#next-circle-inverted",class:"button--secondary margin-right--medium"}):null,t.removeVisible?h("ez-button",{key:e.name+"_remove",label:"Remover",enabled:r&&e.hasCurrentRecord(),onClick:()=>removeHandler(e),image:"/themes/default/images/icons/actions-sprite.svg#minus-circle-inverted",class:"button--secondary margin-right--medium"}):null,t.addVisible?h("ez-button",{key:e.name+"_add",label:"Adicionar",enabled:r,onClick:()=>e.insert(),class:"button--secondary margin-right--medium"}):null,t.reloadVisible?h("ez-button",{key:e.name+"_reload",title:"Recarregar",enabled:r,mode:"icon",onClick:()=>e.load(),image:"/themes/default/images/icons/actions-sprite.svg#rotate",class:"button--secondary margin-right--medium"}):null,t.cancelVisible?h("ez-button",{key:e.name+"_cancel",label:"Cancelar",enabled:r&&e.hasChanges(),onClick:()=>e.cancel(),class:"button--secondary margin-right--medium"}):null,t.saveVisible?h("ez-button",{key:e.name+"_save",label:"Salvar",enabled:r&&e.hasChanges(),onClick:()=>saveHandler(e),class:"button--primary margin-right--medium"}):null):null;function scrollToView(e,t){e&&window.requestAnimationFrame((()=>t.scrollIntoView()))}const Field=({dataUnit:e,field:t,forceScroll:r,enabled:n})=>{const{name:o,form:i}=t,{label:a,userInterface:c,properties:s,required:l,dependencies:u,readOnly:d}=e.getFieldMetadata(o),f=e.getValue(o)||null,b=e.isLoading(),p=l?`* ${a} (obrigatório)`:a,m=e.getErrorMessage(o),v=`${e.name}-${o}`,g=n&&!d,O=t=>{e.changeValue(o,t)};switch(c){case"LONGTEXT":return h("div",{class:"col col--sd-12 padding--small"},b?h("place-holder",null):h("ez-text-area",{value:f||"",label:p,onEzChange:e=>O(e.target.value),errorMessage:m,ref:e=>scrollToView(r,e),key:v,enabled:g}));case"CHECKBOX":case"SWITCH":return h("div",{class:"col col--sd-12 col--tb-3 padding--small align--middle padding-bottom--large"},b?h("place-holder",null):h("ez-check",{value:f,label:a,enabled:g,mode:"CHECKBOX"===c?"regular":"switch",onEzChange:e=>O(e.target.value),ref:e=>scrollToView(r,e),key:v}));case"OPTIONSELECTOR":const t=s?JSON.parse(getProp(s,"options")):{},n=Object.keys(t).map((e=>({value:e,label:t[e]})));return h("div",{class:"col col--sd-12 col--tb-3 padding--small"},b?h("place-holder",null):h("ez-combo-box",{value:f,label:p,enabled:g,onEzChange:e=>O(e.target.value),errorMessage:m,ref:e=>scrollToView(r,e),key:v,options:n}));case"SEARCH":const l={__MAIN_FORM:i,__DATA_UNIT:e.name,__FIELD_NAME:o};s.forEach((({name:e,value:t})=>{l[e]=t}));let d=[];return null==u||u.forEach((t=>{var r;if(t.type===DependencyType.SEARCHING&&(null===(r=t.masterFields)||void 0===r?void 0:r.length)>0){let r={expression:t.expression,paramNames:[...t.masterFields],paramResolver:t=>e.getValue(t)};d.push(r)}})),d.length>0&&(l.CRITERIA=d),h("div",{class:"col col--sd-12 col--tb-3 padding--small"},b?h("place-holder",null):h("ez-search",{value:f,label:p,enabled:g,onEzChange:e=>O(e.target.value),errorMessage:m,optionLoader:e=>{if(i)return i.loadSearch(e,l)},ref:e=>scrollToView(r,e),key:v}));case"FILE":const j=getProp(s,"URL"),y=getProp(s,"HEADERS"),E=y?JSON.parse(y):{},w=Number(getProp(s,"maxfiles")||0);return h("div",{class:"col col--sd-12 padding--small"},b?h("place-holder",null):h("ez-upload",{value:f,label:p,enabled:g,onEzChange:e=>O(e.detail),urlUpload:j,requestHeaders:E,maxFiles:w}));case"DATE":return h("div",{class:"col col--sd-12 col--tb-3 padding--small"},b?h("place-holder",null):h("ez-date-input",{value:f?DateUtils.clearTime(f):null,label:p,enabled:g,onEzChange:e=>O(e.target.value),errorMessage:m,ref:e=>scrollToView(r,e),key:v}));case"DECIMALNUMBER":case"INTEGERNUMBER":let M=0,T=0;return"DECIMALNUMBER"===c&&(M=Number(getProp(s,"precision")||2),T=Number(getProp(s,"prettyprecision")||M)),h("div",{class:"col col--sd-12 col--tb-3 padding--small"},b?h("place-holder",null):h("ez-numeric-input",{value:f||null,label:p,enabled:g,onEzChange:e=>O(e.target.value),errorMessage:m,precision:M,prettyprecision:T,ref:e=>scrollToView(r,e),key:v}));default:return h("div",{class:"col col--sd-12 col--tb-3 padding--small"},b?h("place-holder",null):h("ez-text-input",{value:f,label:p,enabled:g,loading:b,onInput:e=>O(e.target.value),errorMessage:m,ref:e=>scrollToView(r,e),key:v}))}};function getProp(e,t){var r;return e?null===(r=e.find((e=>e.name===t)))||void 0===r?void 0:r.value:null}const FieldSet=({store:e,formName:t,source:r,dataUnit:n,enabled:o})=>{const{label:i,fields:a}=r,c=t+i;let s,l=selectIsCollapsedFieldSet(e.getState(),t+i);return r.fields.forEach((e=>{if(void 0===s){const t=n.getErrorMessage(e.name);null!=t&&""!==t&&(s=e.name)}})),s&&(l=!1),h("div",{class:"col col--sd-12 padding--small"},h("div",{class:"row margin-top--large"},h("div",{class:"col col--sd-12 align--middle padding-horizontal--medium"},h("ez-collapsible-box",{value:l,label:i,onEzChange:()=>e.dispatch(collapseExpandGroup(c,!l))}),l?null:h("div",{class:"col col--sd-12"},a.map((e=>h(Field,{enabled:o,field:e,dataUnit:n,forceScroll:s===e.name})))))))};function buildFormItem(e,t,r,n,o){if("fields"in e)return h(FieldSet,{enabled:o,source:e,store:r,formName:t,dataUnit:n});const i=n.getErrorMessage(e.name);return h(Field,{enabled:o,field:e,dataUnit:n,forceScroll:null!=i&&""!==i})}const FormSheet=({store:e,parentName:t,source:r,parentDataUnit:n,dataUnitBuilder:o,enabled:i})=>{const a=selectCurrentTab(e.getState(),t),c=r.length>1?r.map((e=>h("ez-tab",{label:e.label,tabKey:e.name}))):null,{subForms:s,items:l,name:u}=r[a],d=o(r[a].dataUnit,n);r[a].dataUnit=d;const f=s&&s.length>0,b=d||n;let p=selectVisibleButtons(e.getState());return"1"===b.cardinality&&(p.addVisible=!1,p.removeVisible=!1,p.nextVisible=!1,p.previousVisible=!1),h("div",{class:"form-sheet"},c?h("ez-tabselector",{selectedIndex:a,selectedTab:u,onEzChange:r=>{e.dispatch(changeTab$1(t,r.target.selectedindex))}},c):null,d?h(NavigationBar,{enabled:i,dataUnit:d,buttonProps:p}):null,h("div",{class:"tab__container"},l?l.map((t=>buildFormItem(t,u,e,b,i))):null,f?h(FormSheet,{enabled:i,store:e,source:s,parentName:u,parentDataUnit:b,dataUnitBuilder:o}):null))},ezFormCss="ez-form{display:flex;flex-direction:column;width:100%}.form-sheet{display:flex;width:100%;flex-wrap:wrap;position:relative}.tab__container{display:flex;width:100%;flex-wrap:wrap;position:relative}";let EzForm=class{constructor(e){registerInstance(this,e),this.enabled=!0,this.loading=!1,this._dataUnits=new Map,this._duSources=new Map,this._tabPositionByField=new Map,this._duToLoad=[]}cleanPreparedMetadata(){this._preparedMetadata=void 0}async validate(){const e=Array.from(this._duSources.keys());for(let t=0;t<this._duSources.size;t++){const r=e[t];let n=this._dataUnits.get(r);if(void 0===n){const e=this._duSources.get(r);n=this.buildDataUnit(e,e.parentDUName)}if(!n.validateRecords())return!1}return!0}async getChanges(){let e=[];const t=Array.from(this._dataUnits.values());for(let r=0;r<this._dataUnits.size;r++){const n=t[r];if(!n.parentDU){const t=n.getChangesToSave();t&&(e=e.concat(t))}}return e}async changeFieldValue(e,t,r){const n=this._dataUnits.get(e);n&&n.changeValue(t,r)}validateRecords(e,t,r){const n={isValid:!0,message:""};if(this.ignoreSaveValidation&&"SAVE"===r)return n;const o=t=>{e.requiredFields.forEach((r=>{if((e=>!e.readOnly&&"SWITCH"!==e.userInterface&&"CHECKBOX"!==e.userInterface)(r)){const o=t.record__index,i=t[r.name];if(null==i||""===i){const i=this._tabPositionByField.get(e.name+r.name);this._store.dispatch(invalidField$1(i.tabName,i.index,e.name,o,t.record__id,r.name,"Essa informação é obrigatória")),n.isValid=!1,n.message="Há pelo menos um campo obrigatório não preenchido."}}}))};if(0===e.records.length)o({});else{let r={};t.forEach((e=>{o(e),r[e.record__id]=!0})),e.records.forEach((e=>{r[e.record__id]||o(e)}))}return n}loadMDFromExecutor(e){const t=this.parseExecutor(this.metadataExecutor);if(t){const r=t();r&&(r instanceof Promise?r.then((t=>{e(t)})):e(r))}}loadMDFromElement(e){const t=[];Array.from(this._host.children).forEach((e=>{"FORM-METADATA"===e.tagName&&t.push(e.metadata)})),e(t.length>0?t:null)}updateMetadata(e){if(e){const t=(e,r,n,o)=>{var i;r.items.forEach((t=>{if("fields"in t)t.fields.forEach((t=>{t.form=this,this._tabPositionByField.set(e+t.name,{tabName:n,index:o})}));else{const r=t;r.form=this,this._tabPositionByField.set(e+r.name,{tabName:n,index:o})}})),null===(i=r.subForms)||void 0===i||i.forEach(((n,o)=>{const i=n.dataUnit;i&&(this._duSources.set(i.name,i),i.parentDUName=e),t(i?i.name:e,n,r.name,o)}))};this._preparedMetadata=e.map(((e,r)=>{const n=e.dataUnit;e.autoLoad&&this._duToLoad.push(n),this.decorateDU(n);const o=n.name;return this._duSources.set(o,n),t(o,e,"__MAIN__FORM__",r),e})),this._store.dispatch(formLoad())}}parseExecutor(executor){return executor?executor instanceof Function?executor:eval(executor):null}componentWillRender(){if(void 0===this._store){const e=combineReducers({hist:undoable(formReducer),nonhist:formNonHistoricReducer});this._store=createStore(e,applyMiddleware(thunk)),this._store.subscribe((()=>{forceUpdate(this)})),this.slaveMode&&(this._store.dispatch(showHideNavigationButtons("saveVisible",!1)),this._store.dispatch(showHideNavigationButtons("cancelVisible",!1)),this._store.dispatch(showHideNavigationButtons("reloadVisible",!1)))}void 0===this._preparedMetadata&&(this.metadata?this.updateMetadata(this.metadata):(this.loadMDFromElement((e=>this.updateMetadata(e))),this._preparedMetadata||this.loadMDFromExecutor((e=>this.updateMetadata(e)))))}componentDidRender(){this._duToLoad.forEach((e=>e.load())),this._duToLoad=[]}loadSearch(e,t){const r=this.parseExecutor(this.fieldSearchExecutor);return r?r(e,t):[{value:0,label:"Sem resultados"}]}buildDataUnit(e,t){if(e){const{name:r,unitLabel:n,records:o,cardinality:i,fields:a}=e;if(!(e instanceof DataUnit)){let c;c=t instanceof DataUnit?t:this._dataUnits.get(t),(e=new DataUnit(r,n,i,c)).fields=a,this._dataUnits.set(e.name,e),o&&(e.records=o)}this.decorateDU(e)}return e}decorateDU(e){e.store=this._store,e.loadExecutor=this.parseExecutor(this.loadExecutor),e.saveExecutor=this.parseExecutor(this.saveExecutor),e.removeExecutor=this.parseExecutor(this.removeExecutor),e.recordsValidator=this}render(){return this.loading?h("place-holder",null):this._preparedMetadata?h(FormSheet,{enabled:this.enabled,store:this._store,source:this._preparedMetadata,parentName:"__MAIN__FORM__",dataUnitBuilder:(e,t)=>this.buildDataUnit(e,t)}):null}static get assetsDirs(){return["assets"]}get _host(){return getElement(this)}static get watchers(){return{metadata:["cleanPreparedMetadata"]}}};EzForm.style=ezFormCss;export{EzForm as ez_form}
@@ -0,0 +1 @@
1
+ import{r as t,c as e,h as i,H as n,g as r}from"./p-8f4851a6.js";import"./p-b36308e7.js";import{D as a}from"./p-c89629eb.js";import{C as s}from"./p-d1889704.js";let o=class{constructor(i){t(this,i),this.ezChange=e(this,"ezChange",7),this.enabled=!0,this.showSeconds=!1}setLabel(){this._textInput.label=this.label}setErrorMessage(){this._textInput.errorMessage=this.errorMessage}applyValueToInput(){this._textInput&&(this._textInput.value=this.getTextValue(this.value))}onChangeKeyDown(t){const e=this._textInput.shadowRoot.querySelector("input");if("H"===t.key||"h"===t.key)this.changeValue(new Date);else if(t.shiftKey&&"Tab"===t.key){if(e.selectionStart>0){let i=e.value.lastIndexOf(":",e.selectionStart);i=-1===i?e.value.lastIndexOf(" ",e.selectionStart):i,i=-1===i?e.value.lastIndexOf("/",e.selectionStart):i,i=-1===i?e.selectionStart:i;let n=e.value.lastIndexOf(":",i-1);n=-1===n?e.value.lastIndexOf(" ",i-1):n,n=-1===n?e.value.lastIndexOf("/",i-1):n,n=-1===n?0:n+1,e.setSelectionRange(n,i),t.preventDefault()}}else if("Tab"===t.key&&e.value.length!==e.selectionEnd){let i=e.value.indexOf("/",e.selectionEnd);i=-1===i?e.value.indexOf(" ",e.selectionEnd):i,i=-1===i?e.value.indexOf(":",e.selectionEnd):i,i=-1===i?e.selectionEnd:i+1;let n=e.value.indexOf("/",i);n=-1===n?e.value.indexOf(" ",i):n,n=-1===n?e.value.indexOf(":",i):n,n=-1===n?e.value.length:n,e.setSelectionRange(i,n),t.preventDefault()}}onFocused(){const t=this._textInput.shadowRoot.querySelector("input");if(t.selectionStart!==t.selectionEnd){let e=t.value.indexOf("/");e=-1===e?t.value.indexOf(" "):e,e=-1===e?t.value.indexOf(":"):e,e=-1===e?t.value.length:e,t.setSelectionRange(0,e)}}onClicked(){const t=this._textInput.shadowRoot.querySelector("input");let e=t.value.indexOf("/",t.selectionEnd);e=-1===e?t.value.indexOf(" ",t.selectionEnd):e,e=-1===e?t.value.indexOf(":",t.selectionEnd):e;let i=t.value.lastIndexOf(":",t.selectionEnd);i=-1===i?t.value.lastIndexOf(" ",e-1):i,i=-1===i?t.value.lastIndexOf("/",e-1):i,i=-1===i?0:i+1,t.setSelectionRange(i,e)}changeValue(t){this._textInput.errorMessage="",this.getTextValue(t)!==this.getTextValue(this.value)&&(this.value=t,this.ezChange.emit())}showCalendar(){this._calendar.fitVertical(this._textInput.errorMessage?0:-17,this._elem.clientHeight),this._calendar.style.visibility="inherit"}parseDate(){const t=this._textInput.value,e=a.strToDate(t);e||!t?this.changeValue(this.value===e?this.value:e):this._textInput.errorMessage="O valor digitado não é uma data válida"}getTextValue(t){return t?new Intl.DateTimeFormat("pt-BR",this.showSeconds?{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric",second:"numeric"}:{year:"numeric",month:"numeric",day:"numeric",hour:"numeric",minute:"numeric"}).format(t):null}componentDidLoad(){s.applyVarsTextInput(this._elem,this._textInput)}render(){return i(n,null,i("ez-text-input",{ref:t=>this._textInput=t,onBlur:()=>this.parseDate(),onKeyDown:t=>{this.onChangeKeyDown(t)},label:this.label,onEzChange:t=>t.stopPropagation(),value:this.getTextValue(this.value),restrict:"0123456789/: ",enabled:this.enabled,errorMessage:this.errorMessage,onFocus:()=>this.onFocused(),onClick:()=>this.onClicked()},i("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>this.showCalendar(),slot:"leftIcon"})),i("ez-calendar",{onEzChange:t=>{this.changeValue(this._calendar.value),t.stopPropagation()},floating:!0,ref:t=>this._calendar=t,time:!0,showSeconds:this.showSeconds}))}get _elem(){return r(this)}static get watchers(){return{label:["setLabel"],errorMessage:["setErrorMessage"],value:["applyValueToInput"]}}};o.style=':host{display:block;width:100%;--ez-date-input__input--background-color:var(--background--medium, #e0e0e0);--ez-date-input__input--border-color:var(--ez-date-input__input--background-color);--ez-date-input__calendar-image:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="16px" width="15px"><path d="M 3.171875,5.25 C 2.6485088,5.25 2.21875,5.6797588 2.21875,6.203125 2.21875,6.7264912 2.6485088,7.15625 3.171875,7.15625 3.6952412,7.15625 4.125,6.7264912 4.125,6.203125 4.125,5.6797588 3.6952412,5.25 3.171875,5.25 Z m 2.875,0 C 5.5235088,5.25 5.09375,5.6797588 5.09375,6.203125 5.09375,6.7264912 5.5235088,7.15625 6.046875,7.15625 6.5702412,7.15625 7,6.7264912 7,6.203125 7,5.6797588 6.5702412,5.25 6.046875,5.25 Z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.9511719,-0.4297588 0.9511719,-0.953125 C 9.8730469,5.6797588 9.4452412,5.25 8.921875,5.25 Z m 2.873047,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.953125 0.953125,0.953125 0.523366,0 0.953125,-0.4297588 0.953125,-0.953125 C 12.748047,5.6797588 12.318288,5.25 11.794922,5.25 Z M 3.171875,8.1230469 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 0.5233662,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297588,0.9531251 0.953125,0.9531251 C 6.5702412,10.029297 7,9.5995381 7,9.0761719 7,8.5528057 6.5702412,8.1230469 6.046875,8.1230469 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.4297587,0.9531251 0.953125,0.9531251 0.5233661,0 0.9531249,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.4297588 -0.953125,0.953125 0,0.5233662 0.429759,0.9531251 0.953125,0.9531251 0.523367,0 0.953125,-0.4297589 0.953125,-0.9531251 0,-0.5233662 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.171875,10.998047 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 0.5233662,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.875,0 c -0.5233662,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297588,0.953125 0.953125,0.953125 C 6.5702412,12.904297 7,12.474538 7,11.951172 7,11.427806 6.5702412,10.998047 6.046875,10.998047 Z m 2.8554688,0 c -0.5233663,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.4297587,0.953125 0.953125,0.953125 0.5233661,0 0.9531249,-0.429759 0.953125,-0.953125 0,-0.523366 -0.4297588,-0.953125 -0.953125,-0.953125 z m 2.9003902,0 c -0.523366,0 -0.953125,0.429759 -0.953125,0.953125 0,0.523366 0.429759,0.953125 0.953125,0.953125 0.523367,0 0.953125,-0.429759 0.953125,-0.953125 0,-0.523366 -0.429758,-0.953125 -0.953125,-0.953125 z M 3.5,0 c -0.554,0 -1,0.446 -1,1 v 0.050781 C 1.0853217,1.2909766 0,2.5186658 0,4 v 9 c 0,1.652487 1.3475134,3 3,3 h 9 c 1.652487,0 3,-1.347513 3,-3 V 4 C 15,2.5186658 13.914678,1.2909766 12.5,1.0507812 V 1 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 c 0,-0.554 -0.446,-1 -1,-1 -0.554,0 -1,0.446 -1,1 h -2 C 4.5,0.446 4.054,0 3.5,0 Z m 1,2.0996094 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 v -0.640625 h 2 v 0.640625 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 V 2.1738281 C 13.311725,2.3905225 13.900391,3.11278 13.900391,4 v 9 c 0,1.062113 -0.838278,1.900391 -1.900391,1.900391 H 3 C 1.9378864,14.900391 1.0996094,14.062113 1.0996094,13 V 4 C 1.0996094,3.11278 1.6882747,2.3905225 2.5,2.1738281 v 0.5664063 c 0,0.554 0.446,1 1,1 0.554,0 1,-0.446 1,-1 z"/></svg>\')}.text-input{--ez-text-input__input--background-color:inherit;--ez-text-input__input--border-color:inherit}.btn-open-cal{outline:none;border:none;background-color:unset;cursor:pointer}.btn-open-cal:disabled{cursor:unset}.btn-open-cal::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:15px;height:16px;-webkit-mask-image:var(--ez-date-input__calendar-image);mask-image:var(--ez-date-input__calendar-image)}.btn-open-cal:disabled:after{background-color:var(--text--disable, #AFB6C0)}.btn-open-cal:enabled:hover::after{background-color:var(--color--primary, #4e4e4e)}ez-text-input{--text-input__input--background-color:var(--ez-date-input__input--background-color, #FFFFFF);--text-input__input--border-color:var(--ez-date-input__input--border-color, #DCE0E8)}';export{o as ez_date_time_input}
@@ -0,0 +1,12 @@
1
+ import { EventEmitter } from "../../stencil-public-runtime";
2
+ import { Application } from "@sankhyalabs/core";
3
+ export declare class EzApplication {
4
+ application: Application;
5
+ /**
6
+ * Evento disparado quando a aplicação for carregada.
7
+ */
8
+ applicationLoaded: EventEmitter<boolean>;
9
+ componentWillLoad(): void;
10
+ componentDidLoad(): void;
11
+ render(): any;
12
+ }
@@ -15,6 +15,11 @@ export declare class EzButton {
15
15
  * Define o icone svg que será utilizado no botão. Esta propriedade só é utilizada caso o componente esteja no modo 'icon'
16
16
  */
17
17
  image: string;
18
+ /**
19
+ * Quando em modo "icon" pode-se escolher entre [small,medium,large] (somente para o modo "icon")
20
+ */
21
+ size: string;
22
+ getIconSize(): string;
18
23
  handleSlotChange(ev: Event): void;
19
24
  render(): any;
20
25
  }
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
1
+ import { EventEmitter } from "../../stencil-public-runtime";
2
2
  export declare class EzCalendar {
3
3
  private _container;
4
4
  private _box;
@@ -9,6 +9,14 @@ export declare class EzCalendar {
9
9
  private _weekDayLabels;
10
10
  private _monthLabels;
11
11
  private _calendarHeight;
12
+ private _hoursLabel;
13
+ private _minutosLabel;
14
+ private _hoursSelect;
15
+ private _minutesSelect;
16
+ private _secondsSelect;
17
+ private _hoursScroll;
18
+ private _minutesScroll;
19
+ private _secondsScroll;
12
20
  /**
13
21
  * A data selecionada no calendário
14
22
  */
@@ -18,6 +26,14 @@ export declare class EzCalendar {
18
26
  * quando o método show() for acionado.
19
27
  */
20
28
  floating: boolean;
29
+ /**
30
+ * Exibe ou não as horas e minutos no calendario
31
+ */
32
+ time: boolean;
33
+ /**
34
+ * Exibe ou não os segundos no calendario
35
+ */
36
+ showSeconds: boolean;
21
37
  /**
22
38
  * Quando o usuário escolhe uma data, esse evento é emitido.
23
39
  */
@@ -29,6 +45,9 @@ export declare class EzCalendar {
29
45
  * strings no formato css.
30
46
  */
31
47
  show(top?: string, left?: string, bottom?: string, right?: string): Promise<void>;
48
+ /**
49
+ * Método necessário para ajustar o posicionamento do calendar acima ou abaixo do ez-date-input conforme a disponibilidade de espaço.
50
+ */
32
51
  fitVertical(topOffset: number, bottomOffset: number): Promise<void>;
33
52
  /**
34
53
  * Usado no modo floating. Faz com que o componente seja ocultado.
@@ -39,6 +58,11 @@ export declare class EzCalendar {
39
58
  private isSelectedDate;
40
59
  private changeMonth;
41
60
  private selectDate;
61
+ private selectHours;
62
+ private selectMinutes;
63
+ private selectSeconds;
64
+ updateScroll(element: HTMLElement): void;
42
65
  componentDidRender(): void;
66
+ componentDidLoad(): void;
43
67
  render(): any;
44
68
  }
@@ -4,7 +4,7 @@ export declare class EzCheck {
4
4
  /**
5
5
  * Evento disparado ao mudar o estado do check(onEzChange).
6
6
  */
7
- ezChange: EventEmitter<string>;
7
+ ezChange: EventEmitter<any>;
8
8
  /**
9
9
  * Título do campo
10
10
  */
@@ -1,4 +1,4 @@
1
- import { EventEmitter } from '../../stencil-public-runtime';
1
+ import { EventEmitter } from "../../stencil-public-runtime";
2
2
  export declare class EzCollapsibleBox {
3
3
  /**
4
4
  * Valor externalizado que garante a exibição ou não do componente
@@ -11,11 +11,11 @@ export declare class EzCollapsibleBox {
11
11
  /**
12
12
  * Define o tamanho do texto e do ícone do componente.
13
13
  */
14
- headersize: string;
14
+ headerSize: string;
15
15
  /**
16
16
  * Define o local onde o ícone será renderizado.
17
17
  */
18
- iconplacement: string;
18
+ iconPlacement: string;
19
19
  /**
20
20
  * Evento disparado ao mudar o estado do componente (onEzChange).
21
21
  */
@@ -0,0 +1,42 @@
1
+ import { EventEmitter } from '../../stencil-public-runtime';
2
+ export declare class EzDateTimeInput {
3
+ private _calendar;
4
+ private _textInput;
5
+ private _elem;
6
+ /**
7
+ * Evento disparado ao mudar o estado do componente(onEzChange).
8
+ */
9
+ ezChange: EventEmitter<string>;
10
+ /**
11
+ * Título do campo
12
+ */
13
+ label: string;
14
+ /**
15
+ * A data informada pelo usuário
16
+ */
17
+ value: Date;
18
+ /**
19
+ * Deixa o campo disponível ou não para uso.
20
+ */
21
+ enabled: boolean;
22
+ /**
23
+ * Quando há um problema de validação, serve como orientação ao usuário
24
+ */
25
+ errorMessage: string;
26
+ /**
27
+ * Exibe ou não os segundos no input
28
+ */
29
+ showSeconds: boolean;
30
+ setLabel(): void;
31
+ setErrorMessage(): void;
32
+ applyValueToInput(): void;
33
+ onChangeKeyDown(ev: any): void;
34
+ onFocused(): void;
35
+ onClicked(): void;
36
+ changeValue(newValue: Date): void;
37
+ private showCalendar;
38
+ private parseDate;
39
+ private getTextValue;
40
+ componentDidLoad(): void;
41
+ render(): any;
42
+ }
@@ -1,14 +1,14 @@
1
- import { Form } from './subcomponents/FormMetadata';
2
- import DataUnit, { Record, RecordsValidator, ValidationResult } from './subcomponents/DataUnit';
1
+ import { Form } from "./subcomponents/FormMetadata";
2
+ import DataUnit, { Record, RecordsValidator, ValidationResult } from "./subcomponents/DataUnit";
3
3
  export declare class EzForm implements RecordsValidator {
4
- metadataexecutor: string | Function;
5
- loadexecutor: string | Function;
6
- saveexecutor: string | Function;
7
- removeexecutor: string | Function;
8
- fieldsearchexecutor: string | Function;
9
- ignoresavevalidation: boolean;
4
+ metadataExecutor: string | Function;
5
+ loadExecutor: string | Function;
6
+ saveExecutor: string | Function;
7
+ removeExecutor: string | Function;
8
+ fieldSearchExecutor: string | Function;
9
+ ignoreSaveValidation: boolean;
10
10
  metadata: Array<Form>;
11
- slavemode: boolean;
11
+ slaveMode: boolean;
12
12
  enabled: boolean;
13
13
  loading: boolean;
14
14
  private _host;
@@ -1,4 +1,4 @@
1
- import { Store } from 'redux';
1
+ import { Store } from "redux";
2
2
  export default class DataUnit {
3
3
  private _store;
4
4
  private _changeDeboucing;
@@ -1,4 +1,4 @@
1
- import { Form } from './FormMetadata';
1
+ import { Form } from "./FormMetadata";
2
2
  export declare class FormMetadata {
3
3
  name: string;
4
4
  label: string;
@@ -0,0 +1,8 @@
1
+ import { DataUnit } from "@sankhyalabs/core";
2
+ import EzGridController from "./EzGridController";
3
+ export default class DataUnitBridge {
4
+ private _gridController;
5
+ private _dataUnit;
6
+ constructor(gridController: EzGridController, dataUnit: DataUnit);
7
+ private processAction;
8
+ }
@@ -0,0 +1,195 @@
1
+ import { DataUnit } from "@sankhyalabs/core";
2
+ /**
3
+ * O intuito desta abstração, é isolar o componente EzGrid de uma implementação
4
+ * específica, permitindo que usemos componentes de terceiros sem um acoplamento
5
+ * direto.
6
+ * Isso permitirá que no futuro possamos trocar a implementação usada sem prejuízo
7
+ * às aplicações que o usam.
8
+ *
9
+ * IMPORTANTE: Como consumidores de API de terceiros precisamos manter toda e qualquer
10
+ * funcionalidade abstrata, ou seja, se o componente usa determinada funcionalidade da
11
+ * implementação de referência essa funcionalidade deve estar COMPLETAMENTE abstraída
12
+ * pelo controller, sob pena de inviabilizar a troca da implementação usada.
13
+ */
14
+ export default interface EzGridController {
15
+ /**
16
+ * Chamado pelo EzGrid para criar os elementos DOM da grade.
17
+ * @param container - O elemento que será usado como host para construir a grade.
18
+ * @param options - A contextualização dessa instância de grade.
19
+ */
20
+ initDatagrid(container: HTMLElement, options: EzGridOptions): void;
21
+ /**
22
+ * Método responsável por receber a definição das colunas.
23
+ * @param cols - Array contendo a definição de todas as colunas.
24
+ * @param showCheckSelection - Quando true adiciona uma coluna extra na grade,
25
+ * para controlar a seleção.
26
+ */
27
+ setColumnsDef(cols: Array<EzGridColumn>, showCheckSelection: boolean): void;
28
+ /**
29
+ * Retorna a definição das colunas.
30
+ * @return - Array contendo as definições de cada coluna.
31
+ */
32
+ getColumnsDef(): Array<EzGridColumn>;
33
+ /**
34
+ * Recebe o estado das colunas. Geralmente o estado pode ser persistido separadamete
35
+ * da definição básica da coluna. Nesse caso esse método o recebe e aplica.
36
+ * @param state - Array contendo as informações de estado de cada coluna.
37
+ */
38
+ setColumnsState(state: Array<EzGridColumn>): void;
39
+ /**
40
+ * Retorna o estado das colunas.
41
+ * @return - Array contendo as informações de estado de cada coluna.
42
+ */
43
+ getColumnsState(): Array<EzGridColumn>;
44
+ /**
45
+ * Seleção de linhas.
46
+ * @returns Retorna um array com a(s) linha(s) selecionada(s).
47
+ */
48
+ getSelection(): Array<any>;
49
+ /**
50
+ * Adiciona um item de menu a ser colocado no cabeçalho das colunas.
51
+ * @param item - A definição do item que deve ser inserido no menu.
52
+ */
53
+ addColumnMenuItem(item: EzGridColumnMenuItemDef): void;
54
+ /**
55
+ * Método responsável por atribuir o array de linhas da grade.
56
+ * @param data - Array contendo objetos json que representam
57
+ * as linhas da grade (os dados propriamente ditos).
58
+ */
59
+ setData(data: Array<any>): void;
60
+ /**
61
+ * Quando no modo paginado, aciona o carregamento da próxima página
62
+ */
63
+ nextPage(): void;
64
+ /**
65
+ * Quando no modo paginado, aciona o carregamento da página anterior
66
+ */
67
+ previousPage(): void;
68
+ }
69
+ /**
70
+ * Carrega as informações necessárias para contextualizar corretamente a instância.
71
+ */
72
+ export interface EzGridOptions {
73
+ /**
74
+ * Callback a ser chamado quando algum atributo das colunas é alterado.
75
+ */
76
+ onColumnStateChange: Function;
77
+ /**
78
+ * Callback a ser chamado quando as linhas selecionadas mudam.
79
+ */
80
+ onSelectionChange: Function;
81
+ /**
82
+ * Callback para reagir à paginação
83
+ */
84
+ onPaginationChange: Function;
85
+ /**
86
+ * Usado para permitir múltipla seleção.
87
+ */
88
+ allowMultipleSelection: boolean;
89
+ /**
90
+ * Determina o número de linhas de cada página. Caso informado o valor -1
91
+ * não haverá paginação.
92
+ */
93
+ pageSize: number;
94
+ /**
95
+ * Endereço do servidor para buscar os dados.
96
+ */
97
+ serverURL: string;
98
+ dataUnit: DataUnit;
99
+ }
100
+ /**
101
+ * Representa cada coluna da grade.
102
+ */
103
+ export interface EzGridColumn {
104
+ /**
105
+ * Texto exibido no cabeçalho da coluna.
106
+ */
107
+ label: string;
108
+ /**
109
+ * ID da coluna. Em cada linha do array de dados, esse ID deve coincidir com
110
+ * o nome do atributo que a coluna representa.
111
+ */
112
+ name: string;
113
+ /**
114
+ * [Opcional] Representa a ordenação da coluna. Pode variar entre ASC e DESC
115
+ */
116
+ sort?: string;
117
+ /**
118
+ * [Opcional] Número inteiro positivo que representa a sequência de ordenação.
119
+ * Importante quando há ordenação por mais de uma coluna.
120
+ */
121
+ sortIndex?: number;
122
+ /**
123
+ * [Opcional] Largura da coluna em pixels absolutos.
124
+ */
125
+ width?: number;
126
+ /**
127
+ * [Opcional] Indica que a coluna está fixada.
128
+ */
129
+ pinned?: boolean;
130
+ /**
131
+ * [Opcional] Indica que a coluna não está visível.
132
+ */
133
+ hidden?: boolean;
134
+ }
135
+ /**
136
+ * Interface utilizada para se inserir menus personalizados no cabeçalho das colunas.
137
+ */
138
+ export interface EzGridColumnMenuItemDef {
139
+ /**
140
+ * Texto exibido no item de menu.
141
+ */
142
+ label: string;
143
+ /**
144
+ * Identificador do item de menu. Esse valor será disponibilizado junto com o ID da
145
+ * coluna ao disparar a ação respectiva.
146
+ */
147
+ name: string;
148
+ /**
149
+ * Ação executada quando o usuário aciona o menu.
150
+ */
151
+ action: Function;
152
+ }
153
+ /**
154
+ * Evento de alteração de estado. Sempre que o estado das colunas for alterado, esse evento é disparado.
155
+ */
156
+ export interface EzGridColumStateEvent {
157
+ /**
158
+ * Tipo de alteração de estado ["sort", "columnResize", "columnPinned", "columnMoved", "visibleChange"].
159
+ */
160
+ type: string;
161
+ /**
162
+ * O estado de todas as colunas depois da alteração. Usado para persistir o novo estado.
163
+ */
164
+ state: Array<EzGridColumn>;
165
+ }
166
+ /**
167
+ * Sempre que há alterações na paginação, o grid controller passará esse status através do
168
+ * callback "onPaginationChange" para o host (EzGrid) reagir.
169
+ */
170
+ export interface EzGridPaginationStatus {
171
+ /**
172
+ * Se existe página anterior.
173
+ */
174
+ hasPrevious: boolean;
175
+ /**
176
+ * Se existe próxima página.
177
+ */
178
+ hasNext: boolean;
179
+ /**
180
+ * Número da página atual.
181
+ */
182
+ currentPage: number;
183
+ /**
184
+ * Número da primeira linha da página.
185
+ */
186
+ pageStart: number;
187
+ /**
188
+ * Número da última linha da página.
189
+ */
190
+ pageEnd: number;
191
+ /**
192
+ * Número total de linhas.
193
+ */
194
+ totalRows: number;
195
+ }
@@ -0,0 +1,34 @@
1
+ import EzGridController, { EzGridColumn, EzGridColumnMenuItemDef, EzGridOptions } from "../EzGridController";
2
+ export default class AgGridController implements EzGridController {
3
+ private _grid;
4
+ private _gridOptions;
5
+ private _columnStateChangeCallback;
6
+ private _selectionChangeCallback;
7
+ private _paginationChangeCallback;
8
+ private _enterprise;
9
+ private _menuItems;
10
+ private _multipleSelection;
11
+ private _pageSize;
12
+ private _serverURL;
13
+ private _dataUnit;
14
+ constructor(enterprise: boolean);
15
+ initDatagrid(container: HTMLElement, options: EzGridOptions): void;
16
+ private setOptionsEvents;
17
+ private setOptionsPagination;
18
+ private setOptionsSupress;
19
+ setData(data: Array<any>): void;
20
+ setColumnsDef(cols: Array<EzGridColumn>, showCheckSelection: boolean): void;
21
+ getColumnsDef(): Array<EzGridColumn>;
22
+ setColumnsState(state: Array<EzGridColumn>): void;
23
+ getColumnsState(): Array<EzGridColumn>;
24
+ getSelection(): Array<any>;
25
+ addColumnMenuItem(item: EzGridColumnMenuItemDef): void;
26
+ nextPage(): void;
27
+ previousPage(): void;
28
+ private buildColDef;
29
+ private buildColState;
30
+ private onCallStateChange;
31
+ private onSelectionChange;
32
+ private onPaginationChange;
33
+ private conditionalSet;
34
+ }
@@ -0,0 +1,11 @@
1
+ import { IServerSideDatasource, IServerSideGetRowsParams } from "ag-grid-community";
2
+ import { DataUnit } from "@sankhyalabs/core";
3
+ export default class DataSource implements IServerSideDatasource {
4
+ private _serverURL;
5
+ private _dataUnit;
6
+ private _useMockedServer;
7
+ private _mockedServer;
8
+ constructor(dataUnit: DataUnit, serverURL: string);
9
+ getRows(params: IServerSideGetRowsParams): void;
10
+ private loadData;
11
+ }
@@ -0,0 +1,2 @@
1
+ declare const gridTerms: any;
2
+ export default gridTerms;
@@ -0,0 +1,8 @@
1
+ import { IServerSideGetRowsRequest, LoadSuccessParams } from "ag-grid-community";
2
+ export default class Server {
3
+ private _data;
4
+ constructor(data: Array<any>);
5
+ getData(request: IServerSideGetRowsRequest): LoadSuccessParams;
6
+ private filter;
7
+ private sort;
8
+ }