@sankhyalabs/ezui 5.22.0-dev.140 → 5.22.0-dev.142
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ez-double-list.cjs.entry.js +114 -53
- package/dist/cjs/{ez-tooltip.cjs.entry.js → ez-filter-input_2.cjs.entry.js} +123 -1
- package/dist/cjs/ez-grid.cjs.entry.js +15 -1
- package/dist/cjs/ez-sortable-list.cjs.entry.js +3510 -0
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/index-a7b0c73d.js +6 -6
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ez-double-list/doubleListHelper.js +9 -10
- package/dist/collection/components/ez-double-list/ez-double-list.css +6 -38
- package/dist/collection/components/ez-double-list/ez-double-list.js +168 -50
- package/dist/collection/components/ez-grid/ez-grid.js +43 -4
- package/dist/collection/components/ez-grid/interfaces/IGridMode.js +1 -0
- package/dist/collection/components/ez-grid/interfaces/index.js +1 -0
- package/dist/collection/components/ez-sortable-list/ez-sortable-list.css +226 -0
- package/dist/collection/components/ez-sortable-list/ez-sortable-list.js +582 -0
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +3652 -70
- package/dist/esm/ez-double-list.entry.js +115 -54
- package/dist/esm/{ez-tooltip.entry.js → ez-filter-input_2.entry.js} +124 -3
- package/dist/esm/ez-grid.entry.js +15 -1
- package/dist/esm/ez-sortable-list.entry.js +3506 -0
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/index-baa5e267.js +6 -6
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-59561756.entry.js +7 -0
- package/dist/ezui/p-63cb493e.entry.js +1 -0
- package/dist/ezui/{p-e09514b6.entry.js → p-b38411b4.entry.js} +1 -1
- package/dist/ezui/p-e4528470.entry.js +1 -0
- package/dist/types/components/ez-double-list/doubleListHelper.d.ts +4 -2
- package/dist/types/components/ez-double-list/ez-double-list.d.ts +60 -24
- package/dist/types/components/ez-grid/ez-grid.d.ts +6 -1
- package/dist/types/components/ez-grid/interfaces/IGridMode.d.ts +1 -0
- package/dist/types/components/ez-grid/interfaces/index.d.ts +1 -0
- package/dist/types/components/ez-sortable-list/ez-sortable-list.d.ts +91 -0
- package/dist/types/components.d.ts +194 -4
- package/package.json +5 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/cjs/ez-filter-input.cjs.entry.js +0 -129
- package/dist/esm/ez-filter-input.entry.js +0 -125
- package/dist/ezui/p-20c024f7.entry.js +0 -1
- package/dist/ezui/p-79044c3e.entry.js +0 -1
- package/dist/ezui/p-7e677b7b.entry.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{r as t,c as e,h as i,H as s}from"./p-23a36bb6.js";import{ObjectUtils as o}from"@sankhyalabs/core";import{i as n}from"./p-80dfc50b.js";function h(t,e,i){if(!t.length)return[...e];if(!e.length)return[];const s=function(t,e){return t.map((t=>e.findIndex((e=>e.id===t))))}(t,e),o=0===(n=s).length?0:n.reduce(((t,e)=>e<t?e:t),n[0]);var n;const h=function(t){return 0===t.length?0:t.reduce(((t,e)=>e>t?e:t),t[0])}(s);return function(t,e,i,s){return t<0||e>=s.length||t>e?s:i?function(t,e,i){if(t===i.length-1)return i;const s=i.slice(0,e),o=i.slice(e,t+1),n=i.slice(t+1),h=n.shift();return h?[...s,h,...o,...n]:i}(e,t,s):function(t,e,i){if(0===t)return i;const s=i.slice(0,t-1),o=i.slice(t,e+1),n=i.slice(e+1);return[...s,...o,i[t-1],...n]}(t,e,s)}(o,h,i,e)}function l({from:t,to:e,selectedFrom:i,selectedTo:s}){return e=[...e.map((t=>a(t,!1))),...t.map((t=>a(t,!0)))],i=[],s=[...t.map((({id:t})=>t))],{from:t=[],to:e,selectedFrom:i,selectedTo:s}}function r({from:t,to:e,selectedFrom:i,selectedTo:s,insertIndex:o=e.length}){if(!t.length)return{from:t,to:e,selectedFrom:i,selectedTo:s};const n=function(t,e,i){const s=t.map((t=>t.id)),o=e.filter((t=>!s.includes(t)));return i.filter((({id:t})=>o.includes(t)))}(e,i,t);if(!n.length)return{from:t,to:e,selectedFrom:i,selectedTo:s};let h=e.map((t=>a(t,!1)));return h.splice(o,0,...n.map((t=>a(t,!0)))),{from:t.filter((t=>!i.includes(t.id))),to:h,selectedFrom:[],selectedTo:[...i]}}function a(t,e){return Object.assign(Object.assign({},t),{selected:e})}const d=class{constructor(i){t(this,i),this.ezLeftListChanged=e(this,"ezLeftListChanged",7),this.ezRightListChanged=e(this,"ezRightListChanged",7),this.LEFT_LIST_ID="LEFT-LIST-ID",this.RIGHT_LIST_ID="RIGHT-LIST-ID",this.leftList=[],this.leftTitle=void 0,this.rightList=[],this.entityLabel="item",this.entityLabelPlural="itens",this.leftListLabel="disponíveis",this.rightListLabel="selecionados",this.useOnlyRightList=!1,this.rightTitle=void 0,this.emptyMessage=void 0,this.slotsListBuilder=void 0,this.leftFilteredList=[],this.rightFilteredList=[],this.selectedLeftList=[],this.selectedRightList=[],this.isFilteringLeft=!1,this.isFilteringRight=!1}async resetSelectedLists(){this.selectedLeftList=[],this.selectedRightList=[]}observeLeftList(t,e){o.equals(t,e)||this.ezLeftListChanged.emit(t)}observeRightList(t,e){o.equals(t,e)||this.ezRightListChanged.emit(t)}async handleChangeLeft({detail:t}){t.to.getAttribute("id")&&t.to.getAttribute("id")===this.RIGHT_LIST_ID?(t.selectItens=t.selectItens.filter((t=>this.rightList.every((e=>e.id!==t)))),this.leftList=[...t.dataSource],this.selectedLeftList=[...t.selectItens],this.transferToRight(null==t?void 0:t.newIndex)):this.leftList=[...this.reorderArray(t.dataSource,t.selectItens,t.newIndex)]}async handleChangeRight({detail:t}){t.to.getAttribute("id")&&t.to.getAttribute("id")===this.LEFT_LIST_ID?(t.selectItens=t.selectItens.filter((t=>this.leftList.every((e=>e.id!==t)))),this.rightList=[...t.dataSource],this.selectedRightList=[...t.selectItens],this.transferToLeft(null==t?void 0:t.newIndex)):this.rightList=[...this.reorderArray(t.dataSource,t.selectItens,t.newIndex)]}reorderArray(t,e,i){const s=t.filter((t=>!e.includes(t.id))),o=t.filter((t=>e.includes(t.id)));return s.splice(i,0,...o),s}enableTransferAllToRight(){return this.leftList.length>0}enableTransferAllToLeft(){return this.rightList.length>0}enableTransferToRight(){return this.selectedLeftList.length>0}enableTransferToLeft(){return this.selectedRightList.length>0}enableMoveUp(t){if(this.isFilteringRight)return!1;const e=this.getRightSelectedItemsIndex();return this.selectedRightList.length>0&&!e.includes(0)&&(!!t||n(e))}enableMoveDown(t){if(this.isFilteringRight)return!1;const e=this.getRightSelectedItemsIndex();return this.selectedRightList.length>0&&!e.includes(this.rightList.length-1)&&(!!t||n(e))}getRightSelectedItemsIndex(){return this.selectedRightList.map((t=>this.rightList.findIndex((e=>e.id===t))))}transferToRight(t){const{from:e,to:i,selectedFrom:s,selectedTo:o}=r(Object.assign(Object.assign({},this.buildTransferToRightConfig()),{insertIndex:null!=t?t:0}));this.leftList=[],requestAnimationFrame((()=>this.leftList=[...e])),this.rightList=[...i],this.selectedLeftList=[...s],this.selectedRightList=[...o]}transferToLeft(t){const{from:e,to:i,selectedFrom:s,selectedTo:o}=r(Object.assign(Object.assign({},this.buildTransferToLeftConfig()),{insertIndex:null!=t?t:0}));this.rightList=[],requestAnimationFrame((()=>this.rightList=[...e])),this.leftList=[...i],this.selectedRightList=[...s],this.selectedLeftList=[...o]}async handleTransferAllToRight(){const{from:t,to:e,selectedFrom:i,selectedTo:s}=l(this.buildTransferToRightConfig());this.leftList=[...t],this.rightList=[...e],this.selectedLeftList=[...i],this.selectedRightList=[...s],requestAnimationFrame((async()=>{await this.clearSelectionAll()}))}async handleTransferAllToLeft(){const{from:t,to:e,selectedFrom:i,selectedTo:s}=l(this.buildTransferToLeftConfig());this.rightList=[...t],this.leftList=[...e],this.selectedRightList=[...i],this.selectedLeftList=[...s],requestAnimationFrame((async()=>{await this.clearSelectionAll()}))}buildTransferToRightConfig(){return{from:this.leftList,to:this.rightList,selectedFrom:this.selectedLeftList,selectedTo:this.selectedRightList}}buildTransferToLeftConfig(){return{from:this.rightList,to:this.leftList,selectedFrom:this.selectedRightList,selectedTo:this.selectedLeftList}}handleMoveUp(){this.rightList=[...h(this.selectedRightList,this.rightList,!1)]}handleMoveDown(){this.rightList=[...h(this.selectedRightList,this.rightList,!0)]}handleMoveToTop(){const{itemsToKeep:t,itemsToMove:e}=this.getItemsToKeepAndToMove();this.rightList=[...e,...t]}handleMoveToBottom(){const{itemsToKeep:t,itemsToMove:e}=this.getItemsToKeepAndToMove();this.rightList=[...t,...e]}handleSelectLeftItem({detail:t}){this.selectedLeftList=[...t.map((({id:t})=>t))]}handleSelectRightItem({detail:t}){this.selectedRightList=[...t.map((({id:t})=>t))]}getItemsToKeepAndToMove(){return{itemsToKeep:this.rightList.filter((t=>!this.selectedRightList.includes(t.id))),itemsToMove:this.rightList.filter((t=>this.selectedRightList.includes(t.id)))}}async handleTransferToRight(){this.transferToRight(),this.leftFilteredList=[],await this.leftEzListInstance.clearSelection()}async handleTransferToLeft(){this.transferToLeft(),this.rightFilteredList=[],await this.rightEzListInstance.clearSelection()}async clearSelectionAll(){await this.rightEzListInstance.clearSelection(),await this.leftEzListInstance.clearSelection()}handleChooseLeft(){requestAnimationFrame((async()=>{await this.rightEzListInstance.clearSelection()}))}handleChooseRight(){this.useOnlyRightList||requestAnimationFrame((async()=>{await this.leftEzListInstance.clearSelection()}))}renderList(t){const{idSortableList:e,list:s,isFiltering:o,filteredList:n,emptyMessage:h,slotConfig:l,callbacks:r,title:a}=t;return i("ez-sortable-list",{ref:null==r?void 0:r.setRef,title:a,idSortableList:e,emptyMessage:h,class:"ez-size-height--full",dataSource:o?n:s,hoverFeedback:!0,enableMultipleSelection:!0,removeItensMoved:!0,entityLabel:this.entityLabel,entityLabelPlural:this.entityLabelPlural,itemRightSlotBuilder:null==l?void 0:l.itemRightSlotBuilder,itemLeftSlotBuilder:null==l?void 0:l.itemLeftSlotBuilder,onItemsReordered:null==r?void 0:r.onChange.bind(this),onEzSelectItens:null==r?void 0:r.onSelect.bind(this),onEzDoubleClick:null==r?void 0:r.onDoubleClick.bind(this),onEzChoose:null==r?void 0:r.onChoose.bind(this)})}render(){var t,e,o,n,h,l,r,a,d,c;return i(s,null,!this.useOnlyRightList&&i("div",{class:"list__container"},this.leftList&&this.renderList({idSortableList:this.LEFT_LIST_ID,list:this.leftList,title:this.leftTitle,isFiltering:this.isFilteringLeft,filteredList:this.leftFilteredList,emptyMessage:(null===(t=this.emptyMessage)||void 0===t?void 0:t.LEFT_LIST)?this.emptyMessage.LEFT_LIST:`Nenhum ${this.entityLabel} disponível`,slotConfig:{itemRightSlotBuilder:null===(o=null===(e=this.slotsListBuilder)||void 0===e?void 0:e.LEFT_LIST)||void 0===o?void 0:o.itemRightSlotBuilder,itemLeftSlotBuilder:null===(h=null===(n=this.slotsListBuilder)||void 0===n?void 0:n.LEFT_LIST)||void 0===h?void 0:h.itemLeftSlotBuilder},callbacks:{setRef:t=>this.leftEzListInstance=t,onChange:t=>this.handleChangeLeft(t),onSelect:this.handleSelectLeftItem.bind(this),onDoubleClick:this.handleTransferToRight.bind(this),onChoose:this.handleChooseLeft.bind(this)}})),!this.useOnlyRightList&&i("div",{class:"actions__column"},i("ez-button",{mode:"icon",iconName:"dual-chevron-right",enabled:this.enableTransferAllToRight(),title:`Mover todos para ${this.rightListLabel}`,size:"small",onClick:this.handleTransferAllToRight.bind(this)}),i("ez-button",{mode:"icon",iconName:"chevron-right",enabled:this.enableTransferToRight(),title:`Mover para ${this.rightListLabel}`,size:"small",onClick:this.handleTransferToRight.bind(this)}),i("ez-button",{mode:"icon",iconName:"chevron-left",enabled:this.enableTransferToLeft(),title:`Mover para ${this.leftListLabel}`,size:"small",onClick:this.handleTransferToLeft.bind(this)}),i("ez-button",{mode:"icon",iconName:"dual-chevron-left",enabled:this.enableTransferAllToLeft(),title:`Mover todos para ${this.leftListLabel}`,size:"small",onClick:this.handleTransferAllToLeft.bind(this)})),i("div",{class:"list__container"},this.rightList&&this.renderList({idSortableList:this.RIGHT_LIST_ID,list:this.rightList,title:this.rightTitle,isFiltering:this.isFilteringRight,filteredList:this.rightFilteredList,emptyMessage:(null===(l=this.emptyMessage)||void 0===l?void 0:l.RIGHT_LIST)?this.emptyMessage.RIGHT_LIST:`Nenhum ${this.entityLabel} selecionado`,slotConfig:{itemRightSlotBuilder:null===(a=null===(r=this.slotsListBuilder)||void 0===r?void 0:r.RIGHT_LIST)||void 0===a?void 0:a.itemRightSlotBuilder,itemLeftSlotBuilder:null===(c=null===(d=this.slotsListBuilder)||void 0===d?void 0:d.RIGHT_LIST)||void 0===c?void 0:c.itemLeftSlotBuilder},callbacks:{setRef:t=>this.rightEzListInstance=t,onChange:t=>this.handleChangeRight(t),onSelect:this.handleSelectRightItem.bind(this),onDoubleClick:this.handleTransferToLeft.bind(this),onChoose:this.handleChooseRight.bind(this)}})),i("div",{class:"actions__column"},i("ez-button",{mode:"icon",iconName:"dual-chevron-up",enabled:this.enableMoveUp(!0),title:"Mover para primeira posição",size:"small",onClick:this.handleMoveToTop.bind(this)}),i("ez-button",{mode:"icon",iconName:"chevron-up",enabled:this.enableMoveUp(),title:"Mover para cima",size:"small",onClick:this.handleMoveUp.bind(this)}),i("ez-button",{mode:"icon",iconName:"chevron-down",enabled:this.enableMoveDown(),title:"Mover para baixo",size:"small",onClick:this.handleMoveDown.bind(this)}),i("ez-button",{mode:"icon",iconName:"dual-chevron-down",enabled:this.enableMoveDown(!0),title:"Mover para última posição",size:"small",onClick:this.handleMoveToBottom.bind(this)})))}static get watchers(){return{leftList:["observeLeftList"],rightList:["observeRightList"]}}};d.style='.sc-ez-double-list-h{display:flex;flex-direction:row;gap:8px;align-items:center;font-family:var(--font-pattern, "Roboto");width:100%}@media screen and (max-width: 1366px){.group.sc-ez-double-list{height:350px}}.list__container.sc-ez-double-list{height:100%;width:100%;min-height:150px;overflow:auto;display:flex}.actions__column.sc-ez-double-list{display:flex;flex-direction:column;gap:4px}';export{d as ez_double_list}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
-
import { ListItem } from
|
|
1
|
+
import { ListItem } from "../ez-sortable-list/ez-sortable-list";
|
|
2
2
|
export declare function moveItems(selectedItemsList: string[], itemsList: ListItem[], foward: boolean): ListItem[];
|
|
3
3
|
export declare function transferAll({ from, to, selectedFrom, selectedTo }: TransferConfig): TransferConfig;
|
|
4
|
-
export declare function transferItems({ from, to, selectedFrom, selectedTo }: TransferConfig
|
|
4
|
+
export declare function transferItems({ from, to, selectedFrom, selectedTo, insertIndex, }: TransferConfig & {
|
|
5
|
+
insertIndex?: number;
|
|
6
|
+
}): TransferConfig;
|
|
5
7
|
export interface TransferConfig {
|
|
6
8
|
from: ListItem[];
|
|
7
9
|
to: ListItem[];
|
|
@@ -1,10 +1,20 @@
|
|
|
1
1
|
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
-
import { ListItem } from '../ez-list/ez-list';
|
|
2
|
+
import { ListItem } from '../ez-sortable-list/ez-sortable-list';
|
|
3
|
+
export interface DoubleListSlotConfig {
|
|
4
|
+
itemLeftSlotBuilder?: (item: any) => HTMLElement | string;
|
|
5
|
+
itemRightSlotBuilder?: (item: any) => HTMLElement | string;
|
|
6
|
+
}
|
|
7
|
+
export interface DoubleListSlots {
|
|
8
|
+
LEFT_LIST?: DoubleListSlotConfig;
|
|
9
|
+
RIGHT_LIST?: DoubleListSlotConfig;
|
|
10
|
+
}
|
|
11
|
+
export interface EmptyMessage {
|
|
12
|
+
LEFT_LIST?: string;
|
|
13
|
+
RIGHT_LIST?: string;
|
|
14
|
+
}
|
|
3
15
|
export declare class EzDoubleList {
|
|
4
16
|
readonly LEFT_LIST_ID = "LEFT-LIST-ID";
|
|
5
17
|
readonly RIGHT_LIST_ID = "RIGHT-LIST-ID";
|
|
6
|
-
readonly LEFT_FILTER_ID = "LEFT-FILTER-ID";
|
|
7
|
-
readonly RIGHT_FILTER_ID = "RIGHT-FILTER-ID";
|
|
8
18
|
/**
|
|
9
19
|
* Define a lista origem.
|
|
10
20
|
*/
|
|
@@ -23,7 +33,7 @@ export declare class EzDoubleList {
|
|
|
23
33
|
*/
|
|
24
34
|
entityLabel: string;
|
|
25
35
|
/**
|
|
26
|
-
* Variação
|
|
36
|
+
* Variação plural do nome da entidade listada.
|
|
27
37
|
* Exemplo: "Campos", "Itens", "Empresas".
|
|
28
38
|
*/
|
|
29
39
|
entityLabelPlural: string;
|
|
@@ -35,29 +45,51 @@ export declare class EzDoubleList {
|
|
|
35
45
|
* Rótulo da lista direita.
|
|
36
46
|
*/
|
|
37
47
|
rightListLabel: string;
|
|
48
|
+
/**
|
|
49
|
+
* Define se irá exibir apenas a lista da direita.
|
|
50
|
+
*/
|
|
51
|
+
useOnlyRightList: boolean;
|
|
38
52
|
/**
|
|
39
53
|
* Define o título da lista destino.
|
|
40
54
|
*/
|
|
41
55
|
rightTitle: string;
|
|
56
|
+
/** Objeto que define as mensagens a serem exibidas quando a lista está vazia
|
|
57
|
+
* Exemplo:
|
|
58
|
+
* {
|
|
59
|
+
* LEFT_LIST?: "Lista lado esquerdo vazia.",
|
|
60
|
+
* RIGHT_LIST?: "Lista lado direito vazia.";
|
|
61
|
+
* }
|
|
62
|
+
*/
|
|
63
|
+
emptyMessage: EmptyMessage;
|
|
64
|
+
/**
|
|
65
|
+
* Objeto que define os métodos de construção dos elementos visuais para os itens de cada lista.
|
|
66
|
+
*
|
|
67
|
+
* Este objeto permite configurar dinamicamente os elementos HTML que serão exibidos ao lado
|
|
68
|
+
* esquerdo e direito dos itens em ambas as listas (`LEFT_LIST` e `RIGHT_LIST`).
|
|
69
|
+
*/
|
|
70
|
+
slotsListBuilder: DoubleListSlots;
|
|
42
71
|
leftFilteredList: ListItem[];
|
|
43
72
|
rightFilteredList: ListItem[];
|
|
44
73
|
selectedLeftList: string[];
|
|
45
74
|
selectedRightList: string[];
|
|
46
75
|
isFilteringLeft: boolean;
|
|
47
76
|
isFilteringRight: boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Emitido ao realizar uma alteração na lista esquerda do componente.
|
|
79
|
+
*/
|
|
48
80
|
ezLeftListChanged: EventEmitter<Array<ListItem>>;
|
|
81
|
+
/**
|
|
82
|
+
* Emitido ao realizar uma alteração na lista direita do componente.
|
|
83
|
+
*/
|
|
49
84
|
ezRightListChanged: EventEmitter<Array<ListItem>>;
|
|
50
85
|
resetSelectedLists(): Promise<void>;
|
|
51
86
|
observeLeftList(newValue: any, oldValue: any): void;
|
|
52
87
|
observeRightList(newValue: any, oldValue: any): void;
|
|
53
88
|
private leftEzListInstance;
|
|
54
89
|
private rightEzListInstance;
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
private
|
|
58
|
-
private handleFilterChangeRight;
|
|
59
|
-
private handleChangeLeft;
|
|
60
|
-
private handleChangeRight;
|
|
90
|
+
handleChangeLeft({ detail }: CustomEvent): Promise<void>;
|
|
91
|
+
handleChangeRight({ detail }: CustomEvent): Promise<void>;
|
|
92
|
+
private reorderArray;
|
|
61
93
|
private enableTransferAllToRight;
|
|
62
94
|
private enableTransferAllToLeft;
|
|
63
95
|
private enableTransferToRight;
|
|
@@ -67,21 +99,25 @@ export declare class EzDoubleList {
|
|
|
67
99
|
private getRightSelectedItemsIndex;
|
|
68
100
|
private transferToRight;
|
|
69
101
|
private transferToLeft;
|
|
70
|
-
|
|
71
|
-
|
|
102
|
+
handleTransferAllToRight(): Promise<void>;
|
|
103
|
+
handleTransferAllToLeft(): Promise<void>;
|
|
72
104
|
private buildTransferToRightConfig;
|
|
73
105
|
private buildTransferToLeftConfig;
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
106
|
+
handleMoveUp(): void;
|
|
107
|
+
handleMoveDown(): void;
|
|
108
|
+
handleMoveToTop(): void;
|
|
109
|
+
handleMoveToBottom(): void;
|
|
110
|
+
handleSelectLeftItem({ detail }: CustomEvent): void;
|
|
111
|
+
handleSelectRightItem({ detail }: CustomEvent): void;
|
|
112
|
+
getItemsToKeepAndToMove(): {
|
|
113
|
+
itemsToKeep: ListItem[];
|
|
114
|
+
itemsToMove: ListItem[];
|
|
115
|
+
};
|
|
116
|
+
handleTransferToRight(): Promise<void>;
|
|
117
|
+
handleTransferToLeft(): Promise<void>;
|
|
118
|
+
clearSelectionAll(): Promise<void>;
|
|
119
|
+
handleChooseLeft(): void;
|
|
120
|
+
handleChooseRight(): void;
|
|
121
|
+
private renderList;
|
|
86
122
|
render(): any;
|
|
87
123
|
}
|
|
@@ -3,7 +3,7 @@ import { EventEmitter } from '../../stencil-public-runtime';
|
|
|
3
3
|
import { IRecordValidator } from '../../utils/form/interfaces';
|
|
4
4
|
import { IMultiSelectionListDataSource } from '../ez-multi-selection-list/interfaces/IMultiSelectionListDataSource';
|
|
5
5
|
import { EzGridColumStateEvent, EzGridColumn, EzGridColumnConfig, IGridConfig, IStatusResolver, StatusResolverFunction } from './controller/EzGridController';
|
|
6
|
-
import { ICustomFormatter, ISelection, ISelectionToastConfig } from './interfaces';
|
|
6
|
+
import { ICustomFormatter, IGridMode, ISelection, ISelectionToastConfig } from './interfaces';
|
|
7
7
|
import { ICustomEditor } from '../../utils/customEditor/interfaces/ICustomEditor';
|
|
8
8
|
import { ICustomRender } from '../../utils/customRender/interfaces/ICustomRender';
|
|
9
9
|
export declare class EzGrid {
|
|
@@ -144,6 +144,10 @@ export declare class EzGrid {
|
|
|
144
144
|
* Define se a grade deve suprimir o scroll horizontal.
|
|
145
145
|
*/
|
|
146
146
|
suppressHorizontalScroll: boolean;
|
|
147
|
+
/**
|
|
148
|
+
* Define o modo de uso da grade
|
|
149
|
+
*/
|
|
150
|
+
mode: IGridMode;
|
|
147
151
|
/**
|
|
148
152
|
* Aplica a definição de colunas.
|
|
149
153
|
*/
|
|
@@ -220,6 +224,7 @@ export declare class EzGrid {
|
|
|
220
224
|
observeConfig(config: IGridConfig): void;
|
|
221
225
|
updatePaginationTooltip(): void;
|
|
222
226
|
observePaginationCounterMode(newValue: any): void;
|
|
227
|
+
observeModeChange(newMode?: IGridMode): Promise<void>;
|
|
223
228
|
onSelectionChange(evt: CustomEvent): void;
|
|
224
229
|
handleClick(event: MouseEvent): Promise<void>;
|
|
225
230
|
private setSelection;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type IGridMode = "simple" | "complete";
|
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
import { EventEmitter } from '../../stencil-public-runtime';
|
|
2
|
+
import Sortable from 'sortablejs';
|
|
3
|
+
import { SlotBuilder } from '../ez-list/ez-list';
|
|
4
|
+
export interface ListItem {
|
|
5
|
+
label: string;
|
|
6
|
+
id: string;
|
|
7
|
+
selected?: boolean;
|
|
8
|
+
sort?: string;
|
|
9
|
+
}
|
|
10
|
+
export declare class EzSortableList {
|
|
11
|
+
el: HTMLElement;
|
|
12
|
+
_sortableInstance: Sortable;
|
|
13
|
+
filterTerm: string;
|
|
14
|
+
/**
|
|
15
|
+
* Define o título da lista.
|
|
16
|
+
*/
|
|
17
|
+
title: string;
|
|
18
|
+
/**
|
|
19
|
+
* Define se o cabeçalho deve ficar oculto.
|
|
20
|
+
*/
|
|
21
|
+
hideHeader: boolean;
|
|
22
|
+
/**
|
|
23
|
+
* Define se o totalizador deve ser escondido.
|
|
24
|
+
*/
|
|
25
|
+
hideTotalizer: boolean;
|
|
26
|
+
/** Grupo ao qual o ez-sortable-list pertence */
|
|
27
|
+
group: string;
|
|
28
|
+
/** Lista de itens para serem renderizados */
|
|
29
|
+
dataSource: Array<ListItem>;
|
|
30
|
+
/** ID do sortable list */
|
|
31
|
+
idSortableList: string;
|
|
32
|
+
/**
|
|
33
|
+
* Nome da entidade listada.
|
|
34
|
+
* Exemplo: "Campo", "Item", "Empresa".
|
|
35
|
+
*/
|
|
36
|
+
entityLabel: string;
|
|
37
|
+
/**
|
|
38
|
+
* Variação plural do nome da entidade listada.
|
|
39
|
+
* Exemplo: "Campos", "Itens", "Empresas".
|
|
40
|
+
*/
|
|
41
|
+
entityLabelPlural: string;
|
|
42
|
+
/** Mensagem exibida quando a lista está vazia */
|
|
43
|
+
emptyMessage: string;
|
|
44
|
+
/** Quando verdadeiro, ativa o feedback visual ao efetuar hover nos itens da lista */
|
|
45
|
+
hoverFeedback: boolean;
|
|
46
|
+
/** Habilita seleção de múltiplos itens utilizando as teclas 'Ctrl/Command' ou 'Shift' */
|
|
47
|
+
enableMultipleSelection: boolean;
|
|
48
|
+
/** Remove itens arrastados de uma lista para outra */
|
|
49
|
+
removeItensMoved: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* Função builder que possibilita alterar como o item da lista vai ser apresentado.
|
|
52
|
+
* Observação: No react ele se transforma em VNode e não como HTMLElement.
|
|
53
|
+
*/
|
|
54
|
+
itemRightSlotBuilder: SlotBuilder;
|
|
55
|
+
/**
|
|
56
|
+
* Função builder que possibilita gerar conteúdo dinâmico à esquerda do item da lista.
|
|
57
|
+
* * Observação: No react ele se transforma em VNode e não como HTMLElement.
|
|
58
|
+
*/
|
|
59
|
+
itemLeftSlotBuilder: SlotBuilder;
|
|
60
|
+
/** Evento emitido quando a ordem dos itens muda */
|
|
61
|
+
itemsReordered: EventEmitter<any>;
|
|
62
|
+
/** Emitido sempre que um ou vários itens da lista forem selecionados */
|
|
63
|
+
ezSelectItens: EventEmitter<ListItem[] | ListItem>;
|
|
64
|
+
/** Emitido quando ocorre um duplo clique em um item da lista */
|
|
65
|
+
ezDoubleClick?: EventEmitter<ListItem>;
|
|
66
|
+
/** Emitido quando ocorre a escolha de um item da lista */
|
|
67
|
+
ezChoose?: EventEmitter<ListItem[] | ListItem>;
|
|
68
|
+
/** Remove a seleção de todos os itens da lista */
|
|
69
|
+
clearSelection(): Promise<void>;
|
|
70
|
+
selectedItems: Set<string>;
|
|
71
|
+
componentDidLoad(): void;
|
|
72
|
+
componentDidRender(): void;
|
|
73
|
+
private initSortable;
|
|
74
|
+
private selectPredefinedItens;
|
|
75
|
+
private handleSortItem;
|
|
76
|
+
private removeDuplicateElements;
|
|
77
|
+
private handleSelect;
|
|
78
|
+
private handleDeselect;
|
|
79
|
+
private updateSelection;
|
|
80
|
+
private emitSelectedItems;
|
|
81
|
+
private handleReorderEvent;
|
|
82
|
+
private handleDoubleClick;
|
|
83
|
+
getContainerItemBuilder(slotPosition: 'left' | 'right', item: ListItem, className?: string): HTMLElement;
|
|
84
|
+
disconnectedCallback(): void;
|
|
85
|
+
private buildTotalizer;
|
|
86
|
+
private renderItems;
|
|
87
|
+
private handleFilterChanged;
|
|
88
|
+
private renderTotalizer;
|
|
89
|
+
private renderHeader;
|
|
90
|
+
render(): any;
|
|
91
|
+
}
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { HTMLStencilElement, JSXBase } from "./stencil-public-runtime";
|
|
8
8
|
import { IAction } from "./utils";
|
|
9
9
|
import { AlertItem } from "./components/ez-alert-list/ez-alert-list";
|
|
10
|
-
import {
|
|
10
|
+
import { SlotBuilder } from "./components/ez-list/ez-list";
|
|
11
11
|
import { IPosition } from "./components/ez-badge/interfaces/IPosition";
|
|
12
12
|
import { IBreadcrumbItem } from "./components/ez-breadcrumb/ez-breadcrumb";
|
|
13
13
|
import { CardItem } from "./components/ez-card-item/ez-card-item";
|
|
@@ -21,12 +21,14 @@ import { ICustomEditor } from "./utils/customEditor/interfaces/ICustomEditor";
|
|
|
21
21
|
import { IFormViewField } from "./components/ez-form-view/interfaces";
|
|
22
22
|
import { DataUnit, Record, WaitingChange } from "@sankhyalabs/core";
|
|
23
23
|
import { DialogType } from "./components/ez-dialog/DialogType";
|
|
24
|
+
import { ListItem } from "./components/ez-sortable-list/ez-sortable-list";
|
|
25
|
+
import { DoubleListSlots, EmptyMessage } from "./components/ez-double-list/ez-double-list";
|
|
24
26
|
import { IDropdownItem, IDropdownSubAction } from "./components/ez-dropdown/structure/DropdownItem";
|
|
25
27
|
import { IFieldConfig, IFormConfig, IRecordValidator } from "./utils/form/interfaces";
|
|
26
28
|
import { FormItems } from "./components/ez-form-view/structure";
|
|
27
29
|
import { IFormViewField as IFormViewField1 } from "./components/ez-form-view/interfaces/IFormViewField";
|
|
28
30
|
import { EzGridColumn, EzGridColumnConfig, EzGridColumStateEvent, IGridConfig, IStatusResolver, StatusResolverFunction } from "./components/ez-grid/controller/EzGridController";
|
|
29
|
-
import { ICustomFormatter, ISelection, ISelectionToastConfig } from "./components/ez-grid/interfaces";
|
|
31
|
+
import { ICustomFormatter, IGridMode, ISelection, ISelectionToastConfig } from "./components/ez-grid/interfaces";
|
|
30
32
|
import { IMultiSelectionListDataSource } from "./components/ez-multi-selection-list/interfaces/IMultiSelectionListDataSource";
|
|
31
33
|
import { ICustomRender } from "./utils/customRender/interfaces/ICustomRender";
|
|
32
34
|
import { IGuideItem } from "./components/ez-guide-navigator/interfaces";
|
|
@@ -43,6 +45,7 @@ import { IOption as IOption3, OptionLoaderFunction } from "./components/ez-searc
|
|
|
43
45
|
import { IOption as IOption4 } from "./components/ez-search-plus/ez-search-plus";
|
|
44
46
|
import { ModeMenuEnum, SizeMenuEnum, TypeMenuEnum } from "./components/ez-sidebar-navigator/interfaces";
|
|
45
47
|
import { SkeletonAnimation, SkeletonVariant } from "./components/ez-skeleton/ez-skeleton.constants";
|
|
48
|
+
import { ListItem as ListItem2 } from "./components/ez-sortable-list/ez-sortable-list";
|
|
46
49
|
import { Tab } from "./components/ez-tabselector/ez-tabselector";
|
|
47
50
|
import { IStyled } from "./components/ez-text-edit/ez-text-edit";
|
|
48
51
|
import { TFocusOptions as TFocusOptions1 } from "./components/ez-text-input/ez-text-input";
|
|
@@ -777,12 +780,16 @@ export namespace Components {
|
|
|
777
780
|
"show": (title: string, message: string, dialogType: DialogType, confirm: boolean, icon: string, labelCancel: string, labelConfirm: string, btnConfirmDanger: boolean, beforeClose: Function) => Promise<boolean>;
|
|
778
781
|
}
|
|
779
782
|
interface EzDoubleList {
|
|
783
|
+
/**
|
|
784
|
+
* Objeto que define as mensagens a serem exibidas quando a lista está vazia Exemplo: { LEFT_LIST?: "Lista lado esquerdo vazia.", RIGHT_LIST?: "Lista lado direito vazia."; }
|
|
785
|
+
*/
|
|
786
|
+
"emptyMessage": EmptyMessage;
|
|
780
787
|
/**
|
|
781
788
|
* Nome da entidade listada. Exemplo: "Campo", "Item", "Empresa".
|
|
782
789
|
*/
|
|
783
790
|
"entityLabel": string;
|
|
784
791
|
/**
|
|
785
|
-
* Variação
|
|
792
|
+
* Variação plural do nome da entidade listada. Exemplo: "Campos", "Itens", "Empresas".
|
|
786
793
|
*/
|
|
787
794
|
"entityLabelPlural": string;
|
|
788
795
|
/**
|
|
@@ -810,6 +817,14 @@ export namespace Components {
|
|
|
810
817
|
* Define o título da lista destino.
|
|
811
818
|
*/
|
|
812
819
|
"rightTitle": string;
|
|
820
|
+
/**
|
|
821
|
+
* Objeto que define os métodos de construção dos elementos visuais para os itens de cada lista. Este objeto permite configurar dinamicamente os elementos HTML que serão exibidos ao lado esquerdo e direito dos itens em ambas as listas (`LEFT_LIST` e `RIGHT_LIST`).
|
|
822
|
+
*/
|
|
823
|
+
"slotsListBuilder": DoubleListSlots;
|
|
824
|
+
/**
|
|
825
|
+
* Define se irá exibir apenas a lista da direita.
|
|
826
|
+
*/
|
|
827
|
+
"useOnlyRightList": boolean;
|
|
813
828
|
}
|
|
814
829
|
interface EzDropdown {
|
|
815
830
|
/**
|
|
@@ -1056,6 +1071,10 @@ export namespace Components {
|
|
|
1056
1071
|
* Localiza determinada coluna tornando-a visível.
|
|
1057
1072
|
*/
|
|
1058
1073
|
"locateColumn": (columnName: string) => Promise<void>;
|
|
1074
|
+
/**
|
|
1075
|
+
* Define o modo de uso da grade
|
|
1076
|
+
*/
|
|
1077
|
+
"mode": IGridMode;
|
|
1059
1078
|
/**
|
|
1060
1079
|
* Habilita a seleção de várias linhas.
|
|
1061
1080
|
*/
|
|
@@ -1980,6 +1999,68 @@ export namespace Components {
|
|
|
1980
1999
|
*/
|
|
1981
2000
|
"width": string;
|
|
1982
2001
|
}
|
|
2002
|
+
interface EzSortableList {
|
|
2003
|
+
/**
|
|
2004
|
+
* Remove a seleção de todos os itens da lista
|
|
2005
|
+
*/
|
|
2006
|
+
"clearSelection": () => Promise<void>;
|
|
2007
|
+
/**
|
|
2008
|
+
* Lista de itens para serem renderizados
|
|
2009
|
+
*/
|
|
2010
|
+
"dataSource": Array<ListItem>;
|
|
2011
|
+
/**
|
|
2012
|
+
* Mensagem exibida quando a lista está vazia
|
|
2013
|
+
*/
|
|
2014
|
+
"emptyMessage": string;
|
|
2015
|
+
/**
|
|
2016
|
+
* Habilita seleção de múltiplos itens utilizando as teclas 'Ctrl/Command' ou 'Shift'
|
|
2017
|
+
*/
|
|
2018
|
+
"enableMultipleSelection": boolean;
|
|
2019
|
+
/**
|
|
2020
|
+
* Nome da entidade listada. Exemplo: "Campo", "Item", "Empresa".
|
|
2021
|
+
*/
|
|
2022
|
+
"entityLabel": string;
|
|
2023
|
+
/**
|
|
2024
|
+
* Variação plural do nome da entidade listada. Exemplo: "Campos", "Itens", "Empresas".
|
|
2025
|
+
*/
|
|
2026
|
+
"entityLabelPlural": string;
|
|
2027
|
+
/**
|
|
2028
|
+
* Grupo ao qual o ez-sortable-list pertence
|
|
2029
|
+
*/
|
|
2030
|
+
"group": string;
|
|
2031
|
+
/**
|
|
2032
|
+
* Define se o cabeçalho deve ficar oculto.
|
|
2033
|
+
*/
|
|
2034
|
+
"hideHeader": boolean;
|
|
2035
|
+
/**
|
|
2036
|
+
* Define se o totalizador deve ser escondido.
|
|
2037
|
+
*/
|
|
2038
|
+
"hideTotalizer": boolean;
|
|
2039
|
+
/**
|
|
2040
|
+
* Quando verdadeiro, ativa o feedback visual ao efetuar hover nos itens da lista
|
|
2041
|
+
*/
|
|
2042
|
+
"hoverFeedback": boolean;
|
|
2043
|
+
/**
|
|
2044
|
+
* ID do sortable list
|
|
2045
|
+
*/
|
|
2046
|
+
"idSortableList": string;
|
|
2047
|
+
/**
|
|
2048
|
+
* Função builder que possibilita gerar conteúdo dinâmico à esquerda do item da lista. * Observação: No react ele se transforma em VNode e não como HTMLElement.
|
|
2049
|
+
*/
|
|
2050
|
+
"itemLeftSlotBuilder": SlotBuilder;
|
|
2051
|
+
/**
|
|
2052
|
+
* Função builder que possibilita alterar como o item da lista vai ser apresentado. Observação: No react ele se transforma em VNode e não como HTMLElement.
|
|
2053
|
+
*/
|
|
2054
|
+
"itemRightSlotBuilder": SlotBuilder;
|
|
2055
|
+
/**
|
|
2056
|
+
* Remove itens arrastados de uma lista para outra
|
|
2057
|
+
*/
|
|
2058
|
+
"removeItensMoved": boolean;
|
|
2059
|
+
/**
|
|
2060
|
+
* Define o título da lista.
|
|
2061
|
+
*/
|
|
2062
|
+
"title": string;
|
|
2063
|
+
}
|
|
1983
2064
|
interface EzSplitButton {
|
|
1984
2065
|
/**
|
|
1985
2066
|
* Se false o usuário não pode interagir com o botão.
|
|
@@ -2644,6 +2725,10 @@ export interface EzSidebarNavigatorCustomEvent<T> extends CustomEvent<T> {
|
|
|
2644
2725
|
detail: T;
|
|
2645
2726
|
target: HTMLEzSidebarNavigatorElement;
|
|
2646
2727
|
}
|
|
2728
|
+
export interface EzSortableListCustomEvent<T> extends CustomEvent<T> {
|
|
2729
|
+
detail: T;
|
|
2730
|
+
target: HTMLEzSortableListElement;
|
|
2731
|
+
}
|
|
2647
2732
|
export interface EzSplitButtonCustomEvent<T> extends CustomEvent<T> {
|
|
2648
2733
|
detail: T;
|
|
2649
2734
|
target: HTMLEzSplitButtonElement;
|
|
@@ -2971,6 +3056,12 @@ declare global {
|
|
|
2971
3056
|
prototype: HTMLEzSkeletonElement;
|
|
2972
3057
|
new (): HTMLEzSkeletonElement;
|
|
2973
3058
|
};
|
|
3059
|
+
interface HTMLEzSortableListElement extends Components.EzSortableList, HTMLStencilElement {
|
|
3060
|
+
}
|
|
3061
|
+
var HTMLEzSortableListElement: {
|
|
3062
|
+
prototype: HTMLEzSortableListElement;
|
|
3063
|
+
new (): HTMLEzSortableListElement;
|
|
3064
|
+
};
|
|
2974
3065
|
interface HTMLEzSplitButtonElement extends Components.EzSplitButton, HTMLStencilElement {
|
|
2975
3066
|
}
|
|
2976
3067
|
var HTMLEzSplitButtonElement: {
|
|
@@ -3115,6 +3206,7 @@ declare global {
|
|
|
3115
3206
|
"ez-sidebar-button": HTMLEzSidebarButtonElement;
|
|
3116
3207
|
"ez-sidebar-navigator": HTMLEzSidebarNavigatorElement;
|
|
3117
3208
|
"ez-skeleton": HTMLEzSkeletonElement;
|
|
3209
|
+
"ez-sortable-list": HTMLEzSortableListElement;
|
|
3118
3210
|
"ez-split-button": HTMLEzSplitButtonElement;
|
|
3119
3211
|
"ez-split-item": HTMLEzSplitItemElement;
|
|
3120
3212
|
"ez-split-panel": HTMLEzSplitPanelElement;
|
|
@@ -3823,12 +3915,16 @@ declare namespace LocalJSX {
|
|
|
3823
3915
|
"personalizedIconPath"?: string;
|
|
3824
3916
|
}
|
|
3825
3917
|
interface EzDoubleList {
|
|
3918
|
+
/**
|
|
3919
|
+
* Objeto que define as mensagens a serem exibidas quando a lista está vazia Exemplo: { LEFT_LIST?: "Lista lado esquerdo vazia.", RIGHT_LIST?: "Lista lado direito vazia."; }
|
|
3920
|
+
*/
|
|
3921
|
+
"emptyMessage"?: EmptyMessage;
|
|
3826
3922
|
/**
|
|
3827
3923
|
* Nome da entidade listada. Exemplo: "Campo", "Item", "Empresa".
|
|
3828
3924
|
*/
|
|
3829
3925
|
"entityLabel"?: string;
|
|
3830
3926
|
/**
|
|
3831
|
-
* Variação
|
|
3927
|
+
* Variação plural do nome da entidade listada. Exemplo: "Campos", "Itens", "Empresas".
|
|
3832
3928
|
*/
|
|
3833
3929
|
"entityLabelPlural"?: string;
|
|
3834
3930
|
/**
|
|
@@ -3843,7 +3939,13 @@ declare namespace LocalJSX {
|
|
|
3843
3939
|
* Define o título da lista origem.
|
|
3844
3940
|
*/
|
|
3845
3941
|
"leftTitle"?: string;
|
|
3942
|
+
/**
|
|
3943
|
+
* Emitido ao realizar uma alteração na lista esquerda do componente.
|
|
3944
|
+
*/
|
|
3846
3945
|
"onEzLeftListChanged"?: (event: EzDoubleListCustomEvent<Array<ListItem>>) => void;
|
|
3946
|
+
/**
|
|
3947
|
+
* Emitido ao realizar uma alteração na lista direita do componente.
|
|
3948
|
+
*/
|
|
3847
3949
|
"onEzRightListChanged"?: (event: EzDoubleListCustomEvent<Array<ListItem>>) => void;
|
|
3848
3950
|
/**
|
|
3849
3951
|
* Define a lista destino.
|
|
@@ -3857,6 +3959,14 @@ declare namespace LocalJSX {
|
|
|
3857
3959
|
* Define o título da lista destino.
|
|
3858
3960
|
*/
|
|
3859
3961
|
"rightTitle"?: string;
|
|
3962
|
+
/**
|
|
3963
|
+
* Objeto que define os métodos de construção dos elementos visuais para os itens de cada lista. Este objeto permite configurar dinamicamente os elementos HTML que serão exibidos ao lado esquerdo e direito dos itens em ambas as listas (`LEFT_LIST` e `RIGHT_LIST`).
|
|
3964
|
+
*/
|
|
3965
|
+
"slotsListBuilder"?: DoubleListSlots;
|
|
3966
|
+
/**
|
|
3967
|
+
* Define se irá exibir apenas a lista da direita.
|
|
3968
|
+
*/
|
|
3969
|
+
"useOnlyRightList"?: boolean;
|
|
3860
3970
|
}
|
|
3861
3971
|
interface EzDropdown {
|
|
3862
3972
|
/**
|
|
@@ -4081,6 +4191,10 @@ declare namespace LocalJSX {
|
|
|
4081
4191
|
* Ativa modo de linhas com cores alternadas.
|
|
4082
4192
|
*/
|
|
4083
4193
|
"enableRowTableStriped"?: boolean;
|
|
4194
|
+
/**
|
|
4195
|
+
* Define o modo de uso da grade
|
|
4196
|
+
*/
|
|
4197
|
+
"mode"?: IGridMode;
|
|
4084
4198
|
/**
|
|
4085
4199
|
* Habilita a seleção de várias linhas.
|
|
4086
4200
|
*/
|
|
@@ -4893,6 +5007,80 @@ declare namespace LocalJSX {
|
|
|
4893
5007
|
*/
|
|
4894
5008
|
"width"?: string;
|
|
4895
5009
|
}
|
|
5010
|
+
interface EzSortableList {
|
|
5011
|
+
/**
|
|
5012
|
+
* Lista de itens para serem renderizados
|
|
5013
|
+
*/
|
|
5014
|
+
"dataSource"?: Array<ListItem>;
|
|
5015
|
+
/**
|
|
5016
|
+
* Mensagem exibida quando a lista está vazia
|
|
5017
|
+
*/
|
|
5018
|
+
"emptyMessage"?: string;
|
|
5019
|
+
/**
|
|
5020
|
+
* Habilita seleção de múltiplos itens utilizando as teclas 'Ctrl/Command' ou 'Shift'
|
|
5021
|
+
*/
|
|
5022
|
+
"enableMultipleSelection"?: boolean;
|
|
5023
|
+
/**
|
|
5024
|
+
* Nome da entidade listada. Exemplo: "Campo", "Item", "Empresa".
|
|
5025
|
+
*/
|
|
5026
|
+
"entityLabel"?: string;
|
|
5027
|
+
/**
|
|
5028
|
+
* Variação plural do nome da entidade listada. Exemplo: "Campos", "Itens", "Empresas".
|
|
5029
|
+
*/
|
|
5030
|
+
"entityLabelPlural"?: string;
|
|
5031
|
+
/**
|
|
5032
|
+
* Grupo ao qual o ez-sortable-list pertence
|
|
5033
|
+
*/
|
|
5034
|
+
"group"?: string;
|
|
5035
|
+
/**
|
|
5036
|
+
* Define se o cabeçalho deve ficar oculto.
|
|
5037
|
+
*/
|
|
5038
|
+
"hideHeader"?: boolean;
|
|
5039
|
+
/**
|
|
5040
|
+
* Define se o totalizador deve ser escondido.
|
|
5041
|
+
*/
|
|
5042
|
+
"hideTotalizer"?: boolean;
|
|
5043
|
+
/**
|
|
5044
|
+
* Quando verdadeiro, ativa o feedback visual ao efetuar hover nos itens da lista
|
|
5045
|
+
*/
|
|
5046
|
+
"hoverFeedback"?: boolean;
|
|
5047
|
+
/**
|
|
5048
|
+
* ID do sortable list
|
|
5049
|
+
*/
|
|
5050
|
+
"idSortableList"?: string;
|
|
5051
|
+
/**
|
|
5052
|
+
* Função builder que possibilita gerar conteúdo dinâmico à esquerda do item da lista. * Observação: No react ele se transforma em VNode e não como HTMLElement.
|
|
5053
|
+
*/
|
|
5054
|
+
"itemLeftSlotBuilder"?: SlotBuilder;
|
|
5055
|
+
/**
|
|
5056
|
+
* Função builder que possibilita alterar como o item da lista vai ser apresentado. Observação: No react ele se transforma em VNode e não como HTMLElement.
|
|
5057
|
+
*/
|
|
5058
|
+
"itemRightSlotBuilder"?: SlotBuilder;
|
|
5059
|
+
/**
|
|
5060
|
+
* Emitido quando ocorre a escolha de um item da lista
|
|
5061
|
+
*/
|
|
5062
|
+
"onEzChoose"?: (event: EzSortableListCustomEvent<ListItem[] | ListItem>) => void;
|
|
5063
|
+
/**
|
|
5064
|
+
* Emitido quando ocorre um duplo clique em um item da lista
|
|
5065
|
+
*/
|
|
5066
|
+
"onEzDoubleClick"?: (event: EzSortableListCustomEvent<ListItem>) => void;
|
|
5067
|
+
/**
|
|
5068
|
+
* Emitido sempre que um ou vários itens da lista forem selecionados
|
|
5069
|
+
*/
|
|
5070
|
+
"onEzSelectItens"?: (event: EzSortableListCustomEvent<ListItem[] | ListItem>) => void;
|
|
5071
|
+
/**
|
|
5072
|
+
* Evento emitido quando a ordem dos itens muda
|
|
5073
|
+
*/
|
|
5074
|
+
"onItemsReordered"?: (event: EzSortableListCustomEvent<any>) => void;
|
|
5075
|
+
/**
|
|
5076
|
+
* Remove itens arrastados de uma lista para outra
|
|
5077
|
+
*/
|
|
5078
|
+
"removeItensMoved"?: boolean;
|
|
5079
|
+
/**
|
|
5080
|
+
* Define o título da lista.
|
|
5081
|
+
*/
|
|
5082
|
+
"title"?: string;
|
|
5083
|
+
}
|
|
4896
5084
|
interface EzSplitButton {
|
|
4897
5085
|
/**
|
|
4898
5086
|
* Se false o usuário não pode interagir com o botão.
|
|
@@ -5392,6 +5580,7 @@ declare namespace LocalJSX {
|
|
|
5392
5580
|
"ez-sidebar-button": EzSidebarButton;
|
|
5393
5581
|
"ez-sidebar-navigator": EzSidebarNavigator;
|
|
5394
5582
|
"ez-skeleton": EzSkeleton;
|
|
5583
|
+
"ez-sortable-list": EzSortableList;
|
|
5395
5584
|
"ez-split-button": EzSplitButton;
|
|
5396
5585
|
"ez-split-item": EzSplitItem;
|
|
5397
5586
|
"ez-split-panel": EzSplitPanel;
|
|
@@ -5461,6 +5650,7 @@ declare module "@stencil/core" {
|
|
|
5461
5650
|
"ez-sidebar-button": LocalJSX.EzSidebarButton & JSXBase.HTMLAttributes<HTMLEzSidebarButtonElement>;
|
|
5462
5651
|
"ez-sidebar-navigator": LocalJSX.EzSidebarNavigator & JSXBase.HTMLAttributes<HTMLEzSidebarNavigatorElement>;
|
|
5463
5652
|
"ez-skeleton": LocalJSX.EzSkeleton & JSXBase.HTMLAttributes<HTMLEzSkeletonElement>;
|
|
5653
|
+
"ez-sortable-list": LocalJSX.EzSortableList & JSXBase.HTMLAttributes<HTMLEzSortableListElement>;
|
|
5464
5654
|
"ez-split-button": LocalJSX.EzSplitButton & JSXBase.HTMLAttributes<HTMLEzSplitButtonElement>;
|
|
5465
5655
|
"ez-split-item": LocalJSX.EzSplitItem & JSXBase.HTMLAttributes<HTMLEzSplitItemElement>;
|
|
5466
5656
|
"ez-split-panel": LocalJSX.EzSplitPanel & JSXBase.HTMLAttributes<HTMLEzSplitPanelElement>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sankhyalabs/ezui",
|
|
3
|
-
"version": "5.22.0-dev.
|
|
3
|
+
"version": "5.22.0-dev.142",
|
|
4
4
|
"description": "Biblioteca de componentes Sankhya.",
|
|
5
5
|
"main": "dist/index.cjs.js",
|
|
6
6
|
"module": "dist/custom-elements/index.js",
|
|
@@ -24,6 +24,7 @@
|
|
|
24
24
|
"start": "stencil build --dev --watch --serve --force-peer-deps",
|
|
25
25
|
"test": "stencil test --spec --e2e --logHeapUsage --runInBand --coverage --silent --testResultsProcessor jest-sonar-reporter",
|
|
26
26
|
"test.watch": "stencil test --spec --e2e --watchAll",
|
|
27
|
+
"test.dev": "stencil test --spec --e2e",
|
|
27
28
|
"generate": "stencil generate",
|
|
28
29
|
"storybook": "npm run start.storybook",
|
|
29
30
|
"build.watch": "stencil build --dev --watch --force-peer-deps",
|
|
@@ -108,5 +109,8 @@
|
|
|
108
109
|
},
|
|
109
110
|
"resolutions": {
|
|
110
111
|
"postcss": "8.1.7"
|
|
112
|
+
},
|
|
113
|
+
"dependencies": {
|
|
114
|
+
"sortablejs": "^1.15.6"
|
|
111
115
|
}
|
|
112
116
|
}
|
package/react/components.d.ts
CHANGED
|
@@ -46,6 +46,7 @@ export declare const EzSearchResultList: import("react").ForwardRefExoticCompone
|
|
|
46
46
|
export declare const EzSidebarButton: import("react").ForwardRefExoticComponent<JSX.EzSidebarButton & Omit<import("react").HTMLAttributes<HTMLEzSidebarButtonElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEzSidebarButtonElement>>;
|
|
47
47
|
export declare const EzSidebarNavigator: import("react").ForwardRefExoticComponent<JSX.EzSidebarNavigator & Omit<import("react").HTMLAttributes<HTMLEzSidebarNavigatorElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEzSidebarNavigatorElement>>;
|
|
48
48
|
export declare const EzSkeleton: import("react").ForwardRefExoticComponent<JSX.EzSkeleton & Omit<import("react").HTMLAttributes<HTMLEzSkeletonElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEzSkeletonElement>>;
|
|
49
|
+
export declare const EzSortableList: import("react").ForwardRefExoticComponent<JSX.EzSortableList & Omit<import("react").HTMLAttributes<HTMLEzSortableListElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEzSortableListElement>>;
|
|
49
50
|
export declare const EzSplitButton: import("react").ForwardRefExoticComponent<JSX.EzSplitButton & Omit<import("react").HTMLAttributes<HTMLEzSplitButtonElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEzSplitButtonElement>>;
|
|
50
51
|
export declare const EzSplitItem: import("react").ForwardRefExoticComponent<JSX.EzSplitItem & Omit<import("react").HTMLAttributes<HTMLEzSplitItemElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEzSplitItemElement>>;
|
|
51
52
|
export declare const EzSplitPanel: import("react").ForwardRefExoticComponent<JSX.EzSplitPanel & Omit<import("react").HTMLAttributes<HTMLEzSplitPanelElement>, "style"> & import("./react-component-lib/interfaces").StyleReactProps & import("react").RefAttributes<HTMLEzSplitPanelElement>>;
|