Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@awsui/collection-hooks

Package Overview
Dependencies
Maintainers
3
Versions
86
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@awsui/collection-hooks - npm Package Compare versions

Comparing version 1.0.58 to 1.0.59

3

dist/cjs/operations/filter.d.ts

@@ -1,3 +0,4 @@

import { UseCollectionOptions } from '../interfaces';
import { FilteringOptions, UseCollectionOptions } from '../interfaces';
import { Predicate } from './compose-filters';
export declare function createFilterPredicate<T>(filtering: UseCollectionOptions<T>['filtering'], filteringText?: string): null | Predicate<T>;
export declare function filter<T>(items: ReadonlyArray<T>, filteringText: string | undefined, filteringOptions: FilteringOptions<T>): ReadonlyArray<T>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createFilterPredicate = void 0;
exports.filter = exports.createFilterPredicate = void 0;
function defaultFilteringFunction(item, filteringText, filteringFields) {

@@ -26,1 +26,8 @@ if (filteringText.length === 0) {

exports.createFilterPredicate = createFilterPredicate;
// Keeping this function as there are customers depending on it.
function filter(items, filteringText, filteringOptions) {
if (filteringText === void 0) { filteringText = ''; }
var predicate = createFilterPredicate(filteringOptions, filteringText);
return predicate ? items.filter(predicate) : items;
}
exports.filter = filter;

@@ -5,1 +5,2 @@ import { PropertyFilterQuery, UseCollectionOptions } from '../interfaces';

export declare const fixupFalsyValues: <T>(value: T) => string | T;
export declare function propertyFilter<T>(items: ReadonlyArray<T>, query: PropertyFilterQuery, propertyFiltering: NonNullable<UseCollectionOptions<T>['propertyFiltering']>): ReadonlyArray<T>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.fixupFalsyValues = exports.createPropertyFilterPredicate = void 0;
exports.propertyFilter = exports.fixupFalsyValues = exports.createPropertyFilterPredicate = void 0;
var compare_dates_js_1 = require("../date-utils/compare-dates.js");

@@ -132,1 +132,7 @@ var filterUsingOperator = function (itemValue, tokenValue, _a) {

exports.fixupFalsyValues = fixupFalsyValues;
// Keeping this function as there are customers depending on it.
function propertyFilter(items, query, propertyFiltering) {
var predicate = createPropertyFilterPredicate(propertyFiltering, query);
return predicate ? items.filter(predicate) : items;
}
exports.propertyFilter = propertyFilter;
import { SortingState, UseCollectionOptions } from '../interfaces';
export declare function createComparator<T>(sorting: UseCollectionOptions<T>['sorting'], state: SortingState<T> | undefined): null | ((a: T, b: T) => number);
export declare function sort<T>(items: ReadonlyArray<T>, state: SortingState<T> | undefined): ReadonlyArray<T>;
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.createComparator = void 0;
exports.sort = exports.createComparator = void 0;
function getSorter(sortingField) {

@@ -33,1 +33,7 @@ if (!sortingField) {

exports.createComparator = createComparator;
// Keeping this function as there are customers depending on it.
function sort(items, state) {
var comparator = createComparator({}, state);
return comparator ? items.slice().sort(comparator) : items;
}
exports.sort = sort;

@@ -1,3 +0,4 @@

import { UseCollectionOptions } from '../interfaces';
import { FilteringOptions, UseCollectionOptions } from '../interfaces';
import { Predicate } from './compose-filters';
export declare function createFilterPredicate<T>(filtering: UseCollectionOptions<T>['filtering'], filteringText?: string): null | Predicate<T>;
export declare function filter<T>(items: ReadonlyArray<T>, filteringText: string | undefined, filteringOptions: FilteringOptions<T>): ReadonlyArray<T>;

@@ -22,1 +22,7 @@ function defaultFilteringFunction(item, filteringText, filteringFields) {

}
// Keeping this function as there are customers depending on it.
export function filter(items, filteringText, filteringOptions) {
if (filteringText === void 0) { filteringText = ''; }
var predicate = createFilterPredicate(filteringOptions, filteringText);
return predicate ? items.filter(predicate) : items;
}

@@ -5,1 +5,2 @@ import { PropertyFilterQuery, UseCollectionOptions } from '../interfaces';

export declare const fixupFalsyValues: <T>(value: T) => string | T;
export declare function propertyFilter<T>(items: ReadonlyArray<T>, query: PropertyFilterQuery, propertyFiltering: NonNullable<UseCollectionOptions<T>['propertyFiltering']>): ReadonlyArray<T>;

@@ -127,1 +127,6 @@ import { compareDates, compareTimestamps } from '../date-utils/compare-dates.js';

};
// Keeping this function as there are customers depending on it.
export function propertyFilter(items, query, propertyFiltering) {
var predicate = createPropertyFilterPredicate(propertyFiltering, query);
return predicate ? items.filter(predicate) : items;
}
import { SortingState, UseCollectionOptions } from '../interfaces';
export declare function createComparator<T>(sorting: UseCollectionOptions<T>['sorting'], state: SortingState<T> | undefined): null | ((a: T, b: T) => number);
export declare function sort<T>(items: ReadonlyArray<T>, state: SortingState<T> | undefined): ReadonlyArray<T>;

@@ -29,1 +29,6 @@ function getSorter(sortingField) {

}
// Keeping this function as there are customers depending on it.
export function sort(items, state) {
var comparator = createComparator({}, state);
return comparator ? items.slice().sort(comparator) : items;
}
{
"commit": "d51d7f9277c49212a8fc52bb825dc1f78eddfe44"
"commit": "b37682ee59b49158403fdde7815a25e4698f3909"
}

@@ -50,4 +50,4 @@ {

"type": "module",
"version": "1.0.58",
"version": "1.0.59",
"license": "Apache-2.0"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc