infinity-forge 2.4.0 → 2.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (239) hide show
  1. package/dist/sites/components/default-pages/blog/components/blog-item/index.d.ts +1 -1
  2. package/dist/sites/components/default-pages/blog/components/blog-item/index.js +3 -3
  3. package/dist/sites/components/default-pages/blog/components/blog-item/intefaces.d.ts +1 -1
  4. package/dist/sites/components/default-pages/blog/components/featured-blog/index.d.ts +1 -1
  5. package/dist/sites/components/default-pages/blog/components/featured-blog/index.js +2 -2
  6. package/dist/sites/components/default-pages/blog/components/featured-blog/interfaces.d.ts +2 -2
  7. package/dist/sites/components/default-pages/blog/components/side-box-categories/index.d.ts +2 -2
  8. package/dist/sites/components/default-pages/blog/components/side-box-categories/index.js +2 -2
  9. package/dist/sites/components/default-pages/blog/components/side-box-categories/interfaces.d.ts +1 -1
  10. package/dist/sites/components/default-pages/blog/components/side-box-newsletter/index.d.ts +1 -1
  11. package/dist/sites/components/default-pages/blog/components/side-box-newsletter/index.js +3 -3
  12. package/dist/sites/components/default-pages/blog/components/title-blog/index.js +2 -2
  13. package/dist/system/domain/protocols/http/errors/http-errors/index.d.ts +7 -7
  14. package/dist/system/domain/protocols/http/errors/http-errors/index.js +7 -7
  15. package/dist/system/domain/protocols/http/errors/system-errors-model/index.d.ts +1 -1
  16. package/dist/system/domain/protocols/http/errors/system-errors-model/index.js +1 -1
  17. package/dist/system/domain/use-cases/auth/admin/index.js +0 -18
  18. package/dist/system/presentation/components/data/avatar/index.js +0 -59
  19. package/dist/system/presentation/components/data/buttons/index.d.ts +0 -1
  20. package/dist/system/presentation/components/data/buttons/index.js +0 -18
  21. package/dist/system/presentation/components/data/buttons/sidebar-button/index.js +3 -3
  22. package/dist/system/presentation/components/data/chat/card-message/index.d.ts +1 -1
  23. package/dist/system/presentation/components/data/chat/card-message/index.js +3 -3
  24. package/dist/system/presentation/components/data/chat/index.d.ts +0 -2
  25. package/dist/system/presentation/components/data/chat/index.js +0 -38
  26. package/dist/system/presentation/components/data/chat/interfaces.d.ts +0 -8
  27. package/dist/system/presentation/components/data/chat/loader/index.js +1 -1
  28. package/dist/system/presentation/components/data/detail-card/component.d.ts +0 -2
  29. package/dist/system/presentation/components/data/detail-card/component.js +0 -42
  30. package/dist/system/presentation/components/data/detail-card/index.d.ts +0 -2
  31. package/dist/system/presentation/components/data/detail-card/index.js +0 -19
  32. package/dist/system/presentation/components/data/detail-card/interfaces.d.ts +0 -19
  33. package/dist/system/presentation/components/data/highlight-icon/index.d.ts +0 -2
  34. package/dist/system/presentation/components/data/highlight-icon/index.js +0 -40
  35. package/dist/system/presentation/components/data/highlight-icon/interfaces.d.ts +0 -8
  36. package/dist/system/presentation/components/data/highlight-text/index.d.ts +0 -2
  37. package/dist/system/presentation/components/data/highlight-text/index.js +0 -43
  38. package/dist/system/presentation/components/data/input-search/index.d.ts +0 -2
  39. package/dist/system/presentation/components/data/input-search/index.js +0 -39
  40. package/dist/system/presentation/components/data/logo/index.js +0 -34
  41. package/dist/system/presentation/components/data/menu/component.js +0 -17
  42. package/dist/system/presentation/components/data/menu/components/index.d.ts +1 -1
  43. package/dist/system/presentation/components/data/menu/components/index.js +1 -1
  44. package/dist/system/presentation/components/data/menu/index.d.ts +0 -2
  45. package/dist/system/presentation/components/data/menu/index.js +0 -19
  46. package/dist/system/presentation/components/data/menu/modes/index.d.ts +2 -2
  47. package/dist/system/presentation/components/data/menu/modes/index.js +2 -2
  48. package/dist/system/presentation/components/data/notifications/card/index.d.ts +1 -1
  49. package/dist/system/presentation/components/data/notifications/card/index.js +2 -2
  50. package/dist/system/presentation/components/data/notifications/index.js +0 -155
  51. package/dist/system/presentation/components/data/page-wrapper/index.d.ts +0 -2
  52. package/dist/system/presentation/components/data/page-wrapper/index.js +0 -35
  53. package/dist/system/presentation/components/data/page-wrapper/interfaces.d.ts +0 -7
  54. package/dist/system/presentation/components/data/popover/index.d.ts +0 -2
  55. package/dist/system/presentation/components/data/profile-infos/index.d.ts +0 -2
  56. package/dist/system/presentation/components/data/profile-infos/index.js +0 -48
  57. package/dist/system/presentation/components/data/profile-infos/interfaces.d.ts +0 -6
  58. package/dist/system/presentation/components/data/profile-infos/profile/index.d.ts +1 -1
  59. package/dist/system/presentation/components/data/profile-infos/profile/index.js +3 -3
  60. package/dist/system/presentation/components/data/select-workspace/index.d.ts +0 -4
  61. package/dist/system/presentation/components/data/select-workspace/index.js +0 -69
  62. package/dist/system/presentation/components/data/tab/component.d.ts +0 -2
  63. package/dist/system/presentation/components/data/tab/component.js +0 -67
  64. package/dist/system/presentation/components/data/tab/index.d.ts +0 -2
  65. package/dist/system/presentation/components/data/tab/index.js +0 -19
  66. package/dist/system/presentation/components/data/tab/interfaces.d.ts +0 -29
  67. package/dist/system/presentation/components/data/tab/tab-item/index.d.ts +5 -0
  68. package/dist/system/presentation/components/data/tab/tab-item/index.js +46 -0
  69. package/dist/system/presentation/components/data/tab/tab-item/styles.d.ts +8 -0
  70. package/dist/system/presentation/components/layout/header/components/index.d.ts +2 -0
  71. package/dist/system/presentation/components/layout/header/components/index.js +19 -0
  72. package/dist/system/presentation/components/layout/header/index.d.ts +0 -2
  73. package/dist/system/presentation/components/layout/header/index.js +0 -25
  74. package/dist/system/presentation/components/layout/header/version-01/index.d.ts +2 -0
  75. package/dist/system/presentation/components/layout/header/version-01/index.js +45 -0
  76. package/dist/system/presentation/components/pages/menus/index.d.ts +0 -1
  77. package/dist/system/presentation/components/pages/menus/index.js +0 -18
  78. package/dist/system/presentation/components/pages/menus/page.js +0 -40
  79. package/dist/system/presentation/components/pages/menus/table/columns.d.ts +3 -0
  80. package/dist/system/presentation/components/pages/menus/table/columns.js +21 -0
  81. package/dist/system/presentation/components/pages/menus/table/create.d.ts +3 -0
  82. package/dist/system/presentation/components/pages/menus/table/create.js +72 -0
  83. package/dist/system/presentation/components/pages/menus/table/delete.js +71 -0
  84. package/dist/system/presentation/components/pages/menus/table/edit.d.ts +3 -0
  85. package/dist/system/presentation/components/pages/menus/table/edit.js +78 -0
  86. package/dist/system/presentation/components/pages/menus/table/index.d.ts +4 -0
  87. package/dist/system/presentation/components/pages/menus/table/index.js +21 -0
  88. package/dist/system/presentation/components/pages/users/index.d.ts +0 -1
  89. package/dist/system/presentation/components/pages/users/index.js +0 -18
  90. package/dist/system/presentation/components/pages/users/page.js +0 -40
  91. package/dist/system/presentation/components/pages/users/table/columns.d.ts +3 -0
  92. package/dist/system/presentation/components/pages/users/table/create.d.ts +3 -0
  93. package/dist/system/presentation/components/pages/users/table/create.js +75 -0
  94. package/dist/system/presentation/components/pages/users/table/delete.js +74 -0
  95. package/dist/system/presentation/components/pages/users/table/edit.d.ts +3 -0
  96. package/dist/system/presentation/components/pages/users/table/edit.js +83 -0
  97. package/dist/system/presentation/components/pages/users/table/index.d.ts +4 -0
  98. package/dist/system/presentation/components/pages/users/table/index.js +21 -0
  99. package/dist/system/presentation/context/auth/components/index.d.ts +0 -2
  100. package/dist/system/presentation/context/auth/components/index.js +0 -19
  101. package/dist/system/presentation/context/auth/components/login/index.js +38 -0
  102. package/dist/system/presentation/context/auth/components/private-page/index.d.ts +2 -0
  103. package/dist/system/presentation/context/auth/components/private-page/index.js +141 -0
  104. package/dist/system/presentation/hooks/notifications/use-load-all/index.d.ts +0 -1
  105. package/dist/system/presentation/hooks/notifications/use-load-all/index.js +0 -63
  106. package/dist/system/presentation/hooks/notifications/use-load-no-read/index.d.ts +0 -2
  107. package/dist/system/presentation/hooks/notifications/use-load-no-read/index.js +0 -60
  108. package/dist/system/presentation/hooks/ui/use-table/component.d.ts +0 -8
  109. package/dist/system/presentation/hooks/ui/use-table/component.js +0 -26
  110. package/dist/system/presentation/hooks/ui/use-table/components/index.d.ts +1 -0
  111. package/dist/system/presentation/hooks/ui/use-table/components/index.js +18 -0
  112. package/dist/system/presentation/hooks/ui/use-table/index.d.ts +0 -4
  113. package/dist/system/presentation/hooks/ui/use-table/index.js +0 -21
  114. package/dist/system/presentation/hooks/ui/use-table/interfaces.d.ts +0 -92
  115. package/dist/system/presentation/hooks/ui/use-table/query/get-query-arguments-table.d.ts +2 -0
  116. package/dist/system/presentation/hooks/ui/use-table/query/hook.d.ts +5 -0
  117. package/dist/system/presentation/hooks/ui/use-table/query/hook.js +52 -0
  118. package/dist/system/presentation/hooks/ui/use-table/query/index.d.ts +2 -0
  119. package/dist/system/presentation/hooks/ui/use-table/query/index.js +19 -0
  120. package/dist/ui/components/carousel/carousel-lib/components-shared/get-changed-params.js +0 -51
  121. package/dist/ui/components/carousel/carousel-lib/components-shared/get-element-params.js +0 -148
  122. package/dist/ui/components/carousel/carousel-lib/components-shared/get-params.js +0 -61
  123. package/dist/ui/components/carousel/carousel-lib/components-shared/mount-swiper.js +0 -24
  124. package/dist/ui/components/carousel/carousel-lib/components-shared/update-swiper.js +0 -208
  125. package/dist/ui/components/carousel/carousel-lib/core/breakpoints/getBreakpoint.js +35 -0
  126. package/dist/ui/components/carousel/carousel-lib/core/breakpoints/index.d.ts +7 -0
  127. package/dist/ui/components/carousel/carousel-lib/core/breakpoints/index.js +9 -0
  128. package/dist/ui/components/carousel/carousel-lib/core/breakpoints/setBreakpoint.js +94 -0
  129. package/dist/ui/components/carousel/carousel-lib/core/classes/index.d.ts +7 -0
  130. package/dist/ui/components/carousel/carousel-lib/core/classes/index.js +9 -0
  131. package/dist/ui/components/carousel/carousel-lib/core/core.js +0 -654
  132. package/dist/ui/components/carousel/carousel-lib/core/events/index.js +77 -0
  133. package/dist/ui/components/carousel/carousel-lib/core/events/onLoad.js +14 -0
  134. package/dist/ui/components/carousel/carousel-lib/core/events/onTouchEnd.js +194 -0
  135. package/dist/ui/components/carousel/carousel-lib/core/events/onTouchMove.js +314 -0
  136. package/dist/ui/components/carousel/carousel-lib/core/events/onTouchStart.js +154 -0
  137. package/dist/ui/components/carousel/carousel-lib/core/grab-cursor/index.d.ts +7 -0
  138. package/dist/ui/components/carousel/carousel-lib/core/grab-cursor/index.js +12 -0
  139. package/dist/ui/components/carousel/carousel-lib/core/loop/index.d.ts +9 -0
  140. package/dist/ui/components/carousel/carousel-lib/core/loop/index.js +14 -0
  141. package/dist/ui/components/carousel/carousel-lib/core/loop/loopCreate.js +57 -0
  142. package/dist/ui/components/carousel/carousel-lib/core/loop/loopFix.js +230 -0
  143. package/dist/ui/components/carousel/carousel-lib/core/moduleExtendParams.js +0 -42
  144. package/dist/ui/components/carousel/carousel-lib/core/slide/index.d.ts +17 -0
  145. package/dist/ui/components/carousel/carousel-lib/core/slide/index.js +22 -0
  146. package/dist/ui/components/carousel/carousel-lib/core/slide/slideTo.js +160 -0
  147. package/dist/ui/components/carousel/carousel-lib/core/slide/slideToClickedSlide.js +46 -0
  148. package/dist/ui/components/carousel/carousel-lib/core/transition/index.d.ts +9 -0
  149. package/dist/ui/components/carousel/carousel-lib/core/transition/index.js +14 -0
  150. package/dist/ui/components/carousel/carousel-lib/core/transition/transitionEnd.js +18 -0
  151. package/dist/ui/components/carousel/carousel-lib/core/transition/transitionStart.js +19 -0
  152. package/dist/ui/components/carousel/carousel-lib/core/translate/getTranslate.js +21 -0
  153. package/dist/ui/components/carousel/carousel-lib/core/translate/index.d.ts +13 -0
  154. package/dist/ui/components/carousel/carousel-lib/core/translate/index.js +18 -0
  155. package/dist/ui/components/carousel/carousel-lib/core/translate/translateTo.js +81 -0
  156. package/dist/ui/components/carousel/carousel-lib/core/update/index.d.ts +21 -0
  157. package/dist/ui/components/carousel/carousel-lib/core/update/index.js +26 -0
  158. package/dist/ui/components/carousel/carousel-lib/core/update/updateActiveIndex.js +125 -0
  159. package/dist/ui/components/carousel/carousel-lib/core/update/updateSize.js +45 -0
  160. package/dist/ui/components/carousel/carousel-lib/core/update/updateSlides.js +306 -0
  161. package/dist/ui/components/carousel/carousel-lib/core/update/updateSlidesClasses.js +69 -0
  162. package/dist/ui/components/carousel/carousel-lib/modules/autoplay.js +0 -336
  163. package/dist/ui/components/carousel/carousel-lib/modules/effect-fade.js +0 -63
  164. package/dist/ui/components/carousel/carousel-lib/modules/free-mode.js +0 -247
  165. package/dist/ui/components/carousel/carousel-lib/modules/index.d.ts +0 -6
  166. package/dist/ui/components/carousel/carousel-lib/modules/index.js +0 -23
  167. package/dist/ui/components/carousel/carousel-lib/modules/navigation.js +0 -223
  168. package/dist/ui/components/carousel/carousel-lib/modules/pagination.js +0 -514
  169. package/dist/ui/components/carousel/carousel-lib/modules/virtual.js +0 -379
  170. package/dist/ui/components/carousel/carousel-lib/react/swiper-slide.js +0 -88
  171. package/dist/ui/components/carousel/carousel-lib/react/swiper.js +0 -210
  172. package/dist/ui/components/carousel/carousel-lib/shared/create-element-if-not-defined.js +0 -22
  173. package/dist/ui/components/carousel/carousel-lib/shared/create-shadow.js +0 -15
  174. package/dist/ui/components/carousel/carousel-lib/shared/effect-target.js +0 -13
  175. package/dist/ui/components/carousel/carousel-lib/shared/effect-virtual-transition-end.js +0 -47
  176. package/dist/ui/components/carousel/carousel-lib/shared/get-browser.js +0 -43
  177. package/dist/ui/components/carousel/carousel-lib/shared/get-device.js +0 -69
  178. package/dist/ui/components/carousel/carousel-lib/shared/get-support.js +0 -25
  179. package/dist/ui/components/carousel/carousel-lib/shared/utils.js +0 -372
  180. package/dist/ui/components/carousel/carousel-lib/ssr-window/document.js +0 -65
  181. package/dist/ui/components/carousel/carousel-lib/ssr-window/ssr-window.d.ts +0 -4
  182. package/dist/ui/components/carousel/carousel-lib/ssr-window/ssr-window.js +0 -15
  183. package/dist/ui/components/carousel/carousel-lib/ssr-window/window.js +0 -71
  184. package/dist/ui/components/carousel/carousel-lib/types/index.d.ts +0 -5
  185. package/dist/ui/components/carousel/carousel-lib/types/index.js +0 -27
  186. package/dist/ui/components/carousel/carousel-lib/types/swiper-events.d.ts +0 -162
  187. package/dist/ui/components/form/handler/custom-submit/index.d.ts +0 -17
  188. package/dist/ui/components/form/handler/custom-submit/index.js +0 -25
  189. package/dist/ui/components/form/handler/dynamic_form_handler/component.d.ts +0 -2
  190. package/dist/ui/components/form/handler/dynamic_form_handler/component.js +0 -117
  191. package/dist/ui/components/form/handler/dynamic_form_handler/index.d.ts +0 -2
  192. package/dist/ui/components/form/handler/dynamic_form_handler/index.js +0 -19
  193. package/dist/ui/components/form/handler/dynamic_form_handler/interfaces.d.ts +0 -28
  194. package/dist/ui/components/form/handler/form-handler/generate-schemas.js +0 -111
  195. package/dist/ui/components/form/handler/form-handler/index.d.ts +0 -2
  196. package/dist/ui/components/form/handler/form-handler/index.js +0 -241
  197. package/dist/ui/components/form/handler/form-handler/use-schemas.d.ts +0 -2
  198. package/dist/ui/components/form/handler/form-handler/use-schemas.js +0 -115
  199. package/dist/ui/components/form/handler/form-handler/use-send-file.d.ts +0 -5
  200. package/dist/ui/components/form/handler/form-handler/use-send-file.js +0 -209
  201. package/dist/ui/components/form/handler/i18n/index.d.ts +0 -2
  202. package/dist/ui/components/form/handler/i18n/index.js +4 -4
  203. package/dist/ui/components/form/input-cep/use-cep/hook.d.ts +2 -2
  204. package/dist/ui/components/form/input-cep/use-cep/hook.js +1 -1
  205. package/dist/ui/components/form/input-cep/use-cep/index.d.ts +2 -2
  206. package/dist/ui/components/form/input-cep/use-cep/index.js +2 -2
  207. package/dist/ui/components/form/input-control/error/index.js +1 -1
  208. package/dist/ui/components/form/input-control/label/index.js +1 -1
  209. package/dist/ui/components/form/input-control/loader-input/index.js +2 -2
  210. package/dist/ui/components/form/input-currency/components/CurrencyInput.js +1 -1
  211. package/dist/ui/components/form/input-currency/components/index.d.ts +1 -1
  212. package/dist/ui/components/form/input-currency/components/index.js +1 -1
  213. package/dist/ui/components/form/input-date-picker/calendar/index.d.ts +1 -1
  214. package/dist/ui/components/form/input-date-picker/calendar/index.js +4 -4
  215. package/dist/ui/components/form/input-date-picker/calendar/interface.d.ts +2 -2
  216. package/dist/ui/components/form/input-date-picker/calendar/styles.d.ts +1 -1
  217. package/dist/ui/components/form/input-date-picker/mock/index.d.ts +1 -1
  218. package/dist/ui/components/form/input-date-picker/mock/index.js +1 -1
  219. package/dist/ui/components/form/input-file/hooks/index.d.ts +4 -4
  220. package/dist/ui/components/form/input-file/hooks/index.js +4 -4
  221. package/dist/ui/components/form/input-file/hooks/use-components-file.d.ts +2 -2
  222. package/dist/ui/components/form/input-file/hooks/use-components-file.js +2 -2
  223. package/dist/ui/components/form/input-file/hooks/use-file-elements.d.ts +1 -1
  224. package/dist/ui/components/form/input-file/hooks/use-file-elements.js +2 -2
  225. package/dist/ui/components/form/input-file/hooks/use-file.d.ts +2 -2
  226. package/dist/ui/components/form/input-file/hooks/use-file.js +2 -2
  227. package/dist/ui/components/form/input-file/hooks/use-rendered-file.d.ts +1 -1
  228. package/dist/ui/components/form/input-file/hooks/use-rendered-file.js +1 -1
  229. package/dist/ui/components/form/input-file/render-files/component.d.ts +1 -1
  230. package/dist/ui/components/form/input-file/render-files/component.js +2 -2
  231. package/dist/ui/components/form/input-file/render-files/index.d.ts +3 -3
  232. package/dist/ui/components/form/input-file/render-files/index.js +3 -3
  233. package/dist/ui/components/form/input-file/render-files/interfaces.d.ts +2 -2
  234. package/dist/ui/components/form/input-seo/input-meta-image/index.d.ts +1 -1
  235. package/dist/ui/components/form/input-seo/input-meta-image/index.js +2 -2
  236. package/dist/ui/components/menu-mobile/components/nav-links/index.d.ts +1 -1
  237. package/dist/ui/components/menu-mobile/components/nav-links/index.js +3 -3
  238. package/dist/ui/components/menu-mobile/components/nav-links/interfaces.d.ts +1 -1
  239. package/package.json +1 -1
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.useCreateTable = void 0;
40
+ var ui_1 = require("../../../../../../ui");
41
+ var system_1 = require("../../../../../../system");
42
+ function useCreateTable(queryKey) {
43
+ var _this = this;
44
+ var createToast = (0, ui_1.useToast)().createToast;
45
+ var cache = (0, ui_1.useQueryClient)(function (state) { return state.cache; });
46
+ var createTable = {
47
+ title: 'Criar usuário',
48
+ button: { text: 'Criar' },
49
+ initialData: { isExternal: false },
50
+ onSucess: function (data) { return __awaiter(_this, void 0, void 0, function () {
51
+ var _a;
52
+ return __generator(this, function (_b) {
53
+ switch (_b.label) {
54
+ case 0: return [4 /*yield*/, system_1.container.get(system_1.Types.RemoteUsers).create(data)];
55
+ case 1:
56
+ _b.sent();
57
+ (_a = cache[queryKey]) === null || _a === void 0 ? void 0 : _a.mutate();
58
+ createToast({ message: 'Criado com sucesso!', status: 'success' });
59
+ return [2 /*return*/];
60
+ }
61
+ });
62
+ }); },
63
+ inputs: [
64
+ [{ name: 'emailAddress', InputComponent: 'Input', type: 'email', label: 'Email' }],
65
+ [
66
+ { name: 'firstName', InputComponent: 'Input', type: 'text', label: 'Primeiro Nome' },
67
+ { name: 'lastName', InputComponent: 'Input', type: 'text', label: 'Sobrenome' },
68
+ ],
69
+ [{ name: 'password', InputComponent: 'InputPassword', type: 'password', label: 'Senha' }],
70
+ ],
71
+ };
72
+ return createTable;
73
+ }
74
+ exports.useCreateTable = useCreateTable;
75
+ //# sourceMappingURL=create.js.map
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.useDeleteTable = void 0;
40
+ var ui_1 = require("../../../../../../ui");
41
+ var system_1 = require("../../../../../../system");
42
+ function useDeleteTable(queryKey) {
43
+ var createToast = (0, ui_1.useToast)().createToast;
44
+ var cache = (0, ui_1.useQueryClient)(function (state) { return state.cache; });
45
+ function executeDelete(tableItem) {
46
+ return __awaiter(this, void 0, void 0, function () {
47
+ var _a;
48
+ var _b;
49
+ return __generator(this, function (_c) {
50
+ switch (_c.label) {
51
+ case 0:
52
+ _c.trys.push([0, 2, , 3]);
53
+ return [4 /*yield*/, system_1.container.get(system_1.Types.RemoteUsers).delete({ id: tableItem.id })];
54
+ case 1:
55
+ _c.sent();
56
+ createToast({ status: 'success', message: 'Usuário deletado com sucesso.' });
57
+ (_b = cache[queryKey]) === null || _b === void 0 ? void 0 : _b.mutate();
58
+ return [3 /*break*/, 3];
59
+ case 2:
60
+ _a = _c.sent();
61
+ createToast({
62
+ status: 'error',
63
+ message: 'Aconteceu um erro ao tentar deletar, tente novamente mais tarde.',
64
+ });
65
+ return [3 /*break*/, 3];
66
+ case 3: return [2 /*return*/];
67
+ }
68
+ });
69
+ });
70
+ }
71
+ return { executeDelete: executeDelete };
72
+ }
73
+ exports.useDeleteTable = useDeleteTable;
74
+ //# sourceMappingURL=delete.js.map
@@ -0,0 +1,3 @@
1
+ import { DynamicFormHandlerProps } from '../../../../../../ui';
2
+ import { User } from '../../../../../../system';
3
+ export declare function useEditTable(queryKey: string): DynamicFormHandlerProps<User>;
@@ -0,0 +1,83 @@
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ var __generator = (this && this.__generator) || function (thisArg, body) {
12
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
+ function verb(n) { return function (v) { return step([n, v]); }; }
15
+ function step(op) {
16
+ if (f) throw new TypeError("Generator is already executing.");
17
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
+ if (y = 0, t) op = [op[0] & 2, t.value];
20
+ switch (op[0]) {
21
+ case 0: case 1: t = op; break;
22
+ case 4: _.label++; return { value: op[1], done: false };
23
+ case 5: _.label++; y = op[1]; op = [0]; continue;
24
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
+ default:
26
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
+ if (t[2]) _.ops.pop();
31
+ _.trys.pop(); continue;
32
+ }
33
+ op = body.call(thisArg, _);
34
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
+ }
37
+ };
38
+ Object.defineProperty(exports, "__esModule", { value: true });
39
+ exports.useEditTable = void 0;
40
+ var ui_1 = require("../../../../../../ui");
41
+ var system_1 = require("../../../../../../system");
42
+ function useEditTable(queryKey) {
43
+ var _this = this;
44
+ var createToast = (0, ui_1.useToast)().createToast;
45
+ var cache = (0, ui_1.useQueryClient)(function (state) { return state.cache; });
46
+ var editTable = {
47
+ title: 'Editar usuário',
48
+ button: { text: 'Editar' },
49
+ getDetails: {
50
+ key: function (tableItem) { return 'EditUser' + tableItem.id; },
51
+ fetcher: function (tableItem) { return __awaiter(_this, void 0, void 0, function () { return __generator(this, function (_a) {
52
+ switch (_a.label) {
53
+ case 0: return [4 /*yield*/, system_1.container.get(system_1.Types.RemoteUsers).getDetail({ id: tableItem.id })];
54
+ case 1: return [2 /*return*/, _a.sent()];
55
+ }
56
+ }); }); },
57
+ },
58
+ onSucess: function (data, _) { return __awaiter(_this, void 0, void 0, function () {
59
+ var _a;
60
+ return __generator(this, function (_b) {
61
+ switch (_b.label) {
62
+ case 0: return [4 /*yield*/, system_1.container.get(system_1.Types.RemoteUsers).edit(data)];
63
+ case 1:
64
+ _b.sent();
65
+ (_a = cache[queryKey]) === null || _a === void 0 ? void 0 : _a.mutate();
66
+ createToast({ message: 'Editado com sucesso!', status: 'success' });
67
+ return [2 /*return*/];
68
+ }
69
+ });
70
+ }); },
71
+ inputs: [
72
+ [{ name: 'emailAddress', InputComponent: 'Input', type: 'email', label: 'Email' }],
73
+ [
74
+ { name: 'firstName', InputComponent: 'Input', type: 'text', label: 'Primeiro Nome' },
75
+ { name: 'lastName', InputComponent: 'Input', type: 'text', label: 'Sobrenome' },
76
+ ],
77
+ [{ name: 'roleGate', InputComponent: 'Input', type: 'text', label: 'Role' }],
78
+ ],
79
+ };
80
+ return editTable;
81
+ }
82
+ exports.useEditTable = useEditTable;
83
+ //# sourceMappingURL=edit.js.map
@@ -0,0 +1,4 @@
1
+ export * from './edit';
2
+ export * from './create';
3
+ export * from './delete';
4
+ export * from './columns';
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
+ };
16
+ Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./edit"), exports);
18
+ __exportStar(require("./create"), exports);
19
+ __exportStar(require("./delete"), exports);
20
+ __exportStar(require("./columns"), exports);
21
+ //# sourceMappingURL=index.js.map
@@ -1,2 +0,0 @@
1
- export * from "./login/index.js";
2
- export * from "./private-page/index.js";
@@ -1,19 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./login/index.js"), exports);
18
- __exportStar(require("./private-page/index.js"), exports);
19
- //# sourceMappingURL=index.js.map
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.Login = void 0;
27
+ var jsx_runtime_1 = require("react/jsx-runtime");
28
+ var ui_1 = require("../../../../../../ui");
29
+ var form_login_1 = require("./form-login");
30
+ var infra_injection_1 = require("../../../infra-injection");
31
+ var S = __importStar(require("./styles"));
32
+ function Login() {
33
+ var _a, _b;
34
+ var Configurations = (0, infra_injection_1.useInfraInjection)().Configurations;
35
+ return ((0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'login', children: (0, jsx_runtime_1.jsxs)(S.Login, { children: [(0, jsx_runtime_1.jsxs)("div", { className: 'content', children: [(0, jsx_runtime_1.jsx)("div", { className: 'empty' }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("div", { className: 'logo', children: (0, jsx_runtime_1.jsx)(ui_1.NextImage, { src: '/images/login-logo.png', alt: ' ' }) }), (0, jsx_runtime_1.jsx)("div", { className: 'text', children: (0, jsx_runtime_1.jsx)("h5", { className: 'font-20-bold', children: "Seja bem vindo!" }) }), (0, jsx_runtime_1.jsx)(form_login_1.FormLogin, {})] }), (0, jsx_runtime_1.jsx)("div", { className: 'contact-footer', children: (0, jsx_runtime_1.jsxs)("span", { children: ["Powered by", ' ', (0, jsx_runtime_1.jsxs)("a", { target: '_blank', href: (_a = Configurations === null || Configurations === void 0 ? void 0 : Configurations.poweredBy) === null || _a === void 0 ? void 0 : _a.link, children: [(_b = Configurations === null || Configurations === void 0 ? void 0 : Configurations.poweredBy) === null || _b === void 0 ? void 0 : _b.name, "."] }), ' ', "Todos os direitos reservados."] }) })] }), (0, jsx_runtime_1.jsx)("div", { className: 'image', children: (0, jsx_runtime_1.jsx)(ui_1.NextImage, { src: '/images/login-left.png', alt: 'Imagem de login' }) })] }) }));
36
+ }
37
+ exports.Login = Login;
38
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,2 @@
1
+ import { IPrivatePage } from './interfaces';
2
+ export declare function PrivatePage({ children, roles, signInRole }: IPrivatePage): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,141 @@
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
26
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
27
+ return new (P || (P = Promise))(function (resolve, reject) {
28
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
29
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
30
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
31
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
32
+ });
33
+ };
34
+ var __generator = (this && this.__generator) || function (thisArg, body) {
35
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
36
+ return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
37
+ function verb(n) { return function (v) { return step([n, v]); }; }
38
+ function step(op) {
39
+ if (f) throw new TypeError("Generator is already executing.");
40
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
41
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
42
+ if (y = 0, t) op = [op[0] & 2, t.value];
43
+ switch (op[0]) {
44
+ case 0: case 1: t = op; break;
45
+ case 4: _.label++; return { value: op[1], done: false };
46
+ case 5: _.label++; y = op[1]; op = [0]; continue;
47
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
48
+ default:
49
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
50
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
51
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
52
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
53
+ if (t[2]) _.ops.pop();
54
+ _.trys.pop(); continue;
55
+ }
56
+ op = body.call(thisArg, _);
57
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
58
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
59
+ }
60
+ };
61
+ Object.defineProperty(exports, "__esModule", { value: true });
62
+ exports.PrivatePage = void 0;
63
+ var jsx_runtime_1 = require("react/jsx-runtime");
64
+ var react_1 = require("react");
65
+ var router_1 = require("next/router");
66
+ var axios_1 = __importStar(require("axios"));
67
+ var ui_1 = require("../../../../../../ui");
68
+ var login_1 = require("../login");
69
+ var context_1 = require("../../context");
70
+ function PrivatePage(_a) {
71
+ var children = _a.children, roles = _a.roles, signInRole = _a.signInRole;
72
+ var _b = (0, react_1.useState)(false), interceptorIsReady = _b[0], setInterceptorIsReady = _b[1];
73
+ var router = (0, router_1.useRouter)();
74
+ var _c = (0, context_1.useAuthAdmin)(), user = _c.user, roleUser = _c.roleUser, signOut = _c.signOut, ForbiddenCompoent = _c.ForbiddenCompoent;
75
+ var hasAccess = roles && roles.length > 0 ? roles.includes(roleUser) : true;
76
+ (0, react_1.useEffect)(function () {
77
+ var _a, _b;
78
+ var interceptorId;
79
+ if (user && !((_b = (_a = user[roleUser]) === null || _a === void 0 ? void 0 : _a.interceptor) === null || _b === void 0 ? void 0 : _b.disableInterceptor)) {
80
+ interceptorId = axios_1.default.interceptors.response.use(function (r) { return r; }, function (err) {
81
+ var _a, _b;
82
+ if (err instanceof axios_1.AxiosError) {
83
+ if (err.code === 'ERR_NETWORK') {
84
+ signOut();
85
+ }
86
+ if (((_a = err === null || err === void 0 ? void 0 : err.response) === null || _a === void 0 ? void 0 : _a.status) === 401) {
87
+ signOut();
88
+ }
89
+ if (((_b = err === null || err === void 0 ? void 0 : err.response) === null || _b === void 0 ? void 0 : _b.status) === 403) {
90
+ router.push('/403');
91
+ }
92
+ }
93
+ throw err;
94
+ });
95
+ }
96
+ setInterceptorIsReady(true);
97
+ return function () {
98
+ if (interceptorId !== undefined) {
99
+ axios_1.default.interceptors.response.eject(interceptorId);
100
+ }
101
+ };
102
+ }, []);
103
+ return ((0, jsx_runtime_1.jsxs)(ui_1.Error, { name: 'private-page', children: [user && hasAccess && (0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'private-page', children: children }), user && !hasAccess && (0, jsx_runtime_1.jsx)(ui_1.Error, { name: 'private-page_danied', children: ForbiddenCompoent ? (0, jsx_runtime_1.jsx)(ForbiddenCompoent, {}) : (0, jsx_runtime_1.jsx)("div", { children: "Negado" }) }), !user && (0, jsx_runtime_1.jsx)(LoginControl, { interceptorIsReady: interceptorIsReady, signInRole: signInRole })] }));
104
+ }
105
+ exports.PrivatePage = PrivatePage;
106
+ function LoginControl(_a) {
107
+ var _this = this;
108
+ var _b, _c, _d, _e;
109
+ var interceptorIsReady = _a.interceptorIsReady, signInRole = _a.signInRole;
110
+ var _f = (0, react_1.useState)(false), loading = _f[0], setLoading = _f[1];
111
+ var _g = (0, context_1.useAuthAdmin)(), user = _g.user, roles = _g.roles, loadUser = _g.loadUser;
112
+ var router = (0, router_1.useRouter)();
113
+ (0, react_1.useEffect)(function () {
114
+ (function () { return __awaiter(_this, void 0, void 0, function () {
115
+ var _a;
116
+ return __generator(this, function (_b) {
117
+ switch (_b.label) {
118
+ case 0:
119
+ _b.trys.push([0, 2, 3, 4]);
120
+ setLoading(true);
121
+ return [4 /*yield*/, loadUser()];
122
+ case 1:
123
+ _b.sent();
124
+ return [3 /*break*/, 4];
125
+ case 2:
126
+ _a = _b.sent();
127
+ return [3 /*break*/, 4];
128
+ case 3:
129
+ setLoading(false);
130
+ return [7 /*endfinally*/];
131
+ case 4: return [2 /*return*/];
132
+ }
133
+ });
134
+ }); })();
135
+ }, [user]);
136
+ var LoginComponent = roles && ((_c = (_b = roles[signInRole]) === null || _b === void 0 ? void 0 : _b.signInConfig) === null || _c === void 0 ? void 0 : _c.Component) ? (_e = (_d = roles[signInRole]) === null || _d === void 0 ? void 0 : _d.signInConfig) === null || _e === void 0 ? void 0 : _e.Component : login_1.Login;
137
+ var Loading = (!user && !interceptorIsReady && !router.isReady) || loading;
138
+ var noHaveUser = !user && router.isReady && interceptorIsReady && !loading;
139
+ return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [Loading && (0, jsx_runtime_1.jsx)(ui_1.LoadingScreen, { size: 30, color: '#000' }), noHaveUser && (0, jsx_runtime_1.jsx)(LoginComponent, {})] }));
140
+ }
141
+ //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- export declare function useLoadAllNotifications(): Required<import("../../../../../ui/index.js").QueryState<import("../../../../../system/index.js").INotification[]>>;
@@ -1,63 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.useLoadAllNotifications = void 0;
40
- var ui_1 = require("../../../../../ui/index.js");
41
- var system_1 = require("../../../../../system/index.js");
42
- function useLoadAllNotifications() {
43
- var Configurations = (0, system_1.useInfraInjection)().Configurations;
44
- var isEnable = Configurations.notification.enable;
45
- function fetcher() {
46
- return __awaiter(this, void 0, void 0, function () {
47
- var res;
48
- return __generator(this, function (_a) {
49
- switch (_a.label) {
50
- case 0: return [4 /*yield*/, system_1.container
51
- .get(system_1.Types.RemoteNotifications)
52
- .loadAll({ timezone: 'America/Sao_Paulo' })];
53
- case 1:
54
- res = _a.sent();
55
- return [2 /*return*/, res.data];
56
- }
57
- });
58
- });
59
- }
60
- return (0, ui_1.useQuery)({ queryKey: 'LoadAllNotifications', queryFn: fetcher, enableCache: true, enabled: isEnable, interval: 1 * 60 * 1000 });
61
- }
62
- exports.useLoadAllNotifications = useLoadAllNotifications;
63
- //# sourceMappingURL=index.js.map
@@ -1,2 +0,0 @@
1
- import { LoadNoReadNotifications } from '../../../../../system/index.js';
2
- export declare function useLoadNoReadNotifications(): Required<import("../../../../../ui/index.js").QueryState<LoadNoReadNotifications.Model>>;
@@ -1,60 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __generator = (this && this.__generator) || function (thisArg, body) {
12
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
13
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
14
- function verb(n) { return function (v) { return step([n, v]); }; }
15
- function step(op) {
16
- if (f) throw new TypeError("Generator is already executing.");
17
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
18
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
19
- if (y = 0, t) op = [op[0] & 2, t.value];
20
- switch (op[0]) {
21
- case 0: case 1: t = op; break;
22
- case 4: _.label++; return { value: op[1], done: false };
23
- case 5: _.label++; y = op[1]; op = [0]; continue;
24
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
25
- default:
26
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
27
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
28
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
29
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
30
- if (t[2]) _.ops.pop();
31
- _.trys.pop(); continue;
32
- }
33
- op = body.call(thisArg, _);
34
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
35
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
36
- }
37
- };
38
- Object.defineProperty(exports, "__esModule", { value: true });
39
- exports.useLoadNoReadNotifications = void 0;
40
- var ui_1 = require("../../../../../ui/index.js");
41
- var system_1 = require("../../../../../system/index.js");
42
- function useLoadNoReadNotifications() {
43
- function fetcher() {
44
- return __awaiter(this, void 0, void 0, function () {
45
- var res;
46
- return __generator(this, function (_a) {
47
- switch (_a.label) {
48
- case 0: return [4 /*yield*/, system_1.container.get(system_1.Types.RemoteNotifications).loadNoRead()];
49
- case 1:
50
- res = _a.sent();
51
- return [2 /*return*/, res];
52
- }
53
- });
54
- });
55
- }
56
- var response = (0, ui_1.useQuery)({ queryFn: fetcher, queryKey: 'LoadNoReadNotifications', enableCache: true, interval: 1 * 60 * 1000 });
57
- return response;
58
- }
59
- exports.useLoadNoReadNotifications = useLoadNoReadNotifications;
60
- //# sourceMappingURL=index.js.map
@@ -1,8 +0,0 @@
1
- import { IUseTableProps } from './interfaces.js';
2
- export declare function useTable<T = any, M = any>(props: IUseTableProps<T, M>): {
3
- query: {
4
- data: any;
5
- isLoading: boolean;
6
- };
7
- Table: import("react/jsx-runtime").JSX.Element;
8
- };