@symbo.ls/link 2.11.360 → 2.11.373

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.
Files changed (2) hide show
  1. package/index.js +7 -3
  2. package/package.json +2 -2
package/index.js CHANGED
@@ -13,10 +13,14 @@ export const Link = {
13
13
  draggable: false
14
14
  },
15
15
  attr: {
16
- href: (el) => {
16
+ href: (el, s) => {
17
17
  const { context: ctx } = el
18
- const { exec } = ctx.utils
19
- return exec(el.props.href, el) || exec(el.props, el).href
18
+ const { isString, exec, replaceLiteralsWithObjectFields } = ctx.utils
19
+ const href = exec(el.props.href, el) || exec(el.props, el).href
20
+ if (isString(href) && href.includes('{{')) {
21
+ return replaceLiteralsWithObjectFields(href, s)
22
+ }
23
+ return href
20
24
  },
21
25
  target: ({ props }) => props.target,
22
26
  'aria-label': ({ props }) => props.aria ? props.aria.label : props.text,
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@symbo.ls/link",
3
- "version": "2.11.360",
3
+ "version": "2.11.373",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "87c62e587157ba9c3ef135e31dbc79f165cdaa38",
6
+ "gitHead": "71ddf72da03fdac28f9d1fe2c9e163b5b6ba9f09",
7
7
  "dependencies": {
8
8
  "@domql/router": "latest",
9
9
  "@symbo.ls/atoms": "latest"