@movable/studio-framework 3.16.1-canary.18 → 3.17.0

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/dist/index.es.js CHANGED
@@ -540,6 +540,11 @@ class Tags extends React.Component {
540
540
  const {
541
541
  subtags
542
542
  } = tag;
543
+
544
+ if (tag.dynamicHref) {
545
+ onPendingPromise(getUnresolvedPropsCatch(propertyResolver, [tag.dynamicHref]));
546
+ }
547
+
543
548
  return /*#__PURE__*/React.createElement(StyledElement, {
544
549
  key: index,
545
550
  tag: tag,
@@ -1956,15 +1961,7 @@ const RichTextSpan = ({
1956
1961
  if (attributes && attributes.dynamicLink) {
1957
1962
  try {
1958
1963
  const dynamicLinkData = typeof attributes.dynamicLink === 'string' ? JSON.parse(attributes.dynamicLink) : attributes.dynamicLink;
1959
- let href = null;
1960
-
1961
- if (dynamicLinkData.propertyValue) {
1962
- href = dynamicLinkData.propertyValue;
1963
- } else if (getPropertyWithFallback) {
1964
- href = getPropertyWithFallback(dynamicLinkData);
1965
- } else if (dynamicLinkData.propertyFallback) {
1966
- href = dynamicLinkData.propertyFallback;
1967
- }
1964
+ const href = getPropertyWithFallback?.(dynamicLinkData) || dynamicLinkData.propertyValue || dynamicLinkData.propertyFallback || null;
1968
1965
 
1969
1966
  if (href) {
1970
1967
  const {
package/dist/index.js CHANGED
@@ -550,6 +550,11 @@ class Tags extends React__default['default'].Component {
550
550
  const {
551
551
  subtags
552
552
  } = tag;
553
+
554
+ if (tag.dynamicHref) {
555
+ onPendingPromise(getUnresolvedPropsCatch(propertyResolver, [tag.dynamicHref]));
556
+ }
557
+
553
558
  return /*#__PURE__*/React__default['default'].createElement(StyledElement, {
554
559
  key: index,
555
560
  tag: tag,
@@ -1966,15 +1971,7 @@ const RichTextSpan = ({
1966
1971
  if (attributes && attributes.dynamicLink) {
1967
1972
  try {
1968
1973
  const dynamicLinkData = typeof attributes.dynamicLink === 'string' ? JSON.parse(attributes.dynamicLink) : attributes.dynamicLink;
1969
- let href = null;
1970
-
1971
- if (dynamicLinkData.propertyValue) {
1972
- href = dynamicLinkData.propertyValue;
1973
- } else if (getPropertyWithFallback) {
1974
- href = getPropertyWithFallback(dynamicLinkData);
1975
- } else if (dynamicLinkData.propertyFallback) {
1976
- href = dynamicLinkData.propertyFallback;
1977
- }
1974
+ const href = getPropertyWithFallback?.(dynamicLinkData) || dynamicLinkData.propertyValue || dynamicLinkData.propertyFallback || null;
1978
1975
 
1979
1976
  if (href) {
1980
1977
  const {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movable/studio-framework",
3
- "version": "3.16.1-canary.18+0e7ee126",
3
+ "version": "3.17.0",
4
4
  "description": "A Component library for reactive Studio apps.",
5
5
  "author": "Movable Ink",
6
6
  "repository": "movableink/studio-framework",
@@ -31,8 +31,8 @@
31
31
  "@babel/preset-react": "^7.14.5",
32
32
  "@babel/preset-typescript": "^7.13.0",
33
33
  "@movable/eslint-config-react": "^1.0.1",
34
- "@movable/framework-types": "^3.16.1-canary.18+0e7ee126",
35
- "@movable/studio-framework-test-helpers": "^3.16.1-canary.18+0e7ee126",
34
+ "@movable/framework-types": "^3.17.0",
35
+ "@movable/studio-framework-test-helpers": "^3.17.0",
36
36
  "@types/qunit": "^2.11.1",
37
37
  "@types/qunit-dom": "^0.7.0",
38
38
  "@types/react": "^17.0.6",
@@ -66,5 +66,5 @@
66
66
  "volta": {
67
67
  "extends": "../../package.json"
68
68
  },
69
- "gitHead": "0e7ee12614124ce01498aa9dafb8cb2b240b719b"
69
+ "gitHead": "da179f4d7c862ed7d49d0515f7d6a6116eb6e6ae"
70
70
  }