@sankhyalabs/ezui 5.11.0-dev.1 → 5.11.0-dev.11
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/README.md +8 -10
- package/dist/cjs/{ApplicationUtils-2e444734.js → ApplicationUtils-88d75775.js} +7 -6
- package/dist/cjs/{RecordValidationProcessor-edd23705.js → RecordValidationProcessor-059f2d03.js} +1 -1
- package/dist/cjs/ez-actions-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-card-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +12 -4
- package/dist/cjs/ez-form-view.cjs.entry.js +42 -1
- package/dist/cjs/ez-form.cjs.entry.js +4 -3
- package/dist/cjs/ez-grid.cjs.entry.js +89 -40
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +3 -1
- package/dist/cjs/ez-search.cjs.entry.js +3 -1
- package/dist/cjs/ez-text-edit.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/filter-column.cjs.entry.js +30 -7
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-card-item/ez-card-item.css +1 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +47 -3
- package/dist/collection/components/ez-form/ez-form.js +20 -0
- package/dist/collection/components/ez-form-view/ez-form-view.js +23 -0
- package/dist/collection/components/ez-form-view/fieldbuilder/FieldBuilder.js +4 -1
- package/dist/collection/components/ez-form-view/structure/index.js +34 -0
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -1
- package/dist/collection/components/ez-grid/ez-grid.js +11 -39
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +50 -8
- package/dist/collection/components/ez-grid/utils/InMemoryFilterColumnDataSource.js +78 -0
- package/dist/collection/components/ez-multi-selection-list/ez-multi-selection-list.js +21 -1
- package/dist/collection/components/ez-search/ez-search.js +39 -1
- package/dist/collection/utils/ApplicationUtils.js +7 -6
- package/dist/collection/utils/form/DataBinder.js +1 -1
- package/dist/custom-elements/index.js +191 -64
- package/dist/esm/{ApplicationUtils-d9a34a16.js → ApplicationUtils-ae588c9c.js} +7 -6
- package/dist/esm/{RecordValidationProcessor-abc814af.js → RecordValidationProcessor-0c6f41a1.js} +1 -1
- package/dist/esm/ez-actions-button.entry.js +1 -1
- package/dist/esm/ez-card-item.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +12 -4
- package/dist/esm/ez-form-view.entry.js +42 -1
- package/dist/esm/ez-form.entry.js +4 -3
- package/dist/esm/ez-grid.entry.js +90 -41
- package/dist/esm/ez-multi-selection-list.entry.js +3 -1
- package/dist/esm/ez-search.entry.js +3 -1
- package/dist/esm/ez-text-edit.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js +1 -1
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/filter-column.entry.js +30 -7
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-061f4d73.entry.js +1 -0
- package/dist/ezui/p-3078d25c.entry.js +1 -0
- package/dist/ezui/{p-37673563.entry.js → p-3e00263f.entry.js} +1 -1
- package/dist/ezui/{p-68352e41.entry.js → p-47afb974.entry.js} +1 -1
- package/dist/ezui/p-5e55a42b.entry.js +1 -0
- package/dist/ezui/{p-fd54b5b4.entry.js → p-6511add4.entry.js} +2 -2
- package/dist/ezui/p-67ecaeb4.entry.js +1 -0
- package/dist/ezui/p-6fbe368e.entry.js +1 -0
- package/dist/ezui/p-7526f2b6.entry.js +1 -0
- package/dist/ezui/{p-86a2036d.js → p-7bcb062d.js} +1 -1
- package/dist/ezui/{p-ff82b176.entry.js → p-bc4e0389.entry.js} +1 -1
- package/dist/ezui/{p-8bd3903b.entry.js → p-c6c645b0.entry.js} +1 -1
- package/dist/ezui/p-ca9aa20c.js +1 -0
- package/dist/ezui/{p-a5e09759.entry.js → p-f9fd8446.entry.js} +1 -1
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +9 -0
- package/dist/types/components/ez-form/ez-form.d.ts +5 -0
- package/dist/types/components/ez-form-view/ez-form-view.d.ts +5 -0
- package/dist/types/components/ez-form-view/structure/index.d.ts +15 -0
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/ez-grid.d.ts +3 -5
- package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +8 -0
- package/dist/types/components/ez-grid/utils/InMemoryFilterColumnDataSource.d.ts +16 -0
- package/dist/types/components/ez-multi-selection-list/ez-multi-selection-list.d.ts +4 -0
- package/dist/types/components/ez-search/ez-search.d.ts +8 -0
- package/dist/types/components.d.ts +51 -0
- package/package.json +7 -9
- package/dist/ezui/p-2a0e1679.entry.js +0 -1
- package/dist/ezui/p-4535da17.entry.js +0 -1
- package/dist/ezui/p-4c8b029b.entry.js +0 -1
- package/dist/ezui/p-4e31b69b.entry.js +0 -1
- package/dist/ezui/p-90fa4cb3.entry.js +0 -1
- package/dist/ezui/p-9f41b414.entry.js +0 -1
- package/dist/ezui/p-f15ec3bb.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as e,f as s,H as n,g as r}from"./p-e318d280.js";import{DateUtils as o,Action as a,WaitingChangeException as h,ApplicationContext as l,DataUnitAction as c,StringUtils as u,DataUnit as d,ElementIDUtils as f}from"@sankhyalabs/core";import{b as v,R as p}from"./p-7bcb062d.js";import"./p-ca9aa20c.js";import"./p-ab574d59.js";const b=/child\[([^\]]+)\]/,m=/\$\{.+\}/;class y{constructor(){this._sheets=new Map,this._requiredFields=[],this._cleanOnCopyFields=[],this._defaultValues={}}static getDetailName(t){const i=b.exec(t);return i?i[1]:void 0}getSheet(t){return this._sheets.get(t)}getAllSheets(){return this._sheets}addSheet(t){this._sheets.set(t.name,t)}addRequiredFields(t){this._requiredFields=this._requiredFields.concat(t)}getRequiredFields(){return this._requiredFields}addCleanOnCopyFields(t){this._cleanOnCopyFields=this._cleanOnCopyFields.concat(t)}getCleanOnCopyFields(){return this._cleanOnCopyFields}addDefaultValues(t){return this._defaultValues=Object.assign(Object.assign({},this._defaultValues),t)}getDefaultValues(){const t={};return Object.entries(this._defaultValues).forEach((([i,e])=>{if("string"==typeof e){const t=m.exec(e);t&&(e=this.getDefaultVar(t[0]))}t[i]=e})),t}getDefaultVar(t){return"${data}"===t?o.getToday():"${datahora}"===t?o.getToday(!0):this._defaultVars?this._defaultVars.get(t):void 0}setDefaultVars(t){this._defaultVars=t}}const _=(t,i)=>"__main"==t[0].label?-1:(t[0].order||1e4)-(i[0].order||1e4);class g{constructor(t){this.onDataUnitEvent=t=>{var i,e;switch(t.type){case a.DATA_LOADED:case a.DATA_SAVED:case a.RECORDS_REMOVED:case a.RECORDS_ADDED:case a.RECORDS_COPIED:case a.EDITION_CANCELED:case a.SELECTION_CHANGED:case a.NEXT_SELECTED:case a.PREVIOUS_SELECTED:this.clearInvalid();case a.DATA_CHANGED:case a.CHANGE_UNDONE:case a.CHANGE_REDONE:case a.RECORD_LOADED:null===(i=this._fields)||void 0===i||i.forEach((t=>{this.updateValue(t.fieldName,t.field)}));break;case a.FIELD_INVALIDATED:null===(e=this._fields)||void 0===e||e.forEach((t=>{this.updateErrorMessage(t.fieldName,t.field)}))}},this._fields=new Map,this._dataUnit=t,this.applyDefaultValues(),this._dataUnit.subscribe(this.onDataUnitEvent),this._dataUnit.addInterceptor(this)}applyDefaultValues(){const t=(this._dataUnit.getAddedRecords()||[]).map((t=>t.__record__id__));if(t.length>0){const i=this.getDefaultValues();i&&Object.keys(i).forEach((e=>{this._dataUnit.setFieldValue(e,i[e],t)}))}}bind(t,i,e,s){t.forEach((t=>{const{fieldName:e,contextName:s}=t.dataset;null!=s&&s!==i||this.updateBind(e,t)})),this._formMetadata=e,this._recordValidatorProcessor=new p(this._dataUnit,{getRequiredFields:()=>this._formMetadata.getRequiredFields(),markAsInvalid:t=>this.markInvalid(t),getMessageForField:t=>this.getErrorMessage(t)},s)}onDisconnectedCallback(){this._dataUnit.unsubscribe(this.onDataUnitEvent),this._dataUnit.removeInterceptor(this)}getCurrentRecordId(){const t=this._dataUnit.getSelectedRecord();return null==t?void 0:t.__record__id__}markInvalid(t){if(this._fields.has(t.name)){const i=this._fields.get(t.name).field;this.updateErrorMessage(t.name,i,t.message)}}clearInvalid(t){this._dataUnit.clearInvalid(t),this._fields.forEach((t=>{t.field.errorMessage=""}))}updateValue(t,i){const e=this._fields.get(t);try{e&&(e.listen=!1),i.value=this._dataUnit.getFieldValue(t),this.updateErrorMessage(t,i)}finally{e&&(e.listen=!0)}}validate(){return this._recordValidatorProcessor.validate()}updateErrorMessage(t,i,e){null==e&&(e=this._dataUnit.getInvalidMessage(this.getCurrentRecordId(),t)),i.errorMessage||(i.errorMessage=e)}getErrorMessage(t){if(this._fields.has(t))return this._fields.get(t).field.errorMessage}updateBind(t,i){const e=this._fields.get(t);e&&e.destroy(),i.value=this._dataUnit.getFieldValue(t),this.updateErrorMessage(t,i),this._fields.set(t,w.create(t,i,((t,i)=>this.changeStarted(t,i)),(t=>this.cancelWaitingChange(t)),((t,i)=>this.setFieldValue(t,i)))),this.bindSearchOptionsLoader(t,i),this.applyEzUploadContext(t,i)}changeStarted(t,i){if(0===this._dataUnit.records.length&&this._dataUnit.addRecord(),!i.blocking&&null==i.promise){const e=this._fields.get(t);e&&(i.promise=new Promise(((t,i)=>{e.waitingChangePromiseResolve=t,e.waitingChangePromiseReject=i})))}this._dataUnit.startChange(t,i)}cancelWaitingChange(t){if(this._dataUnit.waitingForChange(t)){this._dataUnit.cancelWaitingChange(t);const i=this._fields.get(t);i&&i.rejectWaitingChange(new h("Change canceled",t))}}setFieldValue(t,i){if(0===this._dataUnit.records.length&&this._dataUnit.addRecord(),this._dataUnit.clearInvalid(this.getCurrentRecordId(),t),this._dataUnit.setFieldValue(t,i,[this.getCurrentRecordId()]),this._dataUnit.waitingForChange(t)){const i=this._fields.get(t);i&&i.acceptWaitingChange()}}bindSearchOptionsLoader(t,i){if("EZ-SEARCH"===i.nodeName&&null==i.optionLoader){const e=l.getContextValue("__EZUI__SEARCH__OPTION__LOADER__");e&&(i.optionLoader=i=>e(i,t,this._dataUnit))}}applyEzUploadContext(t,i){var e,s;if("EZ-UPLOAD"===i.nodeName){i.urlUpload=l.getContextValue("__EZUI__UPLOAD__ADD__URL__"),i.urlDelete=l.getContextValue("__EZUI__UPLOAD__DEL__URL__");const n=this._dataUnit.getField(t),r=null===(e=n.properties)||void 0===e?void 0:e.DESTINATION;r&&(i.requestHeaders={XTRAINF:`{"destination": "${r}"}`}),i.maxFiles=(null===(s=n.properties)||void 0===s?void 0:s.MAX_FILES)||0}}interceptAction(t){if(t.type===a.RECORDS_COPIED){const i=this._formMetadata.getCleanOnCopyFields();if(i)return new c(a.RECORDS_COPIED,t.payload.map((t=>{const e=Object.assign({},t);return i.forEach((t=>delete e[t])),e})))}if(t.type===a.SAVING_DATA)return new Promise((i=>{this.validate().then((()=>i(t))).catch((()=>{}))}));if(t.type===a.RECORDS_ADDED){const i=this.getDefaultValues();if(i)return new c(a.RECORDS_ADDED,t.payload.map((t=>Object.assign(Object.assign({},t),i))))}return t}getDefaultValues(){var t;const i=null===(t=this._formMetadata)||void 0===t?void 0:t.getDefaultValues();if(i){const t={};for(const e in i)t[e]=this._dataUnit.valueFromString(e,i[e]);return t}}}class w{constructor(){this.listen=!0,this.startChangeEventName="ezStartChange",this.cancelWaitingChangeEventName="ezCancelWaitingChange",this.changeEventName="ezChange"}destroy(){this.field.removeEventListener(this.startChangeEventName,this.startChangeListener),this.field.removeEventListener(this.cancelWaitingChangeEventName,this.cancelWaitingChangeListener),this.field.removeEventListener(this.changeEventName,this.changeListener)}acceptWaitingChange(){this.waitingChangePromiseResolve&&(this.waitingChangePromiseResolve(),this.waitingChangePromiseReject=void 0,this.waitingChangePromiseResolve=void 0)}rejectWaitingChange(t){this.waitingChangePromiseReject&&(this.waitingChangePromiseReject(t),this.waitingChangePromiseReject=void 0,this.waitingChangePromiseResolve=void 0)}static create(t,i,e,s,n){const r=new w;return r.field=i,r.fieldName=t,r.startChangeListener=i=>{r.listen&&e(t,i.detail)},r.field.addEventListener(r.startChangeEventName,r.startChangeListener),r.cancelWaitingChangeListener=()=>{r.listen&&s(t)},r.field.addEventListener(r.cancelWaitingChangeEventName,r.cancelWaitingChangeListener),r.changeListener=i=>{r.listen&&n(t,i.detail)},r.field.addEventListener(r.changeEventName,r.changeListener),r}}function E(t){return"Minified Redux error #"+t+"; visit https://redux.js.org/Errors?code="+t+" for the full message or use the non-minified dev environment for full errors. "}var O="function"==typeof Symbol&&Symbol.observable||"@@observable",C=function(){return Math.random().toString(36).substring(7).split("").join(".")},A={INIT:"@@redux/INIT"+C(),REPLACE:"@@redux/REPLACE"+C(),PROBE_UNKNOWN_ACTION:function(){return"@@redux/PROBE_UNKNOWN_ACTION"+C()}};function j(t){if("object"!=typeof t||null===t)return!1;for(var i=t;null!==Object.getPrototypeOf(i);)i=Object.getPrototypeOf(i);return Object.getPrototypeOf(t)===i}function R(t,i,e){var s;if("function"==typeof i&&"function"==typeof e||"function"==typeof e&&"function"==typeof arguments[3])throw new Error(E(0));if("function"==typeof i&&void 0===e&&(e=i,i=void 0),void 0!==e){if("function"!=typeof e)throw new Error(E(1));return e(R)(t,i)}if("function"!=typeof t)throw new Error(E(2));var n=t,r=i,o=[],a=o,h=!1;function l(){a===o&&(a=o.slice())}function c(){if(h)throw new Error(E(3));return r}function u(t){if("function"!=typeof t)throw new Error(E(4));if(h)throw new Error(E(5));var i=!0;return l(),a.push(t),function(){if(i){if(h)throw new Error(E(6));i=!1,l();var e=a.indexOf(t);a.splice(e,1),o=null}}}function d(t){if(!j(t))throw new Error(E(7));if(void 0===t.type)throw new Error(E(8));if(h)throw new Error(E(9));try{h=!0,r=n(r,t)}finally{h=!1}for(var i=o=a,e=0;e<i.length;e++)(0,i[e])();return t}function f(t){if("function"!=typeof t)throw new Error(E(10));n=t,d({type:A.REPLACE})}function v(){var t,i=u;return(t={subscribe:function(t){if("object"!=typeof t||null===t)throw new Error(E(11));function e(){t.next&&t.next(c())}return e(),{unsubscribe:i(e)}}})[O]=function(){return this},t}return d({type:A.INIT}),(s={dispatch:d,subscribe:u,getState:c,replaceReducer:f})[O]=v,s}const D={};function z(t=D,i){switch(i.type){case N.METADATA_LOADED:return Object.assign(Object.assign({},t),{formMetadata:i.payload,currentSheet:void 0});case N.CHANGE_TAB:return Object.assign(Object.assign({},t),{currentSheet:i.payload});default:return t}}function I(t){return t.formMetadata}var N;!function(t){t.METADATA_LOADED="FORM/METADATA_LOADED",t.CHANGE_TAB="FORM/CHANGE_TAB"}(N||(N={}));const x=class{constructor(e){t(this,e),this.ezReady=i(this,"ezReady",7),this.formItemsReady=i(this,"formItemsReady",7),this.onDataUnitAction=t=>{t.type===a.METADATA_LOADED&&this.processMetadata()},this.dataUnit=void 0,this.config=void 0,this.recordsValidator=void 0}validate(){return this._dataBinder.validate()}observeConfig(){this.processMetadata()}getDynamicContent(){var t;const i=I(this._store.getState());if(!i)return null;const s=Array.from(i.getAllSheets().values()),n=function(t){const i=function(t){return t.currentSheet}(t);return i?t.formMetadata.getSheet(i):Array.from(t.formMetadata.getAllSheets().values())[0]}(null===(t=this._store)||void 0===t?void 0:t.getState());let r=[];if(s.length>1){const t=s.map(((t,i)=>({tabKey:t.name,label:t.label,index:i}))),i="selector";r.push(e("ez-tabselector",{tabs:this.buildIdTabSelector(t),onEzChange:t=>this._store.dispatch(function(t){return{type:N.CHANGE_TAB,payload:"string"==typeof t?t:t.tabKey}}(t.detail)),selectedTab:n.name,"data-element-id":i}))}return r=r.concat(this.buildFormContent(n)),r}buildFormContent(t){const i=null==t?void 0:t.fields;if(null==t)return;const s=`${u.replaceAccentuatedChars(u.toCamelCase(null==t?void 0:t.label),!1)}_selectorContainer`;return e("div",{class:"dynamic-content","data-element-id":s},e("ez-form-view",{class:"ez-row ez-padding-vertical--small",fields:i}))}processMetadata(){if(!this.isStatic()&&this.dataUnit&&this._store){const t=((t,i,e=!1)=>{var s,n;null!=t&&!0!==(null==t?void 0:t.emptyConfig)||(t=(t=>{const i=t.metadata;let e;return i&&(e=i.fields.filter((t=>!1!==t.visible)).map((t=>({name:t.name,defaultValue:t.defaultValue})))),{emptyConfig:!1,fields:e}})(i));const r=new Map,o=new Map,a=[],h=[],l={};null===(s=null==t?void 0:t.tabs)||void 0===s||s.forEach((t=>{o.has(t.label)||!1!==t.visible||o.set(t.label,t)})),null===(n=null==t?void 0:t.fields)||void 0===n||n.forEach((t=>{var e,s,n;if(!1!==t.visible){const c=((t,i)=>("string"==typeof t?Array.from(i.keys()).find((i=>i.label===t)):t)||{label:t,visible:!0})(t.tab||"__main",r);if(o.has(c.label))return;const u=i.getField(t.name);if(u&&c.visible){r.has(c)||r.set(c,[]);const i=v(u,t);r.get(c).push(i),i.required&&a.push(t.name),((null==t.cleanOnCopy?null===(e=u.properties)||void 0===e?void 0:e.cleanOnCopy:t.cleanOnCopy)||(null===(s=u.properties)||void 0===s?void 0:s.cleanOnCopy))&&h.push(t.name);let o=null==t.defaultValue?null===(n=u.properties)||void 0===n?void 0:n.defaultValue:t.defaultValue;if(o&&null!=o.value){const{type:i,value:e}=o;if(i)if("V"===i)o=e;else try{const t=JSON.parse(e);o=t&&"value"in t?t:e}catch(t){}l[t.name]=o}}}}));const c=new y;if(c.setDefaultVars(t.defaultVars),e){const t=i.metadata;null!=t&&null!=t.children&&t.children.forEach((t=>{const{label:i,name:e,fields:s}=(t=>({name:`child[${t.name}]`,label:t.label,fields:[]}))(t);r.set({name:e,label:i},s)}))}return Array.from(r.entries()).sort(_).forEach((([t,i])=>{c.addSheet({label:"__main"===t.label?"Principal":t.label,name:t.name||t.label,fields:i})})),c.addRequiredFields(a),c.addCleanOnCopyFields(h),c.addDefaultValues(l),c})(this.config,this.dataUnit);this._store.dispatch({type:N.METADATA_LOADED,payload:t})}}isStatic(){var t;return(null===(t=this._staticFields)||void 0===t?void 0:t.length)>0}componentWillLoad(){void 0===this.dataUnit&&(this.dataUnit=new d("ez-form")),this.dataUnit.subscribe(this.onDataUnitAction),this._dataBinder=new g(this.dataUnit),this._store=R(z),this._store.subscribe((()=>s(this))),this._staticFields=Array.from(this._element.querySelectorAll("[data-field-name]")),this.processMetadata(),f.addIDInfo(this._element,null,{dataUnit:this.dataUnit})}componentDidRender(){const t=I(this._store.getState());t.addRequiredFields(this._staticFields.filter((t=>t.dataset.required)).map((t=>t.dataset.fieldName))),this._dataBinder.bind(Array.from(this._element.querySelectorAll("[data-field-name]")),this.dataUnit.dataUnitId,t,this.recordsValidator),this.ezReady.emit()}disconnectedCallback(){this.dataUnit.unsubscribe(this.onDataUnitAction),this._dataBinder.onDisconnectedCallback()}buildIdTabSelector(t){return t&&t.forEach((t=>t[f.DATA_ELEMENT_ID_ATTRIBUTE_NAME]=u.toCamelCase(t.label))),t}render(){return e(n,null,this.isStatic()?null:this.getDynamicContent())}get _element(){return r(this)}static get watchers(){return{config:["observeConfig"]}}};x.style=".sc-ez-form-h{display:flex;flex-direction:column;width:100%}.dynamic-content.sc-ez-form ez-collapsible-box.sc-ez-form{--ez-collapsible-box__header--padding-right:var(--space-small, 6px);--ez-collapsible-box__header--padding-left:var(--space-small, 6px)}";export{x as ez_form}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as i,c as t,h as o,H as s,g as e}from"./p-e318d280.js";import{ObjectUtils as r,FloatingManager as l,StringUtils as a,ElementIDUtils as h}from"@sankhyalabs/core";import{A as n}from"./p-ca9aa20c.js";import{C as c}from"./p-7eb3e1a5.js";import"./p-ab574d59.js";import"./p-b853763b.js";import{R as b}from"./p-27a01a26.js";const d=class{constructor(o){i(this,o),this.ezChange=t(this,"ezChange",7),this._changeDeboucingTimeout=null,this._limitCharsToSearch=3,this._deboucingTime=300,this._maxWidthValue=0,this._tabPressed=!1,this._textEmptyList="Nenhum resultado encontrado",this._textEmptySearch="Nenhum resultado de {0} encontrado",this._lookupMode=!1,this._preSelection=void 0,this._visibleOptions=void 0,this._startLoading=!1,this._showLoading=!0,this._criteria=void 0,this.value=void 0,this.label=void 0,this.enabled=!0,this.options=void 0,this.errorMessage=void 0,this.searchMode=void 0,this.showSelectedValue=!1,this.showOptionValue=!1,this.suppressSearch=!1,this.optionLoader=void 0,this.suppressEmptyOption=!1,this.canShowError=!0,this.mode="regular",this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1}observeErrorMessage(){var i;this._textInput&&(this._textInput.errorMessage=this.errorMessage,(null===(i=this.errorMessage)||void 0===i?void 0:i.trim())||this.setInputValue())}observeValue(i,t){if(this._textInput&&i!=t)try{if(this.searchMode&&"string"==typeof i)return void this.setInputValue();const o=this.getSelectedOption(i),s=this.getSelectedOption(t),e=this.getSelectedOption(this.value);this.isDifferentValues(e,o)&&(this.value=o),this.isDifferentValues(o,s)&&(this.setInputValue(),this._lookupMode||this.ezChange.emit(null===o?void 0:o)),this.resetOptions()}finally{this._lookupMode=!1}}observeOptions(i,t){(null==i?void 0:i.join(""))!==(null==t?void 0:t.join(""))&&this.loadOptions(m.PRELOAD)}async getValueAsync(){return new Promise(this._showLoading?i=>{let t=setInterval((()=>{this._showLoading||(clearInterval(t),i(this.value))}),100)}:i=>i(this.value))}async setFocus(){this._textInput&&this._textInput.setFocus()}async setBlur(){this._textInput&&this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async clearValue(){this.clearSearch()}scrollListener(){var i;null!=this._floatingID&&((null===(i=this.listOptionsPosition)||void 0===i?void 0:i.hardPosition)?this.hideOptions():window.requestAnimationFrame((()=>{this.updateListPosition()})))}updateListPosition(){let{verticalPosition:i,horizontalPosition:t,fromBottom:o,fromRight:s,bottomLimit:e,hardPosition:r}=this.getListPosition();const l=this._listWrapper.getBoundingClientRect(),a=this._listContainer.getBoundingClientRect(),h=this._textInput.getBoundingClientRect(),n=e||window.innerHeight;!o&&(l.top<0||a.bottom+l.height>n)&&(o=!0),r||(i=i||0,t=t||0,o?i=window.innerHeight-h.top+i:i+=a.top,s?t=window.innerWidth-h.right+t:t+=a.left),null!=i&&(this._listWrapper.style[o?"bottom":"top"]=`${i}px`,this._listWrapper.style[o?"top":"bottom"]=""),null!=t&&(this._listWrapper.style[s?"right":"left"]=`${t}px`,this._listWrapper.style[s?"left":"right"]="")}getListPosition(){return this.listOptionsPosition?this.listOptionsPosition:{verticalPosition:this.errorMessage||!this.canShowError||"slim"===this.mode?6:-13}}isDifferentValues(i,t){return r.objectToString(i||{})!==r.objectToString(t||{})}getFormattedText(i){if(null!=i)return this.showSelectedValue&&null!=i.value?i.label?`${i.value} - ${i.label}`:i.value:i.label}getText(){const i=this.getSelectedOption(this.value),t=this.getFormattedText(i);if(null!=t)return String(t).replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,'"')}getSelectedOption(i){return"string"==typeof i||i instanceof String?this._visibleOptions.find((t=>t.value===i)):i}updateVisibleOptions(){let i=this._source||[];if(!this.searchMode&&this._criteria){const t=this._criteria.toUpperCase();i=i.filter((i=>i.label.toLocaleUpperCase().indexOf(t)>-1))}this._visibleOptions=this.suppressEmptyOption?i:[{value:void 0,label:""}].concat(i),this._maxWidthValue=this.getMaxWidthValue()}getMaxWidthValue(){var i;if(this.showOptionValue){const t=[];return null===(i=this._visibleOptions)||void 0===i||i.forEach((i=>{const o=this.getWidthValue(i.value);t.includes(o)||t.push(o)})),t.length>1?Math.max(...t):0}return 0}getWidthValue(i){if(null!=this._itemValueBasis){const t=this._itemValueBasis;if(null!=i)return t.innerHTML=i,t.clientWidth>0?t.clientWidth+2:0;t.innerHTML=""}return 0}buildItem(i,t){const s=this.showOptionValue&&this._maxWidthValue>0?`${this._maxWidthValue}px`:"";return i.label=i.label||i.value,o("li",{class:t===this._preSelection?"item preselected":"item",id:`item_${i.value}`,onMouseDown:()=>this.selectOption(i),onMouseOver:()=>this._preSelection=t},this.showOptionValue?o("span",{class:"item__value",title:i.value,style:{width:s,minWidth:s,maxWidth:s}},i.value):void 0,o("span",{class:"item__label "+(this.showOptionValue?"item__label--bold":""),title:i.label},i.label))}showOptions(){this.enabled&&(this.isOptionsVisible()||(this._resizeObserver&&this._resizeObserver.observe(this._textInput),this._floatingID=l.float(this._listWrapper,this._listContainer,{autoClose:!0,isFixed:!0,backClickListener:()=>this.hideOptions()}),this.setFocus(),window.requestAnimationFrame((()=>{this.updateListPosition(),this.listOptionsPosition||this._listWrapper.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}))))}hideOptions(){void 0!==this._floatingID&&l.close(this._floatingID),this._floatingID=void 0,this._resizeObserver&&this._resizeObserver.unobserve(this._textInput)}isOptionsVisible(){return void 0!==this._floatingID&&l.isFloating(this._floatingID)}nextOption(){this.searchMode&&!this.isOptionsVisible()||(this.showOptions(),this._preSelection=void 0===this._preSelection?0:Math.min(this._preSelection+1,this._visibleOptions.length-1),this.scrollToOption(this._visibleOptions[this._preSelection]))}previousOption(){this._preSelection=void 0===this._preSelection?0:Math.max(this._preSelection-1,0),this.scrollToOption(this._visibleOptions[this._preSelection])}scrollToOption(i){window.requestAnimationFrame((()=>{const t=(null==i?void 0:i.value)?this._optionsList.querySelector(`li#item_${i.value.replace(/[<>\[\]#=]/g,"\\$&").replace(/:/g,"\\:")}`):void 0;t&&t.scrollIntoView({behavior:"smooth",block:"nearest"})}))}selectCurrentOption(){void 0!==this._preSelection?(this.selectOption(this._visibleOptions[this._preSelection]),this._preSelection=void 0):this.controlListWithOnlyOne()}updateSource(i){this._startLoading=!1,i instanceof Promise?(this._showLoading=!0,i.then((i=>{this._showLoading=!1,this.updateSource(i)})).catch((()=>this._showLoading=!1)),this.updateVisibleOptions()):(this._showLoading=!1,Array.isArray(i)?(this._source=i,this.updateVisibleOptions(),this._tabPressed&&(this._tabPressed=!1,this.controlEmptySearch())):this.selectOption(i))}clearSource(){this._source=[],this.updateVisibleOptions()}selectOption(i){var t,o;const s=this.getSelectedOption(this.value);(null===(t=null==s?void 0:s.value)||void 0===t?void 0:t.toString())!==(null===(o=null==i?void 0:i.value)||void 0===o?void 0:o.toString())||null==s&&null!=i&&"value"in i?this.value=(null==i?void 0:i.value)?i:void 0:this.resetOptions(),this.searchMode&&(this._visibleOptions=[],this.clearSource())}loadOptions(i,t=""){this._criteria=t,this._startLoading=!0,this.updateSource(this.optionLoader?this.optionLoader({mode:i,argument:t}):this.options)}cancelPreselection(){!this._textInput.value&&this.value?this.selectOption(void 0):window.setTimeout((()=>{this.setInputValue()}),this._deboucingTime),this.resetOptions()}setInputValue(i=!0){const t=this.getText();(this._textInput.value||"")!==t&&(this._textInput.value=t,i&&(this.errorMessage=null))}clearSearch(){this.value=null}controlListWithOnlyOne(){var i;if(this.searchMode){const t=null===(i=this._visibleOptions)||void 0===i?void 0:i.filter((i=>""!==i.label&&null!=i.value));1===(null==t?void 0:t.length)&&this.selectOption(t[0])}}controlEmptySearch(){var i;this.searchMode&&((null===(i=this._visibleOptions)||void 0===i?void 0:i.length)?this.controlListWithOnlyOne():(this.clearSearch(),n.info(this._textEmptyList)))}validateDescriptionValue(){if(!this.searchMode||a.isEmpty(this.value))return;let i=this.value;"object"!=typeof i&&(a.isEmpty(i)||this.loadDescriptionValue(i))}async loadDescriptionValue(i){var t,o;if(null==i)return;if((null===(t=this.options)||void 0===t?void 0:t.length)>0)return void this.loadOptionValue(i);const s={mode:m.PREDICTIVE,argument:i},e=await(null===(o=this.optionLoader)||void 0===o?void 0:o.call(this,s));null!=e&&(e instanceof Promise?e.then((i=>{this.setDescriptionValue(i)})):this.setDescriptionValue(e))}setDescriptionValue(i){const t=(null==i?void 0:i[0])||i;null!=t&&Object.keys(t).length?(this._lookupMode=!0,this.value=t):this.showNoResultMessage()}loadOptionValue(i){var t;const o=null===(t=this.options)||void 0===t?void 0:t.find((t=>t.value===i));null!=o?this.selectOption(o):this.showNoResultMessage()}async showNoResultMessage(){this.clearSearch(),n.info(this._textEmptySearch.replace("{0}",this.getFieldLabel()))}getFieldLabel(){var i;return null===(i=this.label)||void 0===i?void 0:i.replace(b,"").toUpperCase()}resetOptions(){this.hideOptions(),this._criteria=void 0,this._preSelection=void 0,this.updateVisibleOptions()}componentWillLoad(){if(void 0===this.options){this.options=[];const i=this.el.querySelectorAll("option");i&&i.forEach((i=>{let t=i.innerText,o=i.getAttribute("value");o||(o=t),this.options.push({label:t,value:o}),i.hidden=!0}))}this.searchMode?this.updateSource([]):this.loadOptions(m.PRELOAD)}componentDidRender(){var i;void 0===this._floatingID&&this._listWrapper.remove(),null===(i=this._optionsList)||void 0===i||i.querySelectorAll(".item").forEach((i=>{h.addIDInfoIfNotExists(i,"itemComboBox")})),this.validateDescriptionValue()}componentDidLoad(){c.applyVarsTextInput(this.el,this._textInput),this.setInputValue(!1),this._resizeObserver=new ResizeObserver((i=>{window.requestAnimationFrame((()=>{if(!Array.isArray(i)||!i.length)return;const{clientWidth:t}=this._listContainer;t>0&&this._listWrapper&&(this._listWrapper.style.width=`${t}px`)}))}))}handlerIconClick(){this.searchMode?this.loadOptions(m.ADVANCED):this.showOptions()}buildNumberArgument(i){return this.isTextSearch?NaN:Number(i||void 0)}onTextInputChangeHandler(i){var t;if(this.clearDeboucingTimeout(),this._startLoading)return void(this._changeDeboucingTimeout=window.setTimeout((()=>{this.onTextInputChangeHandler(i)}),this._deboucingTime));const o=null===(t=i.target.value)||void 0===t?void 0:t.trim(),s=this.buildNumberArgument(o);this._criteria||(this._textInput.value=i.data||o),this._criteria=o,o?this.searchMode?(this._showLoading=!1,this.clearSource(),!isNaN(s)||o.length>=this._limitCharsToSearch?(this._showLoading=!0,this._changeDeboucingTimeout=window.setTimeout((()=>{this.loadOptions(m.PREDICTIVE,isNaN(s)?o:s.toString())}),this._deboucingTime),this.showOptions()):this.hideOptions()):(this.updateVisibleOptions(),this.showOptions()):(this.hideOptions(),this.searchMode?(this._showLoading=!1,this.clearSource()):this.updateVisibleOptions())}clearDeboucingTimeout(){this._changeDeboucingTimeout&&(window.clearTimeout(this._changeDeboucingTimeout),this._changeDeboucingTimeout=null)}onTextInputClickHandler(){this.searchMode||this.showOptions()}keyDownHandler(i){switch(this._tabPressed=!1,i.ctrlKey&&("f"!==i.key&&"F"!==i.key||(this.loadOptions(m.ADVANCED),i.stopPropagation(),i.stopImmediatePropagation(),i.preventDefault())),i.key){case"ArrowDown":this.nextOption(),i.stopPropagation();break;case"ArrowUp":this.previousOption(),i.stopPropagation();break;case"Enter":this.selectCurrentOption();break;case"Escape":this.cancelPreselection();break;case"Tab":this._tabPressed=!0,this.controlListWithOnlyOne()}}onTextInputFocusOutHandler(){this.hideErrorOnFocusOut&&this.cancelPreselection()}canShowListOptions(){return!this._showLoading&&this._visibleOptions.length>0}render(){var i;return h.addIDInfoIfNotExists(this.el,"input"),o(s,null,o("ez-text-input",{"data-element-id":h.getInternalIDInfo("textInput"),class:this.suppressSearch?"suppressed-search-input":"",ref:i=>this._textInput=i,"data-slave-mode":"true",enabled:this.enabled&&!this.suppressSearch,onInput:i=>this.onTextInputChangeHandler(i),onClick:()=>this.onTextInputClickHandler(),onFocusout:()=>this.onTextInputFocusOutHandler(),onKeyDown:i=>this.keyDownHandler(i),label:this.label,canShowError:this.canShowError,errorMessage:this.errorMessage,mode:this.mode},o("button",{class:"btn",slot:this.searchMode?"leftIcon":"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.handlerIconClick()},o("ez-icon",{iconName:this.searchMode?"search":"chevron-down"})),this.searchMode&&(null===(i=this._textInput)||void 0===i?void 0:i.value)&&(this._criteria||this.value)?o("button",{class:"btn btn__close",slot:"rightIcon",disabled:!this.enabled,tabindex:-1,onClick:()=>this.clearSearch()},o("ez-icon",{iconName:"close"})):void 0),o("section",{class:"list-container",ref:i=>this._listContainer=i},o("div",{class:"list-wrapper",ref:i=>this._listWrapper=i},o("ul",{class:"list-options",ref:i=>this._optionsList=i},!this._showLoading&&0===this._visibleOptions.length&&o("div",{class:"message"},o("span",{class:"message__no-result"},this._textEmptyList)),this._showLoading&&o("div",{class:"message"},o("div",{class:"message__loading"})),this.showOptionValue?o("span",{class:"item__value item__value--hidden",ref:i=>this._itemValueBasis=i}):void 0,this.canShowListOptions()&&this._visibleOptions.map(((i,t)=>this.buildItem(i,t)))))))}get el(){return e(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"],options:["observeOptions"]}}};var m;!function(i){i.ADVANCED="ADVANCED",i.PRELOAD="PRELOAD",i.PREDICTIVE="PREDICTIVE"}(m||(m={})),d.style=":host{--ez-combo-box--height:42px;--ez-combo-box--width:100%;--ez-combo-box__icon--width:48px;--ez-combo-box--border-radius:var(--border--radius-medium, 12px);--ez-combo-box--border-radius-small:var(--border--radius-small, 6px);--ez-combo-box--font-size:var(--text--medium, 14px);--ez-combo-box--font-family:var(--font-pattern, Arial);--ez-combo-box--font-weight--large:var(--text-weight--large, 500);--ez-combo-box--font-weight--medium:var(--text-weight--medium, 400);--ez-combo-box--background-color--xlight:var(--background--xlight, #fff);--ez-combo-box--background-medium:var(--background--medium, #f0f3f7);--ez-combo-box--line-height:calc(var(--text--medium, 14px) + 4px);--ez-combo-box__input--background-color:var(--background--medium, #e0e0e0);--ez-combo-box__input--border:var(--border--medium, 2px solid);--ez-combo-box__input--border-color:var(--ez-combo-box__input--background-color);--ez-combo-box__input--focus--border-color:var(--color--primary, #008561);--ez-combo-box__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-combo-box__input--disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__input--error--border-color:#CC2936;--ez-combo-box__btn--color:var(--title--primary, #2B3A54);--ez-combo-box__btn-disabled--color:var(--text--disable, #AFB6C0);--ez-combo-box__btn-hover--color:var(--color--primary, #4e4e4e);--ez-combo-box__label--color:var(--title--primary, #2B3A54);--ez-combo-box__list-title--primary:var(--title--primary, #2B3A54);--ez-combo-box__list-text--primary:var(--text--primary, #626e82);--ez-combo-box__list-height:calc(var(--ez-combo-box--font-size) + var(--ez-combo-box--space--medium) + 4px);--ez-combo-box__list-min-width:64px;--ez-combo-box--space--medium:var(--space--medium, 12px);--ez-combo-box--space--small:var(--space--small, 6px);--ez-combo-box__scrollbar--color-default:var(--scrollbar--default, #626e82);--ez-combo-box__scrollbar--color-background:var(--scrollbar--background, #E5EAF0);--ez-combo-box__scrollbar--color-hover:var(--scrollbar--hover, #2B3A54);--ez-combo-box__scrollbar--color-clicked:var(--scrollbar--clicked, #a2abb9);--ez-combo-box__scrollbar--border-radius:var(--border--radius-small, 6px);--ez-combo-box__scrollbar--width:var(--space--medium, 12px);display:flex;flex-wrap:wrap;position:relative;width:var(--ez-combo-box--width)}ez-icon{--ez-icon--color:inherit;font-weight:var(--text-weight--large, 600)}.suppressed-search-input{--ez-text-input__input--border-color:var(--color--strokes, #dce0e8);--ez-text-input__input--disabled--background-color:var(--background--xlight, #fff);--ez-text-input__input--disabled--color:var(--title--primary, #2B3A54)}.list-container{min-width:var(--ez-combo-box__list-min-width);position:relative;width:100%}.list-wrapper{display:flex;flex-direction:column;box-sizing:border-box;width:0;z-index:var(--more-visible, 2);max-height:calc(4*var(--ez-combo-box__list-height) + 2*var(--ez-combo-box--space--small) + 9px);background-color:var(--ez-combo-box--background-color--xlight);border-radius:var(--ez-combo-box--border-radius);box-shadow:var(--shadow, 0px 0px 16px 0px #000);padding:var(--ez-combo-box--space--small)}.list-options{box-sizing:border-box;width:100%;height:100%;padding:0;display:flex;flex-direction:column;scroll-behavior:smooth;overflow:auto;scrollbar-width:thin;gap:3px;scrollbar-color:var(--ez-combo-box__scrollbar--color-clicked) var(--ez-combo-box__scrollbar--color-background)}.list-options::-webkit-scrollbar{background-color:var(--ez-combo-box__scrollbar--color-background);width:var(--ez-combo-box__scrollbar--width);max-width:var(--ez-combo-box__scrollbar--width);min-width:var(--ez-combo-box__scrollbar--width)}.list-options::-webkit-scrollbar-track{background-color:var(--ez-combo-box__scrollbar--color-background);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb{background-color:var(--ez-combo-box__scrollbar--color-default);border-radius:var(--ez-combo-box__scrollbar--border-radius)}.list-options::-webkit-scrollbar-thumb:vertical:hover,.list-options::-webkit-scrollbar-thumb:horizontal:hover{background-color:var(--ez-combo-box__scrollbar--color-hover)}.list-options::-webkit-scrollbar-thumb:vertical:active,.list-options::-webkit-scrollbar-thumb:horizontal:active{background-color:var(--ez-combo-box__scrollbar--color-clicked)}.item{display:flex;align-items:center;width:100%;box-sizing:border-box;list-style-type:none;cursor:pointer;border-radius:var(--ez-combo-box--border-radius-small);padding:var(--ez-combo-box--space--small);min-height:var(--ez-combo-box__list-height);gap:var(--space--small, 6px)}.item__value,.item__label{flex-basis:auto;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size);line-height:var(--ez-combo-box--line-height)}.item__label{font-weight:var(--ez-combo-box--font-weight--medium)}.item__label--bold{font-weight:var(--ez-combo-box--font-weight--large)}.item__value{text-align:center;color:var(--ez-combo-box__list-text--primary);font-weight:var(--ez-combo-box--font-weight--large)}.item__value--hidden{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}.item__label{text-align:left}.message{text-align:center;display:flex;justify-content:center;align-items:center;list-style-type:none;min-height:var(--ez-combo-box__list-height)}.message__no-result{color:var(--ez-combo-box__list-title--primary);font-family:var(--ez-combo-box--font-family);font-size:var(--ez-combo-box--font-size)}.message__loading{border-radius:50%;width:14px;height:14px;-webkit-animation:spin 1s linear infinite;animation:spin 1s linear infinite;border:3px solid var(--ez-combo-box__list-title--primary);border-top:3px solid transparent}li:hover{background-color:var(--ez-combo-box--background-medium)}.preselected{background-color:var(--background--medium)}.btn{outline:none;border:none;background:none;cursor:pointer;color:var(--ez-combo-box__btn--color)}.btn:disabled{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:disabled:hover{cursor:unset;color:var(--ez-combo-box__btn-disabled--color)}.btn:hover{color:var(--ez-combo-box__btn-hover--color)}.btn__close{visibility:hidden}ez-text-input:hover .btn__close,ez-text-input:focus .btn__close{visibility:visible}@-webkit-keyframes spin{0%{-webkit-transform:rotate(0deg)}100%{-webkit-transform:rotate(360deg)}}@keyframes spin{0%{transform:rotate(0deg)}100%{transform:rotate(360deg)}}";export{d as ez_combo_box}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as s,c as t,h as i,g as e}from"./p-e318d280.js";import{C as h}from"./p-7eb3e1a5.js";import{ElementIDUtils as o}from"@sankhyalabs/core";const r=class{constructor(i){s(this,i),this.ezChange=t(this,"ezChange",7),this.value=void 0,this.label=void 0,this.enabled=!0,this.errorMessage=void 0,this.optionLoader=void 0,this.showSelectedValue=!0,this.showOptionValue=!0,this.suppressEmptyOption=!1,this.mode="regular",this.canShowError=!0,this.hideErrorOnFocusOut=!0,this.listOptionsPosition=void 0,this.isTextSearch=!1}observeErrorMessage(){this._comboElement&&(this._comboElement.errorMessage=this.errorMessage)}observeValue(){this._comboElement&&(this._comboElement.value=this.value)}async setFocus(){this._comboElement.setFocus()}async setBlur(){this._comboElement.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async clearValue(){var s,t;null===(t=null===(s=this._comboElement)||void 0===s?void 0:s.clearValue)||void 0===t||t.call(s)}async getValueAsync(){var s;return null===(s=this._comboElement)||void 0===s?void 0:s.getValueAsync()}onComboChange(s){s.stopPropagation(),this.value=s.detail,this.ezChange.emit(s.detail),this.errorMessage!==this._comboElement.errorMessage&&(this.errorMessage=this._comboElement.errorMessage)}componentDidLoad(){h.applyVarsTextInput(this._elem,this._comboElement)}render(){return o.addIDInfoIfNotExists(this._elem,"input"),i("ez-combo-box",{"data-element-id":o.getInternalIDInfo("combo"),ref:s=>this._comboElement=s,value:this.value,label:this.label,enabled:this.enabled,errorMessage:this.errorMessage,hideErrorOnFocusOut:this.hideErrorOnFocusOut,optionLoader:this.optionLoader,searchMode:!0,onEzChange:s=>this.onComboChange(s),showSelectedValue:this.showSelectedValue,showOptionValue:this.showOptionValue,suppressEmptyOption:this.suppressEmptyOption,mode:this.mode,canShowError:this.canShowError,listOptionsPosition:this.listOptionsPosition,isTextSearch:this.isTextSearch})}get _elem(){return e(this)}static get watchers(){return{errorMessage:["observeErrorMessage"],value:["observeValue"]}}};r.style=":host{width:100%}";export{r as ez_search}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{UserInterface as e}from"@sankhyalabs/core";import{A as s}from"./p-
|
|
1
|
+
import{UserInterface as e}from"@sankhyalabs/core";import{A as s}from"./p-ca9aa20c.js";const r=(s,r)=>{let t,i,{name:a,label:o,group:n}=Object.assign({},r),{readOnly:l,required:c}=Object.assign({},r);return s&&(o=o||s.label,a=a||s.name,c=s.required||(null==r?void 0:r.required),l=s.readOnly||(null==r?void 0:r.readOnly),t=s.properties,i=s.userInterface),{name:a,label:o,group:n,readOnly:l,required:c,props:t,userInterface:i||e.SHORTTEXT}};class t{constructor(e,s,r){this._dataUnit=e,this._validationSource=s,this._validator=r}validate(){return new Promise(((e,s)=>{const r=this._dataUnit.getModifiedRecords();for(let e=0;e<r.length;e++){const t=r[e],i=[];let a=this.validateRequired(t);if(a&&!a.isValid&&i.push(a),this._validator&&(a=this._validator.validateRecord(t),a&&!a.isValid&&i.push(a)),i.length>0){this.processValidationResult(i,t.__record__id__),s();break}}return e()}))}validateRequired(e){const s=this._validationSource.getRequiredFields(),r=[];if(new Set(s).forEach((s=>{const t=e[s];if(null==t||""===t){const t=this._validationSource.getMessageForField(s,e.__record__id__);r.push(t?{name:s,message:t}:{name:s,message:"Essa informação é obrigatória"})}})),r.length>0)return{isValid:!1,invalidFields:r,infoMessage:"Há pelo menos um campo obrigatório não preenchido."}}processValidationResult(e,r){e.forEach((e=>{const t=e.invalidFields;if(t&&t.forEach((e=>{this.markAsInvalid(e,r)})),e.infoMessage&&s.info(e.infoMessage),e.errorMessage){const{errorTitle:r,errorMessage:t}=e;s.error(r,t)}}))}markAsInvalid(e,s){this._dataUnit.setInvalidField(e.name,e.message,s),this._validationSource.markAsInvalid(e,s)}}export{t as R,r as b}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as o,H as n,g as s}from"./p-e318d280.js";import{FloatingManager as
|
|
1
|
+
import{r as t,c as i,h as o,H as n,g as s}from"./p-e318d280.js";import{FloatingManager as a,ElementIDUtils as e}from"@sankhyalabs/core";import"./p-ca9aa20c.js";import{C as r}from"./p-7eb3e1a5.js";import"./p-ab574d59.js";import"./p-b853763b.js";const c=class{constructor(o){t(this,o),this.ezAction=i(this,"ezAction",7),this._arrowOffset=5,this.innerClickCheck=(t,i)=>{var o;if(i&&t){if(i===t)return!0;const n=t.children;for(let t=0;t<n.length;t++)if(null===(o=n[t].shadowRoot)||void 0===o?void 0:o.contains(i))return!0}return!1},this._selectedAction=void 0,this.enabled=!0,this.actions=void 0,this.size="medium",this.showLabel=!1,this.displayIcon=void 0,this.checkOption=!1,this.value=void 0,this.isTransparent=!1,this.arrowActive=!1}async hideActions(){null!=this._floatingID&&a.close(this._floatingID),this._floatingID=void 0}async isOpened(){return null!=this._floatingID}getFloatOptions(){return{autoClose:!0,innerClickTest:this.innerClickCheck,isFixed:!0,top:this.getPositionTop(),left:this.getPositionLeft()}}getSideLimit(){var t;const i=document.body.clientWidth,o=null===(t=this._actionsList)||void 0===t?void 0:t.getBoundingClientRect();if((null==o?void 0:o.right)>i)return i-o.width+"px"}showActions(){if(!this.enabled)return;const t=this.getFloatOptions();this._floatingID=a.float(this._actionsList,this._listContainer,t);const i=this.getSideLimit();null!=i&&(t.left=i,a.updateFloatPosition(this._actionsList,this._listContainer,t)),window.requestAnimationFrame((()=>{this._actionsList.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})}))}updatePosition(){if(!this.enabled||null==this._floatingID)return;const t=this.getFloatOptions(),i=this.getSideLimit();null!=i&&(t.left=i),a.updateFloatPosition(this._actionsList,this._listContainer,t)}getPositionTop(){var t;const i=null===(t=this._element)||void 0===t?void 0:t.getBoundingClientRect();return null==i?null:i.y+i.height+"px"}getBoundingLeft(){var t;const i=null===(t=this._element)||void 0===t?void 0:t.getBoundingClientRect();return null==i?null:i.x-(this.arrowActive?this._arrowOffset:0)+"px"}getPositionLeft(){return this.getBoundingLeft()||(this.arrowActive?`-${this._arrowOffset}px`:null)}hasLabelOrCheckOption(){var t;return(this.showLabel||this.checkOption)&&(null===(t=this.actions)||void 0===t?void 0:t.length)>0}hasIconName(){var t;return null===(t=this.actions)||void 0===t?void 0:t.some((t=>null!=t.iconName))}controlScrollPage(){window.removeEventListener("scroll",this.updatePosition.bind(this)),window.addEventListener("scroll",this.updatePosition.bind(this))}handlerButtonClick(){this.showActions()}actionClick(t){this._selectedAction=t,this.hideActions(),this.ezAction.emit(t)}componentWillLoad(){if(null==this.actions){this.actions=[];const t=this._element.querySelectorAll("action");t&&t.forEach((t=>{let i=t.innerText,o=t.getAttribute("value"),n=!("false"===t.getAttribute("enabled"));o||(o=i),this.actions.push({label:i,value:o,enabled:n}),t.hidden=!0}))}}componentDidLoad(){r.applyVarsButton(this._element,this._button),e.addIDInfo(this._element),this.controlScrollPage()}componentDidRender(){null==this._floatingID&&this._actionsList.remove(),this.hasLabelOrCheckOption()&&(this.value?this._selectedAction=this.actions.find((t=>t.value===this.value)):this._selectedAction||(this._selectedAction=this.actions[0]))}render(){var t;return o(n,null,o("ez-button",{ref:t=>this._button=t,class:(this.isTransparent?"ez-actions-button__btn-transparent":"")+(this.showLabel?" ez-actions-button__btn-label":""),label:this.showLabel&&(null===(t=this._selectedAction)||void 0===t?void 0:t.label),enabled:this.enabled,mode:this.showLabel?void 0:"icon",iconName:this.showLabel?"":this.displayIcon||"dots-vertical",size:this.size,onClick:()=>this.handlerButtonClick()},this.showLabel&&o("ez-icon",{class:"ez-actions-button__icon-right",slot:"rightIcon",iconName:this.displayIcon||"dots-vertical"})),o("section",{class:"ez-actions-button__list-container",ref:t=>this._listContainer=t},this.arrowActive&&o("div",{class:"ez-actions-button__arrow ez-actions-button__arrow--"+(this.size||"small")+(this.isTransparent?" ez-actions-button__arrow--upped":"")}),o("div",{ref:t=>this._actionsList=t,class:"ez-actions-button__actions-list"+(this.arrowActive&&!this.isTransparent?" ez-actions-button__actions-list--lowered":"")},this.actions.map((t=>{var i;return o("ez-button",{size:"small",label:t.label,onClick:()=>this.actionClick(t),enabled:t.enabled,class:"ez-actions-button__btn-action"+(this.checkOption||this.hasIconName()?" ez-actions-button__btn-action--spaced":"")},this.checkOption&&(null===(i=this._selectedAction)||void 0===i?void 0:i.value)===t.value&&o("ez-icon",{class:"ez-actions-button__icon-check",slot:"leftIcon",size:"small",iconName:"check"}),!this.checkOption&&t.iconName&&o("ez-icon",{class:"ez-actions-button__icon-item",slot:"leftIcon",size:"small",iconName:t.iconName}))})))))}get _element(){return s(this)}};c.style=":host{--ez-actions-button__actions-list--border-radius:var(--border--radius-medium, 12px);--ez-actions-button__actions-list--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-actions-button__actions-list--background-color:var(--background--xlight, #fff);--ez-actions-button__actions-list--padding:var(--space--small, 6px);--ez-actions-button__actions-list--top-margin:var(--space-small, 6px);--ez-actions-button__btn-action--min-width:'auto';--ez-actions-button__btn-action--background-color:var(--background--xlight, #fff);display:flex;flex-direction:column;height:fit-content;user-select:none}.ez-actions-button__actions-list{display:flex;flex-direction:column;position:fixed;width:fit-content;height:fit-content;z-index:var(--more-visible, 2);padding:var(--ez-actions-button__actions-list--padding);margin-top:var(--ez-actions-button__actions-list--top-margin);background-color:var(--ez-actions-button__actions-list--background-color);border-radius:var(--ez-actions-button__actions-list--border-radius);box-shadow:var(--ez-actions-button__actions-list--box-shadow)}.ez-actions-button__actions-list--lowered{margin-top:calc(var(--ez-actions-button__actions-list--top-margin) + 6px)}.ez-actions-button__btn-action{--ez-button--justify-content:flex-start;--ez-button--width:100%;--ez-button--min-width:var(--ez-actions-button__btn-action--min-width);--ez-button--background-color:var(--ez-actions-button__btn-action--background-color);--ez-button--font-weight:var(--text-weight--medium, 400);--ez-button--padding-left:var(--space--medium, 12px);--ez-button--padding-right:var(--space--medium, 12px)}.ez-actions-button__btn-action--spaced{--ez-button--padding-left:calc(var(--space--medium, 12px) + 24px)}.ez-actions-button__icon-right{margin-left:var(--space--small, 6px)}.ez-actions-button__icon-check,.ez-actions-button__icon-item{position:absolute;left:var(--space--medium, 12px)}.ez-actions-button__icon-check{color:var(--ez-button--hover-color)}.ez-actions-button__arrow{position:absolute;border-left:10px solid transparent;border-right:10px solid transparent;width:0;height:0;z-index:calc(var(--more-visible, 2) + 1);border-bottom:15px solid var(--ez-actions-button__btn-action--background-color)}.ez-actions-button__arrow--upped{margin-top:calc((var(--ez-actions-button__actions-list--top-margin) + 2px) * -1)}.ez-actions-button__arrow--small{margin-left:6px}.ez-actions-button__arrow--medium{margin-left:11px}.ez-actions-button__arrow--large{margin-left:13px}.ez-actions-button__arrow:only-child{display:none}.ez-actions-button__btn-transparent{--ez-button--background-color:transparent;--ez-button--hover--background-color:transparent;--ez-button--active--background-color:transparent;--ez-button--focus--border:none}.ez-actions-button__btn-label{--ez-button--padding-left:var(--space--medium, 12px);--ez-button--padding-right:var(--space--medium, 12px)}.ez-actions-button__list-container{position:relative}";export{c as ez_actions_button}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as l,c as e,h as i,g as o}from"./p-e318d280.js";import{ElementIDUtils as t}from"@sankhyalabs/core";import{A as s}from"./p-
|
|
1
|
+
import{r as l,c as e,h as i,g as o}from"./p-e318d280.js";import{ElementIDUtils as t}from"@sankhyalabs/core";import{A as s}from"./p-ca9aa20c.js";import"./p-ab574d59.js";import"./p-b853763b.js";const a=class{constructor(i){l(this,i),this.ezChange=e(this,"ezChange",7),this.ezRemove=e(this,"ezRemove",7),this.ezSaveEditLabel=e(this,"ezSaveEditLabel",7),this.ezEditLabelMode=e(this,"ezEditLabelMode",7),this._activeEditText=!1,this.value=!1,this.boxBordered=!1,this.label=void 0,this.subtitle=void 0,this.headerSize="small",this.iconPlacement="left",this.headerAlign="left",this.removable=!1,this.editable=!1,this.conditionalSave=void 0}async showHide(){this.value=!this.value}async applyFocusTextEdit(){var l;null===(l=this._refTextEdit)||void 0===l||l.applyFocusSelect()}async cancelEdition(){this._activeEditText=!1,this.ezEditLabelMode.emit(this._activeEditText)}observeCollapsedValue(){this.ezChange.emit(this.value)}getHeaderSize(){const l=this.headerSize&&this.headerSize.toLowerCase(),e=["xsmall","xlarge"].includes(l)?l.replace("x","x-"):l;return["x-small","small","medium","large","x-large"].includes(e)?e:"small"}removeElement(){this._hostElement&&this._hostElement.remove(),this.ezRemove.emit(this)}editLabel(l){l.preventDefault(),l.stopPropagation(),this._activeEditText=!0,this.ezEditLabelMode.emit(this._activeEditText)}confirmRemove(l){l.preventDefault(),l.stopPropagation(),s.confirm("Aviso",`Deseja realmente remover o grupo <b>${this.label}</b>?`).then((l=>{l&&this.removeElement()}))}saveEditionText(l){const{value:e,newValue:i}=l.detail;if(e===i)return void this.cancelEdition();let o=!0;this.conditionalSave&&(o=this.conditionalSave(i)),this.label!==i&&o&&(this.label=i,this._activeEditText=!1,this.ezSaveEditLabel.emit(l.detail),this.ezEditLabelMode.emit(this._activeEditText))}getStyledLabel(){if(null!=this._refLabel)return{fontSize:window.getComputedStyle(this._refLabel).getPropertyValue("font-size"),fontWeight:window.getComputedStyle(this._refLabel).getPropertyValue("font-weight"),fontFamily:window.getComputedStyle(this._refLabel).getPropertyValue("font-family")}}componentDidLoad(){t.addIDInfo(this._hostElement)}render(){return i("div",{class:`collapsible-box ${this.boxBordered&&"collapsable-box--bordered"}`},i("div",{class:"collapsible-box__header"},i("button",Object.assign({},this._activeEditText?null:{onClick:()=>{this.showHide()}},{class:"collapsible-box__title collapsible-box__title--"+(this.headerAlign||"left")+("right"===this.iconPlacement?" collapsible-box__title--icon-right":"")+(this.value?" collapsible-box__title--no-margin":"")}),i("ez-icon",{slot:"icon","icon-name":"chevron-right",size:this.getHeaderSize(),class:"collapsible-box__icon collapsible-box__icon--"+this.getHeaderSize()+(this.value?" collapsible-box__icon--collapsed":""),id:"toggleCollapsible"}),this._activeEditText?i("ez-text-edit",{class:"collapsible-box__text-edit",ref:l=>this._refTextEdit=l,value:this.label,styled:this.getStyledLabel(),onSaveEdition:l=>this.saveEditionText(l),onCancelEdition:()=>this.cancelEdition()}):i("label",{class:"collapsible-box__label font--"+this.getHeaderSize(),title:this.label,ref:l=>this._refLabel=l},i("span",null,this.label),this.editable&&i("ez-icon",{slot:"icon","icon-name":"edit",onClick:l=>this.editLabel(l),title:"Editar"}),this.removable&&i("ez-icon",{slot:"icon","icon-name":"delete",onClick:l=>this.confirmRemove(l),title:"Remover"}))),i("slot",{name:"rightSlot"})),i("div",{class:"collapsible-box__content"+(this.value?"":" collapsible-box__content--show")},this.subtitle&&i("div",{class:"subtitle-box__content"},i("label",{class:"subtitle-box__label",title:this.subtitle},i("span",null,this.subtitle))),i("slot",null)))}get _hostElement(){return o(this)}static get watchers(){return{value:["observeCollapsedValue"]}}};a.style=":host{--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--subtitle--font-size:var(--text--medium, 14px);--ez-collapsible-box--subtitle--font-family:var(--font-pattern, 'Roboto');--ez-collapsible-box--subtitle--font-weight:var(--text-weight--medium, 400);--ez-collapsible-box--subtitle--color:var(--text--primary);--ez-collapsible-box--subtitle--margin-bottom:var(--space--medium, 12px);--ez-collapsible-box--focus--color:var(--color--primary-600);--ez-collapsible-box__icon--color:var(--ez-collapsible-box--color);--ez-collapsible-box__header--padding-top:0px;--ez-collapsible-box__header--padding-bottom:0px;--ez-collapsible-box__header--padding-right:0px;--ez-collapsible-box__header--padding-left:0px;display:flex;flex-wrap:wrap;width:100%}ez-icon{--ez-icon--color:inherit}.collapsible-box{display:flex;flex-direction:column;width:100%}.collapsable-box--bordered{border:var(--border--small);border-color:var(--color--strokes);border-radius:var(--border--radius-medium);padding:var(--space--xs)}.collapsible-box__header{display:flex;box-sizing:border-box;padding-top:var(--ez-collapsible-box__header--padding-top);padding-bottom:var(--ez-collapsible-box__header--padding-bottom);padding-right:var(--ez-collapsible-box__header--padding-right);padding-left:var(--ez-collapsible-box__header--padding-left)}.collapsible-box__title{position:relative;width:auto;display:flex;box-sizing:border-box;align-items:center;outline:none;border:none;background-color:unset;cursor:pointer;padding:0px;text-align:left;color:var(--ez-collapsible-box--color);--ez-icon--color:var(--ez-collapsible-box__icon--color);margin-bottom:var(--space--medium, 12px)}.collapsible-box__title:focus{color:var(--ez-collapsible-box--focus--color);--ez-icon--color:var(--ez-collapsible-box--focus--color)}.collapsible-box__label{display:flex;white-space:nowrap;overflow:hidden;cursor:pointer;text-overflow:ellipsis;box-sizing:border-box;margin-left:6px;gap:6px;font-family:var(--ez-collapsible-box--font-family);font-size:var(--ez-collapsible-box--font-size);font-weight:var(--ez-collapsible-box--font-weight)}.subtitle-box__label{display:flex;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;font-family:var(--ez-collapsible-box--subtitle--font-family);font-size:var(--ez-collapsible-box--subtitle--font-size);font-weight:var(--ez-collapsible-box--subtitle--font-weight);color:var(--ez-collapsible-box--subtitle--color);margin-bottom:var(--ez-collapsible-box--subtitle--margin-bottom)}.subtitle-box__content{width:100%}.collapsible-box__label ez-icon{visibility:hidden;transition:0.25s linear}.collapsible-box__label:hover ez-icon{visibility:visible}.collapsible-box__text-edit{margin-left:6px}.collapsible-box__icon{transform:rotate(90deg) translate(0px, 14%);transition:transform var(--transition)}.collapsible-box__icon--collapsed{transform:rotate(0deg) translate(-14%, 0px)}.collapsible-box__title--icon-right{flex-direction:row-reverse}.collapsible-box__title--icon-right .collapsible-box__icon{transform:rotate(90deg) translate(0px, -14%)}.collapsible-box__title--icon-right .collapsible-box__icon--collapsed{transform:rotate(0deg) translate(14%, 0px)}.collapsible-box__title--icon-right .collapsible-box__label{margin-left:0px;margin-right:6px}.collapsible-box__title--left{margin-right:auto}.collapsible-box__title--right{margin-left:auto}.collapsible-box__title--center{margin-left:auto;margin-right:auto}.collapsible-box__title--stretch{justify-content:space-between;width:100%}.collapsible-box__title--no-margin{margin-bottom:0}.collapsible-box__content{display:flex;flex-wrap:wrap;width:100%;height:0px;max-height:0px;opacity:0;overflow:hidden;transition:all var(--transition, 0.5s)}.collapsible-box__content--show{height:100%;max-height:none;opacity:1;overflow:visible;transition:all var(--transition, 0.5s)}.font--x-small{font-size:10px}.font--small{font-size:12px}.font--medium{font-size:14px}.font--large{font-size:16px}.font--x-large{font-size:20px}";export{a as ez_collapsible_box}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{D as t}from"./p-ab574d59.js";let n;const e=new Uint8Array(16);function o(){if(!n&&(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!n))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(e)}const c=[];for(let t=0;t<256;++t)c.push((t+256).toString(16).slice(1));const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function s(t,n,e){if(r.randomUUID&&!n&&!t)return r.randomUUID();const s=(t=t||{}).random||(t.rng||o)();if(s[6]=15&s[6]|64,s[8]=63&s[8]|128,n){e=e||0;for(let t=0;t<16;++t)n[e+t]=s[t];return n}return function(t,n=0){return c[t[n+0]]+c[t[n+1]]+c[t[n+2]]+c[t[n+3]]+"-"+c[t[n+4]]+c[t[n+5]]+"-"+c[t[n+6]]+c[t[n+7]]+"-"+c[t[n+8]]+c[t[n+9]]+"-"+c[t[n+10]]+c[t[n+11]]+c[t[n+12]]+c[t[n+13]]+c[t[n+14]]+c[t[n+15]]}(s)}class i{static async showDialog(n,e,o=null,c,r=t.DEFAULT,s){return s&&(s=Object.assign(Object.assign({},i.defaultMessageOptions),s)),new Promise((t=>{let i=document.createElement("ez-dialog");window.document.body.appendChild(i),i.show(n,e,r,c,o,s.labelCancel,s.labelConfirm,s.btnConfirmDanger,s.beforeClose).then((n=>(i.remove(),t(n))))}))}static async alert(n,e,o=null,c=i.defaultMessageOptions){return i.showDialog(n,e,o,!1,t.WARN,c)}static async error(n,e,o=null,c=i.defaultMessageOptions){return i.showDialog(n,e,o,!1,t.CRITICAL,c)}static async success(n,e,o=null,c=i.defaultMessageOptions){return i.showDialog(n,e,o,!1,t.SUCCESS,c)}static async confirm(n,e,o=null,c=t.WARN,r=i.defaultMessageOptions){return i.showDialog(n,e,o,!0,c,r)}static async message(n,e,o=null,c=i.defaultMessageOptions){return i.showDialog(n,e,o,!1,t.DEFAULT,c)}static async info(t,n=i.defaultMessageOptions){n!==i.defaultMessageOptions&&(n=Object.assign(Object.assign({},i.defaultMessageOptions),n));let e=!1,o=document.querySelector("ez-toast");if(!o){o=document.createElement("ez-toast");const t=document.createElement("ez-icon");t.className="ez-margin-right--small",t.slot="icon",t.style.setProperty("--ez-icon--color","var(--color--success)"),o.appendChild(t),window.document.body.appendChild(o)}if(n.iconName){const t=o.querySelector("ez-icon");t&&(t.iconName=n.iconName,e=!0)}else e=!1;o.show(t,5e3,e,n.canClose)}static async showModal(t){t=Object.assign(Object.assign({},i.defaultModalProps),t);const n=document.createElement("ez-modal");return window.document.body.appendChild(n),n.setAttribute("id",s()),n.modalSize=t.size,n.align=t.position,n.heightMode=t.heightMode,n.closeEsc=t.closeEsc,n.closeOutsideClick=t.closeOutsideClick,n.scrim=t.useScrimLight?"light":"medium",t.content instanceof String||"string"==typeof t.content?n.innerHTML=t.content:n.appendChild(t.content),n.opened=!0,()=>n.remove()}}i.defaultMessageOptions={canClose:!0,labelCancel:"Não",labelConfirm:"Sim",btnConfirmDanger:!1},i.defaultModalProps={content:null,position:"right",size:"small",heightMode:"regular",closeOutsideClick:!0,closeEsc:!0};export{i as A}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as t,c as i,h as s,H as e,g as n}from"./p-e318d280.js";import{ElementIDUtils as o}from"@sankhyalabs/core";import{A as l}from"./p-
|
|
1
|
+
import{r as t,c as i,h as s,H as e,g as n}from"./p-e318d280.js";import{ElementIDUtils as o}from"@sankhyalabs/core";import{A as l}from"./p-ca9aa20c.js";import"./p-ab574d59.js";import"./p-b853763b.js";const a=class{constructor(s){t(this,s),this.saveEdition=i(this,"saveEdition",7),this.cancelEdition=i(this,"cancelEdition",7),this._newValue=void 0,this.value=void 0,this.styled=void 0}async applyFocusSelect(){this.calcSizeInput(this.value,!0)}calcSizeInput(t,i=!1){var s,e;const n=null===(e=null===(s=this._inputElement)||void 0===s?void 0:s.shadowRoot)||void 0===e?void 0:e.querySelector("input");if(null!=n){const s=this.getWidthValue(t);n.style.width=s+"px",i&&setTimeout((()=>n.select()),100)}}getWidthValue(t){if(null!=this._valueBasis){const i=this._valueBasis;if(null!=t){const s=2;return i.innerHTML=t,i.clientWidth>0?i.clientWidth+s:s}i.innerHTML=""}return 0}setStyledInput(){var t,i;let s="",e="",n="";null!=this.styled&&(s=this.styled.fontSize,e=this.styled.fontWeight,n=this.styled.fontFamily);const o=null===(i=null===(t=this._inputElement)||void 0===t?void 0:t.shadowRoot)||void 0===i?void 0:i.querySelector("input");null!=o&&(o.style.fontSize=s,o.style.fontWeight=e,o.style.fontFamily=n);const l=this._valueBasis;null!=l&&(l.style.fontSize=s,l.style.fontWeight=e,l.style.fontFamily=n)}handleSaveEdition(){this._newValue?this.saveEdition.emit({value:this.value,newValue:this._newValue}):l.alert("Aviso","Não é possível salvar um campo em branco.").then((()=>{this.setNewValue(this.value,!0)}))}handleCancelEdition(){this.cancelEdition.emit()}setNewValue(t,i=!1){this._newValue=t,this.calcSizeInput(this._newValue,i)}componentDidLoad(){this.applyFocusSelect(),this.setNewValue(this.value)}componentDidRender(){this.setStyledInput()}render(){return o.addIDInfoIfNotExists(this._element,"input"),s(e,null,s("span",{class:"text-edit__hidden-value",ref:t=>this._valueBasis=t}),s("ez-text-input",{"data-element-id":o.getInternalIDInfo("textInput"),onInput:()=>{this.calcSizeInput(this._newValue)},class:"text-edit__form-input",value:this._newValue,ref:t=>this._inputElement=t,mode:"slim",onEzChange:t=>this.setNewValue(null==t?void 0:t.detail),noBorder:!0}),s("ez-button",{class:"text-edit__icon-check",mode:"icon",iconName:"check",size:"small",onClick:()=>{this.handleSaveEdition()}}),s("ez-button",{class:"text-edit__icon-close",mode:"icon",iconName:"close",size:"small",onClick:()=>{this.handleCancelEdition()}}))}get _element(){return n(this)}};a.style=":host{display:flex;align-items:center;gap:5px}.text-edit__form-input{width:auto;--ez-text-input__input--padding:0px}.text-edit__hidden-value{visibility:hidden;position:absolute;white-space:nowrap;z-index:-1;top:0;left:0}";export{a as ez_text_edit}
|
|
@@ -75,10 +75,18 @@ export declare class EzComboBox {
|
|
|
75
75
|
* Define o tamanho do campo.
|
|
76
76
|
*/
|
|
77
77
|
mode: "slim" | "regular";
|
|
78
|
+
/**
|
|
79
|
+
* Quando verdadeiro deixa de exibir a mensagem de erro (se existente) quando focar em um elemento diferente.
|
|
80
|
+
*/
|
|
81
|
+
hideErrorOnFocusOut: boolean;
|
|
78
82
|
/**
|
|
79
83
|
* Define um posicionamento fixo para a lista de opções do CheckBox.
|
|
80
84
|
*/
|
|
81
85
|
listOptionsPosition: IEzCheckBoxListPosition;
|
|
86
|
+
/**
|
|
87
|
+
* Informa se a pesquisa é do tipo texto.
|
|
88
|
+
*/
|
|
89
|
+
isTextSearch: boolean;
|
|
82
90
|
/**
|
|
83
91
|
* Emitido quando acontece a alteração de valor do campo.
|
|
84
92
|
*/
|
|
@@ -141,6 +149,7 @@ export declare class EzComboBox {
|
|
|
141
149
|
componentDidRender(): void;
|
|
142
150
|
componentDidLoad(): void;
|
|
143
151
|
private handlerIconClick;
|
|
152
|
+
private buildNumberArgument;
|
|
144
153
|
private onTextInputChangeHandler;
|
|
145
154
|
private clearDeboucingTimeout;
|
|
146
155
|
private onTextInputClickHandler;
|
|
@@ -2,6 +2,7 @@ import { DataUnit } from "@sankhyalabs/core";
|
|
|
2
2
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
3
3
|
import { Tab } from "../ez-tabselector/ez-tabselector";
|
|
4
4
|
import { IFormConfig, IRecordValidator } from "../../utils/form/interfaces";
|
|
5
|
+
import { FormItems } from "../ez-form-view/structure";
|
|
5
6
|
export declare class EzForm {
|
|
6
7
|
private _element;
|
|
7
8
|
private _store;
|
|
@@ -24,6 +25,10 @@ export declare class EzForm {
|
|
|
24
25
|
* Evento disparado quando o formulário está disponível na DOM.
|
|
25
26
|
*/
|
|
26
27
|
ezReady: EventEmitter<void>;
|
|
28
|
+
/**
|
|
29
|
+
* Responsável por notificar quando ocorrer a renderização de itens do formulário.
|
|
30
|
+
*/
|
|
31
|
+
formItemsReady: EventEmitter<FormItems>;
|
|
27
32
|
/**
|
|
28
33
|
* Realiza validação no conteúdo de todos os campos.
|
|
29
34
|
*/
|
|
@@ -1,11 +1,16 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
2
|
import { IFormViewField } from './interfaces/IFormViewField';
|
|
3
|
+
import { FormItems } from './structure';
|
|
3
4
|
export declare class EzFormView {
|
|
4
5
|
_element: HTMLEzFormViewElement;
|
|
5
6
|
/**
|
|
6
7
|
* Evento emitido quando o componente foi totalmente carregado na DOM.
|
|
7
8
|
*/
|
|
8
9
|
ezContentReady: EventEmitter<Array<HTMLElement>>;
|
|
10
|
+
/**
|
|
11
|
+
* Responsável por notificar quando ocorrer a renderização de itens do formulário.
|
|
12
|
+
*/
|
|
13
|
+
formItemsReady: EventEmitter<FormItems>;
|
|
9
14
|
/**
|
|
10
15
|
* Define a lista de metadados usada para criar os campos de user interface.
|
|
11
16
|
*/
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
declare class FormItem {
|
|
2
|
+
private elem;
|
|
3
|
+
constructor(elem: HTMLElement);
|
|
4
|
+
addRightElement(el: Element): void;
|
|
5
|
+
removeRightElement(): void;
|
|
6
|
+
get fieldName(): string;
|
|
7
|
+
}
|
|
8
|
+
export declare class FormItems {
|
|
9
|
+
items: Map<string, FormItem>;
|
|
10
|
+
private formId;
|
|
11
|
+
constructor(items: Array<HTMLElement>, formId?: string);
|
|
12
|
+
getItem(name: string): FormItem;
|
|
13
|
+
get formName(): string;
|
|
14
|
+
}
|
|
15
|
+
export {};
|
|
@@ -2,7 +2,7 @@ import { IHeaderParams } from 'ag-grid-community';
|
|
|
2
2
|
export interface IEzGridCustomHeaderParams {
|
|
3
3
|
tooltip?: string;
|
|
4
4
|
hasFilter?: () => boolean;
|
|
5
|
-
showColumnFilter?: (leftPosition: string) => void;
|
|
5
|
+
showColumnFilter?: (leftPosition: string, fromIcon: boolean) => void;
|
|
6
6
|
}
|
|
7
7
|
export declare class EzGridCustomHeader {
|
|
8
8
|
private params;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { DataUnit } from '@sankhyalabs/core';
|
|
2
2
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
3
3
|
import { IMultiSelectionListDataSource } from '../ez-multi-selection-list/interfaces/IMultiSelectionListDataSource';
|
|
4
|
-
import {
|
|
4
|
+
import { EzGridColumn, EzGridColumnConfig, EzGridColumStateEvent, IGridConfig, IStatusResolver, StatusResolverFunction } from './controller/EzGridController';
|
|
5
5
|
import { ISelection, ISelectionToastConfig } from './interfaces';
|
|
6
6
|
import { IRecordValidator } from '../../utils/form/interfaces';
|
|
7
7
|
export declare class EzGrid {
|
|
@@ -19,7 +19,7 @@ export declare class EzGrid {
|
|
|
19
19
|
private _isAllSelection;
|
|
20
20
|
private _currentPageSelected;
|
|
21
21
|
private _selectionCount;
|
|
22
|
-
private
|
|
22
|
+
private _hasLeftButtons;
|
|
23
23
|
/**
|
|
24
24
|
* Emitido quando acontece a alteração de estado das colunas do grid: Ordenação, largura, etc.
|
|
25
25
|
*/
|
|
@@ -133,9 +133,7 @@ export declare class EzGrid {
|
|
|
133
133
|
componentWillRender(): void;
|
|
134
134
|
componentDidRender(): void;
|
|
135
135
|
componentWillLoad(): void;
|
|
136
|
-
onDataUnitAction: (action: any) => void;
|
|
137
136
|
private getDataSource;
|
|
138
|
-
private
|
|
139
|
-
private formatLabel;
|
|
137
|
+
private hideHeader;
|
|
140
138
|
render(): any;
|
|
141
139
|
}
|
|
@@ -5,6 +5,8 @@ import { IMultiSelectionOption } from '../../ez-multi-selection-list/interfaces/
|
|
|
5
5
|
export declare class FilterColumn {
|
|
6
6
|
private readonly TOP_POSITION;
|
|
7
7
|
private readonly TOP_POSITION_HEADER_HIDDEN;
|
|
8
|
+
private readonly TOP_POSITION_NO_TASKBAR;
|
|
9
|
+
private readonly TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN;
|
|
8
10
|
private readonly DEFAULT_HEIGHT;
|
|
9
11
|
private ezPopoverElement;
|
|
10
12
|
private ezMultiSelectionList;
|
|
@@ -13,19 +15,24 @@ export declare class FilterColumn {
|
|
|
13
15
|
columnName: string;
|
|
14
16
|
columnLabel: string;
|
|
15
17
|
gridHeaderHidden: boolean;
|
|
18
|
+
noHeaderTaskBar: boolean;
|
|
16
19
|
dataSource: IMultiSelectionListDataSource;
|
|
17
20
|
dataUnit: DataUnit;
|
|
18
21
|
options: IMultiSelectionOption[];
|
|
19
22
|
selectedItems: IMultiSelectionOption[];
|
|
20
23
|
fieldDescriptor: FieldDescriptor;
|
|
21
24
|
useOptions: boolean;
|
|
25
|
+
isTextSearch: boolean;
|
|
22
26
|
hide(): Promise<void>;
|
|
23
27
|
/**
|
|
24
28
|
* Abre o filtro de coluna.
|
|
25
29
|
* @Params IFilterColumnConfigs informações para configurar o filtro
|
|
26
30
|
*/
|
|
27
31
|
show(configs: IFilterColumnConfigs): Promise<void>;
|
|
32
|
+
private calculateLeftPosition;
|
|
33
|
+
private buildIsTextSearch;
|
|
28
34
|
private calcTopPosition;
|
|
35
|
+
private buildReferenceTopPosition;
|
|
29
36
|
private clearConfigs;
|
|
30
37
|
private canShow;
|
|
31
38
|
private submit;
|
|
@@ -42,6 +49,7 @@ export interface IFilterColumnConfigs {
|
|
|
42
49
|
columnLabel: string;
|
|
43
50
|
leftPosition: string;
|
|
44
51
|
filteredOptions?: IMultiSelectionOption[];
|
|
52
|
+
fromIcon?: boolean;
|
|
45
53
|
}
|
|
46
54
|
export interface IAppliedFilterColumnOptions {
|
|
47
55
|
field: string;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { IMultiSelectionListDataSource } from '../../ez-multi-selection-list/interfaces/IMultiSelectionListDataSource';
|
|
2
|
+
import { IMultiSelectionOption } from '../../ez-multi-selection-list/interfaces/IMultiSelectionOption';
|
|
3
|
+
import { DataUnit } from '@sankhyalabs/core';
|
|
4
|
+
export default class InMemoryFilterColumnDataSource implements IMultiSelectionListDataSource {
|
|
5
|
+
private dataUnit;
|
|
6
|
+
private originalRecords;
|
|
7
|
+
constructor(dataUnit: DataUnit);
|
|
8
|
+
onDataUnitAction: (action: any) => void;
|
|
9
|
+
fetchData(filterTerm: string, fieldName: string): Promise<Array<IMultiSelectionOption>>;
|
|
10
|
+
private buildFieldOption;
|
|
11
|
+
private buildValue;
|
|
12
|
+
private removeDuplicatedOptions;
|
|
13
|
+
private includesSearchTerm;
|
|
14
|
+
private buildLabel;
|
|
15
|
+
private formatLabel;
|
|
16
|
+
}
|
|
@@ -27,6 +27,10 @@ export declare class EzMuiltiSelectionList {
|
|
|
27
27
|
* Opções de filtros a serem exibidas na listagem.
|
|
28
28
|
*/
|
|
29
29
|
options: IMultiSelectionOption[];
|
|
30
|
+
/**
|
|
31
|
+
* Informa se a pesquisa é do tipo texto.
|
|
32
|
+
*/
|
|
33
|
+
isTextSearch: boolean;
|
|
30
34
|
/**
|
|
31
35
|
* Guarda o estado das opções de filtragem (check = true ou false).
|
|
32
36
|
* @private
|
|
@@ -43,10 +43,18 @@ export declare class EzSearch {
|
|
|
43
43
|
* Se false deixa de exibir a mensagem de erro dentro do campo.
|
|
44
44
|
*/
|
|
45
45
|
canShowError: boolean;
|
|
46
|
+
/**
|
|
47
|
+
* Quando verdadeiro deixa de exibir a mensagem de erro (se existente) quando focar em um elemento diferente.
|
|
48
|
+
*/
|
|
49
|
+
hideErrorOnFocusOut: boolean;
|
|
46
50
|
/**
|
|
47
51
|
* Define um posicionamento fixo para a lista de opções do CheckBox.
|
|
48
52
|
*/
|
|
49
53
|
listOptionsPosition: IEzCheckBoxListPosition;
|
|
54
|
+
/**
|
|
55
|
+
* Informa se a pesquisa é do tipo texto.
|
|
56
|
+
*/
|
|
57
|
+
isTextSearch: boolean;
|
|
50
58
|
/**
|
|
51
59
|
* Emitido quando acontece a alteração de valor do campo.
|
|
52
60
|
*/
|
|
@@ -15,6 +15,7 @@ import { DataUnit, WaitingChange } from "@sankhyalabs/core";
|
|
|
15
15
|
import { DialogType } from "./components/ez-dialog/DialogType";
|
|
16
16
|
import { IDropdownItem, IDropdownSubAction } from "./components/ez-dropdown/structure/DropdownItem";
|
|
17
17
|
import { IFormConfig, IRecordValidator } from "./utils/form/interfaces";
|
|
18
|
+
import { FormItems } from "./components/ez-form-view/structure";
|
|
18
19
|
import { IFormViewField } from "./components/ez-form-view/interfaces/IFormViewField";
|
|
19
20
|
import { EzGridColumn, EzGridColumnConfig, EzGridColumStateEvent, IGridConfig, IStatusResolver, StatusResolverFunction } from "./components/ez-grid/controller/EzGridController";
|
|
20
21
|
import { ISelection, ISelectionToastConfig } from "./components/ez-grid/interfaces";
|
|
@@ -344,10 +345,18 @@ export namespace Components {
|
|
|
344
345
|
*/
|
|
345
346
|
"errorMessage": string;
|
|
346
347
|
"getValueAsync": () => Promise<unknown>;
|
|
348
|
+
/**
|
|
349
|
+
* Quando verdadeiro deixa de exibir a mensagem de erro (se existente) quando focar em um elemento diferente.
|
|
350
|
+
*/
|
|
351
|
+
"hideErrorOnFocusOut": boolean;
|
|
347
352
|
/**
|
|
348
353
|
* Retorna se o conteúdo é inválido.
|
|
349
354
|
*/
|
|
350
355
|
"isInvalid": () => Promise<boolean>;
|
|
356
|
+
/**
|
|
357
|
+
* Informa se a pesquisa é do tipo texto.
|
|
358
|
+
*/
|
|
359
|
+
"isTextSearch": boolean;
|
|
351
360
|
/**
|
|
352
361
|
* Texto a ser apresentado como título do campo.
|
|
353
362
|
*/
|
|
@@ -906,6 +915,10 @@ export namespace Components {
|
|
|
906
915
|
* Classe que implementa o método fetchData, responsável por realizar a pesquisa dos dados, com base no termo informado pelo usuário.
|
|
907
916
|
*/
|
|
908
917
|
"dataSource": IMultiSelectionListDataSource;
|
|
918
|
+
/**
|
|
919
|
+
* Informa se a pesquisa é do tipo texto.
|
|
920
|
+
*/
|
|
921
|
+
"isTextSearch": boolean;
|
|
909
922
|
/**
|
|
910
923
|
* Opções de filtros a serem exibidas na listagem.
|
|
911
924
|
*/
|
|
@@ -1076,10 +1089,18 @@ export namespace Components {
|
|
|
1076
1089
|
*/
|
|
1077
1090
|
"errorMessage": string;
|
|
1078
1091
|
"getValueAsync": () => Promise<unknown>;
|
|
1092
|
+
/**
|
|
1093
|
+
* Quando verdadeiro deixa de exibir a mensagem de erro (se existente) quando focar em um elemento diferente.
|
|
1094
|
+
*/
|
|
1095
|
+
"hideErrorOnFocusOut": boolean;
|
|
1079
1096
|
/**
|
|
1080
1097
|
* Retorna se o conteúdo é inválido.
|
|
1081
1098
|
*/
|
|
1082
1099
|
"isInvalid": () => Promise<boolean>;
|
|
1100
|
+
/**
|
|
1101
|
+
* Informa se a pesquisa é do tipo texto.
|
|
1102
|
+
*/
|
|
1103
|
+
"isTextSearch": boolean;
|
|
1083
1104
|
/**
|
|
1084
1105
|
* Texto a ser apresentado como título do campo.
|
|
1085
1106
|
*/
|
|
@@ -1483,6 +1504,7 @@ export namespace Components {
|
|
|
1483
1504
|
"dataUnit": DataUnit;
|
|
1484
1505
|
"gridHeaderHidden": boolean;
|
|
1485
1506
|
"hide": () => Promise<void>;
|
|
1507
|
+
"noHeaderTaskBar": boolean;
|
|
1486
1508
|
"opened": boolean;
|
|
1487
1509
|
"options": IMultiSelectionOption[];
|
|
1488
1510
|
/**
|
|
@@ -2272,6 +2294,14 @@ declare namespace LocalJSX {
|
|
|
2272
2294
|
* Define uma mensagem de orientação ao usuário, colocando o campo em modo inválido.
|
|
2273
2295
|
*/
|
|
2274
2296
|
"errorMessage"?: string;
|
|
2297
|
+
/**
|
|
2298
|
+
* Quando verdadeiro deixa de exibir a mensagem de erro (se existente) quando focar em um elemento diferente.
|
|
2299
|
+
*/
|
|
2300
|
+
"hideErrorOnFocusOut"?: boolean;
|
|
2301
|
+
/**
|
|
2302
|
+
* Informa se a pesquisa é do tipo texto.
|
|
2303
|
+
*/
|
|
2304
|
+
"isTextSearch"?: boolean;
|
|
2275
2305
|
/**
|
|
2276
2306
|
* Texto a ser apresentado como título do campo.
|
|
2277
2307
|
*/
|
|
@@ -2550,6 +2580,10 @@ declare namespace LocalJSX {
|
|
|
2550
2580
|
* Evento disparado quando o formulário está disponível na DOM.
|
|
2551
2581
|
*/
|
|
2552
2582
|
"onEzReady"?: (event: EzFormCustomEvent<void>) => void;
|
|
2583
|
+
/**
|
|
2584
|
+
* Responsável por notificar quando ocorrer a renderização de itens do formulário.
|
|
2585
|
+
*/
|
|
2586
|
+
"onFormItemsReady"?: (event: EzFormCustomEvent<FormItems>) => void;
|
|
2553
2587
|
/**
|
|
2554
2588
|
* Define um validador responsável pela integridade dos registros.
|
|
2555
2589
|
*/
|
|
@@ -2564,6 +2598,10 @@ declare namespace LocalJSX {
|
|
|
2564
2598
|
* Evento emitido quando o componente foi totalmente carregado na DOM.
|
|
2565
2599
|
*/
|
|
2566
2600
|
"onEzContentReady"?: (event: EzFormViewCustomEvent<Array<HTMLElement>>) => void;
|
|
2601
|
+
/**
|
|
2602
|
+
* Responsável por notificar quando ocorrer a renderização de itens do formulário.
|
|
2603
|
+
*/
|
|
2604
|
+
"onFormItemsReady"?: (event: EzFormViewCustomEvent<FormItems>) => void;
|
|
2567
2605
|
}
|
|
2568
2606
|
interface EzGrid {
|
|
2569
2607
|
/**
|
|
@@ -2792,6 +2830,10 @@ declare namespace LocalJSX {
|
|
|
2792
2830
|
* Classe que implementa o método fetchData, responsável por realizar a pesquisa dos dados, com base no termo informado pelo usuário.
|
|
2793
2831
|
*/
|
|
2794
2832
|
"dataSource"?: IMultiSelectionListDataSource;
|
|
2833
|
+
/**
|
|
2834
|
+
* Informa se a pesquisa é do tipo texto.
|
|
2835
|
+
*/
|
|
2836
|
+
"isTextSearch"?: boolean;
|
|
2795
2837
|
/**
|
|
2796
2838
|
* Evento que informa que a lista de opções selecionadas sofreu alteração.
|
|
2797
2839
|
*/
|
|
@@ -2956,6 +2998,14 @@ declare namespace LocalJSX {
|
|
|
2956
2998
|
* Define uma mensagem de orientação ao usuário, colocando o campo em modo inválido.
|
|
2957
2999
|
*/
|
|
2958
3000
|
"errorMessage"?: string;
|
|
3001
|
+
/**
|
|
3002
|
+
* Quando verdadeiro deixa de exibir a mensagem de erro (se existente) quando focar em um elemento diferente.
|
|
3003
|
+
*/
|
|
3004
|
+
"hideErrorOnFocusOut"?: boolean;
|
|
3005
|
+
/**
|
|
3006
|
+
* Informa se a pesquisa é do tipo texto.
|
|
3007
|
+
*/
|
|
3008
|
+
"isTextSearch"?: boolean;
|
|
2959
3009
|
/**
|
|
2960
3010
|
* Texto a ser apresentado como título do campo.
|
|
2961
3011
|
*/
|
|
@@ -3300,6 +3350,7 @@ declare namespace LocalJSX {
|
|
|
3300
3350
|
"dataSource"?: IMultiSelectionListDataSource;
|
|
3301
3351
|
"dataUnit"?: DataUnit;
|
|
3302
3352
|
"gridHeaderHidden"?: boolean;
|
|
3353
|
+
"noHeaderTaskBar"?: boolean;
|
|
3303
3354
|
"onApplyFilterColumnOptions"?: (event: FilterColumnCustomEvent<IAppliedFilterColumnOptions>) => void;
|
|
3304
3355
|
"opened"?: boolean;
|
|
3305
3356
|
"options"?: IMultiSelectionOption[];
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sankhyalabs/ezui",
|
|
3
|
-
"version": "5.11.0-dev.
|
|
3
|
+
"version": "5.11.0-dev.11",
|
|
4
4
|
"description": "Biblioteca de componentes Sankhya.",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/custom-elements/index.js",
|
|
@@ -30,12 +30,12 @@
|
|
|
30
30
|
"gulp": "gulp default",
|
|
31
31
|
"link": "node scripts/link.js",
|
|
32
32
|
"dev": "run-p storybook build.watch gulp",
|
|
33
|
-
"
|
|
34
|
-
"
|
|
33
|
+
"link-dev": "gulp watch-dev",
|
|
34
|
+
"prepare": "husky install"
|
|
35
35
|
},
|
|
36
36
|
"repository": {
|
|
37
37
|
"type": "git",
|
|
38
|
-
"url": "https://
|
|
38
|
+
"url": "https://gitlab.sankhya.com.br/dti/design-system/ez-ui.git"
|
|
39
39
|
},
|
|
40
40
|
"publishConfig": {
|
|
41
41
|
"access": "public"
|
|
@@ -47,14 +47,12 @@
|
|
|
47
47
|
"license": "ISC",
|
|
48
48
|
"devDependencies": {
|
|
49
49
|
"@babel/preset-env": "^7.16.11",
|
|
50
|
+
"@commitlint/cli": "^18.4.3",
|
|
51
|
+
"@commitlint/config-conventional": "^18.4.3",
|
|
50
52
|
"@sankhyalabs/core": "^5.9.0",
|
|
51
53
|
"@sankhyalabs/docscss": "^1.0.4",
|
|
52
54
|
"@sankhyalabs/ez-design": "^4.0.0",
|
|
53
55
|
"@sankhyalabs/skippeerdeps": "^1.0.2",
|
|
54
|
-
"@semantic-release/exec": "^5.0.0",
|
|
55
|
-
"@semantic-release/git": "^9.0.0",
|
|
56
|
-
"@semantic-release/gitlab": "^6.1.0",
|
|
57
|
-
"@semantic-release/npm": "^7.1.3",
|
|
58
56
|
"@shopify/draggable": "^1.0.0-beta.8",
|
|
59
57
|
"@stencil/core": "^2.13.0",
|
|
60
58
|
"@stencil/react-output-target": "0.0.9",
|
|
@@ -70,6 +68,7 @@
|
|
|
70
68
|
"gulp-run": "^1.7.1",
|
|
71
69
|
"gulp-watch": "^5.0.1",
|
|
72
70
|
"http-server": "^0.12.3",
|
|
71
|
+
"husky": "^8.0.3",
|
|
73
72
|
"jest": "^26.6.3",
|
|
74
73
|
"jest-cli": "^26.6.3",
|
|
75
74
|
"npm-run-all": "^4.1.5",
|
|
@@ -78,7 +77,6 @@
|
|
|
78
77
|
"redux-thunk": "^2.4.1",
|
|
79
78
|
"redux-undo": "^1.0.1",
|
|
80
79
|
"run-p": "0.0.0",
|
|
81
|
-
"semantic-release": "^17.4.3",
|
|
82
80
|
"storybook-addon-preview": "^2.2.0",
|
|
83
81
|
"uuid": "^9.0.0",
|
|
84
82
|
"ws": "^7.5.6"
|