@sankhyalabs/sankhyablocks 1.1.28 → 1.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/LICENSE +21 -21
- package/README.md +75 -75
- package/package.json +94 -52
- package/react/.keepfolder +1 -0
- package/dist/cjs/ApplicationUtils-05b74ee9.js +0 -39
- package/dist/cjs/AssetsUtils-7e3c38f9.js +0 -24
- package/dist/cjs/CSSVarsUtils-75ca9c64.js +0 -19
- package/dist/cjs/_commonjsHelpers-537d719a.js +0 -20
- package/dist/cjs/ez-action-chip.cjs.entry.js +0 -27
- package/dist/cjs/ez-application.cjs.entry.js +0 -26
- package/dist/cjs/ez-button_4.cjs.entry.js +0 -660
- package/dist/cjs/ez-calendar.cjs.entry.js +0 -223
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +0 -47
- package/dist/cjs/ez-combo-box.cjs.entry.js +0 -278
- package/dist/cjs/ez-date-input.cjs.entry.js +0 -102
- package/dist/cjs/ez-date-time-input.cjs.entry.js +0 -145
- package/dist/cjs/ez-dialog.cjs.entry.js +0 -89
- package/dist/cjs/ez-form.cjs.entry.js +0 -785
- package/dist/cjs/ez-grid.cjs.entry.js +0 -110485
- package/dist/cjs/ez-icon.cjs.entry.js +0 -41
- package/dist/cjs/ez-label-chip.cjs.entry.js +0 -104
- package/dist/cjs/ez-modal_2.cjs.entry.js +0 -316
- package/dist/cjs/ez-number-input.cjs.entry.js +0 -86
- package/dist/cjs/ez-popover.cjs.entry.js +0 -120
- package/dist/cjs/ez-popup.cjs.entry.js +0 -48
- package/dist/cjs/ez-search.cjs.entry.js +0 -64
- package/dist/cjs/ez-tabselector.cjs.entry.js +0 -198
- package/dist/cjs/ez-text-area.cjs.entry.js +0 -114
- package/dist/cjs/ez-text-input.cjs.entry.js +0 -201
- package/dist/cjs/ez-time-input.cjs.entry.js +0 -118
- package/dist/cjs/ez-toast.cjs.entry.js +0 -44
- package/dist/cjs/ez-upload.cjs.entry.js +0 -356
- package/dist/cjs/index-682c98b2.js +0 -1771
- package/dist/cjs/index.cjs.js +0 -2
- package/dist/cjs/loader.cjs.js +0 -21
- package/dist/cjs/sankhyablocks.cjs.js +0 -19
- package/dist/cjs/snk-application.cjs.entry.js +0 -7050
- package/dist/cjs/test-du.cjs.entry.js +0 -76
- package/dist/collection/collection-manifest.json +0 -47
- package/dist/collection/components/snk-application/snk-application.css +0 -5
- package/dist/collection/components/snk-application/snk-application.js +0 -492
- package/dist/collection/index.js +0 -1
- package/dist/collection/lib/http/data-fetcher/DataFetcher.js +0 -158
- package/dist/collection/lib/http/data-fetcher/fetchers/application-config-fetcher.js +0 -23
- package/dist/collection/lib/http/data-fetcher/fetchers/dataunit-fetcher.js +0 -188
- package/dist/collection/lib/http/data-fetcher/fetchers/form-config-fetcher.js +0 -25
- package/dist/collection/lib/http/data-fetcher/fetchers/grid-config-fetcher.js +0 -2
- package/dist/collection/lib/http/data-fetcher/fetchers/parameters-fecher.js +0 -59
- package/dist/collection/lib/http/data-fetcher/fetchers/resource-fetcher.js +0 -30
- package/dist/collection/lib/http/data-fetcher/state/LoadStateManager.js +0 -66
- package/dist/collection/lib/utils/pesquisa.js +0 -16
- package/dist/collection/lib/utils/urlutils.js +0 -23
- package/dist/collection/lib/workspace/workspace.js +0 -7
- package/dist/components/ApplicationUtils.js +0 -37
- package/dist/components/AssetsUtils.js +0 -22
- package/dist/components/CSSVarsUtils.js +0 -17
- package/dist/components/_commonjsHelpers.js +0 -17
- package/dist/components/ez-action-chip.js +0 -44
- package/dist/components/ez-application.js +0 -39
- package/dist/components/ez-button.js +0 -6
- package/dist/components/ez-button2.js +0 -105
- package/dist/components/ez-calendar.js +0 -6
- package/dist/components/ez-calendar2.js +0 -242
- package/dist/components/ez-check.js +0 -6
- package/dist/components/ez-check2.js +0 -94
- package/dist/components/ez-collapsible-box.js +0 -67
- package/dist/components/ez-combo-box.js +0 -6
- package/dist/components/ez-combo-box2.js +0 -311
- package/dist/components/ez-date-input.js +0 -135
- package/dist/components/ez-date-time-input.js +0 -179
- package/dist/components/ez-dialog.js +0 -124
- package/dist/components/ez-form.js +0 -6
- package/dist/components/ez-form2.js +0 -807
- package/dist/components/ez-grid.js +0 -110576
- package/dist/components/ez-icon.js +0 -6
- package/dist/components/ez-icon2.js +0 -56
- package/dist/components/ez-label-chip.js +0 -125
- package/dist/components/ez-list.js +0 -6
- package/dist/components/ez-list2.js +0 -523
- package/dist/components/ez-modal.js +0 -6
- package/dist/components/ez-modal2.js +0 -82
- package/dist/components/ez-number-input.js +0 -115
- package/dist/components/ez-popover.js +0 -145
- package/dist/components/ez-popup.js +0 -67
- package/dist/components/ez-search.js +0 -100
- package/dist/components/ez-tabselector.js +0 -6
- package/dist/components/ez-tabselector2.js +0 -213
- package/dist/components/ez-text-area.js +0 -137
- package/dist/components/ez-text-input.js +0 -6
- package/dist/components/ez-text-input2.js +0 -223
- package/dist/components/ez-time-input.js +0 -153
- package/dist/components/ez-toast.js +0 -64
- package/dist/components/ez-upload.js +0 -382
- package/dist/components/grid-config.js +0 -6
- package/dist/components/grid-config2.js +0 -318
- package/dist/components/index.d.ts +0 -26
- package/dist/components/index.js +0 -1
- package/dist/components/select-box.js +0 -6
- package/dist/components/select-box2.js +0 -47
- package/dist/components/snk-application.d.ts +0 -11
- package/dist/components/snk-application.js +0 -7079
- package/dist/components/test-du.js +0 -101
- package/dist/esm/ApplicationUtils-e0b6d857.js +0 -37
- package/dist/esm/AssetsUtils-6e6624dc.js +0 -22
- package/dist/esm/CSSVarsUtils-0787c3f3.js +0 -17
- package/dist/esm/_commonjsHelpers-9943807e.js +0 -17
- package/dist/esm/ez-action-chip.entry.js +0 -23
- package/dist/esm/ez-application.entry.js +0 -22
- package/dist/esm/ez-button_4.entry.js +0 -653
- package/dist/esm/ez-calendar.entry.js +0 -219
- package/dist/esm/ez-collapsible-box.entry.js +0 -43
- package/dist/esm/ez-combo-box.entry.js +0 -274
- package/dist/esm/ez-date-input.entry.js +0 -98
- package/dist/esm/ez-date-time-input.entry.js +0 -141
- package/dist/esm/ez-dialog.entry.js +0 -85
- package/dist/esm/ez-form.entry.js +0 -781
- package/dist/esm/ez-grid.entry.js +0 -110481
- package/dist/esm/ez-icon.entry.js +0 -37
- package/dist/esm/ez-label-chip.entry.js +0 -100
- package/dist/esm/ez-modal_2.entry.js +0 -311
- package/dist/esm/ez-number-input.entry.js +0 -82
- package/dist/esm/ez-popover.entry.js +0 -116
- package/dist/esm/ez-popup.entry.js +0 -44
- package/dist/esm/ez-search.entry.js +0 -60
- package/dist/esm/ez-tabselector.entry.js +0 -194
- package/dist/esm/ez-text-area.entry.js +0 -110
- package/dist/esm/ez-text-input.entry.js +0 -197
- package/dist/esm/ez-time-input.entry.js +0 -114
- package/dist/esm/ez-toast.entry.js +0 -40
- package/dist/esm/ez-upload.entry.js +0 -352
- package/dist/esm/index-35088a3f.js +0 -1740
- package/dist/esm/index.js +0 -1
- package/dist/esm/loader.js +0 -17
- package/dist/esm/polyfills/core-js.js +0 -11
- package/dist/esm/polyfills/css-shim.js +0 -1
- package/dist/esm/polyfills/dom.js +0 -79
- package/dist/esm/polyfills/es5-html-element.js +0 -1
- package/dist/esm/polyfills/index.js +0 -34
- package/dist/esm/polyfills/system.js +0 -6
- package/dist/esm/sankhyablocks.js +0 -17
- package/dist/esm/snk-application.entry.js +0 -7046
- package/dist/esm/test-du.entry.js +0 -72
- package/dist/index.cjs.js +0 -1
- package/dist/index.js +0 -1
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-action-chip/ez-action-chip.css +0 -67
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-application/ez-application.css +0 -3
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-button/ez-button.css +0 -180
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-calendar/ez-calendar.css +0 -319
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-check/ez-check.css +0 -327
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-collapsible-box/ez-collapsible-box.css +0 -162
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-combo-box/ez-combo-box.css +0 -217
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-date-input/ez-date-input.css +0 -49
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-date-time-input/ez-date-time-input.css +0 -44
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-dialog/ez-dialog.css +0 -527
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-form/ez-form.css +0 -5
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/ez-grid.css +0 -31
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.css +0 -129
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-grid/subcomponents/select-box/select-box.css +0 -10
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-icon/ez-icon.css +0 -176
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-label-chip/ez-label-chip.css +0 -139
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-list/ez-list.css +0 -335
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-modal/ez-modal.css +0 -358
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-number-input/ez-number-input.css +0 -4
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-popover/ez-popover.css +0 -44
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-popup/ez-popup.css +0 -405
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-search/ez-search.css +0 -3
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-tabselector/ez-tabselector.css +0 -138
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-text-area/ez-text-area.css +0 -165
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-text-input/ez-text-input.css +0 -196
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-time-input/ez-time-input.css +0 -10
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-toast/ez-toast.css +0 -127
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/ez-upload/ez-upload.css +0 -568
- package/dist/node_modules/@sankhyalabs/ezui/dist/collection/components/test-du/test-du.css +0 -3
- package/dist/sankhyablocks/index.esm.js +0 -0
- package/dist/sankhyablocks/p-0183d259.entry.js +0 -1
- package/dist/sankhyablocks/p-01f23a70.entry.js +0 -1
- package/dist/sankhyablocks/p-07c32f68.entry.js +0 -1
- package/dist/sankhyablocks/p-0f90499d.entry.js +0 -1
- package/dist/sankhyablocks/p-105724a3.entry.js +0 -1
- package/dist/sankhyablocks/p-112455b1.js +0 -1
- package/dist/sankhyablocks/p-2ac02d48.entry.js +0 -1
- package/dist/sankhyablocks/p-35364a97.entry.js +0 -1
- package/dist/sankhyablocks/p-3f6aa9a7.entry.js +0 -1
- package/dist/sankhyablocks/p-4811bc0a.entry.js +0 -369
- package/dist/sankhyablocks/p-5f9af495.entry.js +0 -1
- package/dist/sankhyablocks/p-60967cf0.js +0 -1
- package/dist/sankhyablocks/p-70ad6c16.entry.js +0 -1
- package/dist/sankhyablocks/p-710bfffe.entry.js +0 -1
- package/dist/sankhyablocks/p-73397a0f.entry.js +0 -57
- package/dist/sankhyablocks/p-811b4b9d.js +0 -1
- package/dist/sankhyablocks/p-813fe4f7.js +0 -1
- package/dist/sankhyablocks/p-85a9446b.js +0 -2
- package/dist/sankhyablocks/p-89a1100f.entry.js +0 -1
- package/dist/sankhyablocks/p-8b543003.entry.js +0 -1
- package/dist/sankhyablocks/p-9750632b.entry.js +0 -1
- package/dist/sankhyablocks/p-a96272f7.entry.js +0 -1
- package/dist/sankhyablocks/p-ac8842e5.entry.js +0 -1
- package/dist/sankhyablocks/p-ba64cc41.entry.js +0 -1
- package/dist/sankhyablocks/p-c1ede043.entry.js +0 -1
- package/dist/sankhyablocks/p-d90ebb85.entry.js +0 -1
- package/dist/sankhyablocks/p-e5355a29.entry.js +0 -1
- package/dist/sankhyablocks/p-ef04b633.entry.js +0 -1
- package/dist/sankhyablocks/p-f6db07fb.entry.js +0 -1
- package/dist/sankhyablocks/p-f80cabc7.entry.js +0 -1
- package/dist/sankhyablocks/p-fcd9bd92.entry.js +0 -1
- package/dist/sankhyablocks/sankhyablocks.esm.js +0 -1
- package/dist/types/components/snk-application/snk-application.d.ts +0 -44
- package/dist/types/components.d.ts +0 -66
- package/dist/types/index.d.ts +0 -1
- package/dist/types/lib/http/data-fetcher/DataFetcher.d.ts +0 -15
- package/dist/types/lib/http/data-fetcher/fetchers/application-config-fetcher.d.ts +0 -6
- package/dist/types/lib/http/data-fetcher/fetchers/dataunit-fetcher.d.ts +0 -12
- package/dist/types/lib/http/data-fetcher/fetchers/form-config-fetcher.d.ts +0 -5
- package/dist/types/lib/http/data-fetcher/fetchers/grid-config-fetcher.d.ts +0 -2
- package/dist/types/lib/http/data-fetcher/fetchers/parameters-fecher.d.ts +0 -13
- package/dist/types/lib/http/data-fetcher/fetchers/resource-fetcher.d.ts +0 -6
- package/dist/types/lib/http/data-fetcher/state/LoadStateManager.d.ts +0 -23
- package/dist/types/lib/utils/pesquisa.d.ts +0 -2
- package/dist/types/lib/utils/urlutils.d.ts +0 -4
- package/dist/types/lib/workspace/workspace.d.ts +0 -4
- package/dist/types/stencil-public-runtime.d.ts +0 -1565
- package/loader/cdn.js +0 -3
- package/loader/index.cjs.js +0 -3
- package/loader/index.d.ts +0 -12
- package/loader/index.es2017.js +0 -3
- package/loader/index.js +0 -4
- package/loader/package.json +0 -10
- package/react/components.d.ts +0 -32
- package/react/components.js +0 -35
- package/react/components.js.map +0 -1
- package/react/react-component-lib/createComponent.d.ts +0 -10
- package/react/react-component-lib/createComponent.js +0 -75
- package/react/react-component-lib/createComponent.js.map +0 -1
- package/react/react-component-lib/createOverlayComponent.d.ts +0 -21
- package/react/react-component-lib/createOverlayComponent.js +0 -109
- package/react/react-component-lib/createOverlayComponent.js.map +0 -1
- package/react/react-component-lib/index.d.ts +0 -2
- package/react/react-component-lib/index.js +0 -3
- package/react/react-component-lib/index.js.map +0 -1
- package/react/react-component-lib/interfaces.d.ts +0 -29
- package/react/react-component-lib/interfaces.js +0 -1
- package/react/react-component-lib/interfaces.js.map +0 -1
- package/react/react-component-lib/utils/attachProps.d.ts +0 -12
- package/react/react-component-lib/utils/attachProps.js +0 -98
- package/react/react-component-lib/utils/attachProps.js.map +0 -1
- package/react/react-component-lib/utils/case.d.ts +0 -2
- package/react/react-component-lib/utils/case.js +0 -7
- package/react/react-component-lib/utils/case.js.map +0 -1
- package/react/react-component-lib/utils/dev.d.ts +0 -2
- package/react/react-component-lib/utils/dev.js +0 -13
- package/react/react-component-lib/utils/dev.js.map +0 -1
- package/react/react-component-lib/utils/index.d.ts +0 -10
- package/react/react-component-lib/utils/index.js +0 -34
- package/react/react-component-lib/utils/index.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as e,h as a,H as i,g as s}from"./p-85a9446b.js";import{DateUtils as n}from"@sankhyalabs/core";import{C as r}from"./p-811b4b9d.js";const o=class{constructor(a){t(this,a),this.ezChange=e(this,"ezChange",7),this.enabled=!0}setLabel(){this._textInput.label=this.label}setErrorMessage(){this._textInput.errorMessage=this.errorMessage}applyValueToInput(){this._textInput&&(this._textInput.value=this.getTextValue(this.value))}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}changeValue(t){var e;t=t instanceof Date?n.clearTime(t):null,this.value=this.value instanceof Date?n.clearTime(this.value):null,this._textInput.errorMessage="",(null==t?void 0:t.toString())!==(null===(e=this.value)||void 0===e?void 0:e.toString())&&(this.value=t,this.ezChange.emit(this.value))}showCalendar(){this.parseDate(),this._calendar.value=this.value,this._calendar.fitVertical(this._textInput.errorMessage?0:-17,this._elem.clientHeight)}hideCalendar(){this.changeValue(this._calendar.value),this._calendar.hide()}parseDate(){const t=this._textInput.value,e=n.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").format(t):null}componentDidLoad(){r.applyVarsTextInput(this._elem,this._textInput)}render(){return a(i,null,a("ez-text-input",{ref:t=>this._textInput=t,onBlur:()=>this.parseDate(),onKeyDown:t=>{"H"!==t.key&&"h"!==t.key||this.changeValue(new Date)},label:this.label,onEzChange:t=>t.stopPropagation(),value:this.getTextValue(this.value),restrict:"0123456789/",enabled:this.enabled,errorMessage:this.errorMessage},a("button",{disabled:!this.enabled,tabindex:-1,class:"btn-open-cal",onClick:()=>this.showCalendar(),slot:"leftIcon"})),a("ez-calendar",{onEzChange:t=>{this.hideCalendar(),t.stopPropagation()},floating:!0,ref:t=>this._calendar=t}))}get _elem(){return s(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>\')}.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_input}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as e,g as a}from"./p-85a9446b.js";const o=class{constructor(s){t(this,s),this.ezChange=i(this,"ezChange",7),this.setFocusedParam=t=>{if("Enter"===t.key){const i=this._processedTabs[this._focusedIndex];this.handleTabClick(i),t.preventDefault(),this.setFocusedTab(i.index)}else if("ArrowLeft"===t.key||"ArrowRight"===t.key){let i;if("ArrowLeft"===t.key)i=!1;else{if("ArrowRight"!==t.key)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)}else if("Tab"===t.key||"Escape"===t.key){const i=this._processedTabs[this.selectedIndex];this._focusedIndex=void 0,this.handleTabClick(i),t.preventDefault(),this.setFocusedTab(this.selectedIndex)}}}handleTabClick(t){this.selectedIndex=t.index,this._focusedIndex=void 0,this.selectedTab=t.tabKey,this.ezChange.emit(t),this.setFocusedBtn(!1,t.index)}componentWillRender(){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("ez-tab").forEach((t=>{const i=t.getAttribute("tabKey"),s={label:t.getAttribute("label"),tabKey:i,index:this._processedTabs.length},e=t.firstChild;e&&(e.setAttribute("slot","tab"+s.index),this._hostElem.appendChild(e)),this._processedTabs.push(s)})))}handleSlotChange(t){const i=t.target.assignedElements()[0];i&&(i.style.marginLeft="6px")}scrollBackward(){const t=this._scrollContainer;t&&(t.scrollLeft-=t.clientWidth)}scrollFoward(){const t=this._scrollContainer;if(t){let i=null;t.querySelectorAll(".tab").forEach((s=>{s.getBoundingClientRect().right<t.clientWidth&&(i=s)})),t.scrollLeft=i.offsetLeft+i.offsetWidth}}componentDidRender(){this.updateScroll()}updateScroll(){const t=this._scrollContainer;if(t){const{scrollWidth:i,clientWidth:s,scrollLeft:e}=t,a=i-s-Math.ceil(e);this._startHidden=t.scrollLeft>0,this._endHidden=a>0,this._startHidden?this._backwardButton.classList.remove("hidden"):this._backwardButton.classList.add("hidden"),this._endHidden?this._forwardButton.classList.remove("hidden"):this._forwardButton.classList.add("hidden");const o=["","startHidden","endHidden","midle"],r=o[Number(this._startHidden)|Number(this._endHidden)<<1];o.forEach((i=>{i!==r&&t.classList.contains(i)&&t.classList.remove(i)})),r&&!t.classList.contains(r)&&t.classList.add(r)}}domScrollHandler(){window.clearTimeout(this._scrollCallBack),this._scrollCallBack=window.setTimeout((()=>{this.updateScroll()}),200)}setFocusedTab(t){window.clearTimeout(this._scrollCallBackTest),this._scrollCallBackTest=window.setTimeout((()=>{this._scrollContainer.querySelector(`#tab${t}`).scrollIntoView()}),200)}getTextWidth(t){void 0===this._textMesurement&&(this._textMesurement=this._hostElem.shadowRoot.ownerDocument.createElement("canvas"));const i=this._textMesurement.getContext("2d");return i.font="14px Sora, Algerian",Math.min(220,24+i.measureText(t).width)+"px"}setFocusedBtn(t,i){this._scrollContainer.querySelectorAll(".tab").forEach((s=>{s.classList.remove("is-focused"),s.id==="tab"+i&&t&&s.classList.add("is-focused")}))}render(){return s(e,null,s("button",{class:"backward-button",ref:t=>this._backwardButton=t,onClick:()=>this.scrollBackward()}),s("div",{class:"scroll",ref:t=>this._scrollContainer=t,onScroll:()=>this.domScrollHandler(),onKeyDown:t=>this.setFocusedParam(t)},this._processedTabs.map(((t,i)=>{const e={"min-width":this.getTextWidth(t.label)},a="tab"+i,o=i===this.selectedIndex||this.selectedTab&&t.tabKey===this.selectedTab;return o&&(this.selectedTab=t.tabKey,this.selectedIndex=i),s("button",{id:a,class:"tab"+(o?" is-active":""),onClick:()=>this.handleTabClick(t),style:e},s("span",{class:"tab-label",title:t.label},t.label),s("slot",{name:a,onSlotchange:t=>{this.handleSlotChange(t)}}))}))),s("button",{class:"forward-button",ref:t=>this._forwardButton=t,onClick:()=>this.scrollFoward()}))}get _hostElem(){return a(this)}};o.style='@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}:host{display:flex;position:relative;width:100%;overflow:hidden;--tabselector--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>\');--tabselector--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>\')}.scroll{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.scroll.startHidden{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px)}.scroll.midle{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 20px))}.scroll.endHidden{-webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 20px))}.tab{display:flex;border:none;min-width:100px;background-color:unset;cursor:pointer;padding:6px 12px;align-items:center;justify-content:center;color:var(--text--primary, #626e82);font-family:var(--font-pattern, "Sora, Algerian");font-size:var(--title--small, 14px)}.tab:focus,.forward-button,.backward-button{outline:none}.is-active{position:relative;color:var(--color--primary, #008561)}.is-active::after{content:"";position:absolute;width:100%;height:100%;background-color:var(--color--primary, #008561);clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out}.is-focused{border:1px dashed var(--color--primary, #000000c5)}.tab-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--text-shadow);margin-bottom:var(--space--extra-small, 3px)}.forward-button,.backward-button{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}.backward-button{left:0px}.forward-button::after,.backward-button::after{content:\'\';display:flex;background-color:var(--text--primary, #008561);width:10px;height:16px}.forward-button::after{-webkit-mask-image:var(--tabselector--forward-icon);mask-image:var(--tabselector--forward-icon)}.backward-button::after{-webkit-mask-image:var(--tabselector--backward-icon);mask-image:var(--tabselector--backward-icon)}.forward-button:hover::after,.backward-button:hover::after{background-color:var(--color--primary, #4e4e4e)}.hidden{display:none}.scroll::-webkit-scrollbar{display:none}';export{o as ez_tabselector}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,c as s,h as e,g as i}from"./p-85a9446b.js";import{NumberUtils as r}from"@sankhyalabs/core";import{C as h}from"./p-811b4b9d.js";const a=class{constructor(e){t(this,e),this.ezChange=s(this,"ezChange",7),this.enabled=!0}setLabel(){this._textInput.label=this.label}setErrorMessage(){this._textInput.errorMessage=this.errorMessage}applyValueToInput(){this._textInput&&(this._textInput.value=this.getTextValue(this.value))}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}changeValue(t){this.errorMessage="",t&&t!==this.value&&(this.value=t,this.ezChange.emit(this.value))}parseNumber(){const t=this._textInput.value?r.stringToNumber(this._textInput.value):null;if(null!=t&&isNaN(t))this.errorMessage="O valor digitado não é um número válido";else try{this.changeValue(t)}catch(t){return void(this.errorMessage=t.message)}}getTextValue(t){return t?this.precision>0?r.format(t.toString(),Number(this.precision),Number(this.prettyPrecision)):t.toString():null}componentDidLoad(){h.applyVarsTextInput(this._elem,this._textInput)}render(){return e("ez-text-input",{ref:t=>this._textInput=t,onBlur:()=>this.parseNumber(),label:this.label,onEzChange:t=>t.stopPropagation(),value:this.getTextValue(this.value),restrict:this.precision>0?"0123456789-,.":"0123456789-",enabled:this.enabled,errorMessage:this.errorMessage})}get _elem(){return i(this)}static get watchers(){return{label:["setLabel"],errorMessage:["setErrorMessage"],value:["applyValueToInput"]}}};a.style=":host{display:block;width:100%}";export{a as ez_number_input}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as l,c as e,h as i,H as t}from"./p-85a9446b.js";const o=class{constructor(i){l(this,i),this.ezChange=e(this,"ezChange",7),this.value=!1,this.headerSize="small",this.iconPlacement="left"}observeValue(){this.ezChange.emit(this.value)}async showHide(){this.value=!this.value}render(){return i(t,null,"right"==this.iconPlacement?i("div",{class:"collapsible-box__title"},i("label",{class:("right"==this.iconPlacement?"collapsible-box__label--icon-right ":"collapsible-box__label ")+(this.headerSize?"font--"+this.headerSize:""),onClick:()=>this.showHide(),title:this.label},this.label),i("button",{class:this.value?"collapsible-box__btn collapsible-box__btn--collapsed collapsible-box__btn--"+this.headerSize:"collapsible-box__btn collapsible-box__btn--"+this.headerSize,onClick:()=>this.showHide()})):i("div",{class:"collapsible-box__title"},i("button",{class:this.value?"collapsible-box__btn collapsible-box__btn--collapsed collapsible-box__btn--"+this.headerSize:"collapsible-box__btn collapsible-box__btn--"+this.headerSize,onClick:()=>this.showHide()}),i("label",{class:("right"==this.iconPlacement?"collapsible-box__label--icon-right ":"collapsible-box__label ")+(this.headerSize?"font--"+this.headerSize:""),onClick:()=>this.showHide(),title:this.label},this.label)),this.value?null:i("slot",null))}static get watchers(){return{value:["observeValue"]}}};o.style=':host{--ez-collapsible-box--height:42px;--ez-collapsible-box--font-size:var(--title--medium, 14px);--ez-collapsible-box--font-family:var(--font-pattern, Arial);--ez-collapsible-box--font-weight:var(--text-weight--large, 600);--ez-collapsible-box--color:var(--title--primary);--ez-collapsible-box__btn--image--xsmall:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="12px" width="7.5px"><path d="M 0,10.56 4.5967752,6.0000006 0,1.3800006 1.4516132,0 7.5,6.0000006 1.4516132,12 Z"/></svg>\');--ez-collapsible-box__btn--image--small:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="14px" width="8.68px"><path d="M 0,12.32 5.3200012,7.0000007 0,1.6100007 1.6800004,0 8.68,7.0000007 1.6800004,14 Z"/></svg>\');--ez-collapsible-box__btn--image--medium: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-collapsible-box__btn--image--large:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="18px" width="11.25px"><path d="M 0,15.84 6.8951628,9.0000009 0,2.0700009 2.1774198,0 11.25,9.0000009 2.1774198,18 Z"/></svg>\');--ez-collapsible-box__btn--image--xlarge:url(\'data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" version="1.1" height="20px" width="12.5px"><path d="M 0,17.6 7.661292,10.000001 0,2.300001 2.4193553,0 12.5,10.000001 2.4193553,20 Z"/></svg>\');--ez-collapsible-box__btn--fill:var(--ez-collapsible-box--color);--ez-collapsible-box__btn--width:10px;--ez-collapsible-box__btn--height:16px;display:flex;flex-wrap:wrap;width:100%}.collapsible-box__title{width:100%;align-self:center;display:flex;box-sizing:border-box}.collapsible-box__label{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;width:100%;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight);color:var(--ez-collapsible-box--color)}.collapsible-box__label--icon-right{white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight);color:var(--ez-collapsible-box--color)}.collapsible-box__btn{outline:none;border:none;background-color:unset;cursor:pointer;padding:1px 6px}.collapsible-box__btn::after{content:\'\';display:flex;background-color:var(--ez-collapsible-box__btn--fill);width:var(--ez-collapsible-box__btn--width);height:var(--ez-collapsible-box__btn--height);transition:transform var(--transition);transform:rotate(90deg)}.collapsible-box__btn--xsmall::after{width:7.5px;height:12px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--xsmall);mask-image:var(--ez-collapsible-box__btn--image--xsmall)}.collapsible-box__btn--small::after{width:8.68px;height:14px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--small);mask-image:var(--ez-collapsible-box__btn--image--small)}.collapsible-box__btn--medium::after{width:10px;height:16px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--medium);mask-image:var(--ez-collapsible-box__btn--image--medium)}.collapsible-box__btn--large::after{width:11.25px;height:18px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--large);mask-image:var(--ez-collapsible-box__btn--image--large)}.collapsible-box__btn--xlarge::after{width:12.5px;height:20px;-webkit-mask-image:var(--ez-collapsible-box__btn--image--xlarge);mask-image:var(--ez-collapsible-box__btn--image--xlarge)}.collapsible-box__btn--collapsed::after{transform:rotate(0deg)}.font--xsmall{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--xlarge{font-size:20px}';export{o as ez_collapsible_box}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as t,h as e}from"./p-85a9446b.js";const o=class{constructor(e){t(this,e),this.fadeTime=5e3,this.useIcon=!1,this.canClose=!0}async show(){this.container.classList.add("toast__container--oppened"),this.container.style.animation=`fadein 0.5s, fadeout 0.5s ${this.fadeTime/1e3}s`,setTimeout((()=>{this.container.classList.remove("toast__container--oppened"),this.container.style.animation="none"}),this.fadeTime+400)}render(){return e("div",{ref:t=>this.container=t,class:"toast__container"},this.useIcon&&e("slot",{name:"icon"}),e("div",{class:this.useIcon?"message__container message__conteiner--icon":"message__container",title:this.message,innerHTML:this.message}),this.canClose&&e("button",{class:"btn-close",onClick:()=>{this.container.classList.remove("toast__container--oppened"),this.container.style.animation="none"}}))}};o.style=':host{--ez-toast__btn__close__image:url(\'data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg%22%3E<path d="M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z"/></svg>\');--ez-toast__container-z-index:var(--more-visible, 2);--ez-toast__container--background-color:var(--color--secondary, #383c45);--ez-toast__icon--padding-left:var(--space--small, 6px)}.toast__container{position:fixed;display:flex;bottom:100px;z-index:var(--ez-toast__container-z-index);left:100px;width:280px;box-sizing:border-box;background-color:var(--ez-toast__container--background-color);border-radius:6px;align-items:center;padding:12px;visibility:hidden}.message__container{font-family:"Sora", "Algerian";text-shadow:0 0 0 #353535, 0 0 1px transparent;color:#FFFFFF;font-size:14px;width:90%;overflow:hidden;word-break:break-all;height:auto;-webkit-box-orient:vertical;-webkit-line-clamp:4;display:-webkit-box;text-overflow:ellipsis}.message__conteiner--icon{padding-left:var(--ez-toast__icon--padding-left);width:80%}.btn-close{margin-top:3px;display:flex;justify-content:flex-end;align-self:flex-start;padding:0;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:\'\';display:flex;background-color:#FFFFFF;width:12px;height:12px;-webkit-mask-image:var(--ez-toast__btn__close__image);mask-image:var(--ez-toast__btn__close__image)}.toast__container--oppened{animation:fadein 0.5s, fadeout 0.5s 3s;visibility:visible}@-webkit-keyframes fadein{from{left:-100px;opacity:0}to{left:100px;opacity:1}}@keyframes fadein{from{left:-100px;opacity:0}to{left:100px;opacity:1}}@-webkit-keyframes fadeout{from{left:100px;opacity:1}to{bottom:0;opacity:0}}@keyframes fadeout{from{left:100px;opacity:1}to{bottom:0;opacity:0}}';export{o as ez_toast}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as e,r as t,f as n,H as r,g as i}from"./p-85a9446b.js";import{UserInterface as o,ApplicationContext as a,Action as l,DataUnitAction as s,DataUnit as c}from"@sankhyalabs/core";import{A as d}from"./p-813fe4f7.js";const u=({name:t,label:n})=>e("div",{class:"col col--sd-12 col--tb-3 padding-horizontal--small"},e("ez-text-input",{label:n,"data-field-name":t,key:t}));function h(t,n,r,i=!1){return e("div",{class:"col col--sd-12 col--tb-3 align--middle padding-horizontal--small padding-bottom--large"},e("ez-check",{enabled:!r,label:n,mode:i?"switch":"regular","data-field-name":t,key:t}))}function f(t,n,r,i,o){return e("div",{class:"col col--sd-12 col--tb-3 padding-horizontal--small"},e("ez-number-input",{enabled:!r,label:n,precision:i,prettyPrecision:o,"data-field-name":t,key:t}))}const b=new Map;b.set(o.LONGTEXT,(({name:t,label:n,readOnly:r})=>e("div",{class:"col col--sd-12 padding-horizontal--small",key:t},e("ez-text-area",{enabled:!r,label:n,"data-field-name":t})))),b.set(o.CHECKBOX,(e=>h(e.name,e.label,e.readOnly,!1))),b.set(o.SWITCH,(e=>h(e.name,e.label,e.readOnly,!0))),b.set(o.OPTIONSELECTOR,(({name:t,label:n,readOnly:r},i)=>{const o=null==i?void 0:i.options;let a;if("string"==typeof o){const e=JSON.parse(o);a=Object.keys(e).map((t=>({value:t,label:e[t]})))}else a=o;return e("div",{class:"col col--sd-12 col--tb-3 padding-horizontal--small"},e("ez-combo-box",{enabled:!r,label:n,"data-field-name":t,key:t,options:a}))})),b.set(o.SEARCH,(({name:t,label:n,readOnly:r})=>e("div",{class:"col col--sd-12 col--tb-3 padding-horizontal--small"},e("ez-search",{enabled:!r,label:n,"data-field-name":t,key:t})))),b.set(o.FILE,(({name:t,label:n,readOnly:r})=>e("div",{class:"col col--sd-12 padding-horizontal--small"},e("ez-upload",{enabled:!r,label:n,urlUpload:"",requestHeaders:"",maxFiles:10,"data-field-name":t,key:t})))),b.set(o.DATE,(({name:t,label:n,readOnly:r})=>e("div",{class:"col col--sd-12 col--tb-3 padding-horizontal--small"},e("ez-date-input",{enabled:!r,label:n,"data-field-name":t,key:t})))),b.set(o.TIME,(({name:t,label:n})=>e("div",{class:"col col--sd-12 col--tb-3 padding-horizontal--small"},e("ez-time-input",{label:n,"data-field-name":t,key:t})))),b.set(o.DATETIME,(({name:t,label:n})=>e("div",{class:"col col--sd-12 col--tb-3 padding-horizontal--small"},e("ez-date-time-input",{label:n,"data-field-name":t,key:t})))),b.set(o.DECIMALNUMBER,(({name:e,label:t,readOnly:n},r)=>{const i=Number((null==r?void 0:r.precision)||2);return f(e,t,n,i,Number((null==r?void 0:r.prettyPrecision)||i))})),b.set(o.INTEGERNUMBER,(({name:e,label:t,readOnly:n})=>f(e,t,n,0,0)));const m=e=>{const t=e.descriptor,n=Object.assign({},e.config);let r,i;return t&&(n.label||(n.label=t.label),n.name||(n.name=t.name),void 0===n.required&&(n.required=t.required),void 0===n.readOnly&&(n.readOnly=t.readOnly),i=t.properties,r=b.get(t.userInterface)),n.required&&(n.label=`* ${n.label} (obrigatório)`),r||(r=u),r(n,i)},p=({source:t})=>"items"in t?e("ez-collapsible-box",{label:t.label},t.items.map((e=>m(e)))):m(t),v=({store:t,source:n})=>e("div",{class:"box__container"},e("div",{class:"row padding-vertical--small"},n.items.map((n=>e(p,{store:t,source:n})))));class y{constructor(){this._sheets=new Map,this._requiredFields=[],this._cleanOnCopyFields=[]}getSheet(e){return this._sheets.get(e)}getAllSheets(){return this._sheets}addSheet(e){this._sheets.set(e.name,e),this._requiredFields=this._requiredFields.concat(e.requiredFields),this._cleanOnCopyFields=this._cleanOnCopyFields.concat(e.cleanOnCopyFields)}getRequiredFields(){return this._requiredFields}getCleanOnCopyFields(){return this._cleanOnCopyFields}}function w(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 g="function"==typeof Symbol&&Symbol.observable||"@@observable",O=function(){return Math.random().toString(36).substring(7).split("").join(".")},E={INIT:"@@redux/INIT"+O(),REPLACE:"@@redux/REPLACE"+O(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+O()}};function z(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 A(e,t,n){var r;if("function"==typeof t&&"function"==typeof n||"function"==typeof n&&"function"==typeof arguments[3])throw new Error(w(0));if("function"==typeof t&&void 0===n&&(n=t,t=void 0),void 0!==n){if("function"!=typeof n)throw new Error(w(1));return n(A)(e,t)}if("function"!=typeof e)throw new Error(w(2));var i=e,o=t,a=[],l=a,s=!1;function c(){l===a&&(l=a.slice())}function d(){if(s)throw new Error(w(3));return o}function u(e){if("function"!=typeof e)throw new Error(w(4));if(s)throw new Error(w(5));var t=!0;return c(),l.push(e),function(){if(t){if(s)throw new Error(w(6));t=!1,c();var n=l.indexOf(e);l.splice(n,1),a=null}}}function h(e){if(!z(e))throw new Error(w(7));if(void 0===e.type)throw new Error(w(8));if(s)throw new Error(w(9));try{s=!0,o=i(o,e)}finally{s=!1}for(var t=a=l,n=0;n<t.length;n++)(0,t[n])();return e}function f(e){if("function"!=typeof e)throw new Error(w(10));i=e,h({type:E.REPLACE})}function b(){var e,t=u;return(e={subscribe:function(e){if("object"!=typeof e||null===e)throw new Error(w(11));function n(){e.next&&e.next(d())}return n(),{unsubscribe:t(n)}}})[g]=function(){return this},e}return h({type:E.INIT}),(r={dispatch:h,subscribe:u,getState:d,replaceReducer:f})[g]=b,r}const _={};function C(e=_,t){switch(t.type){case N.METADATA_LOADED:return Object.assign(Object.assign({},e),{formMetadata:t.payload});case N.CHANGE_TAB:return Object.assign(Object.assign({},e),{currentSheet:t.payload});default:return e}}function j(e){return e.formMetadata}var N;!function(e){e.METADATA_LOADED="FORM/METADATA_LOADED",e.CHANGE_TAB="FORM/CHANGE_TAB"}(N||(N={}));class x{constructor(e){this._fields=new Map,this._dataUnit=e,this._dataUnit.subscribe((()=>{var e;null===(e=this._fields)||void 0===e||e.forEach((e=>{this.updateValue(e.fieldName,e.field)}))}))}bind(e){e.forEach((e=>{const t=e.dataset.fieldName;this.updateBind(t,e),this.updateValue(t,e)}))}updateValue(e,t){t.value=this._dataUnit.getFieldValue(e)}updateBind(e,t){const n=this._fields.get(e);n&&n.destroy(),this._fields.set(e,R.create(e,t,((e,t)=>this.setFieldValue(e,t)))),this.bindSearchOptionsLoader(e,t)}setFieldValue(e,t){0===this._dataUnit.records.length&&this._dataUnit.addRecord(),this._dataUnit.setFieldValue(e,t)}bindSearchOptionsLoader(e,t){if("EZ-SEARCH"===t.nodeName&&void 0===t.optionLoader){const n=a.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");n&&(t.optionLoader=t=>n(t,e,this._dataUnit))}}}class R{destroy(){this.field.removeEventListener(this.eventName,this.eventListener)}static create(e,t,n){const r=new R;return r.fieldName=e,r.field=t,r.eventListener=t=>{n(e,t.detail)},r.eventName="ezChange",r.field.addEventListener(r.eventName,r.eventListener),r}}const k=class{constructor(e){t(this,e)}submit(){return Promise.resolve()}cancel(){return Promise.resolve()}validate(){return new Promise(((e,t)=>{const n=j(this._store.getState()),r=this._staticFields.filter((e=>e.dataset.required)).map((e=>e.dataset.fieldName)).concat(n.getRequiredFields()),i=this.dataUnit.records;for(let e=0;e<i.length;e++)if(!this.validateRequired(r,i[e])){t();break}e()}))}configChanged(){this.processMetadata()}validateRequired(e,t){const n=[];e.forEach((e=>{const r=t[e],i=this._element.querySelector(`[data-field-name=${e}]`);null==r||""===r?(n.push(e),i.errorMessage="Essa informação é obrigatória"):i.errorMessage=""}));const r=0===n.length;return r||d.info("Há pelo menos um campo obrigatório não preenchido."),r}getDynamicContent(){var t;const n=j(this._store.getState());if(!n)return null;const r=(i=null===(t=this._store)||void 0===t?void 0:t.getState()).currentSheet?i.formMetadata.getSheet(i.currentSheet):Array.from(i.formMetadata.getAllSheets().values())[0];var i;if(!r)return null;const o=Array.from(n.getAllSheets().values()),a=[];return o.length>1&&a.push(e("ez-tabselector",{onEzChange:e=>this._store.dispatch(function(e){return{type:N.CHANGE_TAB,payload:e.tabKey}}(e.detail)),selectedTab:r.name},o.map((t=>e("ez-tab",{tabKey:t.name,label:t.label}))))),a.push(e(v,{store:this._store,source:r})),a}processMetadata(){if(!this.isStatic()){const e=this.config&&this.config.length>0?((e,t)=>{const n=new Map,r=[],i=[];e.forEach((e=>{var o;if(!1!==e.visible){const a=function(e,t){return("string"==typeof e?Array.from(t.keys()).find((t=>t.label===e)):e)||{label:e,visible:!0}}(e.tab||"Geral",n),l=t.getField(e.name);if(l&&a.visible){n.has(a)||n.set(a,new Map);const t=n.get(a);(void 0===e.required?l.required:e.required)&&r.push(e.name),(void 0===e.cleanOnCopy?null===(o=l.properties)||void 0===o?void 0:o.cleanOnCopy:e.cleanOnCopy)&&i.push(e.name);const s={config:e,descriptor:l},c=e.group;if(c){const e=`group::${c}`;t.has(e)?t.get(e).items.push(s):t.set(e,{label:c,items:[s]})}else t.set(e.name,s)}}}));const o=new y;return Array.from(n.entries()).sort(((e,t)=>(e[0].order||1e4)-(t[0].order||1e4))).forEach((([e,t])=>{o.addSheet({label:e.label,name:e.label,items:Array.from(t.values()),requiredFields:r,cleanOnCopyFields:i})})),o})(this.config,this.dataUnit):(()=>{var e;const t=this.dataUnit.metadata,n=new y;if(t){const r=null===(e=t.fields)||void 0===e?void 0:e.filter((e=>!1!==e.visible));n.addSheet({label:t.label,name:t.name,items:r.map((e=>({descriptor:e}))),requiredFields:r.filter((e=>e.required)).map((e=>e.name)),cleanOnCopyFields:r.filter((e=>{var t;return null===(t=e.properties)||void 0===t?void 0:t.cleanOnCopy})).map((e=>e.name))})}return n})();this._store.dispatch({type:N.METADATA_LOADED,payload:e})}}isStatic(){var e;return(null===(e=this._staticFields)||void 0===e?void 0:e.length)>0}interceptAction(e){if(e.type===l.RECORDS_COPIED){const t=j(this._store.getState()).getCleanOnCopyFields();if(t)return new s(l.RECORDS_COPIED,e.payload.map((e=>{const n=Object.assign({},e);return t.forEach((e=>delete n[e])),n})))}return e}componentWillLoad(){void 0===this.dataUnit&&(this.dataUnit=new c("ez-form")),this.dataUnit.addInterceptor(this),this.dataUnit.subscribe((e=>{e.type===l.METADATA_LOADED&&this.processMetadata()})),this._dataBinder=new x(this.dataUnit),this._store=A(C),this._store.subscribe((()=>n(this))),this._staticFields=Array.from(this._element.querySelectorAll("[data-field-name]")),this.processMetadata()}componentDidRender(){this._dataBinder.bind(Array.from(this._element.querySelectorAll("[data-field-name]")))}render(){return e(r,null,this.isStatic()?null:this.getDynamicContent())}get _element(){return i(this)}static get watchers(){return{config:["configChanged"]}}};k.style="ez-form{display:flex;flex-direction:column;width:100%}";export{k as ez_form}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{r as i,c as t,f as o,h as a}from"./p-85a9446b.js";class l{constructor(i,t,o,a,l,d){this.title=i,this.message=t,this.critical=o,this.confirm=a,this.icon=l,this.callBack=d}}const d=class{constructor(o){i(this,o),this.ezCancel=t(this,"ezCancel",7),this.ezAccept=t(this,"ezAccept",7),this.confirm=!1,this.critical=!1,this.opened=!1,this._messageQueue=[]}async handleButtonClick(i){this.opened=this._messageQueue.length>0,this._currentMessage.callBack?this._currentMessage.callBack(i):i?this.ezAccept.emit(i):this.ezCancel.emit(i),this._currentMessage=this._messageQueue.shift(),o(this)}async show(i,t,o,a,d){return this.opened=!0,new Promise((e=>{this._messageQueue.push(new l(i,t,o,a,d,e))}))}componentWillRender(){this._currentMessage||(this._messageQueue.length>0?this._currentMessage=this._messageQueue.pop():this.opened&&(this._currentMessage=new l(this.ezTitle,this.message,this.critical,this.confirm,this.personalizedIconPath,null)))}render(){return this.opened&&this._currentMessage?a("div",{class:"overlay"},a("div",{class:"dialog"},a("div",{class:!0===this._currentMessage.critical?"dialog__critical--indicator":"dialog__warning--indicator"}),a("div",{class:"dialog__container"},a("div",{class:"title__container"},a("div",{class:"title__box"},this._currentMessage.icon?a("ez-icon",{class:this._currentMessage.critical?"changeable__icon critical":"changeable__icon",size:"small",iconName:this._currentMessage.icon}):a("div",{class:this._currentMessage.critical?"title-icon title-icon--critical":"title-icon"}),a("div",{class:"title title--label",innerHTML:this._currentMessage.title})),a("button",{class:"btn-close",onClick:()=>this.handleButtonClick(!1)})),a("div",{class:"message",innerHTML:this._currentMessage.message}),this._currentMessage.confirm?a("div",{class:"button-yes-no__container"},a("ez-button",{class:"button__no",mode:"link",label:"Não",onClick:()=>this.handleButtonClick(!1)}),a("ez-button",{label:"Ok",onClick:()=>this.handleButtonClick(!0)})):void 0,this._currentMessage.confirm?void 0:a("div",{class:"button__ok--container"},a("ez-button",{label:"Ok",onClick:()=>this.handleButtonClick(!0)}))))):null}};d.style=':host{--dialog__container-padding:var(--space--large, 24px);--dialog__btn__close--background-color:var(--title--primary, #2b3a54);--dialog__btn__no--padding-right:var(--space--large, 24px);--dialog__btn__close__image:url(\'data:image/svg+xml;utf8,<svg width="12" height="12" viewBox="0 0 12 12" xmlns="http://www.w3.org/2000/svg%22%3E<path d="M 7.0060773,5.995511 11.461972,1.5397722 c 0.132856,-0.1328413 0.207547,-0.3130253 0.207547,-0.5009046 0,-0.18786999 -0.07469,-0.3680541 -0.207547,-0.5009048 -0.132857,-0.13284126 -0.31302,-0.20748126 -0.500927,-0.20748126 -0.187812,0 -0.36807,0.07464 -0.500926,0.20748126 L 6.0042244,4.9937015 1.5482921,0.5379628 C 1.4154357,0.40512154 1.2352533,0.33048154 1.0473657,0.33048154 c -0.18787813,0 -0.36807,0.07464 -0.50092647,0.20748126 -0.13285646,0.1328507 -0.20749026,0.31303481 -0.20749026,0.5009048 0,0.1878793 0.0746338,0.3680633 0.20749026,0.5009046 L 5.0023715,5.995511 0.54643923,10.452213 c -0.0676086,0.06534 -0.12151598,0.14352 -0.15859681,0.229916 -0.0370714,0.08639 -0.0565645,0.1794 -0.0573369,0.27335 -7.724e-4,0.09404 0.0171873,0.187331 0.0528423,0.274293 0.0356455,0.08705 0.0882688,0.166087 0.15479148,0.23256 0.0665321,0.06648 0.14562277,0.11897 0.2326735,0.154567 0.0870507,0.0356 0.18031463,0.05344 0.2743433,0.05259 0.094029,-8.5e-4 0.1869528,-0.02049 0.2733331,-0.0576 0.08639,-0.0372 0.1645078,-0.09121 0.2298029,-0.158817 L 6.0042244,6.9973204 10.460119,11.453078 c 0.132856,0.132851 0.313114,0.207444 0.500926,0.207444 0.187907,0 0.36807,-0.07459 0.500927,-0.207444 0.132856,-0.13285 0.207547,-0.313006 0.207547,-0.500904 0,-0.187898 -0.07469,-0.368054 -0.207547,-0.500905 z"/></svg>\');--dialog__title--font-pattern:var(--font-pattern, "\'Sora\', \'Algerian\'");--dialog__title--padding-left:var(--space--small, 6px);--dialog__title__container--padding-bottom:var(--space--medium, 12px);--dialog__title--weight--large:var(--text-weight--large, 600);--dialog__body--font-pattern:var(--font-pattern, "\'Sora\', \'Algerian\'");--dialog__body--text-shadow:var(--text-shadow, "0 0 0 #353535, 0 0 1px transparent");--dialog__body--text-weight--medium:var(--text-weight--medium, 400);--dialog__body--padding-bottom:var(--space--large, 24px);--dialog__body--font-size:var(--text--medium, 14px);--dialog__body--color:var(--text--primary, #626e82);--dialog__icon--color:var(--text--inverted, #fff);--dialog__critical--background-color:var(--color--alert-error-800, #BD0025);--dialog__warning--background-color:var(--color--alert-warning-500, #EFB103);--dialog-z-index:var(--most-visible, 3);--dialog--warning__image:url(\'data: image/svg+xml;utf8,<svg width="15" height="15" viewBox="0 0 15 15" xmlns="http://www.w3.org/2000/svg"><path d="M 7.5,0 0,13 h 15 z m 0,2.73684 5.1341,8.89476 H 2.36591 Z M 6.81818,5.47368 V 8.21053 H 8.18182 V 5.47368 Z m 0,4.10527 V 10.9474 H 8.18182 V 9.57895"/></svg>\');--dialog--critical__image:url(\'data: image/svg+xml;utf8,<svg width="13" height="13" viewBox="0 0 13 13" xmlns="http://www.w3.org/2000/svg"><path d="M 7.6534493,6.4948538 12.762051,1.3864299 C 12.914368,1.2341297 13,1.027552 13,0.81215179 13,0.59676225 12.914369,0.39018443 12.762051,0.23787352 12.609733,0.08557341 12.40318,0 12.187747,0 11.972425,0 11.765762,0.08557341 11.613445,0.23787352 L 6.5048431,5.3462975 1.3961977,0.23787352 C 1.2438802,0.08557341 1.0373043,0 0.82189458,0 0.60649572,0 0.39990901,0.08557341 0.24759147,0.23787352 0.09527396,0.39018443 0.00970766,0.59676225 0.00970766,0.81215179 c 0,0.21540021 0.0855663,0.42197791 0.23788381,0.57427811 L 5.3562369,6.4948538 0.24759147,11.604381 c -0.0775121,0.07492 -0.13931586,0.164543 -0.18182835,0.263595 -0.04250169,0.09905 -0.064850182,0.205678 -0.0657357237,0.313391 -8.8554258e-4,0.107813 0.0197049337,0.214771 0.0605827337,0.314472 0.04086693,0.0998 0.10119858,0.190415 0.17746563,0.266625 0.0762779,0.07622 0.16695386,0.136398 0.26675594,0.177208 0.099802,0.04082 0.20672745,0.06127 0.31452961,0.06029 0.1078025,-9.53e-4 0.21433799,-0.0235 0.31337139,-0.06604 0.099045,-0.04265 0.1886052,-0.104571 0.263465,-0.182081 L 6.5048431,7.6434102 11.613445,12.751855 c 0.152317,0.152312 0.35898,0.237831 0.574302,0.237831 0.215433,0 0.421986,-0.08552 0.574304,-0.237831 C 12.914368,12.599545 13,12.393 13,12.177578 13,11.962157 12.91437,11.75561 12.762051,11.603299 Z"/></svg>\')}h2{margin-block-start:0;margin-block-end:0;margin-inline-start:0px;margin-inline-end:0px}.overlay{position:fixed;display:flex;top:0px;z-index:var(--dialog-z-index);left:0px;width:100%;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.dialog{display:flex;width:80%;position:absolute;top:50%;left:50%;margin-right:-50%;box-sizing:border-box;transform:translate(-50%, -50%);box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122)}@media screen and (min-width: 768px){.dialog{width:50%}}@media screen and (min-width: 992px){.dialog{width:33.33333%}}.dialog__container{width:100%;background:#FFFF;border-radius:0px 6px 6px 0px;box-sizing:border-box;padding:var(--dialog__container-padding)}.dialog__critical--indicator{box-sizing:border-box;width:12px;border-radius:6px 0px 0px 6px;background-color:var(--dialog__critical--background-color)}.dialog__warning--indicator{width:12px;border-radius:6px 0px 0px 6px;box-sizing:border-box;background-color:var(--dialog__warning--background-color)}.message{font-size:var(--dialog__body--font-size);font-weight:var(--dialog__body--text-weight--medium);font-family:var(--dialog__body--font-pattern);text-shadow:var(--dialog__body--text-shadow);padding-bottom:var(--dialog__body--padding-bottom);color:var(--dialog__body--color);max-height:30vh;content-visibility:auto;margin-bottom:24px;overflow-y:auto}.changeable__icon{background:var(--dialog__warning--background-color);--ez-icon--color:var(--dialog__icon--color);display:grid;place-items:center;width:26px;height:26px;border-radius:50%}.changeable__icon.critical{background:var(--dialog__critical--background-color)}.title{display:flex;font-family:var(--dialog__title--font-pattern);margin:0;font-weight:var(--dialog__title--weight--large);line-height:1.3}.title__container{display:flex;padding-bottom:var(--dialog__title__container--padding-bottom)}.title__box{display:flex;width:100%;align-items:center;align-self:center}.title--label{padding-left:var(--dialog__title--padding-left)}.title-icon{outline:none;border:none;background-color:var(--dialog__warning--background-color);width:26px;height:26px;border-radius:100%;padding:0;display:flex;justify-content:center;align-items:center}.title-icon--critical{background-color:var(--dialog__critical--background-color)}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;width:10%;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:\'\';display:flex;background-color:var(--dialog__btn__close--background-color);width:12px;height:12px;-webkit-mask-image:var(--dialog__btn__close__image);mask-image:var(--dialog__btn__close__image)}.title-icon::after{content:\'\';display:flex;background-color:#FFFF;width:15px;height:15px;-webkit-mask-image:var(--dialog--warning__image);mask-image:var(--dialog--warning__image)}.title-icon--critical::after{content:\'\';display:flex;background-color:#FFFF;width:13px;height:13px;-webkit-mask-image:var(--dialog--critical__image);mask-image:var(--dialog--critical__image)}.button-yes-no__container{display:flex;box-sizing:border-box;align-self:center;align-items:center;justify-content:flex-end}.button__no{padding-right:var(--dialog__btn__no--padding-right)}.button__ok--container{display:flex;justify-content:flex-end}.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{d as ez_dialog}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{p as e,b as a}from"./p-85a9446b.js";(()=>{const a=import.meta.url,s={};return""!==a&&(s.resourcesUrl=new URL(".",a).href),e(s)})().then((e=>a([["p-4811bc0a",[[6,"ez-grid",{multipleSelection:[4,"multiple-selection"],pageSize:[2,"page-size"],serverUrl:[1,"server-url"],dataUnit:[16],_navigationHasPrevious:[32],_navigationHasNext:[32],_navigationFirstRow:[32],_navigationLastRow:[32],_navigationTotalRows:[32],_popUpVisible:[32],setColumnsDef:[64],addColumnMenuItem:[64],setColumnsState:[64],setData:[64],getSelection:[64],getColumnsState:[64],getColumns:[64]}]]],["p-c1ede043",[[1,"ez-date-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],setFocus:[64],setBlur:[64]}]]],["p-2ac02d48",[[1,"ez-date-time-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],setFocus:[64],setBlur:[64]}]]],["p-fcd9bd92",[[1,"ez-dialog",{confirm:[1028],critical:[1028],message:[1025],opened:[1540],personalizedIconPath:[1025,"personalized-icon-path"],ezTitle:[1025,"ez-title"],handleButtonClick:[64],show:[64]}]]],["p-0183d259",[[1,"ez-search",{value:[1537],label:[1537],enabled:[1540],errorMessage:[1537,"error-message"],optionLoader:[16],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"],setFocus:[64],setBlur:[64]}]]],["p-5f9af495",[[1,"ez-time-input",{label:[513],viewValue:[1537,"view-value"],value:[1026],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],setFocus:[64],setBlur:[64]}]]],["p-3f6aa9a7",[[0,"test-du"]]],["p-e5355a29",[[1,"ez-number-input",{label:[1],value:[1538],enabled:[4],errorMessage:[1537,"error-message"],precision:[2],prettyPrecision:[2,"pretty-precision"],setFocus:[64],setBlur:[64]}]]],["p-07c32f68",[[1,"ez-action-chip",{label:[513],enabled:[516]}]]],["p-0f90499d",[[0,"ez-application"]]],["p-ef04b633",[[1,"ez-collapsible-box",{value:[1540],label:[513],headerSize:[513,"header-size"],iconPlacement:[513,"icon-placement"],showHide:[64]}]]],["p-35364a97",[[1,"ez-label-chip",{label:[513],enabled:[516],removable:[516],value:[1540],setFocus:[64],setBlur:[64]}]]],["p-70ad6c16",[[1,"ez-popover",{autoClose:[516,"auto-close"],top:[1537],left:[1537],bottom:[1537],right:[1537],boxWidth:[513,"box-width"],opened:[1540],updatePosition:[64],show:[64],hide:[64]}]]],["p-105724a3",[[1,"ez-popup",{size:[1],opened:[1540],useHeader:[1540,"use-header"],ezTitle:[1,"ez-title"]}]]],["p-ba64cc41",[[1,"ez-text-area",{label:[513],value:[1537],enabled:[516],loading:[516],errorMessage:[1537,"error-message"],rows:[1538],setFocus:[64],setBlur:[64]}]]],["p-f6db07fb",[[1,"ez-toast",{message:[1025],fadeTime:[1026,"fade-time"],useIcon:[1028,"use-icon"],canClose:[1028,"can-close"],show:[64]}]]],["p-a96272f7",[[1,"ez-upload",{label:[1],enabled:[4],maxFileSize:[2,"max-file-size"],maxFiles:[2,"max-files"],requestHeaders:[8,"request-headers"],urlUpload:[1,"url-upload"],urlDelete:[1,"url-delete"],value:[1040],addFiles:[64],setFocus:[64],setBlur:[64]}]]],["p-73397a0f",[[2,"snk-application",{getStringParam:[64],getIntParam:[64],getFloatParam:[64],getBooleanParam:[64],getDateParam:[64],temOpcional:[64],getAttributeFromHTMLWrapper:[64],openApp:[64],createDataunit:[64],getResourceID:[64],alert:[64],error:[64],confirm:[64],info:[64],loadFormConfig:[64]}]]],["p-f80cabc7",[[0,"ez-form",{dataUnit:[1040],config:[16],submit:[64],cancel:[64],validate:[64]}]]],["p-89a1100f",[[1,"ez-text-input",{label:[513],value:[1537],enabled:[516],loading:[516],errorMessage:[1537,"error-message"],mask:[1],canShowError:[516,"can-show-error"],restrict:[1],setFocus:[64],setBlur:[64]}]]],["p-ac8842e5",[[1,"ez-combo-box",{value:[1537],label:[513],enabled:[516],options:[1040],errorMessage:[1537,"error-message"],searchMode:[4,"search-mode"],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"],optionLoader:[16],suppressEmptyOption:[4,"suppress-empty-option"],canShowError:[516,"can-show-error"],_preSelection:[32],_visibleOptions:[32],setFocus:[64],setBlur:[64]}]]],["p-d90ebb85",[[1,"ez-tabselector",{selectedIndex:[1538,"selected-index"],selectedTab:[1537,"selected-tab"],tabs:[1]}]]],["p-8b543003",[[1,"ez-icon",{size:[513],href:[513],iconName:[513,"icon-name"]}]]],["p-710bfffe",[[1,"select-box",{selectedOption:[1,"selected-option"]}],[1,"ez-check",{label:[513],value:[1540],enabled:[516],mode:[513],getMode:[64],setFocus:[64]}],[1,"ez-list",{dataSource:[1040],useGroups:[1540,"use-groups"],ezDraggable:[1028,"ez-draggable"],ezSelectable:[1028,"ez-selectable"],itemSlotBuilder:[1040],_listItems:[32],_listGroupItems:[32],setSelection:[64],getSelection:[64],getList:[64]}],[1,"ez-button",{label:[513],enabled:[516],mode:[513],image:[513],iconName:[513,"icon-name"],size:[513],setFocus:[64],setBlur:[64]}]]],["p-9750632b",[[2,"grid-config",{selectedTab:[1025,"selected-tab"],columns:[1040]}],[1,"ez-modal",{modalSize:[1,"modal-size"],align:[1],opened:[1028],closeEsc:[4,"close-esc"],closeOutsideClick:[4,"close-outside-click"]}]]],["p-01f23a70",[[1,"ez-calendar",{value:[1040],floating:[516],time:[516],showSeconds:[516,"show-seconds"],show:[64],fitVertical:[64],hide:[64]}]]]],e)));
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
-
import { DataUnit } from "@sankhyalabs/core";
|
|
3
|
-
import DataUnitFetcher from "../../lib/http/data-fetcher/fetchers/dataunit-fetcher";
|
|
4
|
-
import ParametersFetcher from "../../lib/http/data-fetcher/fetchers/parameters-fecher";
|
|
5
|
-
import { FormConfigFetcher } from "../../lib/http/data-fetcher/fetchers/form-config-fetcher";
|
|
6
|
-
import { FieldConfig } from "@sankhyalabs/ezui/dist/types/components/ez-form/ez-form";
|
|
7
|
-
export declare class SnkApplication {
|
|
8
|
-
_parameters: ParametersFetcher;
|
|
9
|
-
_urlParams: Map<string, any>;
|
|
10
|
-
_dataUnitFetcher: DataUnitFetcher;
|
|
11
|
-
_formConfigFetcher: FormConfigFetcher;
|
|
12
|
-
_resourceID: string;
|
|
13
|
-
private get parameters();
|
|
14
|
-
private get resourceID();
|
|
15
|
-
getStringParam(name: string): Promise<string>;
|
|
16
|
-
getIntParam(name: string): Promise<number>;
|
|
17
|
-
getFloatParam(name: string): Promise<number>;
|
|
18
|
-
getBooleanParam(name: string): Promise<boolean>;
|
|
19
|
-
getDateParam(name: string): Promise<Date>;
|
|
20
|
-
temOpcional(opcional: string): Promise<boolean>;
|
|
21
|
-
getAttributeFromHTMLWrapper(attribName: string): Promise<string>;
|
|
22
|
-
openApp(resourceId: string, pkObject: Object): Promise<void>;
|
|
23
|
-
createDataunit(entityName: string): Promise<DataUnit>;
|
|
24
|
-
getResourceID(): Promise<string>;
|
|
25
|
-
alert(title: string, message: string, icon?: string): Promise<boolean>;
|
|
26
|
-
error(title: string, message: string, icon?: string): Promise<boolean>;
|
|
27
|
-
confirm(title: string, message: string, icon?: string, critical?: boolean): Promise<boolean>;
|
|
28
|
-
info(message: string, options?: any): Promise<void>;
|
|
29
|
-
loadFormConfig(name: string): Promise<Array<FieldConfig>>;
|
|
30
|
-
private get urlParams();
|
|
31
|
-
private get dataUnitFetcher();
|
|
32
|
-
private get formConfigFetcher();
|
|
33
|
-
/**
|
|
34
|
-
* Evento disparado quando a aplicação for carregada.
|
|
35
|
-
*/
|
|
36
|
-
applicationLoaded: EventEmitter<boolean>;
|
|
37
|
-
/**
|
|
38
|
-
* Evento
|
|
39
|
-
*/
|
|
40
|
-
applicationLoading: EventEmitter<boolean>;
|
|
41
|
-
componentWillLoad(): void;
|
|
42
|
-
componentDidLoad(): void;
|
|
43
|
-
render(): any;
|
|
44
|
-
}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
/* eslint-disable */
|
|
2
|
-
/* tslint:disable */
|
|
3
|
-
/**
|
|
4
|
-
* This is an autogenerated file created by the Stencil compiler.
|
|
5
|
-
* It contains typing information for all components that exist in this project.
|
|
6
|
-
*/
|
|
7
|
-
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
|
-
import { DataUnit } from "@sankhyalabs/core";
|
|
9
|
-
import { FieldConfig } from "@sankhyalabs/ezui/dist/types/components/ez-form/ez-form";
|
|
10
|
-
export namespace Components {
|
|
11
|
-
interface SnkApplication {
|
|
12
|
-
"alert": (title: string, message: string, icon?: string) => Promise<boolean>;
|
|
13
|
-
"confirm": (title: string, message: string, icon?: string, critical?: boolean) => Promise<boolean>;
|
|
14
|
-
"createDataunit": (entityName: string) => Promise<DataUnit>;
|
|
15
|
-
"error": (title: string, message: string, icon?: string) => Promise<boolean>;
|
|
16
|
-
"getAttributeFromHTMLWrapper": (attribName: string) => Promise<string>;
|
|
17
|
-
"getBooleanParam": (name: string) => Promise<boolean>;
|
|
18
|
-
"getDateParam": (name: string) => Promise<Date>;
|
|
19
|
-
"getFloatParam": (name: string) => Promise<number>;
|
|
20
|
-
"getIntParam": (name: string) => Promise<number>;
|
|
21
|
-
"getResourceID": () => Promise<string>;
|
|
22
|
-
"getStringParam": (name: string) => Promise<string>;
|
|
23
|
-
"info": (message: string, options?: any) => Promise<void>;
|
|
24
|
-
"loadFormConfig": (name: string) => Promise<Array<FieldConfig>>;
|
|
25
|
-
"openApp": (resourceId: string, pkObject: Object) => Promise<void>;
|
|
26
|
-
"temOpcional": (opcional: string) => Promise<boolean>;
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
export interface SnkApplicationCustomEvent<T> extends CustomEvent<T> {
|
|
30
|
-
detail: T;
|
|
31
|
-
target: HTMLSnkApplicationElement;
|
|
32
|
-
}
|
|
33
|
-
declare global {
|
|
34
|
-
interface HTMLSnkApplicationElement extends Components.SnkApplication, HTMLStencilElement {
|
|
35
|
-
}
|
|
36
|
-
var HTMLSnkApplicationElement: {
|
|
37
|
-
prototype: HTMLSnkApplicationElement;
|
|
38
|
-
new (): HTMLSnkApplicationElement;
|
|
39
|
-
};
|
|
40
|
-
interface HTMLElementTagNameMap {
|
|
41
|
-
"snk-application": HTMLSnkApplicationElement;
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
declare namespace LocalJSX {
|
|
45
|
-
interface SnkApplication {
|
|
46
|
-
/**
|
|
47
|
-
* Evento disparado quando a aplicação for carregada.
|
|
48
|
-
*/
|
|
49
|
-
"onApplicationLoaded"?: (event: SnkApplicationCustomEvent<boolean>) => void;
|
|
50
|
-
/**
|
|
51
|
-
* Evento
|
|
52
|
-
*/
|
|
53
|
-
"onApplicationLoading"?: (event: SnkApplicationCustomEvent<boolean>) => void;
|
|
54
|
-
}
|
|
55
|
-
interface IntrinsicElements {
|
|
56
|
-
"snk-application": SnkApplication;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
export { LocalJSX as JSX };
|
|
60
|
-
declare module "@stencil/core" {
|
|
61
|
-
export namespace JSX {
|
|
62
|
-
interface IntrinsicElements {
|
|
63
|
-
"snk-application": LocalJSX.SnkApplication & JSXBase.HTMLAttributes<HTMLSnkApplicationElement>;
|
|
64
|
-
}
|
|
65
|
-
}
|
|
66
|
-
}
|
package/dist/types/index.d.ts
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export { Components, JSX } from './components';
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
export declare class HttpFetcher {
|
|
2
|
-
private static appTagName;
|
|
3
|
-
private static instance;
|
|
4
|
-
private ready;
|
|
5
|
-
private watingRequestsById;
|
|
6
|
-
static get(): HttpFetcher;
|
|
7
|
-
callGraphQL(req: any): Promise<any>;
|
|
8
|
-
private getReqKey;
|
|
9
|
-
private getQueryTemplate;
|
|
10
|
-
private getWatingRequest;
|
|
11
|
-
private pause;
|
|
12
|
-
private resume;
|
|
13
|
-
private fecthGrapql;
|
|
14
|
-
private hashCode;
|
|
15
|
-
}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { DataUnit } from "@sankhyalabs/core";
|
|
2
|
-
export default class DataUnitFetcher {
|
|
3
|
-
private templateByQuery;
|
|
4
|
-
constructor();
|
|
5
|
-
private buldTemplates;
|
|
6
|
-
getDataUnit(entityName: string, resourceID: string): DataUnit;
|
|
7
|
-
private loadMetadata;
|
|
8
|
-
private loadData;
|
|
9
|
-
private saveData;
|
|
10
|
-
private formatValueToServer;
|
|
11
|
-
private removeRecords;
|
|
12
|
-
}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { FieldConfig } from "@sankhyalabs/ezui/dist/types/components/ez-form/ez-form";
|
|
2
|
-
import { ResourceFetcher } from "./resource-fetcher";
|
|
3
|
-
export declare class FormConfigFetcher extends ResourceFetcher {
|
|
4
|
-
loadFormConfig(formName: string, resourceID: string): Promise<Array<FieldConfig>>;
|
|
5
|
-
}
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
export default class ParametersFetcher {
|
|
2
|
-
private templateByQuery;
|
|
3
|
-
constructor();
|
|
4
|
-
private buldTemplates;
|
|
5
|
-
getParam(name: string, resourceID: string): Promise<any>;
|
|
6
|
-
asString(name: string, resourceID: string): Promise<string>;
|
|
7
|
-
asInteger(name: string, resourceID: string): Promise<number>;
|
|
8
|
-
asFloat(name: string, resourceID: string): Promise<number>;
|
|
9
|
-
asBoolean(name: string, resourceID: string): Promise<boolean>;
|
|
10
|
-
asDate(name: string, resourceID: string): Promise<Date>;
|
|
11
|
-
getBatchParams(names: Array<string>, resourceID: string): Promise<{}>;
|
|
12
|
-
private getValue;
|
|
13
|
-
}
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export declare class LoadStateManager {
|
|
2
|
-
private static instanceByStatus;
|
|
3
|
-
private _state;
|
|
4
|
-
private _application;
|
|
5
|
-
private static listenersByType;
|
|
6
|
-
private constructor();
|
|
7
|
-
private onStatusChange;
|
|
8
|
-
private addListener;
|
|
9
|
-
onPreInitialize(listener: () => void): LoadStateManager;
|
|
10
|
-
onLoaded(listener: () => void): LoadStateManager;
|
|
11
|
-
getStatus(): LoadStatus;
|
|
12
|
-
isPreInitialize(): boolean;
|
|
13
|
-
isLoaded(): boolean;
|
|
14
|
-
static get(type?: LoadType): LoadStateManager;
|
|
15
|
-
}
|
|
16
|
-
export declare enum LoadStatus {
|
|
17
|
-
DOM_LOADED = "DOM_LOADED",
|
|
18
|
-
PRE_INITIALIZE = "PRE_INITIALIZE",
|
|
19
|
-
LOADED = "LOADED"
|
|
20
|
-
}
|
|
21
|
-
export declare enum LoadType {
|
|
22
|
-
APP_LOAD = "APP_LOAD"
|
|
23
|
-
}
|