monkey-style-guide-v2 0.0.16 → 0.0.17
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/index.mjs +4 -3
- package/esm2022/lib/components/monkey-modal/components/default.mjs +68 -0
- package/esm2022/lib/components/monkey-modal/directives/actions.mjs +29 -0
- package/esm2022/lib/components/monkey-modal/directives/content.mjs +26 -0
- package/esm2022/lib/components/monkey-modal/directives/subtitle.mjs +26 -0
- package/esm2022/lib/components/monkey-modal/directives/title.mjs +26 -0
- package/esm2022/lib/components/monkey-modal/index.mjs +12 -0
- package/esm2022/lib/components/monkey-modal/modal-config.mjs +18 -0
- package/esm2022/lib/components/monkey-modal/modal-ref.mjs +46 -0
- package/esm2022/lib/components/monkey-modal/modal.mjs +119 -0
- package/esm2022/lib/components/monkey-modal/modal.module.mjs +53 -0
- package/esm2022/lib/components/monkey-modal/service.mjs +92 -0
- package/esm2022/lib/components/monkey-modal/utils.mjs +23 -0
- package/fesm2022/monkey-style-guide-v2.mjs +601 -128
- package/fesm2022/monkey-style-guide-v2.mjs.map +1 -1
- package/lib/components/index.d.ts +3 -2
- package/lib/components/monkey-modal/components/default.d.ts +18 -0
- package/lib/components/monkey-modal/directives/actions.d.ts +7 -0
- package/lib/components/monkey-modal/directives/content.d.ts +6 -0
- package/lib/components/monkey-modal/directives/subtitle.d.ts +6 -0
- package/lib/components/monkey-modal/directives/title.d.ts +6 -0
- package/lib/components/monkey-modal/index.d.ts +11 -0
- package/lib/components/monkey-modal/modal-config.d.ts +33 -0
- package/lib/components/monkey-modal/modal-ref.d.ts +26 -0
- package/lib/components/monkey-modal/modal.d.ts +23 -0
- package/lib/components/monkey-modal/modal.module.d.ts +16 -0
- package/lib/components/monkey-modal/service.d.ts +28 -0
- package/lib/components/monkey-modal/utils.d.ts +16 -0
- package/monkey-style-guide-v2-0.0.17.tgz +0 -0
- package/package.json +1 -1
- package/monkey-style-guide-v2-0.0.16.tgz +0 -0
|
@@ -2,16 +2,18 @@ import { trigger, state, style, transition, animate, keyframes } from '@angular/
|
|
|
2
2
|
import * as i1$1 from '@angular/common';
|
|
3
3
|
import { CommonModule, CurrencyPipe, NgTemplateOutlet, DOCUMENT } from '@angular/common';
|
|
4
4
|
import * as i0 from '@angular/core';
|
|
5
|
-
import { Injectable, inject, TemplateRef, booleanAttribute, Component, Input, ViewEncapsulation, input, output, HostListener, Directive, NgModule, EventEmitter, Injector, ChangeDetectorRef, forwardRef, ChangeDetectionStrategy, ContentChildren, Output, HostBinding, ElementRef, DEFAULT_CURRENCY_CODE, ContentChild, LOCALE_ID,
|
|
5
|
+
import { Injectable, inject, TemplateRef, booleanAttribute, Component, Input, ViewEncapsulation, input, output, HostListener, Directive, NgModule, EventEmitter, Injector, ChangeDetectorRef, forwardRef, ChangeDetectionStrategy, ContentChildren, Output, HostBinding, ElementRef, DEFAULT_CURRENCY_CODE, ContentChild, LOCALE_ID, InjectionToken, Optional, Inject, ViewChild } from '@angular/core';
|
|
6
6
|
import { Subject, takeUntil, merge, Subscription } from 'rxjs';
|
|
7
7
|
import { DomSanitizer } from '@angular/platform-browser';
|
|
8
8
|
import { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
|
|
9
9
|
import * as i1 from '@angular/cdk/overlay';
|
|
10
|
-
import {
|
|
10
|
+
import { OverlayConfig, OverlayRef } from '@angular/cdk/overlay';
|
|
11
|
+
import { Router, NavigationStart } from '@angular/router';
|
|
11
12
|
import * as i1$2 from '@angular/forms';
|
|
12
13
|
import { NgControl, FormControlDirective, NgModel, FormControlName, FormGroupDirective, NG_VALUE_ACCESSOR, NG_VALIDATORS, ReactiveFormsModule, FormsModule, Validators } from '@angular/forms';
|
|
13
14
|
import { coerceBooleanProperty } from '@angular/cdk/coercion';
|
|
14
15
|
import { getSupportedInputTypes } from '@angular/cdk/platform';
|
|
16
|
+
import { hasModifierKey } from '@angular/cdk/keycodes';
|
|
15
17
|
|
|
16
18
|
const counters = {};
|
|
17
19
|
class IdGenerator {
|
|
@@ -1566,171 +1568,471 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1566
1568
|
* This style guide was developed by Monkey Exchange Team
|
|
1567
1569
|
* MIT Licence
|
|
1568
1570
|
************************* */
|
|
1569
|
-
class
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
|
|
1573
|
-
|
|
1574
|
-
|
|
1575
|
-
|
|
1576
|
-
|
|
1577
|
-
|
|
1578
|
-
|
|
1579
|
-
|
|
1580
|
-
|
|
1581
|
-
|
|
1571
|
+
class MonkeyModalRef {
|
|
1572
|
+
constructor(overlayRef, config) {
|
|
1573
|
+
this.overlayRef = overlayRef;
|
|
1574
|
+
this.config = config;
|
|
1575
|
+
this.closed = new Subject();
|
|
1576
|
+
this.id = config.id;
|
|
1577
|
+
this.icon = config.icon;
|
|
1578
|
+
this.disableClose = config.disableClose;
|
|
1579
|
+
this.closeOnNavigation = config.closeOnNavigation;
|
|
1580
|
+
this.backdropClick = overlayRef.backdropClick();
|
|
1581
|
+
this.keydownEvents = overlayRef.keydownEvents();
|
|
1582
|
+
this.outsidePointerEvents = overlayRef.outsidePointerEvents();
|
|
1583
|
+
this.keydownEvents.subscribe((event) => {
|
|
1584
|
+
if (event.key === 'Escape' && !this.disableClose && !hasModifierKey(event)) {
|
|
1585
|
+
event.preventDefault();
|
|
1586
|
+
this.close(undefined);
|
|
1587
|
+
}
|
|
1588
|
+
});
|
|
1589
|
+
this.backdropClick.subscribe(() => {
|
|
1590
|
+
if (!this.disableClose) {
|
|
1591
|
+
this.close(undefined);
|
|
1592
|
+
}
|
|
1593
|
+
});
|
|
1594
|
+
}
|
|
1595
|
+
close(result) {
|
|
1596
|
+
if (this.componentInstance) {
|
|
1597
|
+
const closedSubject = this.closed;
|
|
1598
|
+
this.overlayRef.dispose();
|
|
1599
|
+
closedSubject.next(result);
|
|
1600
|
+
closedSubject.complete();
|
|
1601
|
+
// eslint-disable-next-line no-multi-assign
|
|
1602
|
+
this.componentInstance = null;
|
|
1582
1603
|
}
|
|
1583
|
-
return 'very-strong';
|
|
1584
1604
|
}
|
|
1585
|
-
|
|
1586
|
-
return this.
|
|
1605
|
+
afterClosed() {
|
|
1606
|
+
return this.closed;
|
|
1587
1607
|
}
|
|
1588
|
-
|
|
1589
|
-
|
|
1608
|
+
}
|
|
1609
|
+
|
|
1610
|
+
/** ************************
|
|
1611
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
1612
|
+
* This style guide was developed by Monkey Exchange Team
|
|
1613
|
+
* MIT Licence
|
|
1614
|
+
************************* */
|
|
1615
|
+
const MECX_MODAL_DATA = new InjectionToken('mecxModalData');
|
|
1616
|
+
const MECX_MODAL_DEFAULT_CONFIG = new InjectionToken('mecxModalDefaultConfig');
|
|
1617
|
+
/**
|
|
1618
|
+
* @license
|
|
1619
|
+
* Copyright Google LLC All Rights Reserved.
|
|
1620
|
+
*
|
|
1621
|
+
* Use of this source code is governed by an MIT-style license that can be
|
|
1622
|
+
* found in the LICENSE file at https://angular.dev/license
|
|
1623
|
+
*/
|
|
1624
|
+
function reverseForEach(items, callback) {
|
|
1625
|
+
let i = items.length;
|
|
1626
|
+
// eslint-disable-next-line no-plusplus
|
|
1627
|
+
while (i--) {
|
|
1628
|
+
callback(items[i]);
|
|
1590
1629
|
}
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
this.
|
|
1596
|
-
|
|
1597
|
-
this.
|
|
1630
|
+
}
|
|
1631
|
+
|
|
1632
|
+
class MonkeyModalComponent {
|
|
1633
|
+
constructor(_elementRef, viewContainerRef, overlayRef, modalRef) {
|
|
1634
|
+
this._elementRef = _elementRef;
|
|
1635
|
+
this.viewContainerRef = viewContainerRef;
|
|
1636
|
+
this.overlayRef = overlayRef;
|
|
1637
|
+
this.modalRef = modalRef;
|
|
1638
|
+
this._navigationSubscription = null;
|
|
1639
|
+
this._router = inject(Router);
|
|
1640
|
+
// not to do
|
|
1598
1641
|
}
|
|
1599
|
-
|
|
1600
|
-
|
|
1642
|
+
ngAfterViewInit() {
|
|
1643
|
+
console.log(this.modalRef);
|
|
1644
|
+
if (this._elementRef) {
|
|
1645
|
+
this._elementRef.nativeElement.focus();
|
|
1646
|
+
}
|
|
1647
|
+
if (this.modalRef?.closeOnNavigation) {
|
|
1648
|
+
this._navigationSubscription = this._router.events.subscribe((event) => {
|
|
1649
|
+
if (event instanceof NavigationStart) {
|
|
1650
|
+
this.close();
|
|
1651
|
+
}
|
|
1652
|
+
});
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
ngOnDestroy() {
|
|
1656
|
+
if (this._navigationSubscription) {
|
|
1657
|
+
this._navigationSubscription.unsubscribe();
|
|
1658
|
+
this._navigationSubscription = null;
|
|
1659
|
+
}
|
|
1660
|
+
}
|
|
1661
|
+
close() {
|
|
1662
|
+
this.overlayRef?.dispose();
|
|
1663
|
+
}
|
|
1664
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalComponent, deps: [{ token: i0.ElementRef }, { token: i0.ViewContainerRef }, { token: i1.OverlayRef, optional: true }, { token: MonkeyModalRef, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1665
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyModalComponent, selector: "monkey-modal", host: { attributes: { "tabindex": "-1" }, properties: { "attr.id": "modalRef?.id || null" }, classAttribute: "mecx-modal" }, ngImport: i0, template: `
|
|
1666
|
+
<div class="mecx-modal-header">
|
|
1667
|
+
<div class="mecx-modal-header-group">
|
|
1668
|
+
<div class="mecx-modal-header-title">
|
|
1669
|
+
@if (modalRef?.icon) {
|
|
1670
|
+
<div class="mecx-modal-header-icon">
|
|
1671
|
+
<monkey-icon [icon]="modalRef?.icon + ''" first></monkey-icon>
|
|
1672
|
+
</div>
|
|
1673
|
+
}
|
|
1674
|
+
<ng-content select="monkey-modal-title"></ng-content>
|
|
1675
|
+
<ng-content select="[monkey-modal-title]"></ng-content>
|
|
1676
|
+
</div>
|
|
1677
|
+
|
|
1678
|
+
<ng-content select="monkey-modal-subtitle"></ng-content>
|
|
1679
|
+
<ng-content select="[monkey-modal-subtitle]"></ng-content>
|
|
1680
|
+
</div>
|
|
1681
|
+
@if (!modalRef?.disableClose) {
|
|
1682
|
+
<monkey-icon-button
|
|
1683
|
+
size="sm"
|
|
1684
|
+
type="tertiary"
|
|
1685
|
+
icon="close"
|
|
1686
|
+
class="mecx-modal-close"
|
|
1687
|
+
(click)="close()"
|
|
1688
|
+
>
|
|
1689
|
+
x
|
|
1690
|
+
</monkey-icon-button>
|
|
1691
|
+
}
|
|
1692
|
+
</div>
|
|
1693
|
+
<ng-content select="monkey-modal-content"></ng-content>
|
|
1694
|
+
<ng-content select="[monkey-modal-content]"></ng-content>
|
|
1695
|
+
<ng-content select="monkey-modal-actions"></ng-content>
|
|
1696
|
+
<ng-content select="[monkey-modal-actions]"></ng-content>
|
|
1697
|
+
`, isInline: true, styles: ["monkey-modal{display:flex;flex-direction:column;background:#fff;border-radius:8px}.mecx-modal-header{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;border-bottom:1px solid var(--mecx-color-gray-200);padding:12px;position:relative}.mecx-modal-header-group{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:4px}.mecx-modal-header-title{display:flex;gap:8px;align-items:center;justify-content:flex-start}.mecx-modal-header-icon{padding:8px;display:flex;align-items:center;justify-content:center;background:var(--mecx-color-gray-100);border-radius:8px;font-size:24px;color:var(--mecx-color-gray-900)}.mecx-modal-title{font-size:18px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.54px;color:var(--mecx-color-gray-900)}.mecx-modal-subtitle{font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px;color:var(--mecx-color-gray-700)}.mecx-modal-content{display:block;flex-grow:1;box-sizing:border-box;overflow:auto;max-height:65vh;padding:12px;scrollbar-color:var(--mecx-color-gray-400) transparent}.mecx-modal-actions{display:flex;gap:8px;border-top:1px solid var(--mecx-color-gray-200);padding:12px}.mecx-modal-actions.align-start{justify-content:flex-start}.mecx-modal-actions.align-center{justify-content:center}.mecx-modal-actions.align-end{justify-content:flex-end}.mecx-modal-overlay{background:#00000052}\n"], dependencies: [{ kind: "component", type: MonkeyIconButtonComponent, selector: "monkey-icon-button", inputs: ["type", "size", "disabled", "icon", "id"] }, { kind: "component", type: MonkeyIconComponent, selector: "monkey-icon", inputs: ["icon", "size", "id"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1601
1698
|
}
|
|
1602
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
1699
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalComponent, decorators: [{
|
|
1603
1700
|
type: Component,
|
|
1604
|
-
args: [{ encapsulation: ViewEncapsulation.None,
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1701
|
+
args: [{ encapsulation: ViewEncapsulation.None, selector: 'monkey-modal', template: `
|
|
1702
|
+
<div class="mecx-modal-header">
|
|
1703
|
+
<div class="mecx-modal-header-group">
|
|
1704
|
+
<div class="mecx-modal-header-title">
|
|
1705
|
+
@if (modalRef?.icon) {
|
|
1706
|
+
<div class="mecx-modal-header-icon">
|
|
1707
|
+
<monkey-icon [icon]="modalRef?.icon + ''" first></monkey-icon>
|
|
1708
|
+
</div>
|
|
1709
|
+
}
|
|
1710
|
+
<ng-content select="monkey-modal-title"></ng-content>
|
|
1711
|
+
<ng-content select="[monkey-modal-title]"></ng-content>
|
|
1712
|
+
</div>
|
|
1713
|
+
|
|
1714
|
+
<ng-content select="monkey-modal-subtitle"></ng-content>
|
|
1715
|
+
<ng-content select="[monkey-modal-subtitle]"></ng-content>
|
|
1716
|
+
</div>
|
|
1717
|
+
@if (!modalRef?.disableClose) {
|
|
1718
|
+
<monkey-icon-button
|
|
1719
|
+
size="sm"
|
|
1720
|
+
type="tertiary"
|
|
1721
|
+
icon="close"
|
|
1722
|
+
class="mecx-modal-close"
|
|
1723
|
+
(click)="close()"
|
|
1724
|
+
>
|
|
1725
|
+
x
|
|
1726
|
+
</monkey-icon-button>
|
|
1727
|
+
}
|
|
1728
|
+
</div>
|
|
1729
|
+
<ng-content select="monkey-modal-content"></ng-content>
|
|
1730
|
+
<ng-content select="[monkey-modal-content]"></ng-content>
|
|
1731
|
+
<ng-content select="monkey-modal-actions"></ng-content>
|
|
1732
|
+
<ng-content select="[monkey-modal-actions]"></ng-content>
|
|
1733
|
+
`, host: {
|
|
1734
|
+
class: 'mecx-modal',
|
|
1735
|
+
tabindex: '-1',
|
|
1736
|
+
'[attr.id]': 'modalRef?.id || null'
|
|
1737
|
+
}, styles: ["monkey-modal{display:flex;flex-direction:column;background:#fff;border-radius:8px}.mecx-modal-header{display:flex;gap:12px;align-items:flex-start;justify-content:space-between;border-bottom:1px solid var(--mecx-color-gray-200);padding:12px;position:relative}.mecx-modal-header-group{display:flex;flex-direction:column;align-items:flex-start;justify-content:flex-start;gap:4px}.mecx-modal-header-title{display:flex;gap:8px;align-items:center;justify-content:flex-start}.mecx-modal-header-icon{padding:8px;display:flex;align-items:center;justify-content:center;background:var(--mecx-color-gray-100);border-radius:8px;font-size:24px;color:var(--mecx-color-gray-900)}.mecx-modal-title{font-size:18px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.54px;color:var(--mecx-color-gray-900)}.mecx-modal-subtitle{font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px;color:var(--mecx-color-gray-700)}.mecx-modal-content{display:block;flex-grow:1;box-sizing:border-box;overflow:auto;max-height:65vh;padding:12px;scrollbar-color:var(--mecx-color-gray-400) transparent}.mecx-modal-actions{display:flex;gap:8px;border-top:1px solid var(--mecx-color-gray-200);padding:12px}.mecx-modal-actions.align-start{justify-content:flex-start}.mecx-modal-actions.align-center{justify-content:center}.mecx-modal-actions.align-end{justify-content:flex-end}.mecx-modal-overlay{background:#00000052}\n"] }]
|
|
1738
|
+
}], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.ViewContainerRef }, { type: i1.OverlayRef, decorators: [{
|
|
1739
|
+
type: Optional
|
|
1740
|
+
}] }, { type: MonkeyModalRef, decorators: [{
|
|
1741
|
+
type: Optional
|
|
1742
|
+
}] }] });
|
|
1615
1743
|
|
|
1616
1744
|
/** ************************
|
|
1617
1745
|
* Copyright Monkey Exchange. All Rights Reserved
|
|
1618
1746
|
* This style guide was developed by Monkey Exchange Team
|
|
1619
1747
|
* MIT Licence
|
|
1620
1748
|
************************* */
|
|
1621
|
-
class
|
|
1622
|
-
|
|
1623
|
-
|
|
1749
|
+
class MonkeyModalTitleDirective {
|
|
1750
|
+
constructor() {
|
|
1751
|
+
this.id = inject(IdGenerator).getId('monkey-modal-title-');
|
|
1624
1752
|
}
|
|
1625
|
-
|
|
1626
|
-
|
|
1753
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalTitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1754
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyModalTitleDirective, selector: "monkey-modal-title, [monkey-modal-title]", host: { properties: { "attr.id": "id || null" }, classAttribute: "mecx-modal-title" }, ngImport: i0 }); }
|
|
1755
|
+
}
|
|
1756
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalTitleDirective, decorators: [{
|
|
1757
|
+
type: Directive,
|
|
1758
|
+
args: [{
|
|
1759
|
+
selector: 'monkey-modal-title, [monkey-modal-title]',
|
|
1760
|
+
host: {
|
|
1761
|
+
class: 'mecx-modal-title',
|
|
1762
|
+
'[attr.id]': 'id || null'
|
|
1763
|
+
}
|
|
1764
|
+
}]
|
|
1765
|
+
}] });
|
|
1766
|
+
|
|
1767
|
+
/** ************************
|
|
1768
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
1769
|
+
* This style guide was developed by Monkey Exchange Team
|
|
1770
|
+
* MIT Licence
|
|
1771
|
+
************************* */
|
|
1772
|
+
class MonkeyModalSubtitleDirective {
|
|
1773
|
+
constructor() {
|
|
1774
|
+
this.id = inject(IdGenerator).getId('monkey-modal-subtitle-');
|
|
1627
1775
|
}
|
|
1628
|
-
|
|
1629
|
-
|
|
1776
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalSubtitleDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1777
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyModalSubtitleDirective, selector: "monkey-modal-subtitle, [monkey-modal-subtitle]", host: { properties: { "attr.id": "id || null" }, classAttribute: "mecx-modal-subtitle" }, ngImport: i0 }); }
|
|
1778
|
+
}
|
|
1779
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalSubtitleDirective, decorators: [{
|
|
1780
|
+
type: Directive,
|
|
1781
|
+
args: [{
|
|
1782
|
+
selector: 'monkey-modal-subtitle, [monkey-modal-subtitle]',
|
|
1783
|
+
host: {
|
|
1784
|
+
class: 'mecx-modal-subtitle',
|
|
1785
|
+
'[attr.id]': 'id || null'
|
|
1786
|
+
}
|
|
1787
|
+
}]
|
|
1788
|
+
}] });
|
|
1789
|
+
|
|
1790
|
+
/** ************************
|
|
1791
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
1792
|
+
* This style guide was developed by Monkey Exchange Team
|
|
1793
|
+
* MIT Licence
|
|
1794
|
+
************************* */
|
|
1795
|
+
class MonkeyModalContentDirective {
|
|
1796
|
+
constructor() {
|
|
1797
|
+
this.id = inject(IdGenerator).getId('monkey-modal-content-');
|
|
1630
1798
|
}
|
|
1799
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalContentDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1800
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyModalContentDirective, selector: "monkey-modal-content, [monkey-modal-content]", host: { properties: { "attr.id": "id || null" }, classAttribute: "mecx-modal-content" }, ngImport: i0 }); }
|
|
1801
|
+
}
|
|
1802
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalContentDirective, decorators: [{
|
|
1803
|
+
type: Directive,
|
|
1804
|
+
args: [{
|
|
1805
|
+
selector: 'monkey-modal-content, [monkey-modal-content]',
|
|
1806
|
+
host: {
|
|
1807
|
+
class: 'mecx-modal-content',
|
|
1808
|
+
'[attr.id]': 'id || null'
|
|
1809
|
+
}
|
|
1810
|
+
}]
|
|
1811
|
+
}] });
|
|
1812
|
+
|
|
1813
|
+
/** ************************
|
|
1814
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
1815
|
+
* This style guide was developed by Monkey Exchange Team
|
|
1816
|
+
* MIT Licence
|
|
1817
|
+
************************* */
|
|
1818
|
+
class MonkeyModalActionsDirective {
|
|
1631
1819
|
constructor() {
|
|
1632
|
-
this.
|
|
1633
|
-
this.
|
|
1634
|
-
this.label = input();
|
|
1635
|
-
this._uid = inject(IdGenerator).getId('monkey-status-');
|
|
1636
|
-
// eslint-disable-next-line no-self-assign
|
|
1637
|
-
this.id = this.id;
|
|
1820
|
+
this.mkAlign = 'end';
|
|
1821
|
+
this.id = inject(IdGenerator).getId('monkey-modal-actions-');
|
|
1638
1822
|
}
|
|
1639
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
1640
|
-
static { this.ɵ
|
|
1823
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalActionsDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
1824
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyModalActionsDirective, selector: "monkey-modal-actions, [monkey-modal-actions]", inputs: { mkAlign: "mkAlign" }, host: { properties: { "class": "'mecx-modal-actions align-'+mkAlign", "attr.id": "id || null" } }, ngImport: i0 }); }
|
|
1641
1825
|
}
|
|
1642
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
1643
|
-
type:
|
|
1644
|
-
args: [{
|
|
1645
|
-
|
|
1646
|
-
|
|
1647
|
-
'[
|
|
1648
|
-
|
|
1649
|
-
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
}], id: [{
|
|
1826
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalActionsDirective, decorators: [{
|
|
1827
|
+
type: Directive,
|
|
1828
|
+
args: [{
|
|
1829
|
+
selector: 'monkey-modal-actions, [monkey-modal-actions]',
|
|
1830
|
+
host: {
|
|
1831
|
+
'[class]': `'mecx-modal-actions align-'+mkAlign`,
|
|
1832
|
+
'[attr.id]': 'id || null'
|
|
1833
|
+
}
|
|
1834
|
+
}]
|
|
1835
|
+
}], propDecorators: { mkAlign: [{
|
|
1653
1836
|
type: Input
|
|
1654
1837
|
}] } });
|
|
1655
1838
|
|
|
1839
|
+
class MonkeyModalDefaultComponent {
|
|
1840
|
+
constructor(config, modalRef) {
|
|
1841
|
+
this.config = config;
|
|
1842
|
+
this.modalRef = modalRef;
|
|
1843
|
+
this.title = '';
|
|
1844
|
+
this.subtitle = '';
|
|
1845
|
+
this.content = '';
|
|
1846
|
+
this.cancelLabel = '';
|
|
1847
|
+
this.okLabel = '';
|
|
1848
|
+
// not to do
|
|
1849
|
+
}
|
|
1850
|
+
ngAfterViewInit() {
|
|
1851
|
+
// console.log(this.data);
|
|
1852
|
+
}
|
|
1853
|
+
onSubmit() {
|
|
1854
|
+
this.modalRef.close(true);
|
|
1855
|
+
}
|
|
1856
|
+
onClose() {
|
|
1857
|
+
this.modalRef.close();
|
|
1858
|
+
}
|
|
1859
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalDefaultComponent, deps: [{ token: MECX_MODAL_DEFAULT_CONFIG }, { token: MonkeyModalRef }], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1860
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyModalDefaultComponent, selector: "monkey-modal-default", ngImport: i0, template: `
|
|
1861
|
+
<monkey-modal>
|
|
1862
|
+
<monkey-modal-title [innerHTML]="config.title"></monkey-modal-title>
|
|
1863
|
+
<monkey-modal-subtitle [innerHTML]="config.subtitle"></monkey-modal-subtitle>
|
|
1864
|
+
<monkey-modal-content [innerHTML]="config.content"></monkey-modal-content>
|
|
1865
|
+
<monkey-modal-actions mkAlign="end">
|
|
1866
|
+
<monkey-button type="tertiary" (click)="onClose()">{{ config.cancelLabel }}</monkey-button>
|
|
1867
|
+
<monkey-button type="primary" (click)="onSubmit()">{{ config.okLabel }}</monkey-button>
|
|
1868
|
+
</monkey-modal-actions>
|
|
1869
|
+
</monkey-modal>
|
|
1870
|
+
`, isInline: true, dependencies: [{ kind: "component", type: MonkeyButtonComponent, selector: "monkey-button", inputs: ["disabled", "size", "type", "id"] }, { kind: "component", type: MonkeyModalComponent, selector: "monkey-modal" }, { kind: "directive", type: MonkeyModalTitleDirective, selector: "monkey-modal-title, [monkey-modal-title]" }, { kind: "directive", type: MonkeyModalSubtitleDirective, selector: "monkey-modal-subtitle, [monkey-modal-subtitle]" }, { kind: "directive", type: MonkeyModalContentDirective, selector: "monkey-modal-content, [monkey-modal-content]" }, { kind: "directive", type: MonkeyModalActionsDirective, selector: "monkey-modal-actions, [monkey-modal-actions]", inputs: ["mkAlign"] }] }); }
|
|
1871
|
+
}
|
|
1872
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalDefaultComponent, decorators: [{
|
|
1873
|
+
type: Component,
|
|
1874
|
+
args: [{
|
|
1875
|
+
selector: 'monkey-modal-default',
|
|
1876
|
+
template: `
|
|
1877
|
+
<monkey-modal>
|
|
1878
|
+
<monkey-modal-title [innerHTML]="config.title"></monkey-modal-title>
|
|
1879
|
+
<monkey-modal-subtitle [innerHTML]="config.subtitle"></monkey-modal-subtitle>
|
|
1880
|
+
<monkey-modal-content [innerHTML]="config.content"></monkey-modal-content>
|
|
1881
|
+
<monkey-modal-actions mkAlign="end">
|
|
1882
|
+
<monkey-button type="tertiary" (click)="onClose()">{{ config.cancelLabel }}</monkey-button>
|
|
1883
|
+
<monkey-button type="primary" (click)="onSubmit()">{{ config.okLabel }}</monkey-button>
|
|
1884
|
+
</monkey-modal-actions>
|
|
1885
|
+
</monkey-modal>
|
|
1886
|
+
`
|
|
1887
|
+
}]
|
|
1888
|
+
}], ctorParameters: () => [{ type: undefined, decorators: [{
|
|
1889
|
+
type: Inject,
|
|
1890
|
+
args: [MECX_MODAL_DEFAULT_CONFIG]
|
|
1891
|
+
}] }, { type: MonkeyModalRef, decorators: [{
|
|
1892
|
+
type: Inject,
|
|
1893
|
+
args: [MonkeyModalRef]
|
|
1894
|
+
}] }] });
|
|
1895
|
+
|
|
1656
1896
|
/** ************************
|
|
1657
1897
|
* Copyright Monkey Exchange. All Rights Reserved
|
|
1658
1898
|
* This style guide was developed by Monkey Exchange Team
|
|
1659
1899
|
* MIT Licence
|
|
1660
1900
|
************************* */
|
|
1661
|
-
class
|
|
1662
|
-
get id() {
|
|
1663
|
-
return this._id;
|
|
1664
|
-
}
|
|
1665
|
-
set id(value) {
|
|
1666
|
-
this._id = value || this._uid;
|
|
1667
|
-
}
|
|
1901
|
+
class MonkeyModalConfig {
|
|
1668
1902
|
constructor() {
|
|
1669
|
-
this.
|
|
1670
|
-
this.
|
|
1671
|
-
this.
|
|
1672
|
-
this.
|
|
1673
|
-
|
|
1674
|
-
this.
|
|
1903
|
+
this.panelClass = '';
|
|
1904
|
+
this.hasBackdrop = true;
|
|
1905
|
+
this.backdropClass = 'mecx-modal-overlay';
|
|
1906
|
+
this.disableClose = false;
|
|
1907
|
+
this.width = '';
|
|
1908
|
+
this.height = '';
|
|
1909
|
+
this.data = null;
|
|
1910
|
+
this.closeOnNavigation = true;
|
|
1675
1911
|
}
|
|
1676
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
1677
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyPaginationActionComponent, isStandalone: true, selector: "monkey-pagination-action", inputs: { disabled: "disabled", first: "first", last: "last", next: "next", prev: "prev", id: "id" }, outputs: { onAction: "onAction" }, host: { attributes: { "data-testid": "monkey-pagination-action" }, properties: { "attr.id": "id", "id": "id" } }, exportAs: ["monkeyPaginationAction"], ngImport: i0, template: "<monkey-button\n type=\"secondary\"\n size=\"sm\"\n (click)=\"onAction.next('prev')\"\n [disabled]=\"disabled || !prev\"\n>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M11.670 8.630 C 9.335 10.964,8.550 11.772,8.523 11.870 C 8.501 11.947,8.501 12.053,8.523 12.130 C 8.574 12.316,14.682 18.423,14.870 18.477 C 15.231 18.581,15.581 18.231,15.477 17.869 C 15.450 17.774,14.687 16.987,12.570 14.870 L 9.700 12.000 12.570 9.130 C 14.687 7.013,15.450 6.226,15.477 6.131 C 15.528 5.951,15.464 5.747,15.316 5.623 C 15.219 5.541,15.151 5.520,14.988 5.520 L 14.781 5.520 11.670 8.630 \"\n stroke=\"none\"\n fill-rule=\"evenodd\"\n fill=\"black\"\n ></path>\n </svg>\n</monkey-button>\n\n<monkey-button\n type=\"secondary\"\n size=\"sm\"\n (click)=\"onAction.next('next')\"\n [disabled]=\"disabled || !next\"\n>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M8.751 5.583 C 8.552 5.691,8.459 6.004,8.564 6.213 C 8.588 6.261,9.889 7.583,11.454 9.150 L 14.300 12.000 11.454 14.850 C 9.889 16.418,8.588 17.739,8.564 17.787 C 8.357 18.197,8.823 18.640,9.232 18.423 C 9.363 18.353,15.373 12.337,15.436 12.213 C 15.497 12.092,15.491 11.897,15.423 11.768 C 15.353 11.637,9.337 5.627,9.213 5.564 C 9.092 5.503,8.881 5.512,8.751 5.583 \"\n stroke=\"none\"\n fill-rule=\"evenodd\"\n fill=\"black\"\n ></path>\n </svg>\n</monkey-button>\n", styles: ["monkey-pagination-action{display:flex;align-items:center;gap:8px}monkey-pagination-action monkey-button .mecx-button .content{padding:unset}monkey-pagination-action monkey-button .mecx-button .content span{display:flex;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: MonkeyButtonComponent, selector: "monkey-button", inputs: ["disabled", "size", "type", "id"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
1678
1912
|
}
|
|
1679
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationActionComponent, decorators: [{
|
|
1680
|
-
type: Component,
|
|
1681
|
-
args: [{ standalone: true, imports: [CommonModule, MonkeyButtonComponent], encapsulation: ViewEncapsulation.None, selector: 'monkey-pagination-action', exportAs: 'monkeyPaginationAction', host: {
|
|
1682
|
-
'data-testid': 'monkey-pagination-action',
|
|
1683
|
-
'[attr.id]': 'id',
|
|
1684
|
-
'[id]': 'id'
|
|
1685
|
-
}, template: "<monkey-button\n type=\"secondary\"\n size=\"sm\"\n (click)=\"onAction.next('prev')\"\n [disabled]=\"disabled || !prev\"\n>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M11.670 8.630 C 9.335 10.964,8.550 11.772,8.523 11.870 C 8.501 11.947,8.501 12.053,8.523 12.130 C 8.574 12.316,14.682 18.423,14.870 18.477 C 15.231 18.581,15.581 18.231,15.477 17.869 C 15.450 17.774,14.687 16.987,12.570 14.870 L 9.700 12.000 12.570 9.130 C 14.687 7.013,15.450 6.226,15.477 6.131 C 15.528 5.951,15.464 5.747,15.316 5.623 C 15.219 5.541,15.151 5.520,14.988 5.520 L 14.781 5.520 11.670 8.630 \"\n stroke=\"none\"\n fill-rule=\"evenodd\"\n fill=\"black\"\n ></path>\n </svg>\n</monkey-button>\n\n<monkey-button\n type=\"secondary\"\n size=\"sm\"\n (click)=\"onAction.next('next')\"\n [disabled]=\"disabled || !next\"\n>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M8.751 5.583 C 8.552 5.691,8.459 6.004,8.564 6.213 C 8.588 6.261,9.889 7.583,11.454 9.150 L 14.300 12.000 11.454 14.850 C 9.889 16.418,8.588 17.739,8.564 17.787 C 8.357 18.197,8.823 18.640,9.232 18.423 C 9.363 18.353,15.373 12.337,15.436 12.213 C 15.497 12.092,15.491 11.897,15.423 11.768 C 15.353 11.637,9.337 5.627,9.213 5.564 C 9.092 5.503,8.881 5.512,8.751 5.583 \"\n stroke=\"none\"\n fill-rule=\"evenodd\"\n fill=\"black\"\n ></path>\n </svg>\n</monkey-button>\n", styles: ["monkey-pagination-action{display:flex;align-items:center;gap:8px}monkey-pagination-action monkey-button .mecx-button .content{padding:unset}monkey-pagination-action monkey-button .mecx-button .content span{display:flex;height:100%}\n"] }]
|
|
1686
|
-
}], ctorParameters: () => [], propDecorators: { disabled: [{
|
|
1687
|
-
type: Input
|
|
1688
|
-
}], first: [{
|
|
1689
|
-
type: Input
|
|
1690
|
-
}], last: [{
|
|
1691
|
-
type: Input
|
|
1692
|
-
}], next: [{
|
|
1693
|
-
type: Input,
|
|
1694
|
-
args: [{ required: true }]
|
|
1695
|
-
}], prev: [{
|
|
1696
|
-
type: Input,
|
|
1697
|
-
args: [{ required: true }]
|
|
1698
|
-
}], onAction: [{
|
|
1699
|
-
type: Output
|
|
1700
|
-
}], id: [{
|
|
1701
|
-
type: Input
|
|
1702
|
-
}] } });
|
|
1703
1913
|
|
|
1704
1914
|
/** ************************
|
|
1705
1915
|
* Copyright Monkey Exchange. All Rights Reserved
|
|
1706
1916
|
* This style guide was developed by Monkey Exchange Team
|
|
1707
1917
|
* MIT Licence
|
|
1708
1918
|
************************* */
|
|
1709
|
-
class
|
|
1710
|
-
|
|
1711
|
-
|
|
1919
|
+
class MonkeyModalModule {
|
|
1920
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
|
|
1921
|
+
static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalModule, declarations: [MonkeyModalComponent,
|
|
1922
|
+
MonkeyModalDefaultComponent,
|
|
1923
|
+
MonkeyModalTitleDirective,
|
|
1924
|
+
MonkeyModalSubtitleDirective,
|
|
1925
|
+
MonkeyModalContentDirective,
|
|
1926
|
+
MonkeyModalActionsDirective], imports: [CommonModule, MonkeyButtonComponent, MonkeyIconButtonComponent, MonkeyIconComponent], exports: [MonkeyModalComponent,
|
|
1927
|
+
MonkeyModalTitleDirective,
|
|
1928
|
+
MonkeyModalSubtitleDirective,
|
|
1929
|
+
MonkeyModalContentDirective,
|
|
1930
|
+
MonkeyModalActionsDirective] }); }
|
|
1931
|
+
static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalModule, imports: [CommonModule, MonkeyButtonComponent, MonkeyIconButtonComponent, MonkeyIconComponent] }); }
|
|
1932
|
+
}
|
|
1933
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalModule, decorators: [{
|
|
1934
|
+
type: NgModule,
|
|
1935
|
+
args: [{
|
|
1936
|
+
imports: [CommonModule, MonkeyButtonComponent, MonkeyIconButtonComponent, MonkeyIconComponent],
|
|
1937
|
+
declarations: [
|
|
1938
|
+
MonkeyModalComponent,
|
|
1939
|
+
MonkeyModalDefaultComponent,
|
|
1940
|
+
MonkeyModalTitleDirective,
|
|
1941
|
+
MonkeyModalSubtitleDirective,
|
|
1942
|
+
MonkeyModalContentDirective,
|
|
1943
|
+
MonkeyModalActionsDirective
|
|
1944
|
+
],
|
|
1945
|
+
exports: [
|
|
1946
|
+
MonkeyModalComponent,
|
|
1947
|
+
MonkeyModalTitleDirective,
|
|
1948
|
+
MonkeyModalSubtitleDirective,
|
|
1949
|
+
MonkeyModalContentDirective,
|
|
1950
|
+
MonkeyModalActionsDirective
|
|
1951
|
+
]
|
|
1952
|
+
}]
|
|
1953
|
+
}] });
|
|
1954
|
+
|
|
1955
|
+
/** ************************
|
|
1956
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
1957
|
+
* This style guide was developed by Monkey Exchange Team
|
|
1958
|
+
* MIT Licence
|
|
1959
|
+
************************* */
|
|
1960
|
+
class MonkeyModalService {
|
|
1961
|
+
constructor(overlay, injector) {
|
|
1962
|
+
this.overlay = overlay;
|
|
1963
|
+
this.injector = injector;
|
|
1964
|
+
this._idGenerator = inject(IdGenerator);
|
|
1965
|
+
this._openDialogsAtThisLevel = [];
|
|
1966
|
+
this._parentDialog = inject(MonkeyModalService, { optional: true, skipSelf: true });
|
|
1967
|
+
// not to do
|
|
1712
1968
|
}
|
|
1713
|
-
|
|
1714
|
-
this.
|
|
1969
|
+
get openDialogs() {
|
|
1970
|
+
return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;
|
|
1715
1971
|
}
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1972
|
+
getOverlayConfig(config) {
|
|
1973
|
+
const state = new OverlayConfig({
|
|
1974
|
+
positionStrategy: config?.positionStrategy ||
|
|
1975
|
+
this.overlay.position().global().centerHorizontally().centerVertically(),
|
|
1976
|
+
scrollStrategy: this.overlay.scrollStrategies.block(),
|
|
1977
|
+
panelClass: config.panelClass,
|
|
1978
|
+
hasBackdrop: config.hasBackdrop,
|
|
1979
|
+
minWidth: config.minWidth,
|
|
1980
|
+
minHeight: config.minHeight,
|
|
1981
|
+
maxWidth: config.maxWidth,
|
|
1982
|
+
maxHeight: config.maxHeight,
|
|
1983
|
+
width: config.width,
|
|
1984
|
+
height: config.height,
|
|
1985
|
+
disposeOnNavigation: config.closeOnNavigation
|
|
1986
|
+
});
|
|
1987
|
+
if (config.backdropClass) {
|
|
1988
|
+
state.backdropClass = config.backdropClass;
|
|
1989
|
+
}
|
|
1990
|
+
return state;
|
|
1720
1991
|
}
|
|
1721
|
-
|
|
1722
|
-
|
|
1992
|
+
createInjector(config, dialogRef, overlayRef, fallbackInjector) {
|
|
1993
|
+
const providers = [
|
|
1994
|
+
{ provide: OverlayRef, useValue: overlayRef },
|
|
1995
|
+
{ provide: MonkeyModalRef, useValue: dialogRef },
|
|
1996
|
+
{ provide: MECX_MODAL_DATA, useValue: config.data }
|
|
1997
|
+
];
|
|
1998
|
+
if (config.providers) {
|
|
1999
|
+
providers.push(...config.providers);
|
|
2000
|
+
}
|
|
2001
|
+
return Injector.create({ parent: fallbackInjector, providers });
|
|
2002
|
+
}
|
|
2003
|
+
open(component, config) {
|
|
2004
|
+
const defaultConfig = new MonkeyModalConfig();
|
|
2005
|
+
config = { ...defaultConfig, ...config };
|
|
2006
|
+
config.id = this._idGenerator.getId('monkey-modal-');
|
|
2007
|
+
const overlayConfig = this.getOverlayConfig(config);
|
|
2008
|
+
const overlayRef = this.overlay.create(overlayConfig);
|
|
2009
|
+
const modalRef = new MonkeyModalRef(overlayRef, config);
|
|
2010
|
+
const injector = this.createInjector(config, modalRef, overlayRef, this.injector);
|
|
2011
|
+
const componentPortal = new ComponentPortal(component, null, injector);
|
|
2012
|
+
const componentRef = overlayRef.attach(componentPortal);
|
|
2013
|
+
modalRef.componentInstance = componentRef.instance;
|
|
2014
|
+
this.openDialogs.push(modalRef);
|
|
2015
|
+
return modalRef;
|
|
2016
|
+
}
|
|
2017
|
+
openDefault(params, config) {
|
|
2018
|
+
const providers = [{ provide: MECX_MODAL_DEFAULT_CONFIG, useValue: params }];
|
|
2019
|
+
config.providers = providers;
|
|
2020
|
+
config.icon = config.icon ? config.icon : 'help';
|
|
2021
|
+
return this.open(MonkeyModalDefaultComponent, config);
|
|
2022
|
+
}
|
|
2023
|
+
closeAll() {
|
|
2024
|
+
reverseForEach(this.openDialogs, (dialog) => {
|
|
2025
|
+
return dialog.close();
|
|
2026
|
+
});
|
|
2027
|
+
this.openDialogs.splice(0, this.openDialogs.length);
|
|
2028
|
+
}
|
|
2029
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalService, deps: [{ token: i1.Overlay }, { token: i0.Injector }], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
2030
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalService, providedIn: 'root' }); }
|
|
1723
2031
|
}
|
|
1724
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type:
|
|
1725
|
-
type:
|
|
1726
|
-
args: [{
|
|
1727
|
-
|
|
1728
|
-
'[attr.id]': 'id',
|
|
1729
|
-
'[id]': 'id'
|
|
1730
|
-
}, template: "<ng-content></ng-content>\n", styles: ["monkey-pagination-label{font-size:12px}\n"] }]
|
|
1731
|
-
}], ctorParameters: () => [], propDecorators: { id: [{
|
|
1732
|
-
type: Input
|
|
1733
|
-
}] } });
|
|
2032
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalService, decorators: [{
|
|
2033
|
+
type: Injectable,
|
|
2034
|
+
args: [{ providedIn: 'root' }]
|
|
2035
|
+
}], ctorParameters: () => [{ type: i1.Overlay }, { type: i0.Injector }] });
|
|
1734
2036
|
|
|
1735
2037
|
/** ************************
|
|
1736
2038
|
* Copyright Monkey Exchange. All Rights Reserved
|
|
@@ -1783,6 +2085,58 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
1783
2085
|
args: ['click', ['$event']]
|
|
1784
2086
|
}] } });
|
|
1785
2087
|
|
|
2088
|
+
/** ************************
|
|
2089
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
2090
|
+
* This style guide was developed by Monkey Exchange Team
|
|
2091
|
+
* MIT Licence
|
|
2092
|
+
************************* */
|
|
2093
|
+
class MonkeySecurityLevelComponent {
|
|
2094
|
+
get class() {
|
|
2095
|
+
if (this.score() === 0) {
|
|
2096
|
+
return 'empty';
|
|
2097
|
+
}
|
|
2098
|
+
if (this.score() < 300) {
|
|
2099
|
+
return 'weak';
|
|
2100
|
+
}
|
|
2101
|
+
if (this.score() >= 300 && this.score() < 800) {
|
|
2102
|
+
return 'medium';
|
|
2103
|
+
}
|
|
2104
|
+
if (this.score() >= 800 && this.score() < 1000) {
|
|
2105
|
+
return 'strong';
|
|
2106
|
+
}
|
|
2107
|
+
return 'very-strong';
|
|
2108
|
+
}
|
|
2109
|
+
get id() {
|
|
2110
|
+
return this._id;
|
|
2111
|
+
}
|
|
2112
|
+
set id(value) {
|
|
2113
|
+
this._id = value || this._uid;
|
|
2114
|
+
}
|
|
2115
|
+
constructor() {
|
|
2116
|
+
this.label = input();
|
|
2117
|
+
this.score = input.required();
|
|
2118
|
+
this.strengthLabel = input();
|
|
2119
|
+
this._uid = inject(IdGenerator).getId('monkey-security-level-');
|
|
2120
|
+
// eslint-disable-next-line no-self-assign
|
|
2121
|
+
this.id = this.id;
|
|
2122
|
+
}
|
|
2123
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySecurityLevelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2124
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: MonkeySecurityLevelComponent, isStandalone: true, selector: "monkey-security-level", inputs: { label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, score: { classPropertyName: "score", publicName: "score", isSignal: true, isRequired: true, transformFunction: null }, strengthLabel: { classPropertyName: "strengthLabel", publicName: "strengthLabel", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null } }, host: { attributes: { "data-testid": "monkey-security-level" }, properties: { "attr.id": "id", "id": "id", "class": "this.class" } }, ngImport: i0, template: "<div class=\"body\">\n <div>\n <span data-testid=\"label\" *ngIf=\"label() as lb\">\n {{ lb }}\n </span>\n <span data-testid=\"str-label\" class=\"level-info\" *ngIf=\"strengthLabel() as strLabel\">\n {{ strLabel }}\n </span>\n </div>\n <div class=\"bar\"></div>\n</div>\n", styles: ["monkey-security-level{display:flex;align-items:center;gap:8px;width:100%}monkey-security-level span{color:var(--mecx-color-gray-700);font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px}monkey-security-level .level-info{color:var(--mecx-color-gray-900);margin-left:24px;font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px}monkey-security-level .body{display:flex;flex-direction:column;align-items:baseline;width:100%}monkey-security-level .bar{height:4px;width:100%;max-width:426px;border-radius:8px;background:#d3d6da;position:relative;overflow:hidden}monkey-security-level .bar:before{content:\"\";display:block;position:absolute;height:100%;left:0;top:0;transition:all 1s}monkey-security-level.very-strong .bar:before{background:#00875a;width:100%}monkey-security-level.strong .bar:before{background:#00875a;width:80%}monkey-security-level.medium .bar:before{background:#efa30e;width:66%}monkey-security-level.weak .bar:before{background:#db0505;width:33%}monkey-security-level.empty .bar:before{background:#db0505;width:0%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2125
|
+
}
|
|
2126
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySecurityLevelComponent, decorators: [{
|
|
2127
|
+
type: Component,
|
|
2128
|
+
args: [{ encapsulation: ViewEncapsulation.None, imports: [CommonModule], selector: 'monkey-security-level', standalone: true, host: {
|
|
2129
|
+
'data-testid': 'monkey-security-level',
|
|
2130
|
+
'[attr.id]': 'id',
|
|
2131
|
+
'[id]': 'id'
|
|
2132
|
+
}, template: "<div class=\"body\">\n <div>\n <span data-testid=\"label\" *ngIf=\"label() as lb\">\n {{ lb }}\n </span>\n <span data-testid=\"str-label\" class=\"level-info\" *ngIf=\"strengthLabel() as strLabel\">\n {{ strLabel }}\n </span>\n </div>\n <div class=\"bar\"></div>\n</div>\n", styles: ["monkey-security-level{display:flex;align-items:center;gap:8px;width:100%}monkey-security-level span{color:var(--mecx-color-gray-700);font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px}monkey-security-level .level-info{color:var(--mecx-color-gray-900);margin-left:24px;font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px}monkey-security-level .body{display:flex;flex-direction:column;align-items:baseline;width:100%}monkey-security-level .bar{height:4px;width:100%;max-width:426px;border-radius:8px;background:#d3d6da;position:relative;overflow:hidden}monkey-security-level .bar:before{content:\"\";display:block;position:absolute;height:100%;left:0;top:0;transition:all 1s}monkey-security-level.very-strong .bar:before{background:#00875a;width:100%}monkey-security-level.strong .bar:before{background:#00875a;width:80%}monkey-security-level.medium .bar:before{background:#efa30e;width:66%}monkey-security-level.weak .bar:before{background:#db0505;width:33%}monkey-security-level.empty .bar:before{background:#db0505;width:0%}\n"] }]
|
|
2133
|
+
}], ctorParameters: () => [], propDecorators: { class: [{
|
|
2134
|
+
type: HostBinding,
|
|
2135
|
+
args: ['class']
|
|
2136
|
+
}], id: [{
|
|
2137
|
+
type: Input
|
|
2138
|
+
}] } });
|
|
2139
|
+
|
|
1786
2140
|
/** ************************
|
|
1787
2141
|
* Copyright Monkey Exchange. All Rights Reserved
|
|
1788
2142
|
* This style guide was developed by Monkey Exchange Team
|
|
@@ -2122,6 +2476,125 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
2122
2476
|
type: Input
|
|
2123
2477
|
}] } });
|
|
2124
2478
|
|
|
2479
|
+
/** ************************
|
|
2480
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
2481
|
+
* This style guide was developed by Monkey Exchange Team
|
|
2482
|
+
* MIT Licence
|
|
2483
|
+
************************* */
|
|
2484
|
+
class MonkeyStatusComponent {
|
|
2485
|
+
get class() {
|
|
2486
|
+
return `${this.type()} ${this.size()}`;
|
|
2487
|
+
}
|
|
2488
|
+
get id() {
|
|
2489
|
+
return this._id;
|
|
2490
|
+
}
|
|
2491
|
+
set id(value) {
|
|
2492
|
+
this._id = value || this._uid;
|
|
2493
|
+
}
|
|
2494
|
+
constructor() {
|
|
2495
|
+
this.type = input.required();
|
|
2496
|
+
this.size = input('md');
|
|
2497
|
+
this.label = input();
|
|
2498
|
+
this._uid = inject(IdGenerator).getId('monkey-status-');
|
|
2499
|
+
// eslint-disable-next-line no-self-assign
|
|
2500
|
+
this.id = this.id;
|
|
2501
|
+
}
|
|
2502
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2503
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.1.0", version: "18.2.13", type: MonkeyStatusComponent, isStandalone: true, selector: "monkey-status", inputs: { type: { classPropertyName: "type", publicName: "type", isSignal: true, isRequired: true, transformFunction: null }, size: { classPropertyName: "size", publicName: "size", isSignal: true, isRequired: false, transformFunction: null }, label: { classPropertyName: "label", publicName: "label", isSignal: true, isRequired: false, transformFunction: null }, id: { classPropertyName: "id", publicName: "id", isSignal: false, isRequired: false, transformFunction: null } }, host: { attributes: { "data-testid": "monkey-status" }, properties: { "attr.id": "id", "id": "id", "class": "this.class" } }, ngImport: i0, template: "<div class=\"status\"></div>\n<span *ngIf=\"label() as lb\">\n {{ lb }}\n</span>\n", styles: [":host{display:flex;align-items:center;gap:8px}:host span{color:var(--mecx-color-gray-700);font-style:normal;font-weight:400;line-height:24px}:host .status{width:8px;height:8px;border-radius:50%;flex-shrink:0}:host.sm span{font-size:14px;letter-spacing:.42px}:host.sm .status{height:8px;width:8px}:host.md span{font-size:16px;letter-spacing:.48px}:host.md .status{height:12px;width:12px}:host.lg span{font-size:18px;letter-spacing:.52px}:host.lg .status{height:16px;width:16px}:host.default .status{background-color:var(--mecx-color-gray-300)}:host.success .status{background-color:#00875a}:host.warning .status{background-color:#efa30e}:host.error .status{background-color:#db0505}:host.question .status{background-color:#8d38fa}:host.info .status{background-color:#003687}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
|
|
2504
|
+
}
|
|
2505
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyStatusComponent, decorators: [{
|
|
2506
|
+
type: Component,
|
|
2507
|
+
args: [{ selector: 'monkey-status', standalone: true, imports: [CommonModule], host: {
|
|
2508
|
+
'data-testid': 'monkey-status',
|
|
2509
|
+
'[attr.id]': 'id',
|
|
2510
|
+
'[id]': 'id'
|
|
2511
|
+
}, template: "<div class=\"status\"></div>\n<span *ngIf=\"label() as lb\">\n {{ lb }}\n</span>\n", styles: [":host{display:flex;align-items:center;gap:8px}:host span{color:var(--mecx-color-gray-700);font-style:normal;font-weight:400;line-height:24px}:host .status{width:8px;height:8px;border-radius:50%;flex-shrink:0}:host.sm span{font-size:14px;letter-spacing:.42px}:host.sm .status{height:8px;width:8px}:host.md span{font-size:16px;letter-spacing:.48px}:host.md .status{height:12px;width:12px}:host.lg span{font-size:18px;letter-spacing:.52px}:host.lg .status{height:16px;width:16px}:host.default .status{background-color:var(--mecx-color-gray-300)}:host.success .status{background-color:#00875a}:host.warning .status{background-color:#efa30e}:host.error .status{background-color:#db0505}:host.question .status{background-color:#8d38fa}:host.info .status{background-color:#003687}\n"] }]
|
|
2512
|
+
}], ctorParameters: () => [], propDecorators: { class: [{
|
|
2513
|
+
type: HostBinding,
|
|
2514
|
+
args: ['class']
|
|
2515
|
+
}], id: [{
|
|
2516
|
+
type: Input
|
|
2517
|
+
}] } });
|
|
2518
|
+
|
|
2519
|
+
/** ************************
|
|
2520
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
2521
|
+
* This style guide was developed by Monkey Exchange Team
|
|
2522
|
+
* MIT Licence
|
|
2523
|
+
************************* */
|
|
2524
|
+
class MonkeyPaginationActionComponent {
|
|
2525
|
+
get id() {
|
|
2526
|
+
return this._id;
|
|
2527
|
+
}
|
|
2528
|
+
set id(value) {
|
|
2529
|
+
this._id = value || this._uid;
|
|
2530
|
+
}
|
|
2531
|
+
constructor() {
|
|
2532
|
+
this.next = false;
|
|
2533
|
+
this.prev = false;
|
|
2534
|
+
this.onAction = new EventEmitter();
|
|
2535
|
+
this._uid = inject(IdGenerator).getId('monkey-pagination-action-');
|
|
2536
|
+
// eslint-disable-next-line no-self-assign
|
|
2537
|
+
this.id = this.id;
|
|
2538
|
+
}
|
|
2539
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationActionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2540
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyPaginationActionComponent, isStandalone: true, selector: "monkey-pagination-action", inputs: { disabled: "disabled", first: "first", last: "last", next: "next", prev: "prev", id: "id" }, outputs: { onAction: "onAction" }, host: { attributes: { "data-testid": "monkey-pagination-action" }, properties: { "attr.id": "id", "id": "id" } }, exportAs: ["monkeyPaginationAction"], ngImport: i0, template: "<monkey-button\n type=\"secondary\"\n size=\"sm\"\n (click)=\"onAction.next('prev')\"\n [disabled]=\"disabled || !prev\"\n>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M11.670 8.630 C 9.335 10.964,8.550 11.772,8.523 11.870 C 8.501 11.947,8.501 12.053,8.523 12.130 C 8.574 12.316,14.682 18.423,14.870 18.477 C 15.231 18.581,15.581 18.231,15.477 17.869 C 15.450 17.774,14.687 16.987,12.570 14.870 L 9.700 12.000 12.570 9.130 C 14.687 7.013,15.450 6.226,15.477 6.131 C 15.528 5.951,15.464 5.747,15.316 5.623 C 15.219 5.541,15.151 5.520,14.988 5.520 L 14.781 5.520 11.670 8.630 \"\n stroke=\"none\"\n fill-rule=\"evenodd\"\n fill=\"black\"\n ></path>\n </svg>\n</monkey-button>\n\n<monkey-button\n type=\"secondary\"\n size=\"sm\"\n (click)=\"onAction.next('next')\"\n [disabled]=\"disabled || !next\"\n>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M8.751 5.583 C 8.552 5.691,8.459 6.004,8.564 6.213 C 8.588 6.261,9.889 7.583,11.454 9.150 L 14.300 12.000 11.454 14.850 C 9.889 16.418,8.588 17.739,8.564 17.787 C 8.357 18.197,8.823 18.640,9.232 18.423 C 9.363 18.353,15.373 12.337,15.436 12.213 C 15.497 12.092,15.491 11.897,15.423 11.768 C 15.353 11.637,9.337 5.627,9.213 5.564 C 9.092 5.503,8.881 5.512,8.751 5.583 \"\n stroke=\"none\"\n fill-rule=\"evenodd\"\n fill=\"black\"\n ></path>\n </svg>\n</monkey-button>\n", styles: ["monkey-pagination-action{display:flex;align-items:center;gap:8px}monkey-pagination-action monkey-button .mecx-button .content{padding:unset}monkey-pagination-action monkey-button .mecx-button .content span{display:flex;height:100%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "component", type: MonkeyButtonComponent, selector: "monkey-button", inputs: ["disabled", "size", "type", "id"] }], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2541
|
+
}
|
|
2542
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationActionComponent, decorators: [{
|
|
2543
|
+
type: Component,
|
|
2544
|
+
args: [{ standalone: true, imports: [CommonModule, MonkeyButtonComponent], encapsulation: ViewEncapsulation.None, selector: 'monkey-pagination-action', exportAs: 'monkeyPaginationAction', host: {
|
|
2545
|
+
'data-testid': 'monkey-pagination-action',
|
|
2546
|
+
'[attr.id]': 'id',
|
|
2547
|
+
'[id]': 'id'
|
|
2548
|
+
}, template: "<monkey-button\n type=\"secondary\"\n size=\"sm\"\n (click)=\"onAction.next('prev')\"\n [disabled]=\"disabled || !prev\"\n>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M11.670 8.630 C 9.335 10.964,8.550 11.772,8.523 11.870 C 8.501 11.947,8.501 12.053,8.523 12.130 C 8.574 12.316,14.682 18.423,14.870 18.477 C 15.231 18.581,15.581 18.231,15.477 17.869 C 15.450 17.774,14.687 16.987,12.570 14.870 L 9.700 12.000 12.570 9.130 C 14.687 7.013,15.450 6.226,15.477 6.131 C 15.528 5.951,15.464 5.747,15.316 5.623 C 15.219 5.541,15.151 5.520,14.988 5.520 L 14.781 5.520 11.670 8.630 \"\n stroke=\"none\"\n fill-rule=\"evenodd\"\n fill=\"black\"\n ></path>\n </svg>\n</monkey-button>\n\n<monkey-button\n type=\"secondary\"\n size=\"sm\"\n (click)=\"onAction.next('next')\"\n [disabled]=\"disabled || !next\"\n>\n <svg width=\"24\" height=\"24\" viewBox=\"0 0 24 24\" fill=\"none\" xmlns=\"http://www.w3.org/2000/svg\">\n <path\n d=\"M8.751 5.583 C 8.552 5.691,8.459 6.004,8.564 6.213 C 8.588 6.261,9.889 7.583,11.454 9.150 L 14.300 12.000 11.454 14.850 C 9.889 16.418,8.588 17.739,8.564 17.787 C 8.357 18.197,8.823 18.640,9.232 18.423 C 9.363 18.353,15.373 12.337,15.436 12.213 C 15.497 12.092,15.491 11.897,15.423 11.768 C 15.353 11.637,9.337 5.627,9.213 5.564 C 9.092 5.503,8.881 5.512,8.751 5.583 \"\n stroke=\"none\"\n fill-rule=\"evenodd\"\n fill=\"black\"\n ></path>\n </svg>\n</monkey-button>\n", styles: ["monkey-pagination-action{display:flex;align-items:center;gap:8px}monkey-pagination-action monkey-button .mecx-button .content{padding:unset}monkey-pagination-action monkey-button .mecx-button .content span{display:flex;height:100%}\n"] }]
|
|
2549
|
+
}], ctorParameters: () => [], propDecorators: { disabled: [{
|
|
2550
|
+
type: Input
|
|
2551
|
+
}], first: [{
|
|
2552
|
+
type: Input
|
|
2553
|
+
}], last: [{
|
|
2554
|
+
type: Input
|
|
2555
|
+
}], next: [{
|
|
2556
|
+
type: Input,
|
|
2557
|
+
args: [{ required: true }]
|
|
2558
|
+
}], prev: [{
|
|
2559
|
+
type: Input,
|
|
2560
|
+
args: [{ required: true }]
|
|
2561
|
+
}], onAction: [{
|
|
2562
|
+
type: Output
|
|
2563
|
+
}], id: [{
|
|
2564
|
+
type: Input
|
|
2565
|
+
}] } });
|
|
2566
|
+
|
|
2567
|
+
/** ************************
|
|
2568
|
+
* Copyright Monkey Exchange. All Rights Reserved
|
|
2569
|
+
* This style guide was developed by Monkey Exchange Team
|
|
2570
|
+
* MIT Licence
|
|
2571
|
+
************************* */
|
|
2572
|
+
class MonkeyPaginationLabelComponent {
|
|
2573
|
+
get id() {
|
|
2574
|
+
return this._id;
|
|
2575
|
+
}
|
|
2576
|
+
set id(value) {
|
|
2577
|
+
this._id = value || this._uid;
|
|
2578
|
+
}
|
|
2579
|
+
constructor() {
|
|
2580
|
+
this._uid = inject(IdGenerator).getId('monkey-pagination-label-');
|
|
2581
|
+
// eslint-disable-next-line no-self-assign
|
|
2582
|
+
this.id = this.id;
|
|
2583
|
+
}
|
|
2584
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationLabelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
2585
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyPaginationLabelComponent, isStandalone: true, selector: "monkey-pagination-label", inputs: { id: "id" }, host: { attributes: { "data-testid": "monkey-pagination-label" }, properties: { "attr.id": "id", "id": "id" } }, exportAs: ["monkeyPaginationLabel"], ngImport: i0, template: "<ng-content></ng-content>\n", styles: ["monkey-pagination-label{font-size:12px}\n"], encapsulation: i0.ViewEncapsulation.None }); }
|
|
2586
|
+
}
|
|
2587
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationLabelComponent, decorators: [{
|
|
2588
|
+
type: Component,
|
|
2589
|
+
args: [{ standalone: true, encapsulation: ViewEncapsulation.None, selector: 'monkey-pagination-label', exportAs: 'monkeyPaginationLabel', host: {
|
|
2590
|
+
'data-testid': 'monkey-pagination-label',
|
|
2591
|
+
'[attr.id]': 'id',
|
|
2592
|
+
'[id]': 'id'
|
|
2593
|
+
}, template: "<ng-content></ng-content>\n", styles: ["monkey-pagination-label{font-size:12px}\n"] }]
|
|
2594
|
+
}], ctorParameters: () => [], propDecorators: { id: [{
|
|
2595
|
+
type: Input
|
|
2596
|
+
}] } });
|
|
2597
|
+
|
|
2125
2598
|
/** ************************
|
|
2126
2599
|
* Copyright Monkey Exchange. All Rights Reserved
|
|
2127
2600
|
* This style guide was developed by Monkey Exchange Team
|
|
@@ -3159,5 +3632,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
|
|
|
3159
3632
|
* Generated bundle index. Do not edit.
|
|
3160
3633
|
*/
|
|
3161
3634
|
|
|
3162
|
-
export { MonkeyAccordionComponent, MonkeyAlertComponent, MonkeyBreadcrumbComponent, MonkeyButtonComponent, MonkeyCheckboxComponent, MonkeyColumnChecked, MonkeyColumnExpansible, MonkeyColumnSortable, MonkeyColumnStick, MonkeyDestroyService, MonkeyDirectivesModule, MonkeyDividerComponent, MonkeyError, MonkeyFormFieldComponent, MonkeyFormFieldControl, MonkeyFormFieldModule, MonkeyHelper, MonkeyIconButtonComponent, MonkeyIconComponent, MonkeyIconsService, MonkeyInfo, MonkeyInputCurrencyDirective, MonkeyInputDirective, MonkeyInputModule, MonkeyLabel, MonkeyOptionComponent, MonkeyPaginationActionComponent, MonkeyPaginationLabelComponent, MonkeyPaginationSizeComponent, MonkeyPrefix, MonkeySecurityLevelComponent, MonkeySelectComponent, MonkeyStatusComponent, MonkeySuffix, MonkeyTableComponent, MonkeyTableModule, MonkeyToastComponent, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, ToastRef, getCurrencySymbol, validateType };
|
|
3635
|
+
export { MECX_MODAL_DATA, MECX_MODAL_DEFAULT_CONFIG, MonkeyAccordionComponent, MonkeyAlertComponent, MonkeyBreadcrumbComponent, MonkeyButtonComponent, MonkeyCheckboxComponent, MonkeyColumnChecked, MonkeyColumnExpansible, MonkeyColumnSortable, MonkeyColumnStick, MonkeyDestroyService, MonkeyDirectivesModule, MonkeyDividerComponent, MonkeyError, MonkeyFormFieldComponent, MonkeyFormFieldControl, MonkeyFormFieldModule, MonkeyHelper, MonkeyIconButtonComponent, MonkeyIconComponent, MonkeyIconsService, MonkeyInfo, MonkeyInputCurrencyDirective, MonkeyInputDirective, MonkeyInputModule, MonkeyLabel, MonkeyModalActionsDirective, MonkeyModalComponent, MonkeyModalConfig, MonkeyModalContentDirective, MonkeyModalDefaultComponent, MonkeyModalModule, MonkeyModalRef, MonkeyModalService, MonkeyModalSubtitleDirective, MonkeyModalTitleDirective, MonkeyOptionComponent, MonkeyPaginationActionComponent, MonkeyPaginationLabelComponent, MonkeyPaginationSizeComponent, MonkeyPrefix, MonkeySecurityLevelComponent, MonkeySelectComponent, MonkeyStatusComponent, MonkeySuffix, MonkeyTableComponent, MonkeyTableModule, MonkeyToastComponent, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, ToastRef, getCurrencySymbol, reverseForEach, validateType };
|
|
3163
3636
|
//# sourceMappingURL=monkey-style-guide-v2.mjs.map
|