monkey-style-guide-v2 0.0.115 → 0.0.117

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.
@@ -2,17 +2,17 @@ import { trigger, state, transition, style, animate, keyframes } from '@angular/
2
2
  import * as i1 from '@angular/common';
3
3
  import { CommonModule, NgTemplateOutlet, CurrencyPipe } from '@angular/common';
4
4
  import * as i0 from '@angular/core';
5
- import { Injectable, input, Component, TemplateRef, inject, booleanAttribute, Input, HostBinding, ViewEncapsulation, output, Directive, ElementRef, InjectionToken, EventEmitter, Output, ViewContainerRef, NgZone, DestroyRef, Optional, Inject, HostListener, NgModule, LOCALE_ID, signal, computed, ChangeDetectorRef, DEFAULT_CURRENCY_CODE, effect, ContentChildren, ContentChild, ViewChild, Injector, forwardRef, ChangeDetectionStrategy, ViewChildren, DOCUMENT } from '@angular/core';
5
+ import { Injectable, input, Component, TemplateRef, inject, booleanAttribute, Input, HostBinding, ViewEncapsulation, output, Directive, InjectionToken, LOCALE_ID, DestroyRef, signal, computed, effect, EventEmitter, Output, ViewContainerRef, ElementRef, NgZone, Optional, Inject, HostListener, NgModule, ChangeDetectorRef, DEFAULT_CURRENCY_CODE, ContentChildren, ContentChild, ViewChild, Injector, forwardRef, ChangeDetectionStrategy, ViewChildren, DOCUMENT } from '@angular/core';
6
6
  import { takeUntilDestroyed } from '@angular/core/rxjs-interop';
7
7
  import * as i3 from '@angular/forms';
8
8
  import { Validators, NgControl, FormsModule, ReactiveFormsModule, FormControlDirective, NgModel, FormControlName, FormGroupDirective, NG_VALUE_ACCESSOR, NG_VALIDATORS } from '@angular/forms';
9
- import { filter, of, map, BehaviorSubject, merge, Subject, debounceTime, distinctUntilChanged, switchMap, catchError, Subscription } from 'rxjs';
9
+ import { of, map, BehaviorSubject, firstValueFrom, filter, merge, Subject, debounceTime, distinctUntilChanged, switchMap, catchError, Subscription } from 'rxjs';
10
+ import { HttpClient } from '@angular/common/http';
10
11
  import * as i1$1 from '@angular/cdk/overlay';
11
12
  import { Overlay, OverlayPositionBuilder, OverlayConfig, OverlayRef } from '@angular/cdk/overlay';
12
13
  import { ComponentPortal, TemplatePortal } from '@angular/cdk/portal';
13
14
  import * as i1$2 from '@angular/router';
14
15
  import { Router, NavigationStart, NavigationEnd } from '@angular/router';
15
- import { HttpClient } from '@angular/common/http';
16
16
  import { format, parseISO, addYears, subYears, subMonths, addMonths, getMonth, getYear, startOfWeek, startOfMonth, endOfWeek, endOfMonth, isSameMonth, isBefore, isAfter, isToday, addDays, isWithinInterval, subDays } from 'date-fns';
17
17
  import { coerceBooleanProperty } from '@angular/cdk/coercion';
18
18
  import { getSupportedInputTypes } from '@angular/cdk/platform';
@@ -920,107 +920,6 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
920
920
  type: Input
921
921
  }] } });
922
922
 
923
- /** ************************
924
- * Copyright Monkey Exchange. All Rights Reserved
925
- * This style guide was developed by Monkey Exchange Team
926
- * MIT Licence
927
- ************************* */
928
- class MonkeyDisplayDirective {
929
- constructor() {
930
- this.fallback = input(...(ngDevMode ? [undefined, { debugName: "fallback" }] : []));
931
- this._elementRef = inject(ElementRef);
932
- }
933
- ngAfterViewInit() {
934
- this.checkContent();
935
- }
936
- ngDoCheck() {
937
- this.checkContent();
938
- }
939
- checkContent() {
940
- const text = (this._elementRef.nativeElement.textContent ?? '').trim();
941
- if (!text) {
942
- this._elementRef.nativeElement.innerText = this.fallback();
943
- }
944
- }
945
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDisplayDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
946
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.14", type: MonkeyDisplayDirective, isStandalone: false, selector: "monkey-display", inputs: { fallback: { classPropertyName: "fallback", publicName: "fallback", isSignal: true, isRequired: false, transformFunction: null } }, ngImport: i0 }); }
947
- }
948
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDisplayDirective, decorators: [{
949
- type: Directive,
950
- args: [{
951
- selector: 'monkey-display',
952
- standalone: false
953
- }]
954
- }], propDecorators: { fallback: [{ type: i0.Input, args: [{ isSignal: true, alias: "fallback", required: false }] }] } });
955
-
956
- /** ************************
957
- * Copyright Monkey Exchange. All Rights Reserved
958
- * This style guide was developed by Monkey Exchange Team
959
- * MIT Licence
960
- ************************* */
961
- class MonkeyErrorDirective {
962
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyErrorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
963
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.14", type: MonkeyErrorDirective, isStandalone: false, selector: "monkey-error", ngImport: i0 }); }
964
- }
965
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyErrorDirective, decorators: [{
966
- type: Directive,
967
- args: [{
968
- selector: 'monkey-error',
969
- standalone: false
970
- }]
971
- }] });
972
-
973
- /** ************************
974
- * Copyright Monkey Exchange. All Rights Reserved
975
- * This style guide was developed by Monkey Exchange Team
976
- * MIT Licence
977
- ************************* */
978
- class MonkeyHelperDirective {
979
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyHelperDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
980
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.14", type: MonkeyHelperDirective, isStandalone: false, selector: "monkey-helper", ngImport: i0 }); }
981
- }
982
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyHelperDirective, decorators: [{
983
- type: Directive,
984
- args: [{
985
- selector: 'monkey-helper',
986
- standalone: false
987
- }]
988
- }] });
989
-
990
- /** ************************
991
- * Copyright Monkey Exchange. All Rights Reserved
992
- * This style guide was developed by Monkey Exchange Team
993
- * MIT Licence
994
- ************************* */
995
- class MonkeyInfoDirective {
996
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyInfoDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
997
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.14", type: MonkeyInfoDirective, isStandalone: false, selector: "monkey-info", ngImport: i0 }); }
998
- }
999
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyInfoDirective, decorators: [{
1000
- type: Directive,
1001
- args: [{
1002
- selector: 'monkey-info',
1003
- standalone: false
1004
- }]
1005
- }] });
1006
-
1007
- /** ************************
1008
- * Copyright Monkey Exchange. All Rights Reserved
1009
- * This style guide was developed by Monkey Exchange Team
1010
- * MIT Licence
1011
- ************************* */
1012
- class MonkeyLabelDirective {
1013
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1014
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.14", type: MonkeyLabelDirective, isStandalone: false, selector: "monkey-label", ngImport: i0 }); }
1015
- }
1016
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyLabelDirective, decorators: [{
1017
- type: Directive,
1018
- args: [{
1019
- selector: 'monkey-label',
1020
- standalone: false
1021
- }]
1022
- }] });
1023
-
1024
923
  /** ************************
1025
924
  * Copyright Monkey Exchange. All Rights Reserved
1026
925
  * This style guide was developed by Monkey Exchange Team
@@ -1039,502 +938,468 @@ function injectTokenWithWarning(token, name) {
1039
938
  return value;
1040
939
  }
1041
940
 
1042
- /** ************************
1043
- * Copyright Monkey Exchange. All Rights Reserved
1044
- * This style guide was developed by Monkey Exchange Team
1045
- * MIT Licence
1046
- ************************* */
1047
- class MonkeyPopoverContentComponent {
1048
- constructor(host) {
1049
- this.host = host;
1050
- this.onClose = new EventEmitter();
1051
- this.enableAutofocus = false;
1052
- // not to do
941
+ class MonkeyEcxAddressService {
942
+ constructor() {
943
+ this._http = inject(HttpClient);
944
+ this._googleApiKey = injectTokenWithWarning(MECX_GOOGLE_API_KEY, 'MECX_GOOGLE_API_KEY');
1053
945
  }
1054
- ngAfterViewInit() {
1055
- if (this.enableAutofocus) {
1056
- setTimeout(() => {
1057
- const focusable = this.host.nativeElement.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
1058
- focusable?.focus();
946
+ mappingData(places) {
947
+ const getComponent = (components, type, field = 'longText') => {
948
+ const result = components.find((c) => {
949
+ return c.types.includes(type);
1059
950
  });
1060
- }
951
+ return result?.[field] || '';
952
+ };
953
+ return places.map((_) => {
954
+ const { addressComponents } = _;
955
+ const address = getComponent(addressComponents, 'route');
956
+ const addressNumber = getComponent(addressComponents, 'street_number');
957
+ const neighborhood = getComponent(addressComponents, 'sublocality_level_1');
958
+ const city = getComponent(addressComponents, 'administrative_area_level_2');
959
+ const state = getComponent(addressComponents, 'administrative_area_level_1');
960
+ const country = getComponent(addressComponents, 'country', 'shortText');
961
+ const zipCode = getComponent(addressComponents, 'postal_code');
962
+ return {
963
+ formattedAddress: _.formattedAddress,
964
+ adrFormatAddress: _.adrFormatAddress,
965
+ address,
966
+ addressNumber,
967
+ neighborhood,
968
+ city,
969
+ state,
970
+ country,
971
+ zipCode
972
+ };
973
+ });
1061
974
  }
1062
- isTemplate(value) {
1063
- return value instanceof TemplateRef;
975
+ get(textQuery) {
976
+ if (!textQuery) {
977
+ return of([]);
978
+ }
979
+ return this._http
980
+ .post('https://places.googleapis.com/v1/places:searchText', {
981
+ textQuery
982
+ }, {
983
+ headers: {
984
+ 'X-Goog-Api-Key': this._googleApiKey,
985
+ 'X-Goog-FieldMask': 'places.formattedAddress,places.addressComponents,places.displayName,places.adrFormatAddress'
986
+ }
987
+ })
988
+ .pipe(map((resp) => {
989
+ return this.mappingData(resp.places);
990
+ }));
1064
991
  }
1065
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyPopoverContentComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
1066
- static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", 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], enableAutofocus: "enableAutofocus" }, outputs: { onClose: "onClose" }, ngImport: i0, template: `
1067
- <div class="mecx-popover-container">
1068
- @if (!hideHeader) {
1069
- <div class="mecx-popover-header">
1070
- @if (title) {
1071
- <div>
1072
- <ng-container *ngIf="isTemplate(title); else stringTitle">
1073
- <ng-container *ngTemplateOutlet="title"></ng-container>
1074
- </ng-container>
1075
- <ng-template #stringTitle>
1076
- {{ title }}
1077
- </ng-template>
1078
- </div>
1079
- }
1080
-
1081
- @if (!hideClose) {
1082
- <util-icon class="mecx-popover-close" name="clear" (click)="onClose.next(null)" />
1083
- }
1084
- </div>
1085
- }
1086
-
1087
- <div class="mecx-popover-content" [class.add-radius]="hideHeader">
1088
- <ng-container *ngTemplateOutlet="content"></ng-container>
1089
- </div>
1090
-
1091
- @if (!hideActions) {
1092
- <div class="mecx-popover-actions" *ngIf="actions">
1093
- <ng-container *ngIf="isTemplate(actions); else stringActions">
1094
- <ng-container *ngTemplateOutlet="actions"></ng-container>
1095
- </ng-container>
1096
- <ng-template #stringActions>
1097
- <span>{{ actions }}</span>
1098
- </ng-template>
1099
- </div>
1100
- }
1101
- </div>
1102
- `, 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"] }] }); }
992
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyEcxAddressService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
993
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyEcxAddressService, providedIn: 'root' }); }
1103
994
  }
1104
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyPopoverContentComponent, decorators: [{
1105
- type: Component,
1106
- args: [{
1107
- selector: 'monkey-popover-content',
1108
- imports: [CommonModule, NgTemplateOutlet, UtilIconComponent],
1109
- template: `
1110
- <div class="mecx-popover-container">
1111
- @if (!hideHeader) {
1112
- <div class="mecx-popover-header">
1113
- @if (title) {
1114
- <div>
1115
- <ng-container *ngIf="isTemplate(title); else stringTitle">
1116
- <ng-container *ngTemplateOutlet="title"></ng-container>
1117
- </ng-container>
1118
- <ng-template #stringTitle>
1119
- {{ title }}
1120
- </ng-template>
1121
- </div>
1122
- }
1123
-
1124
- @if (!hideClose) {
1125
- <util-icon class="mecx-popover-close" name="clear" (click)="onClose.next(null)" />
1126
- }
1127
- </div>
1128
- }
1129
-
1130
- <div class="mecx-popover-content" [class.add-radius]="hideHeader">
1131
- <ng-container *ngTemplateOutlet="content"></ng-container>
1132
- </div>
995
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyEcxAddressService, decorators: [{
996
+ type: Injectable,
997
+ args: [{ providedIn: 'root' }]
998
+ }] });
1133
999
 
1134
- @if (!hideActions) {
1135
- <div class="mecx-popover-actions" *ngIf="actions">
1136
- <ng-container *ngIf="isTemplate(actions); else stringActions">
1137
- <ng-container *ngTemplateOutlet="actions"></ng-container>
1138
- </ng-container>
1139
- <ng-template #stringActions>
1140
- <span>{{ actions }}</span>
1141
- </ng-template>
1142
- </div>
1143
- }
1144
- </div>
1145
- `
1146
- }]
1147
- }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { title: [{
1148
- type: Input
1149
- }], content: [{
1150
- type: Input
1151
- }], actions: [{
1152
- type: Input
1153
- }], onClose: [{
1154
- type: Output
1155
- }], hideHeader: [{
1156
- type: Input,
1157
- args: [{ transform: booleanAttribute }]
1158
- }], hideClose: [{
1159
- type: Input,
1160
- args: [{ transform: booleanAttribute }]
1161
- }], hideActions: [{
1162
- type: Input,
1163
- args: [{ transform: booleanAttribute }]
1164
- }], enableAutofocus: [{
1165
- type: Input
1166
- }] } });
1167
- class MonkeyPopoverDirective {
1168
- set popover(show) {
1169
- if (this._show === show) {
1170
- return;
1171
- }
1172
- this._show = show;
1173
- if (show) {
1174
- setTimeout(() => {
1175
- this.createPopover();
1176
- }, 0);
1177
- }
1178
- else {
1179
- this.disposePopover();
1180
- }
1181
- }
1182
- get popover() {
1183
- return this._show;
1184
- }
1185
- set target(value) {
1186
- this._target = value;
1187
- }
1188
- get target() {
1189
- return this._target;
1190
- }
1000
+ /* eslint-disable no-console */
1001
+ /** ************************
1002
+ * Copyright Monkey Exchange. All Rights Reserved
1003
+ * This style guide was developed by Monkey Exchange Team
1004
+ * MIT Licence
1005
+ ************************* */
1006
+ class MonkeyDictionaryService {
1191
1007
  constructor() {
1192
- this._tpl = inject(TemplateRef);
1193
- this._vcr = inject(ViewContainerRef);
1194
- this._el = inject(ElementRef);
1195
- this._zone = inject(NgZone);
1196
- this._overlay = inject(Overlay);
1197
- this._overlayPositionBuilder = inject(OverlayPositionBuilder);
1198
- this._router = inject(Router);
1008
+ this._localeId = inject(LOCALE_ID);
1199
1009
  this._destroyRef = inject(DestroyRef);
1200
- this._show = false;
1201
- this.minwidth = false;
1202
- this.backdrop = true;
1203
- this.watch = false;
1204
- this.dir = 'ltr';
1205
- this.contextmenu = false;
1206
- this._router.events
1207
- .pipe(filter((event) => {
1208
- return event instanceof NavigationStart;
1209
- }), takeUntilDestroyed(this._destroyRef))
1210
- .subscribe(() => {
1211
- this.closePopover();
1010
+ this._data$ = new BehaviorSubject({
1011
+ 'pt-BR': {
1012
+ EDIT: 'Editar',
1013
+ 'NO-RESULTS': 'Nenhum resultado encontrado',
1014
+ 'NO-DATA': 'Sem dados',
1015
+ 'NO-DATA-ADDRESS': 'Nenhum endereço encontrado com esta pesquisa',
1016
+ 'NOT-PROVIDED': 'Não informado',
1017
+ LOADING: 'Carregando...',
1018
+ 'DATE-RANGE': {
1019
+ 'START-DATE': 'Data de início',
1020
+ 'END-DATE': 'Data de término',
1021
+ INVALID: 'Intervalo de datas inválido',
1022
+ ACTIONS: {
1023
+ CANCEL: 'Cancelar',
1024
+ APPLY: 'Aplicar'
1025
+ },
1026
+ 'WEEK-DAYS': ['Dom.', '2ª', '3ª', '4ª', '5ª', '6ª', 'Sab.'],
1027
+ MONTHS: {
1028
+ 0: 'Janeiro',
1029
+ 1: 'Fevereiro',
1030
+ 2: 'Março',
1031
+ 3: 'Abril',
1032
+ 4: 'Maio',
1033
+ 5: 'Junho',
1034
+ 6: 'Julho',
1035
+ 7: 'Agosto',
1036
+ 8: 'Setembro',
1037
+ 9: 'Outubro',
1038
+ 10: 'Novembro',
1039
+ 11: 'Dezembro'
1040
+ },
1041
+ 'QUICK-ACTIONS': {
1042
+ CUSTOM: 'Customizado',
1043
+ LAST_30_DAYS: 'Ultimos 30 dias',
1044
+ LAST_60_DAYS: 'Ultimos 60 dias',
1045
+ LAST_90_DAYS: 'Ultimos 90 dias',
1046
+ LAST_6_MONTHS: 'Ultimos 6 meses',
1047
+ LAST_12_MONTHS: 'Ultimos 12 meses',
1048
+ NEXT_30_DAYS: 'Próximos 30 dias',
1049
+ NEXT_60_DAYS: 'Próximos 60 dias',
1050
+ NEXT_90_DAYS: 'Próximos 90 dias',
1051
+ NEXT_6_MONTHS: 'Próximos 6 meses',
1052
+ NEXT_12_MONTHS: 'Próximos 12 meses'
1053
+ }
1054
+ }
1055
+ },
1056
+ 'es-CL': {
1057
+ EDIT: 'Editar',
1058
+ 'NO-RESULTS': 'No se encontraron resultados',
1059
+ 'NO-DATA': 'Sin datos',
1060
+ 'NO-DATA-ADDRESS': 'No se encontraron direcciones con esta búsqueda',
1061
+ 'NOT-PROVIDED': 'No informado',
1062
+ LOADING: 'Cargando...',
1063
+ 'DATE-RANGE': {
1064
+ 'START-DATE': 'Fecha de inicio',
1065
+ 'END-DATE': 'Fecha de termino',
1066
+ INVALID: 'Rango de fechas no válido',
1067
+ ACTIONS: {
1068
+ CANCEL: 'Cancelar',
1069
+ APPLY: 'Aplicar'
1070
+ },
1071
+ 'WEEK-DAYS': ['Dom.', 'Lun.', 'Mar.', 'Mié.', 'Jue.', 'Vie.', 'Sab.'],
1072
+ MONTHS: {
1073
+ 0: 'Enero',
1074
+ 1: 'Febrero',
1075
+ 2: 'Marzo',
1076
+ 3: 'Abril',
1077
+ 4: 'Mayo',
1078
+ 5: 'Junio',
1079
+ 6: 'Julio',
1080
+ 7: 'Agosto',
1081
+ 8: 'Septiembre',
1082
+ 9: 'Octubre',
1083
+ 10: 'Noviembre',
1084
+ 11: 'Diciembre'
1085
+ },
1086
+ 'QUICK-ACTIONS': {
1087
+ CUSTOM: 'Personalizado',
1088
+ LAST_30_DAYS: 'Últimos 30 días',
1089
+ LAST_60_DAYS: 'Últimos 60 días',
1090
+ LAST_90_DAYS: 'Últimos 90 días',
1091
+ LAST_6_MONTHS: 'Últimos 6 meses',
1092
+ LAST_12_MONTHS: 'Últimos 12 meses',
1093
+ NEXT_30_DAYS: 'Próximos 30 días',
1094
+ NEXT_60_DAYS: 'Próximos 60 días',
1095
+ NEXT_90_DAYS: 'Próximos 90 días',
1096
+ NEXT_6_MONTHS: 'Próximos 6 meses',
1097
+ NEXT_12_MONTHS: 'Próximos 12 meses'
1098
+ }
1099
+ }
1100
+ },
1101
+ 'es-MX': {
1102
+ EDIT: 'Editar',
1103
+ 'NO-RESULTS': 'No se encontraron resultados',
1104
+ 'NO-DATA': 'Sin datos',
1105
+ 'NO-DATA-ADDRESS': 'No se encontraron direcciones con esta búsqueda',
1106
+ 'NOT-PROVIDED': 'No informado',
1107
+ LOADING: 'Cargando...',
1108
+ 'DATE-RANGE': {
1109
+ 'START-DATE': 'Fecha de inicio',
1110
+ 'END-DATE': 'Fecha de termino',
1111
+ INVALID: 'Rango de fechas no válido',
1112
+ ACTIONS: {
1113
+ CANCEL: 'Cancelar',
1114
+ APPLY: 'Aplicar'
1115
+ },
1116
+ 'WEEK-DAYS': ['Dom.', 'Lun.', 'Mar.', 'Mié.', 'Jue.', 'Vie.', 'Sab.'],
1117
+ MONTHS: {
1118
+ 0: 'Enero',
1119
+ 1: 'Febrero',
1120
+ 2: 'Marzo',
1121
+ 3: 'Abril',
1122
+ 4: 'Mayo',
1123
+ 5: 'Junio',
1124
+ 6: 'Julio',
1125
+ 7: 'Agosto',
1126
+ 8: 'Septiembre',
1127
+ 9: 'Octubre',
1128
+ 10: 'Noviembre',
1129
+ 11: 'Diciembre'
1130
+ },
1131
+ 'QUICK-ACTIONS': {
1132
+ CUSTOM: 'Personalizado',
1133
+ LAST_30_DAYS: 'Últimos 30 días',
1134
+ LAST_60_DAYS: 'Últimos 60 días',
1135
+ LAST_90_DAYS: 'Últimos 90 días',
1136
+ LAST_6_MONTHS: 'Últimos 6 meses',
1137
+ LAST_12_MONTHS: 'Últimos 12 meses',
1138
+ NEXT_30_DAYS: 'Próximos 30 días',
1139
+ NEXT_60_DAYS: 'Próximos 60 días',
1140
+ NEXT_90_DAYS: 'Próximos 90 días',
1141
+ NEXT_6_MONTHS: 'Próximos 6 meses',
1142
+ NEXT_12_MONTHS: 'Próximos 12 meses'
1143
+ }
1144
+ }
1145
+ },
1146
+ 'en-US': {
1147
+ EDIT: 'Edit',
1148
+ 'NO-RESULTS': 'No results found',
1149
+ 'NO-DATA': 'No data',
1150
+ 'NO-DATA-ADDRESS': 'No address found with this search',
1151
+ 'NOT-PROVIDED': 'Not provided',
1152
+ LOADING: 'Loading...',
1153
+ 'DATE-RANGE': {
1154
+ 'START-DATE': 'Start date',
1155
+ 'END-DATE': 'End Date',
1156
+ INVALID: 'Invalid date range',
1157
+ ACTIONS: {
1158
+ CANCEL: 'Cancel',
1159
+ APPLY: 'Apply'
1160
+ },
1161
+ 'WEEK-DAYS': ['Sun.', 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.', 'Sat.'],
1162
+ MONTHS: {
1163
+ 0: 'January',
1164
+ 1: 'February',
1165
+ 2: 'March',
1166
+ 3: 'April',
1167
+ 4: 'May',
1168
+ 5: 'June',
1169
+ 6: 'July',
1170
+ 7: 'August',
1171
+ 8: 'September',
1172
+ 9: 'October',
1173
+ 10: 'November',
1174
+ 11: 'December'
1175
+ },
1176
+ 'QUICK-ACTIONS': {
1177
+ CUSTOM: 'Custom',
1178
+ LAST_30_DAYS: 'Last 30 days',
1179
+ LAST_60_DAYS: 'Last 60 days',
1180
+ LAST_90_DAYS: 'Last 90 days',
1181
+ LAST_6_MONTHS: 'Last 6 months',
1182
+ LAST_12_MONTHS: 'Last 12 months',
1183
+ NEXT_30_DAYS: 'Next 30 days',
1184
+ NEXT_60_DAYS: 'Next 60 days',
1185
+ NEXT_90_DAYS: 'Next 90 days',
1186
+ NEXT_6_MONTHS: 'Next 6 months',
1187
+ NEXT_12_MONTHS: 'Next 12 months'
1188
+ }
1189
+ }
1190
+ }
1191
+ });
1192
+ const tokenSubject = inject(MECX_I18N_WRAPPER, { optional: true });
1193
+ tokenSubject?.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((value) => {
1194
+ this.handleWrapperValues(value);
1212
1195
  });
1213
1196
  }
1214
- ngOnDestroy() {
1215
- this.disposePopover();
1216
- this._resizeObserver?.disconnect();
1217
- }
1218
- closePopover(event) {
1219
- if (this._show) {
1220
- this._show = false;
1221
- this.disposePopover();
1222
- this._zone.run(() => {
1223
- this.closed?.(event);
1224
- });
1225
- }
1226
- }
1227
- disposePopover() {
1228
- this._resizeObserver?.disconnect();
1229
- this._resizeObserver = undefined;
1230
- if (this._overlayRef) {
1231
- this._overlayRef.dispose();
1232
- this._overlayRef = undefined;
1233
- }
1234
- }
1235
- getPositions(dir) {
1236
- const oppositeVertical = {
1237
- top: 'bottom',
1238
- bottom: 'top',
1239
- center: 'center'
1240
- };
1241
- const oppositeHorizontal = {
1242
- start: 'end',
1243
- end: 'start',
1244
- center: 'center'
1245
- };
1246
- const centerY = (pos) => {
1247
- return {
1248
- originX: 'center',
1249
- originY: pos,
1250
- overlayX: 'center',
1251
- overlayY: oppositeVertical[pos]
1252
- };
1253
- };
1254
- const centerX = (pos) => {
1255
- return {
1256
- originX: oppositeHorizontal[pos],
1257
- originY: 'center',
1258
- overlayX: pos,
1259
- overlayY: 'center'
1260
- };
1261
- };
1262
- const ltr = (axis) => {
1263
- return {
1264
- originX: 'start',
1265
- originY: axis,
1266
- overlayX: 'start',
1267
- overlayY: oppositeVertical[axis]
1268
- };
1269
- };
1270
- const rtl = (axis) => {
1271
- return {
1272
- originX: 'end',
1273
- originY: axis,
1274
- overlayX: 'end',
1275
- overlayY: oppositeVertical[axis]
1276
- };
1277
- };
1278
- const side = (axisX, axisY) => {
1279
- return {
1280
- originX: axisX,
1281
- originY: axisY,
1282
- overlayX: oppositeHorizontal[axisX],
1283
- overlayY: axisY
1197
+ handleWrapperValues(value) {
1198
+ try {
1199
+ const locale = this._localeId || 'pt-BR';
1200
+ const wrappedData = JSON.parse(value);
1201
+ const currentData = this._data$.value;
1202
+ const updated = {
1203
+ ...currentData,
1204
+ [locale]: {
1205
+ ...currentData[locale],
1206
+ ...wrappedData
1207
+ }
1284
1208
  };
1285
- };
1286
- const cmp = dir ?? this._options?.dir ?? this.dir;
1287
- switch (cmp) {
1288
- case 'ct':
1289
- return [centerY('top'), centerY('bottom'), centerX('start'), centerX('end')];
1290
- case 'cr':
1291
- return [centerX('end'), centerX('start'), centerY('top'), centerY('bottom')];
1292
- case 'cc':
1293
- return [centerX('center')];
1294
- case 'ltr':
1295
- return [ltr('bottom'), ltr('top')];
1296
- case 'rtl':
1297
- return [rtl('bottom'), rtl('top')];
1298
- case 'tltr':
1299
- return [ltr('top'), ltr('bottom')];
1300
- case 'trtl':
1301
- return [rtl('top'), rtl('bottom')];
1302
- case 'rt':
1303
- return [side('end', 'top'), side('end', 'bottom'), ltr('top')];
1304
- case 'rb':
1305
- return [side('end', 'bottom'), side('end', 'top'), ltr('bottom'), rtl('bottom')];
1306
- case 'lt':
1307
- return [side('start', 'top'), side('start', 'bottom'), rtl('top')];
1308
- case 'lb':
1309
- return [side('start', 'bottom'), side('start', 'top'), rtl('bottom')];
1310
- default:
1311
- return [];
1209
+ this._data$.next(updated);
1312
1210
  }
1313
- }
1314
- createPopover(origin, options) {
1315
- if (!this.target) {
1211
+ catch (e) {
1316
1212
  // eslint-disable-next-line no-console
1317
- console.error('MonkeyPopoverDirective -> target element is not defined.');
1318
- return;
1319
- }
1320
- const originEl = this.target instanceof HTMLElement ? this.target : this.target.element;
1321
- this._positionStrategy = this._overlayPositionBuilder
1322
- .flexibleConnectedTo(origin ?? originEl)
1323
- .withPush(true)
1324
- .withGrowAfterOpen(true)
1325
- .withPositions(this.getPositions(options?.dir));
1326
- this._overlayRef = this._overlay.create({
1327
- positionStrategy: this._positionStrategy,
1328
- disposeOnNavigation: true,
1329
- direction: 'ltr',
1330
- hasBackdrop: this.backdrop,
1331
- scrollStrategy: this._overlay.scrollStrategies.reposition(),
1332
- backdropClass: 'cdk-overlay-transparent-backdrop',
1333
- width: this._options?.minwidth || this.minwidth ? this.target.offsetWidth - 2 : undefined,
1334
- maxHeight: '95%',
1335
- height: this.height
1336
- });
1337
- this._overlayRef
1338
- .backdropClick()
1339
- .pipe(takeUntilDestroyed(this._destroyRef))
1340
- .subscribe((event) => {
1341
- this.closePopover(event);
1342
- });
1343
- const portal = new ComponentPortal(MonkeyPopoverContentComponent, this._vcr);
1344
- this._componentRef = this._overlayRef.attach(portal);
1345
- this._componentRef.instance.content = this._tpl;
1346
- this._componentRef.instance.title = this.title;
1347
- this._componentRef.instance.actions = this.actions;
1348
- this._componentRef.instance.hideClose = this.hideClose;
1349
- this._componentRef.instance.hideHeader = this.hideHeader;
1350
- this._componentRef.instance.hideActions = this.hideActions;
1351
- this._componentRef.instance.enableAutofocus = this.enableAutofocus;
1352
- if (!this.hideClose || !this.hideHeader) {
1353
- this._componentRef.instance.onClose
1354
- .pipe(takeUntilDestroyed(this._destroyRef))
1355
- .subscribe(() => {
1356
- this.closePopover();
1357
- });
1358
- }
1359
- if (this.watch && 'ResizeObserver' in window) {
1360
- this._resizeObserver = new ResizeObserver(() => {
1361
- this._overlayRef?.updatePosition();
1362
- });
1363
- this._resizeObserver.observe(this._componentRef.location.nativeElement);
1213
+ console.error(`MonkeyDictionaryService - handleWrapperValues -> ${e}`);
1364
1214
  }
1365
1215
  }
1366
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyPopoverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1367
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.14", type: MonkeyPopoverDirective, isStandalone: false, 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], enableAutofocus: ["monkeyPopoverEnableAutofocus", "enableAutofocus", booleanAttribute] }, ngImport: i0 }); }
1216
+ get(key) {
1217
+ const locale = this._localeId || 'pt-BR';
1218
+ return this._data$.pipe(map((data) => {
1219
+ return data[locale]?.[key] ?? null;
1220
+ }));
1221
+ }
1222
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDictionaryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1223
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDictionaryService, providedIn: 'root' }); }
1368
1224
  }
1369
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyPopoverDirective, decorators: [{
1370
- type: Directive,
1225
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDictionaryService, decorators: [{
1226
+ type: Injectable,
1371
1227
  args: [{
1372
- selector: '[monkeyPopover]',
1373
- standalone: false
1228
+ providedIn: 'root'
1374
1229
  }]
1375
- }], ctorParameters: () => [], propDecorators: { _options: [{
1376
- type: Optional
1377
- }, {
1378
- type: Inject,
1379
- args: [MECX_POPOVER_OPTIONS]
1380
- }], popover: [{
1381
- type: Input,
1382
- args: ['monkeyPopover']
1383
- }], closed: [{
1384
- type: Input,
1385
- args: ['monkeyPopoverClosed']
1386
- }], target: [{
1387
- type: Input,
1388
- args: ['monkeyPopoverTarget']
1389
- }], minwidth: [{
1390
- type: Input,
1391
- args: ['monkeyPopoverMinwidth']
1392
- }], backdrop: [{
1393
- type: Input,
1394
- args: ['monkeyPopoverBackdrop']
1395
- }], watch: [{
1396
- type: Input,
1397
- args: ['monkeyPopoverWatch']
1398
- }], dir: [{
1399
- type: Input,
1400
- args: ['monkeyPopoverDir']
1401
- }], contextmenu: [{
1402
- type: Input,
1403
- args: ['monkeyPopoverContextmenu']
1404
- }], height: [{
1405
- type: Input,
1406
- args: ['monkeyPopoverHeight']
1407
- }], title: [{
1408
- type: Input,
1409
- args: ['monkeyPopoverTitle']
1410
- }], actions: [{
1411
- type: Input,
1412
- args: ['monkeyPopoverActions']
1413
- }], hideClose: [{
1414
- type: Input,
1415
- args: [{ alias: 'monkeyPopoverHideClose', transform: booleanAttribute }]
1416
- }], hideHeader: [{
1417
- type: Input,
1418
- args: [{ alias: 'monkeyPopoverHideHeader', transform: booleanAttribute }]
1419
- }], hideActions: [{
1420
- type: Input,
1421
- args: [{ alias: 'monkeyPopoverHideActions', transform: booleanAttribute }]
1422
- }], enableAutofocus: [{
1423
- type: Input,
1424
- args: [{ alias: 'monkeyPopoverEnableAutofocus', transform: booleanAttribute }]
1425
- }] } });
1230
+ }], ctorParameters: () => [] });
1426
1231
 
1427
1232
  /** ************************
1428
1233
  * Copyright Monkey Exchange. All Rights Reserved
1429
1234
  * This style guide was developed by Monkey Exchange Team
1430
1235
  * MIT Licence
1431
1236
  ************************* */
1432
- class MonkeyPrefixDirective {
1433
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyPrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1434
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.14", type: MonkeyPrefixDirective, isStandalone: false, selector: "monkey-prefix", ngImport: i0 }); }
1237
+ class MonkeyStepperService {
1238
+ constructor() {
1239
+ this._steppers = signal(new Map(), ...(ngDevMode ? [{ debugName: "_steppers" }] : []));
1240
+ }
1241
+ currentStep(id) {
1242
+ return computed(() => {
1243
+ return this._steppers().get(id);
1244
+ });
1245
+ }
1246
+ setCurrentStep(id, step) {
1247
+ this._steppers.update((items) => {
1248
+ return new Map(items).set(id, step);
1249
+ });
1250
+ }
1251
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyStepperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1252
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyStepperService, providedIn: 'root' }); }
1435
1253
  }
1436
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyPrefixDirective, decorators: [{
1437
- type: Directive,
1254
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyStepperService, decorators: [{
1255
+ type: Injectable,
1438
1256
  args: [{
1439
- selector: 'monkey-prefix',
1440
- standalone: false
1257
+ providedIn: 'root'
1441
1258
  }]
1442
1259
  }] });
1443
1260
 
1261
+ class MonkeyToastRef {
1262
+ constructor(componentRef) {
1263
+ this.componentRef = componentRef;
1264
+ // not to do
1265
+ }
1266
+ close() {
1267
+ this.componentRef.instance.close();
1268
+ }
1269
+ }
1270
+
1444
1271
  /** ************************
1445
1272
  * Copyright Monkey Exchange. All Rights Reserved
1446
1273
  * This style guide was developed by Monkey Exchange Team
1447
1274
  * MIT Licence
1448
1275
  ************************* */
1449
- class MonkeySuffixDirective {
1450
- constructor() {
1451
- this.hasAction = false;
1452
- this.action = null;
1276
+
1277
+ /** ************************
1278
+ * Copyright Monkey Exchange. All Rights Reserved
1279
+ * This style guide was developed by Monkey Exchange Team
1280
+ * MIT Licence
1281
+ ************************* */
1282
+ class MonkeyToastService {
1283
+ constructor() {
1284
+ this.overlay = inject(Overlay);
1453
1285
  }
1454
- set _hasAction(value) {
1455
- this.hasAction = true;
1286
+ getPositionStrategy(position) {
1287
+ const globalPosition = this.overlay.position().global();
1288
+ switch (position) {
1289
+ case 'top-left':
1290
+ return globalPosition.top('40px').start('40px');
1291
+ case 'top-center':
1292
+ return globalPosition.top('40px').centerHorizontally();
1293
+ case 'top-right':
1294
+ return globalPosition.top('40px').end('40px');
1295
+ case 'bottom-left':
1296
+ return globalPosition.bottom('40px').start('40px');
1297
+ case 'bottom-center':
1298
+ return globalPosition.bottom('40px').centerHorizontally();
1299
+ default:
1300
+ return globalPosition.bottom('40px').end('40px');
1301
+ }
1456
1302
  }
1457
- onClick(event) {
1458
- if (!this.action) {
1459
- event.preventDefault();
1460
- event.stopPropagation();
1303
+ show(toastConfig) {
1304
+ if (this.lastToast) {
1305
+ this.lastToast.close();
1461
1306
  }
1462
- else {
1463
- this.action(event);
1307
+ const overlayRef = this.overlay.create({
1308
+ hasBackdrop: false,
1309
+ positionStrategy: this.getPositionStrategy(toastConfig.position)
1310
+ });
1311
+ const portal = new ComponentPortal(MonkeyToastComponent);
1312
+ const componentRef = overlayRef.attach(portal);
1313
+ this.lastToast = new MonkeyToastRef(componentRef);
1314
+ componentRef.instance.id = getRandomString(6);
1315
+ componentRef.instance.type = toastConfig.type ?? 'default';
1316
+ componentRef.instance.icon = toastConfig.icon;
1317
+ componentRef.instance.isClosable = toastConfig.isClosable ?? false;
1318
+ componentRef.instance.message = toastConfig.message;
1319
+ componentRef.instance.actionLabel = toastConfig.actionLabel;
1320
+ componentRef.instance.actionIcon = toastConfig.actionIcon;
1321
+ componentRef.instance.onActionClick.subscribe(() => {
1322
+ if (toastConfig.action) {
1323
+ toastConfig.action();
1324
+ if (toastConfig.closeOnAction ?? true) {
1325
+ componentRef.instance.close();
1326
+ }
1327
+ }
1328
+ });
1329
+ componentRef.instance.onClose.subscribe(() => {
1330
+ overlayRef.detach();
1331
+ });
1332
+ if (!toastConfig.keepOpen) {
1333
+ setTimeout(() => {
1334
+ componentRef.instance.close();
1335
+ }, toastConfig.duration ?? 4000);
1464
1336
  }
1337
+ return componentRef.instance;
1465
1338
  }
1466
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeySuffixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1467
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.14", type: MonkeySuffixDirective, isStandalone: false, selector: "monkey-suffix", inputs: { _hasAction: ["hasAction", "_hasAction"] }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.has-action": "hasAction" } }, ngImport: i0 }); }
1339
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyToastService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1340
+ static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyToastService, providedIn: 'root' }); }
1468
1341
  }
1469
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeySuffixDirective, decorators: [{
1342
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyToastService, decorators: [{
1343
+ type: Injectable,
1344
+ args: [{
1345
+ providedIn: 'root'
1346
+ }]
1347
+ }] });
1348
+
1349
+ /** ************************
1350
+ * Copyright Monkey Exchange. All Rights Reserved
1351
+ * This style guide was developed by Monkey Exchange Team
1352
+ * MIT Licence
1353
+ ************************* */
1354
+
1355
+ /** ************************
1356
+ * Copyright Monkey Exchange. All Rights Reserved
1357
+ * This style guide was developed by Monkey Exchange Team
1358
+ * MIT Licence
1359
+ ************************* */
1360
+ class MonkeyDisplayDirective {
1361
+ constructor(el) {
1362
+ this.el = el;
1363
+ this.fallbackText = 'Not provided';
1364
+ this.i18nDictionary = inject(MonkeyDictionaryService).get('NOT-PROVIDED');
1365
+ this.displayValue = input.required(...(ngDevMode ? [{ debugName: "displayValue" }] : []));
1366
+ this.displayedText = computed(() => {
1367
+ const value = this.displayValue();
1368
+ if (value === null || value === undefined || value === '') {
1369
+ return this.fallbackText;
1370
+ }
1371
+ return String(value);
1372
+ }, ...(ngDevMode ? [{ debugName: "displayedText" }] : []));
1373
+ effect(async () => {
1374
+ this.el.nativeElement.textContent = this.displayedText();
1375
+ this.fallbackText = await firstValueFrom(this.i18nDictionary);
1376
+ });
1377
+ }
1378
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDisplayDirective, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Directive }); }
1379
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "17.1.0", version: "20.3.14", type: MonkeyDisplayDirective, isStandalone: false, selector: "monkey-display", inputs: { displayValue: { classPropertyName: "displayValue", publicName: "displayValue", isSignal: true, isRequired: true, transformFunction: null } }, ngImport: i0 }); }
1380
+ }
1381
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDisplayDirective, decorators: [{
1470
1382
  type: Directive,
1471
1383
  args: [{
1472
- selector: 'monkey-suffix',
1473
- host: {
1474
- '[class.has-action]': 'hasAction'
1475
- },
1384
+ selector: 'monkey-display',
1476
1385
  standalone: false
1477
1386
  }]
1478
- }], propDecorators: { _hasAction: [{
1479
- type: Input,
1480
- args: ['hasAction']
1481
- }], onClick: [{
1482
- type: HostListener,
1483
- args: ['click', ['$event']]
1484
- }] } });
1387
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { displayValue: [{ type: i0.Input, args: [{ isSignal: true, alias: "displayValue", required: true }] }] } });
1485
1388
 
1486
1389
  /** ************************
1487
1390
  * Copyright Monkey Exchange. All Rights Reserved
1488
1391
  * This style guide was developed by Monkey Exchange Team
1489
1392
  * MIT Licence
1490
1393
  ************************* */
1491
- class MonkeyDirectivesModule {
1492
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1493
- static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDirectivesModule, declarations: [MonkeyErrorDirective,
1494
- MonkeyHelperDirective,
1495
- MonkeyInfoDirective,
1496
- MonkeyLabelDirective,
1497
- MonkeyDisplayDirective,
1498
- MonkeyPrefixDirective,
1499
- MonkeySuffixDirective,
1500
- MonkeyBadgeDirective,
1501
- MonkeyPopoverDirective], imports: [MonkeyPopoverContentComponent], exports: [MonkeyErrorDirective,
1502
- MonkeyHelperDirective,
1503
- MonkeyInfoDirective,
1504
- MonkeyLabelDirective,
1505
- MonkeyDisplayDirective,
1506
- MonkeyPrefixDirective,
1507
- MonkeySuffixDirective,
1508
- MonkeyBadgeDirective,
1509
- MonkeyPopoverDirective] }); }
1510
- static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDirectivesModule, imports: [MonkeyPopoverContentComponent] }); }
1394
+ class MonkeyErrorDirective {
1395
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyErrorDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1396
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.14", type: MonkeyErrorDirective, isStandalone: false, selector: "monkey-error", ngImport: i0 }); }
1511
1397
  }
1512
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDirectivesModule, decorators: [{
1513
- type: NgModule,
1398
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyErrorDirective, decorators: [{
1399
+ type: Directive,
1514
1400
  args: [{
1515
- imports: [MonkeyPopoverContentComponent],
1516
- declarations: [
1517
- MonkeyErrorDirective,
1518
- MonkeyHelperDirective,
1519
- MonkeyInfoDirective,
1520
- MonkeyLabelDirective,
1521
- MonkeyDisplayDirective,
1522
- MonkeyPrefixDirective,
1523
- MonkeySuffixDirective,
1524
- MonkeyBadgeDirective,
1525
- MonkeyPopoverDirective
1526
- ],
1527
- exports: [
1528
- MonkeyErrorDirective,
1529
- MonkeyHelperDirective,
1530
- MonkeyInfoDirective,
1531
- MonkeyLabelDirective,
1532
- MonkeyDisplayDirective,
1533
- MonkeyPrefixDirective,
1534
- MonkeySuffixDirective,
1535
- MonkeyBadgeDirective,
1536
- MonkeyPopoverDirective
1537
- ]
1401
+ selector: 'monkey-error',
1402
+ standalone: false
1538
1403
  }]
1539
1404
  }] });
1540
1405
 
@@ -1543,412 +1408,548 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
1543
1408
  * This style guide was developed by Monkey Exchange Team
1544
1409
  * MIT Licence
1545
1410
  ************************* */
1411
+ class MonkeyHelperDirective {
1412
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyHelperDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1413
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.14", type: MonkeyHelperDirective, isStandalone: false, selector: "monkey-helper", ngImport: i0 }); }
1414
+ }
1415
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyHelperDirective, decorators: [{
1416
+ type: Directive,
1417
+ args: [{
1418
+ selector: 'monkey-helper',
1419
+ standalone: false
1420
+ }]
1421
+ }] });
1546
1422
 
1547
- class MonkeyEcxAddressService {
1548
- constructor() {
1549
- this._http = inject(HttpClient);
1550
- this._googleApiKey = injectTokenWithWarning(MECX_GOOGLE_API_KEY, 'MECX_GOOGLE_API_KEY');
1551
- }
1552
- mappingData(places) {
1553
- const getComponent = (components, type, field = 'longText') => {
1554
- const result = components.find((c) => {
1555
- return c.types.includes(type);
1556
- });
1557
- return result?.[field] || '';
1558
- };
1559
- return places.map((_) => {
1560
- const { addressComponents } = _;
1561
- const address = getComponent(addressComponents, 'route');
1562
- const addressNumber = getComponent(addressComponents, 'street_number');
1563
- const neighborhood = getComponent(addressComponents, 'sublocality_level_1');
1564
- const city = getComponent(addressComponents, 'administrative_area_level_2');
1565
- const state = getComponent(addressComponents, 'administrative_area_level_1');
1566
- const country = getComponent(addressComponents, 'country', 'shortText');
1567
- const zipCode = getComponent(addressComponents, 'postal_code');
1568
- return {
1569
- formattedAddress: _.formattedAddress,
1570
- adrFormatAddress: _.adrFormatAddress,
1571
- address,
1572
- addressNumber,
1573
- neighborhood,
1574
- city,
1575
- state,
1576
- country,
1577
- zipCode
1578
- };
1579
- });
1580
- }
1581
- get(textQuery) {
1582
- if (!textQuery) {
1583
- return of([]);
1584
- }
1585
- return this._http
1586
- .post('https://places.googleapis.com/v1/places:searchText', {
1587
- textQuery
1588
- }, {
1589
- headers: {
1590
- 'X-Goog-Api-Key': this._googleApiKey,
1591
- 'X-Goog-FieldMask': 'places.formattedAddress,places.addressComponents,places.displayName,places.adrFormatAddress'
1592
- }
1593
- })
1594
- .pipe(map((resp) => {
1595
- return this.mappingData(resp.places);
1596
- }));
1597
- }
1598
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyEcxAddressService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1599
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyEcxAddressService, providedIn: 'root' }); }
1423
+ /** ************************
1424
+ * Copyright Monkey Exchange. All Rights Reserved
1425
+ * This style guide was developed by Monkey Exchange Team
1426
+ * MIT Licence
1427
+ ************************* */
1428
+ class MonkeyInfoDirective {
1429
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyInfoDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1430
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.14", type: MonkeyInfoDirective, isStandalone: false, selector: "monkey-info", ngImport: i0 }); }
1600
1431
  }
1601
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyEcxAddressService, decorators: [{
1602
- type: Injectable,
1603
- args: [{ providedIn: 'root' }]
1432
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyInfoDirective, decorators: [{
1433
+ type: Directive,
1434
+ args: [{
1435
+ selector: 'monkey-info',
1436
+ standalone: false
1437
+ }]
1604
1438
  }] });
1605
1439
 
1606
- /* eslint-disable no-console */
1607
1440
  /** ************************
1608
1441
  * Copyright Monkey Exchange. All Rights Reserved
1609
1442
  * This style guide was developed by Monkey Exchange Team
1610
1443
  * MIT Licence
1611
1444
  ************************* */
1612
- class MonkeyDictionaryService {
1613
- constructor() {
1614
- this._localeId = inject(LOCALE_ID);
1615
- this._destroyRef = inject(DestroyRef);
1616
- this._data$ = new BehaviorSubject({
1617
- 'pt-BR': {
1618
- EDIT: 'Editar',
1619
- 'NO-RESULTS': 'Nenhum resultado encontrado',
1620
- 'NO-DATA': 'Sem dados',
1621
- 'NO-DATA-ADDRESS': 'Nenhum endereço encontrado com esta pesquisa',
1622
- 'NOT-PROVIDED': 'Não informado',
1623
- LOADING: 'Carregando...',
1624
- 'DATE-RANGE': {
1625
- 'START-DATE': 'Data de início',
1626
- 'END-DATE': 'Data de término',
1627
- INVALID: 'Intervalo de datas inválido',
1628
- ACTIONS: {
1629
- CANCEL: 'Cancelar',
1630
- APPLY: 'Aplicar'
1631
- },
1632
- 'WEEK-DAYS': ['Dom.', '2ª', '3ª', '4ª', '5ª', '6ª', 'Sab.'],
1633
- MONTHS: {
1634
- 0: 'Janeiro',
1635
- 1: 'Fevereiro',
1636
- 2: 'Março',
1637
- 3: 'Abril',
1638
- 4: 'Maio',
1639
- 5: 'Junho',
1640
- 6: 'Julho',
1641
- 7: 'Agosto',
1642
- 8: 'Setembro',
1643
- 9: 'Outubro',
1644
- 10: 'Novembro',
1645
- 11: 'Dezembro'
1646
- },
1647
- 'QUICK-ACTIONS': {
1648
- CUSTOM: 'Customizado',
1649
- LAST_30_DAYS: 'Ultimos 30 dias',
1650
- LAST_60_DAYS: 'Ultimos 60 dias',
1651
- LAST_90_DAYS: 'Ultimos 90 dias',
1652
- LAST_6_MONTHS: 'Ultimos 6 meses',
1653
- LAST_12_MONTHS: 'Ultimos 12 meses',
1654
- NEXT_30_DAYS: 'Próximos 30 dias',
1655
- NEXT_60_DAYS: 'Próximos 60 dias',
1656
- NEXT_90_DAYS: 'Próximos 90 dias',
1657
- NEXT_6_MONTHS: 'Próximos 6 meses',
1658
- NEXT_12_MONTHS: 'Próximos 12 meses'
1659
- }
1660
- }
1661
- },
1662
- 'es-CL': {
1663
- EDIT: 'Editar',
1664
- 'NO-RESULTS': 'No se encontraron resultados',
1665
- 'NO-DATA': 'Sin datos',
1666
- 'NO-DATA-ADDRESS': 'No se encontraron direcciones con esta búsqueda',
1667
- 'NOT-PROVIDED': 'No informado',
1668
- LOADING: 'Cargando...',
1669
- 'DATE-RANGE': {
1670
- 'START-DATE': 'Fecha de inicio',
1671
- 'END-DATE': 'Fecha de termino',
1672
- INVALID: 'Rango de fechas no válido',
1673
- ACTIONS: {
1674
- CANCEL: 'Cancelar',
1675
- APPLY: 'Aplicar'
1676
- },
1677
- 'WEEK-DAYS': ['Dom.', 'Lun.', 'Mar.', 'Mié.', 'Jue.', 'Vie.', 'Sab.'],
1678
- MONTHS: {
1679
- 0: 'Enero',
1680
- 1: 'Febrero',
1681
- 2: 'Marzo',
1682
- 3: 'Abril',
1683
- 4: 'Mayo',
1684
- 5: 'Junio',
1685
- 6: 'Julio',
1686
- 7: 'Agosto',
1687
- 8: 'Septiembre',
1688
- 9: 'Octubre',
1689
- 10: 'Noviembre',
1690
- 11: 'Diciembre'
1691
- },
1692
- 'QUICK-ACTIONS': {
1693
- CUSTOM: 'Personalizado',
1694
- LAST_30_DAYS: 'Últimos 30 días',
1695
- LAST_60_DAYS: 'Últimos 60 días',
1696
- LAST_90_DAYS: 'Últimos 90 días',
1697
- LAST_6_MONTHS: 'Últimos 6 meses',
1698
- LAST_12_MONTHS: 'Últimos 12 meses',
1699
- NEXT_30_DAYS: 'Próximos 30 días',
1700
- NEXT_60_DAYS: 'Próximos 60 días',
1701
- NEXT_90_DAYS: 'Próximos 90 días',
1702
- NEXT_6_MONTHS: 'Próximos 6 meses',
1703
- NEXT_12_MONTHS: 'Próximos 12 meses'
1704
- }
1705
- }
1706
- },
1707
- 'es-MX': {
1708
- EDIT: 'Editar',
1709
- 'NO-RESULTS': 'No se encontraron resultados',
1710
- 'NO-DATA': 'Sin datos',
1711
- 'NO-DATA-ADDRESS': 'No se encontraron direcciones con esta búsqueda',
1712
- 'NOT-PROVIDED': 'No informado',
1713
- LOADING: 'Cargando...',
1714
- 'DATE-RANGE': {
1715
- 'START-DATE': 'Fecha de inicio',
1716
- 'END-DATE': 'Fecha de termino',
1717
- INVALID: 'Rango de fechas no válido',
1718
- ACTIONS: {
1719
- CANCEL: 'Cancelar',
1720
- APPLY: 'Aplicar'
1721
- },
1722
- 'WEEK-DAYS': ['Dom.', 'Lun.', 'Mar.', 'Mié.', 'Jue.', 'Vie.', 'Sab.'],
1723
- MONTHS: {
1724
- 0: 'Enero',
1725
- 1: 'Febrero',
1726
- 2: 'Marzo',
1727
- 3: 'Abril',
1728
- 4: 'Mayo',
1729
- 5: 'Junio',
1730
- 6: 'Julio',
1731
- 7: 'Agosto',
1732
- 8: 'Septiembre',
1733
- 9: 'Octubre',
1734
- 10: 'Noviembre',
1735
- 11: 'Diciembre'
1736
- },
1737
- 'QUICK-ACTIONS': {
1738
- CUSTOM: 'Personalizado',
1739
- LAST_30_DAYS: 'Últimos 30 días',
1740
- LAST_60_DAYS: 'Últimos 60 días',
1741
- LAST_90_DAYS: 'Últimos 90 días',
1742
- LAST_6_MONTHS: 'Últimos 6 meses',
1743
- LAST_12_MONTHS: 'Últimos 12 meses',
1744
- NEXT_30_DAYS: 'Próximos 30 días',
1745
- NEXT_60_DAYS: 'Próximos 60 días',
1746
- NEXT_90_DAYS: 'Próximos 90 días',
1747
- NEXT_6_MONTHS: 'Próximos 6 meses',
1748
- NEXT_12_MONTHS: 'Próximos 12 meses'
1749
- }
1750
- }
1751
- },
1752
- 'en-US': {
1753
- EDIT: 'Edit',
1754
- 'NO-RESULTS': 'No results found',
1755
- 'NO-DATA': 'No data',
1756
- 'NO-DATA-ADDRESS': 'No address found with this search',
1757
- 'NOT-PROVIDED': 'Not provided',
1758
- LOADING: 'Loading...',
1759
- 'DATE-RANGE': {
1760
- 'START-DATE': 'Start date',
1761
- 'END-DATE': 'End Date',
1762
- INVALID: 'Invalid date range',
1763
- ACTIONS: {
1764
- CANCEL: 'Cancel',
1765
- APPLY: 'Apply'
1766
- },
1767
- 'WEEK-DAYS': ['Sun.', 'Mon.', 'Tue.', 'Wed.', 'Thu.', 'Fri.', 'Sat.'],
1768
- MONTHS: {
1769
- 0: 'January',
1770
- 1: 'February',
1771
- 2: 'March',
1772
- 3: 'April',
1773
- 4: 'May',
1774
- 5: 'June',
1775
- 6: 'July',
1776
- 7: 'August',
1777
- 8: 'September',
1778
- 9: 'October',
1779
- 10: 'November',
1780
- 11: 'December'
1781
- },
1782
- 'QUICK-ACTIONS': {
1783
- CUSTOM: 'Custom',
1784
- LAST_30_DAYS: 'Last 30 days',
1785
- LAST_60_DAYS: 'Last 60 days',
1786
- LAST_90_DAYS: 'Last 90 days',
1787
- LAST_6_MONTHS: 'Last 6 months',
1788
- LAST_12_MONTHS: 'Last 12 months',
1789
- NEXT_30_DAYS: 'Next 30 days',
1790
- NEXT_60_DAYS: 'Next 60 days',
1791
- NEXT_90_DAYS: 'Next 90 days',
1792
- NEXT_6_MONTHS: 'Next 6 months',
1793
- NEXT_12_MONTHS: 'Next 12 months'
1794
- }
1795
- }
1796
- }
1797
- });
1798
- const tokenSubject = inject(MECX_I18N_WRAPPER, { optional: true });
1799
- tokenSubject?.pipe(takeUntilDestroyed(this._destroyRef)).subscribe((value) => {
1800
- this.handleWrapperValues(value);
1445
+ class MonkeyLabelDirective {
1446
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyLabelDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1447
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.14", type: MonkeyLabelDirective, isStandalone: false, selector: "monkey-label", ngImport: i0 }); }
1448
+ }
1449
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyLabelDirective, decorators: [{
1450
+ type: Directive,
1451
+ args: [{
1452
+ selector: 'monkey-label',
1453
+ standalone: false
1454
+ }]
1455
+ }] });
1456
+
1457
+ /** ************************
1458
+ * Copyright Monkey Exchange. All Rights Reserved
1459
+ * This style guide was developed by Monkey Exchange Team
1460
+ * MIT Licence
1461
+ ************************* */
1462
+ class MonkeyPopoverContentComponent {
1463
+ constructor(host) {
1464
+ this.host = host;
1465
+ this.onClose = new EventEmitter();
1466
+ this.enableAutofocus = false;
1467
+ // not to do
1468
+ }
1469
+ ngAfterViewInit() {
1470
+ if (this.enableAutofocus) {
1471
+ setTimeout(() => {
1472
+ const focusable = this.host.nativeElement.querySelector('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])');
1473
+ focusable?.focus();
1474
+ });
1475
+ }
1476
+ }
1477
+ isTemplate(value) {
1478
+ return value instanceof TemplateRef;
1479
+ }
1480
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyPopoverContentComponent, deps: [{ token: i0.ElementRef }], target: i0.ɵɵFactoryTarget.Component }); }
1481
+ static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "20.3.14", 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], enableAutofocus: "enableAutofocus" }, outputs: { onClose: "onClose" }, ngImport: i0, template: `
1482
+ <div class="mecx-popover-container">
1483
+ @if (!hideHeader) {
1484
+ <div class="mecx-popover-header">
1485
+ @if (title) {
1486
+ <div>
1487
+ <ng-container *ngIf="isTemplate(title); else stringTitle">
1488
+ <ng-container *ngTemplateOutlet="title"></ng-container>
1489
+ </ng-container>
1490
+ <ng-template #stringTitle>
1491
+ {{ title }}
1492
+ </ng-template>
1493
+ </div>
1494
+ }
1495
+
1496
+ @if (!hideClose) {
1497
+ <util-icon class="mecx-popover-close" name="clear" (click)="onClose.next(null)" />
1498
+ }
1499
+ </div>
1500
+ }
1501
+
1502
+ <div class="mecx-popover-content" [class.add-radius]="hideHeader">
1503
+ <ng-container *ngTemplateOutlet="content"></ng-container>
1504
+ </div>
1505
+
1506
+ @if (!hideActions) {
1507
+ <div class="mecx-popover-actions" *ngIf="actions">
1508
+ <ng-container *ngIf="isTemplate(actions); else stringActions">
1509
+ <ng-container *ngTemplateOutlet="actions"></ng-container>
1510
+ </ng-container>
1511
+ <ng-template #stringActions>
1512
+ <span>{{ actions }}</span>
1513
+ </ng-template>
1514
+ </div>
1515
+ }
1516
+ </div>
1517
+ `, 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"] }] }); }
1518
+ }
1519
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyPopoverContentComponent, decorators: [{
1520
+ type: Component,
1521
+ args: [{
1522
+ selector: 'monkey-popover-content',
1523
+ imports: [CommonModule, NgTemplateOutlet, UtilIconComponent],
1524
+ template: `
1525
+ <div class="mecx-popover-container">
1526
+ @if (!hideHeader) {
1527
+ <div class="mecx-popover-header">
1528
+ @if (title) {
1529
+ <div>
1530
+ <ng-container *ngIf="isTemplate(title); else stringTitle">
1531
+ <ng-container *ngTemplateOutlet="title"></ng-container>
1532
+ </ng-container>
1533
+ <ng-template #stringTitle>
1534
+ {{ title }}
1535
+ </ng-template>
1536
+ </div>
1537
+ }
1538
+
1539
+ @if (!hideClose) {
1540
+ <util-icon class="mecx-popover-close" name="clear" (click)="onClose.next(null)" />
1541
+ }
1542
+ </div>
1543
+ }
1544
+
1545
+ <div class="mecx-popover-content" [class.add-radius]="hideHeader">
1546
+ <ng-container *ngTemplateOutlet="content"></ng-container>
1547
+ </div>
1548
+
1549
+ @if (!hideActions) {
1550
+ <div class="mecx-popover-actions" *ngIf="actions">
1551
+ <ng-container *ngIf="isTemplate(actions); else stringActions">
1552
+ <ng-container *ngTemplateOutlet="actions"></ng-container>
1553
+ </ng-container>
1554
+ <ng-template #stringActions>
1555
+ <span>{{ actions }}</span>
1556
+ </ng-template>
1557
+ </div>
1558
+ }
1559
+ </div>
1560
+ `
1561
+ }]
1562
+ }], ctorParameters: () => [{ type: i0.ElementRef }], propDecorators: { title: [{
1563
+ type: Input
1564
+ }], content: [{
1565
+ type: Input
1566
+ }], actions: [{
1567
+ type: Input
1568
+ }], onClose: [{
1569
+ type: Output
1570
+ }], hideHeader: [{
1571
+ type: Input,
1572
+ args: [{ transform: booleanAttribute }]
1573
+ }], hideClose: [{
1574
+ type: Input,
1575
+ args: [{ transform: booleanAttribute }]
1576
+ }], hideActions: [{
1577
+ type: Input,
1578
+ args: [{ transform: booleanAttribute }]
1579
+ }], enableAutofocus: [{
1580
+ type: Input
1581
+ }] } });
1582
+ class MonkeyPopoverDirective {
1583
+ set popover(show) {
1584
+ if (this._show === show) {
1585
+ return;
1586
+ }
1587
+ this._show = show;
1588
+ if (show) {
1589
+ setTimeout(() => {
1590
+ this.createPopover();
1591
+ }, 0);
1592
+ }
1593
+ else {
1594
+ this.disposePopover();
1595
+ }
1596
+ }
1597
+ get popover() {
1598
+ return this._show;
1599
+ }
1600
+ set target(value) {
1601
+ this._target = value;
1602
+ }
1603
+ get target() {
1604
+ return this._target;
1605
+ }
1606
+ constructor() {
1607
+ this._tpl = inject(TemplateRef);
1608
+ this._vcr = inject(ViewContainerRef);
1609
+ this._el = inject(ElementRef);
1610
+ this._zone = inject(NgZone);
1611
+ this._overlay = inject(Overlay);
1612
+ this._overlayPositionBuilder = inject(OverlayPositionBuilder);
1613
+ this._router = inject(Router);
1614
+ this._destroyRef = inject(DestroyRef);
1615
+ this._show = false;
1616
+ this.minwidth = false;
1617
+ this.backdrop = true;
1618
+ this.watch = false;
1619
+ this.dir = 'ltr';
1620
+ this.contextmenu = false;
1621
+ this._router.events
1622
+ .pipe(filter((event) => {
1623
+ return event instanceof NavigationStart;
1624
+ }), takeUntilDestroyed(this._destroyRef))
1625
+ .subscribe(() => {
1626
+ this.closePopover();
1801
1627
  });
1802
1628
  }
1803
- handleWrapperValues(value) {
1804
- try {
1805
- const locale = this._localeId || 'pt-BR';
1806
- const wrappedData = JSON.parse(value);
1807
- const currentData = this._data$.value;
1808
- const updated = {
1809
- ...currentData,
1810
- [locale]: {
1811
- ...currentData[locale],
1812
- ...wrappedData
1813
- }
1629
+ ngOnDestroy() {
1630
+ this.disposePopover();
1631
+ this._resizeObserver?.disconnect();
1632
+ }
1633
+ closePopover(event) {
1634
+ if (this._show) {
1635
+ this._show = false;
1636
+ this.disposePopover();
1637
+ this._zone.run(() => {
1638
+ this.closed?.(event);
1639
+ });
1640
+ }
1641
+ }
1642
+ disposePopover() {
1643
+ this._resizeObserver?.disconnect();
1644
+ this._resizeObserver = undefined;
1645
+ if (this._overlayRef) {
1646
+ this._overlayRef.dispose();
1647
+ this._overlayRef = undefined;
1648
+ }
1649
+ }
1650
+ getPositions(dir) {
1651
+ const oppositeVertical = {
1652
+ top: 'bottom',
1653
+ bottom: 'top',
1654
+ center: 'center'
1655
+ };
1656
+ const oppositeHorizontal = {
1657
+ start: 'end',
1658
+ end: 'start',
1659
+ center: 'center'
1660
+ };
1661
+ const centerY = (pos) => {
1662
+ return {
1663
+ originX: 'center',
1664
+ originY: pos,
1665
+ overlayX: 'center',
1666
+ overlayY: oppositeVertical[pos]
1814
1667
  };
1815
- this._data$.next(updated);
1668
+ };
1669
+ const centerX = (pos) => {
1670
+ return {
1671
+ originX: oppositeHorizontal[pos],
1672
+ originY: 'center',
1673
+ overlayX: pos,
1674
+ overlayY: 'center'
1675
+ };
1676
+ };
1677
+ const ltr = (axis) => {
1678
+ return {
1679
+ originX: 'start',
1680
+ originY: axis,
1681
+ overlayX: 'start',
1682
+ overlayY: oppositeVertical[axis]
1683
+ };
1684
+ };
1685
+ const rtl = (axis) => {
1686
+ return {
1687
+ originX: 'end',
1688
+ originY: axis,
1689
+ overlayX: 'end',
1690
+ overlayY: oppositeVertical[axis]
1691
+ };
1692
+ };
1693
+ const side = (axisX, axisY) => {
1694
+ return {
1695
+ originX: axisX,
1696
+ originY: axisY,
1697
+ overlayX: oppositeHorizontal[axisX],
1698
+ overlayY: axisY
1699
+ };
1700
+ };
1701
+ const cmp = dir ?? this._options?.dir ?? this.dir;
1702
+ switch (cmp) {
1703
+ case 'ct':
1704
+ return [centerY('top'), centerY('bottom'), centerX('start'), centerX('end')];
1705
+ case 'cr':
1706
+ return [centerX('end'), centerX('start'), centerY('top'), centerY('bottom')];
1707
+ case 'cc':
1708
+ return [centerX('center')];
1709
+ case 'ltr':
1710
+ return [ltr('bottom'), ltr('top')];
1711
+ case 'rtl':
1712
+ return [rtl('bottom'), rtl('top')];
1713
+ case 'tltr':
1714
+ return [ltr('top'), ltr('bottom')];
1715
+ case 'trtl':
1716
+ return [rtl('top'), rtl('bottom')];
1717
+ case 'rt':
1718
+ return [side('end', 'top'), side('end', 'bottom'), ltr('top')];
1719
+ case 'rb':
1720
+ return [side('end', 'bottom'), side('end', 'top'), ltr('bottom'), rtl('bottom')];
1721
+ case 'lt':
1722
+ return [side('start', 'top'), side('start', 'bottom'), rtl('top')];
1723
+ case 'lb':
1724
+ return [side('start', 'bottom'), side('start', 'top'), rtl('bottom')];
1725
+ default:
1726
+ return [];
1727
+ }
1728
+ }
1729
+ createPopover(origin, options) {
1730
+ if (!this.target) {
1731
+ // eslint-disable-next-line no-console
1732
+ console.error('MonkeyPopoverDirective -> target element is not defined.');
1733
+ return;
1734
+ }
1735
+ const originEl = this.target instanceof HTMLElement ? this.target : this.target.element;
1736
+ this._positionStrategy = this._overlayPositionBuilder
1737
+ .flexibleConnectedTo(origin ?? originEl)
1738
+ .withPush(true)
1739
+ .withGrowAfterOpen(true)
1740
+ .withPositions(this.getPositions(options?.dir));
1741
+ this._overlayRef = this._overlay.create({
1742
+ positionStrategy: this._positionStrategy,
1743
+ disposeOnNavigation: true,
1744
+ direction: 'ltr',
1745
+ hasBackdrop: this.backdrop,
1746
+ scrollStrategy: this._overlay.scrollStrategies.reposition(),
1747
+ backdropClass: 'cdk-overlay-transparent-backdrop',
1748
+ width: this._options?.minwidth || this.minwidth ? this.target.offsetWidth - 2 : undefined,
1749
+ maxHeight: '95%',
1750
+ height: this.height
1751
+ });
1752
+ this._overlayRef
1753
+ .backdropClick()
1754
+ .pipe(takeUntilDestroyed(this._destroyRef))
1755
+ .subscribe((event) => {
1756
+ this.closePopover(event);
1757
+ });
1758
+ const portal = new ComponentPortal(MonkeyPopoverContentComponent, this._vcr);
1759
+ this._componentRef = this._overlayRef.attach(portal);
1760
+ this._componentRef.instance.content = this._tpl;
1761
+ this._componentRef.instance.title = this.title;
1762
+ this._componentRef.instance.actions = this.actions;
1763
+ this._componentRef.instance.hideClose = this.hideClose;
1764
+ this._componentRef.instance.hideHeader = this.hideHeader;
1765
+ this._componentRef.instance.hideActions = this.hideActions;
1766
+ this._componentRef.instance.enableAutofocus = this.enableAutofocus;
1767
+ if (!this.hideClose || !this.hideHeader) {
1768
+ this._componentRef.instance.onClose
1769
+ .pipe(takeUntilDestroyed(this._destroyRef))
1770
+ .subscribe(() => {
1771
+ this.closePopover();
1772
+ });
1816
1773
  }
1817
- catch (e) {
1818
- // eslint-disable-next-line no-console
1819
- console.error(`MonkeyDictionaryService - handleWrapperValues -> ${e}`);
1774
+ if (this.watch && 'ResizeObserver' in window) {
1775
+ this._resizeObserver = new ResizeObserver(() => {
1776
+ this._overlayRef?.updatePosition();
1777
+ });
1778
+ this._resizeObserver.observe(this._componentRef.location.nativeElement);
1820
1779
  }
1821
1780
  }
1822
- get(key) {
1823
- const locale = this._localeId || 'pt-BR';
1824
- return this._data$.pipe(map((data) => {
1825
- return data[locale]?.[key] ?? null;
1826
- }));
1827
- }
1828
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDictionaryService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1829
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDictionaryService, providedIn: 'root' }); }
1781
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyPopoverDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1782
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "16.1.0", version: "20.3.14", type: MonkeyPopoverDirective, isStandalone: false, 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], enableAutofocus: ["monkeyPopoverEnableAutofocus", "enableAutofocus", booleanAttribute] }, ngImport: i0 }); }
1830
1783
  }
1831
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDictionaryService, decorators: [{
1832
- type: Injectable,
1784
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyPopoverDirective, decorators: [{
1785
+ type: Directive,
1833
1786
  args: [{
1834
- providedIn: 'root'
1787
+ selector: '[monkeyPopover]',
1788
+ standalone: false
1835
1789
  }]
1836
- }], ctorParameters: () => [] });
1790
+ }], ctorParameters: () => [], propDecorators: { _options: [{
1791
+ type: Optional
1792
+ }, {
1793
+ type: Inject,
1794
+ args: [MECX_POPOVER_OPTIONS]
1795
+ }], popover: [{
1796
+ type: Input,
1797
+ args: ['monkeyPopover']
1798
+ }], closed: [{
1799
+ type: Input,
1800
+ args: ['monkeyPopoverClosed']
1801
+ }], target: [{
1802
+ type: Input,
1803
+ args: ['monkeyPopoverTarget']
1804
+ }], minwidth: [{
1805
+ type: Input,
1806
+ args: ['monkeyPopoverMinwidth']
1807
+ }], backdrop: [{
1808
+ type: Input,
1809
+ args: ['monkeyPopoverBackdrop']
1810
+ }], watch: [{
1811
+ type: Input,
1812
+ args: ['monkeyPopoverWatch']
1813
+ }], dir: [{
1814
+ type: Input,
1815
+ args: ['monkeyPopoverDir']
1816
+ }], contextmenu: [{
1817
+ type: Input,
1818
+ args: ['monkeyPopoverContextmenu']
1819
+ }], height: [{
1820
+ type: Input,
1821
+ args: ['monkeyPopoverHeight']
1822
+ }], title: [{
1823
+ type: Input,
1824
+ args: ['monkeyPopoverTitle']
1825
+ }], actions: [{
1826
+ type: Input,
1827
+ args: ['monkeyPopoverActions']
1828
+ }], hideClose: [{
1829
+ type: Input,
1830
+ args: [{ alias: 'monkeyPopoverHideClose', transform: booleanAttribute }]
1831
+ }], hideHeader: [{
1832
+ type: Input,
1833
+ args: [{ alias: 'monkeyPopoverHideHeader', transform: booleanAttribute }]
1834
+ }], hideActions: [{
1835
+ type: Input,
1836
+ args: [{ alias: 'monkeyPopoverHideActions', transform: booleanAttribute }]
1837
+ }], enableAutofocus: [{
1838
+ type: Input,
1839
+ args: [{ alias: 'monkeyPopoverEnableAutofocus', transform: booleanAttribute }]
1840
+ }] } });
1837
1841
 
1838
1842
  /** ************************
1839
1843
  * Copyright Monkey Exchange. All Rights Reserved
1840
1844
  * This style guide was developed by Monkey Exchange Team
1841
1845
  * MIT Licence
1842
1846
  ************************* */
1843
- class MonkeyStepperService {
1844
- constructor() {
1845
- this._steppers = signal(new Map(), ...(ngDevMode ? [{ debugName: "_steppers" }] : []));
1846
- }
1847
- currentStep(id) {
1848
- return computed(() => {
1849
- return this._steppers().get(id);
1850
- });
1851
- }
1852
- setCurrentStep(id, step) {
1853
- this._steppers.update((items) => {
1854
- return new Map(items).set(id, step);
1855
- });
1856
- }
1857
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyStepperService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1858
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyStepperService, providedIn: 'root' }); }
1847
+ class MonkeyPrefixDirective {
1848
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyPrefixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1849
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.14", type: MonkeyPrefixDirective, isStandalone: false, selector: "monkey-prefix", ngImport: i0 }); }
1859
1850
  }
1860
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyStepperService, decorators: [{
1861
- type: Injectable,
1851
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyPrefixDirective, decorators: [{
1852
+ type: Directive,
1862
1853
  args: [{
1863
- providedIn: 'root'
1854
+ selector: 'monkey-prefix',
1855
+ standalone: false
1864
1856
  }]
1865
1857
  }] });
1866
1858
 
1867
- class MonkeyToastRef {
1868
- constructor(componentRef) {
1869
- this.componentRef = componentRef;
1870
- // not to do
1871
- }
1872
- close() {
1873
- this.componentRef.instance.close();
1874
- }
1875
- }
1876
-
1877
- /** ************************
1878
- * Copyright Monkey Exchange. All Rights Reserved
1879
- * This style guide was developed by Monkey Exchange Team
1880
- * MIT Licence
1881
- ************************* */
1882
-
1883
1859
  /** ************************
1884
1860
  * Copyright Monkey Exchange. All Rights Reserved
1885
1861
  * This style guide was developed by Monkey Exchange Team
1886
1862
  * MIT Licence
1887
1863
  ************************* */
1888
- class MonkeyToastService {
1864
+ class MonkeySuffixDirective {
1889
1865
  constructor() {
1890
- this.overlay = inject(Overlay);
1866
+ this.hasAction = false;
1867
+ this.action = null;
1891
1868
  }
1892
- getPositionStrategy(position) {
1893
- const globalPosition = this.overlay.position().global();
1894
- switch (position) {
1895
- case 'top-left':
1896
- return globalPosition.top('40px').start('40px');
1897
- case 'top-center':
1898
- return globalPosition.top('40px').centerHorizontally();
1899
- case 'top-right':
1900
- return globalPosition.top('40px').end('40px');
1901
- case 'bottom-left':
1902
- return globalPosition.bottom('40px').start('40px');
1903
- case 'bottom-center':
1904
- return globalPosition.bottom('40px').centerHorizontally();
1905
- default:
1906
- return globalPosition.bottom('40px').end('40px');
1907
- }
1869
+ set _hasAction(value) {
1870
+ this.hasAction = true;
1908
1871
  }
1909
- show(toastConfig) {
1910
- if (this.lastToast) {
1911
- this.lastToast.close();
1872
+ onClick(event) {
1873
+ if (!this.action) {
1874
+ event.preventDefault();
1875
+ event.stopPropagation();
1912
1876
  }
1913
- const overlayRef = this.overlay.create({
1914
- hasBackdrop: false,
1915
- positionStrategy: this.getPositionStrategy(toastConfig.position)
1916
- });
1917
- const portal = new ComponentPortal(MonkeyToastComponent);
1918
- const componentRef = overlayRef.attach(portal);
1919
- this.lastToast = new MonkeyToastRef(componentRef);
1920
- componentRef.instance.id = getRandomString(6);
1921
- componentRef.instance.type = toastConfig.type ?? 'default';
1922
- componentRef.instance.icon = toastConfig.icon;
1923
- componentRef.instance.isClosable = toastConfig.isClosable ?? false;
1924
- componentRef.instance.message = toastConfig.message;
1925
- componentRef.instance.actionLabel = toastConfig.actionLabel;
1926
- componentRef.instance.actionIcon = toastConfig.actionIcon;
1927
- componentRef.instance.onActionClick.subscribe(() => {
1928
- if (toastConfig.action) {
1929
- toastConfig.action();
1930
- if (toastConfig.closeOnAction ?? true) {
1931
- componentRef.instance.close();
1932
- }
1933
- }
1934
- });
1935
- componentRef.instance.onClose.subscribe(() => {
1936
- overlayRef.detach();
1937
- });
1938
- if (!toastConfig.keepOpen) {
1939
- setTimeout(() => {
1940
- componentRef.instance.close();
1941
- }, toastConfig.duration ?? 4000);
1877
+ else {
1878
+ this.action(event);
1942
1879
  }
1943
- return componentRef.instance;
1944
1880
  }
1945
- static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyToastService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
1946
- static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyToastService, providedIn: 'root' }); }
1881
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeySuffixDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
1882
+ static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.14", type: MonkeySuffixDirective, isStandalone: false, selector: "monkey-suffix", inputs: { _hasAction: ["hasAction", "_hasAction"] }, host: { listeners: { "click": "onClick($event)" }, properties: { "class.has-action": "hasAction" } }, ngImport: i0 }); }
1947
1883
  }
1948
- i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyToastService, decorators: [{
1949
- type: Injectable,
1884
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeySuffixDirective, decorators: [{
1885
+ type: Directive,
1950
1886
  args: [{
1951
- providedIn: 'root'
1887
+ selector: 'monkey-suffix',
1888
+ host: {
1889
+ '[class.has-action]': 'hasAction'
1890
+ },
1891
+ standalone: false
1892
+ }]
1893
+ }], propDecorators: { _hasAction: [{
1894
+ type: Input,
1895
+ args: ['hasAction']
1896
+ }], onClick: [{
1897
+ type: HostListener,
1898
+ args: ['click', ['$event']]
1899
+ }] } });
1900
+
1901
+ /** ************************
1902
+ * Copyright Monkey Exchange. All Rights Reserved
1903
+ * This style guide was developed by Monkey Exchange Team
1904
+ * MIT Licence
1905
+ ************************* */
1906
+ class MonkeyDirectivesModule {
1907
+ static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDirectivesModule, deps: [], target: i0.ɵɵFactoryTarget.NgModule }); }
1908
+ static { this.ɵmod = i0.ɵɵngDeclareNgModule({ minVersion: "14.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDirectivesModule, declarations: [MonkeyErrorDirective,
1909
+ MonkeyHelperDirective,
1910
+ MonkeyInfoDirective,
1911
+ MonkeyLabelDirective,
1912
+ MonkeyDisplayDirective,
1913
+ MonkeyPrefixDirective,
1914
+ MonkeySuffixDirective,
1915
+ MonkeyBadgeDirective,
1916
+ MonkeyPopoverDirective], imports: [MonkeyPopoverContentComponent], exports: [MonkeyErrorDirective,
1917
+ MonkeyHelperDirective,
1918
+ MonkeyInfoDirective,
1919
+ MonkeyLabelDirective,
1920
+ MonkeyDisplayDirective,
1921
+ MonkeyPrefixDirective,
1922
+ MonkeySuffixDirective,
1923
+ MonkeyBadgeDirective,
1924
+ MonkeyPopoverDirective] }); }
1925
+ static { this.ɵinj = i0.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDirectivesModule, imports: [MonkeyPopoverContentComponent] }); }
1926
+ }
1927
+ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDirectivesModule, decorators: [{
1928
+ type: NgModule,
1929
+ args: [{
1930
+ imports: [MonkeyPopoverContentComponent],
1931
+ declarations: [
1932
+ MonkeyErrorDirective,
1933
+ MonkeyHelperDirective,
1934
+ MonkeyInfoDirective,
1935
+ MonkeyLabelDirective,
1936
+ MonkeyDisplayDirective,
1937
+ MonkeyPrefixDirective,
1938
+ MonkeySuffixDirective,
1939
+ MonkeyBadgeDirective,
1940
+ MonkeyPopoverDirective
1941
+ ],
1942
+ exports: [
1943
+ MonkeyErrorDirective,
1944
+ MonkeyHelperDirective,
1945
+ MonkeyInfoDirective,
1946
+ MonkeyLabelDirective,
1947
+ MonkeyDisplayDirective,
1948
+ MonkeyPrefixDirective,
1949
+ MonkeySuffixDirective,
1950
+ MonkeyBadgeDirective,
1951
+ MonkeyPopoverDirective
1952
+ ]
1952
1953
  }]
1953
1954
  }] });
1954
1955