@digipair/skill-web-editor 0.4.14 → 0.4.16
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/index.cjs2.js +7 -7
- package/index.esm2.js +7 -7
- package/package.json +1 -1
- package/pins-to-blockly.cjs.js +6 -2
- package/pins-to-blockly.esm.js +6 -2
package/index.cjs2.js
CHANGED
|
@@ -2642,7 +2642,7 @@ function generateBlockFromPins(pinsSettings, workspace) {
|
|
|
2642
2642
|
}
|
|
2643
2643
|
pinsBlock.initSvg();
|
|
2644
2644
|
pinsBlock.render();
|
|
2645
|
-
if (library.paths['/' + pinsSettings.element].post.tags && library.paths['/' + pinsSettings.element].post.tags.includes('needPins')) {
|
|
2645
|
+
if (library.paths['/' + pinsSettings.element].post.tags && library.paths['/' + pinsSettings.element].post.tags.includes('needPins') && pinsSettings.pins && pinsSettings.pins.length > 0) {
|
|
2646
2646
|
const pinsConnection = pinsBlock.getInput('pins').connection;
|
|
2647
2647
|
const reversedPins = [
|
|
2648
2648
|
...pinsSettings.pins || []
|
|
@@ -2936,7 +2936,7 @@ function itemListFromPinsSettings(pinsSettings, pinsDefinition) {
|
|
|
2936
2936
|
});
|
|
2937
2937
|
}
|
|
2938
2938
|
}
|
|
2939
|
-
if (pinsDefinition.tags && pinsDefinition.tags.includes('needPins')) {
|
|
2939
|
+
if (pinsDefinition.tags && pinsDefinition.tags.includes('needPins') && pinsSettings.pins && pinsSettings.pins.length > 0) {
|
|
2940
2940
|
inputArray.push({
|
|
2941
2941
|
id: 'pins',
|
|
2942
2942
|
name: 'pins'
|
|
@@ -2971,13 +2971,13 @@ function itemListFromPinsSettings(pinsSettings, pinsDefinition) {
|
|
|
2971
2971
|
}
|
|
2972
2972
|
function itemListFromComponentSettings(componentSettings, componentDefinition) {
|
|
2973
2973
|
const inputArray = [];
|
|
2974
|
-
for (const [propertyKey,
|
|
2974
|
+
for (const [propertyKey, propertyValue] of Object.entries(componentDefinition.properties)){
|
|
2975
2975
|
if (!Object.prototype.hasOwnProperty.call(componentSettings, propertyKey)) {
|
|
2976
2976
|
continue;
|
|
2977
2977
|
}
|
|
2978
2978
|
inputArray.push({
|
|
2979
2979
|
id: propertyKey,
|
|
2980
|
-
name: propertyKey
|
|
2980
|
+
name: propertyValue.summary || propertyKey
|
|
2981
2981
|
});
|
|
2982
2982
|
}
|
|
2983
2983
|
return inputArray;
|
|
@@ -2991,7 +2991,7 @@ function itemListFromSceneSettings(sceneSettings, sceneDefinition) {
|
|
|
2991
2991
|
}
|
|
2992
2992
|
inputArray.push({
|
|
2993
2993
|
id: parameter.name,
|
|
2994
|
-
name: parameter.name
|
|
2994
|
+
name: parameter.summary || parameter.name
|
|
2995
2995
|
});
|
|
2996
2996
|
}
|
|
2997
2997
|
}
|
|
@@ -3619,7 +3619,7 @@ class GenericSceneElement extends s {
|
|
|
3619
3619
|
return x`
|
|
3620
3620
|
<style>
|
|
3621
3621
|
.blocklyToolboxDiv {
|
|
3622
|
-
background-color:
|
|
3622
|
+
background-color: rgb(66, 133, 244);
|
|
3623
3623
|
color: white;
|
|
3624
3624
|
width: 370px;
|
|
3625
3625
|
}
|
|
@@ -3677,7 +3677,7 @@ class GenericSceneElement extends s {
|
|
|
3677
3677
|
transition: box-shadow 0.3s ease-in-out;
|
|
3678
3678
|
text-align: center;
|
|
3679
3679
|
font-weight: 500;
|
|
3680
|
-
background-color:${this.canSave ? '
|
|
3680
|
+
background-color:${this.canSave ? 'rgb(66, 133, 244)' : '#5F5F5F'} ;
|
|
3681
3681
|
cursor: pointer;"
|
|
3682
3682
|
class="material-icons"
|
|
3683
3683
|
aria-hidden="true"
|
package/index.esm2.js
CHANGED
|
@@ -2640,7 +2640,7 @@ function generateBlockFromPins(pinsSettings, workspace) {
|
|
|
2640
2640
|
}
|
|
2641
2641
|
pinsBlock.initSvg();
|
|
2642
2642
|
pinsBlock.render();
|
|
2643
|
-
if (library.paths['/' + pinsSettings.element].post.tags && library.paths['/' + pinsSettings.element].post.tags.includes('needPins')) {
|
|
2643
|
+
if (library.paths['/' + pinsSettings.element].post.tags && library.paths['/' + pinsSettings.element].post.tags.includes('needPins') && pinsSettings.pins && pinsSettings.pins.length > 0) {
|
|
2644
2644
|
const pinsConnection = pinsBlock.getInput('pins').connection;
|
|
2645
2645
|
const reversedPins = [
|
|
2646
2646
|
...pinsSettings.pins || []
|
|
@@ -2934,7 +2934,7 @@ function itemListFromPinsSettings(pinsSettings, pinsDefinition) {
|
|
|
2934
2934
|
});
|
|
2935
2935
|
}
|
|
2936
2936
|
}
|
|
2937
|
-
if (pinsDefinition.tags && pinsDefinition.tags.includes('needPins')) {
|
|
2937
|
+
if (pinsDefinition.tags && pinsDefinition.tags.includes('needPins') && pinsSettings.pins && pinsSettings.pins.length > 0) {
|
|
2938
2938
|
inputArray.push({
|
|
2939
2939
|
id: 'pins',
|
|
2940
2940
|
name: 'pins'
|
|
@@ -2969,13 +2969,13 @@ function itemListFromPinsSettings(pinsSettings, pinsDefinition) {
|
|
|
2969
2969
|
}
|
|
2970
2970
|
function itemListFromComponentSettings(componentSettings, componentDefinition) {
|
|
2971
2971
|
const inputArray = [];
|
|
2972
|
-
for (const [propertyKey,
|
|
2972
|
+
for (const [propertyKey, propertyValue] of Object.entries(componentDefinition.properties)){
|
|
2973
2973
|
if (!Object.prototype.hasOwnProperty.call(componentSettings, propertyKey)) {
|
|
2974
2974
|
continue;
|
|
2975
2975
|
}
|
|
2976
2976
|
inputArray.push({
|
|
2977
2977
|
id: propertyKey,
|
|
2978
|
-
name: propertyKey
|
|
2978
|
+
name: propertyValue.summary || propertyKey
|
|
2979
2979
|
});
|
|
2980
2980
|
}
|
|
2981
2981
|
return inputArray;
|
|
@@ -2989,7 +2989,7 @@ function itemListFromSceneSettings(sceneSettings, sceneDefinition) {
|
|
|
2989
2989
|
}
|
|
2990
2990
|
inputArray.push({
|
|
2991
2991
|
id: parameter.name,
|
|
2992
|
-
name: parameter.name
|
|
2992
|
+
name: parameter.summary || parameter.name
|
|
2993
2993
|
});
|
|
2994
2994
|
}
|
|
2995
2995
|
}
|
|
@@ -3617,7 +3617,7 @@ class GenericSceneElement extends s {
|
|
|
3617
3617
|
return x`
|
|
3618
3618
|
<style>
|
|
3619
3619
|
.blocklyToolboxDiv {
|
|
3620
|
-
background-color:
|
|
3620
|
+
background-color: rgb(66, 133, 244);
|
|
3621
3621
|
color: white;
|
|
3622
3622
|
width: 370px;
|
|
3623
3623
|
}
|
|
@@ -3675,7 +3675,7 @@ class GenericSceneElement extends s {
|
|
|
3675
3675
|
transition: box-shadow 0.3s ease-in-out;
|
|
3676
3676
|
text-align: center;
|
|
3677
3677
|
font-weight: 500;
|
|
3678
|
-
background-color:${this.canSave ? '
|
|
3678
|
+
background-color:${this.canSave ? 'rgb(66, 133, 244)' : '#5F5F5F'} ;
|
|
3679
3679
|
cursor: pointer;"
|
|
3680
3680
|
class="material-icons"
|
|
3681
3681
|
aria-hidden="true"
|
package/package.json
CHANGED
package/pins-to-blockly.cjs.js
CHANGED
|
@@ -290,7 +290,8 @@ function generateBlocklyBlockFromLibraries(pinsLibraries, blocksLegacy) {
|
|
|
290
290
|
if (Object.hasOwnProperty.call(pinsLibrary['x-scene-blocks'], endpoint)) {
|
|
291
291
|
const endpointSceneblock = pinsLibrary['x-scene-blocks'][endpoint];
|
|
292
292
|
const sceneBlockId = pinsLibrary.info.title + '/__SCENEBLOCK__' + endpoint;
|
|
293
|
-
|
|
293
|
+
const block = getSceneBlockDefinition(pinsLibrary, endpointSceneblock, sceneBlockId);
|
|
294
|
+
blocksLibrary.push(block);
|
|
294
295
|
}
|
|
295
296
|
}
|
|
296
297
|
}
|
|
@@ -469,7 +470,10 @@ function getSceneBlockDefinition(library, methodData, sceneBlockId) {
|
|
|
469
470
|
parameters.push(parameter);
|
|
470
471
|
}
|
|
471
472
|
const requiredParamInputs = parameters.filter((param)=>param.required === true);
|
|
472
|
-
const requiredFields =
|
|
473
|
+
const requiredFields = [
|
|
474
|
+
...requiredParamInputs.map((param)=>param.name),
|
|
475
|
+
...metadata.map((param)=>'metadata--' + param.name)
|
|
476
|
+
];
|
|
473
477
|
requiredFields.push('');
|
|
474
478
|
// metadata
|
|
475
479
|
for(let i = 0; i < (metadata == null ? void 0 : metadata.length); i++){
|
package/pins-to-blockly.esm.js
CHANGED
|
@@ -288,7 +288,8 @@ function generateBlocklyBlockFromLibraries(pinsLibraries, blocksLegacy) {
|
|
|
288
288
|
if (Object.hasOwnProperty.call(pinsLibrary['x-scene-blocks'], endpoint)) {
|
|
289
289
|
const endpointSceneblock = pinsLibrary['x-scene-blocks'][endpoint];
|
|
290
290
|
const sceneBlockId = pinsLibrary.info.title + '/__SCENEBLOCK__' + endpoint;
|
|
291
|
-
|
|
291
|
+
const block = getSceneBlockDefinition(pinsLibrary, endpointSceneblock, sceneBlockId);
|
|
292
|
+
blocksLibrary.push(block);
|
|
292
293
|
}
|
|
293
294
|
}
|
|
294
295
|
}
|
|
@@ -467,7 +468,10 @@ function getSceneBlockDefinition(library, methodData, sceneBlockId) {
|
|
|
467
468
|
parameters.push(parameter);
|
|
468
469
|
}
|
|
469
470
|
const requiredParamInputs = parameters.filter((param)=>param.required === true);
|
|
470
|
-
const requiredFields =
|
|
471
|
+
const requiredFields = [
|
|
472
|
+
...requiredParamInputs.map((param)=>param.name),
|
|
473
|
+
...metadata.map((param)=>'metadata--' + param.name)
|
|
474
|
+
];
|
|
471
475
|
requiredFields.push('');
|
|
472
476
|
// metadata
|
|
473
477
|
for(let i = 0; i < (metadata == null ? void 0 : metadata.length); i++){
|