@one-paragon/angular-utilities 2.3.11 → 2.3.13
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/index.d.ts
CHANGED
|
@@ -451,7 +451,12 @@ interface SortDef {
|
|
|
451
451
|
precedence?: number;
|
|
452
452
|
}
|
|
453
453
|
interface FilterOptions<T = string> {
|
|
454
|
-
filterableValues: T[] | 'all values';
|
|
454
|
+
filterableValues: T[] | 'all values' | AllValueOptions;
|
|
455
|
+
}
|
|
456
|
+
interface AllValueOptions {
|
|
457
|
+
allValues: true;
|
|
458
|
+
doNotTreatEmptyStringsAsBlanks?: boolean;
|
|
459
|
+
doNotIncludeBlanks?: boolean;
|
|
455
460
|
}
|
|
456
461
|
interface DateTimeOptions {
|
|
457
462
|
format?: string;
|
|
@@ -581,6 +586,7 @@ declare class TableWrapperHeaderSettings {
|
|
|
581
586
|
hideSort: boolean;
|
|
582
587
|
collapse: boolean;
|
|
583
588
|
showTitleWhenCollapsed: boolean;
|
|
589
|
+
title: TbTitle | undefined;
|
|
584
590
|
headerHeight: TbSize | undefined;
|
|
585
591
|
}
|
|
586
592
|
declare class TableWrapperFooterSettings {
|
|
@@ -624,6 +630,7 @@ declare class NotPersistedTableSettings {
|
|
|
624
630
|
hideColumnSettings: boolean;
|
|
625
631
|
hideSort: boolean;
|
|
626
632
|
showTitleWhenHeaderCollapsed: boolean;
|
|
633
|
+
title: TbTitle | undefined;
|
|
627
634
|
hideHeader: boolean;
|
|
628
635
|
hideColumnHeaderFilters: boolean;
|
|
629
636
|
hideColumnHeader: boolean;
|
|
@@ -675,6 +682,11 @@ type NonFunctionPropertyNames<T> = {
|
|
|
675
682
|
}[keyof T];
|
|
676
683
|
type NonFunctionProperties<T> = Pick<T, NonFunctionPropertyNames<T>>;
|
|
677
684
|
type TbSize = number | `${number}${'px' | 'rem'}`;
|
|
685
|
+
type TbTitle = {
|
|
686
|
+
text: string;
|
|
687
|
+
level?: 1 | 2 | 3 | 4 | 5 | 6;
|
|
688
|
+
styles?: Dictionary<string>;
|
|
689
|
+
};
|
|
678
690
|
declare function parseTbSizeToPixels(size?: TbSize): number | undefined;
|
|
679
691
|
|
|
680
692
|
interface TableBuilderConfig {
|
|
@@ -1566,7 +1578,7 @@ declare class TableContainerComponent<T = any> {
|
|
|
1566
1578
|
}
|
|
1567
1579
|
|
|
1568
1580
|
declare class SpaceCasePipe implements PipeTransform {
|
|
1569
|
-
spaceCase:
|
|
1581
|
+
spaceCase: typeof spaceCase;
|
|
1570
1582
|
transform: (value: string) => string;
|
|
1571
1583
|
static ɵfac: _angular_core.ɵɵFactoryDeclaration<SpaceCasePipe, never>;
|
|
1572
1584
|
static ɵpipe: _angular_core.ɵɵPipeDeclaration<SpaceCasePipe, "spaceCase", true>;
|
|
@@ -1978,14 +1990,20 @@ declare class ActionStateUiModule {
|
|
|
1978
1990
|
/**
|
|
1979
1991
|
* Creates a selector that can dispatch an action if conditions are met.
|
|
1980
1992
|
* Note: The props of the selector factory must include the props of the action.
|
|
1981
|
-
* @param selectorFactory A method that returns selector.
|
|
1982
|
-
* @param action
|
|
1993
|
+
* @param selectorFactory A method that returns a selector.
|
|
1994
|
+
* @param action A method that returns the action that will be dispatched when conditions are met. The method will be passed the args of the
|
|
1995
|
+
* selector factory and the result of the selector.
|
|
1983
1996
|
* @param [dispatchIf = defaultFilter] Optional. A method that takes the result of the selector and returns a boolean. The actions gets dispatched
|
|
1984
1997
|
* if true is returned. If no method is passed in than the action will be dispatched if the selector returns undefined or null.
|
|
1985
1998
|
*/
|
|
1986
|
-
declare const createActionableSelector: <State, Result, Props extends any[]>(selectorFactory: ((...props: Props) => MemoizedSelector<State, Result>), action: ActionReturner<Props>, dispatchIf?: (data: Result) => boolean) => (...props: Props) => MemoizedSelector<State, Result | undefined, (s1: LoadingState<Result>) => Result | undefined>;
|
|
1987
|
-
|
|
1988
|
-
|
|
1999
|
+
declare const createActionableSelector: <State, Result, Props extends any[]>(selectorFactory: ((...props: Props) => MemoizedSelector<State, Result>), action: ActionReturner<Props, Result>, dispatchIf?: (data: Result) => boolean) => (...props: Props) => MemoizedSelector<State, Result | undefined, (s1: LoadingState<Result>) => Result | undefined>;
|
|
2000
|
+
/**
|
|
2001
|
+
* Creates a selector that can run an action if conditions are met.
|
|
2002
|
+
* The action will run in the environment injector context if no injector is added to the options
|
|
2003
|
+
* Note: The props of the selector factory must include the props of the action.
|
|
2004
|
+
*/
|
|
2005
|
+
declare const createActionSelector: <State, Result, Props extends any[] = any[]>(options: CreateActionResultsOptions<State, Result, Props>) => (...props: [...Props]) => MemoizedSelector<State, Result | undefined, (s1: LoadingState<Result>) => Result | undefined>;
|
|
2006
|
+
declare const createActionableResultSelector: <State, Result, Props extends any[]>(selectorFactory: ((...props: Props) => MemoizedSelector<State, Result>), action: ActionReturner<Props, Result>, dispatchIf?: (data: Result) => boolean) => (...props: Props) => ActionableMemoizedSelector<State, LoadingState<Result>>;
|
|
1989
2007
|
declare const createActionResultSelector: <State, Result, Props extends any[] = any[]>(options: CreateActionResultsOptions<State, Result, Props>) => (...props: Props) => ActionableMemoizedSelector<State, LoadingState<Result>>;
|
|
1990
2008
|
declare const clearActionableSelectorRequestCache: () => {};
|
|
1991
2009
|
declare function defaultFilter(data: any): boolean;
|
|
@@ -1993,8 +2011,22 @@ declare function provideActionableSelector(): _angular_core.EnvironmentProviders
|
|
|
1993
2011
|
declare const setUpStoreFactory: () => void;
|
|
1994
2012
|
declare function setUpStoreFactoryOld(store: Store, env: EnvironmentInjector): () => Promise<unknown>;
|
|
1995
2013
|
interface CreateActionResultsOptions<State, Result, Props extends any[]> {
|
|
2014
|
+
/**
|
|
2015
|
+
* A method that returns a selector.
|
|
2016
|
+
*/
|
|
1996
2017
|
selectorFactory: (...props: Props) => MemoizedSelector<State, Result>;
|
|
1997
|
-
|
|
2018
|
+
/**
|
|
2019
|
+
* The action to run when conditions are met.
|
|
2020
|
+
* The method will be passed the args of the selector factory and the result of the selector.
|
|
2021
|
+
* @param props args of the selector factory and the result of the selector.
|
|
2022
|
+
*/
|
|
2023
|
+
action: (...props: [...Props, Result]) => () => void;
|
|
2024
|
+
/**
|
|
2025
|
+
* Optional. A method that takes the result of the selector and returns a boolean. The actions gets dispatched
|
|
2026
|
+
* if true is returned. If no method is passed in than the action will be dispatched if the selector returns undefined or null.
|
|
2027
|
+
* @param data The result of the selector.
|
|
2028
|
+
* @returns boolean
|
|
2029
|
+
*/
|
|
1998
2030
|
dispatchIf?: (data: Result) => boolean;
|
|
1999
2031
|
injector?: Injector;
|
|
2000
2032
|
}
|
|
@@ -2003,7 +2035,7 @@ interface LoadingState<T> {
|
|
|
2003
2035
|
result?: T;
|
|
2004
2036
|
}
|
|
2005
2037
|
type ActionableMemoizedSelector<State, Result> = MemoizedSelector<State, Result>;
|
|
2006
|
-
type ActionReturner<Props extends any[]> = (...props: Props) => Action;
|
|
2038
|
+
type ActionReturner<Props extends any[], Result = any> = (...props: [...Props, Result]) => Action;
|
|
2007
2039
|
|
|
2008
2040
|
export { ActionStateSpinnerComponent, ActionStateUiModule, ActionStatus, AppStatusState, ArrayStyle, AutoFocusDirective, CancellationToken, ClickEmitterDirective, ClickSubjectDirective, ConditionalClassesDirective, CreateTableBuilder, CustomCellDirective, DateFilterComponent, DefaultVirtualScrollOptions, DialogDirective, DialogService, DialogWrapper, FieldType, FilterChipsComponent, FilterComponent, FilterType, FunctionPipe, GenColDisplayerComponent, GenFilterDisplayerComponent, GeneralTableSettings, GenericTableComponent, GroupByListComponent, HttpErrorStateDirective, HttpInProgressStateDirective, HttpNotStartedStateDirective, HttpRequestModule, HttpRequestStateDirective, RequestStateFactory as HttpRequestStateFactory, RequestStateStore as HttpRequestStateStore, RequestStatus as HttpRequestStatus, RequestStrategy as HttpRequestStrategy, HttpSuccessStateDirective, MatButtonToggleFilterDirective, MatCheckboxTbFilterDirective, MatOptionTbFilterDirective, MatRadioButtonTbFilterDirective, MatSlideToggleGroupDirective, MatSlideToggleTbFilterDirective, MatTableObservableDataSource, MultiSortDirective, NgrxExtModule, NotPersistedTableSettings, PaginatorComponent, PaginatorOptions, PersistedTableSettings, PhoneNumberPipe, PreventEnterDirective, RequestStateFactory, RequestStateStore, RequestStateStoreConfigToken, RequestStatus, RequestStrategy, ResizeColumnDirective, SortDirection, SpaceCaseMapping, SpaceCasePipe, StopPropagationDirective, StylerDirective, Subjectifier, Subscriber, TableBuilder, TableBuilderConfigToken, TableBuilderModule, TableColumnFooterSettings, TableColumnHeaderSettings, TableContainerComponent, TableCustomFilterDirective, TableCustomFilterDirectiveBase, TableFilterDirective, TableFilterStringContainsDirective, TableSettings, TableWrapperDirective, TableWrapperFooterSettings, TableWrapperHeaderSettings, Target, TbSelectedFilterDirective, TrimWhitespaceDirective, UtilitiesModule, VirtualScrollOptions, actionStatusReducer, chainRequest, clearActionableSelectorRequestCache, combineArrays, createActionResultSelector, createActionSelector, createActionableResultSelector, createActionableSelector, createFailure, createFilterFunc, createFilterFuncs, createRequestor, createSuccess, defaultFilter, defaultShareReplay, delayOn, filterArray, filterTypeMap, getAllGroupHeaderNames, getAllGroupHeaderNamesByKeys, getRequestorBody, getRequestorStatus, getStatusState, httpRequest, httpRequestor, inProgress, initialGroupByState, initialState, isCustomFilter, isErrorState, isFilterInfo, isSuccessOrErrorState, isSuccessState, mapArray, mapError, mapGroupHeader, metaDataArrToDict, needsFilterCreation, notNull, notStarted, onWait, onceWhen, parseTbSizeToPixels, phoneFormatter, previousAndCurrent, provideActionableSelector, provideTableBuilder, selectAll, selectEntities, selectEntity, selectIds, selectTotal, serverStatusTypes, setCustomGroupBy, setUpStoreFactory, setUpStoreFactoryOld, skipOneWhen, sortsAreSame, spaceCase, startWithIfEmpty, statusAdapter, statusIsSuccessOrInProgress, subscriber, switchOff, tapError, tapSuccess, updateGroupByState, wrapInArr };
|
|
2009
|
-
export type { ActionReturner, Additional, ArrayAdditional, BaseMappedMetaData, BooleanFilterTypes, CreateActionResultsOptions, CustomCellMeta, CustomFilter, DateFilterTypes, DateTimeFilterTypes, DateTimeOptions, EnumFilterTypes, FilterFunc, FilterFuncs, FilterInfo, FilterOptions, FilterState, GroupByState, RequestState as HttpRequestState, HttpRequestState$, HttpRequestStateAny, HttpRequestStateViewContext, HttpRequestor, HttpSuccessStateViewContext, MappedArrayMetaData, MappedBooleanMetaData, MappedDateMetaData, MappedEnumMetaData, MappedMetaData, MappedNumberMetaData, MetaData, MetaDataExport, NonFunctionProperties, NotMappedMetaData, NumberFilterTypes, PartialFilter, Range, ReportDef, RequestCreatorOptions, RequestFactory, RequestResponse, RequestState, RequestStateCancelled, RequestStateError, RequestStateInProgress, RequestStateNotStarted, RequestStateOptions, RequestStateStoreConfig, RequestStateSuccess, SortDef, State, StatusState, StringFilterTypes, StylerStyle, SubFilterTypes, TableBuilderConfig, TableBuilderExport, TableBuilderSettings, TbSize };
|
|
2041
|
+
export type { ActionReturner, Additional, AllValueOptions, ArrayAdditional, BaseMappedMetaData, BooleanFilterTypes, CreateActionResultsOptions, CustomCellMeta, CustomFilter, DateFilterTypes, DateTimeFilterTypes, DateTimeOptions, EnumFilterTypes, FilterFunc, FilterFuncs, FilterInfo, FilterOptions, FilterState, GroupByState, RequestState as HttpRequestState, HttpRequestState$, HttpRequestStateAny, HttpRequestStateViewContext, HttpRequestor, HttpSuccessStateViewContext, MappedArrayMetaData, MappedBooleanMetaData, MappedDateMetaData, MappedEnumMetaData, MappedMetaData, MappedNumberMetaData, MetaData, MetaDataExport, NonFunctionProperties, NotMappedMetaData, NumberFilterTypes, PartialFilter, Range, ReportDef, RequestCreatorOptions, RequestFactory, RequestResponse, RequestState, RequestStateCancelled, RequestStateError, RequestStateInProgress, RequestStateNotStarted, RequestStateOptions, RequestStateStoreConfig, RequestStateSuccess, SortDef, State, StatusState, StringFilterTypes, StylerStyle, SubFilterTypes, TableBuilderConfig, TableBuilderExport, TableBuilderSettings, TbSize, TbTitle };
|