rete-angular-plugin 2.1.1 → 2.1.2
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/12/bundles/rete-angular-plugin-ng12.umd.js +24 -3
- package/12/bundles/rete-angular-plugin-ng12.umd.js.map +1 -1
- package/12/esm2015/presets/classic/components/control/control.component.js +1 -1
- package/12/esm2015/presets/classic/components/node/node.component.js +16 -4
- package/12/fesm2015/rete-angular-plugin-ng12.js +16 -3
- package/12/fesm2015/rete-angular-plugin-ng12.js.map +1 -1
- package/12/presets/classic/components/node/node.component.d.ts +7 -1
- package/13/esm2020/presets/classic/components/control/control.component.mjs +2 -2
- package/13/esm2020/presets/classic/components/node/node.component.mjs +17 -5
- package/13/fesm2015/rete-angular-plugin-ng13.mjs +18 -5
- package/13/fesm2015/rete-angular-plugin-ng13.mjs.map +1 -1
- package/13/fesm2020/rete-angular-plugin-ng13.mjs +18 -5
- package/13/fesm2020/rete-angular-plugin-ng13.mjs.map +1 -1
- package/13/presets/classic/components/node/node.component.d.ts +7 -1
- package/14/esm2020/presets/classic/components/control/control.component.mjs +2 -2
- package/14/esm2020/presets/classic/components/node/node.component.mjs +17 -5
- package/14/fesm2015/rete-angular-plugin-ng14.mjs +18 -5
- package/14/fesm2015/rete-angular-plugin-ng14.mjs.map +1 -1
- package/14/fesm2020/rete-angular-plugin-ng14.mjs +18 -5
- package/14/fesm2020/rete-angular-plugin-ng14.mjs.map +1 -1
- package/14/presets/classic/components/node/node.component.d.ts +7 -1
- package/15/esm2020/presets/classic/components/control/control.component.mjs +2 -2
- package/15/esm2020/presets/classic/components/node/node.component.mjs +17 -5
- package/15/fesm2015/rete-angular-plugin-ng15.mjs +18 -5
- package/15/fesm2015/rete-angular-plugin-ng15.mjs.map +1 -1
- package/15/fesm2020/rete-angular-plugin-ng15.mjs +18 -5
- package/15/fesm2020/rete-angular-plugin-ng15.mjs.map +1 -1
- package/15/presets/classic/components/node/node.component.d.ts +7 -1
- package/16/esm2022/presets/classic/components/control/control.component.mjs +2 -2
- package/16/esm2022/presets/classic/components/node/node.component.mjs +17 -5
- package/16/fesm2022/rete-angular-plugin-ng16.mjs +18 -5
- package/16/fesm2022/rete-angular-plugin-ng16.mjs.map +1 -1
- package/16/presets/classic/components/node/node.component.d.ts +7 -1
- package/17/esm2022/presets/classic/components/control/control.component.mjs +2 -2
- package/17/esm2022/presets/classic/components/node/node.component.mjs +18 -6
- package/17/fesm2022/rete-angular-plugin-ng17.mjs +19 -6
- package/17/fesm2022/rete-angular-plugin-ng17.mjs.map +1 -1
- package/17/presets/classic/components/node/node.component.d.ts +7 -1
- package/CHANGELOG.md +7 -0
- package/bundles/rete-angular-plugin.umd.js +18 -2
- package/bundles/rete-angular-plugin.umd.js.map +1 -1
- package/esm2015/presets/classic/components/control/control.component.js +1 -1
- package/esm2015/presets/classic/components/node/node.component.js +10 -2
- package/fesm2015/rete-angular-plugin.js +10 -2
- package/fesm2015/rete-angular-plugin.js.map +1 -1
- package/package.json +1 -1
- package/presets/classic/components/node/node.component.d.ts +7 -1
- package/rete-angular-plugin.metadata.json +1 -1
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Component, Input, HostBinding, ChangeDetectorRef } from '@angular/core';
|
|
2
|
-
import { ClassicPreset as Classic } from 'rete';
|
|
3
2
|
import * as i0 from "@angular/core";
|
|
4
3
|
import * as i1 from "@angular/common";
|
|
5
4
|
import * as i2 from "../../../../ref";
|
|
@@ -62,6 +61,12 @@ export class NodeComponent {
|
|
|
62
61
|
emit;
|
|
63
62
|
rendered;
|
|
64
63
|
seed = 0;
|
|
64
|
+
get width() {
|
|
65
|
+
return this.data.width;
|
|
66
|
+
}
|
|
67
|
+
get height() {
|
|
68
|
+
return this.data.height;
|
|
69
|
+
}
|
|
65
70
|
get selected() {
|
|
66
71
|
return this.data.selected;
|
|
67
72
|
}
|
|
@@ -80,7 +85,8 @@ export class NodeComponent {
|
|
|
80
85
|
return ai - bi;
|
|
81
86
|
}
|
|
82
87
|
static ɵfac = function NodeComponent_Factory(t) { return new (t || NodeComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
83
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NodeComponent, selectors: [["ng-component"]], hostAttrs: ["data-testid", "node"], hostVars:
|
|
88
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NodeComponent, selectors: [["ng-component"]], hostAttrs: ["data-testid", "node"], hostVars: 6, hostBindings: function NodeComponent_HostBindings(rf, ctx) { if (rf & 2) {
|
|
89
|
+
i0.ɵɵstyleProp("width", ctx.width, "px")("height", ctx.height, "px");
|
|
84
90
|
i0.ɵɵclassProp("selected", ctx.selected);
|
|
85
91
|
} }, inputs: { data: "data", emit: "emit", rendered: "rendered" }, features: [i0.ɵɵNgOnChangesFeature], decls: 8, vars: 13, consts: [["data-testid", "title", 1, "title"], ["class", "output", 4, "ngFor", "ngForOf"], ["class", "control", "refComponent", "", 3, "data", "emit", 4, "ngFor", "ngForOf"], ["class", "input", 4, "ngFor", "ngForOf"], [1, "output"], ["data-testid", "output-title", 1, "output-title"], ["refComponent", "", "data-testid", "output-socket", 1, "output-socket", 3, "data", "emit"], ["refComponent", "", 1, "control", 3, "data", "emit"], [1, "input"], ["refComponent", "", "data-testid", "input-socket", 1, "input-socket", 3, "data", "emit"], ["class", "input-title", "data-testid", "input-title", 4, "ngIf"], ["refComponent", "", "data-testid", "input-control", 1, "input-control", 3, "data", "emit"], ["data-testid", "input-title", 1, "input-title"]], template: function NodeComponent_Template(rf, ctx) { if (rf & 1) {
|
|
86
92
|
i0.ɵɵelementStart(0, "div", 0);
|
|
@@ -101,22 +107,28 @@ export class NodeComponent {
|
|
|
101
107
|
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind2(5, 7, ctx.data.controls, ctx.sortByIndex));
|
|
102
108
|
i0.ɵɵadvance(2);
|
|
103
109
|
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind2(7, 10, ctx.data.inputs, ctx.sortByIndex));
|
|
104
|
-
} }, dependencies: [i1.NgForOf, i1.NgIf, i2.RefDirective, i1.KeyValuePipe], styles: ["[_nghost-%COMP%]{display:block;background:rgba(110,136,255,.8);border:2px solid #4e58bf;border-radius:10px;cursor:pointer;box-sizing:border-box;
|
|
110
|
+
} }, dependencies: [i1.NgForOf, i1.NgIf, i2.RefDirective, i1.KeyValuePipe], styles: ["[_nghost-%COMP%]{display:block;background:rgba(110,136,255,.8);border:2px solid #4e58bf;border-radius:10px;cursor:pointer;box-sizing:border-box;width:180px;height:auto;padding-bottom:6px;position:relative;-webkit-user-select:none;user-select:none;line-height:initial;font-family:Arial}[_nghost-%COMP%]:hover{background:rgba(130,153,255,.8)}.selected[_nghost-%COMP%]{background:#ffd92c;border-color:#e3c000}[_nghost-%COMP%] .title[_ngcontent-%COMP%]{color:#fff;font-family:sans-serif;font-size:18px;padding:8px}[_nghost-%COMP%] .output[_ngcontent-%COMP%]{text-align:right}[_nghost-%COMP%] .input[_ngcontent-%COMP%]{text-align:left}[_nghost-%COMP%] .input-title[_ngcontent-%COMP%], [_nghost-%COMP%] .output-title[_ngcontent-%COMP%]{vertical-align:middle;color:#fff;display:inline-block;font-family:sans-serif;font-size:14px;margin:6px;line-height:24px}[_nghost-%COMP%] .input-title[hidden][_ngcontent-%COMP%], [_nghost-%COMP%] .output-title[hidden][_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .output-socket[_ngcontent-%COMP%]{text-align:right;margin-right:-18px;display:inline-block}[_nghost-%COMP%] .input-socket[_ngcontent-%COMP%]{text-align:left;margin-left:-18px;display:inline-block}[_nghost-%COMP%] .input-control[_ngcontent-%COMP%]{z-index:1;width:calc(100% - 36px);vertical-align:middle;display:inline-block}[_nghost-%COMP%] .control[_ngcontent-%COMP%]{padding:6px 18px}"] });
|
|
105
111
|
}
|
|
106
112
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NodeComponent, [{
|
|
107
113
|
type: Component,
|
|
108
114
|
args: [{ host: {
|
|
109
115
|
'data-testid': 'node'
|
|
110
|
-
}, template: "<div class=\"title\" data-testid=\"title\">{{data.label}}</div>\n<div class=\"output\" *ngFor=\"let output of data.outputs | keyvalue: sortByIndex\" [attr.data-testid]=\"'output-'+output.key\">\n <div class=\"output-title\" data-testid=\"output-title\">{{output.value?.label}}</div>\n <div\n class=\"output-socket\"\n refComponent\n [data]=\"{type: 'socket', side: 'output', key: output.key, nodeId: data.id, payload: output.value?.socket, seed: seed }\"\n [emit]=\"emit\"\n data-testid=\"output-socket\"\n ></div>\n</div>\n<div\n class=\"control\"\n *ngFor=\"let control of data.controls | keyvalue: sortByIndex\"\n refComponent\n [data]=\"{type: 'control', payload: control.value }\"\n [emit]=\"emit\"\n [attr.data-testid]=\"'control-'+control.key\"\n></div>\n<div class=\"input\" *ngFor=\"let input of data.inputs | keyvalue: sortByIndex\" [attr.data-testid]=\"'input-'+input.key\">\n <div\n class=\"input-socket\"\n refComponent\n [data]=\"{type: 'socket', side: 'input', key: input.key, nodeId: data.id, payload: input.value?.socket, seed: seed }\"\n [emit]=\"emit\"\n data-testid=\"input-socket\"\n ></div>\n <div class=\"input-title\" data-testid=\"input-title\" *ngIf=\"!input.value?.control || !input.value?.showControl\">{{input.value?.label}}</div>\n <div\n class=\"input-control\"\n [style.display]=\"input.value?.control && input.value?.showControl ? '' : 'none'\"\n refComponent\n [data]=\"{type: 'control', payload: input.value?.control }\"\n [emit]=\"emit\"\n data-testid=\"input-control\"\n ></div>\n</div>\n", styles: [":host{display:block;background:rgba(110,136,255,.8);border:2px solid #4e58bf;border-radius:10px;cursor:pointer;box-sizing:border-box;
|
|
116
|
+
}, template: "<div class=\"title\" data-testid=\"title\">{{data.label}}</div>\n<div class=\"output\" *ngFor=\"let output of data.outputs | keyvalue: sortByIndex\" [attr.data-testid]=\"'output-'+output.key\">\n <div class=\"output-title\" data-testid=\"output-title\">{{output.value?.label}}</div>\n <div\n class=\"output-socket\"\n refComponent\n [data]=\"{type: 'socket', side: 'output', key: output.key, nodeId: data.id, payload: output.value?.socket, seed: seed }\"\n [emit]=\"emit\"\n data-testid=\"output-socket\"\n ></div>\n</div>\n<div\n class=\"control\"\n *ngFor=\"let control of data.controls | keyvalue: sortByIndex\"\n refComponent\n [data]=\"{type: 'control', payload: control.value }\"\n [emit]=\"emit\"\n [attr.data-testid]=\"'control-'+control.key\"\n></div>\n<div class=\"input\" *ngFor=\"let input of data.inputs | keyvalue: sortByIndex\" [attr.data-testid]=\"'input-'+input.key\">\n <div\n class=\"input-socket\"\n refComponent\n [data]=\"{type: 'socket', side: 'input', key: input.key, nodeId: data.id, payload: input.value?.socket, seed: seed }\"\n [emit]=\"emit\"\n data-testid=\"input-socket\"\n ></div>\n <div class=\"input-title\" data-testid=\"input-title\" *ngIf=\"!input.value?.control || !input.value?.showControl\">{{input.value?.label}}</div>\n <div\n class=\"input-control\"\n [style.display]=\"input.value?.control && input.value?.showControl ? '' : 'none'\"\n refComponent\n [data]=\"{type: 'control', payload: input.value?.control }\"\n [emit]=\"emit\"\n data-testid=\"input-control\"\n ></div>\n</div>\n", styles: [":host{display:block;background:rgba(110,136,255,.8);border:2px solid #4e58bf;border-radius:10px;cursor:pointer;box-sizing:border-box;width:180px;height:auto;padding-bottom:6px;position:relative;-webkit-user-select:none;user-select:none;line-height:initial;font-family:Arial}:host:hover{background:rgba(130,153,255,.8)}:host.selected{background:#ffd92c;border-color:#e3c000}:host .title{color:#fff;font-family:sans-serif;font-size:18px;padding:8px}:host .output{text-align:right}:host .input{text-align:left}:host .input-title,:host .output-title{vertical-align:middle;color:#fff;display:inline-block;font-family:sans-serif;font-size:14px;margin:6px;line-height:24px}:host .input-title[hidden],:host .output-title[hidden]{display:none}:host .output-socket{text-align:right;margin-right:-18px;display:inline-block}:host .input-socket{text-align:left;margin-left:-18px;display:inline-block}:host .input-control{z-index:1;width:calc(100% - 36px);vertical-align:middle;display:inline-block}:host .control{padding:6px 18px}\n"] }]
|
|
111
117
|
}], () => [{ type: i0.ChangeDetectorRef }], { data: [{
|
|
112
118
|
type: Input
|
|
113
119
|
}], emit: [{
|
|
114
120
|
type: Input
|
|
115
121
|
}], rendered: [{
|
|
116
122
|
type: Input
|
|
123
|
+
}], width: [{
|
|
124
|
+
type: HostBinding,
|
|
125
|
+
args: ['style.width.px']
|
|
126
|
+
}], height: [{
|
|
127
|
+
type: HostBinding,
|
|
128
|
+
args: ['style.height.px']
|
|
117
129
|
}], selected: [{
|
|
118
130
|
type: HostBinding,
|
|
119
131
|
args: ['class.selected']
|
|
120
132
|
}] }); })();
|
|
121
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NodeComponent, { className: "NodeComponent", filePath: "presets/classic/components/node/node.component.ts", lineNumber:
|
|
122
|
-
//# sourceMappingURL=data:application/json;base64,
|
|
133
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NodeComponent, { className: "NodeComponent", filePath: "presets/classic/components/node/node.component.ts", lineNumber: 15 }); })();
|
|
134
|
+
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoibm9kZS5jb21wb25lbnQuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi8uLi8uLi8uLi8uLi8uLi9uZzE3Ly5zcmMvcHJlc2V0cy9jbGFzc2ljL2NvbXBvbmVudHMvbm9kZS9ub2RlLmNvbXBvbmVudC50cyIsIi4uLy4uLy4uLy4uLy4uLy4uLy4uL25nMTcvLnNyYy9wcmVzZXRzL2NsYXNzaWMvY29tcG9uZW50cy9ub2RlL25vZGUuY29tcG9uZW50Lmh0bWwiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsT0FBTyxFQUFFLFNBQVMsRUFBRSxLQUFLLEVBQUUsV0FBVyxFQUFFLGlCQUFpQixFQUFhLE1BQU0sZUFBZSxDQUFDOz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AgICAgICAgY2xhc3M9XCJpbnB1dC1zb2NrZXRcIlxuICAgICAgICByZWZDb21wb25lbnRcbiAgICAgICAgW2RhdGFdPVwie3R5cGU6ICdzb2NrZXQnLCBzaWRlOiAnaW5wdXQnLCBrZXk6IGlucHV0LmtleSwgbm9kZUlkOiBkYXRhLmlkLCBwYXlsb2FkOiBpbnB1dC52YWx1ZT8uc29ja2V0LCBzZWVkOiBzZWVkIH1cIlxuICAgICAgICBbZW1pdF09XCJlbWl0XCJcbiAgICAgICAgZGF0YS10ZXN0aWQ9XCJpbnB1dC1zb2NrZXRcIlxuICAgID48L2Rpdj5cbiAgICA8ZGl2IGNsYXNzPVwiaW5wdXQtdGl0bGVcIiBkYXRhLXRlc3RpZD1cImlucHV0LXRpdGxlXCIgKm5nSWY9XCIhaW5wdXQudmFsdWU/LmNvbnRyb2wgfHwgIWlucHV0LnZhbHVlPy5zaG93Q29udHJvbFwiPnt7aW5wdXQudmFsdWU/LmxhYmVsfX08L2Rpdj5cbiAgICA8ZGl2XG4gICAgICAgIGNsYXNzPVwiaW5wdXQtY29udHJvbFwiXG4gICAgICAgIFtzdHlsZS5kaXNwbGF5XT1cImlucHV0LnZhbHVlPy5jb250cm9sICYmIGlucHV0LnZhbHVlPy5zaG93Q29udHJvbCA/ICcnIDogJ25vbmUnXCJcbiAgICAgICAgcmVmQ29tcG9uZW50XG4gICAgICAgIFtkYXRhXT1cInt0eXBlOiAnY29udHJvbCcsIHBheWxvYWQ6IGlucHV0LnZhbHVlPy5jb250cm9sIH1cIlxuICAgICAgICBbZW1pdF09XCJlbWl0XCJcbiAgICAgICAgZGF0YS10ZXN0aWQ9XCJpbnB1dC1jb250cm9sXCJcbiAgICA+PC9kaXY+XG48L2Rpdj5cbiJdfQ==
|
|
@@ -93,6 +93,12 @@ class NodeComponent {
|
|
|
93
93
|
emit;
|
|
94
94
|
rendered;
|
|
95
95
|
seed = 0;
|
|
96
|
+
get width() {
|
|
97
|
+
return this.data.width;
|
|
98
|
+
}
|
|
99
|
+
get height() {
|
|
100
|
+
return this.data.height;
|
|
101
|
+
}
|
|
96
102
|
get selected() {
|
|
97
103
|
return this.data.selected;
|
|
98
104
|
}
|
|
@@ -111,7 +117,8 @@ class NodeComponent {
|
|
|
111
117
|
return ai - bi;
|
|
112
118
|
}
|
|
113
119
|
static ɵfac = function NodeComponent_Factory(t) { return new (t || NodeComponent)(i0.ɵɵdirectiveInject(i0.ChangeDetectorRef)); };
|
|
114
|
-
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NodeComponent, selectors: [["ng-component"]], hostAttrs: ["data-testid", "node"], hostVars:
|
|
120
|
+
static ɵcmp = /*@__PURE__*/ i0.ɵɵdefineComponent({ type: NodeComponent, selectors: [["ng-component"]], hostAttrs: ["data-testid", "node"], hostVars: 6, hostBindings: function NodeComponent_HostBindings(rf, ctx) { if (rf & 2) {
|
|
121
|
+
i0.ɵɵstyleProp("width", ctx.width, "px")("height", ctx.height, "px");
|
|
115
122
|
i0.ɵɵclassProp("selected", ctx.selected);
|
|
116
123
|
} }, inputs: { data: "data", emit: "emit", rendered: "rendered" }, features: [i0.ɵɵNgOnChangesFeature], decls: 8, vars: 13, consts: [["data-testid", "title", 1, "title"], ["class", "output", 4, "ngFor", "ngForOf"], ["class", "control", "refComponent", "", 3, "data", "emit", 4, "ngFor", "ngForOf"], ["class", "input", 4, "ngFor", "ngForOf"], [1, "output"], ["data-testid", "output-title", 1, "output-title"], ["refComponent", "", "data-testid", "output-socket", 1, "output-socket", 3, "data", "emit"], ["refComponent", "", 1, "control", 3, "data", "emit"], [1, "input"], ["refComponent", "", "data-testid", "input-socket", 1, "input-socket", 3, "data", "emit"], ["class", "input-title", "data-testid", "input-title", 4, "ngIf"], ["refComponent", "", "data-testid", "input-control", 1, "input-control", 3, "data", "emit"], ["data-testid", "input-title", 1, "input-title"]], template: function NodeComponent_Template(rf, ctx) { if (rf & 1) {
|
|
117
124
|
i0.ɵɵelementStart(0, "div", 0);
|
|
@@ -132,24 +139,30 @@ class NodeComponent {
|
|
|
132
139
|
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind2(5, 7, ctx.data.controls, ctx.sortByIndex));
|
|
133
140
|
i0.ɵɵadvance(2);
|
|
134
141
|
i0.ɵɵproperty("ngForOf", i0.ɵɵpipeBind2(7, 10, ctx.data.inputs, ctx.sortByIndex));
|
|
135
|
-
} }, dependencies: [i1.NgForOf, i1.NgIf, RefDirective, i1.KeyValuePipe], styles: ["[_nghost-%COMP%]{display:block;background:rgba(110,136,255,.8);border:2px solid #4e58bf;border-radius:10px;cursor:pointer;box-sizing:border-box;
|
|
142
|
+
} }, dependencies: [i1.NgForOf, i1.NgIf, RefDirective, i1.KeyValuePipe], styles: ["[_nghost-%COMP%]{display:block;background:rgba(110,136,255,.8);border:2px solid #4e58bf;border-radius:10px;cursor:pointer;box-sizing:border-box;width:180px;height:auto;padding-bottom:6px;position:relative;-webkit-user-select:none;user-select:none;line-height:initial;font-family:Arial}[_nghost-%COMP%]:hover{background:rgba(130,153,255,.8)}.selected[_nghost-%COMP%]{background:#ffd92c;border-color:#e3c000}[_nghost-%COMP%] .title[_ngcontent-%COMP%]{color:#fff;font-family:sans-serif;font-size:18px;padding:8px}[_nghost-%COMP%] .output[_ngcontent-%COMP%]{text-align:right}[_nghost-%COMP%] .input[_ngcontent-%COMP%]{text-align:left}[_nghost-%COMP%] .input-title[_ngcontent-%COMP%], [_nghost-%COMP%] .output-title[_ngcontent-%COMP%]{vertical-align:middle;color:#fff;display:inline-block;font-family:sans-serif;font-size:14px;margin:6px;line-height:24px}[_nghost-%COMP%] .input-title[hidden][_ngcontent-%COMP%], [_nghost-%COMP%] .output-title[hidden][_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] .output-socket[_ngcontent-%COMP%]{text-align:right;margin-right:-18px;display:inline-block}[_nghost-%COMP%] .input-socket[_ngcontent-%COMP%]{text-align:left;margin-left:-18px;display:inline-block}[_nghost-%COMP%] .input-control[_ngcontent-%COMP%]{z-index:1;width:calc(100% - 36px);vertical-align:middle;display:inline-block}[_nghost-%COMP%] .control[_ngcontent-%COMP%]{padding:6px 18px}"] });
|
|
136
143
|
}
|
|
137
144
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(NodeComponent, [{
|
|
138
145
|
type: Component,
|
|
139
146
|
args: [{ host: {
|
|
140
147
|
'data-testid': 'node'
|
|
141
|
-
}, template: "<div class=\"title\" data-testid=\"title\">{{data.label}}</div>\n<div class=\"output\" *ngFor=\"let output of data.outputs | keyvalue: sortByIndex\" [attr.data-testid]=\"'output-'+output.key\">\n <div class=\"output-title\" data-testid=\"output-title\">{{output.value?.label}}</div>\n <div\n class=\"output-socket\"\n refComponent\n [data]=\"{type: 'socket', side: 'output', key: output.key, nodeId: data.id, payload: output.value?.socket, seed: seed }\"\n [emit]=\"emit\"\n data-testid=\"output-socket\"\n ></div>\n</div>\n<div\n class=\"control\"\n *ngFor=\"let control of data.controls | keyvalue: sortByIndex\"\n refComponent\n [data]=\"{type: 'control', payload: control.value }\"\n [emit]=\"emit\"\n [attr.data-testid]=\"'control-'+control.key\"\n></div>\n<div class=\"input\" *ngFor=\"let input of data.inputs | keyvalue: sortByIndex\" [attr.data-testid]=\"'input-'+input.key\">\n <div\n class=\"input-socket\"\n refComponent\n [data]=\"{type: 'socket', side: 'input', key: input.key, nodeId: data.id, payload: input.value?.socket, seed: seed }\"\n [emit]=\"emit\"\n data-testid=\"input-socket\"\n ></div>\n <div class=\"input-title\" data-testid=\"input-title\" *ngIf=\"!input.value?.control || !input.value?.showControl\">{{input.value?.label}}</div>\n <div\n class=\"input-control\"\n [style.display]=\"input.value?.control && input.value?.showControl ? '' : 'none'\"\n refComponent\n [data]=\"{type: 'control', payload: input.value?.control }\"\n [emit]=\"emit\"\n data-testid=\"input-control\"\n ></div>\n</div>\n", styles: [":host{display:block;background:rgba(110,136,255,.8);border:2px solid #4e58bf;border-radius:10px;cursor:pointer;box-sizing:border-box;
|
|
148
|
+
}, template: "<div class=\"title\" data-testid=\"title\">{{data.label}}</div>\n<div class=\"output\" *ngFor=\"let output of data.outputs | keyvalue: sortByIndex\" [attr.data-testid]=\"'output-'+output.key\">\n <div class=\"output-title\" data-testid=\"output-title\">{{output.value?.label}}</div>\n <div\n class=\"output-socket\"\n refComponent\n [data]=\"{type: 'socket', side: 'output', key: output.key, nodeId: data.id, payload: output.value?.socket, seed: seed }\"\n [emit]=\"emit\"\n data-testid=\"output-socket\"\n ></div>\n</div>\n<div\n class=\"control\"\n *ngFor=\"let control of data.controls | keyvalue: sortByIndex\"\n refComponent\n [data]=\"{type: 'control', payload: control.value }\"\n [emit]=\"emit\"\n [attr.data-testid]=\"'control-'+control.key\"\n></div>\n<div class=\"input\" *ngFor=\"let input of data.inputs | keyvalue: sortByIndex\" [attr.data-testid]=\"'input-'+input.key\">\n <div\n class=\"input-socket\"\n refComponent\n [data]=\"{type: 'socket', side: 'input', key: input.key, nodeId: data.id, payload: input.value?.socket, seed: seed }\"\n [emit]=\"emit\"\n data-testid=\"input-socket\"\n ></div>\n <div class=\"input-title\" data-testid=\"input-title\" *ngIf=\"!input.value?.control || !input.value?.showControl\">{{input.value?.label}}</div>\n <div\n class=\"input-control\"\n [style.display]=\"input.value?.control && input.value?.showControl ? '' : 'none'\"\n refComponent\n [data]=\"{type: 'control', payload: input.value?.control }\"\n [emit]=\"emit\"\n data-testid=\"input-control\"\n ></div>\n</div>\n", styles: [":host{display:block;background:rgba(110,136,255,.8);border:2px solid #4e58bf;border-radius:10px;cursor:pointer;box-sizing:border-box;width:180px;height:auto;padding-bottom:6px;position:relative;-webkit-user-select:none;user-select:none;line-height:initial;font-family:Arial}:host:hover{background:rgba(130,153,255,.8)}:host.selected{background:#ffd92c;border-color:#e3c000}:host .title{color:#fff;font-family:sans-serif;font-size:18px;padding:8px}:host .output{text-align:right}:host .input{text-align:left}:host .input-title,:host .output-title{vertical-align:middle;color:#fff;display:inline-block;font-family:sans-serif;font-size:14px;margin:6px;line-height:24px}:host .input-title[hidden],:host .output-title[hidden]{display:none}:host .output-socket{text-align:right;margin-right:-18px;display:inline-block}:host .input-socket{text-align:left;margin-left:-18px;display:inline-block}:host .input-control{z-index:1;width:calc(100% - 36px);vertical-align:middle;display:inline-block}:host .control{padding:6px 18px}\n"] }]
|
|
142
149
|
}], () => [{ type: i0.ChangeDetectorRef }], { data: [{
|
|
143
150
|
type: Input
|
|
144
151
|
}], emit: [{
|
|
145
152
|
type: Input
|
|
146
153
|
}], rendered: [{
|
|
147
154
|
type: Input
|
|
155
|
+
}], width: [{
|
|
156
|
+
type: HostBinding,
|
|
157
|
+
args: ['style.width.px']
|
|
158
|
+
}], height: [{
|
|
159
|
+
type: HostBinding,
|
|
160
|
+
args: ['style.height.px']
|
|
148
161
|
}], selected: [{
|
|
149
162
|
type: HostBinding,
|
|
150
163
|
args: ['class.selected']
|
|
151
164
|
}] }); })();
|
|
152
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NodeComponent, { className: "NodeComponent", filePath: "presets/classic/components/node/node.component.ts", lineNumber:
|
|
165
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassDebugInfo(NodeComponent, { className: "NodeComponent", filePath: "presets/classic/components/node/node.component.ts", lineNumber: 15 }); })();
|
|
153
166
|
|
|
154
167
|
class SocketComponent {
|
|
155
168
|
cdr;
|
|
@@ -221,11 +234,11 @@ class ControlComponent {
|
|
|
221
234
|
i0.ɵɵelementEnd();
|
|
222
235
|
} if (rf & 2) {
|
|
223
236
|
i0.ɵɵproperty("value", ctx.data.value)("readonly", ctx.data.readonly)("type", ctx.data.type);
|
|
224
|
-
} }, styles: ["input[_ngcontent-%COMP%]{width:
|
|
237
|
+
} }, styles: ["input[_ngcontent-%COMP%]{width:100%;border-radius:30px;background-color:#fff;padding:2px 6px;border:1px solid #999;font-size:110%;box-sizing:border-box}"] });
|
|
225
238
|
}
|
|
226
239
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0.ɵsetClassMetadata(ControlComponent, [{
|
|
227
240
|
type: Component,
|
|
228
|
-
args: [{ template: "<input\n [value]=\"data.value\"\n [readonly]=\"data.readonly\"\n [type]=\"data.type\"\n (input)=\"onChange($event)\"\n/>\n", styles: ["input{width:
|
|
241
|
+
args: [{ template: "<input\n [value]=\"data.value\"\n [readonly]=\"data.readonly\"\n [type]=\"data.type\"\n (input)=\"onChange($event)\"\n/>\n", styles: ["input{width:100%;border-radius:30px;background-color:#fff;padding:2px 6px;border:1px solid #999;font-size:110%;box-sizing:border-box}\n"] }]
|
|
229
242
|
}], () => [{ type: i0.ChangeDetectorRef }], { data: [{
|
|
230
243
|
type: Input
|
|
231
244
|
}], rendered: [{
|