@movable/studio-framework 2.38.1-custom-prop-context-bugfix → 2.39.0-test-rollup-bug

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
@@ -7352,17 +7352,25 @@ function makeCustomTool(toolData) {
7352
7352
  tag = _this$props.tag;
7353
7353
  var code = toolData.code,
7354
7354
  _toolData$propertyInp = toolData.propertyInputs,
7355
- propertyInputs = _toolData$propertyInp === void 0 ? [] : _toolData$propertyInp;
7355
+ propertyInputs = _toolData$propertyInp === void 0 ? [] : _toolData$propertyInp,
7356
+ _toolData$context_opt = toolData.context_options,
7357
+ contextOptionsInputs = _toolData$context_opt === void 0 ? [] : _toolData$context_opt;
7356
7358
  var propertyNames = propertyInputs.map(function (input) {
7357
7359
  return input.variableName;
7358
7360
  });
7361
+ var contextOptionsNames = contextOptionsInputs.map(function (input) {
7362
+ return input.name;
7363
+ });
7359
7364
 
7360
- var Tool = _construct(Function, _toConsumableArray(propertyNames).concat(['html', 'CD', 'tag', code]));
7365
+ var Tool = _construct(Function, _toConsumableArray(propertyNames).concat(_toConsumableArray(contextOptionsNames), ['html', 'CD', 'tag', code]));
7361
7366
 
7362
- var values = propertyInputs.map(function (prop) {
7367
+ var propertyValues = propertyInputs.map(function (prop) {
7363
7368
  return getPropertyWithFallback(prop);
7364
7369
  });
7365
- return Tool.apply(void 0, _toConsumableArray(values).concat([html, CD, tag]));
7370
+ var contextValues = contextOptionsInputs.map(function (input) {
7371
+ return tag.toolProperties[input.name];
7372
+ });
7373
+ return Tool.apply(void 0, _toConsumableArray(propertyValues).concat(_toConsumableArray(contextValues), [html, CD, tag]));
7366
7374
  }
7367
7375
  }], [{
7368
7376
  key: "dynamicProperties",
@@ -7403,9 +7411,9 @@ function cleanHTML(element) {
7403
7411
  newBody.style.cssText = BASE_STYLE;
7404
7412
  newBody.appendChild(element);
7405
7413
 
7406
- if (analyticsLength > 250) {
7414
+ if (analyticsLength > 500) {
7407
7415
  analytics.setAttribute('data-mi-data', '{}');
7408
- console.log('extraData trying to be set exceeds 250 characters, setting extraData to be empty to avoid breaking crops');
7416
+ console.log('extraData trying to be set exceeds 500 characters, setting extraData to be empty to avoid breaking crops');
7409
7417
  }
7410
7418
 
7411
7419
  if (analytics) {
@@ -8239,9 +8247,9 @@ var StudioFramework = /*#__PURE__*/function () {
8239
8247
  if (format === 'html') {
8240
8248
  var analyticsLength = analytics ? (analytics.getAttribute('data-mi-data') || '').length : 0;
8241
8249
 
8242
- if (analyticsLength > 250) {
8250
+ if (analyticsLength > 500) {
8243
8251
  analytics.setAttribute('data-mi-data', '{}');
8244
- console.log('extraData trying to be set exceeds 250 characters, setting extraData to be empty to avoid breaking crops');
8252
+ console.log('extraData trying to be set exceeds 500 characters, setting extraData to be empty to avoid breaking crops');
8245
8253
  }
8246
8254
  } // Force a full overwrite
8247
8255
 
package/dist/index.js CHANGED
@@ -7362,17 +7362,25 @@ function makeCustomTool(toolData) {
7362
7362
  tag = _this$props.tag;
7363
7363
  var code = toolData.code,
7364
7364
  _toolData$propertyInp = toolData.propertyInputs,
7365
- propertyInputs = _toolData$propertyInp === void 0 ? [] : _toolData$propertyInp;
7365
+ propertyInputs = _toolData$propertyInp === void 0 ? [] : _toolData$propertyInp,
7366
+ _toolData$context_opt = toolData.context_options,
7367
+ contextOptionsInputs = _toolData$context_opt === void 0 ? [] : _toolData$context_opt;
7366
7368
  var propertyNames = propertyInputs.map(function (input) {
7367
7369
  return input.variableName;
7368
7370
  });
7371
+ var contextOptionsNames = contextOptionsInputs.map(function (input) {
7372
+ return input.name;
7373
+ });
7369
7374
 
7370
- var Tool = _construct(Function, _toConsumableArray(propertyNames).concat(['html', 'CD', 'tag', code]));
7375
+ var Tool = _construct(Function, _toConsumableArray(propertyNames).concat(_toConsumableArray(contextOptionsNames), ['html', 'CD', 'tag', code]));
7371
7376
 
7372
- var values = propertyInputs.map(function (prop) {
7377
+ var propertyValues = propertyInputs.map(function (prop) {
7373
7378
  return getPropertyWithFallback(prop);
7374
7379
  });
7375
- return Tool.apply(void 0, _toConsumableArray(values).concat([html, CD__default['default'], tag]));
7380
+ var contextValues = contextOptionsInputs.map(function (input) {
7381
+ return tag.toolProperties[input.name];
7382
+ });
7383
+ return Tool.apply(void 0, _toConsumableArray(propertyValues).concat(_toConsumableArray(contextValues), [html, CD__default['default'], tag]));
7376
7384
  }
7377
7385
  }], [{
7378
7386
  key: "dynamicProperties",
@@ -7413,9 +7421,9 @@ function cleanHTML(element) {
7413
7421
  newBody.style.cssText = BASE_STYLE;
7414
7422
  newBody.appendChild(element);
7415
7423
 
7416
- if (analyticsLength > 250) {
7424
+ if (analyticsLength > 500) {
7417
7425
  analytics.setAttribute('data-mi-data', '{}');
7418
- console.log('extraData trying to be set exceeds 250 characters, setting extraData to be empty to avoid breaking crops');
7426
+ console.log('extraData trying to be set exceeds 500 characters, setting extraData to be empty to avoid breaking crops');
7419
7427
  }
7420
7428
 
7421
7429
  if (analytics) {
@@ -8249,9 +8257,9 @@ var StudioFramework = /*#__PURE__*/function () {
8249
8257
  if (format === 'html') {
8250
8258
  var analyticsLength = analytics ? (analytics.getAttribute('data-mi-data') || '').length : 0;
8251
8259
 
8252
- if (analyticsLength > 250) {
8260
+ if (analyticsLength > 500) {
8253
8261
  analytics.setAttribute('data-mi-data', '{}');
8254
- console.log('extraData trying to be set exceeds 250 characters, setting extraData to be empty to avoid breaking crops');
8262
+ console.log('extraData trying to be set exceeds 500 characters, setting extraData to be empty to avoid breaking crops');
8255
8263
  }
8256
8264
  } // Force a full overwrite
8257
8265
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@movable/studio-framework",
3
- "version": "2.38.1-custom-prop-context-bugfix",
3
+ "version": "2.39.0-test-rollup-bug",
4
4
  "description": "A Component library for reactive Studio apps.",
5
5
  "author": "Movable Ink",
6
6
  "repository": "movableink/studio-framework",
@@ -35,8 +35,8 @@
35
35
  "@babel/preset-react": "^7.14.5",
36
36
  "@babel/preset-typescript": "^7.13.0",
37
37
  "@movable/eslint-config-react": "^1.0.1",
38
- "@movable/framework-types": "^2.38.1-custom-prop-context-bugfix",
39
- "@movable/studio-framework-test-helpers": "^2.38.1-custom-prop-context-bugfix",
38
+ "@movable/framework-types": "^2.39.0-test-rollup-bug",
39
+ "@movable/studio-framework-test-helpers": "^2.39.0-test-rollup-bug",
40
40
  "@types/qunit": "^2.11.1",
41
41
  "@types/qunit-dom": "^0.7.0",
42
42
  "@types/react": "^17.0.6",
@@ -68,5 +68,5 @@
68
68
  "volta": {
69
69
  "extends": "../../package.json"
70
70
  },
71
- "gitHead": "ab5d61d16511ebca5a95466d206a96ab421ac6ba"
71
+ "gitHead": "cbcc8829966e83abbb0314479fb31ca0727a3e26"
72
72
  }