monkey-style-guide-v2 0.0.113 → 0.0.114

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,7 +2,7 @@ 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, InjectionToken, EventEmitter, Output, ViewContainerRef, ElementRef, 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, 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';
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';
@@ -926,8 +926,24 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
926
926
  * MIT Licence
927
927
  ************************* */
928
928
  class MonkeyDisplayDirective {
929
+ constructor() {
930
+ this.fallback = input.required(...(ngDevMode ? [{ 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
+ }
929
945
  static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDisplayDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
930
- static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "20.3.14", type: MonkeyDisplayDirective, isStandalone: false, selector: "monkey-display", ngImport: i0 }); }
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: true, transformFunction: null } }, ngImport: i0 }); }
931
947
  }
932
948
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImport: i0, type: MonkeyDisplayDirective, decorators: [{
933
949
  type: Directive,
@@ -935,7 +951,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.14", ngImpo
935
951
  selector: 'monkey-display',
936
952
  standalone: false
937
953
  }]
938
- }] });
954
+ }], propDecorators: { fallback: [{ type: i0.Input, args: [{ isSignal: true, alias: "fallback", required: true }] }] } });
939
955
 
940
956
  /** ************************
941
957
  * Copyright Monkey Exchange. All Rights Reserved
@@ -1603,6 +1619,7 @@ class MonkeyDictionaryService {
1603
1619
  'NO-RESULTS': 'Nenhum resultado encontrado',
1604
1620
  'NO-DATA': 'Sem dados',
1605
1621
  'NO-DATA-ADDRESS': 'Nenhum endereço encontrado com esta pesquisa',
1622
+ 'NOT-PROVIDED': 'Não informado',
1606
1623
  LOADING: 'Carregando...',
1607
1624
  'DATE-RANGE': {
1608
1625
  'START-DATE': 'Data de início',
@@ -1647,6 +1664,7 @@ class MonkeyDictionaryService {
1647
1664
  'NO-RESULTS': 'No se encontraron resultados',
1648
1665
  'NO-DATA': 'Sin datos',
1649
1666
  'NO-DATA-ADDRESS': 'No se encontraron direcciones con esta búsqueda',
1667
+ 'NOT-PROVIDED': 'No informado',
1650
1668
  LOADING: 'Cargando...',
1651
1669
  'DATE-RANGE': {
1652
1670
  'START-DATE': 'Fecha de inicio',
@@ -1691,6 +1709,7 @@ class MonkeyDictionaryService {
1691
1709
  'NO-RESULTS': 'No se encontraron resultados',
1692
1710
  'NO-DATA': 'Sin datos',
1693
1711
  'NO-DATA-ADDRESS': 'No se encontraron direcciones con esta búsqueda',
1712
+ 'NOT-PROVIDED': 'No informado',
1694
1713
  LOADING: 'Cargando...',
1695
1714
  'DATE-RANGE': {
1696
1715
  'START-DATE': 'Fecha de inicio',
@@ -1735,6 +1754,7 @@ class MonkeyDictionaryService {
1735
1754
  'NO-RESULTS': 'No results found',
1736
1755
  'NO-DATA': 'No data',
1737
1756
  'NO-DATA-ADDRESS': 'No address found with this search',
1757
+ 'NOT-PROVIDED': 'Not provided',
1738
1758
  LOADING: 'Loading...',
1739
1759
  'DATE-RANGE': {
1740
1760
  'START-DATE': 'Start date',