@domql/utils 2.28.58 → 2.28.60
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/component.js +12 -12
- package/dist/cjs/component.js +12 -12
- package/dist/esm/component.js +12 -12
- package/package.json +2 -2
package/component.js
CHANGED
|
@@ -196,28 +196,28 @@ export const hasVariantProp = element => {
|
|
|
196
196
|
if (isObject(props) && isString(props.variant)) return true
|
|
197
197
|
}
|
|
198
198
|
|
|
199
|
-
export
|
|
200
|
-
if (key ===
|
|
201
|
-
return
|
|
199
|
+
export function getChildrenComponentsByKey (key) {
|
|
200
|
+
if (key === thiskey || this.__ref.__componentKey === key) {
|
|
201
|
+
return this
|
|
202
202
|
}
|
|
203
203
|
|
|
204
204
|
// Check if the prop is "extend" and it's either a string or an array
|
|
205
|
-
if (
|
|
205
|
+
if (this.extend) {
|
|
206
206
|
// Add the value of the extend key to the result array
|
|
207
|
-
const foundString = isString(
|
|
207
|
+
const foundString = isString(this.extend) && this.extend === key
|
|
208
208
|
const foundInArray =
|
|
209
|
-
isArray(
|
|
210
|
-
if (foundString || foundInArray) return
|
|
209
|
+
isArray(this.extend) && this.extend.filter(v => v === key).length
|
|
210
|
+
if (foundString || foundInArray) return this
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
-
if (
|
|
213
|
+
if (this.parent && this.parent.childExtend) {
|
|
214
214
|
// Add the value of the extend key to the result array
|
|
215
215
|
const foundString =
|
|
216
|
-
isString(
|
|
216
|
+
isString(this.parent.childExtend) && this.parent.childExtend === key
|
|
217
217
|
const foundInArray =
|
|
218
|
-
isArray(
|
|
219
|
-
|
|
220
|
-
if (foundString || foundInArray) return
|
|
218
|
+
isArray(this.parent.childExtend) &&
|
|
219
|
+
this.parent.childExtend.filter(v => v === key).length
|
|
220
|
+
if (foundString || foundInArray) return this
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
|
package/dist/cjs/component.js
CHANGED
|
@@ -194,21 +194,21 @@ const hasVariantProp = (element) => {
|
|
|
194
194
|
const { props } = element;
|
|
195
195
|
if ((0, import_types.isObject)(props) && (0, import_types.isString)(props.variant)) return true;
|
|
196
196
|
};
|
|
197
|
-
|
|
198
|
-
if (key ===
|
|
199
|
-
return
|
|
197
|
+
function getChildrenComponentsByKey(key) {
|
|
198
|
+
if (key === thiskey || this.__ref.__componentKey === key) {
|
|
199
|
+
return this;
|
|
200
200
|
}
|
|
201
|
-
if (
|
|
202
|
-
const foundString = (0, import_types.isString)(
|
|
203
|
-
const foundInArray = (0, import_types.isArray)(
|
|
204
|
-
if (foundString || foundInArray) return
|
|
201
|
+
if (this.extend) {
|
|
202
|
+
const foundString = (0, import_types.isString)(this.extend) && this.extend === key;
|
|
203
|
+
const foundInArray = (0, import_types.isArray)(this.extend) && this.extend.filter((v) => v === key).length;
|
|
204
|
+
if (foundString || foundInArray) return this;
|
|
205
205
|
}
|
|
206
|
-
if (
|
|
207
|
-
const foundString = (0, import_types.isString)(
|
|
208
|
-
const foundInArray = (0, import_types.isArray)(
|
|
209
|
-
if (foundString || foundInArray) return
|
|
206
|
+
if (this.parent && this.parent.childExtend) {
|
|
207
|
+
const foundString = (0, import_types.isString)(this.parent.childExtend) && this.parent.childExtend === key;
|
|
208
|
+
const foundInArray = (0, import_types.isArray)(this.parent.childExtend) && this.parent.childExtend.filter((v) => v === key).length;
|
|
209
|
+
if (foundString || foundInArray) return this;
|
|
210
210
|
}
|
|
211
|
-
}
|
|
211
|
+
}
|
|
212
212
|
const getExtendsInElement = (obj) => {
|
|
213
213
|
let result = [];
|
|
214
214
|
function traverse(o) {
|
package/dist/esm/component.js
CHANGED
|
@@ -175,21 +175,21 @@ const hasVariantProp = (element) => {
|
|
|
175
175
|
const { props } = element;
|
|
176
176
|
if (isObject(props) && isString(props.variant)) return true;
|
|
177
177
|
};
|
|
178
|
-
|
|
179
|
-
if (key ===
|
|
180
|
-
return
|
|
178
|
+
function getChildrenComponentsByKey(key) {
|
|
179
|
+
if (key === thiskey || this.__ref.__componentKey === key) {
|
|
180
|
+
return this;
|
|
181
181
|
}
|
|
182
|
-
if (
|
|
183
|
-
const foundString = isString(
|
|
184
|
-
const foundInArray = isArray(
|
|
185
|
-
if (foundString || foundInArray) return
|
|
182
|
+
if (this.extend) {
|
|
183
|
+
const foundString = isString(this.extend) && this.extend === key;
|
|
184
|
+
const foundInArray = isArray(this.extend) && this.extend.filter((v) => v === key).length;
|
|
185
|
+
if (foundString || foundInArray) return this;
|
|
186
186
|
}
|
|
187
|
-
if (
|
|
188
|
-
const foundString = isString(
|
|
189
|
-
const foundInArray = isArray(
|
|
190
|
-
if (foundString || foundInArray) return
|
|
187
|
+
if (this.parent && this.parent.childExtend) {
|
|
188
|
+
const foundString = isString(this.parent.childExtend) && this.parent.childExtend === key;
|
|
189
|
+
const foundInArray = isArray(this.parent.childExtend) && this.parent.childExtend.filter((v) => v === key).length;
|
|
190
|
+
if (foundString || foundInArray) return this;
|
|
191
191
|
}
|
|
192
|
-
}
|
|
192
|
+
}
|
|
193
193
|
const getExtendsInElement = (obj) => {
|
|
194
194
|
let result = [];
|
|
195
195
|
function traverse(o) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/utils",
|
|
3
|
-
"version": "2.28.
|
|
3
|
+
"version": "2.28.60",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "index.js",
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"build": "npx rimraf -I dist; npm run build:cjs; npm run build:esm",
|
|
25
25
|
"prepublish": "npm run build; npm run copy:package:cjs"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "0ec4d7cf10409440f682ecd5cf2cbf47573a14eb",
|
|
28
28
|
"devDependencies": {
|
|
29
29
|
"@babel/core": "^7.27.1"
|
|
30
30
|
}
|