PageSourceSearch

https://nocode-js.com/assets/js/ec34d9e2.4859cd32.js

js nocode-js.com collected 2026-10-03 23:20:17 UTC 6,058 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunknocode_js_com=self.webpackChunknocode_js_com||[]).push([[1149],{3905:(e,t,a)=>{a.d(t,{Zo:()=>s,kt:()=>m});var l=a(7294);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function n(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var l=Object.getOwnPropertySymbols(e);t&&(l=l.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,l)}return a}function i(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?n(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):n(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function o(e,t){if(null==e)return{};var a,l,r=function(e,t){if(null==e)return{};var a,l,r={},n=Object.keys(e);for(l=0;l<n.length;l++)a=n[l],t.indexOf(a)>=0||(r[a]=e[a]);return r}(e,t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);for(l=0;l<n.length;l++)a=n[l],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(r[a]=e[a])}return r}var u=l.createContext({}),p=function(e){var t=l.useContext(u),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},s=function(e){var t=p(e.components);return l.createElement(u.Provider,{value:t},e.children)},c="mdxType",d={inlineCode:"code",wrapper:function(e){var t=e.children;return l.createElement(l.Fragment,{},t)}},b=l.forwardRef((function(e,t){var a=e.components,r=e.mdxType,n=e.originalType,u=e.parentName,s=o(e,["components","mdxType","originalType","parentName"]),c=p(a),b=r,m=c["".concat(u,".").concat(b)]||c[b]||d[b]||n;return a?l.createElement(m,i(i({ref:t},s),{},{components:a})):l.createElement(m,i({ref:t},s))}));function m(e,t){var a=arguments,r=t&&t.mdxType;if("string"==typeof e||r){var n=a.length,i=new Array(n);i[0]=b;var o={};for(var u in t)hasOwnProperty.call(t,u)&&(o[u]=t[u]);o.originalType=e,o[c]="string"==typeof e?e:r,i[1]=o;for(var p=2;p<n;p++)i[p]=a[p];return l.createElement.apply(null,i)}return l.createElement.apply(null,a)}b.displayName="MDXCreateElement"},108:(e,t,a)=>{a.r(t),a.d(t,{assets:()=>u,contentTitle:()=>i,default:()=>d,frontMatter:()=>n,metadata:()=>o,toc:()=>p});var l=a(7462),r=(a(7294),a(3905));const n={sidebar_position:0,sidebar_label:"Nullable Variable"},i="Nullable Variable Value Model",o={unversionedId:"sequential-workflow-editor/value-models/nullable-variable",id:"sequential-workflow-editor/value-models/nullable-variable",title:"Nullable Variable Value Model",description:"The value model describes an optional variable. This is not a definition of a variable, but this is a choice of an existing variable. You can specify the type of the variable.",source:"@site/docs/sequential-workflow-editor/value-models/nullable-variable.md",sourceDirName:"sequential-workflow-editor/value-models",slug:"/sequential-workflow-editor/value-models/nullable-variable",permalink:"/docs/sequential-workflow-editor/value-models/nullable-variable",draft:!1,tags:[],version:"current",sidebarPosition:0,frontMatter:{sidebar_position:0,sidebar_label:"Nullable Variable"},sidebar:"tutorialSidebar",previous:{title:"Nullable Variable Definition",permalink:"/docs/sequential-workflow-editor/value-models/nullable-variable-definition"},next:{title:"Number",permalink:"/docs/sequential-workflow-editor/value-models/number"}},u={},p=[{value:"Configuration",id:"configuration",level:2},{value:"Value Reading",id:"value-reading",level:2}],s={toc:p},c="wrapper";function d(e){let{components:t,...a}=e;return(0,r.kt)(c,(0,l.Z)({},s,a,{components:t,mdxType:"MDXLayout"}),(0,r.kt)("h1",{id:"nullable-variable-value-model"},"Nullable Variable Value Model"),(0,r.kt)("p",null,"The value model describes an optional variable. This is not a definition of a variable, but this is a choice of an existing variable. You can specify the type of the variable."),(0,r.kt)("admonition",{title:"Example",type:"tip"},(0,r.kt)("p",{parentName:"admonition"},"Check the ",(0,r.kt)("a",{parentName:"p",href:"https://nocode-js.github.io/sequential-workflow-editor/webpack-app/public/editors.html#nullableVariable"},"Editors Example"),".")),(0,r.kt)("h2",{id:"configuration"},"Configuration"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { createNullableVariableValueModel } from 'sequential-workflow-editor-model';\n\nbuilder\n  .property('foo')\n  .value(\n    createNullableVariableValueModel({\n      variableType: 'string',\n      isRequired: true\n    })\n  );\n")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Required properties"),":"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"variableType")," - the type of the variable, for example ",(0,r.kt)("inlineCode",{parentName:"li"},"string"),", ",(0,r.kt)("inlineCode",{parentName:"li"},"number")," or ",(0,r.kt)("inlineCode",{parentName:"li"},"boolean"),".")),(0,r.kt)("p",null,(0,r.kt)("strong",{parentName:"p"},"Optional properties"),":"),(0,r.kt)("ul",null,(0,r.kt)("li",{parentName:"ul"},(0,r.kt)("inlineCode",{parentName:"li"},"isRequired")," - if this property is ",(0,r.kt)("inlineCode",{parentName:"li"},"true")," then a user must select a variable. By default this property is ",(0,r.kt)("inlineCode",{parentName:"li"},"false"),".")),(0,r.kt)("h2",{id:"value-reading"}
1,"Value Reading"),(0,r.kt)("p",null,"The value is stored in a simple object:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"interface Variable {\n  name: string;\n}\n\ntype NullableVariable = Variable | null;\n")),(0,r.kt)("p",null,"To read the value you need to read the property value:"),(0,r.kt)("pre",null,(0,r.kt)("code",{parentName:"pre",className:"language-ts"},"import { NullableVariable } from 'sequential-workflow-editor-model';\n\nconst value: NullableVariable = stepOrRoot.properties['foo']; // null or { name: '...' }\n")))}d.isMDXComponent=!0}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.