@acorex/platform 20.6.0-next.13 → 20.6.0-next.14
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.
- package/core/index.d.ts +106 -23
- package/fesm2022/acorex-platform-core.mjs +182 -3
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +175 -154
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +64 -87
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +16 -14
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +3 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs +30 -0
- package/fesm2022/acorex-platform-layout-widgets-image-preview.popup-V31OpYah.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +1232 -839
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/{acorex-platform-themes-default-entity-master-list-view.component-xq3eQ6t2.mjs → acorex-platform-themes-default-entity-master-list-view.component-pBT9C2n8.mjs} +5 -3
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-pBT9C2n8.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +12 -10
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared.mjs +12 -107
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/layout/components/index.d.ts +177 -175
- package/layout/designer/index.d.ts +1 -1
- package/layout/entity/index.d.ts +3 -66
- package/layout/views/index.d.ts +4 -58
- package/layout/widget-core/index.d.ts +20 -21
- package/layout/widgets/README.md +0 -1
- package/layout/widgets/index.d.ts +69 -48
- package/package.json +5 -5
- package/themes/default/index.d.ts +4 -71
- package/themes/shared/index.d.ts +1 -39
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-xq3eQ6t2.mjs.map +0 -1
package/core/index.d.ts
CHANGED
|
@@ -908,7 +908,7 @@ type AXPPartialNested<T> = {
|
|
|
908
908
|
declare function getNestedKeys(obj: any, prefix?: string): string[];
|
|
909
909
|
type AXPExpression = string;
|
|
910
910
|
type AXPMetaData = Record<string, any>;
|
|
911
|
-
type AXPOptionsData = Record<string, any
|
|
911
|
+
type AXPOptionsData<T extends Record<string, unknown> = Record<string, any>> = T;
|
|
912
912
|
interface AXPValueUnit {
|
|
913
913
|
name: string;
|
|
914
914
|
title: string;
|
|
@@ -2410,32 +2410,94 @@ declare class AXPCountdownPipe implements PipeTransform {
|
|
|
2410
2410
|
static ɵpipe: i0.ɵɵPipeDeclaration<AXPCountdownPipe, "countdown", true>;
|
|
2411
2411
|
}
|
|
2412
2412
|
|
|
2413
|
-
declare function extractNestedFieldsWildcard(obj: any, basePath: string, fields: string[]): any;
|
|
2414
|
-
declare function setSmart(obj: any, smartPath: string, value: any): any;
|
|
2415
|
-
declare function getSmart(obj: any, smartPath: string): any;
|
|
2416
|
-
declare function extractValue<T = any>(value: any, key?: string): T | null;
|
|
2417
|
-
declare function cleanDeep(obj: any): any;
|
|
2418
|
-
type ChangeEntry = {
|
|
2419
|
-
path: string;
|
|
2420
|
-
oldValue: any;
|
|
2421
|
-
newValue: any;
|
|
2422
|
-
arrayDiff?: {
|
|
2423
|
-
added: any[];
|
|
2424
|
-
removed: any[];
|
|
2425
|
-
};
|
|
2426
|
-
};
|
|
2427
|
-
declare function getChangedPaths(obj1: any, obj2: any): string[];
|
|
2428
|
-
declare function getDetailedChanges(obj1: any, obj2: any): ChangeEntry[];
|
|
2429
|
-
declare function getEnumValues(enumType: any): {
|
|
2430
|
-
id: string;
|
|
2431
|
-
title: string;
|
|
2432
|
-
}[];
|
|
2433
|
-
|
|
2434
2413
|
declare function applyFilterArray(dataArray: any[], filters?: AXDataSourceFilterOption[], logic?: 'and' | 'or'): any[];
|
|
2435
2414
|
declare function applySortArray(dataArray: any, sorts: AXDataSourceSortOption[]): any;
|
|
2436
2415
|
declare function applyPagination<T>(dataArray: T[], skip: number, take: number): T[];
|
|
2437
2416
|
declare function applyQueryArray<T>(dataArray: T[], query: AXDataSourceQuery): Promise<AXDataSourceCallbackResult<T>>;
|
|
2438
2417
|
|
|
2418
|
+
/**
|
|
2419
|
+
* Screen Size Enum
|
|
2420
|
+
*/
|
|
2421
|
+
declare enum AXPScreenSize {
|
|
2422
|
+
Small = "small",
|
|
2423
|
+
Medium = "medium",
|
|
2424
|
+
Large = "large"
|
|
2425
|
+
}
|
|
2426
|
+
/**
|
|
2427
|
+
* Device Type Enum
|
|
2428
|
+
*/
|
|
2429
|
+
declare enum AXPDeviceType {
|
|
2430
|
+
Mobile = "mobile",
|
|
2431
|
+
Tablet = "tablet",
|
|
2432
|
+
Desktop = "desktop"
|
|
2433
|
+
}
|
|
2434
|
+
/**
|
|
2435
|
+
* Injectable service that provides reactive device and screen size information.
|
|
2436
|
+
* Monitors window resize events and updates signals accordingly.
|
|
2437
|
+
*/
|
|
2438
|
+
declare class AXPDeviceService {
|
|
2439
|
+
/**
|
|
2440
|
+
* Current screen size (Small, Medium, Large)
|
|
2441
|
+
*/
|
|
2442
|
+
readonly screenSize: i0.WritableSignal<AXPScreenSize>;
|
|
2443
|
+
/**
|
|
2444
|
+
* Current device type (Mobile, Tablet, Desktop)
|
|
2445
|
+
*/
|
|
2446
|
+
readonly deviceType: i0.WritableSignal<AXPDeviceType>;
|
|
2447
|
+
/**
|
|
2448
|
+
* Whether the device supports touch input
|
|
2449
|
+
*/
|
|
2450
|
+
readonly isTouchDevice: i0.WritableSignal<boolean>;
|
|
2451
|
+
/**
|
|
2452
|
+
* Whether the screen size is Small
|
|
2453
|
+
*/
|
|
2454
|
+
readonly isSmall: i0.Signal<boolean>;
|
|
2455
|
+
/**
|
|
2456
|
+
* Whether the screen size is Medium
|
|
2457
|
+
*/
|
|
2458
|
+
readonly isMedium: i0.Signal<boolean>;
|
|
2459
|
+
/**
|
|
2460
|
+
* Whether the screen size is Large
|
|
2461
|
+
*/
|
|
2462
|
+
readonly isLarge: i0.Signal<boolean>;
|
|
2463
|
+
/**
|
|
2464
|
+
* Whether the device is Mobile
|
|
2465
|
+
*/
|
|
2466
|
+
readonly isMobileDevice: i0.Signal<boolean>;
|
|
2467
|
+
/**
|
|
2468
|
+
* Whether the device is Tablet
|
|
2469
|
+
*/
|
|
2470
|
+
readonly isTabletDevice: i0.Signal<boolean>;
|
|
2471
|
+
/**
|
|
2472
|
+
* Whether the device is Desktop
|
|
2473
|
+
*/
|
|
2474
|
+
readonly isDesktopDevice: i0.Signal<boolean>;
|
|
2475
|
+
/**
|
|
2476
|
+
* Whether the device supports touch (alias for isTouchDevice)
|
|
2477
|
+
*/
|
|
2478
|
+
readonly isTouchScreen: i0.Signal<boolean>;
|
|
2479
|
+
private _resizeListener;
|
|
2480
|
+
constructor();
|
|
2481
|
+
/**
|
|
2482
|
+
* Update screen size and device type based on window width
|
|
2483
|
+
*/
|
|
2484
|
+
private _updateScreenSize;
|
|
2485
|
+
/**
|
|
2486
|
+
* Set up event listener for window resize
|
|
2487
|
+
*/
|
|
2488
|
+
private _setupResizeListener;
|
|
2489
|
+
/**
|
|
2490
|
+
* Remove event listener for window resize
|
|
2491
|
+
*/
|
|
2492
|
+
private _removeResizeListener;
|
|
2493
|
+
/**
|
|
2494
|
+
* Clean up resources when service is destroyed
|
|
2495
|
+
*/
|
|
2496
|
+
destroy(): void;
|
|
2497
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<AXPDeviceService, never>;
|
|
2498
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<AXPDeviceService>;
|
|
2499
|
+
}
|
|
2500
|
+
|
|
2439
2501
|
/**
|
|
2440
2502
|
* Service for applying and resetting text highlighting within specified HTML elements.
|
|
2441
2503
|
*/
|
|
@@ -2479,11 +2541,32 @@ declare class AXHighlightService {
|
|
|
2479
2541
|
static ɵprov: i0.ɵɵInjectableDeclaration<AXHighlightService>;
|
|
2480
2542
|
}
|
|
2481
2543
|
|
|
2544
|
+
declare function extractNestedFieldsWildcard(obj: any, basePath: string, fields: string[]): any;
|
|
2545
|
+
declare function setSmart(obj: any, smartPath: string, value: any): any;
|
|
2546
|
+
declare function getSmart(obj: any, smartPath: string): any;
|
|
2547
|
+
declare function extractValue<T = any>(value: any, key?: string): T | null;
|
|
2548
|
+
declare function cleanDeep(obj: any): any;
|
|
2549
|
+
type ChangeEntry = {
|
|
2550
|
+
path: string;
|
|
2551
|
+
oldValue: any;
|
|
2552
|
+
newValue: any;
|
|
2553
|
+
arrayDiff?: {
|
|
2554
|
+
added: any[];
|
|
2555
|
+
removed: any[];
|
|
2556
|
+
};
|
|
2557
|
+
};
|
|
2558
|
+
declare function getChangedPaths(obj1: any, obj2: any): string[];
|
|
2559
|
+
declare function getDetailedChanges(obj1: any, obj2: any): ChangeEntry[];
|
|
2560
|
+
declare function getEnumValues(enumType: any): {
|
|
2561
|
+
id: string;
|
|
2562
|
+
title: string;
|
|
2563
|
+
}[];
|
|
2564
|
+
|
|
2482
2565
|
declare function extractTextFromHtml(value: string): string;
|
|
2483
2566
|
/**
|
|
2484
2567
|
* Generate kebab-case group name from title
|
|
2485
2568
|
*/
|
|
2486
2569
|
declare function generateKebabCase(title: string): string;
|
|
2487
2570
|
|
|
2488
|
-
export { AXHighlightService, AXPActivityLogProvider, AXPActivityLogService, AXPAppStartUpProvider, AXPAppStartUpService, AXPBroadcastEventService, AXPColorPaletteProvider, AXPColorPaletteService, AXPComponentLogoConfig, AXPContentCheckerDirective, AXPContextChangeEvent, AXPContextStore, AXPCountdownPipe, AXPDataGenerator, AXPDataSourceDefinitionProviderService, AXPDblClickDirective, AXPDefaultColorPalettesProvider, AXPDistributedEventListenerService, AXPElementDataDirective, AXPExportTemplateToken, AXPExpressionEvaluatorScopeProviderContext, AXPExpressionEvaluatorScopeProviderService, AXPExpressionEvaluatorService, AXPGridLayoutDirective, AXPHookService, AXPImageUrlLogoConfig, AXPPlatformScope, AXPStatusDefinitionProviderService, AXPStatusProvider, AXPSystemActionType, AXPSystemActions, AXPSystemStatusType, AXPSystemStatuses, AXPTagProvider, AXPTagService, AXP_ACTIVITY_LOG_PROVIDER, AXP_COLOR_PALETTE_PROVIDER, AXP_DATASOURCE_DEFINITION_PROVIDER, AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, AXP_STATUS_PROVIDERS, AXP_TAG_PROVIDER, applyFilterArray, applyPagination, applyQueryArray, applySortArray, applySystemActionDefault, cleanDeep, extractNestedFieldsWildcard, extractTextFromHtml, extractValue, generateKebabCase, getActionButton, getChangedPaths, getDetailedChanges, getEnumValues, getNestedKeys, getSmart, getStatusInfo, getSystemActions, getSystemStatus, objectKeyValueTransforms, resolveActionLook, resolvePlatformScopeKey, resolvePlatformScopeName, resolveStatusLook, setSmart, systemStatusToDefinition };
|
|
2571
|
+
export { AXHighlightService, AXPActivityLogProvider, AXPActivityLogService, AXPAppStartUpProvider, AXPAppStartUpService, AXPBroadcastEventService, AXPColorPaletteProvider, AXPColorPaletteService, AXPComponentLogoConfig, AXPContentCheckerDirective, AXPContextChangeEvent, AXPContextStore, AXPCountdownPipe, AXPDataGenerator, AXPDataSourceDefinitionProviderService, AXPDblClickDirective, AXPDefaultColorPalettesProvider, AXPDeviceService, AXPDeviceType, AXPDistributedEventListenerService, AXPElementDataDirective, AXPExportTemplateToken, AXPExpressionEvaluatorScopeProviderContext, AXPExpressionEvaluatorScopeProviderService, AXPExpressionEvaluatorService, AXPGridLayoutDirective, AXPHookService, AXPImageUrlLogoConfig, AXPPlatformScope, AXPScreenSize, AXPStatusDefinitionProviderService, AXPStatusProvider, AXPSystemActionType, AXPSystemActions, AXPSystemStatusType, AXPSystemStatuses, AXPTagProvider, AXPTagService, AXP_ACTIVITY_LOG_PROVIDER, AXP_COLOR_PALETTE_PROVIDER, AXP_DATASOURCE_DEFINITION_PROVIDER, AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, AXP_STATUS_PROVIDERS, AXP_TAG_PROVIDER, applyFilterArray, applyPagination, applyQueryArray, applySortArray, applySystemActionDefault, cleanDeep, extractNestedFieldsWildcard, extractTextFromHtml, extractValue, generateKebabCase, getActionButton, getChangedPaths, getDetailedChanges, getEnumValues, getNestedKeys, getSmart, getStatusInfo, getSystemActions, getSystemStatus, objectKeyValueTransforms, resolveActionLook, resolvePlatformScopeKey, resolvePlatformScopeName, resolveStatusLook, setSmart, systemStatusToDefinition };
|
|
2489
2572
|
export type { AXPActionMenuItem, AXPActivityLog, AXPActivityLogChange, AXPApplicationUserReference, AXPBackButton, AXPBadge, AXPBreadcrumbItem, AXPCategorizedEntity, AXPCategorizedEntityDto, AXPCategoryEntity, AXPCategoryEntityWithItems, AXPColorPalette, AXPColorPaletteFilterOptions, AXPColumnQuery, AXPCommandMessage, AXPContent, AXPContentDirection, AXPContentType, AXPContextData, AXPContextState, AXPDataSource, AXPDataSourceDataFieldDefinition, AXPDataSourceDefinition, AXPDataSourceDefinitionProvider, AXPDataType, AXPDistributedEventListenerProvider, AXPDistributedEventListenerProviderToken, AXPEntityReference, AXPEqualValidationRule, AXPExecuteCommand, AXPExecuteCommandResult, AXPExportCsvOptions, AXPExportExcelOptions, AXPExportOptions, AXPExportPdfOptions, AXPExportPrintOptions, AXPExpression, AXPExpressionEvaluatorScope, AXPExpressionEvaluatorScopeProvider, AXPExpressionEvaluatorScopeProviders, AXPFileListItem, AXPFileSource, AXPFileStatus, AXPFilterDefinition, AXPFilterLogic, AXPFilterOperation, AXPFilterQuery, AXPFlowDirection, AXPGridLayoutOptions, AXPGridPlacement, AXPLogoConfig, AXPMaxLengthValidationRule, AXPMetaData, AXPMiddlewareErrorResponse, AXPMinLengthValidationRule, AXPNavigateActionCommand, AXPNavigateActionOptions, AXPOptionsData, AXPPagedListResult, AXPPartialNested, AXPPlatformScopeKey, AXPQueryFetchResult, AXPQueryRequest, AXPReqexValidationRule, AXPRequiredValidationRule, AXPSortDefinition, AXPSortQuery, AXPStartUpTask, AXPStatusActionPriority, AXPStatusActionScope, AXPStatusDefinition, AXPStatusTransition, AXPStatusWorkflowAction, AXPStringValidationRules, AXPSystemAction, AXPTag, AXPTagFilterOptions, AXPUserReference, AXPValidationRule, AXPValidationRules, AXPValueTransformerFunction, AXPValueTransformerFunctions, AXPValueUnit, AXPValueUnits, AXPViewBlockDefinition, AXPViewDefinition, AXPViewFieldDefinition, AXPViewQuery, AXPWidgetTrigger, AXPWidgetTriggers };
|
|
@@ -2,9 +2,9 @@ import * as i0 from '@angular/core';
|
|
|
2
2
|
import { InjectionToken, inject, Injectable, computed, input, effect, Directive, EventEmitter, HostListener, Output, ViewContainerRef, ElementRef, Injector, runInInjectionContext, provideAppInitializer, signal, Pipe } from '@angular/core';
|
|
3
3
|
import { signalStore, withState, withComputed, withMethods, patchState } from '@ngrx/signals';
|
|
4
4
|
import { get, isPlainObject, set, isArray, merge, isNil, isObjectLike, transform, isEmpty, isEqual, differenceWith, union, cloneDeep, isUndefined, endsWith, startsWith, includes, lte, gte, lt, gt, orderBy } from 'lodash-es';
|
|
5
|
-
import { Subject, interval } from 'rxjs';
|
|
5
|
+
import { Subject, interval, fromEvent } from 'rxjs';
|
|
6
6
|
import { AXCalendarService } from '@acorex/core/date-time';
|
|
7
|
-
import { startWith, map } from 'rxjs/operators';
|
|
7
|
+
import { startWith, map, debounceTime } from 'rxjs/operators';
|
|
8
8
|
|
|
9
9
|
const AXP_ACTIVITY_LOG_PROVIDER = new InjectionToken('AXP_ACTIVITY_LOGS_PROVIDER');
|
|
10
10
|
class AXPActivityLogService {
|
|
@@ -3300,6 +3300,185 @@ async function applyQueryArray(dataArray, query) {
|
|
|
3300
3300
|
};
|
|
3301
3301
|
}
|
|
3302
3302
|
|
|
3303
|
+
//#region ---- Type Definitions ----
|
|
3304
|
+
/**
|
|
3305
|
+
* Screen Size Enum
|
|
3306
|
+
*/
|
|
3307
|
+
var AXPScreenSize;
|
|
3308
|
+
(function (AXPScreenSize) {
|
|
3309
|
+
AXPScreenSize["Small"] = "small";
|
|
3310
|
+
AXPScreenSize["Medium"] = "medium";
|
|
3311
|
+
AXPScreenSize["Large"] = "large";
|
|
3312
|
+
})(AXPScreenSize || (AXPScreenSize = {}));
|
|
3313
|
+
/**
|
|
3314
|
+
* Device Type Enum
|
|
3315
|
+
*/
|
|
3316
|
+
var AXPDeviceType;
|
|
3317
|
+
(function (AXPDeviceType) {
|
|
3318
|
+
AXPDeviceType["Mobile"] = "mobile";
|
|
3319
|
+
AXPDeviceType["Tablet"] = "tablet";
|
|
3320
|
+
AXPDeviceType["Desktop"] = "desktop";
|
|
3321
|
+
})(AXPDeviceType || (AXPDeviceType = {}));
|
|
3322
|
+
//#endregion
|
|
3323
|
+
//#region ---- Helper Functions ----
|
|
3324
|
+
/**
|
|
3325
|
+
* Get the initial screen size based on window width
|
|
3326
|
+
*/
|
|
3327
|
+
const getScreenSize = () => {
|
|
3328
|
+
const width = window.innerWidth;
|
|
3329
|
+
if (width <= 600)
|
|
3330
|
+
return AXPScreenSize.Small;
|
|
3331
|
+
if (width <= 1024)
|
|
3332
|
+
return AXPScreenSize.Medium;
|
|
3333
|
+
return AXPScreenSize.Large;
|
|
3334
|
+
};
|
|
3335
|
+
/**
|
|
3336
|
+
* Determine device type based on viewport width
|
|
3337
|
+
*/
|
|
3338
|
+
const getDeviceType = () => {
|
|
3339
|
+
const width = window.innerWidth;
|
|
3340
|
+
if (width <= 600) {
|
|
3341
|
+
return AXPDeviceType.Mobile;
|
|
3342
|
+
}
|
|
3343
|
+
else if (width <= 1024) {
|
|
3344
|
+
return AXPDeviceType.Tablet;
|
|
3345
|
+
}
|
|
3346
|
+
return AXPDeviceType.Desktop;
|
|
3347
|
+
};
|
|
3348
|
+
/**
|
|
3349
|
+
* Determine if the device supports touch
|
|
3350
|
+
*/
|
|
3351
|
+
const isTouchDevice = () => {
|
|
3352
|
+
return 'ontouchstart' in window || navigator.maxTouchPoints > 0;
|
|
3353
|
+
};
|
|
3354
|
+
//#endregion
|
|
3355
|
+
//#region ---- Device Service ----
|
|
3356
|
+
/**
|
|
3357
|
+
* Injectable service that provides reactive device and screen size information.
|
|
3358
|
+
* Monitors window resize events and updates signals accordingly.
|
|
3359
|
+
*/
|
|
3360
|
+
class AXPDeviceService {
|
|
3361
|
+
//#endregion
|
|
3362
|
+
//#region ---- Constructor & Lifecycle ----
|
|
3363
|
+
constructor() {
|
|
3364
|
+
//#region ---- State Signals ----
|
|
3365
|
+
/**
|
|
3366
|
+
* Current screen size (Small, Medium, Large)
|
|
3367
|
+
*/
|
|
3368
|
+
this.screenSize = signal(getScreenSize(), ...(ngDevMode ? [{ debugName: "screenSize" }] : []));
|
|
3369
|
+
/**
|
|
3370
|
+
* Current device type (Mobile, Tablet, Desktop)
|
|
3371
|
+
*/
|
|
3372
|
+
this.deviceType = signal(getDeviceType(), ...(ngDevMode ? [{ debugName: "deviceType" }] : []));
|
|
3373
|
+
/**
|
|
3374
|
+
* Whether the device supports touch input
|
|
3375
|
+
*/
|
|
3376
|
+
this.isTouchDevice = signal(isTouchDevice(), ...(ngDevMode ? [{ debugName: "isTouchDevice" }] : []));
|
|
3377
|
+
//#endregion
|
|
3378
|
+
//#region ---- Computed Signals ----
|
|
3379
|
+
/**
|
|
3380
|
+
* Whether the screen size is Small
|
|
3381
|
+
*/
|
|
3382
|
+
this.isSmall = computed(() => this.screenSize() === AXPScreenSize.Small, ...(ngDevMode ? [{ debugName: "isSmall" }] : []));
|
|
3383
|
+
/**
|
|
3384
|
+
* Whether the screen size is Medium
|
|
3385
|
+
*/
|
|
3386
|
+
this.isMedium = computed(() => this.screenSize() === AXPScreenSize.Medium, ...(ngDevMode ? [{ debugName: "isMedium" }] : []));
|
|
3387
|
+
/**
|
|
3388
|
+
* Whether the screen size is Large
|
|
3389
|
+
*/
|
|
3390
|
+
this.isLarge = computed(() => this.screenSize() === AXPScreenSize.Large, ...(ngDevMode ? [{ debugName: "isLarge" }] : []));
|
|
3391
|
+
/**
|
|
3392
|
+
* Whether the device is Mobile
|
|
3393
|
+
*/
|
|
3394
|
+
this.isMobileDevice = computed(() => this.deviceType() === AXPDeviceType.Mobile, ...(ngDevMode ? [{ debugName: "isMobileDevice" }] : []));
|
|
3395
|
+
/**
|
|
3396
|
+
* Whether the device is Tablet
|
|
3397
|
+
*/
|
|
3398
|
+
this.isTabletDevice = computed(() => this.deviceType() === AXPDeviceType.Tablet, ...(ngDevMode ? [{ debugName: "isTabletDevice" }] : []));
|
|
3399
|
+
/**
|
|
3400
|
+
* Whether the device is Desktop
|
|
3401
|
+
*/
|
|
3402
|
+
this.isDesktopDevice = computed(() => this.deviceType() === AXPDeviceType.Desktop, ...(ngDevMode ? [{ debugName: "isDesktopDevice" }] : []));
|
|
3403
|
+
/**
|
|
3404
|
+
* Whether the device supports touch (alias for isTouchDevice)
|
|
3405
|
+
*/
|
|
3406
|
+
this.isTouchScreen = computed(() => this.isTouchDevice(), ...(ngDevMode ? [{ debugName: "isTouchScreen" }] : []));
|
|
3407
|
+
//#endregion
|
|
3408
|
+
//#region ---- Private Properties ----
|
|
3409
|
+
this._resizeListener = null;
|
|
3410
|
+
this._setupResizeListener();
|
|
3411
|
+
}
|
|
3412
|
+
//#endregion
|
|
3413
|
+
//#region ---- Private Methods ----
|
|
3414
|
+
/**
|
|
3415
|
+
* Update screen size and device type based on window width
|
|
3416
|
+
*/
|
|
3417
|
+
_updateScreenSize() {
|
|
3418
|
+
const width = window.innerWidth;
|
|
3419
|
+
let newScreenSize;
|
|
3420
|
+
if (width <= 600) {
|
|
3421
|
+
newScreenSize = AXPScreenSize.Small;
|
|
3422
|
+
}
|
|
3423
|
+
else if (width <= 1024) {
|
|
3424
|
+
newScreenSize = AXPScreenSize.Medium;
|
|
3425
|
+
}
|
|
3426
|
+
else {
|
|
3427
|
+
newScreenSize = AXPScreenSize.Large;
|
|
3428
|
+
}
|
|
3429
|
+
// Determine device type based on width to keep it reactive to devtools emulation
|
|
3430
|
+
let newDeviceType;
|
|
3431
|
+
if (width <= 600) {
|
|
3432
|
+
newDeviceType = AXPDeviceType.Mobile;
|
|
3433
|
+
}
|
|
3434
|
+
else if (width <= 1024) {
|
|
3435
|
+
newDeviceType = AXPDeviceType.Tablet;
|
|
3436
|
+
}
|
|
3437
|
+
else {
|
|
3438
|
+
newDeviceType = AXPDeviceType.Desktop;
|
|
3439
|
+
}
|
|
3440
|
+
if (newScreenSize !== this.screenSize() || newDeviceType !== this.deviceType()) {
|
|
3441
|
+
this.screenSize.set(newScreenSize);
|
|
3442
|
+
this.deviceType.set(newDeviceType);
|
|
3443
|
+
}
|
|
3444
|
+
}
|
|
3445
|
+
/**
|
|
3446
|
+
* Set up event listener for window resize
|
|
3447
|
+
*/
|
|
3448
|
+
_setupResizeListener() {
|
|
3449
|
+
this._resizeListener = fromEvent(window, 'resize')
|
|
3450
|
+
.pipe(debounceTime(250)) // 250ms debounce delay
|
|
3451
|
+
.subscribe(() => {
|
|
3452
|
+
this._updateScreenSize();
|
|
3453
|
+
});
|
|
3454
|
+
}
|
|
3455
|
+
/**
|
|
3456
|
+
* Remove event listener for window resize
|
|
3457
|
+
*/
|
|
3458
|
+
_removeResizeListener() {
|
|
3459
|
+
if (this._resizeListener) {
|
|
3460
|
+
this._resizeListener.unsubscribe();
|
|
3461
|
+
this._resizeListener = null;
|
|
3462
|
+
}
|
|
3463
|
+
}
|
|
3464
|
+
//#endregion
|
|
3465
|
+
//#region ---- Public Methods ----
|
|
3466
|
+
/**
|
|
3467
|
+
* Clean up resources when service is destroyed
|
|
3468
|
+
*/
|
|
3469
|
+
destroy() {
|
|
3470
|
+
this._removeResizeListener();
|
|
3471
|
+
}
|
|
3472
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDeviceService, deps: [], target: i0.ɵɵFactoryTarget.Injectable }); }
|
|
3473
|
+
static { this.ɵprov = i0.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDeviceService, providedIn: 'root' }); }
|
|
3474
|
+
}
|
|
3475
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "20.3.12", ngImport: i0, type: AXPDeviceService, decorators: [{
|
|
3476
|
+
type: Injectable,
|
|
3477
|
+
args: [{
|
|
3478
|
+
providedIn: 'root',
|
|
3479
|
+
}]
|
|
3480
|
+
}], ctorParameters: () => [] });
|
|
3481
|
+
|
|
3303
3482
|
/**
|
|
3304
3483
|
* Service for applying and resetting text highlighting within specified HTML elements.
|
|
3305
3484
|
*/
|
|
@@ -3429,5 +3608,5 @@ function generateKebabCase(title) {
|
|
|
3429
3608
|
* Generated bundle index. Do not edit.
|
|
3430
3609
|
*/
|
|
3431
3610
|
|
|
3432
|
-
export { AXHighlightService, AXPActivityLogProvider, AXPActivityLogService, AXPAppStartUpProvider, AXPAppStartUpService, AXPBroadcastEventService, AXPColorPaletteProvider, AXPColorPaletteService, AXPComponentLogoConfig, AXPContentCheckerDirective, AXPContextChangeEvent, AXPContextStore, AXPCountdownPipe, AXPDataGenerator, AXPDataSourceDefinitionProviderService, AXPDblClickDirective, AXPDefaultColorPalettesProvider, AXPDistributedEventListenerService, AXPElementDataDirective, AXPExportTemplateToken, AXPExpressionEvaluatorScopeProviderContext, AXPExpressionEvaluatorScopeProviderService, AXPExpressionEvaluatorService, AXPGridLayoutDirective, AXPHookService, AXPImageUrlLogoConfig, AXPPlatformScope, AXPStatusDefinitionProviderService, AXPStatusProvider, AXPSystemActionType, AXPSystemActions, AXPSystemStatusType, AXPSystemStatuses, AXPTagProvider, AXPTagService, AXP_ACTIVITY_LOG_PROVIDER, AXP_COLOR_PALETTE_PROVIDER, AXP_DATASOURCE_DEFINITION_PROVIDER, AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, AXP_STATUS_PROVIDERS, AXP_TAG_PROVIDER, applyFilterArray, applyPagination, applyQueryArray, applySortArray, applySystemActionDefault, cleanDeep, extractNestedFieldsWildcard, extractTextFromHtml, extractValue, generateKebabCase, getActionButton, getChangedPaths, getDetailedChanges, getEnumValues, getNestedKeys, getSmart, getStatusInfo, getSystemActions, getSystemStatus, objectKeyValueTransforms, resolveActionLook, resolvePlatformScopeKey, resolvePlatformScopeName, resolveStatusLook, setSmart, systemStatusToDefinition };
|
|
3611
|
+
export { AXHighlightService, AXPActivityLogProvider, AXPActivityLogService, AXPAppStartUpProvider, AXPAppStartUpService, AXPBroadcastEventService, AXPColorPaletteProvider, AXPColorPaletteService, AXPComponentLogoConfig, AXPContentCheckerDirective, AXPContextChangeEvent, AXPContextStore, AXPCountdownPipe, AXPDataGenerator, AXPDataSourceDefinitionProviderService, AXPDblClickDirective, AXPDefaultColorPalettesProvider, AXPDeviceService, AXPDeviceType, AXPDistributedEventListenerService, AXPElementDataDirective, AXPExportTemplateToken, AXPExpressionEvaluatorScopeProviderContext, AXPExpressionEvaluatorScopeProviderService, AXPExpressionEvaluatorService, AXPGridLayoutDirective, AXPHookService, AXPImageUrlLogoConfig, AXPPlatformScope, AXPScreenSize, AXPStatusDefinitionProviderService, AXPStatusProvider, AXPSystemActionType, AXPSystemActions, AXPSystemStatusType, AXPSystemStatuses, AXPTagProvider, AXPTagService, AXP_ACTIVITY_LOG_PROVIDER, AXP_COLOR_PALETTE_PROVIDER, AXP_DATASOURCE_DEFINITION_PROVIDER, AXP_DISTRIBUTED_EVENT_LISTENER_PROVIDER, AXP_EXPRESSION_EVALUATOR_SCOPE_PROVIDER, AXP_STATUS_PROVIDERS, AXP_TAG_PROVIDER, applyFilterArray, applyPagination, applyQueryArray, applySortArray, applySystemActionDefault, cleanDeep, extractNestedFieldsWildcard, extractTextFromHtml, extractValue, generateKebabCase, getActionButton, getChangedPaths, getDetailedChanges, getEnumValues, getNestedKeys, getSmart, getStatusInfo, getSystemActions, getSystemStatus, objectKeyValueTransforms, resolveActionLook, resolvePlatformScopeKey, resolvePlatformScopeName, resolveStatusLook, setSmart, systemStatusToDefinition };
|
|
3433
3612
|
//# sourceMappingURL=acorex-platform-core.mjs.map
|