@domql/element
Advanced tools
Comparing version 2.5.161 to 2.5.162
@@ -256,3 +256,3 @@ "use strict"; | ||
if ((_b = params[params.length - 1]) == null ? void 0 : _b.verbose) | ||
this.verbose(); | ||
verbose.call(this); | ||
} | ||
@@ -259,0 +259,0 @@ } |
@@ -28,10 +28,10 @@ "use strict"; | ||
var import_utils2 = require("../utils"); | ||
const attr = (params, element, node) => { | ||
const { __ref } = element; | ||
const { __attr } = __ref; | ||
function attr(params, element, node) { | ||
const { __ref: ref, props } = element; | ||
const { __attr } = ref; | ||
if ((0, import_utils.isNot)("object")) | ||
(0, import_report.report)("HTMLInvalidAttr", params); | ||
if (params) { | ||
if (element.props.attr) | ||
(0, import_utils2.deepMerge)(params, element.props.attr); | ||
if (props.attr) | ||
(0, import_utils2.deepMerge)(params, props.attr); | ||
for (const attr2 in params) { | ||
@@ -46,3 +46,3 @@ const val = (0, import_utils.exec)(params[attr2], element); | ||
} | ||
}; | ||
} | ||
var attr_default = attr; |
@@ -72,5 +72,5 @@ "use strict"; | ||
}; | ||
const applyClasslist = (params, element, node) => { | ||
function applyClasslist(params, element, node) { | ||
applyClassListOnNode(params, element, node); | ||
}; | ||
} | ||
var classList_default = applyClasslist; |
@@ -64,3 +64,3 @@ "use strict"; | ||
}; | ||
const setContent = (param, element, node, opts) => { | ||
function setContent(param, element, node, opts) { | ||
const contentElementKey = (0, import_utils.setContentKey)(element, opts); | ||
@@ -74,3 +74,3 @@ if (param && element) { | ||
} | ||
}; | ||
} | ||
var content_default = setContent; |
@@ -27,3 +27,3 @@ "use strict"; | ||
var import_report = require("@domql/report"); | ||
const data = (params, element, node) => { | ||
function data(params, element, node) { | ||
if (params) { | ||
@@ -42,3 +42,3 @@ if (element.props.data) | ||
} | ||
}; | ||
} | ||
var data_default = data; |
@@ -26,3 +26,3 @@ "use strict"; | ||
var import_utils = require("@domql/utils"); | ||
const html = (param, element, node) => { | ||
function html(param, element, node) { | ||
var _a; | ||
@@ -38,3 +38,3 @@ const prop = (0, import_utils.exec)(param, element) || (0, import_utils.exec)((_a = element == null ? void 0 : element.props) == null ? void 0 : _a.html, element); | ||
} | ||
}; | ||
} | ||
var html_default = html; |
@@ -26,3 +26,3 @@ "use strict"; | ||
var import_utils = require("@domql/utils"); | ||
const scope = (params, element, node) => { | ||
function scope(params, element, node) { | ||
if (!(0, import_utils.isObject)(params)) | ||
@@ -38,3 +38,3 @@ return; | ||
} | ||
}; | ||
} | ||
var scope_default = scope; |
@@ -27,3 +27,3 @@ "use strict"; | ||
var import_utils = require("@domql/utils"); | ||
const state = (params, element, node) => { | ||
function state(params, element, node) { | ||
const state2 = (0, import_utils.exec)(params, element); | ||
@@ -39,3 +39,3 @@ if ((0, import_utils.isObject)(state2)) { | ||
return element; | ||
}; | ||
} | ||
var state_default = state; |
@@ -27,3 +27,3 @@ "use strict"; | ||
var import_report = require("@domql/report"); | ||
const style = (params, element, node) => { | ||
function style(params, element, node) { | ||
if (params) { | ||
@@ -35,3 +35,3 @@ if ((0, import_utils.isObject)(params)) | ||
} | ||
}; | ||
} | ||
var style_default = style; |
@@ -27,3 +27,3 @@ "use strict"; | ||
var import_utils = require("@domql/utils"); | ||
const text = (param, element, node) => { | ||
function text(param, element, node) { | ||
let prop = (0, import_utils.exec)(param, element); | ||
@@ -45,3 +45,3 @@ if ((0, import_utils.isString)(prop) && prop.includes("{{")) { | ||
} | ||
}; | ||
} | ||
var text_default = text; |
@@ -219,3 +219,3 @@ 'use strict' | ||
console.error(...params) | ||
if (params[params.length - 1]?.verbose) this.verbose() | ||
if (params[params.length - 1]?.verbose) verbose.call(this) | ||
} | ||
@@ -222,0 +222,0 @@ } |
@@ -10,8 +10,8 @@ 'use strict' | ||
*/ | ||
export const attr = (params, element, node) => { | ||
const { __ref } = element | ||
const { __attr } = __ref | ||
export function attr (params, element, node) { | ||
const { __ref: ref, props } = element | ||
const { __attr } = ref | ||
if (isNot('object')) report('HTMLInvalidAttr', params) | ||
if (params) { | ||
if (element.props.attr) deepMerge(params, element.props.attr) | ||
if (props.attr) deepMerge(params, props.attr) | ||
for (const attr in params) { | ||
@@ -18,0 +18,0 @@ const val = exec(params[attr], element) |
@@ -46,3 +46,3 @@ 'use strict' | ||
export const applyClasslist = (params, element, node) => { | ||
export function applyClasslist (params, element, node) { | ||
applyClassListOnNode(params, element, node) | ||
@@ -49,0 +49,0 @@ } |
@@ -44,3 +44,3 @@ 'use strict' | ||
*/ | ||
export const setContent = (param, element, node, opts) => { | ||
export function setContent (param, element, node, opts) { | ||
const contentElementKey = setContentKey(element, opts) | ||
@@ -47,0 +47,0 @@ if (param && element) { |
@@ -10,3 +10,3 @@ 'use strict' | ||
*/ | ||
export const data = (params, element, node) => { | ||
export function data (params, element, node) { | ||
if (params) { | ||
@@ -13,0 +13,0 @@ if (element.props.data) deepMerge(params, element.props.data) |
@@ -9,3 +9,3 @@ 'use strict' | ||
*/ | ||
export const html = (param, element, node) => { | ||
export function html (param, element, node) { | ||
const prop = exec(param, element) || exec(element?.props?.html, element) | ||
@@ -12,0 +12,0 @@ const { __ref } = element |
@@ -9,3 +9,3 @@ 'use strict' | ||
*/ | ||
export const scope = (params, element, node) => { | ||
export function scope (params, element, node) { | ||
if (!isObject(params)) return | ||
@@ -12,0 +12,0 @@ |
@@ -6,3 +6,3 @@ 'use strict' | ||
export const state = (params, element, node) => { | ||
export function state (params, element, node) { | ||
const state = exec(params, element) | ||
@@ -9,0 +9,0 @@ |
@@ -9,3 +9,3 @@ 'use strict' | ||
*/ | ||
export const style = (params, element, node) => { | ||
export function style (params, element, node) { | ||
if (params) { | ||
@@ -12,0 +12,0 @@ if (isObject(params)) map(node.style, params, element) |
@@ -14,3 +14,3 @@ 'use strict' | ||
*/ | ||
export const text = (param, element, node) => { | ||
export function text (param, element, node) { | ||
let prop = exec(param, element) | ||
@@ -17,0 +17,0 @@ if (isString(prop) && prop.includes('{{')) { |
{ | ||
"name": "@domql/element", | ||
"version": "2.5.161", | ||
"version": "2.5.162", | ||
"license": "MIT", | ||
@@ -25,12 +25,12 @@ "type": "module", | ||
"build:cjs": "npx esbuild *.js **/*.js --target=node16 --format=cjs --outdir=dist/cjs", | ||
"build": "yarn build:cjs", | ||
"prepublish": "rimraf -I dist && yarn build && yarn copy:package:cjs" | ||
"build": "npm run build:cjs", | ||
"prepublish": "rimraf -I dist && npm run build && npm run copy:package:cjs" | ||
}, | ||
"dependencies": { | ||
"@domql/event": "^2.5.161", | ||
"@domql/render": "^2.5.161", | ||
"@domql/state": "^2.5.161", | ||
"@domql/utils": "^2.5.161" | ||
"@domql/event": "^2.5.162", | ||
"@domql/render": "^2.5.162", | ||
"@domql/state": "^2.5.162", | ||
"@domql/utils": "^2.5.162" | ||
}, | ||
"gitHead": "39a7af3d77c6b0257d5e1a0d6110850926d83c19", | ||
"gitHead": "0aeb25f284d863a57821a0a74937c2b9babb7969", | ||
"devDependencies": { | ||
@@ -37,0 +37,0 @@ "@babel/core": "^7.12.0" |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
194466
Updated@domql/event@^2.5.162
Updated@domql/render@^2.5.162
Updated@domql/state@^2.5.162
Updated@domql/utils@^2.5.162