How to use the cwlts/models/d2sb.ExpressionModel function in cwlts

To help you get started, we’ve selected a few cwlts examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github rabix / composer / src / app / components / sidebar / expression-editor / expression-editor.component.ts View on Github external
.subscribe((result: SandboxResponse) => {

                if (result.error === undefined) {
                    if (result.output === "undefined" || result.output === "null") {
                        this.newValueStream.next(new ExpressionModel({
                            value: "",
                            evaluatedValue: "",
                        }));
                    } else {
                        const newExpression = new ExpressionModel({});
                        newExpression.setValueToExpression(this.codeToEvaluate);
                        newExpression.setEvaluatedValue(result.output);

                        this.newValueStream.next(newExpression)
                    }
                }
            });
    }
github rabix / composer / src / app / components / quick-pick / quick-pick.component.ts View on Github external
.subscribe((value: string) => {
                    this.updateExpressionValue(new ExpressionModel(value));
                })
        );
github rabix / composer / src / app / editor-common / components / expression-input / expression-input.component.ts View on Github external
writeValue(obj: ExpressionModel): void {
        if (obj) {
            this.model  = obj;
            this.isExpr = obj.isExpression;
        } else {
            this.model  = new ExpressionModel("");
            this.isExpr = this.model.isExpression;
        }
    }
github rabix / composer / src / app / components / quick-pick / quick-pick.component.ts View on Github external
private crateExpressionInput(): void {
        if (this.formGroup.contains("expressionField")) {
            return;
        }

        this.formGroup.controls["radioButtonControl"].setValue("");
        this.expressionModel = new ExpressionModel("");

        this.formGroup.addControl(
            "expressionField",
            new FormControl(this.expressionModel.serialize(), Validators.compose([Validators.required, Validators.minLength(1)]))
        );

        this.subs.push(
            this.formGroup.controls["expressionField"].valueChanges
                .debounceTime(300)
                .subscribe((value: string) => {
                    this.updateExpressionValue(new ExpressionModel(value));
                })
        );
    }
github rabix / composer / src / app / components / sidebar / expression-editor / expression-editor.component.ts View on Github external
.subscribe((result: SandboxResponse) => {

                if (result.error === undefined) {
                    if (result.output === "undefined" || result.output === "null") {
                        this.newValueStream.next(new ExpressionModel({
                            value: "",
                            evaluatedValue: "",
                        }));
                    } else {
                        const newExpression = new ExpressionModel({});
                        newExpression.setValueToExpression(this.codeToEvaluate);
                        newExpression.setEvaluatedValue(result.output);

                        this.newValueStream.next(newExpression)
                    }
                }
            });
    }