@acorex/platform 20.6.0-next.8 → 20.6.0
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/common/index.d.ts +9 -2
- package/core/index.d.ts +209 -55
- package/fesm2022/acorex-platform-common.mjs.map +1 -1
- package/fesm2022/acorex-platform-core.mjs +225 -24
- package/fesm2022/acorex-platform-core.mjs.map +1 -1
- package/fesm2022/acorex-platform-domain.mjs +49 -4
- package/fesm2022/acorex-platform-domain.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-builder.mjs +39 -118
- package/fesm2022/acorex-platform-layout-builder.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-components.mjs +1011 -257
- package/fesm2022/acorex-platform-layout-components.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-designer.mjs +2 -2
- package/fesm2022/acorex-platform-layout-designer.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-entity.mjs +9318 -4439
- package/fesm2022/acorex-platform-layout-entity.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-views.mjs +30 -24
- package/fesm2022/acorex-platform-layout-views.mjs.map +1 -1
- package/fesm2022/acorex-platform-layout-widget-core.mjs +4 -8
- 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-tabular-data-edit-popup.component-C1l2KSDa.mjs → acorex-platform-layout-widgets-tabular-data-edit-popup.component-m8rHZP8L.mjs} +2 -2
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-m8rHZP8L.mjs.map +1 -0
- package/fesm2022/{acorex-platform-layout-widgets-tabular-data-view-popup.component-D-31ej0C.mjs → acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs} +2 -2
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-y8vjUiVs.mjs.map +1 -0
- package/fesm2022/acorex-platform-layout-widgets.mjs +2194 -1242
- package/fesm2022/acorex-platform-layout-widgets.mjs.map +1 -1
- package/fesm2022/acorex-platform-runtime.mjs +79 -3
- package/fesm2022/acorex-platform-runtime.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-mARj77Mr.mjs +136 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-mARj77Mr.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-Cym8pq0v.mjs +1543 -0
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-Cym8pq0v.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-default.mjs +124 -21
- package/fesm2022/acorex-platform-themes-default.mjs.map +1 -1
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs +55 -0
- package/fesm2022/acorex-platform-themes-shared-icon-chooser-column.component-C0EpfU2k.mjs.map +1 -0
- package/fesm2022/acorex-platform-themes-shared.mjs +15 -110
- package/fesm2022/acorex-platform-themes-shared.mjs.map +1 -1
- package/fesm2022/acorex-platform-workflow.mjs +658 -45
- package/fesm2022/acorex-platform-workflow.mjs.map +1 -1
- package/layout/builder/index.d.ts +6 -33
- package/layout/components/index.d.ts +301 -60
- package/layout/designer/index.d.ts +1 -1
- package/layout/entity/index.d.ts +650 -86
- package/layout/views/index.d.ts +5 -58
- package/layout/widget-core/index.d.ts +24 -26
- package/layout/widgets/README.md +0 -1
- package/layout/widgets/index.d.ts +139 -84
- package/package.json +9 -9
- package/runtime/index.d.ts +36 -8
- package/themes/default/index.d.ts +29 -73
- package/themes/shared/index.d.ts +1 -39
- package/workflow/index.d.ts +401 -90
- package/fesm2022/acorex-platform-layout-entity-create-entity.command-DGeylNSY.mjs +0 -52
- package/fesm2022/acorex-platform-layout-entity-create-entity.command-DGeylNSY.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-edit-popup.component-C1l2KSDa.mjs.map +0 -1
- package/fesm2022/acorex-platform-layout-widgets-tabular-data-view-popup.component-D-31ej0C.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-WbPPqDON.mjs +0 -115
- package/fesm2022/acorex-platform-themes-default-entity-master-create-view.component-WbPPqDON.mjs.map +0 -1
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CD7rJIMh.mjs +0 -803
- package/fesm2022/acorex-platform-themes-default-entity-master-list-view.component-CD7rJIMh.mjs.map +0 -1
|
@@ -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 {
|
|
@@ -1492,6 +1492,7 @@ const AXPAppStartUpProvider = provideAppInitializer(() => {
|
|
|
1492
1492
|
*/
|
|
1493
1493
|
class AXPStatusProvider {
|
|
1494
1494
|
}
|
|
1495
|
+
//#endregion
|
|
1495
1496
|
|
|
1496
1497
|
//#region ---- Injection Token ----
|
|
1497
1498
|
/**
|
|
@@ -1607,6 +1608,7 @@ var AXPSystemStatusType;
|
|
|
1607
1608
|
AXPSystemStatusType["Completed"] = "completed";
|
|
1608
1609
|
AXPSystemStatusType["Suspended"] = "suspended";
|
|
1609
1610
|
AXPSystemStatusType["Failed"] = "failed";
|
|
1611
|
+
AXPSystemStatusType["Review"] = "review";
|
|
1610
1612
|
})(AXPSystemStatusType || (AXPSystemStatusType = {}));
|
|
1611
1613
|
const i18n$1 = (key) => `@general:statuses.${key}`;
|
|
1612
1614
|
/**
|
|
@@ -1619,7 +1621,7 @@ const AXPSystemStatuses = Object.freeze({
|
|
|
1619
1621
|
name: AXPSystemStatusType.Todo,
|
|
1620
1622
|
title: i18n$1('todo.title'),
|
|
1621
1623
|
icon: 'fa-light fa-circle',
|
|
1622
|
-
color: '
|
|
1624
|
+
color: 'secondary',
|
|
1623
1625
|
description: i18n$1('todo.description'),
|
|
1624
1626
|
order: 1,
|
|
1625
1627
|
isActive: true,
|
|
@@ -1630,7 +1632,7 @@ const AXPSystemStatuses = Object.freeze({
|
|
|
1630
1632
|
name: AXPSystemStatusType.InProgress,
|
|
1631
1633
|
title: i18n$1('in-progress.title'),
|
|
1632
1634
|
icon: 'fa-light fa-play',
|
|
1633
|
-
color: '
|
|
1635
|
+
color: 'info',
|
|
1634
1636
|
description: i18n$1('in-progress.description'),
|
|
1635
1637
|
order: 2,
|
|
1636
1638
|
isActive: true,
|
|
@@ -1641,7 +1643,7 @@ const AXPSystemStatuses = Object.freeze({
|
|
|
1641
1643
|
name: AXPSystemStatusType.InReview,
|
|
1642
1644
|
title: i18n$1('in-review.title'),
|
|
1643
1645
|
icon: 'fa-light fa-eye',
|
|
1644
|
-
color: '
|
|
1646
|
+
color: 'info',
|
|
1645
1647
|
description: i18n$1('in-review.description'),
|
|
1646
1648
|
order: 3,
|
|
1647
1649
|
isActive: true,
|
|
@@ -1652,7 +1654,7 @@ const AXPSystemStatuses = Object.freeze({
|
|
|
1652
1654
|
name: AXPSystemStatusType.Blocked,
|
|
1653
1655
|
title: i18n$1('blocked.title'),
|
|
1654
1656
|
icon: 'fa-light fa-ban',
|
|
1655
|
-
color: '
|
|
1657
|
+
color: 'danger',
|
|
1656
1658
|
description: i18n$1('blocked.description'),
|
|
1657
1659
|
order: 4,
|
|
1658
1660
|
isActive: true,
|
|
@@ -1663,7 +1665,7 @@ const AXPSystemStatuses = Object.freeze({
|
|
|
1663
1665
|
name: AXPSystemStatusType.Done,
|
|
1664
1666
|
title: i18n$1('done.title'),
|
|
1665
1667
|
icon: 'fa-light fa-check-circle',
|
|
1666
|
-
color: '
|
|
1668
|
+
color: 'success',
|
|
1667
1669
|
description: i18n$1('done.description'),
|
|
1668
1670
|
order: 5,
|
|
1669
1671
|
isActive: true,
|
|
@@ -1674,7 +1676,7 @@ const AXPSystemStatuses = Object.freeze({
|
|
|
1674
1676
|
name: AXPSystemStatusType.Cancelled,
|
|
1675
1677
|
title: i18n$1('cancelled.title'),
|
|
1676
1678
|
icon: 'fa-light fa-times-circle',
|
|
1677
|
-
color: '
|
|
1679
|
+
color: 'neutral',
|
|
1678
1680
|
description: i18n$1('cancelled.description'),
|
|
1679
1681
|
order: 6,
|
|
1680
1682
|
isActive: true,
|
|
@@ -1685,7 +1687,7 @@ const AXPSystemStatuses = Object.freeze({
|
|
|
1685
1687
|
name: AXPSystemStatusType.Draft,
|
|
1686
1688
|
title: i18n$1('draft.title'),
|
|
1687
1689
|
icon: 'fa-light fa-file-pen',
|
|
1688
|
-
color: '
|
|
1690
|
+
color: 'neutral',
|
|
1689
1691
|
description: i18n$1('draft.description'),
|
|
1690
1692
|
order: 1,
|
|
1691
1693
|
isActive: true,
|
|
@@ -1696,7 +1698,7 @@ const AXPSystemStatuses = Object.freeze({
|
|
|
1696
1698
|
name: AXPSystemStatusType.PendingReview,
|
|
1697
1699
|
title: i18n$1('pending-review.title'),
|
|
1698
1700
|
icon: 'fa-light fa-clock',
|
|
1699
|
-
color: '
|
|
1701
|
+
color: 'warning',
|
|
1700
1702
|
description: i18n$1('pending-review.description'),
|
|
1701
1703
|
order: 2,
|
|
1702
1704
|
isActive: true,
|
|
@@ -1707,7 +1709,7 @@ const AXPSystemStatuses = Object.freeze({
|
|
|
1707
1709
|
name: AXPSystemStatusType.Approved,
|
|
1708
1710
|
title: i18n$1('approved.title'),
|
|
1709
1711
|
icon: 'fa-light fa-check-circle',
|
|
1710
|
-
color: '
|
|
1712
|
+
color: 'success',
|
|
1711
1713
|
description: i18n$1('approved.description'),
|
|
1712
1714
|
order: 3,
|
|
1713
1715
|
isActive: true,
|
|
@@ -1718,7 +1720,7 @@ const AXPSystemStatuses = Object.freeze({
|
|
|
1718
1720
|
name: AXPSystemStatusType.Published,
|
|
1719
1721
|
title: i18n$1('published.title'),
|
|
1720
1722
|
icon: 'fa-light fa-globe',
|
|
1721
|
-
color: '
|
|
1723
|
+
color: 'primary',
|
|
1722
1724
|
description: i18n$1('published.description'),
|
|
1723
1725
|
order: 4,
|
|
1724
1726
|
isActive: true,
|
|
@@ -1729,7 +1731,7 @@ const AXPSystemStatuses = Object.freeze({
|
|
|
1729
1731
|
name: AXPSystemStatusType.Archived,
|
|
1730
1732
|
title: i18n$1('archived.title'),
|
|
1731
1733
|
icon: 'fa-light fa-archive',
|
|
1732
|
-
color: '
|
|
1734
|
+
color: 'neutral',
|
|
1733
1735
|
description: i18n$1('archived.description'),
|
|
1734
1736
|
order: 5,
|
|
1735
1737
|
isActive: true,
|
|
@@ -1740,7 +1742,7 @@ const AXPSystemStatuses = Object.freeze({
|
|
|
1740
1742
|
name: AXPSystemStatusType.Rejected,
|
|
1741
1743
|
title: i18n$1('rejected.title'),
|
|
1742
1744
|
icon: 'fa-light fa-times-circle',
|
|
1743
|
-
color: '
|
|
1745
|
+
color: 'danger',
|
|
1744
1746
|
description: i18n$1('rejected.description'),
|
|
1745
1747
|
order: 6,
|
|
1746
1748
|
isActive: true,
|
|
@@ -1751,7 +1753,7 @@ const AXPSystemStatuses = Object.freeze({
|
|
|
1751
1753
|
name: AXPSystemStatusType.Active,
|
|
1752
1754
|
title: i18n$1('active.title'),
|
|
1753
1755
|
icon: 'fa-light fa-check-circle',
|
|
1754
|
-
color: '
|
|
1756
|
+
color: 'success',
|
|
1755
1757
|
description: i18n$1('active.description'),
|
|
1756
1758
|
order: 1,
|
|
1757
1759
|
isActive: true,
|
|
@@ -1762,7 +1764,7 @@ const AXPSystemStatuses = Object.freeze({
|
|
|
1762
1764
|
name: AXPSystemStatusType.Inactive,
|
|
1763
1765
|
title: i18n$1('inactive.title'),
|
|
1764
1766
|
icon: 'fa-light fa-circle',
|
|
1765
|
-
color: '
|
|
1767
|
+
color: 'secondary',
|
|
1766
1768
|
description: i18n$1('inactive.description'),
|
|
1767
1769
|
order: 2,
|
|
1768
1770
|
isActive: true,
|
|
@@ -1773,7 +1775,7 @@ const AXPSystemStatuses = Object.freeze({
|
|
|
1773
1775
|
name: AXPSystemStatusType.Pending,
|
|
1774
1776
|
title: i18n$1('pending.title'),
|
|
1775
1777
|
icon: 'fa-light fa-clock',
|
|
1776
|
-
color: '
|
|
1778
|
+
color: 'warning',
|
|
1777
1779
|
description: i18n$1('pending.description'),
|
|
1778
1780
|
order: 1,
|
|
1779
1781
|
isActive: true,
|
|
@@ -1784,7 +1786,7 @@ const AXPSystemStatuses = Object.freeze({
|
|
|
1784
1786
|
name: AXPSystemStatusType.Completed,
|
|
1785
1787
|
title: i18n$1('completed.title'),
|
|
1786
1788
|
icon: 'fa-light fa-check-circle',
|
|
1787
|
-
color: '
|
|
1789
|
+
color: 'success',
|
|
1788
1790
|
description: i18n$1('completed.description'),
|
|
1789
1791
|
order: 10,
|
|
1790
1792
|
isActive: true,
|
|
@@ -1795,7 +1797,7 @@ const AXPSystemStatuses = Object.freeze({
|
|
|
1795
1797
|
name: AXPSystemStatusType.Suspended,
|
|
1796
1798
|
title: i18n$1('suspended.title'),
|
|
1797
1799
|
icon: 'fa-light fa-pause-circle',
|
|
1798
|
-
color: '
|
|
1800
|
+
color: 'neutral',
|
|
1799
1801
|
description: i18n$1('suspended.description'),
|
|
1800
1802
|
order: 5,
|
|
1801
1803
|
isActive: true,
|
|
@@ -1806,13 +1808,22 @@ const AXPSystemStatuses = Object.freeze({
|
|
|
1806
1808
|
name: AXPSystemStatusType.Failed,
|
|
1807
1809
|
title: i18n$1('failed.title'),
|
|
1808
1810
|
icon: 'fa-light fa-xmark-circle',
|
|
1809
|
-
color: '
|
|
1811
|
+
color: 'danger',
|
|
1810
1812
|
description: i18n$1('failed.description'),
|
|
1811
1813
|
order: 10,
|
|
1812
1814
|
isActive: true,
|
|
1813
1815
|
isInitial: false,
|
|
1814
1816
|
isFinal: true,
|
|
1815
1817
|
},
|
|
1818
|
+
Review: {
|
|
1819
|
+
name: AXPSystemStatusType.Review,
|
|
1820
|
+
title: i18n$1('review.title'),
|
|
1821
|
+
icon: 'fa-light fa-eye',
|
|
1822
|
+
color: 'info',
|
|
1823
|
+
description: i18n$1('review.description'),
|
|
1824
|
+
order: 3,
|
|
1825
|
+
isActive: true,
|
|
1826
|
+
},
|
|
1816
1827
|
});
|
|
1817
1828
|
/**
|
|
1818
1829
|
* Get system status definition by type
|
|
@@ -1844,7 +1855,7 @@ function resolveStatusLook(statusType) {
|
|
|
1844
1855
|
}
|
|
1845
1856
|
// Fallback for unknown statuses
|
|
1846
1857
|
return {
|
|
1847
|
-
color: '
|
|
1858
|
+
color: 'secondary',
|
|
1848
1859
|
icon: ''
|
|
1849
1860
|
};
|
|
1850
1861
|
}
|
|
@@ -1868,7 +1879,7 @@ function getStatusInfo(statusType) {
|
|
|
1868
1879
|
title: statusType,
|
|
1869
1880
|
description: `Status: ${statusType}`,
|
|
1870
1881
|
icon: '',
|
|
1871
|
-
color: '
|
|
1882
|
+
color: 'secondary'
|
|
1872
1883
|
};
|
|
1873
1884
|
}
|
|
1874
1885
|
/**
|
|
@@ -2800,7 +2811,6 @@ const AXPSystemActions = Object.freeze({
|
|
|
2800
2811
|
key: AXPSystemActionType.Cancel,
|
|
2801
2812
|
title: i18n('cancel.title'),
|
|
2802
2813
|
icon: 'fa-light fa-xmark',
|
|
2803
|
-
color: 'danger',
|
|
2804
2814
|
critical: true,
|
|
2805
2815
|
descriptions: {
|
|
2806
2816
|
title: i18n('cancel.title'),
|
|
@@ -3290,6 +3300,185 @@ async function applyQueryArray(dataArray, query) {
|
|
|
3290
3300
|
};
|
|
3291
3301
|
}
|
|
3292
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
|
+
|
|
3293
3482
|
/**
|
|
3294
3483
|
* Service for applying and resetting text highlighting within specified HTML elements.
|
|
3295
3484
|
*/
|
|
@@ -3402,10 +3591,22 @@ function extractTextFromHtml(value) {
|
|
|
3402
3591
|
div.innerHTML = value;
|
|
3403
3592
|
return div.textContent || div.innerText || '';
|
|
3404
3593
|
}
|
|
3594
|
+
/**
|
|
3595
|
+
* Generate kebab-case group name from title
|
|
3596
|
+
*/
|
|
3597
|
+
function generateKebabCase(title) {
|
|
3598
|
+
return title
|
|
3599
|
+
.toLowerCase()
|
|
3600
|
+
.trim()
|
|
3601
|
+
.replace(/[^a-z0-9\s-]/g, '') // Remove special characters
|
|
3602
|
+
.replace(/\s+/g, '-') // Replace spaces with hyphens
|
|
3603
|
+
.replace(/-+/g, '-') // Replace multiple hyphens with single
|
|
3604
|
+
.replace(/^-+|-+$/g, ''); // Remove leading/trailing hyphens
|
|
3605
|
+
}
|
|
3405
3606
|
|
|
3406
3607
|
/**
|
|
3407
3608
|
* Generated bundle index. Do not edit.
|
|
3408
3609
|
*/
|
|
3409
3610
|
|
|
3410
|
-
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, 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 };
|
|
3411
3612
|
//# sourceMappingURL=acorex-platform-core.mjs.map
|