{"version":3,"names":["window","templates","_$_","sf","dom","$","__tmplt","_sf_internal","body_map","_replace","path","html","h","this","remove","reinitViews","append","document","body","apply","arguments","prepend","imports","task","Blackprint","loadScope","url","Context","getContext","Sketch","registerInterface","IFace","GetValue","DataMinimal","constructor","node","super","showPortName","_portLen","init","el","initClone","inputs","input","key","$el","createIcon"],"sources":["nodes/Data/_init.sf","nodes/Data/Object/Get/Value.sf","nodes/Data/Minimal.sf"],"sourcesContent":["## js-global\n// This script will run first, and then the other files\n// depends on blackprint.config.js configuration\n\n// Wait until all dependencies ready before running all .sf files\nawait imports.task();\n\n\n// Because .js and .sf is separated\n// we also need to call loadScope just like _init.js\nlet Blackprint = window.Blackprint.loadScope({\n\t// You can find the URL on Blackprint menu -> Modules\n\t// This will also be exported to JSON if this module's nodes is being used\n\turl: import.meta.url,\n});\n\n// Global shared context (wait it to avoid race condition)\nlet Context = await Blackprint.getContext('Data');","## html\n<div class=\"node\" style=\"transform: translate({{ x }}px, {{ y }}px)\">\n  <sf-template path=\"Blackprint/nodes/template/routes.sf\"></sf-template>\n  <sf-template path=\"Blackprint/nodes/template/header.sf\"></sf-template>\n\n  <div class=\"content\">\n    <input style=\"display: {{ node.hasFieldData || node.hasFieldCable ? 'none' : '' }}\" sf-bind=\"data.props\" placeholder=\"Type the properties here...\">\n\n    <div class=\"left-port\">\n      <sf-template path=\"Blackprint/nodes/template/input-port.sf\"></sf-template>\n    </div>\n\n    <div class=\"right-port\">\n      <sf-template path=\"Blackprint/nodes/template/output-port.sf\"></sf-template>\n    </div>\n  </div>\n\n  <sf-template path=\"Blackprint/nodes/template/other.sf\"></sf-template>\n</div>\n\n## scss-global\nbpic-data-object-get-value{\n\tinput{\n\t\tdisplay: block;\n\t\twidth: calc(100% - 10px);\n\t\tpadding: 5px;\n    outline: none;\n\t}\n}\n\n## js-global\nBlackprint.Sketch.registerInterface('BPIC/Data/Object/Get/Value',\nclass extends Context.IFace.GetValue { });\n\n// ToDo: add field suggestion","## html\n<div :class=\"node {{ showPortName ? 'show-port-name' : '' }}\" style=\"transform:translate({{ x }}px,{{ y }}px)\">\n  <sf-template path=\"Blackprint/nodes/template/routes.sf\"></sf-template>\n  <div class=\"content\">\n\t<div class=\"left-port\">\n\t  <sf-template path=\"Blackprint/nodes/template/input-port.sf\"></sf-template>\n\t</div>\n\n  \t<div class=\"center port-{{ _portLen }}\"\n\t\t@contextmenu.stopAll.prevent=\"nodeMenu(event)\"\n\t\t@dragmove=\"moveNode(event)\"\n\t\t@pointerdown=\"swapZIndex(event)\"\n\t\t@pointerover=\"nodeHovered(event)\"\n\t  \t@pointerout=\"nodeUnhovered(event)\"\n\t></div>\n\n\t<div class=\"right-port\">\n\t  <sf-template path=\"Blackprint/nodes/template/output-port.sf\"></sf-template>\n\t</div>\n  </div>\n  \n  <sf-template path=\"Blackprint/nodes/template/other.sf\"></sf-template>\n</div>\n\n## scss-global\nbpic-data-minimal {\n\t.left-port .name, .right-port .name {\n\t\tdisplay: none !important;\n\t}\n\n\t.show-port-name {\n\t\t.content{\n\t\t\tdisplay: flex !important;\n\t\t\tmargin-top: 0 !important;\n\t\t}\n\t\t.left-port .name, .right-port .name {\n\t\t\tdisplay: inline-flex !important;\n\t\t}\n\t\t.left-port {\n\t\t\tmargin-right: 0 !important;\n\t\t\twidth: auto;\n\t\t\t.input {\n\t\t\t\tpadding-right: 10px !important;\n\t\t\t}\n\t\t}\n\t\t.right-port {\n\t\t\tmargin-left: 0 !important;\n\t\t\t.output {\n\t\t\t\tpadding-left: 10px !important;\n\t\t\t}\n\t\t}\n\n\t\t.center {\n\t\t\tposition: relative;\n\t\t\ttext-align: center;\n\t\t\twidth: 15px;\n\t\t\talign-self: center;\n\t\t\tz-index: 1;\n\t\t}\n\t}\n\n\t.left-port {\n\t\tmargin-right: 17px;\n\t\tinput {\n\t\t\tdisplay: inline-block;\n\t\t}\n\t}\n\n\t& > .node {\n\t\toutline: 1px dashed white;\n\t\tbox-shadow: 0 0 10px 2px black;\n\t}\n\n\t.center {\n\t\theight: 100%;\n\t\tposition: relative;\n\t\ttext-align: center;\n\t\tvertical-align: middle;\n\t\tmargin-left: -15px;\n\t\tdisplay: inline-flex;\n\t\t&.port-2 {\n\t\t\tmargin-top: 11px;\n\t\t}\n\t}\n}\n\n## js-global\n// Register with default interface\nBlackprint.Sketch.registerInterface(\"BPIC/Data/Minimal\",\nclass extends Context.IFace.DataMinimal {\n\tconstructor(node){\n\t\tsuper(node);\n\t\tthis.showPortName = false;\n\t\tthis._portLen = 0;\n\t}\n\n\tinit(el){ // Run once\n\t\tthis.initClone(el);\n\n\t\tlet inputs = this.input;\n\t\tfor(let key in inputs) this._portLen++;\n\t}\n\n\tinitClone(el){ // Run multiple times if the nodes element is cloned to different container\n\t\tlet $el = $('.center', el);\n\t\tif($el[0] == null) return;\n\n\t\t$el.append(this.node.createIcon());\n\t}\n});"],"mappings":"mVACAA,EAAAC,YAAAD,EAAAC,UAAA,QAAAC,EAAAC,GAAAC,KAAAD,GAAAE,EAAAC,EAAAN,EAAAC,UAAAD,EAAAO,aAAAP,EAAAO,cAAA,CAAAC,SAAA,GAAAC,SAAAC,EAAAC,GAAA,IAAAC,EAAAV,EAAAS,GAAA,OAAAE,KAAAL,SAAAE,IAAAG,KAAAL,SAAAE,GAAAI,SAAAD,KAAAE,aAAAF,KAAAE,YAAAH,GAAAC,KAAAL,SAAAE,GAAAE,CAAA,EAAAI,OAAAN,EAAAC,GAAAT,EAAAe,SAAAC,MAAAF,OAAAH,KAAAJ,SAAAU,MAAAN,KAAAO,WAAA,EAAAC,QAAAX,EAAAC,GAAAT,EAAAe,SAAAC,MAAAG,QAAAR,KAAAJ,SAAAU,MAAAN,KAAAO,WAAA,SAIAE,EAAAC,OAKA,IAAAC,EAAAxB,EAAAwB,WAAAC,UAAA,CAGAC,sBAIAC,QAAAH,EAAAI,WAAA,Q,8rBCcAJ,EAAAK,OAAAC,kBAAA,6BACA,cAAAH,EAAAI,MAAAC,Y,muBCwDAR,EAAAK,OAAAC,kBAAA,oBACA,cAAAH,EAAAI,MAAAE,YACAC,YAAAC,GACAC,MAAAD,GACAtB,KAAAwB,cAAA,EACAxB,KAAAyB,SAAA,CACA,CAEAC,KAAAC,GACA3B,KAAA4B,UAAAD,GAEA,IAAAE,EAAA7B,KAAA8B,MACA,QAAAC,KAAAF,EAAA7B,KAAAyB,UACA,CAEAG,UAAAD,GACA,IAAAK,EAAAxC,EAAA,UAAAmC,GACA,MAAAK,EAAA,IAEAA,EAAA7B,OAAAH,KAAAsB,KAAAW,aACA,G","ignoreList":[]}