You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

541 lines
17 KiB

3 years ago
  1. /******/ (function(modules) { // webpackBootstrap
  2. /******/ // The module cache
  3. /******/ var installedModules = {};
  4. /******/
  5. /******/ // The require function
  6. /******/ function __webpack_require__(moduleId) {
  7. /******/
  8. /******/ // Check if module is in cache
  9. /******/ if(installedModules[moduleId]) {
  10. /******/ return installedModules[moduleId].exports;
  11. /******/ }
  12. /******/ // Create a new module (and put it into the cache)
  13. /******/ var module = installedModules[moduleId] = {
  14. /******/ i: moduleId,
  15. /******/ l: false,
  16. /******/ exports: {}
  17. /******/ };
  18. /******/
  19. /******/ // Execute the module function
  20. /******/ modules[moduleId].call(module.exports, module, module.exports, __webpack_require__);
  21. /******/
  22. /******/ // Flag the module as loaded
  23. /******/ module.l = true;
  24. /******/
  25. /******/ // Return the exports of the module
  26. /******/ return module.exports;
  27. /******/ }
  28. /******/
  29. /******/
  30. /******/ // expose the modules object (__webpack_modules__)
  31. /******/ __webpack_require__.m = modules;
  32. /******/
  33. /******/ // expose the module cache
  34. /******/ __webpack_require__.c = installedModules;
  35. /******/
  36. /******/ // define getter function for harmony exports
  37. /******/ __webpack_require__.d = function(exports, name, getter) {
  38. /******/ if(!__webpack_require__.o(exports, name)) {
  39. /******/ Object.defineProperty(exports, name, { enumerable: true, get: getter });
  40. /******/ }
  41. /******/ };
  42. /******/
  43. /******/ // define __esModule on exports
  44. /******/ __webpack_require__.r = function(exports) {
  45. /******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
  46. /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
  47. /******/ }
  48. /******/ Object.defineProperty(exports, '__esModule', { value: true });
  49. /******/ };
  50. /******/
  51. /******/ // create a fake namespace object
  52. /******/ // mode & 1: value is a module id, require it
  53. /******/ // mode & 2: merge all properties of value into the ns
  54. /******/ // mode & 4: return value when already ns object
  55. /******/ // mode & 8|1: behave like require
  56. /******/ __webpack_require__.t = function(value, mode) {
  57. /******/ if(mode & 1) value = __webpack_require__(value);
  58. /******/ if(mode & 8) return value;
  59. /******/ if((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;
  60. /******/ var ns = Object.create(null);
  61. /******/ __webpack_require__.r(ns);
  62. /******/ Object.defineProperty(ns, 'default', { enumerable: true, value: value });
  63. /******/ if(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));
  64. /******/ return ns;
  65. /******/ };
  66. /******/
  67. /******/ // getDefaultExport function for compatibility with non-harmony modules
  68. /******/ __webpack_require__.n = function(module) {
  69. /******/ var getter = module && module.__esModule ?
  70. /******/ function getDefault() { return module['default']; } :
  71. /******/ function getModuleExports() { return module; };
  72. /******/ __webpack_require__.d(getter, 'a', getter);
  73. /******/ return getter;
  74. /******/ };
  75. /******/
  76. /******/ // Object.prototype.hasOwnProperty.call
  77. /******/ __webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };
  78. /******/
  79. /******/ // __webpack_public_path__
  80. /******/ __webpack_require__.p = "/";
  81. /******/
  82. /******/
  83. /******/ // Load entry module and return exports
  84. /******/ return __webpack_require__(__webpack_require__.s = 1);
  85. /******/ })
  86. /************************************************************************/
  87. /******/ ({
  88. /***/ "./resources/js/components/accordion.riot":
  89. /*!************************************************!*\
  90. !*** ./resources/js/components/accordion.riot ***!
  91. \************************************************/
  92. /*! exports provided: default */
  93. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  94. "use strict";
  95. __webpack_require__.r(__webpack_exports__);
  96. /* harmony default export */ __webpack_exports__["default"] = ({
  97. 'css': null,
  98. 'exports': {
  99. state: {
  100. items: [],
  101. index: 0
  102. },
  103. /**
  104. * getting innerHTML and remove it
  105. *
  106. */
  107. onBeforeMount()
  108. {
  109. this.content = this.root.innerHTML
  110. this.root.innerHTML = ''
  111. },
  112. /**
  113. * create wrapper for
  114. *
  115. * @param {object} props
  116. * @param {object} state
  117. *
  118. */
  119. onMounted(props, state) {
  120. const header = this.$('.tabs')
  121. state.wrapper = document.createElement('div')
  122. state.wrapper.innerHTML = this.content
  123. header.after(state.wrapper)
  124. // run through all items and add a css-class and current class to first element
  125. for (let i = 0; i < state.wrapper.children.length; i++) {
  126. state.items.push(state.wrapper.children[i].title)
  127. state.wrapper.children[i].classList.add('accordion__item')
  128. if (i === 0) {
  129. state.wrapper.children[i].classList.add('accordion__item--active')
  130. }
  131. }
  132. this.update()
  133. },
  134. /**
  135. * remove all active classes and add active-classes to clicked
  136. *
  137. * @param {object} event
  138. * @param {object} index
  139. *
  140. */
  141. handleClick(event, index) {
  142. for (let i = 0; i < this.state.wrapper.children.length; i++) {
  143. this.state.wrapper.children[i].classList.remove('accordion__item--active')
  144. if (i === index) {
  145. this.state.wrapper.children[i].classList.add('accordion__item--active')
  146. this.state.index = i
  147. }
  148. }
  149. this.update()
  150. },
  151. /**
  152. * getting class for active accordion in header
  153. *
  154. */
  155. getCurrentClass(index)
  156. {
  157. let classes = []
  158. if (index === this.state.index) {
  159. classes.push('is-active')
  160. }
  161. return classes.join(' ')
  162. }
  163. },
  164. 'template': function(
  165. template,
  166. expressionTypes,
  167. bindingTypes,
  168. getComponent
  169. ) {
  170. return template(
  171. '<div class="accordion"><div class="tabs mb-3"><ul><li expr6="expr6"></li></ul></div></div>',
  172. [
  173. {
  174. 'type': bindingTypes.EACH,
  175. 'getKey': null,
  176. 'condition': null,
  177. 'template': template(
  178. '<a expr7="expr7"> </a>',
  179. [
  180. {
  181. 'expressions': [
  182. {
  183. 'type': expressionTypes.ATTRIBUTE,
  184. 'name': 'class',
  185. 'evaluate': function(
  186. scope
  187. ) {
  188. return scope.getCurrentClass(scope.index);
  189. }
  190. },
  191. {
  192. 'type': expressionTypes.EVENT,
  193. 'name': 'onclick',
  194. 'evaluate': function(
  195. scope
  196. ) {
  197. return () => scope.handleClick(scope.event, scope.index);
  198. }
  199. }
  200. ]
  201. },
  202. {
  203. 'redundantAttribute': 'expr7',
  204. 'selector': '[expr7]',
  205. 'expressions': [
  206. {
  207. 'type': expressionTypes.TEXT,
  208. 'childNodeIndex': 0,
  209. 'evaluate': function(
  210. scope
  211. ) {
  212. return scope.item;
  213. }
  214. }
  215. ]
  216. }
  217. ]
  218. ),
  219. 'redundantAttribute': 'expr6',
  220. 'selector': '[expr6]',
  221. 'itemName': 'item',
  222. 'indexName': 'index',
  223. 'evaluate': function(
  224. scope
  225. ) {
  226. return scope.state.items;
  227. }
  228. }
  229. ]
  230. );
  231. },
  232. 'name': 'urban-accordion'
  233. });
  234. /***/ }),
  235. /***/ "./resources/js/components/buckets.riot":
  236. /*!**********************************************!*\
  237. !*** ./resources/js/components/buckets.riot ***!
  238. \**********************************************/
  239. /*! exports provided: default */
  240. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  241. "use strict";
  242. __webpack_require__.r(__webpack_exports__);
  243. /* harmony default export */ __webpack_exports__["default"] = ({
  244. 'css': null,
  245. 'exports': {
  246. handleClick() {
  247. }
  248. },
  249. 'template': function(
  250. template,
  251. expressionTypes,
  252. bindingTypes,
  253. getComponent
  254. ) {
  255. return template(
  256. '<div class="buckets"><div class="tile is-ancestor"><div expr0="expr0" class="tile is-3 is-parent"></div></div><div class="buckets__more"><button expr5="expr5" type="button" class="button">\n More\n <span class="icon is-small is-left"><svg aria-hidden="true"><use xlink:href="/symbol-defs.svg#icon-add-circle"/></svg></span></button></div></div>',
  257. [
  258. {
  259. 'type': bindingTypes.EACH,
  260. 'getKey': null,
  261. 'condition': null,
  262. 'template': template(
  263. '<div class="tile is-child"><a expr1="expr1" class="buckets__item"><div class="content"><p expr2="expr2" class="title is-4"> </p><div expr3="expr3" class="tags are-medium"></div></div></a></div>',
  264. [
  265. {
  266. 'redundantAttribute': 'expr1',
  267. 'selector': '[expr1]',
  268. 'expressions': [
  269. {
  270. 'type': expressionTypes.ATTRIBUTE,
  271. 'name': 'href',
  272. 'evaluate': function(
  273. scope
  274. ) {
  275. return [
  276. '/bucket/',
  277. scope.bucket.id
  278. ].join(
  279. ''
  280. );
  281. }
  282. }
  283. ]
  284. },
  285. {
  286. 'redundantAttribute': 'expr2',
  287. 'selector': '[expr2]',
  288. 'expressions': [
  289. {
  290. 'type': expressionTypes.TEXT,
  291. 'childNodeIndex': 0,
  292. 'evaluate': function(
  293. scope
  294. ) {
  295. return [
  296. scope.bucket.name
  297. ].join(
  298. ''
  299. );
  300. }
  301. }
  302. ]
  303. },
  304. {
  305. 'type': bindingTypes.IF,
  306. 'evaluate': function(
  307. scope
  308. ) {
  309. return scope.bucket.tags && scope.bucket.tags.length > 0;
  310. },
  311. 'redundantAttribute': 'expr3',
  312. 'selector': '[expr3]',
  313. 'template': template(
  314. '<span expr4="expr4" class="tag is-white"></span>',
  315. [
  316. {
  317. 'type': bindingTypes.EACH,
  318. 'getKey': null,
  319. 'condition': null,
  320. 'template': template(
  321. ' ',
  322. [
  323. {
  324. 'expressions': [
  325. {
  326. 'type': expressionTypes.TEXT,
  327. 'childNodeIndex': 0,
  328. 'evaluate': function(
  329. scope
  330. ) {
  331. return scope.tag;
  332. }
  333. }
  334. ]
  335. }
  336. ]
  337. ),
  338. 'redundantAttribute': 'expr4',
  339. 'selector': '[expr4]',
  340. 'itemName': 'tag',
  341. 'indexName': null,
  342. 'evaluate': function(
  343. scope
  344. ) {
  345. return scope.bucket.tags;
  346. }
  347. }
  348. ]
  349. )
  350. }
  351. ]
  352. ),
  353. 'redundantAttribute': 'expr0',
  354. 'selector': '[expr0]',
  355. 'itemName': 'bucket',
  356. 'indexName': null,
  357. 'evaluate': function(
  358. scope
  359. ) {
  360. return scope.props.buckets;
  361. }
  362. },
  363. {
  364. 'redundantAttribute': 'expr5',
  365. 'selector': '[expr5]',
  366. 'expressions': [
  367. {
  368. 'type': expressionTypes.EVENT,
  369. 'name': 'onclick',
  370. 'evaluate': function(
  371. scope
  372. ) {
  373. return scope.handleClick;
  374. }
  375. }
  376. ]
  377. }
  378. ]
  379. );
  380. },
  381. 'name': 'buckets'
  382. });
  383. /***/ }),
  384. /***/ "./resources/js/components/login-email.riot":
  385. /*!**************************************************!*\
  386. !*** ./resources/js/components/login-email.riot ***!
  387. \**************************************************/
  388. /*! exports provided: default */
  389. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  390. "use strict";
  391. __webpack_require__.r(__webpack_exports__);
  392. /* harmony default export */ __webpack_exports__["default"] = ({
  393. 'css': null,
  394. 'exports': {},
  395. 'template': function(
  396. template,
  397. expressionTypes,
  398. bindingTypes,
  399. getComponent
  400. ) {
  401. return template(
  402. '<div class="login"><form><div class="field is-horizontal"><div class="field-body"><div class="field"><div class="control has-icons-left"><input class="input" type="text" placeholder="E-Mail"/><span class="icon is-small is-left"><svg aria-hidden="true"><use xlink:href="/symbol-defs.svg#icon-email"/></svg></span></div></div><div class="field"><div class="control"><button class="button is-primary" type="submit">\n Send me a Link\n </button></div></div></div></div></form></div>',
  403. []
  404. );
  405. },
  406. 'name': 'urban-login-email'
  407. });
  408. /***/ }),
  409. /***/ "./resources/js/components/login-password.riot":
  410. /*!*****************************************************!*\
  411. !*** ./resources/js/components/login-password.riot ***!
  412. \*****************************************************/
  413. /*! exports provided: default */
  414. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  415. "use strict";
  416. __webpack_require__.r(__webpack_exports__);
  417. /* harmony default export */ __webpack_exports__["default"] = ({
  418. 'css': null,
  419. 'exports': {},
  420. 'template': function(
  421. template,
  422. expressionTypes,
  423. bindingTypes,
  424. getComponent
  425. ) {
  426. return template(
  427. '<div class="login"><form><div class="field is-horizontal"><div class="field-body"><div class="field"><div class="control has-icons-left"><input class="input" type="text" placeholder="E-Mail"/><span class="icon is-small is-left"><svg aria-hidden="true"><use xlink:href="symbol-defs.svg#icon-email"/></svg></span></div></div><div class="field"><div class="control has-icons-left"><input class="input" type="text" placeholder="Password"/><span class="icon is-small is-left"><svg aria-hidden="true"><use xlink:href="symbol-defs.svg#icon-secret"/></svg></span></div></div><div class="field"><div class="control"><button class="button is-primary" type="submit">\n Login\n </button></div></div></div></div></form></div>',
  428. []
  429. );
  430. },
  431. 'name': 'urban-login-password'
  432. });
  433. /***/ }),
  434. /***/ "./resources/js/views/home.js":
  435. /*!************************************!*\
  436. !*** ./resources/js/views/home.js ***!
  437. \************************************/
  438. /*! no exports provided */
  439. /***/ (function(module, __webpack_exports__, __webpack_require__) {
  440. "use strict";
  441. __webpack_require__.r(__webpack_exports__);
  442. /* harmony import */ var _components_buckets_riot__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./../components/buckets.riot */ "./resources/js/components/buckets.riot");
  443. /* harmony import */ var _components_login_email_riot__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./../components/login-email.riot */ "./resources/js/components/login-email.riot");
  444. /* harmony import */ var _components_login_password_riot__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./../components/login-password.riot */ "./resources/js/components/login-password.riot");
  445. /* harmony import */ var _components_accordion_riot__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./../components/accordion.riot */ "./resources/js/components/accordion.riot");
  446. /**
  447. * Home
  448. *
  449. *
  450. */
  451. // register components
  452. riot.register('buckets', _components_buckets_riot__WEBPACK_IMPORTED_MODULE_0__["default"]);
  453. riot.register('urban-login-email', _components_login_email_riot__WEBPACK_IMPORTED_MODULE_1__["default"]);
  454. riot.register('urban-login-password', _components_login_password_riot__WEBPACK_IMPORTED_MODULE_2__["default"]);
  455. riot.register('urban-accordion', _components_accordion_riot__WEBPACK_IMPORTED_MODULE_3__["default"]); // mount
  456. riot.mount('urban-accordion');
  457. riot.mount('urban-login-email');
  458. riot.mount('urban-login-password');
  459. riot.mount('urban-form-validator');
  460. /***/ }),
  461. /***/ 1:
  462. /*!******************************************!*\
  463. !*** multi ./resources/js/views/home.js ***!
  464. \******************************************/
  465. /*! no static exports found */
  466. /***/ (function(module, exports, __webpack_require__) {
  467. module.exports = __webpack_require__(/*! /home/herrhase/Workspace/herrhase/urban-filehub/resources/js/views/home.js */"./resources/js/views/home.js");
  468. /***/ })
  469. /******/ });