ingeniuscliq-core 0.4.19 → 0.4.21

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 (279) hide show
  1. package/dist/components/common/carousel/CustomCarousel.d.ts +1 -1
  2. package/dist/components/common/carousel/CustomCarousel.d.ts.map +1 -1
  3. package/dist/components/common/carousel/CustomCarouselSection.d.ts +1 -1
  4. package/dist/components/common/carousel/CustomCarouselSection.d.ts.map +1 -1
  5. package/dist/components/common/form/FormCheckbox.d.ts +1 -1
  6. package/dist/components/common/form/FormCheckbox.d.ts.map +1 -1
  7. package/dist/components/common/form/FormInput.d.ts +1 -1
  8. package/dist/components/common/form/FormInput.d.ts.map +1 -1
  9. package/dist/components/common/form/FormSelect.d.ts +1 -1
  10. package/dist/components/common/form/FormSelect.d.ts.map +1 -1
  11. package/dist/components/common/form/FormTextArea.d.ts +1 -1
  12. package/dist/components/common/form/FormTextArea.d.ts.map +1 -1
  13. package/dist/components/common/form/FormWrapper.d.ts +1 -1
  14. package/dist/components/common/form/FormWrapper.d.ts.map +1 -1
  15. package/dist/components/common/logo/Logo.d.ts +1 -1
  16. package/dist/components/common/logo/Logo.d.ts.map +1 -1
  17. package/dist/components/common/pagination/CustomPagination.d.ts +1 -1
  18. package/dist/components/common/pagination/CustomPagination.d.ts.map +1 -1
  19. package/dist/components/common/select/CustomSelect.d.ts +1 -1
  20. package/dist/components/common/select/CustomSelect.d.ts.map +1 -1
  21. package/dist/components/common/spinner/Spinner.d.ts +1 -1
  22. package/dist/components/common/spinner/Spinner.d.ts.map +1 -1
  23. package/dist/components/common/stepper/Stepper.d.ts +1 -1
  24. package/dist/components/common/stepper/Stepper.d.ts.map +1 -1
  25. package/dist/components/common/stepper/Stepper.tsx +1 -1
  26. package/dist/components/layouts/CoreBaseLayout.d.ts +1 -1
  27. package/dist/components/layouts/CoreBaseLayout.d.ts.map +1 -1
  28. package/dist/components/templates/CoreHomeLayout.d.ts +1 -1
  29. package/dist/components/templates/CoreHomeLayout.d.ts.map +1 -1
  30. package/dist/components/templates/CorePreviewLayout.d.ts +1 -1
  31. package/dist/components/templates/CorePreviewLayout.d.ts.map +1 -1
  32. package/dist/components/ui/accordion.tsx +9 -9
  33. package/dist/components/ui/alert-dialog.d.ts +2 -2
  34. package/dist/components/ui/alert-dialog.tsx +16 -16
  35. package/dist/components/ui/alert.d.ts +3 -3
  36. package/dist/components/ui/alert.d.ts.map +1 -1
  37. package/dist/components/ui/alert.tsx +1 -1
  38. package/dist/components/ui/avatar.tsx +7 -7
  39. package/dist/components/ui/badge.d.ts +4 -4
  40. package/dist/components/ui/badge.d.ts.map +1 -1
  41. package/dist/components/ui/badge.tsx +1 -1
  42. package/dist/components/ui/breadcrumb.d.ts +2 -2
  43. package/dist/components/ui/breadcrumb.tsx +3 -4
  44. package/dist/components/ui/button.d.ts +4 -4
  45. package/dist/components/ui/button.d.ts.map +1 -1
  46. package/dist/components/ui/button.tsx +2 -2
  47. package/dist/components/ui/carousel.tsx +2 -3
  48. package/dist/components/ui/checkbox.tsx +5 -5
  49. package/dist/components/ui/dialog.d.ts +2 -2
  50. package/dist/components/ui/dialog.tsx +15 -15
  51. package/dist/components/ui/dropdown-menu.d.ts +1 -1
  52. package/dist/components/ui/dropdown-menu.tsx +27 -29
  53. package/dist/components/ui/form.d.ts +1 -1
  54. package/dist/components/ui/form.d.ts.map +1 -1
  55. package/dist/components/ui/form.tsx +2 -2
  56. package/dist/components/ui/label.d.ts +1 -1
  57. package/dist/components/ui/label.d.ts.map +1 -1
  58. package/dist/components/ui/label.tsx +4 -4
  59. package/dist/components/ui/pagination.d.ts +5 -5
  60. package/dist/components/ui/pagination.tsx +2 -4
  61. package/dist/components/ui/popover.tsx +7 -7
  62. package/dist/components/ui/radio-group.tsx +7 -7
  63. package/dist/components/ui/select.tsx +25 -27
  64. package/dist/components/ui/separator.tsx +3 -3
  65. package/dist/components/ui/sheet.d.ts +5 -5
  66. package/dist/components/ui/sheet.d.ts.map +1 -1
  67. package/dist/components/ui/sheet.tsx +16 -16
  68. package/dist/components/ui/skeleton.d.ts +1 -1
  69. package/dist/components/ui/skeleton.d.ts.map +1 -1
  70. package/dist/components/ui/slider.tsx +6 -6
  71. package/dist/components/ui/stepper.tsx +4 -4
  72. package/dist/components/ui/switch.tsx +4 -4
  73. package/dist/components/ui/tabs.tsx +9 -9
  74. package/dist/components/ui/tooltip.tsx +6 -6
  75. package/dist/helpers/axiosGlobal.js +1 -2
  76. package/dist/hooks/useLanguage.js +2 -5
  77. package/dist/hooks/useNotification.js +1 -1
  78. package/dist/i18n/config.js +1 -5
  79. package/dist/lib/utils.js +1 -1
  80. package/dist/modules/CoreAuth/classes/CoreAuthBuilder.d.ts +2 -2
  81. package/dist/modules/CoreAuth/classes/CoreAuthBuilder.js +1 -1
  82. package/dist/modules/CoreAuth/context/AuthContext.d.ts +2 -2
  83. package/dist/modules/CoreAuth/context/AuthContext.d.ts.map +1 -1
  84. package/dist/modules/CoreAuth/hooks/useAuth.d.ts +3 -3
  85. package/dist/modules/CoreAuth/index.js +1 -0
  86. package/dist/modules/CoreAuth/stores/authStore.d.ts +2 -2
  87. package/dist/modules/CoreCustomization/classes/CoreCustomizationBuilder.d.ts +8 -8
  88. package/dist/modules/CoreCustomization/classes/CoreCustomizationBuilder.d.ts.map +1 -1
  89. package/dist/modules/CoreCustomization/classes/CoreCustomizationBuilder.js +30 -16
  90. package/dist/modules/CoreCustomization/index.js +1 -0
  91. package/dist/modules/CoreOrder/classes/CoreOrderBuilder.d.ts.map +1 -1
  92. package/dist/modules/CoreOrder/classes/CoreOrderBuilder.js +15 -8
  93. package/dist/modules/CoreOrder/index.js +1 -0
  94. package/dist/modules/CorePayForm/classes/CorePayFormBuilder.d.ts +2 -2
  95. package/dist/modules/CorePayForm/classes/CorePayFormBuilder.d.ts.map +1 -1
  96. package/dist/modules/CorePayForm/classes/CorePayFormBuilder.js +15 -8
  97. package/dist/modules/CorePayForm/index.js +1 -0
  98. package/dist/modules/CoreProduct/classes/CoreProductBuilder.d.ts +8 -8
  99. package/dist/modules/CoreProduct/classes/CoreProductBuilder.d.ts.map +1 -1
  100. package/dist/modules/CoreProduct/classes/CoreProductBuilder.js +34 -13
  101. package/dist/modules/CoreProduct/index.js +1 -0
  102. package/dist/modules/CoreShipment/classes/CoreShipmentBuilder.d.ts +6 -6
  103. package/dist/modules/CoreShipment/classes/CoreShipmentBuilder.d.ts.map +1 -1
  104. package/dist/modules/CoreShipment/classes/CoreShipmentBuilder.js +34 -13
  105. package/dist/modules/CoreShipment/index.js +1 -0
  106. package/dist/modules/CoreShopCart/classes/CoreShopCartBuilder.d.ts +4 -4
  107. package/dist/modules/CoreShopCart/classes/CoreShopCartBuilder.d.ts.map +1 -1
  108. package/dist/modules/CoreShopCart/classes/CoreShopCartBuilder.js +12 -5
  109. package/package.json +21 -13
  110. package/src/commands/common/constants.js +10 -0
  111. package/src/commands/helpers/index.js +15 -0
  112. package/src/commands/helpers/strings.js +4 -0
  113. package/src/commands/templates/locale.js +14 -0
  114. package/src/commands/templates/service.js +12 -0
  115. package/src/commands/templates/type.js +10 -0
  116. package/README.md +0 -417
  117. package/dist/_virtual/index.js +0 -5
  118. package/dist/_virtual/index2.js +0 -3
  119. package/dist/_virtual/use-sync-external-store-shim.development.js +0 -3
  120. package/dist/_virtual/use-sync-external-store-shim.production.js +0 -3
  121. package/dist/node_modules/@floating-ui/core/dist/floating-ui.core.js +0 -814
  122. package/dist/node_modules/@floating-ui/dom/dist/floating-ui.dom.js +0 -751
  123. package/dist/node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.js +0 -350
  124. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.dom.js +0 -161
  125. package/dist/node_modules/@floating-ui/utils/dist/floating-ui.utils.js +0 -137
  126. package/dist/node_modules/@radix-ui/number/dist/index.js +0 -6
  127. package/dist/node_modules/@radix-ui/primitive/dist/index.js +0 -11
  128. package/dist/node_modules/@radix-ui/react-accordion/dist/index.js +0 -305
  129. package/dist/node_modules/@radix-ui/react-alert-dialog/dist/index.js +0 -147
  130. package/dist/node_modules/@radix-ui/react-arrow/dist/index.js +0 -25
  131. package/dist/node_modules/@radix-ui/react-avatar/dist/index.js +0 -118
  132. package/dist/node_modules/@radix-ui/react-checkbox/dist/index.js +0 -270
  133. package/dist/node_modules/@radix-ui/react-collapsible/dist/index.js +0 -145
  134. package/dist/node_modules/@radix-ui/react-collection/dist/index.js +0 -70
  135. package/dist/node_modules/@radix-ui/react-compose-refs/dist/index.js +0 -39
  136. package/dist/node_modules/@radix-ui/react-context/dist/index.js +0 -79
  137. package/dist/node_modules/@radix-ui/react-dialog/dist/index.js +0 -321
  138. package/dist/node_modules/@radix-ui/react-direction/dist/index.js +0 -11
  139. package/dist/node_modules/@radix-ui/react-dismissable-layer/dist/index.js +0 -211
  140. package/dist/node_modules/@radix-ui/react-dropdown-menu/dist/index.js +0 -267
  141. package/dist/node_modules/@radix-ui/react-focus-guards/dist/index.js +0 -29
  142. package/dist/node_modules/@radix-ui/react-focus-scope/dist/index.js +0 -207
  143. package/dist/node_modules/@radix-ui/react-id/dist/index.js +0 -15
  144. package/dist/node_modules/@radix-ui/react-label/dist/index.js +0 -24
  145. package/dist/node_modules/@radix-ui/react-menu/dist/index.js +0 -834
  146. package/dist/node_modules/@radix-ui/react-popover/dist/index.js +0 -299
  147. package/dist/node_modules/@radix-ui/react-popper/dist/index.js +0 -283
  148. package/dist/node_modules/@radix-ui/react-portal/dist/index.js +0 -17
  149. package/dist/node_modules/@radix-ui/react-presence/dist/index.js +0 -130
  150. package/dist/node_modules/@radix-ui/react-primitive/dist/index.js +0 -43
  151. package/dist/node_modules/@radix-ui/react-radio-group/dist/index.js +0 -282
  152. package/dist/node_modules/@radix-ui/react-roving-focus/dist/index.js +0 -223
  153. package/dist/node_modules/@radix-ui/react-select/dist/index.js +0 -1156
  154. package/dist/node_modules/@radix-ui/react-separator/dist/index.js +0 -30
  155. package/dist/node_modules/@radix-ui/react-slider/dist/index.js +0 -554
  156. package/dist/node_modules/@radix-ui/react-slot/dist/index.js +0 -99
  157. package/dist/node_modules/@radix-ui/react-switch/dist/index.js +0 -152
  158. package/dist/node_modules/@radix-ui/react-tabs/dist/index.js +0 -187
  159. package/dist/node_modules/@radix-ui/react-tooltip/dist/index.js +0 -482
  160. package/dist/node_modules/@radix-ui/react-use-callback-ref/dist/index.js +0 -12
  161. package/dist/node_modules/@radix-ui/react-use-controllable-state/dist/index.js +0 -70
  162. package/dist/node_modules/@radix-ui/react-use-escape-keydown/dist/index.js +0 -18
  163. package/dist/node_modules/@radix-ui/react-use-is-hydrated/dist/index.js +0 -16
  164. package/dist/node_modules/@radix-ui/react-use-layout-effect/dist/index.js +0 -7
  165. package/dist/node_modules/@radix-ui/react-use-previous/dist/index.js +0 -15
  166. package/dist/node_modules/@radix-ui/react-use-size/dist/index.js +0 -40
  167. package/dist/node_modules/@radix-ui/react-visually-hidden/dist/index.js +0 -35
  168. package/dist/node_modules/@stepperize/core/dist/index.js +0 -3
  169. package/dist/node_modules/@stepperize/react/dist/index.js +0 -6
  170. package/dist/node_modules/aria-hidden/dist/es2015/index.js +0 -137
  171. package/dist/node_modules/axios/index.js +0 -25
  172. package/dist/node_modules/axios/lib/adapters/adapters.js +0 -81
  173. package/dist/node_modules/axios/lib/adapters/fetch.js +0 -229
  174. package/dist/node_modules/axios/lib/adapters/xhr.js +0 -199
  175. package/dist/node_modules/axios/lib/axios.js +0 -86
  176. package/dist/node_modules/axios/lib/cancel/CancelToken.js +0 -133
  177. package/dist/node_modules/axios/lib/cancel/CanceledError.js +0 -23
  178. package/dist/node_modules/axios/lib/cancel/isCancel.js +0 -5
  179. package/dist/node_modules/axios/lib/core/Axios.js +0 -238
  180. package/dist/node_modules/axios/lib/core/AxiosError.js +0 -101
  181. package/dist/node_modules/axios/lib/core/AxiosHeaders.js +0 -312
  182. package/dist/node_modules/axios/lib/core/InterceptorManager.js +0 -69
  183. package/dist/node_modules/axios/lib/core/buildFullPath.js +0 -22
  184. package/dist/node_modules/axios/lib/core/dispatchRequest.js +0 -81
  185. package/dist/node_modules/axios/lib/core/mergeConfig.js +0 -106
  186. package/dist/node_modules/axios/lib/core/settle.js +0 -27
  187. package/dist/node_modules/axios/lib/core/transformData.js +0 -28
  188. package/dist/node_modules/axios/lib/defaults/index.js +0 -159
  189. package/dist/node_modules/axios/lib/defaults/transitional.js +0 -7
  190. package/dist/node_modules/axios/lib/env/data.js +0 -3
  191. package/dist/node_modules/axios/lib/helpers/AxiosURLSearchParams.js +0 -56
  192. package/dist/node_modules/axios/lib/helpers/HttpStatusCode.js +0 -71
  193. package/dist/node_modules/axios/lib/helpers/bind.js +0 -7
  194. package/dist/node_modules/axios/lib/helpers/buildURL.js +0 -69
  195. package/dist/node_modules/axios/lib/helpers/combineURLs.js +0 -15
  196. package/dist/node_modules/axios/lib/helpers/composeSignals.js +0 -48
  197. package/dist/node_modules/axios/lib/helpers/cookies.js +0 -43
  198. package/dist/node_modules/axios/lib/helpers/formDataToJSON.js +0 -93
  199. package/dist/node_modules/axios/lib/helpers/isAbsoluteURL.js +0 -15
  200. package/dist/node_modules/axios/lib/helpers/isAxiosError.js +0 -14
  201. package/dist/node_modules/axios/lib/helpers/isURLSameOrigin.js +0 -16
  202. package/dist/node_modules/axios/lib/helpers/null.js +0 -4
  203. package/dist/node_modules/axios/lib/helpers/parseHeaders.js +0 -55
  204. package/dist/node_modules/axios/lib/helpers/parseProtocol.js +0 -6
  205. package/dist/node_modules/axios/lib/helpers/progressEventReducer.js +0 -46
  206. package/dist/node_modules/axios/lib/helpers/resolveConfig.js +0 -58
  207. package/dist/node_modules/axios/lib/helpers/speedometer.js +0 -53
  208. package/dist/node_modules/axios/lib/helpers/spread.js +0 -28
  209. package/dist/node_modules/axios/lib/helpers/throttle.js +0 -44
  210. package/dist/node_modules/axios/lib/helpers/toFormData.js +0 -219
  211. package/dist/node_modules/axios/lib/helpers/toURLEncodedForm.js +0 -19
  212. package/dist/node_modules/axios/lib/helpers/trackStream.js +0 -88
  213. package/dist/node_modules/axios/lib/helpers/validator.js +0 -99
  214. package/dist/node_modules/axios/lib/platform/browser/classes/Blob.js +0 -3
  215. package/dist/node_modules/axios/lib/platform/browser/classes/FormData.js +0 -3
  216. package/dist/node_modules/axios/lib/platform/browser/classes/URLSearchParams.js +0 -5
  217. package/dist/node_modules/axios/lib/platform/browser/index.js +0 -15
  218. package/dist/node_modules/axios/lib/platform/common/utils.js +0 -45
  219. package/dist/node_modules/axios/lib/platform/index.js +0 -9
  220. package/dist/node_modules/axios/lib/utils.js +0 -780
  221. package/dist/node_modules/class-variance-authority/dist/index.js +0 -44
  222. package/dist/node_modules/clsx/dist/clsx.js +0 -3
  223. package/dist/node_modules/embla-carousel/esm/embla-carousel.esm.js +0 -1669
  224. package/dist/node_modules/embla-carousel-react/esm/embla-carousel-react.esm.js +0 -37
  225. package/dist/node_modules/embla-carousel-reactive-utils/esm/embla-carousel-reactive-utils.esm.js +0 -38
  226. package/dist/node_modules/get-nonce/dist/es2015/index.js +0 -8
  227. package/dist/node_modules/lucide-react/dist/esm/Icon.js +0 -43
  228. package/dist/node_modules/lucide-react/dist/esm/createLucideIcon.js +0 -30
  229. package/dist/node_modules/lucide-react/dist/esm/defaultAttributes.js +0 -20
  230. package/dist/node_modules/lucide-react/dist/esm/icons/arrow-left.js +0 -17
  231. package/dist/node_modules/lucide-react/dist/esm/icons/arrow-right.js +0 -17
  232. package/dist/node_modules/lucide-react/dist/esm/icons/check.js +0 -14
  233. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-down.js +0 -14
  234. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-left.js +0 -14
  235. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-right.js +0 -14
  236. package/dist/node_modules/lucide-react/dist/esm/icons/chevron-up.js +0 -14
  237. package/dist/node_modules/lucide-react/dist/esm/icons/circle.js +0 -14
  238. package/dist/node_modules/lucide-react/dist/esm/icons/ellipsis.js +0 -18
  239. package/dist/node_modules/lucide-react/dist/esm/icons/x.js +0 -17
  240. package/dist/node_modules/lucide-react/dist/esm/shared/src/utils.js +0 -28
  241. package/dist/node_modules/react-hook-form/dist/index.esm.js +0 -560
  242. package/dist/node_modules/react-i18next/dist/es/IcuTransUtils/htmlEntityDecoder.js +0 -210
  243. package/dist/node_modules/react-i18next/dist/es/context.js +0 -18
  244. package/dist/node_modules/react-i18next/dist/es/defaults.js +0 -22
  245. package/dist/node_modules/react-i18next/dist/es/i18nInstance.js +0 -7
  246. package/dist/node_modules/react-i18next/dist/es/initReactI18next.js +0 -12
  247. package/dist/node_modules/react-i18next/dist/es/unescape.js +0 -27
  248. package/dist/node_modules/react-i18next/dist/es/useTranslation.js +0 -157
  249. package/dist/node_modules/react-i18next/dist/es/utils.js +0 -63
  250. package/dist/node_modules/react-remove-scroll/dist/es2015/Combination.js +0 -9
  251. package/dist/node_modules/react-remove-scroll/dist/es2015/SideEffect.js +0 -167
  252. package/dist/node_modules/react-remove-scroll/dist/es2015/UI.js +0 -38
  253. package/dist/node_modules/react-remove-scroll/dist/es2015/aggresiveCapture.js +0 -21
  254. package/dist/node_modules/react-remove-scroll/dist/es2015/handleScroll.js +0 -110
  255. package/dist/node_modules/react-remove-scroll/dist/es2015/medium.js +0 -5
  256. package/dist/node_modules/react-remove-scroll/dist/es2015/sidecar.js +0 -7
  257. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/component.js +0 -56
  258. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/constants.js +0 -10
  259. package/dist/node_modules/react-remove-scroll-bar/dist/es2015/utils.js +0 -31
  260. package/dist/node_modules/react-style-singleton/dist/es2015/component.js +0 -19
  261. package/dist/node_modules/react-style-singleton/dist/es2015/hook.js +0 -25
  262. package/dist/node_modules/react-style-singleton/dist/es2015/singleton.js +0 -51
  263. package/dist/node_modules/sonner/dist/index.js +0 -299
  264. package/dist/node_modules/tslib/tslib.es6.js +0 -56
  265. package/dist/node_modules/use-callback-ref/dist/es2015/assignRef.js +0 -24
  266. package/dist/node_modules/use-callback-ref/dist/es2015/useMergeRef.js +0 -48
  267. package/dist/node_modules/use-callback-ref/dist/es2015/useRef.js +0 -42
  268. package/dist/node_modules/use-sidecar/dist/es2015/exports.js +0 -21
  269. package/dist/node_modules/use-sidecar/dist/es2015/medium.js +0 -77
  270. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js +0 -106
  271. package/dist/node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js +0 -77
  272. package/dist/node_modules/use-sync-external-store/shim/index.js +0 -19
  273. package/dist/node_modules/zustand/esm/react.js +0 -22
  274. package/dist/node_modules/zustand/esm/vanilla.js +0 -24
  275. /package/src/{core/commands → commands}/create-core-module.js +0 -0
  276. /package/src/{core/commands → commands}/create-module.js +0 -0
  277. /package/src/{core/commands → commands}/create-template.js +0 -0
  278. /package/src/{core/commands → commands}/rollback-core-module.js +0 -0
  279. /package/src/{core/commands → commands}/rollback-module.js +0 -0
@@ -8,7 +8,7 @@ export declare class CorePayFormBuilder<T extends CorePayForm = CorePayForm> imp
8
8
  build(): import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<CorePayFormStore<T>>, "persist"> & {
9
9
  persist: {
10
10
  setOptions: (options: Partial<import('zustand/middleware').PersistOptions<CorePayFormStore<T>, {
11
- payForms: T[] | null;
11
+ payForms: T[];
12
12
  }>>) => void;
13
13
  clearStorage: () => void;
14
14
  rehydrate: () => Promise<void> | void;
@@ -16,7 +16,7 @@ export declare class CorePayFormBuilder<T extends CorePayForm = CorePayForm> imp
16
16
  onHydrate: (fn: (state: CorePayFormStore<T>) => void) => () => void;
17
17
  onFinishHydration: (fn: (state: CorePayFormStore<T>) => void) => () => void;
18
18
  getOptions: () => Partial<import('zustand/middleware').PersistOptions<CorePayFormStore<T>, {
19
- payForms: T[] | null;
19
+ payForms: T[];
20
20
  }>>;
21
21
  };
22
22
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"CorePayFormBuilder.d.ts","sourceRoot":"","sources":["../../../../src/modules/CorePayForm/classes/CorePayFormBuilder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,qBAAa,kBAAkB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,CAAE,YAAW,WAAW;IACzF,SAAS,CAAC,cAAc,EAAE,sBAAsB,CAAC;IACjD,SAAS,CAAC,YAAY,EAIjB,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC;gBAG/D,OAAO,GAAE,sBAAqD,EAC9D,YAAY,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAQtC,KAAK;;;;;;;;;;;;;;;CAwDb"}
1
+ {"version":3,"file":"CorePayFormBuilder.d.ts","sourceRoot":"","sources":["../../../../src/modules/CorePayForm/classes/CorePayFormBuilder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAG3D,qBAAa,kBAAkB,CAAC,CAAC,SAAS,WAAW,GAAG,WAAW,CAAE,YAAW,WAAW;IACzF,SAAS,CAAC,cAAc,EAAE,sBAAsB,CAAC;IACjD,SAAS,CAAC,YAAY,EAIjB,IAAI,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,UAAU,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC;gBAG/D,OAAO,GAAE,sBAAqD,EAC9D,YAAY,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,CAAC,CAAC;IAQtC,KAAK;;;;;;;;;;;;;;;CA+Db"}
@@ -1,6 +1,6 @@
1
+ import { create } from 'zustand';
1
2
  import { persist } from '../../../node_modules/zustand/esm/middleware.js';
2
3
  import { CorePayFormBaseService } from '../services/base.js';
3
- import { create } from '../../../node_modules/zustand/esm/react.js';
4
4
 
5
5
  class CorePayFormBuilder {
6
6
  payFormService;
@@ -32,18 +32,25 @@ class CorePayFormBuilder {
32
32
  }, onError = () => {
33
33
  }, onFinish = () => {
34
34
  } } = actions || {};
35
+ const { onlyFetch, ...queryParams } = params || {};
35
36
  try {
36
- set({ loading: true, error: null });
37
- const response = await this.payFormService.fetchPayForms(params);
37
+ if (!onlyFetch) {
38
+ set({ loading: true, error: null });
39
+ }
40
+ const response = await this.payFormService.fetchPayForms(queryParams);
38
41
  const payForms = response.data.data;
39
- set({
40
- payForms,
41
- loading: false
42
- });
42
+ if (!onlyFetch) {
43
+ set({
44
+ payForms,
45
+ loading: false
46
+ });
47
+ }
43
48
  onSuccess(response);
44
49
  return payForms;
45
50
  } catch (error) {
46
- set({ loading: false, error });
51
+ if (!onlyFetch) {
52
+ set({ loading: false, error });
53
+ }
47
54
  onError(error);
48
55
  throw error;
49
56
  } finally {
@@ -1,3 +1,4 @@
1
+ import 'zustand';
1
2
  import '../../helpers/axiosGlobal.js';
2
3
  import { loadModuleTranslations } from '../../i18n/utils/loadModuleTranslations.js';
3
4
  import enTranslations from './locale/en.json.js';
@@ -9,10 +9,10 @@ export declare class CoreProductBuilder<T extends CoreProduct = CoreProduct, K e
9
9
  build(): import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<CoreProductStore<T, K>>, "persist"> & {
10
10
  persist: {
11
11
  setOptions: (options: Partial<import('zustand/middleware').PersistOptions<CoreProductStore<T, K>, {
12
- productDetails: T | null;
13
- products: import('../../../types').BasePagination<T> | null;
14
- categories: K[] | null;
15
- bestSellers: T[] | null;
12
+ productDetails: T;
13
+ products: import('../../../types').BasePagination<T>;
14
+ categories: K[];
15
+ bestSellers: T[];
16
16
  }>>) => void;
17
17
  clearStorage: () => void;
18
18
  rehydrate: () => Promise<void> | void;
@@ -20,10 +20,10 @@ export declare class CoreProductBuilder<T extends CoreProduct = CoreProduct, K e
20
20
  onHydrate: (fn: (state: CoreProductStore<T, K>) => void) => () => void;
21
21
  onFinishHydration: (fn: (state: CoreProductStore<T, K>) => void) => () => void;
22
22
  getOptions: () => Partial<import('zustand/middleware').PersistOptions<CoreProductStore<T, K>, {
23
- productDetails: T | null;
24
- products: import('../../../types').BasePagination<T> | null;
25
- categories: K[] | null;
26
- bestSellers: T[] | null;
23
+ productDetails: T;
24
+ products: import('../../../types').BasePagination<T>;
25
+ categories: K[];
26
+ bestSellers: T[];
27
27
  }>>;
28
28
  };
29
29
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"CoreProductBuilder.d.ts","sourceRoot":"","sources":["../../../../src/modules/CoreProduct/classes/CoreProductBuilder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAGhE,qBAAa,kBAAkB,CAC7B,CAAC,SAAS,WAAW,GAAG,WAAW,EACnC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,CACnD,YAAW,WAAW;IACtB,SAAS,CAAC,cAAc,EAAE,sBAAsB,CAAC;IACjD,SAAS,CAAC,YAAY,EAOjB,IAAI,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,gBAAgB,GAAG,UAAU,GAAG,YAAY,GAAG,aAAa,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC;gBAGpH,OAAO,GAAE,sBAAqD,EAC9D,YAAY,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAQzC,KAAK;;;;;;;;;;;;;;;;;;;;;CA6Gb"}
1
+ {"version":3,"file":"CoreProductBuilder.d.ts","sourceRoot":"","sources":["../../../../src/modules/CoreProduct/classes/CoreProductBuilder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,sBAAsB,CAAC;AAC1E,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAExE,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAGhE,qBAAa,kBAAkB,CAC7B,CAAC,SAAS,WAAW,GAAG,WAAW,EACnC,CAAC,SAAS,mBAAmB,GAAG,mBAAmB,CACnD,YAAW,WAAW;IACtB,SAAS,CAAC,cAAc,EAAE,sBAAsB,CAAC;IACjD,SAAS,CAAC,YAAY,EAOjB,IAAI,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,gBAAgB,GAAG,UAAU,GAAG,YAAY,GAAG,aAAa,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC;gBAGpH,OAAO,GAAE,sBAAqD,EAC9D,YAAY,CAAC,EAAE,OAAO,CAAC,gBAAgB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;IAQzC,KAAK;;;;;;;;;;;;;;;;;;;;;CAyIb"}
@@ -1,6 +1,6 @@
1
+ import { create } from 'zustand';
1
2
  import { persist } from '../../../node_modules/zustand/esm/middleware.js';
2
3
  import { CoreProductBaseService } from '../services/base.js';
3
- import { create } from '../../../node_modules/zustand/esm/react.js';
4
4
 
5
5
  class CoreProductBuilder {
6
6
  productService;
@@ -39,14 +39,21 @@ class CoreProductBuilder {
39
39
  }, onError = () => {
40
40
  }, onFinish = () => {
41
41
  } } = actions || {};
42
+ const { onlyFetch, ...queryParams } = params || {};
42
43
  try {
43
- set({ loading: true, error: null });
44
- const response = await this.productService.getAllProducts(params);
45
- set({ products: response.data.data, loading: false });
44
+ if (!onlyFetch) {
45
+ set({ loading: true, error: null });
46
+ }
47
+ const response = await this.productService.getAllProducts(queryParams);
48
+ if (!onlyFetch) {
49
+ set({ products: response.data.data, loading: false });
50
+ }
46
51
  onSuccess(response);
47
52
  return response.data;
48
53
  } catch (error) {
49
- set((state) => ({ ...state, error, loading: false }));
54
+ if (!onlyFetch) {
55
+ set((state) => ({ ...state, error, loading: false }));
56
+ }
50
57
  onError(error);
51
58
  throw error;
52
59
  } finally {
@@ -72,13 +79,20 @@ class CoreProductBuilder {
72
79
  }
73
80
  },
74
81
  fetchCategories: async (params) => {
82
+ const { onlyFetch, ...queryParams } = params || {};
75
83
  try {
76
- set({ loading: true, error: null });
77
- const response = await this.productService.getAllCategories(params);
78
- set({ categories: response.data.data, loading: false });
84
+ if (!onlyFetch) {
85
+ set({ loading: true, error: null });
86
+ }
87
+ const response = await this.productService.getAllCategories(queryParams);
88
+ if (!onlyFetch) {
89
+ set({ categories: response.data.data, loading: false });
90
+ }
79
91
  return response.data;
80
92
  } catch (error) {
81
- set((state) => ({ ...state, error, loading: false }));
93
+ if (!onlyFetch) {
94
+ set((state) => ({ ...state, error, loading: false }));
95
+ }
82
96
  throw error;
83
97
  }
84
98
  },
@@ -87,14 +101,21 @@ class CoreProductBuilder {
87
101
  }, onError = () => {
88
102
  }, onFinish = () => {
89
103
  } } = actions || {};
104
+ const { onlyFetch, ...queryParams } = params || {};
90
105
  try {
91
- set({ loading: true, error: null });
92
- const response = await this.productService.fetchBestSellers(params);
93
- set({ loading: false, bestSellers: response.data.data });
106
+ if (!onlyFetch) {
107
+ set({ loading: true, error: null });
108
+ }
109
+ const response = await this.productService.fetchBestSellers(queryParams);
110
+ if (!onlyFetch) {
111
+ set({ loading: false, bestSellers: response.data.data });
112
+ }
94
113
  onSuccess(response);
95
114
  return response.data;
96
115
  } catch (error) {
97
- set((state) => ({ ...state, error, loading: false, bestSellers: null }));
116
+ if (!onlyFetch) {
117
+ set((state) => ({ ...state, error, loading: false, bestSellers: null }));
118
+ }
98
119
  onError(error);
99
120
  throw error;
100
121
  } finally {
@@ -1,3 +1,4 @@
1
+ import 'zustand';
1
2
  import '../../helpers/axiosGlobal.js';
2
3
  import { loadModuleTranslations } from '../../i18n/utils/loadModuleTranslations.js';
3
4
  import enTranslations from './locale/en.json.js';
@@ -8,9 +8,9 @@ export declare class CoreShipmentBuilder<T extends CoreShippingMethod<Z>, K exte
8
8
  build(): import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<CoreShipmentStore<T, K, Z, Y>>, "persist"> & {
9
9
  persist: {
10
10
  setOptions: (options: Partial<import('zustand/middleware').PersistOptions<CoreShipmentStore<T, K, Z, Y>, {
11
- shippingMethods: T[] | null;
12
- shippingAddresses: import('../../..').BasePagination<K> | null;
13
- beneficiaries: import('../../..').BasePagination<Y> | null;
11
+ shippingMethods: T[];
12
+ shippingAddresses: import('../../..').BasePagination<K>;
13
+ beneficiaries: import('../../..').BasePagination<Y>;
14
14
  }>>) => void;
15
15
  clearStorage: () => void;
16
16
  rehydrate: () => Promise<void> | void;
@@ -18,9 +18,9 @@ export declare class CoreShipmentBuilder<T extends CoreShippingMethod<Z>, K exte
18
18
  onHydrate: (fn: (state: CoreShipmentStore<T, K, Z, Y>) => void) => () => void;
19
19
  onFinishHydration: (fn: (state: CoreShipmentStore<T, K, Z, Y>) => void) => () => void;
20
20
  getOptions: () => Partial<import('zustand/middleware').PersistOptions<CoreShipmentStore<T, K, Z, Y>, {
21
- shippingMethods: T[] | null;
22
- shippingAddresses: import('../../..').BasePagination<K> | null;
23
- beneficiaries: import('../../..').BasePagination<Y> | null;
21
+ shippingMethods: T[];
22
+ shippingAddresses: import('../../..').BasePagination<K>;
23
+ beneficiaries: import('../../..').BasePagination<Y>;
24
24
  }>>;
25
25
  };
26
26
  }>;
@@ -1 +1 @@
1
- {"version":3,"file":"CoreShipmentBuilder.d.ts","sourceRoot":"","sources":["../../../../src/modules/CoreShipment/classes/CoreShipmentBuilder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EAGxB,MAAM,uBAAuB,CAAC;AAG/B,qBAAa,mBAAmB,CAC9B,CAAC,SAAS,kBAAkB,CAAC,CAAC,CAAC,EAC/B,CAAC,SAAS,mBAAmB,EAC7B,CAAC,SAAS,uBAAuB,EACjC,CAAC,SAAS,uBAAuB,CACjC,YAAW,WAAW;IACtB,SAAS,CAAC,eAAe,EAAE,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/D,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,iBAAiB,GAAG,mBAAmB,GAAG,eAAe,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC;gBAG3I,OAAO,CAAC,EAAE,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAC7C,YAAY,CAAC,EAAE,GAAG;IAYb,KAAK;;;;;;;;;;;;;;;;;;;CAwLb"}
1
+ {"version":3,"file":"CoreShipmentBuilder.d.ts","sourceRoot":"","sources":["../../../../src/modules/CoreShipment/classes/CoreShipmentBuilder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAC3D,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,kBAAkB,EAClB,uBAAuB,EACvB,uBAAuB,EAGxB,MAAM,uBAAuB,CAAC;AAG/B,qBAAa,mBAAmB,CAC9B,CAAC,SAAS,kBAAkB,CAAC,CAAC,CAAC,EAC/B,CAAC,SAAS,mBAAmB,EAC7B,CAAC,SAAS,uBAAuB,EACjC,CAAC,SAAS,uBAAuB,CACjC,YAAW,WAAW;IACtB,SAAS,CAAC,eAAe,EAAE,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAC/D,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAAE,iBAAiB,GAAG,mBAAmB,GAAG,eAAe,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC;gBAG3I,OAAO,CAAC,EAAE,uBAAuB,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,EAC7C,YAAY,CAAC,EAAE,GAAG;IAYb,KAAK;;;;;;;;;;;;;;;;;;;CAsNb"}
@@ -1,6 +1,6 @@
1
+ import { create } from 'zustand';
1
2
  import { persist } from '../../../node_modules/zustand/esm/middleware.js';
2
3
  import { CoreShipmentBaseService } from '../services/base.js';
3
- import { create } from '../../../node_modules/zustand/esm/react.js';
4
4
 
5
5
  class CoreShipmentBuilder {
6
6
  shipmentService;
@@ -23,14 +23,21 @@ class CoreShipmentBuilder {
23
23
  // Shipping Methods
24
24
  setShippingMethods: (shippingMethods) => set({ shippingMethods }),
25
25
  getShippingMethods: () => get().shippingMethods,
26
- fetchShippingMethods: async () => {
27
- set({ loading: true, error: null });
26
+ fetchShippingMethods: async (params) => {
27
+ const { onlyFetch } = params || {};
28
28
  try {
29
+ if (!onlyFetch) {
30
+ set({ loading: true, error: null });
31
+ }
29
32
  const response = await this.shipmentService.getShippingMethods();
30
- set({ shippingMethods: response.data.data, loading: false });
33
+ if (!onlyFetch) {
34
+ set({ shippingMethods: response.data.data, loading: false });
35
+ }
31
36
  return response.data;
32
37
  } catch (error) {
33
- set({ error: error || "Failed to fetch shipping methods", loading: false });
38
+ if (!onlyFetch) {
39
+ set({ error: error || "Failed to fetch shipping methods", loading: false });
40
+ }
34
41
  throw error;
35
42
  }
36
43
  },
@@ -38,14 +45,21 @@ class CoreShipmentBuilder {
38
45
  setShippingAddresses: (shippingAddresses) => set({ shippingAddresses }),
39
46
  getShippingAddresses: () => get().shippingAddresses,
40
47
  fetchShippingAddresses: async (params, actions) => {
41
- set({ loading: true, error: null });
48
+ const { onlyFetch, ...queryParams } = params || {};
42
49
  try {
43
- const response = await this.shipmentService.getShippingAddresses(params);
44
- set({ shippingAddresses: response.data.data, loading: false });
50
+ if (!onlyFetch) {
51
+ set({ loading: true, error: null });
52
+ }
53
+ const response = await this.shipmentService.getShippingAddresses(queryParams);
54
+ if (!onlyFetch) {
55
+ set({ shippingAddresses: response.data.data, loading: false });
56
+ }
45
57
  actions?.onSuccess?.(response.data);
46
58
  return response.data;
47
59
  } catch (error) {
48
- set({ error: error || "Failed to fetch shipping addresses", loading: false });
60
+ if (!onlyFetch) {
61
+ set({ error: error || "Failed to fetch shipping addresses", loading: false });
62
+ }
49
63
  actions?.onError?.(error);
50
64
  throw error;
51
65
  } finally {
@@ -96,14 +110,21 @@ class CoreShipmentBuilder {
96
110
  },
97
111
  // Beneficiaries
98
112
  fetchBeneficiaries: async (params, actions) => {
99
- set({ loading: true, error: null });
113
+ const { onlyFetch, ...queryParams } = params || {};
100
114
  try {
101
- const response = await this.shipmentService.getBeneficiaries(params);
102
- set({ beneficiaries: response.data.data, loading: false });
115
+ if (!onlyFetch) {
116
+ set({ loading: true, error: null });
117
+ }
118
+ const response = await this.shipmentService.getBeneficiaries(queryParams);
119
+ if (!onlyFetch) {
120
+ set({ beneficiaries: response.data.data, loading: false });
121
+ }
103
122
  actions?.onSuccess?.(response.data);
104
123
  return response.data;
105
124
  } catch (error) {
106
- set({ error: error || "Failed to fetch beneficiaries", loading: false });
125
+ if (!onlyFetch) {
126
+ set({ error: error || "Failed to fetch beneficiaries", loading: false });
127
+ }
107
128
  actions?.onError?.(error);
108
129
  throw error;
109
130
  } finally {
@@ -1,4 +1,5 @@
1
1
  import '../../helpers/axiosGlobal.js';
2
+ import 'zustand';
2
3
  import { loadModuleTranslations } from '../../i18n/utils/loadModuleTranslations.js';
3
4
  import enTranslations from './locale/en.json.js';
4
5
  import esTranslations from './locale/es.json.js';
@@ -6,14 +6,14 @@ export declare class CoreShopCartBuilder<T> implements CoreBuilder {
6
6
  protected initialState: Pick<CoreShopCartStore<T>, 'cart' | 'cartItems' | 'loading' | 'error'>;
7
7
  constructor(service?: CoreShopCartBaseService<T>, initialState?: {
8
8
  cart: {
9
- items: never[];
9
+ items: any[];
10
10
  subtotal: number;
11
11
  total: number;
12
- itemized_subtotals: never[];
12
+ itemized_subtotals: any[];
13
13
  };
14
- cartItems: never[];
14
+ cartItems: any[];
15
15
  loading: boolean;
16
- error: null;
16
+ error: any;
17
17
  });
18
18
  build(): import('zustand').UseBoundStore<Omit<import('zustand').StoreApi<CoreShopCartStore<T>>, "persist"> & {
19
19
  persist: {
@@ -1 +1 @@
1
- {"version":3,"file":"CoreShopCartBuilder.d.ts","sourceRoot":"","sources":["../../../../src/modules/CoreShopCart/classes/CoreShopCartBuilder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,qBAAa,mBAAmB,CAAC,CAAC,CAAE,YAAW,WAAW;IACxD,SAAS,CAAC,eAAe,EAAE,uBAAuB,CAAC,CAAC,CAAC,CAAC;IACtD,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC;gBAG7F,OAAO,GAAE,uBAAuB,CAAC,CAAC,CAAoC,EACtE,YAAY;;;;;;;;;;KAUX;IAMI,KAAK;;;;;;;;;;;;;;;;;CAiKb"}
1
+ {"version":3,"file":"CoreShopCartBuilder.d.ts","sourceRoot":"","sources":["../../../../src/modules/CoreShopCart/classes/CoreShopCartBuilder.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,uBAAuB,EAAE,MAAM,kBAAkB,CAAC;AAC3D,OAAO,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAE1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,8BAA8B,CAAC;AAEhE,qBAAa,mBAAmB,CAAC,CAAC,CAAE,YAAW,WAAW;IACxD,SAAS,CAAC,eAAe,EAAE,uBAAuB,CAAC,CAAC,CAAC,CAAC;IACtD,SAAS,CAAC,YAAY,EAAE,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,GAAG,OAAO,CAAC,CAAC;gBAG7F,OAAO,GAAE,uBAAuB,CAAC,CAAC,CAAoC,EACtE,YAAY;;;;;;;;;;KAUX;IAMI,KAAK;;;;;;;;;;;;;;;;;CA2Kb"}
@@ -1,6 +1,6 @@
1
+ import { create } from 'zustand';
1
2
  import { persist } from '../../../node_modules/zustand/esm/middleware.js';
2
3
  import { CoreShopCartBaseService } from '../services/base.js';
3
- import { create } from '../../../node_modules/zustand/esm/react.js';
4
4
 
5
5
  class CoreShopCartBuilder {
6
6
  shopCartService;
@@ -133,15 +133,22 @@ class CoreShopCartBuilder {
133
133
  }
134
134
  },
135
135
  // Fetch cart items only
136
- fetchCartItems: async (actions) => {
137
- set({ loading: true, error: null });
136
+ fetchCartItems: async (params, actions) => {
137
+ const { onlyFetch } = params || {};
138
138
  try {
139
+ if (!onlyFetch) {
140
+ set({ loading: true, error: null });
141
+ }
139
142
  const response = await this.shopCartService.getCartItems();
140
- set({ cartItems: response.data.data, loading: false });
143
+ if (!onlyFetch) {
144
+ set({ cartItems: response.data.data, loading: false });
145
+ }
141
146
  actions?.onSuccess?.(response.data);
142
147
  return response.data;
143
148
  } catch (error) {
144
- set({ error: error || "Failed to fetch cart items", loading: false });
149
+ if (!onlyFetch) {
150
+ set({ error: error || "Failed to fetch cart items", loading: false });
151
+ }
145
152
  actions?.onError?.(error);
146
153
  throw error;
147
154
  } finally {
package/package.json CHANGED
@@ -1,29 +1,37 @@
1
1
  {
2
2
  "name": "ingeniuscliq-core",
3
- "version": "0.4.19",
3
+ "version": "0.4.21",
4
4
  "description": "IngeniusCliq Core UI y lógica compartida",
5
5
  "license": "MIT",
6
6
  "type": "module",
7
7
  "main": "./dist/index.js",
8
8
  "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "import": "./dist/index.js",
12
+ "types": "./dist/index.d.ts"
13
+ }
14
+ },
9
15
  "files": [
10
16
  "dist",
11
- "core/commands"
17
+ "src/commands"
12
18
  ],
13
19
  "bin": {
14
- "ingeniuscliq-create-template": "src/core/commands/create-template.js",
15
- "ingeniuscliq-create-module": "src/core/commands/create-module.js",
16
- "ingeniuscliq-rollback-module": "src/core/commands/rollback-module.js",
17
- "ingeniuscliq-create-core-module": "src/core/commands/create-core-module.js",
18
- "ingeniuscliq-rollback-core-module": "src/core/commands/rollback-core-module.js"
20
+ "ingeniuscliq-create-template": "src/commands/create-template.js",
21
+ "ingeniuscliq-create-module": "src/commands/create-module.js",
22
+ "ingeniuscliq-rollback-module": "src/commands/rollback-module.js",
23
+ "ingeniuscliq-create-core-module": "src/commands/create-core-module.js",
24
+ "ingeniuscliq-rollback-core-module": "src/commands/rollback-core-module.js"
19
25
  },
20
26
  "scripts": {
21
27
  "build": "vite build",
22
- "create:template": "node core/commands/create-template.js",
23
- "create:module": "node core/commands/create-module.js",
24
- "create:core-module": "node core/commands/create-core-module.js",
25
- "rollback:core-module": "node core/commands/rollback-core-module.js",
26
- "rollback:module": "node core/commands/rollback-module.js"
28
+ "dev": "vite build --watch",
29
+ "clean": "rm -rf dist",
30
+ "create:template": "node src/commands/create-template.js",
31
+ "create:module": "node src/commands/create-module.js",
32
+ "create:core-module": "node src/commands/create-core-module.js",
33
+ "rollback:core-module": "node src/commands/rollback-core-module.js",
34
+ "rollback:module": "node src/commands/rollback-module.js"
27
35
  },
28
36
  "peerDependencies": {
29
37
  "@tanstack/react-query": ">=5.66.5",
@@ -96,4 +104,4 @@
96
104
  "vite-tsconfig-paths": "5.1.4",
97
105
  "zustand": "5.0.7"
98
106
  }
99
- }
107
+ }
@@ -0,0 +1,10 @@
1
+ export const SUPPORTED_DIRECTORIES = [
2
+ 'classes',
3
+ 'components',
4
+ 'constants',
5
+ 'hooks',
6
+ 'locale',
7
+ 'services',
8
+ 'styles',
9
+ 'types'
10
+ ];
@@ -0,0 +1,15 @@
1
+ import path from 'path';
2
+
3
+ export const createBaseDir = (moduleName, pathPrefix = []) => {
4
+ let fullPath = [process.cwd()]
5
+ if(pathPrefix.length !== 0){
6
+ pathPrefix.forEach(i => fullPath.push(i))
7
+ }
8
+ fullPath.push(moduleName)
9
+
10
+ return path.join(...fullPath)
11
+ }
12
+
13
+ export const joinPaths = (...paths) => {
14
+ return path.join(...paths)
15
+ }
@@ -0,0 +1,4 @@
1
+ export function capitalizeFirstLetter(word) {
2
+ if (!word || typeof word !== "string") return word
3
+ return word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()
4
+ }
@@ -0,0 +1,14 @@
1
+ export function localeTemplate(moduleName){
2
+ return `// ${moduleName} module exports
3
+
4
+ import { loadModuleTranslations } from '@/i18n/utils/loadModuleTranslations';
5
+ import enTranslations from './locale/en.json';
6
+ import esTranslations from './locale/es.json';
7
+
8
+
9
+ // Load module translations
10
+ loadModuleTranslations('${moduleName}', {
11
+ en: enTranslations,
12
+ es: esTranslations
13
+ });`
14
+ }
@@ -0,0 +1,12 @@
1
+ export function serviceTemplate(moduleName) {
2
+ return `import { BaseService } from '@/services/base';
3
+
4
+ /**
5
+ * Base class that can be extended by concrete services
6
+ */
7
+ export class ${moduleName}BaseService extends BaseService {
8
+ constructor() {
9
+ super('${moduleName}')
10
+ }
11
+ }`
12
+ }
@@ -0,0 +1,10 @@
1
+ export function typeTemplate(moduleName) {
2
+ return `import type { BaseType } from "@/types/BaseType"
3
+
4
+ /**
5
+ * ${moduleName} base type
6
+ */
7
+ export interface ${moduleName} extends BaseType {
8
+
9
+ }`
10
+ }