@makeform/radio 1.0.0
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/CHANGELOG.md +6 -0
- package/README.md +5 -0
- package/index.html +1 -0
- package/package.json +1 -0
package/CHANGELOG.md
ADDED
package/index.html
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<div><div class="form-group" plug="widget"><label class="d-flex align-items-end"><div><span ld="label"></span><span class="text-danger ml-2" ld="is-required">*</span></div><div class="flex-grow-1"></div><div class="m-edit"><div class="text-danger text-sm" ld="limitation"></div></div></label><div class="text-sm text-muted"><div ld="desc" style="margin:-.6em 0 .7em"></div></div><div class="m-edit" ld="input"><label class="mr-3 mb-3 clickable" ld-each="option"><input class="mr-1" ld="radio" type="radio"><span ld="text"></span></label></div><div class="m-edit"><div class="text-danger text-sm mt-2 note" ld-each="note"></div></div><div class="m-view" ld="content"></div></div><script type="@plotdb/block">var mod;module.exports={pkg:{name:"@makeform/radio",extend:{name:"@makeform/common"}},init:function(t){return t.pubsub.fire("subinit",{mod:mod(t)})}};mod=function(t){var n,e,r,i,o,u,d,a,c;n=t.root,e=t.ctx,r=t.data,i=t.parent,o=t.t,u=t.i18n;d=e.ldview;a={};c="_"+Math.random().toString(36).substring(2);return{init:function(){var t,r=this;this.on("change",function(){return r.mod.child.view.render("option")});return this.mod.child.view=t=new d({root:n,text:{content:function(t){var n;n=t.node;if(r.isEmpty()){return"n/a"}else{return o(r.content())}}},handler:{input:function(t){var n;n=t.node;return n.classList.toggle("text-danger",r.status()===2)},option:{list:function(){return r.mod.info.config.values||[]},key:function(t){return t},view:{action:{change:{radio:function(t){var n,e;n=t.node,e=t.ctx;if(n.checked){return r.value(e)}}}},handler:{radio:function(t){var n,e;n=t.node,e=t.ctx;n.setAttribute("name",c);n.checked=r.value()===e;if(!r.mod.info.meta.readonly){return n.removeAttribute("disabled")}else{return n.setAttribute("disabled",null)}}},text:{text:function(t){var n,e;n=t.node,e=t.ctx;return o(e)}}}}}})},render:function(){return this.mod.child.view.render()}}};</script></div>
|
package/package.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"name":"@makeform/radio","version":"1.0.0","description":"","scripts":{},"keywords":[],"author":"zbryikt","license":"MIT","dependencies":{"@plotdb/srcbuild":"^0.0.51"},"devDependencies":{"fedep":"^1.1.7"}}
|