@sankhyalabs/ezui 5.22.0-dev.64 → 5.22.0-dev.66
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-actions-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-alert-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-alert.cjs.entry.js +1 -1
- package/dist/cjs/ez-application.cjs.entry.js +1 -1
- package/dist/cjs/ez-badge.cjs.entry.js +1 -1
- package/dist/cjs/ez-breadcrumb.cjs.entry.js +1 -1
- package/dist/cjs/ez-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-calendar.cjs.entry.js +1 -1
- package/dist/cjs/{ez-card-item_3.cjs.entry.js → ez-card-item_2.cjs.entry.js} +1 -124
- package/dist/cjs/ez-chart.cjs.entry.js +1 -1
- package/dist/cjs/ez-check.cjs.entry.js +1 -1
- package/dist/cjs/ez-chip.cjs.entry.js +1 -1
- package/dist/cjs/ez-collapsible-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-combo-box.cjs.entry.js +1 -1
- package/dist/cjs/ez-custom-form-input_2.cjs.entry.js +2 -2
- package/dist/cjs/ez-date-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-date-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-dialog.cjs.entry.js +1 -1
- package/dist/cjs/ez-double-list.cjs.entry.js +285 -0
- package/dist/cjs/ez-dropdown_2.cjs.entry.js +1 -1
- package/dist/cjs/ez-file-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-filter-input.cjs.entry.js +130 -0
- package/dist/cjs/ez-form-view.cjs.entry.js +1 -1
- package/dist/cjs/ez-form.cjs.entry.js +1 -1
- package/dist/cjs/ez-grid.cjs.entry.js +4 -4
- package/dist/cjs/ez-guide-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-icon.cjs.entry.js +1 -1
- package/dist/cjs/ez-list.cjs.entry.js +247 -206
- package/dist/cjs/ez-loading-bar.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal-container.cjs.entry.js +1 -1
- package/dist/cjs/ez-modal.cjs.entry.js +1 -1
- package/dist/cjs/ez-multi-selection-list.cjs.entry.js +1 -1
- package/dist/cjs/ez-number-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-popover.cjs.entry.js +1 -1
- package/dist/cjs/ez-popup.cjs.entry.js +5 -2
- package/dist/cjs/ez-radio-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-scroller_2.cjs.entry.js +1 -1
- package/dist/cjs/ez-search.cjs.entry.js +1 -1
- package/dist/cjs/ez-sidebar-navigator.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-button.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-item.cjs.entry.js +1 -1
- package/dist/cjs/ez-split-panel.cjs.entry.js +1 -1
- package/dist/cjs/ez-tabselector.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-area.cjs.entry.js +1 -1
- package/dist/cjs/ez-text-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-time-input.cjs.entry.js +1 -1
- package/dist/cjs/ez-toast.cjs.entry.js +1 -1
- package/dist/cjs/ez-tooltip.cjs.entry.js +1 -1
- package/dist/cjs/ez-tree.cjs.entry.js +1 -1
- package/dist/cjs/ez-upload.cjs.entry.js +1 -1
- package/dist/cjs/ez-view-stack.cjs.entry.js +1 -1
- package/dist/cjs/ezListHelper-0d3970b4.js +90 -0
- package/dist/cjs/ezui.cjs.js +2 -2
- package/dist/cjs/filter-column.cjs.entry.js +1 -1
- package/dist/cjs/{index-9e5554cb.js → index-a7b0c73d.js} +10 -5
- package/dist/cjs/loader.cjs.js +2 -2
- package/dist/collection/collection-manifest.json +1 -0
- package/dist/collection/components/ez-double-list/doubleListHelper.js +82 -0
- package/dist/collection/components/ez-double-list/ez-double-list.css +62 -0
- package/dist/collection/components/ez-double-list/ez-double-list.js +418 -0
- package/dist/collection/components/ez-grid/ez-grid.css +24 -6
- package/dist/collection/components/ez-grid/ez-grid.js +5 -5
- package/dist/collection/components/ez-list/ez-list.js +273 -208
- package/dist/collection/components/ez-list/ezListHelper.js +85 -0
- package/dist/collection/components/ez-popup/ez-popup.css +1 -0
- package/dist/collection/components/ez-popup/ez-popup.js +5 -2
- package/dist/custom-elements/index.d.ts +6 -0
- package/dist/custom-elements/index.js +627 -220
- package/dist/esm/ez-actions-button.entry.js +1 -1
- package/dist/esm/ez-alert-list.entry.js +1 -1
- package/dist/esm/ez-alert.entry.js +1 -1
- package/dist/esm/ez-application.entry.js +1 -1
- package/dist/esm/ez-badge.entry.js +1 -1
- package/dist/esm/ez-breadcrumb.entry.js +1 -1
- package/dist/esm/ez-button.entry.js +1 -1
- package/dist/esm/ez-calendar.entry.js +1 -1
- package/dist/esm/{ez-card-item_3.entry.js → ez-card-item_2.entry.js} +2 -124
- package/dist/esm/ez-chart.entry.js +1 -1
- package/dist/esm/ez-check.entry.js +1 -1
- package/dist/esm/ez-chip.entry.js +1 -1
- package/dist/esm/ez-collapsible-box.entry.js +1 -1
- package/dist/esm/ez-combo-box.entry.js +1 -1
- package/dist/esm/ez-custom-form-input_2.entry.js +2 -2
- package/dist/esm/ez-date-input.entry.js +1 -1
- package/dist/esm/ez-date-time-input.entry.js +1 -1
- package/dist/esm/ez-dialog.entry.js +1 -1
- package/dist/esm/ez-double-list.entry.js +281 -0
- package/dist/esm/ez-dropdown_2.entry.js +1 -1
- package/dist/esm/ez-file-item.entry.js +1 -1
- package/dist/esm/ez-filter-input.entry.js +126 -0
- package/dist/esm/ez-form-view.entry.js +1 -1
- package/dist/esm/ez-form.entry.js +1 -1
- package/dist/esm/ez-grid.entry.js +4 -4
- package/dist/esm/ez-guide-navigator.entry.js +1 -1
- package/dist/esm/ez-icon.entry.js +1 -1
- package/dist/esm/ez-list.entry.js +247 -206
- package/dist/esm/ez-loading-bar.entry.js +1 -1
- package/dist/esm/ez-modal-container.entry.js +1 -1
- package/dist/esm/ez-modal.entry.js +1 -1
- package/dist/esm/ez-multi-selection-list.entry.js +1 -1
- package/dist/esm/ez-number-input.entry.js +1 -1
- package/dist/esm/ez-popover.entry.js +1 -1
- package/dist/esm/ez-popup.entry.js +5 -2
- package/dist/esm/ez-radio-button.entry.js +1 -1
- package/dist/esm/ez-scroller_2.entry.js +1 -1
- package/dist/esm/ez-search.entry.js +1 -1
- package/dist/esm/ez-sidebar-navigator.entry.js +1 -1
- package/dist/esm/ez-split-button.entry.js +1 -1
- package/dist/esm/ez-split-item.entry.js +1 -1
- package/dist/esm/ez-split-panel.entry.js +1 -1
- package/dist/esm/ez-tabselector.entry.js +1 -1
- package/dist/esm/ez-text-area.entry.js +1 -1
- package/dist/esm/ez-text-input.entry.js +1 -1
- package/dist/esm/ez-time-input.entry.js +1 -1
- package/dist/esm/ez-toast.entry.js +1 -1
- package/dist/esm/ez-tooltip.entry.js +1 -1
- package/dist/esm/ez-tree.entry.js +1 -1
- package/dist/esm/ez-upload.entry.js +1 -1
- package/dist/esm/ez-view-stack.entry.js +1 -1
- package/dist/esm/ezListHelper-00fb9b8d.js +87 -0
- package/dist/esm/ezui.js +3 -3
- package/dist/esm/filter-column.entry.js +1 -1
- package/dist/esm/{index-5a720e56.js → index-baa5e267.js} +11 -5
- package/dist/esm/loader.js +3 -3
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/{p-e6b38ade.entry.js → p-0306dff7.entry.js} +1 -1
- package/dist/ezui/{p-91ccae0c.entry.js → p-09de35a2.entry.js} +1 -1
- package/dist/ezui/p-13165bb1.entry.js +1 -0
- package/dist/ezui/{p-c7d1333c.entry.js → p-14b769d7.entry.js} +1 -1
- package/dist/ezui/{p-b2f6bc0a.entry.js → p-17be134a.entry.js} +1 -1
- package/dist/ezui/p-17eabf46.entry.js +1 -0
- package/dist/ezui/{p-319d36b7.entry.js → p-181b5ae8.entry.js} +1 -1
- package/dist/ezui/{p-81461d2f.entry.js → p-1e7a8633.entry.js} +1 -1
- package/dist/ezui/{p-6b51c9cc.entry.js → p-1f50fa05.entry.js} +1 -1
- package/dist/ezui/{p-e4c7eb39.js → p-23a36bb6.js} +2 -2
- package/dist/ezui/p-2475fd6e.entry.js +1 -0
- package/dist/ezui/{p-469b2619.entry.js → p-29e7a674.entry.js} +2 -2
- package/dist/ezui/{p-3c10cd94.entry.js → p-2b46b37b.entry.js} +1 -1
- package/dist/ezui/{p-6d31c43c.entry.js → p-2bb2a0c4.entry.js} +1 -1
- package/dist/ezui/{p-efbe0b73.entry.js → p-3175fe8c.entry.js} +1 -1
- package/dist/ezui/p-31d1fab6.entry.js +1 -0
- package/dist/ezui/{p-fad4f1dd.entry.js → p-35d467a8.entry.js} +1 -1
- package/dist/ezui/{p-5d01d189.entry.js → p-3f2dd525.entry.js} +1 -1
- package/dist/ezui/{p-0378416a.entry.js → p-44caad9a.entry.js} +1 -1
- package/dist/ezui/{p-aa543378.entry.js → p-50d83a46.entry.js} +1 -1
- package/dist/ezui/{p-7567ccdd.entry.js → p-555c9018.entry.js} +1 -1
- package/dist/ezui/{p-044d46d5.entry.js → p-5b205c80.entry.js} +1 -1
- package/dist/ezui/{p-6fc26622.entry.js → p-5ed81457.entry.js} +1 -1
- package/dist/ezui/{p-f1c2c19e.entry.js → p-650e4b6d.entry.js} +1 -1
- package/dist/ezui/{p-aee8d615.entry.js → p-654b3f99.entry.js} +1 -1
- package/dist/ezui/p-65f471bc.entry.js +1 -0
- package/dist/ezui/{p-6d8b3298.entry.js → p-6cdd3e0a.entry.js} +1 -1
- package/dist/ezui/{p-554522db.entry.js → p-6d79930d.entry.js} +1 -1
- package/dist/ezui/{p-fc194825.entry.js → p-6e429cff.entry.js} +1 -1
- package/dist/ezui/{p-def75121.entry.js → p-6f22a385.entry.js} +1 -1
- package/dist/ezui/{p-2f53435e.entry.js → p-7409eeaa.entry.js} +1 -1
- package/dist/ezui/{p-11bfeca3.entry.js → p-77a4bd35.entry.js} +1 -1
- package/dist/ezui/{p-397e3026.entry.js → p-7ed30844.entry.js} +1 -1
- package/dist/ezui/{p-e18d9e6a.entry.js → p-7fdd479f.entry.js} +1 -1
- package/dist/ezui/p-80dfc50b.js +1 -0
- package/dist/ezui/{p-1b08bf3c.entry.js → p-8888d9ed.entry.js} +1 -1
- package/dist/ezui/{p-82fa4b09.entry.js → p-8df1ca33.entry.js} +1 -1
- package/dist/ezui/{p-e7395eae.entry.js → p-90bcd2ba.entry.js} +1 -1
- package/dist/ezui/{p-a921e3e7.entry.js → p-990b4318.entry.js} +1 -1
- package/dist/ezui/{p-c2b20f78.entry.js → p-9f5fa3f9.entry.js} +1 -1
- package/dist/ezui/{p-b6241ea3.entry.js → p-a6fe527a.entry.js} +1 -1
- package/dist/ezui/{p-dfca5946.entry.js → p-a80b1287.entry.js} +1 -1
- package/dist/ezui/{p-18a2a28a.entry.js → p-b6a4e6de.entry.js} +1 -1
- package/dist/ezui/p-bc2f844e.entry.js +1 -0
- package/dist/ezui/{p-92748142.entry.js → p-c0d9c4f8.entry.js} +1 -1
- package/dist/ezui/{p-b858fc6e.entry.js → p-c3045972.entry.js} +1 -1
- package/dist/ezui/{p-a563df31.entry.js → p-c4320a39.entry.js} +1 -1
- package/dist/ezui/{p-ec5f987d.entry.js → p-ca6340a9.entry.js} +1 -1
- package/dist/ezui/{p-16e21a40.entry.js → p-d0ca26fe.entry.js} +1 -1
- package/dist/ezui/{p-cce6c015.entry.js → p-d520839d.entry.js} +1 -1
- package/dist/ezui/p-dc8b36c3.entry.js +1 -0
- package/dist/ezui/{p-bef7daac.entry.js → p-e347df9c.entry.js} +1 -1
- package/dist/ezui/{p-35d0b2fb.entry.js → p-e3e3fd7a.entry.js} +1 -1
- package/dist/ezui/{p-6bda82d1.entry.js → p-fec696ab.entry.js} +1 -1
- package/dist/types/components/ez-double-list/doubleListHelper.d.ts +10 -0
- package/dist/types/components/ez-double-list/ez-double-list.d.ts +86 -0
- package/dist/types/components/ez-grid/ez-grid.d.ts +1 -1
- package/dist/types/components/ez-list/ez-list.d.ts +19 -3
- package/dist/types/components/ez-list/ezListHelper.d.ts +20 -0
- package/dist/types/components/ez-popup/ez-popup.d.ts +1 -1
- package/dist/types/components.d.ts +105 -14
- package/package.json +1 -1
- package/react/components.d.ts +1 -0
- package/react/components.js +1 -0
- package/react/components.js.map +1 -1
- package/dist/ezui/p-3af64edd.entry.js +0 -1
- package/dist/ezui/p-46a46507.entry.js +0 -1
- package/dist/ezui/p-6ec40dec.entry.js +0 -1
- package/dist/ezui/p-7f5afb1f.entry.js +0 -1
- package/dist/ezui/p-a1c0eadf.entry.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLElement as HTMLElement$1, createEvent, h, Host, forceUpdate, Fragment, proxyCustomElement } from '@stencil/core/internal/client';
|
|
2
2
|
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
3
|
-
import { UserInterface, DateUtils as DateUtils$1, Action, StringUtils as StringUtils$1, ApplicationContext, WaitingChangeException, DataUnitAction, FloatingManager, ElementIDUtils, ObjectUtils as ObjectUtils$1, JSUtils, HTMLBuilder, TimeFormatter, DataUnit, LockManager, LockManagerOperation, NumberUtils as NumberUtils$1, MaskFormatter, DataType, SortMode, FieldComparator,
|
|
3
|
+
import { UserInterface, DateUtils as DateUtils$1, Action, StringUtils as StringUtils$1, ApplicationContext, WaitingChangeException, DataUnitAction, FloatingManager, ElementIDUtils, ObjectUtils as ObjectUtils$1, JSUtils, HTMLBuilder, TimeFormatter, ArrayUtils as ArrayUtils$1, DataUnit, LockManager, LockManagerOperation, NumberUtils as NumberUtils$1, MaskFormatter, DataType, SortMode, FieldComparator, OverflowWatcher, OVERFLOWED_CLASS_NAME, KeyboardManager } from '@sankhyalabs/core';
|
|
4
4
|
import { SelectionMode } from '@sankhyalabs/core/dist/dataunit/DataUnit';
|
|
5
5
|
|
|
6
6
|
// Unique ID creation requires a high quality random # generator. In the browser we therefore
|
|
@@ -4288,6 +4288,375 @@ const EzDialog$1 = class extends HTMLElement$1 {
|
|
|
4288
4288
|
static get style() { return ezDialogCss; }
|
|
4289
4289
|
};
|
|
4290
4290
|
|
|
4291
|
+
function moveItems(selectedItemsList, itemsList, foward) {
|
|
4292
|
+
if (!selectedItemsList.length)
|
|
4293
|
+
return [...itemsList];
|
|
4294
|
+
if (!itemsList.length)
|
|
4295
|
+
return [];
|
|
4296
|
+
const selectedIndexes = getItemsIndex(selectedItemsList, itemsList);
|
|
4297
|
+
const startIndex = getMinValue(selectedIndexes);
|
|
4298
|
+
const endIndex = getMaxValue(selectedIndexes);
|
|
4299
|
+
return moveRange(startIndex, endIndex, foward, itemsList);
|
|
4300
|
+
}
|
|
4301
|
+
function getMinValue(numbers) {
|
|
4302
|
+
if (numbers.length === 0)
|
|
4303
|
+
return 0;
|
|
4304
|
+
return numbers.reduce((min, current) => (current < min ? current : min), numbers[0]);
|
|
4305
|
+
}
|
|
4306
|
+
function getMaxValue(numbers) {
|
|
4307
|
+
if (numbers.length === 0)
|
|
4308
|
+
return 0;
|
|
4309
|
+
return numbers.reduce((max, current) => (current > max ? current : max), numbers[0]);
|
|
4310
|
+
}
|
|
4311
|
+
function getItemsIndex(selectedItemsList, itemsList) {
|
|
4312
|
+
return selectedItemsList.map(selectedId => itemsList.findIndex(original => original.id === selectedId));
|
|
4313
|
+
}
|
|
4314
|
+
function moveRange(startIndex, endIndex, moveForward, listItem) {
|
|
4315
|
+
if (startIndex < 0 || endIndex >= listItem.length || startIndex > endIndex)
|
|
4316
|
+
return listItem;
|
|
4317
|
+
if (moveForward)
|
|
4318
|
+
return moveFoward(endIndex, startIndex, listItem);
|
|
4319
|
+
return moveBackward(startIndex, endIndex, listItem);
|
|
4320
|
+
}
|
|
4321
|
+
function moveBackward(startIndex, endIndex, listItem) {
|
|
4322
|
+
if (startIndex === 0)
|
|
4323
|
+
return listItem;
|
|
4324
|
+
const beforeRange = listItem.slice(0, startIndex - 1);
|
|
4325
|
+
const range = listItem.slice(startIndex, endIndex + 1);
|
|
4326
|
+
const afterRange = listItem.slice(endIndex + 1);
|
|
4327
|
+
const movedItem = listItem[startIndex - 1];
|
|
4328
|
+
return [...beforeRange, ...range, movedItem, ...afterRange];
|
|
4329
|
+
}
|
|
4330
|
+
function moveFoward(endIndex, startIndex, listItem) {
|
|
4331
|
+
if (endIndex === listItem.length - 1)
|
|
4332
|
+
return listItem;
|
|
4333
|
+
const beforeRange = listItem.slice(0, startIndex);
|
|
4334
|
+
const range = listItem.slice(startIndex, endIndex + 1);
|
|
4335
|
+
const afterRange = listItem.slice(endIndex + 1);
|
|
4336
|
+
const movedItem = afterRange.shift();
|
|
4337
|
+
return movedItem
|
|
4338
|
+
? [...beforeRange, movedItem, ...range, ...afterRange]
|
|
4339
|
+
: listItem;
|
|
4340
|
+
}
|
|
4341
|
+
function transferAll({ from, to, selectedFrom, selectedTo }) {
|
|
4342
|
+
to = [...to.map(i => setItemSelection(i, false)), ...from.map(i => setItemSelection(i, true))];
|
|
4343
|
+
selectedFrom = [];
|
|
4344
|
+
selectedTo = [...from.map(({ id }) => id)];
|
|
4345
|
+
from = [];
|
|
4346
|
+
return { from, to, selectedFrom, selectedTo };
|
|
4347
|
+
}
|
|
4348
|
+
function transferItems({ from, to, selectedFrom, selectedTo }) {
|
|
4349
|
+
if (!from.length)
|
|
4350
|
+
return { from, to, selectedFrom, selectedTo };
|
|
4351
|
+
const itemsToTransfer = getItemsToTransfer(to, selectedFrom, from);
|
|
4352
|
+
if (!itemsToTransfer.length)
|
|
4353
|
+
return { from, to, selectedFrom, selectedTo };
|
|
4354
|
+
to = [
|
|
4355
|
+
...to.map(i => setItemSelection(i, false)),
|
|
4356
|
+
...itemsToTransfer.map(i => setItemSelection(i, true))
|
|
4357
|
+
];
|
|
4358
|
+
const selectedFromIds = selectedFrom.map(id => id);
|
|
4359
|
+
from = [...from.filter(item => !selectedFromIds.includes(item.id))];
|
|
4360
|
+
selectedTo = [...selectedFrom];
|
|
4361
|
+
selectedFrom = [];
|
|
4362
|
+
return { from, to, selectedFrom, selectedTo };
|
|
4363
|
+
}
|
|
4364
|
+
function getItemsToTransfer(to, selectedFrom, from) {
|
|
4365
|
+
const toListIds = to.map(item => item.id);
|
|
4366
|
+
//Não deve transferir um item que já existe na lista destino
|
|
4367
|
+
const itemsToTransferId = selectedFrom.filter((id) => !toListIds.includes(id));
|
|
4368
|
+
return from.filter(({ id }) => itemsToTransferId.includes(id));
|
|
4369
|
+
}
|
|
4370
|
+
function setItemSelection(item, select) {
|
|
4371
|
+
return Object.assign(Object.assign({}, item), { selected: select });
|
|
4372
|
+
}
|
|
4373
|
+
|
|
4374
|
+
/**
|
|
4375
|
+
* O dragElement é posicionado ANTERIORMENTE ao targetIndex.
|
|
4376
|
+
* Ex: no array: ["A", "B", "C", "D", "E"]
|
|
4377
|
+
* se o dragItem for "B" e o targetIndex 3 (referente à "D"),
|
|
4378
|
+
* "B" será posicionado logo antes de "D".
|
|
4379
|
+
* O resultado será: ["A", "C", "B", "D", "E"]
|
|
4380
|
+
*
|
|
4381
|
+
* @param configs
|
|
4382
|
+
*/
|
|
4383
|
+
function processListOnDrop(configs) {
|
|
4384
|
+
let newList;
|
|
4385
|
+
if (hasToMoveMultipleItems(configs)) {
|
|
4386
|
+
newList = processMoveMultipleItems(configs);
|
|
4387
|
+
}
|
|
4388
|
+
else {
|
|
4389
|
+
newList = processMoveSingleItem(configs);
|
|
4390
|
+
configs.clearSelection();
|
|
4391
|
+
}
|
|
4392
|
+
return newList;
|
|
4393
|
+
}
|
|
4394
|
+
function hasToMoveMultipleItems(configs) {
|
|
4395
|
+
const { enableMultipleSelection, listItems, dragItem, moveToFinal, targetIndex } = configs;
|
|
4396
|
+
if (!enableMultipleSelection)
|
|
4397
|
+
return false;
|
|
4398
|
+
const selectedItemsIndexes = getSelectedIndices(listItems);
|
|
4399
|
+
if (selectedItemsIndexes.length <= 1)
|
|
4400
|
+
return false;
|
|
4401
|
+
if (!selectedItemsIndexes.includes(dragItem.index))
|
|
4402
|
+
return false;
|
|
4403
|
+
if (!isContinuousSequence(selectedItemsIndexes))
|
|
4404
|
+
return false;
|
|
4405
|
+
if (moveToFinal)
|
|
4406
|
+
return true;
|
|
4407
|
+
return !selectedItemsIndexes.includes(targetIndex);
|
|
4408
|
+
}
|
|
4409
|
+
function processMoveSingleItem(configs) {
|
|
4410
|
+
const { listItems, dragItem, targetIndex, moveToFinal } = configs;
|
|
4411
|
+
const newList = [...listItems];
|
|
4412
|
+
newList.splice(dragItem.index, 1);
|
|
4413
|
+
if (moveToFinal) {
|
|
4414
|
+
newList.push(dragItem.item);
|
|
4415
|
+
}
|
|
4416
|
+
else {
|
|
4417
|
+
const adjustedIndex = (targetIndex > dragItem.index) ? Math.max(0, targetIndex - 1) : targetIndex;
|
|
4418
|
+
newList.splice(adjustedIndex, 0, dragItem.item);
|
|
4419
|
+
}
|
|
4420
|
+
return newList;
|
|
4421
|
+
}
|
|
4422
|
+
function processMoveMultipleItems(configs) {
|
|
4423
|
+
const { listItems, moveToFinal, targetIndex } = configs;
|
|
4424
|
+
const selectedItems = listItems.filter(item => item.selected);
|
|
4425
|
+
const selectedItemsIndexes = getSelectedIndices(listItems);
|
|
4426
|
+
const minorIndex = Math.min(...selectedItemsIndexes);
|
|
4427
|
+
const majorIndex = Math.max(...selectedItemsIndexes);
|
|
4428
|
+
const qtdToMove = selectedItems.length;
|
|
4429
|
+
const newList = [...listItems];
|
|
4430
|
+
newList.splice(minorIndex, qtdToMove);
|
|
4431
|
+
if (moveToFinal) {
|
|
4432
|
+
newList.push(...selectedItems);
|
|
4433
|
+
}
|
|
4434
|
+
else {
|
|
4435
|
+
let adjustedIndex = (targetIndex > majorIndex) ? Math.max(0, targetIndex - qtdToMove) : targetIndex;
|
|
4436
|
+
newList.splice(adjustedIndex, 0, ...selectedItems);
|
|
4437
|
+
}
|
|
4438
|
+
return newList;
|
|
4439
|
+
}
|
|
4440
|
+
function isContinuousSequence(numbers) {
|
|
4441
|
+
if (numbers.length === 0)
|
|
4442
|
+
return false;
|
|
4443
|
+
const sortedNumbers = [...numbers].sort((a, b) => a - b);
|
|
4444
|
+
for (let i = 1; i < sortedNumbers.length; i++) {
|
|
4445
|
+
if (sortedNumbers[i] !== sortedNumbers[i - 1] + 1) {
|
|
4446
|
+
return false;
|
|
4447
|
+
}
|
|
4448
|
+
}
|
|
4449
|
+
return true;
|
|
4450
|
+
}
|
|
4451
|
+
function getSelectedIndices(listItems) {
|
|
4452
|
+
return listItems.reduce((indices, item, index) => {
|
|
4453
|
+
if (item.selected) {
|
|
4454
|
+
indices.push(index);
|
|
4455
|
+
}
|
|
4456
|
+
return indices;
|
|
4457
|
+
}, []);
|
|
4458
|
+
}
|
|
4459
|
+
|
|
4460
|
+
var EzScrollDirection;
|
|
4461
|
+
(function (EzScrollDirection) {
|
|
4462
|
+
EzScrollDirection["HORIZONTAL"] = "horizontal";
|
|
4463
|
+
EzScrollDirection["VERTICAL"] = "vertical";
|
|
4464
|
+
EzScrollDirection["BOTH"] = "both";
|
|
4465
|
+
})(EzScrollDirection || (EzScrollDirection = {}));
|
|
4466
|
+
|
|
4467
|
+
const ezDoubleListCss = ".sc-ez-double-list-h{display:flex;flex-direction:row;gap:8px;align-items:center;font-family:var(--font-pattern, \"Roboto\")}.group.sc-ez-double-list{display:flex;justify-content:space-between;gap:10px;flex-direction:column;border:var(--border--small) var(--color--strokes);border-radius:var(--border--radius-medium);width:350px;height:400px}.group__header.sc-ez-double-list{background:var(--background--body);padding:10px;border-radius:var(--border--radius-medium) var(--border--radius-medium) 0 0}.group__label.sc-ez-double-list{font-weight:var(--text-weight--large);font-size:var(--text--medium);color:var(--title--primary);margin-bottom:10px;display:block}.group__totalizer.sc-ez-double-list{padding:5px 10px;background:var(--background--body);font-weight:var(--text-weight--medium);font-size:var(--text--medium);color:var(--text--secondary);border-radius:0 0 var(--border--radius-medium) var(--border--radius-medium)}.empty-message.sc-ez-double-list{font-weight:var(--text-weight--medium);font-size:var(--text--medium);color:var(--text--secondary);text-align:center;margin:auto}.list__container.sc-ez-double-list{height:100%;min-height:150px;overflow:auto;display:flex}.actions__column.sc-ez-double-list{display:flex;flex-direction:column;gap:4px}";
|
|
4468
|
+
|
|
4469
|
+
const EzDoubleList$1 = class extends HTMLElement$1 {
|
|
4470
|
+
constructor() {
|
|
4471
|
+
super();
|
|
4472
|
+
this.__registerHost();
|
|
4473
|
+
this.ezLeftListChanged = createEvent(this, "ezLeftListChanged", 7);
|
|
4474
|
+
this.ezRightListChanged = createEvent(this, "ezRightListChanged", 7);
|
|
4475
|
+
this.LEFT_LIST_ID = 'LEFT-LIST-ID';
|
|
4476
|
+
this.RIGHT_LIST_ID = 'RIGHT-LIST-ID';
|
|
4477
|
+
this.LEFT_FILTER_ID = 'LEFT-FILTER-ID';
|
|
4478
|
+
this.RIGHT_FILTER_ID = 'RIGHT-FILTER-ID';
|
|
4479
|
+
this.leftList = [];
|
|
4480
|
+
this.leftTitle = undefined;
|
|
4481
|
+
this.rightList = [];
|
|
4482
|
+
this.entityLabel = 'item';
|
|
4483
|
+
this.entityLabelPlural = 'itens';
|
|
4484
|
+
this.leftListLabel = 'disponíveis';
|
|
4485
|
+
this.rightListLabel = 'selecionados';
|
|
4486
|
+
this.rightTitle = undefined;
|
|
4487
|
+
this.leftFilteredList = [];
|
|
4488
|
+
this.rightFilteredList = [];
|
|
4489
|
+
this.selectedLeftList = [];
|
|
4490
|
+
this.selectedRightList = [];
|
|
4491
|
+
this.isFilteringLeft = false;
|
|
4492
|
+
this.isFilteringRight = false;
|
|
4493
|
+
}
|
|
4494
|
+
observeLeftList(newValue, oldValue) {
|
|
4495
|
+
if (ObjectUtils$1.equals(newValue, oldValue))
|
|
4496
|
+
return;
|
|
4497
|
+
this.ezLeftListChanged.emit(newValue);
|
|
4498
|
+
}
|
|
4499
|
+
observeRightList(newValue, oldValue) {
|
|
4500
|
+
if (ObjectUtils$1.equals(newValue, oldValue))
|
|
4501
|
+
return;
|
|
4502
|
+
this.ezRightListChanged.emit(newValue);
|
|
4503
|
+
}
|
|
4504
|
+
handleFilterChangeLeft(value) {
|
|
4505
|
+
this.leftFilteredList = ArrayUtils$1.applyStringFilter(value, this.leftList, true, 'label');
|
|
4506
|
+
this.isFilteringLeft = this.leftFilteredList.length !== this.leftList.length;
|
|
4507
|
+
}
|
|
4508
|
+
handleFilterChangeRight(value) {
|
|
4509
|
+
this.rightFilteredList = ArrayUtils$1.applyStringFilter(value, this.rightList, true, 'label');
|
|
4510
|
+
this.isFilteringRight = this.rightFilteredList.length !== this.rightList.length;
|
|
4511
|
+
}
|
|
4512
|
+
async handleChangeLeft({ detail }) {
|
|
4513
|
+
this.leftList = [...detail];
|
|
4514
|
+
this.selectedLeftList = [...detail.filter(item => item.selected)];
|
|
4515
|
+
await this.leftEzListInstance.clearHistory();
|
|
4516
|
+
}
|
|
4517
|
+
async handleChangeRight({ detail }) {
|
|
4518
|
+
this.rightList = [...detail];
|
|
4519
|
+
this.selectedRightList = [...detail.filter(item => item.selected)];
|
|
4520
|
+
await this.rightEzListInstance.clearHistory();
|
|
4521
|
+
}
|
|
4522
|
+
enableTransferAllToRight() {
|
|
4523
|
+
return this.leftList.length > 0;
|
|
4524
|
+
}
|
|
4525
|
+
enableTransferAllToLeft() {
|
|
4526
|
+
return this.rightList.length > 0;
|
|
4527
|
+
}
|
|
4528
|
+
enableTransferToRight() {
|
|
4529
|
+
return this.selectedLeftList.length > 0;
|
|
4530
|
+
}
|
|
4531
|
+
enableTransferToLeft() {
|
|
4532
|
+
return this.selectedRightList.length > 0;
|
|
4533
|
+
}
|
|
4534
|
+
enableMoveUp(moveAll) {
|
|
4535
|
+
if (this.isFilteringRight)
|
|
4536
|
+
return false;
|
|
4537
|
+
const selectedIndexes = this.getRightSelectedItemsIndex();
|
|
4538
|
+
return this.selectedRightList.length > 0
|
|
4539
|
+
&& !selectedIndexes.includes(0)
|
|
4540
|
+
&& (moveAll ? true : isContinuousSequence(selectedIndexes));
|
|
4541
|
+
}
|
|
4542
|
+
enableMoveDown(moveAll) {
|
|
4543
|
+
if (this.isFilteringRight)
|
|
4544
|
+
return false;
|
|
4545
|
+
const selectedIndexes = this.getRightSelectedItemsIndex();
|
|
4546
|
+
const lastIndex = this.rightList.length - 1;
|
|
4547
|
+
return this.selectedRightList.length > 0
|
|
4548
|
+
&& !selectedIndexes.includes(lastIndex)
|
|
4549
|
+
&& (moveAll ? true : isContinuousSequence(selectedIndexes));
|
|
4550
|
+
}
|
|
4551
|
+
getRightSelectedItemsIndex() {
|
|
4552
|
+
return this.selectedRightList.map(id => this.rightList.findIndex(original => original.id === id));
|
|
4553
|
+
}
|
|
4554
|
+
transferToRight() {
|
|
4555
|
+
const { from, to, selectedFrom, selectedTo } = transferItems(this.buildTransferToRightConfig());
|
|
4556
|
+
this.leftList = [...from];
|
|
4557
|
+
this.rightList = [...to];
|
|
4558
|
+
this.selectedLeftList = [...selectedFrom];
|
|
4559
|
+
this.selectedRightList = [...selectedTo];
|
|
4560
|
+
}
|
|
4561
|
+
transferToLeft() {
|
|
4562
|
+
const { from, to, selectedFrom, selectedTo } = transferItems(this.buildTransferToLeftConfig());
|
|
4563
|
+
this.rightList = [...from];
|
|
4564
|
+
this.leftList = [...to];
|
|
4565
|
+
this.selectedRightList = [...selectedFrom];
|
|
4566
|
+
this.selectedLeftList = [...selectedTo];
|
|
4567
|
+
}
|
|
4568
|
+
handleTransferAllToRight() {
|
|
4569
|
+
const { from, to, selectedFrom, selectedTo } = transferAll(this.buildTransferToRightConfig());
|
|
4570
|
+
this.leftList = [...from];
|
|
4571
|
+
this.rightList = [...to];
|
|
4572
|
+
this.selectedLeftList = [...selectedFrom];
|
|
4573
|
+
this.selectedRightList = [...selectedTo];
|
|
4574
|
+
}
|
|
4575
|
+
handleTransferAllToLeft() {
|
|
4576
|
+
const { from, to, selectedFrom, selectedTo } = transferAll(this.buildTransferToLeftConfig());
|
|
4577
|
+
this.rightList = [...from];
|
|
4578
|
+
this.leftList = [...to];
|
|
4579
|
+
this.selectedRightList = [...selectedFrom];
|
|
4580
|
+
this.selectedLeftList = [...selectedTo];
|
|
4581
|
+
}
|
|
4582
|
+
buildTransferToRightConfig() {
|
|
4583
|
+
return {
|
|
4584
|
+
from: this.leftList,
|
|
4585
|
+
to: this.rightList,
|
|
4586
|
+
selectedFrom: this.selectedLeftList,
|
|
4587
|
+
selectedTo: this.selectedRightList,
|
|
4588
|
+
};
|
|
4589
|
+
}
|
|
4590
|
+
buildTransferToLeftConfig() {
|
|
4591
|
+
return {
|
|
4592
|
+
from: this.rightList,
|
|
4593
|
+
to: this.leftList,
|
|
4594
|
+
selectedFrom: this.selectedRightList,
|
|
4595
|
+
selectedTo: this.selectedLeftList,
|
|
4596
|
+
};
|
|
4597
|
+
}
|
|
4598
|
+
handleMoveUp() {
|
|
4599
|
+
this.rightList = [...moveItems(this.selectedRightList, this.rightList, false)];
|
|
4600
|
+
}
|
|
4601
|
+
handleMoveDown() {
|
|
4602
|
+
this.rightList = [...moveItems(this.selectedRightList, this.rightList, true)];
|
|
4603
|
+
}
|
|
4604
|
+
handleMoveToTop() {
|
|
4605
|
+
const { itemsToKeep, itemsToMove } = this.getItemsToKeepAndToMove();
|
|
4606
|
+
this.rightList = [...itemsToMove, ...itemsToKeep];
|
|
4607
|
+
}
|
|
4608
|
+
handleMoveToBottom() {
|
|
4609
|
+
const { itemsToKeep, itemsToMove } = this.getItemsToKeepAndToMove();
|
|
4610
|
+
this.rightList = [...itemsToKeep, ...itemsToMove];
|
|
4611
|
+
}
|
|
4612
|
+
handleSelectLeftItem({ detail }) {
|
|
4613
|
+
const selectedItems = Array.isArray(detail) ? detail : [detail];
|
|
4614
|
+
this.selectedLeftList = [...selectedItems.map(({ id }) => id)];
|
|
4615
|
+
}
|
|
4616
|
+
handleSelectRightItem({ detail }) {
|
|
4617
|
+
const selectedItems = Array.isArray(detail) ? detail : [detail];
|
|
4618
|
+
this.selectedRightList = [...selectedItems.map(({ id }) => id)];
|
|
4619
|
+
}
|
|
4620
|
+
getItemsToKeepAndToMove() {
|
|
4621
|
+
const itemsToKeep = this.rightList.filter(item => !this.selectedRightList.includes(item.id));
|
|
4622
|
+
const itemsToMove = this.rightList.filter(item => this.selectedRightList.includes(item.id));
|
|
4623
|
+
return { itemsToKeep, itemsToMove };
|
|
4624
|
+
}
|
|
4625
|
+
handleTransferToRight() {
|
|
4626
|
+
this.transferToRight();
|
|
4627
|
+
this.leftFilteredList = [];
|
|
4628
|
+
this.leftEzFilterInput.value = '';
|
|
4629
|
+
}
|
|
4630
|
+
handleTransferToLeft() {
|
|
4631
|
+
this.transferToLeft();
|
|
4632
|
+
this.rightFilteredList = [];
|
|
4633
|
+
this.rightEzFilterInput.value = '';
|
|
4634
|
+
}
|
|
4635
|
+
buildTotalizer(list) {
|
|
4636
|
+
return `Total de ${list.length} ${list.length === 1 ? this.entityLabel : this.entityLabelPlural}`;
|
|
4637
|
+
}
|
|
4638
|
+
renderLeftList() {
|
|
4639
|
+
if (!this.leftList.length) {
|
|
4640
|
+
return h("span", { class: 'empty-message' }, "Nenhum ", this.entityLabel, " dispon\u00EDvel");
|
|
4641
|
+
}
|
|
4642
|
+
return (h("ez-scroller", { direction: EzScrollDirection.VERTICAL, activeShadow: true }, h("ez-list", { ref: (ref) => this.leftEzListInstance = ref, id: this.LEFT_LIST_ID, hoverFeedback: true, dataSource: this.isFilteringLeft ? this.leftFilteredList : this.leftList, ezDraggable: !this.isFilteringLeft, enableMultipleSelection: true, onEzChange: this.handleChangeLeft.bind(this), ezSelectable: true, onEzSelectItem: this.handleSelectLeftItem.bind(this), onEzDoubleClick: this.handleTransferToRight.bind(this) })));
|
|
4643
|
+
}
|
|
4644
|
+
renderRightList() {
|
|
4645
|
+
if (!this.rightList.length) {
|
|
4646
|
+
return h("span", { class: 'empty-message' }, "Nenhum ", this.entityLabel, " selecionado");
|
|
4647
|
+
}
|
|
4648
|
+
return (h("ez-scroller", { direction: EzScrollDirection.VERTICAL, activeShadow: true }, h("ez-list", { ref: (ref) => this.rightEzListInstance = ref, id: this.RIGHT_LIST_ID, hoverFeedback: true, dataSource: this.isFilteringRight ? this.rightFilteredList : this.rightList, ezDraggable: !this.isFilteringRight, enableMultipleSelection: true, onEzChange: this.handleChangeRight.bind(this), ezSelectable: true, onEzSelectItem: this.handleSelectRightItem.bind(this), onEzDoubleClick: this.handleTransferToLeft.bind(this) })));
|
|
4649
|
+
}
|
|
4650
|
+
render() {
|
|
4651
|
+
return (h(Host, null, h("div", { class: 'group' }, h("div", { class: 'group__header' }, h("span", { class: 'group__label' }, this.leftTitle), h("ez-filter-input", { ref: (ref) => this.leftEzFilterInput = ref, id: this.LEFT_FILTER_ID, label: `Buscar ${this.entityLabel}`, mode: 'slim', onEzChange: evt => this.handleFilterChangeLeft(evt.detail) })), h("div", { class: 'list__container' }, this.renderLeftList()), h("div", { class: 'group__totalizer' }, this.buildTotalizer(this.leftList))), h("div", { class: 'actions__column' }, h("ez-button", { mode: 'icon', iconName: 'dual-chevron-right', enabled: this.enableTransferAllToRight(), title: `Mover todos para ${this.leftListLabel}`, size: 'small', onClick: this.handleTransferAllToRight.bind(this) }), h("ez-button", { mode: 'icon', iconName: 'chevron-right', enabled: this.enableTransferToRight(), title: `Mover para ${this.leftListLabel}`, size: 'small', onClick: this.handleTransferToRight.bind(this) }), h("ez-button", { mode: 'icon', iconName: 'chevron-left', enabled: this.enableTransferToLeft(), title: `Mover para ${this.rightListLabel}`, size: 'small', onClick: this.handleTransferToLeft.bind(this) }), h("ez-button", { mode: 'icon', iconName: 'dual-chevron-left', enabled: this.enableTransferAllToLeft(), title: `Mover todos para ${this.rightListLabel}`, size: 'small', onClick: this.handleTransferAllToLeft.bind(this) })), h("div", { class: 'group' }, h("div", { class: 'group__header' }, h("span", { class: 'group__label' }, this.rightTitle), h("ez-filter-input", { ref: (ref) => this.rightEzFilterInput = ref, id: this.RIGHT_FILTER_ID, label: `Buscar ${this.entityLabel}`, mode: 'slim', onEzChange: evt => this.handleFilterChangeRight(evt.detail) })), h("div", { class: 'list__container' }, this.renderRightList()), h("div", { class: 'group__totalizer' }, this.buildTotalizer(this.rightList))), h("div", { class: 'actions__column' }, h("ez-button", { mode: 'icon', iconName: 'dual-chevron-up', enabled: this.enableMoveUp(true), title: 'Mover para primeira posi\u00E7\u00E3o', size: 'small', onClick: this.handleMoveToTop.bind(this) }), h("ez-button", { mode: 'icon', iconName: 'chevron-up', enabled: this.enableMoveUp(), title: 'Mover para cima', size: 'small', onClick: this.handleMoveUp.bind(this) }), h("ez-button", { mode: 'icon', iconName: 'chevron-down', enabled: this.enableMoveDown(), title: 'Mover para baixo', size: 'small', onClick: this.handleMoveDown.bind(this) }), h("ez-button", { mode: 'icon', iconName: 'dual-chevron-down', enabled: this.enableMoveDown(true), title: 'Mover para \u00FAltima posi\u00E7\u00E3o', size: 'small', onClick: this.handleMoveToBottom.bind(this) }))));
|
|
4652
|
+
}
|
|
4653
|
+
static get watchers() { return {
|
|
4654
|
+
"leftList": ["observeLeftList"],
|
|
4655
|
+
"rightList": ["observeRightList"]
|
|
4656
|
+
}; }
|
|
4657
|
+
static get style() { return ezDoubleListCss; }
|
|
4658
|
+
};
|
|
4659
|
+
|
|
4291
4660
|
const DropdownItem = ({ item, hasIcon, hasChildren, isLockedLevels, onSubActionClick }) => {
|
|
4292
4661
|
return (h("div", { class: "ez-dropdown__item-wrapper", title: item.label },
|
|
4293
4662
|
getContentLeft(item, hasIcon),
|
|
@@ -71778,7 +72147,7 @@ class InMemoryFilterColumnDataSource {
|
|
|
71778
72147
|
}
|
|
71779
72148
|
}
|
|
71780
72149
|
|
|
71781
|
-
const ezGridCss = ".sc-ez-grid-h{display:grid;grid-template-rows:auto 1fr auto;height:100%;width:100%;--ez-grid__header--background-color:var(--background--xlight, #FFF);--ez-grid__selection-counter--z-index:var(--visible, 1);--ez-grid__container--shadow:
|
|
72150
|
+
const ezGridCss = ".sc-ez-grid-h{display:grid;grid-template-rows:auto 1fr auto;height:100%;width:100%;--ez-grid__header--background-color:var(--background--xlight, #FFF);--ez-grid__selection-counter--z-index:var(--visible, 1);--ez-grid__container--shadow:var(--shadow);--ez-grid--min-height:300px;--ez-grid__container--shadow--outline:var(--shadow--outline) var(--color--strokes);--ez-grid__header--shadow:var(--shadow--xsmall);--ez-grid__header--shadow--outline:var(--shadow--outline) var(--color--strokes);--ez-grid__header--outline:none;--ez-grid__header--border:none;min-height:var(--ez-grid--min-height)}.grid-header.sc-ez-grid{display:grid;justify-content:space-between;align-items:center;grid-row-start:1;grid-template-columns:1fr;background-color:var(--ez-grid__header--background-color, #FFF)}.grid-header.shadow-mode.sc-ez-grid{box-shadow:var(--ez-grid__header--shadow);border:var(--ez-grid__header--border);outline:var(--ez-grid__header--outline)}.grid-header.outline-mode.sc-ez-grid{box-shadow:var(--ez-grid__header--shadow--outline);border:var(--ez-grid__header--border);outline:var(--ez-grid__header--outline)}.grid__container.sc-ez-grid{padding-top:15px;margin-top:-12px;outline:none;box-shadow:var(--ez-grid__container--shadow);background-color:var(--ez-grid__header--background-color)}.grid__container.outline-mode.sc-ez-grid{box-shadow:var(--ez-grid__container--shadow--outline);border:none;outline:none}.grid-header__popover.sc-ez-grid{position:relative;top:var(--space--sm, 16px)}.grid-header__container.sc-ez-grid{display:flex;align-items:center}.grid-header__position.sc-ez-grid{display:flex;align-items:center;justify-content:space-between}.grid__selection-counter.sc-ez-grid{position:fixed;white-space:nowrap;transform:translate(-50%, 0px);left:50%;opacity:0;bottom:-100%;transition:opacity 0.1s, bottom 0.5s}.grid__selection-counter--opened.sc-ez-grid{opacity:1;bottom:0px}.grid__btn-close.sc-ez-grid{display:flex;align-items:center;justify-content:center;padding:0;outline:none;width:20px;height:20px;border:none;background-color:unset;cursor:pointer}.grid__btn-clear.sc-ez-grid{--ez-button--link-color:var(--color--alert-warning-900, #8C6B00);--ez-button--link--hover-color:var(--color--alert-warning-900, #8C6B00)}[no-header].sc-ez-grid-h .grid-header.sc-ez-grid{height:0;padding:0}.grid-header__pagination.sc-ez-grid{justify-content:flex-end;flex-wrap:nowrap}.grid-header__pagination-label.sc-ez-grid{width:100%;white-space:nowrap}.overflowed.sc-ez-grid{display:none}.pagination-contracted.sc-ez-grid{width:100px}.pagination-expanded.sc-ez-grid{min-width:150px}.left__header-contracted.sc-ez-grid{width:calc(100% - 100px)}.left__header-expanded.sc-ez-grid{flex-grow:1}";
|
|
71782
72151
|
|
|
71783
72152
|
const windowInstace$1 = window;
|
|
71784
72153
|
const matches = (text, filter) => {
|
|
@@ -71822,7 +72191,7 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
71822
72191
|
this.enableGridInsert = false;
|
|
71823
72192
|
this.enableContinuousInsert = true;
|
|
71824
72193
|
this.enableLockManger = true;
|
|
71825
|
-
this.
|
|
72194
|
+
this.outlineMode = false;
|
|
71826
72195
|
}
|
|
71827
72196
|
/**
|
|
71828
72197
|
* Aplica a definição de colunas.
|
|
@@ -72299,7 +72668,7 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
72299
72668
|
}
|
|
72300
72669
|
render() {
|
|
72301
72670
|
var _a;
|
|
72302
|
-
return (h(Host, { "no-header": this.hideHeader() }, h("div", { class: `grid__container ${this.
|
|
72671
|
+
return (h(Host, { "no-header": this.hideHeader() }, h("div", { class: `grid__container ${this.outlineMode ? 'outline-mode' : 'shadow-mode'} ez-grid`, ref: elem => (this._container = elem) }), h("div", { class: `ez-box ${this.outlineMode ? 'outline-mode' : 'shadow-mode'} ez-padding--small grid-header` }, h("filter-column", { class: "grid-header__popover", noHeaderTaskBar: !this._hasLeftButtons, dataSource: this.getDataSource(), dataUnit: this.dataUnit, gridHeaderHidden: this.hideHeader(), ref: (element) => (this._filterColumn = element) }), h("div", { class: "grid-header__position" }, h("div", { class: `grid-header__container grid-header__left-container ${this.resolveLeftHeaderClass()}` }, h("slot", { name: "leftButtons" })), this.getPaginationControl())), h("div", { ref: (ref) => (this._gridSelectionCounter = ref), class: `grid__selection-counter ez-elevation--4
|
|
72303
72672
|
${this._showSelectionCounter ? 'grid__selection-counter--opened' : ''}
|
|
72304
72673
|
` }, h(SelectionCounter, { selectionCount: this._selectionCount, currentPageSelected: this._currentPageSelected, paginationInfo: this._paginationInfo, canSelectAll: (_a = this.selectionToastConfig) === null || _a === void 0 ? void 0 : _a.canSelectAll, allRecordSelected: this._isAllSelection, onSelectAll: () => this.onSelectAllRecords(), onSelectPage: () => this.onSelectPageRecords(), onClearAll: () => this.onClearSelectedRecords(), onClose: () => (this._showSelectionCounter = false) })), h("div", { class: "grid__footer" }, h("slot", { name: "footer" }))));
|
|
72305
72674
|
}
|
|
@@ -72313,13 +72682,6 @@ const EzGrid$1 = class extends HTMLElement$1 {
|
|
|
72313
72682
|
static get style() { return ezGridCss; }
|
|
72314
72683
|
};
|
|
72315
72684
|
|
|
72316
|
-
var EzScrollDirection;
|
|
72317
|
-
(function (EzScrollDirection) {
|
|
72318
|
-
EzScrollDirection["HORIZONTAL"] = "horizontal";
|
|
72319
|
-
EzScrollDirection["VERTICAL"] = "vertical";
|
|
72320
|
-
EzScrollDirection["BOTH"] = "both";
|
|
72321
|
-
})(EzScrollDirection || (EzScrollDirection = {}));
|
|
72322
|
-
|
|
72323
72685
|
const ezGuideNavigatorCss = ":host{--ez-guide-navigator--padding-left:var(--space--large);--ez-guide-navigator--padding-right:var(--space--small);--ez-guide-navigator--box-shadow:var(--shadow, 0px 0px 24px 0px #000);--ez-guide-navigator--background-color:var(--color--inverted);--ez-guide-navigator--border-radius:0px var(--border--radius-medium) var(--border--radius-medium) 0px;--ez-guide-navigator--actions-gap:var(--space--medium);--ez-guide-navigator--actions-margin:var(--space--large) 0 var(--space--medium);--ez-guide-navigator--actions-padding-right:calc(var(--space--medium, 12px) + var(--space--small, 6px))}.inverted{transform:rotate(180deg)}.ez-guide-navigator{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-orient:vertical;-webkit-box-direction:normal;-ms-flex-direction:column;flex-direction:column;height:100%;padding-left:var(--ez-guide-navigator--padding-left);padding-right:var(--ez-guide-navigator--padding-right);background-color:var(--ez-guide-navigator--background-color);-webkit-box-shadow:var(--ez-guide-navigator--box-shadow);box-shadow:var(--ez-guide-navigator--box-shadow);border-radius:var(--ez-guide-navigator--border-radius)}.ez-guide-navigator__actions{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;gap:var(--ez-guide-navigator--actions-gap);margin:var(--ez-guide-navigator--actions-margin);padding-right:var(--ez-guide-navigator--actions-padding-right)}.hidden{display:none}";
|
|
72324
72686
|
|
|
72325
72687
|
const ENTER_KEY = "Enter";
|
|
@@ -72474,6 +72836,7 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
72474
72836
|
this.itemSlotBuilder = undefined;
|
|
72475
72837
|
this.itemLeftSlotBuilder = undefined;
|
|
72476
72838
|
this.hoverFeedback = false;
|
|
72839
|
+
this.enableMultipleSelection = false;
|
|
72477
72840
|
}
|
|
72478
72841
|
/**
|
|
72479
72842
|
* Limpa o histórico da lista.
|
|
@@ -72495,56 +72858,93 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
72495
72858
|
/**
|
|
72496
72859
|
* Aplica seleção nas linhas da lista.
|
|
72497
72860
|
*/
|
|
72498
|
-
async setSelection(selectedItem, scrollToOption) {
|
|
72499
|
-
if (selectedItem
|
|
72500
|
-
this.ezSelectItem.emit(selectedItem);
|
|
72501
|
-
if (this.useGroups) {
|
|
72502
|
-
let newList = [...this._listGroupItems];
|
|
72503
|
-
newList.forEach(groupItem => {
|
|
72504
|
-
groupItem.items.forEach(item => {
|
|
72505
|
-
item.selected = item.id === selectedItem.id;
|
|
72506
|
-
});
|
|
72507
|
-
});
|
|
72508
|
-
this._listGroupItems = newList;
|
|
72509
|
-
}
|
|
72510
|
-
else {
|
|
72511
|
-
let newList = [...this._listItems];
|
|
72512
|
-
newList.forEach(item => {
|
|
72513
|
-
item.selected = item.id === selectedItem.id;
|
|
72514
|
-
});
|
|
72515
|
-
this._listItems = newList;
|
|
72516
|
-
}
|
|
72517
|
-
if (scrollToOption) {
|
|
72518
|
-
let liElem = this.useGroups
|
|
72519
|
-
? this._groupContainer.querySelector('li#item_' + selectedItem.id)
|
|
72520
|
-
: this._itemContainer.querySelector('li#item_' + selectedItem.id);
|
|
72521
|
-
if (liElem) {
|
|
72522
|
-
liElem.scrollIntoView();
|
|
72523
|
-
}
|
|
72524
|
-
}
|
|
72525
|
-
}
|
|
72526
|
-
else {
|
|
72861
|
+
async setSelection(selectedItem, scrollToOption, shitkey, ctrlKey) {
|
|
72862
|
+
if (!selectedItem || !this.ezSelectable) {
|
|
72527
72863
|
await this.removeSelection();
|
|
72864
|
+
return;
|
|
72865
|
+
}
|
|
72866
|
+
if (this.useGroups) {
|
|
72867
|
+
this.setSelectionWithGroups(selectedItem, scrollToOption);
|
|
72868
|
+
return;
|
|
72869
|
+
}
|
|
72870
|
+
if (this.enableMultipleSelection && ctrlKey) {
|
|
72871
|
+
this.setSelectionMultiple(selectedItem);
|
|
72872
|
+
return;
|
|
72873
|
+
}
|
|
72874
|
+
if (this.enableMultipleSelection && shitkey) {
|
|
72875
|
+
this.setSelectionRange(selectedItem);
|
|
72876
|
+
return;
|
|
72528
72877
|
}
|
|
72878
|
+
this.setSelectionSingleItem(selectedItem, scrollToOption);
|
|
72879
|
+
this.ezSelectItem.emit(selectedItem);
|
|
72880
|
+
}
|
|
72881
|
+
setSelectionRange(selectedItem) {
|
|
72882
|
+
const lastSelectedIndex = this._listItems.findIndex(item => item.selected);
|
|
72883
|
+
const seletedItemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
|
|
72884
|
+
if (lastSelectedIndex < 0 || lastSelectedIndex === seletedItemIndex) {
|
|
72885
|
+
this.setSelectionSingleItem(selectedItem);
|
|
72886
|
+
return;
|
|
72887
|
+
}
|
|
72888
|
+
const minorIndex = Math.min(lastSelectedIndex, seletedItemIndex);
|
|
72889
|
+
const majorIndex = Math.max(lastSelectedIndex, seletedItemIndex);
|
|
72890
|
+
let newList = [...this._listItems];
|
|
72891
|
+
newList.forEach((item, index) => {
|
|
72892
|
+
item.selected = (index >= minorIndex && index <= majorIndex);
|
|
72893
|
+
});
|
|
72894
|
+
this._listItems = [...newList];
|
|
72895
|
+
this.ezSelectItem.emit(this._listItems.filter(item => item.selected));
|
|
72896
|
+
}
|
|
72897
|
+
setSelectionMultiple(selectedItem) {
|
|
72898
|
+
let newList = [...this._listItems];
|
|
72899
|
+
newList.forEach(item => {
|
|
72900
|
+
item.selected = (item.id === selectedItem.id) ? !item.selected : item.selected;
|
|
72901
|
+
});
|
|
72902
|
+
this._listItems = [...newList];
|
|
72903
|
+
this.ezSelectItem.emit(this._listItems.filter(item => item.selected));
|
|
72904
|
+
}
|
|
72905
|
+
setSelectionSingleItem(selectedItem, scrollToOption) {
|
|
72906
|
+
this.ezSelectItem.emit(selectedItem);
|
|
72907
|
+
let newList = [...this._listItems];
|
|
72908
|
+
newList.forEach(item => {
|
|
72909
|
+
item.selected = item.id === selectedItem.id;
|
|
72910
|
+
});
|
|
72911
|
+
this._listItems = newList;
|
|
72912
|
+
if (!scrollToOption)
|
|
72913
|
+
return;
|
|
72914
|
+
let liElem = this._itemContainer.querySelector('li#item_' + selectedItem.id);
|
|
72915
|
+
if (liElem)
|
|
72916
|
+
liElem.scrollIntoView();
|
|
72917
|
+
}
|
|
72918
|
+
setSelectionWithGroups(selectedItem, scrollToOption) {
|
|
72919
|
+
this.ezSelectItem.emit(selectedItem);
|
|
72920
|
+
let newList = [...this._listGroupItems];
|
|
72921
|
+
newList.forEach(groupItem => {
|
|
72922
|
+
groupItem.items.forEach(item => {
|
|
72923
|
+
item.selected = item.id === selectedItem.id;
|
|
72924
|
+
});
|
|
72925
|
+
});
|
|
72926
|
+
this._listGroupItems = newList;
|
|
72927
|
+
if (!scrollToOption)
|
|
72928
|
+
return;
|
|
72929
|
+
let liElem = this._groupContainer.querySelector('li#item_' + selectedItem.id);
|
|
72930
|
+
if (liElem)
|
|
72931
|
+
liElem.scrollIntoView();
|
|
72529
72932
|
}
|
|
72530
72933
|
/**
|
|
72531
72934
|
* Obtém o item selecionado.
|
|
72532
72935
|
*/
|
|
72533
72936
|
async getSelection() {
|
|
72937
|
+
if (!this.useGroups)
|
|
72938
|
+
return this._listItems.find(item => item.selected == true);
|
|
72534
72939
|
let selectedItem;
|
|
72535
|
-
|
|
72536
|
-
|
|
72537
|
-
|
|
72538
|
-
|
|
72539
|
-
|
|
72540
|
-
|
|
72541
|
-
|
|
72542
|
-
|
|
72543
|
-
});
|
|
72544
|
-
}
|
|
72545
|
-
else {
|
|
72546
|
-
selectedItem = this._listItems.find(item => item.selected == true);
|
|
72547
|
-
}
|
|
72940
|
+
this._listGroupItems.every(group => {
|
|
72941
|
+
let item = group.items.find(item => item.selected == true);
|
|
72942
|
+
if (item) {
|
|
72943
|
+
selectedItem = item;
|
|
72944
|
+
return false;
|
|
72945
|
+
}
|
|
72946
|
+
return true;
|
|
72947
|
+
});
|
|
72548
72948
|
return selectedItem;
|
|
72549
72949
|
}
|
|
72550
72950
|
/**
|
|
@@ -72568,14 +72968,11 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
72568
72968
|
});
|
|
72569
72969
|
});
|
|
72570
72970
|
this._listGroupItems = newList;
|
|
72971
|
+
return;
|
|
72571
72972
|
}
|
|
72572
|
-
|
|
72573
|
-
|
|
72574
|
-
|
|
72575
|
-
item.selected = false;
|
|
72576
|
-
});
|
|
72577
|
-
this._listItems = newList;
|
|
72578
|
-
}
|
|
72973
|
+
let newList = [...this._listItems];
|
|
72974
|
+
newList.forEach(item => item.selected = false);
|
|
72975
|
+
this._listItems = newList;
|
|
72579
72976
|
}
|
|
72580
72977
|
applyUUID(item) {
|
|
72581
72978
|
if (!item.id) {
|
|
@@ -72637,78 +73034,88 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
72637
73034
|
ElementIDUtils.addIDInfo(this._element);
|
|
72638
73035
|
}
|
|
72639
73036
|
onDrop(ev, dragEndItem) {
|
|
73037
|
+
ev.stopPropagation();
|
|
72640
73038
|
this.removeOverClass();
|
|
73039
|
+
if (!this._dragStartItem)
|
|
73040
|
+
return;
|
|
73041
|
+
if (this.useGroups) {
|
|
73042
|
+
this.onDropWithGroups(dragEndItem);
|
|
73043
|
+
return;
|
|
73044
|
+
}
|
|
73045
|
+
this._listItems = [...processListOnDrop(this.buildDragHandlerConfig(dragEndItem.index, false))];
|
|
73046
|
+
this._listItemsHistory = [...this._listItems];
|
|
73047
|
+
this.ezChange.emit(this._listItems);
|
|
73048
|
+
}
|
|
73049
|
+
buildDragHandlerConfig(targetIndex, moveToFinal) {
|
|
73050
|
+
return {
|
|
73051
|
+
listItems: this._listItems,
|
|
73052
|
+
dragItem: this._dragStartItem,
|
|
73053
|
+
enableMultipleSelection: this.enableMultipleSelection,
|
|
73054
|
+
targetIndex,
|
|
73055
|
+
moveToFinal,
|
|
73056
|
+
clearSelection: () => this.setSelection(undefined)
|
|
73057
|
+
};
|
|
73058
|
+
}
|
|
73059
|
+
;
|
|
73060
|
+
onDropWithGroups(dragEndItem) {
|
|
72641
73061
|
this.setSelection(undefined);
|
|
72642
|
-
|
|
72643
|
-
|
|
72644
|
-
|
|
72645
|
-
|
|
72646
|
-
|
|
72647
|
-
|
|
72648
|
-
|
|
72649
|
-
|
|
72650
|
-
|
|
72651
|
-
|
|
72652
|
-
|
|
72653
|
-
|
|
72654
|
-
|
|
72655
|
-
|
|
72656
|
-
if (groupEnd.sort === 'DSC') {
|
|
72657
|
-
newList.find(group => group.group == dragEndItem.groupName).items.reverse();
|
|
72658
|
-
}
|
|
72659
|
-
}
|
|
72660
|
-
else {
|
|
72661
|
-
let indexForAdd = dragEndItem.index > this._dragStartItem.index ? dragEndItem.index - 1 : dragEndItem.index;
|
|
72662
|
-
newList.find(group => group.group == dragEndItem.groupName).items.splice(indexForAdd, 0, this._dragStartItem.item);
|
|
72663
|
-
}
|
|
72664
|
-
this._listGroupItems = newList;
|
|
72665
|
-
this.ezChange.emit(this._listGroupItems);
|
|
72666
|
-
}
|
|
72667
|
-
else {
|
|
72668
|
-
let newList = [...this._listItems];
|
|
72669
|
-
newList.splice(this._dragStartItem.index, 1);
|
|
72670
|
-
newList.splice(dragEndItem.index, 0, this._dragStartItem.item);
|
|
72671
|
-
this._listItems = newList;
|
|
72672
|
-
this._listItemsHistory = newList;
|
|
72673
|
-
this.ezChange.emit(this._listItems);
|
|
73062
|
+
let newList = [...this._listGroupItems];
|
|
73063
|
+
let groupEnd = this._listGroupItems.find(group => dragEndItem.groupName == group.group);
|
|
73064
|
+
//Remove item arrastado
|
|
73065
|
+
newList.find(group => group.group == this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
|
|
73066
|
+
//Adiciona item arrastado
|
|
73067
|
+
if (groupEnd.sort) {
|
|
73068
|
+
newList.find(group => group.group == dragEndItem.groupName).items.push(this._dragStartItem.item);
|
|
73069
|
+
newList
|
|
73070
|
+
.find(group => group.group == dragEndItem.groupName)
|
|
73071
|
+
.items.sort(function (a, b) {
|
|
73072
|
+
return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
|
|
73073
|
+
});
|
|
73074
|
+
if (groupEnd.sort === 'DSC') {
|
|
73075
|
+
newList.find(group => group.group == dragEndItem.groupName).items.reverse();
|
|
72674
73076
|
}
|
|
72675
73077
|
}
|
|
72676
|
-
|
|
73078
|
+
else {
|
|
73079
|
+
let indexForAdd = dragEndItem.index > this._dragStartItem.index ? dragEndItem.index - 1 : dragEndItem.index;
|
|
73080
|
+
newList.find(group => group.group == dragEndItem.groupName).items.splice(indexForAdd, 0, this._dragStartItem.item);
|
|
73081
|
+
}
|
|
73082
|
+
this._listGroupItems = newList;
|
|
73083
|
+
this.ezChange.emit(this._listGroupItems);
|
|
72677
73084
|
}
|
|
72678
73085
|
onDropLastIndex(ev, groupDropped) {
|
|
73086
|
+
ev.stopPropagation();
|
|
72679
73087
|
this.removeOverClass();
|
|
73088
|
+
if (!this._dragStartItem)
|
|
73089
|
+
return;
|
|
73090
|
+
if (this.useGroups) {
|
|
73091
|
+
this.onDropLastItemWithGroups(groupDropped);
|
|
73092
|
+
return;
|
|
73093
|
+
}
|
|
73094
|
+
const lastIndex = this._listItems.length - 1;
|
|
73095
|
+
this._listItems = [...processListOnDrop(this.buildDragHandlerConfig(lastIndex, true))];
|
|
73096
|
+
this._listItemsHistory = [...this._listItems];
|
|
73097
|
+
this.ezChange.emit(this._listItems);
|
|
73098
|
+
}
|
|
73099
|
+
onDropLastItemWithGroups(groupDropped) {
|
|
72680
73100
|
this.setSelection(undefined);
|
|
72681
|
-
|
|
72682
|
-
|
|
72683
|
-
|
|
72684
|
-
|
|
72685
|
-
|
|
72686
|
-
|
|
72687
|
-
|
|
72688
|
-
|
|
72689
|
-
|
|
72690
|
-
|
|
72691
|
-
|
|
72692
|
-
|
|
72693
|
-
|
|
72694
|
-
|
|
72695
|
-
if (groupEnd.sort === 'DSC') {
|
|
72696
|
-
newList.find(group => group.group == groupDropped.group).items.reverse();
|
|
72697
|
-
}
|
|
72698
|
-
}
|
|
72699
|
-
this._listGroupItems = newList;
|
|
72700
|
-
this.ezChange.emit(this._listGroupItems);
|
|
72701
|
-
}
|
|
72702
|
-
else {
|
|
72703
|
-
let newList = [...this._listItems];
|
|
72704
|
-
newList.splice(this._dragStartItem.index, 1);
|
|
72705
|
-
newList.push(this._dragStartItem.item);
|
|
72706
|
-
this._listItems = newList;
|
|
72707
|
-
this._listItemsHistory = newList;
|
|
72708
|
-
this.ezChange.emit(this._listItems);
|
|
73101
|
+
let newList = [...this._listGroupItems];
|
|
73102
|
+
let groupEnd = this._listGroupItems.find(group => groupDropped.group == group.group);
|
|
73103
|
+
//Remove item arrastado
|
|
73104
|
+
newList.find(group => group.group == this._dragStartItem.groupName).items.splice(this._dragStartItem.index, 1);
|
|
73105
|
+
//Adiciona item arrastado
|
|
73106
|
+
newList.find(group => group.group == groupDropped.group).items.push(this._dragStartItem.item);
|
|
73107
|
+
if (groupEnd.sort) {
|
|
73108
|
+
newList
|
|
73109
|
+
.find(group => group.group == groupDropped.group)
|
|
73110
|
+
.items.sort(function (a, b) {
|
|
73111
|
+
return a.label < b.label ? -1 : a.label > b.label ? 1 : 0;
|
|
73112
|
+
});
|
|
73113
|
+
if (groupEnd.sort === 'DSC') {
|
|
73114
|
+
newList.find(group => group.group == groupDropped.group).items.reverse();
|
|
72709
73115
|
}
|
|
72710
73116
|
}
|
|
72711
|
-
|
|
73117
|
+
this._listGroupItems = newList;
|
|
73118
|
+
this.ezChange.emit(this._listGroupItems);
|
|
72712
73119
|
}
|
|
72713
73120
|
onDropGroup(groupSelected) {
|
|
72714
73121
|
var _a;
|
|
@@ -72746,19 +73153,13 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
72746
73153
|
if (this.useGroups) {
|
|
72747
73154
|
this.hideOverlays();
|
|
72748
73155
|
}
|
|
72749
|
-
if (this._draggingElement) {
|
|
72750
|
-
try {
|
|
72751
|
-
this._element.removeChild(this._draggingElement);
|
|
72752
|
-
}
|
|
72753
|
-
catch (err) { }
|
|
72754
|
-
this._draggingElement = undefined;
|
|
72755
|
-
}
|
|
72756
73156
|
}
|
|
72757
73157
|
addOverClass(element) {
|
|
72758
73158
|
if ((element === null || element === void 0 ? void 0 : element.__proto__) == HTMLDivElement.prototype && element.classList.contains('draggable')) {
|
|
72759
73159
|
element.classList.add('over');
|
|
73160
|
+
return;
|
|
72760
73161
|
}
|
|
72761
|
-
|
|
73162
|
+
if ((element === null || element === void 0 ? void 0 : element.parentElement) && !element.parentElement.classList.contains('draggable-list')) {
|
|
72762
73163
|
this.addOverClass(element.parentElement);
|
|
72763
73164
|
}
|
|
72764
73165
|
}
|
|
@@ -72814,84 +73215,94 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
72814
73215
|
window.clearTimeout(this._changeDeboucingTimeout);
|
|
72815
73216
|
}
|
|
72816
73217
|
if (this.useGroups) {
|
|
72817
|
-
this.
|
|
72818
|
-
|
|
72819
|
-
this.showOverlays(group);
|
|
72820
|
-
}, 10);
|
|
72821
|
-
}
|
|
72822
|
-
else {
|
|
72823
|
-
this._dragStartItem = { item: item.item, index: item.index };
|
|
73218
|
+
this.onDragStartWithGroups(group, item, index);
|
|
73219
|
+
return;
|
|
72824
73220
|
}
|
|
73221
|
+
this._dragStartItem = { item: item.item, index: item.index };
|
|
73222
|
+
}
|
|
73223
|
+
onDragStartWithGroups(group, item, index) {
|
|
73224
|
+
this._dragStartItem = { groupName: group.group, item: item, index: index };
|
|
73225
|
+
this._changeDeboucingTimeout = window.setTimeout(() => {
|
|
73226
|
+
this.showOverlays(group);
|
|
73227
|
+
}, 10);
|
|
72825
73228
|
}
|
|
72826
73229
|
selectFirstItem() {
|
|
72827
73230
|
if (this.useGroups) {
|
|
72828
73231
|
this.setSelection(this._listGroupItems[0].items[0]);
|
|
72829
73232
|
}
|
|
72830
|
-
{
|
|
73233
|
+
else {
|
|
72831
73234
|
this.setSelection(this._listItems[0]);
|
|
72832
73235
|
}
|
|
72833
73236
|
}
|
|
72834
73237
|
nextOption(selectedItem) {
|
|
72835
|
-
let nextItem = undefined;
|
|
72836
73238
|
if (this.useGroups) {
|
|
72837
|
-
this.
|
|
72838
|
-
|
|
72839
|
-
|
|
72840
|
-
|
|
72841
|
-
|
|
72842
|
-
|
|
72843
|
-
|
|
72844
|
-
|
|
72845
|
-
|
|
72846
|
-
|
|
72847
|
-
|
|
73239
|
+
this.setSelection(this.nextOptionWithGroups(selectedItem), true);
|
|
73240
|
+
return;
|
|
73241
|
+
}
|
|
73242
|
+
let nextItem = undefined;
|
|
73243
|
+
let itemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
|
|
73244
|
+
if (itemIndex >= 0 && itemIndex < this._listItems.length) {
|
|
73245
|
+
nextItem = this._listItems[itemIndex + 1];
|
|
73246
|
+
}
|
|
73247
|
+
this.setSelection(nextItem, true);
|
|
73248
|
+
}
|
|
73249
|
+
nextOptionWithGroups(selectedItem) {
|
|
73250
|
+
let nextItem = undefined;
|
|
73251
|
+
this._listGroupItems.every((group, groupIndex, listGroupItems) => {
|
|
73252
|
+
let item = undefined;
|
|
73253
|
+
let itemIndex = group.items.findIndex(item => item.id == selectedItem.id);
|
|
73254
|
+
if (itemIndex != undefined && itemIndex != -1) {
|
|
73255
|
+
if (itemIndex === group.items.length - 1) {
|
|
73256
|
+
if (groupIndex + 1 <= listGroupItems.length - 1) {
|
|
73257
|
+
item = { label: listGroupItems[groupIndex + 1].items[0].label };
|
|
72848
73258
|
}
|
|
72849
73259
|
}
|
|
72850
|
-
|
|
72851
|
-
|
|
72852
|
-
return false;
|
|
73260
|
+
else {
|
|
73261
|
+
item = { label: group.items[itemIndex + 1].label };
|
|
72853
73262
|
}
|
|
72854
|
-
return true;
|
|
72855
|
-
});
|
|
72856
|
-
}
|
|
72857
|
-
else {
|
|
72858
|
-
let itemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
|
|
72859
|
-
if (itemIndex >= 0 && itemIndex < this._listItems.length) {
|
|
72860
|
-
nextItem = this._listItems[itemIndex + 1];
|
|
72861
73263
|
}
|
|
72862
|
-
|
|
72863
|
-
|
|
73264
|
+
if (item != undefined) {
|
|
73265
|
+
nextItem = item;
|
|
73266
|
+
return false;
|
|
73267
|
+
}
|
|
73268
|
+
return true;
|
|
73269
|
+
});
|
|
73270
|
+
return nextItem;
|
|
72864
73271
|
}
|
|
72865
73272
|
previousOption(selectedItem) {
|
|
72866
|
-
let previousItem = undefined;
|
|
72867
73273
|
if (this.useGroups) {
|
|
72868
|
-
this.
|
|
72869
|
-
|
|
72870
|
-
|
|
72871
|
-
|
|
72872
|
-
|
|
72873
|
-
|
|
72874
|
-
|
|
72875
|
-
|
|
72876
|
-
|
|
72877
|
-
|
|
72878
|
-
|
|
73274
|
+
this.setSelection(this.previousOptionWithGroups(selectedItem), true);
|
|
73275
|
+
return;
|
|
73276
|
+
}
|
|
73277
|
+
let previousItem = undefined;
|
|
73278
|
+
let itemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
|
|
73279
|
+
if (itemIndex > 0 && itemIndex < this._listItems.length) {
|
|
73280
|
+
previousItem = this._listItems[itemIndex - 1];
|
|
73281
|
+
}
|
|
73282
|
+
this.setSelection(previousItem, true);
|
|
73283
|
+
}
|
|
73284
|
+
previousOptionWithGroups(selectedItem) {
|
|
73285
|
+
let previousItem = undefined;
|
|
73286
|
+
this._listGroupItems.every((group, groupIndex, listGroupItems) => {
|
|
73287
|
+
let item = undefined;
|
|
73288
|
+
let itemIndex = group.items.findIndex(item => item.id === selectedItem.id);
|
|
73289
|
+
if (itemIndex != undefined && itemIndex != -1) {
|
|
73290
|
+
if (itemIndex === 0) {
|
|
73291
|
+
if (groupIndex - 1 >= 0) {
|
|
73292
|
+
item = { label: listGroupItems[groupIndex - 1].items[listGroupItems[groupIndex - 1].items.length - 1].label };
|
|
72879
73293
|
}
|
|
72880
73294
|
}
|
|
72881
|
-
|
|
72882
|
-
|
|
72883
|
-
return false;
|
|
73295
|
+
else {
|
|
73296
|
+
item = { label: group.items[itemIndex - 1].label };
|
|
72884
73297
|
}
|
|
72885
|
-
return true;
|
|
72886
|
-
});
|
|
72887
|
-
}
|
|
72888
|
-
else {
|
|
72889
|
-
let itemIndex = this._listItems.findIndex(item => item.id === selectedItem.id);
|
|
72890
|
-
if (itemIndex > 0 && itemIndex < this._listItems.length) {
|
|
72891
|
-
previousItem = this._listItems[itemIndex - 1];
|
|
72892
73298
|
}
|
|
72893
|
-
|
|
72894
|
-
|
|
73299
|
+
if (item != undefined) {
|
|
73300
|
+
previousItem = item;
|
|
73301
|
+
return false;
|
|
73302
|
+
}
|
|
73303
|
+
return true;
|
|
73304
|
+
});
|
|
73305
|
+
return previousItem;
|
|
72895
73306
|
}
|
|
72896
73307
|
keyDownHandler(event) {
|
|
72897
73308
|
if (!event.ctrlKey) {
|
|
@@ -72933,11 +73344,11 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
72933
73344
|
}
|
|
72934
73345
|
}
|
|
72935
73346
|
onDragOverItem(event) {
|
|
72936
|
-
if (this._dragStartItem)
|
|
72937
|
-
|
|
72938
|
-
|
|
72939
|
-
|
|
72940
|
-
|
|
73347
|
+
if (!this._dragStartItem)
|
|
73348
|
+
return;
|
|
73349
|
+
event.preventDefault();
|
|
73350
|
+
this.addOverClass(event.target);
|
|
73351
|
+
event.stopPropagation();
|
|
72941
73352
|
}
|
|
72942
73353
|
onDragOverLastIndex(ev) {
|
|
72943
73354
|
ev.preventDefault();
|
|
@@ -72977,38 +73388,29 @@ const EzList$1 = class extends HTMLElement$1 {
|
|
|
72977
73388
|
doubleClickItem(item) {
|
|
72978
73389
|
this.ezDoubleClick.emit(item);
|
|
72979
73390
|
}
|
|
72980
|
-
|
|
72981
|
-
return
|
|
72982
|
-
|
|
72983
|
-
|
|
72984
|
-
|
|
73391
|
+
buildItem(item, evt) {
|
|
73392
|
+
return { id: item.id, label: item.label, check: evt.detail };
|
|
73393
|
+
}
|
|
73394
|
+
renderListWithGroups() {
|
|
73395
|
+
return h("div", { class: 'group-container', ref: el => (this._groupContainer = el), tabIndex: 0, onKeyDown: event => this.keyDownHandler(event) }, this._listGroupItems.map(group => {
|
|
73396
|
+
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', title: group.group }, 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) => (h("li", Object.assign({ id: 'item_' + item.id, class: {
|
|
72985
73397
|
'selectable-container': this.ezSelectable,
|
|
72986
73398
|
'hover-feedback': this.hoverFeedback,
|
|
72987
73399
|
}, key: 'item_' + item.id }, {
|
|
72988
73400
|
[ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezListItem__${StringUtils$1.replaceAccentuatedChars(item.label)}`),
|
|
72989
|
-
}), h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDblClick: () => {
|
|
72990
|
-
|
|
72991
|
-
|
|
72992
|
-
|
|
72993
|
-
|
|
72994
|
-
group.sort ? undefined : this.removeOverClass();
|
|
72995
|
-
}, onDragEnd: () => this.onDragEnd(), onDragStart: () => this.onDragStart(item, group, index), onDragOver: event => {
|
|
72996
|
-
group.sort ? undefined : this.onDragOverItem(event);
|
|
72997
|
-
}, 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, this.listMode === 'regular' ? (h(Fragment, null, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item, group), h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label))) : (h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit({ id: item.id, label: item.label, check: evt.detail }) }))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item, group, 'slot-item')))))), h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: event => {
|
|
72998
|
-
this.onDragOverLastIndex(event);
|
|
72999
|
-
}, onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event, group) })), group.sort ? (h("div", { id: this.getGroupOverlayId(group.group), class: "group-overlay" }, "Mover para ", group.group)) : undefined)));
|
|
73000
|
-
}))) : (h("div", { class: "items-container", ref: el => (this._itemContainer = el), tabIndex: 0, onKeyDown: event => {
|
|
73401
|
+
}), h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDblClick: () => this.doubleClickItem(item), 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, this.listMode === 'regular' ? (h(Fragment, null, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item, group), h("p", { title: item.label, class: 'person-name text--ellipsis' }, item.label))) : (h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit(this.buildItem(item, evt)) }))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item, group, 'slot-item')))))), 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 ? (h("div", { id: this.getGroupOverlayId(group.group), class: 'group-overlay' }, "Mover para ", group.group)) : undefined)));
|
|
73402
|
+
}));
|
|
73403
|
+
}
|
|
73404
|
+
renderList() {
|
|
73405
|
+
return h("div", { class: 'items-container', ref: el => (this._itemContainer = el), tabIndex: 0, onKeyDown: event => {
|
|
73001
73406
|
this.keyDownHandler(event);
|
|
73002
|
-
} }, h("div", { class:
|
|
73407
|
+
} }, h("div", { class: 'draggable-list' }, this._listItems.map((item, index) => (h("li", Object.assign({ id: 'item_' + item.id, class: {
|
|
73003
73408
|
'selectable-container': this.ezSelectable,
|
|
73004
73409
|
'hover-feedback': this.hoverFeedback,
|
|
73005
|
-
}, key: 'item_' + item.id }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezListItem__${StringUtils$1.replaceAccentuatedChars(item.label)}`) }), h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDragStart: () => this.onDragStart({ item: item, index: index }),
|
|
73006
|
-
|
|
73007
|
-
|
|
73008
|
-
|
|
73009
|
-
}, 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.listMode === 'regular' ? (h(Fragment, null, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item), h("p", { title: item.label, class: "person-name text--ellipsis" }, item.label))) : (h(Fragment, null, this.ezDraggable ? h("span", { class: "draggable-icon" }) : undefined, h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit({ id: item.id, label: item.label, check: evt.detail }) })))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item))))), h("div", { class: "last-droppable-space", onDragLeave: () => this.removeOverClass(), onDragOver: event => {
|
|
73010
|
-
this.onDragOverLastIndex(event);
|
|
73011
|
-
}, onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event) }))))));
|
|
73410
|
+
}, key: 'item_' + item.id }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezListItem__${StringUtils$1.replaceAccentuatedChars(item.label)}`) }), h("div", { class: 'draggable' + (item.selected == true ? ' selected-item ' : '') + (this.ezSelectable == true ? ' selectable ' : ''), onDblClick: () => this.doubleClickItem(item), onClick: (event) => this.setSelection(item, false, event.shiftKey, (event.altKey || event.metaKey)), onDragStart: () => this.onDragStart({ item: item, index: index }), onDragOver: event => this.onDragOverItem(event), onDragLeave: () => this.removeOverClass(), onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDrop(event, { item: item, index: index }), draggable: this.ezDraggable }, h("div", { class: 'item-content' }, this.listMode === 'regular' ? (h(Fragment, null, this.ezDraggable ? h("span", { class: 'draggable-icon' }) : undefined, !!this.itemLeftSlotBuilder && this.getContainerItemBuilder('left', item), h("p", { title: item.label, class: 'person-name text--ellipsis' }, item.label))) : (h(Fragment, null, this.ezDraggable ? h("span", { class: 'draggable-icon' }) : undefined, h("ez-check", { label: item.label, value: item.check, onEzChange: evt => this.ezCheckChange.emit({ id: item.id, label: item.label, check: evt.detail }) })))), !!this.itemSlotBuilder && this.getContainerItemBuilder('right', item))))), h("div", { class: 'last-droppable-space', onDragLeave: () => this.removeOverClass(), onDragOver: event => this.onDragOverLastIndex(event), onDragEnd: () => this.onDragEnd(), onDrop: event => this.onDropLastIndex(event) })));
|
|
73411
|
+
}
|
|
73412
|
+
render() {
|
|
73413
|
+
return (h(Host, { ref: el => (this._element = el) }, this.useGroups ? this.renderListWithGroups() : this.renderList()));
|
|
73012
73414
|
}
|
|
73013
73415
|
static get style() { return ezListCss; }
|
|
73014
73416
|
};
|
|
@@ -73719,7 +74121,7 @@ const EzPopover$1 = class extends HTMLElement$1 {
|
|
|
73719
74121
|
static get style() { return ezPopoverCss; }
|
|
73720
74122
|
};
|
|
73721
74123
|
|
|
73722
|
-
const ezPopupCss = ":host{display:flex;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--md, 20px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, \"Roboto\");--ez-popup__title--font-size:var(--title--large, 20px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__container--auto{height:auto}.popup__overflow-y--auto{overflow-y:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{box-sizing:border-box;width:100%;height:calc(100% - 44px)}.popup__header{width:100%;display:flex}.popup__header--padding{padding-bottom:var(--ez-popup__header--padding-bottom)}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
74124
|
+
const ezPopupCss = ":host{display:flex;width:auto;--ez-popup-z-index:var(--elevation--24, 24);--ez-popup__container--color:var(--title--primary, #2b3a54);--ez-popup__container--padding:var(--space--md, 20px);--ez-popup__header--padding-bottom:var(--space--medium, 12px);--ez-popup__title--font-family:var(--font-pattern, \"Roboto\");--ez-popup__title--font-size:var(--title--large, 20px);--ez-popup__title--color:var(--title--primary, #2b3a54);--ez-popup__title--font-weight:var(--text-weight--large, 600);--ez-popup__btn__close--icon-color:var(--title--primary, #2b3a54);--ez-popup__btn__close--icon:url('data:image/svg+xml;utf8,<svg width=\"14\" height=\"14\" viewBox=\"0 0 14 14\" xmlns=\"http://www.w3.org/2000/svg\"><path d=\"M 8.2421753,6.9944578 13.743748,1.4930784 C 13.907781,1.3290628 14,1.1065946 14,0.87462511 14,0.64266712 13.907782,0.42019873 13.743748,0.25617155 13.579712,0.09215597 13.35727,6.48e-8 13.125266,6.48e-8 12.89338,6.48e-8 12.670821,0.09215634 12.506787,0.25617155 L 7.005215,5.7575508 1.5035972,0.25617155 C 1.3395631,0.09215597 1.1170968,6.48e-8 0.88511716,6.48e-8 0.65314917,6.48e-8 0.4306712,0.09215597 0.26663695,0.25617155 0.10260271,0.42019873 0.01045441,0.64266712 0.01045441,0.87462511 c 0,0.23196949 0.0921483,0.45443769 0.25618254,0.61845329 L 5.7682546,6.9944578 0.26663695,12.497027 c -0.0834745,0.08067 -0.15003245,0.1772 -0.19581514,0.283871 C 0.02505077,12.887561 9.831648e-4,13.002399 2.950369e-5,13.118395 -9.2415746e-4,13.234504 0.02125019,13.349689 0.06527245,13.457057 c 0.04401053,0.107479 0.10898307,0.205064 0.1911168,0.287137 0.0821454,0.08208 0.17979645,0.146888 0.28727561,0.190839 0.10747906,0.04395 0.22262954,0.06598 0.33872417,0.06493 0.116095,-10e-4 0.23082547,-0.0253 0.33747687,-0.07112 0.1066637,-0.04593 0.2031133,-0.112615 0.2837313,-0.196086 L 7.005215,8.2313646 12.506787,13.732768 c 0.164034,0.164027 0.386593,0.256125 0.618479,0.256125 0.232004,0 0.454446,-0.09209 0.618482,-0.256125 C 13.907781,13.568741 14,13.346308 14,13.114315 14,12.882323 13.90779,12.659888 13.743748,12.495861 Z\"/></svg>')}.overlay{position:fixed;display:flex;top:0px;z-index:var(--ez-popup-z-index, 24);left:0px;width:100%;align-items:center;justify-content:center;box-sizing:border-box;height:100vh;backdrop-filter:blur(4px);background:rgba(0, 4, 12, 0.4)}.popup{display:flex;height:100%;align-items:center;justify-content:center;box-sizing:border-box}.popup__container{width:100%;max-height:90%;height:100%;display:flex;flex-wrap:wrap;overflow:hidden;outline:none;background:#FFFF;color:var(--ez-popup__container--color);border-radius:12px;box-shadow:0px 0px 16px rgba(0, 38, 111, 0.122);box-sizing:border-box;padding:var(--ez-popup__container--padding)}.popup__container--auto{height:auto}.popup__overflow-y--auto{overflow-y:auto}.popup__content{box-sizing:border-box;height:100%;width:100%}.popup__expandable-content{box-sizing:border-box;width:100%;height:calc(100% - 44px)}.popup__header{width:100%;display:flex}.popup__header--padding{padding-bottom:var(--ez-popup__header--padding-bottom)}.popup__title{display:flex;margin:0;width:100%;font-family:var(--ez-popup__title--font-family);font-size:var(--ez-popup__title--font-size);font-weight:var(--ez-popup__title--font-weight);color:var(--ez-popup__title--color);line-height:1.3}.btn-close{justify-content:flex-end;align-self:flex-start;align-items:flex-start;display:flex;outline:none;border:none;background-color:unset;cursor:pointer}.btn-close::after{content:'';display:flex;background-color:var(--ez-popup__btn__close--icon-color);width:14px;height:14px;-webkit-mask-image:var(--ez-popup__btn__close--icon);mask-image:var(--ez-popup__btn__close--icon)}.btn-close--solo{width:100%}.row{width:100%;display:flex;flex-wrap:wrap}.col{display:flex;flex-wrap:wrap;align-self:flex-start;box-sizing:border-box}.col--stretch{align-self:stretch}.col--undefined{width:unset}.col--nowrap{flex-wrap:nowrap}.ez-popup__size-limit--x-small{min-width:350px;max-width:560px}@media screen and (min-width: 320px){.col--sd-1{width:8.33333%}.col--sd-2{width:16.66667%}.col--sd-3{width:25%}.col--sd-4{width:33.33333%}.col--sd-5{width:41.66667%}.col--sd-6{width:50%}.col--sd-7{width:58.33333%}.col--sd-8{width:66.66667%}.col--sd-9{width:75%}.col--sd-10{width:83.33333%}.col--sd-11{width:91.66667%}.col--sd-12{width:100%}}@media screen and (min-width: 480px){.col--pn-1{width:8.33333%}.col--pn-2{width:16.66667%}.col--pn-3{width:25%}.col--pn-4{width:33.33333%}.col--pn-5{width:41.66667%}.col--pn-6{width:50%}.col--pn-7{width:58.33333%}.col--pn-8{width:66.66667%}.col--pn-9{width:75%}.col--pn-10{width:83.33333%}.col--pn-11{width:91.66667%}.col--pn-12{width:100%}}@media screen and (min-width: 768px){.col--tb-1{width:8.33333%}.col--tb-2{width:16.66667%}.col--tb-3{width:25%}.col--tb-4{width:33.33333%}.col--tb-5{width:41.66667%}.col--tb-6{width:50%}.col--tb-7{width:58.33333%}.col--tb-8{width:66.66667%}.col--tb-9{width:75%}.col--tb-10{width:83.33333%}.col--tb-11{width:91.66667%}.col--tb-12{width:100%}}@media screen and (min-width: 992px){.col--md-1{width:8.33333%}.col--md-2{width:16.66667%}.col--md-3{width:25%}.col--md-4{width:33.33333%}.col--md-5{width:41.66667%}.col--md-6{width:50%}.col--md-7{width:58.33333%}.col--md-8{width:66.66667%}.col--md-9{width:75%}.col--md-10{width:83.33333%}.col--md-11{width:91.66667%}.col--md-12{width:100%}}@media screen and (min-width: 1200px){.col--ld-1{width:8.33333%}.col--ld-2{width:16.66667%}.col--ld-3{width:25%}.col--ld-4{width:33.33333%}.col--ld-5{width:41.66667%}.col--ld-6{width:50%}.col--ld-7{width:58.33333%}.col--ld-8{width:66.66667%}.col--ld-9{width:75%}.col--ld-10{width:83.33333%}.col--ld-11{width:91.66667%}.col--ld-12{width:100%}}";
|
|
73723
74125
|
|
|
73724
74126
|
const EzPopup$1 = class extends HTMLElement$1 {
|
|
73725
74127
|
constructor() {
|
|
@@ -73735,6 +74137,7 @@ const EzPopup$1 = class extends HTMLElement$1 {
|
|
|
73735
74137
|
"large": "col--sd-9",
|
|
73736
74138
|
"x-large": "col--sd-11",
|
|
73737
74139
|
"default": "ez-popup__size-limit--x-small",
|
|
74140
|
+
"auto": "",
|
|
73738
74141
|
};
|
|
73739
74142
|
this.size = "medium";
|
|
73740
74143
|
this.opened = false;
|
|
@@ -73788,6 +74191,8 @@ const EzPopup$1 = class extends HTMLElement$1 {
|
|
|
73788
74191
|
});
|
|
73789
74192
|
}
|
|
73790
74193
|
getGridSize() {
|
|
74194
|
+
if (this.size === "auto")
|
|
74195
|
+
return "";
|
|
73791
74196
|
return this._sizeClasses[this.size] || this._sizeClasses["medium"];
|
|
73792
74197
|
}
|
|
73793
74198
|
handlePopupHeight() {
|
|
@@ -78490,15 +78895,16 @@ const EzCustomFormInput = /*@__PURE__*/proxyCustomElement(EzCustomFormInput$1, [
|
|
|
78490
78895
|
const EzDateInput = /*@__PURE__*/proxyCustomElement(EzDateInput$1, [1,"ez-date-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"mode":[513],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"],"noMargin":[4,"no-margin"]}]);
|
|
78491
78896
|
const EzDateTimeInput = /*@__PURE__*/proxyCustomElement(EzDateTimeInput$1, [1,"ez-date-time-input",{"label":[513],"value":[1040],"enabled":[516],"errorMessage":[1537,"error-message"],"showSeconds":[516,"show-seconds"],"mode":[513],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"],"noMargin":[4,"no-margin"]}]);
|
|
78492
78897
|
const EzDialog = /*@__PURE__*/proxyCustomElement(EzDialog$1, [1,"ez-dialog",{"confirm":[1028],"dialogType":[1025,"dialog-type"],"message":[1025],"opened":[1540],"personalizedIconPath":[1025,"personalized-icon-path"],"ezTitle":[1025,"ez-title"],"beforeClose":[1040]},[[8,"keydown","handleKeyDown"]]]);
|
|
78898
|
+
const EzDoubleList = /*@__PURE__*/proxyCustomElement(EzDoubleList$1, [2,"ez-double-list",{"leftList":[1040],"leftTitle":[1,"left-title"],"rightList":[1040],"entityLabel":[1,"entity-label"],"entityLabelPlural":[1,"entity-label-plural"],"leftListLabel":[1,"left-list-label"],"rightListLabel":[1,"right-list-label"],"rightTitle":[1,"right-title"],"leftFilteredList":[32],"rightFilteredList":[32],"selectedLeftList":[32],"selectedRightList":[32],"isFilteringLeft":[32],"isFilteringRight":[32]}]);
|
|
78493
78899
|
const EzDropdown = /*@__PURE__*/proxyCustomElement(EzDropdown$1, [1,"ez-dropdown",{"items":[1040],"value":[1040],"itemBuilder":[16]},[[4,"click","handleClickOutside"]]]);
|
|
78494
78900
|
const EzFileItem = /*@__PURE__*/proxyCustomElement(EzFileItem$1, [1,"ez-file-item",{"canRemove":[4,"can-remove"],"fileName":[1,"file-name"],"iconName":[1,"icon-name"],"fileSize":[2,"file-size"],"progress":[2]}]);
|
|
78495
78901
|
const EzFilterInput = /*@__PURE__*/proxyCustomElement(EzFilterInput$1, [1,"ez-filter-input",{"label":[1],"value":[1537],"enabled":[4],"errorMessage":[1537,"error-message"],"restrict":[1],"mode":[513],"asyncSearch":[516,"async-search"],"canShowError":[516,"can-show-error"],"autoFocus":[4,"auto-focus"],"noMargin":[4,"no-margin"]}]);
|
|
78496
78902
|
const EzForm = /*@__PURE__*/proxyCustomElement(EzForm$1, [2,"ez-form",{"dataUnit":[1040],"config":[16],"recordsValidator":[16],"fieldToFocus":[1,"field-to-focus"],"onlyStaticFields":[4,"only-static-fields"],"_fieldsProps":[32]}]);
|
|
78497
78903
|
const EzFormView = /*@__PURE__*/proxyCustomElement(EzFormView$1, [2,"ez-form-view",{"fields":[16],"selectedRecord":[16],"_customEditors":[32]}]);
|
|
78498
|
-
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"selectionToastConfig":[16],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"autoFocus":[4,"auto-focus"],"paginationCounterMode":[1,"pagination-counter-mode"],"enableGridInsert":[4,"enable-grid-insert"],"enableContinuousInsert":[4,"enable-continuous-insert"],"enableLockManger":[4,"enable-lock-manger"],"
|
|
78904
|
+
const EzGrid = /*@__PURE__*/proxyCustomElement(EzGrid$1, [6,"ez-grid",{"multipleSelection":[4,"multiple-selection"],"config":[1040],"selectionToastConfig":[16],"serverUrl":[1,"server-url"],"dataUnit":[16],"statusResolver":[16],"columnfilterDataSource":[16],"useEnterLikeTab":[4,"use-enter-like-tab"],"recordsValidator":[16],"canEdit":[4,"can-edit"],"autoFocus":[4,"auto-focus"],"paginationCounterMode":[1,"pagination-counter-mode"],"enableGridInsert":[4,"enable-grid-insert"],"enableContinuousInsert":[4,"enable-continuous-insert"],"enableLockManger":[4,"enable-lock-manger"],"outlineMode":[4,"outline-mode"],"_paginationInfo":[32],"_paginationChangedByKeyboard":[32],"_showSelectionCounter":[32],"_isAllSelection":[32],"_currentPageSelected":[32],"_selectionCount":[32],"_hasLeftButtons":[32],"_customFormatters":[32]},[[0,"ezSelectionChange","onSelectionChange"],[2,"click","handleClick"]]]);
|
|
78499
78905
|
const EzGuideNavigator = /*@__PURE__*/proxyCustomElement(EzGuideNavigator$1, [1,"ez-guide-navigator",{"open":[1540],"selectedId":[1537,"selected-id"],"items":[16],"tooltipResolver":[16],"filterText":[32]}]);
|
|
78500
78906
|
const EzIcon = /*@__PURE__*/proxyCustomElement(EzIcon$1, [1,"ez-icon",{"size":[513],"href":[513],"iconName":[513,"icon-name"]}]);
|
|
78501
|
-
const EzList = /*@__PURE__*/proxyCustomElement(EzList$1, [2,"ez-list",{"dataSource":[1040],"listMode":[1,"list-mode"],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"itemLeftSlotBuilder":[1040],"hoverFeedback":[1028,"hover-feedback"],"_listItems":[32],"_listGroupItems":[32]}]);
|
|
78907
|
+
const EzList = /*@__PURE__*/proxyCustomElement(EzList$1, [2,"ez-list",{"dataSource":[1040],"listMode":[1,"list-mode"],"useGroups":[1540,"use-groups"],"ezDraggable":[1028,"ez-draggable"],"ezSelectable":[1028,"ez-selectable"],"itemSlotBuilder":[1040],"itemLeftSlotBuilder":[1040],"hoverFeedback":[1028,"hover-feedback"],"enableMultipleSelection":[4,"enable-multiple-selection"],"_listItems":[32],"_listGroupItems":[32]}]);
|
|
78502
78908
|
const EzLoadingBar = /*@__PURE__*/proxyCustomElement(EzLoadingBar$1, [1,"ez-loading-bar",{"_showLoading":[32]}]);
|
|
78503
78909
|
const EzModal = /*@__PURE__*/proxyCustomElement(EzModal$1, [1,"ez-modal",{"modalSize":[1,"modal-size"],"align":[1],"heightMode":[1,"height-mode"],"opened":[1028],"closeEsc":[4,"close-esc"],"closeOutsideClick":[4,"close-outside-click"],"closeOutsideLeave":[4,"close-outside-leave"],"scrim":[1]}]);
|
|
78504
78910
|
const EzModalContainer = /*@__PURE__*/proxyCustomElement(EzModalContainer$1, [6,"ez-modal-container",{"modalTitle":[1,"modal-title"],"modalSubTitle":[1,"modal-sub-title"],"showTitleBar":[4,"show-title-bar"],"cancelButtonLabel":[1,"cancel-button-label"],"okButtonLabel":[1,"ok-button-label"],"cancelButtonStatus":[1,"cancel-button-status"],"okButtonStatus":[1,"ok-button-status"],"showCloseButton":[4,"show-close-button"]},[[4,"ezCloseModal","handleEzModalAction"]]]);
|
|
@@ -78548,6 +78954,7 @@ const defineCustomElements = (opts) => {
|
|
|
78548
78954
|
EzDateInput,
|
|
78549
78955
|
EzDateTimeInput,
|
|
78550
78956
|
EzDialog,
|
|
78957
|
+
EzDoubleList,
|
|
78551
78958
|
EzDropdown,
|
|
78552
78959
|
EzFileItem,
|
|
78553
78960
|
EzFilterInput,
|
|
@@ -78593,4 +79000,4 @@ const defineCustomElements = (opts) => {
|
|
|
78593
79000
|
}
|
|
78594
79001
|
};
|
|
78595
79002
|
|
|
78596
|
-
export { EzActionsButton, EzAlert, EzAlertList, EzApplication, EzBadge, EzBreadcrumb, EzButton, EzCalendar, EzCardItem, EzChart, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzCustomFormInput, EzDateInput, EzDateTimeInput, EzDialog, EzDropdown, EzFileItem, EzFilterInput, EzForm, EzFormView, EzGrid, EzGuideNavigator, EzIcon, EzList, EzLoadingBar, EzModal, EzModalContainer, EzMultiSelectionList, EzNumberInput, EzPopover, EzPopup, EzRadioButton, EzScroller, EzSearch, EzSidebarButton, EzSidebarNavigator, EzSkeleton, EzSplitButton, EzSplitItem, EzSplitPanel, EzTabselector, EzTextArea, EzTextEdit, EzTextInput, EzTimeInput, EzToast, EzTooltip, EzTree, EzUpload, EzViewStack, FilterColumn, MultiSelectionBoxMessage, defineCustomElements };
|
|
79003
|
+
export { EzActionsButton, EzAlert, EzAlertList, EzApplication, EzBadge, EzBreadcrumb, EzButton, EzCalendar, EzCardItem, EzChart, EzCheck, EzChip, EzCollapsibleBox, EzComboBox, EzCustomFormInput, EzDateInput, EzDateTimeInput, EzDialog, EzDoubleList, EzDropdown, EzFileItem, EzFilterInput, EzForm, EzFormView, EzGrid, EzGuideNavigator, EzIcon, EzList, EzLoadingBar, EzModal, EzModalContainer, EzMultiSelectionList, EzNumberInput, EzPopover, EzPopup, EzRadioButton, EzScroller, EzSearch, EzSidebarButton, EzSidebarNavigator, EzSkeleton, EzSplitButton, EzSplitItem, EzSplitPanel, EzTabselector, EzTextArea, EzTextEdit, EzTextInput, EzTimeInput, EzToast, EzTooltip, EzTree, EzUpload, EzViewStack, FilterColumn, MultiSelectionBoxMessage, defineCustomElements };
|