@decaf-ts/for-angular 0.0.55 → 0.0.56
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,7 @@
|
|
|
1
|
+
import '@tabler/icons-webfont/dist/tabler-icons.min.css';
|
|
1
2
|
import { HTML5InputTypes, parseValueByType, HTML5CheckTypes, escapeHtml, parseToNumber, RenderingEngine, DecafComponent, UIKeys, RenderingError, UIMediaBreakPoints, DecafEventHandler } from '@decaf-ts/ui-decorators';
|
|
2
3
|
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';
|
|
4
|
+
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
5
|
import * as i1$1 from '@angular/common';
|
|
5
6
|
import { CommonModule, Location, NgComponentOutlet } from '@angular/common';
|
|
6
7
|
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 +16,7 @@ import { uses, Metadata, apply, metadata } from '@decaf-ts/decoration';
|
|
|
15
16
|
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
17
|
import { faker } from '@faker-js/faker';
|
|
17
18
|
import { Router, NavigationEnd, NavigationStart } from '@angular/router';
|
|
18
|
-
import { forkJoin, Subject, BehaviorSubject, fromEvent,
|
|
19
|
+
import { forkJoin, Subject, BehaviorSubject, fromEvent, of, merge, Observable, timer, firstValueFrom, debounceTime } from 'rxjs';
|
|
19
20
|
import { provideHttpClient, HttpClient } from '@angular/common/http';
|
|
20
21
|
import { map, distinctUntilChanged, takeUntil, shareReplay, tap, switchMap } from 'rxjs/operators';
|
|
21
22
|
import { __decorate, __metadata } from 'tslib';
|
|
@@ -678,6 +679,12 @@ function provideDecafPageTransition() {
|
|
|
678
679
|
});
|
|
679
680
|
}
|
|
680
681
|
;
|
|
682
|
+
function provideDecafDarkMode() {
|
|
683
|
+
return provideEnvironmentInitializer(() => {
|
|
684
|
+
const doc = getWindowDocument();
|
|
685
|
+
doc?.documentElement.classList.add('has-dark-mode');
|
|
686
|
+
});
|
|
687
|
+
}
|
|
681
688
|
/**
|
|
682
689
|
* @const {Logger}
|
|
683
690
|
* @private
|
|
@@ -3335,6 +3342,10 @@ class NgxMediaService {
|
|
|
3335
3342
|
get _document() {
|
|
3336
3343
|
return getWindowDocument();
|
|
3337
3344
|
}
|
|
3345
|
+
darkModeEnabled() {
|
|
3346
|
+
return this._document.documentElement.classList.contains('has-dark-mode');
|
|
3347
|
+
;
|
|
3348
|
+
}
|
|
3338
3349
|
/**
|
|
3339
3350
|
* @description Observes window resize events and emits the updated dimensions.
|
|
3340
3351
|
* @summary
|
|
@@ -3387,6 +3398,8 @@ class NgxMediaService {
|
|
|
3387
3398
|
* mediaService.colorSchemeObserver(component).subscribe();
|
|
3388
3399
|
*/
|
|
3389
3400
|
colorSchemeObserver(component) {
|
|
3401
|
+
if (!this.darkModeEnabled())
|
|
3402
|
+
return of(WindowColorSchemes.light);
|
|
3390
3403
|
const win = this._window;
|
|
3391
3404
|
const doc = this._document;
|
|
3392
3405
|
const documentElement = doc.documentElement;
|
|
@@ -3513,6 +3526,8 @@ class NgxMediaService {
|
|
|
3513
3526
|
* });
|
|
3514
3527
|
*/
|
|
3515
3528
|
isDarkMode() {
|
|
3529
|
+
if (!this.darkModeEnabled())
|
|
3530
|
+
return of(false);
|
|
3516
3531
|
const documentElement = this._document.documentElement;
|
|
3517
3532
|
return this.colorScheme$.pipe(map(scheme => documentElement.classList.contains(AngularEngineKeys.DARK_PALETTE_CLASS) || scheme === WindowColorSchemes.dark), distinctUntilChanged(), shareReplay(1), takeUntil(this.destroy$));
|
|
3518
3533
|
}
|
|
@@ -5417,6 +5432,12 @@ let ModalComponent = class ModalComponent extends NgxParentComponentDirective {
|
|
|
5417
5432
|
* @default false
|
|
5418
5433
|
*/
|
|
5419
5434
|
this.lightBox = false;
|
|
5435
|
+
/**
|
|
5436
|
+
* @description Controls the transparency of the modal header.
|
|
5437
|
+
* @summary When set to true, the modal header is rendered with a transparent background.
|
|
5438
|
+
* @type {boolean}
|
|
5439
|
+
* @default false
|
|
5440
|
+
*/
|
|
5420
5441
|
this.headerTransparent = false;
|
|
5421
5442
|
/**
|
|
5422
5443
|
* @description Controls the visibility of the modal header.
|
|
@@ -5714,7 +5735,7 @@ let IconComponent = class IconComponent {
|
|
|
5714
5735
|
this.type = 'image';
|
|
5715
5736
|
this.isSvg = this.name.endsWith('.svg');
|
|
5716
5737
|
}
|
|
5717
|
-
if (this.name?.includes('ti')) {
|
|
5738
|
+
if (this.name?.includes('ti-')) {
|
|
5718
5739
|
this.type = 'icon';
|
|
5719
5740
|
this.name = `ti-${this.name.replace(/ti-/g, '')}`;
|
|
5720
5741
|
}
|
|
@@ -12746,5 +12767,5 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.15", ngImpo
|
|
|
12746
12767
|
* Generated bundle index. Do not edit.
|
|
12747
12768
|
*/
|
|
12748
12769
|
|
|
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 };
|
|
12770
|
+
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
12771
|
//# sourceMappingURL=decaf-ts-for-angular.mjs.map
|