@sankhyalabs/ezui 1.1.92 → 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 +190 -107
- 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 +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
- package/dist/cjs/{index-a92e6d04.js → index-5c8eb919.js} +2 -2
- package/dist/collection/components/ez-grid/controller/ag-grid/AgGridController.js +16 -0
- 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/utils/index.js +2 -0
- package/dist/custom-elements/index.js +135 -52
- package/dist/esm/ez-button_11.entry.js +190 -107
- 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 +1 -1
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-time-input.entry.js +1 -1
- package/dist/esm/{index-4fb1605f.js → index-4688c617.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-0094463f.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-d4386e30.entry.js → p-ca42d682.entry.js} +2 -2
- 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.d.ts +2 -2
- package/dist/types/utils/index.d.ts +2 -0
- package/package.json +1 -1
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-88286449.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-5c8eb919.js');
|
|
7
7
|
const AssetsUtils = require('./AssetsUtils-4909c6de.js');
|
|
8
8
|
|
|
9
9
|
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;}";
|
|
@@ -110168,11 +110168,78 @@ class DataSource {
|
|
|
110168
110168
|
}
|
|
110169
110169
|
}
|
|
110170
110170
|
|
|
110171
|
+
/**
|
|
110172
|
+
* Classe com utiliários comuns para Strings.
|
|
110173
|
+
*/
|
|
110174
|
+
class StringUtils {
|
|
110175
|
+
/**
|
|
110176
|
+
* Verifica se a string está vazia.
|
|
110177
|
+
* Valores null e undefined são considerados como vazio.
|
|
110178
|
+
*
|
|
110179
|
+
* @param value String para ser validada.
|
|
110180
|
+
*/
|
|
110181
|
+
static isEmpty(value) {
|
|
110182
|
+
if (value == undefined || value === null) {
|
|
110183
|
+
return true;
|
|
110184
|
+
}
|
|
110185
|
+
value = value.toString();
|
|
110186
|
+
value = value.trim();
|
|
110187
|
+
if (value.length === 0) {
|
|
110188
|
+
return true;
|
|
110189
|
+
}
|
|
110190
|
+
return false;
|
|
110191
|
+
}
|
|
110192
|
+
/**
|
|
110193
|
+
* Remove acentos de vogais, substitui Ç por c e retorna a string em caixa alta.
|
|
110194
|
+
*
|
|
110195
|
+
* @param value String para ser transformada.
|
|
110196
|
+
*/
|
|
110197
|
+
static replaceAccentuatedChars(text) {
|
|
110198
|
+
text = text.toUpperCase();
|
|
110199
|
+
text = text.replace(/[À]/, "A");
|
|
110200
|
+
text = text.replace(/[Á]/, "A");
|
|
110201
|
+
text = text.replace(/[Â]/, "A");
|
|
110202
|
+
text = text.replace(/[Ã]/, "A");
|
|
110203
|
+
text = text.replace(/[Ä]/, "A");
|
|
110204
|
+
text = text.replace(/[È]/, "E");
|
|
110205
|
+
text = text.replace(/[É]/, "E");
|
|
110206
|
+
text = text.replace(/[Ê]/, "E");
|
|
110207
|
+
text = text.replace(/[Ë]/, "E");
|
|
110208
|
+
text = text.replace(/[Ì]/, "I");
|
|
110209
|
+
text = text.replace(/[Í]/, "I");
|
|
110210
|
+
text = text.replace(/[Î]/, "I");
|
|
110211
|
+
text = text.replace(/[Ï]/, "I");
|
|
110212
|
+
text = text.replace(/[Ò]/, "O");
|
|
110213
|
+
text = text.replace(/[Ó]/, "O");
|
|
110214
|
+
text = text.replace(/[Ô]/, "O");
|
|
110215
|
+
text = text.replace(/[Ö]/, "O");
|
|
110216
|
+
text = text.replace(/[Ù]/, "U");
|
|
110217
|
+
text = text.replace(/[Ú]/, "U");
|
|
110218
|
+
text = text.replace(/[Û]/, "U");
|
|
110219
|
+
text = text.replace(/[Ü]/, "U");
|
|
110220
|
+
text = text.replace(/[Ç]/, "C");
|
|
110221
|
+
return text.replace(/[^a-z0-9]/gi, '');
|
|
110222
|
+
}
|
|
110223
|
+
}
|
|
110224
|
+
|
|
110171
110225
|
class AgGridController {
|
|
110172
110226
|
constructor(enterprise) {
|
|
110173
110227
|
this._menuItems = [];
|
|
110174
110228
|
this._enterprise = enterprise;
|
|
110175
110229
|
}
|
|
110230
|
+
getSort() {
|
|
110231
|
+
const sortedColumns = [];
|
|
110232
|
+
this._gridOptions.api.getSortModel().forEach(({ colId, sort }) => {
|
|
110233
|
+
if (sort) {
|
|
110234
|
+
const field = this._dataUnit.getField(colId);
|
|
110235
|
+
const mode = sort === "asc" ? index$1.SortMode.ASC : index$1.SortMode.DESC;
|
|
110236
|
+
const sortField = field ? { field: field.name, dataType: field.dataType, mode } : { field: colId, dataType: index$1.DataType.TEXT, mode };
|
|
110237
|
+
sortedColumns.push(sortField);
|
|
110238
|
+
}
|
|
110239
|
+
});
|
|
110240
|
+
return sortedColumns;
|
|
110241
|
+
}
|
|
110242
|
+
;
|
|
110176
110243
|
initDatagrid(container, options) {
|
|
110177
110244
|
if (this._grid === undefined) {
|
|
110178
110245
|
this._columnStateChangeCallback = options.onColumnStateChange;
|
|
@@ -110183,6 +110250,7 @@ class AgGridController {
|
|
|
110183
110250
|
this._pageSize = options.pageSize;
|
|
110184
110251
|
this._serverURL = options.serverURL;
|
|
110185
110252
|
this._dataUnit = options.dataUnit;
|
|
110253
|
+
this._dataUnit.sortingProvider = this;
|
|
110186
110254
|
this._gridOptions = {
|
|
110187
110255
|
localeText: gridTerms,
|
|
110188
110256
|
rowModelType: "serverSide",
|
|
@@ -110415,60 +110483,6 @@ class AgGridController {
|
|
|
110415
110483
|
}
|
|
110416
110484
|
}
|
|
110417
110485
|
|
|
110418
|
-
/**
|
|
110419
|
-
* Classe com utiliários comuns para Strings.
|
|
110420
|
-
*/
|
|
110421
|
-
class StringUtils {
|
|
110422
|
-
/**
|
|
110423
|
-
* Verifica se a string está vazia.
|
|
110424
|
-
* Valores null e undefined são considerados como vazio.
|
|
110425
|
-
*
|
|
110426
|
-
* @param value String para ser validada.
|
|
110427
|
-
*/
|
|
110428
|
-
static isEmpty(value) {
|
|
110429
|
-
if (value == undefined || value === null) {
|
|
110430
|
-
return true;
|
|
110431
|
-
}
|
|
110432
|
-
value = value.toString();
|
|
110433
|
-
value = value.trim();
|
|
110434
|
-
if (value.length === 0) {
|
|
110435
|
-
return true;
|
|
110436
|
-
}
|
|
110437
|
-
return false;
|
|
110438
|
-
}
|
|
110439
|
-
/**
|
|
110440
|
-
* Remove acentos de vogais, substitui Ç por c e retorna a string em caixa alta.
|
|
110441
|
-
*
|
|
110442
|
-
* @param value String para ser transformada.
|
|
110443
|
-
*/
|
|
110444
|
-
static replaceAccentuatedChars(text) {
|
|
110445
|
-
text = text.toUpperCase();
|
|
110446
|
-
text = text.replace(/[À]/, "A");
|
|
110447
|
-
text = text.replace(/[Á]/, "A");
|
|
110448
|
-
text = text.replace(/[Â]/, "A");
|
|
110449
|
-
text = text.replace(/[Ã]/, "A");
|
|
110450
|
-
text = text.replace(/[Ä]/, "A");
|
|
110451
|
-
text = text.replace(/[È]/, "E");
|
|
110452
|
-
text = text.replace(/[É]/, "E");
|
|
110453
|
-
text = text.replace(/[Ê]/, "E");
|
|
110454
|
-
text = text.replace(/[Ë]/, "E");
|
|
110455
|
-
text = text.replace(/[Ì]/, "I");
|
|
110456
|
-
text = text.replace(/[Í]/, "I");
|
|
110457
|
-
text = text.replace(/[Î]/, "I");
|
|
110458
|
-
text = text.replace(/[Ï]/, "I");
|
|
110459
|
-
text = text.replace(/[Ò]/, "O");
|
|
110460
|
-
text = text.replace(/[Ó]/, "O");
|
|
110461
|
-
text = text.replace(/[Ô]/, "O");
|
|
110462
|
-
text = text.replace(/[Ö]/, "O");
|
|
110463
|
-
text = text.replace(/[Ù]/, "U");
|
|
110464
|
-
text = text.replace(/[Ú]/, "U");
|
|
110465
|
-
text = text.replace(/[Û]/, "U");
|
|
110466
|
-
text = text.replace(/[Ü]/, "U");
|
|
110467
|
-
text = text.replace(/[Ç]/, "C");
|
|
110468
|
-
return text.replace(/[^a-z0-9]/gi, '');
|
|
110469
|
-
}
|
|
110470
|
-
}
|
|
110471
|
-
|
|
110472
110486
|
class DataUnitBridge {
|
|
110473
110487
|
constructor(gridController, dataUnit) {
|
|
110474
110488
|
this._gridController = gridController;
|
|
@@ -110645,7 +110659,7 @@ let EzIcon = class {
|
|
|
110645
110659
|
};
|
|
110646
110660
|
EzIcon.style = ezIconCss;
|
|
110647
110661
|
|
|
110648
|
-
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
|
|
110662
|
+
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}";
|
|
110649
110663
|
|
|
110650
110664
|
let EzList = class {
|
|
110651
110665
|
constructor(hostRef) {
|
|
@@ -110791,7 +110805,7 @@ let EzList = class {
|
|
|
110791
110805
|
this.createList();
|
|
110792
110806
|
}
|
|
110793
110807
|
onDrop(ev, dragEndItem) {
|
|
110794
|
-
this.removeOverClass(
|
|
110808
|
+
this.removeOverClass();
|
|
110795
110809
|
this.setSelection(undefined);
|
|
110796
110810
|
if (this._dragStartItem) {
|
|
110797
110811
|
if (this.useGroups) {
|
|
@@ -110827,6 +110841,39 @@ let EzList = class {
|
|
|
110827
110841
|
}
|
|
110828
110842
|
ev.stopPropagation();
|
|
110829
110843
|
}
|
|
110844
|
+
onDropLastIndex(ev, groupDropped) {
|
|
110845
|
+
this.removeOverClass();
|
|
110846
|
+
this.setSelection(undefined);
|
|
110847
|
+
if (this._dragStartItem) {
|
|
110848
|
+
if (this.useGroups) {
|
|
110849
|
+
let newList = [...this._listGroupItems];
|
|
110850
|
+
let groupEnd = this._listGroupItems.find(group => groupDropped.group == group.group);
|
|
110851
|
+
//Remove item arrastado
|
|
110852
|
+
newList.find(group => group.group == this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
|
|
110853
|
+
//Adiciona item arrastado
|
|
110854
|
+
newList.find(group => group.group == groupDropped.group).items.push(this._dragStartItem.item);
|
|
110855
|
+
if (groupEnd.sort) {
|
|
110856
|
+
newList.find(group => group.group == groupDropped.group).items.sort(function (a, b) {
|
|
110857
|
+
return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
|
|
110858
|
+
});
|
|
110859
|
+
if (groupEnd.sort === "DSC") {
|
|
110860
|
+
newList.find(group => group.group == groupDropped.group).items.reverse();
|
|
110861
|
+
}
|
|
110862
|
+
}
|
|
110863
|
+
this._listGroupItems = newList;
|
|
110864
|
+
this.ezChange.emit(this._listGroupItems);
|
|
110865
|
+
}
|
|
110866
|
+
else {
|
|
110867
|
+
let newList = [...this._listItems];
|
|
110868
|
+
newList.splice(this._dragStartItem.index, 1);
|
|
110869
|
+
newList.push(this._dragStartItem.item);
|
|
110870
|
+
this._listItems = newList;
|
|
110871
|
+
this._listItemsHistory = newList;
|
|
110872
|
+
this.ezChange.emit(this._listItems);
|
|
110873
|
+
}
|
|
110874
|
+
}
|
|
110875
|
+
ev.stopPropagation();
|
|
110876
|
+
}
|
|
110830
110877
|
onDropGroup(groupSelected) {
|
|
110831
110878
|
var _a;
|
|
110832
110879
|
let newList = [...this._listGroupItems];
|
|
@@ -110860,6 +110907,9 @@ let EzList = class {
|
|
|
110860
110907
|
}
|
|
110861
110908
|
onDragEnd() {
|
|
110862
110909
|
this._dragStartItem = undefined;
|
|
110910
|
+
if (this.useGroups) {
|
|
110911
|
+
this.hideOverlays();
|
|
110912
|
+
}
|
|
110863
110913
|
if (this._draggingElement) {
|
|
110864
110914
|
try {
|
|
110865
110915
|
this._element.shadowRoot.removeChild(this._draggingElement);
|
|
@@ -110868,65 +110918,74 @@ let EzList = class {
|
|
|
110868
110918
|
this._draggingElement = undefined;
|
|
110869
110919
|
}
|
|
110870
110920
|
}
|
|
110871
|
-
addOverClass(
|
|
110872
|
-
if (
|
|
110873
|
-
|
|
110921
|
+
addOverClass(element) {
|
|
110922
|
+
if ((element === null || element === void 0 ? void 0 : element.__proto__) == HTMLDivElement.prototype && element.classList.contains("draggable")) {
|
|
110923
|
+
element.classList.add('over');
|
|
110924
|
+
}
|
|
110925
|
+
else if ((element === null || element === void 0 ? void 0 : element.parentElement) && !element.parentElement.classList.contains("draggable-list")) {
|
|
110926
|
+
this.addOverClass(element.parentElement);
|
|
110874
110927
|
}
|
|
110875
110928
|
}
|
|
110876
110929
|
addOverGroupClass(ev, group) {
|
|
110877
110930
|
if (ev.target) {
|
|
110878
110931
|
let groupContainer = this._groupContainer.querySelector("div#" + this.getDivGroupId(group.group));
|
|
110932
|
+
let groupOverlay = groupContainer.getElementsByClassName("group-overlay")[0];
|
|
110879
110933
|
if (group.items.length > 0) {
|
|
110880
|
-
let groupOverlay = groupContainer.getElementsByClassName("group-overlay")[0];
|
|
110881
110934
|
groupOverlay.setAttribute("style", "display:grid");
|
|
110882
110935
|
}
|
|
110883
110936
|
else {
|
|
110884
|
-
|
|
110937
|
+
groupOverlay.classList.add("presetedHeight");
|
|
110938
|
+
groupOverlay.setAttribute("style", "display:grid");
|
|
110939
|
+
groupOverlay.scrollIntoView(false);
|
|
110885
110940
|
}
|
|
110886
110941
|
}
|
|
110887
110942
|
}
|
|
110888
|
-
removeOverClass(
|
|
110889
|
-
|
|
110943
|
+
removeOverClass() {
|
|
110944
|
+
var _a, _b;
|
|
110945
|
+
let overCollection;
|
|
110946
|
+
let overLastDroppableCollection;
|
|
110947
|
+
if (this.useGroups) {
|
|
110948
|
+
overCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName('over');
|
|
110949
|
+
overLastDroppableCollection = this._groupContainer.getElementsByClassName('last-droppable-space');
|
|
110950
|
+
}
|
|
110951
|
+
else {
|
|
110952
|
+
overCollection = (_b = this._itemContainer) === null || _b === void 0 ? void 0 : _b.getElementsByClassName('over');
|
|
110953
|
+
overLastDroppableCollection = this._itemContainer.getElementsByClassName('last-droppable-space');
|
|
110954
|
+
}
|
|
110955
|
+
if (overCollection) {
|
|
110956
|
+
Array.from(overCollection).forEach(function (element) {
|
|
110957
|
+
element.classList.remove('over');
|
|
110958
|
+
});
|
|
110959
|
+
}
|
|
110960
|
+
if (overLastDroppableCollection) {
|
|
110961
|
+
Array.from(overLastDroppableCollection).forEach(function (element) {
|
|
110962
|
+
element.classList.remove('over');
|
|
110963
|
+
});
|
|
110964
|
+
}
|
|
110890
110965
|
}
|
|
110891
110966
|
removeOverGroupClass(ev, group) {
|
|
110892
110967
|
if (ev.target) {
|
|
110893
110968
|
let groupContainer = this._groupContainer.querySelector("div#" + this.getDivGroupId(group.group));
|
|
110894
|
-
|
|
110895
|
-
|
|
110969
|
+
let groupOverlay = groupContainer.getElementsByClassName("group-overlay")[0];
|
|
110970
|
+
if (groupOverlay) {
|
|
110971
|
+
groupOverlay.classList.remove("presetedHeight");
|
|
110896
110972
|
groupOverlay.setAttribute("style", "display:none");
|
|
110897
110973
|
}
|
|
110898
|
-
else {
|
|
110899
|
-
groupContainer === null || groupContainer === void 0 ? void 0 : groupContainer.classList.remove('overGroup');
|
|
110900
|
-
}
|
|
110901
110974
|
}
|
|
110902
110975
|
}
|
|
110903
|
-
onDragStart(
|
|
110976
|
+
onDragStart(item, group, index) {
|
|
110977
|
+
if (this._changeDeboucingTimeout) {
|
|
110978
|
+
window.clearTimeout(this._changeDeboucingTimeout);
|
|
110979
|
+
}
|
|
110904
110980
|
if (this.useGroups) {
|
|
110905
110981
|
this._dragStartItem = { groupName: group.group, item: item, index: index };
|
|
110982
|
+
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
110983
|
+
this.showOverlays(group);
|
|
110984
|
+
}, 10);
|
|
110906
110985
|
}
|
|
110907
110986
|
else {
|
|
110908
110987
|
this._dragStartItem = { item: item.item, index: item.index };
|
|
110909
110988
|
}
|
|
110910
|
-
let sourceElement = event.srcElement.cloneNode(true);
|
|
110911
|
-
this._draggingElement = event.srcElement.cloneNode(true);
|
|
110912
|
-
this._draggingElement.style.position = "absolute";
|
|
110913
|
-
this._draggingElement.style.top = (event.clientY + 5) + 'px';
|
|
110914
|
-
this._draggingElement.style.left = (event.clientX + 5) + 'px';
|
|
110915
|
-
this._draggingElement.style.height = event.srcElement.clientHeight + 'px';
|
|
110916
|
-
this._draggingElement.style.width = event.srcElement.clientWidth + 'px';
|
|
110917
|
-
this._draggingElement.style.background = "#FFFFFF";
|
|
110918
|
-
this._draggingElement.style.border = "1px solid #008561";
|
|
110919
|
-
this._draggingElement.style["box-sizing"] = "border-box";
|
|
110920
|
-
this._draggingElement.style["box-shadow"] = "0px 0px 16px rgba(0, 38, 111, 0.122)";
|
|
110921
|
-
this._draggingElement.style["border-radius"] = "6px";
|
|
110922
|
-
this._element.shadowRoot.appendChild(this._draggingElement);
|
|
110923
|
-
event.dataTransfer.setDragImage(sourceElement, -10000, -10000);
|
|
110924
|
-
}
|
|
110925
|
-
onDrag(event) {
|
|
110926
|
-
if (this._draggingElement) {
|
|
110927
|
-
this._draggingElement.style.top = (event.clientY + 5) + 'px';
|
|
110928
|
-
this._draggingElement.style.left = (event.clientX + 5) + 'px';
|
|
110929
|
-
}
|
|
110930
110989
|
}
|
|
110931
110990
|
selectFirstItem() {
|
|
110932
110991
|
if (this.useGroups) {
|
|
@@ -111029,43 +111088,67 @@ let EzList = class {
|
|
|
111029
111088
|
}
|
|
111030
111089
|
return undefined;
|
|
111031
111090
|
}
|
|
111091
|
+
getGroupOverlayId(groupName) {
|
|
111092
|
+
if (groupName) {
|
|
111093
|
+
return "group-overlay-" + groupName.replace(/[^a-z0-9_]/gi, "_");
|
|
111094
|
+
}
|
|
111095
|
+
return undefined;
|
|
111096
|
+
}
|
|
111032
111097
|
onDragOverGroup(event, group) {
|
|
111033
|
-
if (this._dragStartItem && this._dragStartItem.groupName !== group.group) {
|
|
111098
|
+
if (this._dragStartItem && this._dragStartItem.groupName !== group.group && group.sort) {
|
|
111034
111099
|
event.preventDefault();
|
|
111035
111100
|
this.addOverGroupClass(event, group);
|
|
111036
111101
|
}
|
|
111037
111102
|
}
|
|
111038
|
-
onDragOverItem(event
|
|
111103
|
+
onDragOverItem(event) {
|
|
111039
111104
|
if (this._dragStartItem) {
|
|
111040
111105
|
event.preventDefault();
|
|
111041
|
-
|
|
111042
|
-
group.sort ?
|
|
111043
|
-
() => {
|
|
111044
|
-
this.addOverGroupClass(event, group);
|
|
111045
|
-
}
|
|
111046
|
-
: this.addOverClass(event);
|
|
111047
|
-
}
|
|
111048
|
-
else {
|
|
111049
|
-
this.addOverClass(event);
|
|
111050
|
-
}
|
|
111106
|
+
this.addOverClass(event.target);
|
|
111051
111107
|
event.stopPropagation();
|
|
111052
111108
|
}
|
|
111053
111109
|
}
|
|
111110
|
+
onDragOverLastIndex(ev) {
|
|
111111
|
+
ev.preventDefault();
|
|
111112
|
+
if (this._dragStartItem) {
|
|
111113
|
+
ev.target.classList.add('over');
|
|
111114
|
+
ev.stopPropagation();
|
|
111115
|
+
}
|
|
111116
|
+
}
|
|
111117
|
+
showOverlays(groupDragStart) {
|
|
111118
|
+
let groupOverlayCollection = this._groupContainer.getElementsByClassName("group-overlay");
|
|
111119
|
+
Array.from(groupOverlayCollection).forEach(groupOverlay => {
|
|
111120
|
+
let groupOverlayID = this.getGroupOverlayId(groupDragStart.group);
|
|
111121
|
+
if (groupOverlayID && groupOverlay.getAttribute("id") && groupOverlayID != groupOverlay.getAttribute("id")) {
|
|
111122
|
+
groupOverlay.classList.add("presetedHeight");
|
|
111123
|
+
groupOverlay.setAttribute("style", "display:grid");
|
|
111124
|
+
}
|
|
111125
|
+
});
|
|
111126
|
+
}
|
|
111127
|
+
hideOverlays() {
|
|
111128
|
+
var _a;
|
|
111129
|
+
let groupOverlayCollection = (_a = this._groupContainer) === null || _a === void 0 ? void 0 : _a.getElementsByClassName("group-overlay");
|
|
111130
|
+
Array.from(groupOverlayCollection).forEach(groupOverlay => {
|
|
111131
|
+
groupOverlay.classList.remove("presetedHeight");
|
|
111132
|
+
groupOverlay.setAttribute("style", "display:none");
|
|
111133
|
+
});
|
|
111134
|
+
}
|
|
111054
111135
|
render() {
|
|
111055
111136
|
return (index.h(index.Host, { ref: (el) => this._element = el }, this.useGroups ?
|
|
111056
111137
|
index.h("div", { class: "group-container", ref: (el) => this._groupContainer = el, tabIndex: 0, onKeyDown: (event) => { this.keyDownHandler(event); } }, this._listGroupItems.map(group => {
|
|
111057
|
-
return index.h("div", { id: this.getDivGroupId(group.group), class: "group", key: group.group + group.items.length,
|
|
111058
|
-
return index.h("li", { id: 'item_' + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: 'item_' + this.getItemId(item.label) }, index.h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onClick: () => { this.setSelection(item); }, onDragLeave: (
|
|
111138
|
+
return index.h("div", { id: this.getDivGroupId(group.group), class: "group", key: group.group + group.items.length, onDrop: () => this.onDropGroup(group) }, index.h("label", { draggable: false, class: "group-name" }, group.group), index.h("section", { class: "section-container", onDragOver: (ev) => ev.preventDefault() }, index.h("div", { class: "group-items-container" }, index.h("div", { class: "draggable-list" }, group.items.map((item, index$1) => {
|
|
111139
|
+
return index.h("li", { id: 'item_' + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: 'item_' + this.getItemId(item.label) }, index.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$1), onDragOver: (event) => { group.sort ? undefined : this.onDragOverItem(event); }, onDrop: (event) => this.onDrop(event, { groupName: group.group, item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: "item-content" }, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, index.h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label)), this.itemSlotBuilder ?
|
|
111059
111140
|
index.h("div", { class: "slot-item" }, this.itemSlotBuilder(item, group))
|
|
111060
111141
|
: undefined));
|
|
111061
|
-
}))
|
|
111142
|
+
})), index.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 ?
|
|
111143
|
+
index.h("div", { id: this.getGroupOverlayId(group.group), class: "group-overlay" }, "Mover para ", group.group)
|
|
111144
|
+
: undefined));
|
|
111062
111145
|
}))
|
|
111063
111146
|
:
|
|
111064
111147
|
index.h("div", { class: "items-container", ref: (el) => this._itemContainer = el, tabIndex: 0, onKeyDown: (event) => { this.keyDownHandler(event); } }, index.h("div", { class: "draggable-list" }, this._listItems.map((item, index$1) => {
|
|
111065
|
-
return index.h("li", { id: 'item_' + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: 'item_' + this.getItemId(item.label) }, index.h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onDragStart: (
|
|
111148
|
+
return index.h("li", { id: 'item_' + this.getItemId(item.label), class: this.ezSelectable ? "selectable-container" : "", key: 'item_' + this.getItemId(item.label) }, index.h("div", { class: "draggable" + (item.selected == true ? " selected-item " : "") + (this.ezSelectable == true ? " selectable " : ""), onDragStart: () => this.onDragStart({ item: item, index: index$1 }), onClick: () => { this.setSelection(item); }, onDragLeave: () => this.removeOverClass(), onDragOver: (event) => this.onDragOverItem(event), onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDrop(event, { item: item, index: index$1 }), draggable: this.ezDraggable }, index.h("div", { class: "item-content" }, this.ezDraggable ? index.h("span", { class: "draggable-icon" }) : undefined, index.h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label)), this.itemSlotBuilder ?
|
|
111066
111149
|
index.h("div", null, this.itemSlotBuilder(item))
|
|
111067
111150
|
: undefined));
|
|
111068
|
-
})))));
|
|
111151
|
+
}), index.h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: (event) => { this.onDragOverLastIndex(event); }, onDragEnd: () => this.onDragEnd(), onDrop: (event) => this.onDropLastIndex(event) })))));
|
|
111069
111152
|
}
|
|
111070
111153
|
};
|
|
111071
111154
|
EzList.style = ezListCss;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-88286449.js');
|
|
6
|
-
require('./index-
|
|
6
|
+
require('./index-5c8eb919.js');
|
|
7
7
|
const FloatingManager = require('./FloatingManager-6cfeb947.js');
|
|
8
8
|
|
|
9
9
|
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}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-88286449.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-5c8eb919.js');
|
|
7
7
|
const CSSVarsUtils = require('./CSSVarsUtils-66e86394.js');
|
|
8
8
|
const ApplicationUtils = require('./ApplicationUtils-d1c1db56.js');
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-88286449.js');
|
|
6
|
-
require('./index-
|
|
6
|
+
require('./index-5c8eb919.js');
|
|
7
7
|
const FloatingManager = require('./FloatingManager-6cfeb947.js');
|
|
8
8
|
const CSSVarsUtils = require('./CSSVarsUtils-66e86394.js');
|
|
9
9
|
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-88286449.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-5c8eb919.js');
|
|
7
7
|
const ApplicationUtils = require('./ApplicationUtils-d1c1db56.js');
|
|
8
8
|
|
|
9
9
|
const buildTextArea = ({ name, label }) => {
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-88286449.js');
|
|
6
|
-
require('./index-
|
|
6
|
+
require('./index-5c8eb919.js');
|
|
7
7
|
const FloatingManager = require('./FloatingManager-6cfeb947.js');
|
|
8
8
|
|
|
9
9
|
const ezPopoverCss = ":host{--ez-popover__box--border-radius:var(--border--radius-medium, 12px);--ez-popover__box--box-shadow:var(--shadow, 0px 0px 16px 0px #000);--ez-popover__box--background-color:var(--background--xlight, #fff);--ez-popover__box--z-index:var(--more-visible, 1);position:relative;display:flex;user-select:none;width:100%}.box{z-index:var(--ez-popover__box--z-index);display:flex;flex-direction:column;height:fit-content;background-color:var(--ez-popover__box--background-color);border-radius:var(--ez-popover__box--border-radius);box-shadow:var(--ez-popover__box--box-shadow)}.box--fit-content{width:fit-content}.box--full-width{width:100%}";
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
5
|
const index = require('./index-88286449.js');
|
|
6
|
-
const index$1 = require('./index-
|
|
6
|
+
const index$1 = require('./index-5c8eb919.js');
|
|
7
7
|
const CSSVarsUtils = require('./CSSVarsUtils-66e86394.js');
|
|
8
8
|
const AssetsUtils = require('./AssetsUtils-4909c6de.js');
|
|
9
9
|
|
|
@@ -1281,11 +1281,11 @@ class Change {
|
|
|
1281
1281
|
}
|
|
1282
1282
|
}
|
|
1283
1283
|
|
|
1284
|
-
|
|
1284
|
+
exports.SortMode = void 0;
|
|
1285
1285
|
(function (SortMode) {
|
|
1286
1286
|
SortMode["ASC"] = "ASC";
|
|
1287
1287
|
SortMode["DESC"] = "DESC";
|
|
1288
|
-
})(SortMode || (SortMode = {}));
|
|
1288
|
+
})(exports.SortMode || (exports.SortMode = {}));
|
|
1289
1289
|
var DependencyType;
|
|
1290
1290
|
(function (DependencyType) {
|
|
1291
1291
|
DependencyType["SEARCHING"] = "SEARCHING";
|
|
@@ -3,11 +3,26 @@ import { Grid } from "ag-grid-community";
|
|
|
3
3
|
import gridTerms from "./i18n/pt-BR.js";
|
|
4
4
|
import HeaderColumnTemplate from "./template/HeaderColumnTemplate.js";
|
|
5
5
|
import DataSource from "./DataSource";
|
|
6
|
+
import { DataType } from "@sankhyalabs/core";
|
|
7
|
+
import { SortMode } from "@sankhyalabs/core/dist/dataunit/metadata/UnitMetadata";
|
|
6
8
|
export default class AgGridController {
|
|
7
9
|
constructor(enterprise) {
|
|
8
10
|
this._menuItems = [];
|
|
9
11
|
this._enterprise = enterprise;
|
|
10
12
|
}
|
|
13
|
+
getSort() {
|
|
14
|
+
const sortedColumns = [];
|
|
15
|
+
this._gridOptions.api.getSortModel().forEach(({ colId, sort }) => {
|
|
16
|
+
if (sort) {
|
|
17
|
+
const field = this._dataUnit.getField(colId);
|
|
18
|
+
const mode = sort === "asc" ? SortMode.ASC : SortMode.DESC;
|
|
19
|
+
const sortField = field ? { field: field.name, dataType: field.dataType, mode } : { field: colId, dataType: DataType.TEXT, mode };
|
|
20
|
+
sortedColumns.push(sortField);
|
|
21
|
+
}
|
|
22
|
+
});
|
|
23
|
+
return sortedColumns;
|
|
24
|
+
}
|
|
25
|
+
;
|
|
11
26
|
initDatagrid(container, options) {
|
|
12
27
|
if (this._grid === undefined) {
|
|
13
28
|
this._columnStateChangeCallback = options.onColumnStateChange;
|
|
@@ -18,6 +33,7 @@ export default class AgGridController {
|
|
|
18
33
|
this._pageSize = options.pageSize;
|
|
19
34
|
this._serverURL = options.serverURL;
|
|
20
35
|
this._dataUnit = options.dataUnit;
|
|
36
|
+
this._dataUnit.sortingProvider = this;
|
|
21
37
|
this._gridOptions = {
|
|
22
38
|
localeText: gridTerms,
|
|
23
39
|
rowModelType: "serverSide",
|
|
@@ -59,6 +59,12 @@
|
|
|
59
59
|
/* @doc Define a cor da borda pontilhada sobre os elementos da lista. */
|
|
60
60
|
--ez-list__over--border--color: var(--color--primary, #008561);
|
|
61
61
|
|
|
62
|
+
/*@doc Define o espaçamento do container de itens arrastáveis .*/
|
|
63
|
+
--ez-list__draggable__list--padding-bottom: var(--space--small, 6px);
|
|
64
|
+
|
|
65
|
+
/*@doc Define a altura do container para arrasto para última posição .*/
|
|
66
|
+
--ez-list__last-droppable-space--height: var(--space--small, 6px);
|
|
67
|
+
|
|
62
68
|
/*@doc Define o raio da borda da barra de rolagem do componente.*/
|
|
63
69
|
--ez-list__draggable__scrollbar--border-radius: var(--border--radius-large, 24px);
|
|
64
70
|
/*@doc Define a largura da barra de rolagem do componente.*/
|
|
@@ -75,9 +81,14 @@
|
|
|
75
81
|
z-index: var(--ez-list__host--z-index);
|
|
76
82
|
}
|
|
77
83
|
|
|
84
|
+
p {
|
|
85
|
+
margin: 0;
|
|
86
|
+
}
|
|
87
|
+
|
|
78
88
|
.draggable {
|
|
79
89
|
display: flex;
|
|
80
90
|
align-items: center;
|
|
91
|
+
border-top: 1px dashed #fff;
|
|
81
92
|
justify-content: space-between;
|
|
82
93
|
background-color: #fff;
|
|
83
94
|
font-family: var(--ez-list__item--font-family);
|
|
@@ -117,8 +128,6 @@
|
|
|
117
128
|
margin: 0;
|
|
118
129
|
width: 100%;
|
|
119
130
|
max-height: 100%;
|
|
120
|
-
/* height: 100%; */
|
|
121
|
-
padding-bottom: var(--space--small);
|
|
122
131
|
}
|
|
123
132
|
|
|
124
133
|
.draggable-list li {
|
|
@@ -135,6 +144,10 @@
|
|
|
135
144
|
border-top: 1px dashed var(--ez-list__over--border--color);
|
|
136
145
|
}
|
|
137
146
|
|
|
147
|
+
.last-droppable-space {
|
|
148
|
+
height: var(--ez-list__last-droppable-space--height);
|
|
149
|
+
}
|
|
150
|
+
|
|
138
151
|
.draggable-selected {
|
|
139
152
|
background-color: var(--background--strong) !important;
|
|
140
153
|
}
|
|
@@ -207,6 +220,10 @@
|
|
|
207
220
|
font-size: var(--ez-list__group--font-size);
|
|
208
221
|
font-weight: var(--ez-list__group--font-weight);
|
|
209
222
|
padding-bottom: var(--ez-list__group--padding-bottom);
|
|
223
|
+
-webkit-user-select: none;
|
|
224
|
+
-moz-user-select: -moz-none;
|
|
225
|
+
-ms-user-select: none;
|
|
226
|
+
user-select: none;
|
|
210
227
|
}
|
|
211
228
|
|
|
212
229
|
.group {
|
|
@@ -286,6 +303,10 @@
|
|
|
286
303
|
cursor: pointer;
|
|
287
304
|
}
|
|
288
305
|
|
|
306
|
+
.presetedHeight {
|
|
307
|
+
min-height: 100px;
|
|
308
|
+
}
|
|
309
|
+
|
|
289
310
|
.overlay-text {
|
|
290
311
|
position: absolute;
|
|
291
312
|
top: 50%;
|