widgets.js 36 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927
  1. /*
  2. The MIT License (MIT)
  3. Copyright (c) 2014-2018 Nikolai Suslov and the Krestianstvo.org project contributors. (https://github.com/NikolaySuslov/livecodingspace/blob/master/LICENSE.md)
  4. */
  5. /*
  6. * Cell widgets
  7. */
  8. class Widgets {
  9. constructor() {
  10. console.log("widget constructor")
  11. }
  12. get divider(){
  13. return {
  14. $cell: true,
  15. $type: "hr",
  16. class: "mdc-list-divider"
  17. }
  18. }
  19. get emptyDiv(){
  20. return {
  21. $type: "div",
  22. style: "padding-bottom: 30px;"
  23. }
  24. }
  25. inputTextFieldOutlined(obj){
  26. function initFunc() {
  27. new mdc.textField.MDCTextField.attachTo(this);
  28. }
  29. let inputType = obj.type ? obj.type: 'text';
  30. let init = obj.init ? obj.init: initFunc;
  31. let style = obj.style ? obj.style: "";
  32. return {
  33. $cell: true,
  34. $type: "div",
  35. class: "mdc-text-field mdc-text-field--outlined mdc-text-field--dense",
  36. style: style,
  37. $init: init,
  38. $components:[
  39. {
  40. $type: "input",
  41. type: inputType,
  42. id: obj.id,
  43. class: "mdc-text-field__input",
  44. value: obj.value,
  45. onchange: obj.change
  46. },
  47. {
  48. $type: "div",
  49. class: "mdc-notched-outline",
  50. $components:[
  51. {
  52. $type: "div",
  53. class: "mdc-notched-outline__leading"
  54. },
  55. {
  56. $type: "div",
  57. class: "mdc-notched-outline__notch",
  58. $components:[
  59. {
  60. $type: "label",
  61. class: "mdc-floating-label",
  62. for: obj.id,
  63. $text: obj.label
  64. }
  65. ]
  66. },
  67. {
  68. $type: "div",
  69. class: "mdc-notched-outline__trailing"
  70. }
  71. ]
  72. }
  73. ]
  74. //onclick: obj.onclick
  75. }
  76. }
  77. inputTextFieldStandart(obj){
  78. return {
  79. $cell: true,
  80. $type: "div",
  81. class: "mdc-text-field text-field mdc-ripple-upgraded",
  82. $init: function(){
  83. //new mdc.mdc.notchedOutline.MDCNotchedOutline(document.querySelector('.mdc-notched-outline'));
  84. new mdc.textField.MDCTextField.attachTo(this);
  85. },
  86. $components:[
  87. {
  88. $type: "input",
  89. type: "text",
  90. id: obj.id,
  91. class: "mdc-text-field__input",
  92. value: obj.value,
  93. onchange: obj.change
  94. },
  95. {
  96. $type: "label",
  97. class: "mdc-floating-label",
  98. for: obj.id,
  99. $text: obj.label
  100. },
  101. {
  102. $type: "div",
  103. class: "mdc-line-ripple"
  104. }
  105. ]
  106. //onclick: obj.onclick
  107. }
  108. }
  109. headerH3(headertype, label, cssclass) {
  110. return {
  111. $cell: true,
  112. $type: headertype,
  113. class: cssclass,
  114. $text: label
  115. }
  116. }
  117. simpleCard(obj){
  118. let style = 'background-image: url(' + obj.imgSrc + '); background-size: cover; background-repeat: no-repeat; height:' + obj.imgHeight + ';';
  119. var addonClass = obj.addonClass;
  120. if (!addonClass){
  121. addonClass = ''
  122. }
  123. return {
  124. $cell: true,
  125. $type: "div",
  126. $components:[
  127. {
  128. $cell: true,
  129. $type: "div",
  130. class: "mdc-card" +' '+ addonClass,
  131. onclick: obj.onclickfunc,
  132. $components:[
  133. {
  134. $cell: true,
  135. $type: "section",
  136. class: "mdc-card__media",
  137. style: style
  138. },
  139. {
  140. $cell: true,
  141. $type: "section",
  142. class: "mdc-card__supporting-text",
  143. $text: obj.text
  144. }
  145. ]
  146. }
  147. ]
  148. }
  149. }
  150. listDivider() {
  151. return {
  152. $cell: true,
  153. $type: "hr",
  154. class: "mdc-list-divider mdc-list-divider--inset"
  155. }
  156. }
  157. createListItem(obj) {
  158. return {
  159. $cell: true,
  160. $type: "li",
  161. class: "mdc-list-item",
  162. $components: [
  163. {
  164. $cell: true,
  165. $type: "span",
  166. class: "mdc-list-item__graphic",
  167. $components: [
  168. {
  169. $cell: true,
  170. class: "createItems",
  171. $type: "img",
  172. src: obj.imgSrc,
  173. onclick: obj.onclickfunc
  174. }
  175. ]
  176. },
  177. {
  178. $cell: true,
  179. $type: "span",
  180. class: "mdc-list-item__text",
  181. $text: obj.title
  182. // $components: [
  183. // {
  184. // $text: obj.title
  185. // },
  186. // {
  187. // $cell: true,
  188. // $type: "span",
  189. // class: "mdc-list-item__secondary-text",
  190. // $text: obj.subTitle
  191. // }
  192. // ]
  193. }
  194. ]
  195. }
  196. }
  197. createCard(obj){
  198. return {
  199. $cell: true,
  200. $type: "div",
  201. $components:[
  202. {
  203. $cell: true,
  204. $type: "div",
  205. class: "mdc-card",
  206. $components:[
  207. {
  208. $cell: true,
  209. $type: "div",
  210. class: "mdc-card__horizontal-block",
  211. $components:[
  212. {
  213. $cell: true,
  214. $type: "section",
  215. class: "mdc-card__primary",
  216. $components:[
  217. {
  218. $cell: true,
  219. $type: "h1",
  220. class: "mdc-card__title mdc-card__title--large",
  221. $text: obj.title
  222. },
  223. {
  224. $cell: true,
  225. $type: "h2",
  226. class: "mdc-card__subtitle",
  227. $text: obj.subTitle
  228. }
  229. ]
  230. },
  231. {
  232. $cell: true,
  233. $type: "img",
  234. class: "",
  235. src: obj.imgSrc
  236. }
  237. ]
  238. },
  239. {
  240. $cell: true,
  241. $type: "section",
  242. class: "mdc-card__actions",
  243. $components:[
  244. {
  245. $cell: true,
  246. $type: "button",
  247. class: "mdc-button mdc-button--compact mdc-card__action",
  248. $text: obj.actionLabel
  249. }
  250. ]
  251. }
  252. ]
  253. }
  254. ]
  255. }
  256. }
  257. buttonStroked(obj){
  258. return {
  259. $cell: true,
  260. $type: "button",
  261. class: "mdc-button mdc-button--outlined",
  262. $text: obj.label,
  263. onclick: obj.onclick
  264. }
  265. }
  266. buttonRaised(obj){
  267. return {
  268. $cell: true,
  269. $type: "button",
  270. class: "mdc-button mdc-button--raised mdc-ripple-upgraded",
  271. $text: obj.label,
  272. onclick: obj.onclick
  273. }
  274. }
  275. buttonSimple(obj){
  276. return {
  277. $cell: true,
  278. $type: "button",
  279. class: "mdc-button",
  280. $components: [
  281. {
  282. $type: "span",
  283. class: "mdc-button__label",
  284. $text: obj.label
  285. }
  286. ],
  287. onclick: obj.onclick
  288. }
  289. }
  290. sliderDiscrete(obj) {
  291. return {
  292. $cell: true,
  293. $type: "div",
  294. class: "mdc-slider mdc-slider--discrete",
  295. role: "slider",
  296. 'aria-valuemin': obj.min,
  297. 'aria-valuemax': obj.max,
  298. 'aria-label': obj.label,
  299. $init: obj.init,
  300. $components: [
  301. {
  302. $cell: true,
  303. $type: "div",
  304. class: "mdc-slider__track-container",
  305. $components: [
  306. {
  307. $cell: true,
  308. $type: "div",
  309. class: "mdc-slider__track",
  310. }
  311. ]
  312. },
  313. {
  314. $cell: true,
  315. $type: "div",
  316. class: "mdc-slider__thumb-container",
  317. $components: [
  318. {
  319. $cell: true,
  320. $type: "div",
  321. class: "mdc-slider__pin",
  322. $components: [
  323. {
  324. $cell: true,
  325. $type: "span",
  326. class: "mdc-slider__pin-value-marker",
  327. }
  328. ]
  329. },
  330. {
  331. $cell: true,
  332. $type: "svg",
  333. class: "mdc-slider__thumb",
  334. width: 21,
  335. height: 21,
  336. $components: [
  337. {
  338. $cell: true,
  339. $type: "circle",
  340. cx: 10.5,
  341. cy: 10.5,
  342. r: 7.875
  343. }
  344. ]
  345. },
  346. {
  347. $cell: true,
  348. $type: "div",
  349. class: "mdc-slider__focus-ring"
  350. }
  351. ]
  352. }
  353. ]
  354. }
  355. }
  356. sliderContinuous(obj) {
  357. return {
  358. $cell: true,
  359. $type: "div",
  360. class: "mdc-slider",
  361. role: "slider",
  362. tabindex: 0,
  363. 'id': obj.id,
  364. 'aria-valuemin': obj.min,
  365. 'aria-valuemax': obj.max,
  366. 'aria-label': obj.label,
  367. 'aria-valuenow': obj.value,
  368. 'data-step': obj.step,
  369. $init: obj.init,
  370. $components: [
  371. {
  372. $cell: true,
  373. $type: "div",
  374. class: "mdc-slider__track-container",
  375. $components: [
  376. {
  377. $cell: true,
  378. $type: "div",
  379. class: "mdc-slider__track",
  380. }
  381. ]
  382. },
  383. {
  384. $cell: true,
  385. $type: "div",
  386. class: "mdc-slider__thumb-container",
  387. $components: [
  388. {
  389. $cell: true,
  390. $type: "svg",
  391. class: "mdc-slider__thumb",
  392. width: 21,
  393. height: 21,
  394. $components: [
  395. {
  396. $cell: true,
  397. $type: "circle",
  398. cx: 10.5,
  399. cy: 10.5,
  400. r: 7.875
  401. }
  402. ]
  403. },
  404. {
  405. $cell: true,
  406. $type: "div",
  407. class: "mdc-slider__focus-ring"
  408. }
  409. ]
  410. }
  411. ]
  412. }
  413. }
  414. textField(obj) {
  415. return {
  416. class: "mdc-text-field",
  417. style: "width: 100%",
  418. $cell: true,
  419. $type: "div",
  420. $components: [
  421. {
  422. class: "mdc-text-field__input prop-text-field-input",
  423. id: obj.id,
  424. $cell: true,
  425. $type: "input",
  426. type: "text",
  427. value: obj.value,
  428. onchange: obj.funconchange
  429. }
  430. ]
  431. }
  432. }
  433. icontoggle(obj) {
  434. var addClass = "";
  435. if (obj.styleClass){
  436. addClass = obj.styleClass;
  437. }
  438. return {
  439. $type: "button",
  440. class: addClass + " mdc-icon-button",
  441. //$text: obj.label,
  442. id: obj.id,
  443. //'data-toggle-on': obj.on,
  444. // 'data-toggle-off': obj.off,
  445. 'aria-pressed': obj.state,
  446. 'aria-hidden': true,
  447. $init: obj.init,
  448. $components:[
  449. {
  450. $type: "i",
  451. class: "material-icons mdc-icon-button__icon mdc-icon-button__icon--on",
  452. $text: JSON.parse(obj.on).content
  453. },
  454. {
  455. $type: "i",
  456. class: "material-icons mdc-icon-button__icon",
  457. $text: JSON.parse(obj.off).content
  458. },
  459. ]
  460. }
  461. }
  462. floatActionButton(obj) {
  463. var addClass = "";
  464. if (obj.styleClass){
  465. addClass = obj.styleClass;
  466. }
  467. return {
  468. $cell: true,
  469. $type: "button",
  470. class: "mdc-fab material-icons " + addClass,
  471. onclick: obj.onclickfunc,
  472. $components:[
  473. {
  474. $cell: true,
  475. $type: "span",
  476. class: "mdc-fab__icon",
  477. $text: obj.label
  478. }
  479. ]
  480. }
  481. }
  482. iconButton(obj) {
  483. var addClass = "";
  484. if (obj.styleClass){
  485. addClass = obj.styleClass;
  486. }
  487. return {
  488. $cell: true,
  489. $type: "button",
  490. class: "mdc-button " + addClass,
  491. onclick: obj.onclick,
  492. $components:[
  493. {
  494. $cell: true,
  495. $type: "i",
  496. class: "material-icons mdc-button__icon",
  497. $text: obj.label
  498. }
  499. ]
  500. }
  501. }
  502. imageButton(obj){
  503. return {
  504. $cell: true,
  505. $type: "button",
  506. class: "mdc-button mdc-button--compact",
  507. onclick: obj.onclickfunc,
  508. $components:[
  509. {
  510. $cell: true,
  511. class: obj.styleClass,
  512. $type: "img",
  513. src: obj.imgSrc
  514. }
  515. ]
  516. }
  517. }
  518. gridListItem(obj) {
  519. return {
  520. $cell: true,
  521. $type: "li",
  522. class: "mdc-grid-tile " + obj.styleClass,
  523. $components:[
  524. {
  525. $cell: true,
  526. class: "mdc-grid-tile__primary",
  527. $type: "div",
  528. style: "background-color: transparent;",
  529. $components:[
  530. {
  531. $cell: true,
  532. class: "mdc-grid-tile__primary-content tooltip",
  533. $type: "div",
  534. 'aria-label': obj.title,
  535. alt: obj.title,
  536. style: "background-image: url("+ obj.imgSrc + ");",
  537. onclick: obj.onclickfunc,
  538. $components:[
  539. {
  540. $cell: true,
  541. class: "tooltiptext",
  542. $type: "span",
  543. $text: obj.title
  544. }
  545. ]
  546. }
  547. ]
  548. }
  549. ]
  550. }
  551. }
  552. switch(obj) {
  553. return {
  554. $cell: true,
  555. $type: "div",
  556. class: "mdc-switch",
  557. _switch: null,
  558. id: obj.id,
  559. $init: obj.init,
  560. //function(){
  561. // new mdc.switchControl.MDCSwitch(this);
  562. // },
  563. $components: [
  564. {
  565. $type: "div",
  566. class: "mdc-switch__track",
  567. },
  568. {
  569. $type: "div",
  570. class: "mdc-switch__thumb-underlay",
  571. $components:[
  572. {
  573. $type: "div",
  574. class: "mdc-switch__thumb",
  575. $components:[
  576. {
  577. $type: "input",
  578. type: "checkbox",
  579. class: "mdc-switch__native-control",
  580. id: 'input-' + obj.id,
  581. //$init: obj.init,
  582. //id: "basic-switch",
  583. onchange: obj.onchange,
  584. role: "switch"
  585. }
  586. ]
  587. }
  588. ]
  589. }
  590. // {
  591. // $type: "div",
  592. // class: "mdc-switch__background",
  593. // $components: [
  594. // {
  595. // $type: "div",
  596. // class: "mdc-switch__knob"
  597. // }
  598. // ]
  599. // }
  600. ]
  601. }
  602. }
  603. reflectorGUI() {
  604. let luminaryGlobalHB = {
  605. $cell: true,
  606. _luminarySwitch: null,
  607. $components: [
  608. {
  609. $type: "p",
  610. class: "mdc-typography--headline5",
  611. $text: "Use Global Heartbeat"
  612. },
  613. {
  614. $type: 'p'
  615. },
  616. _app.widgets.switch({
  617. 'id': 'forceLuminary',
  618. 'init': function () {
  619. this._switch = new mdc.switchControl.MDCSwitch(this);
  620. let config = localStorage.getItem('lcs_config');
  621. this._switch.checked = JSON.parse(config).luminaryGlobalHB;
  622. // this._replaceSwitch = this._switch;
  623. },
  624. 'onchange': function (e) {
  625. if (this._switch) {
  626. let chkAttr = this._switch.checked;//this.getAttribute('checked');
  627. if (chkAttr) {
  628. let config = JSON.parse(localStorage.getItem('lcs_config'));
  629. config.luminaryGlobalHB = true;
  630. localStorage.setItem('lcs_config', JSON.stringify(config));
  631. //this._switch.checked = false;
  632. } else {
  633. let config = JSON.parse(localStorage.getItem('lcs_config'));
  634. config.luminaryGlobalHB = false;
  635. localStorage.setItem('lcs_config', JSON.stringify(config));
  636. }
  637. }
  638. }
  639. }
  640. ),
  641. {
  642. $type: 'label',
  643. for: 'input-forceLuminary',
  644. $text: 'On / Off'
  645. }
  646. ]
  647. }
  648. let reflectorGUI =
  649. {
  650. $type: "div",
  651. id: "reflectorGUI",
  652. //style:"background-color: #efefef",
  653. class: "mdc-layout-grid mdc-layout-grid--align-left",
  654. _reflectorHost: null,
  655. _dbHost: null,
  656. _refHostField: null,
  657. _dbHostField: null,
  658. _lpath: null,
  659. _lpathField: null,
  660. _hbpath: null,
  661. _hbpathField: null,
  662. _initData: function () {
  663. this._reflectorHost = '';
  664. this._dbHost = '';
  665. let config = JSON.parse(localStorage.getItem('lcs_config'));
  666. if (config.reflector) {
  667. this._reflectorHost = config.reflector
  668. }
  669. if (config.dbhost) {
  670. this._dbHost =config.dbhost
  671. }
  672. if (config.luminaryPath) {
  673. this._lpath = config.luminaryPath
  674. }
  675. if (config.luminaryGlobalHBPath) {
  676. this._hbpath = config.luminaryGlobalHBPath
  677. }
  678. },
  679. $init: function () {
  680. this._initData();
  681. },
  682. $update: function () {
  683. this.$components = [
  684. {
  685. $type: "div",
  686. class: "mdc-layout-grid__inner",
  687. $components: [
  688. {
  689. $type: "div",
  690. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  691. $components: [
  692. {
  693. $type: "h4",
  694. class: "mdc-typography--headline4",
  695. $text: "Gun DB settings"
  696. }
  697. ]
  698. },
  699. {
  700. $type: "div",
  701. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  702. $components: [
  703. {
  704. $type: "span",
  705. class: "mdc-typography--headline5",
  706. $text: "DB Host: "
  707. },
  708. window._app.widgets.inputTextFieldOutlined({
  709. "id": 'dbhostInput',
  710. "label": "DB Host",
  711. "value": this._dbHost,
  712. "type": "text",
  713. "init": function() {
  714. this._dbHostField = new mdc.textField.MDCTextField(this);
  715. },
  716. "style": 'width: 400px;'
  717. }),
  718. ]
  719. },
  720. {
  721. $type: "div",
  722. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  723. $components: [
  724. {
  725. $type: "h4",
  726. class: "mdc-typography--headline4",
  727. $text: "Reflector settings"
  728. }
  729. ]
  730. },
  731. {
  732. $type: "div",
  733. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  734. $components: [
  735. {
  736. $type: "span",
  737. class: "mdc-typography--headline5",
  738. $text: "Reflector: "
  739. },
  740. window._app.widgets.inputTextFieldOutlined({
  741. "id": 'reflectorInput',
  742. "label": "Reflector",
  743. "value": this._reflectorHost,
  744. "type": "text",
  745. "init": function() {
  746. this._refHostField = new mdc.textField.MDCTextField(this);
  747. },
  748. "style": 'width: 400px;'
  749. }),
  750. ]
  751. },
  752. {
  753. $type: "div",
  754. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  755. $components: [
  756. {
  757. $type: "h4",
  758. class: "mdc-typography--headline4",
  759. $text: "Krestianstvo Luminary settings (experimental)"
  760. }
  761. ]
  762. },
  763. {
  764. $type: "div",
  765. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  766. $components: [
  767. {
  768. $type: "span",
  769. class: "mdc-typography--headline5",
  770. $text: "Luminary Path: "
  771. },
  772. window._app.widgets.inputTextFieldOutlined({
  773. "id": 'lpathInput',
  774. "label": "Luminary Path",
  775. "value": this._lpath,
  776. "type": "text",
  777. "init": function() {
  778. this._lpathField = new mdc.textField.MDCTextField(this);
  779. },
  780. "style": 'width: 400px;'
  781. }),
  782. ]
  783. },
  784. {
  785. $type: "div",
  786. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  787. $components: [
  788. {
  789. $type: "span",
  790. class: "mdc-typography--headline5",
  791. $text: "Global Heartbeat Path: "
  792. },
  793. window._app.widgets.inputTextFieldOutlined({
  794. "id": 'hbpathInput',
  795. "label": "Global Heartbeat Path",
  796. "value": this._hbpath,
  797. "type": "text",
  798. "init": function() {
  799. this._hbpathField = new mdc.textField.MDCTextField(this);
  800. },
  801. "style": 'width: 400px;'
  802. }),
  803. ]
  804. },
  805. {
  806. $type: "div",
  807. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  808. $components: [luminaryGlobalHB ]
  809. },
  810. {
  811. $type: "div",
  812. class: "mdc-layout-grid__cell mdc-layout-grid__cell--span-12",
  813. $components: [
  814. window._app.widgets.buttonRaised(
  815. {
  816. "label": 'Update',
  817. "onclick": function (e) {
  818. e.preventDefault();
  819. let config = JSON.parse(localStorage.getItem('lcs_config'));
  820. config.reflector = this._refHostField.value;
  821. config.dbhost = this._dbHostField.value;
  822. config.luminaryPath = this._lpathField.value;
  823. config.luminaryGlobalHBPath = this._hbpathField.value;
  824. localStorage.setItem('lcs_config', JSON.stringify(config));
  825. window.location.reload(true);
  826. }
  827. }),
  828. {
  829. $type: 'span',
  830. $text: " "
  831. },
  832. {
  833. $type: "button",
  834. class: "mdc-button mdc-button--raised",
  835. $text: "Close",
  836. onclick: function (e) {
  837. window.location.pathname = '/'
  838. }
  839. }
  840. ]
  841. }
  842. ]
  843. }
  844. ]
  845. }
  846. }
  847. document.querySelector("#appGUI").$cell({
  848. id: "appGUI",
  849. $cell: true,
  850. $type: "div",
  851. $components: [reflectorGUI]
  852. }
  853. );
  854. }
  855. }
  856. export { Widgets }