lesli 5.0.4 → 5.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/images/lesli/brand/app-logo2.svg +52 -0
  3. data/app/assets/javascripts/lesli/users/passwords.js +3 -3
  4. data/app/assets/javascripts/lesli/users/registrations.js +3 -3
  5. data/app/assets/javascripts/lesli/users/sessions.js +3 -3
  6. data/app/controllers/lesli/application_controller.rb +3 -3
  7. data/app/controllers/lesli/application_lesli_controller.rb +2 -2
  8. data/app/controllers/lesli/interfaces/application/authorization.rb +1 -1
  9. data/app/controllers/lesli/interfaces/application/requester.rb +1 -1
  10. data/app/controllers/lesli/shared/dashboards_controller.rb +308 -0
  11. data/app/controllers/users/confirmations_controller.rb +1 -1
  12. data/app/controllers/users/passwords_controller.rb +7 -10
  13. data/app/helpers/lesli/general_helper.rb +1 -1
  14. data/app/helpers/lesli/navigation_helper.rb +17 -16
  15. data/app/lib/lesli/system.rb +2 -1
  16. data/app/mailers/lesli/devise_mailer.rb +1 -1
  17. data/app/models/concerns/account_initializer.rb +9 -0
  18. data/app/models/lesli/account.rb +1 -0
  19. data/app/models/lesli/application_lesli_record.rb +1 -1
  20. data/app/models/lesli/shared/dashboard.rb +162 -0
  21. data/app/models/lesli/system_controller.rb +1 -0
  22. data/app/operators/lesli/controller_operator.rb +148 -0
  23. data/app/views/devise/passwords/new.html.erb +1 -1
  24. data/app/views/lesli/partials/_application-lesli-engines.html.erb +1 -1
  25. data/app/views/lesli/partials/_application-lesli-icons.html.erb +1 -1
  26. data/config/locales/translations.en.yml +17 -0
  27. data/config/locales/translations.es.yml +17 -0
  28. data/config/routes.rb +4 -2
  29. data/db/seed/development/users.rb +0 -1
  30. data/db/seeds.rb +16 -29
  31. data/lib/lesli/version.rb +1 -1
  32. data/lib/mailer_previews/devise_mailer_preview.rb +7 -0
  33. data/lib/sass/lesli/layouts/application-navbar.scss +1 -1
  34. data/lib/tasks/lesli/controllers.rake +1 -91
  35. data/lib/tasks/lesli/db.rake +36 -6
  36. data/lib/tasks/lesli/dev.rake +66 -0
  37. data/lib/tasks/lesli/engine.rake +59 -0
  38. data/lib/tasks/lesli/{role.rake → privileges.rake} +3 -3
  39. data/lib/tasks/lesli_tasks.rake +5 -0
  40. data/lib/vue/application.js +2 -1
  41. data/lib/vue/devise/passwords.js +8 -8
  42. data/lib/vue/devise/registrations.js +2 -2
  43. data/lib/vue/devise/sessions.js +11 -6
  44. data/lib/vue/layouts/application-header.vue +6 -1
  45. data/lib/vue/shared/dashboards/apps/edit.vue +215 -0
  46. data/lib/vue/{apps → shared}/dashboards/apps/index.vue +3 -5
  47. data/lib/vue/{apps → shared}/dashboards/apps/show.vue +26 -16
  48. data/lib/vue/{apps → shared}/dashboards/components/form.vue +31 -43
  49. data/lib/vue/shared/stores/dashboard.js +251 -0
  50. data/lib/vue/stores/translations.json +24 -72
  51. data/lib/vue/stores/{user.js → users.js} +1 -1
  52. data/lib/webpack/base.js +3 -2
  53. data/readme.md +1 -1
  54. metadata +46 -52
  55. data/lib/vue/apps/dashboards/apps/edit.vue +0 -105
  56. data/lib/vue/apps/dashboards/components/preview.vue +0 -172
  57. /data/app/assets/icons/lesli/{cloud-vault.svg → cloud-guard.svg} +0 -0
  58. /data/lib/vue/{apps → shared}/cloudobjects/action.vue +0 -0
  59. /data/lib/vue/{apps → shared}/cloudobjects/discussion/content.vue +0 -0
  60. /data/lib/vue/{apps → shared}/cloudobjects/discussion/element.vue +0 -0
  61. /data/lib/vue/{apps → shared}/cloudobjects/discussion/filters.vue +0 -0
  62. /data/lib/vue/{apps → shared}/cloudobjects/discussion/new.vue +0 -0
  63. /data/lib/vue/{apps → shared}/cloudobjects/discussion.vue +0 -0
  64. /data/lib/vue/{apps → shared}/cloudobjects/file/grid.vue +0 -0
  65. /data/lib/vue/{apps → shared}/cloudobjects/file/list.vue +0 -0
  66. /data/lib/vue/{apps → shared}/cloudobjects/file.vue +0 -0
  67. /data/lib/vue/{apps → shared}/dashboards/apps/new.vue +0 -0
  68. /data/lib/vue/{apps → shared}/workflows2/apps/actions/form.vue +0 -0
  69. /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/chatroom-form.vue +0 -0
  70. /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/cloud-object-clone-form.vue +0 -0
  71. /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/cloud-object-file-form.vue +0 -0
  72. /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/email-form.vue +0 -0
  73. /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/notification-form.vue +0 -0
  74. /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/send-cloud-object-file.vue +0 -0
  75. /data/lib/vue/{apps → shared}/workflows2/apps/actions/forms/task-form.vue +0 -0
  76. /data/lib/vue/{apps → shared}/workflows2/apps/actions/index.vue +0 -0
  77. /data/lib/vue/{apps → shared}/workflows2/apps/checks/form.vue +0 -0
  78. /data/lib/vue/{apps → shared}/workflows2/apps/checks/index.vue +0 -0
  79. /data/lib/vue/{apps → shared}/workflows2/apps/index.vue +0 -0
  80. /data/lib/vue/{apps → shared}/workflows2/apps/new.vue +0 -0
  81. /data/lib/vue/{apps → shared}/workflows2/apps/show.vue +0 -0
  82. /data/lib/vue/{apps → shared}/workflows2/components/associations.vue +0 -0
  83. /data/lib/vue/{apps → shared}/workflows2/components/chart.vue +0 -0
  84. /data/lib/vue/{apps → shared}/workflows2/components/workflow-form.vue +0 -0
  85. /data/lib/vue/{apps → shared}/workflows2/components/workflow-status-dropdown.vue +0 -0
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ba9be6e311c5f85759e4fdad59138a230448fb448984464e5f11f9d814828ed2
4
- data.tar.gz: 06b229e650d8da986061a8646b56ca039798118d8e7c4a8e68cdd23900de94fe
3
+ metadata.gz: 03f8d7f6bb6971e772f861187490418162e156776ad75268cde6154e0e54007d
4
+ data.tar.gz: 57de629c60a3791a98fceb96d4a9001dd85a41795aefd9001bfe56782f99f9e5
5
5
  SHA512:
6
- metadata.gz: 36dc264e6fb5761e3be3c4c0c752ccc3071c808a8fe78220bc265611591a78a92e9cf5144dcf7f1b15e0869c77bd525c28c020ccbf338ded87de3e79c05e9eeb
7
- data.tar.gz: 6abe940c11b64d7abbe6968192bff8f66a83addf9f5fb43560291ae8844c6e37cd04fbda8c64b344a77795775f02d71fb762fed4adc5a352f5d43f170e147e71
6
+ metadata.gz: ec5429668955673688aad154bf1a0af85f5e56e1309d70b23cd9660f6032cadb32a63755a01ca3682bbbbcf57f689df18b822db32afab67554a471779cc53423
7
+ data.tar.gz: 6c92dd55c7924ae99281506b7c2ece71e7fcf66c2195a0fcb433d7cd540bc820ff4fd0f66417343d11993d91f56d100cad84ffb4f07a0f720bddf4267d946818
@@ -0,0 +1,52 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ fill="#0d52bf"
4
+ data-name="Layer 1"
5
+ viewBox="0 0 759.30359 204.058"
6
+ version="1.1"
7
+ id="svg7"
8
+ sodipodi:docname="app-logo2.svg"
9
+ width="759.30359"
10
+ height="204.058"
11
+ inkscape:version="1.2 (dc2aeda, 2022-05-15)"
12
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
13
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
14
+ xmlns="http://www.w3.org/2000/svg"
15
+ xmlns:svg="http://www.w3.org/2000/svg">
16
+ <defs
17
+ id="defs11" />
18
+ <sodipodi:namedview
19
+ id="namedview9"
20
+ pagecolor="#ffffff"
21
+ bordercolor="#000000"
22
+ borderopacity="0.25"
23
+ inkscape:showpageshadow="2"
24
+ inkscape:pageopacity="0.0"
25
+ inkscape:pagecheckerboard="0"
26
+ inkscape:deskcolor="#d1d1d1"
27
+ showgrid="false"
28
+ inkscape:zoom="0.59978982"
29
+ inkscape:cx="360.95977"
30
+ inkscape:cy="354.29077"
31
+ inkscape:window-width="1792"
32
+ inkscape:window-height="1003"
33
+ inkscape:window-x="0"
34
+ inkscape:window-y="25"
35
+ inkscape:window-maximized="1"
36
+ inkscape:current-layer="svg7" />
37
+ <path
38
+ style="stroke-width:0.396906"
39
+ id="path16"
40
+ d="M 219.61484,103.07486 A 43.236471,41.974221 0 0 0 183.89936,61.761547 43.220354,41.958576 0 0 0 109.68879,20.839332 43.208276,41.946844 0 0 0 35.490281,61.792831 a 43.220354,41.958576 0 0 0 0,82.564069 43.220354,41.958576 0 0 0 74.198509,40.95347 43.208276,41.946844 0 0 0 74.21057,-40.92221 43.236471,41.974221 0 0 0 35.71548,-41.3133 z m -107.17878,33.41352 v 7.2858 H 99.142517 v -27.91507 a 7.8472603,7.6181662 0 0 0 -7.863318,-7.61815 H 62.524661 V 95.335434 h 28.754538 a 7.8512879,7.6220766 0 0 0 7.847263,-7.622073 V 59.786609 h 13.293548 v 27.911124 a 7.8553162,7.6259878 0 0 0 7.86339,7.622073 h 28.75038 V 108.22532 H 120.2834 a 7.8512879,7.6220766 0 0 0 -7.85129,7.61822 v 20.62915 z"
41
+ class="cls-1" />
42
+ <path
43
+ d="m 368.15658,159.456 v 40.883 h -108.853 V 14.485004 h 42.48 V 159.455 Z m 80.678,9.022 c 10.885,0 20.18,-4.242 25.49,-10.09 l 31.86,18.324 c -13.014,18.051 -32.656,27.346 -57.916,27.346 -45.404,0 -73.546,-30.535 -73.546,-70.092 0,-39.556998 28.756,-70.098998 70.685,-70.098998 38.762,0 67.44,30.005 67.44,70.098998 a 77.279,77.279 0 0 1 -1.59,15.93 h -94.256 c 5.045,13.802 17.256,18.582 31.833,18.582 z m 24.422,-48.321 c -4.243,-15.4 -16.196,-20.974998 -28.142,-20.974998 -15.134,0 -25.224,7.437998 -28.936,20.974998 z m 157.195,40.359 c 0,30.528 -26.515,43.542 -55.222,43.542 -26.515,0 -46.751,-10.09 -57.085,-31.596 l 34.519,-19.649 c 3.447,10.09 10.885,15.665 22.566,15.665 9.56,0 14.332,-2.917 14.332,-8.227 0,-14.604 -65.312,-6.908 -65.312,-52.836 0,-28.942998 24.423,-43.547998 52.04,-43.547998 21.506,0 40.625,9.56 51.776,28.414 l -33.99,18.315998 c -3.72,-6.9 -9.022,-11.679998 -17.786,-11.679998 -6.901,0 -11.165,2.657998 -11.165,7.429998 0.014,15.136 65.326,5.046 65.326,54.17 z m 17.249,-153.9919961 h 39.823 V 200.339 h -39.823 z m 66.366,61.0619981 h 39.83 V 200.34 h -39.83 z"
44
+ class="cls-1"
45
+ id="path3" />
46
+ <circle
47
+ cx="733.98157"
48
+ cy="25.322001"
49
+ r="25.322001"
50
+ class="cls-1"
51
+ id="circle5" />
52
+ </svg>
@@ -82,7 +82,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
82
82
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
83
83
 
84
84
  "use strict";
85
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var Lesli_public__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! Lesli/public */ \"./lib/vue/public.js\");\n/*\nLesli\n\nCopyright (c) 2023, Lesli Technologies, S. A.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses/.\n\nLesli · Your Smart Business Assistant. \n\nMade with ♥ by https://www.lesli.tech\nBuilding a better future, one line of code at a time.\n\n@contact hello@lesli.tech\n@website https://lesli.tech\n@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html\n\n// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~\n// · \n*/\n\n// · \n\n// · \n\n\n// · \n(0,Lesli_public__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n data() {\n return {\n loading: false,\n translations: {\n main: I18n.t(\"core.users/passwords\")\n },\n sign_in: {\n email: \"\",\n password: \"\"\n },\n password_edit: {\n new_password: \"Tardis2023$\",\n new_password_confirmation: \"Tardis2023$\"\n },\n notification: {\n message: \"\",\n show: false,\n type: \"danger\"\n }\n };\n },\n methods: {\n postPasswordNew(event) {\n this.notification.show = false;\n this.loading = true;\n event.preventDefault();\n let data = {\n user: {\n email: this.sign_in.email.toLowerCase(),\n password: this.sign_in.password\n }\n };\n this.http.post(\"/password\", data).then(response => {\n this.showNotification(this.translations.main.notification_reset_password_instructions_sent, \"success\");\n }).catch(error => {\n this.showNotification(error.message);\n }).finally(() => {\n this.loading = false;\n });\n },\n putPasswordEdit(event) {\n this.notification.show = false;\n this.loading = true;\n event.preventDefault();\n\n // check if passwords match\n if (this.password_edit.new_password != this.password_edit.new_password_confirmation) {\n this.showNotification(this.translations.main.error_passwords_do_not_match, \"danger\");\n return;\n }\n var token = null;\n try {\n token = Object.fromEntries(new URLSearchParams(window.location.search)).reset_password_token;\n } catch (error) {\n token = null;\n }\n this.http.put(\"/password\", {\n user: {\n password: this.password_edit.new_password,\n password_confirmation: this.password_edit.new_password_confirmation,\n reset_password_token: token\n }\n }).then(response => {\n this.showNotification(this.translations.main.notification_password_updated, \"success\");\n //setTimeout(() => { this.url.go(\"/login\") }, 2000)\n }).catch(error => {\n this.showNotification(error.message, \"danger\");\n }).finally(() => {\n this.loading = false;\n });\n },\n showNotification(message) {\n let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"danger\";\n this.notification.message = message;\n this.notification.type = type;\n this.notification.show = true;\n }\n }\n});\n\n//# sourceURL=webpack://lesli/./lib/vue/devise/passwords.js?");
85
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var Lesli_public__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! Lesli/public */ \"./lib/vue/public.js\");\n/*\nLesli\n\nCopyright (c) 2023, Lesli Technologies, S. A.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses/.\n\nLesli · Ruby on Rails SaaS Development Framework.\n\nMade with ♥ by https://www.lesli.tech\nBuilding a better future, one line of code at a time.\n\n@contact hello@lesli.tech\n@website https://www.lesli.tech\n@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html\n\n// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~\n// · \n*/\n\n// · \n\n// · \n\n\n// · \n(0,Lesli_public__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n data() {\n return {\n loading: false,\n translations: {\n main: I18n.t(\"core.users/passwords\")\n },\n sign_in: {\n email: \"\",\n password: \"\"\n },\n password_edit: {\n new_password: \"\",\n new_password_confirmation: \"\"\n },\n notification: {\n message: \"\",\n show: false,\n type: \"\"\n }\n };\n },\n methods: {\n postPasswordNew(event) {\n this.notification.show = false;\n this.loading = true;\n event.preventDefault();\n let data = {\n user: {\n email: this.sign_in.email.toLowerCase(),\n password: this.sign_in.password\n }\n };\n this.http.post(\"/password\", data).then(response => {\n this.showNotification(\"this.translations.main.notification_reset_password_instructions_sent\", \"success\");\n }).catch(error => {\n this.showNotification(error.message);\n }).finally(() => {\n this.loading = false;\n });\n },\n putPasswordEdit(event) {\n this.notification.show = false;\n this.loading = true;\n event.preventDefault();\n\n // check if passwords match\n if (this.password_edit.new_password != this.password_edit.new_password_confirmation) {\n this.showNotification(this.translations.main.error_passwords_do_not_match, \"danger\");\n return;\n }\n var token = null;\n try {\n token = Object.fromEntries(new URLSearchParams(window.location.search)).reset_password_token;\n } catch (error) {\n token = null;\n }\n this.http.put(\"/password\", {\n user: {\n password: this.password_edit.new_password,\n password_confirmation: this.password_edit.new_password_confirmation,\n reset_password_token: token\n }\n }).then(response => {\n this.showNotification(this.translations.main.notification_password_updated, \"success\");\n //setTimeout(() => { this.url.go(\"/login\") }, 2000)\n }).catch(error => {\n this.showNotification(error.message, \"danger\");\n }).finally(() => {\n this.loading = false;\n });\n },\n showNotification(message) {\n let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"danger\";\n this.notification.message = message;\n this.notification.type = \"is-\" + type;\n this.notification.show = true;\n }\n }\n});\n\n//# sourceURL=webpack://lesli/./lib/vue/devise/passwords.js?");
86
86
 
87
87
  /***/ }),
88
88
 
@@ -124,7 +124,7 @@ eval("/*\nLesli\n\nCopyright (c) 2021, Lesli Technologies, S. A.\n\nThis program
124
124
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
125
125
 
126
126
  "use strict";
127
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useLesliDate: () => (/* binding */ useLesliDate)\n/* harmony export */ });\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dayjs */ \"./node_modules/dayjs/dayjs.min.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_0__);\n/*\nLesli\n\nCopyright (c) 2023, Lesli Technologies, S. A.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses/.\n\nLesli · Ruby on Rails SaaS Development Framework.\n\nMade with ♥ by https://www.lesli.tech\nBuilding a better future, one line of code at a time.\n\n@contact hello@lesli.tech\n@website https://www.lesli.dev\n@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html\n\n// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~\n// · \n*/\n\n/*\nIMPORTANT: \n This is a JavaScript implementation of app/lib/Date2 RoR lib.\n If any modification or update is needed it must be implemented in app/lib/Date2 first, then we can\n copy the new feature and implement in here.\n DO NOT add custom features, methods, params or any other modification that is not present in app/lib/Date2\n*/\n\n// · Import dayjs library and plugins\n\nvar utc = __webpack_require__(/*! dayjs/plugin/utc */ \"./node_modules/dayjs/plugin/utc.js\");\nvar timezone = __webpack_require__(/*! dayjs/plugin/timezone */ \"./node_modules/dayjs/plugin/timezone.js\");\n\n// · \ndayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(utc);\ndayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(timezone);\n\n// · \nclass LesliDate {\n #settings = {};\n #datetime = {};\n #format = \"\";\n constructor() {\n let datetime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : dayjs__WEBPACK_IMPORTED_MODULE_0___default()().utc().format();\n let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"%Y-%m-%d %H:%M:%S\";\n /*\n # NOTE: Do not modify settings here,\n # if you need a different date format you should change it in the config file\n # Check the docs for more information: /development/docs/rails-lib-time\n # TODO: User should be able to select an appropiate datetime format in an easy way,\n # the Administration module must be present to the users a curated list of different\n # datetime format options with examples, also user should be able to manually modify\n # the format through an \"advanced view\"\n */\n this.#settings = {\n timeZone: \"America/Guatemala\",\n // get this from Lesli settings\n startWeekOn: \"config[:start_week_on]\",\n format: {\n date: \"%d.%m.%Y\",\n time: \"%H:%M\",\n // 24 hours datetime format (default)\n dateTime: \"%d.%m.%Y %H:%M\",\n // 24 hours datetime format (default)\n dateWords: \"%A, %B %d, %Y\",\n dateTimeWords: \"%A, %B %d, %Y, %H:%M\" // 24 hours datetime in words format (default)\n }\n };\n\n // default date format\n this.#format = this.#setFormat(\"date\");\n\n // get datetime object from user params\n this.#datetime = dayjs__WEBPACK_IMPORTED_MODULE_0___default()(datetime).tz(this.#settings.timeZone);\n }\n date() {\n this.#setFormat(\"date\");\n return this.toString();\n }\n dateTime() {\n this.#setFormat(\"dateTime\");\n return this.toString();\n }\n dateWords() {\n this.#setFormat(\"dateWords\");\n return this;\n }\n\n // convert a datetime object to string representation using defined format\n toString() {\n return this.#datetime.format(this.#format);\n }\n\n //\n #setFormat(format) {\n this.#format = this.#settings.format[format]\n // Convert date Ruby to dayjs format\n .replaceAll(\"%Y\", \"YYYY\").replaceAll(\"%m\", \"MM\").replaceAll(\"%d\", \"DD\")\n // Convert time Ruby to dayjs format\n .replaceAll(\"%H\", \"HH\").replaceAll(\"%M\", \"mm\")\n // Convert words Ruby to dayjs format\n .replaceAll(\"%A\", \"dddd\") // Full day name\n .replaceAll(\"%B\", \"MMMM\"); // Full month name\n }\n}\n\nfunction useLesliDate() {\n return function () {\n let datetime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : dayjs__WEBPACK_IMPORTED_MODULE_0___default()().utc().format();\n let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"%Y-%m-%d %H:%M:%S\";\n return new LesliDate(datetime, format);\n };\n}\n\n//# sourceURL=webpack://lesli/../../enginesdev/lesli-vue/source/composables/date/date.js?");
127
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useLesliDate: () => (/* binding */ useLesliDate)\n/* harmony export */ });\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dayjs */ \"./node_modules/dayjs/dayjs.min.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_0__);\n/*\nLesli\n\nCopyright (c) 2023, Lesli Technologies, S. A.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses/.\n\nLesli · Ruby on Rails SaaS Development Framework.\n\nMade with ♥ by https://www.lesli.tech\nBuilding a better future, one line of code at a time.\n\n@contact hello@lesli.tech\n@website https://www.lesli.dev\n@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html\n\n// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~\n// · \n*/\n\n/*\nIMPORTANT: \n This is a JavaScript implementation of app/lib/Date2 RoR lib.\n If any modification or update is needed, it must be implemented in app/lib/Date2 first, then we can\n copy the new feature and implement it in here.\n DO NOT add custom features, methods, params or any other modification that is not present in app/lib/Date2\n*/\n\n// · Import dayjs library and plugins\n\nvar utc = __webpack_require__(/*! dayjs/plugin/utc */ \"./node_modules/dayjs/plugin/utc.js\");\nvar timezone = __webpack_require__(/*! dayjs/plugin/timezone */ \"./node_modules/dayjs/plugin/timezone.js\");\n\n// · \ndayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(utc);\ndayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(timezone);\n\n// · \nclass LesliDate {\n #settings = {};\n #datetime = {};\n #format = \"\";\n constructor() {\n let datetime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : dayjs__WEBPACK_IMPORTED_MODULE_0___default()().utc().format();\n let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"%Y-%m-%d %H:%M:%S\";\n /*\n # NOTE: Do not modify settings here,\n # if you need a different date format you should change it in the config file\n # Check the docs for more information: /development/docs/rails-lib-time\n # TODO: User should be able to select an appropiate datetime format in an easy way,\n # the Administration module must be present to the users a curated list of different\n # datetime format options with examples, also user should be able to manually modify\n # the format through an \"advanced view\"\n */\n this.#settings = {\n timeZone: \"America/Guatemala\",\n // get this from Lesli settings\n startWeekOn: \"config[:start_week_on]\",\n format: {\n date: \"%d.%m.%Y\",\n time: \"%H:%M\",\n // 24 hours datetime format (default)\n dateTime: \"%d.%m.%Y %H:%M\",\n // 24 hours datetime format (default)\n dateWords: \"%A / %B %d, %Y\",\n dateTimeWords: \"%A / %B %d, %Y, %H:%M\" // 24 hours datetime in words format (default)\n }\n };\n\n // default date format\n this.#format = this.#setFormat(\"date\");\n\n // get datetime object from user params\n this.#datetime = dayjs__WEBPACK_IMPORTED_MODULE_0___default()(datetime).tz(this.#settings.timeZone);\n }\n date() {\n this.#setFormat(\"date\");\n return this.toString();\n }\n dateTime() {\n this.#setFormat(\"dateTime\");\n return this.toString();\n }\n dateWords() {\n this.#setFormat(\"dateWords\");\n return this.toString();\n }\n\n // convert a datetime object to string representation using defined format\n toString() {\n return this.#datetime.format(this.#format);\n }\n\n //\n #setFormat(format) {\n this.#format = this.#settings.format[format]\n // Convert date Ruby to dayjs format\n .replaceAll(\"%Y\", \"YYYY\").replaceAll(\"%m\", \"MM\").replaceAll(\"%d\", \"DD\")\n // Convert time Ruby to dayjs format\n .replaceAll(\"%H\", \"HH\").replaceAll(\"%M\", \"mm\")\n // Convert words Ruby to dayjs format\n .replaceAll(\"%A\", \"dddd\") // Full day name\n .replaceAll(\"%B\", \"MMMM\"); // Full month name\n }\n}\n\nfunction useLesliDate() {\n return function () {\n let datetime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : dayjs__WEBPACK_IMPORTED_MODULE_0___default()().utc().format();\n let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"%Y-%m-%d %H:%M:%S\";\n return new LesliDate(datetime, format);\n };\n}\n\n//# sourceURL=webpack://lesli/../../enginesdev/lesli-vue/source/composables/date/date.js?");
128
128
 
129
129
  /***/ }),
130
130
 
@@ -179,7 +179,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
179
179
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
180
180
 
181
181
  "use strict";
182
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useLesliUrl: () => (/* binding */ useLesliUrl)\n/* harmony export */ });\n/*\nLesli\n\nCopyright (c) 2023, Lesli Technologies, S. A.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses/.\n\nLesli · Ruby on Rails SaaS Development Framework.\n\nMade with ♥ by https://www.lesli.tech\nBuilding a better future, one line of code at a time.\n\n@contact hello@lesli.tech\n@website https://www.lesli.dev\n@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html\n\n// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~\n// · \n*/\n\n// · URL #builder for Lesli\nclass LesliUrl {\n #params = \"\";\n #base_url = \"\";\n #query = {};\n #path = \"\";\n #url = \"\";\n constructor(base_url, path, params) {\n this.#base_url = base_url;\n this.#params = params;\n this.#path = path;\n }\n\n // build a url for resources mounted at root level\n // this happens on builders engines like MW.\n root(path, params) {\n this.#path = \"\";\n\n // process path template if provided\n if (path) this.#path = this.#path.concat(this.#parsePath(path, params));\n return this;\n }\n\n // build a url for a specific engine\n engine(engine, path, params) {\n // manually add a slash due we are not using native JS url builders\n engine = engine.concat(\"/\");\n\n // return url for the root of the engine\n if (!path) return this.root(engine, params);\n\n // include the engine as part of the path\n return this.root(engine.concat(path), params);\n }\n\n // insert order params into query string\n order(column) {\n let direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"asc\";\n this.#query[\"orderBy\"] = column;\n if (direction) {\n this.#query[\"order\"] = direction;\n }\n return this.#build();\n }\n\n // add standard query param to request paginated data to the server\n paginate(page) {\n let perPage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 15;\n this.#query[\"page\"] = page;\n this.#query[\"perPage\"] = perPage;\n return this.#build();\n }\n\n // add standard query param to request search to the server\n search(text) {\n if (!!text) {\n this.#query[\"search\"] = text;\n }\n return this.#build();\n }\n group(text) {\n if (!!text) {\n this.#query[\"group\"] = text;\n }\n return this.#build();\n }\n\n // add standard query params to request filtered data from the server\n filter(filters) {\n let keys = Object.keys(filters);\n if (!this.#query.f) {\n this.#query[\"f\"] = {};\n }\n keys.forEach(key => {\n this.#query.f[key] = filters[key].join(',');\n });\n return this.#build();\n }\n\n // allow to add custom query params\n query(key, value) {\n this.#query[key] = value;\n return this.#build();\n }\n\n // automatically add auth token if exists in the url query string\n tokenUrl() {\n let urlParams = new URLSearchParams(window.location.search);\n this.#query[\"t\"] = urlParams.get(\"t\");\n return this.#build();\n }\n\n // automatically add auth token if exists in the url query string as param\n tokenShared() {\n // get the token from a \"signed\" url with format:\n // /shared/public/:token/help/tickets/new\n // for this kind of \"signed\" url token is always at position 4 of the string\n let url = window.location.pathname.split('/')[3];\n\n // attach the token as opaque token so the public api is able authenticate the request\n this.#query[\"t\"] = url;\n return this.#build();\n }\n\n // convert the url object to string automatically if object as string is needed\n toString() {\n let extension = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n this.#build(extension);\n return this.#url.toString();\n }\n\n // alias for toString() method\n get s() {\n return this.toString();\n }\n\n // add json extension to the url \n json() {\n return this.toString(\".json\");\n }\n\n // add pdf extension to the url \n pdf() {\n return this.toString(\".pdf\");\n }\n\n // perform a redirect action after #build an url\n // be sure to call this method last always\n go() {\n this.#build();\n window.location.href = this.#url.toString();\n }\n\n // parse, join and create a well formated url object\n #build() {\n let extension = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n // root\n let url = \"/\";\n\n // if path exists for the url\n if (this.#path != \"\") {\n url = url.concat(this.#path);\n }\n\n // normally all the requests are sent to the internal Lesli api\n // so, the requests should include the json suffix\n if (extension) {\n url = url.concat(extension);\n }\n\n // concat query string if available\n url = url.concat(this.#parseQuery(this.#query));\n\n // #build a native URL object\n this.#url = url;\n\n // return this to enable methods chaining pattern\n return this;\n }\n\n // parse a string template into a string path\n // examples:\n // domain.com/user/:id, { id: 1 }\n // domain.com/user/:id, 1\n // result: domain.com/user/1\n // this is good to avoid string interpolation :)\n #parsePath(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n // shortcut to get specific resource through id\n if (typeof params == 'string' || typeof params == 'number') {\n params = {\n id: params\n };\n }\n\n // remaining params are useful if we want to work with the params\n // that does not belongs to a any part of the path template\n const remainingParams = {\n ...params\n };\n\n // compile the string template to assign values to the variables\n const renderedPath = path.replace(/:[_A-Za-z][_A-Za-z0-9]*/g, p => {\n let key = p.slice(1);\n delete remainingParams[key];\n return encodeURIComponent(params[key]);\n });\n for (let param in remainingParams) {\n this.#query[param] = remainingParams[param];\n }\n return renderedPath;\n }\n\n // convert a key value object into a standard queryString. This custom implementation\n // supports deep object parsing and array parsing\n // example: { name: {first: \"luis\"}, age: 25 }\n // result: domain.com?name[first]=luis&age=25\n #parseQuery(query) {\n function recursion(query, path) {\n if (Array.isArray(query)) {\n query.forEach(function (element) {\n recursion(element, path + \"[]\");\n });\n return;\n }\n if (query !== null && typeof query === \"object\") {\n Object.keys(query).forEach(function (param) {\n recursion(query[param], path + \"[\" + param + \"]\");\n });\n return;\n }\n data.push(path + \"=\" + query);\n }\n var data = [];\n Object.keys(query).forEach(function (param) {\n recursion(query[param], param);\n });\n if (data.length > 0) {\n return \"?\".concat(data.join(\"&\"));\n }\n return \"\";\n }\n}\nfunction useLesliUrl() {\n const root = \"/\";\n return {\n // · Redirect to specific url\n go() {\n let url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n document.location.href = url;\n },\n // · Get well formated url\n to() {\n let path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n if (path) {\n return root.concat(path);\n }\n return root;\n },\n // · Build a url for core requests\n root(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().root(path, params);\n },\n // · Build a url for administration area\n lesli(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().root(path, params);\n },\n // · Build a url for core administration area\n admin(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"admin\", path, params);\n },\n // · Build a url for CloudAudit engine\n audit(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"audit\", path, params);\n },\n // · Build a url for CloudBabel engine\n babel(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"babel\", path, params);\n },\n // · Build a url for CloudBell engine\n bell(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"bell\", path, params);\n },\n // · Build a url for CloudHelp engine\n help(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"help\", path, params);\n },\n // · Build a url for CloudMailer engine\n mailer(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"mailer\", path, params);\n },\n // · Build a url for CloudTalk engine\n talk(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"talk\", path, params);\n },\n // · Build a url for CloudFocus engine\n focus(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"focus\", path, params);\n },\n // · Build a url for CloudTime engine\n time(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"time\", path, params);\n },\n // · Build a url for CloudDriver engine\n driver(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"driver\", path, params);\n },\n // · Build a url for CloudSocial engine\n social(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"social\", path, params);\n },\n // · Build a url for CloudWord engine\n word(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"word\", path, params);\n },\n // · Build a url for CloudTeam engine\n team(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"team\", path, params);\n },\n // · Build a url for CloudScraper engine\n scraper(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"scraper\", path, params);\n },\n // · Build a url for CloudShared engine\n shared(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"shared\", path, params);\n },\n // · Build a url for CloudShared engine\n vault(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"vault\", path, params);\n },\n // · Build a url for CloudAuthority engine\n authority(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"authority\", path, params);\n }\n };\n}\n\n//# sourceURL=webpack://lesli/../../enginesdev/lesli-vue/source/composables/url/url.js?");
182
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useLesliUrl: () => (/* binding */ useLesliUrl)\n/* harmony export */ });\n/*\nLesli\n\nCopyright (c) 2023, Lesli Technologies, S. A.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses/.\n\nLesli · Ruby on Rails SaaS Development Framework.\n\nMade with ♥ by https://www.lesli.tech\nBuilding a better future, one line of code at a time.\n\n@contact hello@lesli.tech\n@website https://www.lesli.dev\n@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html\n\n// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~\n// · \n*/\n\n// · URL #builder for Lesli\nclass LesliUrl {\n #params = \"\";\n #base_url = \"\";\n #query = {};\n #path = \"\";\n #url = \"\";\n constructor(base_url, path, params) {\n this.#base_url = base_url;\n this.#params = params;\n this.#path = path;\n }\n\n // build a url for resources mounted at root level\n // this happens on builders engines like MW.\n root(path, params) {\n this.#path = \"\";\n\n // process path template if provided\n if (path) this.#path = this.#path.concat(this.#parsePath(path, params));\n return this;\n }\n\n // build a url for a specific engine\n engine(engine, path, params) {\n // manually add a slash due we are not using native JS url builders\n engine = engine.concat(\"/\");\n\n // return url for the root of the engine\n if (!path) return this.root(engine, params);\n\n // include the engine as part of the path\n return this.root(engine.concat(path), params);\n }\n\n // insert order params into query string\n order(column) {\n let direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"asc\";\n this.#query[\"orderBy\"] = column;\n if (direction) {\n this.#query[\"order\"] = direction;\n }\n return this.#build();\n }\n\n // add standard query param to request paginated data to the server\n paginate(page) {\n let perPage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 12;\n this.#query[\"page\"] = page;\n this.#query[\"perPage\"] = perPage;\n return this.#build();\n }\n\n // add standard query param to request search to the server\n search(text) {\n if (!!text) {\n this.#query[\"search\"] = text;\n }\n return this.#build();\n }\n group(text) {\n if (!!text) {\n this.#query[\"group\"] = text;\n }\n return this.#build();\n }\n\n // add standard query params to request filtered data from the server\n filter(filters) {\n let keys = Object.keys(filters);\n if (!this.#query.f) {\n this.#query[\"f\"] = {};\n }\n keys.forEach(key => {\n this.#query.f[key] = filters[key].join(',');\n });\n return this.#build();\n }\n\n // allow to add custom query params\n query(key, value) {\n this.#query[key] = value;\n return this.#build();\n }\n\n // automatically add auth token if exists in the url query string\n tokenUrl() {\n let urlParams = new URLSearchParams(window.location.search);\n this.#query[\"t\"] = urlParams.get(\"t\");\n return this.#build();\n }\n\n // automatically add auth token if exists in the url query string as param\n tokenShared() {\n // get the token from a \"signed\" url with format:\n // /shared/public/:token/help/tickets/new\n // for this kind of \"signed\" url token is always at position 4 of the string\n let url = window.location.pathname.split('/')[3];\n\n // attach the token as opaque token so the public api is able authenticate the request\n this.#query[\"t\"] = url;\n return this.#build();\n }\n\n // convert the url object to string automatically if object as string is needed\n toString() {\n let extension = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n this.#build(extension);\n return this.#url.toString();\n }\n\n // alias for toString() method\n get s() {\n return this.toString();\n }\n\n // add json extension to the url \n json() {\n return this.toString(\".json\");\n }\n\n // add pdf extension to the url \n pdf() {\n return this.toString(\".pdf\");\n }\n\n // perform a redirect action after #build an url\n // be sure to call this method last always\n go() {\n this.#build();\n window.location.href = this.#url.toString();\n }\n\n // parse, join and create a well formated url object\n #build() {\n let extension = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n // root\n let url = \"/\";\n\n // if path exists for the url\n if (this.#path != \"\") {\n url = url.concat(this.#path);\n }\n\n // normally all the requests are sent to the internal Lesli api\n // so, the requests should include the json suffix\n if (extension) {\n url = url.concat(extension);\n }\n\n // concat query string if available\n url = url.concat(this.#parseQuery(this.#query));\n\n // #build a native URL object\n this.#url = url;\n\n // return this to enable methods chaining pattern\n return this;\n }\n\n // parse a string template into a string path\n // examples:\n // domain.com/user/:id, { id: 1 }\n // domain.com/user/:id, 1\n // result: domain.com/user/1\n // this is good to avoid string interpolation :)\n #parsePath(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n // shortcut to get specific resource through id\n if (typeof params == 'string' || typeof params == 'number') {\n params = {\n id: params\n };\n }\n\n // remaining params are useful if we want to work with the params\n // that does not belongs to a any part of the path template\n const remainingParams = {\n ...params\n };\n\n // compile the string template to assign values to the variables\n const renderedPath = path.replace(/:[_A-Za-z][_A-Za-z0-9]*/g, p => {\n let key = p.slice(1);\n delete remainingParams[key];\n return encodeURIComponent(params[key]);\n });\n for (let param in remainingParams) {\n this.#query[param] = remainingParams[param];\n }\n return renderedPath;\n }\n\n // convert a key value object into a standard queryString. This custom implementation\n // supports deep object parsing and array parsing\n // example: { name: {first: \"luis\"}, age: 25 }\n // result: domain.com?name[first]=luis&age=25\n #parseQuery(query) {\n function recursion(query, path) {\n if (Array.isArray(query)) {\n query.forEach(function (element) {\n recursion(element, path + \"[]\");\n });\n return;\n }\n if (query !== null && typeof query === \"object\") {\n Object.keys(query).forEach(function (param) {\n recursion(query[param], path + \"[\" + param + \"]\");\n });\n return;\n }\n data.push(path + \"=\" + query);\n }\n var data = [];\n Object.keys(query).forEach(function (param) {\n recursion(query[param], param);\n });\n if (data.length > 0) {\n return \"?\".concat(data.join(\"&\"));\n }\n return \"\";\n }\n}\nfunction useLesliUrl() {\n const root = \"/\";\n return {\n // · Redirect to specific url\n go() {\n let url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n document.location.href = url;\n },\n // · Get well formated url\n to() {\n let path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n if (path) {\n return root.concat(path);\n }\n return root;\n },\n // · Build a url for core requests\n root(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().root(path, params);\n },\n // · Build a url for administration area\n lesli(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"lesli\", path, params);\n },\n // · Build a url for core administration area\n admin(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"admin\", path, params);\n },\n // · Build a url for CloudAudit engine\n audit(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"audit\", path, params);\n },\n // · Build a url for CloudBabel engine\n babel(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"babel\", path, params);\n },\n // · Build a url for CloudBell engine\n bell(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"bell\", path, params);\n },\n // · Build a url for CloudHelp engine\n help(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"help\", path, params);\n },\n // · Build a url for CloudMailer engine\n mailer(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"mailer\", path, params);\n },\n // · Build a url for CloudTalk engine\n talk(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"talk\", path, params);\n },\n // · Build a url for CloudFocus engine\n focus(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"focus\", path, params);\n },\n // · Build a url for CloudTime engine\n time(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"time\", path, params);\n },\n // · Build a url for CloudDriver engine\n driver(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"driver\", path, params);\n },\n // · Build a url for CloudSocial engine\n social(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"social\", path, params);\n },\n // · Build a url for CloudWord engine\n word(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"word\", path, params);\n },\n // · Build a url for CloudTeam engine\n team(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"team\", path, params);\n },\n // · Build a url for CloudScraper engine\n scraper(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"scraper\", path, params);\n },\n // · Build a url for CloudShared engine\n shared(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"shared\", path, params);\n },\n // · Build a url for CloudShared engine\n vault(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"vault\", path, params);\n },\n // · Build a url for CloudAuthority engine\n authority(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"authority\", path, params);\n }\n };\n}\n\n//# sourceURL=webpack://lesli/../../enginesdev/lesli-vue/source/composables/url/url.js?");
183
183
 
184
184
  /***/ }),
185
185
 
@@ -82,7 +82,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
82
82
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
83
83
 
84
84
  "use strict";
85
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var Lesli_public__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! Lesli/public */ \"./lib/vue/public.js\");\n/*\n\nLesli\n\nCopyright (c) 2023, Lesli Technologies, S. A.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses/.\n\nLesli · Ruby on Rails SaaS Development Framework.\n\nMade with ♥ by https://www.lesli.tech\nBuilding a better future, one line of code at a time.\n\n@contact hello@lesli.tech\n@website https://www.lesli.tech\n@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html\n\n// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~\n// · \n*/\n\n// · \n\n\n// · \n(0,Lesli_public__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n data() {\n return {\n translations: {},\n password_uppercase: 0,\n password_symbol: 0,\n password_number: 0,\n telephone_code: \"+49\",\n telephone_codes: null,\n sign_up: {\n email: \"test@lesli.tech\",\n password: 'Tardis2023$',\n password_confirmation: ''\n // first_name: null,\n // last_name: null,\n // telephone: null,\n },\n\n progress_bar_active: false,\n notification: {\n show: false,\n message: '',\n type: 'is-danger'\n }\n };\n },\n mounted() {\n this.$refs.email.focus();\n },\n methods: {\n /**\n * @param {*} event that triggers the function\n * @description this function is triggered when the user submits the form to sign up\n */\n postRegistration(event) {\n this.notification.show = false;\n event.preventDefault();\n const user = this.validateFields();\n this.http.post(this.url.to(), user).then(response => {\n\n //setTimeout(() => { this.url.go(\"/login\") }, 5000)\n }).catch(err => {\n this.showNotification(err.message);\n });\n },\n typing() {\n this.notification.message = \"\";\n this.notification.show = false;\n this.notification.type = \"default\";\n this.verifyPasswords();\n },\n showNotification(message) {\n let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"danger\";\n this.notification.message = message;\n this.notification.type = type;\n this.notification.show = true;\n },\n /**\n * @description validates the password strength\n */\n verifyPasswords() {\n this.password_uppercase = 0;\n this.password_number = 0;\n this.password_symbol = 0;\n if (this.sign_up.password.length <= 0) {\n return;\n }\n if (this.sign_up.password.search(/[A-Z]/) < 0) {\n this.password_uppercase = 1;\n } else {\n this.password_uppercase = 2;\n }\n if (this.sign_up.password.search(/[0-9]/) < 0) {\n this.password_number = 1;\n } else {\n this.password_number = 2;\n }\n if (this.sign_up.password.search(/[!#$%&]/) < 0) {\n this.password_symbol = 1;\n } else {\n this.password_symbol = 2;\n }\n },\n /**\n * @description this function validates if the fields are correct\n * @returns object with the user to be registered\n */\n validateFields() {\n // · copy object without reference\n const user = JSON.parse(JSON.stringify(this.sign_up));\n if (user.password_confirmation == \"\") {\n user.password_confirmation = user.password;\n }\n return user;\n }\n }\n});\n\n//# sourceURL=webpack://lesli/./lib/vue/devise/registrations.js?");
85
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var Lesli_public__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! Lesli/public */ \"./lib/vue/public.js\");\n/*\n\nLesli\n\nCopyright (c) 2023, Lesli Technologies, S. A.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses/.\n\nLesli · Ruby on Rails SaaS Development Framework.\n\nMade with ♥ by https://www.lesli.tech\nBuilding a better future, one line of code at a time.\n\n@contact hello@lesli.tech\n@website https://www.lesli.tech\n@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html\n\n// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~\n// · \n*/\n\n// · \n\n\n// · \n(0,Lesli_public__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n data() {\n return {\n translations: {},\n password_uppercase: 0,\n password_symbol: 0,\n password_number: 0,\n telephone_code: \"+49\",\n telephone_codes: null,\n sign_up: {\n email: \"\",\n password: \"\",\n password_confirmation: ''\n // first_name: null,\n // last_name: null,\n // telephone: null,\n },\n\n progress_bar_active: false,\n notification: {\n show: false,\n message: '',\n type: 'is-danger'\n }\n };\n },\n mounted() {\n this.$refs.email.focus();\n },\n methods: {\n /**\n * @param {*} event that triggers the function\n * @description this function is triggered when the user submits the form to sign up\n */\n postRegistration(event) {\n this.notification.show = false;\n event.preventDefault();\n const user = this.validateFields();\n this.http.post(this.url.to(), user).then(response => {\n\n //setTimeout(() => { this.url.go(\"/login\") }, 5000)\n }).catch(err => {\n this.showNotification(err.message);\n });\n },\n typing() {\n this.notification.message = \"\";\n this.notification.show = false;\n this.notification.type = \"default\";\n this.verifyPasswords();\n },\n showNotification(message) {\n let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"danger\";\n this.notification.message = message;\n this.notification.type = type;\n this.notification.show = true;\n },\n /**\n * @description validates the password strength\n */\n verifyPasswords() {\n this.password_uppercase = 0;\n this.password_number = 0;\n this.password_symbol = 0;\n if (this.sign_up.password.length <= 0) {\n return;\n }\n if (this.sign_up.password.search(/[A-Z]/) < 0) {\n this.password_uppercase = 1;\n } else {\n this.password_uppercase = 2;\n }\n if (this.sign_up.password.search(/[0-9]/) < 0) {\n this.password_number = 1;\n } else {\n this.password_number = 2;\n }\n if (this.sign_up.password.search(/[!#$%&]/) < 0) {\n this.password_symbol = 1;\n } else {\n this.password_symbol = 2;\n }\n },\n /**\n * @description this function validates if the fields are correct\n * @returns object with the user to be registered\n */\n validateFields() {\n // · copy object without reference\n const user = JSON.parse(JSON.stringify(this.sign_up));\n if (user.password_confirmation == \"\") {\n user.password_confirmation = user.password;\n }\n return user;\n }\n }\n});\n\n//# sourceURL=webpack://lesli/./lib/vue/devise/registrations.js?");
86
86
 
87
87
  /***/ }),
88
88
 
@@ -124,7 +124,7 @@ eval("/*\nLesli\n\nCopyright (c) 2021, Lesli Technologies, S. A.\n\nThis program
124
124
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
125
125
 
126
126
  "use strict";
127
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useLesliDate: () => (/* binding */ useLesliDate)\n/* harmony export */ });\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dayjs */ \"./node_modules/dayjs/dayjs.min.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_0__);\n/*\nLesli\n\nCopyright (c) 2023, Lesli Technologies, S. A.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses/.\n\nLesli · Ruby on Rails SaaS Development Framework.\n\nMade with ♥ by https://www.lesli.tech\nBuilding a better future, one line of code at a time.\n\n@contact hello@lesli.tech\n@website https://www.lesli.dev\n@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html\n\n// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~\n// · \n*/\n\n/*\nIMPORTANT: \n This is a JavaScript implementation of app/lib/Date2 RoR lib.\n If any modification or update is needed it must be implemented in app/lib/Date2 first, then we can\n copy the new feature and implement in here.\n DO NOT add custom features, methods, params or any other modification that is not present in app/lib/Date2\n*/\n\n// · Import dayjs library and plugins\n\nvar utc = __webpack_require__(/*! dayjs/plugin/utc */ \"./node_modules/dayjs/plugin/utc.js\");\nvar timezone = __webpack_require__(/*! dayjs/plugin/timezone */ \"./node_modules/dayjs/plugin/timezone.js\");\n\n// · \ndayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(utc);\ndayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(timezone);\n\n// · \nclass LesliDate {\n #settings = {};\n #datetime = {};\n #format = \"\";\n constructor() {\n let datetime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : dayjs__WEBPACK_IMPORTED_MODULE_0___default()().utc().format();\n let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"%Y-%m-%d %H:%M:%S\";\n /*\n # NOTE: Do not modify settings here,\n # if you need a different date format you should change it in the config file\n # Check the docs for more information: /development/docs/rails-lib-time\n # TODO: User should be able to select an appropiate datetime format in an easy way,\n # the Administration module must be present to the users a curated list of different\n # datetime format options with examples, also user should be able to manually modify\n # the format through an \"advanced view\"\n */\n this.#settings = {\n timeZone: \"America/Guatemala\",\n // get this from Lesli settings\n startWeekOn: \"config[:start_week_on]\",\n format: {\n date: \"%d.%m.%Y\",\n time: \"%H:%M\",\n // 24 hours datetime format (default)\n dateTime: \"%d.%m.%Y %H:%M\",\n // 24 hours datetime format (default)\n dateWords: \"%A, %B %d, %Y\",\n dateTimeWords: \"%A, %B %d, %Y, %H:%M\" // 24 hours datetime in words format (default)\n }\n };\n\n // default date format\n this.#format = this.#setFormat(\"date\");\n\n // get datetime object from user params\n this.#datetime = dayjs__WEBPACK_IMPORTED_MODULE_0___default()(datetime).tz(this.#settings.timeZone);\n }\n date() {\n this.#setFormat(\"date\");\n return this.toString();\n }\n dateTime() {\n this.#setFormat(\"dateTime\");\n return this.toString();\n }\n dateWords() {\n this.#setFormat(\"dateWords\");\n return this;\n }\n\n // convert a datetime object to string representation using defined format\n toString() {\n return this.#datetime.format(this.#format);\n }\n\n //\n #setFormat(format) {\n this.#format = this.#settings.format[format]\n // Convert date Ruby to dayjs format\n .replaceAll(\"%Y\", \"YYYY\").replaceAll(\"%m\", \"MM\").replaceAll(\"%d\", \"DD\")\n // Convert time Ruby to dayjs format\n .replaceAll(\"%H\", \"HH\").replaceAll(\"%M\", \"mm\")\n // Convert words Ruby to dayjs format\n .replaceAll(\"%A\", \"dddd\") // Full day name\n .replaceAll(\"%B\", \"MMMM\"); // Full month name\n }\n}\n\nfunction useLesliDate() {\n return function () {\n let datetime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : dayjs__WEBPACK_IMPORTED_MODULE_0___default()().utc().format();\n let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"%Y-%m-%d %H:%M:%S\";\n return new LesliDate(datetime, format);\n };\n}\n\n//# sourceURL=webpack://lesli/../../enginesdev/lesli-vue/source/composables/date/date.js?");
127
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useLesliDate: () => (/* binding */ useLesliDate)\n/* harmony export */ });\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dayjs */ \"./node_modules/dayjs/dayjs.min.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_0__);\n/*\nLesli\n\nCopyright (c) 2023, Lesli Technologies, S. A.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses/.\n\nLesli · Ruby on Rails SaaS Development Framework.\n\nMade with ♥ by https://www.lesli.tech\nBuilding a better future, one line of code at a time.\n\n@contact hello@lesli.tech\n@website https://www.lesli.dev\n@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html\n\n// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~\n// · \n*/\n\n/*\nIMPORTANT: \n This is a JavaScript implementation of app/lib/Date2 RoR lib.\n If any modification or update is needed, it must be implemented in app/lib/Date2 first, then we can\n copy the new feature and implement it in here.\n DO NOT add custom features, methods, params or any other modification that is not present in app/lib/Date2\n*/\n\n// · Import dayjs library and plugins\n\nvar utc = __webpack_require__(/*! dayjs/plugin/utc */ \"./node_modules/dayjs/plugin/utc.js\");\nvar timezone = __webpack_require__(/*! dayjs/plugin/timezone */ \"./node_modules/dayjs/plugin/timezone.js\");\n\n// · \ndayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(utc);\ndayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(timezone);\n\n// · \nclass LesliDate {\n #settings = {};\n #datetime = {};\n #format = \"\";\n constructor() {\n let datetime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : dayjs__WEBPACK_IMPORTED_MODULE_0___default()().utc().format();\n let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"%Y-%m-%d %H:%M:%S\";\n /*\n # NOTE: Do not modify settings here,\n # if you need a different date format you should change it in the config file\n # Check the docs for more information: /development/docs/rails-lib-time\n # TODO: User should be able to select an appropiate datetime format in an easy way,\n # the Administration module must be present to the users a curated list of different\n # datetime format options with examples, also user should be able to manually modify\n # the format through an \"advanced view\"\n */\n this.#settings = {\n timeZone: \"America/Guatemala\",\n // get this from Lesli settings\n startWeekOn: \"config[:start_week_on]\",\n format: {\n date: \"%d.%m.%Y\",\n time: \"%H:%M\",\n // 24 hours datetime format (default)\n dateTime: \"%d.%m.%Y %H:%M\",\n // 24 hours datetime format (default)\n dateWords: \"%A / %B %d, %Y\",\n dateTimeWords: \"%A / %B %d, %Y, %H:%M\" // 24 hours datetime in words format (default)\n }\n };\n\n // default date format\n this.#format = this.#setFormat(\"date\");\n\n // get datetime object from user params\n this.#datetime = dayjs__WEBPACK_IMPORTED_MODULE_0___default()(datetime).tz(this.#settings.timeZone);\n }\n date() {\n this.#setFormat(\"date\");\n return this.toString();\n }\n dateTime() {\n this.#setFormat(\"dateTime\");\n return this.toString();\n }\n dateWords() {\n this.#setFormat(\"dateWords\");\n return this.toString();\n }\n\n // convert a datetime object to string representation using defined format\n toString() {\n return this.#datetime.format(this.#format);\n }\n\n //\n #setFormat(format) {\n this.#format = this.#settings.format[format]\n // Convert date Ruby to dayjs format\n .replaceAll(\"%Y\", \"YYYY\").replaceAll(\"%m\", \"MM\").replaceAll(\"%d\", \"DD\")\n // Convert time Ruby to dayjs format\n .replaceAll(\"%H\", \"HH\").replaceAll(\"%M\", \"mm\")\n // Convert words Ruby to dayjs format\n .replaceAll(\"%A\", \"dddd\") // Full day name\n .replaceAll(\"%B\", \"MMMM\"); // Full month name\n }\n}\n\nfunction useLesliDate() {\n return function () {\n let datetime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : dayjs__WEBPACK_IMPORTED_MODULE_0___default()().utc().format();\n let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"%Y-%m-%d %H:%M:%S\";\n return new LesliDate(datetime, format);\n };\n}\n\n//# sourceURL=webpack://lesli/../../enginesdev/lesli-vue/source/composables/date/date.js?");
128
128
 
129
129
  /***/ }),
130
130
 
@@ -179,7 +179,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
179
179
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
180
180
 
181
181
  "use strict";
182
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useLesliUrl: () => (/* binding */ useLesliUrl)\n/* harmony export */ });\n/*\nLesli\n\nCopyright (c) 2023, Lesli Technologies, S. A.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses/.\n\nLesli · Ruby on Rails SaaS Development Framework.\n\nMade with ♥ by https://www.lesli.tech\nBuilding a better future, one line of code at a time.\n\n@contact hello@lesli.tech\n@website https://www.lesli.dev\n@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html\n\n// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~\n// · \n*/\n\n// · URL #builder for Lesli\nclass LesliUrl {\n #params = \"\";\n #base_url = \"\";\n #query = {};\n #path = \"\";\n #url = \"\";\n constructor(base_url, path, params) {\n this.#base_url = base_url;\n this.#params = params;\n this.#path = path;\n }\n\n // build a url for resources mounted at root level\n // this happens on builders engines like MW.\n root(path, params) {\n this.#path = \"\";\n\n // process path template if provided\n if (path) this.#path = this.#path.concat(this.#parsePath(path, params));\n return this;\n }\n\n // build a url for a specific engine\n engine(engine, path, params) {\n // manually add a slash due we are not using native JS url builders\n engine = engine.concat(\"/\");\n\n // return url for the root of the engine\n if (!path) return this.root(engine, params);\n\n // include the engine as part of the path\n return this.root(engine.concat(path), params);\n }\n\n // insert order params into query string\n order(column) {\n let direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"asc\";\n this.#query[\"orderBy\"] = column;\n if (direction) {\n this.#query[\"order\"] = direction;\n }\n return this.#build();\n }\n\n // add standard query param to request paginated data to the server\n paginate(page) {\n let perPage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 15;\n this.#query[\"page\"] = page;\n this.#query[\"perPage\"] = perPage;\n return this.#build();\n }\n\n // add standard query param to request search to the server\n search(text) {\n if (!!text) {\n this.#query[\"search\"] = text;\n }\n return this.#build();\n }\n group(text) {\n if (!!text) {\n this.#query[\"group\"] = text;\n }\n return this.#build();\n }\n\n // add standard query params to request filtered data from the server\n filter(filters) {\n let keys = Object.keys(filters);\n if (!this.#query.f) {\n this.#query[\"f\"] = {};\n }\n keys.forEach(key => {\n this.#query.f[key] = filters[key].join(',');\n });\n return this.#build();\n }\n\n // allow to add custom query params\n query(key, value) {\n this.#query[key] = value;\n return this.#build();\n }\n\n // automatically add auth token if exists in the url query string\n tokenUrl() {\n let urlParams = new URLSearchParams(window.location.search);\n this.#query[\"t\"] = urlParams.get(\"t\");\n return this.#build();\n }\n\n // automatically add auth token if exists in the url query string as param\n tokenShared() {\n // get the token from a \"signed\" url with format:\n // /shared/public/:token/help/tickets/new\n // for this kind of \"signed\" url token is always at position 4 of the string\n let url = window.location.pathname.split('/')[3];\n\n // attach the token as opaque token so the public api is able authenticate the request\n this.#query[\"t\"] = url;\n return this.#build();\n }\n\n // convert the url object to string automatically if object as string is needed\n toString() {\n let extension = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n this.#build(extension);\n return this.#url.toString();\n }\n\n // alias for toString() method\n get s() {\n return this.toString();\n }\n\n // add json extension to the url \n json() {\n return this.toString(\".json\");\n }\n\n // add pdf extension to the url \n pdf() {\n return this.toString(\".pdf\");\n }\n\n // perform a redirect action after #build an url\n // be sure to call this method last always\n go() {\n this.#build();\n window.location.href = this.#url.toString();\n }\n\n // parse, join and create a well formated url object\n #build() {\n let extension = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n // root\n let url = \"/\";\n\n // if path exists for the url\n if (this.#path != \"\") {\n url = url.concat(this.#path);\n }\n\n // normally all the requests are sent to the internal Lesli api\n // so, the requests should include the json suffix\n if (extension) {\n url = url.concat(extension);\n }\n\n // concat query string if available\n url = url.concat(this.#parseQuery(this.#query));\n\n // #build a native URL object\n this.#url = url;\n\n // return this to enable methods chaining pattern\n return this;\n }\n\n // parse a string template into a string path\n // examples:\n // domain.com/user/:id, { id: 1 }\n // domain.com/user/:id, 1\n // result: domain.com/user/1\n // this is good to avoid string interpolation :)\n #parsePath(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n // shortcut to get specific resource through id\n if (typeof params == 'string' || typeof params == 'number') {\n params = {\n id: params\n };\n }\n\n // remaining params are useful if we want to work with the params\n // that does not belongs to a any part of the path template\n const remainingParams = {\n ...params\n };\n\n // compile the string template to assign values to the variables\n const renderedPath = path.replace(/:[_A-Za-z][_A-Za-z0-9]*/g, p => {\n let key = p.slice(1);\n delete remainingParams[key];\n return encodeURIComponent(params[key]);\n });\n for (let param in remainingParams) {\n this.#query[param] = remainingParams[param];\n }\n return renderedPath;\n }\n\n // convert a key value object into a standard queryString. This custom implementation\n // supports deep object parsing and array parsing\n // example: { name: {first: \"luis\"}, age: 25 }\n // result: domain.com?name[first]=luis&age=25\n #parseQuery(query) {\n function recursion(query, path) {\n if (Array.isArray(query)) {\n query.forEach(function (element) {\n recursion(element, path + \"[]\");\n });\n return;\n }\n if (query !== null && typeof query === \"object\") {\n Object.keys(query).forEach(function (param) {\n recursion(query[param], path + \"[\" + param + \"]\");\n });\n return;\n }\n data.push(path + \"=\" + query);\n }\n var data = [];\n Object.keys(query).forEach(function (param) {\n recursion(query[param], param);\n });\n if (data.length > 0) {\n return \"?\".concat(data.join(\"&\"));\n }\n return \"\";\n }\n}\nfunction useLesliUrl() {\n const root = \"/\";\n return {\n // · Redirect to specific url\n go() {\n let url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n document.location.href = url;\n },\n // · Get well formated url\n to() {\n let path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n if (path) {\n return root.concat(path);\n }\n return root;\n },\n // · Build a url for core requests\n root(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().root(path, params);\n },\n // · Build a url for administration area\n lesli(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().root(path, params);\n },\n // · Build a url for core administration area\n admin(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"admin\", path, params);\n },\n // · Build a url for CloudAudit engine\n audit(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"audit\", path, params);\n },\n // · Build a url for CloudBabel engine\n babel(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"babel\", path, params);\n },\n // · Build a url for CloudBell engine\n bell(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"bell\", path, params);\n },\n // · Build a url for CloudHelp engine\n help(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"help\", path, params);\n },\n // · Build a url for CloudMailer engine\n mailer(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"mailer\", path, params);\n },\n // · Build a url for CloudTalk engine\n talk(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"talk\", path, params);\n },\n // · Build a url for CloudFocus engine\n focus(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"focus\", path, params);\n },\n // · Build a url for CloudTime engine\n time(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"time\", path, params);\n },\n // · Build a url for CloudDriver engine\n driver(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"driver\", path, params);\n },\n // · Build a url for CloudSocial engine\n social(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"social\", path, params);\n },\n // · Build a url for CloudWord engine\n word(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"word\", path, params);\n },\n // · Build a url for CloudTeam engine\n team(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"team\", path, params);\n },\n // · Build a url for CloudScraper engine\n scraper(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"scraper\", path, params);\n },\n // · Build a url for CloudShared engine\n shared(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"shared\", path, params);\n },\n // · Build a url for CloudShared engine\n vault(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"vault\", path, params);\n },\n // · Build a url for CloudAuthority engine\n authority(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"authority\", path, params);\n }\n };\n}\n\n//# sourceURL=webpack://lesli/../../enginesdev/lesli-vue/source/composables/url/url.js?");
182
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useLesliUrl: () => (/* binding */ useLesliUrl)\n/* harmony export */ });\n/*\nLesli\n\nCopyright (c) 2023, Lesli Technologies, S. A.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses/.\n\nLesli · Ruby on Rails SaaS Development Framework.\n\nMade with ♥ by https://www.lesli.tech\nBuilding a better future, one line of code at a time.\n\n@contact hello@lesli.tech\n@website https://www.lesli.dev\n@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html\n\n// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~\n// · \n*/\n\n// · URL #builder for Lesli\nclass LesliUrl {\n #params = \"\";\n #base_url = \"\";\n #query = {};\n #path = \"\";\n #url = \"\";\n constructor(base_url, path, params) {\n this.#base_url = base_url;\n this.#params = params;\n this.#path = path;\n }\n\n // build a url for resources mounted at root level\n // this happens on builders engines like MW.\n root(path, params) {\n this.#path = \"\";\n\n // process path template if provided\n if (path) this.#path = this.#path.concat(this.#parsePath(path, params));\n return this;\n }\n\n // build a url for a specific engine\n engine(engine, path, params) {\n // manually add a slash due we are not using native JS url builders\n engine = engine.concat(\"/\");\n\n // return url for the root of the engine\n if (!path) return this.root(engine, params);\n\n // include the engine as part of the path\n return this.root(engine.concat(path), params);\n }\n\n // insert order params into query string\n order(column) {\n let direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"asc\";\n this.#query[\"orderBy\"] = column;\n if (direction) {\n this.#query[\"order\"] = direction;\n }\n return this.#build();\n }\n\n // add standard query param to request paginated data to the server\n paginate(page) {\n let perPage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 12;\n this.#query[\"page\"] = page;\n this.#query[\"perPage\"] = perPage;\n return this.#build();\n }\n\n // add standard query param to request search to the server\n search(text) {\n if (!!text) {\n this.#query[\"search\"] = text;\n }\n return this.#build();\n }\n group(text) {\n if (!!text) {\n this.#query[\"group\"] = text;\n }\n return this.#build();\n }\n\n // add standard query params to request filtered data from the server\n filter(filters) {\n let keys = Object.keys(filters);\n if (!this.#query.f) {\n this.#query[\"f\"] = {};\n }\n keys.forEach(key => {\n this.#query.f[key] = filters[key].join(',');\n });\n return this.#build();\n }\n\n // allow to add custom query params\n query(key, value) {\n this.#query[key] = value;\n return this.#build();\n }\n\n // automatically add auth token if exists in the url query string\n tokenUrl() {\n let urlParams = new URLSearchParams(window.location.search);\n this.#query[\"t\"] = urlParams.get(\"t\");\n return this.#build();\n }\n\n // automatically add auth token if exists in the url query string as param\n tokenShared() {\n // get the token from a \"signed\" url with format:\n // /shared/public/:token/help/tickets/new\n // for this kind of \"signed\" url token is always at position 4 of the string\n let url = window.location.pathname.split('/')[3];\n\n // attach the token as opaque token so the public api is able authenticate the request\n this.#query[\"t\"] = url;\n return this.#build();\n }\n\n // convert the url object to string automatically if object as string is needed\n toString() {\n let extension = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n this.#build(extension);\n return this.#url.toString();\n }\n\n // alias for toString() method\n get s() {\n return this.toString();\n }\n\n // add json extension to the url \n json() {\n return this.toString(\".json\");\n }\n\n // add pdf extension to the url \n pdf() {\n return this.toString(\".pdf\");\n }\n\n // perform a redirect action after #build an url\n // be sure to call this method last always\n go() {\n this.#build();\n window.location.href = this.#url.toString();\n }\n\n // parse, join and create a well formated url object\n #build() {\n let extension = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n // root\n let url = \"/\";\n\n // if path exists for the url\n if (this.#path != \"\") {\n url = url.concat(this.#path);\n }\n\n // normally all the requests are sent to the internal Lesli api\n // so, the requests should include the json suffix\n if (extension) {\n url = url.concat(extension);\n }\n\n // concat query string if available\n url = url.concat(this.#parseQuery(this.#query));\n\n // #build a native URL object\n this.#url = url;\n\n // return this to enable methods chaining pattern\n return this;\n }\n\n // parse a string template into a string path\n // examples:\n // domain.com/user/:id, { id: 1 }\n // domain.com/user/:id, 1\n // result: domain.com/user/1\n // this is good to avoid string interpolation :)\n #parsePath(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n // shortcut to get specific resource through id\n if (typeof params == 'string' || typeof params == 'number') {\n params = {\n id: params\n };\n }\n\n // remaining params are useful if we want to work with the params\n // that does not belongs to a any part of the path template\n const remainingParams = {\n ...params\n };\n\n // compile the string template to assign values to the variables\n const renderedPath = path.replace(/:[_A-Za-z][_A-Za-z0-9]*/g, p => {\n let key = p.slice(1);\n delete remainingParams[key];\n return encodeURIComponent(params[key]);\n });\n for (let param in remainingParams) {\n this.#query[param] = remainingParams[param];\n }\n return renderedPath;\n }\n\n // convert a key value object into a standard queryString. This custom implementation\n // supports deep object parsing and array parsing\n // example: { name: {first: \"luis\"}, age: 25 }\n // result: domain.com?name[first]=luis&age=25\n #parseQuery(query) {\n function recursion(query, path) {\n if (Array.isArray(query)) {\n query.forEach(function (element) {\n recursion(element, path + \"[]\");\n });\n return;\n }\n if (query !== null && typeof query === \"object\") {\n Object.keys(query).forEach(function (param) {\n recursion(query[param], path + \"[\" + param + \"]\");\n });\n return;\n }\n data.push(path + \"=\" + query);\n }\n var data = [];\n Object.keys(query).forEach(function (param) {\n recursion(query[param], param);\n });\n if (data.length > 0) {\n return \"?\".concat(data.join(\"&\"));\n }\n return \"\";\n }\n}\nfunction useLesliUrl() {\n const root = \"/\";\n return {\n // · Redirect to specific url\n go() {\n let url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n document.location.href = url;\n },\n // · Get well formated url\n to() {\n let path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n if (path) {\n return root.concat(path);\n }\n return root;\n },\n // · Build a url for core requests\n root(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().root(path, params);\n },\n // · Build a url for administration area\n lesli(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"lesli\", path, params);\n },\n // · Build a url for core administration area\n admin(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"admin\", path, params);\n },\n // · Build a url for CloudAudit engine\n audit(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"audit\", path, params);\n },\n // · Build a url for CloudBabel engine\n babel(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"babel\", path, params);\n },\n // · Build a url for CloudBell engine\n bell(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"bell\", path, params);\n },\n // · Build a url for CloudHelp engine\n help(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"help\", path, params);\n },\n // · Build a url for CloudMailer engine\n mailer(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"mailer\", path, params);\n },\n // · Build a url for CloudTalk engine\n talk(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"talk\", path, params);\n },\n // · Build a url for CloudFocus engine\n focus(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"focus\", path, params);\n },\n // · Build a url for CloudTime engine\n time(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"time\", path, params);\n },\n // · Build a url for CloudDriver engine\n driver(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"driver\", path, params);\n },\n // · Build a url for CloudSocial engine\n social(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"social\", path, params);\n },\n // · Build a url for CloudWord engine\n word(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"word\", path, params);\n },\n // · Build a url for CloudTeam engine\n team(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"team\", path, params);\n },\n // · Build a url for CloudScraper engine\n scraper(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"scraper\", path, params);\n },\n // · Build a url for CloudShared engine\n shared(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"shared\", path, params);\n },\n // · Build a url for CloudShared engine\n vault(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"vault\", path, params);\n },\n // · Build a url for CloudAuthority engine\n authority(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"authority\", path, params);\n }\n };\n}\n\n//# sourceURL=webpack://lesli/../../enginesdev/lesli-vue/source/composables/url/url.js?");
183
183
 
184
184
  /***/ }),
185
185
 
@@ -82,7 +82,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
82
82
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
83
83
 
84
84
  "use strict";
85
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var Lesli_public__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! Lesli/public */ \"./lib/vue/public.js\");\n/*\nLesli\n\nCopyright (c) 2023, Lesli Technologies, S. A.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses/.\n\nLesli · Your Smart Business Assistant. \n\nMade with ♥ by https://www.lesli.tech\nBuilding a better future, one line of code at a time.\n\n@contact hello@lesli.tech\n@website https://lesli.tech\n@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html\n\n// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~\n// · \n*/\n\n// · \n\n\n// · \n(0,Lesli_public__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n data() {\n return {\n loading: false,\n sign_in: {\n email: \"hello@lesli.tech\",\n password: \"tardis2023$\"\n },\n notification: {\n message: \"\",\n show: false,\n type: \"default\"\n },\n errors: [\"holi\"]\n };\n },\n mounted() {\n this.$refs?.email?.focus();\n },\n methods: {\n togglePasswordInput() {\n if (this.$refs.password.type === \"password\") {\n this.$refs.password.type = \"text\";\n } else {\n this.$refs.password.type = \"password\";\n }\n },\n validateEmail() {\n if (/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/.test(this.sign_in.email)) {\n console.log(\"error\");\n }\n },\n build_redirect_url() {\n let default_path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n // redirect to the root of the domain by default\n let redirect_url = \"/\";\n try {\n // search for a redirection route in the url params\n redirect_url = Object.fromEntries(new URLSearchParams(window.location.search)).r;\n } catch (error) {}\n\n // redirect to the default path if: \n // - there is no query params with redirection\n if (!redirect_url && default_path) {\n redirect_url = default_path;\n }\n\n // redirect to the root if: \n // - error parsing redirection route\n // - there is no query params with redirection\n if (!redirect_url) {\n redirect_url = \"/\";\n }\n return redirect_url;\n },\n postLogin(event) {\n this.loading = true;\n event.preventDefault();\n this.notification.show = false;\n let data = {\n user: {\n email: this.sign_in.email.toLowerCase(),\n password: this.sign_in.password\n }\n };\n this.http.post(\"/login\", data).then(response => {\n this.url.go(this.build_redirect_url(response.default_path));\n }).catch(error => {\n this.showNotification(error.message);\n }).finally(() => {\n this.loading = false;\n });\n },\n typing() {\n this.notification.message = \"\";\n this.notification.show = false;\n this.notification.type = \"default\";\n },\n showNotification(message) {\n let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"danger\";\n this.notification.message = message;\n this.notification.type = type;\n this.notification.show = true;\n }\n }\n});\n\n//# sourceURL=webpack://lesli/./lib/vue/devise/sessions.js?");
85
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var Lesli_public__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! Lesli/public */ \"./lib/vue/public.js\");\n/*\nLesli\n\nCopyright (c) 2023, Lesli Technologies, S. A.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses/.\n\nLesli · Ruby on Rails SaaS Development Framework.\n\nMade with ♥ by https://www.lesli.tech\nBuilding a better future, one line of code at a time.\n\n@contact hello@lesli.tech\n@website https://www.lesli.tech\n@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html\n\n// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~\n// · \n*/\n\n// · \n\n\n// · \n(0,Lesli_public__WEBPACK_IMPORTED_MODULE_0__[\"default\"])({\n data() {\n return {\n loading: false,\n sign_in: {\n email: \"\",\n password: \"\"\n },\n notification: {\n message: \"\",\n show: false,\n type: \"default\"\n },\n errors: []\n };\n },\n mounted() {\n this.$refs?.email?.focus();\n if (true) {\n this.sign_in.email = \"hello@lesli.tech\";\n this.sign_in.password = \"tardis2023$\";\n }\n },\n methods: {\n togglePasswordInput() {\n if (this.$refs.password.type === \"password\") {\n this.$refs.password.type = \"text\";\n } else {\n this.$refs.password.type = \"password\";\n }\n },\n validateEmail() {\n if (/^\\w+([\\.-]?\\w+)*@\\w+([\\.-]?\\w+)*(\\.\\w{2,3})+$/.test(this.sign_in.email)) {\n console.log(\"error\");\n }\n },\n build_redirect_url() {\n let default_path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n // redirect to the root of the domain by default\n let redirect_url = \"/\";\n try {\n // search for a redirection route in the url params\n redirect_url = Object.fromEntries(new URLSearchParams(window.location.search)).r;\n } catch (error) {}\n\n // redirect to the default path if: \n // - there is no query params with redirection\n if (!redirect_url && default_path) {\n redirect_url = default_path;\n }\n\n // redirect to the root if: \n // - error parsing redirection route\n // - there is no query params with redirection\n if (!redirect_url) {\n redirect_url = \"/\";\n }\n return redirect_url;\n },\n postLogin(event) {\n this.loading = true;\n event.preventDefault();\n this.notification.show = false;\n let data = {\n user: {\n email: this.sign_in.email.toLowerCase(),\n password: this.sign_in.password\n }\n };\n this.http.post(\"/login\", data).then(response => {\n this.url.go(this.build_redirect_url(response.default_path));\n }).catch(error => {\n this.showNotification(error.message);\n }).finally(() => {\n this.loading = false;\n });\n },\n typing() {\n this.notification.message = \"\";\n this.notification.show = false;\n this.notification.type = \"default\";\n },\n showNotification(message) {\n let type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"danger\";\n this.notification.message = message;\n this.notification.type = type;\n this.notification.show = true;\n }\n }\n});\n\n//# sourceURL=webpack://lesli/./lib/vue/devise/sessions.js?");
86
86
 
87
87
  /***/ }),
88
88
 
@@ -124,7 +124,7 @@ eval("/*\nLesli\n\nCopyright (c) 2021, Lesli Technologies, S. A.\n\nThis program
124
124
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
125
125
 
126
126
  "use strict";
127
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useLesliDate: () => (/* binding */ useLesliDate)\n/* harmony export */ });\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dayjs */ \"./node_modules/dayjs/dayjs.min.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_0__);\n/*\nLesli\n\nCopyright (c) 2023, Lesli Technologies, S. A.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses/.\n\nLesli · Ruby on Rails SaaS Development Framework.\n\nMade with ♥ by https://www.lesli.tech\nBuilding a better future, one line of code at a time.\n\n@contact hello@lesli.tech\n@website https://www.lesli.dev\n@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html\n\n// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~\n// · \n*/\n\n/*\nIMPORTANT: \n This is a JavaScript implementation of app/lib/Date2 RoR lib.\n If any modification or update is needed it must be implemented in app/lib/Date2 first, then we can\n copy the new feature and implement in here.\n DO NOT add custom features, methods, params or any other modification that is not present in app/lib/Date2\n*/\n\n// · Import dayjs library and plugins\n\nvar utc = __webpack_require__(/*! dayjs/plugin/utc */ \"./node_modules/dayjs/plugin/utc.js\");\nvar timezone = __webpack_require__(/*! dayjs/plugin/timezone */ \"./node_modules/dayjs/plugin/timezone.js\");\n\n// · \ndayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(utc);\ndayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(timezone);\n\n// · \nclass LesliDate {\n #settings = {};\n #datetime = {};\n #format = \"\";\n constructor() {\n let datetime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : dayjs__WEBPACK_IMPORTED_MODULE_0___default()().utc().format();\n let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"%Y-%m-%d %H:%M:%S\";\n /*\n # NOTE: Do not modify settings here,\n # if you need a different date format you should change it in the config file\n # Check the docs for more information: /development/docs/rails-lib-time\n # TODO: User should be able to select an appropiate datetime format in an easy way,\n # the Administration module must be present to the users a curated list of different\n # datetime format options with examples, also user should be able to manually modify\n # the format through an \"advanced view\"\n */\n this.#settings = {\n timeZone: \"America/Guatemala\",\n // get this from Lesli settings\n startWeekOn: \"config[:start_week_on]\",\n format: {\n date: \"%d.%m.%Y\",\n time: \"%H:%M\",\n // 24 hours datetime format (default)\n dateTime: \"%d.%m.%Y %H:%M\",\n // 24 hours datetime format (default)\n dateWords: \"%A, %B %d, %Y\",\n dateTimeWords: \"%A, %B %d, %Y, %H:%M\" // 24 hours datetime in words format (default)\n }\n };\n\n // default date format\n this.#format = this.#setFormat(\"date\");\n\n // get datetime object from user params\n this.#datetime = dayjs__WEBPACK_IMPORTED_MODULE_0___default()(datetime).tz(this.#settings.timeZone);\n }\n date() {\n this.#setFormat(\"date\");\n return this.toString();\n }\n dateTime() {\n this.#setFormat(\"dateTime\");\n return this.toString();\n }\n dateWords() {\n this.#setFormat(\"dateWords\");\n return this;\n }\n\n // convert a datetime object to string representation using defined format\n toString() {\n return this.#datetime.format(this.#format);\n }\n\n //\n #setFormat(format) {\n this.#format = this.#settings.format[format]\n // Convert date Ruby to dayjs format\n .replaceAll(\"%Y\", \"YYYY\").replaceAll(\"%m\", \"MM\").replaceAll(\"%d\", \"DD\")\n // Convert time Ruby to dayjs format\n .replaceAll(\"%H\", \"HH\").replaceAll(\"%M\", \"mm\")\n // Convert words Ruby to dayjs format\n .replaceAll(\"%A\", \"dddd\") // Full day name\n .replaceAll(\"%B\", \"MMMM\"); // Full month name\n }\n}\n\nfunction useLesliDate() {\n return function () {\n let datetime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : dayjs__WEBPACK_IMPORTED_MODULE_0___default()().utc().format();\n let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"%Y-%m-%d %H:%M:%S\";\n return new LesliDate(datetime, format);\n };\n}\n\n//# sourceURL=webpack://lesli/../../enginesdev/lesli-vue/source/composables/date/date.js?");
127
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useLesliDate: () => (/* binding */ useLesliDate)\n/* harmony export */ });\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! dayjs */ \"./node_modules/dayjs/dayjs.min.js\");\n/* harmony import */ var dayjs__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(dayjs__WEBPACK_IMPORTED_MODULE_0__);\n/*\nLesli\n\nCopyright (c) 2023, Lesli Technologies, S. A.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses/.\n\nLesli · Ruby on Rails SaaS Development Framework.\n\nMade with ♥ by https://www.lesli.tech\nBuilding a better future, one line of code at a time.\n\n@contact hello@lesli.tech\n@website https://www.lesli.dev\n@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html\n\n// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~\n// · \n*/\n\n/*\nIMPORTANT: \n This is a JavaScript implementation of app/lib/Date2 RoR lib.\n If any modification or update is needed, it must be implemented in app/lib/Date2 first, then we can\n copy the new feature and implement it in here.\n DO NOT add custom features, methods, params or any other modification that is not present in app/lib/Date2\n*/\n\n// · Import dayjs library and plugins\n\nvar utc = __webpack_require__(/*! dayjs/plugin/utc */ \"./node_modules/dayjs/plugin/utc.js\");\nvar timezone = __webpack_require__(/*! dayjs/plugin/timezone */ \"./node_modules/dayjs/plugin/timezone.js\");\n\n// · \ndayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(utc);\ndayjs__WEBPACK_IMPORTED_MODULE_0___default().extend(timezone);\n\n// · \nclass LesliDate {\n #settings = {};\n #datetime = {};\n #format = \"\";\n constructor() {\n let datetime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : dayjs__WEBPACK_IMPORTED_MODULE_0___default()().utc().format();\n let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"%Y-%m-%d %H:%M:%S\";\n /*\n # NOTE: Do not modify settings here,\n # if you need a different date format you should change it in the config file\n # Check the docs for more information: /development/docs/rails-lib-time\n # TODO: User should be able to select an appropiate datetime format in an easy way,\n # the Administration module must be present to the users a curated list of different\n # datetime format options with examples, also user should be able to manually modify\n # the format through an \"advanced view\"\n */\n this.#settings = {\n timeZone: \"America/Guatemala\",\n // get this from Lesli settings\n startWeekOn: \"config[:start_week_on]\",\n format: {\n date: \"%d.%m.%Y\",\n time: \"%H:%M\",\n // 24 hours datetime format (default)\n dateTime: \"%d.%m.%Y %H:%M\",\n // 24 hours datetime format (default)\n dateWords: \"%A / %B %d, %Y\",\n dateTimeWords: \"%A / %B %d, %Y, %H:%M\" // 24 hours datetime in words format (default)\n }\n };\n\n // default date format\n this.#format = this.#setFormat(\"date\");\n\n // get datetime object from user params\n this.#datetime = dayjs__WEBPACK_IMPORTED_MODULE_0___default()(datetime).tz(this.#settings.timeZone);\n }\n date() {\n this.#setFormat(\"date\");\n return this.toString();\n }\n dateTime() {\n this.#setFormat(\"dateTime\");\n return this.toString();\n }\n dateWords() {\n this.#setFormat(\"dateWords\");\n return this.toString();\n }\n\n // convert a datetime object to string representation using defined format\n toString() {\n return this.#datetime.format(this.#format);\n }\n\n //\n #setFormat(format) {\n this.#format = this.#settings.format[format]\n // Convert date Ruby to dayjs format\n .replaceAll(\"%Y\", \"YYYY\").replaceAll(\"%m\", \"MM\").replaceAll(\"%d\", \"DD\")\n // Convert time Ruby to dayjs format\n .replaceAll(\"%H\", \"HH\").replaceAll(\"%M\", \"mm\")\n // Convert words Ruby to dayjs format\n .replaceAll(\"%A\", \"dddd\") // Full day name\n .replaceAll(\"%B\", \"MMMM\"); // Full month name\n }\n}\n\nfunction useLesliDate() {\n return function () {\n let datetime = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : dayjs__WEBPACK_IMPORTED_MODULE_0___default()().utc().format();\n let format = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"%Y-%m-%d %H:%M:%S\";\n return new LesliDate(datetime, format);\n };\n}\n\n//# sourceURL=webpack://lesli/../../enginesdev/lesli-vue/source/composables/date/date.js?");
128
128
 
129
129
  /***/ }),
130
130
 
@@ -179,7 +179,7 @@ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpac
179
179
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
180
180
 
181
181
  "use strict";
182
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useLesliUrl: () => (/* binding */ useLesliUrl)\n/* harmony export */ });\n/*\nLesli\n\nCopyright (c) 2023, Lesli Technologies, S. A.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses/.\n\nLesli · Ruby on Rails SaaS Development Framework.\n\nMade with ♥ by https://www.lesli.tech\nBuilding a better future, one line of code at a time.\n\n@contact hello@lesli.tech\n@website https://www.lesli.dev\n@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html\n\n// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~\n// · \n*/\n\n// · URL #builder for Lesli\nclass LesliUrl {\n #params = \"\";\n #base_url = \"\";\n #query = {};\n #path = \"\";\n #url = \"\";\n constructor(base_url, path, params) {\n this.#base_url = base_url;\n this.#params = params;\n this.#path = path;\n }\n\n // build a url for resources mounted at root level\n // this happens on builders engines like MW.\n root(path, params) {\n this.#path = \"\";\n\n // process path template if provided\n if (path) this.#path = this.#path.concat(this.#parsePath(path, params));\n return this;\n }\n\n // build a url for a specific engine\n engine(engine, path, params) {\n // manually add a slash due we are not using native JS url builders\n engine = engine.concat(\"/\");\n\n // return url for the root of the engine\n if (!path) return this.root(engine, params);\n\n // include the engine as part of the path\n return this.root(engine.concat(path), params);\n }\n\n // insert order params into query string\n order(column) {\n let direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"asc\";\n this.#query[\"orderBy\"] = column;\n if (direction) {\n this.#query[\"order\"] = direction;\n }\n return this.#build();\n }\n\n // add standard query param to request paginated data to the server\n paginate(page) {\n let perPage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 15;\n this.#query[\"page\"] = page;\n this.#query[\"perPage\"] = perPage;\n return this.#build();\n }\n\n // add standard query param to request search to the server\n search(text) {\n if (!!text) {\n this.#query[\"search\"] = text;\n }\n return this.#build();\n }\n group(text) {\n if (!!text) {\n this.#query[\"group\"] = text;\n }\n return this.#build();\n }\n\n // add standard query params to request filtered data from the server\n filter(filters) {\n let keys = Object.keys(filters);\n if (!this.#query.f) {\n this.#query[\"f\"] = {};\n }\n keys.forEach(key => {\n this.#query.f[key] = filters[key].join(',');\n });\n return this.#build();\n }\n\n // allow to add custom query params\n query(key, value) {\n this.#query[key] = value;\n return this.#build();\n }\n\n // automatically add auth token if exists in the url query string\n tokenUrl() {\n let urlParams = new URLSearchParams(window.location.search);\n this.#query[\"t\"] = urlParams.get(\"t\");\n return this.#build();\n }\n\n // automatically add auth token if exists in the url query string as param\n tokenShared() {\n // get the token from a \"signed\" url with format:\n // /shared/public/:token/help/tickets/new\n // for this kind of \"signed\" url token is always at position 4 of the string\n let url = window.location.pathname.split('/')[3];\n\n // attach the token as opaque token so the public api is able authenticate the request\n this.#query[\"t\"] = url;\n return this.#build();\n }\n\n // convert the url object to string automatically if object as string is needed\n toString() {\n let extension = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n this.#build(extension);\n return this.#url.toString();\n }\n\n // alias for toString() method\n get s() {\n return this.toString();\n }\n\n // add json extension to the url \n json() {\n return this.toString(\".json\");\n }\n\n // add pdf extension to the url \n pdf() {\n return this.toString(\".pdf\");\n }\n\n // perform a redirect action after #build an url\n // be sure to call this method last always\n go() {\n this.#build();\n window.location.href = this.#url.toString();\n }\n\n // parse, join and create a well formated url object\n #build() {\n let extension = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n // root\n let url = \"/\";\n\n // if path exists for the url\n if (this.#path != \"\") {\n url = url.concat(this.#path);\n }\n\n // normally all the requests are sent to the internal Lesli api\n // so, the requests should include the json suffix\n if (extension) {\n url = url.concat(extension);\n }\n\n // concat query string if available\n url = url.concat(this.#parseQuery(this.#query));\n\n // #build a native URL object\n this.#url = url;\n\n // return this to enable methods chaining pattern\n return this;\n }\n\n // parse a string template into a string path\n // examples:\n // domain.com/user/:id, { id: 1 }\n // domain.com/user/:id, 1\n // result: domain.com/user/1\n // this is good to avoid string interpolation :)\n #parsePath(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n // shortcut to get specific resource through id\n if (typeof params == 'string' || typeof params == 'number') {\n params = {\n id: params\n };\n }\n\n // remaining params are useful if we want to work with the params\n // that does not belongs to a any part of the path template\n const remainingParams = {\n ...params\n };\n\n // compile the string template to assign values to the variables\n const renderedPath = path.replace(/:[_A-Za-z][_A-Za-z0-9]*/g, p => {\n let key = p.slice(1);\n delete remainingParams[key];\n return encodeURIComponent(params[key]);\n });\n for (let param in remainingParams) {\n this.#query[param] = remainingParams[param];\n }\n return renderedPath;\n }\n\n // convert a key value object into a standard queryString. This custom implementation\n // supports deep object parsing and array parsing\n // example: { name: {first: \"luis\"}, age: 25 }\n // result: domain.com?name[first]=luis&age=25\n #parseQuery(query) {\n function recursion(query, path) {\n if (Array.isArray(query)) {\n query.forEach(function (element) {\n recursion(element, path + \"[]\");\n });\n return;\n }\n if (query !== null && typeof query === \"object\") {\n Object.keys(query).forEach(function (param) {\n recursion(query[param], path + \"[\" + param + \"]\");\n });\n return;\n }\n data.push(path + \"=\" + query);\n }\n var data = [];\n Object.keys(query).forEach(function (param) {\n recursion(query[param], param);\n });\n if (data.length > 0) {\n return \"?\".concat(data.join(\"&\"));\n }\n return \"\";\n }\n}\nfunction useLesliUrl() {\n const root = \"/\";\n return {\n // · Redirect to specific url\n go() {\n let url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n document.location.href = url;\n },\n // · Get well formated url\n to() {\n let path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n if (path) {\n return root.concat(path);\n }\n return root;\n },\n // · Build a url for core requests\n root(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().root(path, params);\n },\n // · Build a url for administration area\n lesli(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().root(path, params);\n },\n // · Build a url for core administration area\n admin(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"admin\", path, params);\n },\n // · Build a url for CloudAudit engine\n audit(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"audit\", path, params);\n },\n // · Build a url for CloudBabel engine\n babel(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"babel\", path, params);\n },\n // · Build a url for CloudBell engine\n bell(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"bell\", path, params);\n },\n // · Build a url for CloudHelp engine\n help(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"help\", path, params);\n },\n // · Build a url for CloudMailer engine\n mailer(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"mailer\", path, params);\n },\n // · Build a url for CloudTalk engine\n talk(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"talk\", path, params);\n },\n // · Build a url for CloudFocus engine\n focus(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"focus\", path, params);\n },\n // · Build a url for CloudTime engine\n time(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"time\", path, params);\n },\n // · Build a url for CloudDriver engine\n driver(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"driver\", path, params);\n },\n // · Build a url for CloudSocial engine\n social(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"social\", path, params);\n },\n // · Build a url for CloudWord engine\n word(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"word\", path, params);\n },\n // · Build a url for CloudTeam engine\n team(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"team\", path, params);\n },\n // · Build a url for CloudScraper engine\n scraper(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"scraper\", path, params);\n },\n // · Build a url for CloudShared engine\n shared(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"shared\", path, params);\n },\n // · Build a url for CloudShared engine\n vault(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"vault\", path, params);\n },\n // · Build a url for CloudAuthority engine\n authority(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"authority\", path, params);\n }\n };\n}\n\n//# sourceURL=webpack://lesli/../../enginesdev/lesli-vue/source/composables/url/url.js?");
182
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export */ __webpack_require__.d(__webpack_exports__, {\n/* harmony export */ useLesliUrl: () => (/* binding */ useLesliUrl)\n/* harmony export */ });\n/*\nLesli\n\nCopyright (c) 2023, Lesli Technologies, S. A.\n\nThis program is free software: you can redistribute it and/or modify\nit under the terms of the GNU General Public License as published by\nthe Free Software Foundation, either version 3 of the License, or\n(at your option) any later version.\n\nThis program is distributed in the hope that it will be useful,\nbut WITHOUT ANY WARRANTY; without even the implied warranty of\nMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\nGNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License\nalong with this program. If not, see http://www.gnu.org/licenses/.\n\nLesli · Ruby on Rails SaaS Development Framework.\n\nMade with ♥ by https://www.lesli.tech\nBuilding a better future, one line of code at a time.\n\n@contact hello@lesli.tech\n@website https://www.lesli.dev\n@license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html\n\n// · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~\n// · \n*/\n\n// · URL #builder for Lesli\nclass LesliUrl {\n #params = \"\";\n #base_url = \"\";\n #query = {};\n #path = \"\";\n #url = \"\";\n constructor(base_url, path, params) {\n this.#base_url = base_url;\n this.#params = params;\n this.#path = path;\n }\n\n // build a url for resources mounted at root level\n // this happens on builders engines like MW.\n root(path, params) {\n this.#path = \"\";\n\n // process path template if provided\n if (path) this.#path = this.#path.concat(this.#parsePath(path, params));\n return this;\n }\n\n // build a url for a specific engine\n engine(engine, path, params) {\n // manually add a slash due we are not using native JS url builders\n engine = engine.concat(\"/\");\n\n // return url for the root of the engine\n if (!path) return this.root(engine, params);\n\n // include the engine as part of the path\n return this.root(engine.concat(path), params);\n }\n\n // insert order params into query string\n order(column) {\n let direction = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : \"asc\";\n this.#query[\"orderBy\"] = column;\n if (direction) {\n this.#query[\"order\"] = direction;\n }\n return this.#build();\n }\n\n // add standard query param to request paginated data to the server\n paginate(page) {\n let perPage = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 12;\n this.#query[\"page\"] = page;\n this.#query[\"perPage\"] = perPage;\n return this.#build();\n }\n\n // add standard query param to request search to the server\n search(text) {\n if (!!text) {\n this.#query[\"search\"] = text;\n }\n return this.#build();\n }\n group(text) {\n if (!!text) {\n this.#query[\"group\"] = text;\n }\n return this.#build();\n }\n\n // add standard query params to request filtered data from the server\n filter(filters) {\n let keys = Object.keys(filters);\n if (!this.#query.f) {\n this.#query[\"f\"] = {};\n }\n keys.forEach(key => {\n this.#query.f[key] = filters[key].join(',');\n });\n return this.#build();\n }\n\n // allow to add custom query params\n query(key, value) {\n this.#query[key] = value;\n return this.#build();\n }\n\n // automatically add auth token if exists in the url query string\n tokenUrl() {\n let urlParams = new URLSearchParams(window.location.search);\n this.#query[\"t\"] = urlParams.get(\"t\");\n return this.#build();\n }\n\n // automatically add auth token if exists in the url query string as param\n tokenShared() {\n // get the token from a \"signed\" url with format:\n // /shared/public/:token/help/tickets/new\n // for this kind of \"signed\" url token is always at position 4 of the string\n let url = window.location.pathname.split('/')[3];\n\n // attach the token as opaque token so the public api is able authenticate the request\n this.#query[\"t\"] = url;\n return this.#build();\n }\n\n // convert the url object to string automatically if object as string is needed\n toString() {\n let extension = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n this.#build(extension);\n return this.#url.toString();\n }\n\n // alias for toString() method\n get s() {\n return this.toString();\n }\n\n // add json extension to the url \n json() {\n return this.toString(\".json\");\n }\n\n // add pdf extension to the url \n pdf() {\n return this.toString(\".pdf\");\n }\n\n // perform a redirect action after #build an url\n // be sure to call this method last always\n go() {\n this.#build();\n window.location.href = this.#url.toString();\n }\n\n // parse, join and create a well formated url object\n #build() {\n let extension = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n // root\n let url = \"/\";\n\n // if path exists for the url\n if (this.#path != \"\") {\n url = url.concat(this.#path);\n }\n\n // normally all the requests are sent to the internal Lesli api\n // so, the requests should include the json suffix\n if (extension) {\n url = url.concat(extension);\n }\n\n // concat query string if available\n url = url.concat(this.#parseQuery(this.#query));\n\n // #build a native URL object\n this.#url = url;\n\n // return this to enable methods chaining pattern\n return this;\n }\n\n // parse a string template into a string path\n // examples:\n // domain.com/user/:id, { id: 1 }\n // domain.com/user/:id, 1\n // result: domain.com/user/1\n // this is good to avoid string interpolation :)\n #parsePath(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n // shortcut to get specific resource through id\n if (typeof params == 'string' || typeof params == 'number') {\n params = {\n id: params\n };\n }\n\n // remaining params are useful if we want to work with the params\n // that does not belongs to a any part of the path template\n const remainingParams = {\n ...params\n };\n\n // compile the string template to assign values to the variables\n const renderedPath = path.replace(/:[_A-Za-z][_A-Za-z0-9]*/g, p => {\n let key = p.slice(1);\n delete remainingParams[key];\n return encodeURIComponent(params[key]);\n });\n for (let param in remainingParams) {\n this.#query[param] = remainingParams[param];\n }\n return renderedPath;\n }\n\n // convert a key value object into a standard queryString. This custom implementation\n // supports deep object parsing and array parsing\n // example: { name: {first: \"luis\"}, age: 25 }\n // result: domain.com?name[first]=luis&age=25\n #parseQuery(query) {\n function recursion(query, path) {\n if (Array.isArray(query)) {\n query.forEach(function (element) {\n recursion(element, path + \"[]\");\n });\n return;\n }\n if (query !== null && typeof query === \"object\") {\n Object.keys(query).forEach(function (param) {\n recursion(query[param], path + \"[\" + param + \"]\");\n });\n return;\n }\n data.push(path + \"=\" + query);\n }\n var data = [];\n Object.keys(query).forEach(function (param) {\n recursion(query[param], param);\n });\n if (data.length > 0) {\n return \"?\".concat(data.join(\"&\"));\n }\n return \"\";\n }\n}\nfunction useLesliUrl() {\n const root = \"/\";\n return {\n // · Redirect to specific url\n go() {\n let url = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : \"/\";\n document.location.href = url;\n },\n // · Get well formated url\n to() {\n let path = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : null;\n if (path) {\n return root.concat(path);\n }\n return root;\n },\n // · Build a url for core requests\n root(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().root(path, params);\n },\n // · Build a url for administration area\n lesli(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"lesli\", path, params);\n },\n // · Build a url for core administration area\n admin(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"admin\", path, params);\n },\n // · Build a url for CloudAudit engine\n audit(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"audit\", path, params);\n },\n // · Build a url for CloudBabel engine\n babel(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"babel\", path, params);\n },\n // · Build a url for CloudBell engine\n bell(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"bell\", path, params);\n },\n // · Build a url for CloudHelp engine\n help(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"help\", path, params);\n },\n // · Build a url for CloudMailer engine\n mailer(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"mailer\", path, params);\n },\n // · Build a url for CloudTalk engine\n talk(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"talk\", path, params);\n },\n // · Build a url for CloudFocus engine\n focus(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"focus\", path, params);\n },\n // · Build a url for CloudTime engine\n time(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"time\", path, params);\n },\n // · Build a url for CloudDriver engine\n driver(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"driver\", path, params);\n },\n // · Build a url for CloudSocial engine\n social(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"social\", path, params);\n },\n // · Build a url for CloudWord engine\n word(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"word\", path, params);\n },\n // · Build a url for CloudTeam engine\n team(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"team\", path, params);\n },\n // · Build a url for CloudScraper engine\n scraper(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"scraper\", path, params);\n },\n // · Build a url for CloudShared engine\n shared(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"shared\", path, params);\n },\n // · Build a url for CloudShared engine\n vault(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"vault\", path, params);\n },\n // · Build a url for CloudAuthority engine\n authority(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"authority\", path, params);\n }\n };\n}\n\n//# sourceURL=webpack://lesli/../../enginesdev/lesli-vue/source/composables/url/url.js?");
183
183
 
184
184
  /***/ }),
185
185
 
@@ -17,7 +17,7 @@ GNU General Public License for more details.
17
17
  You should have received a copy of the GNU General Public License
18
18
  along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
- Lesli · Ruby on Rails SaaS development platform.
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
22
  Made with ♥ by https://www.lesli.tech
23
23
  Building a better future, one line of code at a time.
@@ -27,7 +27,7 @@ Building a better future, one line of code at a time.
27
27
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
28
 
29
29
  // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
- // ·
30
+ // ·
31
31
  =end
32
32
 
33
33
  module Lesli
@@ -61,7 +61,7 @@ module Lesli
61
61
 
62
62
  I18n.locale = locale
63
63
 
64
- redirect_back(fallback_location: root_authenticated_path)
64
+ redirect_back(fallback_location: request.referer)
65
65
 
66
66
  # This code is not really executed
67
67
  # respond_with_successful({
@@ -17,7 +17,7 @@ GNU General Public License for more details.
17
17
  You should have received a copy of the GNU General Public License
18
18
  along with this program. If not, see http://www.gnu.org/licenses/.
19
19
 
20
- Lesli · Ruby on Rails SaaS development platform.
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
21
 
22
22
  Made with ♥ by https://www.lesli.tech
23
23
  Building a better future, one line of code at a time.
@@ -27,7 +27,7 @@ Building a better future, one line of code at a time.
27
27
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
28
 
29
29
  // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
- // ·
30
+ // ·
31
31
  =end
32
32
 
33
33
  module Lesli
@@ -69,7 +69,7 @@ module Lesli
69
69
  # allowed core methods:
70
70
  # [:index, :create, :update, :destroy, :new, :show, :edit, :options, :search, :resources]
71
71
  def authorize_privileges
72
- L2.info "authorize_privileges start"
72
+
73
73
  # check if user has access to the requested controller
74
74
  # this search is over all the privileges for all the roles of the user
75
75
  granted = current_user.has_privileges_for?(params[:controller], params[:action])
@@ -69,7 +69,7 @@ module Lesli
69
69
  @query = {
70
70
  search: params[:search] || nil,
71
71
  pagination: {
72
- perPage: (params[:perPage] ? params[:perPage].to_i : 15),
72
+ perPage: (params[:perPage] ? params[:perPage].to_i : 10),
73
73
  page: (params[:page] ? params[:page].to_i : 1)
74
74
  },
75
75
  order: {