monkey-style-guide-v2 0.0.21 → 0.0.23

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.
Files changed (94) hide show
  1. package/assets/scss/directives/_index.scss +1 -0
  2. package/assets/scss/directives/_popover.scss +81 -0
  3. package/assets/scss/theme.scss +5 -0
  4. package/esm2022/lib/components/accordion/accordion.component.mjs +11 -20
  5. package/esm2022/lib/components/action-bar/action-bar.component.mjs +3 -3
  6. package/esm2022/lib/components/button/button.component.mjs +6 -2
  7. package/esm2022/lib/components/checkbox/checkbox.component.mjs +9 -13
  8. package/esm2022/lib/components/date-range/date-range.component.mjs +2 -2
  9. package/esm2022/lib/components/form-field/form-field-control.mjs +1 -1
  10. package/esm2022/lib/components/form-field/form-field.component.mjs +15 -18
  11. package/esm2022/lib/components/form-field/form-field.module.mjs +4 -2
  12. package/esm2022/lib/components/icon/icon.component.mjs +4 -4
  13. package/esm2022/lib/components/icon-button/icon-button.component.mjs +2 -2
  14. package/esm2022/lib/components/index.mjs +3 -1
  15. package/esm2022/lib/components/input-phone/index.mjs +7 -0
  16. package/esm2022/lib/components/input-phone/input-phone.component.mjs +324 -0
  17. package/esm2022/lib/components/modal/components/confirmation.component.mjs +68 -0
  18. package/esm2022/lib/components/modal/components/default.mjs +1 -6
  19. package/esm2022/lib/components/modal/modal-config.mjs +2 -3
  20. package/esm2022/lib/components/modal/modal-ref.mjs +9 -2
  21. package/esm2022/lib/components/modal/modal.component.mjs +8 -6
  22. package/esm2022/lib/components/modal/modal.module.mjs +4 -1
  23. package/esm2022/lib/components/modal/modal.service.mjs +44 -31
  24. package/esm2022/lib/components/modal/utils.mjs +2 -1
  25. package/esm2022/lib/components/option/option.component.mjs +21 -5
  26. package/esm2022/lib/components/radio-button/index.mjs +7 -0
  27. package/esm2022/lib/components/radio-button/radio-button.component.mjs +190 -0
  28. package/esm2022/lib/components/security-level/security-level.component.mjs +3 -3
  29. package/esm2022/lib/components/select/select.component.mjs +5 -9
  30. package/esm2022/lib/components/status/status.component.mjs +3 -3
  31. package/esm2022/lib/components/table/components/pagination-size/pagination-size.mjs +2 -2
  32. package/esm2022/lib/components/toast/toast.component.mjs +3 -3
  33. package/esm2022/lib/components/tooltip/tooltip/tooltip.component.mjs +3 -3
  34. package/esm2022/lib/components/tooltip/tooltip.directive.mjs +12 -3
  35. package/esm2022/lib/directives/error.mjs +5 -5
  36. package/esm2022/lib/directives/helper.mjs +5 -5
  37. package/esm2022/lib/directives/index.mjs +2 -1
  38. package/esm2022/lib/directives/info.mjs +5 -5
  39. package/esm2022/lib/directives/label.mjs +5 -5
  40. package/esm2022/lib/directives/module.mjs +41 -35
  41. package/esm2022/lib/directives/popover.mjs +380 -0
  42. package/esm2022/lib/directives/prefix.mjs +5 -5
  43. package/esm2022/lib/directives/suffix.mjs +5 -5
  44. package/esm2022/lib/interfaces/index.mjs +2 -1
  45. package/esm2022/lib/interfaces/popover.mjs +2 -0
  46. package/esm2022/lib/services/dictionary.service.mjs +3 -3
  47. package/esm2022/lib/services/index.mjs +1 -2
  48. package/esm2022/lib/tokens/index.mjs +4 -2
  49. package/esm2022/utils/icon.mjs +277 -0
  50. package/esm2022/utils/index.mjs +2 -1
  51. package/fesm2022/monkey-style-guide-v2.mjs +2019 -828
  52. package/fesm2022/monkey-style-guide-v2.mjs.map +1 -1
  53. package/lib/components/accordion/accordion.component.d.ts +0 -3
  54. package/lib/components/button/button.component.d.ts +2 -0
  55. package/lib/components/checkbox/checkbox.component.d.ts +0 -3
  56. package/lib/components/form-field/form-field-control.d.ts +3 -3
  57. package/lib/components/form-field/form-field.component.d.ts +0 -5
  58. package/lib/components/form-field/form-field.module.d.ts +2 -1
  59. package/lib/components/icon/icon.component.d.ts +1 -1
  60. package/lib/components/index.d.ts +2 -0
  61. package/lib/components/input-phone/index.d.ts +6 -0
  62. package/lib/components/input-phone/input-phone.component.d.ts +68 -0
  63. package/lib/components/modal/components/confirmation.component.d.ts +12 -0
  64. package/lib/components/modal/components/default.d.ts +0 -5
  65. package/lib/components/modal/modal-config.d.ts +10 -6
  66. package/lib/components/modal/modal-ref.d.ts +1 -0
  67. package/lib/components/modal/modal.module.d.ts +10 -9
  68. package/lib/components/modal/modal.service.d.ts +4 -4
  69. package/lib/components/modal/utils.d.ts +3 -1
  70. package/lib/components/option/option.component.d.ts +4 -1
  71. package/lib/components/radio-button/index.d.ts +6 -0
  72. package/lib/components/radio-button/radio-button.component.d.ts +54 -0
  73. package/lib/components/select/select.component.d.ts +0 -3
  74. package/lib/components/tooltip/tooltip.directive.d.ts +1 -0
  75. package/lib/directives/error.d.ts +3 -3
  76. package/lib/directives/helper.d.ts +3 -3
  77. package/lib/directives/index.d.ts +1 -0
  78. package/lib/directives/info.d.ts +3 -3
  79. package/lib/directives/label.d.ts +3 -3
  80. package/lib/directives/module.d.ts +2 -1
  81. package/lib/directives/popover.d.ts +65 -0
  82. package/lib/directives/prefix.d.ts +3 -3
  83. package/lib/directives/suffix.d.ts +3 -3
  84. package/lib/interfaces/index.d.ts +1 -0
  85. package/lib/interfaces/popover.d.ts +7 -0
  86. package/lib/services/index.d.ts +0 -1
  87. package/lib/tokens/index.d.ts +3 -1
  88. package/monkey-style-guide-v2-0.0.23.tgz +0 -0
  89. package/package.json +3 -2
  90. package/utils/icon.d.ts +8 -0
  91. package/utils/index.d.ts +1 -0
  92. package/esm2022/lib/services/icons.service.mjs +0 -56
  93. package/lib/services/icons.service.d.ts +0 -16
  94. package/monkey-style-guide-v2-0.0.21.tgz +0 -0
@@ -1,20 +1,21 @@
1
1
  import { trigger, state, style, transition, animate, keyframes } from '@angular/animations';
2
- import * as i1$1 from '@angular/common';
3
- import { CommonModule, CurrencyPipe, NgTemplateOutlet, DOCUMENT } from '@angular/common';
2
+ import * as i1 from '@angular/common';
3
+ import { CommonModule, NgTemplateOutlet, CurrencyPipe, DOCUMENT } from '@angular/common';
4
4
  import * as i0 from '@angular/core';
5
- import { Injectable, inject, TemplateRef, booleanAttribute, Component, Input, input, ViewEncapsulation, HostBinding, output, effect, HostListener, Directive, NgModule, EventEmitter, DestroyRef, Injector, ChangeDetectorRef, forwardRef, ChangeDetectionStrategy, ContentChildren, Output, InjectionToken, LOCALE_ID, ElementRef, DEFAULT_CURRENCY_CODE, ContentChild, computed, Optional, ViewChildren, ViewChild, Inject } from '@angular/core';
6
- import { DomSanitizer } from '@angular/platform-browser';
7
- import { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
8
- import * as i1 from '@angular/cdk/overlay';
9
- import { OverlayConfig, OverlayRef } from '@angular/cdk/overlay';
5
+ import { Injectable, input, Component, TemplateRef, inject, booleanAttribute, Input, ViewEncapsulation, HostBinding, output, effect, ElementRef, HostListener, Directive, InjectionToken, EventEmitter, Output, ViewContainerRef, NgZone, DestroyRef, Optional, Inject, NgModule, Injector, ChangeDetectorRef, forwardRef, ChangeDetectionStrategy, ContentChildren, LOCALE_ID, DEFAULT_CURRENCY_CODE, ContentChild, computed, ViewChildren, ViewChild } from '@angular/core';
10
6
  import { Router, NavigationStart } from '@angular/router';
11
7
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
12
8
  import * as i2 from '@angular/forms';
13
9
  import { NgControl, FormControlDirective, NgModel, FormControlName, FormGroupDirective, NG_VALUE_ACCESSOR, NG_VALIDATORS, ReactiveFormsModule, FormsModule, Validators } from '@angular/forms';
10
+ import * as i1$1 from '@angular/cdk/overlay';
11
+ import { Overlay, OverlayPositionBuilder, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';
12
+ import { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
13
+ import { filter, BehaviorSubject, map, merge, Subject, debounceTime, Subscription } from 'rxjs';
14
14
  import { format, parseISO, subYears, addYears, subMonths, addMonths, getMonth, getYear, startOfWeek, startOfMonth, endOfWeek, endOfMonth, isSameMonth, isBefore, isAfter, isToday, addDays, isWithinInterval, subDays } from 'date-fns';
15
- import { BehaviorSubject, map, merge, Subject, debounceTime, Subscription } from 'rxjs';
16
15
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
17
16
  import { getSupportedInputTypes } from '@angular/cdk/platform';
17
+ import parsePhoneNumberFromString, { getCountries, getCountryCallingCode, getExampleNumber, AsYouType, isValidPhoneNumber } from 'libphonenumber-js';
18
+ import examples from 'libphonenumber-js/examples.mobile.json';
18
19
  import { hasModifierKey } from '@angular/cdk/keycodes';
19
20
 
20
21
  const counters = {};
@@ -81,141 +82,279 @@ function normalizeStringToSearch(text) {
81
82
  }
82
83
 
83
84
  /* eslint-disable max-len */
84
- /** ************************
85
- * Copyright Monkey Exchange. All Rights Reserved
86
- * This style guide was developed by Monkey Exchange Team
87
- * MIT Licence
88
- ************************* */
89
- class MonkeyIconsService {
85
+ class UtilIconComponent {
90
86
  constructor() {
91
- this._sanitizer = inject(DomSanitizer);
92
- }
93
- handleTrust(icon) {
94
- return this._sanitizer.bypassSecurityTrustHtml(icon);
95
- }
96
- get clear() {
97
- return this.handleTrust(`
98
- <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none"><path d="M7.815 7.277a.802.802 0 0 0-.459.349c-.103.167-.123.529-.038.694.028.055.854.906 1.836 1.89L10.939 12l-1.785 1.79c-.982.985-1.808 1.835-1.836 1.89a.926.926 0 0 0-.051.324c0 .494.414.812.922.707.183-.038.266-.114 2.001-1.844L12 13.062l1.81 1.805c1.731 1.725 1.818 1.806 2 1.844.58.12 1.021-.321.901-.901-.038-.182-.119-.269-1.844-2L13.062 12l1.805-1.81c1.73-1.735 1.806-1.818 1.844-2.001.105-.508-.213-.922-.707-.922a.926.926 0 0 0-.324.051c-.055.028-.905.854-1.89 1.836L12 10.939l-1.79-1.785c-.984-.982-1.826-1.803-1.87-1.825a.99.99 0 0 0-.525-.052" fill-rule="evenodd" fill="var(--mecx-color-gray-900)"/></svg>
99
- `);
100
- }
101
- get calendar() {
102
- return this.handleTrust(`
103
- <svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M7.815 1.277a.8.8 0 0 0-.462.354c-.087.139-.094.198-.107.875l-.013.725-1.347.019c-1.236.018-1.371.026-1.646.107A2.807 2.807 0 0 0 2.352 5.26l-.092.32v13.84l.092.32a2.797 2.797 0 0 0 1.908 1.908l.32.092h14.84l.32-.092a2.797 2.797 0 0 0 1.908-1.908l.092-.32V5.58l-.092-.32a2.807 2.807 0 0 0-1.888-1.903c-.276-.081-.41-.089-1.65-.107l-1.35-.019v-.593c0-.757-.042-.96-.238-1.156-.349-.349-.903-.279-1.169.149-.087.139-.094.198-.107.879l-.014.73H8.76l-.001-.61c-.001-.68-.039-.91-.179-1.094-.159-.209-.502-.325-.765-.259M7.246 5.49c.013.681.02.74.107.879.357.574 1.223.443 1.363-.207.024-.113.044-.475.044-.804V4.76h6.472l.014.73c.013.681.02.74.107.879.357.574 1.223.443 1.363-.207.024-.113.044-.475.044-.804V4.76h1.238c1.452 0 1.525.014 1.876.366.352.351.366.424.366 1.876V8.24H3.756l.012-1.31c.012-1.277.014-1.314.104-1.482.155-.29.475-.562.768-.651.055-.016.661-.032 1.346-.034l1.246-.003.014.73m12.994 9.008c0 4.664-.001 4.742-.081 4.956-.109.29-.415.596-.705.705-.215.08-.28.081-7.454.081-7.159 0-7.239-.001-7.453-.081-.245-.091-.544-.363-.679-.615l-.088-.164-.011-4.81-.01-4.81H20.24v4.738M6.7 12.028a.967.967 0 0 0-.24.126.992.992 0 0 0 .097 1.695 1.005 1.005 0 0 0 1.352-.427c.096-.185.114-.59.035-.797a1.104 1.104 0 0 0-.521-.549c-.154-.07-.507-.094-.723-.048m5 0a.967.967 0 0 0-.24.126.992.992 0 0 0 .097 1.695 1.005 1.005 0 0 0 1.352-.427c.096-.185.114-.59.035-.797a1.104 1.104 0 0 0-.521-.549c-.154-.07-.507-.094-.723-.048m5 0a.967.967 0 0 0-.24.126.992.992 0 0 0 .097 1.695 1.005 1.005 0 0 0 1.352-.427c.096-.185.114-.59.035-.797a1.104 1.104 0 0 0-.521-.549c-.154-.07-.507-.094-.723-.048m-10 4a.967.967 0 0 0-.24.126.992.992 0 0 0 .097 1.695 1.005 1.005 0 0 0 1.352-.427c.096-.185.114-.59.035-.797a1.104 1.104 0 0 0-.521-.549c-.154-.07-.507-.094-.723-.048m5 0a.967.967 0 0 0-.24.126.992.992 0 0 0 .097 1.695 1.005 1.005 0 0 0 1.352-.427c.096-.185.114-.59.035-.797a1.104 1.104 0 0 0-.521-.549c-.154-.07-.507-.094-.723-.048" fill-rule="evenodd" fill="var(--mecx-color-gray-900)"/></svg>
104
- `);
105
- }
106
- get arrowDown() {
107
- return this.handleTrust(`
108
- <svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M8 10L12 14L16 10" stroke="var(--mecx-color-gray-900)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>
109
- `);
110
- }
111
- get check() {
112
- return this.handleTrust(`<svg width="12" height="12" viewBox="0 0 12 12" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M9.808 2.528 C 9.752 2.542,9.671 2.574,9.628 2.599 C 9.585 2.625,8.414 3.781,7.025 5.168 L 4.500 7.690 3.475 6.667 C 2.865 6.059,2.414 5.624,2.360 5.594 C 2.137 5.467,1.822 5.478,1.603 5.620 C 1.226 5.863,1.141 6.369,1.419 6.715 C 1.558 6.887,4.068 9.375,4.140 9.411 C 4.366 9.525,4.634 9.525,4.860 9.411 C 4.931 9.376,10.438 3.892,10.581 3.715 C 10.688 3.582,10.742 3.425,10.742 3.250 C 10.742 2.758,10.293 2.410,9.808 2.528 " stroke="none" fill-rule="evenodd" fill="var(--mecx-color-theme-contrast-500"></path></svg>`);
113
- }
114
- get minus() {
115
- return this.handleTrust(`<svg width="8" height="2" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M1.333 0.268 C 1.300 0.274,1.225 0.303,1.167 0.332 C 1.054 0.388,0.939 0.490,0.866 0.599 C 0.776 0.732,0.732 0.936,0.757 1.098 C 0.786 1.283,0.848 1.405,0.977 1.532 C 1.071 1.624,1.148 1.673,1.253 1.710 L 1.340 1.740 4.000 1.740 L 6.660 1.740 6.747 1.710 C 6.943 1.642,7.128 1.462,7.200 1.270 C 7.265 1.095,7.265 0.904,7.200 0.730 C 7.118 0.510,6.880 0.308,6.655 0.267 C 6.565 0.250,1.420 0.251,1.333 0.268" stroke="none" fill-rule="evenodd" fill="var(--mecx-color-theme-contrast-500"></path></svg>`);
116
- }
117
- get loading() {
118
- return this.handleTrust(`<svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><style>.spinner_ajPY{transform-origin:center;animation:spinner_AtaB .75s infinite linear}@keyframes spinner_AtaB{100%{transform:rotate(360deg)}}</style><path d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z" opacity=".25"/><path d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z" class="spinner_ajPY"/></svg>`);
119
- }
120
- get searchFail() {
121
- return this.handleTrust('<svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg"><path clip-rule="evenodd" d="M18.934 11.467v0c0 4.124-3.343 7.467-7.467 7.467v0C7.343 18.934 4 15.591 4 11.467v0C4 7.343 7.343 4 11.467 4v0c4.124 0 7.467 3.343 7.467 7.467Z" stroke="var(--mecx-color-gray-900)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/><path d="m20 20-3.25-3.25M13.815 9.11914 9.119 13.8151M13.815 13.8151 9.119 9.11914" stroke="var(--mecx-color-gray-900)" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round"/></svg>');
122
- }
123
- get search() {
124
- return this.handleTrust('<svg width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M6.920 1.521 C 4.175 1.717,1.944 3.809,1.558 6.548 C 1.500 6.965,1.500 7.722,1.558 8.120 C 1.945 10.745,3.921 12.721,6.547 13.108 C 6.735 13.136,7.016 13.152,7.333 13.152 C 7.885 13.152,8.225 13.111,8.738 12.985 C 9.504 12.797,10.253 12.439,10.859 11.972 C 10.972 11.885,11.074 11.813,11.085 11.813 C 11.097 11.813,11.677 12.384,12.373 13.082 C 13.070 13.779,13.691 14.381,13.754 14.418 C 14.182 14.673,14.673 14.182,14.418 13.754 C 14.381 13.691,13.779 13.070,13.082 12.373 C 12.384 11.677,11.813 11.097,11.813 11.085 C 11.813 11.074,11.885 10.972,11.972 10.859 C 12.439 10.253,12.797 9.504,12.985 8.738 C 13.111 8.225,13.152 7.885,13.152 7.333 C 13.152 6.782,13.111 6.441,12.985 5.928 C 12.471 3.841,10.826 2.196,8.738 1.681 C 8.150 1.536,7.501 1.479,6.920 1.521 M8.277 2.586 C 10.023 2.962,11.414 4.208,11.943 5.870 C 12.118 6.421,12.145 6.615,12.145 7.333 C 12.145 8.052,12.118 8.246,11.943 8.797 C 11.473 10.272,10.272 11.473,8.797 11.943 C 8.246 12.118,8.052 12.145,7.333 12.145 C 6.615 12.145,6.421 12.118,5.870 11.943 C 4.394 11.473,3.193 10.272,2.724 8.797 C 2.547 8.242,2.521 8.052,2.522 7.333 C 2.522 6.615,2.549 6.419,2.724 5.870 C 3.244 4.236,4.636 2.971,6.320 2.602 C 6.679 2.523,6.858 2.510,7.440 2.520 C 7.898 2.527,8.066 2.540,8.277 2.586 " stroke="none" fill-rule="evenodd" fill="var(--mecx-color-gray-900)"></path></svg>');
87
+ this.name = input.required();
88
+ }
89
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UtilIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
90
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: UtilIconComponent, isStandalone: true, selector: "util-icon", inputs: { name: { classPropertyName: "name", publicName: "name", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0, template: `
91
+ @switch (name()) {
92
+ @case ('clear') {
93
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none">
94
+ <path
95
+ d="M7.815 7.277a.802.802 0 0 0-.459.349c-.103.167-.123.529-.038.694.028.055.854.906 1.836 1.89L10.939 12l-1.785 1.79c-.982.985-1.808 1.835-1.836 1.89a.926.926 0 0 0-.051.324c0 .494.414.812.922.707.183-.038.266-.114 2.001-1.844L12 13.062l1.81 1.805c1.731 1.725 1.818 1.806 2 1.844.58.12 1.021-.321.901-.901-.038-.182-.119-.269-1.844-2L13.062 12l1.805-1.81c1.73-1.735 1.806-1.818 1.844-2.001.105-.508-.213-.922-.707-.922a.926.926 0 0 0-.324.051c-.055.028-.905.854-1.89 1.836L12 10.939l-1.79-1.785c-.984-.982-1.826-1.803-1.87-1.825a.99.99 0 0 0-.525-.052"
96
+ fill-rule="evenodd"
97
+ fill="var(--mecx-color-gray-900)"
98
+ />
99
+ </svg>
100
+ }
101
+
102
+ @case ('calendar') {
103
+ <svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
104
+ <path
105
+ d="M7.815 1.277a.8.8 0 0 0-.462.354c-.087.139-.094.198-.107.875l-.013.725-1.347.019c-1.236.018-1.371.026-1.646.107A2.807 2.807 0 0 0 2.352 5.26l-.092.32v13.84l.092.32a2.797 2.797 0 0 0 1.908 1.908l.32.092h14.84l.32-.092a2.797 2.797 0 0 0 1.908-1.908l.092-.32V5.58l-.092-.32a2.807 2.807 0 0 0-1.888-1.903c-.276-.081-.41-.089-1.65-.107l-1.35-.019v-.593c0-.757-.042-.96-.238-1.156-.349-.349-.903-.279-1.169.149-.087.139-.094.198-.107.879l-.014.73H8.76l-.001-.61c-.001-.68-.039-.91-.179-1.094-.159-.209-.502-.325-.765-.259M7.246 5.49c.013.681.02.74.107.879.357.574 1.223.443 1.363-.207.024-.113.044-.475.044-.804V4.76h6.472l.014.73c.013.681.02.74.107.879.357.574 1.223.443 1.363-.207.024-.113.044-.475.044-.804V4.76h1.238c1.452 0 1.525.014 1.876.366.352.351.366.424.366 1.876V8.24H3.756l.012-1.31c.012-1.277.014-1.314.104-1.482.155-.29.475-.562.768-.651.055-.016.661-.032 1.346-.034l1.246-.003.014.73m12.994 9.008c0 4.664-.001 4.742-.081 4.956-.109.29-.415.596-.705.705-.215.08-.28.081-7.454.081-7.159 0-7.239-.001-7.453-.081-.245-.091-.544-.363-.679-.615l-.088-.164-.011-4.81-.01-4.81H20.24v4.738M6.7 12.028a.967.967 0 0 0-.24.126.992.992 0 0 0 .097 1.695 1.005 1.005 0 0 0 1.352-.427c.096-.185.114-.59.035-.797a1.104 1.104 0 0 0-.521-.549c-.154-.07-.507-.094-.723-.048m5 0a.967.967 0 0 0-.24.126.992.992 0 0 0 .097 1.695 1.005 1.005 0 0 0 1.352-.427c.096-.185.114-.59.035-.797a1.104 1.104 0 0 0-.521-.549c-.154-.07-.507-.094-.723-.048m5 0a.967.967 0 0 0-.24.126.992.992 0 0 0 .097 1.695 1.005 1.005 0 0 0 1.352-.427c.096-.185.114-.59.035-.797a1.104 1.104 0 0 0-.521-.549c-.154-.07-.507-.094-.723-.048m-10 4a.967.967 0 0 0-.24.126.992.992 0 0 0 .097 1.695 1.005 1.005 0 0 0 1.352-.427c.096-.185.114-.59.035-.797a1.104 1.104 0 0 0-.521-.549c-.154-.07-.507-.094-.723-.048m5 0a.967.967 0 0 0-.24.126.992.992 0 0 0 .097 1.695 1.005 1.005 0 0 0 1.352-.427c.096-.185.114-.59.035-.797a1.104 1.104 0 0 0-.521-.549c-.154-.07-.507-.094-.723-.048"
106
+ fill-rule="evenodd"
107
+ fill="var(--mecx-color-gray-900)"
108
+ />
109
+ </svg>
110
+ }
111
+
112
+ @case ('arrowDown') {
113
+ <svg
114
+ width="24"
115
+ height="24"
116
+ viewBox="0 0 24 24"
117
+ fill="none"
118
+ xmlns="http://www.w3.org/2000/svg"
119
+ >
120
+ <path
121
+ d="M8 10L12 14L16 10"
122
+ stroke="var(--mecx-color-gray-900)"
123
+ stroke-width="1.5"
124
+ stroke-linecap="round"
125
+ stroke-linejoin="round"
126
+ />
127
+ </svg>
128
+ }
129
+
130
+ @case ('check') {
131
+ <svg
132
+ width="12"
133
+ height="12"
134
+ viewBox="0 0 12 12"
135
+ fill="none"
136
+ xmlns="http://www.w3.org/2000/svg"
137
+ >
138
+ <path
139
+ d="M9.808 2.528 C 9.752 2.542,9.671 2.574,9.628 2.599 C 9.585 2.625,8.414 3.781,7.025 5.168 L 4.500 7.690 3.475 6.667 C 2.865 6.059,2.414 5.624,2.360 5.594 C 2.137 5.467,1.822 5.478,1.603 5.620 C 1.226 5.863,1.141 6.369,1.419 6.715 C 1.558 6.887,4.068 9.375,4.140 9.411 C 4.366 9.525,4.634 9.525,4.860 9.411 C 4.931 9.376,10.438 3.892,10.581 3.715 C 10.688 3.582,10.742 3.425,10.742 3.250 C 10.742 2.758,10.293 2.410,9.808 2.528 "
140
+ stroke="none"
141
+ fill-rule="evenodd"
142
+ fill="var(--mecx-color-theme-contrast-500"
143
+ ></path>
144
+ </svg>
145
+ }
146
+
147
+ @case ('minus') {
148
+ <svg width="8" height="2" fill="none" xmlns="http://www.w3.org/2000/svg">
149
+ <path
150
+ d="M1.333 0.268 C 1.300 0.274,1.225 0.303,1.167 0.332 C 1.054 0.388,0.939 0.490,0.866 0.599 C 0.776 0.732,0.732 0.936,0.757 1.098 C 0.786 1.283,0.848 1.405,0.977 1.532 C 1.071 1.624,1.148 1.673,1.253 1.710 L 1.340 1.740 4.000 1.740 L 6.660 1.740 6.747 1.710 C 6.943 1.642,7.128 1.462,7.200 1.270 C 7.265 1.095,7.265 0.904,7.200 0.730 C 7.118 0.510,6.880 0.308,6.655 0.267 C 6.565 0.250,1.420 0.251,1.333 0.268"
151
+ stroke="none"
152
+ fill-rule="evenodd"
153
+ fill="var(--mecx-color-theme-contrast-500"
154
+ ></path>
155
+ </svg>
156
+ }
157
+
158
+ @case ('loading') {
159
+ <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
160
+ <style>
161
+ .spinner_ajPY {
162
+ transform-origin: center;
163
+ animation: spinner_AtaB 0.75s infinite linear;
164
+ }
165
+ @keyframes spinner_AtaB {
166
+ 100% {
167
+ transform: rotate(360deg);
168
+ }
169
+ }
170
+ </style>
171
+ <path
172
+ d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z"
173
+ opacity=".25"
174
+ />
175
+ <path
176
+ d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z"
177
+ class="spinner_ajPY"
178
+ />
179
+ </svg>
180
+ }
181
+
182
+ @case ('searchFail') {
183
+ <svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
184
+ <path
185
+ clip-rule="evenodd"
186
+ d="M18.934 11.467v0c0 4.124-3.343 7.467-7.467 7.467v0C7.343 18.934 4 15.591 4 11.467v0C4 7.343 7.343 4 11.467 4v0c4.124 0 7.467 3.343 7.467 7.467Z"
187
+ stroke="var(--mecx-color-gray-900)"
188
+ stroke-width="1.5"
189
+ stroke-linecap="round"
190
+ stroke-linejoin="round"
191
+ />
192
+ <path
193
+ d="m20 20-3.25-3.25M13.815 9.11914 9.119 13.8151M13.815 13.8151 9.119 9.11914"
194
+ stroke="var(--mecx-color-gray-900)"
195
+ stroke-width="1.5"
196
+ stroke-linecap="round"
197
+ stroke-linejoin="round"
198
+ />
199
+ </svg>
200
+ }
201
+
202
+ @case ('search') {
203
+ <svg
204
+ width="16"
205
+ height="16"
206
+ viewBox="0 0 16 16"
207
+ fill="none"
208
+ xmlns="http://www.w3.org/2000/svg"
209
+ >
210
+ <path
211
+ d="M6.920 1.521 C 4.175 1.717,1.944 3.809,1.558 6.548 C 1.500 6.965,1.500 7.722,1.558 8.120 C 1.945 10.745,3.921 12.721,6.547 13.108 C 6.735 13.136,7.016 13.152,7.333 13.152 C 7.885 13.152,8.225 13.111,8.738 12.985 C 9.504 12.797,10.253 12.439,10.859 11.972 C 10.972 11.885,11.074 11.813,11.085 11.813 C 11.097 11.813,11.677 12.384,12.373 13.082 C 13.070 13.779,13.691 14.381,13.754 14.418 C 14.182 14.673,14.673 14.182,14.418 13.754 C 14.381 13.691,13.779 13.070,13.082 12.373 C 12.384 11.677,11.813 11.097,11.813 11.085 C 11.813 11.074,11.885 10.972,11.972 10.859 C 12.439 10.253,12.797 9.504,12.985 8.738 C 13.111 8.225,13.152 7.885,13.152 7.333 C 13.152 6.782,13.111 6.441,12.985 5.928 C 12.471 3.841,10.826 2.196,8.738 1.681 C 8.150 1.536,7.501 1.479,6.920 1.521 M8.277 2.586 C 10.023 2.962,11.414 4.208,11.943 5.870 C 12.118 6.421,12.145 6.615,12.145 7.333 C 12.145 8.052,12.118 8.246,11.943 8.797 C 11.473 10.272,10.272 11.473,8.797 11.943 C 8.246 12.118,8.052 12.145,7.333 12.145 C 6.615 12.145,6.421 12.118,5.870 11.943 C 4.394 11.473,3.193 10.272,2.724 8.797 C 2.547 8.242,2.521 8.052,2.522 7.333 C 2.522 6.615,2.549 6.419,2.724 5.870 C 3.244 4.236,4.636 2.971,6.320 2.602 C 6.679 2.523,6.858 2.510,7.440 2.520 C 7.898 2.527,8.066 2.540,8.277 2.586 "
212
+ stroke="none"
213
+ fill-rule="evenodd"
214
+ fill="var(--mecx-color-gray-900)"
215
+ ></path>
216
+ </svg>
217
+ }
125
218
  }
126
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconsService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
127
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconsService, providedIn: 'root' }); }
219
+ `, isInline: true }); }
128
220
  }
129
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconsService, decorators: [{
130
- type: Injectable,
221
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: UtilIconComponent, decorators: [{
222
+ type: Component,
131
223
  args: [{
132
- providedIn: 'root'
133
- }]
134
- }] });
224
+ selector: 'util-icon',
225
+ standalone: true,
226
+ template: `
227
+ @switch (name()) {
228
+ @case ('clear') {
229
+ <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="none">
230
+ <path
231
+ d="M7.815 7.277a.802.802 0 0 0-.459.349c-.103.167-.123.529-.038.694.028.055.854.906 1.836 1.89L10.939 12l-1.785 1.79c-.982.985-1.808 1.835-1.836 1.89a.926.926 0 0 0-.051.324c0 .494.414.812.922.707.183-.038.266-.114 2.001-1.844L12 13.062l1.81 1.805c1.731 1.725 1.818 1.806 2 1.844.58.12 1.021-.321.901-.901-.038-.182-.119-.269-1.844-2L13.062 12l1.805-1.81c1.73-1.735 1.806-1.818 1.844-2.001.105-.508-.213-.922-.707-.922a.926.926 0 0 0-.324.051c-.055.028-.905.854-1.89 1.836L12 10.939l-1.79-1.785c-.984-.982-1.826-1.803-1.87-1.825a.99.99 0 0 0-.525-.052"
232
+ fill-rule="evenodd"
233
+ fill="var(--mecx-color-gray-900)"
234
+ />
235
+ </svg>
236
+ }
135
237
 
136
- class MonkeyToastRef {
137
- constructor(componentRef) {
138
- this.componentRef = componentRef;
139
- // not to do
140
- }
141
- close() {
142
- this.componentRef.instance.close();
143
- }
144
- }
238
+ @case ('calendar') {
239
+ <svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
240
+ <path
241
+ d="M7.815 1.277a.8.8 0 0 0-.462.354c-.087.139-.094.198-.107.875l-.013.725-1.347.019c-1.236.018-1.371.026-1.646.107A2.807 2.807 0 0 0 2.352 5.26l-.092.32v13.84l.092.32a2.797 2.797 0 0 0 1.908 1.908l.32.092h14.84l.32-.092a2.797 2.797 0 0 0 1.908-1.908l.092-.32V5.58l-.092-.32a2.807 2.807 0 0 0-1.888-1.903c-.276-.081-.41-.089-1.65-.107l-1.35-.019v-.593c0-.757-.042-.96-.238-1.156-.349-.349-.903-.279-1.169.149-.087.139-.094.198-.107.879l-.014.73H8.76l-.001-.61c-.001-.68-.039-.91-.179-1.094-.159-.209-.502-.325-.765-.259M7.246 5.49c.013.681.02.74.107.879.357.574 1.223.443 1.363-.207.024-.113.044-.475.044-.804V4.76h6.472l.014.73c.013.681.02.74.107.879.357.574 1.223.443 1.363-.207.024-.113.044-.475.044-.804V4.76h1.238c1.452 0 1.525.014 1.876.366.352.351.366.424.366 1.876V8.24H3.756l.012-1.31c.012-1.277.014-1.314.104-1.482.155-.29.475-.562.768-.651.055-.016.661-.032 1.346-.034l1.246-.003.014.73m12.994 9.008c0 4.664-.001 4.742-.081 4.956-.109.29-.415.596-.705.705-.215.08-.28.081-7.454.081-7.159 0-7.239-.001-7.453-.081-.245-.091-.544-.363-.679-.615l-.088-.164-.011-4.81-.01-4.81H20.24v4.738M6.7 12.028a.967.967 0 0 0-.24.126.992.992 0 0 0 .097 1.695 1.005 1.005 0 0 0 1.352-.427c.096-.185.114-.59.035-.797a1.104 1.104 0 0 0-.521-.549c-.154-.07-.507-.094-.723-.048m5 0a.967.967 0 0 0-.24.126.992.992 0 0 0 .097 1.695 1.005 1.005 0 0 0 1.352-.427c.096-.185.114-.59.035-.797a1.104 1.104 0 0 0-.521-.549c-.154-.07-.507-.094-.723-.048m5 0a.967.967 0 0 0-.24.126.992.992 0 0 0 .097 1.695 1.005 1.005 0 0 0 1.352-.427c.096-.185.114-.59.035-.797a1.104 1.104 0 0 0-.521-.549c-.154-.07-.507-.094-.723-.048m-10 4a.967.967 0 0 0-.24.126.992.992 0 0 0 .097 1.695 1.005 1.005 0 0 0 1.352-.427c.096-.185.114-.59.035-.797a1.104 1.104 0 0 0-.521-.549c-.154-.07-.507-.094-.723-.048m5 0a.967.967 0 0 0-.24.126.992.992 0 0 0 .097 1.695 1.005 1.005 0 0 0 1.352-.427c.096-.185.114-.59.035-.797a1.104 1.104 0 0 0-.521-.549c-.154-.07-.507-.094-.723-.048"
242
+ fill-rule="evenodd"
243
+ fill="var(--mecx-color-gray-900)"
244
+ />
245
+ </svg>
246
+ }
145
247
 
146
- class MonkeyToastService {
147
- constructor(overlay) {
148
- this.overlay = overlay;
149
- // no to do
150
- }
151
- getPositionStrategy(position) {
152
- const globalPosition = this.overlay.position().global();
153
- switch (position) {
154
- case 'top-left':
155
- return globalPosition.top('40px').start('40px');
156
- case 'top-center':
157
- return globalPosition.top('40px').centerHorizontally();
158
- case 'top-right':
159
- return globalPosition.top('40px').end('40px');
160
- case 'bottom-left':
161
- return globalPosition.bottom('40px').start('40px');
162
- case 'bottom-center':
163
- return globalPosition.bottom('40px').centerHorizontally();
164
- default:
165
- return globalPosition.bottom('40px').end('40px');
166
- }
167
- }
168
- show(toastConfig) {
169
- if (this.lastToast) {
170
- this.lastToast.close();
171
- }
172
- const overlayRef = this.overlay.create({
173
- hasBackdrop: false,
174
- positionStrategy: this.getPositionStrategy(toastConfig.position)
175
- });
176
- const portal = new ComponentPortal(MonkeyToastComponent);
177
- const componentRef = overlayRef.attach(portal);
178
- this.lastToast = new MonkeyToastRef(componentRef);
179
- componentRef.instance.id = getRandomString(6);
180
- componentRef.instance.type = toastConfig.type ?? 'default';
181
- componentRef.instance.icon = toastConfig.icon;
182
- componentRef.instance.isClosable = toastConfig.isClosable ?? false;
183
- componentRef.instance.message = toastConfig.message;
184
- componentRef.instance.actionLabel = toastConfig.actionLabel;
185
- componentRef.instance.actionIcon = toastConfig.actionIcon;
186
- componentRef.instance.onActionClick.subscribe(() => {
187
- if (toastConfig.action) {
188
- toastConfig.action();
189
- if (toastConfig.closeOnAction ?? true) {
190
- componentRef.instance.close();
191
- }
248
+ @case ('arrowDown') {
249
+ <svg
250
+ width="24"
251
+ height="24"
252
+ viewBox="0 0 24 24"
253
+ fill="none"
254
+ xmlns="http://www.w3.org/2000/svg"
255
+ >
256
+ <path
257
+ d="M8 10L12 14L16 10"
258
+ stroke="var(--mecx-color-gray-900)"
259
+ stroke-width="1.5"
260
+ stroke-linecap="round"
261
+ stroke-linejoin="round"
262
+ />
263
+ </svg>
264
+ }
265
+
266
+ @case ('check') {
267
+ <svg
268
+ width="12"
269
+ height="12"
270
+ viewBox="0 0 12 12"
271
+ fill="none"
272
+ xmlns="http://www.w3.org/2000/svg"
273
+ >
274
+ <path
275
+ d="M9.808 2.528 C 9.752 2.542,9.671 2.574,9.628 2.599 C 9.585 2.625,8.414 3.781,7.025 5.168 L 4.500 7.690 3.475 6.667 C 2.865 6.059,2.414 5.624,2.360 5.594 C 2.137 5.467,1.822 5.478,1.603 5.620 C 1.226 5.863,1.141 6.369,1.419 6.715 C 1.558 6.887,4.068 9.375,4.140 9.411 C 4.366 9.525,4.634 9.525,4.860 9.411 C 4.931 9.376,10.438 3.892,10.581 3.715 C 10.688 3.582,10.742 3.425,10.742 3.250 C 10.742 2.758,10.293 2.410,9.808 2.528 "
276
+ stroke="none"
277
+ fill-rule="evenodd"
278
+ fill="var(--mecx-color-theme-contrast-500"
279
+ ></path>
280
+ </svg>
281
+ }
282
+
283
+ @case ('minus') {
284
+ <svg width="8" height="2" fill="none" xmlns="http://www.w3.org/2000/svg">
285
+ <path
286
+ d="M1.333 0.268 C 1.300 0.274,1.225 0.303,1.167 0.332 C 1.054 0.388,0.939 0.490,0.866 0.599 C 0.776 0.732,0.732 0.936,0.757 1.098 C 0.786 1.283,0.848 1.405,0.977 1.532 C 1.071 1.624,1.148 1.673,1.253 1.710 L 1.340 1.740 4.000 1.740 L 6.660 1.740 6.747 1.710 C 6.943 1.642,7.128 1.462,7.200 1.270 C 7.265 1.095,7.265 0.904,7.200 0.730 C 7.118 0.510,6.880 0.308,6.655 0.267 C 6.565 0.250,1.420 0.251,1.333 0.268"
287
+ stroke="none"
288
+ fill-rule="evenodd"
289
+ fill="var(--mecx-color-theme-contrast-500"
290
+ ></path>
291
+ </svg>
292
+ }
293
+
294
+ @case ('loading') {
295
+ <svg width="24" height="24" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
296
+ <style>
297
+ .spinner_ajPY {
298
+ transform-origin: center;
299
+ animation: spinner_AtaB 0.75s infinite linear;
192
300
  }
193
- });
194
- componentRef.instance.onClose.subscribe(() => {
195
- overlayRef.detach();
196
- });
197
- if (!toastConfig.keepOpen) {
198
- setTimeout(() => {
199
- componentRef.instance.close();
200
- }, toastConfig.duration ?? 4000);
201
- }
202
- return componentRef.instance;
301
+ @keyframes spinner_AtaB {
302
+ 100% {
303
+ transform: rotate(360deg);
304
+ }
305
+ }
306
+ </style>
307
+ <path
308
+ d="M12,1A11,11,0,1,0,23,12,11,11,0,0,0,12,1Zm0,19a8,8,0,1,1,8-8A8,8,0,0,1,12,20Z"
309
+ opacity=".25"
310
+ />
311
+ <path
312
+ d="M10.14,1.16a11,11,0,0,0-9,8.92A1.59,1.59,0,0,0,2.46,12,1.52,1.52,0,0,0,4.11,10.7a8,8,0,0,1,6.66-6.61A1.42,1.42,0,0,0,12,2.69h0A1.57,1.57,0,0,0,10.14,1.16Z"
313
+ class="spinner_ajPY"
314
+ />
315
+ </svg>
316
+ }
317
+
318
+ @case ('searchFail') {
319
+ <svg width="24" height="24" fill="none" xmlns="http://www.w3.org/2000/svg">
320
+ <path
321
+ clip-rule="evenodd"
322
+ d="M18.934 11.467v0c0 4.124-3.343 7.467-7.467 7.467v0C7.343 18.934 4 15.591 4 11.467v0C4 7.343 7.343 4 11.467 4v0c4.124 0 7.467 3.343 7.467 7.467Z"
323
+ stroke="var(--mecx-color-gray-900)"
324
+ stroke-width="1.5"
325
+ stroke-linecap="round"
326
+ stroke-linejoin="round"
327
+ />
328
+ <path
329
+ d="m20 20-3.25-3.25M13.815 9.11914 9.119 13.8151M13.815 13.8151 9.119 9.11914"
330
+ stroke="var(--mecx-color-gray-900)"
331
+ stroke-width="1.5"
332
+ stroke-linecap="round"
333
+ stroke-linejoin="round"
334
+ />
335
+ </svg>
336
+ }
337
+
338
+ @case ('search') {
339
+ <svg
340
+ width="16"
341
+ height="16"
342
+ viewBox="0 0 16 16"
343
+ fill="none"
344
+ xmlns="http://www.w3.org/2000/svg"
345
+ >
346
+ <path
347
+ d="M6.920 1.521 C 4.175 1.717,1.944 3.809,1.558 6.548 C 1.500 6.965,1.500 7.722,1.558 8.120 C 1.945 10.745,3.921 12.721,6.547 13.108 C 6.735 13.136,7.016 13.152,7.333 13.152 C 7.885 13.152,8.225 13.111,8.738 12.985 C 9.504 12.797,10.253 12.439,10.859 11.972 C 10.972 11.885,11.074 11.813,11.085 11.813 C 11.097 11.813,11.677 12.384,12.373 13.082 C 13.070 13.779,13.691 14.381,13.754 14.418 C 14.182 14.673,14.673 14.182,14.418 13.754 C 14.381 13.691,13.779 13.070,13.082 12.373 C 12.384 11.677,11.813 11.097,11.813 11.085 C 11.813 11.074,11.885 10.972,11.972 10.859 C 12.439 10.253,12.797 9.504,12.985 8.738 C 13.111 8.225,13.152 7.885,13.152 7.333 C 13.152 6.782,13.111 6.441,12.985 5.928 C 12.471 3.841,10.826 2.196,8.738 1.681 C 8.150 1.536,7.501 1.479,6.920 1.521 M8.277 2.586 C 10.023 2.962,11.414 4.208,11.943 5.870 C 12.118 6.421,12.145 6.615,12.145 7.333 C 12.145 8.052,12.118 8.246,11.943 8.797 C 11.473 10.272,10.272 11.473,8.797 11.943 C 8.246 12.118,8.052 12.145,7.333 12.145 C 6.615 12.145,6.421 12.118,5.870 11.943 C 4.394 11.473,3.193 10.272,2.724 8.797 C 2.547 8.242,2.521 8.052,2.522 7.333 C 2.522 6.615,2.549 6.419,2.724 5.870 C 3.244 4.236,4.636 2.971,6.320 2.602 C 6.679 2.523,6.858 2.510,7.440 2.520 C 7.898 2.527,8.066 2.540,8.277 2.586 "
348
+ stroke="none"
349
+ fill-rule="evenodd"
350
+ fill="var(--mecx-color-gray-900)"
351
+ ></path>
352
+ </svg>
353
+ }
203
354
  }
204
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToastService, deps: [{ token: i1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable }); }
205
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToastService, providedIn: 'root' }); }
206
- }
207
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToastService, decorators: [{
208
- type: Injectable,
209
- args: [{
210
- providedIn: 'root'
355
+ `
211
356
  }]
212
- }], ctorParameters: () => [{ type: i1.Overlay }] });
213
-
214
- /** ************************
215
- * Copyright Monkey Exchange. All Rights Reserved
216
- * This style guide was developed by Monkey Exchange Team
217
- * MIT Licence
218
- ************************* */
357
+ }] });
219
358
 
220
359
  /** ************************
221
360
  * Copyright Monkey Exchange. All Rights Reserved
@@ -238,10 +377,8 @@ class MonkeyAccordionComponent {
238
377
  this._id = value || this._uid;
239
378
  }
240
379
  constructor() {
241
- this._icons = inject(MonkeyIconsService);
242
380
  this.open = false;
243
381
  this.disabled = false;
244
- this.imgArrowDown = this._icons.arrowDown;
245
382
  this._uid = inject(IdGenerator).getId('monkey-accordion-');
246
383
  // eslint-disable-next-line no-self-assign
247
384
  this.id = this.id;
@@ -252,22 +389,19 @@ class MonkeyAccordionComponent {
252
389
  this.open = !this.open;
253
390
  }
254
391
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyAccordionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
255
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyAccordionComponent, isStandalone: true, selector: "monkey-accordion", inputs: { open: ["open", "open", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], title: "title", id: "id" }, host: { attributes: { "data-testid": "monkey-accordion" }, properties: { "class.disabled": "disabled", "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<div class=\"header\" (click)=\"onClick()\">\n <div class=\"title\">\n @if (titleRef) {\n <ng-container *ngTemplateOutlet=\"titleRef\" />\n } @else {\n {{ titleStr }}\n }\n </div>\n <div [innerHTML]=\"imgArrowDown\" class=\"icon\" [class.rotated]=\"open\"></div>\n</div>\n<div class=\"content-wrapper\">\n @if (open) {\n <div [@content]>\n <div class=\"content\">\n <ng-content />\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:flex;flex-direction:column;border-radius:16px;border:2px solid var(--mecx-color-gray-400);background:var(--mecx-color-white);overflow:hidden}:host .header{display:flex;align-items:center;justify-content:space-between;padding:24px;gap:24px;cursor:pointer}:host .header .title{color:var(--mecx-color-gray-900);font-size:18px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.54px}:host .header .icon{transform:rotate(0);transition:transform .2s ease-in-out}:host .header .icon.rotated{transform:rotate(180deg)}:host.disabled .header{cursor:not-allowed;background:var(--mecx-color-gray-200)}:host .content-wrapper{border-top:1px solid var(--mecx-color-gray-200);overflow:hidden}:host .content-wrapper .content{padding:24px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], animations: [
392
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyAccordionComponent, isStandalone: true, selector: "monkey-accordion", inputs: { open: ["open", "open", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], title: "title", id: "id" }, host: { attributes: { "data-testid": "monkey-accordion" }, properties: { "class.disabled": "disabled", "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<div class=\"header\" (click)=\"onClick()\">\n <div class=\"title\">\n @if (titleRef) {\n <ng-container *ngTemplateOutlet=\"titleRef\" />\n } @else {\n {{ titleStr }}\n }\n </div>\n <util-icon class=\"icon\" name=\"arrowDown\" [class.rotated]=\"open\" />\n</div>\n<div class=\"content-wrapper\">\n @if (open) {\n <div [@content]>\n <div class=\"content\">\n <ng-content />\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:flex;flex-direction:column;border-radius:16px;border:2px solid var(--mecx-color-gray-400);background:var(--mecx-color-white);overflow:hidden}:host .header{display:flex;align-items:center;justify-content:space-between;padding:24px;gap:24px;cursor:pointer}:host .header .title{color:var(--mecx-color-gray-900);font-size:18px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.54px}:host .header .icon{transform:rotate(0);transition:transform .2s ease-in-out}:host .header .icon.rotated{transform:rotate(180deg)}:host.disabled .header{cursor:not-allowed;background:var(--mecx-color-gray-200)}:host .content-wrapper{overflow:hidden}:host .content-wrapper .content{border-top:1px solid var(--mecx-color-gray-200);padding:24px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: UtilIconComponent, selector: "util-icon", inputs: ["name"] }], animations: [
256
393
  trigger('content', [
257
394
  state('void', style({
258
- height: '0px',
259
- overflow: 'hidden'
395
+ height: '0px'
260
396
  })),
261
397
  transition(':enter', [
262
398
  animate('300ms ease-in-out', style({
263
- height: '*',
264
- overflow: 'hidden'
399
+ height: '*'
265
400
  }))
266
401
  ]),
267
402
  transition(':leave', [
268
403
  animate('300ms ease-in-out', style({
269
- height: '0px',
270
- overflow: 'hidden'
404
+ height: '0px'
271
405
  }))
272
406
  ])
273
407
  ])
@@ -275,7 +409,7 @@ class MonkeyAccordionComponent {
275
409
  }
276
410
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyAccordionComponent, decorators: [{
277
411
  type: Component,
278
- args: [{ selector: 'monkey-accordion', standalone: true, imports: [CommonModule], host: {
412
+ args: [{ selector: 'monkey-accordion', standalone: true, imports: [CommonModule, UtilIconComponent], host: {
279
413
  'data-testid': 'monkey-accordion',
280
414
  '[class.disabled]': 'disabled',
281
415
  '[attr.id]': 'id',
@@ -283,23 +417,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
283
417
  }, animations: [
284
418
  trigger('content', [
285
419
  state('void', style({
286
- height: '0px',
287
- overflow: 'hidden'
420
+ height: '0px'
288
421
  })),
289
422
  transition(':enter', [
290
423
  animate('300ms ease-in-out', style({
291
- height: '*',
292
- overflow: 'hidden'
424
+ height: '*'
293
425
  }))
294
426
  ]),
295
427
  transition(':leave', [
296
428
  animate('300ms ease-in-out', style({
297
- height: '0px',
298
- overflow: 'hidden'
429
+ height: '0px'
299
430
  }))
300
431
  ])
301
432
  ])
302
- ], template: "<div class=\"header\" (click)=\"onClick()\">\n <div class=\"title\">\n @if (titleRef) {\n <ng-container *ngTemplateOutlet=\"titleRef\" />\n } @else {\n {{ titleStr }}\n }\n </div>\n <div [innerHTML]=\"imgArrowDown\" class=\"icon\" [class.rotated]=\"open\"></div>\n</div>\n<div class=\"content-wrapper\">\n @if (open) {\n <div [@content]>\n <div class=\"content\">\n <ng-content />\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:flex;flex-direction:column;border-radius:16px;border:2px solid var(--mecx-color-gray-400);background:var(--mecx-color-white);overflow:hidden}:host .header{display:flex;align-items:center;justify-content:space-between;padding:24px;gap:24px;cursor:pointer}:host .header .title{color:var(--mecx-color-gray-900);font-size:18px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.54px}:host .header .icon{transform:rotate(0);transition:transform .2s ease-in-out}:host .header .icon.rotated{transform:rotate(180deg)}:host.disabled .header{cursor:not-allowed;background:var(--mecx-color-gray-200)}:host .content-wrapper{border-top:1px solid var(--mecx-color-gray-200);overflow:hidden}:host .content-wrapper .content{padding:24px}\n"] }]
433
+ ], template: "<div class=\"header\" (click)=\"onClick()\">\n <div class=\"title\">\n @if (titleRef) {\n <ng-container *ngTemplateOutlet=\"titleRef\" />\n } @else {\n {{ titleStr }}\n }\n </div>\n <util-icon class=\"icon\" name=\"arrowDown\" [class.rotated]=\"open\" />\n</div>\n<div class=\"content-wrapper\">\n @if (open) {\n <div [@content]>\n <div class=\"content\">\n <ng-content />\n </div>\n </div>\n }\n</div>\n", styles: [":host{display:flex;flex-direction:column;border-radius:16px;border:2px solid var(--mecx-color-gray-400);background:var(--mecx-color-white);overflow:hidden}:host .header{display:flex;align-items:center;justify-content:space-between;padding:24px;gap:24px;cursor:pointer}:host .header .title{color:var(--mecx-color-gray-900);font-size:18px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.54px}:host .header .icon{transform:rotate(0);transition:transform .2s ease-in-out}:host .header .icon.rotated{transform:rotate(180deg)}:host.disabled .header{cursor:not-allowed;background:var(--mecx-color-gray-200)}:host .content-wrapper{overflow:hidden}:host .content-wrapper .content{border-top:1px solid var(--mecx-color-gray-200);padding:24px}\n"] }]
303
434
  }], ctorParameters: () => [], propDecorators: { open: [{
304
435
  type: Input,
305
436
  args: [{ transform: booleanAttribute }]
@@ -339,7 +470,7 @@ class MonkeyActionBarComponent {
339
470
  </span>
340
471
 
341
472
  <ng-content></ng-content>
342
- }`, isInline: true, styles: ["monkey-action-bar{background-color:var(--mecx-color-white);border-radius:12px;position:fixed;bottom:60px;gap:24px;display:none;align-items:center;padding:4px 4px 4px 24px;border:2px solid var(--mecx-color-gray-200);box-shadow:0 8px 12px -4px #2f32373d,0 8px 8px #2f323705,0 16px 16px 8px #2f323729}monkey-action-bar.center{left:50%;transform:translate(-50%)}monkey-action-bar.right{right:60px}monkey-action-bar.left{left:60px}monkey-action-bar.open{display:flex}@media (851px < width < 1315px){monkey-action-bar{left:60px!important;transform:translate(0)!important}}@media (width < 852px){monkey-action-bar{flex-direction:column;padding:16px}monkey-action-bar>*:before{content:initial!important;padding:16px!important}}@media (width < 450px){monkey-action-bar{flex-direction:column;left:24px!important;right:24px!important;bottom:24px!important;transform:translate(0)!important}monkey-action-bar>*:before{content:initial!important;padding:16px!important}}monkey-action-bar>*:not(:first-child){flex-shrink:0;display:inline-flex}monkey-action-bar>*:not(:first-child):before{content:\"\";display:flex;box-sizing:border-box;width:1px;background-color:var(--mecx-color-gray-200);margin-right:24px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None }); }
473
+ }`, isInline: true, styles: ["monkey-action-bar{background-color:var(--mecx-color-white);border-radius:12px;position:fixed;bottom:60px;gap:24px;display:none;align-items:center;padding:4px 4px 4px 24px;border:2px solid var(--mecx-color-gray-200);box-shadow:0 8px 12px -4px var(--mecx-color-box-shadow),0 8px 8px 0 var(--mecx-color-box-shadow),0 16px 16px 8px var(--mecx-color-box-shadow);z-index:999}monkey-action-bar.center{left:50%;transform:translate(-50%)}monkey-action-bar.right{right:60px}monkey-action-bar.left{left:60px}monkey-action-bar.open{display:flex}@media (851px < width < 1315px){monkey-action-bar{left:60px!important;transform:translate(0)!important}}@media (width < 852px){monkey-action-bar{flex-direction:column;padding:16px}monkey-action-bar>*:before{content:initial!important;padding:16px!important}}@media (width < 450px){monkey-action-bar{flex-direction:column;left:24px!important;right:24px!important;bottom:24px!important;transform:translate(0)!important}monkey-action-bar>*:before{content:initial!important;padding:16px!important}}monkey-action-bar>*:not(:first-child){flex-shrink:0;display:inline-flex}monkey-action-bar>*:not(:first-child):before{content:\"\";display:flex;box-sizing:border-box;width:1px;background-color:var(--mecx-color-gray-200);margin-right:24px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None }); }
343
474
  }
344
475
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyActionBarComponent, decorators: [{
345
476
  type: Component,
@@ -354,7 +485,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
354
485
  '[attr.id]': 'id',
355
486
  '[id]': 'id',
356
487
  '[class.open]': 'open()'
357
- }, styles: ["monkey-action-bar{background-color:var(--mecx-color-white);border-radius:12px;position:fixed;bottom:60px;gap:24px;display:none;align-items:center;padding:4px 4px 4px 24px;border:2px solid var(--mecx-color-gray-200);box-shadow:0 8px 12px -4px #2f32373d,0 8px 8px #2f323705,0 16px 16px 8px #2f323729}monkey-action-bar.center{left:50%;transform:translate(-50%)}monkey-action-bar.right{right:60px}monkey-action-bar.left{left:60px}monkey-action-bar.open{display:flex}@media (851px < width < 1315px){monkey-action-bar{left:60px!important;transform:translate(0)!important}}@media (width < 852px){monkey-action-bar{flex-direction:column;padding:16px}monkey-action-bar>*:before{content:initial!important;padding:16px!important}}@media (width < 450px){monkey-action-bar{flex-direction:column;left:24px!important;right:24px!important;bottom:24px!important;transform:translate(0)!important}monkey-action-bar>*:before{content:initial!important;padding:16px!important}}monkey-action-bar>*:not(:first-child){flex-shrink:0;display:inline-flex}monkey-action-bar>*:not(:first-child):before{content:\"\";display:flex;box-sizing:border-box;width:1px;background-color:var(--mecx-color-gray-200);margin-right:24px}\n"] }]
488
+ }, styles: ["monkey-action-bar{background-color:var(--mecx-color-white);border-radius:12px;position:fixed;bottom:60px;gap:24px;display:none;align-items:center;padding:4px 4px 4px 24px;border:2px solid var(--mecx-color-gray-200);box-shadow:0 8px 12px -4px var(--mecx-color-box-shadow),0 8px 8px 0 var(--mecx-color-box-shadow),0 16px 16px 8px var(--mecx-color-box-shadow);z-index:999}monkey-action-bar.center{left:50%;transform:translate(-50%)}monkey-action-bar.right{right:60px}monkey-action-bar.left{left:60px}monkey-action-bar.open{display:flex}@media (851px < width < 1315px){monkey-action-bar{left:60px!important;transform:translate(0)!important}}@media (width < 852px){monkey-action-bar{flex-direction:column;padding:16px}monkey-action-bar>*:before{content:initial!important;padding:16px!important}}@media (width < 450px){monkey-action-bar{flex-direction:column;left:24px!important;right:24px!important;bottom:24px!important;transform:translate(0)!important}monkey-action-bar>*:before{content:initial!important;padding:16px!important}}monkey-action-bar>*:not(:first-child){flex-shrink:0;display:inline-flex}monkey-action-bar>*:not(:first-child):before{content:\"\";display:flex;box-sizing:border-box;width:1px;background-color:var(--mecx-color-gray-200);margin-right:24px}\n"] }]
358
489
  }], propDecorators: { classes: [{
359
490
  type: HostBinding,
360
491
  args: ['class']
@@ -384,7 +515,7 @@ class MonkeyIconComponent {
384
515
  this._id = value || this._uid;
385
516
  }
386
517
  constructor() {
387
- this.size = '';
518
+ this.size = 'lg';
388
519
  this._icon = '';
389
520
  this._uid = inject(IdGenerator).getId('monkey-icon-');
390
521
  // eslint-disable-next-line no-self-assign
@@ -396,7 +527,7 @@ class MonkeyIconComponent {
396
527
  }
397
528
  }
398
529
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
399
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyIconComponent, isStandalone: true, selector: "monkey-icon", inputs: { icon: "icon", size: "size", id: "id" }, host: { properties: { "class": "_icon+' '+size", "attr.id": "id", "id": "id" } }, ngImport: i0, template: '', isInline: true, styles: ["monkey-icon{display:inline-flex}monkey-icon.sm{font-size:20px;width:20px;height:20px}monkey-icon.md{font-size:22px;width:22px;height:22px}monkey-icon.lg{font-size:24px;width:24px;height:24px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None }); }
530
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyIconComponent, isStandalone: true, selector: "monkey-icon", inputs: { icon: "icon", size: "size", id: "id" }, host: { properties: { "class": "_icon+' '+size", "attr.id": "id", "id": "id" } }, ngImport: i0, template: '', isInline: true, styles: ["monkey-icon{display:inline-flex}monkey-icon.sm{font-size:16px;width:16px;height:16px}monkey-icon.md{font-size:18px;width:18px;height:18px}monkey-icon.lg{font-size:24px;width:24px;height:24px}monkey-icon.xl{font-size:32px;width:32px;height:32px}monkey-icon.xxl{font-size:48px;width:48px;height:48px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }], encapsulation: i0.ViewEncapsulation.None }); }
400
531
  }
401
532
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconComponent, decorators: [{
402
533
  type: Component,
@@ -404,7 +535,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
404
535
  '[class]': `_icon+' '+size`,
405
536
  '[attr.id]': 'id',
406
537
  '[id]': 'id'
407
- }, styles: ["monkey-icon{display:inline-flex}monkey-icon.sm{font-size:20px;width:20px;height:20px}monkey-icon.md{font-size:22px;width:22px;height:22px}monkey-icon.lg{font-size:24px;width:24px;height:24px}\n"] }]
538
+ }, styles: ["monkey-icon{display:inline-flex}monkey-icon.sm{font-size:16px;width:16px;height:16px}monkey-icon.md{font-size:18px;width:18px;height:18px}monkey-icon.lg{font-size:24px;width:24px;height:24px}monkey-icon.xl{font-size:32px;width:32px;height:32px}monkey-icon.xxl{font-size:48px;width:48px;height:48px}\n"] }]
408
539
  }], ctorParameters: () => [], propDecorators: { icon: [{
409
540
  type: Input
410
541
  }], size: [{
@@ -631,7 +762,7 @@ class MonkeyBreadcrumbComponent {
631
762
  }
632
763
  }
633
764
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyBreadcrumbComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
634
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyBreadcrumbComponent, isStandalone: true, selector: "monkey-breadcrumb", inputs: { first: "first", last: "last", colapsed: ["colapsed", "colapsed", booleanAttribute], id: "id" }, host: { attributes: { "data-testid": "monkey-breadcrumb" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<div class=\"breadcrumbs\">\n <a class=\"first\" (click)=\"handleNavigate(first)\">\n {{ first.label | titlecase }}\n </a>\n <span>/</span>\n @if(colapsed){\n <span>...</span>\n <span>/</span>\n }\n <a class=\"last\" (click)=\"handleNavigate(last)\">\n {{ last.label | titlecase }}\n </a>\n</div>\n", styles: ["monkey-breadcrumb .last{color:var(--mecx-color-theme-main);text-decoration:none}monkey-breadcrumb .last:hover{text-decoration:underline}monkey-breadcrumb .first{color:#000;text-decoration:none}monkey-breadcrumb .first:hover{text-decoration:underline}monkey-breadcrumb .breadcrumbs{display:flex;gap:8px;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.TitleCasePipe, name: "titlecase" }], encapsulation: i0.ViewEncapsulation.None }); }
765
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyBreadcrumbComponent, isStandalone: true, selector: "monkey-breadcrumb", inputs: { first: "first", last: "last", colapsed: ["colapsed", "colapsed", booleanAttribute], id: "id" }, host: { attributes: { "data-testid": "monkey-breadcrumb" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<div class=\"breadcrumbs\">\n <a class=\"first\" (click)=\"handleNavigate(first)\">\n {{ first.label | titlecase }}\n </a>\n <span>/</span>\n @if(colapsed){\n <span>...</span>\n <span>/</span>\n }\n <a class=\"last\" (click)=\"handleNavigate(last)\">\n {{ last.label | titlecase }}\n </a>\n</div>\n", styles: ["monkey-breadcrumb .last{color:var(--mecx-color-theme-main);text-decoration:none}monkey-breadcrumb .last:hover{text-decoration:underline}monkey-breadcrumb .first{color:#000;text-decoration:none}monkey-breadcrumb .first:hover{text-decoration:underline}monkey-breadcrumb .breadcrumbs{display:flex;gap:8px;align-items:center}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.TitleCasePipe, name: "titlecase" }], encapsulation: i0.ViewEncapsulation.None }); }
635
766
  }
636
767
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyBreadcrumbComponent, decorators: [{
637
768
  type: Component,
@@ -674,6 +805,7 @@ class MonkeyButtonComponent {
674
805
  constructor() {
675
806
  this.size = 'md';
676
807
  this.type = 'primary';
808
+ this.elementRef = inject(ElementRef);
677
809
  this._uid = inject(IdGenerator).getId('monkey-button-');
678
810
  // eslint-disable-next-line no-self-assign
679
811
  this.id = this.id;
@@ -685,8 +817,11 @@ class MonkeyButtonComponent {
685
817
  event.stopImmediatePropagation();
686
818
  }
687
819
  }
820
+ get element() {
821
+ return this.elementRef.nativeElement;
822
+ }
688
823
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
689
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyButtonComponent, isStandalone: true, selector: "monkey-button", inputs: { disabled: "disabled", size: "size", type: "type", id: "id" }, host: { attributes: { "data-testid": "monkey-button" }, listeners: { "click": "onClick($event)" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<button class=\"mecx-button\" [ngClass]=\"type + ' ' + size\" [disabled]=\"disabled\">\n <div class=\"content\">\n <ng-content select=\"[first]\"></ng-content>\n <span><ng-content></ng-content></span>\n <ng-content select=\"[last]\"></ng-content>\n </div>\n</button>\n", styles: ["monkey-button{display:inline-block}monkey-button .mecx-button{width:100%;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;transition:background-color .15s ease-out,color .15s ease-out}monkey-button .mecx-button .content{display:flex;align-items:center;justify-content:center;gap:8px;padding:0 12px;flex-shrink:0;letter-spacing:.48px;font-weight:400;transition:transform .2s cubic-bezier(0,.5,.2,1)}monkey-button .mecx-button .content span{width:100%}monkey-button .mecx-button .content .mk-i{display:flex}monkey-button .mecx-button.secondary{border:2px solid var(--mecx-color-gray-400);background:unset}monkey-button .mecx-button.secondary:disabled{border-width:1px}monkey-button .mecx-button:disabled{background:var(--mecx-color-gray-100)!important;color:var(--mecx-color-gray-400)!important;cursor:not-allowed!important}monkey-button .mecx-button:disabled.secondary{background:unset!important;border:1px solid var(--mecx-color-gray-400)!important}monkey-button .mecx-button.primary{color:var(--mecx-color-theme-contrast-main);background:var(--mecx-color-theme-main)}monkey-button .mecx-button.primary:hover:not(:disabled){background:var(--mecx-color-theme-600)}monkey-button .mecx-button.secondary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-button .mecx-button.tertiary{background:unset}monkey-button .mecx-button.tertiary span{text-decoration:underline}monkey-button .mecx-button.tertiary:disabled{background:unset!important;border-width:1px}monkey-button .mecx-button.tertiary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-button .mecx-button.sm{height:32px}monkey-button .mecx-button.sm .mk-i{font-size:20px}monkey-button .mecx-button.md{height:40px}monkey-button .mecx-button.md .mk-i{font-size:22px}monkey-button .mecx-button.lg{height:48px;text-align:center;font-size:16px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.48px}monkey-button .mecx-button.lg .mk-i{font-size:24px}monkey-button .mecx-button.full-width{width:100%}monkey-button .mecx-button:focus{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}monkey-button .mecx-button:active:not(:disabled).primary{background:var(--mecx-color-theme-main);opacity:.8;outline:none}monkey-button .mecx-button:active:not(:disabled) .content{transform:scale(.8)}:host:has(.mecx-button:active) .mecx-button{outline:unset;outline-offset:unset}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None }); }
824
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyButtonComponent, isStandalone: true, selector: "monkey-button", inputs: { disabled: "disabled", size: "size", type: "type", id: "id" }, host: { attributes: { "data-testid": "monkey-button" }, listeners: { "click": "onClick($event)" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<button class=\"mecx-button\" [ngClass]=\"type + ' ' + size\" [disabled]=\"disabled\">\n <div class=\"content\">\n <ng-content select=\"[first]\"></ng-content>\n <span><ng-content></ng-content></span>\n <ng-content select=\"[last]\"></ng-content>\n </div>\n</button>\n", styles: ["monkey-button{display:inline-block}monkey-button .mecx-button{width:100%;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;transition:background-color .15s ease-out,color .15s ease-out}monkey-button .mecx-button .content{display:flex;align-items:center;justify-content:center;gap:8px;padding:0 12px;flex-shrink:0;letter-spacing:.48px;font-weight:400;transition:transform .2s cubic-bezier(0,.5,.2,1)}monkey-button .mecx-button .content span{width:100%}monkey-button .mecx-button .content .mk-i{display:flex}monkey-button .mecx-button.secondary{border:2px solid var(--mecx-color-gray-400);background:unset}monkey-button .mecx-button.secondary:disabled{border-width:1px}monkey-button .mecx-button:disabled{background:var(--mecx-color-gray-100)!important;color:var(--mecx-color-gray-400)!important;cursor:not-allowed!important}monkey-button .mecx-button:disabled.secondary{background:unset!important;border:1px solid var(--mecx-color-gray-400)!important}monkey-button .mecx-button.primary{color:var(--mecx-color-theme-contrast-main);background:var(--mecx-color-theme-main)}monkey-button .mecx-button.primary:hover:not(:disabled){background:var(--mecx-color-theme-600)}monkey-button .mecx-button.secondary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-button .mecx-button.tertiary{background:unset}monkey-button .mecx-button.tertiary span{text-decoration:underline}monkey-button .mecx-button.tertiary:disabled{background:unset!important;border-width:1px}monkey-button .mecx-button.tertiary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-button .mecx-button.sm{height:32px}monkey-button .mecx-button.sm .mk-i{font-size:20px}monkey-button .mecx-button.md{height:40px}monkey-button .mecx-button.md .mk-i{font-size:22px}monkey-button .mecx-button.lg{height:48px;text-align:center;font-size:16px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.48px}monkey-button .mecx-button.lg .mk-i{font-size:24px}monkey-button .mecx-button.full-width{width:100%}monkey-button .mecx-button:focus{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}monkey-button .mecx-button:active:not(:disabled).primary{background:var(--mecx-color-theme-main);opacity:.8;outline:none}monkey-button .mecx-button:active:not(:disabled) .content{transform:scale(.8)}:host:has(.mecx-button:active) .mecx-button{outline:unset;outline-offset:unset}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], encapsulation: i0.ViewEncapsulation.None }); }
690
825
  }
691
826
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyButtonComponent, decorators: [{
692
827
  type: Component,
@@ -791,11 +926,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
791
926
  * This style guide was developed by Monkey Exchange Team
792
927
  * MIT Licence
793
928
  ************************* */
794
- class MonkeyError {
795
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyError, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
796
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyError, selector: "monkey-error", ngImport: i0 }); }
929
+ class MonkeyErrorDirective {
930
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyErrorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
931
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyErrorDirective, selector: "monkey-error", ngImport: i0 }); }
797
932
  }
798
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyError, decorators: [{
933
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyErrorDirective, decorators: [{
799
934
  type: Directive,
800
935
  args: [{
801
936
  selector: 'monkey-error'
@@ -807,11 +942,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
807
942
  * This style guide was developed by Monkey Exchange Team
808
943
  * MIT Licence
809
944
  ************************* */
810
- class MonkeyHelper {
811
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyHelper, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
812
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyHelper, selector: "monkey-helper", ngImport: i0 }); }
945
+ class MonkeyHelperDirective {
946
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyHelperDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
947
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyHelperDirective, selector: "monkey-helper", ngImport: i0 }); }
813
948
  }
814
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyHelper, decorators: [{
949
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyHelperDirective, decorators: [{
815
950
  type: Directive,
816
951
  args: [{
817
952
  selector: 'monkey-helper'
@@ -823,11 +958,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
823
958
  * This style guide was developed by Monkey Exchange Team
824
959
  * MIT Licence
825
960
  ************************* */
826
- class MonkeyInfo {
827
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyInfo, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
828
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyInfo, selector: "monkey-info", ngImport: i0 }); }
961
+ class MonkeyInfoDirective {
962
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyInfoDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
963
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyInfoDirective, selector: "monkey-info", ngImport: i0 }); }
829
964
  }
830
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyInfo, decorators: [{
965
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyInfoDirective, decorators: [{
831
966
  type: Directive,
832
967
  args: [{
833
968
  selector: 'monkey-info'
@@ -839,65 +974,438 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
839
974
  * This style guide was developed by Monkey Exchange Team
840
975
  * MIT Licence
841
976
  ************************* */
842
- class MonkeyLabel {
843
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyLabel, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
844
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyLabel, selector: "monkey-label", ngImport: i0 }); }
977
+ class MonkeyLabelDirective {
978
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
979
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyLabelDirective, selector: "monkey-label", ngImport: i0 }); }
845
980
  }
846
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyLabel, decorators: [{
981
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyLabelDirective, decorators: [{
847
982
  type: Directive,
848
983
  args: [{
849
984
  selector: 'monkey-label'
850
985
  }]
851
986
  }] });
852
987
 
853
- /** ************************
854
- * Copyright Monkey Exchange. All Rights Reserved
855
- * This style guide was developed by Monkey Exchange Team
856
- * MIT Licence
857
- ************************* */
858
- class MonkeyPrefix {
859
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPrefix, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
860
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyPrefix, selector: "monkey-prefix", ngImport: i0 }); }
988
+ const MONKEY_I18N_WRAPPER = new InjectionToken('');
989
+ const MONKEY_POPOVER_OPTIONS = new InjectionToken('MONKEY_POPOVER_OPTIONS');
990
+ const MONKEY_COUNTRY_CODE = new InjectionToken('+55');
991
+
992
+ class MonkeyPopoverContentComponent {
993
+ constructor(host) {
994
+ this.host = host;
995
+ this.onClose = new EventEmitter();
996
+ // not to do
997
+ }
998
+ ngAfterViewInit() {
999
+ setTimeout(() => {
1000
+ const focusable = this.host.nativeElement.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
1001
+ focusable?.focus();
1002
+ });
1003
+ }
1004
+ isTemplate(value) {
1005
+ return value instanceof TemplateRef;
1006
+ }
1007
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPopoverContentComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
1008
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyPopoverContentComponent, isStandalone: true, selector: "monkey-popover-content", inputs: { title: "title", content: "content", actions: "actions", hideHeader: ["hideHeader", "hideHeader", booleanAttribute], hideClose: ["hideClose", "hideClose", booleanAttribute], hideActions: ["hideActions", "hideActions", booleanAttribute] }, outputs: { onClose: "onClose" }, ngImport: i0, template: `
1009
+ <div class="mecx-popover-container">
1010
+ @if (!hideHeader) {
1011
+ <div class="mecx-popover-header">
1012
+ @if (title) {
1013
+ <div>
1014
+ <ng-container *ngIf="isTemplate(title); else stringTitle">
1015
+ <ng-container *ngTemplateOutlet="title"></ng-container>
1016
+ </ng-container>
1017
+ <ng-template #stringTitle>
1018
+ {{ title }}
1019
+ </ng-template>
1020
+ </div>
1021
+ }
1022
+
1023
+ @if (!hideClose) {
1024
+ <util-icon class="mecx-popover-close" name="clear" (click)="onClose.next(null)" />
1025
+ }
1026
+ </div>
1027
+ }
1028
+
1029
+ <div class="mecx-popover-content" [class.add-radius]="hideHeader">
1030
+ <ng-container *ngTemplateOutlet="content"></ng-container>
1031
+ </div>
1032
+
1033
+ @if (!hideActions) {
1034
+ <div class="mecx-popover-actions" *ngIf="actions">
1035
+ <ng-container *ngIf="isTemplate(actions); else stringActions">
1036
+ <ng-container *ngTemplateOutlet="actions"></ng-container>
1037
+ </ng-container>
1038
+ <ng-template #stringActions>
1039
+ <span>{{ actions }}</span>
1040
+ </ng-template>
1041
+ </div>
1042
+ }
1043
+ </div>
1044
+ `, isInline: true, dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }, { kind: "component", type: UtilIconComponent, selector: "util-icon", inputs: ["name"] }] }); }
861
1045
  }
862
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPrefix, decorators: [{
863
- type: Directive,
1046
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPopoverContentComponent, decorators: [{
1047
+ type: Component,
864
1048
  args: [{
865
- selector: 'monkey-prefix'
866
- }]
867
- }] });
1049
+ selector: 'monkey-popover-content',
1050
+ standalone: true,
1051
+ imports: [CommonModule, NgTemplateOutlet, UtilIconComponent],
1052
+ template: `
1053
+ <div class="mecx-popover-container">
1054
+ @if (!hideHeader) {
1055
+ <div class="mecx-popover-header">
1056
+ @if (title) {
1057
+ <div>
1058
+ <ng-container *ngIf="isTemplate(title); else stringTitle">
1059
+ <ng-container *ngTemplateOutlet="title"></ng-container>
1060
+ </ng-container>
1061
+ <ng-template #stringTitle>
1062
+ {{ title }}
1063
+ </ng-template>
1064
+ </div>
1065
+ }
868
1066
 
869
- /** ************************
870
- * Copyright Monkey Exchange. All Rights Reserved
871
- * This style guide was developed by Monkey Exchange Team
872
- * MIT Licence
873
- ************************* */
874
- class MonkeySuffix {
1067
+ @if (!hideClose) {
1068
+ <util-icon class="mecx-popover-close" name="clear" (click)="onClose.next(null)" />
1069
+ }
1070
+ </div>
1071
+ }
1072
+
1073
+ <div class="mecx-popover-content" [class.add-radius]="hideHeader">
1074
+ <ng-container *ngTemplateOutlet="content"></ng-container>
1075
+ </div>
1076
+
1077
+ @if (!hideActions) {
1078
+ <div class="mecx-popover-actions" *ngIf="actions">
1079
+ <ng-container *ngIf="isTemplate(actions); else stringActions">
1080
+ <ng-container *ngTemplateOutlet="actions"></ng-container>
1081
+ </ng-container>
1082
+ <ng-template #stringActions>
1083
+ <span>{{ actions }}</span>
1084
+ </ng-template>
1085
+ </div>
1086
+ }
1087
+ </div>
1088
+ `
1089
+ }]
1090
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { title: [{
1091
+ type: Input
1092
+ }], content: [{
1093
+ type: Input
1094
+ }], actions: [{
1095
+ type: Input
1096
+ }], onClose: [{
1097
+ type: Output
1098
+ }], hideHeader: [{
1099
+ type: Input,
1100
+ args: [{ transform: booleanAttribute }]
1101
+ }], hideClose: [{
1102
+ type: Input,
1103
+ args: [{ transform: booleanAttribute }]
1104
+ }], hideActions: [{
1105
+ type: Input,
1106
+ args: [{ transform: booleanAttribute }]
1107
+ }] } });
1108
+ class MonkeyPopoverDirective {
1109
+ set popover(show) {
1110
+ if (this._show === show) {
1111
+ return;
1112
+ }
1113
+ this._show = show;
1114
+ if (show) {
1115
+ this.createPopover();
1116
+ }
1117
+ else {
1118
+ this.disposePopover();
1119
+ }
1120
+ }
1121
+ get popover() {
1122
+ return this._show;
1123
+ }
1124
+ set target(value) {
1125
+ this._target = value;
1126
+ }
1127
+ get target() {
1128
+ return this._target;
1129
+ }
875
1130
  constructor() {
876
- this.hasAction = false;
877
- this.action = null;
1131
+ this._tpl = inject(TemplateRef);
1132
+ this._vcr = inject(ViewContainerRef);
1133
+ this._el = inject(ElementRef);
1134
+ this._zone = inject(NgZone);
1135
+ this._overlay = inject(Overlay);
1136
+ this._overlayPositionBuilder = inject(OverlayPositionBuilder);
1137
+ this._router = inject(Router);
1138
+ this._destroyRef = inject(DestroyRef);
1139
+ this._show = false;
1140
+ this.minwidth = false;
1141
+ this.backdrop = true;
1142
+ this.watch = false;
1143
+ this.dir = 'ltr';
1144
+ this.contextmenu = false;
1145
+ this._router.events
1146
+ .pipe(filter((event) => {
1147
+ return event instanceof NavigationStart;
1148
+ }), takeUntilDestroyed(this._destroyRef))
1149
+ .subscribe(() => {
1150
+ this.closePopover();
1151
+ });
878
1152
  }
879
- set _hasAction(value) {
880
- this.hasAction = true;
1153
+ ngOnDestroy() {
1154
+ this.disposePopover();
1155
+ this._resizeObserver?.disconnect();
1156
+ }
1157
+ closePopover(event) {
1158
+ if (this._show) {
1159
+ this._show = false;
1160
+ this.disposePopover();
1161
+ this._zone.run(() => {
1162
+ this.closed?.(event);
1163
+ });
1164
+ }
881
1165
  }
882
- onClick(event) {
883
- if (!this.action) {
884
- event.preventDefault();
885
- event.stopPropagation();
1166
+ disposePopover() {
1167
+ this._resizeObserver?.disconnect();
1168
+ this._resizeObserver = undefined;
1169
+ if (this._overlayRef) {
1170
+ this._overlayRef.dispose();
1171
+ this._overlayRef = undefined;
886
1172
  }
887
- else {
888
- this.action(event);
1173
+ }
1174
+ getPositions(dir) {
1175
+ const oppositeVertical = {
1176
+ top: 'bottom',
1177
+ bottom: 'top',
1178
+ center: 'center'
1179
+ };
1180
+ const oppositeHorizontal = {
1181
+ start: 'end',
1182
+ end: 'start',
1183
+ center: 'center'
1184
+ };
1185
+ const centerY = (pos) => {
1186
+ return {
1187
+ originX: 'center',
1188
+ originY: pos,
1189
+ overlayX: 'center',
1190
+ overlayY: oppositeVertical[pos]
1191
+ };
1192
+ };
1193
+ const centerX = (pos) => {
1194
+ return {
1195
+ originX: oppositeHorizontal[pos],
1196
+ originY: 'center',
1197
+ overlayX: pos,
1198
+ overlayY: 'center'
1199
+ };
1200
+ };
1201
+ const ltr = (axis) => {
1202
+ return {
1203
+ originX: 'start',
1204
+ originY: axis,
1205
+ overlayX: 'start',
1206
+ overlayY: oppositeVertical[axis]
1207
+ };
1208
+ };
1209
+ const rtl = (axis) => {
1210
+ return {
1211
+ originX: 'end',
1212
+ originY: axis,
1213
+ overlayX: 'end',
1214
+ overlayY: oppositeVertical[axis]
1215
+ };
1216
+ };
1217
+ const side = (axisX, axisY) => {
1218
+ return {
1219
+ originX: axisX,
1220
+ originY: axisY,
1221
+ overlayX: oppositeHorizontal[axisX],
1222
+ overlayY: axisY
1223
+ };
1224
+ };
1225
+ const cmp = dir ?? this._options?.dir ?? this.dir;
1226
+ switch (cmp) {
1227
+ case 'ct':
1228
+ return [centerY('top'), centerY('bottom'), centerX('start'), centerX('end')];
1229
+ case 'cr':
1230
+ return [centerX('end'), centerX('start'), centerY('top'), centerY('bottom')];
1231
+ case 'cc':
1232
+ return [centerX('center')];
1233
+ case 'ltr':
1234
+ return [ltr('bottom'), ltr('top')];
1235
+ case 'rtl':
1236
+ return [rtl('bottom'), rtl('top')];
1237
+ case 'tltr':
1238
+ return [ltr('top'), ltr('bottom')];
1239
+ case 'trtl':
1240
+ return [rtl('top'), rtl('bottom')];
1241
+ case 'rt':
1242
+ return [side('end', 'top'), side('end', 'bottom'), ltr('top')];
1243
+ case 'rb':
1244
+ return [side('end', 'bottom'), side('end', 'top'), ltr('bottom'), rtl('bottom')];
1245
+ case 'lt':
1246
+ return [side('start', 'top'), side('start', 'bottom'), rtl('top')];
1247
+ case 'lb':
1248
+ return [side('start', 'bottom'), side('start', 'top'), rtl('bottom')];
1249
+ default:
1250
+ return [];
889
1251
  }
890
1252
  }
891
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySuffix, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
892
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeySuffix, selector: "monkey-suffix", inputs: { _hasAction: ["hasAction", "_hasAction"] }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.has-action": "hasAction" } }, ngImport: i0 }); }
893
- }
894
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySuffix, decorators: [{
895
- type: Directive,
896
- args: [{
897
- selector: 'monkey-suffix',
898
- host: {
899
- '[class.has-action]': 'hasAction'
900
- }
1253
+ createPopover(origin, options) {
1254
+ if (!this.target) {
1255
+ // eslint-disable-next-line no-console
1256
+ console.error('MonkeyPopoverDirective -> target element is not defined.');
1257
+ return;
1258
+ }
1259
+ const originEl = this.target instanceof HTMLElement ? this.target : this.target.element;
1260
+ this._positionStrategy = this._overlayPositionBuilder
1261
+ .flexibleConnectedTo(origin ?? originEl)
1262
+ .withPush(true)
1263
+ .withGrowAfterOpen(true)
1264
+ .withPositions(this.getPositions(options?.dir));
1265
+ this._overlayRef = this._overlay.create({
1266
+ positionStrategy: this._positionStrategy,
1267
+ disposeOnNavigation: true,
1268
+ direction: 'ltr',
1269
+ hasBackdrop: this.backdrop,
1270
+ scrollStrategy: this._overlay.scrollStrategies.reposition(),
1271
+ backdropClass: 'cdk-overlay-transparent-backdrop',
1272
+ width: this._options?.minwidth || this.minwidth ? this.target.offsetWidth - 2 : undefined,
1273
+ maxHeight: '95%',
1274
+ height: this.height
1275
+ });
1276
+ this._overlayRef
1277
+ .backdropClick()
1278
+ .pipe(takeUntilDestroyed(this._destroyRef))
1279
+ .subscribe((event) => {
1280
+ this.closePopover(event);
1281
+ });
1282
+ const portal = new ComponentPortal(MonkeyPopoverContentComponent, this._vcr);
1283
+ this._componentRef = this._overlayRef.attach(portal);
1284
+ this._componentRef.instance.content = this._tpl;
1285
+ this._componentRef.instance.title = this.title;
1286
+ this._componentRef.instance.actions = this.actions;
1287
+ this._componentRef.instance.hideClose = this.hideClose;
1288
+ this._componentRef.instance.hideHeader = this.hideHeader;
1289
+ this._componentRef.instance.hideActions = this.hideActions;
1290
+ if (!this.hideClose || !this.hideHeader) {
1291
+ this._componentRef.instance.onClose
1292
+ .pipe(takeUntilDestroyed(this._destroyRef))
1293
+ .subscribe(() => {
1294
+ this.closePopover();
1295
+ });
1296
+ }
1297
+ if (this.watch && 'ResizeObserver' in window) {
1298
+ this._resizeObserver = new ResizeObserver(() => {
1299
+ this._overlayRef?.updatePosition();
1300
+ });
1301
+ this._resizeObserver.observe(this._componentRef.location.nativeElement);
1302
+ }
1303
+ }
1304
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPopoverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1305
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.13", type: MonkeyPopoverDirective, selector: "[monkeyPopover]", inputs: { popover: ["monkeyPopover", "popover"], closed: ["monkeyPopoverClosed", "closed"], target: ["monkeyPopoverTarget", "target"], minwidth: ["monkeyPopoverMinwidth", "minwidth"], backdrop: ["monkeyPopoverBackdrop", "backdrop"], watch: ["monkeyPopoverWatch", "watch"], dir: ["monkeyPopoverDir", "dir"], contextmenu: ["monkeyPopoverContextmenu", "contextmenu"], height: ["monkeyPopoverHeight", "height"], title: ["monkeyPopoverTitle", "title"], actions: ["monkeyPopoverActions", "actions"], hideClose: ["monkeyPopoverHideClose", "hideClose", booleanAttribute], hideHeader: ["monkeyPopoverHideHeader", "hideHeader", booleanAttribute], hideActions: ["monkeyPopoverHideActions", "hideActions", booleanAttribute] }, ngImport: i0 }); }
1306
+ }
1307
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPopoverDirective, decorators: [{
1308
+ type: Directive,
1309
+ args: [{
1310
+ selector: '[monkeyPopover]'
1311
+ }]
1312
+ }], ctorParameters: () => [], propDecorators: { _options: [{
1313
+ type: Optional
1314
+ }, {
1315
+ type: Inject,
1316
+ args: [MONKEY_POPOVER_OPTIONS]
1317
+ }], popover: [{
1318
+ type: Input,
1319
+ args: ['monkeyPopover']
1320
+ }], closed: [{
1321
+ type: Input,
1322
+ args: ['monkeyPopoverClosed']
1323
+ }], target: [{
1324
+ type: Input,
1325
+ args: ['monkeyPopoverTarget']
1326
+ }], minwidth: [{
1327
+ type: Input,
1328
+ args: ['monkeyPopoverMinwidth']
1329
+ }], backdrop: [{
1330
+ type: Input,
1331
+ args: ['monkeyPopoverBackdrop']
1332
+ }], watch: [{
1333
+ type: Input,
1334
+ args: ['monkeyPopoverWatch']
1335
+ }], dir: [{
1336
+ type: Input,
1337
+ args: ['monkeyPopoverDir']
1338
+ }], contextmenu: [{
1339
+ type: Input,
1340
+ args: ['monkeyPopoverContextmenu']
1341
+ }], height: [{
1342
+ type: Input,
1343
+ args: ['monkeyPopoverHeight']
1344
+ }], title: [{
1345
+ type: Input,
1346
+ args: ['monkeyPopoverTitle']
1347
+ }], actions: [{
1348
+ type: Input,
1349
+ args: ['monkeyPopoverActions']
1350
+ }], hideClose: [{
1351
+ type: Input,
1352
+ args: [{ alias: 'monkeyPopoverHideClose', transform: booleanAttribute }]
1353
+ }], hideHeader: [{
1354
+ type: Input,
1355
+ args: [{ alias: 'monkeyPopoverHideHeader', transform: booleanAttribute }]
1356
+ }], hideActions: [{
1357
+ type: Input,
1358
+ args: [{ alias: 'monkeyPopoverHideActions', transform: booleanAttribute }]
1359
+ }] } });
1360
+
1361
+ /** ************************
1362
+ * Copyright Monkey Exchange. All Rights Reserved
1363
+ * This style guide was developed by Monkey Exchange Team
1364
+ * MIT Licence
1365
+ ************************* */
1366
+ class MonkeyPrefixDirective {
1367
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1368
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyPrefixDirective, selector: "monkey-prefix", ngImport: i0 }); }
1369
+ }
1370
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPrefixDirective, decorators: [{
1371
+ type: Directive,
1372
+ args: [{
1373
+ selector: 'monkey-prefix'
1374
+ }]
1375
+ }] });
1376
+
1377
+ /** ************************
1378
+ * Copyright Monkey Exchange. All Rights Reserved
1379
+ * This style guide was developed by Monkey Exchange Team
1380
+ * MIT Licence
1381
+ ************************* */
1382
+ class MonkeySuffixDirective {
1383
+ constructor() {
1384
+ this.hasAction = false;
1385
+ this.action = null;
1386
+ }
1387
+ set _hasAction(value) {
1388
+ this.hasAction = true;
1389
+ }
1390
+ onClick(event) {
1391
+ if (!this.action) {
1392
+ event.preventDefault();
1393
+ event.stopPropagation();
1394
+ }
1395
+ else {
1396
+ this.action(event);
1397
+ }
1398
+ }
1399
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySuffixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1400
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "18.2.13", type: MonkeySuffixDirective, selector: "monkey-suffix", inputs: { _hasAction: ["hasAction", "_hasAction"] }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.has-action": "hasAction" } }, ngImport: i0 }); }
1401
+ }
1402
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySuffixDirective, decorators: [{
1403
+ type: Directive,
1404
+ args: [{
1405
+ selector: 'monkey-suffix',
1406
+ host: {
1407
+ '[class.has-action]': 'hasAction'
1408
+ }
901
1409
  }]
902
1410
  }], propDecorators: { _hasAction: [{
903
1411
  type: Input,
@@ -914,41 +1422,46 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
914
1422
  ************************* */
915
1423
  class MonkeyDirectivesModule {
916
1424
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
917
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDirectivesModule, declarations: [MonkeyError,
918
- MonkeyHelper,
919
- MonkeyInfo,
920
- MonkeyLabel,
921
- MonkeyPrefix,
922
- MonkeySuffix,
923
- MonkeyBadgeDirective], exports: [MonkeyError,
924
- MonkeyHelper,
925
- MonkeyInfo,
926
- MonkeyLabel,
927
- MonkeyPrefix,
928
- MonkeySuffix,
929
- MonkeyBadgeDirective] }); }
930
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDirectivesModule }); }
1425
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDirectivesModule, declarations: [MonkeyErrorDirective,
1426
+ MonkeyHelperDirective,
1427
+ MonkeyInfoDirective,
1428
+ MonkeyLabelDirective,
1429
+ MonkeyPrefixDirective,
1430
+ MonkeySuffixDirective,
1431
+ MonkeyBadgeDirective,
1432
+ MonkeyPopoverDirective], imports: [MonkeyPopoverContentComponent], exports: [MonkeyErrorDirective,
1433
+ MonkeyHelperDirective,
1434
+ MonkeyInfoDirective,
1435
+ MonkeyLabelDirective,
1436
+ MonkeyPrefixDirective,
1437
+ MonkeySuffixDirective,
1438
+ MonkeyBadgeDirective,
1439
+ MonkeyPopoverDirective] }); }
1440
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDirectivesModule, imports: [MonkeyPopoverContentComponent] }); }
931
1441
  }
932
1442
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDirectivesModule, decorators: [{
933
1443
  type: NgModule,
934
1444
  args: [{
1445
+ imports: [MonkeyPopoverContentComponent],
935
1446
  declarations: [
936
- MonkeyError,
937
- MonkeyHelper,
938
- MonkeyInfo,
939
- MonkeyLabel,
940
- MonkeyPrefix,
941
- MonkeySuffix,
942
- MonkeyBadgeDirective
1447
+ MonkeyErrorDirective,
1448
+ MonkeyHelperDirective,
1449
+ MonkeyInfoDirective,
1450
+ MonkeyLabelDirective,
1451
+ MonkeyPrefixDirective,
1452
+ MonkeySuffixDirective,
1453
+ MonkeyBadgeDirective,
1454
+ MonkeyPopoverDirective
943
1455
  ],
944
1456
  exports: [
945
- MonkeyError,
946
- MonkeyHelper,
947
- MonkeyInfo,
948
- MonkeyLabel,
949
- MonkeyPrefix,
950
- MonkeySuffix,
951
- MonkeyBadgeDirective
1457
+ MonkeyErrorDirective,
1458
+ MonkeyHelperDirective,
1459
+ MonkeyInfoDirective,
1460
+ MonkeyLabelDirective,
1461
+ MonkeyPrefixDirective,
1462
+ MonkeySuffixDirective,
1463
+ MonkeyBadgeDirective,
1464
+ MonkeyPopoverDirective
952
1465
  ]
953
1466
  }]
954
1467
  }] });
@@ -967,12 +1480,9 @@ class MonkeyCheckboxComponent {
967
1480
  this.size = 'md';
968
1481
  this.onChange = new EventEmitter();
969
1482
  this._destroyRef = inject(DestroyRef);
970
- this.icons = inject(MonkeyIconsService);
971
1483
  this.idGenerator = inject(IdGenerator);
972
1484
  this.injector = inject(Injector);
973
1485
  this.cdr = inject(ChangeDetectorRef);
974
- this.iconCheck = this.icons.check;
975
- this.iconIndeterminate = this.icons.minus;
976
1486
  this.inputId = this.idGenerator.getId('input-checkbox-');
977
1487
  this.value = false;
978
1488
  this.isFocused = false;
@@ -1074,7 +1584,7 @@ class MonkeyCheckboxComponent {
1074
1584
  useExisting: MonkeyCheckboxComponent,
1075
1585
  multi: true
1076
1586
  }
1077
- ], queries: [{ propertyName: "infoChildren", predicate: MonkeyInfo, descendants: true }, { propertyName: "labelChildren", predicate: MonkeyLabel, descendants: true }, { propertyName: "helperChildren", predicate: MonkeyHelper, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (hasHeader) {\n <div class=\"header\">\n <ng-content select=\"monkey-label\" />\n <ng-content select=\"monkey-helper\" />\n </div>\n}\n<label [attr.for]=\"inputId\">\n <input\n type=\"checkbox\"\n [checked]=\"value\"\n [indeterminate]=\"indeterminate\"\n [disabled]=\"disabled\"\n (change)=\"onChangeEvent($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n [id]=\"inputId\"\n [required]=\"required\"\n />\n <span class=\"checkbox\">\n @if (indeterminate) {\n <div class=\"icon\" @iconAnimation [innerHTML]=\"iconIndeterminate\"></div>\n } @else if (value) {\n <div class=\"icon\" @iconAnimation [innerHTML]=\"iconCheck\"></div>\n }\n </span>\n <span class=\"checkbox-label\">\n <ng-content></ng-content>\n </span>\n</label>\n@if (showFooter) {\n @switch (getFooterMessages()) {\n @case ('error') {\n <ng-content select=\"monkey-error\" />\n }\n @case ('info') {\n <ng-content select=\"monkey-info\" />\n }\n }\n}\n", styles: [":host{display:inline-flex;flex-direction:column;gap:6px}:host .header{display:flex;justify-content:space-between;gap:6px}:host label{display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}:host .checkbox{display:block;width:24px;height:24px;border:2px solid var(--mecx-color-gray-400);background-color:#fff;border-radius:8px;position:relative;transition:background-color .2s ease;box-sizing:border-box}:host .checkbox .icon{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}:host .checkbox-label{color:var(--mecx-color-gray-900);font-size:14px;font-weight:400;line-height:24px}:host input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}:host.sm .checkbox{width:16px;height:16px;border-radius:4px}:host.sm .checkbox-label{line-height:16px}:host.lg .checkbox-label{font-size:16px}:host.mecx-checkbox-checked .checkbox,:host.mecx-checkbox-indeterminate .checkbox{border:none;background-color:var(--mecx-color-theme-main)}:host.mecx-checkbox-focused .checkbox{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}:host.mecx-disabled .checkbox-label{color:var(--mecx-color-gray-400)}:host.mecx-disabled .checkbox{background-color:var(--mecx-color-gray-50);border-color:var(--mecx-color-gray-200)}:host.mecx-checkbox-invalid:not(.mecx-checkbox-indeterminate) .checkbox{border:2px solid var(--mecx-color-error-700)}:host.mecx-checkbox-checked.mecx-disabled .checkbox,:host.mecx-checkbox-indeterminate.mecx-disabled .checkbox{background-color:var(--mecx-color-gray-400)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }], animations: [
1587
+ ], queries: [{ propertyName: "infoChildren", predicate: MonkeyInfoDirective, descendants: true }, { propertyName: "labelChildren", predicate: MonkeyLabelDirective, descendants: true }, { propertyName: "helperChildren", predicate: MonkeyHelperDirective, descendants: true }], usesOnChanges: true, ngImport: i0, template: "@if (hasHeader) {\n <div class=\"header\">\n <ng-content select=\"monkey-label\" />\n <ng-content select=\"monkey-helper\" />\n </div>\n}\n<label [attr.for]=\"inputId\">\n <input\n type=\"checkbox\"\n [checked]=\"value\"\n [indeterminate]=\"indeterminate\"\n [disabled]=\"disabled\"\n (change)=\"onChangeEvent($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n [id]=\"inputId\"\n [required]=\"required\"\n />\n <span class=\"checkbox\">\n @if (indeterminate) {\n <util-icon class=\"icon\" name=\"minus\" />\n } @else if (value) {\n <util-icon class=\"icon\" name=\"check\" />\n }\n </span>\n <span class=\"checkbox-label\">\n <ng-content></ng-content>\n </span>\n</label>\n@if (showFooter) {\n @switch (getFooterMessages()) {\n @case ('error') {\n <ng-content select=\"monkey-error\" />\n }\n @case ('info') {\n <ng-content select=\"monkey-info\" />\n }\n }\n}\n", styles: [":host{display:inline-flex;flex-direction:column;gap:6px}:host .header{display:flex;justify-content:space-between;gap:6px}:host label{display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}:host .checkbox{display:block;width:24px;height:24px;border:2px solid var(--mecx-color-gray-400);background-color:#fff;border-radius:8px;position:relative;transition:background-color .2s ease;box-sizing:border-box}:host .checkbox .icon{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}:host .checkbox-label{color:var(--mecx-color-gray-900);font-size:14px;font-weight:400;line-height:24px}:host input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}:host.sm .checkbox{width:16px;height:16px;border-radius:4px}:host.sm .checkbox-label{line-height:16px}:host.lg .checkbox-label{font-size:16px}:host.mecx-checkbox-checked .checkbox,:host.mecx-checkbox-indeterminate .checkbox{border:none;background-color:var(--mecx-color-theme-main)}:host.mecx-checkbox-focused .checkbox{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}:host.mecx-disabled .checkbox-label{color:var(--mecx-color-gray-400)}:host.mecx-disabled .checkbox{background-color:var(--mecx-color-gray-50);border-color:var(--mecx-color-gray-200)}:host.mecx-checkbox-invalid:not(.mecx-checkbox-indeterminate) .checkbox{border:2px solid var(--mecx-color-error-700)}:host.mecx-checkbox-checked.mecx-disabled .checkbox,:host.mecx-checkbox-indeterminate.mecx-disabled .checkbox{background-color:var(--mecx-color-gray-400)}\n"], dependencies: [{ kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }, { kind: "component", type: UtilIconComponent, selector: "util-icon", inputs: ["name"] }], animations: [
1078
1588
  trigger('iconAnimation', [
1079
1589
  transition(':enter', [
1080
1590
  animate('250ms ease-in-out', keyframes([
@@ -1093,7 +1603,7 @@ class MonkeyCheckboxComponent {
1093
1603
  }
1094
1604
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyCheckboxComponent, decorators: [{
1095
1605
  type: Component,
1096
- args: [{ selector: 'monkey-checkbox', standalone: true, imports: [ReactiveFormsModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, animations: [
1606
+ args: [{ selector: 'monkey-checkbox', standalone: true, imports: [ReactiveFormsModule, FormsModule, UtilIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, animations: [
1097
1607
  trigger('iconAnimation', [
1098
1608
  transition(':enter', [
1099
1609
  animate('250ms ease-in-out', keyframes([
@@ -1134,16 +1644,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1134
1644
  '[class.sm]': 'size.includes("sm")',
1135
1645
  '[class.md]': 'size.includes("md")',
1136
1646
  '[class.lg]': 'size.includes("lg")'
1137
- }, template: "@if (hasHeader) {\n <div class=\"header\">\n <ng-content select=\"monkey-label\" />\n <ng-content select=\"monkey-helper\" />\n </div>\n}\n<label [attr.for]=\"inputId\">\n <input\n type=\"checkbox\"\n [checked]=\"value\"\n [indeterminate]=\"indeterminate\"\n [disabled]=\"disabled\"\n (change)=\"onChangeEvent($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n [id]=\"inputId\"\n [required]=\"required\"\n />\n <span class=\"checkbox\">\n @if (indeterminate) {\n <div class=\"icon\" @iconAnimation [innerHTML]=\"iconIndeterminate\"></div>\n } @else if (value) {\n <div class=\"icon\" @iconAnimation [innerHTML]=\"iconCheck\"></div>\n }\n </span>\n <span class=\"checkbox-label\">\n <ng-content></ng-content>\n </span>\n</label>\n@if (showFooter) {\n @switch (getFooterMessages()) {\n @case ('error') {\n <ng-content select=\"monkey-error\" />\n }\n @case ('info') {\n <ng-content select=\"monkey-info\" />\n }\n }\n}\n", styles: [":host{display:inline-flex;flex-direction:column;gap:6px}:host .header{display:flex;justify-content:space-between;gap:6px}:host label{display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}:host .checkbox{display:block;width:24px;height:24px;border:2px solid var(--mecx-color-gray-400);background-color:#fff;border-radius:8px;position:relative;transition:background-color .2s ease;box-sizing:border-box}:host .checkbox .icon{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}:host .checkbox-label{color:var(--mecx-color-gray-900);font-size:14px;font-weight:400;line-height:24px}:host input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}:host.sm .checkbox{width:16px;height:16px;border-radius:4px}:host.sm .checkbox-label{line-height:16px}:host.lg .checkbox-label{font-size:16px}:host.mecx-checkbox-checked .checkbox,:host.mecx-checkbox-indeterminate .checkbox{border:none;background-color:var(--mecx-color-theme-main)}:host.mecx-checkbox-focused .checkbox{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}:host.mecx-disabled .checkbox-label{color:var(--mecx-color-gray-400)}:host.mecx-disabled .checkbox{background-color:var(--mecx-color-gray-50);border-color:var(--mecx-color-gray-200)}:host.mecx-checkbox-invalid:not(.mecx-checkbox-indeterminate) .checkbox{border:2px solid var(--mecx-color-error-700)}:host.mecx-checkbox-checked.mecx-disabled .checkbox,:host.mecx-checkbox-indeterminate.mecx-disabled .checkbox{background-color:var(--mecx-color-gray-400)}\n"] }]
1647
+ }, template: "@if (hasHeader) {\n <div class=\"header\">\n <ng-content select=\"monkey-label\" />\n <ng-content select=\"monkey-helper\" />\n </div>\n}\n<label [attr.for]=\"inputId\">\n <input\n type=\"checkbox\"\n [checked]=\"value\"\n [indeterminate]=\"indeterminate\"\n [disabled]=\"disabled\"\n (change)=\"onChangeEvent($event)\"\n (blur)=\"onBlur()\"\n (focus)=\"onFocus()\"\n [id]=\"inputId\"\n [required]=\"required\"\n />\n <span class=\"checkbox\">\n @if (indeterminate) {\n <util-icon class=\"icon\" name=\"minus\" />\n } @else if (value) {\n <util-icon class=\"icon\" name=\"check\" />\n }\n </span>\n <span class=\"checkbox-label\">\n <ng-content></ng-content>\n </span>\n</label>\n@if (showFooter) {\n @switch (getFooterMessages()) {\n @case ('error') {\n <ng-content select=\"monkey-error\" />\n }\n @case ('info') {\n <ng-content select=\"monkey-info\" />\n }\n }\n}\n", styles: [":host{display:inline-flex;flex-direction:column;gap:6px}:host .header{display:flex;justify-content:space-between;gap:6px}:host label{display:inline-flex;align-items:center;justify-content:center;gap:8px;cursor:pointer;-webkit-user-select:none;user-select:none;position:relative}:host .checkbox{display:block;width:24px;height:24px;border:2px solid var(--mecx-color-gray-400);background-color:#fff;border-radius:8px;position:relative;transition:background-color .2s ease;box-sizing:border-box}:host .checkbox .icon{position:absolute;inset:0;display:flex;align-items:center;justify-content:center}:host .checkbox-label{color:var(--mecx-color-gray-900);font-size:14px;font-weight:400;line-height:24px}:host input{position:absolute;opacity:0;cursor:pointer;height:0;width:0}:host.sm .checkbox{width:16px;height:16px;border-radius:4px}:host.sm .checkbox-label{line-height:16px}:host.lg .checkbox-label{font-size:16px}:host.mecx-checkbox-checked .checkbox,:host.mecx-checkbox-indeterminate .checkbox{border:none;background-color:var(--mecx-color-theme-main)}:host.mecx-checkbox-focused .checkbox{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}:host.mecx-disabled .checkbox-label{color:var(--mecx-color-gray-400)}:host.mecx-disabled .checkbox{background-color:var(--mecx-color-gray-50);border-color:var(--mecx-color-gray-200)}:host.mecx-checkbox-invalid:not(.mecx-checkbox-indeterminate) .checkbox{border:2px solid var(--mecx-color-error-700)}:host.mecx-checkbox-checked.mecx-disabled .checkbox,:host.mecx-checkbox-indeterminate.mecx-disabled .checkbox{background-color:var(--mecx-color-gray-400)}\n"] }]
1138
1648
  }], propDecorators: { infoChildren: [{
1139
1649
  type: ContentChildren,
1140
- args: [MonkeyInfo, { descendants: true }]
1650
+ args: [MonkeyInfoDirective, { descendants: true }]
1141
1651
  }], labelChildren: [{
1142
1652
  type: ContentChildren,
1143
- args: [MonkeyLabel, { descendants: true }]
1653
+ args: [MonkeyLabelDirective, { descendants: true }]
1144
1654
  }], helperChildren: [{
1145
1655
  type: ContentChildren,
1146
- args: [MonkeyHelper, { descendants: true }]
1656
+ args: [MonkeyHelperDirective, { descendants: true }]
1147
1657
  }], disabled: [{
1148
1658
  type: Input,
1149
1659
  args: [{ transform: booleanAttribute }]
@@ -1170,8 +1680,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1170
1680
  * MIT Licence
1171
1681
  ************************* */
1172
1682
 
1173
- const MECX_I18N_WRAPPER = new InjectionToken('');
1174
-
1175
1683
  /* eslint-disable no-console */
1176
1684
  /** ************************
1177
1685
  * Copyright Monkey Exchange. All Rights Reserved
@@ -1352,7 +1860,7 @@ class MonkeyDictionaryService {
1352
1860
  }
1353
1861
  }
1354
1862
  });
1355
- const tokenSubject = inject(MECX_I18N_WRAPPER, { optional: true });
1863
+ const tokenSubject = inject(MONKEY_I18N_WRAPPER, { optional: true });
1356
1864
  tokenSubject?.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((value) => {
1357
1865
  this.handleWrapperValues(value);
1358
1866
  });
@@ -1439,7 +1947,8 @@ class MonkeyFormFieldComponent {
1439
1947
  return this._labelId;
1440
1948
  }
1441
1949
  get hideBorder() {
1442
- return this.control.type === 'input-code';
1950
+ const { control } = this;
1951
+ return control?.type === 'input-code' || control?.type === 'radio-button';
1443
1952
  }
1444
1953
  get showHeader() {
1445
1954
  return this.hasLabel || this.hasHelper;
@@ -1465,10 +1974,10 @@ class MonkeyFormFieldComponent {
1465
1974
  return this.control.type === 'date' && !this.hideAction;
1466
1975
  }
1467
1976
  get showCurrency() {
1468
- return this.control.currency;
1977
+ return this.control.currency || false;
1469
1978
  }
1470
1979
  get showPercent() {
1471
- return this.control.percent;
1980
+ return this.control.percent || false;
1472
1981
  }
1473
1982
  get showLoading() {
1474
1983
  return this.control.loading || false;
@@ -1476,7 +1985,6 @@ class MonkeyFormFieldComponent {
1476
1985
  constructor() {
1477
1986
  this.size = 'md';
1478
1987
  this.elementRef = inject(ElementRef);
1479
- this._icons = inject(MonkeyIconsService);
1480
1988
  this._changeDetectorRef = inject(ChangeDetectorRef);
1481
1989
  this._idGenerator = inject(IdGenerator);
1482
1990
  this._labelId = this._idGenerator.getId('monkey-label-');
@@ -1486,9 +1994,6 @@ class MonkeyFormFieldComponent {
1486
1994
  this._previousControl = null;
1487
1995
  this.currencySymbol = getCurrencySymbol(inject(DEFAULT_CURRENCY_CODE));
1488
1996
  this.percentSymbol = '%';
1489
- this.imgClear = this._icons.clear;
1490
- this.imgCalendar = this._icons.calendar;
1491
- this.imgLoading = this._icons.loading;
1492
1997
  this.hasLabel = false;
1493
1998
  this.hasHelper = false;
1494
1999
  this.hasPrefix = false;
@@ -1632,7 +2137,7 @@ class MonkeyFormFieldComponent {
1632
2137
  }
1633
2138
  }
1634
2139
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyFormFieldComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
1635
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyFormFieldComponent, selector: "monkey-form-field", inputs: { id: "id", hideAction: ["hideAction", "hideAction", booleanAttribute], enableClear: ["enableClear", "enableClear", booleanAttribute], size: "size" }, host: { properties: { "class.mecx-disabled": "control.disabled", "class.mecx-form-field-focused": "control.focused", "class.mecx-form-field-invalid": "showInvalid", "class.mecx-form-field-borderless": "hideBorder", "attr.id": "id", "id": "id", "class": "size" }, classAttribute: "mecx-form-field" }, queries: [{ propertyName: "_formFieldControl", first: true, predicate: MonkeyFormFieldControl, descendants: true }, { propertyName: "_labelChildren", predicate: MonkeyLabel, descendants: true }, { propertyName: "_helperChildren", predicate: MonkeyHelper, descendants: true }, { propertyName: "_prefixChildren", predicate: MonkeyPrefix, descendants: true }, { propertyName: "_suffixChildren", predicate: MonkeySuffix, descendants: true }, { propertyName: "_infoChildren", predicate: MonkeyInfo, descendants: true }, { propertyName: "_errorChildren", predicate: MonkeyError, descendants: true }], exportAs: ["monkeyFormField"], ngImport: i0, template: "@if (showHeader) {\n <div class=\"mecx-form-field-header\" (click)=\"control.onContainerClick($event)\">\n <label [id]=\"labelId\" [attr.for]=\"control.id\">\n <ng-content select=\"monkey-label\"></ng-content>\n </label>\n <ng-content select=\"monkey-helper\"></ng-content>\n </div>\n}\n\n<div class=\"mecx-form-field-body\" (click)=\"control.onContainerClick($event)\">\n @if (hasPrefix) {\n <ng-content select=\"monkey-prefix\"></ng-content>\n }\n @if (getSymbols(); as symbols) {\n <div class=\"mecx-form-field-prefix-symbol\">\n {{ symbols }}\n </div>\n }\n\n <ng-content></ng-content>\n\n @if (showClear) {\n <div [innerHTML]=\"imgClear\" class=\"mecx-clear\" (click)=\"onClear($event)\"></div>\n }\n @if (showCalendar) {\n <div [innerHTML]=\"imgCalendar\" class=\"mecx-calendar\" (click)=\"onOpenCalendar($event)\"></div>\n }\n @if (showLoading) {\n <div [innerHTML]=\"imgLoading\" class=\"mecx-form-field-loading\"></div>\n }\n\n @if (hasSuffix) {\n <ng-content select=\"monkey-suffix\"></ng-content>\n }\n</div>\n\n@if (showFooter) {\n <div class=\"mecx-form-field-footer\" (click)=\"control.onContainerClick($event)\">\n @switch (getFooterMessages()) {\n @case ('error') {\n <ng-content select=\"monkey-error\"></ng-content>\n }\n @case ('info') {\n <div class=\"mecx-form-field-info\">\n <ng-content select=\"monkey-info\"></ng-content>\n </div>\n }\n }\n </div>\n}\n", styles: [".mecx-form-field{width:100%;display:inline-flex;flex-direction:column;min-width:0;text-align:left;gap:6px}.mecx-disabled .mecx-form-field{cursor:not-allowed;pointer-events:none}.mecx-form-field-header{display:flex;justify-content:space-between;align-items:center}.mecx-disabled .mecx-form-field-header label{pointer-events:none}.mecx-form-field-body{border-radius:4px;border:2px solid var(--mecx-color-gray-400);padding:8px;gap:4px;background:var(--mecx-color-white);color:var(--mecx-color-gray-500);box-sizing:border-box;height:40px;display:flex;align-items:center;position:relative}.mecx-form-field-invalid .mecx-form-field-body{border:2px solid var(--mecx-color-error-700)}.mecx-form-field-focused .mecx-form-field-body{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}.mecx-disabled .mecx-form-field-body{border-color:var(--mecx-color-gray-50);background:var(--mecx-color-gray-50);border-radius:8px}.mecx-form-field-body .mecx-clear,.mecx-form-field-body .mecx-calendar{display:flex;align-items:center;justify-content:center;cursor:pointer}.mecx-form-field-body .mecx-calendar svg path{fill:var(--mecx-color-theme-main)}.sm .mecx-form-field-body{height:32px}.md .mecx-form-field-body{height:40px}.lg .mecx-form-field-body{height:48px}.mecx-form-field-footer{display:flex;flex-direction:column}.mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-700);font-size:16px;font-weight:400;font-style:normal;width:22px;text-align:center}.mecx-form-field-prefix-symbol .mk-i{display:flex}.mecx-disabled .mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-400)!important;pointer-events:none}.mecx-form-field-loading{display:flex}.mecx-form-field-loading svg path{fill:var(--mecx-color-theme-main)}.mecx-form-field-borderless .mecx-form-field-body{background-color:transparent;border:0;border-radius:0;padding:0}.mecx-form-field-borderless.mecx-form-field-focused .mecx-form-field-body{outline:none;outline-offset:unset}\n"], encapsulation: i0.ViewEncapsulation.None }); }
2140
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyFormFieldComponent, selector: "monkey-form-field", inputs: { id: "id", hideAction: ["hideAction", "hideAction", booleanAttribute], enableClear: ["enableClear", "enableClear", booleanAttribute], size: "size" }, host: { properties: { "class.mecx-disabled": "control.disabled", "class.mecx-form-field-focused": "control.focused", "class.mecx-form-field-invalid": "showInvalid", "class.mecx-form-field-borderless": "hideBorder", "attr.id": "id", "id": "id", "class": "size" }, classAttribute: "mecx-form-field" }, queries: [{ propertyName: "_formFieldControl", first: true, predicate: MonkeyFormFieldControl, descendants: true }, { propertyName: "_labelChildren", predicate: MonkeyLabelDirective, descendants: true }, { propertyName: "_helperChildren", predicate: MonkeyHelperDirective, descendants: true }, { propertyName: "_prefixChildren", predicate: MonkeyPrefixDirective, descendants: true }, { propertyName: "_suffixChildren", predicate: MonkeySuffixDirective, descendants: true }, { propertyName: "_infoChildren", predicate: MonkeyInfoDirective, descendants: true }, { propertyName: "_errorChildren", predicate: MonkeyErrorDirective, descendants: true }], exportAs: ["monkeyFormField"], ngImport: i0, template: "@if (showHeader) {\n <div class=\"mecx-form-field-header\" (click)=\"control.onContainerClick($event)\">\n <label [id]=\"labelId\" [attr.for]=\"control.id\">\n <ng-content select=\"monkey-label\"></ng-content>\n </label>\n <ng-content select=\"monkey-helper\"></ng-content>\n </div>\n}\n\n<div class=\"mecx-form-field-body\" (click)=\"control.onContainerClick($event)\">\n @if (hasPrefix) {\n <ng-content select=\"monkey-prefix\"></ng-content>\n }\n @if (getSymbols(); as symbols) {\n <div class=\"mecx-form-field-prefix-symbol\">\n {{ symbols }}\n </div>\n }\n\n <ng-content></ng-content>\n\n @if (showClear) {\n <util-icon class=\"mecx-clear\" name=\"clear\" (click)=\"onClear($event)\" />\n }\n @if (showCalendar) {\n <util-icon class=\"mecx-calendar\" name=\"calendar\" (click)=\"onOpenCalendar($event)\" />\n }\n @if (showLoading) {\n <util-icon class=\"mecx-form-field-loading\" name=\"loading\" />\n }\n\n @if (hasSuffix) {\n <ng-content select=\"monkey-suffix\"></ng-content>\n }\n</div>\n\n@if (showFooter) {\n <div class=\"mecx-form-field-footer\" (click)=\"control.onContainerClick($event)\">\n @switch (getFooterMessages()) {\n @case ('error') {\n <ng-content select=\"monkey-error\"></ng-content>\n }\n @case ('info') {\n <div class=\"mecx-form-field-info\">\n <ng-content select=\"monkey-info\"></ng-content>\n </div>\n }\n }\n </div>\n}\n", styles: [".mecx-form-field{width:100%;display:inline-flex;flex-direction:column;min-width:0;text-align:left;gap:6px}.mecx-disabled .mecx-form-field{cursor:not-allowed;pointer-events:none}.mecx-form-field-header{display:flex;justify-content:space-between;align-items:center}.mecx-disabled .mecx-form-field-header label{pointer-events:none}.mecx-form-field-body{border-radius:4px;border:2px solid var(--mecx-color-gray-400);padding:8px;gap:4px;background:var(--mecx-color-white);color:var(--mecx-color-gray-500);box-sizing:border-box;height:40px;display:flex;align-items:center;position:relative}.mecx-form-field-invalid .mecx-form-field-body{border:2px solid var(--mecx-color-error-700)}.mecx-form-field-invalid .mecx-form-field-body .mecx-option:not(.mecx-option-disabled).radio:before{border:2px solid var(--mecx-color-error-700)}.mecx-form-field-focused .mecx-form-field-body{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}.mecx-disabled .mecx-form-field-body{border-color:var(--mecx-color-gray-50);background:var(--mecx-color-gray-50);border-radius:8px}.mecx-form-field-body .mecx-clear,.mecx-form-field-body .mecx-calendar{display:flex;align-items:center;justify-content:center;cursor:pointer}.mecx-form-field-body .mecx-calendar svg path{fill:var(--mecx-color-theme-main)}.sm .mecx-form-field-body{height:32px}.md .mecx-form-field-body{height:40px}.lg .mecx-form-field-body{height:48px}.mecx-form-field-footer{display:flex;flex-direction:column}.mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-700);font-size:16px;font-weight:400;font-style:normal;width:22px;text-align:center}.mecx-form-field-prefix-symbol .mk-i{display:flex}.mecx-disabled .mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-400)!important;pointer-events:none}.mecx-form-field-loading{display:flex}.mecx-form-field-loading svg path{fill:var(--mecx-color-theme-main)}.mecx-form-field-borderless .mecx-form-field-body{background-color:transparent;border:0;border-radius:0;padding:0;height:unset;align-items:flex-start;outline:none;outline-offset:unset}.mecx-form-field-borderless.mecx-form-field-focused .mecx-form-field-body{outline:none;outline-offset:unset}\n"], dependencies: [{ kind: "component", type: UtilIconComponent, selector: "util-icon", inputs: ["name"] }], encapsulation: i0.ViewEncapsulation.None }); }
1636
2141
  }
1637
2142
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyFormFieldComponent, decorators: [{
1638
2143
  type: Component,
@@ -1645,7 +2150,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1645
2150
  '[attr.id]': 'id',
1646
2151
  '[id]': 'id',
1647
2152
  '[class]': 'size'
1648
- }, template: "@if (showHeader) {\n <div class=\"mecx-form-field-header\" (click)=\"control.onContainerClick($event)\">\n <label [id]=\"labelId\" [attr.for]=\"control.id\">\n <ng-content select=\"monkey-label\"></ng-content>\n </label>\n <ng-content select=\"monkey-helper\"></ng-content>\n </div>\n}\n\n<div class=\"mecx-form-field-body\" (click)=\"control.onContainerClick($event)\">\n @if (hasPrefix) {\n <ng-content select=\"monkey-prefix\"></ng-content>\n }\n @if (getSymbols(); as symbols) {\n <div class=\"mecx-form-field-prefix-symbol\">\n {{ symbols }}\n </div>\n }\n\n <ng-content></ng-content>\n\n @if (showClear) {\n <div [innerHTML]=\"imgClear\" class=\"mecx-clear\" (click)=\"onClear($event)\"></div>\n }\n @if (showCalendar) {\n <div [innerHTML]=\"imgCalendar\" class=\"mecx-calendar\" (click)=\"onOpenCalendar($event)\"></div>\n }\n @if (showLoading) {\n <div [innerHTML]=\"imgLoading\" class=\"mecx-form-field-loading\"></div>\n }\n\n @if (hasSuffix) {\n <ng-content select=\"monkey-suffix\"></ng-content>\n }\n</div>\n\n@if (showFooter) {\n <div class=\"mecx-form-field-footer\" (click)=\"control.onContainerClick($event)\">\n @switch (getFooterMessages()) {\n @case ('error') {\n <ng-content select=\"monkey-error\"></ng-content>\n }\n @case ('info') {\n <div class=\"mecx-form-field-info\">\n <ng-content select=\"monkey-info\"></ng-content>\n </div>\n }\n }\n </div>\n}\n", styles: [".mecx-form-field{width:100%;display:inline-flex;flex-direction:column;min-width:0;text-align:left;gap:6px}.mecx-disabled .mecx-form-field{cursor:not-allowed;pointer-events:none}.mecx-form-field-header{display:flex;justify-content:space-between;align-items:center}.mecx-disabled .mecx-form-field-header label{pointer-events:none}.mecx-form-field-body{border-radius:4px;border:2px solid var(--mecx-color-gray-400);padding:8px;gap:4px;background:var(--mecx-color-white);color:var(--mecx-color-gray-500);box-sizing:border-box;height:40px;display:flex;align-items:center;position:relative}.mecx-form-field-invalid .mecx-form-field-body{border:2px solid var(--mecx-color-error-700)}.mecx-form-field-focused .mecx-form-field-body{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}.mecx-disabled .mecx-form-field-body{border-color:var(--mecx-color-gray-50);background:var(--mecx-color-gray-50);border-radius:8px}.mecx-form-field-body .mecx-clear,.mecx-form-field-body .mecx-calendar{display:flex;align-items:center;justify-content:center;cursor:pointer}.mecx-form-field-body .mecx-calendar svg path{fill:var(--mecx-color-theme-main)}.sm .mecx-form-field-body{height:32px}.md .mecx-form-field-body{height:40px}.lg .mecx-form-field-body{height:48px}.mecx-form-field-footer{display:flex;flex-direction:column}.mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-700);font-size:16px;font-weight:400;font-style:normal;width:22px;text-align:center}.mecx-form-field-prefix-symbol .mk-i{display:flex}.mecx-disabled .mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-400)!important;pointer-events:none}.mecx-form-field-loading{display:flex}.mecx-form-field-loading svg path{fill:var(--mecx-color-theme-main)}.mecx-form-field-borderless .mecx-form-field-body{background-color:transparent;border:0;border-radius:0;padding:0}.mecx-form-field-borderless.mecx-form-field-focused .mecx-form-field-body{outline:none;outline-offset:unset}\n"] }]
2153
+ }, template: "@if (showHeader) {\n <div class=\"mecx-form-field-header\" (click)=\"control.onContainerClick($event)\">\n <label [id]=\"labelId\" [attr.for]=\"control.id\">\n <ng-content select=\"monkey-label\"></ng-content>\n </label>\n <ng-content select=\"monkey-helper\"></ng-content>\n </div>\n}\n\n<div class=\"mecx-form-field-body\" (click)=\"control.onContainerClick($event)\">\n @if (hasPrefix) {\n <ng-content select=\"monkey-prefix\"></ng-content>\n }\n @if (getSymbols(); as symbols) {\n <div class=\"mecx-form-field-prefix-symbol\">\n {{ symbols }}\n </div>\n }\n\n <ng-content></ng-content>\n\n @if (showClear) {\n <util-icon class=\"mecx-clear\" name=\"clear\" (click)=\"onClear($event)\" />\n }\n @if (showCalendar) {\n <util-icon class=\"mecx-calendar\" name=\"calendar\" (click)=\"onOpenCalendar($event)\" />\n }\n @if (showLoading) {\n <util-icon class=\"mecx-form-field-loading\" name=\"loading\" />\n }\n\n @if (hasSuffix) {\n <ng-content select=\"monkey-suffix\"></ng-content>\n }\n</div>\n\n@if (showFooter) {\n <div class=\"mecx-form-field-footer\" (click)=\"control.onContainerClick($event)\">\n @switch (getFooterMessages()) {\n @case ('error') {\n <ng-content select=\"monkey-error\"></ng-content>\n }\n @case ('info') {\n <div class=\"mecx-form-field-info\">\n <ng-content select=\"monkey-info\"></ng-content>\n </div>\n }\n }\n </div>\n}\n", styles: [".mecx-form-field{width:100%;display:inline-flex;flex-direction:column;min-width:0;text-align:left;gap:6px}.mecx-disabled .mecx-form-field{cursor:not-allowed;pointer-events:none}.mecx-form-field-header{display:flex;justify-content:space-between;align-items:center}.mecx-disabled .mecx-form-field-header label{pointer-events:none}.mecx-form-field-body{border-radius:4px;border:2px solid var(--mecx-color-gray-400);padding:8px;gap:4px;background:var(--mecx-color-white);color:var(--mecx-color-gray-500);box-sizing:border-box;height:40px;display:flex;align-items:center;position:relative}.mecx-form-field-invalid .mecx-form-field-body{border:2px solid var(--mecx-color-error-700)}.mecx-form-field-invalid .mecx-form-field-body .mecx-option:not(.mecx-option-disabled).radio:before{border:2px solid var(--mecx-color-error-700)}.mecx-form-field-focused .mecx-form-field-body{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}.mecx-disabled .mecx-form-field-body{border-color:var(--mecx-color-gray-50);background:var(--mecx-color-gray-50);border-radius:8px}.mecx-form-field-body .mecx-clear,.mecx-form-field-body .mecx-calendar{display:flex;align-items:center;justify-content:center;cursor:pointer}.mecx-form-field-body .mecx-calendar svg path{fill:var(--mecx-color-theme-main)}.sm .mecx-form-field-body{height:32px}.md .mecx-form-field-body{height:40px}.lg .mecx-form-field-body{height:48px}.mecx-form-field-footer{display:flex;flex-direction:column}.mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-700);font-size:16px;font-weight:400;font-style:normal;width:22px;text-align:center}.mecx-form-field-prefix-symbol .mk-i{display:flex}.mecx-disabled .mecx-form-field-prefix-symbol{color:var(--mecx-color-gray-400)!important;pointer-events:none}.mecx-form-field-loading{display:flex}.mecx-form-field-loading svg path{fill:var(--mecx-color-theme-main)}.mecx-form-field-borderless .mecx-form-field-body{background-color:transparent;border:0;border-radius:0;padding:0;height:unset;align-items:flex-start;outline:none;outline-offset:unset}.mecx-form-field-borderless.mecx-form-field-focused .mecx-form-field-body{outline:none;outline-offset:unset}\n"] }]
1649
2154
  }], ctorParameters: () => [], propDecorators: { id: [{
1650
2155
  type: Input
1651
2156
  }], hideAction: [{
@@ -1661,22 +2166,22 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1661
2166
  args: [MonkeyFormFieldControl]
1662
2167
  }], _labelChildren: [{
1663
2168
  type: ContentChildren,
1664
- args: [MonkeyLabel, { descendants: true }]
2169
+ args: [MonkeyLabelDirective, { descendants: true }]
1665
2170
  }], _helperChildren: [{
1666
2171
  type: ContentChildren,
1667
- args: [MonkeyHelper, { descendants: true }]
2172
+ args: [MonkeyHelperDirective, { descendants: true }]
1668
2173
  }], _prefixChildren: [{
1669
2174
  type: ContentChildren,
1670
- args: [MonkeyPrefix, { descendants: true }]
2175
+ args: [MonkeyPrefixDirective, { descendants: true }]
1671
2176
  }], _suffixChildren: [{
1672
2177
  type: ContentChildren,
1673
- args: [MonkeySuffix, { descendants: true }]
2178
+ args: [MonkeySuffixDirective, { descendants: true }]
1674
2179
  }], _infoChildren: [{
1675
2180
  type: ContentChildren,
1676
- args: [MonkeyInfo, { descendants: true }]
2181
+ args: [MonkeyInfoDirective, { descendants: true }]
1677
2182
  }], _errorChildren: [{
1678
2183
  type: ContentChildren,
1679
- args: [MonkeyError, { descendants: true }]
2184
+ args: [MonkeyErrorDirective, { descendants: true }]
1680
2185
  }] } });
1681
2186
 
1682
2187
  /** ************************
@@ -1686,12 +2191,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1686
2191
  ************************* */
1687
2192
  class MonkeyFormFieldModule {
1688
2193
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyFormFieldModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1689
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MonkeyFormFieldModule, declarations: [MonkeyFormFieldComponent], exports: [MonkeyFormFieldComponent] }); }
2194
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MonkeyFormFieldModule, declarations: [MonkeyFormFieldComponent], imports: [UtilIconComponent], exports: [MonkeyFormFieldComponent] }); }
1690
2195
  static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyFormFieldModule }); }
1691
2196
  }
1692
2197
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyFormFieldModule, decorators: [{
1693
2198
  type: NgModule,
1694
2199
  args: [{
2200
+ imports: [UtilIconComponent],
1695
2201
  declarations: [MonkeyFormFieldComponent],
1696
2202
  exports: [MonkeyFormFieldComponent]
1697
2203
  }]
@@ -1829,7 +2335,7 @@ class MonkeyInputCurrencyDirective {
1829
2335
  focusOutChanged() {
1830
2336
  this.ngControl?.control?.markAsTouched();
1831
2337
  }
1832
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyInputCurrencyDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1$1.CurrencyPipe }], target: i0.ɵɵFactoryTarget.Directive }); }
2338
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyInputCurrencyDirective, deps: [{ token: i0.ElementRef }, { token: i0.Renderer2 }, { token: i1.CurrencyPipe }], target: i0.ɵɵFactoryTarget.Directive }); }
1833
2339
  static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.13", type: MonkeyInputCurrencyDirective, selector: "input[monkey-input-currency]", inputs: { name: "name", disabled: ["disabled", "disabled", booleanAttribute], id: "id", required: "required", type: "type" }, host: { listeners: { "focus": "focusChanged(true)", "focusout": "focusOutChanged()", "blur": "focusChanged(false)" }, properties: { "class.mecx-input-disabled": "disabled", "id": "id", "disabled": "disabled", "required": "required", "attr.name": "name || null", "attr.disabled": "disabled || null", "attr.aria-invalid": "(empty && required) ? null : errorState", "attr.aria-required": "required", "attr.id": "id" }, classAttribute: "mecx-input" }, providers: [
1834
2340
  {
1835
2341
  provide: MonkeyFormFieldControl,
@@ -1866,7 +2372,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
1866
2372
  }
1867
2373
  ]
1868
2374
  }]
1869
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1$1.CurrencyPipe }], propDecorators: { name: [{
2375
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i0.Renderer2 }, { type: i1.CurrencyPipe }], propDecorators: { name: [{
1870
2376
  type: Input
1871
2377
  }], disabled: [{
1872
2378
  type: Input,
@@ -2131,7 +2637,7 @@ class MonkeyIconButtonComponent {
2131
2637
  }
2132
2638
  }
2133
2639
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconButtonComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2134
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyIconButtonComponent, isStandalone: true, selector: "monkey-icon-button", inputs: { type: "type", size: "size", disabled: "disabled", icon: "icon", id: "id" }, host: { attributes: { "data-testid": "monkey-icon-button" }, listeners: { "click": "onClick($event)" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<button class=\"mecx-icon-button\" [ngClass]=\"type + ' ' + size\" [disabled]=\"disabled\">\n <div class=\"content\">\n <monkey-icon [icon]=\"icon\" [size]=\"size\" first></monkey-icon>\n </div>\n</button>\n", styles: ["monkey-icon-button{display:inline-block;margin:0 2px}monkey-icon-button .mecx-icon-button{width:100%;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;transition:background-color .15s ease-out,color .15s ease-out}monkey-icon-button .mecx-icon-button .content{display:flex;align-items:center;justify-content:center;padding:12px;transition:transform .2s cubic-bezier(0,.5,.2,1)}monkey-icon-button .mecx-icon-button .content span{width:100%}monkey-icon-button .mecx-icon-button .content .mk-i{display:flex}monkey-icon-button .mecx-icon-button:disabled{background:var(--mecx-color-gray-100)!important;color:var(--mecx-color-gray-400)!important;cursor:not-allowed!important}monkey-icon-button .mecx-icon-button:disabled.secondary{background:unset!important;border:1px solid var(--mecx-color-gray-400)!important}monkey-icon-button .mecx-icon-button.primary{color:var(--mecx-color-theme-contrast-main);background:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.primary:hover:not(:disabled){background:var(--mecx-color-theme-600)}monkey-icon-button .mecx-icon-button.secondary{border:2px solid var(--mecx-color-gray-400);background:unset}monkey-icon-button .mecx-icon-button.secondary:disabled{border-width:1px}monkey-icon-button .mecx-icon-button.secondary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.tertiary{background:unset}monkey-icon-button .mecx-icon-button.tertiary span{text-decoration:underline}monkey-icon-button .mecx-icon-button.tertiary:disabled{background:unset!important;border-width:1px}monkey-icon-button .mecx-icon-button.tertiary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.sm{width:32px;height:32px}monkey-icon-button .mecx-icon-button.sm .mk-i{font-size:20px}monkey-icon-button .mecx-icon-button.md{width:40px;height:40px}monkey-icon-button .mecx-icon-button.md .mk-i{font-size:22px}monkey-icon-button .mecx-icon-button.lg{width:48px;height:48px}monkey-icon-button .mecx-icon-button.lg .mk-i{font-size:24px}monkey-icon-button .mecx-icon-button.full-width{width:100%}monkey-icon-button .mecx-icon-button:focus{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}monkey-icon-button .mecx-icon-button:active:not(:disabled).primary{background:var(--mecx-color-theme-main);opacity:.8;outline:none}monkey-icon-button .mecx-icon-button:active:not(:disabled) .content{transform:scale(.8)}:host:has(.mecx-button:active) .mecx-button{outline:unset;outline-offset:unset}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MonkeyIconComponent, selector: "monkey-icon", inputs: ["icon", "size", "id"] }], encapsulation: i0.ViewEncapsulation.None }); }
2640
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyIconButtonComponent, isStandalone: true, selector: "monkey-icon-button", inputs: { type: "type", size: "size", disabled: "disabled", icon: "icon", id: "id" }, host: { attributes: { "data-testid": "monkey-icon-button" }, listeners: { "click": "onClick($event)" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<button class=\"mecx-icon-button\" [ngClass]=\"type + ' ' + size\" [disabled]=\"disabled\">\n <div class=\"content\">\n <monkey-icon [icon]=\"icon\" [size]=\"size\" first></monkey-icon>\n </div>\n</button>\n", styles: ["monkey-icon-button{display:inline-block;margin:0 2px}monkey-icon-button .mecx-icon-button{width:100%;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;transition:background-color .15s ease-out,color .15s ease-out}monkey-icon-button .mecx-icon-button .content{display:flex;align-items:center;justify-content:center;padding:12px;transition:transform .2s cubic-bezier(0,.5,.2,1)}monkey-icon-button .mecx-icon-button .content span{width:100%}monkey-icon-button .mecx-icon-button .content .mk-i{display:flex}monkey-icon-button .mecx-icon-button:disabled{background:var(--mecx-color-gray-100)!important;color:var(--mecx-color-gray-400)!important;cursor:not-allowed!important}monkey-icon-button .mecx-icon-button:disabled.secondary{background:unset!important;border:1px solid var(--mecx-color-gray-400)!important}monkey-icon-button .mecx-icon-button.primary{color:var(--mecx-color-theme-contrast-main);background:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.primary:hover:not(:disabled){background:var(--mecx-color-theme-600)}monkey-icon-button .mecx-icon-button.secondary{border:2px solid var(--mecx-color-gray-400);background:unset}monkey-icon-button .mecx-icon-button.secondary:disabled{border-width:1px}monkey-icon-button .mecx-icon-button.secondary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.tertiary{background:unset}monkey-icon-button .mecx-icon-button.tertiary span{text-decoration:underline}monkey-icon-button .mecx-icon-button.tertiary:disabled{background:unset!important;border-width:1px}monkey-icon-button .mecx-icon-button.tertiary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.sm{width:32px;height:32px}monkey-icon-button .mecx-icon-button.sm .mk-i{font-size:16px}monkey-icon-button .mecx-icon-button.md{width:40px;height:40px}monkey-icon-button .mecx-icon-button.md .mk-i{font-size:18px}monkey-icon-button .mecx-icon-button.lg{width:48px;height:48px}monkey-icon-button .mecx-icon-button.lg .mk-i{font-size:24px}monkey-icon-button .mecx-icon-button.full-width{width:100%}monkey-icon-button .mecx-icon-button:focus{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}monkey-icon-button .mecx-icon-button:active:not(:disabled).primary{background:var(--mecx-color-theme-main);opacity:.8;outline:none}monkey-icon-button .mecx-icon-button:active:not(:disabled) .content{transform:scale(.8)}:host:has(.mecx-button:active) .mecx-button{outline:unset;outline-offset:unset}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { kind: "component", type: MonkeyIconComponent, selector: "monkey-icon", inputs: ["icon", "size", "id"] }], encapsulation: i0.ViewEncapsulation.None }); }
2135
2641
  }
2136
2642
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyIconButtonComponent, decorators: [{
2137
2643
  type: Component,
@@ -2139,7 +2645,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2139
2645
  'data-testid': 'monkey-icon-button',
2140
2646
  '[attr.id]': 'id',
2141
2647
  '[id]': 'id'
2142
- }, template: "<button class=\"mecx-icon-button\" [ngClass]=\"type + ' ' + size\" [disabled]=\"disabled\">\n <div class=\"content\">\n <monkey-icon [icon]=\"icon\" [size]=\"size\" first></monkey-icon>\n </div>\n</button>\n", styles: ["monkey-icon-button{display:inline-block;margin:0 2px}monkey-icon-button .mecx-icon-button{width:100%;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;transition:background-color .15s ease-out,color .15s ease-out}monkey-icon-button .mecx-icon-button .content{display:flex;align-items:center;justify-content:center;padding:12px;transition:transform .2s cubic-bezier(0,.5,.2,1)}monkey-icon-button .mecx-icon-button .content span{width:100%}monkey-icon-button .mecx-icon-button .content .mk-i{display:flex}monkey-icon-button .mecx-icon-button:disabled{background:var(--mecx-color-gray-100)!important;color:var(--mecx-color-gray-400)!important;cursor:not-allowed!important}monkey-icon-button .mecx-icon-button:disabled.secondary{background:unset!important;border:1px solid var(--mecx-color-gray-400)!important}monkey-icon-button .mecx-icon-button.primary{color:var(--mecx-color-theme-contrast-main);background:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.primary:hover:not(:disabled){background:var(--mecx-color-theme-600)}monkey-icon-button .mecx-icon-button.secondary{border:2px solid var(--mecx-color-gray-400);background:unset}monkey-icon-button .mecx-icon-button.secondary:disabled{border-width:1px}monkey-icon-button .mecx-icon-button.secondary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.tertiary{background:unset}monkey-icon-button .mecx-icon-button.tertiary span{text-decoration:underline}monkey-icon-button .mecx-icon-button.tertiary:disabled{background:unset!important;border-width:1px}monkey-icon-button .mecx-icon-button.tertiary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.sm{width:32px;height:32px}monkey-icon-button .mecx-icon-button.sm .mk-i{font-size:20px}monkey-icon-button .mecx-icon-button.md{width:40px;height:40px}monkey-icon-button .mecx-icon-button.md .mk-i{font-size:22px}monkey-icon-button .mecx-icon-button.lg{width:48px;height:48px}monkey-icon-button .mecx-icon-button.lg .mk-i{font-size:24px}monkey-icon-button .mecx-icon-button.full-width{width:100%}monkey-icon-button .mecx-icon-button:focus{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}monkey-icon-button .mecx-icon-button:active:not(:disabled).primary{background:var(--mecx-color-theme-main);opacity:.8;outline:none}monkey-icon-button .mecx-icon-button:active:not(:disabled) .content{transform:scale(.8)}:host:has(.mecx-button:active) .mecx-button{outline:unset;outline-offset:unset}\n"] }]
2648
+ }, template: "<button class=\"mecx-icon-button\" [ngClass]=\"type + ' ' + size\" [disabled]=\"disabled\">\n <div class=\"content\">\n <monkey-icon [icon]=\"icon\" [size]=\"size\" first></monkey-icon>\n </div>\n</button>\n", styles: ["monkey-icon-button{display:inline-block;margin:0 2px}monkey-icon-button .mecx-icon-button{width:100%;display:flex;align-items:center;justify-content:center;border-radius:8px;cursor:pointer;transition:background-color .15s ease-out,color .15s ease-out}monkey-icon-button .mecx-icon-button .content{display:flex;align-items:center;justify-content:center;padding:12px;transition:transform .2s cubic-bezier(0,.5,.2,1)}monkey-icon-button .mecx-icon-button .content span{width:100%}monkey-icon-button .mecx-icon-button .content .mk-i{display:flex}monkey-icon-button .mecx-icon-button:disabled{background:var(--mecx-color-gray-100)!important;color:var(--mecx-color-gray-400)!important;cursor:not-allowed!important}monkey-icon-button .mecx-icon-button:disabled.secondary{background:unset!important;border:1px solid var(--mecx-color-gray-400)!important}monkey-icon-button .mecx-icon-button.primary{color:var(--mecx-color-theme-contrast-main);background:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.primary:hover:not(:disabled){background:var(--mecx-color-theme-600)}monkey-icon-button .mecx-icon-button.secondary{border:2px solid var(--mecx-color-gray-400);background:unset}monkey-icon-button .mecx-icon-button.secondary:disabled{border-width:1px}monkey-icon-button .mecx-icon-button.secondary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.tertiary{background:unset}monkey-icon-button .mecx-icon-button.tertiary span{text-decoration:underline}monkey-icon-button .mecx-icon-button.tertiary:disabled{background:unset!important;border-width:1px}monkey-icon-button .mecx-icon-button.tertiary:hover:not(:disabled){color:var(--mecx-color-theme-main)}monkey-icon-button .mecx-icon-button.sm{width:32px;height:32px}monkey-icon-button .mecx-icon-button.sm .mk-i{font-size:16px}monkey-icon-button .mecx-icon-button.md{width:40px;height:40px}monkey-icon-button .mecx-icon-button.md .mk-i{font-size:18px}monkey-icon-button .mecx-icon-button.lg{width:48px;height:48px}monkey-icon-button .mecx-icon-button.lg .mk-i{font-size:24px}monkey-icon-button .mecx-icon-button.full-width{width:100%}monkey-icon-button .mecx-icon-button:focus{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}monkey-icon-button .mecx-icon-button:active:not(:disabled).primary{background:var(--mecx-color-theme-main);opacity:.8;outline:none}monkey-icon-button .mecx-icon-button:active:not(:disabled) .content{transform:scale(.8)}:host:has(.mecx-button:active) .mecx-button{outline:unset;outline-offset:unset}\n"] }]
2143
2649
  }], ctorParameters: () => [], propDecorators: { type: [{
2144
2650
  type: Input
2145
2651
  }], size: [{
@@ -2364,7 +2870,7 @@ class MonkeyDateRangeMonthComponent {
2364
2870
  });
2365
2871
  }
2366
2872
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDateRangeMonthComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2367
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyDateRangeMonthComponent, isStandalone: true, selector: "monkey-date-range-month", inputs: { month: "month", year: "year", startDate: "startDate", endDate: "endDate", hidePrevious: ["hidePrevious", "hidePrevious", booleanAttribute], hideNext: ["hideNext", "hideNext", booleanAttribute], minDate: "minDate", maxDate: "maxDate", id: "id" }, outputs: { onNavigate: "onNavigate", onDate: "onDate" }, host: { attributes: { "data-testid": "month" }, properties: { "attr.id": "id", "id": "id" } }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"i18nDictionary | async as i18n\">\n <div class=\"header\">\n @if (!hidePrevious) {\n <monkey-icon-button\n size=\"sm\"\n icon=\"arrow-left\"\n type=\"secondary\"\n class=\"previous\"\n [disabled]=\"daysInMonth.blockPrev\"\n (click)=\"onNavigate.next('previous')\"\n >\n </monkey-icon-button>\n }\n\n {{ i18n?.['MONTHS']?.[month] }} {{ year }}\n\n @if (!hideNext) {\n <monkey-icon-button\n size=\"sm\"\n icon=\"arrow-right\"\n type=\"secondary\"\n class=\"next\"\n [disabled]=\"daysInMonth.blockNext\"\n (click)=\"onNavigate.next('next')\"\n >\n </monkey-icon-button>\n }\n </div>\n\n <div class=\"week-labels\">\n @for (day of i18n?.['WEEK-DAYS']; track day) {\n <span class=\"day\">{{ day }}</span>\n }\n </div>\n\n <div class=\"dates\">\n @for (day of daysInMonth.days; track $index) {\n <div\n class=\"day\"\n [class.disabled]=\"day!.isDisabled\"\n [class.in-range]=\"isInRange(day!)\"\n [class.selected]=\"isSelected(day!)\"\n [class.first]=\"isFirst(day!)\"\n [class.last]=\"isLast(day!)\"\n [class.in-range-temporary]=\"isInRangeTemporary(day!)\"\n [class.temporary-last]=\"isInLastTemporary(day!)\"\n (click)=\"onSelectDate($event, day!)\"\n (mouseenter)=\"temporaryEndDate = day!\"\n (mouseleave)=\"temporaryEndDate = null\"\n >\n {{ day!.date | date: 'd' }}\n @if (day?.isToday) {\n <span class=\"today\"></span>\n }\n </div>\n }\n </div>\n</ng-container>\n", styles: [":host{width:100%}:host .header{display:flex;align-items:center;justify-content:center;position:relative;margin-bottom:12px}:host .header monkey-icon-button{max-width:32px;background:transparent}:host .header monkey-icon-button.previous{position:absolute;left:0}:host .header monkey-icon-button.next{position:absolute;right:0}:host .week-labels{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;font-weight:700;font-size:.9rem;margin-bottom:4px;gap:12px 0}:host .week-labels .day{height:24px;border:none;background:transparent;text-align:center;display:flex;align-items:center;justify-content:center;font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.14px}:host .dates{display:grid;grid-template-columns:repeat(7,1fr);gap:12px 0}:host .dates .day{height:24px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;color:var(--mecx-color-gray-700);text-align:center;font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.14px;position:relative;border:1px solid transparent;-webkit-user-select:none;user-select:none}:host .dates .day .today{position:absolute;width:60%;bottom:1px;font-size:36px;letter-spacing:1.48!important}:host .dates .day .today:not(.selected){border-bottom:2px solid var(--mecx-color-theme-main)}:host .dates .day.disabled{color:var(--mecx-color-gray-400);font-weight:400;cursor:not-allowed}:host .dates .day.selected{background-color:var(--mecx-color-theme-main)!important;color:var(--mecx-color-white)!important}:host .dates .day.in-range{background-color:var(--mecx-color-gray-100);color:var(--mecx-color-theme-main)}:host .dates .day.in-range-temporary{background-color:var(--mecx-color-gray-100);color:var(--mecx-color-theme-main)}:host .dates .day.first,:host .dates .day.last{background-color:var(--mecx-color-theme-main);color:var(--mecx-color-white)}:host .dates .day.first{border-top-left-radius:8px;border-bottom-left-radius:8px}:host .dates .day.last,:host .dates .day.temporary-last{border-top-right-radius:8px;border-bottom-right-radius:8px}:host .dates .day:hover:not(.disabled,.in-range):before{content:\"\";border:1px solid var(--mecx-color-theme-main);border-radius:8px;height:100%;width:100%;position:absolute}:host .dates .day:hover:not(.disabled,.in-range).selected{background:var(--mecx-color-gray-100);color:var(--mecx-color-theme-main)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1$1.DatePipe, name: "date" }, { kind: "component", type: MonkeyIconButtonComponent, selector: "monkey-icon-button", inputs: ["type", "size", "disabled", "icon", "id"] }] }); }
2873
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyDateRangeMonthComponent, isStandalone: true, selector: "monkey-date-range-month", inputs: { month: "month", year: "year", startDate: "startDate", endDate: "endDate", hidePrevious: ["hidePrevious", "hidePrevious", booleanAttribute], hideNext: ["hideNext", "hideNext", booleanAttribute], minDate: "minDate", maxDate: "maxDate", id: "id" }, outputs: { onNavigate: "onNavigate", onDate: "onDate" }, host: { attributes: { "data-testid": "month" }, properties: { "attr.id": "id", "id": "id" } }, usesOnChanges: true, ngImport: i0, template: "<ng-container *ngIf=\"i18nDictionary | async as i18n\">\n <div class=\"header\">\n @if (!hidePrevious) {\n <monkey-icon-button\n size=\"sm\"\n icon=\"arrow-left\"\n type=\"secondary\"\n class=\"previous\"\n [disabled]=\"daysInMonth.blockPrev\"\n (click)=\"onNavigate.next('previous')\"\n >\n </monkey-icon-button>\n }\n\n {{ i18n?.['MONTHS']?.[month] }} {{ year }}\n\n @if (!hideNext) {\n <monkey-icon-button\n size=\"sm\"\n icon=\"arrow-right\"\n type=\"secondary\"\n class=\"next\"\n [disabled]=\"daysInMonth.blockNext\"\n (click)=\"onNavigate.next('next')\"\n >\n </monkey-icon-button>\n }\n </div>\n\n <div class=\"week-labels\">\n @for (day of i18n?.['WEEK-DAYS']; track day) {\n <span class=\"day\">{{ day }}</span>\n }\n </div>\n\n <div class=\"dates\">\n @for (day of daysInMonth.days; track $index) {\n <div\n class=\"day\"\n [class.disabled]=\"day!.isDisabled\"\n [class.in-range]=\"isInRange(day!)\"\n [class.selected]=\"isSelected(day!)\"\n [class.first]=\"isFirst(day!)\"\n [class.last]=\"isLast(day!)\"\n [class.in-range-temporary]=\"isInRangeTemporary(day!)\"\n [class.temporary-last]=\"isInLastTemporary(day!)\"\n (click)=\"onSelectDate($event, day!)\"\n (mouseenter)=\"temporaryEndDate = day!\"\n (mouseleave)=\"temporaryEndDate = null\"\n >\n {{ day!.date | date: 'd' }}\n @if (day?.isToday) {\n <span class=\"today\"></span>\n }\n </div>\n }\n </div>\n</ng-container>\n", styles: [":host{width:100%}:host .header{display:flex;align-items:center;justify-content:center;position:relative;margin-bottom:12px}:host .header monkey-icon-button{max-width:32px;background:transparent}:host .header monkey-icon-button.previous{position:absolute;left:0}:host .header monkey-icon-button.next{position:absolute;right:0}:host .week-labels{display:grid;grid-template-columns:repeat(7,1fr);text-align:center;font-weight:700;font-size:.9rem;margin-bottom:4px;gap:12px 0}:host .week-labels .day{height:24px;border:none;background:transparent;text-align:center;display:flex;align-items:center;justify-content:center;font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.14px}:host .dates{display:grid;grid-template-columns:repeat(7,1fr);gap:12px 0}:host .dates .day{height:24px;display:flex;flex-direction:column;align-items:center;justify-content:center;cursor:pointer;color:var(--mecx-color-gray-700);text-align:center;font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.14px;position:relative;border:1px solid transparent;-webkit-user-select:none;user-select:none}:host .dates .day .today{position:absolute;width:60%;bottom:1px;font-size:36px;letter-spacing:1.48!important}:host .dates .day .today:not(.selected){border-bottom:2px solid var(--mecx-color-theme-main)}:host .dates .day.disabled{color:var(--mecx-color-gray-400);font-weight:400;cursor:not-allowed}:host .dates .day.selected{background-color:var(--mecx-color-theme-main)!important;color:var(--mecx-color-white)!important}:host .dates .day.in-range{background-color:var(--mecx-color-gray-100);color:var(--mecx-color-theme-main)}:host .dates .day.in-range-temporary{background-color:var(--mecx-color-gray-100);color:var(--mecx-color-theme-main)}:host .dates .day.first,:host .dates .day.last{background-color:var(--mecx-color-theme-main);color:var(--mecx-color-white)}:host .dates .day.first{border-top-left-radius:8px;border-bottom-left-radius:8px}:host .dates .day.last,:host .dates .day.temporary-last{border-top-right-radius:8px;border-bottom-right-radius:8px}:host .dates .day:hover:not(.disabled,.in-range):before{content:\"\";border:1px solid var(--mecx-color-theme-main);border-radius:8px;height:100%;width:100%;position:absolute}:host .dates .day:hover:not(.disabled,.in-range).selected{background:var(--mecx-color-gray-100);color:var(--mecx-color-theme-main)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "pipe", type: i1.DatePipe, name: "date" }, { kind: "component", type: MonkeyIconButtonComponent, selector: "monkey-icon-button", inputs: ["type", "size", "disabled", "icon", "id"] }] }); }
2368
2874
  }
2369
2875
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDateRangeMonthComponent, decorators: [{
2370
2876
  type: Component,
@@ -2433,7 +2939,7 @@ class MonkeyDateRangeQuickActionsComponent {
2433
2939
  this.onChange.next(value);
2434
2940
  }
2435
2941
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDateRangeQuickActionsComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2436
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyDateRangeQuickActionsComponent, isStandalone: true, selector: "monkey-date-range-quick-actions", inputs: { id: "id" }, outputs: { onChange: "onChange" }, host: { attributes: { "data-testid": "quick-actions" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<ng-container *ngIf=\"i18nDictionary | async as i18n\">\n @for (item of actions; track item.key) {\n <div\n class=\"item\"\n [class.selected]=\"item.key === selectedAction\"\n (click)=\"onHandleAction(item)\"\n [attr.tabindex]=\"$index\"\n >\n {{ i18n?.['QUICK-ACTIONS']?.[item.key] }}\n </div>\n }\n</ng-container>\n", styles: [":host{display:inline-flex;flex-direction:column;padding:24px 8px 12px 12px;gap:4px}:host .item{color:var(--mecx-color-gray-900);font-size:13px;font-style:normal;font-weight:400;line-height:16px;letter-spacing:.26px;padding:4px 12px;cursor:pointer;display:flex;align-items:center;-webkit-user-select:none;user-select:none;border-radius:4px}:host .item.selected{border-radius:4px;background:var(--mecx-color-gray-100)}:host .item:hover{border-radius:4px;background:var(--mecx-color-gray-100)}:host .item:focus{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }] }); }
2942
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyDateRangeQuickActionsComponent, isStandalone: true, selector: "monkey-date-range-quick-actions", inputs: { id: "id" }, outputs: { onChange: "onChange" }, host: { attributes: { "data-testid": "quick-actions" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<ng-container *ngIf=\"i18nDictionary | async as i18n\">\n @for (item of actions; track item.key) {\n <div\n class=\"item\"\n [class.selected]=\"item.key === selectedAction\"\n (click)=\"onHandleAction(item)\"\n [attr.tabindex]=\"$index\"\n >\n {{ i18n?.['QUICK-ACTIONS']?.[item.key] }}\n </div>\n }\n</ng-container>\n", styles: [":host{display:inline-flex;flex-direction:column;padding:24px 8px 12px 12px;gap:4px}:host .item{color:var(--mecx-color-gray-900);font-size:13px;font-style:normal;font-weight:400;line-height:16px;letter-spacing:.26px;padding:4px 12px;cursor:pointer;display:flex;align-items:center;-webkit-user-select:none;user-select:none;border-radius:4px}:host .item.selected{border-radius:4px;background:var(--mecx-color-gray-100)}:host .item:hover{border-radius:4px;background:var(--mecx-color-gray-100)}:host .item:focus{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }] }); }
2437
2943
  }
2438
2944
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDateRangeQuickActionsComponent, decorators: [{
2439
2945
  type: Component,
@@ -2621,7 +3127,7 @@ class MonkeyDateRangeComponent {
2621
3127
  this.secondCalendar = calendars.secondCalendar;
2622
3128
  }
2623
3129
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDateRangeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
2624
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyDateRangeComponent, isStandalone: true, selector: "monkey-date-range", inputs: { startDate: "startDate", endDate: "endDate", hideQuickAction: ["hideQuickAction", "hideQuickAction", booleanAttribute], hideHeader: ["hideHeader", "hideHeader", booleanAttribute], hideActions: ["hideActions", "hideActions", booleanAttribute], hideSecondCalendar: ["hideSecondCalendar", "hideSecondCalendar", booleanAttribute], allowFastActionOnHeader: ["allowFastActionOnHeader", "allowFastActionOnHeader", booleanAttribute], minDate: "minDate", maxDate: "maxDate", id: "id" }, outputs: { onCancel: "onCancel", onDate: "onDate" }, host: { attributes: { "data-testid": "monkey-date-range" }, listeners: { "window:resize": "onResize($event)" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<ng-container *ngIf=\"i18nDictionary | async as i18n\">\n <div class=\"container-group\">\n @if (!hideQuickAction) {\n <div class=\"quick-actions\">\n <monkey-date-range-quick-actions (onChange)=\"onHandleQuickAction($event)\">\n </monkey-date-range-quick-actions>\n </div>\n }\n\n <div class=\"container\">\n @if (!hideHeader) {\n <div class=\"header\" [class.no-quick-action]=\"hideQuickAction\">\n @if (allowFastActionOnHeader) {\n <div class=\"quick-actions\">\n <monkey-date-range-quick-actions (onChange)=\"onHandleQuickAction($event)\">\n </monkey-date-range-quick-actions>\n </div>\n } @else {\n <div class=\"inputs\">\n <monkey-form-field hideAction enableClear size=\"sm\">\n <monkey-label>{{ i18n?.['START-DATE'] }}</monkey-label>\n <input\n type=\"date\"\n monkey-input\n id=\"startDate\"\n [(ngModel)]=\"handledStartDate\"\n (ngModelChange)=\"onDataChange($event, true)\"\n [min]=\"handledMinDate\"\n [max]=\"handledEndDate ? handledEndDate : handledMaxDate\"\n (change)=\"onChangeInputStartDate($event)\"\n />\n </monkey-form-field>\n <monkey-form-field hideAction enableClear size=\"sm\">\n <monkey-label>{{ i18n?.['END-DATE'] }}</monkey-label>\n <input\n type=\"date\"\n monkey-input\n id=\"endDate\"\n [(ngModel)]=\"handledEndDate\"\n (ngModelChange)=\"onDataChange($event, false)\"\n [min]=\"handledStartDate ? handledStartDate : ''\"\n [max]=\"handledMaxDate\"\n (change)=\"onChangeInputEndDate($event)\"\n />\n </monkey-form-field>\n </div>\n @if (isInvalidInterval) {\n <monkey-error>{{ i18n?.['INVALID'] }}</monkey-error>\n }\n }\n </div>\n }\n\n <div class=\"body\">\n <div class=\"calendars\">\n <monkey-date-range-month\n [month]=\"firstCalendar.month\"\n [year]=\"firstCalendar.year\"\n [startDate]=\"handledStartDate\"\n [endDate]=\"handledEndDate\"\n (onDate)=\"onHandleDate($event)\"\n (onNavigate)=\"onHandleNavigate($event)\"\n [hideNext]=\"!hideSecondCalendar\"\n [minDate]=\"handledMinDate\"\n [maxDate]=\"handledMaxDate\"\n >\n </monkey-date-range-month>\n\n @if (!hideSecondCalendar) {\n <monkey-date-range-month\n [month]=\"secondCalendar.month\"\n [year]=\"secondCalendar.year\"\n [startDate]=\"handledStartDate\"\n [endDate]=\"handledEndDate\"\n (onDate)=\"onHandleDate($event)\"\n (onNavigate)=\"onHandleNavigate($event)\"\n hidePrevious\n [minDate]=\"handledMinDate\"\n [maxDate]=\"handledMaxDate\"\n >\n </monkey-date-range-month>\n }\n </div>\n </div>\n\n @if (!hideActions) {\n <div class=\"actions\">\n <monkey-button size=\"md\" type=\"secondary\" (click)=\"onCancel.next(null)\">\n {{ i18n?.ACTIONS?.CANCEL }}\n </monkey-button>\n <monkey-button\n size=\"md\"\n (click)=\"onSubmit()\"\n [disabled]=\"!this.handledStartDate || !this.handledEndDate\"\n >\n {{ i18n?.ACTIONS?.APPLY }}\n </monkey-button>\n </div>\n }\n </div>\n </div>\n</ng-container>\n", styles: [":host{display:block;border:2px solid var(--mecx-color-gray-200);border-radius:16px}:host .container-group{width:100%;display:inline-flex}:host .container-group .quick-actions{width:100%;max-width:172px;border-top-left-radius:16px;border-bottom-left-radius:16px;border-right:2px solid var(--mecx-color-gray-200);background:var(--mecx-color-white)}:host .container-group .container{width:100%;display:inline-flex;flex-direction:column}:host .header{padding:16px 24px;border-radius:1px 16px 1px 1px;border-bottom:1px solid var(--mecx-color-gray-200);background:var(--mecx-color-gray-50)}:host .header .quick-actions{max-width:unset;border:unset}:host .header .quick-actions monkey-date-range-quick-actions{flex-flow:row wrap;padding:unset;justify-content:space-between;background:var(--mecx-color-gray-50)}:host .header.no-quick-action{border-top-left-radius:16px}:host .header .inputs{max-width:400px;display:flex;gap:16px}:host .header monkey-error{margin-top:2px}:host .body{padding:16px 24px}:host .body .calendars{display:inline-flex;width:100%;gap:48px}:host .actions{border-top:1px solid var(--mecx-color-gray-200);padding:16px 24px;display:flex;justify-content:flex-end;align-items:center;gap:16px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MonkeyInputModule }, { kind: "directive", type: MonkeyInputDirective, selector: "input[monkey-input],textarea[monkey-input]", inputs: ["name", "disabled", "id", "required", "type", "min", "max", "percent"], exportAs: ["monkeyInput"] }, { kind: "ngmodule", type: MonkeyFormFieldModule }, { kind: "component", type: MonkeyFormFieldComponent, selector: "monkey-form-field", inputs: ["id", "hideAction", "enableClear", "size"], exportAs: ["monkeyFormField"] }, { kind: "ngmodule", type: MonkeyDirectivesModule }, { kind: "directive", type: MonkeyError, selector: "monkey-error" }, { kind: "directive", type: MonkeyLabel, selector: "monkey-label" }, { kind: "component", type: MonkeyButtonComponent, selector: "monkey-button", inputs: ["disabled", "size", "type", "id"] }, { kind: "component", type: MonkeyDateRangeMonthComponent, selector: "monkey-date-range-month", inputs: ["month", "year", "startDate", "endDate", "hidePrevious", "hideNext", "minDate", "maxDate", "id"], outputs: ["onNavigate", "onDate"] }, { kind: "component", type: MonkeyDateRangeQuickActionsComponent, selector: "monkey-date-range-quick-actions", inputs: ["id"], outputs: ["onChange"] }] }); }
3130
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyDateRangeComponent, isStandalone: true, selector: "monkey-date-range", inputs: { startDate: "startDate", endDate: "endDate", hideQuickAction: ["hideQuickAction", "hideQuickAction", booleanAttribute], hideHeader: ["hideHeader", "hideHeader", booleanAttribute], hideActions: ["hideActions", "hideActions", booleanAttribute], hideSecondCalendar: ["hideSecondCalendar", "hideSecondCalendar", booleanAttribute], allowFastActionOnHeader: ["allowFastActionOnHeader", "allowFastActionOnHeader", booleanAttribute], minDate: "minDate", maxDate: "maxDate", id: "id" }, outputs: { onCancel: "onCancel", onDate: "onDate" }, host: { attributes: { "data-testid": "monkey-date-range" }, listeners: { "window:resize": "onResize($event)" }, properties: { "attr.id": "id", "id": "id" } }, ngImport: i0, template: "<ng-container *ngIf=\"i18nDictionary | async as i18n\">\n <div class=\"container-group\">\n @if (!hideQuickAction) {\n <div class=\"quick-actions\">\n <monkey-date-range-quick-actions (onChange)=\"onHandleQuickAction($event)\">\n </monkey-date-range-quick-actions>\n </div>\n }\n\n <div class=\"container\">\n @if (!hideHeader) {\n <div class=\"header\" [class.no-quick-action]=\"hideQuickAction\">\n @if (allowFastActionOnHeader) {\n <div class=\"quick-actions\">\n <monkey-date-range-quick-actions (onChange)=\"onHandleQuickAction($event)\">\n </monkey-date-range-quick-actions>\n </div>\n } @else {\n <div class=\"inputs\">\n <monkey-form-field hideAction enableClear size=\"sm\">\n <monkey-label>{{ i18n?.['START-DATE'] }}</monkey-label>\n <input\n type=\"date\"\n monkey-input\n id=\"startDate\"\n [(ngModel)]=\"handledStartDate\"\n (ngModelChange)=\"onDataChange($event, true)\"\n [min]=\"handledMinDate\"\n [max]=\"handledEndDate ? handledEndDate : handledMaxDate\"\n (change)=\"onChangeInputStartDate($event)\"\n />\n </monkey-form-field>\n <monkey-form-field hideAction enableClear size=\"sm\">\n <monkey-label>{{ i18n?.['END-DATE'] }}</monkey-label>\n <input\n type=\"date\"\n monkey-input\n id=\"endDate\"\n [(ngModel)]=\"handledEndDate\"\n (ngModelChange)=\"onDataChange($event, false)\"\n [min]=\"handledStartDate ? handledStartDate : ''\"\n [max]=\"handledMaxDate\"\n (change)=\"onChangeInputEndDate($event)\"\n />\n </monkey-form-field>\n </div>\n @if (isInvalidInterval) {\n <monkey-error>{{ i18n?.['INVALID'] }}</monkey-error>\n }\n }\n </div>\n }\n\n <div class=\"body\">\n <div class=\"calendars\">\n <monkey-date-range-month\n [month]=\"firstCalendar.month\"\n [year]=\"firstCalendar.year\"\n [startDate]=\"handledStartDate\"\n [endDate]=\"handledEndDate\"\n (onDate)=\"onHandleDate($event)\"\n (onNavigate)=\"onHandleNavigate($event)\"\n [hideNext]=\"!hideSecondCalendar\"\n [minDate]=\"handledMinDate\"\n [maxDate]=\"handledMaxDate\"\n >\n </monkey-date-range-month>\n\n @if (!hideSecondCalendar) {\n <monkey-date-range-month\n [month]=\"secondCalendar.month\"\n [year]=\"secondCalendar.year\"\n [startDate]=\"handledStartDate\"\n [endDate]=\"handledEndDate\"\n (onDate)=\"onHandleDate($event)\"\n (onNavigate)=\"onHandleNavigate($event)\"\n hidePrevious\n [minDate]=\"handledMinDate\"\n [maxDate]=\"handledMaxDate\"\n >\n </monkey-date-range-month>\n }\n </div>\n </div>\n\n @if (!hideActions) {\n <div class=\"actions\">\n <monkey-button size=\"md\" type=\"secondary\" (click)=\"onCancel.next(null)\">\n {{ i18n?.ACTIONS?.CANCEL }}\n </monkey-button>\n <monkey-button\n size=\"md\"\n (click)=\"onSubmit()\"\n [disabled]=\"!this.handledStartDate || !this.handledEndDate\"\n >\n {{ i18n?.ACTIONS?.APPLY }}\n </monkey-button>\n </div>\n }\n </div>\n </div>\n</ng-container>\n", styles: [":host{display:block;border:2px solid var(--mecx-color-gray-200);border-radius:16px}:host .container-group{width:100%;display:inline-flex}:host .container-group .quick-actions{width:100%;max-width:172px;border-top-left-radius:16px;border-bottom-left-radius:16px;border-right:2px solid var(--mecx-color-gray-200);background:var(--mecx-color-white)}:host .container-group .container{width:100%;display:inline-flex;flex-direction:column}:host .header{padding:16px 24px;border-radius:1px 16px 1px 1px;border-bottom:1px solid var(--mecx-color-gray-200);background:var(--mecx-color-gray-50)}:host .header .quick-actions{max-width:unset;border:unset}:host .header .quick-actions monkey-date-range-quick-actions{flex-flow:row wrap;padding:unset;justify-content:space-between;background:var(--mecx-color-gray-50)}:host .header.no-quick-action{border-top-left-radius:16px}:host .header .inputs{max-width:400px;display:flex;gap:16px}:host .header monkey-error{margin-top:2px}:host .body{padding:16px 24px}:host .body .calendars{display:inline-flex;width:100%;gap:48px}:host .actions{border-top:1px solid var(--mecx-color-gray-200);padding:16px 24px;display:flex;justify-content:flex-end;align-items:center;gap:16px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: MonkeyInputModule }, { kind: "directive", type: MonkeyInputDirective, selector: "input[monkey-input],textarea[monkey-input]", inputs: ["name", "disabled", "id", "required", "type", "min", "max", "percent"], exportAs: ["monkeyInput"] }, { kind: "ngmodule", type: MonkeyFormFieldModule }, { kind: "component", type: MonkeyFormFieldComponent, selector: "monkey-form-field", inputs: ["id", "hideAction", "enableClear", "size"], exportAs: ["monkeyFormField"] }, { kind: "ngmodule", type: MonkeyDirectivesModule }, { kind: "directive", type: MonkeyErrorDirective, selector: "monkey-error" }, { kind: "directive", type: MonkeyLabelDirective, selector: "monkey-label" }, { kind: "component", type: MonkeyButtonComponent, selector: "monkey-button", inputs: ["disabled", "size", "type", "id"] }, { kind: "component", type: MonkeyDateRangeMonthComponent, selector: "monkey-date-range-month", inputs: ["month", "year", "startDate", "endDate", "hidePrevious", "hideNext", "minDate", "maxDate", "id"], outputs: ["onNavigate", "onDate"] }, { kind: "component", type: MonkeyDateRangeQuickActionsComponent, selector: "monkey-date-range-quick-actions", inputs: ["id"], outputs: ["onChange"] }] }); }
2625
3131
  }
2626
3132
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyDateRangeComponent, decorators: [{
2627
3133
  type: Component,
@@ -2960,7 +3466,80 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
2960
3466
  * This style guide was developed by Monkey Exchange Team
2961
3467
  * MIT Licence
2962
3468
  ************************* */
2963
- class MonkeyInputUploadComponent {
3469
+ class MonkeyOptionComponent {
3470
+ constructor() {
3471
+ this.idGenerator = inject(IdGenerator);
3472
+ this.disabled = false;
3473
+ this.type = 'select';
3474
+ this.selected = false;
3475
+ this.tabIndex = 0;
3476
+ this.id = this.idGenerator.getId('mecx-option-');
3477
+ }
3478
+ get displayContent() {
3479
+ return (this._content?.nativeElement.textContent || '').trim();
3480
+ }
3481
+ handleAction(event) {
3482
+ if (this.disabled) {
3483
+ event.stopPropagation();
3484
+ event.preventDefault();
3485
+ }
3486
+ else {
3487
+ this.action?.();
3488
+ }
3489
+ }
3490
+ onClick(event) {
3491
+ this.handleAction(event);
3492
+ }
3493
+ handleKeyDown(event) {
3494
+ const { key } = event;
3495
+ if (key === 'Enter' || key === ' ') {
3496
+ this.handleAction(event);
3497
+ }
3498
+ }
3499
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3500
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.13", type: MonkeyOptionComponent, isStandalone: true, selector: "monkey-option", inputs: { value: "value", disabled: ["disabled", "disabled", booleanAttribute], type: "type" }, host: { attributes: { "data-testid": "monkey-option" }, listeners: { "click": "onClick($event)", "keydown": "handleKeyDown($event)" }, properties: { "attr.id": "id", "class.mecx-option-disabled": "disabled", "class.mecx-option-selected": "selected", "attr.tabindex": "disabled ? -1 : tabIndex", "class": "type" }, classAttribute: "mecx-option" }, viewQueries: [{ propertyName: "_content", first: true, predicate: ["content"], descendants: true, static: true }], ngImport: i0, template: `<div #content><ng-content /></div>`, isInline: true, styles: ["monkey-option{display:flex;position:relative;cursor:pointer;padding:16px;line-height:16px;font-size:14px;color:var(--mecx-color-gray-900);transition:all .1s ease-in-out}monkey-option>div{display:flex;white-space:normal;word-break:break-all}monkey-option.select:hover{color:var(--mecx-color-gray-900);background-color:var(--mecx-color-gray-100)}monkey-option.select.mecx-option-disabled{color:var(--mecx-color-gray-400);background-color:#fff;cursor:default}monkey-option.select.mecx-option-selected{color:var(--mecx-color-theme-contrast-main);background-color:var(--mecx-color-theme-main)}.ng-animating monkey-option.select.mecx-option-selected{color:var(--mecx-color-gray-900);background-color:var(--mecx-color-gray-100)}monkey-option.radio{display:flex;align-items:center;gap:10px;padding:8px 24px 8px 0;cursor:pointer;border-radius:4px;-webkit-user-select:none;user-select:none;position:relative}monkey-option.radio:before{content:\"\";width:20px;height:20px;border:2px solid var(--mecx-color-gray-600);border-radius:800px;box-sizing:border-box;background-color:var(--mecx-color-white)}monkey-option.radio:focus{outline:unset;outline-offset:1px}monkey-option.radio:focus:before{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}monkey-option.radio.mecx-option-selected:before{border:5px solid var(--mecx-color-theme-main)}monkey-option.radio.mecx-option-disabled{opacity:.5;pointer-events:none}monkey-option.radio.mecx-option-disabled:before{background:var(--mecx-color-white);border-color:var(--mecx-color-gray-400)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
3501
+ }
3502
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyOptionComponent, decorators: [{
3503
+ type: Component,
3504
+ args: [{ selector: 'monkey-option', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `<div #content><ng-content /></div>`, encapsulation: ViewEncapsulation.None, host: {
3505
+ 'data-testid': 'monkey-option',
3506
+ '[attr.id]': 'id',
3507
+ class: 'mecx-option',
3508
+ '[class.mecx-option-disabled]': 'disabled',
3509
+ '[class.mecx-option-selected]': 'selected',
3510
+ '[attr.tabindex]': 'disabled ? -1 : tabIndex',
3511
+ '[class]': 'type'
3512
+ }, styles: ["monkey-option{display:flex;position:relative;cursor:pointer;padding:16px;line-height:16px;font-size:14px;color:var(--mecx-color-gray-900);transition:all .1s ease-in-out}monkey-option>div{display:flex;white-space:normal;word-break:break-all}monkey-option.select:hover{color:var(--mecx-color-gray-900);background-color:var(--mecx-color-gray-100)}monkey-option.select.mecx-option-disabled{color:var(--mecx-color-gray-400);background-color:#fff;cursor:default}monkey-option.select.mecx-option-selected{color:var(--mecx-color-theme-contrast-main);background-color:var(--mecx-color-theme-main)}.ng-animating monkey-option.select.mecx-option-selected{color:var(--mecx-color-gray-900);background-color:var(--mecx-color-gray-100)}monkey-option.radio{display:flex;align-items:center;gap:10px;padding:8px 24px 8px 0;cursor:pointer;border-radius:4px;-webkit-user-select:none;user-select:none;position:relative}monkey-option.radio:before{content:\"\";width:20px;height:20px;border:2px solid var(--mecx-color-gray-600);border-radius:800px;box-sizing:border-box;background-color:var(--mecx-color-white)}monkey-option.radio:focus{outline:unset;outline-offset:1px}monkey-option.radio:focus:before{outline:2px solid var(--mecx-color-theme-main);outline-offset:1px}monkey-option.radio.mecx-option-selected:before{border:5px solid var(--mecx-color-theme-main)}monkey-option.radio.mecx-option-disabled{opacity:.5;pointer-events:none}monkey-option.radio.mecx-option-disabled:before{background:var(--mecx-color-white);border-color:var(--mecx-color-gray-400)}\n"] }]
3513
+ }], propDecorators: { _content: [{
3514
+ type: ViewChild,
3515
+ args: ['content', { static: true }]
3516
+ }], value: [{
3517
+ type: Input
3518
+ }], disabled: [{
3519
+ type: Input,
3520
+ args: [{ transform: booleanAttribute }]
3521
+ }], type: [{
3522
+ type: Input
3523
+ }], onClick: [{
3524
+ type: HostListener,
3525
+ args: ['click', ['$event']]
3526
+ }], handleKeyDown: [{
3527
+ type: HostListener,
3528
+ args: ['keydown', ['$event']]
3529
+ }] } });
3530
+
3531
+ /** ************************
3532
+ * Copyright Monkey Exchange. All Rights Reserved
3533
+ * This style guide was developed by Monkey Exchange Team
3534
+ * MIT Licence
3535
+ ************************* */
3536
+
3537
+ /** ************************
3538
+ * Copyright Monkey Exchange. All Rights Reserved
3539
+ * This style guide was developed by Monkey Exchange Team
3540
+ * MIT Licence
3541
+ ************************* */
3542
+ class MonkeySelectComponent {
2964
3543
  get disabled() {
2965
3544
  if (this.ngControl && this.ngControl.disabled !== null) {
2966
3545
  return this.ngControl.disabled;
@@ -2982,86 +3561,836 @@ class MonkeyInputUploadComponent {
2982
3561
  this.stateChanges.next();
2983
3562
  }
2984
3563
  set value(value) {
2985
- if (this._value !== value && value !== undefined) {
3564
+ if (this._value !== value) {
2986
3565
  this._value = value;
2987
3566
  this._onChange(value);
2988
- this._onTouched(value);
2989
3567
  }
2990
3568
  }
2991
3569
  get value() {
2992
3570
  return this._value;
2993
3571
  }
2994
- constructor() {
2995
- this.progress = 0;
3572
+ constructor(overlay, changeDetectorRef, viewContainerRef, formField) {
3573
+ this.overlay = overlay;
3574
+ this.changeDetectorRef = changeDetectorRef;
3575
+ this.viewContainerRef = viewContainerRef;
3576
+ this.formField = formField;
3577
+ this.tabIndex = 0;
3578
+ this.onChange = new EventEmitter();
3579
+ this.onSearch = new EventEmitter();
2996
3580
  this.placeholder = '';
2997
- this.maxSizeBytes = 5 * 1024 * 1024;
2998
- this.allowedExtensions = ['.jpg', '.jpeg', '.png', '.pdf', '.txt', '.xls', '.xlsx'];
2999
3581
  this.loading = false;
3000
- this.tabIndex = 0;
3001
- this._disabled = false;
3582
+ this.showSearch = true;
3583
+ this.searchPlaceholder = '';
3584
+ this.callbackSearch = false;
3002
3585
  this._value = null;
3003
- this.onChange = new EventEmitter();
3004
- this.ngControl = inject(NgControl, { self: true, optional: true });
3586
+ this.labelSelected = '';
3587
+ this.overlayRef = null;
3588
+ this._destroyRef = inject(DestroyRef);
3005
3589
  this.idGenerator = inject(IdGenerator);
3006
- this.id = this.idGenerator.getId('monkey-input-upload-');
3007
- this.focused = false;
3008
- this.type = '';
3590
+ this.ngControl = inject(NgControl, { self: true, optional: true });
3591
+ this._elementRef = inject(ElementRef);
3009
3592
  this.currency = false;
3593
+ this.focused = false;
3594
+ this._disabled = false;
3595
+ this.id = this.idGenerator.getId('monkey-select-');
3010
3596
  this.percent = false;
3011
3597
  this.stateChanges = new Subject();
3598
+ this.type = '';
3599
+ this.searchHandle = new EventEmitter();
3600
+ this.searchDictionary = inject(MonkeyDictionaryService).get('NO-DATA');
3601
+ this.loadingDictionary = inject(MonkeyDictionaryService).get('LOADING');
3602
+ this.showSearchNoData = false;
3603
+ this.isOpen = false;
3604
+ this.searchData = '';
3605
+ this.onAnimationEnd = (event) => {
3606
+ if (event.toState === 'closed') {
3607
+ this.closeOverlay();
3608
+ }
3609
+ };
3012
3610
  this._onChange = () => { };
3013
3611
  this._onTouched = () => { };
3014
3612
  if (this.ngControl) {
3015
3613
  this.ngControl.valueAccessor = this;
3016
3614
  }
3017
3615
  }
3018
- validateFileSize(file) {
3019
- return file.size <= this.maxSizeBytes;
3020
- }
3021
- validateFileExtension(file) {
3022
- if (!this.allowedExtensions || !this.allowedExtensions.length) {
3023
- return true;
3616
+ changeControl() {
3617
+ if (this.formField?.control) {
3618
+ this.formField.control.loading = this.loading;
3024
3619
  }
3025
- const fileExtension = getFileExtension(file.name);
3026
- const allowedExts = this.allowedExtensions.map((ext) => {
3027
- return ext.trim().replace('.', '').toLowerCase();
3620
+ }
3621
+ changeSelected() {
3622
+ setTimeout(() => {
3623
+ if (this.options) {
3624
+ this.options.forEach((opt) => {
3625
+ opt.selected = opt.value === this.value;
3626
+ });
3627
+ this.updateSelectedLabel();
3628
+ }
3629
+ this.changeDetectorRef.markForCheck();
3028
3630
  });
3029
- return allowedExts.includes(fileExtension);
3030
3631
  }
3031
- onContainerClick(event) {
3032
- if (!this.loading) {
3033
- this.fileInput.nativeElement.click();
3034
- }
3632
+ initializeOptions() {
3633
+ this.options.forEach((option) => {
3634
+ if (!option.action) {
3635
+ option.action = this.selectOption.bind(this, option);
3636
+ }
3637
+ });
3035
3638
  }
3036
- _onFocus() {
3037
- if (!this.disabled) {
3038
- this.focused = true;
3039
- this._onTouched();
3040
- this.stateChanges.next();
3639
+ openDropdown() {
3640
+ if (this.options?.length) {
3641
+ this.formField.control.disableToBeDirty = true;
3642
+ this.isOpen = true;
3643
+ this.createOverlay();
3041
3644
  }
3042
3645
  }
3043
- _onBlur() {
3646
+ closeDropdown() {
3647
+ this.changeDetectorRef.markForCheck();
3648
+ this.isOpen = false;
3044
3649
  this.focused = false;
3045
- this.stateChanges.next();
3046
- }
3047
- ngAfterContentInit() { }
3048
- ngOnChanges(changes) { }
3049
- ngOnDestroy() { }
3050
- registerOnChange(fn) {
3051
- this._onChange = fn;
3052
- }
3053
- registerOnTouched(fn) {
3054
- this._onTouched = fn;
3055
- }
3056
- setDisabledState(isDisabled) {
3057
- this.disabled = isDisabled;
3058
- if (this.fileInput) {
3059
- this.fileInput.nativeElement.disabled = isDisabled;
3650
+ this.formField.control.disableToBeDirty = false;
3651
+ if (!this.callbackSearch) {
3652
+ this.searchData = '';
3060
3653
  }
3061
3654
  }
3062
- writeValue(value) {
3063
- this.value = value;
3064
- }
3655
+ closeOverlay() {
3656
+ if (this.overlayRef) {
3657
+ this.overlayRef.dispose();
3658
+ this.overlayRef = null;
3659
+ }
3660
+ }
3661
+ initializeWithOverlay() {
3662
+ if (this.showSearch) {
3663
+ const element = this.overlayRef?.overlayElement.querySelector(`#${this.id}-search`);
3664
+ this.options.forEach((opt) => {
3665
+ const element = this.overlayRef?.overlayElement.querySelector(`#${opt.id}`);
3666
+ if (!element)
3667
+ return;
3668
+ element.style.display = '';
3669
+ });
3670
+ setTimeout(() => {
3671
+ element?.focus();
3672
+ }, 0);
3673
+ this.showSearchNoData = false;
3674
+ }
3675
+ setTimeout(() => {
3676
+ const selected = this.options.find((opt) => {
3677
+ return opt.selected;
3678
+ });
3679
+ if (selected) {
3680
+ const element = this.overlayRef?.overlayElement.querySelector(`#${selected.id}`);
3681
+ element?.scrollIntoView({ behavior: 'instant', block: 'center' });
3682
+ }
3683
+ }, 0);
3684
+ }
3685
+ createOverlay() {
3686
+ if (this.overlayRef) {
3687
+ return;
3688
+ }
3689
+ const offset = 4;
3690
+ const positions = [
3691
+ {
3692
+ originX: 'start',
3693
+ originY: 'bottom',
3694
+ overlayX: 'start',
3695
+ overlayY: 'top',
3696
+ offsetY: offset
3697
+ },
3698
+ {
3699
+ originX: 'start',
3700
+ originY: 'top',
3701
+ overlayX: 'start',
3702
+ overlayY: 'bottom',
3703
+ offsetY: -offset
3704
+ }
3705
+ ];
3706
+ let anchor = this.trigger;
3707
+ let width = anchor.nativeElement.offsetWidth;
3708
+ if (this.formField?.elementRef) {
3709
+ const el = this.formField?.elementRef.nativeElement.querySelector('.mecx-form-field-body');
3710
+ anchor = el;
3711
+ width = el.offsetWidth;
3712
+ }
3713
+ const positionStrategy = this.overlay
3714
+ .position()
3715
+ .flexibleConnectedTo(anchor)
3716
+ .withPositions(positions)
3717
+ .withPush(true);
3718
+ this.overlayRef = this.overlay.create({
3719
+ positionStrategy,
3720
+ scrollStrategy: this.overlay.scrollStrategies.block(),
3721
+ width,
3722
+ hasBackdrop: true,
3723
+ backdropClass: 'no-class'
3724
+ });
3725
+ const portal = new TemplatePortal(this.overlayTemplate, this.viewContainerRef);
3726
+ this.overlayRef.attach(portal);
3727
+ this.overlayRef
3728
+ .backdropClick()
3729
+ .pipe(takeUntilDestroyed(this._destroyRef))
3730
+ .subscribe(() => {
3731
+ return this.closeDropdown();
3732
+ });
3733
+ this.initializeWithOverlay();
3734
+ }
3735
+ updateSelectedLabel() {
3736
+ const selectedOption = this.options.find((opt) => {
3737
+ return opt.value === this.value;
3738
+ });
3739
+ this.labelSelected = selectedOption ? selectedOption.displayContent : '';
3740
+ }
3741
+ executeSearch(search) {
3742
+ let found = false;
3743
+ this.options.forEach((opt) => {
3744
+ const element = this.overlayRef?.overlayElement.querySelector(`#${opt.id}`);
3745
+ if (!element)
3746
+ return;
3747
+ const isMatch = normalizeStringToSearch(opt.displayContent).includes(normalizeStringToSearch(search));
3748
+ if (isMatch) {
3749
+ found = true;
3750
+ }
3751
+ element.style.display = isMatch ? '' : 'none';
3752
+ });
3753
+ this.repositionScroll();
3754
+ this.showSearchNoData = !found;
3755
+ }
3756
+ repositionScroll() {
3757
+ const overlayElement = this.overlayRef?.overlayElement.querySelector('.mecx-select-overlay');
3758
+ if (overlayElement) {
3759
+ overlayElement.scrollTop = 0;
3760
+ }
3761
+ }
3762
+ ngOnInit() {
3763
+ this.searchHandle
3764
+ .pipe(debounceTime(200), takeUntilDestroyed(this._destroyRef))
3765
+ .subscribe((search) => {
3766
+ if (this.callbackSearch) {
3767
+ this.onSearch.next(search);
3768
+ this.repositionScroll();
3769
+ }
3770
+ else {
3771
+ this.executeSearch(search);
3772
+ }
3773
+ });
3774
+ }
3775
+ ngAfterContentInit() {
3776
+ this.initializeOptions();
3777
+ this.options.changes.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((resp) => {
3778
+ this.updateSelectedLabel();
3779
+ this.initializeOptions();
3780
+ this.changeSelected();
3781
+ });
3782
+ }
3783
+ ngOnDestroy() {
3784
+ if (this.overlayRef) {
3785
+ this.overlayRef.dispose();
3786
+ }
3787
+ }
3788
+ toggleDropdown() {
3789
+ if (!this.disabled) {
3790
+ if (this.isOpen) {
3791
+ this.closeDropdown();
3792
+ this._onTouched();
3793
+ }
3794
+ else {
3795
+ this.openDropdown();
3796
+ }
3797
+ }
3798
+ }
3799
+ selectOption(option) {
3800
+ if (!option.disabled && !this.disabled) {
3801
+ this.value = option.value;
3802
+ this.updateSelectedLabel();
3803
+ this.closeDropdown();
3804
+ this._onChange(this.value);
3805
+ this.onChange.emit(this.value);
3806
+ this.options.forEach((opt) => {
3807
+ opt.selected = opt.value === this.value;
3808
+ });
3809
+ }
3810
+ }
3811
+ writeValue(value) {
3812
+ this.value = value;
3813
+ this.changeSelected();
3814
+ }
3815
+ onContainerClick(event) {
3816
+ if (this.disabled)
3817
+ return;
3818
+ this.openDropdown();
3819
+ this._elementRef.nativeElement.focus();
3820
+ }
3821
+ _onFocus() {
3822
+ if (!this.disabled) {
3823
+ this.focused = true;
3824
+ this._onTouched();
3825
+ this.stateChanges.next();
3826
+ }
3827
+ }
3828
+ _onBlur() {
3829
+ this.focused = false;
3830
+ this.stateChanges.next();
3831
+ }
3832
+ registerOnChange(fn) {
3833
+ this._onChange = fn;
3834
+ }
3835
+ registerOnTouched(fn) {
3836
+ this._onTouched = fn;
3837
+ }
3838
+ setDisabledState(isDisabled) {
3839
+ this.disabled = isDisabled;
3840
+ }
3841
+ ngOnChanges(changes) {
3842
+ let hasChanges = false;
3843
+ // eslint-disable-next-line dot-notation
3844
+ const changesLoading = changes?.['loading'];
3845
+ if (changesLoading?.currentValue !== changesLoading?.previousValue) {
3846
+ hasChanges = true;
3847
+ this.changeControl();
3848
+ }
3849
+ if (hasChanges) {
3850
+ this.stateChanges.next();
3851
+ }
3852
+ }
3853
+ onHandleSearch(event) {
3854
+ try {
3855
+ const { value } = event.target;
3856
+ const handled = sanitizeString(value);
3857
+ this.searchHandle.next(handled || '');
3858
+ }
3859
+ catch (e) {
3860
+ // not to do
3861
+ }
3862
+ }
3863
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySelectComponent, deps: [{ token: i1$1.Overlay }, { token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }, { token: MonkeyFormFieldComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
3864
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeySelectComponent, isStandalone: true, selector: "monkey-select", inputs: { tabIndex: "tabIndex", placeholder: "placeholder", loading: ["loading", "loading", booleanAttribute], showSearch: ["showSearch", "showSearch", booleanAttribute], searchPlaceholder: "searchPlaceholder", callbackSearch: ["callbackSearch", "callbackSearch", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], required: ["required", "required", booleanAttribute], value: "value" }, outputs: { onChange: "onChange", onSearch: "onSearch" }, host: { attributes: { "data-testid": "monkey-select" }, listeners: { "focus": "_onFocus()", "blur": "_onBlur()" }, properties: { "class.mecx-select-disabled": "_disabled", "class.mecx-select-focused": "focused", "attr.id": "id", "attr.tabindex": "disabled ? -1 : tabIndex" }, classAttribute: "mecx-select" }, providers: [
3865
+ // eslint-disable-next-line no-use-before-define
3866
+ { provide: MonkeyFormFieldControl, useExisting: MonkeySelectComponent }
3867
+ ], queries: [{ propertyName: "options", predicate: MonkeyOptionComponent }], viewQueries: [{ propertyName: "overlayTemplate", first: true, predicate: ["overlayTemplate"], descendants: true }, { propertyName: "overlayEl", first: true, predicate: ["overlay"], descendants: true }, { propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"mecx-select-trigger\"\n [class.open]=\"isOpen\"\n (click)=\"toggleDropdown()\"\n role=\"combobox\"\n [attr.aria-expanded]=\"isOpen\"\n #trigger\n>\n <div class=\"mecx-select-value\" [class.has-value]=\"value\">\n <span>{{ labelSelected || placeholder }}</span>\n </div>\n\n @if (!loading) {\n <util-icon class=\"mecx-select-icon\" name=\"arrowDown\" />\n }\n</div>\n\n<ng-template #overlayTemplate>\n <div class=\"mecx-select-body-overlay\">\n @if (showSearch) {\n <div class=\"mecx-select-search\">\n <util-icon class=\"mecx-select-search-icon\" name=\"search\" />\n <input\n (input)=\"onHandleSearch($event)\"\n type=\"text\"\n [id]=\"id + '-search'\"\n autocomplete=\"off\"\n maxlength=\"50\"\n [placeholder]=\"searchPlaceholder\"\n [(ngModel)]=\"searchData\"\n />\n </div>\n }\n <div\n class=\"mecx-select-overlay\"\n #overlay\n [@animation]=\"isOpen ? 'open' : 'closed'\"\n (@animation.done)=\"onAnimationEnd($event)\"\n >\n <ng-content />\n </div>\n @if (showSearch && showSearchNoData) {\n <div class=\"mecx-select-search-no-data\">\n <util-icon class=\"mecx-select-search-no-data-icon\" name=\"searchFail\" />\n {{ searchDictionary | async }}\n </div>\n }\n @if (loading) {\n <div class=\"mecx-select-search-loading\">\n {{ loadingDictionary | async }}\n </div>\n }\n </div>\n</ng-template>\n", styles: ["monkey-select{display:inline-flex;width:100%;min-width:0;position:relative}monkey-select:focus-visible,monkey-select:focus{outline:none}.mecx-select-trigger{width:100%;display:inline-flex;align-items:center;cursor:pointer;gap:8px;box-sizing:border-box}.mecx-select-trigger .mecx-select-value{flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--mecx-color-gray-500);font-size:14px;line-height:24px;letter-spacing:.42px}.mecx-select-trigger .mecx-select-value.has-value{color:var(--mecx-color-gray-900)}.mecx-select-trigger .mecx-select-icon{display:flex;transition:all .2s ease-in-out}.mecx-select-trigger .mecx-select-icon svg *{stroke:var(--mecx-color-theme-main)}.mecx-select-disabled .mecx-select-trigger{background-color:var(--mecx-color-gray-50);border-color:var(--mecx-color-gray-50);cursor:default}.mecx-select-disabled .mecx-select-trigger .mecx-select-value{color:var(--mecx-color-gray-400)}.mecx-select-disabled .mecx-select-trigger .mecx-select-icon svg *{stroke:var(--mecx-color-gray-400)}.mecx-select-trigger.open .mecx-select-icon{transform:rotate(180deg)}.mecx-select-body-overlay{width:100%;background:#fff;border:2px solid var(--mecx-color-gray-400);overflow:hidden;border-radius:4px;box-shadow:0 16px 32px 0 var(--mecx-color-box-shadow)}.mecx-select-body-overlay .mecx-select-search{display:flex;gap:4px;border-bottom:2px solid var(--mecx-color-gray-400);padding:8px}.mecx-select-body-overlay .mecx-select-search-icon{width:12px;display:flex}.mecx-select-body-overlay .mecx-select-search-icon svg path{stroke:var(--mecx-color-gray-600)}.mecx-select-body-overlay input{border:none;width:90%;color:var(--mecx-color-gray-600)!important;font-size:12px;letter-spacing:.54px}.mecx-select-body-overlay .mecx-select-search-no-data,.mecx-select-body-overlay .mecx-select-search-loading{padding:12px;display:flex;justify-content:center;flex-direction:column;align-items:center;gap:4px;color:var(--mecx-color-gray-600);font-size:12px;letter-spacing:.54px;text-align:center}.mecx-select-body-overlay .mecx-select-search-no-data-icon svg path,.mecx-select-body-overlay .mecx-select-search-loading-icon svg path{stroke:var(--mecx-color-gray-600)}.mecx-select-overlay{width:100%;background:#fff;overflow:hidden auto;max-height:360px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "component", type: UtilIconComponent, selector: "util-icon", inputs: ["name"] }], animations: [
3868
+ trigger('animation', [
3869
+ transition(':enter', [
3870
+ style({
3871
+ opacity: 0,
3872
+ transform: 'scaleY(.9)'
3873
+ }),
3874
+ animate('100ms ease-in-out', style({
3875
+ opacity: 1,
3876
+ transform: 'scaleY(1)'
3877
+ }))
3878
+ ]),
3879
+ state('closed', style({
3880
+ transform: 'scaleY(.9)',
3881
+ opacity: 0
3882
+ })),
3883
+ transition('closed <=> open', animate('200ms ease-in-out'))
3884
+ ])
3885
+ ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
3886
+ }
3887
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySelectComponent, decorators: [{
3888
+ type: Component,
3889
+ args: [{ selector: 'monkey-select', standalone: true, imports: [CommonModule, ReactiveFormsModule, FormsModule, UtilIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
3890
+ // eslint-disable-next-line no-use-before-define
3891
+ { provide: MonkeyFormFieldControl, useExisting: MonkeySelectComponent }
3892
+ ], animations: [
3893
+ trigger('animation', [
3894
+ transition(':enter', [
3895
+ style({
3896
+ opacity: 0,
3897
+ transform: 'scaleY(.9)'
3898
+ }),
3899
+ animate('100ms ease-in-out', style({
3900
+ opacity: 1,
3901
+ transform: 'scaleY(1)'
3902
+ }))
3903
+ ]),
3904
+ state('closed', style({
3905
+ transform: 'scaleY(.9)',
3906
+ opacity: 0
3907
+ })),
3908
+ transition('closed <=> open', animate('200ms ease-in-out'))
3909
+ ])
3910
+ ], host: {
3911
+ 'data-testid': 'monkey-select',
3912
+ class: 'mecx-select',
3913
+ '[class.mecx-select-disabled]': '_disabled',
3914
+ '[class.mecx-select-focused]': 'focused',
3915
+ '[attr.id]': 'id',
3916
+ '[attr.tabindex]': 'disabled ? -1 : tabIndex',
3917
+ '(focus)': '_onFocus()',
3918
+ '(blur)': '_onBlur()'
3919
+ }, template: "<div\n class=\"mecx-select-trigger\"\n [class.open]=\"isOpen\"\n (click)=\"toggleDropdown()\"\n role=\"combobox\"\n [attr.aria-expanded]=\"isOpen\"\n #trigger\n>\n <div class=\"mecx-select-value\" [class.has-value]=\"value\">\n <span>{{ labelSelected || placeholder }}</span>\n </div>\n\n @if (!loading) {\n <util-icon class=\"mecx-select-icon\" name=\"arrowDown\" />\n }\n</div>\n\n<ng-template #overlayTemplate>\n <div class=\"mecx-select-body-overlay\">\n @if (showSearch) {\n <div class=\"mecx-select-search\">\n <util-icon class=\"mecx-select-search-icon\" name=\"search\" />\n <input\n (input)=\"onHandleSearch($event)\"\n type=\"text\"\n [id]=\"id + '-search'\"\n autocomplete=\"off\"\n maxlength=\"50\"\n [placeholder]=\"searchPlaceholder\"\n [(ngModel)]=\"searchData\"\n />\n </div>\n }\n <div\n class=\"mecx-select-overlay\"\n #overlay\n [@animation]=\"isOpen ? 'open' : 'closed'\"\n (@animation.done)=\"onAnimationEnd($event)\"\n >\n <ng-content />\n </div>\n @if (showSearch && showSearchNoData) {\n <div class=\"mecx-select-search-no-data\">\n <util-icon class=\"mecx-select-search-no-data-icon\" name=\"searchFail\" />\n {{ searchDictionary | async }}\n </div>\n }\n @if (loading) {\n <div class=\"mecx-select-search-loading\">\n {{ loadingDictionary | async }}\n </div>\n }\n </div>\n</ng-template>\n", styles: ["monkey-select{display:inline-flex;width:100%;min-width:0;position:relative}monkey-select:focus-visible,monkey-select:focus{outline:none}.mecx-select-trigger{width:100%;display:inline-flex;align-items:center;cursor:pointer;gap:8px;box-sizing:border-box}.mecx-select-trigger .mecx-select-value{flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--mecx-color-gray-500);font-size:14px;line-height:24px;letter-spacing:.42px}.mecx-select-trigger .mecx-select-value.has-value{color:var(--mecx-color-gray-900)}.mecx-select-trigger .mecx-select-icon{display:flex;transition:all .2s ease-in-out}.mecx-select-trigger .mecx-select-icon svg *{stroke:var(--mecx-color-theme-main)}.mecx-select-disabled .mecx-select-trigger{background-color:var(--mecx-color-gray-50);border-color:var(--mecx-color-gray-50);cursor:default}.mecx-select-disabled .mecx-select-trigger .mecx-select-value{color:var(--mecx-color-gray-400)}.mecx-select-disabled .mecx-select-trigger .mecx-select-icon svg *{stroke:var(--mecx-color-gray-400)}.mecx-select-trigger.open .mecx-select-icon{transform:rotate(180deg)}.mecx-select-body-overlay{width:100%;background:#fff;border:2px solid var(--mecx-color-gray-400);overflow:hidden;border-radius:4px;box-shadow:0 16px 32px 0 var(--mecx-color-box-shadow)}.mecx-select-body-overlay .mecx-select-search{display:flex;gap:4px;border-bottom:2px solid var(--mecx-color-gray-400);padding:8px}.mecx-select-body-overlay .mecx-select-search-icon{width:12px;display:flex}.mecx-select-body-overlay .mecx-select-search-icon svg path{stroke:var(--mecx-color-gray-600)}.mecx-select-body-overlay input{border:none;width:90%;color:var(--mecx-color-gray-600)!important;font-size:12px;letter-spacing:.54px}.mecx-select-body-overlay .mecx-select-search-no-data,.mecx-select-body-overlay .mecx-select-search-loading{padding:12px;display:flex;justify-content:center;flex-direction:column;align-items:center;gap:4px;color:var(--mecx-color-gray-600);font-size:12px;letter-spacing:.54px;text-align:center}.mecx-select-body-overlay .mecx-select-search-no-data-icon svg path,.mecx-select-body-overlay .mecx-select-search-loading-icon svg path{stroke:var(--mecx-color-gray-600)}.mecx-select-overlay{width:100%;background:#fff;overflow:hidden auto;max-height:360px}\n"] }]
3920
+ }], ctorParameters: () => [{ type: i1$1.Overlay }, { type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }, { type: MonkeyFormFieldComponent, decorators: [{
3921
+ type: Optional
3922
+ }] }], propDecorators: { overlayTemplate: [{
3923
+ type: ViewChild,
3924
+ args: ['overlayTemplate']
3925
+ }], overlayEl: [{
3926
+ type: ViewChild,
3927
+ args: ['overlay']
3928
+ }], trigger: [{
3929
+ type: ViewChild,
3930
+ args: ['trigger']
3931
+ }], options: [{
3932
+ type: ContentChildren,
3933
+ args: [MonkeyOptionComponent]
3934
+ }], tabIndex: [{
3935
+ type: Input
3936
+ }], onChange: [{
3937
+ type: Output
3938
+ }], onSearch: [{
3939
+ type: Output
3940
+ }], placeholder: [{
3941
+ type: Input,
3942
+ args: [{ required: true }]
3943
+ }], loading: [{
3944
+ type: Input,
3945
+ args: [{ transform: booleanAttribute }]
3946
+ }], showSearch: [{
3947
+ type: Input,
3948
+ args: [{ transform: booleanAttribute }]
3949
+ }], searchPlaceholder: [{
3950
+ type: Input
3951
+ }], callbackSearch: [{
3952
+ type: Input,
3953
+ args: [{ transform: booleanAttribute }]
3954
+ }], disabled: [{
3955
+ type: Input,
3956
+ args: [{ transform: booleanAttribute }]
3957
+ }], required: [{
3958
+ type: Input,
3959
+ args: [{ transform: booleanAttribute }]
3960
+ }], value: [{
3961
+ type: Input
3962
+ }] } });
3963
+
3964
+ /** ************************
3965
+ * Copyright Monkey Exchange. All Rights Reserved
3966
+ * This style guide was developed by Monkey Exchange Team
3967
+ * MIT Licence
3968
+ ************************* */
3969
+
3970
+ /** ************************
3971
+ * Copyright Monkey Exchange. All Rights Reserved
3972
+ * This style guide was developed by Monkey Exchange Team
3973
+ * MIT Licence
3974
+ ************************* */
3975
+ class MonkeyInputPhoneComponent {
3976
+ get disabled() {
3977
+ if (this.ngControl && this.ngControl.disabled !== null) {
3978
+ return this.ngControl.disabled;
3979
+ }
3980
+ return this._disabled;
3981
+ }
3982
+ set disabled(value) {
3983
+ this._disabled = value;
3984
+ if (this.focused) {
3985
+ this.focused = false;
3986
+ this.stateChanges.next();
3987
+ }
3988
+ }
3989
+ get required() {
3990
+ return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;
3991
+ }
3992
+ set required(value) {
3993
+ this._required = value;
3994
+ this.stateChanges.next();
3995
+ }
3996
+ set value(value) {
3997
+ if (this._value !== value && value !== undefined) {
3998
+ this._value = value;
3999
+ this.formatValue(value);
4000
+ this._onChange(value);
4001
+ this._onTouched(value);
4002
+ }
4003
+ }
4004
+ get value() {
4005
+ return this._value;
4006
+ }
4007
+ constructor() {
4008
+ this.placeholder = '';
4009
+ this.tabIndex = 0;
4010
+ this._disabled = false;
4011
+ this._value = null;
4012
+ this.ngControl = inject(NgControl, { self: true, optional: true });
4013
+ this.idGenerator = inject(IdGenerator);
4014
+ this.countryCode = inject(MONKEY_COUNTRY_CODE);
4015
+ this.locale = inject(LOCALE_ID);
4016
+ this.id = this.idGenerator.getId('monkey-input-upload-');
4017
+ this.inputId = this.idGenerator.getId('monkey-input-upload-input-');
4018
+ this.focused = false;
4019
+ this.type = 'input-phone';
4020
+ this.stateChanges = new Subject();
4021
+ this.countries = getCountries()
4022
+ .map((code) => {
4023
+ return {
4024
+ code: `+${getCountryCallingCode(code)}`,
4025
+ name: this.getCountryNameFromCode(code),
4026
+ flag: `${this.isoToFlagEmoji(code)} `
4027
+ };
4028
+ })
4029
+ .sort((a, b) => {
4030
+ return a.name.localeCompare(b.name);
4031
+ });
4032
+ this.countriesFiltered = this.countries;
4033
+ this.selectedCallingCode = this.countryCode.toString();
4034
+ this.phoneFormatted = '';
4035
+ this.phoneValid = false;
4036
+ this._onChange = () => { };
4037
+ this._onTouched = () => { };
4038
+ if (this.ngControl) {
4039
+ this.ngControl.valueAccessor = this;
4040
+ }
4041
+ }
4042
+ getCountryNameFromCode(code) {
4043
+ try {
4044
+ const locale = this.locale.toString();
4045
+ const display = new Intl.DisplayNames([locale], { type: 'region' });
4046
+ return display.of(code.toUpperCase()) || code;
4047
+ }
4048
+ catch {
4049
+ return code;
4050
+ }
4051
+ }
4052
+ getCountryByCallingCode(code) {
4053
+ const cleanCode = code.replace('+', '');
4054
+ return (getCountries().find((country) => {
4055
+ return getCountryCallingCode(country) === cleanCode;
4056
+ }) || null);
4057
+ }
4058
+ isoToFlagEmoji(isoCode) {
4059
+ return isoCode.toUpperCase().replace(/./g, (char) => {
4060
+ return String.fromCodePoint(127397 + char.charCodeAt(0));
4061
+ });
4062
+ }
4063
+ getCountryFromPhoneNumber(input, changedCountry) {
4064
+ try {
4065
+ if (changedCountry) {
4066
+ return this.selectedCallingCode;
4067
+ }
4068
+ const parsed = parsePhoneNumberFromString(input);
4069
+ const country = getCountryCallingCode(parsed?.country);
4070
+ return `+${country}`;
4071
+ }
4072
+ catch (e) {
4073
+ // not to do
4074
+ }
4075
+ return this.selectedCallingCode;
4076
+ }
4077
+ performValue(value) {
4078
+ this._value = `${this.selectedCallingCode}${value}`;
4079
+ this._onChange(this._value);
4080
+ this._onTouched(this._value);
4081
+ }
4082
+ validateValue() {
4083
+ const { phoneValid } = this;
4084
+ if (!phoneValid) {
4085
+ const countryCode = this.getCountryByCallingCode(this.selectedCallingCode);
4086
+ const example = getExampleNumber(countryCode, examples);
4087
+ this.ngControl?.control?.setErrors({
4088
+ phone: true,
4089
+ phoneAllowed: example?.nationalNumber
4090
+ });
4091
+ }
4092
+ }
4093
+ formatValue(value, changedCountry = false) {
4094
+ if (!value) {
4095
+ this.phoneFormatted = '';
4096
+ this.phoneValid = false;
4097
+ this.validateValue();
4098
+ return;
4099
+ }
4100
+ const detectedCallingCode = this.getCountryFromPhoneNumber(value, changedCountry);
4101
+ const isCountryChanged = changedCountry || detectedCallingCode !== this.selectedCallingCode;
4102
+ if (isCountryChanged && detectedCallingCode) {
4103
+ this.selectedCallingCode = detectedCallingCode;
4104
+ }
4105
+ const countryCode = this.getCountryByCallingCode(this.selectedCallingCode);
4106
+ if (!countryCode) {
4107
+ this.phoneFormatted = value;
4108
+ this.phoneValid = false;
4109
+ this.validateValue();
4110
+ return;
4111
+ }
4112
+ const nationalPart = value.replace(this.selectedCallingCode, '').replace(/[^\d+]/g, '');
4113
+ const formatter = new AsYouType(countryCode);
4114
+ this.phoneFormatted = formatter.input(nationalPart);
4115
+ this.performValue(nationalPart);
4116
+ this.phoneValid = isValidPhoneNumber(nationalPart, countryCode);
4117
+ this.validateValue();
4118
+ }
4119
+ ngAfterContentInit() { }
4120
+ ngOnChanges(changes) { }
4121
+ ngOnDestroy() { }
4122
+ onContainerClick(event) {
4123
+ this.inputs.first.nativeElement.focus();
4124
+ }
4125
+ _onFocus() {
4126
+ if (!this.disabled) {
4127
+ this.focused = true;
4128
+ this._onTouched();
4129
+ this.stateChanges.next();
4130
+ }
4131
+ }
4132
+ _onBlur() {
4133
+ this.focused = false;
4134
+ this.stateChanges.next();
4135
+ this.validateValue();
4136
+ }
4137
+ registerOnChange(fn) {
4138
+ this._onChange = fn;
4139
+ }
4140
+ registerOnTouched(fn) {
4141
+ this._onTouched = fn;
4142
+ }
4143
+ setDisabledState(isDisabled) {
4144
+ this.disabled = isDisabled;
4145
+ }
4146
+ writeValue(value) {
4147
+ this.value = value;
4148
+ }
4149
+ onInputChange(event) {
4150
+ const { value } = event.target;
4151
+ this.formatValue(value);
4152
+ }
4153
+ onCountryChange() {
4154
+ this.formatValue(this._value, true);
4155
+ this.validateValue();
4156
+ }
4157
+ getMaxLength() {
4158
+ try {
4159
+ const countryCode = this.getCountryByCallingCode(this.selectedCallingCode);
4160
+ if (!countryCode)
4161
+ return 20;
4162
+ const example = getExampleNumber(countryCode, examples);
4163
+ const formatted = new AsYouType(countryCode).input(example.nationalNumber);
4164
+ return formatted.length;
4165
+ }
4166
+ catch {
4167
+ return 20;
4168
+ }
4169
+ }
4170
+ onHandleSearchSelect(query) {
4171
+ const normalizedQuery = query.trim().toLowerCase();
4172
+ this.countriesFiltered = this.countries.filter(({ name }) => {
4173
+ return name.toLowerCase().includes(normalizedQuery);
4174
+ });
4175
+ }
4176
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyInputPhoneComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4177
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyInputPhoneComponent, isStandalone: true, selector: "monkey-input-phone", inputs: { placeholder: "placeholder", tabIndex: "tabIndex", disabled: ["disabled", "disabled", booleanAttribute], required: ["required", "required", booleanAttribute], value: "value" }, host: { listeners: { "focus": "_onFocus()", "blur": "_onBlur()" }, properties: { "attr.data-testid": "'monkey-input-phone'", "class.mecx-input-phone-disabled": "_disabled", "class.mecx-input-phone-focused": "focused", "attr.id": "id", "attr.tabindex": "disabled ? -1 : tabIndex" }, classAttribute: "mecx-input-phone" }, providers: [
4178
+ // eslint-disable-next-line no-use-before-define
4179
+ { provide: MonkeyFormFieldControl, useExisting: MonkeyInputPhoneComponent }
4180
+ ], viewQueries: [{ propertyName: "inputs", predicate: ["input"], descendants: true }], usesOnChanges: true, ngImport: i0, template: `
4181
+ <monkey-select
4182
+ placeholder=""
4183
+ [disabled]="disabled"
4184
+ showSearch
4185
+ [(ngModel)]="selectedCallingCode"
4186
+ class="mecx-phone-select-country"
4187
+ (onChange)="onCountryChange()"
4188
+ callbackSearch
4189
+ (onSearch)="onHandleSearchSelect($event)"
4190
+ >
4191
+ @for (item of countriesFiltered; track $index) {
4192
+ <monkey-option [value]="item.code">
4193
+ <span class="option-flag">{{ item.flag }}</span>
4194
+ <div class="option-name">{{ item.name }} {{ item.code }}</div>
4195
+ </monkey-option>
4196
+ }
4197
+ </monkey-select>
4198
+ <input
4199
+ #input
4200
+ class="mecx-input"
4201
+ [attr.disabled]="disabled"
4202
+ placeholder="Enter phone number"
4203
+ (input)="onInputChange($event)"
4204
+ [ngModel]="phoneFormatted"
4205
+ [maxlength]="getMaxLength()"
4206
+ (focus)="_onFocus()"
4207
+ (blur)="_onBlur()"
4208
+ [attr.id]="inputId"
4209
+ />
4210
+ `, isInline: true, styles: [":host{display:inline-flex;width:100%;min-width:0}:host.mecx-input-phone-disabled monkey-select{border-right:2px solid var(--mecx-color-gray-200)}:host monkey-select{width:164px;border-right:2px solid var(--mecx-color-gray-400)}:host input{width:100%;border:none;margin-left:8px}monkey-option .option-flag{font-size:30px}monkey-option .option-name{letter-spacing:.48px;margin-left:4px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: MonkeySelectComponent, selector: "monkey-select", inputs: ["tabIndex", "placeholder", "loading", "showSearch", "searchPlaceholder", "callbackSearch", "disabled", "required", "value"], outputs: ["onChange", "onSearch"] }, { kind: "component", type: MonkeyOptionComponent, selector: "monkey-option", inputs: ["value", "disabled", "type"] }, { kind: "ngmodule", type: MonkeyFormFieldModule }] }); }
4211
+ }
4212
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyInputPhoneComponent, decorators: [{
4213
+ type: Component,
4214
+ args: [{ selector: 'monkey-input-phone', standalone: true, imports: [
4215
+ CommonModule,
4216
+ FormsModule,
4217
+ ReactiveFormsModule,
4218
+ MonkeySelectComponent,
4219
+ MonkeyOptionComponent,
4220
+ MonkeyFormFieldModule
4221
+ ], template: `
4222
+ <monkey-select
4223
+ placeholder=""
4224
+ [disabled]="disabled"
4225
+ showSearch
4226
+ [(ngModel)]="selectedCallingCode"
4227
+ class="mecx-phone-select-country"
4228
+ (onChange)="onCountryChange()"
4229
+ callbackSearch
4230
+ (onSearch)="onHandleSearchSelect($event)"
4231
+ >
4232
+ @for (item of countriesFiltered; track $index) {
4233
+ <monkey-option [value]="item.code">
4234
+ <span class="option-flag">{{ item.flag }}</span>
4235
+ <div class="option-name">{{ item.name }} {{ item.code }}</div>
4236
+ </monkey-option>
4237
+ }
4238
+ </monkey-select>
4239
+ <input
4240
+ #input
4241
+ class="mecx-input"
4242
+ [attr.disabled]="disabled"
4243
+ placeholder="Enter phone number"
4244
+ (input)="onInputChange($event)"
4245
+ [ngModel]="phoneFormatted"
4246
+ [maxlength]="getMaxLength()"
4247
+ (focus)="_onFocus()"
4248
+ (blur)="_onBlur()"
4249
+ [attr.id]="inputId"
4250
+ />
4251
+ `, providers: [
4252
+ // eslint-disable-next-line no-use-before-define
4253
+ { provide: MonkeyFormFieldControl, useExisting: MonkeyInputPhoneComponent }
4254
+ ], host: {
4255
+ '[attr.data-testid]': "'monkey-input-phone'",
4256
+ class: 'mecx-input-phone',
4257
+ '[class.mecx-input-phone-disabled]': '_disabled',
4258
+ '[class.mecx-input-phone-focused]': 'focused',
4259
+ '[attr.id]': 'id',
4260
+ '[attr.tabindex]': 'disabled ? -1 : tabIndex',
4261
+ '(focus)': '_onFocus()',
4262
+ '(blur)': '_onBlur()'
4263
+ }, styles: [":host{display:inline-flex;width:100%;min-width:0}:host.mecx-input-phone-disabled monkey-select{border-right:2px solid var(--mecx-color-gray-200)}:host monkey-select{width:164px;border-right:2px solid var(--mecx-color-gray-400)}:host input{width:100%;border:none;margin-left:8px}monkey-option .option-flag{font-size:30px}monkey-option .option-name{letter-spacing:.48px;margin-left:4px}\n"] }]
4264
+ }], ctorParameters: () => [], propDecorators: { placeholder: [{
4265
+ type: Input
4266
+ }], tabIndex: [{
4267
+ type: Input
4268
+ }], disabled: [{
4269
+ type: Input,
4270
+ args: [{ transform: booleanAttribute }]
4271
+ }], required: [{
4272
+ type: Input,
4273
+ args: [{ transform: booleanAttribute }]
4274
+ }], value: [{
4275
+ type: Input
4276
+ }], inputs: [{
4277
+ type: ViewChildren,
4278
+ args: ['input']
4279
+ }] } });
4280
+
4281
+ /** ************************
4282
+ * Copyright Monkey Exchange. All Rights Reserved
4283
+ * This style guide was developed by Monkey Exchange Team
4284
+ * MIT Licence
4285
+ ************************* */
4286
+
4287
+ /** ************************
4288
+ * Copyright Monkey Exchange. All Rights Reserved
4289
+ * This style guide was developed by Monkey Exchange Team
4290
+ * MIT Licence
4291
+ ************************* */
4292
+ class MonkeyInputUploadComponent {
4293
+ get disabled() {
4294
+ if (this.ngControl && this.ngControl.disabled !== null) {
4295
+ return this.ngControl.disabled;
4296
+ }
4297
+ return this._disabled;
4298
+ }
4299
+ set disabled(value) {
4300
+ this._disabled = value;
4301
+ if (this.focused) {
4302
+ this.focused = false;
4303
+ this.stateChanges.next();
4304
+ }
4305
+ }
4306
+ get required() {
4307
+ return this._required ?? this.ngControl?.control?.hasValidator(Validators.required) ?? false;
4308
+ }
4309
+ set required(value) {
4310
+ this._required = value;
4311
+ this.stateChanges.next();
4312
+ }
4313
+ set value(value) {
4314
+ if (this._value !== value && value !== undefined) {
4315
+ this._value = value;
4316
+ this._onChange(value);
4317
+ this._onTouched(value);
4318
+ }
4319
+ }
4320
+ get value() {
4321
+ return this._value;
4322
+ }
4323
+ constructor() {
4324
+ this.progress = 0;
4325
+ this.placeholder = '';
4326
+ this.maxSizeBytes = 5 * 1024 * 1024;
4327
+ this.allowedExtensions = ['.jpg', '.jpeg', '.png', '.pdf', '.txt', '.xls', '.xlsx'];
4328
+ this.loading = false;
4329
+ this.tabIndex = 0;
4330
+ this._disabled = false;
4331
+ this._value = null;
4332
+ this.onChange = new EventEmitter();
4333
+ this.ngControl = inject(NgControl, { self: true, optional: true });
4334
+ this.idGenerator = inject(IdGenerator);
4335
+ this.id = this.idGenerator.getId('monkey-input-upload-');
4336
+ this.focused = false;
4337
+ this.type = '';
4338
+ this.currency = false;
4339
+ this.percent = false;
4340
+ this.stateChanges = new Subject();
4341
+ this._onChange = () => { };
4342
+ this._onTouched = () => { };
4343
+ if (this.ngControl) {
4344
+ this.ngControl.valueAccessor = this;
4345
+ }
4346
+ }
4347
+ validateFileSize(file) {
4348
+ return file.size <= this.maxSizeBytes;
4349
+ }
4350
+ validateFileExtension(file) {
4351
+ if (!this.allowedExtensions || !this.allowedExtensions.length) {
4352
+ return true;
4353
+ }
4354
+ const fileExtension = getFileExtension(file.name);
4355
+ const allowedExts = this.allowedExtensions.map((ext) => {
4356
+ return ext.trim().replace('.', '').toLowerCase();
4357
+ });
4358
+ return allowedExts.includes(fileExtension);
4359
+ }
4360
+ onContainerClick(event) {
4361
+ if (!this.loading) {
4362
+ this.fileInput.nativeElement.click();
4363
+ }
4364
+ }
4365
+ _onFocus() {
4366
+ if (!this.disabled) {
4367
+ this.focused = true;
4368
+ this._onTouched();
4369
+ this.stateChanges.next();
4370
+ }
4371
+ }
4372
+ _onBlur() {
4373
+ this.focused = false;
4374
+ this.stateChanges.next();
4375
+ }
4376
+ ngAfterContentInit() { }
4377
+ ngOnChanges(changes) { }
4378
+ ngOnDestroy() { }
4379
+ registerOnChange(fn) {
4380
+ this._onChange = fn;
4381
+ }
4382
+ registerOnTouched(fn) {
4383
+ this._onTouched = fn;
4384
+ }
4385
+ setDisabledState(isDisabled) {
4386
+ this.disabled = isDisabled;
4387
+ if (this.fileInput) {
4388
+ this.fileInput.nativeElement.disabled = isDisabled;
4389
+ }
4390
+ }
4391
+ writeValue(value) {
4392
+ this.value = value;
4393
+ }
3065
4394
  reset() {
3066
4395
  if (this.fileInput) {
3067
4396
  this.fileInput.nativeElement.value = '';
@@ -3300,8 +4629,7 @@ class MonkeyModalConfig {
3300
4629
  this.backdropClass = 'mecx-modal-overlay';
3301
4630
  this.disableClose = false;
3302
4631
  this.disableBackdropClose = false;
3303
- this.width = '';
3304
- this.height = '';
4632
+ this.fullscreen = false;
3305
4633
  this.position = 'center-center';
3306
4634
  this.data = null;
3307
4635
  this.closeOnNavigation = true;
@@ -3343,7 +4671,14 @@ class MonkeyModalRef {
3343
4671
  close(result) {
3344
4672
  if (this.componentInstance) {
3345
4673
  const closedSubject = this.closed;
3346
- this.overlayRef.dispose();
4674
+ const active = document.activeElement;
4675
+ if (active && this.componentElement.contains(active)) {
4676
+ active.blur();
4677
+ }
4678
+ this.componentElement.querySelectorAll('monkey-modal')[0].classList.add('fade-out');
4679
+ setTimeout(() => {
4680
+ this.overlayRef.detach();
4681
+ }, 150);
3347
4682
  closedSubject.next(result);
3348
4683
  closedSubject.complete();
3349
4684
  // eslint-disable-next-line no-multi-assign
@@ -3383,9 +4718,13 @@ class MonkeyModalComponent {
3383
4718
  }
3384
4719
  }
3385
4720
  close() {
3386
- this.modalRef?.close();
4721
+ const element = this._elementRef.nativeElement;
4722
+ element.classList.add('fade-out');
4723
+ setTimeout(() => {
4724
+ this.modalRef?.close();
4725
+ }, 150);
3387
4726
  }
3388
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalComponent, deps: [{ token: i0.ElementRef }, { token: i1.OverlayRef, optional: true }, { token: MonkeyModalRef, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
4727
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalComponent, deps: [{ token: i0.ElementRef }, { token: i1$1.OverlayRef, optional: true }, { token: MonkeyModalRef, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
3389
4728
  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: `
3390
4729
  <div class="mecx-modal-header">
3391
4730
  <div class="mecx-modal-header-group">
@@ -3410,7 +4749,6 @@ class MonkeyModalComponent {
3410
4749
  class="mecx-modal-close"
3411
4750
  (click)="close()"
3412
4751
  >
3413
- x
3414
4752
  </monkey-icon-button>
3415
4753
  }
3416
4754
  </div>
@@ -3418,7 +4756,7 @@ class MonkeyModalComponent {
3418
4756
  <ng-content select="[monkey-modal-content]"></ng-content>
3419
4757
  <ng-content select="monkey-modal-actions"></ng-content>
3420
4758
  <ng-content select="[monkey-modal-actions]"></ng-content>
3421
- `, isInline: true, styles: ["monkey-modal{width:100%;height:100%;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 }); }
4759
+ `, isInline: true, styles: ["monkey-modal{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px}.mecx-modal{opacity:0;animation:modal-fade-in .2s ease-out forwards;transition:opacity .15s ease-in}.mecx-modal.fade-out{animation:modal-fade-out .15s ease-in forwards}@keyframes modal-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes modal-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}.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;flex-wrap:wrap;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}.monkey-modal-panel{padding:16px}.monkey-modal-panel.monkey-modal-fullscreen{width:100%!important;max-width:100%!important;height:100%!important;max-height:100%!important;padding:0}.monkey-modal-panel.monkey-modal-fullscreen monkey-modal{border-radius:0}.monkey-modal-panel.monkey-modal-fullscreen monkey-modal .mecx-modal-content{max-height:100%}\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 }); }
3422
4760
  }
3423
4761
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalComponent, decorators: [{
3424
4762
  type: Component,
@@ -3446,7 +4784,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3446
4784
  class="mecx-modal-close"
3447
4785
  (click)="close()"
3448
4786
  >
3449
- x
3450
4787
  </monkey-icon-button>
3451
4788
  }
3452
4789
  </div>
@@ -3458,8 +4795,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3458
4795
  class: 'mecx-modal',
3459
4796
  tabindex: '-1',
3460
4797
  '[attr.id]': 'modalRef?.id || null'
3461
- }, styles: ["monkey-modal{width:100%;height:100%;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"] }]
3462
- }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1.OverlayRef, decorators: [{
4798
+ }, styles: ["monkey-modal{width:100%;height:100%;display:flex;flex-direction:column;background:#fff;border-radius:8px}.mecx-modal{opacity:0;animation:modal-fade-in .2s ease-out forwards;transition:opacity .15s ease-in}.mecx-modal.fade-out{animation:modal-fade-out .15s ease-in forwards}@keyframes modal-fade-in{0%{opacity:0;transform:scale(.8)}to{opacity:1;transform:scale(1)}}@keyframes modal-fade-out{0%{opacity:1;transform:scale(1)}to{opacity:0;transform:scale(.8)}}.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;flex-wrap:wrap;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}.monkey-modal-panel{padding:16px}.monkey-modal-panel.monkey-modal-fullscreen{width:100%!important;max-width:100%!important;height:100%!important;max-height:100%!important;padding:0}.monkey-modal-panel.monkey-modal-fullscreen monkey-modal{border-radius:0}.monkey-modal-panel.monkey-modal-fullscreen monkey-modal .mecx-modal-content{max-height:100%}\n"] }]
4799
+ }], ctorParameters: () => [{ type: i0.ElementRef }, { type: i1$1.OverlayRef, decorators: [{
3463
4800
  type: Optional
3464
4801
  }] }, { type: MonkeyModalRef, decorators: [{
3465
4802
  type: Optional
@@ -3472,6 +4809,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3472
4809
  ************************* */
3473
4810
  const MECX_MODAL_DATA = new InjectionToken('mecxModalData');
3474
4811
  const MECX_MODAL_DEFAULT_CONFIG = new InjectionToken('mecxModalDefaultConfig');
4812
+ const MECX_MODAL_CONFIRMATION_CONFIG = new InjectionToken('mecxModalConfirmationConfig');
3475
4813
  /**
3476
4814
  * @license
3477
4815
  * Copyright Google LLC All Rights Reserved.
@@ -3496,11 +4834,6 @@ class MonkeyModalDefaultComponent {
3496
4834
  constructor(config, modalRef) {
3497
4835
  this.config = config;
3498
4836
  this.modalRef = modalRef;
3499
- this.title = '';
3500
- this.subtitle = '';
3501
- this.content = '';
3502
- this.cancelLabel = '';
3503
- this.okLabel = '';
3504
4837
  // not to do
3505
4838
  }
3506
4839
  onSubmit() {
@@ -3546,6 +4879,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3546
4879
  args: [MonkeyModalRef]
3547
4880
  }] }] });
3548
4881
 
4882
+ class MonkeyModalConfirmationComponent {
4883
+ constructor(config, modalRef) {
4884
+ this.config = config;
4885
+ this.modalRef = modalRef;
4886
+ // not to do
4887
+ }
4888
+ onSubmit() {
4889
+ this.modalRef.close(true);
4890
+ }
4891
+ onClose() {
4892
+ this.modalRef.close();
4893
+ }
4894
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalConfirmationComponent, deps: [{ token: MECX_MODAL_CONFIRMATION_CONFIG }, { token: MonkeyModalRef }], target: i0.ɵɵFactoryTarget.Component }); }
4895
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyModalConfirmationComponent, selector: "monkey-modal-confirmation", ngImport: i0, template: `
4896
+ <monkey-modal class="modal-confirmation">
4897
+ <monkey-modal-content>
4898
+ @if (config.icon) {
4899
+ <div class="modal-confirmation-icon {{ config.type }}">
4900
+ <monkey-icon [icon]="config.icon" size="xxl"></monkey-icon>
4901
+ </div>
4902
+ }
4903
+ <div class="confirmation-title" [innerHTML]="config.title"></div>
4904
+ <div class="confirmation-description" [innerHTML]="config.content"></div>
4905
+ </monkey-modal-content>
4906
+ <monkey-modal-actions>
4907
+ <monkey-button type="tertiary" (click)="onClose()">{{ config.cancelLabel }}</monkey-button>
4908
+ <monkey-button type="primary" (click)="onSubmit()">{{ config.okLabel }}</monkey-button>
4909
+ </monkey-modal-actions>
4910
+ </monkey-modal>
4911
+ `, isInline: true, styles: [".modal-confirmation .mecx-modal-header{border:none}.modal-confirmation .confirmation-title{color:var(--mecx-color-gray-900);text-align:center;font-size:18px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.54px;margin-bottom:8px}.modal-confirmation .confirmation-description{color:var(--mecx-color-gray-700);text-align:center;font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px;margin-bottom:24px}.modal-confirmation .modal-confirmation-icon{width:80px;height:80px;border-radius:50%;display:flex;margin:0 auto 16px;align-items:center;justify-content:center;background-color:var(--mecx-color-gray-50)}.modal-confirmation .modal-confirmation-icon monkey-icon{color:var(--mecx-color-gray-900)}.modal-confirmation .modal-confirmation-icon.warning{background-color:var(--mecx-color-warning-100)}.modal-confirmation .modal-confirmation-icon.warning monkey-icon{color:var(--mecx-color-warning-500)}.modal-confirmation .modal-confirmation-icon.error{background-color:var(--mecx-color-error-100)}.modal-confirmation .modal-confirmation-icon.error monkey-icon{color:var(--mecx-color-error-500)}.modal-confirmation .modal-confirmation-icon.success{background-color:var(--mecx-color-success-100)}.modal-confirmation .modal-confirmation-icon.success monkey-icon{color:var(--mecx-color-success-500)}\n"], dependencies: [{ kind: "component", type: MonkeyButtonComponent, selector: "monkey-button", inputs: ["disabled", "size", "type", "id"] }, { kind: "component", type: MonkeyIconComponent, selector: "monkey-icon", inputs: ["icon", "size", "id"] }, { kind: "component", type: MonkeyModalComponent, selector: "monkey-modal" }, { kind: "directive", type: MonkeyModalContentDirective, selector: "monkey-modal-content, [monkey-modal-content]" }, { kind: "directive", type: MonkeyModalActionsDirective, selector: "monkey-modal-actions, [monkey-modal-actions]", inputs: ["mkAlign"] }], encapsulation: i0.ViewEncapsulation.None }); }
4912
+ }
4913
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalConfirmationComponent, decorators: [{
4914
+ type: Component,
4915
+ args: [{ selector: 'monkey-modal-confirmation', encapsulation: ViewEncapsulation.None, template: `
4916
+ <monkey-modal class="modal-confirmation">
4917
+ <monkey-modal-content>
4918
+ @if (config.icon) {
4919
+ <div class="modal-confirmation-icon {{ config.type }}">
4920
+ <monkey-icon [icon]="config.icon" size="xxl"></monkey-icon>
4921
+ </div>
4922
+ }
4923
+ <div class="confirmation-title" [innerHTML]="config.title"></div>
4924
+ <div class="confirmation-description" [innerHTML]="config.content"></div>
4925
+ </monkey-modal-content>
4926
+ <monkey-modal-actions>
4927
+ <monkey-button type="tertiary" (click)="onClose()">{{ config.cancelLabel }}</monkey-button>
4928
+ <monkey-button type="primary" (click)="onSubmit()">{{ config.okLabel }}</monkey-button>
4929
+ </monkey-modal-actions>
4930
+ </monkey-modal>
4931
+ `, styles: [".modal-confirmation .mecx-modal-header{border:none}.modal-confirmation .confirmation-title{color:var(--mecx-color-gray-900);text-align:center;font-size:18px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.54px;margin-bottom:8px}.modal-confirmation .confirmation-description{color:var(--mecx-color-gray-700);text-align:center;font-size:14px;font-style:normal;font-weight:400;line-height:24px;letter-spacing:.42px;margin-bottom:24px}.modal-confirmation .modal-confirmation-icon{width:80px;height:80px;border-radius:50%;display:flex;margin:0 auto 16px;align-items:center;justify-content:center;background-color:var(--mecx-color-gray-50)}.modal-confirmation .modal-confirmation-icon monkey-icon{color:var(--mecx-color-gray-900)}.modal-confirmation .modal-confirmation-icon.warning{background-color:var(--mecx-color-warning-100)}.modal-confirmation .modal-confirmation-icon.warning monkey-icon{color:var(--mecx-color-warning-500)}.modal-confirmation .modal-confirmation-icon.error{background-color:var(--mecx-color-error-100)}.modal-confirmation .modal-confirmation-icon.error monkey-icon{color:var(--mecx-color-error-500)}.modal-confirmation .modal-confirmation-icon.success{background-color:var(--mecx-color-success-100)}.modal-confirmation .modal-confirmation-icon.success monkey-icon{color:var(--mecx-color-success-500)}\n"] }]
4932
+ }], ctorParameters: () => [{ type: undefined, decorators: [{
4933
+ type: Inject,
4934
+ args: [MECX_MODAL_CONFIRMATION_CONFIG]
4935
+ }] }, { type: MonkeyModalRef, decorators: [{
4936
+ type: Inject,
4937
+ args: [MonkeyModalRef]
4938
+ }] }] });
4939
+
3549
4940
  /** ************************
3550
4941
  * Copyright Monkey Exchange. All Rights Reserved
3551
4942
  * This style guide was developed by Monkey Exchange Team
@@ -3555,6 +4946,7 @@ class MonkeyModalModule {
3555
4946
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
3556
4947
  static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalModule, declarations: [MonkeyModalComponent,
3557
4948
  MonkeyModalDefaultComponent,
4949
+ MonkeyModalConfirmationComponent,
3558
4950
  MonkeyModalTitleDirective,
3559
4951
  MonkeyModalSubtitleDirective,
3560
4952
  MonkeyModalContentDirective,
@@ -3572,6 +4964,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3572
4964
  declarations: [
3573
4965
  MonkeyModalComponent,
3574
4966
  MonkeyModalDefaultComponent,
4967
+ MonkeyModalConfirmationComponent,
3575
4968
  MonkeyModalTitleDirective,
3576
4969
  MonkeyModalSubtitleDirective,
3577
4970
  MonkeyModalContentDirective,
@@ -3593,13 +4986,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3593
4986
  * MIT Licence
3594
4987
  ************************* */
3595
4988
  class MonkeyModalService {
3596
- constructor(overlay, injector) {
3597
- this.overlay = overlay;
3598
- this.injector = injector;
4989
+ constructor() {
3599
4990
  this._idGenerator = inject(IdGenerator);
4991
+ this._injector = inject(Injector);
4992
+ this._overlay = inject(Overlay);
3600
4993
  this._openDialogsAtThisLevel = [];
3601
4994
  this._parentDialog = inject(MonkeyModalService, { optional: true, skipSelf: true });
3602
- // not to do
3603
4995
  }
3604
4996
  get openDialogs() {
3605
4997
  return this._parentDialog ? this._parentDialog.openDialogs : this._openDialogsAtThisLevel;
@@ -3608,226 +5000,125 @@ class MonkeyModalService {
3608
5000
  let positionStrategy;
3609
5001
  const marginStrategy = '20px';
3610
5002
  if (config.position === 'left-top') {
3611
- positionStrategy = this.overlay.position().global().left(marginStrategy).top(marginStrategy);
5003
+ positionStrategy = this._overlay.position().global().left(marginStrategy).top(marginStrategy);
3612
5004
  }
3613
5005
  else if (config.position === 'center-top') {
3614
- positionStrategy = this.overlay.position().global().centerHorizontally().top(marginStrategy);
5006
+ positionStrategy = this._overlay.position().global().centerHorizontally().top(marginStrategy);
3615
5007
  }
3616
5008
  else if (config.position === 'right-top') {
3617
- positionStrategy = this.overlay.position().global().right(marginStrategy).top(marginStrategy);
5009
+ positionStrategy = this._overlay
5010
+ .position()
5011
+ .global()
5012
+ .right(marginStrategy)
5013
+ .top(marginStrategy);
3618
5014
  }
3619
5015
  else if (config.position === 'left-center') {
3620
- positionStrategy = this.overlay.position().global().left(marginStrategy).centerVertically();
5016
+ positionStrategy = this._overlay.position().global().left(marginStrategy).centerVertically();
3621
5017
  }
3622
5018
  else if (config.position === 'center-center') {
3623
- positionStrategy = this.overlay.position().global().centerHorizontally().centerVertically();
5019
+ positionStrategy = this._overlay.position().global().centerHorizontally().centerVertically();
3624
5020
  }
3625
5021
  else if (config.position === 'right-center') {
3626
- positionStrategy = this.overlay.position().global().right(marginStrategy).centerVertically();
5022
+ positionStrategy = this._overlay.position().global().right(marginStrategy).centerVertically();
3627
5023
  }
3628
5024
  else if (config.position === 'left-bottom') {
3629
- positionStrategy = this.overlay
5025
+ positionStrategy = this._overlay
3630
5026
  .position()
3631
5027
  .global()
3632
5028
  .left(marginStrategy)
3633
5029
  .bottom(marginStrategy);
3634
5030
  }
3635
5031
  else if (config.position === 'center-bottom') {
3636
- positionStrategy = this.overlay.position().global().centerHorizontally().bottom('20px');
5032
+ positionStrategy = this._overlay.position().global().centerHorizontally().bottom('20px');
3637
5033
  }
3638
5034
  else if (config.position === 'right-bottom') {
3639
- positionStrategy = this.overlay
5035
+ positionStrategy = this._overlay
3640
5036
  .position()
3641
5037
  .global()
3642
5038
  .right(marginStrategy)
3643
5039
  .bottom(marginStrategy);
3644
5040
  }
3645
- const state = new OverlayConfig({
3646
- positionStrategy,
3647
- scrollStrategy: this.overlay.scrollStrategies.block(),
3648
- panelClass: config.panelClass,
3649
- hasBackdrop: config.hasBackdrop,
3650
- minWidth: config.minWidth,
3651
- minHeight: config.minHeight,
3652
- maxWidth: config.maxWidth,
3653
- maxHeight: config.maxHeight,
3654
- width: config.width,
3655
- height: config.height,
3656
- disposeOnNavigation: config.closeOnNavigation
3657
- });
3658
- if (config.backdropClass) {
3659
- state.backdropClass = config.backdropClass;
3660
- }
3661
- if (!config.width && config.maxWidth) {
3662
- state.width = '100%';
3663
- }
3664
- if (!config.height && config.maxHeight) {
3665
- state.height = '100%';
3666
- }
3667
- return state;
3668
- }
3669
- createInjector(config, dialogRef, overlayRef, fallbackInjector) {
3670
- const providers = [
3671
- { provide: OverlayRef, useValue: overlayRef },
3672
- { provide: MonkeyModalRef, useValue: dialogRef },
3673
- { provide: MECX_MODAL_DATA, useValue: config.data }
3674
- ];
3675
- if (config.providers) {
3676
- providers.push(...config.providers);
5041
+ let panelClass = ['monkey-modal-panel'];
5042
+ if (config.fullscreen) {
5043
+ panelClass.push('monkey-modal-fullscreen');
3677
5044
  }
3678
- return Injector.create({ parent: fallbackInjector, providers });
3679
- }
3680
- open(component, config) {
3681
- const defaultConfig = new MonkeyModalConfig();
3682
- config = { ...defaultConfig, ...config };
3683
- config.id = this._idGenerator.getId('monkey-modal-');
3684
- const overlayConfig = this.getOverlayConfig(config);
3685
- const overlayRef = this.overlay.create(overlayConfig);
3686
- const modalRef = new MonkeyModalRef(overlayRef, config);
3687
- const injector = this.createInjector(config, modalRef, overlayRef, this.injector);
3688
- const componentPortal = new ComponentPortal(component, null, injector);
3689
- const componentRef = overlayRef.attach(componentPortal);
3690
- const componentElement = componentRef.location.nativeElement;
3691
- componentElement.style.width = '100%';
3692
- componentElement.style.height = '100%';
3693
- modalRef.componentInstance = componentRef.instance;
3694
- this.openDialogs.push(modalRef);
3695
- return modalRef;
3696
- }
3697
- openDefault(params, config) {
3698
- const providers = [{ provide: MECX_MODAL_DEFAULT_CONFIG, useValue: params }];
3699
- config.providers = providers;
3700
- config.icon = config.icon ? config.icon : 'help';
3701
- return this.open(MonkeyModalDefaultComponent, config);
3702
- }
3703
- closeAll() {
3704
- reverseForEach(this.openDialogs, (dialog) => {
3705
- return dialog.close();
3706
- });
3707
- this.openDialogs.splice(0, this.openDialogs.length);
3708
- }
3709
- 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 }); }
3710
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalService, providedIn: 'root' }); }
3711
- }
3712
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalService, decorators: [{
3713
- type: Injectable,
3714
- args: [{ providedIn: 'root' }]
3715
- }], ctorParameters: () => [{ type: i1.Overlay }, { type: i0.Injector }] });
3716
-
3717
- /** ************************
3718
- * Copyright Monkey Exchange. All Rights Reserved
3719
- * This style guide was developed by Monkey Exchange Team
3720
- * MIT Licence
3721
- ************************* */
3722
-
3723
- /** ************************
3724
- * Copyright Monkey Exchange. All Rights Reserved
3725
- * This style guide was developed by Monkey Exchange Team
3726
- * MIT Licence
3727
- ************************* */
3728
- class MonkeyOptionComponent {
3729
- constructor() {
3730
- this.idGenerator = inject(IdGenerator);
3731
- this.disabled = false;
3732
- this.selected = false;
3733
- this.tabIndex = 0;
3734
- this.id = this.idGenerator.getId('mecx-option-');
3735
- }
3736
- get displayContent() {
3737
- return (this._content?.nativeElement.textContent || '').trim();
3738
- }
3739
- onClick(event) {
3740
- if (this.disabled) {
3741
- event.stopPropagation();
3742
- event.preventDefault();
5045
+ if (Array.isArray(config.panelClass)) {
5046
+ panelClass = [...panelClass, ...config.panelClass];
3743
5047
  }
3744
5048
  else {
3745
- this.action?.();
5049
+ panelClass.push(config.panelClass);
3746
5050
  }
3747
- }
3748
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyOptionComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3749
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.13", type: MonkeyOptionComponent, isStandalone: true, selector: "monkey-option", inputs: { value: "value", disabled: ["disabled", "disabled", booleanAttribute] }, host: { attributes: { "data-testid": "monkey-option" }, listeners: { "click": "onClick($event)" }, properties: { "attr.id": "id", "class.mecx-option-disabled": "disabled", "class.mecx-option-selected": "selected", "attr.tabindex": "disabled ? -1 : tabIndex" }, classAttribute: "mecx-option" }, viewQueries: [{ propertyName: "_content", first: true, predicate: ["content"], descendants: true, static: true }], ngImport: i0, template: `<div #content><ng-content /></div>`, isInline: true, styles: ["monkey-option{display:flex;position:relative;cursor:pointer;padding:16px;line-height:16px;font-size:14px;color:var(--mecx-color-gray-900);transition:all .1s ease-in-out}monkey-option>div{display:flex;white-space:normal;word-break:break-all}monkey-option:hover{color:var(--mecx-color-gray-900);background-color:var(--mecx-color-gray-100)}monkey-option.mecx-option-disabled{color:var(--mecx-color-gray-400);background-color:#fff;cursor:default}monkey-option.mecx-option-selected{color:var(--mecx-color-theme-contrast-main);background-color:var(--mecx-color-theme-main)}.ng-animating monkey-option.mecx-option-selected{color:var(--mecx-color-gray-900);background-color:var(--mecx-color-gray-100)}\n"], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
3750
- }
3751
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyOptionComponent, decorators: [{
3752
- type: Component,
3753
- args: [{ selector: 'monkey-option', standalone: true, changeDetection: ChangeDetectionStrategy.OnPush, template: `<div #content><ng-content /></div>`, encapsulation: ViewEncapsulation.None, host: {
3754
- 'data-testid': 'monkey-option',
3755
- '[attr.id]': 'id',
3756
- class: 'mecx-option',
3757
- '[class.mecx-option-disabled]': 'disabled',
3758
- '[class.mecx-option-selected]': 'selected',
3759
- '[attr.tabindex]': 'disabled ? -1 : tabIndex'
3760
- }, styles: ["monkey-option{display:flex;position:relative;cursor:pointer;padding:16px;line-height:16px;font-size:14px;color:var(--mecx-color-gray-900);transition:all .1s ease-in-out}monkey-option>div{display:flex;white-space:normal;word-break:break-all}monkey-option:hover{color:var(--mecx-color-gray-900);background-color:var(--mecx-color-gray-100)}monkey-option.mecx-option-disabled{color:var(--mecx-color-gray-400);background-color:#fff;cursor:default}monkey-option.mecx-option-selected{color:var(--mecx-color-theme-contrast-main);background-color:var(--mecx-color-theme-main)}.ng-animating monkey-option.mecx-option-selected{color:var(--mecx-color-gray-900);background-color:var(--mecx-color-gray-100)}\n"] }]
3761
- }], propDecorators: { _content: [{
3762
- type: ViewChild,
3763
- args: ['content', { static: true }]
3764
- }], value: [{
3765
- type: Input
3766
- }], disabled: [{
3767
- type: Input,
3768
- args: [{ transform: booleanAttribute }]
3769
- }], onClick: [{
3770
- type: HostListener,
3771
- args: ['click', ['$event']]
3772
- }] } });
3773
-
3774
- /** ************************
3775
- * Copyright Monkey Exchange. All Rights Reserved
3776
- * This style guide was developed by Monkey Exchange Team
3777
- * MIT Licence
3778
- ************************* */
3779
-
3780
- /** ************************
3781
- * Copyright Monkey Exchange. All Rights Reserved
3782
- * This style guide was developed by Monkey Exchange Team
3783
- * MIT Licence
3784
- ************************* */
3785
- class MonkeySecurityLevelComponent {
3786
- get class() {
3787
- if (this.score() === 0) {
3788
- return 'empty';
5051
+ const state = new OverlayConfig({
5052
+ positionStrategy,
5053
+ scrollStrategy: this._overlay.scrollStrategies.block(),
5054
+ panelClass,
5055
+ hasBackdrop: config.hasBackdrop,
5056
+ maxWidth: config.maxWidth,
5057
+ maxHeight: config.maxHeight,
5058
+ disposeOnNavigation: config.closeOnNavigation
5059
+ });
5060
+ if (config.backdropClass) {
5061
+ state.backdropClass = config.backdropClass;
3789
5062
  }
3790
- if (this.score() < 300) {
3791
- return 'weak';
5063
+ if (config.maxWidth) {
5064
+ state.width = '100%';
3792
5065
  }
3793
- if (this.score() >= 300 && this.score() < 800) {
3794
- return 'medium';
5066
+ if (config.maxHeight) {
5067
+ state.height = '100%';
3795
5068
  }
3796
- if (this.score() >= 800 && this.score() < 1000) {
3797
- return 'strong';
5069
+ return state;
5070
+ }
5071
+ createInjector(config, dialogRef, overlayRef, fallbackInjector) {
5072
+ const providers = [
5073
+ { provide: OverlayRef, useValue: overlayRef },
5074
+ { provide: MonkeyModalRef, useValue: dialogRef },
5075
+ { provide: MECX_MODAL_DATA, useValue: config.data }
5076
+ ];
5077
+ if (config.providers) {
5078
+ providers.push(...config.providers);
3798
5079
  }
3799
- return 'very-strong';
5080
+ return Injector.create({ parent: fallbackInjector, providers });
3800
5081
  }
3801
- get id() {
3802
- return this._id;
5082
+ open(component, config) {
5083
+ const defaultConfig = new MonkeyModalConfig();
5084
+ config = { ...defaultConfig, ...config };
5085
+ config.id = this._idGenerator.getId('monkey-modal-');
5086
+ const overlayConfig = this.getOverlayConfig(config);
5087
+ const overlayRef = this._overlay.create(overlayConfig);
5088
+ const modalRef = new MonkeyModalRef(overlayRef, config);
5089
+ const injector = this.createInjector(config, modalRef, overlayRef, this._injector);
5090
+ const componentPortal = new ComponentPortal(component, null, injector);
5091
+ const componentRef = overlayRef.attach(componentPortal);
5092
+ const componentElement = componentRef.location.nativeElement;
5093
+ componentElement.style.width = '100%';
5094
+ componentElement.style.height = '100%';
5095
+ modalRef.componentElement = componentElement;
5096
+ modalRef.componentInstance = componentRef.instance;
5097
+ this.openDialogs.push(modalRef);
5098
+ return modalRef;
3803
5099
  }
3804
- set id(value) {
3805
- this._id = value || this._uid;
5100
+ openDefault(params, config) {
5101
+ config.providers = [{ provide: MECX_MODAL_DEFAULT_CONFIG, useValue: params }];
5102
+ config.icon = config.icon ? config.icon : 'help';
5103
+ return this.open(MonkeyModalDefaultComponent, config);
3806
5104
  }
3807
- constructor() {
3808
- this.label = input();
3809
- this.score = input.required();
3810
- this.strengthLabel = input();
3811
- this._uid = inject(IdGenerator).getId('monkey-security-level-');
3812
- // eslint-disable-next-line no-self-assign
3813
- this.id = this.id;
5105
+ openConfirmation(params, config) {
5106
+ config.providers = [{ provide: MECX_MODAL_CONFIRMATION_CONFIG, useValue: params }];
5107
+ return this.open(MonkeyModalConfirmationComponent, config);
3814
5108
  }
3815
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySecurityLevelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
3816
- 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 }); }
5109
+ closeAll() {
5110
+ reverseForEach(this.openDialogs, (dialog) => {
5111
+ return dialog.close();
5112
+ });
5113
+ this.openDialogs.splice(0, this.openDialogs.length);
5114
+ }
5115
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
5116
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalService, providedIn: 'root' }); }
3817
5117
  }
3818
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySecurityLevelComponent, decorators: [{
3819
- type: Component,
3820
- args: [{ encapsulation: ViewEncapsulation.None, imports: [CommonModule], selector: 'monkey-security-level', standalone: true, host: {
3821
- 'data-testid': 'monkey-security-level',
3822
- '[attr.id]': 'id',
3823
- '[id]': 'id'
3824
- }, 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"] }]
3825
- }], ctorParameters: () => [], propDecorators: { class: [{
3826
- type: HostBinding,
3827
- args: ['class']
3828
- }], id: [{
3829
- type: Input
3830
- }] } });
5118
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyModalService, decorators: [{
5119
+ type: Injectable,
5120
+ args: [{ providedIn: 'root' }]
5121
+ }] });
3831
5122
 
3832
5123
  /** ************************
3833
5124
  * Copyright Monkey Exchange. All Rights Reserved
@@ -3840,7 +5131,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
3840
5131
  * This style guide was developed by Monkey Exchange Team
3841
5132
  * MIT Licence
3842
5133
  ************************* */
3843
- class MonkeySelectComponent {
5134
+ class MonkeyRadioButtonComponent {
5135
+ get classes() {
5136
+ return `${this.position} ${this.size}`;
5137
+ }
3844
5138
  get disabled() {
3845
5139
  if (this.ngControl && this.ngControl.disabled !== null) {
3846
5140
  return this.ngControl.disabled;
@@ -3870,241 +5164,61 @@ class MonkeySelectComponent {
3870
5164
  get value() {
3871
5165
  return this._value;
3872
5166
  }
3873
- constructor(overlay, changeDetectorRef, viewContainerRef, formField) {
3874
- this.overlay = overlay;
5167
+ constructor(changeDetectorRef, formField) {
3875
5168
  this.changeDetectorRef = changeDetectorRef;
3876
- this.viewContainerRef = viewContainerRef;
3877
5169
  this.formField = formField;
3878
5170
  this.tabIndex = 0;
3879
5171
  this.onChange = new EventEmitter();
3880
5172
  this.onSearch = new EventEmitter();
3881
- this.placeholder = '';
3882
- this.loading = false;
3883
- this.showSearch = true;
3884
- this.searchPlaceholder = '';
3885
- this.callbackSearch = false;
5173
+ this.position = 'horizontal';
5174
+ this.size = 'lg';
3886
5175
  this._value = null;
3887
- this.labelSelected = '';
3888
- this.overlayRef = null;
3889
5176
  this._destroyRef = inject(DestroyRef);
3890
- this.iconArrowDown = inject(MonkeyIconsService).arrowDown;
3891
5177
  this.idGenerator = inject(IdGenerator);
3892
5178
  this.ngControl = inject(NgControl, { self: true, optional: true });
3893
5179
  this._elementRef = inject(ElementRef);
3894
- this.currency = false;
3895
5180
  this.focused = false;
3896
5181
  this._disabled = false;
3897
- this.id = this.idGenerator.getId('monkey-select-');
3898
- this.percent = false;
5182
+ this.id = this.idGenerator.getId('monkey-radiobutton-');
3899
5183
  this.stateChanges = new Subject();
3900
- this.type = '';
3901
- this.searchHandle = new EventEmitter();
3902
- this.searchDictionary = inject(MonkeyDictionaryService).get('NO-DATA');
3903
- this.loadingDictionary = inject(MonkeyDictionaryService).get('LOADING');
3904
- this.imgSearchNoData = inject(MonkeyIconsService).searchFail;
3905
- this.imgSearch = inject(MonkeyIconsService).search;
3906
- this.showSearchNoData = false;
3907
- this.isOpen = false;
3908
- this.searchData = '';
3909
- this.onAnimationEnd = (event) => {
3910
- if (event.toState === 'closed') {
3911
- this.closeOverlay();
3912
- }
3913
- };
5184
+ this.type = 'radio-button';
3914
5185
  this._onChange = () => { };
3915
5186
  this._onTouched = () => { };
3916
5187
  if (this.ngControl) {
3917
5188
  this.ngControl.valueAccessor = this;
3918
5189
  }
3919
5190
  }
3920
- changeControl() {
3921
- if (this.formField?.control) {
3922
- this.formField.control.loading = this.loading;
3923
- }
3924
- }
3925
5191
  changeSelected() {
3926
5192
  setTimeout(() => {
3927
5193
  if (this.options) {
3928
5194
  this.options.forEach((opt) => {
3929
5195
  opt.selected = opt.value === this.value;
3930
5196
  });
3931
- this.updateSelectedLabel();
3932
5197
  }
3933
5198
  this.changeDetectorRef.markForCheck();
3934
5199
  });
3935
5200
  }
3936
5201
  initializeOptions() {
3937
- this.options.forEach((option) => {
3938
- if (!option.action) {
3939
- option.action = this.selectOption.bind(this, option);
3940
- }
3941
- });
3942
- }
3943
- openDropdown() {
3944
- if (this.options?.length) {
3945
- this.formField.control.disableToBeDirty = true;
3946
- this.isOpen = true;
3947
- this.createOverlay();
3948
- }
3949
- }
3950
- closeDropdown() {
3951
- this.changeDetectorRef.markForCheck();
3952
- this.isOpen = false;
3953
- this.focused = false;
3954
- this.formField.control.disableToBeDirty = false;
3955
- if (!this.callbackSearch) {
3956
- this.searchData = '';
3957
- }
3958
- }
3959
- closeOverlay() {
3960
- if (this.overlayRef) {
3961
- this.overlayRef.dispose();
3962
- this.overlayRef = null;
3963
- }
3964
- }
3965
- initializeWithOverlay() {
3966
- if (this.showSearch) {
3967
- const element = this.overlayRef?.overlayElement.querySelector(`#${this.id}-search`);
3968
- this.options.forEach((opt) => {
3969
- const element = this.overlayRef?.overlayElement.querySelector(`#${opt.id}`);
3970
- if (!element)
3971
- return;
3972
- element.style.display = '';
3973
- });
3974
- setTimeout(() => {
3975
- element?.focus();
3976
- }, 0);
3977
- this.showSearchNoData = false;
3978
- }
3979
5202
  setTimeout(() => {
3980
- const selected = this.options.find((opt) => {
3981
- return opt.selected;
5203
+ this.options?.forEach((option) => {
5204
+ option.type = 'radio';
5205
+ if (!option.action) {
5206
+ option.action = this.selectOption.bind(this, option);
5207
+ }
3982
5208
  });
3983
- if (selected) {
3984
- const element = this.overlayRef?.overlayElement.querySelector(`#${selected.id}`);
3985
- element?.scrollIntoView({ behavior: 'instant', block: 'center' });
3986
- }
5209
+ this.changeDetectorRef.markForCheck();
3987
5210
  }, 0);
3988
5211
  }
3989
- createOverlay() {
3990
- if (this.overlayRef) {
3991
- return;
3992
- }
3993
- const offset = 4;
3994
- const positions = [
3995
- {
3996
- originX: 'start',
3997
- originY: 'bottom',
3998
- overlayX: 'start',
3999
- overlayY: 'top',
4000
- offsetY: offset
4001
- },
4002
- {
4003
- originX: 'start',
4004
- originY: 'top',
4005
- overlayX: 'start',
4006
- overlayY: 'bottom',
4007
- offsetY: -offset
4008
- }
4009
- ];
4010
- let anchor = this.trigger;
4011
- let width = anchor.nativeElement.offsetWidth;
4012
- if (this.formField?.elementRef) {
4013
- const el = this.formField?.elementRef.nativeElement.querySelector('.mecx-form-field-body');
4014
- anchor = el;
4015
- width = el.offsetWidth;
4016
- }
4017
- const positionStrategy = this.overlay
4018
- .position()
4019
- .flexibleConnectedTo(anchor)
4020
- .withPositions(positions)
4021
- .withPush(true);
4022
- this.overlayRef = this.overlay.create({
4023
- positionStrategy,
4024
- scrollStrategy: this.overlay.scrollStrategies.block(),
4025
- width,
4026
- hasBackdrop: true,
4027
- backdropClass: 'no-class'
4028
- });
4029
- const portal = new TemplatePortal(this.overlayTemplate, this.viewContainerRef);
4030
- this.overlayRef.attach(portal);
4031
- this.overlayRef
4032
- .backdropClick()
4033
- .pipe(takeUntilDestroyed(this._destroyRef))
4034
- .subscribe(() => {
4035
- return this.closeDropdown();
4036
- });
4037
- this.initializeWithOverlay();
4038
- }
4039
- updateSelectedLabel() {
4040
- const selectedOption = this.options.find((opt) => {
4041
- return opt.value === this.value;
4042
- });
4043
- this.labelSelected = selectedOption ? selectedOption.displayContent : '';
4044
- }
4045
- executeSearch(search) {
4046
- let found = false;
4047
- this.options.forEach((opt) => {
4048
- const element = this.overlayRef?.overlayElement.querySelector(`#${opt.id}`);
4049
- if (!element)
4050
- return;
4051
- const isMatch = normalizeStringToSearch(opt.displayContent).includes(normalizeStringToSearch(search));
4052
- if (isMatch) {
4053
- found = true;
4054
- }
4055
- element.style.display = isMatch ? '' : 'none';
4056
- });
4057
- this.repositionScroll();
4058
- this.showSearchNoData = !found;
4059
- }
4060
- repositionScroll() {
4061
- const overlayElement = this.overlayRef?.overlayElement.querySelector('.mecx-select-overlay');
4062
- if (overlayElement) {
4063
- overlayElement.scrollTop = 0;
4064
- }
4065
- }
4066
- ngOnInit() {
4067
- this.searchHandle
4068
- .pipe(debounceTime(200), takeUntilDestroyed(this._destroyRef))
4069
- .subscribe((search) => {
4070
- if (this.callbackSearch) {
4071
- this.onSearch.next(search);
4072
- this.repositionScroll();
4073
- }
4074
- else {
4075
- this.executeSearch(search);
4076
- }
4077
- });
4078
- }
4079
5212
  ngAfterContentInit() {
4080
5213
  this.initializeOptions();
4081
- this.options.changes.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((resp) => {
4082
- this.updateSelectedLabel();
5214
+ this.options.changes.pipe(takeUntilDestroyed(this._destroyRef)).subscribe(() => {
4083
5215
  this.initializeOptions();
4084
5216
  this.changeSelected();
4085
5217
  });
4086
5218
  }
4087
- ngOnDestroy() {
4088
- if (this.overlayRef) {
4089
- this.overlayRef.dispose();
4090
- }
4091
- }
4092
- toggleDropdown() {
4093
- if (!this.disabled) {
4094
- if (this.isOpen) {
4095
- this.closeDropdown();
4096
- this._onTouched();
4097
- }
4098
- else {
4099
- this.openDropdown();
4100
- }
4101
- }
4102
- }
4103
5219
  selectOption(option) {
4104
5220
  if (!option.disabled && !this.disabled) {
4105
5221
  this.value = option.value;
4106
- this.updateSelectedLabel();
4107
- this.closeDropdown();
4108
5222
  this._onChange(this.value);
4109
5223
  this.onChange.emit(this.value);
4110
5224
  this.options.forEach((opt) => {
@@ -4119,7 +5233,6 @@ class MonkeySelectComponent {
4119
5233
  onContainerClick(event) {
4120
5234
  if (this.disabled)
4121
5235
  return;
4122
- this.openDropdown();
4123
5236
  this._elementRef.nativeElement.focus();
4124
5237
  }
4125
5238
  _onFocus() {
@@ -4141,98 +5254,32 @@ class MonkeySelectComponent {
4141
5254
  }
4142
5255
  setDisabledState(isDisabled) {
4143
5256
  this.disabled = isDisabled;
5257
+ this.initializeOptions();
4144
5258
  }
4145
- ngOnChanges(changes) {
4146
- let hasChanges = false;
4147
- // eslint-disable-next-line dot-notation
4148
- const changesLoading = changes?.['loading'];
4149
- if (changesLoading?.currentValue !== changesLoading?.previousValue) {
4150
- hasChanges = true;
4151
- this.changeControl();
4152
- }
4153
- if (hasChanges) {
4154
- this.stateChanges.next();
4155
- }
4156
- }
4157
- onHandleSearch(event) {
4158
- try {
4159
- const { value } = event.target;
4160
- const handled = sanitizeString(value);
4161
- this.searchHandle.next(handled || '');
4162
- }
4163
- catch (e) {
4164
- // not to do
4165
- }
4166
- }
4167
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySelectComponent, deps: [{ token: i1.Overlay }, { token: i0.ChangeDetectorRef }, { token: i0.ViewContainerRef }, { token: MonkeyFormFieldComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
4168
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeySelectComponent, isStandalone: true, selector: "monkey-select", inputs: { tabIndex: "tabIndex", placeholder: "placeholder", loading: ["loading", "loading", booleanAttribute], showSearch: ["showSearch", "showSearch", booleanAttribute], searchPlaceholder: "searchPlaceholder", callbackSearch: ["callbackSearch", "callbackSearch", booleanAttribute], disabled: ["disabled", "disabled", booleanAttribute], required: ["required", "required", booleanAttribute], value: "value" }, outputs: { onChange: "onChange", onSearch: "onSearch" }, host: { attributes: { "data-testid": "monkey-select" }, listeners: { "focus": "_onFocus()", "blur": "_onBlur()" }, properties: { "class.mecx-select-disabled": "_disabled", "class.mecx-select-focused": "focused", "attr.id": "id", "attr.tabindex": "disabled ? -1 : tabIndex" }, classAttribute: "mecx-select" }, providers: [
5259
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyRadioButtonComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: MonkeyFormFieldComponent, optional: true }], target: i0.ɵɵFactoryTarget.Component }); }
5260
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "16.1.0", version: "18.2.13", type: MonkeyRadioButtonComponent, isStandalone: true, selector: "monkey-radiobutton", inputs: { tabIndex: "tabIndex", position: "position", size: "size", disabled: ["disabled", "disabled", booleanAttribute], required: ["required", "required", booleanAttribute], value: "value" }, outputs: { onChange: "onChange", onSearch: "onSearch" }, host: { attributes: { "data-testid": "monkey-radiobutton" }, listeners: { "focus": "_onFocus()", "blur": "_onBlur()" }, properties: { "class.mecx-disabled": "disabled", "class.mecx-radiobutton-focused": "focused", "attr.id": "id", "attr.tabindex": "disabled ? -1 : tabIndex", "class": "this.classes" }, classAttribute: "mecx-radiobutton" }, providers: [
4169
5261
  // eslint-disable-next-line no-use-before-define
4170
- { provide: MonkeyFormFieldControl, useExisting: MonkeySelectComponent }
4171
- ], queries: [{ propertyName: "options", predicate: MonkeyOptionComponent }], viewQueries: [{ propertyName: "overlayTemplate", first: true, predicate: ["overlayTemplate"], descendants: true }, { propertyName: "overlayEl", first: true, predicate: ["overlay"], descendants: true }, { propertyName: "trigger", first: true, predicate: ["trigger"], descendants: true }], usesOnChanges: true, ngImport: i0, template: "<div\n class=\"mecx-select-trigger\"\n [class.open]=\"isOpen\"\n (click)=\"toggleDropdown()\"\n role=\"combobox\"\n [attr.aria-expanded]=\"isOpen\"\n #trigger\n>\n <div class=\"mecx-select-value\" [class.has-value]=\"value\">\n <span>{{ labelSelected || placeholder }}</span>\n </div>\n\n @if (!loading) {\n <div class=\"mecx-select-icon\" [innerHTML]=\"iconArrowDown\"></div>\n }\n</div>\n\n<ng-template #overlayTemplate>\n <div class=\"mecx-select-body-overlay\">\n @if (showSearch) {\n <div class=\"mecx-select-search\">\n <div class=\"mecx-select-search-icon\" [innerHTML]=\"imgSearch\"></div>\n <input\n (input)=\"onHandleSearch($event)\"\n type=\"text\"\n [id]=\"id + '-search'\"\n autocomplete=\"off\"\n maxlength=\"50\"\n [placeholder]=\"searchPlaceholder\"\n [(ngModel)]=\"searchData\"\n />\n </div>\n }\n <div\n class=\"mecx-select-overlay\"\n #overlay\n [@animation]=\"isOpen ? 'open' : 'closed'\"\n (@animation.done)=\"onAnimationEnd($event)\"\n >\n <ng-content />\n </div>\n @if (showSearch && showSearchNoData) {\n <div class=\"mecx-select-search-no-data\">\n <div class=\"mecx-select-search-no-data-icon\" [innerHTML]=\"imgSearchNoData\"></div>\n {{ searchDictionary | async }}\n </div>\n }\n @if (loading) {\n <div class=\"mecx-select-search-loading\">\n {{ loadingDictionary | async }}\n </div>\n }\n </div>\n</ng-template>\n", styles: ["monkey-select{display:inline-flex;width:100%;min-width:0;position:relative}monkey-select:focus-visible,monkey-select:focus{outline:none}.mecx-select-trigger{width:100%;display:inline-flex;align-items:center;cursor:pointer;gap:8px;box-sizing:border-box}.mecx-select-trigger .mecx-select-value{flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--mecx-color-gray-500);font-size:14px;line-height:24px;letter-spacing:.42px}.mecx-select-trigger .mecx-select-value.has-value{color:var(--mecx-color-gray-900)}.mecx-select-trigger .mecx-select-icon{display:flex;transition:all .2s ease-in-out}.mecx-select-trigger .mecx-select-icon svg *{stroke:var(--mecx-color-theme-main)}.mecx-select-disabled .mecx-select-trigger{background-color:var(--mecx-color-gray-50);border-color:var(--mecx-color-gray-50);cursor:default}.mecx-select-disabled .mecx-select-trigger .mecx-select-value{color:var(--mecx-color-gray-400)}.mecx-select-disabled .mecx-select-trigger .mecx-select-icon svg *{stroke:var(--mecx-color-gray-400)}.mecx-select-trigger.open .mecx-select-icon{transform:rotate(180deg)}.mecx-select-body-overlay{width:100%;background:#fff;border:2px solid var(--mecx-color-gray-400);overflow:hidden;border-radius:4px;box-shadow:0 16px 32px #d6d6d694}.mecx-select-body-overlay .mecx-select-search{display:flex;gap:4px;border-bottom:2px solid var(--mecx-color-gray-400);padding:8px}.mecx-select-body-overlay .mecx-select-search-icon{width:12px;display:flex}.mecx-select-body-overlay .mecx-select-search-icon svg path{stroke:var(--mecx-color-gray-600)}.mecx-select-body-overlay input{border:none;width:90%;color:var(--mecx-color-gray-600)!important;font-size:12px;letter-spacing:.54px}.mecx-select-body-overlay .mecx-select-search-no-data,.mecx-select-body-overlay .mecx-select-search-loading{padding:12px;display:flex;justify-content:center;flex-direction:column;align-items:center;gap:4px;color:var(--mecx-color-gray-600);font-size:12px;letter-spacing:.54px;text-align:center}.mecx-select-body-overlay .mecx-select-search-no-data-icon svg path,.mecx-select-body-overlay .mecx-select-search-loading-icon svg path{stroke:var(--mecx-color-gray-600)}.mecx-select-overlay{width:100%;background:#fff;overflow:hidden auto;max-height:360px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "pipe", type: i1$1.AsyncPipe, name: "async" }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "directive", type: i2.DefaultValueAccessor, selector: "input:not([type=checkbox])[formControlName],textarea[formControlName],input:not([type=checkbox])[formControl],textarea[formControl],input:not([type=checkbox])[ngModel],textarea[ngModel],[ngDefaultControl]" }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.MaxLengthValidator, selector: "[maxlength][formControlName],[maxlength][formControl],[maxlength][ngModel]", inputs: ["maxlength"] }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }], animations: [
4172
- trigger('animation', [
4173
- transition(':enter', [
4174
- style({
4175
- opacity: 0,
4176
- transform: 'scaleY(.9)'
4177
- }),
4178
- animate('100ms ease-in-out', style({
4179
- opacity: 1,
4180
- transform: 'scaleY(1)'
4181
- }))
4182
- ]),
4183
- state('closed', style({
4184
- transform: 'scaleY(.9)',
4185
- opacity: 0
4186
- })),
4187
- transition('closed <=> open', animate('200ms ease-in-out'))
4188
- ])
4189
- ], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
5262
+ { provide: MonkeyFormFieldControl, useExisting: MonkeyRadioButtonComponent }
5263
+ ], queries: [{ propertyName: "options", predicate: MonkeyOptionComponent }], ngImport: i0, template: "<ng-content />\n", styles: ["monkey-radiobutton{display:inline-flex;width:100%;min-width:0;position:relative;flex-wrap:wrap}monkey-radiobutton:focus-visible,monkey-radiobutton:focus{outline:none}monkey-radiobutton.vertical{flex-direction:column}monkey-radiobutton.mecx-disabled monkey-option{opacity:.5;pointer-events:none}monkey-radiobutton.mecx-disabled monkey-option:before{background:var(--mecx-color-white);border-color:var(--mecx-color-gray-400)}monkey-radiobutton.mecx-form-field-invalid{background:var(--mecx-color-error-700)}monkey-radiobutton.md monkey-option:before{width:16px;height:16px}monkey-radiobutton.sm monkey-option:before{width:14px;height:14px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "ngmodule", type: FormsModule }], changeDetection: i0.ChangeDetectionStrategy.OnPush, encapsulation: i0.ViewEncapsulation.None }); }
4190
5264
  }
4191
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySelectComponent, decorators: [{
5265
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyRadioButtonComponent, decorators: [{
4192
5266
  type: Component,
4193
- args: [{ selector: 'monkey-select', standalone: true, imports: [CommonModule, ReactiveFormsModule, FormsModule], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
5267
+ args: [{ selector: 'monkey-radiobutton', standalone: true, imports: [CommonModule, ReactiveFormsModule, FormsModule, UtilIconComponent], changeDetection: ChangeDetectionStrategy.OnPush, encapsulation: ViewEncapsulation.None, providers: [
4194
5268
  // eslint-disable-next-line no-use-before-define
4195
- { provide: MonkeyFormFieldControl, useExisting: MonkeySelectComponent }
4196
- ], animations: [
4197
- trigger('animation', [
4198
- transition(':enter', [
4199
- style({
4200
- opacity: 0,
4201
- transform: 'scaleY(.9)'
4202
- }),
4203
- animate('100ms ease-in-out', style({
4204
- opacity: 1,
4205
- transform: 'scaleY(1)'
4206
- }))
4207
- ]),
4208
- state('closed', style({
4209
- transform: 'scaleY(.9)',
4210
- opacity: 0
4211
- })),
4212
- transition('closed <=> open', animate('200ms ease-in-out'))
4213
- ])
5269
+ { provide: MonkeyFormFieldControl, useExisting: MonkeyRadioButtonComponent }
4214
5270
  ], host: {
4215
- 'data-testid': 'monkey-select',
4216
- class: 'mecx-select',
4217
- '[class.mecx-select-disabled]': '_disabled',
4218
- '[class.mecx-select-focused]': 'focused',
5271
+ 'data-testid': 'monkey-radiobutton',
5272
+ class: 'mecx-radiobutton',
5273
+ '[class.mecx-disabled]': 'disabled',
5274
+ '[class.mecx-radiobutton-focused]': 'focused',
4219
5275
  '[attr.id]': 'id',
4220
5276
  '[attr.tabindex]': 'disabled ? -1 : tabIndex',
4221
5277
  '(focus)': '_onFocus()',
4222
5278
  '(blur)': '_onBlur()'
4223
- }, template: "<div\n class=\"mecx-select-trigger\"\n [class.open]=\"isOpen\"\n (click)=\"toggleDropdown()\"\n role=\"combobox\"\n [attr.aria-expanded]=\"isOpen\"\n #trigger\n>\n <div class=\"mecx-select-value\" [class.has-value]=\"value\">\n <span>{{ labelSelected || placeholder }}</span>\n </div>\n\n @if (!loading) {\n <div class=\"mecx-select-icon\" [innerHTML]=\"iconArrowDown\"></div>\n }\n</div>\n\n<ng-template #overlayTemplate>\n <div class=\"mecx-select-body-overlay\">\n @if (showSearch) {\n <div class=\"mecx-select-search\">\n <div class=\"mecx-select-search-icon\" [innerHTML]=\"imgSearch\"></div>\n <input\n (input)=\"onHandleSearch($event)\"\n type=\"text\"\n [id]=\"id + '-search'\"\n autocomplete=\"off\"\n maxlength=\"50\"\n [placeholder]=\"searchPlaceholder\"\n [(ngModel)]=\"searchData\"\n />\n </div>\n }\n <div\n class=\"mecx-select-overlay\"\n #overlay\n [@animation]=\"isOpen ? 'open' : 'closed'\"\n (@animation.done)=\"onAnimationEnd($event)\"\n >\n <ng-content />\n </div>\n @if (showSearch && showSearchNoData) {\n <div class=\"mecx-select-search-no-data\">\n <div class=\"mecx-select-search-no-data-icon\" [innerHTML]=\"imgSearchNoData\"></div>\n {{ searchDictionary | async }}\n </div>\n }\n @if (loading) {\n <div class=\"mecx-select-search-loading\">\n {{ loadingDictionary | async }}\n </div>\n }\n </div>\n</ng-template>\n", styles: ["monkey-select{display:inline-flex;width:100%;min-width:0;position:relative}monkey-select:focus-visible,monkey-select:focus{outline:none}.mecx-select-trigger{width:100%;display:inline-flex;align-items:center;cursor:pointer;gap:8px;box-sizing:border-box}.mecx-select-trigger .mecx-select-value{flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;color:var(--mecx-color-gray-500);font-size:14px;line-height:24px;letter-spacing:.42px}.mecx-select-trigger .mecx-select-value.has-value{color:var(--mecx-color-gray-900)}.mecx-select-trigger .mecx-select-icon{display:flex;transition:all .2s ease-in-out}.mecx-select-trigger .mecx-select-icon svg *{stroke:var(--mecx-color-theme-main)}.mecx-select-disabled .mecx-select-trigger{background-color:var(--mecx-color-gray-50);border-color:var(--mecx-color-gray-50);cursor:default}.mecx-select-disabled .mecx-select-trigger .mecx-select-value{color:var(--mecx-color-gray-400)}.mecx-select-disabled .mecx-select-trigger .mecx-select-icon svg *{stroke:var(--mecx-color-gray-400)}.mecx-select-trigger.open .mecx-select-icon{transform:rotate(180deg)}.mecx-select-body-overlay{width:100%;background:#fff;border:2px solid var(--mecx-color-gray-400);overflow:hidden;border-radius:4px;box-shadow:0 16px 32px #d6d6d694}.mecx-select-body-overlay .mecx-select-search{display:flex;gap:4px;border-bottom:2px solid var(--mecx-color-gray-400);padding:8px}.mecx-select-body-overlay .mecx-select-search-icon{width:12px;display:flex}.mecx-select-body-overlay .mecx-select-search-icon svg path{stroke:var(--mecx-color-gray-600)}.mecx-select-body-overlay input{border:none;width:90%;color:var(--mecx-color-gray-600)!important;font-size:12px;letter-spacing:.54px}.mecx-select-body-overlay .mecx-select-search-no-data,.mecx-select-body-overlay .mecx-select-search-loading{padding:12px;display:flex;justify-content:center;flex-direction:column;align-items:center;gap:4px;color:var(--mecx-color-gray-600);font-size:12px;letter-spacing:.54px;text-align:center}.mecx-select-body-overlay .mecx-select-search-no-data-icon svg path,.mecx-select-body-overlay .mecx-select-search-loading-icon svg path{stroke:var(--mecx-color-gray-600)}.mecx-select-overlay{width:100%;background:#fff;overflow:hidden auto;max-height:360px}\n"] }]
4224
- }], ctorParameters: () => [{ type: i1.Overlay }, { type: i0.ChangeDetectorRef }, { type: i0.ViewContainerRef }, { type: MonkeyFormFieldComponent, decorators: [{
5279
+ }, template: "<ng-content />\n", styles: ["monkey-radiobutton{display:inline-flex;width:100%;min-width:0;position:relative;flex-wrap:wrap}monkey-radiobutton:focus-visible,monkey-radiobutton:focus{outline:none}monkey-radiobutton.vertical{flex-direction:column}monkey-radiobutton.mecx-disabled monkey-option{opacity:.5;pointer-events:none}monkey-radiobutton.mecx-disabled monkey-option:before{background:var(--mecx-color-white);border-color:var(--mecx-color-gray-400)}monkey-radiobutton.mecx-form-field-invalid{background:var(--mecx-color-error-700)}monkey-radiobutton.md monkey-option:before{width:16px;height:16px}monkey-radiobutton.sm monkey-option:before{width:14px;height:14px}\n"] }]
5280
+ }], ctorParameters: () => [{ type: i0.ChangeDetectorRef }, { type: MonkeyFormFieldComponent, decorators: [{
4225
5281
  type: Optional
4226
- }] }], propDecorators: { overlayTemplate: [{
4227
- type: ViewChild,
4228
- args: ['overlayTemplate']
4229
- }], overlayEl: [{
4230
- type: ViewChild,
4231
- args: ['overlay']
4232
- }], trigger: [{
4233
- type: ViewChild,
4234
- args: ['trigger']
4235
- }], options: [{
5282
+ }] }], propDecorators: { options: [{
4236
5283
  type: ContentChildren,
4237
5284
  args: [MonkeyOptionComponent]
4238
5285
  }], tabIndex: [{
@@ -4241,20 +5288,13 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
4241
5288
  type: Output
4242
5289
  }], onSearch: [{
4243
5290
  type: Output
4244
- }], placeholder: [{
4245
- type: Input,
4246
- args: [{ required: true }]
4247
- }], loading: [{
4248
- type: Input,
4249
- args: [{ transform: booleanAttribute }]
4250
- }], showSearch: [{
4251
- type: Input,
4252
- args: [{ transform: booleanAttribute }]
4253
- }], searchPlaceholder: [{
5291
+ }], position: [{
4254
5292
  type: Input
4255
- }], callbackSearch: [{
4256
- type: Input,
4257
- args: [{ transform: booleanAttribute }]
5293
+ }], size: [{
5294
+ type: Input
5295
+ }], classes: [{
5296
+ type: HostBinding,
5297
+ args: ['class']
4258
5298
  }], disabled: [{
4259
5299
  type: Input,
4260
5300
  args: [{ transform: booleanAttribute }]
@@ -4271,6 +5311,64 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
4271
5311
  * MIT Licence
4272
5312
  ************************* */
4273
5313
 
5314
+ /** ************************
5315
+ * Copyright Monkey Exchange. All Rights Reserved
5316
+ * This style guide was developed by Monkey Exchange Team
5317
+ * MIT Licence
5318
+ ************************* */
5319
+ class MonkeySecurityLevelComponent {
5320
+ get class() {
5321
+ if (this.score() === 0) {
5322
+ return 'empty';
5323
+ }
5324
+ if (this.score() < 300) {
5325
+ return 'weak';
5326
+ }
5327
+ if (this.score() >= 300 && this.score() < 800) {
5328
+ return 'medium';
5329
+ }
5330
+ if (this.score() >= 800 && this.score() < 1000) {
5331
+ return 'strong';
5332
+ }
5333
+ return 'very-strong';
5334
+ }
5335
+ get id() {
5336
+ return this._id;
5337
+ }
5338
+ set id(value) {
5339
+ this._id = value || this._uid;
5340
+ }
5341
+ constructor() {
5342
+ this.label = input();
5343
+ this.score = input.required();
5344
+ this.strengthLabel = input();
5345
+ this._uid = inject(IdGenerator).getId('monkey-security-level-');
5346
+ // eslint-disable-next-line no-self-assign
5347
+ this.id = this.id;
5348
+ }
5349
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySecurityLevelComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5350
+ 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:var(--mecx-color-gray-300);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:var(--mecx-color-success-main);width:100%}monkey-security-level.strong .bar:before{background:var(--mecx-color-success-main);width:80%}monkey-security-level.medium .bar:before{background:var(--mecx-color-warning-main);width:66%}monkey-security-level.weak .bar:before{background:var(--mecx-color-error-700);width:33%}monkey-security-level.empty .bar:before{background:var(--mecx-color-error-700);width:0%}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], encapsulation: i0.ViewEncapsulation.None }); }
5351
+ }
5352
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeySecurityLevelComponent, decorators: [{
5353
+ type: Component,
5354
+ args: [{ encapsulation: ViewEncapsulation.None, imports: [CommonModule], selector: 'monkey-security-level', standalone: true, host: {
5355
+ 'data-testid': 'monkey-security-level',
5356
+ '[attr.id]': 'id',
5357
+ '[id]': 'id'
5358
+ }, 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:var(--mecx-color-gray-300);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:var(--mecx-color-success-main);width:100%}monkey-security-level.strong .bar:before{background:var(--mecx-color-success-main);width:80%}monkey-security-level.medium .bar:before{background:var(--mecx-color-warning-main);width:66%}monkey-security-level.weak .bar:before{background:var(--mecx-color-error-700);width:33%}monkey-security-level.empty .bar:before{background:var(--mecx-color-error-700);width:0%}\n"] }]
5359
+ }], ctorParameters: () => [], propDecorators: { class: [{
5360
+ type: HostBinding,
5361
+ args: ['class']
5362
+ }], id: [{
5363
+ type: Input
5364
+ }] } });
5365
+
5366
+ /** ************************
5367
+ * Copyright Monkey Exchange. All Rights Reserved
5368
+ * This style guide was developed by Monkey Exchange Team
5369
+ * MIT Licence
5370
+ ************************* */
5371
+
4274
5372
  /** ************************
4275
5373
  * Copyright Monkey Exchange. All Rights Reserved
4276
5374
  * This style guide was developed by Monkey Exchange Team
@@ -4295,7 +5393,7 @@ class MonkeyStatusComponent {
4295
5393
  this.id = this.id;
4296
5394
  }
4297
5395
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyStatusComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4298
- 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"] }] }); }
5396
+ 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:var(--mecx-color-success-main)}:host.warning .status{background-color:var(--mecx-color-warning-main)}:host.error .status{background-color:var(--mecx-color-error-700)}:host.question .status{background-color:var(--mecx-color-question-main)}:host.info .status{background-color:var(--mecx-color-info)}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }] }); }
4299
5397
  }
4300
5398
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyStatusComponent, decorators: [{
4301
5399
  type: Component,
@@ -4303,7 +5401,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
4303
5401
  'data-testid': 'monkey-status',
4304
5402
  '[attr.id]': 'id',
4305
5403
  '[id]': 'id'
4306
- }, 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"] }]
5404
+ }, 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:var(--mecx-color-success-main)}:host.warning .status{background-color:var(--mecx-color-warning-main)}:host.error .status{background-color:var(--mecx-color-error-700)}:host.question .status{background-color:var(--mecx-color-question-main)}:host.info .status{background-color:var(--mecx-color-info)}\n"] }]
4307
5405
  }], ctorParameters: () => [], propDecorators: { class: [{
4308
5406
  type: HostBinding,
4309
5407
  args: ['class']
@@ -4416,7 +5514,7 @@ class MonkeyPaginationSizeComponent {
4416
5514
  this.id = this.id;
4417
5515
  }
4418
5516
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationSizeComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4419
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyPaginationSizeComponent, isStandalone: true, selector: "monkey-pagination-size", inputs: { size: "size", disabled: "disabled", id: "id" }, outputs: { onChange: "onChange" }, host: { attributes: { "data-testid": "monkey-pagination-size" }, properties: { "attr.id": "id", "id": "id" } }, exportAs: ["monkeyPaginationSize"], ngImport: i0, template: "<ng-content></ng-content>\n<monkey-form-field hideClear size=\"sm\">\n <monkey-select\n placeholder=\"''\"\n [ngModel]=\"size\"\n (onChange)=\"onChange.next($event)\"\n [disabled]=\"disabled\"\n [showSearch]=\"false\"\n >\n @for (item of sizes; track item) {\n <monkey-option [value]=\"item\">{{ item }}</monkey-option>\n }\n </monkey-select>\n</monkey-form-field>\n", styles: ["monkey-pagination-size{display:flex;align-items:center;gap:8px}monkey-pagination-size .mecx-form-field-body{height:32px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: MonkeySelectComponent, selector: "monkey-select", inputs: ["tabIndex", "placeholder", "loading", "showSearch", "searchPlaceholder", "callbackSearch", "disabled", "required", "value"], outputs: ["onChange", "onSearch"] }, { kind: "component", type: MonkeyOptionComponent, selector: "monkey-option", inputs: ["value", "disabled"] }, { kind: "ngmodule", type: MonkeyFormFieldModule }, { kind: "component", type: MonkeyFormFieldComponent, selector: "monkey-form-field", inputs: ["id", "hideAction", "enableClear", "size"], exportAs: ["monkeyFormField"] }], encapsulation: i0.ViewEncapsulation.None }); }
5517
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyPaginationSizeComponent, isStandalone: true, selector: "monkey-pagination-size", inputs: { size: "size", disabled: "disabled", id: "id" }, outputs: { onChange: "onChange" }, host: { attributes: { "data-testid": "monkey-pagination-size" }, properties: { "attr.id": "id", "id": "id" } }, exportAs: ["monkeyPaginationSize"], ngImport: i0, template: "<ng-content></ng-content>\n<monkey-form-field hideClear size=\"sm\">\n <monkey-select\n placeholder=\"''\"\n [ngModel]=\"size\"\n (onChange)=\"onChange.next($event)\"\n [disabled]=\"disabled\"\n [showSearch]=\"false\"\n >\n @for (item of sizes; track item) {\n <monkey-option [value]=\"item\">{{ item }}</monkey-option>\n }\n </monkey-select>\n</monkey-form-field>\n", styles: ["monkey-pagination-size{display:flex;align-items:center;gap:8px}monkey-pagination-size .mecx-form-field-body{height:32px}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "ngmodule", type: FormsModule }, { kind: "directive", type: i2.NgControlStatus, selector: "[formControlName],[ngModel],[formControl]" }, { kind: "directive", type: i2.NgModel, selector: "[ngModel]:not([formControlName]):not([formControl])", inputs: ["name", "disabled", "ngModel", "ngModelOptions"], outputs: ["ngModelChange"], exportAs: ["ngModel"] }, { kind: "ngmodule", type: ReactiveFormsModule }, { kind: "component", type: MonkeySelectComponent, selector: "monkey-select", inputs: ["tabIndex", "placeholder", "loading", "showSearch", "searchPlaceholder", "callbackSearch", "disabled", "required", "value"], outputs: ["onChange", "onSearch"] }, { kind: "component", type: MonkeyOptionComponent, selector: "monkey-option", inputs: ["value", "disabled", "type"] }, { kind: "ngmodule", type: MonkeyFormFieldModule }, { kind: "component", type: MonkeyFormFieldComponent, selector: "monkey-form-field", inputs: ["id", "hideAction", "enableClear", "size"], exportAs: ["monkeyFormField"] }], encapsulation: i0.ViewEncapsulation.None }); }
4420
5518
  }
4421
5519
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyPaginationSizeComponent, decorators: [{
4422
5520
  type: Component,
@@ -4532,7 +5630,7 @@ class MonkeyTableComponent {
4532
5630
  }
4533
5631
  }
4534
5632
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyTableComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
4535
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyTableComponent, selector: "monkey-table, table[monkey-table]", inputs: { scroll: "scroll", loading: "loading", loadingRef: "loadingRef" }, outputs: { sortChange: "sortChange" }, host: { properties: { "class.disabled": "this.loading" } }, queries: [{ propertyName: "_paginationActionChildren", predicate: MonkeyPaginationActionComponent, descendants: true }, { propertyName: "_paginationSizeChildren", predicate: MonkeyPaginationSizeComponent, descendants: true }], viewQueries: [{ propertyName: "_headerEl", first: true, predicate: ["header"], descendants: true, static: true }, { propertyName: "_tableHeaderEl", first: true, predicate: ["tableHeader"], descendants: true, static: true }, { propertyName: "_tableContentEl", first: true, predicate: ["tableContent"], descendants: true, static: true }, { propertyName: "_tableLoadingEl", first: true, predicate: ["tableLoading"], descendants: true, static: true }, { propertyName: "_tableScrollEl", first: true, predicate: ["tableScroll"], descendants: true, static: true }], exportAs: ["monkeyTable"], usesOnChanges: true, ngImport: i0, template: "<div class=\"mecx-table-container\">\n <div class=\"mecx-table-wrapper\">\n <div class=\"mecx-table-header\" #header>\n <table #tableHeader>\n <ng-content select=\"thead\"></ng-content>\n </table>\n </div>\n <div class=\"mecx-inner-scroll\" #tableScroll>\n <table #tableContent>\n <ng-content select=\"tbody\"></ng-content>\n </table>\n\n @if (loadingRef && loading) {\n <table #tableLoading>\n <ng-container *ngTemplateOutlet=\"loadingRef\"></ng-container>\n </table>\n }\n </div>\n </div>\n <div class=\"mecx-table-footer\">\n <ng-content select=\"monkey-pagination-size\"></ng-content>\n <div class=\"mecx-table-actions\">\n <ng-content select=\"monkey-pagination-label\"></ng-content>\n <ng-content select=\"monkey-pagination-action\"></ng-content>\n </div>\n </div>\n</div>\n", styles: ["monkey-table{position:relative;display:block;table-layout:fixed;border:2px solid var(--mecx-color-gray-400);border-radius:16px}.mecx-table-container{scrollbar-color:var(--mecx-color-gray-400) transparent}.mecx-table-wrapper{display:block}.mecx-table-header{overflow-x:hidden;overflow-y:scroll;white-space:nowrap;border-bottom:2px solid var(--mecx-color-gray-300);background:var(--mecx-color-gray-50);border-top-left-radius:16px;border-top-right-radius:16px}.mecx-table-header table{table-layout:fixed;width:100%;text-align:left;border-collapse:separate;height:48px}.mecx-table-header table thead{display:table-header-group;vertical-align:middle;unicode-bidi:isolate}.mecx-table-header table th{text-align:left;vertical-align:middle;padding:8px 12px;color:var(--mecx-color-gray-700);font-size:16px;font-weight:700;font-style:normal;white-space:nowrap;will-change:transform;backface-visibility:hidden;line-height:24px}.mecx-table-header table th svg{opacity:0;transform:opacity 2s ease-in-out}.mecx-table-header table th:hover svg{opacity:1}.mecx-table-header table .mecx-column-checked svg{opacity:1}.mecx-table-header .mecx-column-stick{position:sticky;background:var(--mecx-color-gray-50);z-index:3}.mecx-table-header .mecx-column-stick-left{border-right:1px solid var(--mecx-color-gray-200);left:0}.mecx-table-header .mecx-column-stick-right{border-left:1px solid var(--mecx-color-gray-200);right:0}.mecx-table-header .mecx-column-checked{position:sticky;left:0;border-right:1px solid var(--mecx-color-gray-200);background:var(--mecx-color-gray-50);z-index:3}.mecx-table-header .mecx-column-checked monkey-checkbox{vertical-align:middle}.mecx-inner-scroll{scroll-behavior:smooth}.mecx-inner-scroll table{table-layout:fixed;width:100%;text-align:left;border-collapse:separate;border-spacing:0px}.mecx-inner-scroll table td{text-align:left;border-bottom:2px solid var(--mecx-color-gray-100);padding:8px 12px;vertical-align:middle}.mecx-inner-scroll .mecx-column-stick{position:sticky;right:0;z-index:1;background:#fff}.mecx-inner-scroll .mecx-column-stick-left{border-right:1px solid var(--mecx-color-gray-200);left:0}.mecx-inner-scroll .mecx-column-stick-right{border-left:1px solid var(--mecx-color-gray-200);right:0}.mecx-inner-scroll .mecx-column-checked{position:sticky;left:0;z-index:1;border-right:1px solid var(--mecx-color-gray-200);background:#fff}.mecx-inner-scroll .mecx-column-checked monkey-checkbox{vertical-align:middle}.mecx-table-footer{border-top:1px solid var(--mecx-color-gray-200);padding:8px 12px;display:flex;align-items:center;justify-content:space-between}.mecx-table-footer .mecx-table-actions{display:flex;gap:8px;align-items:center}.mecx-column-sortable-disabled,.mecx-column-checked-disabled{pointer-events:none}.mecx-column-expansible{border-left:none!important;border-right:none!important}@keyframes rotate-right{0%{transform:rotate(0)}to{transform:rotate(90deg)}}@keyframes rotate-left{0%{transform:rotate(90deg)}to{transform:rotate(0)}}.mecx-column-expansible .rotate-animation-right{animation:rotate-right .3s ease-in-out}.mecx-column-expansible .rotate-animation-left{animation:rotate-left .3s ease-in-out}\n"], dependencies: [{ kind: "directive", type: i1$1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None }); }
5633
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyTableComponent, selector: "monkey-table, table[monkey-table]", inputs: { scroll: "scroll", loading: "loading", loadingRef: "loadingRef" }, outputs: { sortChange: "sortChange" }, host: { properties: { "class.disabled": "this.loading" } }, queries: [{ propertyName: "_paginationActionChildren", predicate: MonkeyPaginationActionComponent, descendants: true }, { propertyName: "_paginationSizeChildren", predicate: MonkeyPaginationSizeComponent, descendants: true }], viewQueries: [{ propertyName: "_headerEl", first: true, predicate: ["header"], descendants: true, static: true }, { propertyName: "_tableHeaderEl", first: true, predicate: ["tableHeader"], descendants: true, static: true }, { propertyName: "_tableContentEl", first: true, predicate: ["tableContent"], descendants: true, static: true }, { propertyName: "_tableLoadingEl", first: true, predicate: ["tableLoading"], descendants: true, static: true }, { propertyName: "_tableScrollEl", first: true, predicate: ["tableScroll"], descendants: true, static: true }], exportAs: ["monkeyTable"], usesOnChanges: true, ngImport: i0, template: "<div class=\"mecx-table-container\">\n <div class=\"mecx-table-wrapper\">\n <div class=\"mecx-table-header\" #header>\n <table #tableHeader>\n <ng-content select=\"thead\"></ng-content>\n </table>\n </div>\n <div class=\"mecx-inner-scroll\" #tableScroll>\n <table #tableContent>\n <ng-content select=\"tbody\"></ng-content>\n </table>\n\n @if (loadingRef && loading) {\n <table #tableLoading>\n <ng-container *ngTemplateOutlet=\"loadingRef\"></ng-container>\n </table>\n }\n </div>\n </div>\n <div class=\"mecx-table-footer\">\n <ng-content select=\"monkey-pagination-size\"></ng-content>\n <div class=\"mecx-table-actions\">\n <ng-content select=\"monkey-pagination-label\"></ng-content>\n <ng-content select=\"monkey-pagination-action\"></ng-content>\n </div>\n </div>\n</div>\n", styles: ["monkey-table{position:relative;display:block;table-layout:fixed;border:2px solid var(--mecx-color-gray-400);border-radius:16px}.mecx-table-container{scrollbar-color:var(--mecx-color-gray-400) transparent}.mecx-table-wrapper{display:block}.mecx-table-header{overflow-x:hidden;overflow-y:scroll;white-space:nowrap;border-bottom:2px solid var(--mecx-color-gray-300);background:var(--mecx-color-gray-50);border-top-left-radius:16px;border-top-right-radius:16px}.mecx-table-header table{table-layout:fixed;width:100%;text-align:left;border-collapse:separate;height:48px}.mecx-table-header table thead{display:table-header-group;vertical-align:middle;unicode-bidi:isolate}.mecx-table-header table th{text-align:left;vertical-align:middle;padding:8px 12px;color:var(--mecx-color-gray-700);font-size:16px;font-weight:700;font-style:normal;white-space:nowrap;will-change:transform;backface-visibility:hidden;line-height:24px}.mecx-table-header table th svg{opacity:0;transform:opacity 2s ease-in-out}.mecx-table-header table th:hover svg{opacity:1}.mecx-table-header table .mecx-column-checked svg{opacity:1}.mecx-table-header .mecx-column-stick{position:sticky;background:var(--mecx-color-gray-50);z-index:3}.mecx-table-header .mecx-column-stick-left{border-right:1px solid var(--mecx-color-gray-200);left:0}.mecx-table-header .mecx-column-stick-right{border-left:1px solid var(--mecx-color-gray-200);right:0}.mecx-table-header .mecx-column-checked{position:sticky;left:0;border-right:1px solid var(--mecx-color-gray-200);background:var(--mecx-color-gray-50);z-index:3}.mecx-table-header .mecx-column-checked monkey-checkbox{vertical-align:middle}.mecx-inner-scroll{scroll-behavior:smooth}.mecx-inner-scroll table{table-layout:fixed;width:100%;text-align:left;border-collapse:separate;border-spacing:0px}.mecx-inner-scroll table td{text-align:left;border-bottom:2px solid var(--mecx-color-gray-100);padding:8px 12px;vertical-align:middle}.mecx-inner-scroll .mecx-column-stick{position:sticky;right:0;z-index:1;background:#fff}.mecx-inner-scroll .mecx-column-stick-left{border-right:1px solid var(--mecx-color-gray-200);left:0}.mecx-inner-scroll .mecx-column-stick-right{border-left:1px solid var(--mecx-color-gray-200);right:0}.mecx-inner-scroll .mecx-column-checked{position:sticky;left:0;z-index:1;border-right:1px solid var(--mecx-color-gray-200);background:#fff}.mecx-inner-scroll .mecx-column-checked monkey-checkbox{vertical-align:middle}.mecx-table-footer{border-top:1px solid var(--mecx-color-gray-200);padding:8px 12px;display:flex;align-items:center;justify-content:space-between}.mecx-table-footer .mecx-table-actions{display:flex;gap:8px;align-items:center}.mecx-column-sortable-disabled,.mecx-column-checked-disabled{pointer-events:none}.mecx-column-expansible{border-left:none!important;border-right:none!important}@keyframes rotate-right{0%{transform:rotate(0)}to{transform:rotate(90deg)}}@keyframes rotate-left{0%{transform:rotate(90deg)}to{transform:rotate(0)}}.mecx-column-expansible .rotate-animation-right{animation:rotate-right .3s ease-in-out}.mecx-column-expansible .rotate-animation-left{animation:rotate-left .3s ease-in-out}\n"], dependencies: [{ kind: "directive", type: i1.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }], encapsulation: i0.ViewEncapsulation.None }); }
4536
5634
  }
4537
5635
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyTableComponent, decorators: [{
4538
5636
  type: Component,
@@ -5015,7 +6113,7 @@ class MonkeyToastComponent {
5015
6113
  }
5016
6114
  }
5017
6115
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToastComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
5018
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyToastComponent, isStandalone: true, selector: "monkey-toast", inputs: { message: "message", icon: "icon", type: "type", isClosable: ["isClosable", "isClosable", booleanAttribute], actionLabel: "actionLabel", actionIcon: "actionIcon", id: "id" }, outputs: { onActionClick: "onActionClick", onClose: "onClose" }, host: { attributes: { "data-testid": "monkey-toast" }, listeners: { "animationend": "onAnimationEnd($event)" }, properties: { "attr.id": "id", "id": "id", "class": "this.class", "animation": "this.animationState" } }, ngImport: i0, template: "<div class=\"monkey-toast-content\">\n @if (icon) {\n <monkey-icon [icon]=\"icon\" size=\"lg\"></monkey-icon>\n }\n <div class=\"monkey-toast-message\">\n {{ message }}\n </div>\n</div>\n@if (actionLabel) {\n <div class=\"monkey-toast-action\">\n <monkey-button\n class=\"monkey-toast-btn-action\"\n type=\"tertiary\"\n size=\"sm\"\n (click)=\"onActionClick.emit(id)\"\n >\n {{ actionLabel }}\n @if (actionIcon) {\n <monkey-icon [icon]=\"actionIcon\" first></monkey-icon>\n }\n </monkey-button>\n </div>\n}\n@if (isClosable) {\n <div class=\"monkey-toast-divider\"></div>\n <div class=\"monkey-toast-close\">\n <monkey-icon-button class=\"btn-close\" type=\"tertiary\" size=\"sm\" icon=\"close\" (click)=\"close()\">\n </monkey-icon-button>\n </div>\n}\n", styles: ["monkey-toast{display:flex;align-items:start;min-width:200px;width:100%;gap:16px;padding:16px;box-shadow:0 8px 16px #00000029;background-color:#111418;color:#fff;border-radius:8px;max-width:450px;box-sizing:border-box;animation:fade-in .3s}monkey-toast.closed{animation:fade-out .1s}monkey-toast .monkey-toast-content{display:flex;gap:8px;line-height:24px;font-size:14px;letter-spacing:.48px;flex-grow:1}monkey-toast .monkey-toast-action .monkey-toast-btn-action{margin:0!important}monkey-toast .monkey-toast-action .monkey-toast-btn-action .mecx-button{height:24px;color:#fff!important;outline-color:#fff}monkey-toast .monkey-toast-action .monkey-toast-btn-action .mecx-button .content{padding:12px 8px}monkey-toast .monkey-toast-action .monkey-toast-btn-action .mecx-button:hover{color:#fff!important}monkey-toast .monkey-toast-divider{width:1px;height:24px;background-color:var(--mecx-color-gray-400)}monkey-toast .monkey-toast-close{display:flex}monkey-toast .monkey-toast-close .btn-close{margin:0!important}monkey-toast .monkey-toast-close .btn-close .mecx-icon-button{height:24px;width:24px;color:#fff!important;outline-color:#fff}monkey-toast .monkey-toast-close .btn-close .mecx-icon-button:hover{color:#fff!important}monkey-toast.success{background-color:var(--mecx-color-success-main)}monkey-toast.error{background-color:#db0505}monkey-toast.question{background-color:var(--mecx-color-question-800)}monkey-toast.info{background-color:#003687}@keyframes fade-in{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}@keyframes fade-out{to{transform:scale(.9);opacity:0}}\n"], dependencies: [{ kind: "component", type: MonkeyButtonComponent, selector: "monkey-button", inputs: ["disabled", "size", "type", "id"] }, { kind: "component", type: MonkeyIconComponent, selector: "monkey-icon", inputs: ["icon", "size", "id"] }, { kind: "component", type: MonkeyIconButtonComponent, selector: "monkey-icon-button", inputs: ["type", "size", "disabled", "icon", "id"] }], encapsulation: i0.ViewEncapsulation.None }); }
6116
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyToastComponent, isStandalone: true, selector: "monkey-toast", inputs: { message: "message", icon: "icon", type: "type", isClosable: ["isClosable", "isClosable", booleanAttribute], actionLabel: "actionLabel", actionIcon: "actionIcon", id: "id" }, outputs: { onActionClick: "onActionClick", onClose: "onClose" }, host: { attributes: { "data-testid": "monkey-toast" }, listeners: { "animationend": "onAnimationEnd($event)" }, properties: { "attr.id": "id", "id": "id", "class": "this.class", "animation": "this.animationState" } }, ngImport: i0, template: "<div class=\"monkey-toast-content\">\n @if (icon) {\n <monkey-icon [icon]=\"icon\" size=\"lg\"></monkey-icon>\n }\n <div class=\"monkey-toast-message\">\n {{ message }}\n </div>\n</div>\n@if (actionLabel) {\n <div class=\"monkey-toast-action\">\n <monkey-button\n class=\"monkey-toast-btn-action\"\n type=\"tertiary\"\n size=\"sm\"\n (click)=\"onActionClick.emit(id)\"\n >\n {{ actionLabel }}\n @if (actionIcon) {\n <monkey-icon [icon]=\"actionIcon\" first></monkey-icon>\n }\n </monkey-button>\n </div>\n}\n@if (isClosable) {\n <div class=\"monkey-toast-divider\"></div>\n <div class=\"monkey-toast-close\">\n <monkey-icon-button class=\"btn-close\" type=\"tertiary\" size=\"sm\" icon=\"close\" (click)=\"close()\">\n </monkey-icon-button>\n </div>\n}\n", styles: ["monkey-toast{display:flex;align-items:start;min-width:200px;width:100%;gap:16px;padding:16px;box-shadow:0 8px 16px 0 var(--mecx-color-box-shadow);background-color:#111418;color:#fff;border-radius:8px;max-width:450px;box-sizing:border-box;animation:fade-in .3s}monkey-toast.closed{animation:fade-out .1s}monkey-toast .monkey-toast-content{display:flex;gap:8px;line-height:24px;font-size:14px;letter-spacing:.48px;flex-grow:1}monkey-toast .monkey-toast-action .monkey-toast-btn-action{margin:0!important}monkey-toast .monkey-toast-action .monkey-toast-btn-action .mecx-button{height:24px;color:#fff!important;outline-color:#fff}monkey-toast .monkey-toast-action .monkey-toast-btn-action .mecx-button .content{padding:12px 8px}monkey-toast .monkey-toast-action .monkey-toast-btn-action .mecx-button:hover{color:#fff!important}monkey-toast .monkey-toast-divider{width:1px;height:24px;background-color:var(--mecx-color-gray-400)}monkey-toast .monkey-toast-close{display:flex}monkey-toast .monkey-toast-close .btn-close{margin:0!important}monkey-toast .monkey-toast-close .btn-close .mecx-icon-button{height:24px;width:24px;color:#fff!important;outline-color:#fff}monkey-toast .monkey-toast-close .btn-close .mecx-icon-button:hover{color:#fff!important}monkey-toast.success{background-color:var(--mecx-color-success-main)}monkey-toast.error{background-color:#db0505}monkey-toast.question{background-color:var(--mecx-color-question-800)}monkey-toast.info{background-color:#003687}@keyframes fade-in{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}@keyframes fade-out{to{transform:scale(.9);opacity:0}}\n"], dependencies: [{ kind: "component", type: MonkeyButtonComponent, selector: "monkey-button", inputs: ["disabled", "size", "type", "id"] }, { kind: "component", type: MonkeyIconComponent, selector: "monkey-icon", inputs: ["icon", "size", "id"] }, { kind: "component", type: MonkeyIconButtonComponent, selector: "monkey-icon-button", inputs: ["type", "size", "disabled", "icon", "id"] }], encapsulation: i0.ViewEncapsulation.None }); }
5019
6117
  }
5020
6118
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToastComponent, decorators: [{
5021
6119
  type: Component,
@@ -5024,7 +6122,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
5024
6122
  '(animationend)': 'onAnimationEnd($event)',
5025
6123
  '[attr.id]': 'id',
5026
6124
  '[id]': 'id'
5027
- }, template: "<div class=\"monkey-toast-content\">\n @if (icon) {\n <monkey-icon [icon]=\"icon\" size=\"lg\"></monkey-icon>\n }\n <div class=\"monkey-toast-message\">\n {{ message }}\n </div>\n</div>\n@if (actionLabel) {\n <div class=\"monkey-toast-action\">\n <monkey-button\n class=\"monkey-toast-btn-action\"\n type=\"tertiary\"\n size=\"sm\"\n (click)=\"onActionClick.emit(id)\"\n >\n {{ actionLabel }}\n @if (actionIcon) {\n <monkey-icon [icon]=\"actionIcon\" first></monkey-icon>\n }\n </monkey-button>\n </div>\n}\n@if (isClosable) {\n <div class=\"monkey-toast-divider\"></div>\n <div class=\"monkey-toast-close\">\n <monkey-icon-button class=\"btn-close\" type=\"tertiary\" size=\"sm\" icon=\"close\" (click)=\"close()\">\n </monkey-icon-button>\n </div>\n}\n", styles: ["monkey-toast{display:flex;align-items:start;min-width:200px;width:100%;gap:16px;padding:16px;box-shadow:0 8px 16px #00000029;background-color:#111418;color:#fff;border-radius:8px;max-width:450px;box-sizing:border-box;animation:fade-in .3s}monkey-toast.closed{animation:fade-out .1s}monkey-toast .monkey-toast-content{display:flex;gap:8px;line-height:24px;font-size:14px;letter-spacing:.48px;flex-grow:1}monkey-toast .monkey-toast-action .monkey-toast-btn-action{margin:0!important}monkey-toast .monkey-toast-action .monkey-toast-btn-action .mecx-button{height:24px;color:#fff!important;outline-color:#fff}monkey-toast .monkey-toast-action .monkey-toast-btn-action .mecx-button .content{padding:12px 8px}monkey-toast .monkey-toast-action .monkey-toast-btn-action .mecx-button:hover{color:#fff!important}monkey-toast .monkey-toast-divider{width:1px;height:24px;background-color:var(--mecx-color-gray-400)}monkey-toast .monkey-toast-close{display:flex}monkey-toast .monkey-toast-close .btn-close{margin:0!important}monkey-toast .monkey-toast-close .btn-close .mecx-icon-button{height:24px;width:24px;color:#fff!important;outline-color:#fff}monkey-toast .monkey-toast-close .btn-close .mecx-icon-button:hover{color:#fff!important}monkey-toast.success{background-color:var(--mecx-color-success-main)}monkey-toast.error{background-color:#db0505}monkey-toast.question{background-color:var(--mecx-color-question-800)}monkey-toast.info{background-color:#003687}@keyframes fade-in{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}@keyframes fade-out{to{transform:scale(.9);opacity:0}}\n"] }]
6125
+ }, template: "<div class=\"monkey-toast-content\">\n @if (icon) {\n <monkey-icon [icon]=\"icon\" size=\"lg\"></monkey-icon>\n }\n <div class=\"monkey-toast-message\">\n {{ message }}\n </div>\n</div>\n@if (actionLabel) {\n <div class=\"monkey-toast-action\">\n <monkey-button\n class=\"monkey-toast-btn-action\"\n type=\"tertiary\"\n size=\"sm\"\n (click)=\"onActionClick.emit(id)\"\n >\n {{ actionLabel }}\n @if (actionIcon) {\n <monkey-icon [icon]=\"actionIcon\" first></monkey-icon>\n }\n </monkey-button>\n </div>\n}\n@if (isClosable) {\n <div class=\"monkey-toast-divider\"></div>\n <div class=\"monkey-toast-close\">\n <monkey-icon-button class=\"btn-close\" type=\"tertiary\" size=\"sm\" icon=\"close\" (click)=\"close()\">\n </monkey-icon-button>\n </div>\n}\n", styles: ["monkey-toast{display:flex;align-items:start;min-width:200px;width:100%;gap:16px;padding:16px;box-shadow:0 8px 16px 0 var(--mecx-color-box-shadow);background-color:#111418;color:#fff;border-radius:8px;max-width:450px;box-sizing:border-box;animation:fade-in .3s}monkey-toast.closed{animation:fade-out .1s}monkey-toast .monkey-toast-content{display:flex;gap:8px;line-height:24px;font-size:14px;letter-spacing:.48px;flex-grow:1}monkey-toast .monkey-toast-action .monkey-toast-btn-action{margin:0!important}monkey-toast .monkey-toast-action .monkey-toast-btn-action .mecx-button{height:24px;color:#fff!important;outline-color:#fff}monkey-toast .monkey-toast-action .monkey-toast-btn-action .mecx-button .content{padding:12px 8px}monkey-toast .monkey-toast-action .monkey-toast-btn-action .mecx-button:hover{color:#fff!important}monkey-toast .monkey-toast-divider{width:1px;height:24px;background-color:var(--mecx-color-gray-400)}monkey-toast .monkey-toast-close{display:flex}monkey-toast .monkey-toast-close .btn-close{margin:0!important}monkey-toast .monkey-toast-close .btn-close .mecx-icon-button{height:24px;width:24px;color:#fff!important;outline-color:#fff}monkey-toast .monkey-toast-close .btn-close .mecx-icon-button:hover{color:#fff!important}monkey-toast.success{background-color:var(--mecx-color-success-main)}monkey-toast.error{background-color:#db0505}monkey-toast.question{background-color:var(--mecx-color-question-800)}monkey-toast.info{background-color:#003687}@keyframes fade-in{0%{transform:scale(.9);opacity:0}to{transform:scale(1);opacity:1}}@keyframes fade-out{to{transform:scale(.9);opacity:0}}\n"] }]
5028
6126
  }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { message: [{
5029
6127
  type: Input
5030
6128
  }], icon: [{
@@ -5097,7 +6195,7 @@ class MonkeyToggleComponent {
5097
6195
  }
5098
6196
  }
5099
6197
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToggleComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
5100
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyToggleComponent, isStandalone: true, selector: "monkey-toggle", inputs: { disabled: "disabled", size: "size", value: "value", id: "id" }, outputs: { onChange: "onChange" }, host: { attributes: { "data-testid": "monkey-toggle" }, listeners: { "click": "onClick($event)" }, properties: { "attr.id": "id", "id": "id", "class.disabled": "this.disabled", "class": "this.size" } }, ngImport: i0, template: "<input type=\"checkbox\" [checked]=\"_checked\" />\n<div class=\"slider\" [ngClass]=\"{ checked: _checked }\"></div>\n", styles: [":host{position:relative;display:inline-block}:host input{display:none}:host.disabled{box-shadow:none;pointer-events:none;opacity:.2}:host.lg{width:88px;height:48px}:host.lg input:checked+.checked:before{left:calc(100% - 42px)}:host.lg .slider{position:absolute;cursor:pointer;inset:0;border-radius:34px;transition:all .4s ease;background-color:#f8fafb;border:2px solid #bdc1c7}:host.lg .slider:before{position:absolute;content:\"\";bottom:2px;transition:.4s;border-radius:50%;background-color:#1f2024;left:2px;height:40px;width:40px}:host.lg .slider.checked{background-color:#ebfff8;border:2px solid #00875a}:host.lg .slider.checked:before{background-color:#00875a}:host.md{width:72px;height:40px}:host.md input:checked+.checked:before{left:calc(100% - 34px)}:host.md .slider{position:absolute;cursor:pointer;inset:0;border-radius:34px;transition:all .4s ease;background-color:#f8fafb;border:2px solid #bdc1c7}:host.md .slider:before{position:absolute;content:\"\";bottom:2px;transition:.4s;border-radius:50%;background-color:#1f2024;left:2px;height:32px;width:32px}:host.md .slider.checked{background-color:#ebfff8;border:2px solid #00875a}:host.md .slider.checked:before{background-color:#00875a}:host.sm{width:56px;height:32px}:host.sm input:checked+.checked:before{left:calc(100% - 26px)}:host.sm .slider{position:absolute;cursor:pointer;inset:0;border-radius:34px;transition:all .4s ease;background-color:#f8fafb;border:2px solid #bdc1c7}:host.sm .slider:before{position:absolute;content:\"\";bottom:2px;transition:.4s;border-radius:50%;background-color:#1f2024;left:2px;height:24px;width:24px}:host.sm .slider.checked{background-color:#ebfff8;border:2px solid #00875a}:host.sm .slider.checked:before{background-color:#00875a}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1$1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
6198
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "18.2.13", type: MonkeyToggleComponent, isStandalone: true, selector: "monkey-toggle", inputs: { disabled: "disabled", size: "size", value: "value", id: "id" }, outputs: { onChange: "onChange" }, host: { attributes: { "data-testid": "monkey-toggle" }, listeners: { "click": "onClick($event)" }, properties: { "attr.id": "id", "id": "id", "class.disabled": "this.disabled", "class": "this.size" } }, ngImport: i0, template: "<input type=\"checkbox\" [checked]=\"_checked\" />\n<div class=\"slider\" [ngClass]=\"{ checked: _checked }\"></div>\n", styles: [":host{position:relative;display:inline-block}:host input{display:none}:host.disabled{box-shadow:none;pointer-events:none;opacity:.2}:host.lg{width:88px;height:48px}:host.lg input:checked+.checked:before{left:calc(100% - 42px)}:host.lg .slider{position:absolute;cursor:pointer;inset:0;border-radius:34px;transition:all .4s ease;background-color:#f8fafb;border:2px solid #bdc1c7}:host.lg .slider:before{position:absolute;content:\"\";bottom:2px;transition:.4s;border-radius:50%;background-color:#1f2024;left:2px;height:40px;width:40px}:host.lg .slider.checked{background-color:#ebfff8;border:2px solid #00875a}:host.lg .slider.checked:before{background-color:#00875a}:host.md{width:72px;height:40px}:host.md input:checked+.checked:before{left:calc(100% - 34px)}:host.md .slider{position:absolute;cursor:pointer;inset:0;border-radius:34px;transition:all .4s ease;background-color:#f8fafb;border:2px solid #bdc1c7}:host.md .slider:before{position:absolute;content:\"\";bottom:2px;transition:.4s;border-radius:50%;background-color:#1f2024;left:2px;height:32px;width:32px}:host.md .slider.checked{background-color:#ebfff8;border:2px solid #00875a}:host.md .slider.checked:before{background-color:#00875a}:host.sm{width:56px;height:32px}:host.sm input:checked+.checked:before{left:calc(100% - 26px)}:host.sm .slider{position:absolute;cursor:pointer;inset:0;border-radius:34px;transition:all .4s ease;background-color:#f8fafb;border:2px solid #bdc1c7}:host.sm .slider:before{position:absolute;content:\"\";bottom:2px;transition:.4s;border-radius:50%;background-color:#1f2024;left:2px;height:24px;width:24px}:host.sm .slider.checked{background-color:#ebfff8;border:2px solid #00875a}:host.sm .slider.checked:before{background-color:#00875a}\n"], dependencies: [{ kind: "ngmodule", type: CommonModule }, { kind: "directive", type: i1.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
5101
6199
  }
5102
6200
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToggleComponent, decorators: [{
5103
6201
  type: Component,
@@ -5274,7 +6372,7 @@ class MonkeyTooltipComponent {
5274
6372
  }
5275
6373
  }
5276
6374
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyTooltipComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
5277
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyTooltipComponent, isStandalone: true, selector: "monkey-tooltip", inputs: { text: "text", template: "template", left: "left", top: "top", id: "id" }, outputs: { afterClose: "afterClose" }, host: { attributes: { "data-testid": "monkey-tooltip" }, listeners: { "animationend": "onAnimationEnd($event)" }, properties: { "style.left.px": "left", "style.top.px": "top", "attr.id": "id", "id": "id" } }, ngImport: i0, template: "@if (template) {\n <ng-container *ngTemplateOutlet=\"template\"> </ng-container>\n}\n@if (text) {\n {{ text }}\n}\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center;border-radius:8px;box-shadow:0 8px 16px #00000029;background-color:var(--mecx-color-gray-900);padding:8px 12px;flex-wrap:wrap;text-align:center;color:#fff;font-size:14px;letter-spacing:.42px;line-height:16px;position:absolute;pointer-events:none;cursor:none;word-break:normal;overflow-wrap:anywhere;min-width:50px;max-width:200px;box-sizing:border-box;overflow:hidden;animation:fade-in .3s}:host.closed{animation:fade-out .1s}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{to{opacity:0}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
6375
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "18.2.13", type: MonkeyTooltipComponent, isStandalone: true, selector: "monkey-tooltip", inputs: { text: "text", template: "template", left: "left", top: "top", id: "id" }, outputs: { afterClose: "afterClose" }, host: { attributes: { "data-testid": "monkey-tooltip" }, listeners: { "animationend": "onAnimationEnd($event)" }, properties: { "style.left.px": "left", "style.top.px": "top", "attr.id": "id", "id": "id" } }, ngImport: i0, template: "@if (template) {\n <ng-container *ngTemplateOutlet=\"template\"> </ng-container>\n}\n@if (text) {\n {{ text }}\n}\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center;border-radius:8px;box-shadow:0 8px 16px 0 var(--mecx-color-box-shadow);background-color:var(--mecx-color-gray-900);padding:8px 12px;flex-wrap:wrap;text-align:center;color:#fff;font-size:14px;letter-spacing:.42px;line-height:16px;position:absolute;pointer-events:none;cursor:none;word-break:normal;overflow-wrap:anywhere;min-width:50px;max-width:200px;box-sizing:border-box;overflow:hidden;animation:fade-in .3s}:host.closed{animation:fade-out .1s}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{to{opacity:0}}\n"], dependencies: [{ kind: "directive", type: NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet", "ngTemplateOutletInjector"] }] }); }
5278
6376
  }
5279
6377
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyTooltipComponent, decorators: [{
5280
6378
  type: Component,
@@ -5285,7 +6383,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
5285
6383
  '(animationend)': 'onAnimationEnd($event)',
5286
6384
  '[attr.id]': 'id',
5287
6385
  '[id]': 'id'
5288
- }, template: "@if (template) {\n <ng-container *ngTemplateOutlet=\"template\"> </ng-container>\n}\n@if (text) {\n {{ text }}\n}\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center;border-radius:8px;box-shadow:0 8px 16px #00000029;background-color:var(--mecx-color-gray-900);padding:8px 12px;flex-wrap:wrap;text-align:center;color:#fff;font-size:14px;letter-spacing:.42px;line-height:16px;position:absolute;pointer-events:none;cursor:none;word-break:normal;overflow-wrap:anywhere;min-width:50px;max-width:200px;box-sizing:border-box;overflow:hidden;animation:fade-in .3s}:host.closed{animation:fade-out .1s}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{to{opacity:0}}\n"] }]
6386
+ }, template: "@if (template) {\n <ng-container *ngTemplateOutlet=\"template\"> </ng-container>\n}\n@if (text) {\n {{ text }}\n}\n", styles: [":host{display:inline-flex;align-items:center;justify-content:center;border-radius:8px;box-shadow:0 8px 16px 0 var(--mecx-color-box-shadow);background-color:var(--mecx-color-gray-900);padding:8px 12px;flex-wrap:wrap;text-align:center;color:#fff;font-size:14px;letter-spacing:.42px;line-height:16px;position:absolute;pointer-events:none;cursor:none;word-break:normal;overflow-wrap:anywhere;min-width:50px;max-width:200px;box-sizing:border-box;overflow:hidden;animation:fade-in .3s}:host.closed{animation:fade-out .1s}@keyframes fade-in{0%{opacity:0}to{opacity:1}}@keyframes fade-out{to{opacity:0}}\n"] }]
5289
6387
  }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { text: [{
5290
6388
  type: Input
5291
6389
  }], template: [{
@@ -5455,8 +6553,11 @@ class MonkeyTooltipDirective {
5455
6553
  subscribe.unsubscribe();
5456
6554
  });
5457
6555
  }
6556
+ onScroll() {
6557
+ this.hide();
6558
+ }
5458
6559
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyTooltipDirective, deps: [{ token: i0.ViewContainerRef }, { token: i0.ElementRef }, { token: i0.ApplicationRef }, { token: DOCUMENT }], target: i0.ɵɵFactoryTarget.Directive }); }
5459
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.13", type: MonkeyTooltipDirective, isStandalone: true, selector: "[monkeyTooltip]", inputs: { tooltipText: ["monkeyTooltip", "tooltipText"], tooltipPosition: "tooltipPosition", enabled: ["enabled", "enabled", booleanAttribute] }, host: { listeners: { "mouseenter": "show()", "mouseleave": "hide()", "click": "hide()" } }, ngImport: i0 }); }
6560
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "18.2.13", type: MonkeyTooltipDirective, isStandalone: true, selector: "[monkeyTooltip]", inputs: { tooltipText: ["monkeyTooltip", "tooltipText"], tooltipPosition: "tooltipPosition", enabled: ["enabled", "enabled", booleanAttribute] }, host: { listeners: { "mouseenter": "show()", "mouseleave": "hide()", "click": "hide()", "window:scroll": "onScroll()", "window:resize": "onScroll()" } }, ngImport: i0 }); }
5460
6561
  }
5461
6562
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyTooltipDirective, decorators: [{
5462
6563
  type: Directive,
@@ -5480,6 +6581,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
5480
6581
  }], enabled: [{
5481
6582
  type: Input,
5482
6583
  args: [{ transform: booleanAttribute }]
6584
+ }], onScroll: [{
6585
+ type: HostListener,
6586
+ args: ['window:scroll']
6587
+ }, {
6588
+ type: HostListener,
6589
+ args: ['window:resize']
5483
6590
  }] } });
5484
6591
 
5485
6592
  /** ************************
@@ -5488,6 +6595,90 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
5488
6595
  * MIT Licence
5489
6596
  ************************* */
5490
6597
 
6598
+ class MonkeyToastRef {
6599
+ constructor(componentRef) {
6600
+ this.componentRef = componentRef;
6601
+ // not to do
6602
+ }
6603
+ close() {
6604
+ this.componentRef.instance.close();
6605
+ }
6606
+ }
6607
+
6608
+ class MonkeyToastService {
6609
+ constructor(overlay) {
6610
+ this.overlay = overlay;
6611
+ // no to do
6612
+ }
6613
+ getPositionStrategy(position) {
6614
+ const globalPosition = this.overlay.position().global();
6615
+ switch (position) {
6616
+ case 'top-left':
6617
+ return globalPosition.top('40px').start('40px');
6618
+ case 'top-center':
6619
+ return globalPosition.top('40px').centerHorizontally();
6620
+ case 'top-right':
6621
+ return globalPosition.top('40px').end('40px');
6622
+ case 'bottom-left':
6623
+ return globalPosition.bottom('40px').start('40px');
6624
+ case 'bottom-center':
6625
+ return globalPosition.bottom('40px').centerHorizontally();
6626
+ default:
6627
+ return globalPosition.bottom('40px').end('40px');
6628
+ }
6629
+ }
6630
+ show(toastConfig) {
6631
+ if (this.lastToast) {
6632
+ this.lastToast.close();
6633
+ }
6634
+ const overlayRef = this.overlay.create({
6635
+ hasBackdrop: false,
6636
+ positionStrategy: this.getPositionStrategy(toastConfig.position)
6637
+ });
6638
+ const portal = new ComponentPortal(MonkeyToastComponent);
6639
+ const componentRef = overlayRef.attach(portal);
6640
+ this.lastToast = new MonkeyToastRef(componentRef);
6641
+ componentRef.instance.id = getRandomString(6);
6642
+ componentRef.instance.type = toastConfig.type ?? 'default';
6643
+ componentRef.instance.icon = toastConfig.icon;
6644
+ componentRef.instance.isClosable = toastConfig.isClosable ?? false;
6645
+ componentRef.instance.message = toastConfig.message;
6646
+ componentRef.instance.actionLabel = toastConfig.actionLabel;
6647
+ componentRef.instance.actionIcon = toastConfig.actionIcon;
6648
+ componentRef.instance.onActionClick.subscribe(() => {
6649
+ if (toastConfig.action) {
6650
+ toastConfig.action();
6651
+ if (toastConfig.closeOnAction ?? true) {
6652
+ componentRef.instance.close();
6653
+ }
6654
+ }
6655
+ });
6656
+ componentRef.instance.onClose.subscribe(() => {
6657
+ overlayRef.detach();
6658
+ });
6659
+ if (!toastConfig.keepOpen) {
6660
+ setTimeout(() => {
6661
+ componentRef.instance.close();
6662
+ }, toastConfig.duration ?? 4000);
6663
+ }
6664
+ return componentRef.instance;
6665
+ }
6666
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToastService, deps: [{ token: i1$1.Overlay }], target: i0.ɵɵFactoryTarget.Injectable }); }
6667
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToastService, providedIn: 'root' }); }
6668
+ }
6669
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImport: i0, type: MonkeyToastService, decorators: [{
6670
+ type: Injectable,
6671
+ args: [{
6672
+ providedIn: 'root'
6673
+ }]
6674
+ }], ctorParameters: () => [{ type: i1$1.Overlay }] });
6675
+
6676
+ /** ************************
6677
+ * Copyright Monkey Exchange. All Rights Reserved
6678
+ * This style guide was developed by Monkey Exchange Team
6679
+ * MIT Licence
6680
+ ************************* */
6681
+
5491
6682
  /** ************************
5492
6683
  * Copyright Monkey Exchange. All Rights Reserved
5493
6684
  * This style guide was developed by Monkey Exchange Team
@@ -5498,5 +6689,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "18.2.13", ngImpo
5498
6689
  * Generated bundle index. Do not edit.
5499
6690
  */
5500
6691
 
5501
- export { MECX_I18N_WRAPPER, MECX_MODAL_DATA, MECX_MODAL_DEFAULT_CONFIG, MonkeyAccordionComponent, MonkeyActionBarComponent, MonkeyAlertComponent, MonkeyAvatarComponent, MonkeyBadgeComponent, MonkeyBadgeDirective, MonkeyBreadcrumbComponent, MonkeyButtonComponent, MonkeyCheckboxComponent, MonkeyColumnChecked, MonkeyColumnExpansible, MonkeyColumnSortable, MonkeyColumnStick, MonkeyDateRangeComponent, MonkeyDirectivesModule, MonkeyDividerComponent, MonkeyError, MonkeyFormFieldComponent, MonkeyFormFieldControl, MonkeyFormFieldModule, MonkeyHelper, MonkeyIconButtonComponent, MonkeyIconComponent, MonkeyIconsService, MonkeyInfo, MonkeyInputCodeComponent, MonkeyInputCurrencyDirective, MonkeyInputDirective, MonkeyInputModule, MonkeyInputUploadComponent, MonkeyLabel, MonkeyModalActionsDirective, MonkeyModalComponent, MonkeyModalConfig, MonkeyModalContentDirective, MonkeyModalModule, MonkeyModalRef, MonkeyModalService, MonkeyModalSubtitleDirective, MonkeyModalTitleDirective, MonkeyOptionComponent, MonkeyPaginationActionComponent, MonkeyPaginationLabelComponent, MonkeyPaginationSizeComponent, MonkeyPrefix, MonkeySecurityLevelComponent, MonkeySelectComponent, MonkeyStatusComponent, MonkeySuffix, MonkeyTableComponent, MonkeyTableModule, MonkeyToastComponent, MonkeyToastRef, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, getCurrencySymbol };
6692
+ export { MECX_MODAL_DATA, MECX_MODAL_DEFAULT_CONFIG, MONKEY_COUNTRY_CODE, MONKEY_I18N_WRAPPER, MONKEY_POPOVER_OPTIONS, MonkeyAccordionComponent, MonkeyActionBarComponent, MonkeyAlertComponent, MonkeyAvatarComponent, MonkeyBadgeComponent, MonkeyBadgeDirective, MonkeyBreadcrumbComponent, MonkeyButtonComponent, MonkeyCheckboxComponent, MonkeyColumnChecked, MonkeyColumnExpansible, MonkeyColumnSortable, MonkeyColumnStick, MonkeyDateRangeComponent, MonkeyDirectivesModule, MonkeyDividerComponent, MonkeyErrorDirective, MonkeyFormFieldComponent, MonkeyFormFieldControl, MonkeyFormFieldModule, MonkeyHelperDirective, MonkeyIconButtonComponent, MonkeyIconComponent, MonkeyInfoDirective, MonkeyInputCodeComponent, MonkeyInputCurrencyDirective, MonkeyInputDirective, MonkeyInputModule, MonkeyInputPhoneComponent, MonkeyInputUploadComponent, MonkeyLabelDirective, MonkeyModalActionsDirective, MonkeyModalComponent, MonkeyModalConfig, MonkeyModalContentDirective, MonkeyModalModule, MonkeyModalRef, MonkeyModalService, MonkeyModalSubtitleDirective, MonkeyModalTitleDirective, MonkeyOptionComponent, MonkeyPaginationActionComponent, MonkeyPaginationLabelComponent, MonkeyPaginationSizeComponent, MonkeyPopoverContentComponent, MonkeyPopoverDirective, MonkeyPrefixDirective, MonkeyRadioButtonComponent, MonkeySecurityLevelComponent, MonkeySelectComponent, MonkeyStatusComponent, MonkeySuffixDirective, MonkeyTableComponent, MonkeyTableModule, MonkeyToastComponent, MonkeyToastRef, MonkeyToastService, MonkeyToggleComponent, MonkeyToggleLineButtonComponent, MonkeyToggleLineComponent, MonkeyTooltipComponent, MonkeyTooltipDirective, getCurrencySymbol };
5502
6693
  //# sourceMappingURL=monkey-style-guide-v2.mjs.map