@symbo.ls/link 2.11.480 → 2.11.495

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 +8 -9
  2. package/package.json +3 -3
package/index.js CHANGED
@@ -14,10 +14,10 @@ export const Link = {
14
14
  },
15
15
  attr: {
16
16
  href: (el, s, ctx) => {
17
- const { isString, exec, replaceLiteralsWithObjectFields } = ctx.utils
18
- const href = exec(el.props.href, el) || exec(exec(el.props, el).href, el)
19
- if (isString(href) && href.includes('{{')) {
20
- return replaceLiteralsWithObjectFields(href, s)
17
+ const props = el.props
18
+ const href = el.call('exec', props.href, el) || el.call('exec', el.call('exec', props, el).href, el)
19
+ if (el.call('isString', href) && href.includes('{{')) {
20
+ return el.call('replaceLiteralsWithObjectFields', href)
21
21
  }
22
22
  return href
23
23
  },
@@ -32,11 +32,10 @@ export const RouterLink = {
32
32
  click: (event, el, s) => {
33
33
  const { props, context: ctx } = el
34
34
  const { href: h, scrollToTop, stopPropagation } = props
35
- const { exec, isString, replaceLiteralsWithObjectFields, isDefined } = ctx.utils
36
- let href = exec(h, el, s)
35
+ let href = el.call('exec', h, el)
37
36
 
38
- if (isString(href) && href.includes('{{')) {
39
- href = replaceLiteralsWithObjectFields(href, s)
37
+ if (el.call('isString', href) && href.includes('{{')) {
38
+ href = el.call('replaceLiteralsWithObjectFields', href)
40
39
  }
41
40
 
42
41
  if (stopPropagation) event.stopPropagation()
@@ -51,7 +50,7 @@ export const RouterLink = {
51
50
  try {
52
51
  (functions.router || snippets.router || utils.router || defaultRouter)(href, root, {}, {
53
52
  scrollToOptions: { behaviour: 'instant' },
54
- scrollToTop: isDefined(scrollToTop) ? scrollToTop : true,
53
+ scrollToTop: el.call('isDefined', scrollToTop) ? scrollToTop : true,
55
54
  ...routerOptions,
56
55
  ...props.routerOptions
57
56
  })
package/package.json CHANGED
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@symbo.ls/link",
3
- "version": "2.11.480",
3
+ "version": "2.11.495",
4
4
  "main": "index.js",
5
5
  "license": "MIT",
6
- "gitHead": "14db2b8d241d45fa80f588a2e0a6c50f5dbd8bee",
6
+ "gitHead": "9147c1769d75544e2927237b4c34376fe18bcdfc",
7
7
  "dependencies": {
8
8
  "@domql/router": "^2.5.0",
9
- "@symbo.ls/atoms": "^2.11.480"
9
+ "@symbo.ls/atoms": "^2.11.495"
10
10
  },
11
11
  "source": "src/index.js"
12
12
  }