付延余
2022-12-16 f0f8ee8c4a945adbc742d9bab69382b28ad311fb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
import { Dictionary } from './types/interfaces/Dictionary';
import FilterItem from './FilterItem';
/**
 * A function to check that all elements of an array are found within another array.
 * @param {Array} arr1 is the array of strings to be checked
 * @param {Array} arr2 is the array of strings to check against
 * @return {Boolean} whether all string of arr1 are contained in arr2
 */
declare const allStringsOfArray1InArray2: (arr1: string[], arr2: string[]) => boolean;
export { allStringsOfArray1InArray2 };
/**
 * Given a CSS prop it will normalize the syntax for JS
 * e.g. transform background-color to backgroundColor
 * @param {String} cssProp prop name
 * @return {String} normalized name
 */
declare const getNormalizedCssPropName: (cssProp: string) => string;
export { getNormalizedCssPropName };
/**
 * Set inline styles on an HTML node
 * @param {HTMLElement} node - HTML node
 * @param {Object} styles - object with styles
 * @returns {undefined}
 */
declare function setStylesOnHTMLNode(node: Element, styles: any): void;
export { setStylesOnHTMLNode };
/**
 * Returns an object with value/key pairs of all data
 * attributes on an HTML element, disregarding the
 * two data attributes that are reserved for internal
 * usage by Filterizr
 * @param {Object} node - HTML node
 * @returns {Object} map of data attributes / values
 */
declare function getDataAttributesOfHTMLNode(node: Element): Dictionary;
export { getDataAttributesOfHTMLNode };
/**
 * Check that a DOM element has a data-attribute present
 * @param {Object} node element
 * @param {String} dataAttributeName name of data attribute
 * @return {Boolean} data attribute exists
 */
declare function checkDataAttributeExists(node: Element, dataAttributeName: string): boolean;
export { checkDataAttributeExists };
/**
 * A very simple function to perform a basic
 * deep clone of an object.
 * @param {Object} o is the object to perform the deep clone on
 * @return {Object} deep clone
 */
declare const makeShallowClone: (o: any) => Dictionary;
export { makeShallowClone };
/**
 * A function to recursively merge an object, copying over all
 * properties of the old object missing from the target object.
 * In case a prop in is an object, the method is called recursively.
 * This is a non-mutating method.
 * @param {Object} old is the old object from which the missing props are copied.
 * @param {Object} target is the target object with the updated values.
 */
declare const merge: (old: any, target: any) => Dictionary;
export { merge };
/**
 * A function get the intersection of two arrays. IE9+.
 * @param {Array} arr1 is the first array of which to get the intersection
 * @param {Array} arr2 is the second array of which to get the intersection
 */
declare const intersection: (arr1: any[], arr2: any[]) => any;
export { intersection };
/**
 * Debounce of Underscore.js
 */
declare const debounce: (func: Function, wait: number, immediate: boolean) => Function;
export { debounce };
/**
 * Fisher-Yates shuffle ES6 non-mutating implementation.
 * @param {Array} array the array to shuffle
 * @return {Array} shuffled array without mutating the initial array.
 */
declare const shuffle: (array: any[]) => any[];
export { shuffle };
/**
 * Simple method to check if two arrays of FilterItems
 * are sorted in the same manner or not.
 * @param {Array} arr1 the first array of FilterItems
 * @param {Array} arr2 the second array of FilterItems
 * @return {Boolean} equality
 */
declare const filterItemArraysHaveSameSorting: (filterItemsA: FilterItem[], filterItemsB: FilterItem[]) => boolean;
export { filterItemArraysHaveSameSorting };
/**
 * Simple non-mutating sorting function for arrays of objects by a property
 * @param {Array} array to sort
 * @param {Function} propFn fetches the property by which to sort
 * @return {Array} a new sorted array
 */
declare const sortBy: (array: any[], propFn: Function) => any[];
export { sortBy };
/**
 * Error checking method to restrict a prop to some allowed values
 * @param {String} name of the option key in the options object
 * @param {String|Number|Object|Function|Array|Boolean} value of the option
 * @param {String} type of the property
 * @param {Array} allowed accepted values for option
 * @param {String} furtherHelpLink a link to docs for further help
 */
declare const checkOptionForErrors: (name: string, value: string | number | boolean | object | Function | any[], type?: string, allowed?: RegExp | any[], furtherHelpLink?: string) => void;
export { checkOptionForErrors };
/**
 * Wrapper around document.querySelector, will function as
 * an identity function if an HTML element is passed in
 * @param {HTMLElement|string} nodeOrSelector
 */
declare const getHTMLElement: (selectorOrNode: string | HTMLElement) => HTMLElement;
export { getHTMLElement };
/**
 * A Regexp to validate potential values for the CSS easing property of transitions.
 */
declare const cssEasingValuesRegexp: RegExp;
export { cssEasingValuesRegexp };
/**
 * Possible animation states for Filterizr
 */
declare const FILTERIZR_STATE: {
    IDLE: string;
    FILTERING: string;
    SORTING: string;
    SHUFFLING: string;
};
export { FILTERIZR_STATE };
/**
 * Transition end events with vendor prefixing
 */
declare const TRANSITION_END_EVENTS: string[];
export { TRANSITION_END_EVENTS };
/**
 * A no-operation function
 */
declare const noop: () => void;
export { noop };