@sankhyalabs/ezui 1.1.90 → 1.1.93
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-button_11.cjs.entry.js +220 -147
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box_7.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +2 -2
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/{index-a92e6d04.js → index-5c8eb919.js} +2 -2
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/collection-manifest.json +1 -1
- package/dist/collection/components/ez-form/store/form.slice.js +1 -1
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +16 -0
- package/dist/collection/components/ez-grid/subcomponents/gridconfig/grid-config.js +1 -1
- package/dist/collection/components/ez-list/ez-list.css +23 -2
- package/dist/collection/components/ez-list/ez-list.js +136 -66
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +40 -46
- package/dist/collection/utils/index.js +2 -0
- package/dist/custom-elements/index.js +167 -94
- package/dist/esm/ez-button_11.entry.js +220 -147
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/ez-collapsible-box_7.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +2 -2
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-time-input.entry.js +1 -1
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/{index-4fb1605f.js → index-4688c617.js} +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-d22db59d.entry.js → p-278ce681.entry.js} +1 -1
- package/dist/ezui/{p-038fd0cb.entry.js → p-33d1247f.entry.js} +1 -1
- package/dist/ezui/{p-552a0b2e.entry.js → p-4b5c4408.entry.js} +1 -1
- package/dist/ezui/{p-4c20d96e.entry.js → p-5793a2e1.entry.js} +1 -1
- package/dist/ezui/{p-60469339.entry.js → p-68f6b75e.entry.js} +1 -1
- package/dist/ezui/{p-7e0281cd.entry.js → p-7e1d9c29.entry.js} +1 -1
- package/dist/ezui/{p-f0137439.js → p-7ff8b7f7.js} +1 -1
- package/dist/ezui/{p-f241de18.entry.js → p-ca42d682.entry.js} +24 -24
- package/dist/types/components/ez-form/store/form.slice.d.ts +2 -1
- package/dist/types/components/ez-grid/controller/ag-grid/AgGridController.d.ts +4 -1
- package/dist/types/components/ez-list/ez-list.d.ts +11 -6
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +13 -6
- package/dist/types/components.d.ts +7 -6
- package/dist/types/utils/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, c as createEvent, H as Host, g as getElement } from './index-6b8bfbeb.js';
|
|
2
|
-
import { c as createCommonjsModule, a as commonjsGlobal,
|
|
2
|
+
import { c as createCommonjsModule, a as commonjsGlobal, D as DataType, S as SortMode, A as Action, M as MaskFormatter, b as DataUnit, U as UserInterface } from './index-4688c617.js';
|
|
3
3
|
import { g as getSpritePath } from './AssetsUtils-9b1329a3.js';
|
|
4
4
|
|
|
5
5
|
const ezButtonCss = ":host{--ez-button--min-width:100px;--ez-button--height:42px;--ez-button__icon--width:18px;--ez-button__inline__icon--padding:12px;--ez-button--padding-top:var(--space--medium, 12px);--ez-button--padding-bottom:var(--space--medium, 12px);--ez-button--padding-right:var(--space--large, 24px);--ez-button--padding-left:var(--space--large, 24px);--ez-button--color:var(--text--primary, #FFF);--ez-button--font-size:var(--text--medium, 14px);--ez-button--font-family:var(--font-pattern, Arial);--ez-button--font-weight:var(--text-weight--large);--ez-button--background-color:var(--background--medium, #c0c0c0);--ez-button--border-radius:var(--border--radius-large, 12px);--ez-button--border:none;--ez-button--hover--background-color:var(--background--strong, var(--ez-button--background-color));--ez-button--disabled-color:var(--text--disable);--ez-button--disabled--background-color:var(--color--disable-secondary);--ez-button--focus--border:var(--ez-button--border);--ez-button--focus--box-shadow:none;--ez-button--link-color:var(--title--primary, '#C0C0C0')}ez-icon{--ez-icon--color:inherit}button{display:flex;align-items:center;justify-content:center;margin:0;cursor:pointer;transition:background-color 0.2s linear;min-width:var(--ez-button--min-width);height:var(--ez-button--height);font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);padding:var(--ez-button--padding-top) var(--ez-button--padding-right) var(--ez-button--padding-bottom) var(--ez-button--padding-left);border-radius:var(--ez-button--border-radius);background-color:var(--ez-button--background-color);color:var(--ez-button--color);fill:var(--ez-button--color);border:var(--ez-button--border)}button:hover{background-color:var(--ez-button--hover--background-color)}button:focus{outline:none;border:var(--ez-button--focus--border);box-shadow:var(--ez-button--focus--box-shadow)}button:disabled{background-color:var(--ez-button--disabled--background-color);color:var(--ez-button--disabled-color);fill:var(--ez-button--disabled-color);border:none;cursor:no-drop}button.icon{padding:0px}button.small{width:32px;min-width:32px;height:32px}button.medium{width:42px;min-width:42px;height:42px}button.large{width:52px;min-width:52px;height:52px}.label-icon{display:flex;flex-direction:column;align-items:center;color:var(--ez-button--color)}.label-icon label{max-width:150px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;cursor:pointer;font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight)}a{font-family:var(--ez-button--font-family);font-size:var(--ez-button--font-size);font-weight:var(--ez-button--font-weight);color:var(--ez-button--link-color);cursor:pointer;display:flex;align-items:center;justify-content:center;}";
|
|
@@ -110164,11 +110164,78 @@ class DataSource {
|
|
|
110164
110164
|
}
|
|
110165
110165
|
}
|
|
110166
110166
|
|
|
110167
|
+
/**
|
|
110168
|
+
* Classe com utiliários comuns para Strings.
|
|
110169
|
+
*/
|
|
110170
|
+
class StringUtils {
|
|
110171
|
+
/**
|
|
110172
|
+
* Verifica se a string está vazia.
|
|
110173
|
+
* Valores null e undefined são considerados como vazio.
|
|
110174
|
+
*
|
|
110175
|
+
* @param value String para ser validada.
|
|
110176
|
+
*/
|
|
110177
|
+
static isEmpty(value) {
|
|
110178
|
+
if (value == undefined || value === null) {
|
|
110179
|
+
return true;
|
|
110180
|
+
}
|
|
110181
|
+
value = value.toString();
|
|
110182
|
+
value = value.trim();
|
|
110183
|
+
if (value.length === 0) {
|
|
110184
|
+
return true;
|
|
110185
|
+
}
|
|
110186
|
+
return false;
|
|
110187
|
+
}
|
|
110188
|
+
/**
|
|
110189
|
+
* Remove acentos de vogais, substitui Ç por c e retorna a string em caixa alta.
|
|
110190
|
+
*
|
|
110191
|
+
* @param value String para ser transformada.
|
|
110192
|
+
*/
|
|
110193
|
+
static replaceAccentuatedChars(text) {
|
|
110194
|
+
text = text.toUpperCase();
|
|
110195
|
+
text = text.replace(/[À]/, "A");
|
|
110196
|
+
text = text.replace(/[Á]/, "A");
|
|
110197
|
+
text = text.replace(/[Â]/, "A");
|
|
110198
|
+
text = text.replace(/[Ã]/, "A");
|
|
110199
|
+
text = text.replace(/[Ä]/, "A");
|
|
110200
|
+
text = text.replace(/[È]/, "E");
|
|
110201
|
+
text = text.replace(/[É]/, "E");
|
|
110202
|
+
text = text.replace(/[Ê]/, "E");
|
|
110203
|
+
text = text.replace(/[Ë]/, "E");
|
|
110204
|
+
text = text.replace(/[Ì]/, "I");
|
|
110205
|
+
text = text.replace(/[Í]/, "I");
|
|
110206
|
+
text = text.replace(/[Î]/, "I");
|
|
110207
|
+
text = text.replace(/[Ï]/, "I");
|
|
110208
|
+
text = text.replace(/[Ò]/, "O");
|
|
110209
|
+
text = text.replace(/[Ó]/, "O");
|
|
110210
|
+
text = text.replace(/[Ô]/, "O");
|
|
110211
|
+
text = text.replace(/[Ö]/, "O");
|
|
110212
|
+
text = text.replace(/[Ù]/, "U");
|
|
110213
|
+
text = text.replace(/[Ú]/, "U");
|
|
110214
|
+
text = text.replace(/[Û]/, "U");
|
|
110215
|
+
text = text.replace(/[Ü]/, "U");
|
|
110216
|
+
text = text.replace(/[Ç]/, "C");
|
|
110217
|
+
return text.replace(/[^a-z0-9]/gi, '');
|
|
110218
|
+
}
|
|
110219
|
+
}
|
|
110220
|
+
|
|
110167
110221
|
class AgGridController {
|
|
110168
110222
|
constructor(enterprise) {
|
|
110169
110223
|
this._menuItems = [];
|
|
110170
110224
|
this._enterprise = enterprise;
|
|
110171
110225
|
}
|
|
110226
|
+
getSort() {
|
|
110227
|
+
const sortedColumns = [];
|
|
110228
|
+
this._gridOptions.api.getSortModel().forEach(({ colId, sort }) => {
|
|
110229
|
+
if (sort) {
|
|
110230
|
+
const field = this._dataUnit.getField(colId);
|
|
110231
|
+
const mode = sort === "asc" ? SortMode.ASC : SortMode.DESC;
|
|
110232
|
+
const sortField = field ? { field: field.name, dataType: field.dataType, mode } : { field: colId, dataType: DataType.TEXT, mode };
|
|
110233
|
+
sortedColumns.push(sortField);
|
|
110234
|
+
}
|
|
110235
|
+
});
|
|
110236
|
+
return sortedColumns;
|
|
110237
|
+
}
|
|
110238
|
+
;
|
|
110172
110239
|
initDatagrid(container, options) {
|
|
110173
110240
|
if (this._grid === undefined) {
|
|
110174
110241
|
this._columnStateChangeCallback = options.onColumnStateChange;
|
|
@@ -110179,6 +110246,7 @@ class AgGridController {
|
|
|
110179
110246
|
this._pageSize = options.pageSize;
|
|
110180
110247
|
this._serverURL = options.serverURL;
|
|
110181
110248
|
this._dataUnit = options.dataUnit;
|
|
110249
|
+
this._dataUnit.sortingProvider = this;
|
|
110182
110250
|
this._gridOptions = {
|
|
110183
110251
|
localeText: gridTerms,
|
|
110184
110252
|
rowModelType: "serverSide",
|
|
@@ -110411,60 +110479,6 @@ class AgGridController {
|
|
|
110411
110479
|
}
|
|
110412
110480
|
}
|
|
110413
110481
|
|
|
110414
|
-
/**
|
|
110415
|
-
* Classe com utiliários comuns para Strings.
|
|
110416
|
-
*/
|
|
110417
|
-
class StringUtils {
|
|
110418
|
-
/**
|
|
110419
|
-
* Verifica se a string está vazia.
|
|
110420
|
-
* Valores null e undefined são considerados como vazio.
|
|
110421
|
-
*
|
|
110422
|
-
* @param value String para ser validada.
|
|
110423
|
-
*/
|
|
110424
|
-
static isEmpty(value) {
|
|
110425
|
-
if (value == undefined || value === null) {
|
|
110426
|
-
return true;
|
|
110427
|
-
}
|
|
110428
|
-
value = value.toString();
|
|
110429
|
-
value = value.trim();
|
|
110430
|
-
if (value.length === 0) {
|
|
110431
|
-
return true;
|
|
110432
|
-
}
|
|
110433
|
-
return false;
|
|
110434
|
-
}
|
|
110435
|
-
/**
|
|
110436
|
-
* Remove acentos de vogais, substitui Ç por c e retorna a string em caixa alta.
|
|
110437
|
-
*
|
|
110438
|
-
* @param value String para ser transformada.
|
|
110439
|
-
*/
|
|
110440
|
-
static replaceAccentuatedChars(text) {
|
|
110441
|
-
text = text.toUpperCase();
|
|
110442
|
-
text = text.replace(/[À]/, "A");
|
|
110443
|
-
text = text.replace(/[Á]/, "A");
|
|
110444
|
-
text = text.replace(/[Â]/, "A");
|
|
110445
|
-
text = text.replace(/[Ã]/, "A");
|
|
110446
|
-
text = text.replace(/[Ä]/, "A");
|
|
110447
|
-
text = text.replace(/[È]/, "E");
|
|
110448
|
-
text = text.replace(/[É]/, "E");
|
|
110449
|
-
text = text.replace(/[Ê]/, "E");
|
|
110450
|
-
text = text.replace(/[Ë]/, "E");
|
|
110451
|
-
text = text.replace(/[Ì]/, "I");
|
|
110452
|
-
text = text.replace(/[Í]/, "I");
|
|
110453
|
-
text = text.replace(/[Î]/, "I");
|
|
110454
|
-
text = text.replace(/[Ï]/, "I");
|
|
110455
|
-
text = text.replace(/[Ò]/, "O");
|
|
110456
|
-
text = text.replace(/[Ó]/, "O");
|
|
110457
|
-
text = text.replace(/[Ô]/, "O");
|
|
110458
|
-
text = text.replace(/[Ö]/, "O");
|
|
110459
|
-
text = text.replace(/[Ù]/, "U");
|
|
110460
|
-
text = text.replace(/[Ú]/, "U");
|
|
110461
|
-
text = text.replace(/[Û]/, "U");
|
|
110462
|
-
text = text.replace(/[Ü]/, "U");
|
|
110463
|
-
text = text.replace(/[Ç]/, "C");
|
|
110464
|
-
return text.replace(/[^a-z0-9]/gi, '');
|
|
110465
|
-
}
|
|
110466
|
-
}
|
|
110467
|
-
|
|
110468
110482
|
class DataUnitBridge {
|
|
110469
110483
|
constructor(gridController, dataUnit) {
|
|
110470
110484
|
this._gridController = gridController;
|
|
@@ -110641,7 +110655,7 @@ let EzIcon = class {
|
|
|
110641
110655
|
};
|
|
110642
110656
|
EzIcon.style = ezIconCss;
|
|
110643
110657
|
|
|
110644
|
-
const ezListCss = ":host{--ez-list__host--z-index:var(--visible, 1);--ez-list__host--border-radius:var(--border--radius-medium, 12px);--ez-list__host--padding:var(--space--medium, 12px);--ez-list__icon__padding:var(--space--small, 6px);--ez-list__icon--color:#AFB6C0;--ez-list__item__margin:0 var(--space--small, 6px);--ez-list__item--color:var(--title--primary, #2b3a54);--ez-list__item--border-bottom:var(--border--small, 1px solid);--ez-list__item--border-color:var(--title--primary, #2b3a54);--ez-list__item--font-family:var(--font-pattern, \"Sora\");--ez-list__item--font-size:var(--text--medium, 14px);--ez-list__selectable--padding-right:var(--space--small, 6px);--ez-list__selectable--padding-left:var(--space--small, 6px);--ez-list__selected-item__border-radius:var(--border--radius-small, 6px);--ez-list__selected-item__background:var(--color--primary-300, #E2F4EF);--ez-list__group--font-family:var(--font-pattern, \"Sora\");--ez-list__group--font-size:var(--text--medium, 14px);--ez-list__group--font-weight:var(--text-weight--large, 600);--ez-list__group--padding-bottom:var(--space-small, 6px);--ez-list__group__overlay--font-family:var(--font-pattern, \"Sora\");--ez-list__group__overlay--font-size:var(--text--medium, 14px);--ez-list__group-container__scrollbar--border-radius:var(--border--radius-large, 24px);--ez-list__group-container__scrollbar--width:var(--space--medium, 12px);--ez-list__group-container__scrollbar--background-color:var(--text--primary, #626e82);--ez-list__over--border--color:var(--color--primary, #008561);--ez-list__draggable__scrollbar--border-radius:var(--border--radius-large, 24px);--ez-list__draggable__scrollbar--width:var(--space--medium, 12px);--ez-list__draggable__scrollbar--background-color:var(--text--primary, #626e82);--ez-list__draggable__icon--image:url('data:image/svg+xml;utf8,<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z\"/></svg>');max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-list__host--z-index)}.draggable{display:flex;align-items:center;justify-content:space-between;background-color:#fff;font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);flex:1}.dragging{background:#FFFFFF;border:1px solid #008561;box-sizing:border-box;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.selectable{cursor:pointer;padding-right:var(--ez-list__selectable--padding-right);padding-left:var(--ez-list__selectable--padding-left)}.selectable-container{margin:0px !important}.item-content{display:flex;justify-content:center;align-items:center}.draggable-list{color:var(--text-color);padding:0;margin:0;width:100%;max-height:100
|
|
110658
|
+
const ezListCss = ":host{--ez-list__host--z-index:var(--visible, 1);--ez-list__host--border-radius:var(--border--radius-medium, 12px);--ez-list__host--padding:var(--space--medium, 12px);--ez-list__icon__padding:var(--space--small, 6px);--ez-list__icon--color:#AFB6C0;--ez-list__item__margin:0 var(--space--small, 6px);--ez-list__item--color:var(--title--primary, #2b3a54);--ez-list__item--border-bottom:var(--border--small, 1px solid);--ez-list__item--border-color:var(--title--primary, #2b3a54);--ez-list__item--font-family:var(--font-pattern, \"Sora\");--ez-list__item--font-size:var(--text--medium, 14px);--ez-list__selectable--padding-right:var(--space--small, 6px);--ez-list__selectable--padding-left:var(--space--small, 6px);--ez-list__selected-item__border-radius:var(--border--radius-small, 6px);--ez-list__selected-item__background:var(--color--primary-300, #E2F4EF);--ez-list__group--font-family:var(--font-pattern, \"Sora\");--ez-list__group--font-size:var(--text--medium, 14px);--ez-list__group--font-weight:var(--text-weight--large, 600);--ez-list__group--padding-bottom:var(--space-small, 6px);--ez-list__group__overlay--font-family:var(--font-pattern, \"Sora\");--ez-list__group__overlay--font-size:var(--text--medium, 14px);--ez-list__group-container__scrollbar--border-radius:var(--border--radius-large, 24px);--ez-list__group-container__scrollbar--width:var(--space--medium, 12px);--ez-list__group-container__scrollbar--background-color:var(--text--primary, #626e82);--ez-list__over--border--color:var(--color--primary, #008561);--ez-list__draggable__list--padding-bottom:var(--space--small, 6px);--ez-list__last-droppable-space--height:var(--space--small, 6px);--ez-list__draggable__scrollbar--border-radius:var(--border--radius-large, 24px);--ez-list__draggable__scrollbar--width:var(--space--medium, 12px);--ez-list__draggable__scrollbar--background-color:var(--text--primary, #626e82);--ez-list__draggable__icon--image:url('data:image/svg+xml;utf8,<svg width=\"18\" height=\"18\" viewBox=\"0 0 18 18\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"m 6.75,2.25 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z m -3,3 h 1.5 v 1.5 h -1.5 z m 3,0 h 1.5 v 1.5 h -1.5 z\"/></svg>');max-height:100%;width:100%;background-color:#fff;display:flex;z-index:var(--ez-list__host--z-index)}p{margin:0}.draggable{display:flex;align-items:center;border-top:1px dashed #fff;justify-content:space-between;background-color:#fff;font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);flex:1}.dragging{background:#FFFFFF;border:1px solid #008561;box-sizing:border-box;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);border-radius:6px}.selectable{cursor:pointer;padding-right:var(--ez-list__selectable--padding-right);padding-left:var(--ez-list__selectable--padding-left)}.selectable-container{margin:0px !important}.item-content{display:flex;justify-content:center;align-items:center}.draggable-list{color:var(--text-color);padding:0;margin:0;width:100%;max-height:100%}.draggable-list li{background-color:#fff;display:flex;margin:var(--ez-list__item__margin);font-family:var(--ez-list__item--font-family);font-size:var(--ez-list__item--font-size);color:var(--ez-list__item--color);height:32px}.over{border-top:1px dashed var(--ez-list__over--border--color)}.last-droppable-space{height:var(--ez-list__last-droppable-space--height)}.draggable-selected{background-color:var(--background--strong) !important}.draggable-selected div:hover{background-color:var(--background--strong) !important}.draggable-list::-webkit-scrollbar-track{background-color:#f0f2f5}.draggable-list::-webkit-scrollbar-thumb{background-color:var(--ez-list__draggable__scrollbar--background-color);border-radius:var(--ez-list__draggable__scrollbar--border-radius)}.draggable-list::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-list__draggable__scrollbar--width);max-width:var(--ez-list__draggable__scrollbar--width);min-width:var(--ez-list__draggable__scrollbar--width)}.draggable-icon{align-items:flex-start;display:flex;outline:none;border:none;background-color:unset}.draggable-icon::after{content:'';display:flex;background-color:var(--ez-list__icon--color);width:18px;height:18px;-webkit-mask-image:var(--ez-list__draggable__icon--image);mask-image:var(--ez-list__draggable__icon--image)}*{box-sizing:border-box}.checkbox{width:fit-content}.text--ellipsis{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.group-container{display:flex;flex-direction:column;max-height:100%;overflow-y:auto;outline:none;width:100%}.group-name{font-family:var(--ez-list__group--font-family);font-size:var(--ez-list__group--font-size);font-weight:var(--ez-list__group--font-weight);padding-bottom:var(--ez-list__group--padding-bottom);-webkit-user-select:none;-moz-user-select:-moz-none;-ms-user-select:none;user-select:none}.group{display:flex;flex-direction:column}.group-container::-webkit-scrollbar-track{background-color:#f0f2f5}.group-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__group-container__scrollbar--background-color);border-radius:var(--ez-list__group-container__scrollbar--border-radius)}.group-container::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-list__group-container__scrollbar--width);max-width:var(--ez-list__group-container__scrollbar--width);min-width:var(--ez-list__group-container__scrollbar--width)}.section-container{display:flex;position:relative;height:100%}.items-container{width:100%;max-height:100%;overflow-y:auto;outline:none}.group-items-container{width:100%;max-height:100%;height:100%;outline:none}.items-container::-webkit-scrollbar-track{background-color:#f0f2f5}.items-container::-webkit-scrollbar-thumb{background-color:var(--ez-list__draggable__scrollbar--background-color);border-radius:var(--ez-list__draggable__scrollbar--border-radius)}.items-container::-webkit-scrollbar{background-color:#f0f2f5;width:var(--ez-list__draggable__scrollbar--width);max-width:var(--ez-list__draggable__scrollbar--width);min-width:var(--ez-list__draggable__scrollbar--width)}.group-overlay{font-family:var(--ez-list__group__overlay--font-family);font-size:var(--ez-list__group__overlay--font-size);background:rgba(226, 244, 239, 0.8);border:1px solid #008561;border-radius:8px;position:absolute;display:none;place-items:center;top:0;bottom:0;left:0;right:0;z-index:2;margin:0;cursor:pointer}.presetedHeight{min-height:100px}.overlay-text{position:absolute;top:50%;left:50%;font-size:50px;color:white;transform:translate(-50%, -50%);-ms-transform:translate(-50%, -50%)}.selected-item{background:var(--ez-list__selected-item__background);border-radius:var(--ez-list__selected-item__border-radius)}.slot-item{align-items:flex-end}.overGroup{background:rgba(226, 244, 239, 0.8);border:1px solid #008561;box-sizing:border-box;border-radius:8px;padding-top:6px}";
|
|
110645
110659
|
|
|
110646
110660
|
let EzList = class {
|
|
110647
110661
|
constructor(hostRef) {
|
|
@@ -110787,7 +110801,7 @@ let EzList = class {
|
|
|
110787
110801
|
this.createList();
|
|
110788
110802
|
}
|
|
110789
110803
|
onDrop(ev, dragEndItem) {
|
|
110790
|
-
this.removeOverClass(
|
|
110804
|
+
this.removeOverClass();
|
|
110791
110805
|
this.setSelection(undefined);
|
|
110792
110806
|
if (this._dragStartItem) {
|
|
110793
110807
|
if (this.useGroups) {
|
|
@@ -110823,6 +110837,39 @@ let EzList = class {
|
|
|
110823
110837
|
}
|
|
110824
110838
|
ev.stopPropagation();
|
|
110825
110839
|
}
|
|
110840
|
+
onDropLastIndex(ev, groupDropped) {
|
|
110841
|
+
this.removeOverClass();
|
|
110842
|
+
this.setSelection(undefined);
|
|
110843
|
+
if (this._dragStartItem) {
|
|
110844
|
+
if (this.useGroups) {
|
|
110845
|
+
let newList = [...this._listGroupItems];
|
|
110846
|
+
let groupEnd = this._listGroupItems.find(group => groupDropped.group == group.group);
|
|
110847
|
+
//Remove item arrastado
|
|
110848
|
+
newList.find(group => group.group == this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
|
|
110849
|
+
//Adiciona item arrastado
|
|
110850
|
+
newList.find(group => group.group == groupDropped.group).items.push(this._dragStartItem.item);
|
|
110851
|
+
if (groupEnd.sort) {
|
|
110852
|
+
newList.find(group => group.group == groupDropped.group).items.sort(function (a, b) {
|
|
110853
|
+
return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
|
|
110854
|
+
});
|
|
110855
|
+
if (groupEnd.sort === "DSC") {
|
|
110856
|
+
newList.find(group => group.group == groupDropped.group).items.reverse();
|
|
110857
|
+
}
|
|
110858
|
+
}
|
|
110859
|
+
this._listGroupItems = newList;
|
|
110860
|
+
this.ezChange.emit(this._listGroupItems);
|
|
110861
|
+
}
|
|
110862
|
+
else {
|
|
110863
|
+
let newList = [...this._listItems];
|
|
110864
|
+
newList.splice(this._dragStartItem.index, 1);
|
|
110865
|
+
newList.push(this._dragStartItem.item);
|
|
110866
|
+
this._listItems = newList;
|
|
110867
|
+
this._listItemsHistory = newList;
|
|
110868
|
+
this.ezChange.emit(this._listItems);
|
|
110869
|
+
}
|
|
110870
|
+
}
|
|
110871
|
+
ev.stopPropagation();
|
|
110872
|
+
}
|
|
110826
110873
|
onDropGroup(groupSelected) {
|
|
110827
110874
|
var _a;
|
|
110828
110875
|
let newList = [...this._listGroupItems];
|
|
@@ -110856,6 +110903,9 @@ let EzList = class {
|
|
|
110856
110903
|
}
|
|
110857
110904
|
onDragEnd() {
|
|
110858
110905
|
this._dragStartItem = undefined;
|
|
110906
|
+
if (this.useGroups) {
|
|
110907
|
+
this.hideOverlays();
|
|
110908
|
+
}
|
|
110859
110909
|
if (this._draggingElement) {
|
|
110860
110910
|
try {
|
|
110861
110911
|
this._element.shadowRoot.removeChild(this._draggingElement);
|
|
@@ -110864,65 +110914,74 @@ let EzList = class {
|
|
|
110864
110914
|
this._draggingElement = undefined;
|
|
110865
110915
|
}
|
|
110866
110916
|
}
|
|
110867
|
-
addOverClass(
|
|
110868
|
-
if (
|
|
110869
|
-
|
|
110917
|
+
addOverClass(element) {
|
|
110918
|
+
if ((element === null || element === void 0 ? void 0 : element.__proto__) == HTMLDivElement.prototype && element.classList.contains("draggable")) {
|
|
110919
|
+
element.classList.add('over');
|
|
110920
|
+
}
|
|
110921
|
+
else if ((element === null || element === void 0 ? void 0 : element.parentElement) && !element.parentElement.classList.contains("draggable-list")) {
|
|
110922
|
+
this.addOverClass(element.parentElement);
|
|
110870
110923
|
}
|
|
110871
110924
|
}
|
|
110872
110925
|
addOverGroupClass(ev, group) {
|
|
110873
110926
|
if (ev.target) {
|
|
110874
110927
|
let groupContainer = this._groupContainer.querySelector("div#" + this.getDivGroupId(group.group));
|
|
110928
|
+
let groupOverlay = groupContainer.getElementsByClassName("group-overlay")[0];
|
|
110875
110929
|
if (group.items.length > 0) {
|
|
110876
|
-
let groupOverlay = groupContainer.getElementsByClassName("group-overlay")[0];
|
|
110877
110930
|
groupOverlay.setAttribute("style", "display:grid");
|
|
110878
110931
|
}
|
|
110879
110932
|
else {
|
|
110880
|
-
|
|
110933
|
+
groupOverlay.classList.add("presetedHeight");
|
|
110934
|
+
groupOverlay.setAttribute("style", "display:grid");
|
|
110935
|
+
groupOverlay.scrollIntoView(false);
|
|
110881
110936
|
}
|
|
110882
110937
|
}
|
|
110883
110938
|
}
|
|
110884
|
-
removeOverClass(
|
|
110885
|
-
|
|
110939
|
+
removeOverClass() {
|
|
110940
|
+
var _a, _b;
|
|
110941
|
+
let overCollection;
|
|
110942
|
+
let overLastDroppableCollection;
|
|
110943
|
+
if (this.useGroups) {
|
|
110944
|
+
overCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName('over');
|
|
110945
|
+
overLastDroppableCollection = this._groupContainer.getElementsByClassName('last-droppable-space');
|
|
110946
|
+
}
|
|
110947
|
+
else {
|
|
110948
|
+
overCollection = (_b = this._itemContainer) === null || _b === void 0 ? void 0 : _b.getElementsByClassName('over');
|
|
110949
|
+
overLastDroppableCollection = this._itemContainer.getElementsByClassName('last-droppable-space');
|
|
110950
|
+
}
|
|
110951
|
+
if (overCollection) {
|
|
110952
|
+
Array.from(overCollection).forEach(function (element) {
|
|
110953
|
+
element.classList.remove('over');
|
|
110954
|
+
});
|
|
110955
|
+
}
|
|
110956
|
+
if (overLastDroppableCollection) {
|
|
110957
|
+
Array.from(overLastDroppableCollection).forEach(function (element) {
|
|
110958
|
+
element.classList.remove('over');
|
|
110959
|
+
});
|
|
110960
|
+
}
|
|
110886
110961
|
}
|
|
110887
110962
|
removeOverGroupClass(ev, group) {
|
|
110888
110963
|
if (ev.target) {
|
|
110889
110964
|
let groupContainer = this._groupContainer.querySelector("div#" + this.getDivGroupId(group.group));
|
|
110890
|
-
|
|
110891
|
-
|
|
110965
|
+
let groupOverlay = groupContainer.getElementsByClassName("group-overlay")[0];
|
|
110966
|
+
if (groupOverlay) {
|
|
110967
|
+
groupOverlay.classList.remove("presetedHeight");
|
|
110892
110968
|
groupOverlay.setAttribute("style", "display:none");
|
|
110893
110969
|
}
|
|
110894
|
-
else {
|
|
110895
|
-
groupContainer === null || groupContainer === void 0 ? void 0 : groupContainer.classList.remove('overGroup');
|
|
110896
|
-
}
|
|
110897
110970
|
}
|
|
110898
110971
|
}
|
|
110899
|
-
onDragStart(
|
|
110972
|
+
onDragStart(item, group, index) {
|
|
110973
|
+
if (this._changeDeboucingTimeout) {
|
|
110974
|
+
window.clearTimeout(this._changeDeboucingTimeout);
|
|
110975
|
+
}
|
|
110900
110976
|
if (this.useGroups) {
|
|
110901
110977
|
this._dragStartItem = { groupName: group.group, item: item, index: index };
|
|
110978
|
+
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
110979
|
+
this.showOverlays(group);
|
|
110980
|
+
}, 10);
|
|
110902
110981
|
}
|
|
110903
110982
|
else {
|
|
110904
110983
|
this._dragStartItem = { item: item.item, index: item.index };
|
|
110905
110984
|
}
|
|
110906
|
-
let sourceElement = event.srcElement.cloneNode(true);
|
|
110907
|
-
this._draggingElement = event.srcElement.cloneNode(true);
|
|
110908
|
-
this._draggingElement.style.position = "absolute";
|
|
110909
|
-
this._draggingElement.style.top = (event.clientY + 5) + 'px';
|
|
110910
|
-
this._draggingElement.style.left = (event.clientX + 5) + 'px';
|
|
110911
|
-
this._draggingElement.style.height = event.srcElement.clientHeight + 'px';
|
|
110912
|
-
this._draggingElement.style.width = event.srcElement.clientWidth + 'px';
|
|
110913
|
-
this._draggingElement.style.background = "#FFFFFF";
|
|
110914
|
-
this._draggingElement.style.border = "1px solid #008561";
|
|
110915
|
-
this._draggingElement.style["box-sizing"] = "border-box";
|
|
110916
|
-
this._draggingElement.style["box-shadow"] = "0px 0px 16px rgba(0, 38, 111, 0.122)";
|
|
110917
|
-
this._draggingElement.style["border-radius"] = "6px";
|
|
110918
|
-
this._element.shadowRoot.appendChild(this._draggingElement);
|
|
110919
|
-
event.dataTransfer.setDragImage(sourceElement, -10000, -10000);
|
|
110920
|
-
}
|
|
110921
|
-
onDrag(event) {
|
|
110922
|
-
if (this._draggingElement) {
|
|
110923
|
-
this._draggingElement.style.top = (event.clientY + 5) + 'px';
|
|
110924
|
-
this._draggingElement.style.left = (event.clientX + 5) + 'px';
|
|
110925
|
-
}
|
|
110926
110985
|
}
|
|
110927
110986
|
selectFirstItem() {
|
|
110928
110987
|
if (this.useGroups) {
|
|
@@ -111025,43 +111084,67 @@ let EzList = class {
|
|
|
111025
111084
|
}
|
|
111026
111085
|
return undefined;
|
|
111027
111086
|
}
|
|
111087
|
+
getGroupOverlayId(groupName) {
|
|
111088
|
+
if (groupName) {
|
|
111089
|
+
return "group-overlay-" + groupName.replace(/[^a-z0-9_]/gi, "_");
|
|
111090
|
+
}
|
|
111091
|
+
return undefined;
|
|
111092
|
+
}
|
|
111028
111093
|
onDragOverGroup(event, group) {
|
|
111029
|
-
if (this._dragStartItem && this._dragStartItem.groupName !== group.group) {
|
|
111094
|
+
if (this._dragStartItem && this._dragStartItem.groupName !== group.group && group.sort) {
|
|
111030
111095
|
event.preventDefault();
|
|
111031
111096
|
this.addOverGroupClass(event, group);
|
|
111032
111097
|
}
|
|
111033
111098
|
}
|
|
111034
|
-
onDragOverItem(event
|
|
111099
|
+
onDragOverItem(event) {
|
|
111035
111100
|
if (this._dragStartItem) {
|
|
111036
111101
|
event.preventDefault();
|
|
111037
|
-
|
|
111038
|
-
group.sort ?
|
|
111039
|
-
() => {
|
|
111040
|
-
this.addOverGroupClass(event, group);
|
|
111041
|
-
}
|
|
111042
|
-
: this.addOverClass(event);
|
|
111043
|
-
}
|
|
111044
|
-
else {
|
|
111045
|
-
this.addOverClass(event);
|
|
111046
|
-
}
|
|
111102
|
+
this.addOverClass(event.target);
|
|
111047
111103
|
event.stopPropagation();
|
|
111048
111104
|
}
|
|
111049
111105
|
}
|
|
111106
|
+
onDragOverLastIndex(ev) {
|
|
111107
|
+
ev.preventDefault();
|
|
111108
|
+
if (this._dragStartItem) {
|
|
111109
|
+
ev.target.classList.add('over');
|
|
111110
|
+
ev.stopPropagation();
|
|
111111
|
+
}
|
|
111112
|
+
}
|
|
111113
|
+
showOverlays(groupDragStart) {
|
|
111114
|
+
let groupOverlayCollection = this._groupContainer.getElementsByClassName("group-overlay");
|
|
111115
|
+
Array.from(groupOverlayCollection).forEach(groupOverlay => {
|
|
111116
|
+
let groupOverlayID = this.getGroupOverlayId(groupDragStart.group);
|
|
111117
|
+
if (groupOverlayID && groupOverlay.getAttribute("id") && groupOverlayID != groupOverlay.getAttribute("id")) {
|
|
111118
|
+
groupOverlay.classList.add("presetedHeight");
|
|
111119
|
+
groupOverlay.setAttribute("style", "display:grid");
|
|
111120
|
+
}
|
|
111121
|
+
});
|
|
111122
|
+
}
|
|
111123
|
+
hideOverlays() {
|
|
111124
|
+
var _a;
|
|
111125
|
+
let groupOverlayCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName("group-overlay");
|
|
111126
|
+
Array.from(groupOverlayCollection).forEach(groupOverlay => {
|
|
111127
|
+
groupOverlay.classList.remove("presetedHeight");
|
|
111128
|
+
groupOverlay.setAttribute("style", "display:none");
|
|
111129
|
+
});
|
|
111130
|
+
}
|
|
111050
111131
|
render() {
|
|
111051
111132
|
return (h(Host, { ref: (el) => this._element = el }, this.useGroups ?
|
|
111052
111133
|
h("div", { class: "group-container", ref: (el) => this._groupContainer = el, tabIndex: 0, onKeyDown: (event) => { this.keyDownHandler(event); } }, this._listGroupItems.map(group => {
|
|
111053
|
-
return h("div", { id: this.getDivGroupId(group.group), class: "group", key: group.group + group.items.length,
|
|
111054
|
-
return h("li", { id: 'item_' + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: 'item_' + this.getItemId(item.label) }, h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onClick: () => { this.setSelection(item); }, onDragLeave: (
|
|
111134
|
+
return h("div", { id: this.getDivGroupId(group.group), class: "group", key: group.group + group.items.length, onDrop: () => this.onDropGroup(group) }, h("label", { draggable: false, class: "group-name" }, group.group), h("section", { class: "section-container", onDragOver: (ev) => ev.preventDefault() }, h("div", { class: "group-items-container" }, h("div", { class: "draggable-list" }, group.items.map((item, index) => {
|
|
111135
|
+
return h("li", { id: 'item_' + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: 'item_' + this.getItemId(item.label) }, h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onClick: () => { this.setSelection(item); }, onDragLeave: () => { group.sort ? undefined : this.removeOverClass(); }, onDragEnd: () => this.onDragEnd(), onDragStart: () => this.onDragStart(item, group, index), onDragOver: (event) => { group.sort ? undefined : this.onDragOverItem(event); }, onDrop: (event) => this.onDrop(event, { groupName: group.group, item: item, index: index }), draggable: this.ezDraggable }, h("div", { class: "item-content" }, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label)), this.itemSlotBuilder ?
|
|
111055
111136
|
h("div", { class: "slot-item" }, this.itemSlotBuilder(item, group))
|
|
111056
111137
|
: undefined));
|
|
111057
|
-
}))
|
|
111138
|
+
})), h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: (event) => { this.onDragOverLastIndex(event); }, onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDropLastIndex(event, group) })), group.sort ?
|
|
111139
|
+
h("div", { id: this.getGroupOverlayId(group.group), class: "group-overlay" }, "Mover para ", group.group)
|
|
111140
|
+
: undefined));
|
|
111058
111141
|
}))
|
|
111059
111142
|
:
|
|
111060
111143
|
h("div", { class: "items-container", ref: (el) => this._itemContainer = el, tabIndex: 0, onKeyDown: (event) => { this.keyDownHandler(event); } }, h("div", { class: "draggable-list" }, this._listItems.map((item, index) => {
|
|
111061
|
-
return h("li", { id: 'item_' + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: 'item_' + this.getItemId(item.label) }, h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onDragStart: (
|
|
111144
|
+
return h("li", { id: 'item_' + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: 'item_' + this.getItemId(item.label) }, h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onDragStart: () => this.onDragStart({ item: item, index: index }), onClick: () => { this.setSelection(item); }, onDragLeave: () => this.removeOverClass(), onDragOver: (event) => this.onDragOverItem(event), onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDrop(event, { item: item, index: index }), draggable: this.ezDraggable }, h("div", { class: "item-content" }, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label)), this.itemSlotBuilder ?
|
|
111062
111145
|
h("div", null, this.itemSlotBuilder(item))
|
|
111063
111146
|
: undefined));
|
|
111064
|
-
})))));
|
|
111147
|
+
}), h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: (event) => { this.onDragOverLastIndex(event); }, onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDropLastIndex(event) })))));
|
|
111065
111148
|
}
|
|
111066
111149
|
};
|
|
111067
111150
|
EzList.style = ezListCss;
|
|
@@ -111132,12 +111215,10 @@ let EzTabselector = class {
|
|
|
111132
111215
|
this.ezChange = createEvent(this, "ezChange", 7);
|
|
111133
111216
|
this.setFocusedParam = (ev) => {
|
|
111134
111217
|
if (ev.key === "Enter") {
|
|
111135
|
-
|
|
111136
|
-
this.
|
|
111137
|
-
this.selectedTab = this._processedTabs[this.selectedIndex]["tabKey"];
|
|
111138
|
-
this.handleTabClick(this.selectedTab, parseInt(this.selectedIndex));
|
|
111218
|
+
const selectedTab = this._processedTabs[this._focusedIndex];
|
|
111219
|
+
this.handleTabClick(selectedTab);
|
|
111139
111220
|
ev.preventDefault();
|
|
111140
|
-
this.setFocusedTab(
|
|
111221
|
+
this.setFocusedTab(selectedTab.index);
|
|
111141
111222
|
}
|
|
111142
111223
|
else if (ev.key === "ArrowLeft" || ev.key === "ArrowRight") {
|
|
111143
111224
|
let operator = undefined;
|
|
@@ -111150,48 +111231,46 @@ let EzTabselector = class {
|
|
|
111150
111231
|
else {
|
|
111151
111232
|
return;
|
|
111152
111233
|
}
|
|
111153
|
-
if (this.
|
|
111234
|
+
if (this._focusedIndex === undefined) {
|
|
111154
111235
|
if (operator === false) {
|
|
111155
|
-
this.
|
|
111236
|
+
this._focusedIndex = this.selectedIndex !== undefined ? this.selectedIndex - 1 : undefined;
|
|
111156
111237
|
}
|
|
111157
111238
|
else {
|
|
111158
|
-
this.
|
|
111239
|
+
this._focusedIndex = this.selectedIndex !== undefined ? this.selectedIndex + 1 : undefined;
|
|
111159
111240
|
}
|
|
111160
111241
|
}
|
|
111161
111242
|
else {
|
|
111162
111243
|
if (operator === false) {
|
|
111163
|
-
this.
|
|
111244
|
+
this._focusedIndex = this._focusedIndex - 1;
|
|
111164
111245
|
}
|
|
111165
111246
|
else {
|
|
111166
|
-
this.
|
|
111247
|
+
this._focusedIndex = this._focusedIndex + 1;
|
|
111167
111248
|
}
|
|
111168
111249
|
}
|
|
111169
|
-
if (
|
|
111170
|
-
this.
|
|
111250
|
+
if (this._focusedIndex < 0) {
|
|
111251
|
+
this._focusedIndex = 0;
|
|
111171
111252
|
}
|
|
111172
|
-
else if (
|
|
111173
|
-
this.
|
|
111253
|
+
else if (this._focusedIndex > this._processedTabs.length - 1) {
|
|
111254
|
+
this._focusedIndex = this._processedTabs.length - 1;
|
|
111174
111255
|
}
|
|
111175
|
-
this.setFocusedBtn(true, this.
|
|
111176
|
-
this.setFocusedTab(this.
|
|
111177
|
-
this.ezChange.emit(this.selectedTab);
|
|
111256
|
+
this.setFocusedBtn(true, this._focusedIndex);
|
|
111257
|
+
this.setFocusedTab(this._focusedIndex);
|
|
111178
111258
|
}
|
|
111179
111259
|
else if (ev.key === "Tab" || ev.key === "Escape") {
|
|
111180
|
-
|
|
111181
|
-
this.
|
|
111182
|
-
this.handleTabClick(
|
|
111260
|
+
const currentTab = this._processedTabs[this.selectedIndex];
|
|
111261
|
+
this._focusedIndex = undefined;
|
|
111262
|
+
this.handleTabClick(currentTab);
|
|
111183
111263
|
ev.preventDefault();
|
|
111184
111264
|
this.setFocusedTab(this.selectedIndex);
|
|
111185
111265
|
}
|
|
111186
|
-
// this.setFocusedTab();
|
|
111187
111266
|
};
|
|
111188
111267
|
}
|
|
111189
|
-
handleTabClick(tab
|
|
111190
|
-
this.selectedIndex = index
|
|
111191
|
-
this.
|
|
111192
|
-
this.selectedTab = tab;
|
|
111193
|
-
this.ezChange.emit(
|
|
111194
|
-
this.setFocusedBtn(false,
|
|
111268
|
+
handleTabClick(tab) {
|
|
111269
|
+
this.selectedIndex = tab.index;
|
|
111270
|
+
this._focusedIndex = undefined;
|
|
111271
|
+
this.selectedTab = tab.tabKey;
|
|
111272
|
+
this.ezChange.emit(tab);
|
|
111273
|
+
this.setFocusedBtn(false, tab.index);
|
|
111195
111274
|
}
|
|
111196
111275
|
componentWillRender() {
|
|
111197
111276
|
if (!this._processedTabs) {
|
|
@@ -111199,16 +111278,16 @@ let EzTabselector = class {
|
|
|
111199
111278
|
if (this.tabs) {
|
|
111200
111279
|
this.tabs.split(",").forEach((label) => {
|
|
111201
111280
|
label = label.trim();
|
|
111202
|
-
this._processedTabs.push(
|
|
111281
|
+
this._processedTabs.push({ label, tabKey: label, index: this._processedTabs.length });
|
|
111203
111282
|
});
|
|
111204
111283
|
}
|
|
111205
111284
|
this._hostElem.querySelectorAll("ez-tab").forEach((elem) => {
|
|
111206
111285
|
const tabKey = elem.getAttribute("tabKey");
|
|
111207
111286
|
const label = elem.getAttribute("label");
|
|
111208
|
-
const t =
|
|
111287
|
+
const t = { label, tabKey, index: this._processedTabs.length };
|
|
111209
111288
|
const content = elem.firstChild;
|
|
111210
111289
|
if (content) {
|
|
111211
|
-
content.setAttribute("slot", "tab" +
|
|
111290
|
+
content.setAttribute("slot", "tab" + t.index);
|
|
111212
111291
|
this._hostElem.appendChild(content);
|
|
111213
111292
|
}
|
|
111214
111293
|
this._processedTabs.push(t);
|
|
@@ -111307,22 +111386,16 @@ let EzTabselector = class {
|
|
|
111307
111386
|
return (h(Host, null, h("button", { class: "backward-button", ref: (el) => this._backwardButton = el, onClick: () => this.scrollBackward() }), h("div", { class: "scroll", ref: (el) => this._scrollContainer = el, onScroll: () => this.domScrollHandler(), onKeyDown: (ev) => this.setFocusedParam(ev) }, this._processedTabs.map((tab, index) => {
|
|
111308
111387
|
const labelStyle = { "min-width": this.getTextWidth(tab.label) };
|
|
111309
111388
|
const tabId = "tab" + index;
|
|
111310
|
-
const isSelected = index ===
|
|
111389
|
+
const isSelected = index === this.selectedIndex || (this.selectedTab && tab.tabKey === this.selectedTab);
|
|
111311
111390
|
if (isSelected) {
|
|
111312
111391
|
this.selectedTab = tab.tabKey;
|
|
111313
|
-
this.selectedIndex = index
|
|
111392
|
+
this.selectedIndex = index;
|
|
111314
111393
|
}
|
|
111315
|
-
return h("button", { id: tabId, class: `tab${isSelected ? " is-active" : ""}`, onClick: () => this.handleTabClick(tab
|
|
111394
|
+
return h("button", { id: tabId, class: `tab${isSelected ? " is-active" : ""}`, onClick: () => this.handleTabClick(tab), style: labelStyle }, h("span", { class: "tab-label", title: tab.label }, tab.label), h("slot", { name: tabId, onSlotchange: (ev) => { this.handleSlotChange(ev); } }));
|
|
111316
111395
|
})), h("button", { class: "forward-button", ref: (el) => this._forwardButton = el, onClick: () => this.scrollFoward() })));
|
|
111317
111396
|
}
|
|
111318
111397
|
get _hostElem() { return getElement(this); }
|
|
111319
111398
|
};
|
|
111320
|
-
class Tab {
|
|
111321
|
-
constructor(label, tabKey) {
|
|
111322
|
-
this.label = label;
|
|
111323
|
-
this.tabKey = tabKey;
|
|
111324
|
-
}
|
|
111325
|
-
}
|
|
111326
111399
|
EzTabselector.style = ezTabselectorCss;
|
|
111327
111400
|
|
|
111328
111401
|
const ezTextInputCss = ":host{--ez-text-input--height:42px;--ez-text-input--width:100%;--ez-text-input__icon--width:48px;--ez-text-input--border-radius:var(--border--radius-medium, 12px);--ez-text-input--font-size:var(--text--medium, 14px);--ez-text-input--font-family:var(--font-pattern, Arial);--ez-text-input--font-weight:var(--text-weight--large, 500);--ez-text-input--color:var(--title--primary, #000);--ez-text-input__input--background-color:var(--background--medium, #e0e0e0);--ez-text-input__input--border:var(--border--medium, 2px solid);--ez-text-input__input--border-color:var(--ez-text-input__input--background-color);--ez-text-input__input--focus--border-color:var(--color--alert-cold-800, #042EFF);--ez-text-input__input--disabled--background-color:var(--color--disable-secondary, #F2F5F8);--ez-text-input__input--disabled--color:var(--text--disable, #AFB6C0);--ez-text-input__input--error--border-color:#CC2936;--ez-text-input__message_box--font-size:var(--text--small, 12px);--ez-text-input__message_box--info--color:var(--color--success, #22085d);--ez-text-input__message_box--error--color:var(--color--error, #FF0000);--ez-text-input__label--floating--top:6px;--ez-text-input__label--padding-top:12px;--ez-text-input__label--padding-left:14px;--ez-text-input__label--padding-right:12px;display:flex;flex-wrap:wrap;position:relative;width:var(--ez-text-input--width)}input{width:100%;box-sizing:border-box;padding:var(--space--medium, 6px);font-weight:var(--text-weight--large, 600);height:var(--ez-text-input--height);border-radius:var(--ez-text-input--border-radius);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);border:var(--ez-text-input__input--border);border-color:var(--ez-text-input__input--border-color);background-color:var(--ez-text-input__input--background-color);color:var(--ez-text-input--color)}input:disabled{background-color:var(--ez-text-input__input--disabled--background-color);color:var(--ez-text-input__input--disabled--color)}input:focus{outline:none;border-color:var(--ez-text-input__input--focus--border-color)}input.icon--left{padding-left:var(--ez-text-input__icon--width)}input.icon--right{padding-right:var(--ez-text-input__icon--width)}input.hasError{color:var(--ez-text-input--color);border-color:var(--ez-text-input__input--error--border-color)}input.text--right{text-align:right}.message-box{display:flex;min-height:16px;min-width:100%;margin-top:2px;line-height:12px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input__message_box--font-size);color:var(--ez-text-input__message_box--info--color)}.hasError{color:var(--ez-text-input__message_box--error--color)}.input__label{box-sizing:border-box;position:absolute;z-index:var(--visible);overflow:hidden;text-overflow:ellipsis;white-space:nowrap;-webkit-transition:font-size .05s, top .05s;transition:font-size .05s, top .05s;width:calc(100% - var(--ez-text-input__label--padding-right));left:var(--ez-text-input--space--medium);font-family:var(--ez-text-input--font-family);font-size:var(--ez-text-input--font-size);font-weight:var(--ez-text-input--font-weight);color:var(--ez-text-input--color);top:var(--ez-text-input__label--padding-top);left:var(--ez-text-input__label--padding-left);padding-right:var(--ez-text-input__label--padding-right)}.input__label--floated{font-family:var(--ez-text-input--font-family);font-size:var(--text--extra-small);color:var(--text--primary);top:var(--ez-text-input__label--floating--top)}.input__label--disabled{color:var(--ez-text-input__input--disabled--color)}.input__label--left{text-align:left;left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--right{right:var(--ez-text-input__icon--width);width:calc(100% - var(--ez-text-input__icon--width))}.input__label--left.input__label--right{left:calc(var(--ez-text-input__icon--width) + 2px);width:calc(100% - var(--ez-text-input__icon--width) * 2)}.input--with--label{padding-bottom:0}";
|
|
@@ -111755,7 +111828,7 @@ let GridConfig = class {
|
|
|
111755
111828
|
}
|
|
111756
111829
|
}
|
|
111757
111830
|
render() {
|
|
111758
|
-
return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "" }, h("label", { class: "title" }, "Configura\u00E7\u00E3o da Grade"), h("label", { class: "subtitle" }, "Defina visibilidade e ordem das colunas.")), h("div", { class: "button-close" }, h("ez-button", { mode: 'icon', image: getSpritePath("close"), size: 'medium', onClick: () => this.closeConfig() }))), h("div", { class: "tabselector-container" }, h("ez-tabselector", { selectedTab: this.selectedTab, selectedIndex:
|
|
111831
|
+
return (h(Host, null, h("div", { class: "grid-config__header" }, h("div", { class: "title-container" }, h("div", { class: "" }, h("label", { class: "title" }, "Configura\u00E7\u00E3o da Grade"), h("label", { class: "subtitle" }, "Defina visibilidade e ordem das colunas.")), h("div", { class: "button-close" }, h("ez-button", { mode: 'icon', image: getSpritePath("close"), size: 'medium', onClick: () => this.closeConfig() }))), h("div", { class: "tabselector-container" }, h("ez-tabselector", { selectedTab: this.selectedTab, selectedIndex: 0, onEzChange: (ev) => { this.handleTabChange(ev); }, tabs: 'Colunas, Ordena\u00E7\u00E3o' })), h("div", null, h("ez-text-input", { ref: (el) => this._searchElement = el, label: "Localizar coluna", onKeyUp: evt => this.locateColumn(evt) }, h("ez-icon", { slot: "leftIcon", size: "medium", href: getSpritePath("search") })))), h("div", { class: "grid-config__main" }, h("ez-list", { ref: (el) => this._columnList = el, class: this.selectedTab === "Colunas" ? "" : "hidden", dataSource: this._columListItems, onEzChange: ev => this.handleColumnListChange(ev), ezDraggable: true, ezSelectable: true, itemSlotBuilder: (item, group) => this.buildColumnListSlot(item, group), useGroups: true }), h("ez-list", { ref: (el) => this._orderList = el, class: this.selectedTab === "Ordenação" ? "" : "hidden", dataSource: this._orderListItems, ezSelectable: true, itemSlotBuilder: (item) => this.buildOrderListSlot(item) })), h("div", { class: "grid-config__footer" }, h("ez-button", { class: "padding-right--medium", label: "Cancelar", onClick: () => this.closeConfig() }), h("ez-button", { label: "Concluir", class: "button--primary", onClick: () => this.finish() }))));
|
|
111759
111832
|
}
|
|
111760
111833
|
static get assetsDirs() { return ["../assets"]; }
|
|
111761
111834
|
};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, f as forceUpdate, h } from './index-6b8bfbeb.js';
|
|
2
|
-
import './index-
|
|
2
|
+
import './index-4688c617.js';
|
|
3
3
|
import { F as FloatingManager } from './FloatingManager-bb90ef41.js';
|
|
4
4
|
|
|
5
5
|
const ezCalendarCss = ":host{--ez-calendar--font-family:var(--font-pattern, Arial);--ez-calendar--color:var(--title--primary, #626e82);--ez-calendar--text-shadow:var(--text-shadow, 0 0 0 #353535, 0 0 1px transparent);--ez-calendar__body--background-color:var(--background--xlight, #FFF);--ez-calendar__Time--background-color:var(--background--xlight, #FAFAFA);--ez-calendar__body--padding:var(--space--medium, 12px) var(--space--small, 6px);--ez-calendar__body--border-radius:var(--border--radius-medium, 12px);--ez-calendar__body--shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-calendar__header-line--stroke:1px;--ez-calendar__header-line--color:var(--color--strokes, #C0C0C0);--ez-calendar__nav-btn--fill:var(--text--primary, #008561);--ez-calendar__nav-btn--hover--fill:var(--color--primary, #350404);--ez-calendar__nav-btn--width:10px;--ez-calendar__nav-btn--height:16px;--ez-calendar__nav-btn--previous-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 9.7808475,13.860393 3.9204526,8.0000004 9.7808475,2.0624965 7.9301965,0.28895552 0.21915255,8.0000004 7.9301965,15.711044 Z\"/></svg>');--ez-calendar__nav-btn--next-image:url('data:image/svg+xml;utf8,<svg xmlns=\"http://www.w3.org/2000/svg\" version=\"1.1\" height=\"16px\" width=\"10px\"><path d=\"M 0.21915251,13.860393 6.0795475,8.0000007 0.21915251,2.0624968 2.0698036,0.28895588 9.7808475,8.0000007 2.0698036,15.711044 Z\"/></svg>');--ez-calendar__cell--margin:0px 1.5px;--ez-calendar__cell--width:var(--space--large, 24px);--ez-calendar__cell--padding:1.5px 0px;--ez-calendar__cell--border-radius:var(--border--radius-small, 6px);--ez-calendar__cell--over--background-color:var(--color--primary, #E2F4EF);--ez-calendar__cell--over--color:var(--color--primary-300, #008561);--ez-calendar__cell--outset--color:var(--color--disable-primary, #E5EAF0);--ez-calendar__cell--selected--background-color:var(--color--primary, #008561);--ez-calendar__cell--selected--color:var(--color--inverted, #FFF);--ez-calendar__btn-today--color:var(--color--primary);--ez-calendar__btn-today--hover--background-color:var(--color--primary-300, #E2F4EF);--ez-calendar__btn-today--border-radius:var(--border--radius-small, 6px);position:relative;display:flex;user-select:none}.calendar{z-index:var(--more-visible, 2);display:flex;flex-direction:column;background-color:var(--ez-calendar__body--background-color);padding:var(--ez-calendar__body--padding);border-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__header{display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color)}.calendar__btn-next,.calendar__btn-previous{outline:none;border:none;background-color:unset;cursor:pointer;padding:0px}.calendar__btn-next::after,.calendar__btn-previous::after{content:'';display:flex;background-color:var(--ez-calendar__nav-btn--fill);width:var(--ez-calendar__nav-btn--width);height:var(--ez-calendar__nav-btn--height)}.calendar__btn-previous::after{-webkit-mask-image:var(--ez-calendar__nav-btn--previous-image);mask-image:var(--ez-calendar__nav-btn--previous-image)}.calendar__btn-next::after{-webkit-mask-image:var(--ez-calendar__nav-btn--next-image);mask-image:var(--ez-calendar__nav-btn--next-image)}.calendar__btn-next:hover::after,.calendar__btn-previous:hover::after{background-color:var(--ez-calendar__nav-btn--hover--fill)}.calendar__lbl-month{font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__line{display:flex;padding:0px;margin:0px}.calendar__cell{display:flex;justify-content:center;align-content:center;cursor:pointer;font-size:var(--text--extra-small, 10px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);padding:var(--ez-calendar__cell--padding);margin:var(--ez-calendar__cell--margin);min-width:var(--ez-calendar__cell--width);border-radius:var(--ez-calendar__cell--border-radius)}.calendar__cell:hover{background-color:var(--ez-calendar__cell--over--background-color);color:var(--ez-calendar__cell--over--color)}.calendar__cell--secondary{color:var(--ez-calendar__cell--outset--color)}.calendar__cell--unselectable:hover{background-color:unset;border-radius:unset;cursor:unset}.calendar__cell--unselectable{font-weight:var(--text-weight--large, 600);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.calendar__cell--selected,.calendar__cell--selected:hover{background-color:var(--ez-calendar__cell--selected--background-color);color:var(--ez-calendar__cell--selected--color)}.calendar__footer{display:flex;flex-direction:column}.calendar__btn-today{border:none;background-color:unset;cursor:pointer;font-weight:var(--text-weight--large, 600);font-size:var(--title--extra-small, 12px);padding:0px;font-family:var(--ez-calendar--font-family);text-shadow:var(--ez-calendar--text-shadow);color:var(--ez-calendar__btn-today--color);border-radius:var(--ez-calendar__btn-today--border-radius)}.calendar__btn-today:hover{background-color:var(--ez-calendar__btn-today--hover--background-color)}section{display:flex}.calendarTime{margin-left:-10px;display:flex;flex-direction:column;padding:12px 0px 0px 10px;background-color:var(--ez-calendar__Time--background-color);border-top-right-radius:var(--ez-calendar__body--border-radius);border-bottom-right-radius:var(--ez-calendar__body--border-radius);box-shadow:var(--ez-calendar__body--shadow)}.calendar__column{height:136px;padding:0px;margin:0px;overflow:auto}.calendar__column::-webkit-scrollbar{width:0px;max-width:0px;min-width:0px}.calendarTime__header{padding-left:var(--space--small, 6px);padding-right:var(--space--small, 6px);display:flex;justify-content:space-between;padding-bottom:var(--space--small, 6px);margin:0px var(--space--, 12px) var(--space--small, 6px) var(--space--, 12px);font-weight:var(--text-weight--extra-large, 700);font-size:var(--title--small, 14px);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow);border-bottom:solid var(--ez-calendar__header-line--stroke) var(--ez-calendar__header-line--color);font-family:var(--ez-calendar--font-family);color:var(--ez-calendar--color);text-shadow:var(--ez-calendar--text-shadow)}.separatorTime{color:#A2ABB9;padding:0px 1px;line-height:16px;font-size:17px;font-weight:normal}.endHidden{-webkit-mask-image:linear-gradient(180deg, #000 calc(100% - 48px), transparent 100%)}.calendar__column .calendar__cell{margin:0px;padding:1.5px 1.5px}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement, f as forceUpdate } from './index-6b8bfbeb.js';
|
|
2
|
-
import { T as TimeFormatter, N as NumberUtils } from './index-
|
|
2
|
+
import { T as TimeFormatter, N as NumberUtils } from './index-4688c617.js';
|
|
3
3
|
import { C as CSSVarsUtils } from './CSSVarsUtils-aeee9825.js';
|
|
4
4
|
import { A as ApplicationUtils } from './ApplicationUtils-01280a9d.js';
|
|
5
5
|
|