How to use Basic method in storybook-root

Best JavaScript code snippet using storybook-root

ms.attention.js

Source:ms.attention.js Github

copy

Full Screen

1<<<<<<< HEAD2define(function(require, exports, module) {3 var ms = require("ms");4 var ajaxCfg = {5 "type" : "post",6 "dataType" : "json"7 };8 return {9 people : {10 attention : {11 "version" : "1.0.0",12 /**13 * 商品收藏14 ------15 * @callmethod people.attention.save(data,function(returnJson){...});16 * @param {{type:string,have:true}} basicAttentionBasicId 信息编号17 * @param {{type:string,have:true}} basicAttentionType 关注类型 具体平台也可以根据自身的规则定义18 * @param {{type:function,have:true}} 回调方法 返回值(returnJson)19 * @examples 20 * ...21 * mpeople.people.attention.save($("form").serialize(),function(returnJson){22 * alert(JSON.stringify(returnJson));23 * })24 * ...25 * @function 26 * {"result":true,"code":"09000000"}27 * @return {{type:code}} 错误编码28 * @return {{type:result}} true成功、false失败29 */30 save:function(data,func){31 if (validator.isNull(data)){32 return;33 };34 //将data参数转json35 var newDataJson = ms.turnJson(data);36 if (validator.isNull(newDataJson.basicAttentionBasicId)){37 ms.alert("商品编号不能为空");38 return;39 }else if(!validator.isInt(newDataJson.basicAttentionBasicId)){40 ms.alert("商品编号应该为整型");41 return;42 };43 if(validator.isNull(newDataJson.basicAttentionType)){44 ms.alert("关注类型不能为空");45 return;46 };47 ajaxCfg.url = ms.base + "/people/attention/save.do";48 ajaxCfg.params = data;49 ms.ajax(ajaxCfg, func); 50 },51 /**52 * 判断商品是否收藏过53 ------54 * @callmethod people.attention.isExists(data,function(returnJson){...});55 * @param {{type:string,have:true}} basicAttentionBasicId 信息编号56 * @param {{type:string,have:true}} basicAttentionType 关注类型 具体平台也可以根据自身的规则定义57 * @param {{type:function,have:true}} 回调方法 返回值(returnJson)58 * @examples 59 * ...60 * mpeople.people.attention.isExists($("form").serialize(),function(returnJson){61 * alert(JSON.stringify(returnJson));62 * })63 * ...64 * @function 65 * {"result":true,"code":"09000000"}66 * @return {{type:code}} 错误编码67 * @return {{type:result}} true成功、false失败68 */69 isExists : function(data,func){70 if(validator.isNull(data)){71 return;72 }73 //将data参数转json74 var newDataJson = ms.turnJson(data);75 if (validator.isNull(newDataJson.basicAttentionBasicId)){76 ms.alert("商品编号不能为空");77 return;78 }else if(!validator.isInt(newDataJson.basicAttentionBasicId)){79 ms.alert("商品编号为整型");80 return;81 };82 if(validator.isNull(newDataJson.basicAttentionType)){83 ms.alert("关注类型不能为空");84 return;85 };86 ajaxCfg.url = ms.base + "/people/attention/isExists.do";87 ajaxCfg.params = data;88 ms.ajax(ajaxCfg, func); 89 },90 /**91 * 删除关注92 ------93 * @callmethod people.attention.del(data,function(returnJson){...});94 * @param {{type:string,have:true}} basicId 信息编号集合 多个编号用逗号隔开,例如1,2,3,495 * @param {{type:function,have:true}} 回调方法 返回值(returnJson)96 * @examples 97 * ...98 * mpeople.people.attention.del($("form").serialize(),function(returnJson){99 * alert(JSON.stringify(returnJson));100 * })101 *...102 * @function 103 * 无返回值104 */105 del : function(data,func){106 if(validator.isNull(data)){107 return;108 }109 var newDataJson = ms.turnJson(data);110 if(validator.isNull(newDataJson.basicId)){111 ms.alert("basicId不能为空");112 return;113 }114 var idArray = new Array;115 var dotNum = 0;116 idArray = newDataJson.basicId.split(",");117 for (var index = 0; index < newDataJson.basicId.length; index++) {118 if(newDataJson.basicId[index] === ','){119 dotNum++;120 }121 }122 if (dotNum >= idArray.length){123 ms.alert("输入参数格式有误");124 return;125 }126 ajaxCfg.url = ms.base + "/people/attention/delete.do";127 ajaxCfg.params = data ;128 ms.ajax(ajaxCfg, func); 129 },130 /**131 * 收藏列表132 ------133 * @callmethod people.attention.list(data,function(returnJson){...});134 * @param {{type:string,have:true}} basicAttentionType 关注类型 具体平台可以根据自身规则定义135 * @param {{type:string,have:true}} modelCode 模块编码136 * @param {{type:string,have:true}} pageNo 页码137 * @param {{type:string,have:true}} pageSize 一页显示数量138 * @param {{type:function,have:true}} 回调方法 返回值(returnJson)139 * @examples 140 * ...141 * mpeople.people.attention.list($("form").serialize(),function(returnJson){142 * alert(JSON.stringify(returnJson));143 * })144 *...145 * @function 146 * { "list": [147 * {148 * "basicPic": "缩略图", 149 * "basicTitle": "标题", 150 * "basicComment": 评论数, 151 * "basicCollect": 收藏数量, 152 * "basicHit": 点数量, 153 * "basicAppId": 1, 154 * "basicCategoryId": 160, 155 * "basicDateTime": 1468568887000,156 * "basicThumbnails": "/upload/mall/product/1/1468568853464.jpg", 157 * "basicTypeIds": [ ], 158 * "basicUpdateTime": shan, 159 * }],160 * "page":{"endRow": 2, 161 * "firstPage": 1, 162 * "hasNextPage": true存在下一页false不存在, 163 * "hasPreviousPage": true存在上一页false不存在, 164 * "isFirstPage": true是第一页false不是第一页, 165 * "isLastPage": true是最后一页false不是最后一页, 166 * "lastPage": 最后一页的页码, 167 * "navigatePages": 导航数量,实现 1...5.6.7....10效果, 168 * "navigatepageNums": []导航页码集合, 169 * "nextPage": 下一页, 170 * "pageNum": 当前页码, 171 * "pageSize": 一页显示数量, 172 * "pages": 总页数, 173 * "prePage": 上一页, 174 * "size": 总记录, 175 * "startRow": , 176 * "total":总记录数量}177 * }178 * @return {{type:basicAppId}} 编号179 * @return {{type:basicTitle}} 标题180 * @return {{type:basicDateTime}} 时间181 * @return {{type:basicPic}} 缩略图182 * @return {{type:basicLinkUrl}} 链接183 * @return {{type:basicUpdateTime}} 更新时间184 * @return {{type:basicHit}} 点数量185 */186 list : function(data,func){187 if (validator.isNull(data)){188 return;189 };190 //将data参数转json191 var newDataJson = ms.turnJson(data);192 if(validator.isNull(newDataJson.basicAttentionType)){193 ms.alert("列表的类型不能为空");194 return;195 }196 if(validator.isNull(newDataJson.modelCode)){197 ms.alert("模块编码不能为空");198 return;199 }200 if(validator.isNull(newDataJson.pageNo)){201 ms.alert("页码不能为空");202 return;203 }else if(!validator.isInt(newDataJson.pageNo)){204 ms.alert("页码应为整型");205 return;206 }207 if(validator.isNull(newDataJson.pageSize)){208 ms.alert("分页数量不能为空");209 return;210 }else if(!validator.isInt(newDataJson.pageSize)){211 ms.alert("分页数量应为整型");212 return;213 }214 215 ajaxCfg.url = ms.base + "/people/attention/list.do";216 ajaxCfg.params = data;217 ms.ajax(ajaxCfg, func); 218 },219 },220 mall : {221 attention:{222 /**223 * 商品收藏列表224 ------225 * @callmethod people.mall.attention.list(data,function(returnJson){...});226 * @param {{type:string,have:true}} pageNo 页码227 * @param {{type:string,have:true}} pageSize 一页显示数量228 * @param {{type:string,have:true}} basicAttentionType 关注类型 具体平台可以根据自身规则定义229 * @param {{type:function,have:true}} 回调方法 返回值(returnJson)230 * @examples 231 * ...232 * mpeople.people.mall.attention.list($("form").serialize(),function(returnJson){233 * alert(JSON.stringify(returnJson));234 * })235 *...236 * @function 237 * [238 * {"basicId":商品编号,239 * "basicTitle":"商品标题",240 * "basicDateTime":"时间",241 * "basicPic":商品图片,242 * "productLinkUrl":商品链接,243 * "basicSort":"商品分类",244 * "productPrice":商品价格245 * }246 * ]247 * @return {{type:basicId}} 商品编号248 * @return {{type:basicTitle}} 商品标题249 * @return {{type:basicDateTime}} 时间250 * @return {{type:basicPic}} 商品图片251 * @return {{type:productLinkUrl}} 商品链接252 * @return {{type:basicSort}} 商品分类253 * @return {{type:productPrice}} 商品价格254 */255 list : function(data,func){256 if (validator.isNull(data)){257 return;258 };259 //将data参数转json260 var newDataJson = ms.turnJson(data);261 if(validator.isNull(newDataJson.basicAttentionType)){262 ms.alert("列表的类型不能为空");263 return;264 }265 if(validator.isNull(newDataJson.pageNo)){266 ms.alert("页码不能为空");267 return;268 }else if(!validator.isInt(newDataJson.pageNo)){269 ms.alert("页码应为整型");270 return;271 }272 if(validator.isNull(newDataJson.pageSize)){273 ms.alert("分页数量不能为空");274 return;275 }else if(!validator.isInt(newDataJson.pageSize)){276 ms.alert("分页数量应为整型");277 return;278 }279 ajaxCfg.url = ms.base + "/people/mall/attention/list.do";280 ajaxCfg.params = data;281 ms.ajax(ajaxCfg, func); 282 }283 }284 }285 } 286 }287=======288define(function(require, exports, module) {289 var ms = require("ms");290 var ajaxCfg = {291 "type" : "post",292 "dataType" : "json"293 };294 return {295 people : {296 attention : {297 "version" : "1.0.0",298 /**299 * 商品收藏300 ------301 * @callmethod people.attention.save(data,function(returnJson){...});302 * @param {{type:string,have:true}} basicAttentionBasicId 信息编号303 * @param {{type:string,have:true}} basicAttentionType 关注类型 具体平台也可以根据自身的规则定义304 * @param {{type:function,have:true}} 回调方法 返回值(returnJson)305 * @examples 306 * ...307 * mpeople.people.attention.save($("form").serialize(),function(returnJson){308 * alert(JSON.stringify(returnJson));309 * })310 * ...311 * @function 312 * {"result":true,"code":"09000000"}313 * @return {{type:code}} 错误编码314 * @return {{type:result}} true成功、false失败315 */316 save:function(data,func){317 if (validator.isNull(data)){318 return;319 };320 //将data参数转json321 var newDataJson = ms.turnJson(data);322 if (validator.isNull(newDataJson.basicAttentionBasicId)){323 ms.alert("商品编号不能为空");324 return;325 }else if(!validator.isInt(newDataJson.basicAttentionBasicId)){326 ms.alert("商品编号应该为整型");327 return;328 };329 if(validator.isNull(newDataJson.basicAttentionType)){330 ms.alert("关注类型不能为空");331 return;332 };333 ajaxCfg.url = ms.base + "/people/attention/save.do";334 ajaxCfg.params = data;335 ms.ajax(ajaxCfg, func); 336 },337 /**338 * 判断商品是否收藏过339 ------340 * @callmethod people.attention.isExists(data,function(returnJson){...});341 * @param {{type:string,have:true}} basicAttentionBasicId 信息编号342 * @param {{type:string,have:true}} basicAttentionType 关注类型 具体平台也可以根据自身的规则定义343 * @param {{type:function,have:true}} 回调方法 返回值(returnJson)344 * @examples 345 * ...346 * mpeople.people.attention.isExists($("form").serialize(),function(returnJson){347 * alert(JSON.stringify(returnJson));348 * })349 * ...350 * @function 351 * {"result":true,"code":"09000000"}352 * @return {{type:code}} 错误编码353 * @return {{type:result}} true成功、false失败354 */355 isExists : function(data,func){356 if(validator.isNull(data)){357 return;358 }359 //将data参数转json360 var newDataJson = ms.turnJson(data);361 if (validator.isNull(newDataJson.basicAttentionBasicId)){362 ms.alert("商品编号不能为空");363 return;364 }else if(!validator.isInt(newDataJson.basicAttentionBasicId)){365 ms.alert("商品编号为整型");366 return;367 };368 if(validator.isNull(newDataJson.basicAttentionType)){369 ms.alert("关注类型不能为空");370 return;371 };372 ajaxCfg.url = ms.base + "/people/attention/isExists.do";373 ajaxCfg.params = data;374 ms.ajax(ajaxCfg, func); 375 },376 /**377 * 删除关注378 ------379 * @callmethod people.attention.del(data,function(returnJson){...});380 * @param {{type:string,have:true}} basicId 信息编号集合 多个编号用逗号隔开,例如1,2,3,4381 * @param {{type:function,have:true}} 回调方法 返回值(returnJson)382 * @examples 383 * ...384 * mpeople.people.attention.del($("form").serialize(),function(returnJson){385 * alert(JSON.stringify(returnJson));386 * })387 *...388 * @function 389 * 无返回值390 */391 del : function(data,func){392 if(validator.isNull(data)){393 return;394 }395 var newDataJson = ms.turnJson(data);396 if(validator.isNull(newDataJson.basicId)){397 ms.alert("basicId不能为空");398 return;399 }400 var idArray = new Array;401 var dotNum = 0;402 idArray = newDataJson.basicId.split(",");403 for (var index = 0; index < newDataJson.basicId.length; index++) {404 if(newDataJson.basicId[index] === ','){405 dotNum++;406 }407 }408 if (dotNum >= idArray.length){409 ms.alert("输入参数格式有误");410 return;411 }412 ajaxCfg.url = ms.base + "/people/attention/delete.do";413 ajaxCfg.params = data ;414 ms.ajax(ajaxCfg, func); 415 },416 /**417 * 收藏列表418 ------419 * @callmethod people.attention.list(data,function(returnJson){...});420 * @param {{type:string,have:true}} basicAttentionType 关注类型 具体平台可以根据自身规则定义421 * @param {{type:string,have:true}} modelCode 模块编码422 * @param {{type:string,have:true}} pageNo 页码423 * @param {{type:string,have:true}} pageSize 一页显示数量424 * @param {{type:function,have:true}} 回调方法 返回值(returnJson)425 * @examples 426 * ...427 * mpeople.people.attention.list($("form").serialize(),function(returnJson){428 * alert(JSON.stringify(returnJson));429 * })430 *...431 * @function 432 * { "list": [433 * {434 * "basicPic": "缩略图", 435 * "basicTitle": "标题", 436 * "basicComment": 评论数, 437 * "basicCollect": 收藏数量, 438 * "basicHit": 点数量, 439 * "basicAppId": 1, 440 * "basicCategoryId": 160, 441 * "basicDateTime": 1468568887000,442 * "basicThumbnails": "/upload/mall/product/1/1468568853464.jpg", 443 * "basicTypeIds": [ ], 444 * "basicUpdateTime": shan, 445 * }],446 * "page":{"endRow": 2, 447 * "firstPage": 1, 448 * "hasNextPage": true存在下一页false不存在, 449 * "hasPreviousPage": true存在上一页false不存在, 450 * "isFirstPage": true是第一页false不是第一页, 451 * "isLastPage": true是最后一页false不是最后一页, 452 * "lastPage": 最后一页的页码, 453 * "navigatePages": 导航数量,实现 1...5.6.7....10效果, 454 * "navigatepageNums": []导航页码集合, 455 * "nextPage": 下一页, 456 * "pageNum": 当前页码, 457 * "pageSize": 一页显示数量, 458 * "pages": 总页数, 459 * "prePage": 上一页, 460 * "size": 总记录, 461 * "startRow": , 462 * "total":总记录数量}463 * }464 * @return {{type:basicAppId}} 编号465 * @return {{type:basicTitle}} 标题466 * @return {{type:basicDateTime}} 时间467 * @return {{type:basicPic}} 缩略图468 * @return {{type:basicLinkUrl}} 链接469 * @return {{type:basicUpdateTime}} 更新时间470 * @return {{type:basicHit}} 点数量471 */472 list : function(data,func){473 if (validator.isNull(data)){474 return;475 };476 //将data参数转json477 var newDataJson = ms.turnJson(data);478 if(validator.isNull(newDataJson.basicAttentionType)){479 ms.alert("列表的类型不能为空");480 return;481 }482 if(validator.isNull(newDataJson.modelCode)){483 ms.alert("模块编码不能为空");484 return;485 }486 if(validator.isNull(newDataJson.pageNo)){487 ms.alert("页码不能为空");488 return;489 }else if(!validator.isInt(newDataJson.pageNo)){490 ms.alert("页码应为整型");491 return;492 }493 if(validator.isNull(newDataJson.pageSize)){494 ms.alert("分页数量不能为空");495 return;496 }else if(!validator.isInt(newDataJson.pageSize)){497 ms.alert("分页数量应为整型");498 return;499 }500 501 ajaxCfg.url = ms.base + "/people/attention/list.do";502 ajaxCfg.params = data;503 ms.ajax(ajaxCfg, func); 504 },505 },506 mall : {507 attention:{508 /**509 * 商品收藏列表510 ------511 * @callmethod people.mall.attention.list(data,function(returnJson){...});512 * @param {{type:string,have:true}} pageNo 页码513 * @param {{type:string,have:true}} pageSize 一页显示数量514 * @param {{type:string,have:true}} basicAttentionType 关注类型 具体平台可以根据自身规则定义515 * @param {{type:function,have:true}} 回调方法 返回值(returnJson)516 * @examples 517 * ...518 * mpeople.people.mall.attention.list($("form").serialize(),function(returnJson){519 * alert(JSON.stringify(returnJson));520 * })521 *...522 * @function 523 * [524 * {"basicId":商品编号,525 * "basicTitle":"商品标题",526 * "basicDateTime":"时间",527 * "basicPic":商品图片,528 * "productLinkUrl":商品链接,529 * "basicSort":"商品分类",530 * "productPrice":商品价格531 * }532 * ]533 * @return {{type:basicId}} 商品编号534 * @return {{type:basicTitle}} 商品标题535 * @return {{type:basicDateTime}} 时间536 * @return {{type:basicPic}} 商品图片537 * @return {{type:productLinkUrl}} 商品链接538 * @return {{type:basicSort}} 商品分类539 * @return {{type:productPrice}} 商品价格540 */541 list : function(data,func){542 if (validator.isNull(data)){543 return;544 };545 //将data参数转json546 var newDataJson = ms.turnJson(data);547 if(validator.isNull(newDataJson.basicAttentionType)){548 ms.alert("列表的类型不能为空");549 return;550 }551 if(validator.isNull(newDataJson.pageNo)){552 ms.alert("页码不能为空");553 return;554 }else if(!validator.isInt(newDataJson.pageNo)){555 ms.alert("页码应为整型");556 return;557 }558 if(validator.isNull(newDataJson.pageSize)){559 ms.alert("分页数量不能为空");560 return;561 }else if(!validator.isInt(newDataJson.pageSize)){562 ms.alert("分页数量应为整型");563 return;564 }565 ajaxCfg.url = ms.base + "/people/mall/attention/list.do";566 ajaxCfg.params = data;567 ms.ajax(ajaxCfg, func); 568 }569 }570 }571 } 572 }573>>>>>>> commit...

Full Screen

Full Screen

main.ts

Source:main.ts Github

copy

Full Screen

1function einde () {2 midden()3 sM()4 led.setBrightness(200)5 basic.pause(1000)6 rechts()7 basic.pause(500)8 led.plot(3, 3)9 basic.pause(100)10 led.plot(3, 2)11 led.unplot(3, 3)12 basic.pause(100)13 basic.showLeds(`14 # # # # .15 # # . . #16 # . . . .17 . . . . .18 . . . # .19 `)20 basic.pause(1000)21 links()22 basic.pause(500)23 led.plot(1, 3)24 basic.pause(100)25 led.plot(1, 2)26 led.unplot(1, 3)27 basic.pause(100)28 basic.showLeds(`29 # . # # .30 . . . . #31 # . . . .32 . . . . .33 . # . . .34 `)35 basic.pause(1000)36 midden()37 basic.pause(500)38 led.plot(2, 3)39 basic.pause(100)40 led.plot(2, 2)41 led.unplot(2, 3)42 basic.pause(100)43 led.plot(2, 1)44 led.unplot(2, 2)45 basic.pause(100)46 basic.showLeds(`47 # # . # .48 . . # . #49 # . . . .50 . . . . .51 . . # . .52 `)53 basic.showLeds(`54 # . . . #55 . # # # #56 # . . . .57 . . . . .58 . . # . .59 `)60 basic.showLeds(`61 . . . . .62 # . . . #63 # # # # .64 . . . . .65 . . # . .66 `)67 basic.showLeds(`68 . . . . .69 . . . . .70 # . . . #71 . # # # .72 . . # . .73 `)74 basic.showLeds(`75 . . . . .76 . . . . .77 . . . . .78 # . . . #79 . # # # .80 `)81 basic.showLeds(`82 . . . . .83 . . . . .84 . . . . .85 . . . . .86 # . . . #87 `)88 basic.clearScreen()89 led.plot(2, 4)90 basic.pause(100)91 led.plot(2, 3)92 led.unplot(2, 4)93 basic.pause(100)94 led.unplot(2, 3)95 led.plot(2, 2)96 basic.pause(1000)97 for (let index = 0; index < 5; index++) {98 led.plot(3, 0)99 basic.pause(100)100 led.unplot(3, 0)101 led.plot(3, 1)102 led.plot(1, 0)103 basic.pause(100)104 led.unplot(1, 0)105 led.plot(3, 0)106 led.plot(1, 1)107 led.unplot(3, 1)108 led.plot(3, 2)109 basic.pause(100)110 led.unplot(1, 1)111 led.plot(3, 1)112 led.unplot(3, 0)113 led.plot(1, 2)114 led.unplot(3, 2)115 led.plot(3, 3)116 basic.pause(100)117 led.unplot(1, 2)118 led.plot(3, 2)119 led.unplot(3, 1)120 led.plot(0, 0)121 led.plot(1, 3)122 led.unplot(3, 3)123 led.plot(3, 4)124 basic.pause(100)125 led.unplot(1, 3)126 led.plot(3, 3)127 led.unplot(0, 0)128 led.plot(0, 1)129 led.unplot(3, 2)130 led.unplot(3, 4)131 led.plot(1, 4)132 basic.pause(100)133 led.unplot(1, 4)134 led.unplot(0, 1)135 led.plot(0, 2)136 led.plot(3, 4)137 led.unplot(3, 3)138 basic.pause(100)139 led.unplot(0, 2)140 led.plot(0, 3)141 led.unplot(3, 4)142 basic.pause(100)143 led.unplot(0, 3)144 led.plot(0, 4)145 basic.pause(100)146 led.unplot(0, 4)147 }148 led.plot(3, 0)149 led.unplot(2, 2)150 led.plot(2, 3)151 basic.pause(100)152 led.unplot(3, 0)153 led.plot(3, 1)154 led.plot(1, 0)155 basic.pause(100)156 led.unplot(1, 0)157 led.unplot(2, 3)158 led.plot(2, 2)159 led.plot(3, 0)160 led.plot(1, 1)161 led.unplot(3, 1)162 led.plot(3, 2)163 basic.pause(100)164 led.unplot(1, 1)165 led.plot(3, 1)166 led.unplot(2, 2)167 led.plot(2, 1)168 led.unplot(3, 0)169 led.plot(1, 2)170 led.unplot(3, 2)171 led.plot(3, 3)172 basic.pause(100)173 led.unplot(1, 2)174 led.plot(3, 2)175 led.unplot(2, 1)176 led.plot(2, 0)177 led.unplot(3, 1)178 led.plot(0, 0)179 led.plot(1, 3)180 led.unplot(3, 3)181 led.plot(3, 4)182 basic.pause(100)183 led.unplot(1, 3)184 led.plot(3, 3)185 led.unplot(0, 0)186 led.unplot(2, 0)187 led.plot(0, 1)188 led.unplot(3, 2)189 led.unplot(3, 4)190 led.plot(1, 4)191 basic.pause(100)192 led.unplot(1, 4)193 led.unplot(0, 1)194 led.plot(0, 2)195 led.plot(3, 4)196 led.unplot(3, 3)197 basic.pause(100)198 led.unplot(0, 2)199 led.plot(0, 3)200 led.unplot(3, 4)201 basic.pause(100)202 led.unplot(0, 3)203 led.plot(0, 4)204 basic.pause(100)205 led.unplot(0, 4)206 basic.clearScreen()207 basic.showLeds(`208 . # # # .209 # . . . #210 # # # # #211 # . . . #212 . # # # .213 `)214 basic.pause(2000)215 basic.clearScreen()216}217function level_4 () {218 basic.showNumber(4)219 basic.pause(2000)220 basic.clearScreen()221 midden()222 basic.pause(1000)223 led.plot(0, 0)224 led.plot(1, 0)225 led.plot(2, 0)226 basic.pause(500)227 led.plot(0, 1)228 led.plot(1, 1)229 led.plot(2, 1)230 led.unplot(0, 0)231 led.unplot(1, 0)232 led.unplot(2, 0)233 basic.pause(500)234 led.plot(0, 2)235 led.plot(1, 2)236 led.plot(2, 2)237 led.plot(3, 0)238 led.unplot(0, 1)239 led.unplot(1, 1)240 led.unplot(2, 1)241 basic.pause(500)242 led.plot(0, 3)243 led.plot(1, 3)244 led.plot(2, 3)245 led.plot(3, 1)246 led.unplot(3, 0)247 led.unplot(0, 2)248 led.unplot(1, 2)249 led.unplot(2, 2)250 basic.pause(500)251 led.unplot(0, 3)252 led.unplot(1, 3)253 led.unplot(2, 3)254 if (led.point(1, 4)) {255 gameover()256 } else {257 if (led.point(2, 4)) {258 gameover()259 } else {260 led.plot(3, 2)261 led.unplot(3, 1)262 led.plot(0, 4)263 led.plot(1, 4)264 led.plot(2, 4)265 basic.pause(500)266 led.plot(3, 3)267 led.unplot(3, 2)268 led.unplot(0, 4)269 led.unplot(1, 4)270 led.unplot(2, 4)271 basic.pause(500)272 led.unplot(3, 3)273 if (led.point(3, 4)) {274 gameover()275 } else {276 led.plot(3, 4)277 basic.pause(500)278 led.unplot(3, 4)279 basic.pause(500)280 level_5()281 }282 }283 }284}285function laatste () {286 sM()287 basic.pause(1000)288 led.plot(3, 1)289 led.plot(1, 1)290 basic.pause(100)291 led.unplot(3, 1)292 led.unplot(1, 1)293 basic.pause(100)294 led.plot(3, 1)295 led.plot(1, 1)296 basic.pause(100)297 led.unplot(3, 1)298 led.unplot(1, 1)299 basic.pause(100)300 led.plot(3, 1)301 led.plot(1, 1)302 basic.pause(100)303 led.unplot(3, 1)304 led.unplot(1, 1)305 basic.pause(100)306 led.plot(3, 1)307 led.plot(1, 1)308 basic.pause(100)309 led.plot(1, 1)310 led.plot(3, 1)311 basic.pause(100)312 led.plot(3, 2)313 led.plot(1, 2)314 basic.pause(100)315 led.plot(3, 3)316 led.plot(1, 3)317 if (led.point(1, 4)) {318 gameover()319 } else {320 if (led.point(3, 4)) {321 gameover()322 } else {323 led.plot(1, 4)324 led.plot(3, 4)325 basic.pause(1000)326 led.plotBrightness(1, 1, 200)327 led.plotBrightness(3, 1, 200)328 basic.pause(100)329 led.unplot(3, 2)330 led.unplot(1, 2)331 basic.pause(100)332 led.unplot(1, 3)333 led.unplot(3, 3)334 basic.pause(100)335 led.unplot(3, 4)336 led.unplot(1, 4)337 einde()338 }339 }340}341function sL () {342 led.plotBrightness(0, 0, 200)343 led.plotBrightness(1, 0, 200)344 led.plotBrightness(2, 0, 200)345 led.plotBrightness(3, 0, 200)346 led.plotBrightness(4, 0, 200)347 led.plotBrightness(0, 1, 200)348 led.plotBrightness(4, 3, 200)349 led.plotBrightness(4, 2, 200)350 led.plotBrightness(3, 2, 200)351 led.plotBrightness(2, 1, 200)352 led.plotBrightness(3, 1, 200)353 led.plotBrightness(4, 1, 200)354 led.unplot(2, 2)355 led.unplot(1, 2)356 led.unplot(0, 2)357 led.unplot(1, 1)358 led.unplot(0, 3)359}360function links () {361 led.unplot(2, 4)362 led.unplot(3, 4)363 led.plotBrightness(1, 4, 255)364}365function midden () {366 led.unplot(1, 4)367 led.unplot(3, 4)368 led.plotBrightness(2, 4, 255)369}370function to_be_continuet () {371 basic.pause(2000)372 for (let index = 0; index < 5; index++) {373 basic.pause(10)374 basic.showLeds(`375 . . # # #376 . . . . #377 . . . . #378 . . . . #379 . . # # #380 `)381 basic.pause(10)382 basic.showLeds(`383 . . . # #384 . . . . #385 . . . . #386 . . . . #387 . # # # #388 `)389 basic.pause(10)390 basic.showLeds(`391 . . . . #392 . . . . #393 . . . . #394 . . . . #395 # # # # #396 `)397 basic.pause(10)398 basic.showLeds(`399 . . . . .400 . . . . #401 . . . . #402 # . . . #403 # # # # #404 `)405 basic.pause(10)406 basic.showLeds(`407 . . . . .408 . . . . .409 # . . . #410 # . . . #411 # # # # #412 `)413 basic.pause(10)414 basic.showLeds(`415 . . . . .416 # . . . .417 # . . . .418 # . . . #419 # # # # #420 `)421 basic.pause(10)422 basic.showLeds(`423 # . . . .424 # . . . .425 # . . . .426 # . . . .427 # # # # #428 `)429 basic.pause(10)430 basic.showLeds(`431 # # . . .432 # . . . .433 # . . . .434 # . . . .435 # # # # .436 `)437 basic.pause(10)438 basic.showLeds(`439 # # # . .440 # . . . .441 # . . . .442 # . . . .443 # # # . .444 `)445 basic.pause(10)446 basic.showLeds(`447 # # # # .448 # . . . .449 # . . . .450 # . . . .451 # # . . .452 `)453 basic.pause(10)454 basic.showLeds(`455 # # # # #456 # . . . .457 # . . . .458 # . . . .459 # . . . .460 `)461 basic.pause(10)462 basic.showLeds(`463 # # # # #464 # . . . #465 # . . . .466 # . . . .467 . . . . .468 `)469 basic.pause(10)470 basic.showLeds(`471 # # # # #472 # . . . #473 # . . . #474 . . . . .475 . . . . .476 `)477 basic.pause(10)478 basic.showLeds(`479 # # # # #480 # . . . #481 . . . . #482 . . . . #483 . . . . .484 `)485 basic.pause(10)486 basic.showLeds(`487 # # # # #488 . . . . #489 . . . . #490 . . . . #491 . . . . #492 `)493 basic.pause(10)494 basic.showLeds(`495 . # # # #496 . . . . #497 . . . . #498 . . . . #499 . . . # #500 `)501 }502 basic.clearScreen()503}504input.onButtonPressed(Button.A, function () {505 links()506})507function sM () {508 led.plotBrightness(0, 0, 200)509 led.plotBrightness(1, 0, 200)510 led.plotBrightness(2, 0, 200)511 led.plotBrightness(3, 0, 200)512 led.plotBrightness(4, 0, 200)513 led.plotBrightness(0, 1, 200)514 led.plotBrightness(0, 2, 200)515 led.plotBrightness(1, 1, 200)516 led.plotBrightness(4, 1, 200)517 led.plotBrightness(4, 2, 200)518 led.plotBrightness(3, 1, 200)519 led.unplot(1, 2)520 led.unplot(2, 2)521 led.unplot(3, 2)522 led.unplot(4, 3)523 led.unplot(0, 3)524 led.unplot(2, 1)525}526function s_bijdeRL () {527 sB()528 basic.pause(200)529 led.plot(1, 1)530 led.plot(3, 1)531 basic.pause(100)532 led.unplot(3, 1)533 led.plot(3, 2)534 led.unplot(1, 1)535 led.plot(1, 2)536 basic.pause(100)537 led.plot(3, 3)538 led.unplot(3, 2)539 led.plot(1, 3)540 led.unplot(1, 2)541 basic.pause(100)542 if (led.point(1, 4)) {543 gameover()544 } else {545 if (led.point(3, 4)) {546 gameover()547 } else {548 led.plot(1, 4)549 led.unplot(1, 3)550 led.plot(3, 4)551 led.unplot(3, 3)552 basic.pause(100)553 led.unplot(3, 4)554 led.unplot(1, 4)555 }556 }557}558function rechts () {559 led.unplot(1, 4)560 led.unplot(2, 4)561 led.plotBrightness(3, 4, 255)562}563function sB () {564 led.plot(0, 0)565 led.plot(1, 0)566 led.plot(2, 0)567 led.plot(3, 0)568 led.plot(4, 0)569 led.plot(0, 2)570 led.plot(0, 1)571 led.plot(4, 2)572 led.plot(4, 1)573 led.plot(2, 1)574 led.unplot(1, 1)575 led.unplot(3, 1)576 led.unplot(1, 2)577 led.unplot(2, 2)578 led.unplot(3, 2)579 led.unplot(0, 3)580 led.unplot(4, 3)581}582input.onButtonPressed(Button.AB, function () {583 midden()584})585function level_2 () {586 basic.showNumber(2)587 basic.pause(2000)588 basic.clearScreen()589 links()590 basic.pause(1000)591 led.plot(1, 0)592 basic.pause(1000)593 led.plot(1, 1)594 led.unplot(1, 0)595 basic.pause(1000)596 led.plot(1, 2)597 led.plot(3, 0)598 led.unplot(1, 1)599 basic.pause(1000)600 led.plot(1, 3)601 led.plot(3, 1)602 led.unplot(1, 2)603 led.unplot(3, 0)604 basic.pause(1000)605 led.unplot(1, 3)606 led.unplot(3, 1)607 if (led.point(1, 4)) {608 gameover()609 } else {610 led.plot(1, 4)611 led.plot(3, 2)612 basic.pause(1000)613 led.plot(3, 3)614 led.unplot(1, 4)615 led.unplot(3, 2)616 basic.pause(1000)617 led.unplot(3, 3)618 if (led.point(3, 4)) {619 gameover()620 } else {621 led.plot(3, 4)622 basic.pause(1000)623 led.unplot(3, 4)624 level_3()625 }626 }627}628function s_rechts () {629 sR()630 basic.pause(200)631 led.plot(3, 1)632 basic.pause(100)633 led.unplot(3, 1)634 led.plot(3, 2)635 basic.pause(100)636 led.plot(3, 3)637 led.unplot(3, 2)638 basic.pause(100)639 if (led.point(3, 4)) {640 gameover()641 } else {642 led.plot(3, 4)643 led.unplot(3, 3)644 basic.pause(100)645 led.unplot(3, 4)646 }647}648input.onButtonPressed(Button.B, function () {649 rechts()650})651function level_5 () {652 basic.showNumber(5)653 basic.pause(2000)654 basic.clearScreen()655 basic.pause(500)656 led.setBrightness(200)657 basic.showLeds(`658 # # . # #659 # . . . #660 . . . . .661 . . . . .662 . . . . .663 `)664 basic.pause(100)665 led.plotBrightness(0, 0, 200)666 led.plotBrightness(1, 0, 200)667 led.plotBrightness(2, 0, 200)668 led.plotBrightness(3, 0, 200)669 led.plotBrightness(4, 0, 200)670 led.plotBrightness(0, 1, 200)671 led.plotBrightness(0, 2, 200)672 led.plotBrightness(1, 1, 200)673 led.plotBrightness(4, 1, 200)674 led.plotBrightness(4, 2, 200)675 led.plotBrightness(3, 1, 200)676 led.setBrightness(255)677 basic.pause(1000)678 midden()679 basic.pause(randint(1000, 3000))680 s_midden()681 basic.pause(randint(1000, 3000))682 s_links()683 basic.pause(randint(1000, 3000))684 s_rechts()685 basic.pause(randint(1000, 3000))686 s_rechts()687 basic.pause(randint(1000, 3000))688 s_links()689 basic.pause(randint(1000, 3000))690 s_bijdeRL()691 basic.pause(randint(1000, 3000))692 s_links()693 basic.pause(randint(1000, 3000))694 s_midden()695 basic.pause(randint(1000, 3000))696 s_links()697 basic.pause(randint(1000, 3000))698 s_rechts()699 basic.pause(randint(1000, 3000))700 s_bijdeRL()701 basic.pause(randint(1000, 3000))702 s_rechts()703 basic.pause(randint(1000, 3000))704 s_links()705 basic.pause(randint(1000, 3000))706 s_rechts()707 basic.pause(randint(1000, 3000))708 s_links()709 basic.pause(randint(1000, 3000))710 s_links()711 basic.pause(randint(1000, 3000))712 s_midden()713 basic.pause(2000)714 laatste()715}716function s_midden () {717 sM()718 basic.pause(200)719 led.plot(2, 1)720 basic.pause(100)721 led.unplot(2, 1)722 led.plot(2, 2)723 basic.pause(100)724 led.plot(2, 3)725 led.unplot(2, 2)726 basic.pause(100)727 if (led.point(2, 4)) {728 gameover()729 } else {730 led.plot(2, 4)731 led.unplot(2, 3)732 basic.pause(100)733 led.unplot(2, 4)734 }735}736function s_links () {737 sL()738 basic.pause(200)739 led.plot(1, 1)740 basic.pause(100)741 led.unplot(1, 1)742 led.plot(1, 2)743 basic.pause(100)744 led.plot(1, 3)745 led.unplot(1, 2)746 basic.pause(100)747 if (led.point(1, 4)) {748 gameover()749 } else {750 led.plot(1, 4)751 led.unplot(1, 3)752 basic.pause(100)753 led.unplot(1, 4)754 }755}756function start () {757 basic.pause(1000)758 basic.showLeds(`759 # . . # .760 . . . . .761 . . . . .762 . . . . .763 . . . . .764 `)765 basic.pause(100)766 basic.showLeds(`767 . . # . #768 # . . # .769 # . . # .770 . . . . .771 . . . . .772 `)773 basic.pause(100)774 basic.showLeds(`775 # . # . #776 . . # . #777 . . . # #778 # . . # .779 # . . . .780 `)781 basic.pause(100)782 basic.showLeds(`783 . . . . .784 # . # . .785 # . # . #786 . . . . #787 # . . # #788 `)789 basic.pause(100)790 basic.showLeds(`791 . . . . .792 . . . . .793 . . # . .794 # . # . #795 # . . . #796 `)797 basic.pause(100)798 basic.showLeds(`799 . . . . .800 . . . . .801 . . . . .802 . . . . .803 . . # . .804 `)805 basic.clearScreen()806 basic.pause(1000)807 basic.showLeds(`808 . # # # .809 # . . . #810 # # # # #811 # . . . #812 . # # # .813 `)814 if (true) {815 basic.pause(1000)816 basic.clearScreen()817 basic.pause(2000)818 level_1()819 } else {820 basic.pause(1000)821 basic.clearScreen()822 basic.pause(2000)823 level_1()824 }825}826function sR () {827 led.plotBrightness(0, 3, 200)828 led.plotBrightness(0, 2, 200)829 led.plotBrightness(1, 2, 200)830 led.plotBrightness(2, 1, 200)831 led.plotBrightness(0, 1, 200)832 led.plotBrightness(4, 1, 200)833 led.plotBrightness(0, 0, 200)834 led.plotBrightness(1, 0, 200)835 led.plotBrightness(2, 0, 200)836 led.plotBrightness(3, 0, 200)837 led.plotBrightness(4, 0, 200)838 led.plotBrightness(1, 1, 200)839 led.unplot(4, 3)840 led.unplot(2, 2)841 led.unplot(3, 2)842 led.unplot(4, 2)843 led.unplot(3, 1)844}845function level_1 () {846 basic.showNumber(1)847 basic.pause(2000)848 basic.clearScreen()849 midden()850 basic.pause(1000)851 led.plot(2, 0)852 basic.pause(1000)853 led.unplot(2, 0)854 led.plot(2, 1)855 basic.pause(1000)856 led.unplot(2, 1)857 led.plot(2, 2)858 basic.pause(1000)859 led.unplot(2, 2)860 led.plot(2, 3)861 basic.pause(1000)862 led.unplot(2, 3)863 if (led.point(2, 4)) {864 gameover()865 } else {866 led.plot(2, 4)867 basic.pause(1000)868 led.unplot(2, 4)869 level_2()870 }871}872function level_3 () {873 basic.showNumber(3)874 basic.pause(2000)875 basic.clearScreen()876 midden()877 basic.pause(1000)878 led.plot(1, 0)879 basic.pause(500)880 led.unplot(1, 0)881 led.plot(1, 1)882 basic.pause(500)883 led.unplot(1, 1)884 led.plot(1, 2)885 basic.pause(500)886 led.unplot(1, 2)887 led.plot(1, 3)888 led.plot(2, 0)889 basic.pause(500)890 led.unplot(1, 3)891 led.unplot(2, 0)892 if (led.point(1, 4)) {893 gameover()894 } else {895 led.plot(1, 4)896 led.plot(2, 1)897 basic.pause(500)898 led.unplot(1, 4)899 led.unplot(2, 1)900 led.plot(2, 2)901 basic.pause(500)902 led.unplot(2, 2)903 led.plot(2, 3)904 basic.pause(500)905 led.unplot(2, 3)906 if (led.point(2, 4)) {907 gameover()908 } else {909 led.plot(2, 4)910 basic.pause(500)911 led.unplot(2, 4)912 level_4()913 }914 }915}916function gameover () {917 basic.clearScreen()918 basic.showString("game over")919}...

Full Screen

Full Screen

classerpc_1_1_basic_codec.js

Source:classerpc_1_1_basic_codec.js Github

copy

Full Screen

1var classerpc_1_1_basic_codec =2[3 [ "BasicCodec", "classerpc_1_1_basic_codec.html#abd7b171481037fc3a9f4238acf6f7f6d", null ],4 [ "startWriteMessage", "classerpc_1_1_basic_codec.html#ac470f37a771427cbfac97ab0283e9181", null ],5 [ "writeData", "classerpc_1_1_basic_codec.html#a25e2b6cb85c37518be6148f54cbd01e0", null ],6 [ "write", "classerpc_1_1_basic_codec.html#aa5c809aed676e5b6a372991198c56c71", null ],7 [ "write", "classerpc_1_1_basic_codec.html#a3341bb468ab0adf3de1c3bf5401e4028", null ],8 [ "write", "classerpc_1_1_basic_codec.html#aea0a589580c22e50c1df833cb11ae0a0", null ],9 [ "write", "classerpc_1_1_basic_codec.html#a1b7bd9c40066c887ff77c4737d478525", null ],10 [ "write", "classerpc_1_1_basic_codec.html#a0aa696437c2b168f153117a154a4e0a7", null ],11 [ "write", "classerpc_1_1_basic_codec.html#a06407f2256fb0fa77e5404f279be423f", null ],12 [ "write", "classerpc_1_1_basic_codec.html#ade10e176496f6e8573f5c9ba91ac0655", null ],13 [ "write", "classerpc_1_1_basic_codec.html#ad5275291303ef67ff13151c97b4c324b", null ],14 [ "write", "classerpc_1_1_basic_codec.html#a3d345b54e136cbb4839199182e5270b1", null ],15 [ "write", "classerpc_1_1_basic_codec.html#a8c666e7bc3ae15ba6b3e8f93438d95de", null ],16 [ "write", "classerpc_1_1_basic_codec.html#a0106776fe3730d8be0f565106f73b521", null ],17 [ "writePtr", "classerpc_1_1_basic_codec.html#a502e1325f3051079c7e19dda25e7dd65", null ],18 [ "writeString", "classerpc_1_1_basic_codec.html#a7bb982495470fdc4da1eab2883371a18", null ],19 [ "writeBinary", "classerpc_1_1_basic_codec.html#a6456b4d7a1e7944f60d6baf1d33b2281", null ],20 [ "startWriteList", "classerpc_1_1_basic_codec.html#a7866b1ea6e2b89a373eddd3939d9e6f3", null ],21 [ "startWriteUnion", "classerpc_1_1_basic_codec.html#a75fc57134ce77a3949c1470b1243f871", null ],22 [ "writeNullFlag", "classerpc_1_1_basic_codec.html#a45a74c033c173b85096a8cd641841560", null ],23 [ "writeCallback", "classerpc_1_1_basic_codec.html#a45de8c72bcbb8611db98f83480104128", null ],24 [ "writeCallback", "classerpc_1_1_basic_codec.html#a3cf8a93617b7f712b19f6fa2a017c92f", null ],25 [ "startReadMessage", "classerpc_1_1_basic_codec.html#a8edbc2ad42055a8c17083b9f2da3248e", null ],26 [ "readData", "classerpc_1_1_basic_codec.html#af12b78761da78e9f140379972ca0cf86", null ],27 [ "read", "classerpc_1_1_basic_codec.html#a8bcc22f1815f0881b555bd8ac4a2d3b4", null ],28 [ "read", "classerpc_1_1_basic_codec.html#aba0745d52ce24779782f7bcedf4cf10e", null ],29 [ "read", "classerpc_1_1_basic_codec.html#a435757c15967421e4209e3456faec36a", null ],30 [ "read", "classerpc_1_1_basic_codec.html#a8395a4908bc9f077a27e7babe2727cac", null ],31 [ "read", "classerpc_1_1_basic_codec.html#a3aab31b4ea7bc6ceac592ce52e31b639", null ],32 [ "read", "classerpc_1_1_basic_codec.html#ad1898d71bacc79adbef49f61e72f5542", null ],33 [ "read", "classerpc_1_1_basic_codec.html#a4f988dbb016a98d99b681940fe4f886d", null ],34 [ "read", "classerpc_1_1_basic_codec.html#af35ade38165441954e85b4ebefaeab54", null ],35 [ "read", "classerpc_1_1_basic_codec.html#af988e51e450dda9e8649101ed472401a", null ],36 [ "read", "classerpc_1_1_basic_codec.html#a99dffc27fecbd06ce2367f22711c8a02", null ],37 [ "read", "classerpc_1_1_basic_codec.html#a418767f583e150e4e23cf8b25c3e377e", null ],38 [ "readPtr", "classerpc_1_1_basic_codec.html#a3bb94b2429f248ad6e3a357d25318404", null ],39 [ "readString", "classerpc_1_1_basic_codec.html#aefe3fd8293738dd1f863c786e069e2d9", null ],40 [ "readBinary", "classerpc_1_1_basic_codec.html#aef4a3aaa7bbd74c412bdb42c9468e777", null ],41 [ "startReadList", "classerpc_1_1_basic_codec.html#a286e2bda535cc3d1ef8931c9eb493a1d", null ],42 [ "startReadUnion", "classerpc_1_1_basic_codec.html#ae007d4c166a39f39111896e6fe01cb32", null ],43 [ "readNullFlag", "classerpc_1_1_basic_codec.html#a000e06e1dc72a3439c74792d40d61f01", null ],44 [ "readCallback", "classerpc_1_1_basic_codec.html#aef6e72c11eeca1cff3ec7cca6bcfa400", null ],45 [ "readCallback", "classerpc_1_1_basic_codec.html#a39527995a0bd9e460cdf1dcd4bbb06e7", null ]...

Full Screen

Full Screen

index.ts

Source:index.ts Github

copy

Full Screen

1import { StyleProvider, connectStyle } from '@app/native-base-shoutem-theme'2import { LodashUtils as _ } from '@app/tools'3import setDefaultThemeStyle from './init'4import variables from './theme/variables/platform'5import Drawer from './basic/Drawer'6import { SwipeRow } from './basic/SwipeRow'7import { Text } from './basic/Text'8import { ViewNB as View } from './basic/View'9import { Button } from './basic/Button'10import { DatePicker } from './basic/DatePicker'11import { TabHeading } from './basic/TabHeading'12import { TabContainer } from './basic/TabContainer'13import { IconNB } from './basic/IconNB'14import { Icon } from './basic/Icon'15import { Header } from './basic/Header'16import { HeaderStatusBar } from './basic/HeaderStatusBar'17import { InputGroup } from './basic/InputGroup'18import { Input } from './basic/Input'19import { Title } from './basic/Title'20import { Fab } from './basic/Fab'21import { Left } from './basic/Left'22import { Right } from './basic/Right'23import { Body } from './basic/Body'24import { Badge } from './basic/Badge'25import { CheckBox } from './basic/Checkbox'26import { Radio } from './basic/Radio'27import { Thumbnail } from './basic/Thumbnail'28import { Card } from './basic/Card'29import { CardItem } from './basic/CardItem'30import { Li } from './basic/Li'31import { Ul } from './basic/Ul'32import { P } from './basic/P'33import { H1 } from './basic/H1'34import { H2 } from './basic/H2'35import { H3 } from './basic/H3'36import { Spinner } from './basic/Spinner'37import { Switch } from './basic/Switch'38import { Container } from './basic/Container'39import { Root } from './basic/Root'40import { Content } from './basic/Content'41import { Footer } from './basic/Footer'42import { FooterTab } from './basic/FooterTab'43import { Form } from './basic/Form'44import { ToastContainer } from './basic/ToastContainer'45import { ActionSheetContainer } from './basic/Actionsheet'46import { PickerNB } from './basic/Picker'47import { List } from './basic/List'48import { ListSwipeRow } from './basic/ListSwipeRow'49import { ListItem } from './basic/ListItem'50import { Separator } from './basic/Separator'51import { DeckSwiper } from './basic/DeckSwiper'52import { Item } from './basic/Item'53import { Segment } from './basic/Segment'54import { Label } from './basic/Label'55import { Textarea } from './basic/Textarea'56import { Tab } from './basic/Tab'57import ScrollableTabView from './basic/Tabs'58import { DefaultTabBar } from './basic/Tabs/DefaultTabBar'59import { ScrollableTab } from './basic/Tabs/ScrollableTabBar'60import { Subtitle } from './basic/Subtitle'61import { Accordion } from './basic/Accordion'62import { ScrollHeader } from './basic/custom/ScrollHeader'63import { FixLeft } from './basic/custom/FixLeft'64import { FixRight } from './basic/custom/FixRight'65import { HeaderLayout } from './basic/custom/HeaderLayout'66export * from './utils'67setDefaultThemeStyle()68// Theme69export {70 // Custom71 HeaderLayout,72 ScrollHeader,73 FixLeft,74 FixRight,75 // Common76 variables,77 StyleProvider,78 connectStyle,79 Drawer,80 Button,81 DatePicker,82 IconNB,83 Icon,84 Header,85 HeaderStatusBar,86 Form,87 InputGroup,88 Input,89 Title,90 Fab,91 Left,92 Right,93 Body,94 Badge,95 CheckBox,96 Radio,97 Thumbnail,98 Card,99 CardItem,100 Li,101 Ul,102 P,103 H1,104 H2,105 H3,106 Spinner,107 Switch,108 Container,109 Content,110 Footer,111 Tab,112 ScrollableTabView as Tabs,113 FooterTab,114 PickerNB as Picker,115 List,116 ListSwipeRow,117 ListItem,118 Separator,119 DeckSwiper,120 Item,121 Subtitle,122 Label,123 Textarea,124 Text,125 Content as TabContent,126 View,127 ToastContainer as Toast,128 ScrollableTab,129 ActionSheetContainer as ActionSheet,130 TabHeading,131 TabContainer,132 DefaultTabBar,133 Segment,134 Root,135 SwipeRow,136 Accordion137}138const mapPropsToStyleNames = (styleNames, props) => {139 return _.keys(props)140}141export { mapPropsToStyleNames }...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1import { storiesOf } from '@storybook/react';2import React from 'react';3import { action } from '@storybook/addon-actions';4import { linkTo } from '@storybook/addon-links';5import { Button } from '@storybook/react/demo';6storiesOf('Button', module)7 .add('with text', () => <Button onClick={action('clicked')}>Hello Button</Button>)8 .add('with some emoji', () => (9 <Button onClick={action('clicked')}>10 ));11import React from 'react';12import { action } from '@storybook/addon-actions';13import { linkTo } from '@storybook/addon-links';14import { Button } from '@storybook/react/demo';15export default {16};17export const Text = () => <Button onClick={action('clicked')}>Hello Button</Button>;18export const Emoji = () => (19 <Button onClick={action('clicked')}>20);21Emoji.story = {22};23import { Meta, Story, Preview, Props } from '@storybook/addon-docs/blocks';24import { Button } from './Button';25<Meta title="MDX/Button" component={Button} />26import { Button } from 'my-library';27<Props of={Button} />28import { Meta, Story, Preview, Props } from '@storybook/addon-docs/blocks';29import { Button } from './Button';30<Meta title="MDX/Button" component={Button} />

Full Screen

Using AI Code Generation

copy

Full Screen

1import { storiesOf } from '@storybook/react';2import { withInfo } from '@storybook/addon-info';3import { withKnobs, text, boolean, number } from '@storybook/addon-knobs/react';4import { storiesOf } from '@storybook/react';5import { withInfo } from '@storybook/addon-info';6import { withKnobs, text, boolean, number } from '@storybook/addon-knobs/react';7import { storiesOf } from '@storybook/react';8import { withInfo } from '@storybook/addon-info';9import { withKnobs, text, boolean, number } from '@storybook/addon-knobs/react';10import { storiesOf } from '@storybook/react';11import { withInfo } from '@storybook/addon-info';12import { withKnobs, text, boolean, number } from '@storybook/addon-knobs/react';13import { storiesOf } from '@storybook/react';14import { withInfo } from '@storybook/addon-info';15import { withKnobs, text, boolean, number } from '@storybook/addon-knobs/react';16import { storiesOf } from '@storybook/react';17import { withInfo } from '@storybook/addon-info';18import { withKnobs, text, boolean, number } from '@storybook/addon-knobs/react';19import { storiesOf } from '@storybook/react';20import { withInfo } from '@storybook/addon-info';21import { withKnobs, text, boolean, number } from '@storybook/addon-knobs/react';22import { storiesOf } from '@storybook/react';23import { withInfo } from '@storybook/addon-info';24import { withKnobs, text, boolean, number } from '@storybook/addon-knobs/react';25import { storiesOf } from '@storybook/react';26import { withInfo } from '@storybook/addon-info';27import { withKnobs, text, boolean, number } from '@storybook/addon-knobs/react';28import { storiesOf } from '@storybook/react';29import { withInfo } from '@storybook/addon-info';30import { withKnobs, text, boolean, number } from '@

Full Screen

Using AI Code Generation

copy

Full Screen

1import { storiesOf } from '@storybook/react';2import { storiesOf } from '@storybook/react';3storiesOf('Welcome', module).add('to Storybook', () => <div>Hello</div>, {4 info: {5 (Basically a story is like a visual test case.)6 [stories](

Full Screen

Using AI Code Generation

copy

Full Screen

1import { withKnobs, text } from "@storybook/addon-knobs";2import React from "react";3import { storiesOf } from "@storybook/react";4import { action } from "@storybook/addon-actions";5import { Welcome } from "@storybook/react/demo";6storiesOf("Welcome", module)7 .addDecorator(withKnobs)8 .add("to Storybook", () => (9 <Welcome showApp={action("showApp")} />10 ));11storiesOf("Welcome", module)12 .addDecorator(withKnobs)13 .add("to Storybook", () => (14 <Welcome showApp={action("showApp")} />15 ));16storiesOf("Welcome", module)17 .addDecorator(withKnobs)18 .add("to Storybook", () => (19 <Welcome showApp={action("showApp")} />20 ));21storiesOf("Welcome", module)22 .addDecorator(withKnobs)23 .add("to Storybook", () => (24 <Welcome showApp={action("showApp")} />25 ));26storiesOf("Welcome", module)27 .addDecorator(withKnobs)28 .add("to Storybook", () => (29 <Welcome showApp={action("showApp")} />30 ));31storiesOf("Welcome", module)32 .addDecorator(withKnobs)33 .add("to Storybook", () => (34 <Welcome showApp={action("showApp")} />35 ));36storiesOf("Welcome", module)37 .addDecorator(withKnobs)38 .add("to Storybook", () => (39 <Welcome showApp={action("showApp")} />40 ));41storiesOf("Welcome", module)42 .addDecorator(withKnobs)43 .add("to Storybook", () => (44 <Welcome showApp={action("showApp")} />45 ));46storiesOf("Welcome", module)47 .addDecorator(withKnobs)48 .add("to Storybook", () => (49 <Welcome showApp={action("showApp")}

Full Screen

Using AI Code Generation

copy

Full Screen

1import React from 'react';2import { storiesOf } from '@storybook/react';3import { withInfo } from '@storybook/addon-info';4import Button from '../src/components/Button';5storiesOf('Button', module)6 .add('with text', withInfo('some description')(() => <Button>Hello Button</Button>))7 .add('with some emoji', withInfo('some description')(() => <Button><span role="img" aria-label="so cool">😀 😎 👍 💯</span></Button>));8import React from 'react';9import addons, { makeDecorator } from '@storybook/addons';10import { STORY_RENDERED } from '@storybook/core-events';11const delayDecorator = makeDecorator({12 wrapper: (getStory, context, { options, parameters }) => {13 const channel = addons.getChannel();14 const delay = parameters || options;15 return new Promise(resolve => {16 channel.once(STORY_RENDERED, () => {17 setTimeout(() => resolve(getStory(context)), delay);18 });19 });20 },21});22export default delayDecorator;23import React from 'react';24import addons, { makeDecorator } from '@storybook/addons';25import { STORY_RENDERED } from '@storybook/core-events';26const delayDecorator = makeDecorator({27 wrapper: (getStory, context, { options, parameters }) => {28 const channel = addons.getChannel();29 const delay = parameters || options;30 return new Promise(resolve => {31 channel.once(STORY_RENDERED, () => {32 setTimeout(() => resolve(getStory

Full Screen

Using AI Code Generation

copy

Full Screen

1import { action } from '@storybook/addon-actions';2import Button from '../components/Button';3storiesOf('Button', module)4 .add('with text', () => (5 <Button onClick={action('clicked')}>Hello Button</Button>6 .add('with some emoji', () => (7 <Button onClick={action('clicked')}>😀 😎 👍 💯</Button>8 ));9import React from 'react';10const Button = ({ onClick, children }) => (11 <button onClick={onClick}>12 {children}13);14export default Button;15import { configure } from '@storybook/react';16configure(require.context('../src', true, /\.stories\.js$/), module);17import '@storybook/addon-actions/register';18module.exports = (baseConfig, env, defaultConfig) => {19 defaultConfig.module.rules.push({20 test: /\.(ts|tsx)$/,21 loader: require.resolve('ts-loader'),22 });23 defaultConfig.resolve.extensions.push('.ts', '.tsx');24 return defaultConfig;25};26{27 "scripts": {28 },29 "dependencies": {

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run storybook-root automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful