@dereekb/dbx-core 13.9.0 → 13.10.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.
|
@@ -555,6 +555,11 @@ class DbxActionContextStoreSourceInstance {
|
|
|
555
555
|
*
|
|
556
556
|
* Can be disabled by setting `dbxActionAutoModify` to `false`.
|
|
557
557
|
*
|
|
558
|
+
* @dbxAction
|
|
559
|
+
* @dbxActionSlug auto-modify
|
|
560
|
+
* @dbxActionStateInteraction IDLE
|
|
561
|
+
* @dbxActionConsumesContext
|
|
562
|
+
*
|
|
558
563
|
* @example
|
|
559
564
|
* ```html
|
|
560
565
|
* <div dbxAction>
|
|
@@ -616,6 +621,11 @@ const DBX_ACTION_AUTO_TRIGGER_INSTANT_TRIGGER_DEBOUNCE = 10;
|
|
|
616
621
|
* Useful for auto-save scenarios where data changes should automatically submit without
|
|
617
622
|
* requiring an explicit user action. Use with care to avoid triggering loops.
|
|
618
623
|
*
|
|
624
|
+
* @dbxAction
|
|
625
|
+
* @dbxActionSlug auto-trigger
|
|
626
|
+
* @dbxActionStateInteraction IDLE, TRIGGERED
|
|
627
|
+
* @dbxActionConsumesContext
|
|
628
|
+
*
|
|
619
629
|
* @example
|
|
620
630
|
* ```html
|
|
621
631
|
* <div dbxAction>
|
|
@@ -788,39 +798,62 @@ function dbxActionWorkProgress(workOrWorkProgress, progressPercent) {
|
|
|
788
798
|
}
|
|
789
799
|
/**
|
|
790
800
|
* Used by ActionContextState to denote what state the action is in.
|
|
801
|
+
*
|
|
802
|
+
* @dbxActionStateEnum
|
|
791
803
|
*/
|
|
792
804
|
var DbxActionState;
|
|
793
805
|
(function (DbxActionState) {
|
|
794
806
|
/**
|
|
795
807
|
* No action in progress. Waiting for the trigger.
|
|
808
|
+
*
|
|
809
|
+
* @dbxActionStateTransitionsFrom RESOLVED, REJECTED, DISABLED
|
|
810
|
+
* @dbxActionStateTransitionsTo TRIGGERED, DISABLED
|
|
796
811
|
*/
|
|
797
812
|
DbxActionState["IDLE"] = "idle";
|
|
798
813
|
/**
|
|
799
814
|
* Idle state that can be set to show that the source is not yet ready.
|
|
815
|
+
*
|
|
816
|
+
* @dbxActionStateTransitionsFrom IDLE, RESOLVED, REJECTED
|
|
817
|
+
* @dbxActionStateTransitionsTo IDLE
|
|
800
818
|
*/
|
|
801
819
|
DbxActionState["DISABLED"] = "disabled";
|
|
802
820
|
/**
|
|
803
821
|
* The action was triggered. We wait (and allow) the value to be updated.
|
|
822
|
+
*
|
|
823
|
+
* @dbxActionStateTransitionsFrom IDLE
|
|
824
|
+
* @dbxActionStateTransitionsTo VALUE_READY
|
|
804
825
|
*/
|
|
805
826
|
DbxActionState["TRIGGERED"] = "triggered";
|
|
806
827
|
/**
|
|
807
828
|
* The trigger was accepted and the value is updated. It should begin working immediately.
|
|
808
829
|
*
|
|
809
830
|
* ValueReady cannot be set until triggered is set.
|
|
831
|
+
*
|
|
832
|
+
* @dbxActionStateTransitionsFrom TRIGGERED
|
|
833
|
+
* @dbxActionStateTransitionsTo WORKING
|
|
810
834
|
*/
|
|
811
835
|
DbxActionState["VALUE_READY"] = "valueReady";
|
|
812
836
|
/**
|
|
813
837
|
* The action is in progress.
|
|
838
|
+
*
|
|
839
|
+
* @dbxActionStateTransitionsFrom VALUE_READY
|
|
840
|
+
* @dbxActionStateTransitionsTo RESOLVED, REJECTED
|
|
814
841
|
*/
|
|
815
842
|
DbxActionState["WORKING"] = "working";
|
|
816
843
|
/**
|
|
817
844
|
* The trigger, action, or value was rejected due to an error or other issue.
|
|
818
845
|
*
|
|
819
846
|
* An error may be specified optionally.
|
|
847
|
+
*
|
|
848
|
+
* @dbxActionStateTransitionsFrom WORKING
|
|
849
|
+
* @dbxActionStateTransitionsTo IDLE, DISABLED
|
|
820
850
|
*/
|
|
821
851
|
DbxActionState["REJECTED"] = "rejected";
|
|
822
852
|
/**
|
|
823
853
|
* The action resolved without issue.
|
|
854
|
+
*
|
|
855
|
+
* @dbxActionStateTransitionsFrom WORKING
|
|
856
|
+
* @dbxActionStateTransitionsTo IDLE, DISABLED
|
|
824
857
|
*/
|
|
825
858
|
DbxActionState["RESOLVED"] = "resolved";
|
|
826
859
|
})(DbxActionState || (DbxActionState = {}));
|
|
@@ -1010,7 +1043,7 @@ function loadingStateForActionContextState(state) {
|
|
|
1010
1043
|
case DbxActionState.TRIGGERED:
|
|
1011
1044
|
case DbxActionState.VALUE_READY:
|
|
1012
1045
|
case DbxActionState.WORKING:
|
|
1013
|
-
loadingState = beginLoading(state.workProgress
|
|
1046
|
+
loadingState = beginLoading(state.workProgress == null ? undefined : { loadingProgress: state.workProgress });
|
|
1014
1047
|
break;
|
|
1015
1048
|
}
|
|
1016
1049
|
return loadingState;
|
|
@@ -1051,6 +1084,13 @@ const ACTION_CONTEXT_STORE_LOCKSET_DESTROY_DELAY_TIME = 2000;
|
|
|
1051
1084
|
* IDLE/DISABLED -> TRIGGERED -> VALUE_READY -> WORKING -> RESOLVED | REJECTED
|
|
1052
1085
|
* ```
|
|
1053
1086
|
*
|
|
1087
|
+
* @dbxAction
|
|
1088
|
+
* @dbxActionSlug action-context-store
|
|
1089
|
+
* @dbxActionRole store
|
|
1090
|
+
* @dbxActionDisabledKey dbx_action_disabled
|
|
1091
|
+
* @dbxActionDisabledKey dbx_action_enforce_modified
|
|
1092
|
+
* @dbxActionSkillRefs dbx__ref__dbx-component-patterns
|
|
1093
|
+
*
|
|
1054
1094
|
* @typeParam T - The input value type provided after triggering.
|
|
1055
1095
|
* @typeParam O - The output result type produced on resolution.
|
|
1056
1096
|
*
|
|
@@ -1504,6 +1544,11 @@ function provideSecondaryActionStoreSource(sourceType) {
|
|
|
1504
1544
|
* On destruction, the directive coordinates cleanup through a {@link LockSet} to ensure
|
|
1505
1545
|
* in-flight operations complete before the store is torn down.
|
|
1506
1546
|
*
|
|
1547
|
+
* @dbxAction
|
|
1548
|
+
* @dbxActionSlug action
|
|
1549
|
+
* @dbxActionStateInteraction IDLE
|
|
1550
|
+
* @dbxActionProducesContext
|
|
1551
|
+
*
|
|
1507
1552
|
* @example
|
|
1508
1553
|
* ```html
|
|
1509
1554
|
* <div dbxAction>
|
|
@@ -1558,6 +1603,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
1558
1603
|
* This is useful when an action context is created programmatically (e.g., via
|
|
1559
1604
|
* {@link DbxActionContextMachine}) and needs to be shared with template-based directives.
|
|
1560
1605
|
*
|
|
1606
|
+
* @dbxAction
|
|
1607
|
+
* @dbxActionSlug source
|
|
1608
|
+
*
|
|
1561
1609
|
* @example
|
|
1562
1610
|
* ```html
|
|
1563
1611
|
* <!-- Forward a programmatic action source to template directives -->
|
|
@@ -1592,6 +1640,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
1592
1640
|
* Subscribes to the parent action's full state stream and prints each state snapshot
|
|
1593
1641
|
* via `console.log`. Useful during development to inspect the action lifecycle transitions.
|
|
1594
1642
|
*
|
|
1643
|
+
* @dbxAction
|
|
1644
|
+
* @dbxActionSlug logger
|
|
1645
|
+
* @dbxActionStateInteraction IDLE, TRIGGERED, VALUE_READY, WORKING, RESOLVED, REJECTED, DISABLED
|
|
1646
|
+
* @dbxActionConsumesContext
|
|
1647
|
+
*
|
|
1595
1648
|
* @example
|
|
1596
1649
|
* ```html
|
|
1597
1650
|
* <div dbxAction>
|
|
@@ -1697,6 +1750,9 @@ function actionContextStoreSourceMap() {
|
|
|
1697
1750
|
*
|
|
1698
1751
|
* The map is exported as `actionMap` for template reference access.
|
|
1699
1752
|
*
|
|
1753
|
+
* @dbxAction
|
|
1754
|
+
* @dbxActionSlug context-map
|
|
1755
|
+
*
|
|
1700
1756
|
* @example
|
|
1701
1757
|
* ```html
|
|
1702
1758
|
* <div dbxActionContextMap>
|
|
@@ -1939,6 +1995,11 @@ const APP_ACTION_DISABLED_DIRECTIVE_KEY = 'dbx_action_disabled';
|
|
|
1939
1995
|
*
|
|
1940
1996
|
* The disable key is automatically cleaned up on directive destruction.
|
|
1941
1997
|
*
|
|
1998
|
+
* @dbxAction
|
|
1999
|
+
* @dbxActionSlug disabled
|
|
2000
|
+
* @dbxActionStateInteraction DISABLED
|
|
2001
|
+
* @dbxActionConsumesContext
|
|
2002
|
+
*
|
|
1942
2003
|
* @example
|
|
1943
2004
|
* ```html
|
|
1944
2005
|
* <div dbxAction>
|
|
@@ -1989,6 +2050,11 @@ const APP_ACTION_DISABLED_ON_SUCCESS_DIRECTIVE_KEY = 'dbx_action_disabled_on_suc
|
|
|
1989
2050
|
*
|
|
1990
2051
|
* The disable key is automatically cleaned up on directive destruction.
|
|
1991
2052
|
*
|
|
2053
|
+
* @dbxAction
|
|
2054
|
+
* @dbxActionSlug disabled-on-success
|
|
2055
|
+
* @dbxActionStateInteraction RESOLVED, DISABLED
|
|
2056
|
+
* @dbxActionConsumesContext
|
|
2057
|
+
*
|
|
1992
2058
|
* @example
|
|
1993
2059
|
* ```html
|
|
1994
2060
|
* <div dbxAction>
|
|
@@ -2134,6 +2200,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
2134
2200
|
* called with the value and a work context. The work function is responsible for performing
|
|
2135
2201
|
* the async operation and signaling success or failure through the context.
|
|
2136
2202
|
*
|
|
2203
|
+
* @dbxAction
|
|
2204
|
+
* @dbxActionSlug handler
|
|
2205
|
+
* @dbxActionStateInteraction VALUE_READY, WORKING, RESOLVED, REJECTED
|
|
2206
|
+
* @dbxActionConsumesContext
|
|
2207
|
+
* @dbxActionSkillRefs dbx__ref__dbx-component-patterns, dbx__guide__action-analytics
|
|
2208
|
+
*
|
|
2137
2209
|
* @example
|
|
2138
2210
|
* ```html
|
|
2139
2211
|
* <div dbxAction>
|
|
@@ -2169,6 +2241,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
2169
2241
|
* The provided value (or the result of calling the getter/factory) is used directly as the
|
|
2170
2242
|
* action's result, with the working/success lifecycle handled automatically.
|
|
2171
2243
|
*
|
|
2244
|
+
* @dbxAction
|
|
2245
|
+
* @dbxActionSlug handler-value
|
|
2246
|
+
* @dbxActionStateInteraction VALUE_READY, WORKING, RESOLVED
|
|
2247
|
+
* @dbxActionConsumesContext
|
|
2248
|
+
*
|
|
2172
2249
|
* @example
|
|
2173
2250
|
* ```html
|
|
2174
2251
|
* <div dbxAction>
|
|
@@ -2438,6 +2515,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
2438
2515
|
* This is useful for performing side effects like logging, showing error toasts, or
|
|
2439
2516
|
* handling specific error conditions programmatically.
|
|
2440
2517
|
*
|
|
2518
|
+
* @dbxAction
|
|
2519
|
+
* @dbxActionSlug error-handler
|
|
2520
|
+
* @dbxActionStateInteraction REJECTED
|
|
2521
|
+
* @dbxActionConsumesContext
|
|
2522
|
+
*
|
|
2441
2523
|
* @example
|
|
2442
2524
|
* ```html
|
|
2443
2525
|
* <div dbxAction>
|
|
@@ -2486,6 +2568,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
2486
2568
|
* The input filters out null/undefined values, waiting until a non-null value is provided.
|
|
2487
2569
|
* If you need to pass null/undefined as valid action values, use {@link DbxActionValueTriggerDirective} instead.
|
|
2488
2570
|
*
|
|
2571
|
+
* @dbxAction
|
|
2572
|
+
* @dbxActionSlug value
|
|
2573
|
+
* @dbxActionStateInteraction TRIGGERED, VALUE_READY
|
|
2574
|
+
* @dbxActionConsumesContext
|
|
2575
|
+
*
|
|
2489
2576
|
* @example
|
|
2490
2577
|
* ```html
|
|
2491
2578
|
* <div dbxAction>
|
|
@@ -2601,6 +2688,11 @@ const APP_ACTION_ENFORCE_MODIFIED_DIRECTIVE_KEY = 'dbx_action_enforce_modified';
|
|
|
2601
2688
|
*
|
|
2602
2689
|
* The disable key is automatically cleaned up on directive destruction.
|
|
2603
2690
|
*
|
|
2691
|
+
* @dbxAction
|
|
2692
|
+
* @dbxActionSlug enforce-modified
|
|
2693
|
+
* @dbxActionStateInteraction IDLE, DISABLED
|
|
2694
|
+
* @dbxActionConsumesContext
|
|
2695
|
+
*
|
|
2604
2696
|
* @example
|
|
2605
2697
|
* ```html
|
|
2606
2698
|
* <div dbxAction>
|
|
@@ -2789,6 +2881,11 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
2789
2881
|
* Supports optional `isModified` and `isEqual` functions to control whether the retrieved
|
|
2790
2882
|
* value should proceed to `readyValue` or be rejected.
|
|
2791
2883
|
*
|
|
2884
|
+
* @dbxAction
|
|
2885
|
+
* @dbxActionSlug value-getter
|
|
2886
|
+
* @dbxActionStateInteraction TRIGGERED, VALUE_READY
|
|
2887
|
+
* @dbxActionConsumesContext
|
|
2888
|
+
*
|
|
2792
2889
|
* @example
|
|
2793
2890
|
* ```html
|
|
2794
2891
|
* <div dbxAction>
|
|
@@ -6444,6 +6541,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
6444
6541
|
* Useful for normalizing values that may be plain values, getter functions, or Observables
|
|
6445
6542
|
* into a consistent Observable stream for use with the `async` pipe.
|
|
6446
6543
|
*
|
|
6544
|
+
* @dbxPipe
|
|
6545
|
+
* @dbxPipeSlug as-observable
|
|
6546
|
+
* @dbxPipeCategory async
|
|
6447
6547
|
* @example
|
|
6448
6548
|
* ```html
|
|
6449
6549
|
* <span>{{ valueOrGetter | asObservable | async }}</span>
|
|
@@ -6469,6 +6569,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
6469
6569
|
*
|
|
6470
6570
|
* Displays only the date portion (no times). Returns a fallback string when the input is `null` or `undefined`.
|
|
6471
6571
|
*
|
|
6572
|
+
* @dbxPipe
|
|
6573
|
+
* @dbxPipeSlug date-day-range
|
|
6574
|
+
* @dbxPipeCategory date
|
|
6575
|
+
* @dbxPipeRelated date-time-range, date-day-time-range
|
|
6472
6576
|
* @example
|
|
6473
6577
|
* ```html
|
|
6474
6578
|
* <span>{{ dateRange | dateDayRange }}</span>
|
|
@@ -6500,6 +6604,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
6500
6604
|
* Returns `undefined` if the input is `null`, `undefined`, or results in an invalid date.
|
|
6501
6605
|
* Also provides a static `toJsDate()` method used by other pipes in this package.
|
|
6502
6606
|
*
|
|
6607
|
+
* @dbxPipe
|
|
6608
|
+
* @dbxPipeSlug to-js-date
|
|
6609
|
+
* @dbxPipeCategory date
|
|
6610
|
+
* @dbxPipeRelated date-distance, date-format-distance
|
|
6503
6611
|
* @example
|
|
6504
6612
|
* ```html
|
|
6505
6613
|
* <span>{{ '2024-01-05T12:00:00Z' | toJsDate | date:'short' }}</span>
|
|
@@ -6539,6 +6647,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
6539
6647
|
*
|
|
6540
6648
|
* Accepts an optional comparison date (defaults to now) and a fallback string for `null`/`undefined` input.
|
|
6541
6649
|
*
|
|
6650
|
+
* @dbxPipe
|
|
6651
|
+
* @dbxPipeSlug date-distance
|
|
6652
|
+
* @dbxPipeCategory date
|
|
6653
|
+
* @dbxPipeRelated date-range-distance, date-format-distance, time-distance
|
|
6542
6654
|
* @example
|
|
6543
6655
|
* ```html
|
|
6544
6656
|
* <span>{{ someDate | dateDistance }}</span>
|
|
@@ -6581,6 +6693,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
6581
6693
|
*
|
|
6582
6694
|
* Returns `undefined` if the input is falsy or not a valid date.
|
|
6583
6695
|
*
|
|
6696
|
+
* @dbxPipe
|
|
6697
|
+
* @dbxPipeSlug date-format-distance
|
|
6698
|
+
* @dbxPipeCategory date
|
|
6699
|
+
* @dbxPipeRelated date-distance, date-format-from-to
|
|
6584
6700
|
* @example
|
|
6585
6701
|
* ```html
|
|
6586
6702
|
* <span>{{ someDate | dateFormatDistance:'MMM d, y' }}</span>
|
|
@@ -6624,6 +6740,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
6624
6740
|
* The start date is formatted using the Angular locale-aware {@link formatDate}, and the end time
|
|
6625
6741
|
* is computed by adding the given minutes and formatted as a time-only string.
|
|
6626
6742
|
*
|
|
6743
|
+
* @dbxPipe
|
|
6744
|
+
* @dbxPipeSlug date-format-from-to
|
|
6745
|
+
* @dbxPipeCategory date
|
|
6746
|
+
* @dbxPipeRelated date-time-range, date-format-distance
|
|
6627
6747
|
* @example
|
|
6628
6748
|
* ```html
|
|
6629
6749
|
* <span>{{ eventStart | dateFormatFromTo:'MMM d, h:mm a':90 }}</span>
|
|
@@ -6662,6 +6782,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
6662
6782
|
*
|
|
6663
6783
|
* Includes both the date and time portions. Returns a fallback string when the input is `null` or `undefined`.
|
|
6664
6784
|
*
|
|
6785
|
+
* @dbxPipe
|
|
6786
|
+
* @dbxPipeSlug date-day-time-range
|
|
6787
|
+
* @dbxPipeCategory date
|
|
6788
|
+
* @dbxPipeRelated date-time-range, date-day-range
|
|
6665
6789
|
* @example
|
|
6666
6790
|
* ```html
|
|
6667
6791
|
* <span>{{ dateRange | dateDayTimeRange }}</span>
|
|
@@ -6692,6 +6816,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
6692
6816
|
*
|
|
6693
6817
|
* Displays the date and time of both the start and end. Returns a fallback string when the input is `null` or `undefined`.
|
|
6694
6818
|
*
|
|
6819
|
+
* @dbxPipe
|
|
6820
|
+
* @dbxPipeSlug date-time-range
|
|
6821
|
+
* @dbxPipeCategory date
|
|
6822
|
+
* @dbxPipeRelated date-time-range-only, date-day-range, date-day-time-range
|
|
6695
6823
|
* @example
|
|
6696
6824
|
* ```html
|
|
6697
6825
|
* <span>{{ dateRange | dateTimeRange }}</span>
|
|
@@ -6723,6 +6851,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
6723
6851
|
* This is an impure pipe that recalculates on every change detection cycle to keep the distance up to date.
|
|
6724
6852
|
* Returns a fallback string when the input is `null` or `undefined`.
|
|
6725
6853
|
*
|
|
6854
|
+
* @dbxPipe
|
|
6855
|
+
* @dbxPipeSlug date-range-distance
|
|
6856
|
+
* @dbxPipeCategory date
|
|
6857
|
+
* @dbxPipeRelated date-distance
|
|
6726
6858
|
* @example
|
|
6727
6859
|
* ```html
|
|
6728
6860
|
* <span>{{ someDate | dateRangeDistance }}</span>
|
|
@@ -6753,6 +6885,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
6753
6885
|
*
|
|
6754
6886
|
* Displays only the time portion (no date). Returns a fallback string when the input is `null` or `undefined`.
|
|
6755
6887
|
*
|
|
6888
|
+
* @dbxPipe
|
|
6889
|
+
* @dbxPipeSlug date-time-range-only
|
|
6890
|
+
* @dbxPipeCategory date
|
|
6891
|
+
* @dbxPipeRelated date-time-range
|
|
6756
6892
|
* @example
|
|
6757
6893
|
* ```html
|
|
6758
6894
|
* <span>{{ dateRange | dateTimeRangeOnly }}</span>
|
|
@@ -6785,6 +6921,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
6785
6921
|
* local time in a target timezone and need to convert it back to the system timezone.
|
|
6786
6922
|
* Returns `undefined` if either the input date or timezone is falsy.
|
|
6787
6923
|
*
|
|
6924
|
+
* @dbxPipe
|
|
6925
|
+
* @dbxPipeSlug target-date-to-system-date
|
|
6926
|
+
* @dbxPipeCategory date
|
|
6927
|
+
* @dbxPipeRelated system-date-to-target-date, timezone-abbreviation
|
|
6788
6928
|
* @example
|
|
6789
6929
|
* ```html
|
|
6790
6930
|
* <span>{{ targetDate | targetDateToSystemDate:'America/New_York' | date:'short' }}</span>
|
|
@@ -6813,6 +6953,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
6813
6953
|
* Accepts an optional {@link FormatDateRangeDistanceFunctionConfig} to customize the output format.
|
|
6814
6954
|
* Returns a fallback string when the input is `null` or `undefined`.
|
|
6815
6955
|
*
|
|
6956
|
+
* @dbxPipe
|
|
6957
|
+
* @dbxPipeSlug date-time-range-only-distance
|
|
6958
|
+
* @dbxPipeCategory date
|
|
6959
|
+
* @dbxPipeRelated date-time-range, date-range-distance
|
|
6816
6960
|
* @example
|
|
6817
6961
|
* ```html
|
|
6818
6962
|
* <span>{{ dateRange | dateTimeRangeOnlyDistance }}</span>
|
|
@@ -6848,6 +6992,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
6848
6992
|
* Defaults to the current date if no reference date is provided.
|
|
6849
6993
|
* Returns `undefined` if the timezone is falsy.
|
|
6850
6994
|
*
|
|
6995
|
+
* @dbxPipe
|
|
6996
|
+
* @dbxPipeSlug timezone-abbreviation
|
|
6997
|
+
* @dbxPipeCategory date
|
|
6998
|
+
* @dbxPipeRelated system-date-to-target-date, target-date-to-system-date
|
|
6851
6999
|
* @example
|
|
6852
7000
|
* ```html
|
|
6853
7001
|
* <span>{{ 'America/New_York' | timezoneAbbreviation }}</span>
|
|
@@ -6879,6 +7027,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
6879
7027
|
* This is useful when you have a date in the system's timezone and need to display it as if it were in the target timezone.
|
|
6880
7028
|
* Returns `undefined` if either the input date or timezone is falsy.
|
|
6881
7029
|
*
|
|
7030
|
+
* @dbxPipe
|
|
7031
|
+
* @dbxPipeSlug system-date-to-target-date
|
|
7032
|
+
* @dbxPipeCategory date
|
|
7033
|
+
* @dbxPipeRelated target-date-to-system-date, timezone-abbreviation
|
|
6882
7034
|
* @example
|
|
6883
7035
|
* ```html
|
|
6884
7036
|
* <span>{{ systemDate | systemDateToTargetDate:'America/New_York' | date:'short' }}</span>
|
|
@@ -6910,6 +7062,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
6910
7062
|
*
|
|
6911
7063
|
* A `~` prefix is added when the value is rounded up. Returns `undefined` for `null` or non-numeric input.
|
|
6912
7064
|
*
|
|
7065
|
+
* @dbxPipe
|
|
7066
|
+
* @dbxPipeSlug minutes-string
|
|
7067
|
+
* @dbxPipeCategory date
|
|
7068
|
+
* @dbxPipeRelated to-minutes
|
|
6913
7069
|
* @example
|
|
6914
7070
|
* ```html
|
|
6915
7071
|
* <span>{{ 90 | minutesString }}</span>
|
|
@@ -6962,6 +7118,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
6962
7118
|
* Otherwise, returns a human-readable distance string with suffix (e.g., "in 3 hours").
|
|
6963
7119
|
* Returns the `unavailable` string when the input is falsy.
|
|
6964
7120
|
*
|
|
7121
|
+
* @dbxPipe
|
|
7122
|
+
* @dbxPipeSlug time-countdown-distance
|
|
7123
|
+
* @dbxPipeCategory date
|
|
7124
|
+
* @dbxPipeRelated time-distance
|
|
6965
7125
|
* @example
|
|
6966
7126
|
* ```html
|
|
6967
7127
|
* <span>{{ futureDate | timeCountdownDistance }}</span>
|
|
@@ -7008,6 +7168,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
7008
7168
|
* Uses date-fns {@link formatDistance} to produce output like "3 hours ago" or "in 2 days".
|
|
7009
7169
|
* Returns the `unavailable` string when the input is falsy.
|
|
7010
7170
|
*
|
|
7171
|
+
* @dbxPipe
|
|
7172
|
+
* @dbxPipeSlug time-distance
|
|
7173
|
+
* @dbxPipeCategory date
|
|
7174
|
+
* @dbxPipeRelated date-distance, time-countdown-distance
|
|
7011
7175
|
* @example
|
|
7012
7176
|
* ```html
|
|
7013
7177
|
* <span>{{ someDate | timeDistance }}</span>
|
|
@@ -7051,6 +7215,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
7051
7215
|
*
|
|
7052
7216
|
* Returns the original value (0 or falsy) if the input is falsy.
|
|
7053
7217
|
*
|
|
7218
|
+
* @dbxPipe
|
|
7219
|
+
* @dbxPipeSlug to-minutes
|
|
7220
|
+
* @dbxPipeCategory date
|
|
7221
|
+
* @dbxPipeRelated minutes-string
|
|
7054
7222
|
* @example
|
|
7055
7223
|
* ```html
|
|
7056
7224
|
* <span>{{ 180000 | toMinutes }}</span>
|
|
@@ -7085,6 +7253,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
7085
7253
|
*
|
|
7086
7254
|
* Returns `undefined` for falsy input. If serialization fails, returns `'ERROR'` and logs the error to the console.
|
|
7087
7255
|
*
|
|
7256
|
+
* @dbxPipe
|
|
7257
|
+
* @dbxPipeSlug prettyjson
|
|
7258
|
+
* @dbxPipeCategory misc
|
|
7088
7259
|
* @example
|
|
7089
7260
|
* ```html
|
|
7090
7261
|
* <pre>{{ myObject | prettyjson }}</pre>
|
|
@@ -7093,6 +7264,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
7093
7264
|
* <pre>{{ myObject | prettyjson:4 }}</pre>
|
|
7094
7265
|
* <!-- Output: formatted JSON with 4-space indentation -->
|
|
7095
7266
|
* ```
|
|
7267
|
+
* @param spacing Indent spaces; defaults to `2`.
|
|
7096
7268
|
*/
|
|
7097
7269
|
class PrettyJsonPipe {
|
|
7098
7270
|
static toPrettyJson(input, spacing = 2) {
|
|
@@ -7127,6 +7299,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
7127
7299
|
*
|
|
7128
7300
|
* Returns the original value if the input is `null` or `undefined`.
|
|
7129
7301
|
*
|
|
7302
|
+
* @dbxPipe
|
|
7303
|
+
* @dbxPipeSlug cut-text
|
|
7304
|
+
* @dbxPipeCategory value
|
|
7305
|
+
* @dbxPipeSkillRefs dbx-value-pipes
|
|
7130
7306
|
* @example
|
|
7131
7307
|
* ```html
|
|
7132
7308
|
* <span>{{ 'Hello World' | cutText:5 }}</span>
|
|
@@ -7135,6 +7311,8 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
7135
7311
|
* <span>{{ longText | cutText:20:'--' }}</span>
|
|
7136
7312
|
* <!-- Output: "Some long text here--" -->
|
|
7137
7313
|
* ```
|
|
7314
|
+
* @param maxLength Maximum allowed length before truncation.
|
|
7315
|
+
* @param endText Suffix appended when truncation occurs.
|
|
7138
7316
|
*/
|
|
7139
7317
|
class CutTextPipe {
|
|
7140
7318
|
transform(input, maxLength, endText) {
|
|
@@ -7159,11 +7337,17 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
7159
7337
|
* for getter functions whose return value may change over time.
|
|
7160
7338
|
* Use {@link GetValueOncePipe} (`getValueOnce`) for a pure alternative when the value is static.
|
|
7161
7339
|
*
|
|
7340
|
+
* @dbxPipe
|
|
7341
|
+
* @dbxPipeSlug get-value
|
|
7342
|
+
* @dbxPipeCategory value
|
|
7343
|
+
* @dbxPipeRelated get-value-once
|
|
7344
|
+
* @dbxPipeSkillRefs dbx-value-pipes
|
|
7162
7345
|
* @example
|
|
7163
7346
|
* ```html
|
|
7164
7347
|
* <span>{{ myGetterOrValue | getValue }}</span>
|
|
7165
7348
|
* <span>{{ myGetterFn | getValue:someArg }}</span>
|
|
7166
7349
|
* ```
|
|
7350
|
+
* @param args Optional argument forwarded to the getter function.
|
|
7167
7351
|
*/
|
|
7168
7352
|
class GetValuePipe {
|
|
7169
7353
|
transform(input, args) {
|
|
@@ -7186,10 +7370,16 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
7186
7370
|
* This is a pure pipe that only re-evaluates when the input reference changes.
|
|
7187
7371
|
* Use {@link GetValuePipe} (`getValue`) if the getter function's return value may change between cycles.
|
|
7188
7372
|
*
|
|
7373
|
+
* @dbxPipe
|
|
7374
|
+
* @dbxPipeSlug get-value-once
|
|
7375
|
+
* @dbxPipeCategory value
|
|
7376
|
+
* @dbxPipeRelated get-value
|
|
7377
|
+
* @dbxPipeSkillRefs dbx-value-pipes
|
|
7189
7378
|
* @example
|
|
7190
7379
|
* ```html
|
|
7191
7380
|
* <span>{{ myGetterOrValue | getValueOnce }}</span>
|
|
7192
7381
|
* ```
|
|
7382
|
+
* @param args Optional argument forwarded to the getter function.
|
|
7193
7383
|
*/
|
|
7194
7384
|
class GetValueOncePipe {
|
|
7195
7385
|
transform(input, args) {
|
|
@@ -7212,6 +7402,10 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
7212
7402
|
*
|
|
7213
7403
|
* Optionally accepts a default string to display when the input is `null` or `undefined`.
|
|
7214
7404
|
*
|
|
7405
|
+
* @dbxPipe
|
|
7406
|
+
* @dbxPipeSlug dollar-amount
|
|
7407
|
+
* @dbxPipeCategory value
|
|
7408
|
+
* @dbxPipeSkillRefs dbx-value-pipes
|
|
7215
7409
|
* @example
|
|
7216
7410
|
* ```html
|
|
7217
7411
|
* <span>{{ 19.5 | dollarAmount }}</span>
|
|
@@ -7220,6 +7414,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
7220
7414
|
* <span>{{ nullValue | dollarAmount:'N/A' }}</span>
|
|
7221
7415
|
* <!-- Output: "N/A" -->
|
|
7222
7416
|
* ```
|
|
7417
|
+
* @param defaultIfNull String to display when the input is `null` or `undefined`. Defaults to formatting `null` through `dollarAmountString`.
|
|
7223
7418
|
*/
|
|
7224
7419
|
class DollarAmountPipe {
|
|
7225
7420
|
transform(input, defaultIfNull) {
|
|
@@ -7393,10 +7588,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
7393
7588
|
}] });
|
|
7394
7589
|
|
|
7395
7590
|
/**
|
|
7396
|
-
* Connects the host element's {@link FilterSource} to an ancestor {@link FilterSourceConnector} on
|
|
7591
|
+
* Connects the host element's {@link FilterSource} to an ancestor {@link FilterSourceConnector} on init. Place on an element whose own directive contributes a `FilterSource` (via `host: true`) so it auto-wires to the parent connector.
|
|
7397
7592
|
*
|
|
7398
|
-
*
|
|
7399
|
-
*
|
|
7593
|
+
* @dbxFilter
|
|
7594
|
+
* @dbxFilterSlug connect-source
|
|
7595
|
+
* @dbxFilterRelated source, source-connector
|
|
7596
|
+
* @dbxFilterSkillRefs dbx__ref__dbx-component-patterns
|
|
7400
7597
|
*
|
|
7401
7598
|
* @example
|
|
7402
7599
|
* ```html
|
|
@@ -7423,14 +7620,18 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
7423
7620
|
}] });
|
|
7424
7621
|
|
|
7425
7622
|
/**
|
|
7426
|
-
*
|
|
7623
|
+
* Acts as both {@link FilterSource} and {@link FilterSourceConnector} — bridges a filter from one part of the template to another. Pair with `[dbxFilterConnectSource]` on the inner element that owns the source.
|
|
7427
7624
|
*
|
|
7428
|
-
*
|
|
7625
|
+
* @dbxFilter
|
|
7626
|
+
* @dbxFilterSlug source-connector
|
|
7627
|
+
* @dbxFilterRelated source, connect-source
|
|
7628
|
+
* @dbxFilterSkillRefs dbx__ref__dbx-component-patterns
|
|
7429
7629
|
*
|
|
7430
7630
|
* @example
|
|
7431
7631
|
* ```html
|
|
7432
7632
|
* <div dbxFilterSourceConnector>
|
|
7433
|
-
* <my-
|
|
7633
|
+
* <my-filter-form dbxFilterSource dbxFilterConnectSource></my-filter-form>
|
|
7634
|
+
* <my-list></my-list>
|
|
7434
7635
|
* </div>
|
|
7435
7636
|
* ```
|
|
7436
7637
|
*/
|
|
@@ -7490,18 +7691,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
7490
7691
|
type: Directive
|
|
7491
7692
|
}] });
|
|
7492
7693
|
/**
|
|
7493
|
-
*
|
|
7694
|
+
* Provides a {@link FilterSource} for a keyed entry in an ancestor {@link FilterMap}. Children can inject the source as if it were the only filter on the page; the map dispatches by key.
|
|
7695
|
+
*
|
|
7696
|
+
* @dbxFilter
|
|
7697
|
+
* @dbxFilterSlug map-source
|
|
7698
|
+
* @dbxFilterRelated map, map-source-connector
|
|
7699
|
+
* @dbxFilterSkillRefs dbx__ref__dbx-component-patterns
|
|
7494
7700
|
*
|
|
7495
7701
|
* @example
|
|
7496
7702
|
* ```html
|
|
7497
7703
|
* <div dbxFilterMap>
|
|
7498
|
-
* <div [dbxFilterMapSource]="'
|
|
7704
|
+
* <div [dbxFilterMapSource]="'profileList'">
|
|
7499
7705
|
* <my-filtered-list></my-filtered-list>
|
|
7500
7706
|
* </div>
|
|
7501
7707
|
* </div>
|
|
7502
7708
|
* ```
|
|
7503
7709
|
*/
|
|
7504
7710
|
class DbxFilterMapSourceDirective extends AbstractDbxFilterMapSourceDirective {
|
|
7711
|
+
/**
|
|
7712
|
+
* The map key this source binds to.
|
|
7713
|
+
*/
|
|
7505
7714
|
dbxFilterMapSource = input(...(ngDevMode ? [undefined, { debugName: "dbxFilterMapSource" }] : /* istanbul ignore next */ []));
|
|
7506
7715
|
_dbxFilterMapSourceEffect = effect(() => this.setFilterMapKey(this.dbxFilterMapSource()), ...(ngDevMode ? [{ debugName: "_dbxFilterMapSourceEffect" }] : /* istanbul ignore next */ []));
|
|
7507
7716
|
static ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "21.2.4", ngImport: i0, type: DbxFilterMapSourceDirective, deps: null, target: i0.ɵɵFactoryTarget.Directive });
|
|
@@ -7518,20 +7727,26 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
7518
7727
|
}], propDecorators: { dbxFilterMapSource: [{ type: i0.Input, args: [{ isSignal: true, alias: "dbxFilterMapSource", required: false }] }] } });
|
|
7519
7728
|
|
|
7520
7729
|
/**
|
|
7521
|
-
*
|
|
7730
|
+
* Both {@link FilterSource} and {@link FilterSourceConnector} for a keyed entry in an ancestor {@link FilterMap}. Connects an external filter source to one map slot and re-emits that slot's filter.
|
|
7522
7731
|
*
|
|
7523
|
-
*
|
|
7732
|
+
* @dbxFilter
|
|
7733
|
+
* @dbxFilterSlug map-source-connector
|
|
7734
|
+
* @dbxFilterRelated map, map-source
|
|
7735
|
+
* @dbxFilterSkillRefs dbx__ref__dbx-component-patterns
|
|
7524
7736
|
*
|
|
7525
7737
|
* @example
|
|
7526
7738
|
* ```html
|
|
7527
7739
|
* <div dbxFilterMap>
|
|
7528
|
-
* <div [dbxFilterMapSourceConnector]="'
|
|
7529
|
-
* <my-list
|
|
7740
|
+
* <div [dbxFilterMapSourceConnector]="'profileList'">
|
|
7741
|
+
* <my-list></my-list>
|
|
7530
7742
|
* </div>
|
|
7531
7743
|
* </div>
|
|
7532
7744
|
* ```
|
|
7533
7745
|
*/
|
|
7534
7746
|
class DbxFilterMapSourceConnectorDirective extends AbstractDbxFilterMapSourceDirective {
|
|
7747
|
+
/**
|
|
7748
|
+
* The map key this connector binds to.
|
|
7749
|
+
*/
|
|
7535
7750
|
dbxFilterMapSourceConnector = input(...(ngDevMode ? [undefined, { debugName: "dbxFilterMapSourceConnector" }] : /* istanbul ignore next */ []));
|
|
7536
7751
|
_dbxFilterMapSourceConnectorEffect = effect(() => this.setFilterMapKey(this.dbxFilterMapSourceConnector()), ...(ngDevMode ? [{ debugName: "_dbxFilterMapSourceConnectorEffect" }] : /* istanbul ignore next */ []));
|
|
7537
7752
|
// MARK: FilterSourceConnector
|
|
@@ -7557,10 +7772,12 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "21.2.4", ngImpor
|
|
|
7557
7772
|
}], propDecorators: { dbxFilterMapSourceConnector: [{ type: i0.Input, args: [{ isSignal: true, alias: "dbxFilterMapSourceConnector", required: false }] }] } });
|
|
7558
7773
|
|
|
7559
7774
|
/**
|
|
7560
|
-
*
|
|
7775
|
+
* Provides a {@link FilterMap} instance in DI so multiple child sources can register / look up filters by string key. Use when one screen needs several independent filter contexts.
|
|
7561
7776
|
*
|
|
7562
|
-
*
|
|
7563
|
-
* map
|
|
7777
|
+
* @dbxFilter
|
|
7778
|
+
* @dbxFilterSlug map
|
|
7779
|
+
* @dbxFilterRelated map-source, map-source-connector
|
|
7780
|
+
* @dbxFilterSkillRefs dbx__ref__dbx-component-patterns
|
|
7564
7781
|
*
|
|
7565
7782
|
* @example
|
|
7566
7783
|
* ```html
|
|
@@ -7605,12 +7822,17 @@ function isClickablePartialFilterPreset(preset) {
|
|
|
7605
7822
|
}
|
|
7606
7823
|
|
|
7607
7824
|
/**
|
|
7608
|
-
* Provides a {@link FilterSource} in
|
|
7825
|
+
* Provides a {@link FilterSource} in DI so child components can inject and consume the current filter value. Use this on a wrapper element when the child is the canonical owner of the filter (a filter form, a chip group).
|
|
7826
|
+
*
|
|
7827
|
+
* @dbxFilter
|
|
7828
|
+
* @dbxFilterSlug source
|
|
7829
|
+
* @dbxFilterRelated connect-source, source-connector, map-source
|
|
7830
|
+
* @dbxFilterSkillRefs dbx__ref__dbx-component-patterns
|
|
7609
7831
|
*
|
|
7610
7832
|
* @example
|
|
7611
7833
|
* ```html
|
|
7612
7834
|
* <div dbxFilterSource>
|
|
7613
|
-
* <my-
|
|
7835
|
+
* <my-filter-form></my-filter-form>
|
|
7614
7836
|
* </div>
|
|
7615
7837
|
* ```
|
|
7616
7838
|
*/
|