myrta-ui 17.0.30 → 17.0.32
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/esm2022/lib/components/form/select/components/select/select.component.mjs +97 -0
- package/esm2022/lib/components/form/select/components/select-multi/select-multi.component.mjs +105 -0
- package/esm2022/lib/components/form/select/enums/index.mjs +1 -2
- package/esm2022/lib/components/form/select/helpers/clean-selected-items.helper.mjs +4 -0
- package/esm2022/lib/components/form/select/helpers/get-inner-items.helper.mjs +8 -0
- package/esm2022/lib/components/form/select/helpers/get-selected-items.helper.mjs +6 -0
- package/esm2022/lib/components/form/select/helpers/modify-origin-items.helper.mjs +21 -0
- package/esm2022/lib/components/form/select/models/select-inner-item.model.mjs +2 -0
- package/esm2022/lib/components/form/select/models/select-item.model.mjs +2 -0
- package/esm2022/lib/components/form/select/select.module.mjs +15 -6
- package/esm2022/lib/components/popup/components/popup/popup.component.mjs +17 -6
- package/esm2022/lib/components/popup/components/popup-item/popup-item.component.mjs +8 -5
- package/esm2022/lib/components/popup/directives/popup-trigger.directive.mjs +43 -8
- package/esm2022/lib/pipes/date/helpers/change-timezone.mjs +4 -2
- package/esm2022/lib/services/modal-service/modal-service.service.mjs +4 -4
- package/esm2022/public-api.mjs +3 -2
- package/fesm2022/myrta-ui.mjs +261 -41
- package/fesm2022/myrta-ui.mjs.map +1 -1
- package/lib/components/form/select/components/select/select.component.d.ts +28 -0
- package/lib/components/form/select/components/select-multi/select-multi.component.d.ts +31 -0
- package/lib/components/form/select/enums/index.d.ts +0 -1
- package/lib/components/form/select/helpers/clean-selected-items.helper.d.ts +4 -0
- package/lib/components/form/select/helpers/get-inner-items.helper.d.ts +3 -0
- package/lib/components/form/select/helpers/get-selected-items.helper.d.ts +2 -0
- package/lib/components/form/select/helpers/modify-origin-items.helper.d.ts +2 -0
- package/lib/components/form/select/models/select-inner-item.model.d.ts +5 -0
- package/lib/components/form/select/models/select-item.model.d.ts +3 -0
- package/lib/components/form/select/select.module.d.ts +6 -4
- package/lib/components/popup/components/popup/popup.component.d.ts +6 -2
- package/lib/components/popup/components/popup-item/popup-item.component.d.ts +2 -1
- package/lib/components/popup/directives/popup-trigger.directive.d.ts +9 -4
- package/package.json +1 -1
- package/public-api.d.ts +2 -1
- package/esm2022/lib/components/form/select/enums/select-type.enum.mjs +0 -6
- package/esm2022/lib/components/form/select/select.component.mjs +0 -62
- package/lib/components/form/select/enums/select-type.enum.d.ts +0 -5
- package/lib/components/form/select/select.component.d.ts +0 -21
package/fesm2022/myrta-ui.mjs
CHANGED
|
@@ -16,7 +16,7 @@ import { OverlayModule } from '@angular/cdk/overlay';
|
|
|
16
16
|
import { createPopper } from '@popperjs/core';
|
|
17
17
|
import * as i6 from '@ng-select/ng-select';
|
|
18
18
|
import { NgSelectModule } from '@ng-select/ng-select';
|
|
19
|
-
import { Subscription, delay, of, Subject, filter, BehaviorSubject, EMPTY } from 'rxjs';
|
|
19
|
+
import { Subscription, asyncScheduler, delay, of, Subject, filter, BehaviorSubject, EMPTY } from 'rxjs';
|
|
20
20
|
import * as i2$1 from '@angular/cdk/layout';
|
|
21
21
|
import { Fancybox } from 'mrx-gallery-lib';
|
|
22
22
|
import * as i1$5 from '@angular/common/http';
|
|
@@ -56,6 +56,7 @@ import { getExample, getAsYouType } from 'awesome-phonenumber';
|
|
|
56
56
|
import localeRu$1 from '@angular/common/locales/ru';
|
|
57
57
|
import { parsePhoneNumber } from 'libphonenumber-js';
|
|
58
58
|
import JSONEditor from 'jsoneditor';
|
|
59
|
+
import isEqual from 'lodash-es/isEqual';
|
|
59
60
|
import * as i1$8 from 'ngx-extended-pdf-viewer';
|
|
60
61
|
import { FindState, NgxExtendedPdfViewerComponent, NgxExtendedPdfViewerModule } from 'ngx-extended-pdf-viewer';
|
|
61
62
|
|
|
@@ -1549,15 +1550,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1549
1550
|
}] });
|
|
1550
1551
|
|
|
1551
1552
|
class PopupItemComponent {
|
|
1553
|
+
custom = false;
|
|
1552
1554
|
templateRef;
|
|
1553
1555
|
clicked = new EventEmitter();
|
|
1554
1556
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PopupItemComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1555
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: PopupItemComponent, selector: "mrx-popup-item", outputs: { clicked: "clicked" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, static: true }], ngImport: i0, template: "<ng-template>\r\n <div class=\"mrx-popup-item\" (click)=\"clicked.emit()\">\r\n <ng-content></ng-content>\r\n </div>\r\n</ng-template>\r\n", styles: [".mrx-popup-item{padding:8px 16px;background-color:transparent;transition:background-color .3s;cursor:pointer}.mrx-popup-item:hover{background-color:var(--brand-bg-tertiary-hover, #EDF5FF)}\n"] });
|
|
1557
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: PopupItemComponent, selector: "mrx-popup-item", inputs: { custom: "custom" }, outputs: { clicked: "clicked" }, viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, static: true }], ngImport: i0, template: "<ng-template>\r\n <div class=\"mrx-popup-item\" [class.mrx-popup-item--default]=\"custom\" (click)=\"clicked.emit()\">\r\n <ng-content></ng-content>\r\n </div>\r\n</ng-template>\r\n", styles: [".mrx-popup-item{padding:8px 8px 8px 16px;background-color:transparent;transition:background-color .3s;cursor:pointer}.mrx-popup-item:hover{background-color:var(--brand-bg-tertiary-hover, #EDF5FF)}\n"] });
|
|
1556
1558
|
}
|
|
1557
1559
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PopupItemComponent, decorators: [{
|
|
1558
1560
|
type: Component,
|
|
1559
|
-
args: [{ selector: 'mrx-popup-item', template: "<ng-template>\r\n <div class=\"mrx-popup-item\" (click)=\"clicked.emit()\">\r\n <ng-content></ng-content>\r\n </div>\r\n</ng-template>\r\n", styles: [".mrx-popup-item{padding:8px 16px;background-color:transparent;transition:background-color .3s;cursor:pointer}.mrx-popup-item:hover{background-color:var(--brand-bg-tertiary-hover, #EDF5FF)}\n"] }]
|
|
1560
|
-
}], propDecorators: {
|
|
1561
|
+
args: [{ selector: 'mrx-popup-item', template: "<ng-template>\r\n <div class=\"mrx-popup-item\" [class.mrx-popup-item--default]=\"custom\" (click)=\"clicked.emit()\">\r\n <ng-content></ng-content>\r\n </div>\r\n</ng-template>\r\n", styles: [".mrx-popup-item{padding:8px 8px 8px 16px;background-color:transparent;transition:background-color .3s;cursor:pointer}.mrx-popup-item:hover{background-color:var(--brand-bg-tertiary-hover, #EDF5FF)}\n"] }]
|
|
1562
|
+
}], propDecorators: { custom: [{
|
|
1563
|
+
type: Input
|
|
1564
|
+
}], templateRef: [{
|
|
1561
1565
|
type: ViewChild,
|
|
1562
1566
|
args: [TemplateRef, { static: true }]
|
|
1563
1567
|
}], clicked: [{
|
|
@@ -1566,16 +1570,23 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1566
1570
|
|
|
1567
1571
|
class PopupComponent {
|
|
1568
1572
|
closeAfterClick = true;
|
|
1569
|
-
// @Input() maxWidth: string = '800px';
|
|
1570
1573
|
templateRef;
|
|
1571
1574
|
popupItemComponents;
|
|
1572
|
-
|
|
1575
|
+
toggle = new EventEmitter();
|
|
1576
|
+
_toggleInner = new EventEmitter();
|
|
1577
|
+
_updateInner = new EventEmitter();
|
|
1578
|
+
togglePopup(value) {
|
|
1579
|
+
this._toggleInner.emit(value);
|
|
1580
|
+
}
|
|
1581
|
+
updatePopup() {
|
|
1582
|
+
this._updateInner.emit();
|
|
1583
|
+
}
|
|
1573
1584
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PopupComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
1574
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: PopupComponent, selector: "mrx-popup", inputs: { closeAfterClick: "closeAfterClick" }, outputs: {
|
|
1585
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "17.3.12", type: PopupComponent, selector: "mrx-popup", inputs: { closeAfterClick: "closeAfterClick" }, outputs: { toggle: "toggle", _toggleInner: "_toggleInner", _updateInner: "_updateInner" }, queries: [{ propertyName: "popupItemComponents", predicate: PopupItemComponent }], viewQueries: [{ propertyName: "templateRef", first: true, predicate: TemplateRef, descendants: true, static: true }], ngImport: i0, template: "<ng-template>\r\n <div class=\"mrx-popup-content\" [style.width]=\"'100%'\">\r\n <ng-container *ngFor=\"let item of popupItemComponents; let index = index; let first = first; let last = last\">\r\n <ng-container *ngTemplateOutlet=\"item.templateRef\"></ng-container>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n", styles: [".mrx-popup-content{background-color:#fff;border-radius:4px;box-shadow:0 1px 4px #3a3a3a4d}\n"], dependencies: [{ kind: "directive", type: i1$1.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] });
|
|
1575
1586
|
}
|
|
1576
1587
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PopupComponent, decorators: [{
|
|
1577
1588
|
type: Component,
|
|
1578
|
-
args: [{ selector: 'mrx-popup', template: "<ng-template>\r\n <div class=\"mrx-popup-content\" [style.width]=\"'100%'\">\r\n <ng-container *ngFor=\"let item of popupItemComponents; let index = index; let first = first; let last = last\">\r\n <ng-container *ngTemplateOutlet=\"item.templateRef\"></ng-container>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n", styles: [".mrx-popup-content{
|
|
1589
|
+
args: [{ selector: 'mrx-popup', template: "<ng-template>\r\n <div class=\"mrx-popup-content\" [style.width]=\"'100%'\">\r\n <ng-container *ngFor=\"let item of popupItemComponents; let index = index; let first = first; let last = last\">\r\n <ng-container *ngTemplateOutlet=\"item.templateRef\"></ng-container>\r\n </ng-container>\r\n </div>\r\n</ng-template>\r\n", styles: [".mrx-popup-content{background-color:#fff;border-radius:4px;box-shadow:0 1px 4px #3a3a3a4d}\n"] }]
|
|
1579
1590
|
}], propDecorators: { closeAfterClick: [{
|
|
1580
1591
|
type: Input
|
|
1581
1592
|
}], templateRef: [{
|
|
@@ -1584,7 +1595,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1584
1595
|
}], popupItemComponents: [{
|
|
1585
1596
|
type: ContentChildren,
|
|
1586
1597
|
args: [PopupItemComponent]
|
|
1587
|
-
}],
|
|
1598
|
+
}], toggle: [{
|
|
1599
|
+
type: Output
|
|
1600
|
+
}], _toggleInner: [{
|
|
1601
|
+
type: Output
|
|
1602
|
+
}], _updateInner: [{
|
|
1588
1603
|
type: Output
|
|
1589
1604
|
}] } });
|
|
1590
1605
|
|
|
@@ -1593,7 +1608,8 @@ class PopupTriggerDirective {
|
|
|
1593
1608
|
elementRef;
|
|
1594
1609
|
viewContainerRef;
|
|
1595
1610
|
dispatcher;
|
|
1596
|
-
|
|
1611
|
+
_subscriberDetach$ = new Subscription();
|
|
1612
|
+
_subscriberAttach$ = new Subscription();
|
|
1597
1613
|
_isDropdownOpen = false;
|
|
1598
1614
|
_overlayRef;
|
|
1599
1615
|
popupPanel;
|
|
@@ -1604,6 +1620,20 @@ class PopupTriggerDirective {
|
|
|
1604
1620
|
this.viewContainerRef = viewContainerRef;
|
|
1605
1621
|
this.dispatcher = dispatcher;
|
|
1606
1622
|
}
|
|
1623
|
+
ngAfterViewInit() {
|
|
1624
|
+
this.popupPanel._toggleInner.subscribe(isOpen => {
|
|
1625
|
+
console.log(isOpen);
|
|
1626
|
+
if (isOpen && !this._isDropdownOpen) {
|
|
1627
|
+
this.openDropdown();
|
|
1628
|
+
}
|
|
1629
|
+
if (!isOpen && this._isDropdownOpen) {
|
|
1630
|
+
this.closeDropdown();
|
|
1631
|
+
}
|
|
1632
|
+
});
|
|
1633
|
+
this.popupPanel._updateInner.subscribe(() => {
|
|
1634
|
+
asyncScheduler.schedule(() => this.updatePosition());
|
|
1635
|
+
});
|
|
1636
|
+
}
|
|
1607
1637
|
togglePopup() {
|
|
1608
1638
|
this._isDropdownOpen ? this.destroyDropdown() : this.openDropdown();
|
|
1609
1639
|
}
|
|
@@ -1620,14 +1650,27 @@ class PopupTriggerDirective {
|
|
|
1620
1650
|
});
|
|
1621
1651
|
const templatePortal = new TemplatePortal(this.popupPanel.templateRef, this.viewContainerRef);
|
|
1622
1652
|
this._overlayRef.attach(templatePortal);
|
|
1623
|
-
this.
|
|
1653
|
+
this.popupPanel.toggle.emit(true);
|
|
1654
|
+
this._subscriberDetach$ = this._overlayRef.detachments().subscribe(_ => {
|
|
1624
1655
|
this._isDropdownOpen = false;
|
|
1625
|
-
this.popupPanel.
|
|
1656
|
+
this.popupPanel.toggle.emit(false);
|
|
1626
1657
|
});
|
|
1627
1658
|
}
|
|
1628
|
-
|
|
1659
|
+
closeDropdown() {
|
|
1629
1660
|
this.destroyDropdown();
|
|
1630
1661
|
}
|
|
1662
|
+
updatePosition() {
|
|
1663
|
+
if (this._overlayRef) {
|
|
1664
|
+
this._overlayRef.updatePosition();
|
|
1665
|
+
}
|
|
1666
|
+
}
|
|
1667
|
+
updateSize() {
|
|
1668
|
+
if (this._overlayRef) {
|
|
1669
|
+
this._overlayRef.updateSize({
|
|
1670
|
+
minWidth: this.elementRef.nativeElement.getBoundingClientRect().width
|
|
1671
|
+
});
|
|
1672
|
+
}
|
|
1673
|
+
}
|
|
1631
1674
|
getPositionStrategy() {
|
|
1632
1675
|
return this.overlay
|
|
1633
1676
|
.position()
|
|
@@ -1651,7 +1694,8 @@ class PopupTriggerDirective {
|
|
|
1651
1694
|
if (this._overlayRef) {
|
|
1652
1695
|
this._overlayRef.dispose();
|
|
1653
1696
|
}
|
|
1654
|
-
this.
|
|
1697
|
+
this._subscriberDetach$.unsubscribe();
|
|
1698
|
+
this._subscriberAttach$.unsubscribe();
|
|
1655
1699
|
}
|
|
1656
1700
|
handleClick(event) {
|
|
1657
1701
|
if (this.elementRef.nativeElement.contains(event.target))
|
|
@@ -1665,8 +1709,11 @@ class PopupTriggerDirective {
|
|
|
1665
1709
|
}
|
|
1666
1710
|
}
|
|
1667
1711
|
}
|
|
1712
|
+
handleResize() {
|
|
1713
|
+
this.updateSize();
|
|
1714
|
+
}
|
|
1668
1715
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PopupTriggerDirective, deps: [{ token: i1$3.Overlay }, { token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i1$3.OverlayOutsideClickDispatcher }], target: i0.ɵɵFactoryTarget.Directive });
|
|
1669
|
-
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: PopupTriggerDirective, selector: "[mrxPopupTrigger]", inputs: { popupPanel: ["mrxPopupTrigger", "popupPanel"], popupPosition: "popupPosition" }, host: { listeners: { "click": "togglePopup()", "document:click": "handleClick($event)" } }, ngImport: i0 });
|
|
1716
|
+
static ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "17.3.12", type: PopupTriggerDirective, selector: "[mrxPopupTrigger]", inputs: { popupPanel: ["mrxPopupTrigger", "popupPanel"], popupPosition: "popupPosition" }, host: { listeners: { "click": "togglePopup()", "document:click": "handleClick($event)", "window:resize": "handleResize($event)" } }, ngImport: i0 });
|
|
1670
1717
|
}
|
|
1671
1718
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: PopupTriggerDirective, decorators: [{
|
|
1672
1719
|
type: Directive,
|
|
@@ -1684,6 +1731,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
1684
1731
|
}], handleClick: [{
|
|
1685
1732
|
type: HostListener,
|
|
1686
1733
|
args: ['document:click', ['$event']]
|
|
1734
|
+
}], handleResize: [{
|
|
1735
|
+
type: HostListener,
|
|
1736
|
+
args: ['window:resize', ['$event']]
|
|
1687
1737
|
}] } });
|
|
1688
1738
|
|
|
1689
1739
|
class PopupModule {
|
|
@@ -4542,9 +4592,9 @@ class ModalService {
|
|
|
4542
4592
|
.centerVertically();
|
|
4543
4593
|
const overlayRef = this.overlay.create({
|
|
4544
4594
|
positionStrategy,
|
|
4545
|
-
hasBackdrop: true,
|
|
4546
|
-
backdropClass:
|
|
4547
|
-
panelClass:
|
|
4595
|
+
hasBackdrop: config.hasBackdrop !== undefined ? config.hasBackdrop : true,
|
|
4596
|
+
backdropClass: config.backdropClass || ModalBackdropTypeClasses[config.type || ModalType.Modal],
|
|
4597
|
+
panelClass: config.panelClass || ModalTypeClasses[config.type || ModalType.Modal]
|
|
4548
4598
|
});
|
|
4549
4599
|
const dialogRef = new ModalRef(overlayRef, config, this, 'default');
|
|
4550
4600
|
const injector = Injector.create({
|
|
@@ -15651,11 +15701,13 @@ const changeTimezone = (value, timezone) => {
|
|
|
15651
15701
|
const year = date.year();
|
|
15652
15702
|
const hour = date.hour();
|
|
15653
15703
|
const minute = date.minute();
|
|
15704
|
+
const second = date.second();
|
|
15654
15705
|
const formattedDay = String(day).length === 2 ? String(day) : String('0' + day);
|
|
15655
15706
|
const formattedMonth = String(month).length === 2 ? String(month) : String('0' + month);
|
|
15656
15707
|
const formattedHour = String(hour).length === 2 ? String(hour) : String('0' + hour);
|
|
15657
15708
|
const formattedMinute = String(minute).length === 2 ? String(minute) : String('0' + minute);
|
|
15658
|
-
|
|
15709
|
+
const formattedSecond = String(second).length === 2 ? String(second) : String('0' + second);
|
|
15710
|
+
return dayjs(`${String(year)}-${String(formattedMonth)}-${String(formattedDay)} ${formattedHour}:${formattedMinute}:${formattedSecond}`).toISOString();
|
|
15659
15711
|
};
|
|
15660
15712
|
|
|
15661
15713
|
class DateFormatPipe extends DatePipe {
|
|
@@ -16879,19 +16931,20 @@ var SelectSizeEnum;
|
|
|
16879
16931
|
SelectSizeEnum["large"] = "mrx-select-lg";
|
|
16880
16932
|
})(SelectSizeEnum || (SelectSizeEnum = {}));
|
|
16881
16933
|
|
|
16882
|
-
var SelectTypeEnum;
|
|
16883
|
-
(function (SelectTypeEnum) {
|
|
16884
|
-
SelectTypeEnum["single"] = "mrx-select-single";
|
|
16885
|
-
SelectTypeEnum["multi"] = "mrx-select-multi";
|
|
16886
|
-
})(SelectTypeEnum || (SelectTypeEnum = {}));
|
|
16887
|
-
|
|
16888
16934
|
class SelectComponent {
|
|
16889
|
-
|
|
16935
|
+
isOpen = false;
|
|
16936
|
+
selected = null;
|
|
16890
16937
|
items = [];
|
|
16891
|
-
type = 'single';
|
|
16892
16938
|
size = 'large';
|
|
16939
|
+
bindValue = null;
|
|
16940
|
+
bindLabel = 'label';
|
|
16941
|
+
bindIcon = 'icon';
|
|
16942
|
+
dropdown;
|
|
16893
16943
|
get getClasses() {
|
|
16894
|
-
return `${
|
|
16944
|
+
return `${SelectSizeEnum[this.size]}`;
|
|
16945
|
+
}
|
|
16946
|
+
get getSelectedSingleLabels() {
|
|
16947
|
+
return this.selected?.[this.bindLabel] || '';
|
|
16895
16948
|
}
|
|
16896
16949
|
onChange = (value) => { };
|
|
16897
16950
|
onTouched = () => { };
|
|
@@ -16901,27 +16954,48 @@ class SelectComponent {
|
|
|
16901
16954
|
registerOnTouched(fn) {
|
|
16902
16955
|
this.onTouched = fn;
|
|
16903
16956
|
}
|
|
16904
|
-
writeValue(
|
|
16957
|
+
writeValue(selected) {
|
|
16958
|
+
if (selected) {
|
|
16959
|
+
this.selected = selected;
|
|
16960
|
+
}
|
|
16905
16961
|
}
|
|
16906
|
-
updateValue(
|
|
16962
|
+
updateValue(selected) {
|
|
16963
|
+
this.selected = selected;
|
|
16964
|
+
// this.changed.emit(this.formatValue(insideValue));
|
|
16965
|
+
// this.modelChange.emit({value: this.formatValue(insideValue), id: this.uuid})
|
|
16966
|
+
this.onChange(this.bindValue ? this.selected[this.bindValue] : this.selected);
|
|
16967
|
+
this.onTouched();
|
|
16907
16968
|
}
|
|
16908
|
-
|
|
16909
|
-
|
|
16969
|
+
onSelect(item) {
|
|
16970
|
+
this.selected = item;
|
|
16971
|
+
this.updateValue(item);
|
|
16910
16972
|
}
|
|
16911
16973
|
onOpen(event) {
|
|
16912
16974
|
event.stopPropagation();
|
|
16975
|
+
if (this.isOpen) {
|
|
16976
|
+
this.dropdown.togglePopup(false);
|
|
16977
|
+
}
|
|
16978
|
+
else {
|
|
16979
|
+
this.dropdown.togglePopup(true);
|
|
16980
|
+
}
|
|
16913
16981
|
}
|
|
16914
16982
|
onClear(event) {
|
|
16915
16983
|
event.stopPropagation();
|
|
16984
|
+
this.selected = null;
|
|
16985
|
+
this.updateValue(this.selected);
|
|
16986
|
+
this.dropdown.togglePopup(false);
|
|
16987
|
+
}
|
|
16988
|
+
togglePopup(isOpen) {
|
|
16989
|
+
this.isOpen = isOpen;
|
|
16916
16990
|
}
|
|
16917
16991
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
16918
|
-
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: SelectComponent, selector: "mrx-select", inputs: { items: "items",
|
|
16992
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: SelectComponent, selector: "mrx-select", inputs: { items: "items", size: "size", bindValue: "bindValue", bindLabel: "bindLabel", bindIcon: "bindIcon" }, providers: [
|
|
16919
16993
|
{
|
|
16920
16994
|
provide: NG_VALUE_ACCESSOR,
|
|
16921
16995
|
useExisting: forwardRef(() => SelectComponent),
|
|
16922
16996
|
multi: true,
|
|
16923
16997
|
},
|
|
16924
|
-
], ngImport: i0, template: "<div class=\"mrx-select\" [class]=\"getClasses\">\r\n <div class=\"mrx-select__wrapper\">\r\n
|
|
16998
|
+
], viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }], ngImport: i0, template: "<div class=\"mrx-select\" [class]=\"getClasses\">\r\n <div class=\"mrx-select__wrapper\">\r\n <div class=\"mrx-select__input\" [mrxPopupTrigger]=\"dropdown\">\r\n <div class=\"mrx-select__input__box\">\r\n @if (getSelectedSingleLabels) {\r\n <div class=\"mrx-select__input__value\">{{ getSelectedSingleLabels }}</div>\r\n } @else {\r\n <div class=\"mrx-select__input__placeholder\"></div>\r\n }\r\n </div>\r\n\r\n <div class=\"mrx-select__input__controls\">\r\n @if (selected) {\r\n <div class=\"mrx-select__input__controls--item\" (click)=\"onClear($event)\">\r\n <span class=\"mrx-icon icon-close icon-font-24\"></span>\r\n </div>\r\n }\r\n <div class=\"mrx-select__input__controls--item\" (click)=\"onOpen($event)\">\r\n @if (isOpen) {\r\n <span class=\"mrx-icon icon-chevron-up icon-font-24\"></span>\r\n } @else {\r\n <span class=\"mrx-icon icon-chevron-down icon-font-24\"></span>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <mrx-popup #dropdown [closeAfterClick]=\"true\" (toggle)=\"togglePopup($event)\">\r\n @for (item of items; track item.name) {\r\n <mrx-popup-item [custom]=\"true\" (clicked)=\"onSelect(item)\">\r\n {{ item.label }}\r\n </mrx-popup-item>\r\n }\r\n </mrx-popup>\r\n </div>\r\n</div>\r\n", styles: [".mrx-select__input{border:var(--border-width-default) solid var(--neutral-bg-stroke-default);border-radius:var(--border-radius-1);width:100%;outline:none;transition:outline-width .2s,border .2s;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px}.mrx-select__input:focus,.mrx-select__input:active{outline:var(--neutral-bg-island-default) solid var(--border-width-focused)}.mrx-select__input:hover{border:var(--border-width-default) solid var(--neutral-bg-stroke-hover)}.mrx-select__input__box{flex-grow:1}.mrx-select__input__controls{display:flex;align-items:center;gap:8px}.mrx-select__input__controls--item{display:flex;align-items:center;justify-content:center;border-radius:4px;background-color:transparent;transition:background-color .2s}.mrx-select__input__controls--item:hover{background-color:var(--brand-bg-tertiary-hover, #EDF5FF)}.mrx-select.mrx-select-lg .mrx-select__input{font-family:var(--body-md-font-family);font-size:var(--body-md-font-size);font-weight:var(--body-md-font-weight);line-height:var(--body-md-line-height);padding:calc(var(--spacing-3) - var(--border-width-default)) var(--spacing-4)}.mrx-select.mrx-select-lg .mrx-select__input__box{min-height:24px}.mrx-select__dropdown__item{padding:8px 16px;background-color:transparent;transition:background-color .3s;cursor:pointer;font-family:var(--body-md-font-family);font-size:var(--body-md-font-size);font-weight:var(--body-md-font-weight);line-height:var(--body-md-line-height)}.mrx-select__dropdown__item:hover{background-color:var(--brand-bg-tertiary-hover, #EDF5FF)}\n"], dependencies: [{ kind: "component", type: PopupComponent, selector: "mrx-popup", inputs: ["closeAfterClick"], outputs: ["toggle", "_toggleInner", "_updateInner"] }, { kind: "component", type: PopupItemComponent, selector: "mrx-popup-item", inputs: ["custom"], outputs: ["clicked"] }, { kind: "directive", type: PopupTriggerDirective, selector: "[mrxPopupTrigger]", inputs: ["mrxPopupTrigger", "popupPosition"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
16925
16999
|
}
|
|
16926
17000
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectComponent, decorators: [{
|
|
16927
17001
|
type: Component,
|
|
@@ -16931,34 +17005,180 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
16931
17005
|
useExisting: forwardRef(() => SelectComponent),
|
|
16932
17006
|
multi: true,
|
|
16933
17007
|
},
|
|
16934
|
-
], template: "<div class=\"mrx-select\" [class]=\"getClasses\">\r\n <div class=\"mrx-select__wrapper\">\r\n
|
|
17008
|
+
], template: "<div class=\"mrx-select\" [class]=\"getClasses\">\r\n <div class=\"mrx-select__wrapper\">\r\n <div class=\"mrx-select__input\" [mrxPopupTrigger]=\"dropdown\">\r\n <div class=\"mrx-select__input__box\">\r\n @if (getSelectedSingleLabels) {\r\n <div class=\"mrx-select__input__value\">{{ getSelectedSingleLabels }}</div>\r\n } @else {\r\n <div class=\"mrx-select__input__placeholder\"></div>\r\n }\r\n </div>\r\n\r\n <div class=\"mrx-select__input__controls\">\r\n @if (selected) {\r\n <div class=\"mrx-select__input__controls--item\" (click)=\"onClear($event)\">\r\n <span class=\"mrx-icon icon-close icon-font-24\"></span>\r\n </div>\r\n }\r\n <div class=\"mrx-select__input__controls--item\" (click)=\"onOpen($event)\">\r\n @if (isOpen) {\r\n <span class=\"mrx-icon icon-chevron-up icon-font-24\"></span>\r\n } @else {\r\n <span class=\"mrx-icon icon-chevron-down icon-font-24\"></span>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <mrx-popup #dropdown [closeAfterClick]=\"true\" (toggle)=\"togglePopup($event)\">\r\n @for (item of items; track item.name) {\r\n <mrx-popup-item [custom]=\"true\" (clicked)=\"onSelect(item)\">\r\n {{ item.label }}\r\n </mrx-popup-item>\r\n }\r\n </mrx-popup>\r\n </div>\r\n</div>\r\n", styles: [".mrx-select__input{border:var(--border-width-default) solid var(--neutral-bg-stroke-default);border-radius:var(--border-radius-1);width:100%;outline:none;transition:outline-width .2s,border .2s;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px}.mrx-select__input:focus,.mrx-select__input:active{outline:var(--neutral-bg-island-default) solid var(--border-width-focused)}.mrx-select__input:hover{border:var(--border-width-default) solid var(--neutral-bg-stroke-hover)}.mrx-select__input__box{flex-grow:1}.mrx-select__input__controls{display:flex;align-items:center;gap:8px}.mrx-select__input__controls--item{display:flex;align-items:center;justify-content:center;border-radius:4px;background-color:transparent;transition:background-color .2s}.mrx-select__input__controls--item:hover{background-color:var(--brand-bg-tertiary-hover, #EDF5FF)}.mrx-select.mrx-select-lg .mrx-select__input{font-family:var(--body-md-font-family);font-size:var(--body-md-font-size);font-weight:var(--body-md-font-weight);line-height:var(--body-md-line-height);padding:calc(var(--spacing-3) - var(--border-width-default)) var(--spacing-4)}.mrx-select.mrx-select-lg .mrx-select__input__box{min-height:24px}.mrx-select__dropdown__item{padding:8px 16px;background-color:transparent;transition:background-color .3s;cursor:pointer;font-family:var(--body-md-font-family);font-size:var(--body-md-font-size);font-weight:var(--body-md-font-weight);line-height:var(--body-md-line-height)}.mrx-select__dropdown__item:hover{background-color:var(--brand-bg-tertiary-hover, #EDF5FF)}\n"] }]
|
|
16935
17009
|
}], propDecorators: { items: [{
|
|
16936
17010
|
type: Input
|
|
16937
|
-
}],
|
|
17011
|
+
}], size: [{
|
|
17012
|
+
type: Input
|
|
17013
|
+
}], bindValue: [{
|
|
17014
|
+
type: Input
|
|
17015
|
+
}], bindLabel: [{
|
|
17016
|
+
type: Input
|
|
17017
|
+
}], bindIcon: [{
|
|
17018
|
+
type: Input
|
|
17019
|
+
}], dropdown: [{
|
|
17020
|
+
type: ViewChild,
|
|
17021
|
+
args: ['dropdown']
|
|
17022
|
+
}] } });
|
|
17023
|
+
|
|
17024
|
+
const modifyOriginItems = (selected, bindValue) => {
|
|
17025
|
+
if (bindValue) {
|
|
17026
|
+
const modifiedSelected = [];
|
|
17027
|
+
for (let item of selected) {
|
|
17028
|
+
for (let key in item) {
|
|
17029
|
+
if (item.hasOwnProperty(bindValue) && key === bindValue) {
|
|
17030
|
+
modifiedSelected.push(item[bindValue]);
|
|
17031
|
+
}
|
|
17032
|
+
if (!item.hasOwnProperty(bindValue)) {
|
|
17033
|
+
modifiedSelected.push(null);
|
|
17034
|
+
break;
|
|
17035
|
+
}
|
|
17036
|
+
}
|
|
17037
|
+
}
|
|
17038
|
+
return modifiedSelected;
|
|
17039
|
+
}
|
|
17040
|
+
else {
|
|
17041
|
+
return selected;
|
|
17042
|
+
}
|
|
17043
|
+
};
|
|
17044
|
+
|
|
17045
|
+
const cleanSelectedItems = (innerList) => {
|
|
17046
|
+
return innerList.map(({ __id, __selected, ...rest }) => rest);
|
|
17047
|
+
};
|
|
17048
|
+
|
|
17049
|
+
const getSelectedItems = (innerItems, bindValue, selectedOnly = false) => {
|
|
17050
|
+
return modifyOriginItems(cleanSelectedItems(innerItems.filter(item => item.__selected)), bindValue);
|
|
17051
|
+
};
|
|
17052
|
+
|
|
17053
|
+
const getInnerItems = (items, selectedItems = []) => {
|
|
17054
|
+
return items.map((item, idx) => {
|
|
17055
|
+
const findItem = selectedItems.find(i => isEqual(i, item));
|
|
17056
|
+
return { ...item, __id: item['id'] || idx, __selected: !!findItem };
|
|
17057
|
+
});
|
|
17058
|
+
};
|
|
17059
|
+
|
|
17060
|
+
class SelectMultiComponent {
|
|
17061
|
+
isOpen = false;
|
|
17062
|
+
originItems = [];
|
|
17063
|
+
innerItems = [];
|
|
17064
|
+
set items(items) {
|
|
17065
|
+
this.originItems = items;
|
|
17066
|
+
this.innerItems = getInnerItems(items);
|
|
17067
|
+
}
|
|
17068
|
+
size = 'large';
|
|
17069
|
+
bindValue = null;
|
|
17070
|
+
bindLabel = 'label';
|
|
17071
|
+
bindIcon = 'icon';
|
|
17072
|
+
dropdown;
|
|
17073
|
+
get getClasses() {
|
|
17074
|
+
return `${SelectSizeEnum[this.size]}`;
|
|
17075
|
+
}
|
|
17076
|
+
get getSelectedLabels() {
|
|
17077
|
+
return this.innerItems.filter(i => i.__selected);
|
|
17078
|
+
}
|
|
17079
|
+
onChange = (value) => {
|
|
17080
|
+
};
|
|
17081
|
+
onTouched = () => {
|
|
17082
|
+
};
|
|
17083
|
+
registerOnChange(fn) {
|
|
17084
|
+
this.onChange = fn;
|
|
17085
|
+
}
|
|
17086
|
+
registerOnTouched(fn) {
|
|
17087
|
+
this.onTouched = fn;
|
|
17088
|
+
}
|
|
17089
|
+
writeValue(selected = []) {
|
|
17090
|
+
if (selected) {
|
|
17091
|
+
this.innerItems = getInnerItems(this.originItems, selected);
|
|
17092
|
+
}
|
|
17093
|
+
}
|
|
17094
|
+
updateValue(selectedItems) {
|
|
17095
|
+
// this.changed.emit(this.formatValue(insideValue));
|
|
17096
|
+
// this.modelChange.emit({value: this.formatValue(insideValue), id: this.uuid})
|
|
17097
|
+
this.onChange(selectedItems);
|
|
17098
|
+
this.onTouched();
|
|
17099
|
+
}
|
|
17100
|
+
onSelectMulti(item) {
|
|
17101
|
+
item.__selected = !item.__selected;
|
|
17102
|
+
this.dropdown.updatePopup();
|
|
17103
|
+
this.updateValue(getSelectedItems(this.innerItems, this.bindValue, true));
|
|
17104
|
+
}
|
|
17105
|
+
onOpen(event) {
|
|
17106
|
+
event.stopPropagation();
|
|
17107
|
+
if (this.isOpen) {
|
|
17108
|
+
this.dropdown.togglePopup(false);
|
|
17109
|
+
}
|
|
17110
|
+
else {
|
|
17111
|
+
this.dropdown.togglePopup(true);
|
|
17112
|
+
}
|
|
17113
|
+
}
|
|
17114
|
+
onClear(event) {
|
|
17115
|
+
event.stopPropagation();
|
|
17116
|
+
this.innerItems = this.innerItems.map(item => ({ ...item, __selected: false }));
|
|
17117
|
+
this.dropdown.togglePopup(false);
|
|
17118
|
+
this.updateValue([]);
|
|
17119
|
+
}
|
|
17120
|
+
togglePopup(isOpen) {
|
|
17121
|
+
this.isOpen = isOpen;
|
|
17122
|
+
}
|
|
17123
|
+
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectMultiComponent, deps: [], target: i0.ɵɵFactoryTarget.Component });
|
|
17124
|
+
static ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "17.3.12", type: SelectMultiComponent, selector: "mrx-select-multi", inputs: { items: "items", size: "size", bindValue: "bindValue", bindLabel: "bindLabel", bindIcon: "bindIcon" }, providers: [
|
|
17125
|
+
{
|
|
17126
|
+
provide: NG_VALUE_ACCESSOR,
|
|
17127
|
+
useExisting: forwardRef(() => SelectMultiComponent),
|
|
17128
|
+
multi: true,
|
|
17129
|
+
},
|
|
17130
|
+
], viewQueries: [{ propertyName: "dropdown", first: true, predicate: ["dropdown"], descendants: true }], ngImport: i0, template: "<div class=\"mrx-select\" [class]=\"getClasses\">\r\n <div class=\"mrx-select__wrapper\">\r\n <div class=\"mrx-select__input\" [mrxPopupTrigger]=\"dropdown\">\r\n <div class=\"mrx-select__input__box\">\r\n @if (getSelectedLabels.length) {\r\n <div class=\"mrx-select__input__value\">\r\n @for (item of getSelectedLabels; track item) {\r\n {{ item[bindLabel] }}\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"mrx-select__input__placeholder\"></div>\r\n }\r\n </div>\r\n\r\n <div class=\"mrx-select__input__controls\">\r\n @if (getSelectedLabels.length) {\r\n <div class=\"mrx-select__input__controls--item\" (click)=\"onClear($event)\">\r\n <span class=\"mrx-icon icon-close icon-font-24\"></span>\r\n </div>\r\n }\r\n <div class=\"mrx-select__input__controls--item\" (click)=\"onOpen($event)\">\r\n @if (isOpen) {\r\n <span class=\"mrx-icon icon-chevron-up icon-font-24\"></span>\r\n } @else {\r\n <span class=\"mrx-icon icon-chevron-down icon-font-24\"></span>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <mrx-popup #dropdown [closeAfterClick]=\"false\" (toggle)=\"togglePopup($event)\">\r\n @for (item of innerItems; track item.__id) {\r\n <mrx-popup-item [custom]=\"true\" (clicked)=\"onSelectMulti(item)\">\r\n {{ item['label'] }}\r\n </mrx-popup-item>\r\n }\r\n </mrx-popup>\r\n </div>\r\n</div>\r\n", styles: [".mrx-select__input{border:var(--border-width-default) solid var(--neutral-bg-stroke-default);border-radius:var(--border-radius-1);width:100%;outline:none;transition:outline-width .2s,border .2s;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px}.mrx-select__input:focus,.mrx-select__input:active{outline:var(--neutral-bg-island-default) solid var(--border-width-focused)}.mrx-select__input:hover{border:var(--border-width-default) solid var(--neutral-bg-stroke-hover)}.mrx-select__input__box{flex-grow:1}.mrx-select__input__controls{display:flex;align-items:center;gap:8px}.mrx-select__input__controls--item{display:flex;align-items:center;justify-content:center;border-radius:4px;background-color:transparent;transition:background-color .2s}.mrx-select__input__controls--item:hover{background-color:var(--brand-bg-tertiary-hover, #EDF5FF)}.mrx-select.mrx-select-lg .mrx-select__input{font-family:var(--body-md-font-family);font-size:var(--body-md-font-size);font-weight:var(--body-md-font-weight);line-height:var(--body-md-line-height);padding:calc(var(--spacing-3) - var(--border-width-default)) var(--spacing-4)}.mrx-select.mrx-select-lg .mrx-select__input__box{min-height:24px}.mrx-select__dropdown__item{padding:8px 16px;background-color:transparent;transition:background-color .3s;cursor:pointer;font-family:var(--body-md-font-family);font-size:var(--body-md-font-size);font-weight:var(--body-md-font-weight);line-height:var(--body-md-line-height)}.mrx-select__dropdown__item:hover{background-color:var(--brand-bg-tertiary-hover, #EDF5FF)}\n"], dependencies: [{ kind: "component", type: PopupComponent, selector: "mrx-popup", inputs: ["closeAfterClick"], outputs: ["toggle", "_toggleInner", "_updateInner"] }, { kind: "component", type: PopupItemComponent, selector: "mrx-popup-item", inputs: ["custom"], outputs: ["clicked"] }, { kind: "directive", type: PopupTriggerDirective, selector: "[mrxPopupTrigger]", inputs: ["mrxPopupTrigger", "popupPosition"] }], changeDetection: i0.ChangeDetectionStrategy.OnPush });
|
|
17131
|
+
}
|
|
17132
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectMultiComponent, decorators: [{
|
|
17133
|
+
type: Component,
|
|
17134
|
+
args: [{ selector: 'mrx-select-multi', changeDetection: ChangeDetectionStrategy.OnPush, providers: [
|
|
17135
|
+
{
|
|
17136
|
+
provide: NG_VALUE_ACCESSOR,
|
|
17137
|
+
useExisting: forwardRef(() => SelectMultiComponent),
|
|
17138
|
+
multi: true,
|
|
17139
|
+
},
|
|
17140
|
+
], template: "<div class=\"mrx-select\" [class]=\"getClasses\">\r\n <div class=\"mrx-select__wrapper\">\r\n <div class=\"mrx-select__input\" [mrxPopupTrigger]=\"dropdown\">\r\n <div class=\"mrx-select__input__box\">\r\n @if (getSelectedLabels.length) {\r\n <div class=\"mrx-select__input__value\">\r\n @for (item of getSelectedLabels; track item) {\r\n {{ item[bindLabel] }}\r\n }\r\n </div>\r\n } @else {\r\n <div class=\"mrx-select__input__placeholder\"></div>\r\n }\r\n </div>\r\n\r\n <div class=\"mrx-select__input__controls\">\r\n @if (getSelectedLabels.length) {\r\n <div class=\"mrx-select__input__controls--item\" (click)=\"onClear($event)\">\r\n <span class=\"mrx-icon icon-close icon-font-24\"></span>\r\n </div>\r\n }\r\n <div class=\"mrx-select__input__controls--item\" (click)=\"onOpen($event)\">\r\n @if (isOpen) {\r\n <span class=\"mrx-icon icon-chevron-up icon-font-24\"></span>\r\n } @else {\r\n <span class=\"mrx-icon icon-chevron-down icon-font-24\"></span>\r\n }\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <mrx-popup #dropdown [closeAfterClick]=\"false\" (toggle)=\"togglePopup($event)\">\r\n @for (item of innerItems; track item.__id) {\r\n <mrx-popup-item [custom]=\"true\" (clicked)=\"onSelectMulti(item)\">\r\n {{ item['label'] }}\r\n </mrx-popup-item>\r\n }\r\n </mrx-popup>\r\n </div>\r\n</div>\r\n", styles: [".mrx-select__input{border:var(--border-width-default) solid var(--neutral-bg-stroke-default);border-radius:var(--border-radius-1);width:100%;outline:none;transition:outline-width .2s,border .2s;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:8px}.mrx-select__input:focus,.mrx-select__input:active{outline:var(--neutral-bg-island-default) solid var(--border-width-focused)}.mrx-select__input:hover{border:var(--border-width-default) solid var(--neutral-bg-stroke-hover)}.mrx-select__input__box{flex-grow:1}.mrx-select__input__controls{display:flex;align-items:center;gap:8px}.mrx-select__input__controls--item{display:flex;align-items:center;justify-content:center;border-radius:4px;background-color:transparent;transition:background-color .2s}.mrx-select__input__controls--item:hover{background-color:var(--brand-bg-tertiary-hover, #EDF5FF)}.mrx-select.mrx-select-lg .mrx-select__input{font-family:var(--body-md-font-family);font-size:var(--body-md-font-size);font-weight:var(--body-md-font-weight);line-height:var(--body-md-line-height);padding:calc(var(--spacing-3) - var(--border-width-default)) var(--spacing-4)}.mrx-select.mrx-select-lg .mrx-select__input__box{min-height:24px}.mrx-select__dropdown__item{padding:8px 16px;background-color:transparent;transition:background-color .3s;cursor:pointer;font-family:var(--body-md-font-family);font-size:var(--body-md-font-size);font-weight:var(--body-md-font-weight);line-height:var(--body-md-line-height)}.mrx-select__dropdown__item:hover{background-color:var(--brand-bg-tertiary-hover, #EDF5FF)}\n"] }]
|
|
17141
|
+
}], propDecorators: { items: [{
|
|
16938
17142
|
type: Input
|
|
16939
17143
|
}], size: [{
|
|
16940
17144
|
type: Input
|
|
17145
|
+
}], bindValue: [{
|
|
17146
|
+
type: Input
|
|
17147
|
+
}], bindLabel: [{
|
|
17148
|
+
type: Input
|
|
17149
|
+
}], bindIcon: [{
|
|
17150
|
+
type: Input
|
|
17151
|
+
}], dropdown: [{
|
|
17152
|
+
type: ViewChild,
|
|
17153
|
+
args: ['dropdown']
|
|
16941
17154
|
}] } });
|
|
16942
17155
|
|
|
16943
17156
|
class SelectModule {
|
|
16944
17157
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule });
|
|
16945
|
-
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: SelectModule, declarations: [SelectComponent
|
|
16946
|
-
|
|
17158
|
+
static ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "17.3.12", ngImport: i0, type: SelectModule, declarations: [SelectComponent,
|
|
17159
|
+
SelectMultiComponent], imports: [CommonModule,
|
|
17160
|
+
FormsModule,
|
|
17161
|
+
PopupModule], exports: [SelectComponent,
|
|
17162
|
+
SelectMultiComponent] });
|
|
16947
17163
|
static ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectModule, imports: [CommonModule,
|
|
17164
|
+
FormsModule,
|
|
16948
17165
|
PopupModule] });
|
|
16949
17166
|
}
|
|
16950
17167
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImport: i0, type: SelectModule, decorators: [{
|
|
16951
17168
|
type: NgModule,
|
|
16952
17169
|
args: [{
|
|
16953
17170
|
declarations: [
|
|
16954
|
-
SelectComponent
|
|
17171
|
+
SelectComponent,
|
|
17172
|
+
SelectMultiComponent
|
|
16955
17173
|
],
|
|
16956
17174
|
imports: [
|
|
16957
17175
|
CommonModule,
|
|
17176
|
+
FormsModule,
|
|
16958
17177
|
PopupModule
|
|
16959
17178
|
],
|
|
16960
17179
|
exports: [
|
|
16961
|
-
SelectComponent
|
|
17180
|
+
SelectComponent,
|
|
17181
|
+
SelectMultiComponent
|
|
16962
17182
|
]
|
|
16963
17183
|
}]
|
|
16964
17184
|
}] });
|
|
@@ -17272,5 +17492,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "17.3.12", ngImpo
|
|
|
17272
17492
|
* Generated bundle index. Do not edit.
|
|
17273
17493
|
*/
|
|
17274
17494
|
|
|
17275
|
-
export { AlertColorClasses, AlertComponent, AlertIconClasses, AlertModule, BadgeColorClassesEnum, BadgeComponent, BadgeGroupComponent, BadgeSizeEnum, BadgeTagTypeClassesEnum, BadgeTargetTypesEnum, BadgeTypeEnum, BadgesModule, BreadcrumbsComponent, BreadcrumbsModule, BreadcrumbsTypeEnum, ButtonColorsEnum, ButtonComponent, ButtonIconPositionEnum, ButtonModule, ButtonSizesEnum, ButtonTypesEnum, CdkTooltipDirective, CdkTooltipModule, CharsLeftComponent, CharsLeftModule, CheckboxComponent, CheckboxGroupComponent, CheckboxGroupModule, CheckboxModule, ColumnComponent, ContentWrapperComponent, ContentWrapperModule, ContentWrapperTypeEnum, ControlsItemComponent, ControlsVisibilityEnum, ControlsWrapperComponent, ControlsWrapperModule, CountryISO$1 as CountryISO, CurrencyModule, CurrencyPipe, DateFormatModule, DateFormatPipe, DateTimeFormatPipe, DefaultPagerSettings, DropdownComponent, DropdownModule, EditorComponent, EditorModule, ErrorMessageComponent, ErrorMessageModule, FileUploadService, GalleryComponent, GalleryModule, HideAfterClickDirective, HintErrorMessageComponent, HintErrorMessageModule, IconButtonComponent, IconButtonModule, IconButtonSizeEnum, IconButtonStateEnum, IconButtonTypeEnum, InputDateSizesEnum$2 as InputDateSizesEnum, InputDateTimeComponent, InputDateTimeModule, InputDatepickerComponent, InputDatepickerModule, InputFileComponent, InputFileImageComponent, InputFileImageModule, InputFileImageTypeEnum, InputFileModule, InputNumberComponent, InputNumberModule, InputNumberSizesEnum, InputOptComponent, InputOptModule, InputPasswordComponent, InputPasswordModule, InputPasswordSizesEnum, InputPhoneComponent, InputPhoneModule, InputSearchComponent, InputSearchModule, InputSearchSizesEnum, InputSelectComponent, InputSelectModule, InputSelectSizeEnum, InputTelComponent, InputTelModule, InputTextComponent, InputTextIconColorEnum, InputTextModule, InputTextSizesEnum, InputTextareaComponent, InputTextareaModule, InputTextareaSizesEnum, InputTimepickerComponent, InputTimepickerModule, JsonEditorComponent, JsonEditorModule, JsonEditorOptions, LabelComponent, LabelModule, LinkComponent, LinkModule, LinkSizesEnum, LinkTargetTypesEnum, LinkTypesEnum, LoaderColorEnum, LoaderComponent, LoaderModule, LoaderSizesEnum, MODAL_CONFIG, MODAL_DATA, ModalAlignButtonsEnum, ModalBackdropTypeClasses, ModalColorEnum, ModalComponent, ModalModule, ModalRef, ModalService, ModalServiceComponent, ModalServiceModule, ModalSizesEnum, ModalType, ModalTypeClasses, MrxAutoSaveActionsEnum, MrxAutosaveService, MrxFormValidator, NgxOtpBehavior, PagesNavComponent, PagesNavEnum, PagesNavModule, PaginatorComponent, PaginatorModule, PaginatorPositionCss, PdfViewerComponent, PdfViewerComponentModule, PhoneFormatModule, PhoneFormatPipe, PopupComponent, PopupItemComponent, PopupModule, PopupTriggerDirective, PreviewEnum, ProgressClasses, ProgressComponent, ProgressModule, RadioComponent, RadioGroupComponent, RadioGroupModule, RadioModule, RadioTypesEnum, RatingComponent, RatingModule, RatingSizesEnum, RatingValueSizesEnum, RatingWrapperSizesEnum, SafeModule, SafePipe, SaveStateComponent, SaveStateModule, SaveStoreModule, SelectComponent, SelectModule,
|
|
17495
|
+
export { AlertColorClasses, AlertComponent, AlertIconClasses, AlertModule, BadgeColorClassesEnum, BadgeComponent, BadgeGroupComponent, BadgeSizeEnum, BadgeTagTypeClassesEnum, BadgeTargetTypesEnum, BadgeTypeEnum, BadgesModule, BreadcrumbsComponent, BreadcrumbsModule, BreadcrumbsTypeEnum, ButtonColorsEnum, ButtonComponent, ButtonIconPositionEnum, ButtonModule, ButtonSizesEnum, ButtonTypesEnum, CdkTooltipDirective, CdkTooltipModule, CharsLeftComponent, CharsLeftModule, CheckboxComponent, CheckboxGroupComponent, CheckboxGroupModule, CheckboxModule, ColumnComponent, ContentWrapperComponent, ContentWrapperModule, ContentWrapperTypeEnum, ControlsItemComponent, ControlsVisibilityEnum, ControlsWrapperComponent, ControlsWrapperModule, CountryISO$1 as CountryISO, CurrencyModule, CurrencyPipe, DateFormatModule, DateFormatPipe, DateTimeFormatPipe, DefaultPagerSettings, DropdownComponent, DropdownModule, EditorComponent, EditorModule, ErrorMessageComponent, ErrorMessageModule, FileUploadService, GalleryComponent, GalleryModule, HideAfterClickDirective, HintErrorMessageComponent, HintErrorMessageModule, IconButtonComponent, IconButtonModule, IconButtonSizeEnum, IconButtonStateEnum, IconButtonTypeEnum, InputDateSizesEnum$2 as InputDateSizesEnum, InputDateTimeComponent, InputDateTimeModule, InputDatepickerComponent, InputDatepickerModule, InputFileComponent, InputFileImageComponent, InputFileImageModule, InputFileImageTypeEnum, InputFileModule, InputNumberComponent, InputNumberModule, InputNumberSizesEnum, InputOptComponent, InputOptModule, InputPasswordComponent, InputPasswordModule, InputPasswordSizesEnum, InputPhoneComponent, InputPhoneModule, InputSearchComponent, InputSearchModule, InputSearchSizesEnum, InputSelectComponent, InputSelectModule, InputSelectSizeEnum, InputTelComponent, InputTelModule, InputTextComponent, InputTextIconColorEnum, InputTextModule, InputTextSizesEnum, InputTextareaComponent, InputTextareaModule, InputTextareaSizesEnum, InputTimepickerComponent, InputTimepickerModule, JsonEditorComponent, JsonEditorModule, JsonEditorOptions, LabelComponent, LabelModule, LinkComponent, LinkModule, LinkSizesEnum, LinkTargetTypesEnum, LinkTypesEnum, LoaderColorEnum, LoaderComponent, LoaderModule, LoaderSizesEnum, MODAL_CONFIG, MODAL_DATA, ModalAlignButtonsEnum, ModalBackdropTypeClasses, ModalColorEnum, ModalComponent, ModalModule, ModalRef, ModalService, ModalServiceComponent, ModalServiceModule, ModalSizesEnum, ModalType, ModalTypeClasses, MrxAutoSaveActionsEnum, MrxAutosaveService, MrxFormValidator, NgxOtpBehavior, PagesNavComponent, PagesNavEnum, PagesNavModule, PaginatorComponent, PaginatorModule, PaginatorPositionCss, PdfViewerComponent, PdfViewerComponentModule, PhoneFormatModule, PhoneFormatPipe, PopupComponent, PopupItemComponent, PopupModule, PopupTriggerDirective, PreviewEnum, ProgressClasses, ProgressComponent, ProgressModule, RadioComponent, RadioGroupComponent, RadioGroupModule, RadioModule, RadioTypesEnum, RatingComponent, RatingModule, RatingSizesEnum, RatingValueSizesEnum, RatingWrapperSizesEnum, SafeModule, SafePipe, SaveStateComponent, SaveStateModule, SaveStoreModule, SelectComponent, SelectModule, SelectMultiComponent, SelectSizeEnum, SidePageComponent, SidePageHeaderSizesEnum, SidePageModule, SidePagePositionEnum, SidePageSizesEnum, StepperClasses, StepperComponent, StepperModule, SwitchComponent, SwitchModule, SwitchSizeEnum, SwitchTypeEnum, TabComponent, TableComponent, TableModule, TableTypeEnum, TabsClasses, TabsGroupComponent, TabsModule, TabsTypesClasses, Timezone, ToasterPosition, ToasterService, ToasterServiceModule, ToasterType, Tooltip, TooltipComponent, TooltipModule, TooltipService, TooltipTextPositionEnum, TooltipTriggerComponent, TooltipTriggerEnum, TruncateDirective, TruncateDirectiveModule, TruncateModule, TruncatePipe, TruncateTextComponent, TruncateTextModule, ValidationMethodsEnum, ValidationOptionsEnum, ValidationTypesEnum, WarningMessageComponent, WarningMessageModule, WidgetWrapperComponent, WidgetWrapperModule, autosaveAddId, autosaveError, autosaveErrorFor, autosaveStart, autosaveStartFor, autosaveStop, autosaveStopFor, autosaveSuccess, autosaveSuccessFor, convertBase64ToFile, dateTimeFormat, defaultConfig, defaultCustomConfig, formatBytes, formattingDateRange, formattingIsoToString, getBase64FromUrl, getHashCode, innerListToList, sHashCode, selectFields, selectMrxAutoSaveState, sliceDate, toBytes, toDate, toNumberFormat, toastrDefaultConfig, wordForm };
|
|
17276
17496
|
//# sourceMappingURL=myrta-ui.mjs.map
|