@decaf-ts/for-angular 0.0.55 → 0.0.57
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.
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { HTML5InputTypes, parseValueByType, HTML5CheckTypes, escapeHtml, parseToNumber, RenderingEngine, DecafComponent, UIKeys, RenderingError, UIMediaBreakPoints, DecafEventHandler } from '@decaf-ts/ui-decorators';
|
|
2
2
|
import * as i0 from '@angular/core';
|
|
3
|
-
import { InjectionToken, NgModule, isDevMode, reflectComponentType, Injector, createEnvironmentInjector, runInInjectionContext, createComponent, inject, NgZone, Injectable, ChangeDetectorRef, Renderer2, EventEmitter, ElementRef, Input, Output, ViewChild, Inject, Directive, EnvironmentInjector, ViewContainerRef, TemplateRef, Component, ViewEncapsulation, HostListener } from '@angular/core';
|
|
3
|
+
import { InjectionToken, provideEnvironmentInitializer, NgModule, isDevMode, reflectComponentType, Injector, createEnvironmentInjector, runInInjectionContext, createComponent, inject, NgZone, Injectable, ChangeDetectorRef, Renderer2, EventEmitter, ElementRef, Input, Output, ViewChild, Inject, Directive, EnvironmentInjector, ViewContainerRef, TemplateRef, Component, ViewEncapsulation, HostListener } from '@angular/core';
|
|
4
4
|
import * as i1$1 from '@angular/common';
|
|
5
5
|
import { CommonModule, Location, NgComponentOutlet } from '@angular/common';
|
|
6
6
|
import { VALIDATION_PARENT_KEY, ValidationKeys, DEFAULT_PATTERNS, Validation, Primitives, ComparisonValidationKeys, PathProxyEngine, Model, ModelKeys, isValidDate as isValidDate$1, parseDate, sf, ReservedModels } from '@decaf-ts/decorator-validation';
|
|
@@ -15,7 +15,7 @@ import { uses, Metadata, apply, metadata } from '@decaf-ts/decoration';
|
|
|
15
15
|
import { AnimationController, provideIonicAngular, IonModal, IonSpinner, IonButton, IonButtons, IonContent, IonHeader, IonTitle, IonToolbar, IonIcon, IonInput, IonItem, IonCheckbox, IonRadioGroup, IonRadio, IonSelect, IonSelectOption, IonLabel, IonText, IonTextarea, IonCard, IonCardHeader, IonCardContent, IonCardTitle, IonCardSubtitle, IonList, IonReorder, IonReorderGroup, IonSearchbar, IonChip, IonRefresher, IonThumbnail, IonSkeletonText, IonRefresherContent, IonInfiniteScroll, IonInfiniteScrollContent, IonListHeader, IonItemSliding, IonItemOptions, IonItemOption, IonPopover } from '@ionic/angular/standalone';
|
|
16
16
|
import { faker } from '@faker-js/faker';
|
|
17
17
|
import { Router, NavigationEnd, NavigationStart } from '@angular/router';
|
|
18
|
-
import { forkJoin, Subject, BehaviorSubject, fromEvent,
|
|
18
|
+
import { forkJoin, Subject, BehaviorSubject, fromEvent, of, merge, Observable, timer, firstValueFrom, debounceTime } from 'rxjs';
|
|
19
19
|
import { provideHttpClient, HttpClient } from '@angular/common/http';
|
|
20
20
|
import { map, distinctUntilChanged, takeUntil, shareReplay, tap, switchMap } from 'rxjs/operators';
|
|
21
21
|
import { __decorate, __metadata } from 'tslib';
|
|
@@ -678,6 +678,12 @@ function provideDecafPageTransition() {
|
|
|
678
678
|
});
|
|
679
679
|
}
|
|
680
680
|
;
|
|
681
|
+
function provideDecafDarkMode() {
|
|
682
|
+
return provideEnvironmentInitializer(() => {
|
|
683
|
+
const doc = getWindowDocument();
|
|
684
|
+
doc?.documentElement.classList.add('has-dark-mode');
|
|
685
|
+
});
|
|
686
|
+
}
|
|
681
687
|
/**
|
|
682
688
|
* @const {Logger}
|
|
683
689
|
* @private
|
|
@@ -3335,6 +3341,10 @@ class NgxMediaService {
|
|
|
3335
3341
|
get _document() {
|
|
3336
3342
|
return getWindowDocument();
|
|
3337
3343
|
}
|
|
3344
|
+
darkModeEnabled() {
|
|
3345
|
+
return this._document.documentElement.classList.contains('has-dark-mode');
|
|
3346
|
+
;
|
|
3347
|
+
}
|
|
3338
3348
|
/**
|
|
3339
3349
|
* @description Observes window resize events and emits the updated dimensions.
|
|
3340
3350
|
* @summary
|
|
@@ -3387,6 +3397,8 @@ class NgxMediaService {
|
|
|
3387
3397
|
* mediaService.colorSchemeObserver(component).subscribe();
|
|
3388
3398
|
*/
|
|
3389
3399
|
colorSchemeObserver(component) {
|
|
3400
|
+
if (!this.darkModeEnabled())
|
|
3401
|
+
return of(WindowColorSchemes.light);
|
|
3390
3402
|
const win = this._window;
|
|
3391
3403
|
const doc = this._document;
|
|
3392
3404
|
const documentElement = doc.documentElement;
|
|
@@ -3513,6 +3525,8 @@ class NgxMediaService {
|
|
|
3513
3525
|
* });
|
|
3514
3526
|
*/
|
|
3515
3527
|
isDarkMode() {
|
|
3528
|
+
if (!this.darkModeEnabled())
|
|
3529
|
+
return of(false);
|
|
3516
3530
|
const documentElement = this._document.documentElement;
|
|
3517
3531
|
return this.colorScheme$.pipe(map(scheme => documentElement.classList.contains(AngularEngineKeys.DARK_PALETTE_CLASS) || scheme === WindowColorSchemes.dark), distinctUntilChanged(), shareReplay(1), takeUntil(this.destroy$));
|
|
3518
3532
|
}
|
|
@@ -5417,6 +5431,12 @@ let ModalComponent = class ModalComponent extends NgxParentComponentDirective {
|
|
|
5417
5431
|
* @default false
|
|
5418
5432
|
*/
|
|
5419
5433
|
this.lightBox = false;
|
|
5434
|
+
/**
|
|
5435
|
+
* @description Controls the transparency of the modal header.
|
|
5436
|
+
* @summary When set to true, the modal header is rendered with a transparent background.
|
|
5437
|
+
* @type {boolean}
|
|
5438
|
+
* @default false
|
|
5439
|
+
*/
|
|
5420
5440
|
this.headerTransparent = false;
|
|
5421
5441
|
/**
|
|
5422
5442
|
* @description Controls the visibility of the modal header.
|
|
@@ -5714,7 +5734,7 @@ let IconComponent = class IconComponent {
|
|
|
5714
5734
|
this.type = 'image';
|
|
5715
5735
|
this.isSvg = this.name.endsWith('.svg');
|
|
5716
5736
|
}
|
|
5717
|
-
if (this.name?.includes('ti')) {
|
|
5737
|
+
if (this.name?.includes('ti-')) {
|
|
5718
5738
|
this.type = 'icon';
|
|
5719
5739
|
this.name = `ti-${this.name.replace(/ti-/g, '')}`;
|
|
5720
5740
|
}
|
|
@@ -12746,5 +12766,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
12746
12766
|
* Generated bundle index. Do not edit.
|
|
12747
12767
|
*/
|
|
12748
12768
|
|
|
12749
|
-
export { ActionRoles, AngularEngineKeys, BaseComponentProps, CPTKN, CardComponent, ComponentEventNames, ComponentRendererComponent, ComponentsTagNames, CrudFieldComponent, CrudFormComponent, CssClasses, DB_ADAPTER_PROVIDER, DB_ADAPTER_PROVIDER_TOKEN, DecafFakerRepository, DefaultFormReactiveOptions, DefaultListEmptyOptions, DefaultModalOptions, Dynamic, DynamicModule, ElementPositions, ElementSizes, EmptyStateComponent, FieldsetComponent, FileUploadComponent, FilterComponent, ForAngularCommonModule, ForAngularComponentsModule, FormConstants, I18N_CONFIG_TOKEN, I18nLoader, I18nLoaderFactory, I18nParser, IconComponent, LOCALE_ROOT_TOKEN, LayoutComponent, LayoutGridGaps, ListComponent, ListComponentsTypes, ListItemComponent, ListItemPositions, LoggerLevels, ModalComponent, ModelRendererComponent, NgxComponentDirective, NgxEventHandler, NgxFormDirective, NgxFormFieldDirective, NgxFormService, NgxMediaService, NgxModelPageDirective, NgxPageDirective, NgxParentComponentDirective, NgxRenderingEngine, NgxSvgDirective, PaginationComponent, RouteDirections, SearchbarComponent, SelectFieldInterfaces, SteppedFormComponent, WindowColorSchemes, cleanSpaces, dataMapper, decafPageTransition, filterString, formatDate, generateRandomValue, getFakerData, getInjectablesRegistry, getLocaleContext, getLocaleContextByKey, getLocaleFromClassName, getLocaleLanguage, getLogger, getMenuIcon, getModelAndRepository, getNgxInlineModal, getNgxModalComponent, getNgxModalCrudComponent, getNgxSelectOptionsModal, getOnWindow, getOnWindowDocument, getWindow, getWindowDocument, getWindowWidth, isDarkMode, isDevelopmentMode, isNotUndefined, isValidDate, itemMapper, parseToValidDate, presentNgxInlineModal, presentNgxLightBoxModal, provideDecafDbAdapter, provideDecafDynamicComponents, provideDecafI18nConfig, provideDecafI18nLoader, provideDecafPageTransition, removeFocusTrap, setOnWindow, stringToBoolean, windowEventEmitter };
|
|
12769
|
+
export { ActionRoles, AngularEngineKeys, BaseComponentProps, CPTKN, CardComponent, ComponentEventNames, ComponentRendererComponent, ComponentsTagNames, CrudFieldComponent, CrudFormComponent, CssClasses, DB_ADAPTER_PROVIDER, DB_ADAPTER_PROVIDER_TOKEN, DecafFakerRepository, DefaultFormReactiveOptions, DefaultListEmptyOptions, DefaultModalOptions, Dynamic, DynamicModule, ElementPositions, ElementSizes, EmptyStateComponent, FieldsetComponent, FileUploadComponent, FilterComponent, ForAngularCommonModule, ForAngularComponentsModule, FormConstants, I18N_CONFIG_TOKEN, I18nLoader, I18nLoaderFactory, I18nParser, IconComponent, LOCALE_ROOT_TOKEN, LayoutComponent, LayoutGridGaps, ListComponent, ListComponentsTypes, ListItemComponent, ListItemPositions, LoggerLevels, ModalComponent, ModelRendererComponent, NgxComponentDirective, NgxEventHandler, NgxFormDirective, NgxFormFieldDirective, NgxFormService, NgxMediaService, NgxModelPageDirective, NgxPageDirective, NgxParentComponentDirective, NgxRenderingEngine, NgxSvgDirective, PaginationComponent, RouteDirections, SearchbarComponent, SelectFieldInterfaces, SteppedFormComponent, WindowColorSchemes, cleanSpaces, dataMapper, decafPageTransition, filterString, formatDate, generateRandomValue, getFakerData, getInjectablesRegistry, getLocaleContext, getLocaleContextByKey, getLocaleFromClassName, getLocaleLanguage, getLogger, getMenuIcon, getModelAndRepository, getNgxInlineModal, getNgxModalComponent, getNgxModalCrudComponent, getNgxSelectOptionsModal, getOnWindow, getOnWindowDocument, getWindow, getWindowDocument, getWindowWidth, isDarkMode, isDevelopmentMode, isNotUndefined, isValidDate, itemMapper, parseToValidDate, presentNgxInlineModal, presentNgxLightBoxModal, provideDecafDarkMode, provideDecafDbAdapter, provideDecafDynamicComponents, provideDecafI18nConfig, provideDecafI18nLoader, provideDecafPageTransition, removeFocusTrap, setOnWindow, stringToBoolean, windowEventEmitter };
|
|
12750
12770
|
//# sourceMappingURL=decaf-ts-for-angular.mjs.map
|