@k37z3r/jbase 2.0.1 β 2.0.3
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/CHANGELOG.md +50 -0
- package/README.md +59 -43
- package/dist/browser.d.ts +5 -6
- package/dist/browser.d.ts.map +1 -1
- package/dist/core.d.ts +9 -14
- package/dist/core.d.ts.map +1 -1
- package/dist/index.cjs +577 -452
- package/dist/index.cjs.map +7 -0
- package/dist/index.d.ts +304 -603
- package/dist/index.d.ts.map +1 -1
- package/dist/index.mjs +575 -452
- package/dist/index.mjs.map +7 -0
- package/dist/jbase.browser.js +338 -281
- package/dist/jbase.browser.js.map +7 -0
- package/dist/jbase.min.js +3 -2
- package/dist/jbase.min.js.map +7 -0
- package/dist/modules/css/classes.d.ts +15 -29
- package/dist/modules/css/classes.d.ts.map +1 -1
- package/dist/modules/css/index.d.ts +5 -9
- package/dist/modules/css/index.d.ts.map +1 -1
- package/dist/modules/css/styles.d.ts +7 -13
- package/dist/modules/css/styles.d.ts.map +1 -1
- package/dist/modules/data/arrays.d.ts +96 -64
- package/dist/modules/data/arrays.d.ts.map +1 -1
- package/dist/modules/data/index.d.ts +5 -9
- package/dist/modules/data/index.d.ts.map +1 -1
- package/dist/modules/data/objects.d.ts +86 -54
- package/dist/modules/data/objects.d.ts.map +1 -1
- package/dist/modules/data/types.d.ts +3 -22
- package/dist/modules/data/types.d.ts.map +1 -1
- package/dist/modules/dom/attributes.d.ts +10 -19
- package/dist/modules/dom/attributes.d.ts.map +1 -1
- package/dist/modules/dom/content.d.ts +9 -17
- package/dist/modules/dom/content.d.ts.map +1 -1
- package/dist/modules/dom/index.d.ts +8 -15
- package/dist/modules/dom/index.d.ts.map +1 -1
- package/dist/modules/dom/manipulation.d.ts +41 -81
- package/dist/modules/dom/manipulation.d.ts.map +1 -1
- package/dist/modules/dom/states.d.ts +12 -23
- package/dist/modules/dom/states.d.ts.map +1 -1
- package/dist/modules/dom/traversal.d.ts +64 -127
- package/dist/modules/dom/traversal.d.ts.map +1 -1
- package/dist/modules/effects/fade.d.ts +13 -31
- package/dist/modules/effects/fade.d.ts.map +1 -1
- package/dist/modules/effects/index.d.ts +15 -23
- package/dist/modules/effects/index.d.ts.map +1 -1
- package/dist/modules/effects/slide.d.ts +13 -31
- package/dist/modules/effects/slide.d.ts.map +1 -1
- package/dist/modules/effects/types.d.ts +33 -0
- package/dist/modules/effects/types.d.ts.map +1 -0
- package/dist/modules/effects/vertical.d.ts +13 -31
- package/dist/modules/effects/vertical.d.ts.map +1 -1
- package/dist/modules/events/binding.d.ts +11 -21
- package/dist/modules/events/binding.d.ts.map +1 -1
- package/dist/modules/events/form.d.ts +18 -35
- package/dist/modules/events/form.d.ts.map +1 -1
- package/dist/modules/events/index.d.ts +9 -17
- package/dist/modules/events/index.d.ts.map +1 -1
- package/dist/modules/events/keyboard.d.ts +16 -31
- package/dist/modules/events/keyboard.d.ts.map +1 -1
- package/dist/modules/events/lifecycle.d.ts +6 -11
- package/dist/modules/events/lifecycle.d.ts.map +1 -1
- package/dist/modules/events/mouse.d.ts +30 -59
- package/dist/modules/events/mouse.d.ts.map +1 -1
- package/dist/modules/events/touch.d.ts +15 -29
- package/dist/modules/events/touch.d.ts.map +1 -1
- package/dist/modules/http/get.d.ts +18 -25
- package/dist/modules/http/get.d.ts.map +1 -1
- package/dist/modules/http/index.d.ts +11 -15
- package/dist/modules/http/index.d.ts.map +1 -1
- package/dist/modules/http/post.d.ts +13 -19
- package/dist/modules/http/post.d.ts.map +1 -1
- package/dist/server.d.ts +15 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +2246 -0
- package/dist/server.js.map +7 -0
- package/dist/types.d.ts +11 -21
- package/dist/types.d.ts.map +1 -1
- package/dist/utils.d.ts +20 -23
- package/dist/utils.d.ts.map +1 -1
- package/package.json +14 -4
- package/wiki/CSS-Classes-&-Styles.md +128 -0
- package/wiki/DATA-Utilities-(Arrays).md +332 -0
- package/wiki/DATA-Utilities-(Objects).md +263 -0
- package/wiki/DOM-Attributes.md +56 -0
- package/wiki/DOM-Content.md +48 -0
- package/wiki/DOM-Manipulation.md +272 -0
- package/wiki/DOM-States.md +73 -0
- package/wiki/DOM-Traversal.md +529 -0
- package/wiki/EFFECTS-Fade.md +76 -0
- package/wiki/EFFECTS-Slide-(horizontal).md +70 -0
- package/wiki/EFFECTS-Slide-(vertical).md +75 -0
- package/wiki/EVENTS-Bindings.md +55 -0
- package/wiki/EVENTS-Form.md +122 -0
- package/wiki/EVENTS-Keyboard.md +98 -0
- package/wiki/EVENTS-Lifecycle.md +25 -0
- package/wiki/EVENTS-Mouse.md +218 -0
- package/wiki/EVENTS-Touch.md +98 -0
- package/wiki/HTTP-Requests.md +93 -0
- package/wiki/Home.md +118 -0
- package/wiki/Installation.md +44 -0
- package/wiki/Quick-Start.md +139 -0
- package/dist/browser.js +0 -29
- package/dist/browser.js.map +0 -1
- package/dist/core.js +0 -78
- package/dist/core.js.map +0 -1
- package/dist/index.js +0 -100
- package/dist/index.js.map +0 -1
- package/dist/jbase.js +0 -1898
- package/dist/modules/css/classes.js +0 -88
- package/dist/modules/css/classes.js.map +0 -1
- package/dist/modules/css/index.js +0 -33
- package/dist/modules/css/index.js.map +0 -1
- package/dist/modules/css/styles.js +0 -49
- package/dist/modules/css/styles.js.map +0 -1
- package/dist/modules/data/arrays.js +0 -177
- package/dist/modules/data/arrays.js.map +0 -1
- package/dist/modules/data/index.js +0 -33
- package/dist/modules/data/index.js.map +0 -1
- package/dist/modules/data/objects.js +0 -168
- package/dist/modules/data/objects.js.map +0 -1
- package/dist/modules/data/types.js +0 -43
- package/dist/modules/data/types.js.map +0 -1
- package/dist/modules/dom/attributes.js +0 -69
- package/dist/modules/dom/attributes.js.map +0 -1
- package/dist/modules/dom/content.js +0 -63
- package/dist/modules/dom/content.js.map +0 -1
- package/dist/modules/dom/index.js +0 -48
- package/dist/modules/dom/index.js.map +0 -1
- package/dist/modules/dom/manipulation.js +0 -343
- package/dist/modules/dom/manipulation.js.map +0 -1
- package/dist/modules/dom/states.js +0 -89
- package/dist/modules/dom/states.js.map +0 -1
- package/dist/modules/dom/traversal.js +0 -527
- package/dist/modules/dom/traversal.js.map +0 -1
- package/dist/modules/effects/fade.js +0 -104
- package/dist/modules/effects/fade.js.map +0 -1
- package/dist/modules/effects/index.js +0 -38
- package/dist/modules/effects/index.js.map +0 -1
- package/dist/modules/effects/slide.js +0 -103
- package/dist/modules/effects/slide.js.map +0 -1
- package/dist/modules/effects/vertical.js +0 -118
- package/dist/modules/effects/vertical.js.map +0 -1
- package/dist/modules/events/binding.js +0 -60
- package/dist/modules/events/binding.js.map +0 -1
- package/dist/modules/events/form.js +0 -106
- package/dist/modules/events/form.js.map +0 -1
- package/dist/modules/events/index.js +0 -53
- package/dist/modules/events/index.js.map +0 -1
- package/dist/modules/events/keyboard.js +0 -83
- package/dist/modules/events/keyboard.js.map +0 -1
- package/dist/modules/events/lifecycle.js +0 -40
- package/dist/modules/events/lifecycle.js.map +0 -1
- package/dist/modules/events/mouse.js +0 -172
- package/dist/modules/events/mouse.js.map +0 -1
- package/dist/modules/events/touch.js +0 -74
- package/dist/modules/events/touch.js.map +0 -1
- package/dist/modules/http/get.js +0 -65
- package/dist/modules/http/get.js.map +0 -1
- package/dist/modules/http/index.js +0 -42
- package/dist/modules/http/index.js.map +0 -1
- package/dist/modules/http/post.js +0 -54
- package/dist/modules/http/post.js.map +0 -1
- package/dist/types.js +0 -15
- package/dist/types.js.map +0 -1
- package/dist/utils.js +0 -71
- package/dist/utils.js.map +0 -1
|
@@ -1,131 +1,163 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file src/modules/data/arrays.ts
|
|
3
|
-
* @version 2.0.
|
|
3
|
+
* @version 2.0.2
|
|
4
4
|
* @since 2.0.0
|
|
5
5
|
* @license GPL-3.0-or-later
|
|
6
6
|
* @copyright Sven Minio 2026
|
|
7
7
|
* @author Sven Minio <https://sven-minio.de>
|
|
8
8
|
* @category Data
|
|
9
9
|
* @description
|
|
10
|
-
* *
|
|
11
|
-
* * π©πͺ: Hilfsfunktionen fΓΌr Array-Manipulation und Datenverarbeitung.
|
|
10
|
+
* * Utility functions for array manipulation and data processing.
|
|
12
11
|
* @requires ./types
|
|
13
|
-
* *
|
|
14
|
-
* * π©πͺ: HΓ€ngt von Match-Logik und Typen ab.
|
|
12
|
+
* * Depends on types.
|
|
15
13
|
*/
|
|
16
14
|
import { MatchMode } from './types';
|
|
17
15
|
/**
|
|
18
|
-
* *
|
|
19
|
-
* * π©πͺ: Teilt ein Array in kleinere Gruppen (Chunks) auf. Ideal fΓΌr Pagination oder Grid-Layouts.
|
|
16
|
+
* * Splits an array into smaller groups (chunks). Ideal for pagination or grid layouts.
|
|
20
17
|
* @example
|
|
21
|
-
* chunk([1, 2, 3, 4, 5], 2)
|
|
18
|
+
* chunk([1, 2, 3, 4, 5], 2) => [[1, 2], [3, 4], [5]]
|
|
22
19
|
* @param array
|
|
23
|
-
* *
|
|
24
|
-
* * π©πͺ: Das Ursprungs-Array.
|
|
20
|
+
* * The source array.
|
|
25
21
|
* @param size
|
|
26
|
-
* *
|
|
27
|
-
* * π©πͺ: Die GrΓΆΓe jedes Chunks.
|
|
22
|
+
* * The size of each chunk.
|
|
28
23
|
* @returns
|
|
29
|
-
* *
|
|
30
|
-
* * π©πͺ: Ein Array aus Arrays.
|
|
24
|
+
* * An array of arrays.
|
|
31
25
|
*/
|
|
32
26
|
export declare function chunk<T>(array: T[], size: number): T[][];
|
|
33
27
|
/**
|
|
34
|
-
* *
|
|
35
|
-
* * π©πͺ: FΓΌhrt mehrere Arrays zu einem einzigen flachen Array zusammen.
|
|
28
|
+
* * Merges multiple arrays into a single flat array.
|
|
36
29
|
* @param arrays
|
|
37
|
-
* *
|
|
38
|
-
* * π©πͺ: Eine Liste von Arrays.
|
|
30
|
+
* * A list of arrays.
|
|
39
31
|
* @returns
|
|
40
|
-
* *
|
|
41
|
-
* * π©πͺ: Ein neues, zusammengefΓΌgtes Array.
|
|
32
|
+
* * A new, merged array.
|
|
42
33
|
*/
|
|
43
|
-
export declare function
|
|
34
|
+
export declare function mergeArray<T>(...arrays: T[][]): T[];
|
|
44
35
|
/**
|
|
45
|
-
* *
|
|
46
|
-
* * π©πͺ: FΓΌgt ein Element sicher an einer bestimmten Position hinzu, ohne das Original-Array zu mutieren (Immutable).
|
|
36
|
+
* * Safely adds an element at a specific position without mutating the original array (Immutable).
|
|
47
37
|
* @param array
|
|
48
|
-
* *
|
|
49
|
-
* * π©πͺ: Das Array.
|
|
38
|
+
* * The array.
|
|
50
39
|
* @param item
|
|
51
|
-
* *
|
|
52
|
-
* * π©πͺ: Das hinzuzufΓΌgende Element.
|
|
40
|
+
* * The item to add.
|
|
53
41
|
* @param index
|
|
54
|
-
* *
|
|
55
|
-
* * π©πͺ: Die Position (Standard: Ende). Negative Werte zΓ€hlen von hinten (-1 = vor dem letzten).
|
|
42
|
+
* * The position (default: end). Negative values count from the back (-1 = before the last one).
|
|
56
43
|
* @returns
|
|
57
|
-
* *
|
|
58
|
-
* * π©πͺ: Ein neues Array inklusive dem Element.
|
|
44
|
+
* * A new array including the element.
|
|
59
45
|
*/
|
|
60
46
|
export declare function add<T>(array: T[], item: T, index?: number): T[];
|
|
61
47
|
/**
|
|
62
|
-
* *
|
|
63
|
-
* * π©πͺ: Entfernt Elemente basierend auf Index oder Match-Logik.
|
|
48
|
+
* * Removes elements based on index or match logic.
|
|
64
49
|
*/
|
|
65
50
|
export declare const remove: {
|
|
66
51
|
/**
|
|
67
|
-
* *
|
|
68
|
-
* * π©πͺ: Entfernt ein Element an einem spezifischen Index.
|
|
52
|
+
* * Removes an element at a specific index.
|
|
69
53
|
* @param array
|
|
70
|
-
* *
|
|
71
|
-
* * π©πͺ: Das Array.
|
|
54
|
+
* * The array.
|
|
72
55
|
* @param index
|
|
73
|
-
* *
|
|
74
|
-
* * π©πͺ: Der Index (negativ mΓΆglich).
|
|
56
|
+
* * The index (negative values allowed).
|
|
75
57
|
*/
|
|
76
58
|
at<T>(array: T[], index: number): T[];
|
|
77
59
|
/**
|
|
78
|
-
* *
|
|
79
|
-
*
|
|
60
|
+
* * Removes the first element.
|
|
61
|
+
* @param array
|
|
62
|
+
* * The array.
|
|
80
63
|
*/
|
|
81
64
|
first<T>(array: T[]): T[];
|
|
82
65
|
/**
|
|
83
|
-
* *
|
|
84
|
-
*
|
|
66
|
+
* * Removes the last element.
|
|
67
|
+
* @param array
|
|
68
|
+
* * The array.
|
|
85
69
|
*/
|
|
86
70
|
last<T>(array: T[]): T[];
|
|
87
71
|
/**
|
|
88
|
-
* *
|
|
89
|
-
* * π©πͺ: Entfernt alle Elemente, die einer Suchbedingung entsprechen.
|
|
72
|
+
* * Removes all elements matching a query condition.
|
|
90
73
|
* @example
|
|
91
74
|
* remove.byMatch(users, 'Admin', 'exact', 'role')
|
|
92
75
|
* @param array
|
|
93
|
-
* *
|
|
94
|
-
* * π©πͺ: Das Array.
|
|
76
|
+
* * The array.
|
|
95
77
|
* @param query
|
|
96
|
-
* *
|
|
97
|
-
* * π©πͺ: Der Suchbegriff.
|
|
78
|
+
* * The search query.
|
|
98
79
|
* @param mode
|
|
99
|
-
* *
|
|
100
|
-
* * π©πͺ: Der Vergleichsmodus ('exact', 'contains', 'startsWith', 'endsWith').
|
|
80
|
+
* * The comparison mode ('exact', 'contains', 'startsWith', 'endsWith').
|
|
101
81
|
* @param key
|
|
102
|
-
* *
|
|
103
|
-
* * π©πͺ: (Optional) Der ObjektschlΓΌssel, falls es ein Array von Objekten ist.
|
|
82
|
+
* * (Optional) The object key if it is an array of objects.
|
|
104
83
|
*/
|
|
105
84
|
byMatch<T>(array: T[], query: string | number, mode?: MatchMode, key?: keyof T): T[];
|
|
106
85
|
};
|
|
107
86
|
/**
|
|
108
|
-
* *
|
|
109
|
-
* * π©πͺ: Sucht Elemente im Array.
|
|
87
|
+
* * Searches for elements in the array.
|
|
110
88
|
*/
|
|
111
89
|
export declare const find: {
|
|
112
90
|
/**
|
|
113
|
-
* *
|
|
114
|
-
*
|
|
91
|
+
* * Finds the index of the first match.
|
|
92
|
+
* @param array
|
|
93
|
+
* * The array.
|
|
94
|
+
* @param query
|
|
95
|
+
* * The search query.
|
|
96
|
+
* @param mode
|
|
97
|
+
* * The comparison mode ('exact', 'contains', 'startsWith', 'endsWith').
|
|
98
|
+
* @param key
|
|
99
|
+
* * (Optional) The object key if it is an array of objects.
|
|
115
100
|
* @returns
|
|
116
|
-
* *
|
|
117
|
-
* * π©πͺ: Index oder -1.
|
|
101
|
+
* * Index or -1.
|
|
118
102
|
*/
|
|
119
|
-
|
|
103
|
+
at<T>(array: T[], query: string | number, mode?: MatchMode, key?: keyof T): number;
|
|
120
104
|
/**
|
|
121
|
-
* *
|
|
122
|
-
*
|
|
105
|
+
* * Returns all elements matching the condition (Filter).
|
|
106
|
+
* @param array
|
|
107
|
+
* * The array.
|
|
108
|
+
* @param query
|
|
109
|
+
* * The search query.
|
|
110
|
+
* @param mode
|
|
111
|
+
* * The comparison mode ('exact', 'contains', 'startsWith', 'endsWith').
|
|
112
|
+
* @param key
|
|
113
|
+
* * (Optional) The object key if it is an array of objects.
|
|
114
|
+
* @returns
|
|
115
|
+
* * All matching elements or -1.
|
|
123
116
|
*/
|
|
124
117
|
all<T>(array: T[], query: string | number, mode?: MatchMode, key?: keyof T): T[];
|
|
125
118
|
/**
|
|
126
|
-
* *
|
|
127
|
-
*
|
|
119
|
+
* * Returns the first matching element (or undefined).
|
|
120
|
+
* @param array
|
|
121
|
+
* * The array.
|
|
122
|
+
* @param query
|
|
123
|
+
* * The search query.
|
|
124
|
+
* @param mode
|
|
125
|
+
* * The comparison mode ('exact', 'contains', 'startsWith', 'endsWith').
|
|
126
|
+
* @param key
|
|
127
|
+
* * (Optional) The object key if it is an array of objects.
|
|
128
|
+
* @returns
|
|
129
|
+
* * Index or -1.
|
|
128
130
|
*/
|
|
129
131
|
first<T>(array: T[], query: string | number, mode?: MatchMode, key?: keyof T): T | undefined;
|
|
132
|
+
/**
|
|
133
|
+
* * Returns the last matching element (or undefined).
|
|
134
|
+
* @param array
|
|
135
|
+
* * The array.
|
|
136
|
+
* @param query
|
|
137
|
+
* * The search query.
|
|
138
|
+
* @param mode
|
|
139
|
+
* * The comparison mode ('exact', 'contains', 'startsWith', 'endsWith').
|
|
140
|
+
* @param key
|
|
141
|
+
* * (Optional) The object key if it is an array of objects.
|
|
142
|
+
* @returns
|
|
143
|
+
* * Index or -1.
|
|
144
|
+
*/
|
|
145
|
+
last<T>(array: T[], query: string | number, mode?: MatchMode, key?: keyof T): T | undefined;
|
|
146
|
+
/**
|
|
147
|
+
* * Removes all elements matching a query condition.
|
|
148
|
+
* @example
|
|
149
|
+
* find.byMatch(users, 'Admin', 'exact', 'role')
|
|
150
|
+
* @param array
|
|
151
|
+
* * The array.
|
|
152
|
+
* @param query
|
|
153
|
+
* * The search query.
|
|
154
|
+
* @param mode
|
|
155
|
+
* * The comparison mode ('exact', 'contains', 'startsWith', 'endsWith').
|
|
156
|
+
* @param key
|
|
157
|
+
* * (Optional) The object key if it is an array of objects.
|
|
158
|
+
* @returns
|
|
159
|
+
* * Index or -1.
|
|
160
|
+
*/
|
|
161
|
+
byMatch<T>(array: T[], query: string | number, mode?: MatchMode, key?: keyof T): number | undefined;
|
|
130
162
|
};
|
|
131
163
|
//# sourceMappingURL=arrays.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"arrays.d.ts","sourceRoot":"","sources":["../../../src/modules/data/arrays.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"arrays.d.ts","sourceRoot":"","sources":["../../../src/modules/data/arrays.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,wBAAgB,KAAK,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,MAAM,GAAG,CAAC,EAAE,EAAE,CAMxD;AAED;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,CAAC,EAAE,EAAE,GAAG,CAAC,EAAE,CAEnD;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC,EAAE,KAAK,GAAE,MAAqB,GAAG,CAAC,EAAE,CAK7E;AAED;;GAEG;AACH,eAAO,MAAM,MAAM;IACf;;;;;;OAMG;OACA,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,GAAG,CAAC,EAAE;IASrC;;;;OAIG;UACG,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,EAAE;IAEzB;;;;OAIG;SACE,CAAC,SAAS,CAAC,EAAE,GAAG,CAAC,EAAE;IAExB;;;;;;;;;;;;OAYG;YACK,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,GAAG,MAAM,SAAQ,SAAS,QAAkB,MAAM,CAAC,GAAG,CAAC,EAAE;CAchG,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,IAAI;IACb;;;;;;;;;;;;OAYG;OACA,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,GAAG,MAAM,SAAQ,SAAS,QAAkB,MAAM,CAAC,GAAG,MAAM;IAe3F;;;;;;;;;;;;OAYG;QACC,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,GAAG,MAAM,SAAQ,SAAS,QAAkB,MAAM,CAAC,GAAG,CAAC,EAAE;IAezF;;;;;;;;;;;;OAYG;UACG,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,GAAG,MAAM,SAAQ,SAAS,QAAkB,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS;IAerG;;;;;;;;;;;;OAYG;SACE,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,GAAG,MAAM,SAAQ,SAAS,QAAkB,MAAM,CAAC,GAAG,CAAC,GAAG,SAAS;IAepG;;;;;;;;;;;;;;OAcG;YACK,CAAC,SAAS,CAAC,EAAE,SAAS,MAAM,GAAG,MAAM,SAAQ,SAAS,QAAkB,MAAM,CAAC,GAAG,MAAM,GAAG,SAAS;CAc/G,CAAC"}
|
|
@@ -1,26 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file src/modules/data/index.ts
|
|
3
|
-
* @version 2.0.
|
|
3
|
+
* @version 2.0.2
|
|
4
4
|
* @since 2.0.0
|
|
5
5
|
* * @license GPL-3.0-or-later
|
|
6
6
|
* @copyright Sven Minio 2026
|
|
7
7
|
* @author Sven Minio <https://sven-minio.de>
|
|
8
8
|
* @category Data
|
|
9
9
|
* @description
|
|
10
|
-
* *
|
|
11
|
-
* * π©πͺ: Zentraler Einstiegspunkt fΓΌr Datenmanipulations-Module. Aggregiert Array- und Objekt-Hilfsmethoden.
|
|
10
|
+
* * Central entry point for data manipulation modules. Aggregates array and object utilities.
|
|
12
11
|
* @requires ./arrays
|
|
13
|
-
* *
|
|
14
|
-
* * π©πͺ: Methoden zur Array-Manipulation.
|
|
12
|
+
* * Array manipulation methods.
|
|
15
13
|
* @requires ./objects
|
|
16
|
-
* *
|
|
17
|
-
* * π©πͺ: Methoden zur Objekt-Manipulation.
|
|
14
|
+
* * Object manipulation methods.
|
|
18
15
|
*/
|
|
19
16
|
import * as arrayMethods from './arrays';
|
|
20
17
|
import * as objectMethods from './objects';
|
|
21
18
|
/**
|
|
22
|
-
* *
|
|
23
|
-
* * π©πͺ: Zentrales Daten-Utility-Objekt. BΓΌndelt Methoden zur Array- ('arr') und Objekt-Manipulation ('obj').
|
|
19
|
+
* * Central data utility object. Bundles array ('arr') and object ('obj') manipulation methods.
|
|
24
20
|
*/
|
|
25
21
|
export declare const data: {
|
|
26
22
|
arr: typeof arrayMethods;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/data/index.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/modules/data/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,KAAK,YAAY,MAAM,UAAU,CAAC;AACzC,OAAO,KAAK,aAAa,MAAM,WAAW,CAAC;AAE3C;;GAEG;AACH,eAAO,MAAM,IAAI;;;CAGhB,CAAC"}
|
|
@@ -1,107 +1,139 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file src/modules/data/objects.ts
|
|
3
|
-
* @version 2.0.
|
|
3
|
+
* @version 2.0.2
|
|
4
4
|
* @since 2.0.0
|
|
5
5
|
* @license GPL-3.0-or-later
|
|
6
6
|
* @copyright Sven Minio 2026
|
|
7
7
|
* @author Sven Minio <https://sven-minio.de>
|
|
8
8
|
* @category Data
|
|
9
9
|
* @description
|
|
10
|
-
* *
|
|
11
|
-
* * π©πͺ: Hilfsfunktionen fΓΌr Objekt-Manipulation (z.B. Deep Merge, Erweiterung).
|
|
10
|
+
* * Utility functions for object manipulation (e.g., deep merging, extension).
|
|
12
11
|
* @requires ./types
|
|
13
|
-
* *
|
|
14
|
-
* * π©πͺ: HΓ€ngt von Match-Logik und Typen ab.
|
|
12
|
+
* * Depends on types.
|
|
15
13
|
*/
|
|
16
14
|
import { MatchMode } from './types';
|
|
17
15
|
/**
|
|
18
|
-
* *
|
|
19
|
-
* * π©πͺ: FΓΌhrt mehrere Objekte rekursiv zusammen (Deep Merge).
|
|
16
|
+
* * Recursively merges multiple objects (Deep Merge).
|
|
20
17
|
* @example
|
|
21
|
-
*
|
|
18
|
+
* mergeObjects({ a: 1, b: { x: 1 } }, { b: { y: 2 } }) => { a: 1, b: { x: 1, y: 2 } }
|
|
22
19
|
* @param target
|
|
23
|
-
* *
|
|
24
|
-
* * π©πͺ: Das Zielobjekt (wird modifiziert!).
|
|
20
|
+
* * The target object (will be modified!).
|
|
25
21
|
* @param sources
|
|
26
|
-
* *
|
|
27
|
-
* * π©πͺ: Ein oder mehrere Quellobjekte.
|
|
22
|
+
* * One or more source objects.
|
|
28
23
|
* @returns
|
|
29
|
-
* *
|
|
30
|
-
* * π©πͺ: Das modifizierte Zielobjekt.
|
|
24
|
+
* * The modified target object.
|
|
31
25
|
*/
|
|
32
|
-
export declare function
|
|
26
|
+
export declare function mergeObjects(target: any, ...sources: any[]): any;
|
|
33
27
|
/**
|
|
34
|
-
* *
|
|
35
|
-
* * π©πͺ: Erstellt ein neues Objekt, das nur die angegebenen SchlΓΌssel enthΓ€lt (Allowlist).
|
|
28
|
+
* * Creates a new object containing only the specified keys (Allowlist).
|
|
36
29
|
* @param obj
|
|
37
|
-
* *
|
|
38
|
-
* * π©πͺ: Das Quellobjekt.
|
|
30
|
+
* * The source object.
|
|
39
31
|
* @param keys
|
|
40
|
-
* *
|
|
41
|
-
* * π©πͺ: Array der SchlΓΌssel, die ΓΌbernommen werden sollen.
|
|
32
|
+
* * Array of keys to keep.
|
|
42
33
|
* @returns
|
|
43
|
-
* *
|
|
44
|
-
* * π©πͺ: Ein neues Objekt mit den gewΓ€hlten SchlΓΌsseln.
|
|
34
|
+
* * A new object with selected keys.
|
|
45
35
|
*/
|
|
46
36
|
export declare function pick<T extends object, K extends keyof T>(obj: T, keys: K[]): Pick<T, K>;
|
|
47
37
|
/**
|
|
48
|
-
* *
|
|
49
|
-
* * π©πͺ: Erstellt ein neues Objekt, das alle SchlΓΌssel enthΓ€lt AUαΊER den angegebenen (Blocklist).
|
|
38
|
+
* * Creates a new object containing all keys EXCEPT the specified ones (Blocklist).
|
|
50
39
|
* @param obj
|
|
51
|
-
* *
|
|
52
|
-
* * π©πͺ: Das Quellobjekt.
|
|
40
|
+
* * The source object.
|
|
53
41
|
* @param keys
|
|
54
|
-
* *
|
|
55
|
-
* * π©πͺ: Array der SchlΓΌssel, die entfernt werden sollen.
|
|
42
|
+
* * Array of keys to remove.
|
|
56
43
|
* @returns
|
|
57
|
-
* *
|
|
58
|
-
* * π©πͺ: Ein neues Objekt ohne die angegebenen SchlΓΌssel.
|
|
44
|
+
* * A new object without the specified keys.
|
|
59
45
|
*/
|
|
60
46
|
export declare function omit<T, K extends keyof T>(obj: T, keys: K[]): Omit<T, K>;
|
|
61
47
|
/**
|
|
62
|
-
* *
|
|
63
|
-
* * π©πͺ: Liest einen Wert aus einem verschachtelten Objekt sicher aus (Safe Navigation).
|
|
48
|
+
* * Safely retrieves a value from a nested object (Safe Navigation).
|
|
64
49
|
* @example
|
|
65
|
-
* get(user, 'address.city')
|
|
50
|
+
* get(user, 'address.city') Returns city or undefined
|
|
66
51
|
* @param obj
|
|
67
|
-
* *
|
|
68
|
-
* * π©πͺ: Das Objekt.
|
|
52
|
+
* * The object.
|
|
69
53
|
* @param path
|
|
70
|
-
* *
|
|
71
|
-
* * π©πͺ: Der Pfad als String mit Punkt-Notation.
|
|
54
|
+
* * The path as a dot-notation string.
|
|
72
55
|
* @returns
|
|
73
|
-
* *
|
|
74
|
-
* * π©πͺ: Der gefundene Wert oder undefined.
|
|
56
|
+
* * The found value or undefined.
|
|
75
57
|
*/
|
|
76
58
|
export declare function get(obj: any, path: string): any;
|
|
77
59
|
/**
|
|
78
|
-
* *
|
|
79
|
-
* * π©πͺ: Setzt einen Wert tief in einem verschachtelten Objekt. Erstellt fehlende Zwischen-Objekte automatisch.
|
|
60
|
+
* * Sets a value deeply within a nested object. Creates missing intermediate objects automatically.
|
|
80
61
|
* @param obj
|
|
81
|
-
* *
|
|
82
|
-
* * π©πͺ: Das zu modifizierende Objekt.
|
|
62
|
+
* * The object to modify.
|
|
83
63
|
* @param path
|
|
84
|
-
* *
|
|
85
|
-
* * π©πͺ: Der Pfad als String (z.B. 'settings.theme.color').
|
|
64
|
+
* * The path as a string (e.g., 'settings.theme.color').
|
|
86
65
|
* @param value
|
|
87
|
-
* *
|
|
88
|
-
* * π©πͺ: Der zu setzende Wert.
|
|
66
|
+
* * The value to set.
|
|
89
67
|
*/
|
|
90
68
|
export declare function set(obj: any, path: string, value: any): void;
|
|
91
69
|
/**
|
|
92
|
-
* *
|
|
93
|
-
* * π©πͺ: Sucht Keys oder Values im Objekt.
|
|
70
|
+
* * Searches keys or values in the object.
|
|
94
71
|
*/
|
|
95
72
|
export declare const find: {
|
|
96
73
|
/**
|
|
97
|
-
* *
|
|
98
|
-
*
|
|
74
|
+
* * Returns the n-th entry of an object as a [key, value] pair. Supports negative indices.
|
|
75
|
+
* @example find.at({ a: 1, b: 2 }, 1) => ['b', 2]
|
|
76
|
+
* @param obj
|
|
77
|
+
* * The object to search.
|
|
78
|
+
* @param index
|
|
79
|
+
* * The index (0-based, negative counts from the back).
|
|
80
|
+
* @returns
|
|
81
|
+
* * A [key, value] tuple or undefined.
|
|
82
|
+
*/
|
|
83
|
+
at(obj: any, index: number): [string, any] | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* * Finds the first entry where the key or value matches the query.
|
|
86
|
+
* @example find.first(config, 'admin', 'exact', 'key')
|
|
87
|
+
* @param obj
|
|
88
|
+
* * The object to search.
|
|
89
|
+
* @param query
|
|
90
|
+
* * The search query.
|
|
91
|
+
* @param mode
|
|
92
|
+
* * The comparison mode ('exact', 'contains', 'startsWith', 'endsWith').
|
|
93
|
+
* @param searchBy
|
|
94
|
+
* * Whether to search by 'key' or 'value'.
|
|
95
|
+
* @returns
|
|
96
|
+
* * The first matching [key, value] pair or undefined.
|
|
97
|
+
*/
|
|
98
|
+
first(obj: any, query: string | number, mode?: MatchMode, searchBy?: "key" | "value"): [string, any] | undefined;
|
|
99
|
+
/**
|
|
100
|
+
* * Finds the last entry where the key or value matches the query.
|
|
101
|
+
* @example find.last(config, '.php', 'endsWith', 'key')
|
|
102
|
+
* @param obj
|
|
103
|
+
* * The object to search.
|
|
104
|
+
* @param query
|
|
105
|
+
* * The search query.
|
|
106
|
+
* @param mode
|
|
107
|
+
* * The comparison mode ('exact', 'contains', 'startsWith', 'endsWith').
|
|
108
|
+
* @param searchBy
|
|
109
|
+
* * Whether to search by 'key' or 'value'.
|
|
110
|
+
* @returns
|
|
111
|
+
* * The last matching [key, value] pair or undefined.
|
|
112
|
+
*/
|
|
113
|
+
last(obj: any, query: string | number, mode?: MatchMode, searchBy?: "key" | "value"): [string, any] | undefined;
|
|
114
|
+
/**
|
|
115
|
+
* * Finds all keys matching the query.
|
|
99
116
|
* @example find.key(config, 'api_', 'startsWith')
|
|
117
|
+
* @param obj
|
|
118
|
+
* * The object to search.
|
|
119
|
+
* @param query
|
|
120
|
+
* * The search query.
|
|
121
|
+
* @param mode
|
|
122
|
+
* * The comparison mode ('exact', 'contains', 'startsWith', 'endsWith').
|
|
123
|
+
* @returns
|
|
124
|
+
* * An array of matching keys.
|
|
100
125
|
*/
|
|
101
126
|
key(obj: any, query: string, mode?: MatchMode): string[];
|
|
102
127
|
/**
|
|
103
|
-
* *
|
|
104
|
-
*
|
|
128
|
+
* * Finds all values matching the query.
|
|
129
|
+
* @param obj
|
|
130
|
+
* * The object to search.
|
|
131
|
+
* @param query
|
|
132
|
+
* * The search query.
|
|
133
|
+
* @param mode
|
|
134
|
+
* * The comparison mode ('exact', 'contains', 'startsWith', 'endsWith').
|
|
135
|
+
* @returns
|
|
136
|
+
* * An array of matching values.
|
|
105
137
|
*/
|
|
106
138
|
value(obj: any, query: string, mode?: MatchMode): any[];
|
|
107
139
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"objects.d.ts","sourceRoot":"","sources":["../../../src/modules/data/objects.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"objects.d.ts","sourceRoot":"","sources":["../../../src/modules/data/objects.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEpC;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAAC,MAAM,EAAE,GAAG,EAAE,GAAG,OAAO,EAAE,GAAG,EAAE,GAAG,GAAG,CAkBhE;AAED;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAMvF;AAED;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,CAAC,EAAE,GAAG,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,CAMxE;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,GAAG,GAAG,CAE/C;AAED;;;;;;;;GAQG;AACH,wBAAgB,GAAG,CAAC,GAAG,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,GAAG,IAAI,CAS5D;AAED;;GAEG;AACH,eAAO,MAAM,IAAI;IACb;;;;;;;;;OASG;YACK,GAAG,SAAS,MAAM,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS;IAMtD;;;;;;;;;;;;;OAaG;eACQ,GAAG,SAAS,MAAM,GAAG,MAAM,SAAQ,SAAS,aAAsB,KAAK,GAAG,OAAO,GAAW,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS;IAkBhI;;;;;;;;;;;;;OAaG;cACO,GAAG,SAAS,MAAM,GAAG,MAAM,SAAQ,SAAS,aAAsB,KAAK,GAAG,OAAO,GAAW,CAAC,MAAM,EAAE,GAAG,CAAC,GAAG,SAAS;IAkB/H;;;;;;;;;;;OAWG;aACM,GAAG,SAAS,MAAM,SAAQ,SAAS,GAAa,MAAM,EAAE;IAejE;;;;;;;;;;OAUG;eACQ,GAAG,SAAS,MAAM,SAAQ,SAAS,GAAa,GAAG,EAAE;CAcnE,CAAC"}
|
|
@@ -1,35 +1,16 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file src/modules/data/types.ts
|
|
3
|
-
* @version 2.0.
|
|
3
|
+
* @version 2.0.2
|
|
4
4
|
* @since 2.0.0
|
|
5
5
|
* @license GPL-3.0-or-later
|
|
6
6
|
* @copyright Sven Minio 2026
|
|
7
7
|
* @author Sven Minio <https://sven-minio.de>
|
|
8
8
|
* @category Data
|
|
9
9
|
* @description
|
|
10
|
-
* *
|
|
11
|
-
* * π©πͺ: Typ-Definitionen und Validierungs-Hilfsmittel fΓΌr Datenstrukturen.
|
|
10
|
+
* * Type definitions and validation helpers for data structures.
|
|
12
11
|
*/
|
|
13
12
|
/**
|
|
14
|
-
* *
|
|
15
|
-
* * π©πͺ: Definiert die Vergleichsmodi fΓΌr Suchoperationen.
|
|
13
|
+
* * Defines the matching modes for search operations.
|
|
16
14
|
*/
|
|
17
15
|
export type MatchMode = 'exact' | 'contains' | 'startsWith' | 'endsWith';
|
|
18
|
-
/**
|
|
19
|
-
* * π¬π§: Internal helper to compare values based on the specified mode. Converts values to strings and lowercase for comparison.
|
|
20
|
-
* * π©πͺ: Interner Helfer zum Vergleichen von Werten basierend auf dem angegebenen Modus. Konvertiert Werte fΓΌr den Vergleich in Strings und Kleinschreibung.
|
|
21
|
-
* @param value
|
|
22
|
-
* * π¬π§: The value to check.
|
|
23
|
-
* * π©πͺ: Der zu prΓΌfende Wert.
|
|
24
|
-
* @param query
|
|
25
|
-
* * π¬π§: The search query.
|
|
26
|
-
* * π©πͺ: Der Suchbegriff.
|
|
27
|
-
* @param mode
|
|
28
|
-
* * π¬π§: The matching mode.
|
|
29
|
-
* * π©πͺ: Der Vergleichsmodus.
|
|
30
|
-
* @returns
|
|
31
|
-
* * π¬π§: True if the value matches the query.
|
|
32
|
-
* * π©πͺ: True, wenn der Wert mit der Query ΓΌbereinstimmt.
|
|
33
|
-
*/
|
|
34
|
-
export declare function checkMatch(value: any, query: any, mode: MatchMode): boolean;
|
|
35
16
|
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/data/types.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/modules/data/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;GAUG;AAEH;;GAEG;AACH,MAAM,MAAM,SAAS,GAAG,OAAO,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,CAAC"}
|
|
@@ -1,42 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file src/modules/dom/attributes.ts
|
|
3
|
-
* @version 2.0.
|
|
3
|
+
* @version 2.0.2
|
|
4
4
|
* @since 2.0.0
|
|
5
5
|
* @license GPL-3.0-or-later
|
|
6
6
|
* @copyright Sven Minio 2026
|
|
7
7
|
* @author Sven Minio <https://sven-minio.de>
|
|
8
8
|
* @category DOM
|
|
9
9
|
* @description
|
|
10
|
-
* *
|
|
11
|
-
* * π©πͺ: Methoden zum Lesen und Setzen von HTML-Attributen und Eigenschaften (attr, data, val).
|
|
10
|
+
* * Methods for getting and setting HTML attributes and properties (attr, data, val).
|
|
12
11
|
* @requires ../../core
|
|
13
|
-
* *
|
|
14
|
-
* * π©πͺ: HΓ€ngt von der Core-jBase-Klasse fΓΌr Typ-Definitionen ab.
|
|
12
|
+
* * Depends on the core jBase class for type definitions.
|
|
15
13
|
*/
|
|
16
14
|
import { jBase } from '../../core';
|
|
17
15
|
/**
|
|
18
|
-
* *
|
|
19
|
-
* * π©πͺ: Liest ein Attribut vom ersten Element oder setzt es fΓΌr alle Elemente in der Auswahl.
|
|
16
|
+
* * Gets an attribute from the first element or sets it for all elements in the selection.
|
|
20
17
|
* @param name
|
|
21
|
-
* *
|
|
22
|
-
* * π©πͺ: Der Name des Attributs (z.B. 'href', 'data-id').
|
|
18
|
+
* * The name of the attribute (e.g., 'href', 'data-id').
|
|
23
19
|
* @param value
|
|
24
|
-
* *
|
|
25
|
-
* * π©πͺ: (Optional) Der zu setzende Wert. Wenn nicht angegeben, wird gelesen.
|
|
20
|
+
* * (Optional) The value to set. If undefined, acts as a getter.
|
|
26
21
|
* @returns
|
|
27
|
-
* *
|
|
28
|
-
* * π©πͺ: Beim Lesen: Der Wert des Attributs (string/null). Beim Schreiben: Die jBase-Instanz.
|
|
22
|
+
* * The attribute value (string/null) when reading, or the jBase instance when writing.
|
|
29
23
|
*/
|
|
30
24
|
export declare function attr(this: jBase, name: string, value?: string): string | null | jBase;
|
|
31
25
|
/**
|
|
32
|
-
* *
|
|
33
|
-
* * π©πͺ: Liest den 'value' vom ersten Formularelement oder setzt ihn fΓΌr alle Elemente. UnterstΓΌtzt Input-, Textarea- und Select-Elemente.
|
|
26
|
+
* * Gets the 'value' from the first form element or sets it for all elements. Supports Input, Textarea, and Select elements.
|
|
34
27
|
* @param value
|
|
35
|
-
* *
|
|
36
|
-
* * π©πͺ: (Optional) Der zu setzende Wert. Wenn nicht angegeben, wird gelesen.
|
|
28
|
+
* * (Optional) The value to set. If undefined, acts as a getter.
|
|
37
29
|
* @returns
|
|
38
|
-
* *
|
|
39
|
-
* * π©πͺ: Beim Lesen: Der aktuelle Wert als String. Beim Schreiben: Die jBase-Instanz.
|
|
30
|
+
* * The current value as a string when reading, or the jBase instance when writing.
|
|
40
31
|
*/
|
|
41
32
|
export declare function val(this: jBase, value?: string): string | jBase;
|
|
42
33
|
//# sourceMappingURL=attributes.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../src/modules/dom/attributes.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"attributes.d.ts","sourceRoot":"","sources":["../../../src/modules/dom/attributes.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC;;;;;;;;GAQG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,GAAG,KAAK,CAUrF;AAED;;;;;;GAMG;AACH,wBAAgB,GAAG,CAAC,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAe/D"}
|
|
@@ -1,39 +1,31 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @file src/modules/dom/content.ts
|
|
3
|
-
* @version 2.0.
|
|
3
|
+
* @version 2.0.2
|
|
4
4
|
* @since 2.0.0
|
|
5
5
|
* @license GPL-3.0-or-later
|
|
6
6
|
* @copyright Sven Minio 2026
|
|
7
7
|
* @author Sven Minio <https://sven-minio.de>
|
|
8
8
|
* @category DOM
|
|
9
9
|
* @description
|
|
10
|
-
* *
|
|
11
|
-
* * π©πͺ: Methoden zum Lesen und Setzen von Elementinhalten (html, text, empty, replaceWith).
|
|
10
|
+
* * Methods for getting and setting element content (html, text, empty, replaceWith).
|
|
12
11
|
* @requires ../../core
|
|
13
|
-
* *
|
|
14
|
-
* * π©πͺ: HΓ€ngt von der Core-jBase-Klasse fΓΌr Typ-Definitionen ab.
|
|
12
|
+
* * Depends on the core jBase class for type definitions.
|
|
15
13
|
*/
|
|
16
14
|
import { jBase } from '../../core';
|
|
17
15
|
/**
|
|
18
|
-
* *
|
|
19
|
-
* * π©πͺ: Ruft den HTML-Inhalt des ersten Elements ab oder setzt den HTML-Inhalt fΓΌr alle Elemente in der Auswahl.
|
|
16
|
+
* * Gets the HTML content of the first element or sets the HTML content for all elements in the selection.
|
|
20
17
|
* @param content
|
|
21
|
-
* *
|
|
22
|
-
* * π©πͺ: (Optional) Der HTML-String, der gesetzt werden soll.
|
|
18
|
+
* * (Optional) The HTML string to set.
|
|
23
19
|
* @returns
|
|
24
|
-
* *
|
|
25
|
-
* * π©πͺ: Der HTML-String (Getter) oder die aktuelle jBase-Instanz (Setter).
|
|
20
|
+
* * The HTML string (getter) or the current jBase instance (setter).
|
|
26
21
|
*/
|
|
27
22
|
export declare function html(this: jBase, content?: string): string | jBase;
|
|
28
23
|
/**
|
|
29
|
-
* *
|
|
30
|
-
* * π©πͺ: Ruft den reinen Text-Inhalt des ersten Elements ab oder setzt ihn fΓΌr alle Elemente. Sicher gegen XSS-Angriffe.
|
|
24
|
+
* * Gets the text content of the first element or sets it for all elements. Safe against XSS attacks.
|
|
31
25
|
* @param content
|
|
32
|
-
* *
|
|
33
|
-
* * π©πͺ: (Optional) Der Text, der gesetzt werden soll.
|
|
26
|
+
* * (Optional) The text content to set.
|
|
34
27
|
* @returns
|
|
35
|
-
* *
|
|
36
|
-
* * π©πͺ: Der Text-Inhalt (Getter) oder die aktuelle jBase-Instanz (Setter).
|
|
28
|
+
* * The text content (getter) or the current jBase instance (setter).
|
|
37
29
|
*/
|
|
38
30
|
export declare function text(this: jBase, content?: string): string | jBase;
|
|
39
31
|
//# sourceMappingURL=content.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/modules/dom/content.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"content.d.ts","sourceRoot":"","sources":["../../../src/modules/dom/content.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAEH,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CASlE;AAED;;;;;;GAMG;AACH,wBAAgB,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAYlE"}
|