@awsui/collection-hooks
Advanced tools
Comparing version 1.0.47 to 1.0.48
@@ -20,3 +20,3 @@ import * as React from 'react'; | ||
} | ||
export declare type TrackBy<T> = string | ((item: T) => string); | ||
export type TrackBy<T> = string | ((item: T) => string); | ||
export interface UseCollectionOptions<T> { | ||
@@ -108,3 +108,3 @@ filtering?: FilteringOptions<T> & { | ||
} | ||
export declare type PropertyFilterOperator = '<' | '<=' | '>' | '>=' | ':' | '!:' | '=' | '!='; | ||
export type PropertyFilterOperator = '<' | '<=' | '>' | '>=' | ':' | '!:' | '=' | '!='; | ||
export interface PropertyFilterOperatorExtended<TokenValue> { | ||
@@ -116,5 +116,5 @@ operator: PropertyFilterOperator; | ||
} | ||
export declare type PropertyFilterOperatorMatch<TokenValue> = PropertyFilterOperatorMatchByType | PropertyFilterOperatorMatchCustom<TokenValue>; | ||
export declare type PropertyFilterOperatorMatchByType = 'date' | 'datetime'; | ||
export declare type PropertyFilterOperatorMatchCustom<TokenValue> = (itemValue: unknown, tokenValue: TokenValue) => boolean; | ||
export type PropertyFilterOperatorMatch<TokenValue> = PropertyFilterOperatorMatchByType | PropertyFilterOperatorMatchCustom<TokenValue>; | ||
export type PropertyFilterOperatorMatchByType = 'date' | 'datetime'; | ||
export type PropertyFilterOperatorMatchCustom<TokenValue> = (itemValue: unknown, tokenValue: TokenValue) => boolean; | ||
export interface PropertyFilterOperatorFormProps<TokenValue> { | ||
@@ -126,5 +126,5 @@ value: null | TokenValue; | ||
} | ||
export declare type PropertyFilterOperatorForm<TokenValue> = React.FC<PropertyFilterOperatorFormProps<TokenValue>>; | ||
export declare type PropertyFilterOperatorFormat<TokenValue> = (value: TokenValue) => string; | ||
export declare type PropertyFilterOperation = 'and' | 'or'; | ||
export type PropertyFilterOperatorForm<TokenValue> = React.FC<PropertyFilterOperatorFormProps<TokenValue>>; | ||
export type PropertyFilterOperatorFormat<TokenValue> = (value: TokenValue) => string; | ||
export type PropertyFilterOperation = 'and' | 'or'; | ||
export interface PropertyFilterToken { | ||
@@ -131,0 +131,0 @@ value: any; |
@@ -10,3 +10,7 @@ "use strict"; | ||
var lowFilteringText = filteringText.toLowerCase(); | ||
return filteringFields.some(function (key) { return String(item[key]).toLowerCase().indexOf(lowFilteringText) > -1; }); | ||
return filteringFields.some(function (key) { | ||
return String(item[key]) | ||
.toLowerCase() | ||
.indexOf(lowFilteringText) > -1; | ||
}); | ||
} | ||
@@ -13,0 +17,0 @@ function filter(items, filteringText, _a) { |
@@ -23,4 +23,4 @@ import { Dispatch, Reducer } from 'react'; | ||
} | ||
declare type Action<T> = SelectionAction<T> | SortingAction<T> | PaginationAction | FilteringAction | PropertyFilteringAction; | ||
export declare type CollectionReducer<T> = Reducer<CollectionState<T>, Action<T>>; | ||
type Action<T> = SelectionAction<T> | SortingAction<T> | PaginationAction | FilteringAction | PropertyFilteringAction; | ||
export type CollectionReducer<T> = Reducer<CollectionState<T>, Action<T>>; | ||
export declare function collectionReducer<T>(state: CollectionState<T>, action: Action<T>): CollectionState<T>; | ||
@@ -27,0 +27,0 @@ export declare function createActions<T>({ dispatch, collectionRef, }: { |
@@ -20,3 +20,3 @@ import * as React from 'react'; | ||
} | ||
export declare type TrackBy<T> = string | ((item: T) => string); | ||
export type TrackBy<T> = string | ((item: T) => string); | ||
export interface UseCollectionOptions<T> { | ||
@@ -108,3 +108,3 @@ filtering?: FilteringOptions<T> & { | ||
} | ||
export declare type PropertyFilterOperator = '<' | '<=' | '>' | '>=' | ':' | '!:' | '=' | '!='; | ||
export type PropertyFilterOperator = '<' | '<=' | '>' | '>=' | ':' | '!:' | '=' | '!='; | ||
export interface PropertyFilterOperatorExtended<TokenValue> { | ||
@@ -116,5 +116,5 @@ operator: PropertyFilterOperator; | ||
} | ||
export declare type PropertyFilterOperatorMatch<TokenValue> = PropertyFilterOperatorMatchByType | PropertyFilterOperatorMatchCustom<TokenValue>; | ||
export declare type PropertyFilterOperatorMatchByType = 'date' | 'datetime'; | ||
export declare type PropertyFilterOperatorMatchCustom<TokenValue> = (itemValue: unknown, tokenValue: TokenValue) => boolean; | ||
export type PropertyFilterOperatorMatch<TokenValue> = PropertyFilterOperatorMatchByType | PropertyFilterOperatorMatchCustom<TokenValue>; | ||
export type PropertyFilterOperatorMatchByType = 'date' | 'datetime'; | ||
export type PropertyFilterOperatorMatchCustom<TokenValue> = (itemValue: unknown, tokenValue: TokenValue) => boolean; | ||
export interface PropertyFilterOperatorFormProps<TokenValue> { | ||
@@ -126,5 +126,5 @@ value: null | TokenValue; | ||
} | ||
export declare type PropertyFilterOperatorForm<TokenValue> = React.FC<PropertyFilterOperatorFormProps<TokenValue>>; | ||
export declare type PropertyFilterOperatorFormat<TokenValue> = (value: TokenValue) => string; | ||
export declare type PropertyFilterOperation = 'and' | 'or'; | ||
export type PropertyFilterOperatorForm<TokenValue> = React.FC<PropertyFilterOperatorFormProps<TokenValue>>; | ||
export type PropertyFilterOperatorFormat<TokenValue> = (value: TokenValue) => string; | ||
export type PropertyFilterOperation = 'and' | 'or'; | ||
export interface PropertyFilterToken { | ||
@@ -131,0 +131,0 @@ value: any; |
@@ -7,3 +7,7 @@ function defaultFilteringFunction(item, filteringText, filteringFields) { | ||
var lowFilteringText = filteringText.toLowerCase(); | ||
return filteringFields.some(function (key) { return String(item[key]).toLowerCase().indexOf(lowFilteringText) > -1; }); | ||
return filteringFields.some(function (key) { | ||
return String(item[key]) | ||
.toLowerCase() | ||
.indexOf(lowFilteringText) > -1; | ||
}); | ||
} | ||
@@ -10,0 +14,0 @@ export function filter(items, filteringText, _a) { |
@@ -23,4 +23,4 @@ import { Dispatch, Reducer } from 'react'; | ||
} | ||
declare type Action<T> = SelectionAction<T> | SortingAction<T> | PaginationAction | FilteringAction | PropertyFilteringAction; | ||
export declare type CollectionReducer<T> = Reducer<CollectionState<T>, Action<T>>; | ||
type Action<T> = SelectionAction<T> | SortingAction<T> | PaginationAction | FilteringAction | PropertyFilteringAction; | ||
export type CollectionReducer<T> = Reducer<CollectionState<T>, Action<T>>; | ||
export declare function collectionReducer<T>(state: CollectionState<T>, action: Action<T>): CollectionState<T>; | ||
@@ -27,0 +27,0 @@ export declare function createActions<T>({ dispatch, collectionRef, }: { |
{ | ||
"commit": "158b6adbd849a99b26c90b92faef5b1977edc6e1" | ||
"commit": "86f2523691657ad6c21701e12c96e78553fbb809" | ||
} |
@@ -50,4 +50,4 @@ { | ||
"type": "module", | ||
"version": "1.0.47", | ||
"version": "1.0.48", | ||
"license": "Apache-2.0" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1503
80768