@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
|
@@ -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;
|
|
@@ -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
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } from './index-6b8bfbeb.js';
|
|
2
|
-
import './index-
|
|
2
|
+
import './index-4688c617.js';
|
|
3
3
|
import { F as FloatingManager } from './FloatingManager-bb90ef41.js';
|
|
4
4
|
import { C as CSSVarsUtils } from './CSSVarsUtils-aeee9825.js';
|
|
5
5
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { h, r as registerInstance, f as forceUpdate, H as Host, g as getElement } from './index-6b8bfbeb.js';
|
|
2
|
-
import { U as UserInterface, A as Action, d as DataUnitAction,
|
|
2
|
+
import { U as UserInterface, A as Action, d as DataUnitAction, b as DataUnit } from './index-4688c617.js';
|
|
3
3
|
import { A as ApplicationUtils } from './ApplicationUtils-01280a9d.js';
|
|
4
4
|
|
|
5
5
|
const buildTextArea = ({ name, label }) => {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, c as createEvent, h, H as Host, g as getElement } 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 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%}";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { r as registerInstance, h, H as Host, g as getElement } from './index-6b8bfbeb.js';
|
|
2
|
-
import { M as MaskFormatter, T as TimeFormatter, N as NumberUtils } from './index-
|
|
2
|
+
import { M as MaskFormatter, T as TimeFormatter, N as NumberUtils } from './index-4688c617.js';
|
|
3
3
|
import { C as CSSVarsUtils } from './CSSVarsUtils-aeee9825.js';
|
|
4
4
|
import { g as getSpritePath } from './AssetsUtils-9b1329a3.js';
|
|
5
5
|
|
|
@@ -7449,4 +7449,4 @@ function HeadersInstanceToPlainObject(headers) {
|
|
|
7449
7449
|
//# sourceMappingURL=index.js.map
|
|
7450
7450
|
});
|
|
7451
7451
|
|
|
7452
|
-
export { Action as A,
|
|
7452
|
+
export { Action as A, DataType as D, MaskFormatter as M, NumberUtils as N, SortMode as S, TimeFormatter as T, UserInterface as U, commonjsGlobal as a, DataUnit as b, createCommonjsModule as c, DataUnitAction as d };
|
package/dist/ezui/ezui.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{p as e,b as a}from"./p-89a57641.js";(()=>{const a=import.meta.url,s={};return""!==a&&(s.resourcesUrl=new URL(".",a).href),e(s)})().then((e=>a([["p-
|
|
1
|
+
import{p as e,b as a}from"./p-89a57641.js";(()=>{const a=import.meta.url,s={};return""!==a&&(s.resourcesUrl=new URL(".",a).href),e(s)})().then((e=>a([["p-5793a2e1",[[0,"ez-form",{dataUnit:[1040],config:[16],submit:[64],cancel:[64],validate:[64]}]]],["p-020f1285",[[1,"ez-dialog",{confirm:[1028],critical:[1028],message:[1025],opened:[1540],personalizedIconPath:[1025,"personalized-icon-path"],ezTitle:[1025,"ez-title"],handleButtonClick:[64],show:[64]}]]],["p-7e1d9c29",[[1,"ez-time-input",{label:[513],viewValue:[1537,"view-value"],value:[1026],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"],setFocus:[64],setBlur:[64]}]]],["p-b8678ee6",[[1,"ez-action-chip",{label:[513],enabled:[516]}]]],["p-95fc543c",[[0,"ez-application"]]],["p-542d3d29",[[1,"ez-label-chip",{label:[513],enabled:[516],removable:[516],value:[1540],setFocus:[64],setBlur:[64]}]]],["p-4b5c4408",[[1,"ez-popover",{autoClose:[516,"auto-close"],top:[1537],left:[1537],bottom:[1537],right:[1537],boxWidth:[513,"box-width"],opened:[1540],updatePosition:[64],show:[64],hide:[64]}]]],["p-502d7e0d",[[1,"ez-popup",{size:[1],opened:[1540],useHeader:[1540,"use-header"],ezTitle:[1,"ez-title"]}]]],["p-b217f40b",[[1,"ez-toast",{message:[1025],fadeTime:[1026,"fade-time"],useIcon:[1028,"use-icon"],show:[64]}]]],["p-278ce681",[[1,"ez-calendar",{value:[1040],floating:[516],time:[516],showSeconds:[516,"show-seconds"],show:[64],fitVertical:[64],hide:[64]}]]],["p-ca42d682",[[0,"test-du"],[6,"ez-grid",{multipleSelection:[4,"multiple-selection"],pageSize:[2,"page-size"],serverUrl:[1,"server-url"],dataUnit:[16],_navigationHasPrevious:[32],_navigationHasNext:[32],_navigationFirstRow:[32],_navigationLastRow:[32],_navigationTotalRows:[32],_popUpVisible:[32],setColumnsDef:[64],addColumnMenuItem:[64],setColumnsState:[64],setData:[64],getSelection:[64],getColumnsState:[64],getColumns:[64]}],[2,"grid-config",{selectedTab:[1025,"selected-tab"],columns:[1040]}],[1,"ez-modal",{modalSize:[1,"modal-size"],align:[1],opened:[1028],closeEsc:[4,"close-esc"],closeOutsideClick:[4,"close-outside-click"]}],[1,"ez-list",{dataSource:[1040],useGroups:[1540,"use-groups"],ezDraggable:[1028,"ez-draggable"],ezSelectable:[1028,"ez-selectable"],itemSlotBuilder:[1040],_listItems:[32],_listGroupItems:[32],setSelection:[64],getSelection:[64],getList:[64]}],[1,"select-box",{selectedOption:[1,"selected-option"]}],[1,"ez-button",{label:[513],enabled:[516],mode:[513],image:[513],iconName:[513,"icon-name"],size:[513]}],[1,"ez-check",{label:[513],value:[1540],enabled:[516],mode:[513],getMode:[64],setFocus:[64]}],[1,"ez-tabselector",{selectedIndex:[1538,"selected-index"],selectedTab:[1537,"selected-tab"],tabs:[1]}],[1,"ez-icon",{size:[513],href:[513],iconName:[513,"icon-name"]}],[1,"ez-text-input",{label:[513],value:[1537],enabled:[516],loading:[516],errorMessage:[1537,"error-message"],mask:[1],restrict:[1],setFocus:[64],setBlur:[64]}]]],["p-68f6b75e",[[1,"ez-combo-box",{value:[1537],label:[513],enabled:[516],options:[1040],errorMessage:[1537,"error-message"],searchMode:[4,"search-mode"],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"],optionLoader:[16],_preSelection:[32],_visibleOptions:[32]}]]],["p-33d1247f",[[1,"ez-date-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"]}],[1,"ez-date-time-input",{label:[513],value:[1040],enabled:[516],errorMessage:[1537,"error-message"],showSeconds:[516,"show-seconds"]}],[1,"ez-search",{value:[1537],label:[1537],enabled:[1540],errorMessage:[1537,"error-message"],optionLoader:[16],showSelectedValue:[4,"show-selected-value"],showOptionValue:[4,"show-option-value"]}],[1,"ez-number-input",{label:[1],value:[1538],enabled:[4],errorMessage:[1537,"error-message"],precision:[2],prettyPrecision:[2,"pretty-precision"]}],[1,"ez-collapsible-box",{value:[1540],label:[513],headerSize:[513,"header-size"],iconPlacement:[513,"icon-placement"],showHide:[64]}],[1,"ez-text-area",{label:[513],value:[1537],enabled:[516],loading:[516],errorMessage:[1537,"error-message"],rows:[1538],setFocus:[64],setBlur:[64]}],[1,"ez-upload",{label:[1],enabled:[4],maxFileSize:[2,"max-file-size"],maxFiles:[2,"max-files"],requestHeaders:[8,"request-headers"],urlUpload:[1,"url-upload"],urlDelete:[1,"url-delete"],value:[1040],addFiles:[64]}]]]],e)));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as a,c as e,f as r,h as l}from"./p-89a57641.js";import"./p-f0137439.js";import{F as t}from"./p-ddd0ef12.js";let i=class{constructor(r){a(this,r),this.ezChange=e(this,"ezChange",7),this._firstRender=!0,this._todayLabel="Hoje",this._weekDayLabels=["D","S","T","Q","Q","S","S"],this._monthLabels=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],this._hoursLabel=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],this._minutosLabel=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"],this.value=new Date,this.floating=!1,this.time=!1,this.showSeconds=!1}async show(a,e,r,l){this.floating&&(this._floatingID=t.float(this._box,this._container,{autoClose:!0,top:a,left:e,bottom:r,right:l}),window.requestAnimationFrame((()=>{this._box.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})),this.scroll())}async fitVertical(a,e){const r=this._container.getBoundingClientRect().bottom+this._calendarHeight;(window.innerHeight||document.documentElement.clientHeight)>r?this.show(a+"px",void 0,"unset"):this.show("unset",void 0,e+"px")}async hide(){void 0!==this._floatingID&&(t.close(this._floatingID),this._floatingID=void 0)}valueChanged(){this.value&&(this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1))}getMonthLabel(){return this._monthLabels[this._currentPosition.getMonth()]+" "+this._currentPosition.getFullYear()}isSelectedDate(a){return!!this.value&&this.value.getDate()==a.getDate()&&this.value.getMonth()==a.getMonth()&&this.value.getFullYear()==a.getFullYear()}changeMonth(a){this._currentPosition.setMonth(this._currentPosition.getMonth()+a),r(this)}selectDate(a){let e=a;this.value&&(this.time||this.showSeconds)&&(e.setHours(this.value.getHours()),e.setMinutes(this.value.getMinutes()),e.setSeconds(this.showSeconds?this.value.getSeconds():0)),this.value=e,this.ezChange.emit()}selectHours(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),a,this.value.getMinutes(),this.value.getSeconds()),this.ezChange.emit()}selectMinutes(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),a,this.value.getSeconds()),this.ezChange.emit()}selectSeconds(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),this.value.getMinutes(),a),this.ezChange.emit()}updateScroll(a){if(a){const{scrollHeight:e,clientHeight:r,scrollTop:l}=a;e-r-Math.ceil(l)>0?a.classList.add("endHidden"):a.classList.remove("endHidden")}}componentDidRender(){this.floating&&this._firstRender&&(this._calendarHeight=this._box.clientHeight,this._box.remove(),this._firstRender=!1),this.updateScroll(this._hoursScroll),this.updateScroll(this._minutesScroll),this.updateScroll(this._secondsScroll)}componentDidLoad(){this.scroll()}scroll(){(this.time||this.showSeconds)&&(this._hoursScroll.scrollTop=this._hoursSelect.offsetTop-64,this._minutesScroll.scrollTop=this._minutesSelect.offsetTop-64,this.updateScroll(this._hoursScroll),this.updateScroll(this._minutesScroll),this.showSeconds&&(this._secondsScroll.scrollTop=this._secondsSelect.offsetTop-64,this.updateScroll(this._secondsScroll)))}render(){null==this._currentPosition&&(this._currentPosition=new Date,this.value&&this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1));const a=new Date;return a.setTime(this._currentPosition.getTime()),a.setDate(1-a.getDay()),l("section",{ref:a=>this._container=a},l("div",{ref:a=>this._box=a,style:{display:"flex"}},l("div",{class:"calendar"},l("div",{class:"calendar__header"},l("button",{class:"calendar__btn-previous",onClick:()=>this.changeMonth(-1)}),l("label",{class:"calendar__lbl-month"},this.getMonthLabel()),l("button",{class:"calendar__btn-next",onClick:()=>this.changeMonth(1)})),l("div",{class:"calendar__body"},l("div",{class:"calendar__line"},this._weekDayLabels.map((a=>l("div",{class:"calendar__cell calendar__cell--unselectable"},a)))),[0,7,14,21,28,35].map((e=>l("div",{class:"calendar__line"},[0,1,2,3,4,5,6].map((r=>{const t=new Date;t.setTime(a.getTime()),t.setDate(t.getDate()+e+r);let i="calendar__cell";return this._currentPosition.getMonth()!=t.getMonth()?i+=" calendar__cell--secondary":this.isSelectedDate(t)&&(i+=" calendar__cell--selected"),l("div",{class:i,onClick:()=>this.selectDate(t)},t.getDate())})))))),l("div",{class:"calendar__footer"},l("button",{class:"calendar__btn-today",onClick:()=>this.selectDate(new Date)},this._todayLabel))),(this.time||this.showSeconds)&&l("div",{class:"calendarTime"},l("div",{class:"calendarTime__header"},l("div",null,"H"),l("div",{class:"separatorTime"},":"),l("div",null,"M"),this.showSeconds&&l("div",{class:"separatorTime"},":"),this.showSeconds&&l("div",null,"S")),l("div",{class:"calendar__body ",style:{display:"flex",paddingLeft:"12px",paddingRight:"12px"}},l("div",{class:"calendar__column",ref:a=>this._hoursScroll=a,onScroll:()=>this.updateScroll(this._hoursScroll)},this._hoursLabel.map(((a,e)=>e===this.value.getHours()?l("div",{style:{display:"flex"},ref:a=>this._hoursSelect=a},l("div",{class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectHours(e)},a),l("div",{class:"separatorTime"},":")):l("div",{style:{display:"flex"}},l("div",{class:"calendar__cell",onClick:()=>this.selectHours(e)},a),l("div",{class:"separatorTime"},":"))))),l("div",{class:"calendar__column",ref:a=>this._minutesScroll=a,onScroll:()=>this.updateScroll(this._minutesScroll)},this._minutosLabel.map(((a,e)=>e===this.value.getMinutes()?l("div",{style:{display:"flex"},ref:a=>this._minutesSelect=a},l("div",{class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectMinutes(e)},a),this.showSeconds&&l("div",{class:"separatorTime"},":")):l("div",{style:{display:"flex"}},l("div",{class:"calendar__cell",onClick:()=>this.selectMinutes(e)},a),this.showSeconds&&l("div",{class:"separatorTime"},":"))))),this.showSeconds&&l("div",{class:"calendar__column",ref:a=>this._secondsScroll=a,onScroll:()=>this.updateScroll(this._secondsScroll)},this._minutosLabel.map(((a,e)=>e===this.value.getSeconds()?l("div",{class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectSeconds(e),ref:a=>this._secondsSelect=a},a):l("div",{class:"calendar__cell",onClick:()=>this.selectSeconds(e)},a))))))))}static get watchers(){return{value:["valueChanged"]}}};i.style=':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}';export{i as ez_calendar}
|
|
1
|
+
import{r as a,c as e,f as r,h as l}from"./p-89a57641.js";import"./p-7ff8b7f7.js";import{F as t}from"./p-ddd0ef12.js";let i=class{constructor(r){a(this,r),this.ezChange=e(this,"ezChange",7),this._firstRender=!0,this._todayLabel="Hoje",this._weekDayLabels=["D","S","T","Q","Q","S","S"],this._monthLabels=["Janeiro","Fevereiro","Março","Abril","Maio","Junho","Julho","Agosto","Setembro","Outubro","Novembro","Dezembro"],this._hoursLabel=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23"],this._minutosLabel=["00","01","02","03","04","05","06","07","08","09","10","11","12","13","14","15","16","17","18","19","20","21","22","23","24","25","26","27","28","29","30","31","32","33","34","35","36","37","38","39","40","41","42","43","44","45","46","47","48","49","50","51","52","53","54","55","56","57","58","59"],this.value=new Date,this.floating=!1,this.time=!1,this.showSeconds=!1}async show(a,e,r,l){this.floating&&(this._floatingID=t.float(this._box,this._container,{autoClose:!0,top:a,left:e,bottom:r,right:l}),window.requestAnimationFrame((()=>{this._box.scrollIntoView({behavior:"smooth",block:"nearest",inline:"nearest"})})),this.scroll())}async fitVertical(a,e){const r=this._container.getBoundingClientRect().bottom+this._calendarHeight;(window.innerHeight||document.documentElement.clientHeight)>r?this.show(a+"px",void 0,"unset"):this.show("unset",void 0,e+"px")}async hide(){void 0!==this._floatingID&&(t.close(this._floatingID),this._floatingID=void 0)}valueChanged(){this.value&&(this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1))}getMonthLabel(){return this._monthLabels[this._currentPosition.getMonth()]+" "+this._currentPosition.getFullYear()}isSelectedDate(a){return!!this.value&&this.value.getDate()==a.getDate()&&this.value.getMonth()==a.getMonth()&&this.value.getFullYear()==a.getFullYear()}changeMonth(a){this._currentPosition.setMonth(this._currentPosition.getMonth()+a),r(this)}selectDate(a){let e=a;this.value&&(this.time||this.showSeconds)&&(e.setHours(this.value.getHours()),e.setMinutes(this.value.getMinutes()),e.setSeconds(this.showSeconds?this.value.getSeconds():0)),this.value=e,this.ezChange.emit()}selectHours(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),a,this.value.getMinutes(),this.value.getSeconds()),this.ezChange.emit()}selectMinutes(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),a,this.value.getSeconds()),this.ezChange.emit()}selectSeconds(a){this.value||(this.value=new Date),this.value=new Date(this.value.getFullYear(),this.value.getMonth(),this.value.getDate(),this.value.getHours(),this.value.getMinutes(),a),this.ezChange.emit()}updateScroll(a){if(a){const{scrollHeight:e,clientHeight:r,scrollTop:l}=a;e-r-Math.ceil(l)>0?a.classList.add("endHidden"):a.classList.remove("endHidden")}}componentDidRender(){this.floating&&this._firstRender&&(this._calendarHeight=this._box.clientHeight,this._box.remove(),this._firstRender=!1),this.updateScroll(this._hoursScroll),this.updateScroll(this._minutesScroll),this.updateScroll(this._secondsScroll)}componentDidLoad(){this.scroll()}scroll(){(this.time||this.showSeconds)&&(this._hoursScroll.scrollTop=this._hoursSelect.offsetTop-64,this._minutesScroll.scrollTop=this._minutesSelect.offsetTop-64,this.updateScroll(this._hoursScroll),this.updateScroll(this._minutesScroll),this.showSeconds&&(this._secondsScroll.scrollTop=this._secondsSelect.offsetTop-64,this.updateScroll(this._secondsScroll)))}render(){null==this._currentPosition&&(this._currentPosition=new Date,this.value&&this._currentPosition.setTime(this.value.getTime()),this._currentPosition.setDate(1));const a=new Date;return a.setTime(this._currentPosition.getTime()),a.setDate(1-a.getDay()),l("section",{ref:a=>this._container=a},l("div",{ref:a=>this._box=a,style:{display:"flex"}},l("div",{class:"calendar"},l("div",{class:"calendar__header"},l("button",{class:"calendar__btn-previous",onClick:()=>this.changeMonth(-1)}),l("label",{class:"calendar__lbl-month"},this.getMonthLabel()),l("button",{class:"calendar__btn-next",onClick:()=>this.changeMonth(1)})),l("div",{class:"calendar__body"},l("div",{class:"calendar__line"},this._weekDayLabels.map((a=>l("div",{class:"calendar__cell calendar__cell--unselectable"},a)))),[0,7,14,21,28,35].map((e=>l("div",{class:"calendar__line"},[0,1,2,3,4,5,6].map((r=>{const t=new Date;t.setTime(a.getTime()),t.setDate(t.getDate()+e+r);let i="calendar__cell";return this._currentPosition.getMonth()!=t.getMonth()?i+=" calendar__cell--secondary":this.isSelectedDate(t)&&(i+=" calendar__cell--selected"),l("div",{class:i,onClick:()=>this.selectDate(t)},t.getDate())})))))),l("div",{class:"calendar__footer"},l("button",{class:"calendar__btn-today",onClick:()=>this.selectDate(new Date)},this._todayLabel))),(this.time||this.showSeconds)&&l("div",{class:"calendarTime"},l("div",{class:"calendarTime__header"},l("div",null,"H"),l("div",{class:"separatorTime"},":"),l("div",null,"M"),this.showSeconds&&l("div",{class:"separatorTime"},":"),this.showSeconds&&l("div",null,"S")),l("div",{class:"calendar__body ",style:{display:"flex",paddingLeft:"12px",paddingRight:"12px"}},l("div",{class:"calendar__column",ref:a=>this._hoursScroll=a,onScroll:()=>this.updateScroll(this._hoursScroll)},this._hoursLabel.map(((a,e)=>e===this.value.getHours()?l("div",{style:{display:"flex"},ref:a=>this._hoursSelect=a},l("div",{class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectHours(e)},a),l("div",{class:"separatorTime"},":")):l("div",{style:{display:"flex"}},l("div",{class:"calendar__cell",onClick:()=>this.selectHours(e)},a),l("div",{class:"separatorTime"},":"))))),l("div",{class:"calendar__column",ref:a=>this._minutesScroll=a,onScroll:()=>this.updateScroll(this._minutesScroll)},this._minutosLabel.map(((a,e)=>e===this.value.getMinutes()?l("div",{style:{display:"flex"},ref:a=>this._minutesSelect=a},l("div",{class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectMinutes(e)},a),this.showSeconds&&l("div",{class:"separatorTime"},":")):l("div",{style:{display:"flex"}},l("div",{class:"calendar__cell",onClick:()=>this.selectMinutes(e)},a),this.showSeconds&&l("div",{class:"separatorTime"},":"))))),this.showSeconds&&l("div",{class:"calendar__column",ref:a=>this._secondsScroll=a,onScroll:()=>this.updateScroll(this._secondsScroll)},this._minutosLabel.map(((a,e)=>e===this.value.getSeconds()?l("div",{class:"calendar__cell calendar__cell--selected",onClick:()=>this.selectSeconds(e),ref:a=>this._secondsSelect=a},a):l("div",{class:"calendar__cell",onClick:()=>this.selectSeconds(e)},a))))))))}static get watchers(){return{value:["valueChanged"]}}};i.style=':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}';export{i as ez_calendar}
|