@bigbinary/neeto-commons-frontend 3.1.11 → 3.1.12
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/package.json +2 -2
- package/pure.d.ts +0 -384
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bigbinary/neeto-commons-frontend",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.12",
|
|
4
4
|
"description": "A package encapsulating common code across neeto projects including initializers, utility functions, common components and hooks and so on.",
|
|
5
5
|
"repository": "git@github.com:bigbinary/neeto-commons-frontend.git",
|
|
6
6
|
"author": "Amaljith K <amaljith.k@bigbinary.com>",
|
|
@@ -94,7 +94,7 @@
|
|
|
94
94
|
"react-router-dom": "5.3.3",
|
|
95
95
|
"react-toastify": "8.0.2",
|
|
96
96
|
"shakapacker": "^6.5.5",
|
|
97
|
-
"tailwindcss": "
|
|
97
|
+
"tailwindcss": "^3.4.1",
|
|
98
98
|
"webpack": "^5.75.0"
|
|
99
99
|
}
|
|
100
100
|
}
|
package/pure.d.ts
DELETED
|
@@ -1,384 +0,0 @@
|
|
|
1
|
-
import { Draft } from "immer";
|
|
2
|
-
|
|
3
|
-
export type Primitives = symbol | string | number | boolean | null | undefined;
|
|
4
|
-
export type ObjectAndPrimitives = Primitives | object;
|
|
5
|
-
type KeyType = string | number | symbol;
|
|
6
|
-
type NilOr<T> = T | null | undefined;
|
|
7
|
-
|
|
8
|
-
type Matchable<Obj, Parent, key extends keyof Obj> =
|
|
9
|
-
| ((object: Obj[key], parent: Parent) => boolean)
|
|
10
|
-
| MatchPattern<Obj[key], Parent>
|
|
11
|
-
| Primitives;
|
|
12
|
-
|
|
13
|
-
type MatchPattern<Obj = any, Parent = Obj> = Obj extends any[]
|
|
14
|
-
?
|
|
15
|
-
| Matchable<Obj, Parent, number>[]
|
|
16
|
-
| { [key: number]: Matchable<Obj, Parent, number> }
|
|
17
|
-
: Obj extends Primitives
|
|
18
|
-
? Obj
|
|
19
|
-
:
|
|
20
|
-
| {
|
|
21
|
-
[key in keyof Partial<Obj>]: Matchable<Obj, Parent, key>;
|
|
22
|
-
} & {
|
|
23
|
-
[key: KeyType]: Matchable<any, Parent, KeyType>;
|
|
24
|
-
};
|
|
25
|
-
|
|
26
|
-
export function camelToSnakeCase(string: string): string;
|
|
27
|
-
export function _camelToSnakeCase(string: NilOr<string>): NilOr<string>;
|
|
28
|
-
|
|
29
|
-
export function capitalize(string: string): string;
|
|
30
|
-
export function _capitalize(string: NilOr<string>): NilOr<string>;
|
|
31
|
-
|
|
32
|
-
export function copyKeys<T>(
|
|
33
|
-
keyMap: { [key in keyof Partial<T>]: string },
|
|
34
|
-
objectArray: T[]
|
|
35
|
-
): (T & { [key: string]: any })[];
|
|
36
|
-
export function copyKeys(keyMap: {
|
|
37
|
-
[key: string]: string;
|
|
38
|
-
}): <T>(objectArray: T[]) => (T & { [key: string]: any })[];
|
|
39
|
-
export function _copyKeys<T>(
|
|
40
|
-
keyMap: { [key in keyof Partial<T>]: string },
|
|
41
|
-
objectArray: NilOr<T[]>
|
|
42
|
-
): NilOr<(T & { [key: string]: any })[]>;
|
|
43
|
-
export function _copyKeys(keyMap: {
|
|
44
|
-
[key: string]: string;
|
|
45
|
-
}): <T>(objectArray: NilOr<T[]>) => NilOr<(T & { [key: string]: any })[]>;
|
|
46
|
-
|
|
47
|
-
export function copyKeysDeep(keyMap: object, objectArray: object[]): object[];
|
|
48
|
-
export function copyKeysDeep(
|
|
49
|
-
keyMap: object
|
|
50
|
-
): (objectArray: object[]) => object[];
|
|
51
|
-
export function _copyKeysDeep(
|
|
52
|
-
keyMap: object,
|
|
53
|
-
objectArray: NilOr<object[]>
|
|
54
|
-
): NilOr<object[]>;
|
|
55
|
-
export function _copyKeysDeep(
|
|
56
|
-
keyMap: object
|
|
57
|
-
): (objectArray: NilOr<object[]>) => NilOr<object[]>;
|
|
58
|
-
|
|
59
|
-
export function countBy<T>(pattern: MatchPattern<T>, entityArray: T[]): number;
|
|
60
|
-
export function countBy(
|
|
61
|
-
pattern: MatchPattern
|
|
62
|
-
): (entityArray: object[]) => number;
|
|
63
|
-
export function _countBy<T>(
|
|
64
|
-
pattern: MatchPattern<T>,
|
|
65
|
-
entityArray: NilOr<T[]>
|
|
66
|
-
): NilOr<number>;
|
|
67
|
-
export function _countBy(
|
|
68
|
-
pattern: MatchPattern
|
|
69
|
-
): (entityArray: NilOr<object[]>) => NilOr<number>;
|
|
70
|
-
|
|
71
|
-
export function deepFreezeObject<T>(object: T): Readonly<T>;
|
|
72
|
-
|
|
73
|
-
export function dynamicArray<T>(
|
|
74
|
-
count: number,
|
|
75
|
-
elementGenerator: (index: number) => T
|
|
76
|
-
): T[];
|
|
77
|
-
|
|
78
|
-
export function existsBy<T>(
|
|
79
|
-
pattern: MatchPattern<T>,
|
|
80
|
-
entityArray: T[]
|
|
81
|
-
): boolean;
|
|
82
|
-
export function existsBy(
|
|
83
|
-
pattern: MatchPattern
|
|
84
|
-
): (entityArray: object[]) => boolean;
|
|
85
|
-
|
|
86
|
-
export function _existsBy<T>(
|
|
87
|
-
pattern: MatchPattern<T>,
|
|
88
|
-
entityArray: NilOr<T[]>
|
|
89
|
-
): NilOr<boolean>;
|
|
90
|
-
export function _existsBy(
|
|
91
|
-
pattern: MatchPattern
|
|
92
|
-
): (entityArray: NilOr<object[]>) => NilOr<boolean>;
|
|
93
|
-
|
|
94
|
-
export function existsById(id: any, entityArray: object[]): boolean;
|
|
95
|
-
export function existsById(id: any): (entityArray: object[]) => boolean;
|
|
96
|
-
export function _existsById(
|
|
97
|
-
id: any,
|
|
98
|
-
entityArray: NilOr<object[]>
|
|
99
|
-
): NilOr<boolean>;
|
|
100
|
-
export function _existsById(
|
|
101
|
-
id: any
|
|
102
|
-
): (entityArray: NilOr<object[]>) => NilOr<boolean>;
|
|
103
|
-
|
|
104
|
-
export function filterBy<T>(pattern: MatchPattern<T>, entityArray: T[]): T[];
|
|
105
|
-
export function filterBy(pattern: MatchPattern): <T>(entityArray: T[]) => T[];
|
|
106
|
-
export function _filterBy<T>(
|
|
107
|
-
pattern: MatchPattern<T>,
|
|
108
|
-
entityArray: NilOr<T[]>
|
|
109
|
-
): NilOr<T[]>;
|
|
110
|
-
export function _filterBy(
|
|
111
|
-
pattern: MatchPattern
|
|
112
|
-
): <T>(entityArray: NilOr<T[]>) => NilOr<T[]>;
|
|
113
|
-
|
|
114
|
-
export function filterNonNull(object: object): object;
|
|
115
|
-
export function _filterNonNull(object: NilOr<object>): NilOr<object>;
|
|
116
|
-
|
|
117
|
-
export function findBy<T>(pattern: MatchPattern<T>, entityArray: T[]): T;
|
|
118
|
-
export function findBy(pattern: MatchPattern): <T>(entityArray: T[]) => T;
|
|
119
|
-
export function _findBy<T>(
|
|
120
|
-
pattern: MatchPattern<T>,
|
|
121
|
-
entityArray: NilOr<T[]>
|
|
122
|
-
): NilOr<T>;
|
|
123
|
-
export function _findBy(
|
|
124
|
-
pattern: MatchPattern
|
|
125
|
-
): <T>(entityArray: NilOr<T[]>) => NilOr<T>;
|
|
126
|
-
|
|
127
|
-
export function findById<T>(id: any, entityArray: T[]): T;
|
|
128
|
-
export function findById(id: any): <T>(entityArray: T[]) => T;
|
|
129
|
-
export function _findById<T>(id: any, entityArray: NilOr<T[]>): NilOr<T>;
|
|
130
|
-
export function _findById(id: any): <T>(entityArray: NilOr<T[]>) => NilOr<T>;
|
|
131
|
-
|
|
132
|
-
export function findIndexBy<T>(
|
|
133
|
-
pattern: MatchPattern<T>,
|
|
134
|
-
entityArray: T[]
|
|
135
|
-
): number;
|
|
136
|
-
export function findIndexBy(
|
|
137
|
-
pattern: MatchPattern
|
|
138
|
-
): (entityArray: object[]) => number;
|
|
139
|
-
export function _findIndexBy<T>(
|
|
140
|
-
pattern: MatchPattern<T>,
|
|
141
|
-
entityArray: NilOr<T[]>
|
|
142
|
-
): NilOr<number>;
|
|
143
|
-
export function _findIndexBy(
|
|
144
|
-
pattern: MatchPattern
|
|
145
|
-
): (entityArray: NilOr<object[]>) => NilOr<number>;
|
|
146
|
-
|
|
147
|
-
export function findIndexById(id: any, entityArray: object[]): number;
|
|
148
|
-
export function findIndexById(id: any): (entityArray: object[]) => number;
|
|
149
|
-
export function _findIndexById(
|
|
150
|
-
id: any,
|
|
151
|
-
entityArray: NilOr<object[]>
|
|
152
|
-
): NilOr<number>;
|
|
153
|
-
export function _findIndexById(
|
|
154
|
-
id: any
|
|
155
|
-
): (entityArray: NilOr<object[]>) => NilOr<number>;
|
|
156
|
-
|
|
157
|
-
export function findLastBy<T>(pattern: MatchPattern<T>, entityArray: T[]): T;
|
|
158
|
-
export function findLastBy(pattern: MatchPattern): <T>(entityArray: T[]) => T;
|
|
159
|
-
export function _findLastBy<T>(
|
|
160
|
-
pattern: MatchPattern<T>,
|
|
161
|
-
entityArray: NilOr<T[]>
|
|
162
|
-
): NilOr<T>;
|
|
163
|
-
export function _findLastBy(
|
|
164
|
-
pattern: MatchPattern
|
|
165
|
-
): <T>(entityArray: NilOr<T[]>) => NilOr<T>;
|
|
166
|
-
|
|
167
|
-
export function findLastIndexBy(id: any, entityArray: object[]): number;
|
|
168
|
-
export function findLastIndexBy(id: any): (entityArray: object[]) => number;
|
|
169
|
-
export function _findLastIndexBy(
|
|
170
|
-
id: any,
|
|
171
|
-
entityArray: NilOr<object[]>
|
|
172
|
-
): NilOr<number>;
|
|
173
|
-
export function _findLastIndexBy(
|
|
174
|
-
id: any
|
|
175
|
-
): (entityArray: NilOr<object[]>) => NilOr<number>;
|
|
176
|
-
|
|
177
|
-
export function getRandomInt(a?: number, b?: number): number;
|
|
178
|
-
export function humanize(string: string): string;
|
|
179
|
-
export function _humanize(string: NilOr<string>): NilOr<string>;
|
|
180
|
-
|
|
181
|
-
export function isNot(a: any, b: any): boolean;
|
|
182
|
-
export function isNot(a: any): (b: any) => boolean;
|
|
183
|
-
|
|
184
|
-
export const isNotEmpty: (a: any) => boolean;
|
|
185
|
-
|
|
186
|
-
export function isNotEqualDeep(a: any, b: any): boolean;
|
|
187
|
-
export function isNotEqualDeep(a: any): (b: any) => boolean;
|
|
188
|
-
|
|
189
|
-
export function keysToCamelCase(object: any): any;
|
|
190
|
-
export function keysToSnakeCase(object: any): any;
|
|
191
|
-
|
|
192
|
-
export function matches<T>(pattern: MatchPattern<T>, data: T): boolean;
|
|
193
|
-
export function matches(pattern: MatchPattern): (data: any) => boolean;
|
|
194
|
-
|
|
195
|
-
export function modifyBy<T>(
|
|
196
|
-
pattern: MatchPattern<T>,
|
|
197
|
-
modifier: (previous: T) => T,
|
|
198
|
-
entityArray: T[]
|
|
199
|
-
): T[];
|
|
200
|
-
export function modifyBy<T>(
|
|
201
|
-
pattern: MatchPattern<T>,
|
|
202
|
-
modifier: (previous: T) => T
|
|
203
|
-
): (entityArray: T[]) => T[];
|
|
204
|
-
export function modifyBy(
|
|
205
|
-
pattern: MatchPattern
|
|
206
|
-
): <T>(modifier: (previous: T) => T, entityArray: T[]) => T[];
|
|
207
|
-
export function modifyBy(
|
|
208
|
-
pattern: MatchPattern
|
|
209
|
-
): <T>(modifier: (previous: T) => T) => (entityArray: T[]) => T[];
|
|
210
|
-
export function _modifyBy<T>(
|
|
211
|
-
pattern: MatchPattern<T>,
|
|
212
|
-
modifier: (previous: T) => T,
|
|
213
|
-
entityArray: NilOr<T[]>
|
|
214
|
-
): NilOr<T[]>;
|
|
215
|
-
export function _modifyBy<T>(
|
|
216
|
-
pattern: MatchPattern<T>,
|
|
217
|
-
modifier: (previous: T) => T
|
|
218
|
-
): (entityArray: NilOr<T[]>) => NilOr<T[]>;
|
|
219
|
-
export function _modifyBy(
|
|
220
|
-
pattern: MatchPattern
|
|
221
|
-
): <T>(modifier: (previous: T) => T, entityArray: NilOr<T[]>) => NilOr<T[]>;
|
|
222
|
-
export function _modifyBy(
|
|
223
|
-
pattern: MatchPattern
|
|
224
|
-
): <T>(modifier: (previous: T) => T) => (entityArray: NilOr<T[]>) => NilOr<T[]>;
|
|
225
|
-
|
|
226
|
-
export function modifyById<T>(
|
|
227
|
-
id: any,
|
|
228
|
-
modifier: (previous: T) => T,
|
|
229
|
-
entityArray: T[]
|
|
230
|
-
): T[];
|
|
231
|
-
export function modifyById<T>(
|
|
232
|
-
id: any,
|
|
233
|
-
modifier: (previous: T) => T
|
|
234
|
-
): (entityArray: T[]) => T[];
|
|
235
|
-
export function modifyById(
|
|
236
|
-
id: any
|
|
237
|
-
): <T>(modifier: (previous: T) => T, entityArray: T[]) => T[];
|
|
238
|
-
export function modifyById(
|
|
239
|
-
id: any
|
|
240
|
-
): <T>(modifier: (previous: T) => T) => (entityArray: T[]) => T[];
|
|
241
|
-
export function _modifyById<T>(
|
|
242
|
-
id: any,
|
|
243
|
-
modifier: (previous: T) => T,
|
|
244
|
-
entityArray: NilOr<T[]>
|
|
245
|
-
): NilOr<T[]>;
|
|
246
|
-
export function _modifyById<T>(
|
|
247
|
-
id: any,
|
|
248
|
-
modifier: (previous: T) => T
|
|
249
|
-
): (entityArray: NilOr<T[]>) => NilOr<T[]>;
|
|
250
|
-
export function _modifyById(
|
|
251
|
-
id: any
|
|
252
|
-
): <T>(modifier: (previous: T) => T, entityArray: NilOr<T[]>) => NilOr<T[]>;
|
|
253
|
-
export function _modifyById(
|
|
254
|
-
id: any
|
|
255
|
-
): <T>(modifier: (previous: T) => T) => (entityArray: NilOr<T[]>) => NilOr<T[]>;
|
|
256
|
-
|
|
257
|
-
export function noop(...args: any[]): void;
|
|
258
|
-
|
|
259
|
-
export function notEquals(a: any, b: any): boolean;
|
|
260
|
-
export function notEquals(a: any): (b: any) => boolean;
|
|
261
|
-
|
|
262
|
-
export function notEqualsDeep(a: any, b: any): boolean;
|
|
263
|
-
export function notEqualsDeep(a: any): (b: any) => boolean;
|
|
264
|
-
|
|
265
|
-
export function randomPick<T>(...args: T[]): T;
|
|
266
|
-
|
|
267
|
-
export function removeBy<T>(pattern: MatchPattern<T>, entityArray: T[]): T[];
|
|
268
|
-
export function removeBy(pattern: MatchPattern): <T>(entityArray: T[]) => T[];
|
|
269
|
-
export function _removeBy<T>(
|
|
270
|
-
pattern: MatchPattern<T>,
|
|
271
|
-
entityArray: NilOr<T[]>
|
|
272
|
-
): NilOr<T[]>;
|
|
273
|
-
export function _removeBy(
|
|
274
|
-
pattern: MatchPattern
|
|
275
|
-
): <T>(entityArray: NilOr<T[]>) => NilOr<T[]>;
|
|
276
|
-
|
|
277
|
-
export function removeById<T>(id: any, entityArray: T[]): T[];
|
|
278
|
-
export function removeById(id: any): <T>(entityArray: T[]) => T[];
|
|
279
|
-
export function _removeById<T>(id: any, entityArray: NilOr<T[]>): NilOr<T[]>;
|
|
280
|
-
export function _removeById(
|
|
281
|
-
id: any
|
|
282
|
-
): <T>(entityArray: NilOr<T[]>) => NilOr<T[]>;
|
|
283
|
-
|
|
284
|
-
export function renameKeys<T, M extends { [key in keyof Partial<T>]: string }>(
|
|
285
|
-
keyMap: M,
|
|
286
|
-
entityArray: T[]
|
|
287
|
-
): (Omit<T, keyof M> & { [key: string]: any })[];
|
|
288
|
-
export function renameKeys<M extends { [key: string]: string }>(
|
|
289
|
-
keyMap: M
|
|
290
|
-
): <T>(entityArray: T[]) => (Omit<T, keyof M> & { [key: string]: any })[];
|
|
291
|
-
export function _renameKeys<T, M extends { [key in keyof Partial<T>]: string }>(
|
|
292
|
-
keyMap: M,
|
|
293
|
-
entityArray: NilOr<T[]>
|
|
294
|
-
): NilOr<(Omit<T, keyof M> & { [key: string]: any })[]>;
|
|
295
|
-
export function _renameKeys<M extends { [key: string]: string }>(
|
|
296
|
-
keyMap: M
|
|
297
|
-
): <T>(
|
|
298
|
-
entityArray: NilOr<T[]>
|
|
299
|
-
) => NilOr<(Omit<T, keyof M> & { [key: string]: any })[]>;
|
|
300
|
-
|
|
301
|
-
export function replaceBy<T>(
|
|
302
|
-
pattern: MatchPattern<T>,
|
|
303
|
-
entity: T,
|
|
304
|
-
entityArray: T[]
|
|
305
|
-
): T[];
|
|
306
|
-
export function replaceBy<T>(
|
|
307
|
-
pattern: MatchPattern<T>,
|
|
308
|
-
entity: T
|
|
309
|
-
): <T>(entityArray: T[]) => T[];
|
|
310
|
-
export function replaceBy(
|
|
311
|
-
pattern: MatchPattern
|
|
312
|
-
): <T>(entity: T) => (entityArray: T[]) => T[];
|
|
313
|
-
|
|
314
|
-
export function _replaceBy<T>(
|
|
315
|
-
pattern: MatchPattern<T>,
|
|
316
|
-
entity: NilOr<T>,
|
|
317
|
-
entityArray: NilOr<T[]>
|
|
318
|
-
): NilOr<T[]>;
|
|
319
|
-
export function _replaceBy<T>(
|
|
320
|
-
pattern: MatchPattern<T>,
|
|
321
|
-
entity: NilOr<T>
|
|
322
|
-
): <T>(entityArray: NilOr<T[]>) => NilOr<T[]>;
|
|
323
|
-
export function _replaceBy(
|
|
324
|
-
pattern: MatchPattern
|
|
325
|
-
): <T>(entity: NilOr<T>) => <T>(entityArray: NilOr<T[]>) => NilOr<T[]>;
|
|
326
|
-
|
|
327
|
-
export function replaceById<T>(id: any, entity: T, entityArray: T[]): T[];
|
|
328
|
-
export function replaceById<T>(
|
|
329
|
-
id: any,
|
|
330
|
-
entity: T
|
|
331
|
-
): <T>(entityArray: T[]) => T[];
|
|
332
|
-
export function replaceById(
|
|
333
|
-
id: any
|
|
334
|
-
): <T>(entity: T) => <T>(entityArray: T[]) => T[];
|
|
335
|
-
export function _replaceById<T>(
|
|
336
|
-
id: any,
|
|
337
|
-
entity: NilOr<T>,
|
|
338
|
-
entityArray: NilOr<T[]>
|
|
339
|
-
): NilOr<T[]>;
|
|
340
|
-
export function _replaceById<T>(
|
|
341
|
-
id: any,
|
|
342
|
-
entity: NilOr<T>
|
|
343
|
-
): <T>(entityArray: NilOr<T[]>) => NilOr<T[]>;
|
|
344
|
-
export function _replaceById(
|
|
345
|
-
id: any
|
|
346
|
-
): <T>(entity: NilOr<T>) => <T>(entityArray: NilOr<T[]>) => NilOr<T[]>;
|
|
347
|
-
|
|
348
|
-
export function serializeKeysToSnakeCase(object: object): object;
|
|
349
|
-
export function preprocessForSerialization(object: object): object;
|
|
350
|
-
|
|
351
|
-
export function slugify(string: string): string;
|
|
352
|
-
export function _slugify(string: NilOr<string>): NilOr<string>;
|
|
353
|
-
|
|
354
|
-
export function snakeToCamelCase(string: string): string;
|
|
355
|
-
export function _snakeToCamelCase(string: NilOr<string>): NilOr<string>;
|
|
356
|
-
|
|
357
|
-
export function toLabelAndValue(string: string): {
|
|
358
|
-
label: string;
|
|
359
|
-
value: string;
|
|
360
|
-
};
|
|
361
|
-
export function transformObjectDeep(
|
|
362
|
-
object: object,
|
|
363
|
-
keyValueTransformer: (key: string | number | symbol, object: any) => any[],
|
|
364
|
-
objectPreProcessor?: (object: any) => any
|
|
365
|
-
): object;
|
|
366
|
-
|
|
367
|
-
export function truncate(string: string, length: number): string;
|
|
368
|
-
export function truncate(string: NilOr<string>, length: number): NilOr<string>;
|
|
369
|
-
|
|
370
|
-
export function nullSafe<T extends Function>(
|
|
371
|
-
func: T
|
|
372
|
-
): (...args: any) => ReturnType<T>;
|
|
373
|
-
|
|
374
|
-
export function isNotPresent(object: any): boolean;
|
|
375
|
-
export function isPresent(object: any): boolean;
|
|
376
|
-
|
|
377
|
-
export function modifyWithImmer<T>(
|
|
378
|
-
modifier: (draft: Draft<T>) => void,
|
|
379
|
-
data: T
|
|
380
|
-
): T;
|
|
381
|
-
|
|
382
|
-
export function modifyWithImmer<T>(
|
|
383
|
-
modifier: (draft: Draft<T>) => void
|
|
384
|
-
): (data: T) => T;
|