@raxonltd/raxon-core 1.0.8 → 1.1.0

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.
@@ -0,0 +1,10 @@
1
+ import { IData } from '../../../interface/nexine.interface';
2
+ import { Brand } from '../../../interface/prisma.interface';
3
+ export declare const useBrand: () => {
4
+ fetch: (params?: {
5
+ enabled?: boolean;
6
+ page?: number;
7
+ amount?: number;
8
+ }) => import("@tanstack/react-query").UseQueryResult<NoInfer<IData<Brand>>, Error>;
9
+ };
10
+ //# sourceMappingURL=use.brand.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"use.brand.d.ts","sourceRoot":"","sources":["../../../../../core/feature/brand/hook/use.brand.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,mCAAmC,CAAC;AAG1D,eAAO,MAAM,QAAQ;qBAEA;QAAE,OAAO,CAAC,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,MAAM,CAAC,EAAE,MAAM,CAAA;KAAE;CAgBzE,CAAC"}
@@ -0,0 +1,21 @@
1
+ import { nexineAxios } from '../../../util/nexine.axios';
2
+ import { useQuery } from '@tanstack/react-query';
3
+ export const useBrand = () => {
4
+ return {
5
+ fetch: (params) => {
6
+ return useQuery({
7
+ queryKey: ['brand', params?.page, params?.amount],
8
+ enabled: params?.enabled ?? true,
9
+ queryFn: async () => {
10
+ const response = await nexineAxios.get('/customer/brand', {
11
+ params: {
12
+ page: params?.page,
13
+ amount: params?.amount,
14
+ },
15
+ });
16
+ return response.data;
17
+ },
18
+ });
19
+ },
20
+ };
21
+ };
@@ -137,7 +137,7 @@ function ViewStep1({ onContinue }) {
137
137
  const handleEmailBlur = () => {
138
138
  void saveEmail(emailInput);
139
139
  };
140
- return (_jsxs(_Fragment, { children: [_jsx(ModalAuth, { ref: modalAuthRef }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-base font-semibold text-gray-900", children: "\u0130leti\u015Fim" }), _jsx("p", { className: "mt-1 text-sm text-gray-500", children: "Sipari\u015F onay\u0131 ve kargo bilgileri bu adrese g\u00F6nderilir." })] }), !isGuest && isAuthenticated ? (_jsx("p", { className: "text-sm text-gray-600", children: _jsx("button", { type: "button", className: "font-medium text-[#CF0A2C] hover:underline", onClick: () => modalAuthRef.current?.open('login'), children: "Hesab\u0131n\u0131zla giri\u015F yapt\u0131n\u0131z" }) })) : (_jsxs("p", { className: "text-sm text-gray-600", children: ["Hesab\u0131n\u0131z var m\u0131 12?", _jsx("button", { type: "button", className: "font-medium text-[#CF0A2C] hover:underline", onClick: () => modalAuthRef.current?.open('login'), children: "Giri\u015F yap" }), ' veya ', _jsx("button", { type: "button", className: "font-medium text-[#CF0A2C] hover:underline", onClick: () => modalAuthRef.current?.open('register'), children: "kay\u0131t ol" })] })), _jsx(Input, { type: "email", label: "E-posta", placeholder: "ornek@email.com", value: emailInput, onChange: e => {
140
+ return (_jsxs(_Fragment, { children: [_jsx(ModalAuth, { ref: modalAuthRef }), _jsxs("div", { className: "space-y-4", children: [_jsxs("div", { children: [_jsx("h2", { className: "text-base font-semibold text-gray-900", children: "\u0130leti\u015Fim" }), _jsx("p", { className: "mt-1 text-sm text-gray-500", children: "Sipari\u015F onay\u0131 ve kargo bilgileri bu adrese g\u00F6nderilir." })] }), !isGuest && isAuthenticated ? (_jsx("p", { className: "text-sm text-gray-600", children: _jsx("button", { type: "button", className: "font-medium text-[#CF0A2C] hover:underline", onClick: () => modalAuthRef.current?.open('login'), children: "Hesab\u0131n\u0131zla giri\u015F yapt\u0131n\u0131z" }) })) : (_jsxs("p", { className: "text-sm text-gray-600", children: ["Hesab\u0131n\u0131z var m\u0131?", _jsx("button", { type: "button", className: "font-medium text-[#CF0A2C] hover:underline", onClick: () => modalAuthRef.current?.open('login'), children: "Giri\u015F yap" }), ' veya ', _jsx("button", { type: "button", className: "font-medium text-[#CF0A2C] hover:underline", onClick: () => modalAuthRef.current?.open('register'), children: "kay\u0131t ol" })] })), _jsx(Input, { type: "email", label: "E-posta", placeholder: "ornek@email.com", value: emailInput, onChange: e => {
141
141
  userEditedEmailRef.current = true;
142
142
  setEmailInput(e.target.value);
143
143
  }, onBlur: handleEmailBlur, size: "lg", className: "rounded-xl", required: true }), isSaving ? _jsx("p", { className: "text-xs text-gray-500", children: "Kaydediliyor\u2026" }) : null, emailError ? _jsx("p", { className: "text-sm text-red-600", children: emailError }) : null, _jsx(Button, { type: "button", size: "lg", className: "w-full rounded-xl bg-[#CF0A2C] font-semibold text-white hover:bg-[#a80824]", disabled: !emailInput.trim() || isSaving, onClick: async () => {
package/dist/hook.d.ts CHANGED
@@ -15,5 +15,6 @@ export * from './core/feature/faq/hook/use.faq';
15
15
  export * from './core/feature/form-submit/hook/use.form.submit';
16
16
  export * from './core/feature/promo-code/hook/use.promo.code';
17
17
  export * from './core/feature/attribute/hook/use.attribute';
18
+ export * from './core/feature/brand/hook/use.brand';
18
19
  export * from './core/feature/invoice/hook/use.invoice';
19
20
  //# sourceMappingURL=hook.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../hook.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mDAAmD,CAAC;AAClE,cAAc,yDAAyD,CAAC;AACxE,cAAc,uDAAuD,CAAC;AACtE,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yCAAyC,CAAC;AACxD,cAAc,iCAAiC,CAAC;AAChD,cAAc,iDAAiD,CAAC;AAChE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,yCAAyC,CAAC"}
1
+ {"version":3,"file":"hook.d.ts","sourceRoot":"","sources":["../hook.ts"],"names":[],"mappings":"AAAA,cAAc,mCAAmC,CAAC;AAClD,cAAc,mCAAmC,CAAC;AAClD,cAAc,yCAAyC,CAAC;AACxD,cAAc,wCAAwC,CAAC;AACvD,cAAc,+CAA+C,CAAC;AAC9D,cAAc,mDAAmD,CAAC;AAClE,cAAc,yDAAyD,CAAC;AACxE,cAAc,uDAAuD,CAAC;AACtE,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC;AACxD,cAAc,2CAA2C,CAAC;AAC1D,cAAc,+CAA+C,CAAC;AAC9D,cAAc,yCAAyC,CAAC;AACxD,cAAc,iCAAiC,CAAC;AAChD,cAAc,iDAAiD,CAAC;AAChE,cAAc,+CAA+C,CAAC;AAC9D,cAAc,6CAA6C,CAAC;AAC5D,cAAc,qCAAqC,CAAC;AACpD,cAAc,yCAAyC,CAAC"}
package/dist/hook.js CHANGED
@@ -15,4 +15,5 @@ export * from './core/feature/faq/hook/use.faq';
15
15
  export * from './core/feature/form-submit/hook/use.form.submit';
16
16
  export * from './core/feature/promo-code/hook/use.promo.code';
17
17
  export * from './core/feature/attribute/hook/use.attribute';
18
+ export * from './core/feature/brand/hook/use.brand';
18
19
  export * from './core/feature/invoice/hook/use.invoice';