@sankhyalabs/ezui 5.20.0-dev.1 → 5.20.0-dev.10
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 +4 -5
- package/dist/cjs/ez-alert-list.cjs.entry.js +33 -28
- package/dist/cjs/ez-card-item_3.cjs.entry.js +182 -0
- package/dist/cjs/ez-combo-box.cjs.entry.js +11 -155
- package/dist/cjs/ez-form-view.cjs.entry.js +4 -2
- package/dist/cjs/ez-grid.cjs.entry.js +20 -21
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +611 -31
- package/dist/cjs/ez-split-item.cjs.entry.js +11 -2
- package/dist/cjs/ez-split-panel.cjs.entry.js +11 -9
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/filter-column.cjs.entry.js +16 -5
- package/dist/cjs/index-a7b0c73d.js +2 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +3 -3
- package/dist/collection/components/ez-alert-list/ez-alert-list.js +33 -28
- package/dist/collection/components/ez-card-item/ez-card-item.css +35 -0
- package/dist/collection/components/ez-combo-box/ez-combo-box.js +12 -173
- package/dist/collection/components/ez-form-view/fieldbuilder/templates/FileInput.tpl.js +4 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +7 -10
- package/dist/collection/components/ez-grid/controller/ag-grid/DataSource.js +12 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.js +1 -3
- package/dist/collection/components/ez-grid/ez-grid.css +1 -0
- package/dist/collection/components/ez-grid/ez-grid.js +2 -2
- package/dist/collection/components/ez-grid/subcomponents/filter-column.js +16 -5
- package/dist/collection/components/ez-icon/ez-icon.css +1 -1
- package/dist/collection/components/ez-popup/ez-popup.css +0 -1
- package/dist/collection/components/ez-search/ez-search.css +331 -0
- package/dist/collection/components/ez-search/ez-search.js +689 -55
- package/dist/collection/components/ez-split-panel/ez-split-panel.css +7 -7
- package/dist/collection/components/ez-split-panel/ez-split-panel.js +30 -10
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.css +36 -12
- package/dist/collection/components/ez-split-panel/structure/item/ez-split-item.js +57 -2
- package/dist/collection/utils/form/test/DataBinder.test.js +9 -0
- package/dist/custom-elements/index.js +727 -266
- package/dist/esm/ez-alert-list.entry.js +33 -28
- package/dist/esm/ez-card-item_3.entry.js +176 -0
- package/dist/esm/ez-combo-box.entry.js +12 -156
- package/dist/esm/ez-form-view.entry.js +4 -2
- package/dist/esm/ez-grid.entry.js +20 -21
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +613 -33
- package/dist/esm/ez-split-item.entry.js +12 -3
- package/dist/esm/ez-split-panel.entry.js +11 -9
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/filter-column.entry.js +16 -5
- package/dist/esm/index-baa5e267.js +2 -6
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-51c5e071.entry.js → p-02c8831a.entry.js} +1 -1
- package/dist/ezui/p-133fae4a.entry.js +1 -0
- package/dist/ezui/p-13dbad96.entry.js +1 -0
- package/dist/ezui/{p-f56dd1da.entry.js → p-300bf244.entry.js} +1 -1
- package/dist/ezui/p-428a05fe.entry.js +1 -0
- package/dist/ezui/p-60848ef6.entry.js +1 -0
- package/dist/ezui/p-940ed30b.entry.js +1 -0
- package/dist/ezui/{p-6e2f8e6b.entry.js → p-ab629244.entry.js} +1 -1
- package/dist/ezui/p-baf80b13.entry.js +1 -0
- package/dist/ezui/p-cd0499a2.entry.js +1 -0
- package/dist/ezui/p-e52cbcc7.entry.js +1 -0
- package/dist/types/components/ez-alert-list/ez-alert-list.d.ts +1 -1
- package/dist/types/components/ez-combo-box/ez-combo-box.d.ts +0 -15
- package/dist/types/components/ez-grid/controller/ag-grid/DataSource.d.ts +2 -1
- package/dist/types/components/ez-grid/controller/ag-grid/components/EzGridCustomHeader.d.ts +1 -1
- package/dist/types/components/ez-grid/subcomponents/filter-column.d.ts +4 -1
- package/dist/types/components/ez-search/ez-search.d.ts +100 -10
- package/dist/types/components/ez-split-panel/ez-split-panel.d.ts +23 -0
- package/dist/types/components/ez-split-panel/structure/item/ez-split-item.d.ts +17 -0
- package/dist/types/components.d.ts +47 -14
- package/dist/types/utils/form/test/DataBinder.test.d.ts +1 -0
- package/dist/types/utils/interfaces/AbstractFieldMetadata.d.ts +2 -1
- package/package.json +12 -5
- package/dist/cjs/ez-card-item.cjs.entry.js +0 -52
- package/dist/cjs/ez-filter-input_2.cjs.entry.js +0 -137
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridUtils.js +0 -8
- package/dist/esm/ez-card-item.entry.js +0 -48
- package/dist/esm/ez-filter-input_2.entry.js +0 -132
- package/dist/ezui/p-05f5a778.entry.js +0 -1
- package/dist/ezui/p-4a7f113d.entry.js +0 -1
- package/dist/ezui/p-5613fe63.entry.js +0 -1
- package/dist/ezui/p-76ba9d67.entry.js +0 -1
- package/dist/ezui/p-796c1a88.entry.js +0 -1
- package/dist/ezui/p-a32aaac6.entry.js +0 -1
- package/dist/ezui/p-a5ac7151.entry.js +0 -1
- package/dist/ezui/p-af15c277.entry.js +0 -1
- package/dist/ezui/p-d6ffe679.entry.js +0 -1
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridUtils.d.ts +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as i,h as s}from"./p-23a36bb6.js";import{UserInterface as e}from"@sankhyalabs/core";const o=window,h=new CustomEvent("onSubmitFilter",{detail:{showToast:!0}}),l=class{constructor(s){t(this,s),this.applyFilterColumnOptions=i(this,"applyFilterColumnOptions",7),this.TOP_POSITION="65",this.TOP_POSITION_HEADER_HIDDEN="18",this.TOP_POSITION_NO_TASKBAR="32",this.TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN="20",this.DEFAULT_HEIGHT=430,this.FIX_MARGIN=60,this.FILTER_COLUMN_WIDTH=330,this.opened=!0,this.columnName=void 0,this.columnLabel=void 0,this.gridHeaderHidden=!1,this.noHeaderTaskBar=!1,this.dataSource=void 0,this.dataUnit=void 0,this.options=void 0,this.selectedItems=void 0,this.fieldDescriptor=void 0,this.useOptions=!1,this.isTextSearch=!1}async hide(){await this.ezPopoverElement.hide(),await this.clearConfigs()}async show(t){this.canShow(t)&&(await this.hide(),this.fieldDescriptor=this.dataUnit.getField(t.columnName),this.buildIsTextSearch(),this.columnName=t.columnName,this.columnLabel=t.columnLabel,await this.setOptions(t.filteredOptions),await this.ezPopoverElement.show(this.calcTopPosition(),this.calculateLeftPosition(t)))}calculateLeftPosition({leftPosition:t,fromIcon:i}){const s=this.calcFilterColumnLeftPosition(t);if(!i)return`${s}px`;const e=s+16-this.ezPopoverElement.getBoundingClientRect().left;return`${e>0?e:0}px`}calcFilterColumnLeftPosition(t){var i,s;const e=null===(i=this.ezPopoverElement.closest("ez-grid").getBoundingClientRect())||void 0===i?void 0:i.right,o=null===(s=this.ezPopoverElement.getBoundingClientRect())||void 0===s?void 0:s.left,h=e-(this.FILTER_COLUMN_WIDTH+o),l=t-(this.FIX_MARGIN+o);return l>h?h:l}buildIsTextSearch(){var t,i;const s=null!==(i=null===(t=this.fieldDescriptor)||void 0===t?void 0:t.userInterface)&&void 0!==i?i:e.SHORTTEXT;this.isTextSearch=!(s===e.DECIMALNUMBER||s===e.INTEGERNUMBER)}calcTopPosition(){const t=this.buildReferenceTopPosition(),i=parseInt(t)+this.DEFAULT_HEIGHT,s=Math.round(this.ezPopoverElement.getBoundingClientRect().top)+i,e=window.innerHeight;return e>s?`${t}px`:e-s+"px"}buildReferenceTopPosition(){return this.noHeaderTaskBar?this.gridHeaderHidden?this.TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN:this.TOP_POSITION_NO_TASKBAR:this.gridHeaderHidden?this.TOP_POSITION_HEADER_HIDDEN:this.TOP_POSITION}async clearConfigs(){var t;await(null===(t=this.ezMultiSelectionList)||void 0===t?void 0:t.clearFilteredOptions()),this.options=null,this.columnName=null}canShow(t){return!this.ezPopoverElement.opened||t.columnName!==this.columnName}submit(){this.applyFilterColumnOptions.emit({field:this.columnName,values:this.selectedItems}),o.dispatchEvent(h),this.hide()}changeSelectedItems(t){this.selectedItems=t}hasToUseOptions(){return this.fieldDescriptor.userInterface===e.OPTIONSELECTOR||this.fieldDescriptor.userInterface===e.SWITCH||this.fieldDescriptor.userInterface===e.CHECKBOX}isCheckBoxOrSwitch(){return this.fieldDescriptor.userInterface===e.SWITCH||this.fieldDescriptor.userInterface===e.CHECKBOX}async setOptions(t){const i=this.hasToUseOptions();if(i)return this.useOptions=i,void(this.options=i?this.buildOptions(t):null!=t?t:null);const s=await this.dataSource.getStaticOptions(this.columnName);if(null!=s){const i=new Set((t||[]).filter((t=>t.check)).map((t=>t.label)));return this.useOptions=!0,void(this.options=0===i.size?s:s.map((t=>Object.assign(Object.assign({},t),{check:i.has(t.label)}))))}this.useOptions=!1,this.options=null}buildOptions(t){var i,s;if(t&&t.length>0)return t;if(this.isCheckBoxOrSwitch())return[{label:"Sim",value:"true",check:!0},{label:"Não",value:"false",check:!0}];const e=JSON.parse(null===(s=null===(i=this.fieldDescriptor)||void 0===i?void 0:i.properties)||void 0===s?void 0:s.options);return Object.keys(e).map((t=>({label:e[t],value:t,check:!0})))}handleEzVisibilityChange(t){!1===t.detail&&this.clearConfigs()}render(){return s("ez-popover",{class:"filter-column__popover","overlay-type":"none",ref:t=>this.ezPopoverElement=t,autoClose:!0,onEzVisibilityChange:this.handleEzVisibilityChange.bind(this)},s("section",{class:"filter-column"},s("header",{class:"filter-column__header"},s("span",{class:"ez-text ez-text--medium filter-column__header-title"},"Filtro da coluna ",this.columnLabel),s("ez-button",{mode:"icon","icon-name":"close",class:"ez-button--tertiary",onClick:()=>this.hide()})),s("ez-multi-selection-list",{columnName:this.columnName,dataSource:this.dataSource,options:this.options,useOptions:this.useOptions,ref:t=>this.ezMultiSelectionList=t,onChangeFilteredOptions:t=>this.changeSelectedItems(t.detail),isTextSearch:this.isTextSearch}),s("footer",{class:"filter-column__footer"},s("ez-button",{label:"Aplicar",class:"ez-button--primary",onClick:this.submit.bind(this)}))))}};l.style=".filter-column{padding:var(--space--2xs, 8px);position:relative}.filter-column__header{margin-bottom:var(--space--2xs, 8px);display:flex;flex-direction:row;align-items:center;justify-content:space-between;height:var(--space--xl, 32px)}.filter-column__footer{position:relative;display:flex;flex-direction:row;justify-content:flex-end;align-items:center;width:100%;bottom:0;left:0;padding-top:var(--space--2xs, 8px);border-top:var(--border--medium) var(--color--disable-secondary)}.filter-column__popover{position:absolute}.filter-column__header-title{margin-left:8px}";export{l as filter_column}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,h as e}from"./p-23a36bb6.js";const i=class{constructor(e){t(this,e),this.label=void 0,this.enableExpand=!0,this._expanded=!1}toggleExpandItem(){this._expanded=!this._expanded}render(){return e("div",{class:"box_split-item "+(this._expanded?"expanded__item":""),ref:t=>this._element=t},e("div",{class:"ez-split-item--header"},e("div",null,this.label&&e("div",{class:"ez-margin--small"},e("h3",{class:" ez-title ez-title--small"},this.label))),e("div",{class:"ez-split-item--header-buttons"},this.enableExpand&&e("ez-button",{size:"medium",mode:"icon",iconName:"expand",class:"ez-button--tertiary",onClick:()=>this.toggleExpandItem(),title:this._expanded?"Resumir":"Expandir"}),e("slot",{name:"rightButtons"}))),e("div",{class:"ez-split-item--content"},e("slot",null)))}};i.style=".box_split-item{background-color:var(--background--xlight);padding:var(--space--nano);width:100%;height:100%;border-radius:var(--border--radius-medium);box-shadow:var(--shadow);display:flex;flex-direction:column;overflow:auto}.expanded__item{position:absolute;z-index:var(--more-visible);top:0;left:0;width:100%;height:100%}.ez-split-item--header{display:flex;align-items:center;justify-content:space-between}.ez-split-item--header-buttons{display:flex;align-items:center}.ez-split-item--content{display:block;height:-webkit-fill-available}";export{i as ez_split_item}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as e,c as t,h as i,H as n,g as a}from"./p-23a36bb6.js";import{StringUtils as o,ElementIDUtils as r}from"@sankhyalabs/core";import{C as s}from"./p-7eb3e1a5.js";const l=class{constructor(i){e(this,i),this.ezClick=t(this,"ezClick",7),this.item=void 0}componentWillRender(){this.createDetailList()}componentDidLoad(){var e,t;const i={id:o.toCamelCase((null===(e=this.item)||void 0===e?void 0:e.key)||(null===(t=this.item)||void 0===t?void 0:t.title)||"")};r.addIDInfo(this._element,null,i)}createDetailList(){var e,t,i;this._details={detailsLeft:[],detailsRight:[]};let n=0;if(null===(e=this.item)||void 0===e?void 0:e.details)for(const e in this.item.details)n<3?this._details.detailsLeft.push({label:e,value:null===(t=this.item.details[e])||void 0===t?void 0:t.toString()}):this._details.detailsRight.push({label:e,value:null===(i=this.item.details[e])||void 0===i?void 0:i.toString()}),n++}buildDetailContent(e){return i("div",{class:"card-item__detail"},i("label",{class:"card-item__detail-label"},e.label),": ",i("label",{class:"card-item__detail-value",innerHTML:e.value}))}render(){return i(n,null,this.item&&i("div",{class:"card-item",onClick:()=>{this.ezClick.emit(this.item)}},i("label",{class:"card-item__title"},i("span",{class:"card-item__key",innerHTML:this.item.key}),i("span",{innerHTML:this.item.title})),i("div",{class:"card-item__details"},i("div",{class:"card-item__details-left"},this._details.detailsLeft.map((e=>this.buildDetailContent(e)))),i("div",{class:"card-item__details-right"},this._details.detailsRight.map((e=>this.buildDetailContent(e)))))))}get _element(){return a(this)}};l.style=":host {\n /*@doc Define o tamanho da fonte do componente.*/\n --ez-card-item--font-size: var(--text--medium, 14px);\n\n /*@doc Define a família da fonte do componente.*/\n --ez-card-item--font-family: var(--font-pattern, Arial);\n\n /*@doc Define o peso da fonte do componente.*/\n --ez-card-item--font-weight: var(--text-weight--medium, 400);\n\n /*@doc Define o peso da fonte do title do componente.*/\n --ez-card-item--font-weight-large: var(--text-weight--large, 600);\n\n /*@doc Define a cor da fonte do componente.*/\n --ez-card-item--color: var(--title--primary, #2B3A54);\n\n /*@doc Define a cor da fonte da key do componente.*/\n --ez-card-item__key--color: var(--text--primary, #626e82);\n\n /*@doc Define a cor da fonte do label do detalhe do componente.*/\n --ez-card-item__detail-label--color: var(--text--secondary, #A2ABB9);\n\n /*@doc Define o espaçamento inferior dos detalhes do componente.*/\n --ez-card-item__detail--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define o espaçamento inferior do title do componente.*/\n --ez-card-item__title--padding-bottom: var(--space--extra-small, 3px);\n\n /*@doc Define a cor do highlight / marcação nos textos do componente.*/\n --ez-card-item__highlight--color: var(--color--primary-300, #E2F4EF);\n\n width: 100%;\n display: flex;\n cursor: pointer;\n}\n\n.card-item {\n display: flex;\n flex-direction: column;\n width: 100%;\n cursor: pointer;\n padding: 12px;\n z-index: 0;\n position: relative;\n container-type: inline-size;\n container-name: box;\n white-space: pre-line;\n}\n\n.card-item:hover {\n background: #F0F3F7;\n border-radius: 12px;\n}\n\n.card-item__title {\n display: flex;\n align-items: center;\n line-height: 18px;\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight-large);\n color: var(--ez-card-item--color);\n padding-bottom: var(--ez-card-item__title--padding-bottom);\n gap: var(--space--small, 6px);\n}\n\n.card-item__key {\n /*public*/\n color: var(--ez-card-item__key--color);\n}\n\n.card-item__details {\n display: flex;\n cursor: pointer;\n justify-content: space-between;\n gap: var(--space--small, 6px);\n}\n\n.card-item__details-left {\n white-space: pre-line;\n cursor: pointer;\n width: 50%;\n}\n\n.card-item__details-right {\n white-space: pre-line;\n width: 50%;\n cursor: pointer;\n}\n\n.card-item__detail:not(:last-child) {\n cursor: pointer;\n white-space: pre-line;\n\n /*public*/\n padding-bottom: var(--ez-card-item__detail--padding-bottom);\n}\n\n.card-item__detail-label {\n cursor: pointer;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n color: var(--ez-card-item__detail-label--color);\n}\n\n.card-item__detail-value {\n cursor: pointer;\n line-break: anywhere;\n\n /*public*/\n font-size: var(--ez-card-item--font-size);\n font-family: var(--ez-card-item--font-family);\n font-weight: var(--ez-card-item--font-weight);\n color: var(--ez-card-item--color);\n}\n\n.card-item__highlight {\n position: relative;\n border-radius: 8px;\n z-index: -1;\n\n /*public*/\n background-color: var(--ez-card-item__highlight--color);\n outline: 2px solid var(--ez-card-item__highlight--color);\n box-shadow: -4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color);\n}\n\n@container box (max-width: 550px) {\n .card-item__details {\n flex-direction: column;\n }\n\n .card-item__details-left {\n width: 100%;\n }\n \n .card-item__details-right {\n width: 100%;\n }\n}\n\n@container box (max-width: 200px) {\n .card-item__title {\n font-size: 10px;\n }\n\n .card-item__detail-label {\n font-size: 10px;\n }\n\n .card-item__detail-value {\n font-size: 10px;\n }\n\n}";const d=class{constructor(i){e(this,i),this.ezChange=t(this,"ezChange",7),this.ezSearching=t(this,"ezSearching",7),this.ezFocusIn=t(this,"ezFocusIn",7),this._searchingText="",this.handleFocus=()=>{this._textInput.value=""===this._searchingText?"":this._searchingText,this.ezFocusIn.emit()},this.label=void 0,this.value=void 0,this.enabled=!0,this.errorMessage=void 0,this.restrict=void 0,this.mode="regular",this.asyncSearch=!1,this.canShowError=!0}observeLabel(){this._textInput&&(this._textInput.label=this.label)}observeErrorMessage(){this._textInput&&(this._textInput.errorMessage=this.errorMessage)}observeValue(e,t){this._textInput&&e!=t&&(this._textInput.value=e,this.ezChange.emit(e))}async setFocus(){this._textInput.setFocus()}async setBlur(){this._textInput.setBlur()}async isInvalid(){return"string"==typeof this.errorMessage&&""!==this.errorMessage.trim()}async setValue(e){this.asyncSearch&&null!=this._textInput&&(e!==this.value?(this.value=e,this._searchingText=""):this._textInput.value=e)}async endSearch(){this.asyncSearch&&null!=this._textInput&&this._textInput.value!==this.value&&(this._textInput.value=this.value)}handleChange(e){const t=e.detail;this.errorMessage="",this.asyncSearch?(this._searchingText=t,this.ezSearching.emit(t)):t!==this.value&&(this.value=t)}componentDidLoad(){s.applyVarsTextInput(this._elem,this._textInput)}render(){return r.addIDInfoIfNotExists(this._elem,"input"),i("ez-text-input",{"data-element-id":r.getInternalIDInfo("textInput"),ref:e=>this._textInput=e,label:this.label,onEzChange:e=>this.handleChange(e),value:this.value,enabled:this.enabled,errorMessage:this.errorMessage,restrict:this.restrict,mode:this.mode,onFocusin:this.handleFocus,canShowError:this.canShowError},i("ez-icon",{slot:"leftIcon",iconName:"search"}))}get _elem(){return a(this)}static get watchers(){return{label:["observeLabel"],errorMessage:["observeErrorMessage"],value:["observeValue"]}}};d.style=":host{display:block;width:100%}";const c=class{constructor(t){e(this,t),this.message=void 0}render(){return i("div",{class:"multi-selection__message"},i("span",{class:"multi-selection__text-message"},this.message))}};c.style=".multi-selection__message{display:flex;flex-direction:row;align-items:center;justify-content:center;width:100%;min-height:320px;text-align:center}.multi-selection__text-message{margin-top:-30px;font-family:var(--font-pattern);font-size:var(--text--meduim);padding:var(--space-xs);color:var(--text--primary)}";export{l as ez_card_item,d as ez_filter_input,c as multi_selection_box_message}
|
|
@@ -12,7 +12,6 @@ export declare class EzComboBox {
|
|
|
12
12
|
private _maxWidthValue;
|
|
13
13
|
private _tabPressed;
|
|
14
14
|
private _textEmptyList;
|
|
15
|
-
private _textEmptySearch;
|
|
16
15
|
private _lookupMode;
|
|
17
16
|
private _resizeObserver;
|
|
18
17
|
private el;
|
|
@@ -46,10 +45,6 @@ export declare class EzComboBox {
|
|
|
46
45
|
* Define uma mensagem de orientação ao usuário, colocando o campo em modo inválido.
|
|
47
46
|
*/
|
|
48
47
|
errorMessage: string;
|
|
49
|
-
/**
|
|
50
|
-
* Se true ativa o modo pesquisa do ez-combo-box.
|
|
51
|
-
*/
|
|
52
|
-
searchMode: boolean;
|
|
53
48
|
/**
|
|
54
49
|
* Se true a opção selecionada exibe o `value` junto com `label`.
|
|
55
50
|
*/
|
|
@@ -133,26 +128,16 @@ export declare class EzComboBox {
|
|
|
133
128
|
private scrollToOption;
|
|
134
129
|
private selectCurrentOption;
|
|
135
130
|
private updateSource;
|
|
136
|
-
private clearSource;
|
|
137
131
|
private selectOption;
|
|
138
132
|
private loadOptions;
|
|
139
133
|
private cancelPreselection;
|
|
140
134
|
private setInputValue;
|
|
141
135
|
private clearSearch;
|
|
142
|
-
private controlListWithOnlyOne;
|
|
143
|
-
private controlEmptySearch;
|
|
144
|
-
private validateDescriptionValue;
|
|
145
|
-
private loadDescriptionValue;
|
|
146
|
-
private setDescriptionValue;
|
|
147
|
-
private loadOptionValue;
|
|
148
|
-
private showNoResultMessage;
|
|
149
|
-
private getFieldLabel;
|
|
150
136
|
private resetOptions;
|
|
151
137
|
componentWillLoad(): void;
|
|
152
138
|
componentDidRender(): void;
|
|
153
139
|
componentDidLoad(): void;
|
|
154
140
|
private handlerIconClick;
|
|
155
|
-
private buildNumberArgument;
|
|
156
141
|
private onTextInputChangeHandler;
|
|
157
142
|
private clearDeboucingTimeout;
|
|
158
143
|
private onTextInputClickHandler;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { IServerSideDatasource, IServerSideGetRowsParams } from "ag-grid-community";
|
|
2
|
-
import { DataUnit, QuickFilter } from
|
|
2
|
+
import { DataUnit, QuickFilter } from '@sankhyalabs/core';
|
|
3
3
|
import EzGridController, { EzGridColumn, EzGridOptions } from "../EzGridController";
|
|
4
4
|
export default class DataSource implements IServerSideDatasource {
|
|
5
5
|
private _controller;
|
|
@@ -10,6 +10,7 @@ export default class DataSource implements IServerSideDatasource {
|
|
|
10
10
|
quickFilter: QuickFilter;
|
|
11
11
|
readonly RECORD_ARCHIVE = "__RECORD_ARCHIVE__";
|
|
12
12
|
private duObserver;
|
|
13
|
+
private updateLoadedRecords;
|
|
13
14
|
private isSilentChange;
|
|
14
15
|
constructor(dataUnit: DataUnit, controller: EzGridController, options: EzGridOptions);
|
|
15
16
|
private updateSelection;
|
|
@@ -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:
|
|
5
|
+
showColumnFilter?: (leftPosition: number) => void;
|
|
6
6
|
}
|
|
7
7
|
export declare class EzGridCustomHeader {
|
|
8
8
|
private params;
|
|
@@ -8,6 +8,8 @@ export declare class FilterColumn {
|
|
|
8
8
|
private readonly TOP_POSITION_NO_TASKBAR;
|
|
9
9
|
private readonly TOP_POSITION_NO_TASKBAR_HEADER_HIDDEN;
|
|
10
10
|
private readonly DEFAULT_HEIGHT;
|
|
11
|
+
private readonly FIX_MARGIN;
|
|
12
|
+
private readonly FILTER_COLUMN_WIDTH;
|
|
11
13
|
private ezPopoverElement;
|
|
12
14
|
private ezMultiSelectionList;
|
|
13
15
|
applyFilterColumnOptions: EventEmitter<IAppliedFilterColumnOptions>;
|
|
@@ -30,6 +32,7 @@ export declare class FilterColumn {
|
|
|
30
32
|
*/
|
|
31
33
|
show(configs: IFilterColumnConfigs): Promise<void>;
|
|
32
34
|
private calculateLeftPosition;
|
|
35
|
+
private calcFilterColumnLeftPosition;
|
|
33
36
|
private buildIsTextSearch;
|
|
34
37
|
private calcTopPosition;
|
|
35
38
|
private buildReferenceTopPosition;
|
|
@@ -47,7 +50,7 @@ export declare class FilterColumn {
|
|
|
47
50
|
export interface IFilterColumnConfigs {
|
|
48
51
|
columnName: string;
|
|
49
52
|
columnLabel: string;
|
|
50
|
-
leftPosition:
|
|
53
|
+
leftPosition: number;
|
|
51
54
|
filteredOptions?: IMultiSelectionOption[];
|
|
52
55
|
fromIcon?: boolean;
|
|
53
56
|
}
|
|
@@ -1,8 +1,30 @@
|
|
|
1
1
|
import { EventEmitter } from "../../stencil-public-runtime";
|
|
2
|
-
import { IEzCheckBoxListPosition
|
|
2
|
+
import { IEzCheckBoxListPosition } from '../ez-combo-box/ez-combo-box';
|
|
3
3
|
export declare class EzSearch {
|
|
4
|
-
private
|
|
5
|
-
private
|
|
4
|
+
private _textInput;
|
|
5
|
+
private _optionsList;
|
|
6
|
+
private _listContainer;
|
|
7
|
+
private _listWrapper;
|
|
8
|
+
private _itemValueBasis;
|
|
9
|
+
private _floatingID;
|
|
10
|
+
private _source;
|
|
11
|
+
private _changeDeboucingTimeout;
|
|
12
|
+
private _limitCharsToSearch;
|
|
13
|
+
private _deboucingTime;
|
|
14
|
+
_maxWidthValue: number;
|
|
15
|
+
private _tabPressed;
|
|
16
|
+
private _textEmptyList;
|
|
17
|
+
private _textEmptySearch;
|
|
18
|
+
private _lookupMode;
|
|
19
|
+
private _resizeObserver;
|
|
20
|
+
private _startHighlightTag;
|
|
21
|
+
private _endHighlightTag;
|
|
22
|
+
private el;
|
|
23
|
+
private _preSelection;
|
|
24
|
+
private _visibleOptions;
|
|
25
|
+
private _startLoading;
|
|
26
|
+
private _showLoading;
|
|
27
|
+
private _criteria;
|
|
6
28
|
/**
|
|
7
29
|
* Define o valor do campo.
|
|
8
30
|
*/
|
|
@@ -63,15 +85,26 @@ export declare class EzSearch {
|
|
|
63
85
|
* Emitido quando acontece a alteração de valor do campo.
|
|
64
86
|
*/
|
|
65
87
|
ezChange: EventEmitter<IOption>;
|
|
88
|
+
/**
|
|
89
|
+
* Array com as opções do ez-combo-box. Os elementos devem obedecer
|
|
90
|
+
* o formato: `{value: string, label: string}`.
|
|
91
|
+
*/
|
|
92
|
+
options: Array<IOption>;
|
|
93
|
+
/**
|
|
94
|
+
* Se true desabilita a digitação dentro do componente.
|
|
95
|
+
*/
|
|
96
|
+
suppressSearch: boolean;
|
|
66
97
|
observeErrorMessage(): void;
|
|
67
|
-
observeValue(): void;
|
|
98
|
+
observeValue(newValue: IOption | string, oldValue: IOption | string): void;
|
|
99
|
+
observeOptions(newOptions: IOption[], oldOptions: IOption[]): void;
|
|
100
|
+
getValueAsync(): Promise<unknown>;
|
|
68
101
|
/**
|
|
69
|
-
|
|
70
|
-
|
|
102
|
+
* Aplica o foco no campo.
|
|
103
|
+
*/
|
|
71
104
|
setFocus(): Promise<void>;
|
|
72
105
|
/**
|
|
73
|
-
|
|
74
|
-
|
|
106
|
+
* Remove o foco do campo.
|
|
107
|
+
*/
|
|
75
108
|
setBlur(): Promise<void>;
|
|
76
109
|
/**
|
|
77
110
|
* Retorna se o conteúdo é inválido.
|
|
@@ -81,8 +114,65 @@ export declare class EzSearch {
|
|
|
81
114
|
* Limpa o valor do campo de pesquisa
|
|
82
115
|
*/
|
|
83
116
|
clearValue(): Promise<void>;
|
|
84
|
-
|
|
85
|
-
|
|
117
|
+
scrollListener(): void;
|
|
118
|
+
private updateListPosition;
|
|
119
|
+
private getListPosition;
|
|
120
|
+
private isDifferentValues;
|
|
121
|
+
private getFormattedText;
|
|
122
|
+
private getText;
|
|
123
|
+
private getSelectedOption;
|
|
124
|
+
private updateVisibleOptions;
|
|
125
|
+
private getMaxWidthValue;
|
|
126
|
+
private getWidthValue;
|
|
127
|
+
private createOption;
|
|
128
|
+
private buildItem;
|
|
129
|
+
private showOptions;
|
|
130
|
+
private hideOptions;
|
|
131
|
+
private isOptionsVisible;
|
|
132
|
+
private nextOption;
|
|
133
|
+
private previousOption;
|
|
134
|
+
private scrollToOption;
|
|
135
|
+
private selectCurrentOption;
|
|
136
|
+
private updateSource;
|
|
137
|
+
private clearSource;
|
|
138
|
+
private selectOption;
|
|
139
|
+
private loadOptions;
|
|
140
|
+
private cancelPreselection;
|
|
141
|
+
private setInputValue;
|
|
142
|
+
private clearSearch;
|
|
143
|
+
private controlListWithOnlyOne;
|
|
144
|
+
private controlEmptySearch;
|
|
145
|
+
private validateDescriptionValue;
|
|
146
|
+
private loadDescriptionValue;
|
|
147
|
+
private setDescriptionValue;
|
|
148
|
+
private loadOptionValue;
|
|
149
|
+
private showNoResultMessage;
|
|
150
|
+
private getFieldLabel;
|
|
151
|
+
private resetOptions;
|
|
152
|
+
componentWillLoad(): void;
|
|
153
|
+
componentDidRender(): void;
|
|
86
154
|
componentDidLoad(): void;
|
|
155
|
+
private handlerIconClick;
|
|
156
|
+
private buildNumberArgument;
|
|
157
|
+
private onTextInputChangeHandler;
|
|
158
|
+
private clearDeboucingTimeout;
|
|
159
|
+
private keyDownHandler;
|
|
160
|
+
private onTextInputFocusOutHandler;
|
|
161
|
+
private canShowListOptions;
|
|
87
162
|
render(): any;
|
|
88
163
|
}
|
|
164
|
+
export interface IOption {
|
|
165
|
+
value: string;
|
|
166
|
+
label: string;
|
|
167
|
+
details?: any;
|
|
168
|
+
}
|
|
169
|
+
export interface ISearchArgument {
|
|
170
|
+
mode: SearchMode;
|
|
171
|
+
argument: string;
|
|
172
|
+
}
|
|
173
|
+
declare enum SearchMode {
|
|
174
|
+
ADVANCED = "ADVANCED",
|
|
175
|
+
PRELOAD = "PRELOAD",
|
|
176
|
+
PREDICTIVE = "PREDICTIVE"
|
|
177
|
+
}
|
|
178
|
+
export {};
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { SplitOptions } from 'split-grid';
|
|
2
|
+
export declare class SplitPanel {
|
|
3
|
+
direction: 'row' | 'column';
|
|
4
|
+
/**
|
|
5
|
+
* Responsável por definir o painel que limita o tamanho do item expandido.
|
|
6
|
+
*/
|
|
7
|
+
anchorToExpand: boolean;
|
|
8
|
+
_element: HTMLElement;
|
|
9
|
+
_items: HTMLEzSplitItemElement[];
|
|
10
|
+
_panelID: string;
|
|
11
|
+
componentDidLoad(): void;
|
|
12
|
+
initSplit(): void;
|
|
13
|
+
getGutters(): SplitOptions;
|
|
14
|
+
addItemGutter(item: HTMLEzSplitItemElement): void;
|
|
15
|
+
getElementStyle(): {
|
|
16
|
+
display: string;
|
|
17
|
+
height: string;
|
|
18
|
+
width: string;
|
|
19
|
+
position: string;
|
|
20
|
+
};
|
|
21
|
+
getGridTemplate(): string;
|
|
22
|
+
render(): any;
|
|
23
|
+
}
|
|
@@ -1,3 +1,20 @@
|
|
|
1
1
|
export declare class SplitItem {
|
|
2
|
+
_element: HTMLElement;
|
|
3
|
+
/**
|
|
4
|
+
* Define um título para o painel.
|
|
5
|
+
*/
|
|
6
|
+
label: string;
|
|
7
|
+
/**
|
|
8
|
+
* Define se o item pode ser expandido
|
|
9
|
+
*/
|
|
10
|
+
enableExpand: boolean;
|
|
11
|
+
/**
|
|
12
|
+
* Define se o item está expandido
|
|
13
|
+
*/
|
|
14
|
+
private _expanded;
|
|
15
|
+
/**
|
|
16
|
+
* Alterna a visibilidade do painel.
|
|
17
|
+
*/
|
|
18
|
+
toggleExpandItem(): void;
|
|
2
19
|
render(): any;
|
|
3
20
|
}
|
|
@@ -30,7 +30,8 @@ import { TFocusOptions } from "./components/ez-text-input/ez-text-input";
|
|
|
30
30
|
import { IEzPopoverAnchorOptions } from "./components/ez-popover/ez-popover";
|
|
31
31
|
import { Radio } from "./components/ez-radio-button/ez-radio-button";
|
|
32
32
|
import { EzScrollDirection } from "./components/ez-scroller/EzScrollDirection";
|
|
33
|
-
import {
|
|
33
|
+
import { IOption as IOption1, ISearchArgument as ISearchArgument1 } from "./components/ez-search/ez-search";
|
|
34
|
+
import { IEzCheckBoxListPosition as IEzCheckBoxListPosition1 } from "./components/ez-combo-box/ez-combo-box";
|
|
34
35
|
import { Tab } from "./components/ez-tabselector/ez-tabselector";
|
|
35
36
|
import { IStyled } from "./components/ez-text-edit/ez-text-edit";
|
|
36
37
|
import { TFocusOptions as TFocusOptions1 } from "./components/ez-text-input/ez-text-input";
|
|
@@ -413,10 +414,6 @@ export namespace Components {
|
|
|
413
414
|
* Array com as opções do ez-combo-box. Os elementos devem obedecer o formato: `{value: string, label: string}`.
|
|
414
415
|
*/
|
|
415
416
|
"options": Array<IOption>;
|
|
416
|
-
/**
|
|
417
|
-
* Se true ativa o modo pesquisa do ez-combo-box.
|
|
418
|
-
*/
|
|
419
|
-
"searchMode": boolean;
|
|
420
417
|
/**
|
|
421
418
|
* Remove o foco do campo.
|
|
422
419
|
*/
|
|
@@ -1172,7 +1169,11 @@ export namespace Components {
|
|
|
1172
1169
|
/**
|
|
1173
1170
|
* Carrega as opções dinamicamente.
|
|
1174
1171
|
*/
|
|
1175
|
-
"optionLoader": (argument:
|
|
1172
|
+
"optionLoader": (argument: ISearchArgument) => Promise<Array<IOption>> | Array<IOption> | IOption;
|
|
1173
|
+
/**
|
|
1174
|
+
* Array com as opções do ez-combo-box. Os elementos devem obedecer o formato: `{value: string, label: string}`.
|
|
1175
|
+
*/
|
|
1176
|
+
"options": Array<IOption>;
|
|
1176
1177
|
/**
|
|
1177
1178
|
* Remove o foco do campo.
|
|
1178
1179
|
*/
|
|
@@ -1193,10 +1194,14 @@ export namespace Components {
|
|
|
1193
1194
|
* Se true remove a opção vazia da lista.
|
|
1194
1195
|
*/
|
|
1195
1196
|
"suppressEmptyOption": boolean;
|
|
1197
|
+
/**
|
|
1198
|
+
* Se true desabilita a digitação dentro do componente.
|
|
1199
|
+
*/
|
|
1200
|
+
"suppressSearch": boolean;
|
|
1196
1201
|
/**
|
|
1197
1202
|
* Define o valor do campo.
|
|
1198
1203
|
*/
|
|
1199
|
-
"value":
|
|
1204
|
+
"value": IOption | string;
|
|
1200
1205
|
}
|
|
1201
1206
|
interface EzSidebarButton {
|
|
1202
1207
|
}
|
|
@@ -1238,8 +1243,20 @@ export namespace Components {
|
|
|
1238
1243
|
"width": string;
|
|
1239
1244
|
}
|
|
1240
1245
|
interface EzSplitItem {
|
|
1246
|
+
/**
|
|
1247
|
+
* Define se o item pode ser expandido
|
|
1248
|
+
*/
|
|
1249
|
+
"enableExpand": boolean;
|
|
1250
|
+
/**
|
|
1251
|
+
* Define um título para o painel.
|
|
1252
|
+
*/
|
|
1253
|
+
"label": string;
|
|
1241
1254
|
}
|
|
1242
1255
|
interface EzSplitPanel {
|
|
1256
|
+
/**
|
|
1257
|
+
* Responsável por definir o painel que limita o tamanho do item expandido.
|
|
1258
|
+
*/
|
|
1259
|
+
"anchorToExpand": boolean;
|
|
1243
1260
|
"direction": 'row' | 'column';
|
|
1244
1261
|
}
|
|
1245
1262
|
interface EzTabselector {
|
|
@@ -2450,10 +2467,6 @@ declare namespace LocalJSX {
|
|
|
2450
2467
|
* Array com as opções do ez-combo-box. Os elementos devem obedecer o formato: `{value: string, label: string}`.
|
|
2451
2468
|
*/
|
|
2452
2469
|
"options"?: Array<IOption>;
|
|
2453
|
-
/**
|
|
2454
|
-
* Se true ativa o modo pesquisa do ez-combo-box.
|
|
2455
|
-
*/
|
|
2456
|
-
"searchMode"?: boolean;
|
|
2457
2470
|
/**
|
|
2458
2471
|
* Se true cada opção na lista exibe o `value` junto com `label`.
|
|
2459
2472
|
*/
|
|
@@ -3165,11 +3178,15 @@ declare namespace LocalJSX {
|
|
|
3165
3178
|
/**
|
|
3166
3179
|
* Emitido quando acontece a alteração de valor do campo.
|
|
3167
3180
|
*/
|
|
3168
|
-
"onEzChange"?: (event: EzSearchCustomEvent<
|
|
3181
|
+
"onEzChange"?: (event: EzSearchCustomEvent<IOption>) => void;
|
|
3169
3182
|
/**
|
|
3170
3183
|
* Carrega as opções dinamicamente.
|
|
3171
3184
|
*/
|
|
3172
|
-
"optionLoader"?: (argument:
|
|
3185
|
+
"optionLoader"?: (argument: ISearchArgument) => Promise<Array<IOption>> | Array<IOption> | IOption;
|
|
3186
|
+
/**
|
|
3187
|
+
* Array com as opções do ez-combo-box. Os elementos devem obedecer o formato: `{value: string, label: string}`.
|
|
3188
|
+
*/
|
|
3189
|
+
"options"?: Array<IOption>;
|
|
3173
3190
|
/**
|
|
3174
3191
|
* Se false cada opção na lista deve exibir somente o `label`.
|
|
3175
3192
|
*/
|
|
@@ -3182,10 +3199,14 @@ declare namespace LocalJSX {
|
|
|
3182
3199
|
* Se true remove a opção vazia da lista.
|
|
3183
3200
|
*/
|
|
3184
3201
|
"suppressEmptyOption"?: boolean;
|
|
3202
|
+
/**
|
|
3203
|
+
* Se true desabilita a digitação dentro do componente.
|
|
3204
|
+
*/
|
|
3205
|
+
"suppressSearch"?: boolean;
|
|
3185
3206
|
/**
|
|
3186
3207
|
* Define o valor do campo.
|
|
3187
3208
|
*/
|
|
3188
|
-
"value"?:
|
|
3209
|
+
"value"?: IOption | string;
|
|
3189
3210
|
}
|
|
3190
3211
|
interface EzSidebarButton {
|
|
3191
3212
|
/**
|
|
@@ -3231,8 +3252,20 @@ declare namespace LocalJSX {
|
|
|
3231
3252
|
"width"?: string;
|
|
3232
3253
|
}
|
|
3233
3254
|
interface EzSplitItem {
|
|
3255
|
+
/**
|
|
3256
|
+
* Define se o item pode ser expandido
|
|
3257
|
+
*/
|
|
3258
|
+
"enableExpand"?: boolean;
|
|
3259
|
+
/**
|
|
3260
|
+
* Define um título para o painel.
|
|
3261
|
+
*/
|
|
3262
|
+
"label"?: string;
|
|
3234
3263
|
}
|
|
3235
3264
|
interface EzSplitPanel {
|
|
3265
|
+
/**
|
|
3266
|
+
* Responsável por definir o painel que limita o tamanho do item expandido.
|
|
3267
|
+
*/
|
|
3268
|
+
"anchorToExpand"?: boolean;
|
|
3236
3269
|
"direction"?: 'row' | 'column';
|
|
3237
3270
|
}
|
|
3238
3271
|
interface EzTabselector {
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { FieldDescriptor, UserInterface } from "@sankhyalabs/core";
|
|
2
|
-
import {
|
|
2
|
+
import { ISearchArgument } from "../../components/ez-combo-box/ez-combo-box";
|
|
3
|
+
import { IOption } from "../../components/ez-search/ez-search";
|
|
3
4
|
import { IFieldConfig } from "./IFieldConfig";
|
|
4
5
|
export default interface IAbstractFieldMetadata {
|
|
5
6
|
userInterface: UserInterface;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sankhyalabs/ezui",
|
|
3
|
-
"version": "5.20.0-dev.
|
|
3
|
+
"version": "5.20.0-dev.10",
|
|
4
4
|
"description": "Biblioteca de componentes Sankhya.",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/custom-elements/index.js",
|
|
@@ -21,8 +21,7 @@
|
|
|
21
21
|
"build.prod": "stencil build --docs --prod",
|
|
22
22
|
"build.with.peerdeps": "stencil build --docs --prod --force-peer-deps",
|
|
23
23
|
"start": "stencil build --dev --watch --serve --force-peer-deps",
|
|
24
|
-
"test": "stencil test --spec --e2e --logHeapUsage --runInBand",
|
|
25
|
-
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
24
|
+
"test": "stencil test --spec --e2e --logHeapUsage --runInBand --coverage --silent --testResultsProcessor jest-sonar-reporter",
|
|
26
25
|
"generate": "stencil generate",
|
|
27
26
|
"storybook": "npm run start.storybook",
|
|
28
27
|
"build.watch": "stencil build --dev --watch --force-peer-deps",
|
|
@@ -53,7 +52,6 @@
|
|
|
53
52
|
"@sankhyalabs/docscss": "^1.0.4",
|
|
54
53
|
"@sankhyalabs/ez-design": "^4.0.0",
|
|
55
54
|
"@sankhyalabs/skippeerdeps": "^1.0.2",
|
|
56
|
-
"split-grid": "^1.0.11",
|
|
57
55
|
"@shopify/draggable": "^1.0.0-beta.8",
|
|
58
56
|
"@stencil/core": "^2.13.0",
|
|
59
57
|
"@stencil/react-output-target": "0.0.9",
|
|
@@ -72,18 +70,27 @@
|
|
|
72
70
|
"husky": "^8.0.3",
|
|
73
71
|
"jest": "^26.6.3",
|
|
74
72
|
"jest-cli": "^26.6.3",
|
|
73
|
+
"jest-sonar-reporter": "^2.0.0",
|
|
75
74
|
"npm-run-all": "^4.1.5",
|
|
76
75
|
"puppeteer": "^5.5.0",
|
|
77
76
|
"redux": "^4.1.2",
|
|
78
77
|
"redux-thunk": "^2.4.1",
|
|
79
78
|
"redux-undo": "^1.0.1",
|
|
80
79
|
"run-p": "0.0.0",
|
|
80
|
+
"split-grid": "^1.0.11",
|
|
81
81
|
"storybook-addon-preview": "^2.2.0",
|
|
82
82
|
"uuid": "^9.0.0",
|
|
83
83
|
"ws": "^7.5.6"
|
|
84
84
|
},
|
|
85
85
|
"jest": {
|
|
86
|
-
"verbose": true
|
|
86
|
+
"verbose": true,
|
|
87
|
+
"testResultsProcessor": "jest-sonar-reporter"
|
|
88
|
+
},
|
|
89
|
+
"jestSonar": {
|
|
90
|
+
"sonar56x": true,
|
|
91
|
+
"reportPath": "reports",
|
|
92
|
+
"reportFile": "test-report.xml",
|
|
93
|
+
"indent": 4
|
|
87
94
|
},
|
|
88
95
|
"peerDependencies": {
|
|
89
96
|
"@sankhyalabs/core": "^5.0.0"
|
|
@@ -1,52 +0,0 @@
|
|
|
1
|
-
'use strict';
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
|
-
const index = require('./index-a7b0c73d.js');
|
|
6
|
-
const core = require('@sankhyalabs/core');
|
|
7
|
-
|
|
8
|
-
const ezCardItemCss = ":host{--ez-card-item--font-size:var(--text--medium, 14px);--ez-card-item--font-family:var(--font-pattern, Arial);--ez-card-item--font-weight:var(--text-weight--medium, 400);--ez-card-item--font-weight-large:var(--text-weight--large, 600);--ez-card-item--color:var(--title--primary, #2B3A54);--ez-card-item__key--color:var(--text--primary, #626e82);--ez-card-item__detail-label--color:var(--text--secondary, #A2ABB9);--ez-card-item__detail--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__title--padding-bottom:var(--space--extra-small, 3px);--ez-card-item__highlight--color:var(--color--primary-300, #E2F4EF);width:100%;display:flex;cursor:pointer}.card-item{display:flex;flex-direction:column;width:100%;cursor:pointer;padding:12px;z-index:0;position:relative}.card-item:hover{background:#F0F3F7;border-radius:12px}.card-item__title{display:flex;align-items:center;line-height:18px;cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight-large);color:var(--ez-card-item--color);padding-bottom:var(--ez-card-item__title--padding-bottom);gap:var(--space--small, 6px)}.card-item__key{color:var(--ez-card-item__key--color)}.card-item__details{display:flex;cursor:pointer;justify-content:space-between;gap:var(--space--small, 6px)}.card-item__details-left{cursor:pointer;width:50%}.card-item__details-right{width:50%;cursor:pointer}.card-item__detail:not(:last-child){cursor:pointer;padding-bottom:var(--ez-card-item__detail--padding-bottom)}.card-item__detail-label{cursor:pointer;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item__detail-label--color)}.card-item__detail-value{cursor:pointer;line-break:anywhere;font-size:var(--ez-card-item--font-size);font-family:var(--ez-card-item--font-family);font-weight:var(--ez-card-item--font-weight);color:var(--ez-card-item--color)}.card-item__highlight{position:relative;border-radius:8px;z-index:-1;background-color:var(--ez-card-item__highlight--color);outline:2px solid var(--ez-card-item__highlight--color);box-shadow:-4px 0px 0px 0px var(--ez-card-item__highlight--color), \n 4px 0px 0px 0px var(--ez-card-item__highlight--color)}";
|
|
9
|
-
|
|
10
|
-
const EzCardItem = class {
|
|
11
|
-
constructor(hostRef) {
|
|
12
|
-
index.registerInstance(this, hostRef);
|
|
13
|
-
this.ezClick = index.createEvent(this, "ezClick", 7);
|
|
14
|
-
this.item = undefined;
|
|
15
|
-
}
|
|
16
|
-
componentWillRender() {
|
|
17
|
-
this.createDetailList();
|
|
18
|
-
}
|
|
19
|
-
componentDidLoad() {
|
|
20
|
-
var _a, _b;
|
|
21
|
-
const dataInfo = { id: core.StringUtils.toCamelCase(((_a = this.item) === null || _a === void 0 ? void 0 : _a.key) || ((_b = this.item) === null || _b === void 0 ? void 0 : _b.title) || "") };
|
|
22
|
-
core.ElementIDUtils.addIDInfo(this._element, null, dataInfo);
|
|
23
|
-
}
|
|
24
|
-
createDetailList() {
|
|
25
|
-
var _a, _b, _c;
|
|
26
|
-
this._details = { detailsLeft: [], detailsRight: [] };
|
|
27
|
-
let cont = 0;
|
|
28
|
-
if ((_a = this.item) === null || _a === void 0 ? void 0 : _a.details) {
|
|
29
|
-
for (const attribute in this.item.details) {
|
|
30
|
-
cont < 3 ?
|
|
31
|
-
this._details.detailsLeft.push({ label: attribute, value: (_b = this.item.details[attribute]) === null || _b === void 0 ? void 0 : _b.toString() }) :
|
|
32
|
-
this._details.detailsRight.push({ label: attribute, value: (_c = this.item.details[attribute]) === null || _c === void 0 ? void 0 : _c.toString() });
|
|
33
|
-
cont++;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
buildDetailContent(detail) {
|
|
38
|
-
return index.h("div", { class: "card-item__detail" }, index.h("label", { class: "card-item__detail-label" }, detail.label), ": ", index.h("label", { class: "card-item__detail-value", innerHTML: detail.value }));
|
|
39
|
-
}
|
|
40
|
-
render() {
|
|
41
|
-
return (index.h(index.Host, null, this.item &&
|
|
42
|
-
index.h("div", { class: "card-item", onClick: () => { this.ezClick.emit(this.item); } }, index.h("label", { class: "card-item__title" }, index.h("span", { class: "card-item__key", innerHTML: this.item.key }), index.h("span", { innerHTML: this.item.title })), index.h("div", { class: "card-item__details" }, index.h("div", { class: "card-item__details-left" }, this._details.detailsLeft.map(detail => {
|
|
43
|
-
return this.buildDetailContent(detail);
|
|
44
|
-
})), index.h("div", { class: "card-item__details-right" }, this._details.detailsRight.map(detail => {
|
|
45
|
-
return this.buildDetailContent(detail);
|
|
46
|
-
}))))));
|
|
47
|
-
}
|
|
48
|
-
get _element() { return index.getElement(this); }
|
|
49
|
-
};
|
|
50
|
-
EzCardItem.style = ezCardItemCss;
|
|
51
|
-
|
|
52
|
-
exports.ez_card_item = EzCardItem;
|