@sankhyalabs/ezui 3.0.4 → 3.1.1
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-breadcrumb.cjs.entry.js +262 -8
- package/dist/cjs/ez-filter-input_4.cjs.entry.js +1 -1
- package/dist/cjs/ez-tabselector.cjs.entry.js +2 -12
- package/dist/cjs/ezui.cjs.js +1 -1
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/collection/components/ez-breadcrumb/ez-breadcrumb.css +10 -1
- package/dist/collection/components/ez-breadcrumb/ez-breadcrumb.js +291 -9
- package/dist/collection/components/ez-breadcrumb/subcomponents/breadcrumb-item.js +31 -0
- package/dist/collection/components/ez-tabselector/ez-tabselector.css +3 -1
- package/dist/collection/components/ez-tabselector/ez-tabselector.js +1 -11
- package/dist/collection/components/ez-tree/ez-tree.js +2 -2
- package/dist/custom-elements/index.js +267 -23
- package/dist/esm/ez-breadcrumb.entry.js +264 -10
- package/dist/esm/ez-filter-input_4.entry.js +2 -2
- package/dist/esm/ez-tabselector.entry.js +2 -12
- package/dist/esm/ezui.js +1 -1
- package/dist/esm/loader.js +1 -1
- package/dist/ezui/ezui.esm.js +1 -1
- package/dist/ezui/p-0e4ab096.entry.js +1 -0
- package/dist/ezui/p-38520b9c.entry.js +1 -0
- package/dist/ezui/p-51ecf138.entry.js +1 -0
- package/dist/types/components/ez-breadcrumb/ez-breadcrumb.d.ts +52 -2
- package/dist/types/components/ez-breadcrumb/subcomponents/breadcrumb-item.d.ts +13 -0
- package/dist/types/components/ez-tabselector/ez-tabselector.d.ts +0 -2
- package/dist/types/components.d.ts +25 -1
- package/package.json +1 -1
- package/dist/ezui/p-0f76448d.entry.js +0 -1
- package/dist/ezui/p-2d16e8c2.entry.js +0 -1
- package/dist/ezui/p-83b92420.entry.js +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTMLElement as HTMLElement$1, createEvent, h, Host, forceUpdate, proxyCustomElement } from '@stencil/core/internal/client';
|
|
2
2
|
export { setAssetPath, setPlatformOptions } from '@stencil/core/internal/client';
|
|
3
|
-
import { FloatingManager, ElementIDUtils, StringUtils as StringUtils$1, DateUtils as DateUtils$1, TimeFormatter, ObjectUtils as ObjectUtils$1, Action, WaitingChangeException, ApplicationContext, UserInterface, DataUnitAction, DataUnit, NumberUtils as NumberUtils$1, DataType, SortMode,
|
|
3
|
+
import { FloatingManager, ElementIDUtils, JSUtils, StringUtils as StringUtils$1, DateUtils as DateUtils$1, TimeFormatter, ObjectUtils as ObjectUtils$1, Action, WaitingChangeException, ApplicationContext, UserInterface, DataUnitAction, DataUnit, NumberUtils as NumberUtils$1, DataType, SortMode, MaskFormatter } from '@sankhyalabs/core';
|
|
4
4
|
|
|
5
5
|
var DialogType;
|
|
6
6
|
(function (DialogType) {
|
|
@@ -394,29 +394,283 @@ const EzApplication$1 = class extends HTMLElement$1 {
|
|
|
394
394
|
static get style() { return ezApplicationCss; }
|
|
395
395
|
};
|
|
396
396
|
|
|
397
|
-
const
|
|
397
|
+
const BreadcrumbItem = (props) => {
|
|
398
|
+
const { items, selectedItem, itemsHidden, showDropdown, handleShowDropdown, collapseConfigPosition, ellipsesPositionedEnd } = props;
|
|
399
|
+
const formatDropdownItems = () => {
|
|
400
|
+
return itemsHidden.map((item) => ({
|
|
401
|
+
id: item.id,
|
|
402
|
+
label: item.label,
|
|
403
|
+
type: 'item',
|
|
404
|
+
children: null,
|
|
405
|
+
iconName: item.iconName || null,
|
|
406
|
+
subAction: null,
|
|
407
|
+
group: null
|
|
408
|
+
}));
|
|
409
|
+
};
|
|
410
|
+
const onClickEllipsis = (evt) => {
|
|
411
|
+
evt.stopPropagation();
|
|
412
|
+
handleShowDropdown(!showDropdown);
|
|
413
|
+
};
|
|
414
|
+
const createEllipsis = (item) => {
|
|
415
|
+
return (h("li", Object.assign({ class: "breadcrumb__item", onClick: evt => onClickEllipsis(evt) }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezBreadcrumbItem_ellipsis`) }),
|
|
416
|
+
ellipsesPositionedEnd && h("ez-icon", Object.assign({ class: "breadcrumb__item--chevron", size: "small", iconName: "chevron-right" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`iconPath${item.id}`)}` })),
|
|
417
|
+
h("span", { class: "ellipses__item" }, "..."),
|
|
418
|
+
ellipsesPositionedEnd || h("ez-icon", Object.assign({ class: "breadcrumb__item--chevron", size: "small", iconName: "chevron-right" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`iconPath${item.id}`)}` })),
|
|
419
|
+
showDropdown &&
|
|
420
|
+
h("ez-dropdown", Object.assign({ class: "dropdown-ellipsis", items: formatDropdownItems(), onEzClick: (evt) => {
|
|
421
|
+
const { id, label, iconName } = evt.detail;
|
|
422
|
+
selectedItem.emit({ id, label, iconName });
|
|
423
|
+
} }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo("dropdown")}` }))));
|
|
424
|
+
};
|
|
425
|
+
return (h("div", { class: "breadcrumb__items" }, items.map((item, index) => {
|
|
426
|
+
const isLastItem = index === (items.length - 1);
|
|
427
|
+
return (h("div", { class: "breadcrumb__group" },
|
|
428
|
+
collapseConfigPosition === index && createEllipsis(item),
|
|
429
|
+
h("li", Object.assign({ class: "breadcrumb__item", id: item.id }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezBreadcrumb_item_${item.id}_${item.label}`) }),
|
|
430
|
+
item.iconName && h("ez-icon", Object.assign({ class: `breadcrumb__item--icon ${(isLastItem && !ellipsesPositionedEnd) ? 'active-icon' : ''}`, size: "small", iconName: item.iconName }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`iconItem${item.id}`)}` })),
|
|
431
|
+
h("p", { class: `breadcrumb__item--label ${(isLastItem && !ellipsesPositionedEnd) ? 'active' : ''}`, onClick: (ellipsesPositionedEnd || !isLastItem) ? () => selectedItem.emit(item) : undefined }, item.label),
|
|
432
|
+
!isLastItem && h("ez-icon", Object.assign({ class: "breadcrumb__item--chevron", size: "small", iconName: "chevron-right" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`iconPath${item.id}`)}` }))),
|
|
433
|
+
(collapseConfigPosition - 1 === index && ellipsesPositionedEnd) && createEllipsis(item)));
|
|
434
|
+
})));
|
|
435
|
+
};
|
|
436
|
+
|
|
437
|
+
const ezBreadcrumbCss = ":host{--breadcrumb__item--label--color--title-primary:var(--color--title-primary, #2B3A54);--breadcrumb__item--label--color--active:var(--color--primary, '#008561');--breadcrumb__item--label--font-weight:var(--text-weight--large, 600);display:block;font-size:var(--text--medium, 14px);font-family:var(--font-pattern, \"Roboto\");font-weight:var(--text-weight--medium, 400)}.breadcrumb__group{display:flex}.breadcrumb__list{list-style-type:none;display:inline-block;margin:0;padding:0;overflow:hidden;white-space:nowrap}.breadcrumb__item{display:inline-flex;align-items:center;cursor:pointer}.breadcrumb__item--label{color:var(--breadcrumb__item--label--color--title-primary);margin:0px}.breadcrumb__item--icon{padding-right:3px;color:var(--breadcrumb__item--label--color--title-primary)}.breadcrumb__item--chevron{padding:0px 6px;cursor:default}.active{color:var(--breadcrumb__item--label--color--active);font-weight:var(--breadcrumb__item--label--font-weight);cursor:default}.active-icon{--icon--color:var(--breadcrumb__item--label--color--active);cursor:default}.breadcrumb__items{display:flex}";
|
|
398
438
|
|
|
399
439
|
const EzBreadcrumb$1 = class extends HTMLElement$1 {
|
|
400
440
|
constructor() {
|
|
401
441
|
super();
|
|
402
442
|
this.__registerHost();
|
|
403
443
|
this.__attachShadow();
|
|
404
|
-
this.
|
|
444
|
+
this.selectedItem = createEvent(this, "selectedItem", 7);
|
|
445
|
+
this._ellipsesPositionedEnd = false;
|
|
446
|
+
this._renderSecond = false;
|
|
447
|
+
this.INDEX_ITEM_TO_REMOVE = 1; // sempre removemos o segundo item.
|
|
448
|
+
this.CHEVRON_SIZE = 28;
|
|
449
|
+
this.handleShowDropdown = (newState) => {
|
|
450
|
+
this.showDropdown = newState;
|
|
451
|
+
};
|
|
405
452
|
this.items = [];
|
|
453
|
+
this.fillMode = "auto";
|
|
454
|
+
this.maxItems = 4;
|
|
455
|
+
this.positionEllipsis = 1;
|
|
456
|
+
this.visibleItems = undefined;
|
|
457
|
+
this.hiddenItems = [];
|
|
458
|
+
this.showDropdown = false;
|
|
459
|
+
this.collapseConfigPosition = -1;
|
|
460
|
+
}
|
|
461
|
+
watchPropHandler() {
|
|
462
|
+
this.fillMode === "auto" && this.handleResize();
|
|
463
|
+
}
|
|
464
|
+
watchPropHiddenItems() {
|
|
465
|
+
if (this.fillMode === 'auto') {
|
|
466
|
+
this.collapseConfigPosition = this.hiddenItems.length > 0 ? 1 : -1;
|
|
467
|
+
}
|
|
468
|
+
}
|
|
469
|
+
componentDidUpdate() {
|
|
470
|
+
this.positionDropdown();
|
|
471
|
+
this.setEvents();
|
|
472
|
+
}
|
|
473
|
+
componentWillLoad() {
|
|
474
|
+
this.visibleItems = [...this.items];
|
|
475
|
+
if (this.fillMode === 'regular') {
|
|
476
|
+
this.configModeRegular();
|
|
477
|
+
}
|
|
478
|
+
else if (this.fillMode === 'auto') {
|
|
479
|
+
this.startResize();
|
|
480
|
+
}
|
|
481
|
+
this.setEvents();
|
|
482
|
+
}
|
|
483
|
+
closeDropdown(evt) {
|
|
484
|
+
const target = evt === null || evt === void 0 ? void 0 : evt.target;
|
|
485
|
+
if (target == undefined) {
|
|
486
|
+
return;
|
|
487
|
+
}
|
|
488
|
+
if (target !== this._element.shadowRoot.querySelector(".ellipses__item")) {
|
|
489
|
+
this.showDropdown = false;
|
|
490
|
+
}
|
|
491
|
+
}
|
|
492
|
+
setEvents() {
|
|
493
|
+
document.removeEventListener("click", this.closeDropdown.bind(this));
|
|
494
|
+
document.addEventListener("click", this.closeDropdown.bind(this));
|
|
495
|
+
document.removeEventListener("scroll", this.positionDropdown.bind(this));
|
|
496
|
+
document.addEventListener("scroll", this.positionDropdown.bind(this));
|
|
406
497
|
}
|
|
407
498
|
componentDidLoad() {
|
|
408
499
|
ElementIDUtils.addIDInfo(this._element);
|
|
409
500
|
}
|
|
410
|
-
|
|
411
|
-
this.
|
|
501
|
+
componentDidRender() {
|
|
502
|
+
if (this.fillMode === 'auto') {
|
|
503
|
+
this.configResize();
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
configResize() {
|
|
507
|
+
if (this._resizeObserver != undefined) {
|
|
508
|
+
this._resizeObserver.unobserve(this._element.parentElement);
|
|
509
|
+
}
|
|
510
|
+
this._resizeObserver = new ResizeObserver(JSUtils.debounce(this.handleResize.bind(this), 200));
|
|
511
|
+
this._resizeObserver.observe(this._element.parentElement);
|
|
512
|
+
}
|
|
513
|
+
handleResize() {
|
|
514
|
+
const ELLIPSIS_SIZE = 39;
|
|
515
|
+
if (!this._renderSecond) {
|
|
516
|
+
this._renderSecond = true;
|
|
517
|
+
return;
|
|
518
|
+
}
|
|
519
|
+
let { offsetWidth } = this._element.parentElement;
|
|
520
|
+
let sumVisibleItems = 0;
|
|
521
|
+
this.visibleItems.forEach(item => sumVisibleItems += item.width);
|
|
522
|
+
//Se existe o ellipsis, devemos cconsidera-lo no calculo
|
|
523
|
+
const offset = this.collapseConfigPosition > -1 ? ELLIPSIS_SIZE : 0;
|
|
524
|
+
if (offsetWidth < sumVisibleItems + offset) {
|
|
525
|
+
this.handleCollapse(offsetWidth, sumVisibleItems);
|
|
526
|
+
}
|
|
527
|
+
else if (offsetWidth >= sumVisibleItems + offset) {
|
|
528
|
+
this.handleExpand(offsetWidth);
|
|
529
|
+
}
|
|
530
|
+
}
|
|
531
|
+
handleCollapse(containerWidth, itemsWidth) {
|
|
532
|
+
const MIN_VISIBLE_ITEMS = 2;
|
|
533
|
+
if (this.visibleItems.length <= MIN_VISIBLE_ITEMS) {
|
|
534
|
+
return;
|
|
535
|
+
}
|
|
536
|
+
let tmpVisibleItems = [...this.visibleItems];
|
|
537
|
+
let tmpHiddenItems = [...this.hiddenItems];
|
|
538
|
+
let secondItem = tmpVisibleItems[this.INDEX_ITEM_TO_REMOVE];
|
|
539
|
+
let hasChange = false;
|
|
540
|
+
while (tmpVisibleItems.length > MIN_VISIBLE_ITEMS &&
|
|
541
|
+
secondItem != undefined &&
|
|
542
|
+
itemsWidth > containerWidth) {
|
|
543
|
+
hasChange = true;
|
|
544
|
+
tmpVisibleItems = tmpVisibleItems.filter((_, index) => index !== this.INDEX_ITEM_TO_REMOVE);
|
|
545
|
+
tmpHiddenItems = [...tmpHiddenItems, secondItem];
|
|
546
|
+
itemsWidth -= secondItem.width;
|
|
547
|
+
secondItem = tmpVisibleItems[this.INDEX_ITEM_TO_REMOVE];
|
|
548
|
+
}
|
|
549
|
+
if (hasChange) {
|
|
550
|
+
this.visibleItems = tmpVisibleItems;
|
|
551
|
+
this.hiddenItems = tmpHiddenItems;
|
|
552
|
+
this.showDropdown = false;
|
|
553
|
+
}
|
|
554
|
+
}
|
|
555
|
+
handleExpand(containerWidth) {
|
|
556
|
+
if (!this.hiddenItems.length) {
|
|
557
|
+
return;
|
|
558
|
+
}
|
|
559
|
+
let widthFreeZone = Math.abs(this._elBreadcrumbList.offsetWidth - containerWidth);
|
|
560
|
+
let tmpVisibleItems = [...this.visibleItems];
|
|
561
|
+
let tmpHiddenItems = [...this.hiddenItems];
|
|
562
|
+
let lastHiddenElement = tmpHiddenItems[tmpHiddenItems.length - 1];
|
|
563
|
+
let hasChange = false;
|
|
564
|
+
while (lastHiddenElement && widthFreeZone >= lastHiddenElement.width) {
|
|
565
|
+
widthFreeZone -= lastHiddenElement.width;
|
|
566
|
+
tmpHiddenItems.pop();
|
|
567
|
+
tmpVisibleItems.splice(this.INDEX_ITEM_TO_REMOVE, 0, lastHiddenElement);
|
|
568
|
+
lastHiddenElement = tmpHiddenItems[tmpHiddenItems.length - 1];
|
|
569
|
+
hasChange = true;
|
|
570
|
+
}
|
|
571
|
+
if (hasChange) {
|
|
572
|
+
this.visibleItems = tmpVisibleItems;
|
|
573
|
+
this.hiddenItems = tmpHiddenItems;
|
|
574
|
+
this.showDropdown = false;
|
|
575
|
+
}
|
|
576
|
+
}
|
|
577
|
+
configModeRegular() {
|
|
578
|
+
if (this.visibleItems.length > this.maxItems) {
|
|
579
|
+
const amountsItemsToHide = Math.abs(this.visibleItems.length - this.maxItems);
|
|
580
|
+
if (this.positionEllipsis === 0) {
|
|
581
|
+
const itemsToTransfer = this.visibleItems.slice(0, amountsItemsToHide);
|
|
582
|
+
this.hiddenItems.push(...itemsToTransfer);
|
|
583
|
+
this.visibleItems.splice(0, amountsItemsToHide);
|
|
584
|
+
}
|
|
585
|
+
else if (this.positionEllipsis >= this.maxItems) {
|
|
586
|
+
const itemsToTransfer = this.visibleItems.slice(this.maxItems);
|
|
587
|
+
this.hiddenItems.push(...itemsToTransfer);
|
|
588
|
+
this.visibleItems.splice(this.maxItems);
|
|
589
|
+
this._ellipsesPositionedEnd = true;
|
|
590
|
+
}
|
|
591
|
+
else {
|
|
592
|
+
const removedItems = this.visibleItems.splice(this.positionEllipsis, amountsItemsToHide);
|
|
593
|
+
this.hiddenItems.push(...removedItems);
|
|
594
|
+
}
|
|
595
|
+
this.collapseConfigPosition = this.positionEllipsis;
|
|
596
|
+
}
|
|
597
|
+
}
|
|
598
|
+
positionDropdown() {
|
|
599
|
+
var _a;
|
|
600
|
+
const bounding = (_a = this._element.shadowRoot.querySelector(".ellipses__item")) === null || _a === void 0 ? void 0 : _a.getBoundingClientRect();
|
|
601
|
+
const elDropdown = this._element.shadowRoot.querySelector(".dropdown-ellipsis");
|
|
602
|
+
if (bounding == undefined || elDropdown == undefined) {
|
|
603
|
+
return;
|
|
604
|
+
}
|
|
605
|
+
elDropdown.style.top = (bounding.y + bounding.height + 5) + "px";
|
|
606
|
+
elDropdown.style.left = bounding.x + "px";
|
|
607
|
+
}
|
|
608
|
+
;
|
|
609
|
+
async startResize() {
|
|
610
|
+
const areaAvailable = this._element.parentElement.offsetWidth;
|
|
611
|
+
const ELLIPSIS_SIZE = 10;
|
|
612
|
+
const measureItemSize = async (item, index) => {
|
|
613
|
+
item.width = await this.measureSizeHTMLElement(item);
|
|
614
|
+
/*
|
|
615
|
+
Se é o ultimo item, desconsideramos o icone CHEVRON
|
|
616
|
+
*/
|
|
617
|
+
if (index === this.visibleItems.length - 1) {
|
|
618
|
+
item.width -= this.CHEVRON_SIZE;
|
|
619
|
+
}
|
|
620
|
+
return item;
|
|
621
|
+
};
|
|
622
|
+
const measuredItems = await Promise.all(this.visibleItems.map(measureItemSize));
|
|
623
|
+
const sizeBreadcrumb = measuredItems.reduce((total, item) => total + item.width, 0);
|
|
624
|
+
if (sizeBreadcrumb > areaAvailable) {
|
|
625
|
+
const tempItemsVisible = [];
|
|
626
|
+
const tempItemsHidden = [...measuredItems];
|
|
627
|
+
const firstItem = tempItemsHidden.shift();
|
|
628
|
+
const lastItem = tempItemsHidden.pop();
|
|
629
|
+
lastItem.width += ELLIPSIS_SIZE;
|
|
630
|
+
tempItemsVisible.push(firstItem, lastItem);
|
|
631
|
+
let sizeTempItemsHiddenResult = tempItemsVisible.reduce((total, item) => total + item.width, 0);
|
|
632
|
+
let newAreaAvailable = Math.abs(sizeTempItemsHiddenResult - areaAvailable);
|
|
633
|
+
tempItemsHidden.reverse().forEach((item) => {
|
|
634
|
+
if (item.width < newAreaAvailable) {
|
|
635
|
+
const firstItemForListHidden = tempItemsHidden.shift();
|
|
636
|
+
tempItemsVisible.splice(1, 0, firstItemForListHidden);
|
|
637
|
+
sizeTempItemsHiddenResult = tempItemsVisible.reduce((total, item) => total + item.width, 0);
|
|
638
|
+
newAreaAvailable = Math.abs(sizeTempItemsHiddenResult - areaAvailable);
|
|
639
|
+
}
|
|
640
|
+
});
|
|
641
|
+
this.visibleItems = [...tempItemsVisible];
|
|
642
|
+
this.hiddenItems = [...tempItemsHidden.reverse()];
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
measureSizeHTMLElement(item) {
|
|
646
|
+
return new Promise((resolve) => {
|
|
647
|
+
const ICON_SIZE = 19;
|
|
648
|
+
this.waitFontLoad().then(() => {
|
|
649
|
+
if (this._textMesurement === undefined) {
|
|
650
|
+
this._textMesurement = this._element.shadowRoot.ownerDocument.createElement("canvas");
|
|
651
|
+
}
|
|
652
|
+
const context = this._textMesurement.getContext("2d");
|
|
653
|
+
context.font = "14px Roboto, Algerian";
|
|
654
|
+
resolve((item.iconName ? ICON_SIZE : 0) + this.CHEVRON_SIZE + context.measureText(item.label).width);
|
|
655
|
+
});
|
|
656
|
+
});
|
|
657
|
+
}
|
|
658
|
+
waitFontLoad() {
|
|
659
|
+
return new Promise((resolve) => {
|
|
660
|
+
document.fonts.load("14px Roboto").then(() => resolve(), resolve());
|
|
661
|
+
});
|
|
662
|
+
}
|
|
663
|
+
getItemContent() {
|
|
664
|
+
return (h("nav", { class: "breadcrumb" }, h("ol", { class: "breadcrumb__list", ref: elem => this._elBreadcrumbList = elem }, h(BreadcrumbItem, { items: this.visibleItems, selectedItem: this.selectedItem, itemsHidden: this.hiddenItems, showDropdown: this.showDropdown, handleShowDropdown: this.handleShowDropdown, collapseConfigPosition: this.collapseConfigPosition, ellipsesPositionedEnd: this._ellipsesPositionedEnd }))));
|
|
412
665
|
}
|
|
413
666
|
render() {
|
|
414
|
-
return
|
|
415
|
-
const isLastItem = index === (this.items.length - 1);
|
|
416
|
-
return (h("li", Object.assign({ class: "breadcrumb__item", id: item.id }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: ElementIDUtils.getInternalIDInfo(`ezBreadcrumbItem_${item.id}`) }), item.iconName && h("ez-icon", Object.assign({ class: `breadcrumb__item--icon ${isLastItem ? 'active-icon' : ''}`, size: "small", iconName: item.iconName }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`iconItem${item.id}`)}` })), h("p", { class: `breadcrumb__item--label ${isLastItem ? 'active' : ''}`, onClick: !isLastItem ? () => this.handleItemClick(item) : undefined }, item.label), !isLastItem && h("ez-icon", Object.assign({ class: "breadcrumb__item--chevron", size: "small", iconName: "chevron-right" }, { [ElementIDUtils.DATA_ELEMENT_ID_ATTRIBUTE_NAME]: `${ElementIDUtils.getInternalIDInfo(`iconPath${item.id}`)}` }))));
|
|
417
|
-
}))));
|
|
667
|
+
return this.getItemContent();
|
|
418
668
|
}
|
|
419
669
|
get _element() { return this; }
|
|
670
|
+
static get watchers() { return {
|
|
671
|
+
"items": ["watchPropHandler"],
|
|
672
|
+
"hiddenItems": ["watchPropHiddenItems"]
|
|
673
|
+
}; }
|
|
420
674
|
static get style() { return ezBreadcrumbCss; }
|
|
421
675
|
};
|
|
422
676
|
|
|
@@ -125042,7 +125296,7 @@ const EzSidebarButton$1 = class extends HTMLElement$1 {
|
|
|
125042
125296
|
static get style() { return ezSidebarButtonCss; }
|
|
125043
125297
|
};
|
|
125044
125298
|
|
|
125045
|
-
const ezTabselectorCss = "@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}:host{display:flex;position:relative;width:100%;overflow:hidden;--tabselector--backward-icon: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>');--tabselector--forward-icon: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>')}.scroll{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.scroll.startHidden{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px)}.scroll.middle{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 20px))}.scroll.endHidden{-webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 20px))}.tab{display:flex;border:none;min-width:100px;
|
|
125299
|
+
const ezTabselectorCss = "@keyframes activate{0%{clip-path:inset(calc(100% - 3px) 50% 0px 50%)}100%{clip-path:inset(calc(100% - 3px) 0px 0px 0px)}}:host{display:flex;position:relative;width:100%;overflow:hidden;--tabselector--backward-icon: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>');--tabselector--forward-icon: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>')}.scroll{display:flex;width:100%;scroll-behavior:smooth;overflow-x:auto;scrollbar-width:none}.scroll.startHidden{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px)}.scroll.middle{-webkit-mask-image:linear-gradient(90deg, transparent 20px, #000 48px, #000 calc(100% - 48px), transparent calc(100% - 20px))}.scroll.endHidden{-webkit-mask-image:linear-gradient(90deg, #000 calc(100% - 48px), transparent calc(100% - 20px))}.tab{display:flex;border:none;background-color:unset;min-width:100px;max-width:260px;cursor:pointer;padding:6px 12px;align-items:center;justify-content:center;color:var(--text--primary, #626e82);font-family:var(--font-pattern, \"Roboto\");font-size:var(--title--small, 14px);flex-shrink:0}.tab:focus,.forward-button,.backward-button{outline:none}.is-active{position:relative;color:var(--color--primary, #008561)}.is-active::after{content:\"\";position:absolute;width:100%;height:100%;background-color:var(--color--primary, #008561);clip-path:inset(calc(100% - 3px) 0px 0px 0px);animation:activate 0.25s ease-in-out}.is-focused{border:1px dashed var(--color--primary, #000000c5)}.tab-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;text-shadow:var(--text-shadow);margin-bottom:var(--space--extra-small, 3px)}.forward-button,.backward-button{position:absolute;z-index:1;display:flex;box-sizing:border-box;padding:0px;top:0px;right:0px;width:16px;height:100%;border:none;background-color:unset;cursor:pointer;justify-content:center;align-items:center}.backward-button{left:0px}.forward-button::after,.backward-button::after{content:'';display:flex;background-color:var(--text--primary, #008561);width:10px;height:16px}.forward-button::after{-webkit-mask-image:var(--tabselector--forward-icon);mask-image:var(--tabselector--forward-icon)}.backward-button::after{-webkit-mask-image:var(--tabselector--backward-icon);mask-image:var(--tabselector--backward-icon)}.forward-button:hover::after,.backward-button:hover::after{background-color:var(--color--primary, #4e4e4e)}.hidden{display:none}.scroll::-webkit-scrollbar{display:none}.left-icon{padding-right:var(--space--small)}.right-icon{padding-left:var(--space--small)}";
|
|
125046
125300
|
|
|
125047
125301
|
const EzTabselector$1 = class extends HTMLElement$1 {
|
|
125048
125302
|
constructor() {
|
|
@@ -125228,15 +125482,6 @@ const EzTabselector$1 = class extends HTMLElement$1 {
|
|
|
125228
125482
|
tabtoscroll.scrollIntoView();
|
|
125229
125483
|
}, 200);
|
|
125230
125484
|
}
|
|
125231
|
-
getTextWidth(text) {
|
|
125232
|
-
if (this._textMesurement === undefined) {
|
|
125233
|
-
this._textMesurement = this._hostElem.shadowRoot.ownerDocument.createElement("canvas");
|
|
125234
|
-
}
|
|
125235
|
-
const context = this._textMesurement.getContext("2d");
|
|
125236
|
-
context.font = "14px Sora, Algerian";
|
|
125237
|
-
return Math.min(220, 24 + context.measureText(text).width) + "px";
|
|
125238
|
-
}
|
|
125239
|
-
;
|
|
125240
125485
|
setFocusedBtn(visible, parameter) {
|
|
125241
125486
|
const tabsButtons = this._scrollContainer.querySelectorAll(".tab");
|
|
125242
125487
|
tabsButtons.forEach((el) => {
|
|
@@ -125257,14 +125502,13 @@ const EzTabselector$1 = class extends HTMLElement$1 {
|
|
|
125257
125502
|
}
|
|
125258
125503
|
render() {
|
|
125259
125504
|
return (h(Host, null, h("button", { class: "backward-button", ref: (el) => this._backwardButton = el, onClick: () => this.scrollBackward() }), h("div", { class: "scroll", ref: (el) => this._scrollContainer = el, onScroll: () => this.domScrollHandler(), onKeyDown: (ev) => this.setFocusedParam(ev) }, this._processedTabs.map((tab, index) => {
|
|
125260
|
-
const labelStyle = { "min-width": this.getTextWidth(tab.label) };
|
|
125261
125505
|
const tabId = "tab" + index;
|
|
125262
125506
|
const isSelected = index === this.selectedIndex || (this.selectedTab && tab.tabKey === this.selectedTab);
|
|
125263
125507
|
if (isSelected) {
|
|
125264
125508
|
this.selectedTab = tab.tabKey;
|
|
125265
125509
|
this.selectedIndex = index;
|
|
125266
125510
|
}
|
|
125267
|
-
return h("button", { id: tabId, name: "tab-button", class: `tab${isSelected ? " is-active" : ""}`, onClick: () => this.handleTabClick(tab)
|
|
125511
|
+
return h("button", { id: tabId, name: "tab-button", class: `tab${isSelected ? " is-active" : ""}`, onClick: () => this.handleTabClick(tab) }, tab.leftIcon && h("ez-icon", { iconName: tab.leftIcon, class: "left-icon" }), h("span", { class: "tab-label", title: tab.label }, tab.label), tab.rightIcon && h("ez-icon", { iconName: tab.rightIcon, class: "right-icon" }), h("slot", { name: tabId, onSlotchange: (ev) => { this.handleSlotChange(ev); } }));
|
|
125268
125512
|
})), h("button", { class: "forward-button", ref: (el) => this._forwardButton = el, onClick: () => this.scrollFoward() })));
|
|
125269
125513
|
}
|
|
125270
125514
|
get _hostElem() { return this; }
|
|
@@ -126356,7 +126600,7 @@ const EzTree$1 = class extends HTMLElement$1 {
|
|
|
126356
126600
|
this._tree.setFilterPattern(pattern);
|
|
126357
126601
|
}
|
|
126358
126602
|
observeItems(newValue, oldValue) {
|
|
126359
|
-
if (newValue
|
|
126603
|
+
if (ObjectUtils$1.objectToString(newValue) !== ObjectUtils$1.objectToString(oldValue)) {
|
|
126360
126604
|
this._tree.load(this.items || []);
|
|
126361
126605
|
}
|
|
126362
126606
|
}
|
|
@@ -126970,7 +127214,7 @@ const EzViewStack$1 = class extends HTMLElement$1 {
|
|
|
126970
127214
|
const EzActionsButton = /*@__PURE__*/proxyCustomElement(EzActionsButton$1, [1,"ez-actions-button",{"enabled":[516],"actions":[1040],"size":[513],"showLabel":[516,"show-label"],"displayIcon":[513,"display-icon"],"checkOption":[516,"check-option"],"value":[513],"isTransparent":[516,"is-transparent"],"arrowActive":[516,"arrow-active"],"_selectedAction":[32]}]);
|
|
126971
127215
|
const EzAlert = /*@__PURE__*/proxyCustomElement(EzAlert$1, [1,"ez-alert",{"alertType":[513,"alert-type"]}]);
|
|
126972
127216
|
const EzApplication = /*@__PURE__*/proxyCustomElement(EzApplication$1, [0,"ez-application"]);
|
|
126973
|
-
const EzBreadcrumb = /*@__PURE__*/proxyCustomElement(EzBreadcrumb$1, [1,"ez-breadcrumb",{"items":[1040]}]);
|
|
127217
|
+
const EzBreadcrumb = /*@__PURE__*/proxyCustomElement(EzBreadcrumb$1, [1,"ez-breadcrumb",{"items":[1040],"fillMode":[1025,"fill-mode"],"maxItems":[1026,"max-items"],"positionEllipsis":[1026,"position-ellipsis"],"visibleItems":[32],"hiddenItems":[32],"showDropdown":[32],"collapseConfigPosition":[32]}]);
|
|
126974
127218
|
const EzButton = /*@__PURE__*/proxyCustomElement(EzButton$1, [1,"ez-button",{"label":[513],"enabled":[516],"mode":[513],"image":[513],"iconName":[513,"icon-name"],"size":[513]}]);
|
|
126975
127219
|
const EzCalendar = /*@__PURE__*/proxyCustomElement(EzCalendar$1, [1,"ez-calendar",{"value":[1040],"floating":[516],"time":[516],"showSeconds":[516,"show-seconds"]}]);
|
|
126976
127220
|
const EzCardItem = /*@__PURE__*/proxyCustomElement(EzCardItem$1, [1,"ez-card-item",{"item":[16]}]);
|