@ikas/storefront 0.0.1

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 (197) hide show
  1. package/build/__generated__/global-types.d.ts +343 -0
  2. package/build/api/apollo.d.ts +10 -0
  3. package/build/api/brand/__generated__/listProductBrand.d.ts +30 -0
  4. package/build/api/brand/index.d.ts +15 -0
  5. package/build/api/cart/__generated__/getCart.d.ts +67 -0
  6. package/build/api/cart/__generated__/saveItemToCart.d.ts +65 -0
  7. package/build/api/cart/index.d.ts +5 -0
  8. package/build/api/category/__generated__/listCategory.d.ts +34 -0
  9. package/build/api/category/index.d.ts +15 -0
  10. package/build/api/checkout/__generated__/checkStocks.d.ts +18 -0
  11. package/build/api/checkout/__generated__/createSaleTransactionWithCheckout.d.ts +22 -0
  12. package/build/api/checkout/__generated__/getCheckoutByCartId.d.ts +10 -0
  13. package/build/api/checkout/__generated__/getCheckoutById.d.ts +206 -0
  14. package/build/api/checkout/__generated__/listPaymentGateway.d.ts +17 -0
  15. package/build/api/checkout/__generated__/retrieveInstallmentInfo.d.ts +23 -0
  16. package/build/api/checkout/__generated__/saveCheckout.d.ts +11 -0
  17. package/build/api/checkout/index.d.ts +19 -0
  18. package/build/api/city/__generated__/listCity.d.ts +14 -0
  19. package/build/api/city/index.d.ts +4 -0
  20. package/build/api/country/__generated__/getAvailableShippingCountries.d.ts +3 -0
  21. package/build/api/country/__generated__/listCountry.d.ts +16 -0
  22. package/build/api/country/index.d.ts +5 -0
  23. package/build/api/customer/__generated__/checkCustomerEmail.d.ts +10 -0
  24. package/build/api/customer/__generated__/customerForgotPassword.d.ts +6 -0
  25. package/build/api/customer/__generated__/customerLogin.d.ts +68 -0
  26. package/build/api/customer/__generated__/customerRecoverPassword.d.ts +8 -0
  27. package/build/api/customer/__generated__/customerRefreshToken.d.ts +11 -0
  28. package/build/api/customer/__generated__/getCustomerOrders.d.ts +216 -0
  29. package/build/api/customer/__generated__/getMyCustomer.d.ts +58 -0
  30. package/build/api/customer/__generated__/listOrderTransactions.d.ts +53 -0
  31. package/build/api/customer/__generated__/registerCustomer.d.ts +70 -0
  32. package/build/api/customer/__generated__/saveMyCustomer.d.ts +61 -0
  33. package/build/api/customer/index.d.ts +28 -0
  34. package/build/api/district/__generated__/listDistrict.d.ts +13 -0
  35. package/build/api/district/index.d.ts +4 -0
  36. package/build/api/html-meta-data/__generated__/listHTMLMetaData.d.ts +17 -0
  37. package/build/api/html-meta-data/index.d.ts +4 -0
  38. package/build/api/index.d.ts +17 -0
  39. package/build/api/merchant/__generated__/listMerchantSettings.d.ts +13 -0
  40. package/build/api/merchant/index.d.ts +4 -0
  41. package/build/api/product/__generated__/listProduct.d.ts +91 -0
  42. package/build/api/product/index.d.ts +15 -0
  43. package/build/api/product-attribute/__generated__/listProductAttribute.d.ts +26 -0
  44. package/build/api/product-attribute/index.d.ts +4 -0
  45. package/build/api/product-stock-location/__generated__/listProductStockLocation.d.ts +13 -0
  46. package/build/api/product-stock-location/index.d.ts +4 -0
  47. package/build/api/state/__generated__/listState.d.ts +13 -0
  48. package/build/api/state/index.d.ts +4 -0
  49. package/build/api/stock-location/__generated__/listStockLocation.d.ts +7 -0
  50. package/build/api/stock-location/index.d.ts +4 -0
  51. package/build/api/storefront/__generated__/getStorefront.d.ts +23 -0
  52. package/build/api/storefront/index.d.ts +4 -0
  53. package/build/api/theme/index.d.ts +4 -0
  54. package/build/api/variant-type/__generated__/listVariantType.d.ts +27 -0
  55. package/build/api/variant-type/index.d.ts +4 -0
  56. package/build/components/checkout/components/address-form/index.d.ts +12 -0
  57. package/build/components/checkout/components/address-form/model.d.ts +76 -0
  58. package/build/components/checkout/components/arrow-left.d.ts +6 -0
  59. package/build/components/checkout/components/breadcrumbs/index.d.ts +7 -0
  60. package/build/components/checkout/components/button/index.d.ts +8 -0
  61. package/build/components/checkout/components/cart-summary/arrow-down.d.ts +6 -0
  62. package/build/components/checkout/components/cart-summary/arrow-right.d.ts +6 -0
  63. package/build/components/checkout/components/cart-summary/cart-item/index.d.ts +8 -0
  64. package/build/components/checkout/components/cart-summary/index.d.ts +8 -0
  65. package/build/components/checkout/components/cart-summary/shopping-cart.d.ts +6 -0
  66. package/build/components/checkout/components/checkbox/check.d.ts +6 -0
  67. package/build/components/checkout/components/checkbox/index.d.ts +8 -0
  68. package/build/components/checkout/components/credit-card-form/index.d.ts +7 -0
  69. package/build/components/checkout/components/credit-card-form/model.d.ts +26 -0
  70. package/build/components/checkout/components/cross.d.ts +6 -0
  71. package/build/components/checkout/components/error-container/index.d.ts +6 -0
  72. package/build/components/checkout/components/error-container/no-shipping-error/index.d.ts +6 -0
  73. package/build/components/checkout/components/error-container/payment-error/index.d.ts +6 -0
  74. package/build/components/checkout/components/error-container/stock-error/index.d.ts +8 -0
  75. package/build/components/checkout/components/error-container/unknown-error/index.d.ts +6 -0
  76. package/build/components/checkout/components/expandable-list/index.d.ts +13 -0
  77. package/build/components/checkout/components/form-item/caret-down.d.ts +6 -0
  78. package/build/components/checkout/components/form-item/index.d.ts +3 -0
  79. package/build/components/checkout/components/form-item/model.d.ts +34 -0
  80. package/build/components/checkout/components/info-box/index.d.ts +8 -0
  81. package/build/components/checkout/components/policy-modal/index.d.ts +8 -0
  82. package/build/components/checkout/components/step-action-buttons/index.d.ts +10 -0
  83. package/build/components/checkout/components/text-button/index.d.ts +7 -0
  84. package/build/components/checkout/components/toggle/index.d.ts +7 -0
  85. package/build/components/checkout/index.d.ts +10 -0
  86. package/build/components/checkout/model.d.ts +101 -0
  87. package/build/components/checkout/steps/step-info/index.d.ts +7 -0
  88. package/build/components/checkout/steps/step-payment/billing-address/index.d.ts +7 -0
  89. package/build/components/checkout/steps/step-payment/index.d.ts +7 -0
  90. package/build/components/checkout/steps/step-payment/payment-gateways/index.d.ts +7 -0
  91. package/build/components/checkout/steps/step-payment/payment-gateways/installments/index.d.ts +7 -0
  92. package/build/components/checkout/steps/step-shipping/index.d.ts +7 -0
  93. package/build/components/checkout/steps/step-success/index.d.ts +7 -0
  94. package/build/components/error/index.d.ts +5 -0
  95. package/build/components/gtm/functions.d.ts +164 -0
  96. package/build/components/gtm/index.d.ts +7 -0
  97. package/build/components/hoc/ThemeComponent.d.ts +9 -0
  98. package/build/components/hoc/ThemeComponentEditor.d.ts +9 -0
  99. package/build/components/index.d.ts +6 -0
  100. package/build/components/page/head.d.ts +7 -0
  101. package/build/components/page/index.d.ts +9 -0
  102. package/build/components/page-editor/index.d.ts +2 -0
  103. package/build/components/page-editor/model.d.ts +59 -0
  104. package/build/index.d.ts +7 -0
  105. package/build/index.es.js +23583 -0
  106. package/build/index.js +23655 -0
  107. package/build/models/data/brand/index.d.ts +10 -0
  108. package/build/models/data/cart/index.d.ts +30 -0
  109. package/build/models/data/category/index.d.ts +11 -0
  110. package/build/models/data/checkout/index.d.ts +87 -0
  111. package/build/models/data/city/index.d.ts +4 -0
  112. package/build/models/data/country/index.d.ts +6 -0
  113. package/build/models/data/customer/address/index.d.ts +44 -0
  114. package/build/models/data/customer/index.d.ts +19 -0
  115. package/build/models/data/district/index.d.ts +4 -0
  116. package/build/models/data/html-meta-data/index.d.ts +15 -0
  117. package/build/models/data/image/index.d.ts +7 -0
  118. package/build/models/data/index.d.ts +25 -0
  119. package/build/models/data/installment-info/index.d.ts +30 -0
  120. package/build/models/data/merchant-settings/index.d.ts +8 -0
  121. package/build/models/data/order/address/index.d.ts +41 -0
  122. package/build/models/data/order/adjustment/index.d.ts +16 -0
  123. package/build/models/data/order/index.d.ts +109 -0
  124. package/build/models/data/order/line-item/discount/index.d.ts +11 -0
  125. package/build/models/data/order/line-item/index.d.ts +19 -0
  126. package/build/models/data/order/line-item/variant/index.d.ts +25 -0
  127. package/build/models/data/order/shipping-line/index.d.ts +7 -0
  128. package/build/models/data/order-transaction/index.d.ts +72 -0
  129. package/build/models/data/payment-gateway/index.d.ts +20 -0
  130. package/build/models/data/product/attribute-value/index.d.ts +6 -0
  131. package/build/models/data/product/index.d.ts +29 -0
  132. package/build/models/data/product/variant/index.d.ts +16 -0
  133. package/build/models/data/product/variant/price/index.d.ts +8 -0
  134. package/build/models/data/product/variant-type/index.d.ts +6 -0
  135. package/build/models/data/product-attribute/index.d.ts +17 -0
  136. package/build/models/data/product-attribute/product-attribute-option/index.d.ts +5 -0
  137. package/build/models/data/state/index.d.ts +5 -0
  138. package/build/models/data/storefront/index.d.ts +12 -0
  139. package/build/models/data/storefront/stockfront-location/index.d.ts +5 -0
  140. package/build/models/data/storefront/stockfront-route/index.d.ts +5 -0
  141. package/build/models/data/storefront/storefront-domain/index.d.ts +7 -0
  142. package/build/models/data/storefront/storefront-region/index.d.ts +18 -0
  143. package/build/models/data/variant-type/index.d.ts +14 -0
  144. package/build/models/data/variant-type/variant-value/index.d.ts +11 -0
  145. package/build/models/index.d.ts +3 -0
  146. package/build/models/theme/component/index.d.ts +10 -0
  147. package/build/models/theme/component/prop/index.d.ts +19 -0
  148. package/build/models/theme/component/prop/value/index.d.ts +14 -0
  149. package/build/models/theme/index.d.ts +10 -0
  150. package/build/models/theme/page/component/index.d.ts +6 -0
  151. package/build/models/theme/page/component/prop-value/brand-list.d.ts +9 -0
  152. package/build/models/theme/page/component/prop-value/brand.d.ts +5 -0
  153. package/build/models/theme/page/component/prop-value/link.d.ts +19 -0
  154. package/build/models/theme/page/component/prop-value/product-detail.d.ts +6 -0
  155. package/build/models/theme/page/component/prop-value/product-list.d.ts +15 -0
  156. package/build/models/theme/page/index.d.ts +26 -0
  157. package/build/models/theme/theme.d.ts +10 -0
  158. package/build/models/ui/brand-list/index.d.ts +58 -0
  159. package/build/models/ui/index.d.ts +6 -0
  160. package/build/models/ui/navigation-link/index.d.ts +7 -0
  161. package/build/models/ui/product-detail/index.d.ts +13 -0
  162. package/build/models/ui/product-list/filter.d.ts +18 -0
  163. package/build/models/ui/product-list/index.d.ts +76 -0
  164. package/build/pages/[slug]/[secondSlug].d.ts +11 -0
  165. package/build/pages/[slug]/index.d.ts +12 -0
  166. package/build/pages/account/addresses.d.ts +10 -0
  167. package/build/pages/account/forgot-password.d.ts +10 -0
  168. package/build/pages/account/index.d.ts +10 -0
  169. package/build/pages/account/login.d.ts +10 -0
  170. package/build/pages/account/orders/[id].d.ts +10 -0
  171. package/build/pages/account/orders/index.d.ts +10 -0
  172. package/build/pages/account/recover-password.d.ts +10 -0
  173. package/build/pages/account/register.d.ts +10 -0
  174. package/build/pages/api/getComponentDirs.d.ts +3 -0
  175. package/build/pages/api/getTheme.d.ts +3 -0
  176. package/build/pages/api/updateTheme.d.ts +10 -0
  177. package/build/pages/api/uploadTheme.d.ts +3 -0
  178. package/build/pages/checkout/[id].d.ts +11 -0
  179. package/build/pages/editor.d.ts +5 -0
  180. package/build/pages/home.d.ts +10 -0
  181. package/build/pages/index.d.ts +14 -0
  182. package/build/store/base.d.ts +7 -0
  183. package/build/store/cart.d.ts +25 -0
  184. package/build/store/customer.d.ts +32 -0
  185. package/build/store/index.d.ts +1 -0
  186. package/build/storefront/index.d.ts +9 -0
  187. package/build/utils/currency.d.ts +1 -0
  188. package/build/utils/helper.d.ts +4 -0
  189. package/build/utils/index.d.ts +3 -0
  190. package/build/utils/providers/page-data.d.ts +35 -0
  191. package/build/utils/providers/prop-value/brand-list.d.ts +7 -0
  192. package/build/utils/providers/prop-value/brand.d.ts +8 -0
  193. package/build/utils/providers/prop-value/index.d.ts +3 -0
  194. package/build/utils/providers/prop-value/link.d.ts +9 -0
  195. package/build/utils/providers/prop-value/product-detail.d.ts +8 -0
  196. package/build/utils/providers/prop-value/product-list.d.ts +11 -0
  197. package/package.json +118 -0
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { GetStaticProps } from "next";
3
+ import { IkasThemePage } from "../../models/index";
4
+ declare type Props = {
5
+ propValuesStr: string;
6
+ page: IkasThemePage;
7
+ };
8
+ declare const Page: React.FC<Props>;
9
+ export default Page;
10
+ export declare const getStaticProps: GetStaticProps;
@@ -0,0 +1,3 @@
1
+ import { NextApiRequest, NextApiResponse } from "next";
2
+ declare const _default: (req: NextApiRequest, res: NextApiResponse) => Promise<void>;
3
+ export default _default;
@@ -0,0 +1,3 @@
1
+ import { NextApiRequest, NextApiResponse } from "next";
2
+ declare const _default: (req: NextApiRequest, res: NextApiResponse) => Promise<void>;
3
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import { NextApiRequest, NextApiResponse } from "next";
2
+ declare const _default: (req: NextApiRequest, res: NextApiResponse) => Promise<void>;
3
+ export default _default;
4
+ export declare const config: {
5
+ api: {
6
+ bodyParser: {
7
+ sizeLimit: string;
8
+ };
9
+ };
10
+ };
@@ -0,0 +1,3 @@
1
+ import { NextApiRequest, NextApiResponse } from "next";
2
+ declare const _default: (req: NextApiRequest, res: NextApiResponse) => Promise<void>;
3
+ export default _default;
@@ -0,0 +1,11 @@
1
+ /// <reference types="node" />
2
+ import * as React from "react";
3
+ import { GetServerSideProps } from "next";
4
+ import { ParsedUrlQuery } from "querystring";
5
+ declare type Props = {
6
+ checkoutStr: string;
7
+ queryParams: ParsedUrlQuery;
8
+ };
9
+ declare const _default: React.FunctionComponent<Props>;
10
+ export default _default;
11
+ export declare const getServerSideProps: GetServerSideProps;
@@ -0,0 +1,5 @@
1
+ /// <reference types="react" />
2
+ declare const _default: (() => JSX.Element) & {
3
+ displayName: string;
4
+ };
5
+ export default _default;
@@ -0,0 +1,10 @@
1
+ import * as React from "react";
2
+ import { GetStaticProps } from "next";
3
+ import { IkasThemePage } from "../models/index";
4
+ declare type Props = {
5
+ propValuesStr: string;
6
+ page: IkasThemePage;
7
+ };
8
+ declare const Page: React.FC<Props>;
9
+ export default Page;
10
+ export declare const getStaticProps: GetStaticProps;
@@ -0,0 +1,14 @@
1
+ import * as IndexPage from "./home";
2
+ import * as SlugPage from "./[slug]/index";
3
+ import * as CustomPage from "./[slug]/[secondSlug]";
4
+ import * as CheckoutPage from "./checkout/[id]";
5
+ import * as AccountPage from "./account/index";
6
+ import * as AddressesPage from "./account/addresses";
7
+ import * as OrdersPage from "./account/orders/index";
8
+ import * as OrderDetailPage from "./account/orders/[id]";
9
+ import * as LoginPage from "./account/login";
10
+ import * as RegisterPage from "./account/register";
11
+ import * as ForgotPasswordPage from "./account/forgot-password";
12
+ import * as RecoverPasswordPage from "./account/recover-password";
13
+ import * as EditorPage from "./editor";
14
+ export { IndexPage, SlugPage, CustomPage, CheckoutPage, AccountPage, AddressesPage, OrdersPage, OrderDetailPage, LoginPage, RegisterPage, ForgotPasswordPage, RecoverPasswordPage, EditorPage, };
@@ -0,0 +1,7 @@
1
+ import { IkasCartStore } from "./cart";
2
+ import { IkasCustomerStore } from "./customer";
3
+ export declare class IkasBaseStore {
4
+ readonly customerStore: IkasCustomerStore;
5
+ readonly cartStore: IkasCartStore;
6
+ constructor();
7
+ }
@@ -0,0 +1,25 @@
1
+ import { IkasCart } from "../models/data/cart/index";
2
+ import { IkasProductVariant, IkasOrderLineItem, IkasProduct } from "../models/index";
3
+ import { IkasBaseStore } from "./base";
4
+ export declare const CART_LS_KEY = "cartId";
5
+ export declare const CHECKOUT_LS_KEY = "checkoutId";
6
+ export declare class IkasCartStore {
7
+ cart?: IkasCart;
8
+ private baseStore;
9
+ private _checkoutId?;
10
+ private _isLoadingCart;
11
+ private _cartLoadFinished;
12
+ constructor(baseStore: IkasBaseStore);
13
+ get isBrowser(): boolean;
14
+ get isLoadingCart(): boolean;
15
+ get cartLoadFinished(): boolean;
16
+ get checkoutId(): string;
17
+ get checkoutUrl(): string;
18
+ private getCart;
19
+ private setCart;
20
+ addItem: (variant: IkasProductVariant, product: IkasProduct, initialQuantity?: number) => Promise<void>;
21
+ changeItemQuantity: (item: IkasOrderLineItem, quantity: number) => Promise<void>;
22
+ removeItem: (item: IkasOrderLineItem) => Promise<void>;
23
+ removeCardIfEmpty: () => void;
24
+ removeCart: () => void;
25
+ }
@@ -0,0 +1,32 @@
1
+ import { IkasCustomer, IkasOrderTransaction } from "../models/index";
2
+ import { IkasBaseStore } from "./base";
3
+ export declare class IkasCustomerStore {
4
+ customer?: IkasCustomer;
5
+ token?: string;
6
+ tokenExpiry?: number;
7
+ private baseStore?;
8
+ private _initialized;
9
+ constructor(baseStore?: IkasBaseStore);
10
+ get initialized(): boolean;
11
+ login: (email: string, password: string) => Promise<boolean>;
12
+ register: (firstName: string, lastName: string, email: string, password: string) => Promise<boolean>;
13
+ checkEmail: (email: string) => Promise<boolean>;
14
+ forgotPassword: (email: string) => Promise<boolean>;
15
+ recoverPassword: (password: string, passwordAgain: string, token: string) => Promise<boolean>;
16
+ logout: () => void;
17
+ saveCustomer: (customer: IkasCustomer) => Promise<boolean>;
18
+ getOrders: () => Promise<import("../models/index").IkasOrder[]>;
19
+ getOrder: (id: string) => Promise<import("../models/index").IkasOrder>;
20
+ getOrderTransactions: (params?: {
21
+ checkoutId?: string;
22
+ id?: string;
23
+ orderId?: string;
24
+ }) => Promise<IkasOrderTransaction[]>;
25
+ private init;
26
+ private getCustomer;
27
+ private refreshToken;
28
+ private setCustomer;
29
+ private loadCustomer;
30
+ private setToken;
31
+ private loadToken;
32
+ }
@@ -0,0 +1 @@
1
+ export { IkasBaseStore } from "./base";
@@ -0,0 +1,9 @@
1
+ import { IkasTheme } from "../models/index";
2
+ import { IkasBaseStore } from "../store/index";
3
+ export declare class IkasStorefrontConfig {
4
+ static store: IkasBaseStore;
5
+ static components: any;
6
+ static config: Record<string, any>;
7
+ static localTheme: IkasTheme;
8
+ static init(store: IkasBaseStore, components: any, config: Record<string, any>, localTheme: IkasTheme): void;
9
+ }
@@ -0,0 +1 @@
1
+ export declare const formatMoney: (price: number, currency: string) => string;
@@ -0,0 +1,4 @@
1
+ export declare const stringToSlug: (str: string) => string;
2
+ export declare const validatePhoneNumber: (str: string) => boolean;
3
+ export declare const pascalCase: (str: string) => string;
4
+ export declare const decodeBase64: (base64: string) => string;
@@ -0,0 +1,3 @@
1
+ export * from "./providers/page-data";
2
+ export * from "./helper";
3
+ export * from "./currency";
@@ -0,0 +1,35 @@
1
+ import { NextRouter } from "next/router";
2
+ import { IkasTheme, IkasThemePageType, IkasThemePageComponent, IkasThemeComponentProp, IkasThemeComponent, IkasThemePage } from "../../models/index";
3
+ export declare class IkasPageDataProvider {
4
+ theme: IkasTheme;
5
+ pageType?: IkasThemePageType;
6
+ pageParams: Record<string, any>;
7
+ pageComponentPropValues: IkasPageComponentPropValue[];
8
+ pageSpecificData?: any;
9
+ constructor(theme: IkasTheme, pageParams?: Record<string, any>, pageType?: IkasThemePageType);
10
+ get page(): IkasThemePage | undefined;
11
+ get nextPageData(): {
12
+ props: {
13
+ propValuesStr: string;
14
+ page: IkasThemePage;
15
+ };
16
+ };
17
+ get isStaticPage(): boolean;
18
+ getPageData(): Promise<void>;
19
+ getPageSpecificData(): Promise<void>;
20
+ getPageComponentPropValues(pageComponent: IkasThemePageComponent): Promise<IkasPageComponentPropValue>;
21
+ getPageComponentPropValue(pageComponent: IkasThemePageComponent, prop: IkasThemeComponentProp): Promise<any>;
22
+ static isServer(): boolean;
23
+ static initPropValues(propValuesStr: string, router: NextRouter, queryParams?: Record<string, any>): IkasPageComponentPropValue[];
24
+ static initBrandListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
25
+ static initProductListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
26
+ static initProductDetailPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue, queryParams: Record<string, any>, router: NextRouter): void;
27
+ static initLinkPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
28
+ static initImagePropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
29
+ }
30
+ export declare class IkasPageComponentPropValue {
31
+ pageComponent: IkasThemePageComponent;
32
+ component: IkasThemeComponent;
33
+ propValues: Record<string, any>;
34
+ constructor(data: Partial<IkasPageComponentPropValue>);
35
+ }
@@ -0,0 +1,7 @@
1
+ import { IkasBrandList, IkasBrandListPropValue } from "../../../models/index";
2
+ import IkasPropValueProvider from "./index";
3
+ export declare class IkasBrandListPropValueProvider implements IkasPropValueProvider<IkasBrandList> {
4
+ private brandListPropValue;
5
+ constructor(brandListPropValue: IkasBrandListPropValue);
6
+ getValue(): Promise<IkasBrandList>;
7
+ }
@@ -0,0 +1,8 @@
1
+ import { IkasBrand, IkasBrandPropValue } from "../../../models/index";
2
+ import IkasPropValueProvider from "./index";
3
+ export declare class IkasBrandPropValueProvider implements IkasPropValueProvider<IkasBrand> {
4
+ private brandPropValue;
5
+ private pageSpecificData?;
6
+ constructor(prop: IkasBrandPropValue, pageSpecificData?: any);
7
+ getValue(): Promise<IkasBrand>;
8
+ }
@@ -0,0 +1,3 @@
1
+ export default interface IkasPropValueProvider<T> {
2
+ getValue: () => Promise<T>;
3
+ }
@@ -0,0 +1,9 @@
1
+ import IkasPropValueProvider from "./index";
2
+ import { IkasNavigationLink, IkasLinkPropValue, IkasTheme } from "../../../models/index";
3
+ export declare class IkasLinkPropValueProvider implements IkasPropValueProvider<IkasNavigationLink | IkasNavigationLink[]> {
4
+ private linkPropValue;
5
+ private theme;
6
+ constructor(prop: IkasLinkPropValue | IkasLinkPropValue[], theme: IkasTheme);
7
+ private getNavigationLink;
8
+ getValue(): Promise<IkasNavigationLink | IkasNavigationLink[]>;
9
+ }
@@ -0,0 +1,8 @@
1
+ import { IkasProductDetail, IkasProductDetailPropValue } from "../../../models/index";
2
+ import IkasPropValueProvider from "./index";
3
+ export declare class IkasProductDetailPropValueProvider implements IkasPropValueProvider<IkasProductDetail> {
4
+ private productDetailPropValue;
5
+ private pageSpecificData?;
6
+ constructor(prop: IkasProductDetailPropValue, pageSpecificData?: any);
7
+ getValue(): Promise<IkasProductDetail>;
8
+ }
@@ -0,0 +1,11 @@
1
+ import { IkasProductList, IkasProductListPropValue, IkasThemePageType } from "../../../models/index";
2
+ import IkasPropValueProvider from "./index";
3
+ export declare class IkasProductListPropValueProvider implements IkasPropValueProvider<IkasProductList> {
4
+ private pageType;
5
+ private productListPropValue;
6
+ private pageParams;
7
+ private pageSpecificData?;
8
+ private skipInitialFetch?;
9
+ constructor(pageType: IkasThemePageType, productListPropValue: IkasProductListPropValue, pageParams: Record<string, any>, pageSpecificData?: any, skipInitialFetch?: boolean);
10
+ getValue(): Promise<IkasProductList>;
11
+ }
package/package.json ADDED
@@ -0,0 +1,118 @@
1
+ {
2
+ "name": "@ikas/storefront",
3
+ "version": "0.0.1",
4
+ "main": "./build/index.js",
5
+ "module": "./build/index.es.js",
6
+ "author": "Umut Ozan Yıldırım",
7
+ "license": "ISC",
8
+ "files": [
9
+ "/build"
10
+ ],
11
+ "scripts": {
12
+ "build": "rm -rf ./build && rollup -c",
13
+ "prepare": "npm run build",
14
+ "lint": "eslint 'src/**/*.{js,ts,tsx}' --quiet --fix",
15
+ "test": "jest",
16
+ "codegen": "apollo client:codegen --target typescript --watch --globalTypesFile='./src/__generated__/global-types.ts'"
17
+ },
18
+ "peerDependencies": {
19
+ "mobx": "^6.1.3",
20
+ "mobx-react-lite": "^3.1.5",
21
+ "next": "10.0.3",
22
+ "react": "17.0.1",
23
+ "react-dom": "17.0.1"
24
+ },
25
+ "dependencies": {
26
+ "@apollo/client": "^3.2.0",
27
+ "archiver": "^5.2.0",
28
+ "axios": "^0.21.1",
29
+ "cors": "^2.8.5",
30
+ "form-data": "^3.0.0",
31
+ "graphql": "^15.3.0",
32
+ "graphql-tag": "^2.10.3",
33
+ "lodash": "^4.17.20",
34
+ "node-fetch": "^2.6.1",
35
+ "query-string": "^6.13.8",
36
+ "uuid": "^8.3.2"
37
+ },
38
+ "devDependencies": {
39
+ "@babel/core": "^7.11.6",
40
+ "@rollup/plugin-commonjs": "^17.1.0",
41
+ "@rollup/plugin-json": "^4.1.0",
42
+ "@rollup/plugin-node-resolve": "^11.1.1",
43
+ "@testing-library/jest-dom": "^5.11.4",
44
+ "@testing-library/react": "^11.0.4",
45
+ "@types/archiver": "^5.1.0",
46
+ "@types/cors": "^2.8.9",
47
+ "@types/form-data": "^2.5.0",
48
+ "@types/jest": "^26.0.14",
49
+ "@types/lodash": "^4.14.168",
50
+ "@types/node": "^14.14.6",
51
+ "@types/node-fetch": "^2.5.7",
52
+ "@types/react": "^16.9.55",
53
+ "@types/react-dom": "^17.0.0",
54
+ "@types/testing-library__jest-dom": "^5.9.3",
55
+ "@types/testing-library__react": "^10.2.0",
56
+ "@types/uuid": "^8.3.0",
57
+ "@types/webpack": "^4.41.26",
58
+ "@typescript-eslint/eslint-plugin": "^4.14.1",
59
+ "@typescript-eslint/parser": "^4.14.1",
60
+ "acorn-jsx": "^5.3.1",
61
+ "babel-loader": "^8.1.0",
62
+ "eslint": "^7.18.0",
63
+ "eslint-config-prettier": "^7.2.0",
64
+ "eslint-plugin-jest": "^24.0.2",
65
+ "eslint-plugin-prettier": "^3.3.1",
66
+ "eslint-plugin-react": "^7.21.2",
67
+ "fork-ts-checker-webpack-plugin": "^5.2.0",
68
+ "jest": "^26.4.2",
69
+ "mobx": "^6.1.3",
70
+ "mobx-react-lite": "^3.1.5",
71
+ "next": "10.0.3",
72
+ "node-sass": "^5.0.0",
73
+ "postcss": "^8.2.4",
74
+ "prettier": "^2.2.1",
75
+ "react": "17.0.1",
76
+ "react-dom": "17.0.1",
77
+ "rollup": "^2.38.4",
78
+ "rollup-plugin-node-polyfills": "^0.2.1",
79
+ "rollup-plugin-peer-deps-external": "^2.2.4",
80
+ "rollup-plugin-postcss": "^4.0.0",
81
+ "rollup-plugin-sass": "^1.2.2",
82
+ "rollup-plugin-typescript": "^1.0.1",
83
+ "rollup-plugin-typescript2": "^0.29.0",
84
+ "rollup-watch": "^4.3.1",
85
+ "ts-essentials": "^7.0.1",
86
+ "ts-jest": "^26.4.0",
87
+ "ts-loader": "^8.0.4",
88
+ "ttypescript": "^1.5.12",
89
+ "typescript": "^4.1.3",
90
+ "typescript-transform-paths": "^2.2.2",
91
+ "typings": "^2.1.1"
92
+ },
93
+ "eslintConfig": {
94
+ "parser": "@typescript-eslint/parser",
95
+ "extends": [
96
+ "plugin:@typescript-eslint/recommended",
97
+ "plugin:prettier/recommended"
98
+ ],
99
+ "parserOptions": {
100
+ "ecmaVersion": 2015,
101
+ "sourceType": "module"
102
+ },
103
+ "ignorePatterns": "build",
104
+ "rules": {
105
+ "getter-return": "off",
106
+ "@typescript-eslint/ban-ts-comment": "off",
107
+ "@typescript-eslint/explicit-module-boundary-types": "off",
108
+ "@typescript-eslint/no-var-requires": "off",
109
+ "@typescript-eslint/camelcase": "off",
110
+ "@typescript-eslint/no-empty-interface": "off",
111
+ "@typescript-eslint/triple-slash-reference": "off",
112
+ "@typescript-eslint/interface-name-prefix": "off",
113
+ "@typescript-eslint/no-use-before-define": "off",
114
+ "@typescript-eslint/explicit-function-return-type": "off",
115
+ "@typescript-eslint/no-useless-constructor": "off"
116
+ }
117
+ }
118
+ }