dphelper 1.9.14 → 1.9.20
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 +11 -8
- package/CHANGELOG.md +0 -12
- package/CITATION.cff +0 -43
- package/CODEOWNERS +0 -1
- package/CODE_OF_CONDUCT.md +0 -110
- package/CONTRIBUTING.md +0 -110
- package/FUNDING.yml +0 -16
- package/HISTORY.md +0 -1
- package/SECURITY.md +0 -3
- package/SUMMARY.md +0 -22
- package/docs/_config.yml +0 -1
- package/docs/index.md +0 -315
- package/documents/OBSERVER.md +0 -67
- package/documents/STATE.md +0 -67
- package/documents/STORE.md +0 -78
- package/documents/TOOLS.md +0 -614
- package/index.d.ts +0 -20
- package/index.js +0 -1
- package/types/cache.d.ts +0 -27
- package/types/dphelper.d.ts +0 -440
- package/types/idb.d.ts +0 -21
- package/types/jquery.d.ts +0 -20
- package/types/memorio.d.ts +0 -23
- package/types/observer.d.ts +0 -47
- package/types/state.d.ts +0 -71
- package/types/store.d.ts +0 -91
package/types/cache.d.ts
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
dphelper
|
|
3
|
-
Copyright (c) 2019 Dario Passariello <dariopassariello@gmail.com>
|
|
4
|
-
Licensed under MIT License, see
|
|
5
|
-
https://dario.passariello.ca
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Cache is used for internal use only... but you can use if you need.
|
|
10
|
-
* @return Some stuff you cache... usually used for dynamic imports from dphelper.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
interface _cache {
|
|
14
|
-
|
|
15
|
-
/**
|
|
16
|
-
* Create a cache, please use state instead!
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* cache.myCache = any
|
|
20
|
-
*
|
|
21
|
-
* @since dphelper 1.0.6
|
|
22
|
-
*/
|
|
23
|
-
[key: string]: any
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
declare var cache: _cache
|
|
27
|
-
type cache = _cache
|
package/types/dphelper.d.ts
DELETED
|
@@ -1,440 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
dphelper
|
|
3
|
-
Copyright (c) 2019 Dario Passariello <dariopassariello@gmail.com>
|
|
4
|
-
Licensed under MIT License, see
|
|
5
|
-
https://dario.passariello.ca
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
////////////////////
|
|
9
|
-
// Global object
|
|
10
|
-
////////////////////
|
|
11
|
-
|
|
12
|
-
/**
|
|
13
|
-
* @return dphelper Root.
|
|
14
|
-
*/
|
|
15
|
-
interface _dphelper {
|
|
16
|
-
/**
|
|
17
|
-
* Set parameter in dphelper
|
|
18
|
-
* @param key Name of main function.
|
|
19
|
-
* @return The values.
|
|
20
|
-
*/
|
|
21
|
-
// [key: string]: any
|
|
22
|
-
|
|
23
|
-
// _dphelper: any
|
|
24
|
-
|
|
25
|
-
[_list: string]: any
|
|
26
|
-
|
|
27
|
-
anchor: {
|
|
28
|
-
toOnClick(el: string): void
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
array: {
|
|
32
|
-
find(array: any[], key: any): any
|
|
33
|
-
unique(array: any[]): any[]
|
|
34
|
-
delete(array: any[], key: any): void
|
|
35
|
-
merge(arrayA: any[], arrayB: any[]): any[]
|
|
36
|
-
mergeByKey(arrayA: any[], arrayB: any[], key: string): any[]
|
|
37
|
-
asc(array: any[]): any[]
|
|
38
|
-
desc(array: any[]): any[]
|
|
39
|
-
duplicates(array: any[]): any[]
|
|
40
|
-
even(array: any[]): any[]
|
|
41
|
-
odd(array: any[]): any[]
|
|
42
|
-
toObj(array: any[]): object
|
|
43
|
-
sumColumn(array: any[], column: number): number
|
|
44
|
-
shuffle(array: any[]): any[]
|
|
45
|
-
generate(num: number): any[]
|
|
46
|
-
testArrayInt(array: any[]): number[]
|
|
47
|
-
rand32(number: number): any
|
|
48
|
-
findindex(array: any[], key: any): number
|
|
49
|
-
pathToJson(array: any[], separator?: string): object
|
|
50
|
-
deepClone(src: any): any
|
|
51
|
-
match(arrayWords: any[], arrayToCheck: any[]): boolean
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
audio: {
|
|
55
|
-
play: (url: string) => void
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
avoid: {
|
|
59
|
-
cache: (uri: string) => string
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
browser: {
|
|
63
|
-
state(state: any, title: any, url: any): void
|
|
64
|
-
forw(times: number): void
|
|
65
|
-
back(times: number): void
|
|
66
|
-
reload(): void
|
|
67
|
-
href(url: string): void
|
|
68
|
-
offLine(text?: string): void
|
|
69
|
-
zoom(): number
|
|
70
|
-
status(code: number): string
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
check: {
|
|
74
|
-
url: (url: string) => any
|
|
75
|
-
version: (v1: string, v2: string, opts: any) => any
|
|
76
|
-
npmVer: (npm: string) => any
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
color: {
|
|
80
|
-
hex: (c: any) => string
|
|
81
|
-
toHex: (rgb: any) => string
|
|
82
|
-
toRGB: (c: any) => []
|
|
83
|
-
oleColor: (c: any) => string
|
|
84
|
-
gradient: (colorStart: any, colorEnd: any, colorCount: any) => any
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
console: {
|
|
89
|
-
info(name: string, message: string, fn: Function): void
|
|
90
|
-
stop(options?: string[]): void
|
|
91
|
-
toHtml(el: string): void
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
cookie: {
|
|
95
|
-
set: (pars: {
|
|
96
|
-
name: any,
|
|
97
|
-
value: any,
|
|
98
|
-
time?: any,
|
|
99
|
-
path?: "/",
|
|
100
|
-
sameSite?: "Lax",
|
|
101
|
-
secure?: "Secure" | "false"
|
|
102
|
-
}) => any
|
|
103
|
-
get: (name: string) => any
|
|
104
|
-
delete: (name: string) => any
|
|
105
|
-
removeAll: () => any
|
|
106
|
-
}
|
|
107
|
-
|
|
108
|
-
coords: {
|
|
109
|
-
degreesToRadians: (degrees: any) => any
|
|
110
|
-
latToMeters: (points: any) => any
|
|
111
|
-
toVector: (points: any) => any
|
|
112
|
-
convertToDecDegrees: (deg: any, minutes: any, sec: any, direction: any) => any
|
|
113
|
-
distance: (point1: any, point2: any) => any
|
|
114
|
-
polarToCartesian: (centerX: any, centerY: any, radius: any, angleInDegrees: any) => any
|
|
115
|
-
mapDegreesToPixels: (degree: number, minDegree: number, maxDegree: number, minPixel: number, maxPixel: number, padding: number) => number
|
|
116
|
-
}
|
|
117
|
-
|
|
118
|
-
date: {
|
|
119
|
-
days: (lang?: string) => string[]
|
|
120
|
-
months: (lang?: string) => string[]
|
|
121
|
-
year: () => number
|
|
122
|
-
toIso: (value: any, int?: string) => string | null
|
|
123
|
-
toMMDDYYYY: (value: any) => string
|
|
124
|
-
toYYYYMMDD: (value: any) => string | undefined
|
|
125
|
-
toHuman: (value: any) => string
|
|
126
|
-
convert: (value: any, format: string[]) => string | null
|
|
127
|
-
iso2Epoch: (value: any) => number
|
|
128
|
-
localIsoTime: (value: any) => string
|
|
129
|
-
utc: () => string
|
|
130
|
-
parse: (value: any, separator?: string) => string | null
|
|
131
|
-
addDays: (date: any, days: number) => Date
|
|
132
|
-
dateTimeToString: (dateObject: any) => string
|
|
133
|
-
isoToHuman: (value: any, symbol?: string) => string | null
|
|
134
|
-
fullDate: () => string
|
|
135
|
-
epoch: () => number
|
|
136
|
-
diffInDays: (d1: any, d2: any) => number
|
|
137
|
-
diffInWeeks: (d1: any, d2: any) => number
|
|
138
|
-
diffInMonths: (d1: any, d2: any) => number
|
|
139
|
-
diffInYears: (d1: any, d2: any) => number
|
|
140
|
-
dateToYMD: (date: any) => string
|
|
141
|
-
collection: (params: { date?: Date; type: string; locale?: string }) => string | undefined
|
|
142
|
-
timeZones: () => string[]
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
disable: {
|
|
146
|
-
select: (el?: string) => void
|
|
147
|
-
spellCheck: (tmr?: number) => void
|
|
148
|
-
rightClick: (el?: string) => void
|
|
149
|
-
copy: (el?: string) => void
|
|
150
|
-
paste: (el?: string) => void
|
|
151
|
-
cut: (el?: string) => void
|
|
152
|
-
drag: (el?: string) => void
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
dispatch: {
|
|
156
|
-
set: (name: string, value?: any) => void
|
|
157
|
-
listen: (name: string, cb?: (e: Event) => void, flag?: boolean) => void
|
|
158
|
-
remove: (name: string) => void
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
element: {
|
|
162
|
-
fitScale: (el: any, scale?: number, fit?: boolean) => void
|
|
163
|
-
scaleBasedOnWindow: (elm: any, scale: number, fit: boolean) => void
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
events: {
|
|
167
|
-
list: (el: Element) => any
|
|
168
|
-
multi: (element: Element, eventNames: string, listener: EventListener) => void
|
|
169
|
-
copy: (el: string) => void
|
|
170
|
-
onDrag: (elem: string) => void
|
|
171
|
-
keys: (e: KeyboardEvent) => { key: string; ctrl: boolean; alt: boolean; shift: boolean }
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
form: {
|
|
175
|
-
serialize: (form: HTMLFormElement) => { [key: string]: any }
|
|
176
|
-
confirmType: (type: string, value: any) => boolean
|
|
177
|
-
required: (value: any) => string | undefined
|
|
178
|
-
minLength: (value: any, num?: number) => string | undefined
|
|
179
|
-
maxLength: (value: any, num?: number) => string | undefined
|
|
180
|
-
maxPhoneNumber: (value: any, num?: number) => string | undefined
|
|
181
|
-
isNumeric: (value: any) => boolean
|
|
182
|
-
isEmail: (value: any) => boolean
|
|
183
|
-
pattern: (e: Event) => void
|
|
184
|
-
noSpecialChars: (e: Event) => void
|
|
185
|
-
table: (size: [number, number], id: string, elem: HTMLElement) => void
|
|
186
|
-
sanitize: (str: string) => string | undefined
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
format: {
|
|
190
|
-
currency: (value: number, locale?: string, currency?: string) => string
|
|
191
|
-
phoneNumber: (value: string, countryCode?: string) => string
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
imports: {
|
|
195
|
-
file: (elem: string, file: string) => Promise<void>
|
|
196
|
-
}
|
|
197
|
-
|
|
198
|
-
json: {
|
|
199
|
-
counter: (json: any, key?: string, val?: any) => number | null
|
|
200
|
-
toCsv: (jsonInput: any) => string
|
|
201
|
-
saveCsvAs: (csvData: string, fileName: string) => void
|
|
202
|
-
is: (str: string) => boolean
|
|
203
|
-
parse: (file: string) => any
|
|
204
|
-
sanitize: (str: string) => string
|
|
205
|
-
sanitizeJsonValue: (str: string) => string
|
|
206
|
-
}
|
|
207
|
-
|
|
208
|
-
load: {
|
|
209
|
-
all: (context, cacheName?: string) => void
|
|
210
|
-
file: (filePath: string) => Promise<string>
|
|
211
|
-
fileToElement: (elementSelector: string, filePath: string) => Promise<void>
|
|
212
|
-
json: (filePath: string) => Promise<any>
|
|
213
|
-
remote: (path: string, method?: string, headers?: HeadersInit) => Promise<any>
|
|
214
|
-
script: (scripts: string[], elementSelector?: string) => void
|
|
215
|
-
toJson: (context, cacheName?: string) => void
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
logging: {
|
|
219
|
-
list: {
|
|
220
|
-
type: string
|
|
221
|
-
message: string
|
|
222
|
-
}
|
|
223
|
-
reg: (txt: string) => void
|
|
224
|
-
debug: (txt: string) => void
|
|
225
|
-
error: (txt: string) => void
|
|
226
|
-
}
|
|
227
|
-
|
|
228
|
-
math: {
|
|
229
|
-
rnd: () => number
|
|
230
|
-
tmr: () => number
|
|
231
|
-
add: (a: number, b: number) => number
|
|
232
|
-
sub: (a: number, b: number) => number
|
|
233
|
-
multi: (a: number, b: number) => number
|
|
234
|
-
div: (a: number, b: number) => number
|
|
235
|
-
rem: (a: number, b: number) => number
|
|
236
|
-
exp: (a: number, b: number) => number
|
|
237
|
-
isOdd: (a: number) => boolean
|
|
238
|
-
float2int: (a: number) => number
|
|
239
|
-
percent: (n: number, tot: number) => number
|
|
240
|
-
isPrime: (n: number) => boolean
|
|
241
|
-
}
|
|
242
|
-
|
|
243
|
-
memory: {
|
|
244
|
-
lock: (obj: string) => void
|
|
245
|
-
unlock: (obj: string) => void
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
object: {
|
|
249
|
-
toArray: (object: Record<string, any>) => [string, any][]
|
|
250
|
-
replaceNullObjects: (data: Record<string, any>) => Record<string, any>
|
|
251
|
-
serialize: (value: any) => any
|
|
252
|
-
deSerialize: (valueNew: any) => any
|
|
253
|
-
sort: (o: Record<string, any>) => Record<string, any>
|
|
254
|
-
toXML: (obj: Record<string, any>) => string
|
|
255
|
-
find: (array: any[], key: string, value: any) => any
|
|
256
|
-
instance: (obj: any) => any
|
|
257
|
-
updateByKey: (obj: Record<string, any>, key: string, newValue: any) => Record<string, any>
|
|
258
|
-
findindex: (array: any[], key: string) => number
|
|
259
|
-
parse: (val: any) => any
|
|
260
|
-
isObject: (val: any) => boolean
|
|
261
|
-
diff: (obj1: Record<string, any>, obj2: Record<string, any>) => Record<string, { obj1: any, obj2: any }>
|
|
262
|
-
path: (prop: string, array: string[], separator?: string) => string
|
|
263
|
-
}
|
|
264
|
-
|
|
265
|
-
path: {
|
|
266
|
-
rail: () => string[]
|
|
267
|
-
hash: () => string[]
|
|
268
|
-
query: (url: string) => Record<string, string>
|
|
269
|
-
}
|
|
270
|
-
|
|
271
|
-
promise: {
|
|
272
|
-
check: (p: any) => boolean
|
|
273
|
-
resolve: (data: any) => Promise<any>
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
sanitize: {
|
|
277
|
-
html: (s: string) => string
|
|
278
|
-
}
|
|
279
|
-
|
|
280
|
-
screen: {
|
|
281
|
-
fullScreen: (el: string) => void
|
|
282
|
-
toggle: (el: string) => void
|
|
283
|
-
info: () => {
|
|
284
|
-
width: number
|
|
285
|
-
height: number
|
|
286
|
-
availWidth: number
|
|
287
|
-
availHeight: number
|
|
288
|
-
colorDepth: number
|
|
289
|
-
pixelDepth: number
|
|
290
|
-
}
|
|
291
|
-
}
|
|
292
|
-
|
|
293
|
-
scrollbar: {
|
|
294
|
-
custom: (el: string, options: any) => void
|
|
295
|
-
indicator: (props: any) => void
|
|
296
|
-
position: {
|
|
297
|
-
get: (el: any) => void
|
|
298
|
-
set: (el: any) => void
|
|
299
|
-
}
|
|
300
|
-
smooth: (target: any, speed: any, smooth: any) => void
|
|
301
|
-
scrollTo: (container: string, element: string, gap?: number) => void
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
security: {
|
|
305
|
-
uuid: {
|
|
306
|
-
byVal: (string: string) => string
|
|
307
|
-
v4: string
|
|
308
|
-
v5: string
|
|
309
|
-
}
|
|
310
|
-
hashPass: (u: string, p: string, t?: string) => Promise<string>
|
|
311
|
-
crypt: (u: string, p: string, mode?: string) => string
|
|
312
|
-
deCrypt: (u: string, p: string, mode?: string) => string
|
|
313
|
-
AES_KeyGen: (passKey?: string) => string
|
|
314
|
-
SHA256_Hex: (passKey: string) => string
|
|
315
|
-
}
|
|
316
|
-
|
|
317
|
-
shortcut: {
|
|
318
|
-
keys: (e: any, trigger: any) => void
|
|
319
|
-
}
|
|
320
|
-
|
|
321
|
-
socket: {
|
|
322
|
-
info: () => string
|
|
323
|
-
start: (element: any, server: any, name: string) => void
|
|
324
|
-
conn: (id: any, server: any, name: string) => void
|
|
325
|
-
connect: (server: any, name: string) => void
|
|
326
|
-
open: (id: any, server: any, name: string) => void
|
|
327
|
-
send: (mex: any, type?: string) => void
|
|
328
|
-
ping: (name: string) => void
|
|
329
|
-
receive: (el?: any, name?: string) => void
|
|
330
|
-
keepAlive: (name: string) => void
|
|
331
|
-
check: () => void
|
|
332
|
-
list: () => WebSocket[]
|
|
333
|
-
}
|
|
334
|
-
|
|
335
|
-
svg: {
|
|
336
|
-
init: (container: HTMLElement, source1: [HTMLElement, string], source2: [HTMLElement, string], cb?: Function) => void
|
|
337
|
-
check: () => boolean
|
|
338
|
-
update: (rect1: HTMLElement, rect2: HTMLElement, cxn: HTMLElement) => void
|
|
339
|
-
getCurve: (p1: [number, number], p2: [number, number], dx: number) => string
|
|
340
|
-
getIntersection: (dx: number, dy: number, cx: number, cy: number, w: number, h: number) => [number, number]
|
|
341
|
-
setConnector: (source: HTMLElement, side: string) => HTMLElement
|
|
342
|
-
removeConnection: (container: HTMLElement) => void
|
|
343
|
-
makeScrollable: (svgContainer: HTMLElement, scrollContainer: HTMLElement, elm1: HTMLElement, elm2: HTMLElement, rect1: HTMLElement, rect2: HTMLElement) => void
|
|
344
|
-
makeDraggable: (evt: Event) => void
|
|
345
|
-
toggle: (evt: Event, container: HTMLElement, source1: HTMLElement, source2: HTMLElement) => void
|
|
346
|
-
convert: (options) => string | void
|
|
347
|
-
}
|
|
348
|
-
|
|
349
|
-
system: {
|
|
350
|
-
multiSplit: () => any
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
text: {
|
|
354
|
-
trim(s: string, c: string, b: number, e: number): string
|
|
355
|
-
capitalize(txt: string): string
|
|
356
|
-
lower(txt: string): string
|
|
357
|
-
upper(txt: string): string
|
|
358
|
-
nl2br(str: string): string
|
|
359
|
-
sanitize(str: string): string
|
|
360
|
-
camelCase: {
|
|
361
|
-
toSpace(string: string): string
|
|
362
|
-
toUnderscore(string: string): string
|
|
363
|
-
}
|
|
364
|
-
fitContainer(el: string): void
|
|
365
|
-
}
|
|
366
|
-
|
|
367
|
-
timer: {
|
|
368
|
-
sleep(ms: number): Promise<void>
|
|
369
|
-
percentage(start: string, end: string): string
|
|
370
|
-
}
|
|
371
|
-
|
|
372
|
-
tools: {
|
|
373
|
-
getip(): Promise<void>
|
|
374
|
-
byteSize(bytes: number): string
|
|
375
|
-
zIndex(): number
|
|
376
|
-
zeroToFalse(value: number): boolean | number
|
|
377
|
-
}
|
|
378
|
-
|
|
379
|
-
translators: {
|
|
380
|
-
convertMatrixToScale(values: any): number
|
|
381
|
-
}
|
|
382
|
-
|
|
383
|
-
trigger: {
|
|
384
|
-
click(elem: string): void
|
|
385
|
-
change(elem: string): void
|
|
386
|
-
input(elem: string): void
|
|
387
|
-
}
|
|
388
|
-
|
|
389
|
-
type: {
|
|
390
|
-
of(p: any): string
|
|
391
|
-
instOfObj(p: any): boolean
|
|
392
|
-
isNull(p: any): (i: any) => boolean
|
|
393
|
-
isBool(val: any): boolean
|
|
394
|
-
}
|
|
395
|
-
|
|
396
|
-
ui: null
|
|
397
|
-
|
|
398
|
-
window: {
|
|
399
|
-
enhancement(): void
|
|
400
|
-
animationframe(): any
|
|
401
|
-
center(params: { url: string; title: string; name: string; w: number; h: number }): void
|
|
402
|
-
onBeforeUnLoad(e: any): void
|
|
403
|
-
purge(d?: Document, time?: number): void
|
|
404
|
-
stopZoomWheel(e: any): void
|
|
405
|
-
setZoom(element?: string, zoom?: number): string
|
|
406
|
-
getZoom(element?: string): number
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
}
|
|
410
|
-
|
|
411
|
-
////////////////////////////////////////////////////////////////////////////
|
|
412
|
-
|
|
413
|
-
declare var dphelper: _dphelper
|
|
414
|
-
type dphelper = _dphelper
|
|
415
|
-
|
|
416
|
-
declare var arguments: any
|
|
417
|
-
type arguments = any
|
|
418
|
-
|
|
419
|
-
///////////////////
|
|
420
|
-
|
|
421
|
-
interface SubCommand {
|
|
422
|
-
name: string
|
|
423
|
-
version: string
|
|
424
|
-
example: string
|
|
425
|
-
author: string
|
|
426
|
-
creationDate: string
|
|
427
|
-
lastMod: string
|
|
428
|
-
type: string
|
|
429
|
-
active: boolean
|
|
430
|
-
description: string
|
|
431
|
-
subCommand: Array<SubCommand> | typeof Array
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
interface Description {
|
|
435
|
-
name: string,
|
|
436
|
-
active: boolean,
|
|
437
|
-
subCommand: Array<SubCommand>,
|
|
438
|
-
}
|
|
439
|
-
|
|
440
|
-
declare function confirm(message: string, func1: Function, func2?: Function): boolean
|
package/types/idb.d.ts
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
dphelper
|
|
3
|
-
Copyright (c) 2019 Dario Passariello <dariopassariello@gmail.com>
|
|
4
|
-
Licensed under MIT License, see
|
|
5
|
-
https://dario.passariello.ca
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* idb is indexedDB simplification by dphelper
|
|
10
|
-
* @return IndexedDB editing and maintain.
|
|
11
|
-
*/
|
|
12
|
-
|
|
13
|
-
interface _idb {
|
|
14
|
-
[key: string]: any
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
declare var idb: _idb
|
|
18
|
-
declare var idbases: any
|
|
19
|
-
|
|
20
|
-
type idb = _idb
|
|
21
|
-
type idbases = {}
|
package/types/jquery.d.ts
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
dphelper
|
|
3
|
-
Copyright (c) 2019 Dario Passariello <dariopassariello@gmail.com>
|
|
4
|
-
Licensed under MIT License, see
|
|
5
|
-
https://dario.passariello.ca
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
declare var $: any
|
|
9
|
-
declare var jQuery: any
|
|
10
|
-
declare module 'jquery'
|
|
11
|
-
|
|
12
|
-
// ////////////////////////////////////////////////////////////////
|
|
13
|
-
|
|
14
|
-
interface window {
|
|
15
|
-
$: any
|
|
16
|
-
jQuery: any
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
type $ = {}
|
|
20
|
-
type jQuery = {}
|
package/types/memorio.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
declare module 'memorio' {
|
|
3
|
-
const resource: { [key: string]: any }
|
|
4
|
-
export = resource
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
interface _memorio {
|
|
8
|
-
setProps: any,
|
|
9
|
-
obj: any,
|
|
10
|
-
array: any,
|
|
11
|
-
dispatch: any,
|
|
12
|
-
setDescription: any
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
type memorio = _memorio
|
|
16
|
-
declare var memorio: any
|
|
17
|
-
|
|
18
|
-
type arguments = any
|
|
19
|
-
declare var arguments: any
|
|
20
|
-
|
|
21
|
-
global.memorio = global.memorio
|
|
22
|
-
? global.memorio
|
|
23
|
-
: globalThis.memorio
|
package/types/observer.d.ts
DELETED
|
@@ -1,47 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
memorio
|
|
3
|
-
Copyright (c) 2025 Dario Passariello <dariopassariello@gmail.com>
|
|
4
|
-
Licensed under MIT License, see
|
|
5
|
-
https://dario.passariello.ca
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Observer run a callback anytime the associated state going to change
|
|
10
|
-
* @return Execution of function after state change.
|
|
11
|
-
*/
|
|
12
|
-
interface _observer {
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Generate your observer
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* observer("myState", Function)
|
|
19
|
-
*
|
|
20
|
-
* @since memorio 1.0.6
|
|
21
|
-
*/
|
|
22
|
-
(stateName: string, callBack: any): any
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* List of active observers
|
|
26
|
-
*
|
|
27
|
-
* @example
|
|
28
|
-
* observer.list()
|
|
29
|
-
*
|
|
30
|
-
* @since memorio 1.0.6
|
|
31
|
-
*/
|
|
32
|
-
readonly list?: () => void
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Remove the active observer (not the state)
|
|
36
|
-
*
|
|
37
|
-
* @example
|
|
38
|
-
* observer.remove("myState")
|
|
39
|
-
*
|
|
40
|
-
* @since memorio 1.0.6
|
|
41
|
-
*/
|
|
42
|
-
readonly remove?: (name: string, callBack?: any, flag?: boolean) => void
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
declare var observer: _observer
|
|
47
|
-
type observer = _observer
|
package/types/state.d.ts
DELETED
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
/*!
|
|
2
|
-
memorio
|
|
3
|
-
Copyright (c) 2025 Dario Passariello <dariopassariello@gmail.com>
|
|
4
|
-
Licensed under MIT License, see
|
|
5
|
-
https://dario.passariello.ca
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* If you use only "state" you get the entire Proxy object
|
|
10
|
-
* @return Proxy Object of all states.
|
|
11
|
-
*/
|
|
12
|
-
interface _state {
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* Create states using: state.test = "example"
|
|
16
|
-
*
|
|
17
|
-
* @example
|
|
18
|
-
* state.myStuff = any
|
|
19
|
-
*
|
|
20
|
-
* @since memorio 0.0.1
|
|
21
|
-
* @param key The name of the state for which you want to modify the action.
|
|
22
|
-
* @return The previous values (Any).
|
|
23
|
-
* Important: Object is a Proxy.
|
|
24
|
-
*/
|
|
25
|
-
[key: string]: any
|
|
26
|
-
|
|
27
|
-
/**
|
|
28
|
-
* Delete entire state using: state.remove("test")
|
|
29
|
-
*
|
|
30
|
-
* @example
|
|
31
|
-
* state.remove(stateName)
|
|
32
|
-
*
|
|
33
|
-
* @since memorio 0.0.1
|
|
34
|
-
* @param stateName The name of the state for which you want to delete.
|
|
35
|
-
* @return boolean.
|
|
36
|
-
*/
|
|
37
|
-
readonly remove?: (stateName: string) => any
|
|
38
|
-
|
|
39
|
-
/**
|
|
40
|
-
* List all states using: state.list
|
|
41
|
-
*
|
|
42
|
-
* @example
|
|
43
|
-
* state.removeAll()
|
|
44
|
-
*
|
|
45
|
-
* @since memorio 1.8.92
|
|
46
|
-
* @return Remove all states.
|
|
47
|
-
*/
|
|
48
|
-
readonly removeAll?: () => any
|
|
49
|
-
|
|
50
|
-
/**
|
|
51
|
-
* List all states using: state.list
|
|
52
|
-
*
|
|
53
|
-
* @example
|
|
54
|
-
* state.list
|
|
55
|
-
*
|
|
56
|
-
* @since memorio 0.0.1
|
|
57
|
-
* @return Object of all states (Not the Proxy).
|
|
58
|
-
*/
|
|
59
|
-
readonly list?: (stateName: string) => any
|
|
60
|
-
|
|
61
|
-
/**
|
|
62
|
-
* Generate a message for "memorio"
|
|
63
|
-
* Note: FOR INTERNAL USE ONLY.
|
|
64
|
-
* @since memorio 0.0.1
|
|
65
|
-
*/
|
|
66
|
-
readonly mex?: any
|
|
67
|
-
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
declare var state: _state
|
|
71
|
-
type state = _state
|