lesli 5.0.2 → 5.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (166) hide show
  1. checksums.yaml +4 -4
  2. data/app/assets/config/lesli_manifest.js +2 -1
  3. data/app/assets/javascripts/lesli/users/confirmations.js +32 -0
  4. data/app/assets/javascripts/lesli/users/passwords.js +3 -3
  5. data/app/assets/javascripts/lesli/users/registrations.js +2 -2
  6. data/app/assets/javascripts/lesli/users/sessions.js +2 -2
  7. data/app/assets/stylesheets/lesli/users/confirmations.scss +28 -6
  8. data/app/controllers/lesli/abouts_controller.rb +66 -0
  9. data/app/controllers/lesli/interfaces/application/authorization.rb +2 -2
  10. data/app/controllers/lesli/interfaces/application/logger.rb +14 -38
  11. data/app/controllers/lesli/roles_controller.rb +3 -1
  12. data/app/controllers/users/confirmations_controller.rb +63 -27
  13. data/app/controllers/users/passwords_controller.rb +70 -30
  14. data/app/controllers/users/sessions_controller.rb +2 -4
  15. data/app/lib/lesli/system.rb +13 -5
  16. data/app/mailers/lesli/application_lesli_mailer.rb +8 -19
  17. data/app/mailers/lesli/devise_mailer.rb +29 -3
  18. data/app/models/concerns/account_initializer.rb +91 -0
  19. data/app/models/concerns/{user_guard.rb → user_security.rb} +7 -8
  20. data/app/models/lesli/account.rb +8 -26
  21. data/app/models/lesli/application_lesli_record.rb +1 -0
  22. data/app/models/lesli/descriptor/privilege.rb +38 -0
  23. data/app/models/lesli/descriptor.rb +18 -1
  24. data/app/models/lesli/role/power.rb +70 -0
  25. data/app/models/lesli/role/privilege.rb +38 -0
  26. data/app/models/lesli/role.rb +20 -15
  27. data/app/models/lesli/user/{role.rb → power.rb} +1 -1
  28. data/app/{services/lesli/role_service.rb → models/lesli/user/setting.rb} +10 -9
  29. data/app/models/lesli/user.rb +11 -20
  30. data/app/operators/lesli/descriptor_privilege_operator.rb +75 -0
  31. data/app/operators/lesli/role_power_operator.rb +108 -0
  32. data/app/operators/lesli/user_registration_operator.rb +121 -0
  33. data/app/services/lesli/user_service.rb +2 -4
  34. data/app/services/lesli/{user/session_service.rb → user_session_service.rb} +11 -4
  35. data/app/views/devise/confirmations/new.html.erb +0 -14
  36. data/app/views/devise/confirmations/show.html.erb +63 -0
  37. data/app/views/devise/passwords/edit.html.erb +78 -24
  38. data/app/views/devise/passwords/new.html.erb +1 -2
  39. data/app/views/lesli/emails/devise_mailer/confirmation_instructions.html.erb +1 -1
  40. data/app/views/lesli/emails/devise_mailer/reset_password_instructions.html.erb +23 -0
  41. data/app/views/lesli/partials/_application-lesli-header.html.erb +3 -1
  42. data/config/initializers/devise.rb +2 -0
  43. data/config/routes.rb +2 -0
  44. data/db/migrate/v1.0/0010000110_create_lesli_accounts.rb +2 -0
  45. data/db/{tables/0010001010_create_account_settings.rb → migrate/v1.0/0010001010_create_lesli_account_settings.rb} +5 -5
  46. data/db/{tables/0010003110_create_user_settings.rb → migrate/v1.0/0010003110_create_lesli_user_settings.rb} +4 -4
  47. data/db/migrate/v1.0/0010003210_create_lesli_user_sessions.rb +6 -2
  48. data/db/migrate/v1.0/{0010003410_create_lesli_user_roles.rb → 0010003410_create_lesli_user_powers.rb} +4 -4
  49. data/db/migrate/v1.0/0010005010_create_lesli_descriptors.rb +1 -1
  50. data/db/migrate/v1.0/{0010003910_create_lesli_user_agents.rb → 0010005510_create_lesli_role_powers.rb} +7 -9
  51. data/db/{tables/0010005710_create_role_privileges.rb → migrate/v1.0/0010005710_create_lesli_role_privileges.rb} +6 -6
  52. data/db/seed/development/users.rb +4 -4
  53. data/db/seed/tools.rb +4 -4
  54. data/lib/lesli/engine.rb +33 -10
  55. data/lib/lesli/version.rb +1 -1
  56. data/lib/sass/lesli/bulma/loader.scss +3 -0
  57. data/lib/sass/lesli/pages/devise-simple.scss +2 -1
  58. data/lib/tasks/lesli/controllers.rake +3 -6
  59. data/lib/tasks/lesli/db.rake +11 -1
  60. data/lib/tasks/lesli/role.rake +54 -0
  61. data/lib/vue/application.js +9 -2
  62. data/lib/vue/devise/passwords.js +3 -3
  63. data/lib/vue/layouts/application-header.vue +10 -3
  64. data/lib/webpack/core.js +2 -1
  65. data/readme.md +23 -7
  66. data/vendor/bulma/LICENSE +21 -0
  67. data/vendor/bulma/bulma.sass +10 -0
  68. data/vendor/bulma/css/bulma-rtl.css +11851 -0
  69. data/vendor/bulma/css/bulma-rtl.min.css +1 -0
  70. data/vendor/bulma/css/bulma.css +11851 -0
  71. data/vendor/bulma/css/bulma.min.css +1 -0
  72. data/vendor/bulma/sass/base/_all.sass +6 -0
  73. data/vendor/bulma/sass/base/animations.sass +5 -0
  74. data/vendor/bulma/sass/base/generic.sass +145 -0
  75. data/vendor/bulma/sass/base/helpers.sass +1 -0
  76. data/vendor/bulma/sass/base/minireset.sass +79 -0
  77. data/vendor/bulma/sass/components/_all.sass +15 -0
  78. data/vendor/bulma/sass/components/breadcrumb.sass +77 -0
  79. data/vendor/bulma/sass/components/card.sass +103 -0
  80. data/vendor/bulma/sass/components/dropdown.sass +83 -0
  81. data/vendor/bulma/sass/components/level.sass +79 -0
  82. data/vendor/bulma/sass/components/media.sass +59 -0
  83. data/vendor/bulma/sass/components/menu.sass +59 -0
  84. data/vendor/bulma/sass/components/message.sass +101 -0
  85. data/vendor/bulma/sass/components/modal.sass +117 -0
  86. data/vendor/bulma/sass/components/navbar.sass +446 -0
  87. data/vendor/bulma/sass/components/pagination.sass +167 -0
  88. data/vendor/bulma/sass/components/panel.sass +121 -0
  89. data/vendor/bulma/sass/components/tabs.sass +176 -0
  90. data/vendor/bulma/sass/elements/_all.sass +16 -0
  91. data/vendor/bulma/sass/elements/box.sass +26 -0
  92. data/vendor/bulma/sass/elements/button.sass +357 -0
  93. data/vendor/bulma/sass/elements/container.sass +29 -0
  94. data/vendor/bulma/sass/elements/content.sass +162 -0
  95. data/vendor/bulma/sass/elements/form.sass +1 -0
  96. data/vendor/bulma/sass/elements/icon.sass +46 -0
  97. data/vendor/bulma/sass/elements/image.sass +73 -0
  98. data/vendor/bulma/sass/elements/notification.sass +52 -0
  99. data/vendor/bulma/sass/elements/other.sass +31 -0
  100. data/vendor/bulma/sass/elements/progress.sass +73 -0
  101. data/vendor/bulma/sass/elements/table.sass +134 -0
  102. data/vendor/bulma/sass/elements/tag.sass +140 -0
  103. data/vendor/bulma/sass/elements/title.sass +70 -0
  104. data/vendor/bulma/sass/form/_all.sass +9 -0
  105. data/vendor/bulma/sass/form/checkbox-radio.sass +22 -0
  106. data/vendor/bulma/sass/form/file.sass +184 -0
  107. data/vendor/bulma/sass/form/input-textarea.sass +66 -0
  108. data/vendor/bulma/sass/form/select.sass +88 -0
  109. data/vendor/bulma/sass/form/shared.sass +60 -0
  110. data/vendor/bulma/sass/form/tools.sass +215 -0
  111. data/vendor/bulma/sass/grid/_all.sass +5 -0
  112. data/vendor/bulma/sass/grid/columns.sass +513 -0
  113. data/vendor/bulma/sass/grid/tiles.sass +36 -0
  114. data/vendor/bulma/sass/helpers/_all.sass +12 -0
  115. data/vendor/bulma/sass/helpers/color.sass +39 -0
  116. data/vendor/bulma/sass/helpers/flexbox.sass +35 -0
  117. data/vendor/bulma/sass/helpers/float.sass +10 -0
  118. data/vendor/bulma/sass/helpers/other.sass +14 -0
  119. data/vendor/bulma/sass/helpers/overflow.sass +2 -0
  120. data/vendor/bulma/sass/helpers/position.sass +7 -0
  121. data/vendor/bulma/sass/helpers/spacing.sass +31 -0
  122. data/vendor/bulma/sass/helpers/typography.sass +103 -0
  123. data/vendor/bulma/sass/helpers/visibility.sass +122 -0
  124. data/vendor/bulma/sass/layout/_all.sass +6 -0
  125. data/vendor/bulma/sass/layout/footer.sass +11 -0
  126. data/vendor/bulma/sass/layout/hero.sass +153 -0
  127. data/vendor/bulma/sass/layout/section.sass +17 -0
  128. data/vendor/bulma/sass/utilities/_all.sass +9 -0
  129. data/vendor/bulma/sass/utilities/animations.sass +1 -0
  130. data/vendor/bulma/sass/utilities/controls.sass +49 -0
  131. data/vendor/bulma/sass/utilities/derived-variables.sass +114 -0
  132. data/vendor/bulma/sass/utilities/extends.sass +25 -0
  133. data/vendor/bulma/sass/utilities/functions.sass +135 -0
  134. data/vendor/bulma/sass/utilities/initial-variables.sass +79 -0
  135. data/vendor/bulma/sass/utilities/mixins.sass +303 -0
  136. data/vendor/lesli-css/_index.scss +34 -0
  137. data/vendor/lesli-css/lesli.scss +51 -0
  138. data/vendor/lesli-css/license +28 -0
  139. data/vendor/lesli-css/src/base/fonts.scss +50 -0
  140. data/vendor/lesli-css/src/base/normalize.scss +118 -0
  141. data/vendor/lesli-css/src/components/blockquote.scss +61 -0
  142. data/vendor/lesli-css/src/components/columns.scss +92 -0
  143. data/vendor/lesli-css/src/components/container.scss +47 -0
  144. data/vendor/lesli-css/src/components/grid.scss +0 -0
  145. data/vendor/lesli-css/src/components/navigation.scss +59 -0
  146. data/vendor/lesli-css/src/functions/colors.scss +184 -0
  147. data/vendor/lesli-css/src/helpers/units.scss +44 -0
  148. data/vendor/lesli-css/src/mixins/breakpoint.scss +184 -0
  149. data/vendor/lesli-css/src/mixins/flex.scss +80 -0
  150. data/vendor/lesli-css/src/mixins/scrollbar.scss +46 -0
  151. data/vendor/lesli-css/src/settings/variables.scss +26 -0
  152. data/vendor/lesli-css/tests/base/normalize.spec.scss +125 -0
  153. data/vendor/lesli-css/tests/functions/colors.spec.scss +117 -0
  154. data/vendor/lesli-css/tests/mixins/breakpoint.spec.scss +429 -0
  155. data/vendor/lesli-css/tests/mixins/scrollbar.spec.scss +82 -0
  156. data/vendor/lesli-css/vendor/normalize.scss +351 -0
  157. data/vendor/remixicon/License +201 -0
  158. data/vendor/remixicon/fonts/remixicon.css +2583 -0
  159. metadata +116 -18
  160. data/app/models/concerns/account_engines.rb +0 -249
  161. data/app/models/concerns/user_polyfill.rb +0 -134
  162. data/config/locales/translations.en.yml +0 -7
  163. data/config/locales/translations.es.yml +0 -7
  164. data/db/migrate/v1.0/0010001510_create_lesli_account_requests.rb +0 -45
  165. data/db/migrate/v1.0/0010003810_create_lesli_user_requests.rb +0 -44
  166. data/db/tables/0010005510_create_role_descriptors.rb +0 -44
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d7a7e2216fb374f65a48c411f05235a406fb93e3e87498b6291eb8a7f067959e
4
- data.tar.gz: 356296a3c0f001396a5f080af9526bae0084a62198c2ea9f08bcc9782bd69aad
3
+ metadata.gz: ba9be6e311c5f85759e4fdad59138a230448fb448984464e5f11f9d814828ed2
4
+ data.tar.gz: 06b229e650d8da986061a8646b56ca039798118d8e7c4a8e68cdd23900de94fe
5
5
  SHA512:
6
- metadata.gz: 197c86d52c6f26b7d9cae6ed7b59da0d18c03e4c23349f70b55b2c1eceeefbb2aadc4cf7b04020a6203eae2046ef82534bfd4b845087a0d926a6a2f8caf5546b
7
- data.tar.gz: 7ba42d2dd2772e720ca35ed606734c8e98f0772d3623f9b93b10397ff6c31ce1ec2e6d3c77bbad48d787965803c0a1ea4f0bf8e2cbe0a1cc0bae2fc902a7b82c
6
+ metadata.gz: 36dc264e6fb5761e3be3c4c0c752ccc3071c808a8fe78220bc265611591a78a92e9cf5144dcf7f1b15e0869c77bd525c28c020ccbf338ded87de3e79c05e9eeb
7
+ data.tar.gz: 6abe940c11b64d7abbe6968192bff8f66a83addf9f5fb43560291ae8844c6e37cd04fbda8c64b344a77795775f02d71fb762fed4adc5a352f5d43f170e147e71
@@ -51,6 +51,7 @@ Building a better future, one line of code at a time.
51
51
  //= link lesli/users/passwords.css
52
52
  //= link lesli/users/registrations.js
53
53
  //= link lesli/users/registrations.css
54
-
54
+ //= link lesli/users/confirmations.js
55
+ //= link lesli/users/confirmations.css
55
56
 
56
57
  //= link lesli/i18n.js
@@ -0,0 +1,32 @@
1
+ /*
2
+ * ATTENTION: The "eval" devtool has been used (maybe by default in mode: "development").
3
+ * This devtool is neither made for production nor for readable output files.
4
+ * It uses "eval()" calls to create a separate source file in the browser devtools.
5
+ * If you are trying to read the output file, select a different devtool (https://webpack.js.org/configuration/devtool/)
6
+ * or disable the default devtool with "devtool: false".
7
+ * If you are looking for production-ready output files, see mode: "production" (https://webpack.js.org/configuration/mode/).
8
+ */
9
+ /******/ (() => { // webpackBootstrap
10
+ /******/ var __webpack_modules__ = ({
11
+
12
+ /***/ "./lib/vue/devise/confirmations.js":
13
+ /*!*****************************************!*\
14
+ !*** ./lib/vue/devise/confirmations.js ***!
15
+ \*****************************************/
16
+ /***/ (() => {
17
+
18
+ eval("/*\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//# sourceURL=webpack://lesli/./lib/vue/devise/confirmations.js?");
19
+
20
+ /***/ })
21
+
22
+ /******/ });
23
+ /************************************************************************/
24
+ /******/
25
+ /******/ // startup
26
+ /******/ // Load entry module and return exports
27
+ /******/ // This entry module can't be inlined because the eval devtool is used.
28
+ /******/ var __webpack_exports__ = {};
29
+ /******/ __webpack_modules__["./lib/vue/devise/confirmations.js"]();
30
+ /******/
31
+ /******/ })()
32
+ ;
@@ -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: \"\",\n new_password_confirmation: \"\"\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(() => {\n this.url.go(\"/login\");\n }, 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 · 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?");
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;\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 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?");
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 administration area\n profile2(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"administration/profile\", 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 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] : 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?");
183
183
 
184
184
  /***/ }),
185
185
 
@@ -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;\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 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?");
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 administration area\n profile2(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"administration/profile\", 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 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] : 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?");
183
183
 
184
184
  /***/ }),
185
185
 
@@ -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;\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 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?");
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 administration area\n profile2(path) {\n let params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n return new LesliUrl().engine(\"administration/profile\", 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 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] : 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?");
183
183
 
184
184
  /***/ }),
185
185
 
@@ -17,18 +17,40 @@ 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 · Your Smart Business Assistant.
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.
24
24
 
25
25
  @contact hello@lesli.tech
26
- @website https://lesli.tech
26
+ @website https://www.lesli.tech
27
27
  @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
28
 
29
- // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
- // ·
31
-
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
32
31
  */
33
32
 
34
- @import "pages/users/confirmations.scss.erb";
33
+ @import "lesli/pages/devise-simple";
34
+
35
+
36
+ // ·
37
+ div.confirmation-message {
38
+ //box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
39
+ padding: 4rem 0 5rem;
40
+ text-align: center;
41
+ max-width: 800px;
42
+ margin: 0 auto;
43
+ width: 90%;
44
+
45
+ svg {
46
+ max-width: 90px;
47
+ margin-bottom: 1rem;
48
+ fill: lesli-css-color(lime, 300);
49
+ }
50
+
51
+ p {
52
+ font-weight: 100;
53
+ font-size: 2rem;
54
+ }
55
+
56
+ }
@@ -0,0 +1,66 @@
1
+ =begin
2
+
3
+ Lesli
4
+
5
+ Copyright (c) 2023, Lesli Technologies, S. A.
6
+
7
+ This program is free software: you can redistribute it and/or modify
8
+ it under the terms of the GNU General Public License as published by
9
+ the Free Software Foundation, either version 3 of the License, or
10
+ (at your option) any later version.
11
+
12
+ This program is distributed in the hope that it will be useful,
13
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
+ GNU General Public License for more details.
16
+
17
+ You should have received a copy of the GNU General Public License
18
+ along with this program. If not, see http://www.gnu.org/licenses/.
19
+
20
+ Lesli · Ruby on Rails SaaS Development Framework.
21
+
22
+ Made with ♥ by https://www.lesli.tech
23
+ Building a better future, one line of code at a time.
24
+
25
+ @contact hello@lesli.tech
26
+ @website https://www.lesli.tech
27
+ @license GPLv3 http://www.gnu.org/licenses/gpl-3.0.en.html
28
+
29
+ // · ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~ ~·~
30
+ // ·
31
+ =end
32
+
33
+ module Lesli
34
+ class AboutsController < ApplicationLesliController
35
+
36
+ # GET /status
37
+ def show
38
+ # instance name from builder
39
+ instance = Lesli.config.instance
40
+
41
+ # get installed engines
42
+ @lesli_engines = Lesli::System.engines.map { |engine, engine_info|
43
+ {
44
+ :name => engine_info[:name],
45
+ :code => engine_info[:code],
46
+ :path => engine_info[:path],
47
+ :version => engine_info[:version],
48
+ :build => engine_info[:build]
49
+ }
50
+ }
51
+
52
+ respond_to do |format|
53
+ format.html {}
54
+ format.json {
55
+ if Rails.env.production?
56
+ respond_with_successful({ :Lesli => "Ruby on Rails SaaS Development Framework."})
57
+ end
58
+
59
+ if !Rails.env.production?
60
+ respond_with_successful(@lesli_engines)
61
+ end
62
+ }
63
+ end
64
+ end
65
+ end
66
+ end
@@ -69,10 +69,10 @@ 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
- return true
72
+ L2.info "authorize_privileges start"
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
- granted = current_user.has_privileges?(params[:controller], params[:action])
75
+ granted = current_user.has_privileges_for?(params[:controller], params[:action])
76
76
 
77
77
  # get the path to which the user is limited to
78
78
  limited_path = current_user.has_role_limited_to_path?