@domql/utils 3.2.3 → 3.2.10
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/array.js +11 -5
- package/cache.js +3 -0
- package/component.js +3 -4
- package/dist/cjs/array.js +11 -5
- package/dist/cjs/component.js +4 -6
- package/dist/cjs/element.js +5 -5
- package/dist/cjs/extends.js +43 -27
- package/dist/cjs/function.js +3 -3
- package/dist/cjs/index.js +1 -0
- package/dist/cjs/key.js +2 -2
- package/dist/cjs/keys.js +30 -16
- package/dist/cjs/methods.js +64 -28
- package/dist/cjs/object.js +141 -125
- package/dist/cjs/props.js +41 -32
- package/dist/cjs/scope.js +1 -2
- package/dist/cjs/state.js +9 -8
- package/dist/cjs/string.js +15 -20
- package/dist/cjs/tags.js +69 -4
- package/dist/cjs/triggerEvent.js +90 -0
- package/dist/cjs/types.js +4 -12
- package/dist/esm/array.js +11 -5
- package/dist/esm/component.js +4 -6
- package/dist/esm/element.js +8 -26
- package/dist/esm/extends.js +47 -49
- package/dist/esm/function.js +3 -3
- package/dist/esm/index.js +1 -0
- package/dist/esm/key.js +2 -2
- package/dist/esm/keys.js +30 -16
- package/dist/esm/methods.js +63 -42
- package/dist/esm/object.js +145 -149
- package/dist/esm/props.js +41 -48
- package/dist/esm/scope.js +1 -2
- package/dist/esm/state.js +17 -34
- package/dist/esm/string.js +15 -20
- package/dist/esm/tags.js +69 -4
- package/dist/esm/triggerEvent.js +70 -0
- package/dist/esm/types.js +4 -12
- package/dist/iife/index.js +2779 -0
- package/element.js +2 -2
- package/extends.js +28 -17
- package/function.js +4 -6
- package/index.js +1 -0
- package/keys.js +26 -16
- package/methods.js +63 -18
- package/object.js +142 -200
- package/package.json +33 -12
- package/props.js +42 -25
- package/state.js +7 -7
- package/string.js +20 -38
- package/tags.js +43 -4
- package/triggerEvent.js +76 -0
- package/types.js +4 -23
- package/dist/cjs/package.json +0 -4
package/array.js
CHANGED
|
@@ -8,9 +8,11 @@ export const arrayContainsOtherArray = (arr1, arr2) => {
|
|
|
8
8
|
}
|
|
9
9
|
|
|
10
10
|
export const getFrequencyInArray = (arr, value) => {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
11
|
+
let count = 0
|
|
12
|
+
for (let i = 0; i < arr.length; i++) {
|
|
13
|
+
if (arr[i] === value) count++
|
|
14
|
+
}
|
|
15
|
+
return count
|
|
14
16
|
}
|
|
15
17
|
|
|
16
18
|
export const removeFromArray = (arr, index) => {
|
|
@@ -134,8 +136,12 @@ export const filterArraysFast = (sourceArr, excludeArr) => {
|
|
|
134
136
|
}
|
|
135
137
|
|
|
136
138
|
export const checkIfStringIsInArray = (string, arr) => {
|
|
137
|
-
if (!string) return
|
|
138
|
-
|
|
139
|
+
if (!string) return 0
|
|
140
|
+
let count = 0
|
|
141
|
+
for (let i = 0; i < arr.length; i++) {
|
|
142
|
+
if (string.includes(arr[i])) count++
|
|
143
|
+
}
|
|
144
|
+
return count
|
|
139
145
|
}
|
|
140
146
|
|
|
141
147
|
export const removeDuplicatesInArray = arr => {
|
package/cache.js
CHANGED
package/component.js
CHANGED
|
@@ -4,10 +4,9 @@ import { createExtendsFromKeys } from './extends.js'
|
|
|
4
4
|
import { isString } from './types.js'
|
|
5
5
|
|
|
6
6
|
export const matchesComponentNaming = key => {
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return /^[A-Z]*$/.test(firstCharKey)
|
|
7
|
+
if (!isString(key) || !key.length) return false
|
|
8
|
+
const code = key.charCodeAt(0)
|
|
9
|
+
return code >= 65 && code <= 90 // A-Z
|
|
11
10
|
}
|
|
12
11
|
|
|
13
12
|
export function getCapitalCaseKeys (obj) {
|
package/dist/cjs/array.js
CHANGED
|
@@ -44,9 +44,11 @@ const arrayContainsOtherArray = (arr1, arr2) => {
|
|
|
44
44
|
return arr2.every((val) => arr1.includes(val));
|
|
45
45
|
};
|
|
46
46
|
const getFrequencyInArray = (arr, value) => {
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
47
|
+
let count = 0;
|
|
48
|
+
for (let i = 0; i < arr.length; i++) {
|
|
49
|
+
if (arr[i] === value) count++;
|
|
50
|
+
}
|
|
51
|
+
return count;
|
|
50
52
|
};
|
|
51
53
|
const removeFromArray = (arr, index) => {
|
|
52
54
|
if ((0, import_types.isString)(index)) index = parseInt(index);
|
|
@@ -140,8 +142,12 @@ const filterArraysFast = (sourceArr, excludeArr) => {
|
|
|
140
142
|
return sourceArr.filter((item) => !excludeSet.has(item));
|
|
141
143
|
};
|
|
142
144
|
const checkIfStringIsInArray = (string, arr) => {
|
|
143
|
-
if (!string) return;
|
|
144
|
-
|
|
145
|
+
if (!string) return 0;
|
|
146
|
+
let count = 0;
|
|
147
|
+
for (let i = 0; i < arr.length; i++) {
|
|
148
|
+
if (string.includes(arr[i])) count++;
|
|
149
|
+
}
|
|
150
|
+
return count;
|
|
145
151
|
};
|
|
146
152
|
const removeDuplicatesInArray = (arr) => {
|
|
147
153
|
if (!(0, import_types.isArray)(arr)) return arr;
|
package/dist/cjs/component.js
CHANGED
|
@@ -27,10 +27,9 @@ module.exports = __toCommonJS(component_exports);
|
|
|
27
27
|
var import_extends = require("./extends.js");
|
|
28
28
|
var import_types = require("./types.js");
|
|
29
29
|
const matchesComponentNaming = (key) => {
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
return /^[A-Z]*$/.test(firstCharKey);
|
|
30
|
+
if (!(0, import_types.isString)(key) || !key.length) return false;
|
|
31
|
+
const code = key.charCodeAt(0);
|
|
32
|
+
return code >= 65 && code <= 90;
|
|
34
33
|
};
|
|
35
34
|
function getCapitalCaseKeys(obj) {
|
|
36
35
|
return Object.keys(obj).filter((key) => /^[A-Z]/.test(key));
|
|
@@ -39,9 +38,8 @@ function getSpreadChildren(obj) {
|
|
|
39
38
|
return Object.keys(obj).filter((key) => /^\d+$/.test(key));
|
|
40
39
|
}
|
|
41
40
|
function isContextComponent(element, parent, passedKey) {
|
|
42
|
-
var _a, _b;
|
|
43
41
|
const { context } = parent || {};
|
|
44
42
|
const [extendsKey] = (0, import_extends.createExtendsFromKeys)(passedKey);
|
|
45
43
|
const key = passedKey || extendsKey;
|
|
46
|
-
return
|
|
44
|
+
return context?.components?.[key] || context?.pages?.[key];
|
|
47
45
|
}
|
package/dist/cjs/element.js
CHANGED
|
@@ -39,7 +39,7 @@ const ENV = process.env.NODE_ENV;
|
|
|
39
39
|
const returnValueAsText = (element, parent, key) => {
|
|
40
40
|
const childExtendsTag = parent.childExtends && parent.childExtends.tag;
|
|
41
41
|
const childPropsTag = parent.props.childProps && parent.props.childProps.tag;
|
|
42
|
-
const isKeyValidHTMLTag = import_tags.HTML_TAGS.body.
|
|
42
|
+
const isKeyValidHTMLTag = import_tags.HTML_TAGS.body.has(key) && key;
|
|
43
43
|
return {
|
|
44
44
|
text: element,
|
|
45
45
|
tag: childExtendsTag || childPropsTag || isKeyValidHTMLTag || "string"
|
|
@@ -51,7 +51,7 @@ const createBasedOnType = (element, parent, key) => {
|
|
|
51
51
|
console.warn(
|
|
52
52
|
key,
|
|
53
53
|
"element is undefined in",
|
|
54
|
-
parent
|
|
54
|
+
parent?.__ref?.path
|
|
55
55
|
);
|
|
56
56
|
}
|
|
57
57
|
return {};
|
|
@@ -85,8 +85,8 @@ const createRoot = (element, parent) => {
|
|
|
85
85
|
const { __ref: ref } = element;
|
|
86
86
|
const { __ref: parentRef } = parent;
|
|
87
87
|
const hasRoot = parent && parent.key === ":root";
|
|
88
|
-
if (!
|
|
89
|
-
ref.root = hasRoot ? element : parentRef
|
|
88
|
+
if (!ref?.root) {
|
|
89
|
+
ref.root = hasRoot ? element : parentRef?.root;
|
|
90
90
|
}
|
|
91
91
|
};
|
|
92
92
|
const createPath = (element, parent, key) => {
|
|
@@ -116,7 +116,7 @@ const addCaching = (element, parent, key) => {
|
|
|
116
116
|
return ref;
|
|
117
117
|
};
|
|
118
118
|
const createElement = (passedProps, parentEl, passedKey, opts, root) => {
|
|
119
|
-
const hashed = passedProps
|
|
119
|
+
const hashed = passedProps?.__hash;
|
|
120
120
|
const element = hashed ? { extends: [passedProps] } : createBasedOnType(passedProps, parentEl, passedKey);
|
|
121
121
|
if (!element) return;
|
|
122
122
|
const parent = createParent(element, parentEl, passedKey, opts, root);
|
package/dist/cjs/extends.js
CHANGED
|
@@ -77,13 +77,12 @@ const createExtends = (element, parent, key) => {
|
|
|
77
77
|
return __extends;
|
|
78
78
|
};
|
|
79
79
|
const addExtends = (newExtends, element) => {
|
|
80
|
-
var _a;
|
|
81
80
|
const { __ref: ref } = element;
|
|
82
81
|
let { __extends } = ref;
|
|
83
82
|
if (!newExtends) return __extends;
|
|
84
|
-
const variant =
|
|
83
|
+
const variant = element.props?.variant;
|
|
85
84
|
const context = element.context;
|
|
86
|
-
if (variant &&
|
|
85
|
+
if (variant && context?.components && !Array.isArray(newExtends) && typeof newExtends === "string") {
|
|
87
86
|
const variantKey = `${newExtends}.${variant}`;
|
|
88
87
|
if (context.components[variantKey]) {
|
|
89
88
|
newExtends = variantKey;
|
|
@@ -116,7 +115,7 @@ const setHashedExtend = (extend, stack) => {
|
|
|
116
115
|
if (!(0, import_types.isString)(extend)) {
|
|
117
116
|
extend.__hash = hash;
|
|
118
117
|
}
|
|
119
|
-
if (
|
|
118
|
+
if (hash !== "__proto__" && hash !== "constructor" && hash !== "prototype") {
|
|
120
119
|
extendStackRegistry[hash] = stack;
|
|
121
120
|
}
|
|
122
121
|
return stack;
|
|
@@ -138,10 +137,16 @@ const extractArrayExtend = (extend, stack, context, processed = /* @__PURE__ */
|
|
|
138
137
|
return stack;
|
|
139
138
|
};
|
|
140
139
|
const deepExtend = (extend, stack, context, processed = /* @__PURE__ */ new Set()) => {
|
|
141
|
-
const extendOflattenExtend = extend.extends;
|
|
140
|
+
const extendOflattenExtend = extend.extends || extend.extend;
|
|
142
141
|
const cleanExtend = { ...extend };
|
|
143
142
|
delete cleanExtend.extends;
|
|
144
|
-
|
|
143
|
+
delete cleanExtend.extend;
|
|
144
|
+
let hasKeys = false;
|
|
145
|
+
for (const _k in cleanExtend) {
|
|
146
|
+
hasKeys = true;
|
|
147
|
+
break;
|
|
148
|
+
}
|
|
149
|
+
if (hasKeys) {
|
|
145
150
|
stack.push(cleanExtend);
|
|
146
151
|
}
|
|
147
152
|
if (extendOflattenExtend) {
|
|
@@ -159,21 +164,30 @@ const flattenExtend = (extend, stack, context, processed = /* @__PURE__ */ new S
|
|
|
159
164
|
extend = mapStringsWithContextComponents(extend, context);
|
|
160
165
|
}
|
|
161
166
|
processed.add(extend);
|
|
162
|
-
if (extend
|
|
167
|
+
if (extend?.extends || extend?.extend) {
|
|
163
168
|
deepExtend(extend, stack, context, processed);
|
|
164
169
|
} else if (extend) {
|
|
165
170
|
stack.push(extend);
|
|
166
171
|
}
|
|
167
172
|
return stack;
|
|
168
173
|
};
|
|
174
|
+
const MERGE_EXTENDS_SKIP = /* @__PURE__ */ new Set([
|
|
175
|
+
"parent",
|
|
176
|
+
"node",
|
|
177
|
+
"__ref",
|
|
178
|
+
"__proto__",
|
|
179
|
+
"extend",
|
|
180
|
+
"childExtend",
|
|
181
|
+
"childExtendRecursive"
|
|
182
|
+
]);
|
|
169
183
|
const deepMergeExtends = (element, extend) => {
|
|
170
184
|
extend = (0, import_object.deepClone)(extend);
|
|
171
185
|
for (const e in extend) {
|
|
172
|
-
if (
|
|
186
|
+
if (MERGE_EXTENDS_SKIP.has(e)) continue;
|
|
173
187
|
const elementProp = element[e];
|
|
174
188
|
const extendProp = extend[e];
|
|
175
189
|
if (extendProp === void 0) continue;
|
|
176
|
-
if (Object.prototype.hasOwnProperty.call(extend, e) &&
|
|
190
|
+
if (Object.prototype.hasOwnProperty.call(extend, e) && e !== "__proto__" && e !== "constructor" && e !== "prototype") {
|
|
177
191
|
if (elementProp === void 0) {
|
|
178
192
|
element[e] = extendProp;
|
|
179
193
|
} else if ((0, import_types.isObject)(elementProp) && (0, import_types.isObject)(extendProp)) {
|
|
@@ -202,11 +216,11 @@ const cloneAndMergeArrayExtend = (stack) => {
|
|
|
202
216
|
}, {});
|
|
203
217
|
};
|
|
204
218
|
const mapStringsWithContextComponents = (extend, context, options = {}, variant) => {
|
|
205
|
-
const COMPONENTS = context
|
|
206
|
-
const PAGES = context
|
|
219
|
+
const COMPONENTS = context?.components || options.components;
|
|
220
|
+
const PAGES = context?.pages || options.pages;
|
|
207
221
|
if ((0, import_types.isString)(extend)) {
|
|
208
222
|
const componentExists = COMPONENTS && (COMPONENTS[extend + "." + variant] || COMPONENTS[extend] || COMPONENTS["smbls." + extend]);
|
|
209
|
-
const pageExists = PAGES && extend.
|
|
223
|
+
const pageExists = PAGES && extend.charCodeAt(0) === 47 && PAGES[extend];
|
|
210
224
|
if (componentExists) return componentExists;
|
|
211
225
|
else if (pageExists) return pageExists;
|
|
212
226
|
else {
|
|
@@ -237,7 +251,7 @@ const getExtendsInElement = (obj) => {
|
|
|
237
251
|
let result = [];
|
|
238
252
|
function traverse(o) {
|
|
239
253
|
for (const key in o) {
|
|
240
|
-
if (Object.hasOwnProperty.call(o, key)) {
|
|
254
|
+
if (Object.prototype.hasOwnProperty.call(o, key)) {
|
|
241
255
|
if ((0, import_component.matchesComponentNaming)(key)) {
|
|
242
256
|
result.push(key);
|
|
243
257
|
}
|
|
@@ -258,14 +272,16 @@ const getExtendsInElement = (obj) => {
|
|
|
258
272
|
return result;
|
|
259
273
|
};
|
|
260
274
|
const createElementExtends = (element, parent, options = {}) => {
|
|
261
|
-
var _a;
|
|
262
275
|
const { __ref: ref } = element;
|
|
263
276
|
const context = element.context || parent.context;
|
|
264
|
-
const variant =
|
|
277
|
+
const variant = element.props?.variant;
|
|
278
|
+
if (element.extend && !element.extends) element.extends = element.extend;
|
|
279
|
+
delete element.extend;
|
|
280
|
+
if (!element.extends && element.props?.extends) element.extends = element.props.extends;
|
|
265
281
|
if (element.extends) {
|
|
266
282
|
if (Array.isArray(element.extends) && element.extends.length > 0) {
|
|
267
283
|
const [firstExtend, ...restExtends] = element.extends;
|
|
268
|
-
if (typeof firstExtend === "string" && variant &&
|
|
284
|
+
if (typeof firstExtend === "string" && variant && context?.components) {
|
|
269
285
|
const variantKey = `${firstExtend}.${variant}`;
|
|
270
286
|
if (context.components[variantKey]) {
|
|
271
287
|
addExtends([variantKey, ...restExtends], element);
|
|
@@ -275,7 +291,7 @@ const createElementExtends = (element, parent, options = {}) => {
|
|
|
275
291
|
} else {
|
|
276
292
|
addExtends(element.extends, element);
|
|
277
293
|
}
|
|
278
|
-
} else if (typeof element.extends === "string" && variant &&
|
|
294
|
+
} else if (typeof element.extends === "string" && variant && context?.components) {
|
|
279
295
|
const variantKey = `${element.extends}.${variant}`;
|
|
280
296
|
if (context.components[variantKey]) {
|
|
281
297
|
addExtends(variantKey, element);
|
|
@@ -298,28 +314,28 @@ const createElementExtends = (element, parent, options = {}) => {
|
|
|
298
314
|
return (0, import_array.removeDuplicatesInArray)(ref.__extends);
|
|
299
315
|
};
|
|
300
316
|
const inheritChildPropsExtends = (element, parent, options = {}) => {
|
|
301
|
-
var _a, _b, _c;
|
|
302
317
|
const { props, __ref: ref } = element;
|
|
303
|
-
const ignoreChildExtends = options.ignoreChildExtends ||
|
|
318
|
+
const ignoreChildExtends = options.ignoreChildExtends || props?.ignoreChildExtends;
|
|
304
319
|
if (!ignoreChildExtends) {
|
|
305
|
-
if (
|
|
306
|
-
addExtends(
|
|
320
|
+
if (parent.props?.childProps?.extends) {
|
|
321
|
+
addExtends(parent.props?.childProps.extends, element);
|
|
307
322
|
}
|
|
308
323
|
}
|
|
309
324
|
return ref.__extends;
|
|
310
325
|
};
|
|
311
326
|
const inheritChildExtends = (element, parent, options = {}) => {
|
|
312
327
|
const { props, __ref: ref } = element;
|
|
313
|
-
const ignoreChildExtends = options.ignoreChildExtends ||
|
|
314
|
-
|
|
315
|
-
|
|
328
|
+
const ignoreChildExtends = options.ignoreChildExtends || props?.ignoreChildExtends;
|
|
329
|
+
const childExtends = parent.childExtends || parent.childExtend;
|
|
330
|
+
if (!ignoreChildExtends && childExtends) {
|
|
331
|
+
addExtends(childExtends, element);
|
|
316
332
|
}
|
|
317
333
|
return ref.__extends;
|
|
318
334
|
};
|
|
319
335
|
const inheritRecursiveChildExtends = (element, parent, options = {}) => {
|
|
320
336
|
const { props, __ref: ref } = element;
|
|
321
|
-
const childExtendsRecursive = parent.childExtendsRecursive;
|
|
322
|
-
const ignoreChildExtendsRecursive = options.ignoreChildExtendsRecursive ||
|
|
337
|
+
const childExtendsRecursive = parent.childExtendsRecursive || parent.childExtendRecursive;
|
|
338
|
+
const ignoreChildExtendsRecursive = options.ignoreChildExtendsRecursive || props?.ignoreChildExtendsRecursive;
|
|
323
339
|
const isText = element.key === "__text";
|
|
324
340
|
if (childExtendsRecursive && !isText && !ignoreChildExtendsRecursive) {
|
|
325
341
|
addExtends(childExtendsRecursive, element);
|
|
@@ -329,7 +345,7 @@ const inheritRecursiveChildExtends = (element, parent, options = {}) => {
|
|
|
329
345
|
const createExtendsStack = (element, parent, options = {}) => {
|
|
330
346
|
const { props, __ref: ref } = element;
|
|
331
347
|
const context = element.context || parent.context;
|
|
332
|
-
const variant = element.variant ||
|
|
348
|
+
const variant = element.variant || props?.variant;
|
|
333
349
|
const __extends = (0, import_array.removeDuplicatesInArray)(
|
|
334
350
|
ref.__extends.map((val, i) => {
|
|
335
351
|
return mapStringsWithContextComponents(
|
package/dist/cjs/function.js
CHANGED
|
@@ -62,16 +62,16 @@ const memoize = (fn) => {
|
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
64
|
};
|
|
65
|
+
const RE_STRING_FUNCTION = /^((function\s*\([^)]*\)\s*\{[^}]*\})|(\([^)]*\)\s*=>))/;
|
|
65
66
|
const isStringFunction = (inputString) => {
|
|
66
|
-
|
|
67
|
-
return functionRegex.test(inputString);
|
|
67
|
+
return RE_STRING_FUNCTION.test(inputString);
|
|
68
68
|
};
|
|
69
69
|
function cloneFunction(fn, win = window) {
|
|
70
70
|
const temp = function() {
|
|
71
71
|
return fn.apply(win, arguments);
|
|
72
72
|
};
|
|
73
73
|
for (const key in fn) {
|
|
74
|
-
if (Object.hasOwnProperty.call(fn, key)) {
|
|
74
|
+
if (Object.prototype.hasOwnProperty.call(fn, key)) {
|
|
75
75
|
temp[key] = fn[key];
|
|
76
76
|
}
|
|
77
77
|
}
|
package/dist/cjs/index.js
CHANGED
|
@@ -38,3 +38,4 @@ __reExport(index_exports, require("./scope.js"), module.exports);
|
|
|
38
38
|
__reExport(index_exports, require("./methods.js"), module.exports);
|
|
39
39
|
__reExport(index_exports, require("./cache.js"), module.exports);
|
|
40
40
|
__reExport(index_exports, require("./update.js"), module.exports);
|
|
41
|
+
__reExport(index_exports, require("./triggerEvent.js"), module.exports);
|
package/dist/cjs/key.js
CHANGED
|
@@ -24,14 +24,14 @@ __export(key_exports, {
|
|
|
24
24
|
});
|
|
25
25
|
module.exports = __toCommonJS(key_exports);
|
|
26
26
|
var import_object = require("./object.js");
|
|
27
|
-
const generateKey = /* @__PURE__ */ function() {
|
|
27
|
+
const generateKey = /* @__PURE__ */ (function() {
|
|
28
28
|
let index = 0;
|
|
29
29
|
function newId() {
|
|
30
30
|
index++;
|
|
31
31
|
return index;
|
|
32
32
|
}
|
|
33
33
|
return newId;
|
|
34
|
-
}();
|
|
34
|
+
})();
|
|
35
35
|
const createSnapshotId = generateKey;
|
|
36
36
|
const createKey = (element, parent, key) => {
|
|
37
37
|
return ((0, import_object.exec)(key, element) || key || element.key || generateKey()).toString();
|
package/dist/cjs/keys.js
CHANGED
|
@@ -28,7 +28,7 @@ __export(keys_exports, {
|
|
|
28
28
|
STATE_PROPERTIES: () => STATE_PROPERTIES
|
|
29
29
|
});
|
|
30
30
|
module.exports = __toCommonJS(keys_exports);
|
|
31
|
-
const DOMQ_PROPERTIES = [
|
|
31
|
+
const DOMQ_PROPERTIES = /* @__PURE__ */ new Set([
|
|
32
32
|
"attr",
|
|
33
33
|
"style",
|
|
34
34
|
"text",
|
|
@@ -40,11 +40,14 @@ const DOMQ_PROPERTIES = [
|
|
|
40
40
|
"scope",
|
|
41
41
|
"root",
|
|
42
42
|
"deps",
|
|
43
|
+
"extend",
|
|
43
44
|
"extends",
|
|
44
45
|
"$router",
|
|
45
46
|
"routes",
|
|
46
47
|
"children",
|
|
48
|
+
"childExtend",
|
|
47
49
|
"childExtends",
|
|
50
|
+
"childExtendRecursive",
|
|
48
51
|
"childExtendsRecursive",
|
|
49
52
|
"props",
|
|
50
53
|
"if",
|
|
@@ -62,8 +65,8 @@ const DOMQ_PROPERTIES = [
|
|
|
62
65
|
"on",
|
|
63
66
|
"component",
|
|
64
67
|
"context"
|
|
65
|
-
];
|
|
66
|
-
const PARSED_DOMQ_PROPERTIES = [
|
|
68
|
+
]);
|
|
69
|
+
const PARSED_DOMQ_PROPERTIES = /* @__PURE__ */ new Set([
|
|
67
70
|
"attr",
|
|
68
71
|
"style",
|
|
69
72
|
"text",
|
|
@@ -79,8 +82,9 @@ const PARSED_DOMQ_PROPERTIES = [
|
|
|
79
82
|
"key",
|
|
80
83
|
"tag",
|
|
81
84
|
"query",
|
|
82
|
-
"on"
|
|
83
|
-
|
|
85
|
+
"on",
|
|
86
|
+
"context"
|
|
87
|
+
]);
|
|
84
88
|
const STATE_PROPERTIES = [
|
|
85
89
|
"ref",
|
|
86
90
|
"parent",
|
|
@@ -90,7 +94,7 @@ const STATE_PROPERTIES = [
|
|
|
90
94
|
"__children",
|
|
91
95
|
"root"
|
|
92
96
|
];
|
|
93
|
-
const STATE_METHODS = [
|
|
97
|
+
const STATE_METHODS = /* @__PURE__ */ new Set([
|
|
94
98
|
"update",
|
|
95
99
|
"parse",
|
|
96
100
|
"clean",
|
|
@@ -123,9 +127,9 @@ const STATE_METHODS = [
|
|
|
123
127
|
"removeByPath",
|
|
124
128
|
"removePathCollection",
|
|
125
129
|
"getByPath"
|
|
126
|
-
];
|
|
127
|
-
const PROPS_METHODS = ["update", "__element"];
|
|
128
|
-
const METHODS = [
|
|
130
|
+
]);
|
|
131
|
+
const PROPS_METHODS = /* @__PURE__ */ new Set(["update", "__element"]);
|
|
132
|
+
const METHODS = /* @__PURE__ */ new Set([
|
|
129
133
|
"set",
|
|
130
134
|
"reset",
|
|
131
135
|
"update",
|
|
@@ -151,15 +155,25 @@ const METHODS = [
|
|
|
151
155
|
"error",
|
|
152
156
|
"call",
|
|
153
157
|
"nextElement",
|
|
154
|
-
"previousElement"
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
+
"previousElement",
|
|
159
|
+
"getRootState",
|
|
160
|
+
"getRoot",
|
|
161
|
+
"getRootData",
|
|
162
|
+
"getRootContext",
|
|
163
|
+
"getContext",
|
|
164
|
+
"getChildren"
|
|
165
|
+
]);
|
|
166
|
+
const METHODS_EXL = /* @__PURE__ */ new Set([
|
|
167
|
+
"node",
|
|
168
|
+
"context",
|
|
169
|
+
"extends",
|
|
170
|
+
"__element",
|
|
171
|
+
"__ref",
|
|
158
172
|
...METHODS,
|
|
159
173
|
...STATE_METHODS,
|
|
160
174
|
...PROPS_METHODS
|
|
161
|
-
];
|
|
162
|
-
const DOMQL_EVENTS = [
|
|
175
|
+
]);
|
|
176
|
+
const DOMQL_EVENTS = /* @__PURE__ */ new Set([
|
|
163
177
|
"init",
|
|
164
178
|
"beforeClassAssign",
|
|
165
179
|
"render",
|
|
@@ -175,4 +189,4 @@ const DOMQL_EVENTS = [
|
|
|
175
189
|
"complete",
|
|
176
190
|
"frame",
|
|
177
191
|
"update"
|
|
178
|
-
];
|
|
192
|
+
]);
|