@movable/studio-framework 2.37.0-studio-framework-types-1 → 2.38.1-custom-tool-context-options
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 +12 -4
- package/dist/index.js +12 -4
- package/package.json +4 -3
package/dist/index.es.js
CHANGED
|
@@ -7349,17 +7349,25 @@ function makeCustomTool(toolData) {
|
|
|
7349
7349
|
tag = _this$props.tag;
|
|
7350
7350
|
var code = toolData.code,
|
|
7351
7351
|
_toolData$propertyInp = toolData.propertyInputs,
|
|
7352
|
-
propertyInputs = _toolData$propertyInp === void 0 ? [] : _toolData$propertyInp
|
|
7352
|
+
propertyInputs = _toolData$propertyInp === void 0 ? [] : _toolData$propertyInp,
|
|
7353
|
+
_toolData$context_opt = toolData.context_options,
|
|
7354
|
+
contextOptionsInputs = _toolData$context_opt === void 0 ? [] : _toolData$context_opt;
|
|
7353
7355
|
var propertyNames = propertyInputs.map(function (input) {
|
|
7354
7356
|
return input.variableName;
|
|
7355
7357
|
});
|
|
7358
|
+
var contextOptionsNames = contextOptionsInputs.map(function (input) {
|
|
7359
|
+
return input.name;
|
|
7360
|
+
});
|
|
7356
7361
|
|
|
7357
|
-
var Tool = _construct(Function, _toConsumableArray(propertyNames).concat(['html', 'CD', 'tag', code]));
|
|
7362
|
+
var Tool = _construct(Function, _toConsumableArray(propertyNames).concat(_toConsumableArray(contextOptionsNames), ['html', 'CD', 'tag', code]));
|
|
7358
7363
|
|
|
7359
|
-
var
|
|
7364
|
+
var propertyValues = propertyInputs.map(function (prop) {
|
|
7360
7365
|
return getPropertyWithFallback(prop);
|
|
7361
7366
|
});
|
|
7362
|
-
|
|
7367
|
+
var contextValues = contextOptionsInputs.map(function (input) {
|
|
7368
|
+
return tag.toolProperties[input.name];
|
|
7369
|
+
});
|
|
7370
|
+
return Tool.apply(void 0, _toConsumableArray(propertyValues).concat(_toConsumableArray(contextValues), [html, CD, tag]));
|
|
7363
7371
|
}
|
|
7364
7372
|
}], [{
|
|
7365
7373
|
key: "dynamicProperties",
|
package/dist/index.js
CHANGED
|
@@ -7359,17 +7359,25 @@ function makeCustomTool(toolData) {
|
|
|
7359
7359
|
tag = _this$props.tag;
|
|
7360
7360
|
var code = toolData.code,
|
|
7361
7361
|
_toolData$propertyInp = toolData.propertyInputs,
|
|
7362
|
-
propertyInputs = _toolData$propertyInp === void 0 ? [] : _toolData$propertyInp
|
|
7362
|
+
propertyInputs = _toolData$propertyInp === void 0 ? [] : _toolData$propertyInp,
|
|
7363
|
+
_toolData$context_opt = toolData.context_options,
|
|
7364
|
+
contextOptionsInputs = _toolData$context_opt === void 0 ? [] : _toolData$context_opt;
|
|
7363
7365
|
var propertyNames = propertyInputs.map(function (input) {
|
|
7364
7366
|
return input.variableName;
|
|
7365
7367
|
});
|
|
7368
|
+
var contextOptionsNames = contextOptionsInputs.map(function (input) {
|
|
7369
|
+
return input.name;
|
|
7370
|
+
});
|
|
7366
7371
|
|
|
7367
|
-
var Tool = _construct(Function, _toConsumableArray(propertyNames).concat(['html', 'CD', 'tag', code]));
|
|
7372
|
+
var Tool = _construct(Function, _toConsumableArray(propertyNames).concat(_toConsumableArray(contextOptionsNames), ['html', 'CD', 'tag', code]));
|
|
7368
7373
|
|
|
7369
|
-
var
|
|
7374
|
+
var propertyValues = propertyInputs.map(function (prop) {
|
|
7370
7375
|
return getPropertyWithFallback(prop);
|
|
7371
7376
|
});
|
|
7372
|
-
|
|
7377
|
+
var contextValues = contextOptionsInputs.map(function (input) {
|
|
7378
|
+
return tag.toolProperties[input.name];
|
|
7379
|
+
});
|
|
7380
|
+
return Tool.apply(void 0, _toConsumableArray(propertyValues).concat(_toConsumableArray(contextValues), [html, CD__default['default'], tag]));
|
|
7373
7381
|
}
|
|
7374
7382
|
}], [{
|
|
7375
7383
|
key: "dynamicProperties",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@movable/studio-framework",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.38.1-custom-tool-context-options",
|
|
4
4
|
"description": "A Component library for reactive Studio apps.",
|
|
5
5
|
"author": "Movable Ink",
|
|
6
6
|
"repository": "movableink/studio-framework",
|
|
@@ -35,7 +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/
|
|
38
|
+
"@movable/framework-types": "^2.38.1-custom-tool-context-options",
|
|
39
|
+
"@movable/studio-framework-test-helpers": "^2.38.1-custom-tool-context-options",
|
|
39
40
|
"@types/qunit": "^2.11.1",
|
|
40
41
|
"@types/qunit-dom": "^0.7.0",
|
|
41
42
|
"@types/react": "^17.0.6",
|
|
@@ -67,5 +68,5 @@
|
|
|
67
68
|
"volta": {
|
|
68
69
|
"extends": "../../package.json"
|
|
69
70
|
},
|
|
70
|
-
"gitHead": "
|
|
71
|
+
"gitHead": "27b864d0bd5ffb7631a85c094821505ccafe05df"
|
|
71
72
|
}
|