@ikas/storefront 0.2.0 → 0.3.0-alpha.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.
- package/build/__generated__/global-types.d.ts +34 -0
- package/build/api/index.d.ts +1 -0
- package/build/api/raffle/__generated__/getRafflesByCustomerId.d.ts +41 -0
- package/build/api/raffle/__generated__/listRaffle.d.ts +58 -0
- package/build/api/raffle/__generated__/listRaffleMetaData.d.ts +21 -0
- package/build/api/raffle/__generated__/saveRaffleParticipant.d.ts +30 -0
- package/build/api/raffle/index.d.ts +24 -0
- package/build/index.es.js +1336 -101
- package/build/index.js +1347 -100
- package/build/models/data/index.d.ts +1 -0
- package/build/models/data/raffle/index.d.ts +63 -0
- package/build/models/theme/component/prop/index.d.ts +2 -0
- package/build/models/theme/index.d.ts +2 -0
- package/build/models/theme/page/component/prop-value/raffle-list.d.ts +5 -0
- package/build/models/theme/page/component/prop-value/raffle.d.ts +5 -0
- package/build/models/theme/page/index.d.ts +4 -1
- package/build/models/ui/index.d.ts +2 -0
- package/build/models/ui/raffle-list/index.d.ts +54 -0
- package/build/models/ui/validator/form/raffle-form.d.ts +60 -0
- package/build/models/ui/validator/rules/index.d.ts +4 -0
- package/build/pages/account/raffles.d.ts +6 -0
- package/build/pages/index.d.ts +4 -1
- package/build/pages/raffle/[slug].d.ts +7 -0
- package/build/pages/raffle/index.d.ts +6 -0
- package/build/providers/page-data-init.d.ts +7 -1
- package/build/providers/placeholders.d.ts +2 -1
- package/build/providers/prop-value/custom.d.ts +2 -0
- package/build/providers/prop-value/raffle-list.d.ts +5 -0
- package/build/providers/prop-value/raffle.d.ts +11 -0
- package/build/store/customer.d.ts +1 -0
- package/package.json +1 -1
|
@@ -31,3 +31,4 @@ export * from "./variant-type/index";
|
|
|
31
31
|
export { IkasVariantValue } from "./variant-type/variant-value/index";
|
|
32
32
|
export { IkasOrderTransaction, IkasTransactionStatusEnum, IkasTransactionTypeEnum, } from "./order-transaction/index";
|
|
33
33
|
export * from "./product-option-set/index";
|
|
34
|
+
export { IkasRaffle, IkasRaffleParticipant, IkasRaffleMetaData, } from "./raffle/index";
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
export declare class RaffleDateRangeField {
|
|
2
|
+
start: number | null;
|
|
3
|
+
end: number | null;
|
|
4
|
+
constructor(data: Partial<RaffleDateRangeField>);
|
|
5
|
+
}
|
|
6
|
+
export declare enum IkasRaffleVerificationTypeEnum {
|
|
7
|
+
EMAIL = "EMAIL",
|
|
8
|
+
MERSIS = "MERSIS"
|
|
9
|
+
}
|
|
10
|
+
export declare class IkasRaffle {
|
|
11
|
+
id: string;
|
|
12
|
+
createdAt: number;
|
|
13
|
+
updatedAt: number;
|
|
14
|
+
deleted: boolean | null;
|
|
15
|
+
dateRange: RaffleDateRangeField | null;
|
|
16
|
+
metadata: IkasRaffleMetaData | null;
|
|
17
|
+
name: string;
|
|
18
|
+
participantCount?: number | null;
|
|
19
|
+
requiredCustomerAccount: boolean;
|
|
20
|
+
status: boolean;
|
|
21
|
+
variants: IkasRaffleAppliedProduct[] | null;
|
|
22
|
+
verificationType: IkasRaffleVerificationTypeEnum;
|
|
23
|
+
constructor(data?: Partial<IkasRaffle>);
|
|
24
|
+
get isRaffleAvailable(): boolean;
|
|
25
|
+
}
|
|
26
|
+
export declare enum IkasRaffleMetadataTargetType {
|
|
27
|
+
RAFFLE = "RAFFLE"
|
|
28
|
+
}
|
|
29
|
+
export declare class IkasRaffleMetaData {
|
|
30
|
+
id: string;
|
|
31
|
+
createdAt: number;
|
|
32
|
+
updatedAt: number;
|
|
33
|
+
deleted: boolean | null;
|
|
34
|
+
description: string | null;
|
|
35
|
+
pageTitle: string | null;
|
|
36
|
+
slug: string;
|
|
37
|
+
targetId: string | null;
|
|
38
|
+
targetType: IkasRaffleMetadataTargetType | null;
|
|
39
|
+
constructor(data: Partial<IkasRaffleMetaData>);
|
|
40
|
+
}
|
|
41
|
+
export declare class IkasRaffleParticipant {
|
|
42
|
+
id?: string | null;
|
|
43
|
+
createdAt?: number | null;
|
|
44
|
+
updatedAt?: number | null;
|
|
45
|
+
deleted?: boolean | null;
|
|
46
|
+
customerId?: string | null;
|
|
47
|
+
raffleId: string;
|
|
48
|
+
firstName: string;
|
|
49
|
+
lastName: string;
|
|
50
|
+
fullName?: string | null;
|
|
51
|
+
email: string;
|
|
52
|
+
applicationDate?: number;
|
|
53
|
+
phone?: string | null;
|
|
54
|
+
isWinner?: boolean | null;
|
|
55
|
+
extraData?: Record<string, any> | null;
|
|
56
|
+
appliedProducts: IkasRaffleAppliedProduct[];
|
|
57
|
+
constructor(data: Partial<IkasRaffleParticipant>);
|
|
58
|
+
}
|
|
59
|
+
export declare class IkasRaffleAppliedProduct {
|
|
60
|
+
productId: string;
|
|
61
|
+
variantId: string;
|
|
62
|
+
constructor(data: Partial<IkasRaffleAppliedProduct>);
|
|
63
|
+
}
|
|
@@ -33,6 +33,8 @@ export declare enum IkasThemeComponentPropType {
|
|
|
33
33
|
BLOG_LIST = "BLOG_LIST",
|
|
34
34
|
BLOG_CATEGORY = "BLOG_CATEGORY",
|
|
35
35
|
BLOG_CATEGORY_LIST = "BLOG_CATEGORY_LIST",
|
|
36
|
+
RAFFLE = "RAFFLE",
|
|
37
|
+
RAFFLE_LIST = "RAFFLE_LIST",
|
|
36
38
|
OBJECT = "OBJECT",
|
|
37
39
|
STATIC_LIST = "STATIC_LIST",
|
|
38
40
|
DYNAMIC_LIST = "DYNAMIC_LIST",
|
|
@@ -16,3 +16,5 @@ export { IkasBlogPropValue } from "./page/component/prop-value/blog";
|
|
|
16
16
|
export { IkasBlogListPropValue } from "./page/component/prop-value/blog-list";
|
|
17
17
|
export { IkasBlogCategoryPropValue } from "./page/component/prop-value/blog-category";
|
|
18
18
|
export { IkasBlogCategoryListPropValue } from "./page/component/prop-value/blog-category-list";
|
|
19
|
+
export { IkasRafflePropValue } from "./page/component/prop-value/raffle";
|
|
20
|
+
export { IkasRaffleListPropValue } from "./page/component/prop-value/raffle-list";
|
|
@@ -36,5 +36,8 @@ export declare enum IkasThemePageType {
|
|
|
36
36
|
BLOG = "BLOG",
|
|
37
37
|
BLOG_INDEX = "BLOG_INDEX",
|
|
38
38
|
BLOG_CATEGORY = "BLOG_CATEGORY",
|
|
39
|
-
CHECKOUT = "CHECKOUT"
|
|
39
|
+
CHECKOUT = "CHECKOUT",
|
|
40
|
+
RAFFLE = "RAFFLE",
|
|
41
|
+
RAFFLE_DETAIL = "RAFFLE_DETAIL",
|
|
42
|
+
RAFFLE_ACOUNT = "RAFFLE_ACCOUNT"
|
|
40
43
|
}
|
|
@@ -18,5 +18,7 @@ export { ContactForm } from "./validator/form/contact-form";
|
|
|
18
18
|
export { ForgotPasswordForm } from "./validator/form/forgot-password";
|
|
19
19
|
export { RecoverPasswordForm } from "./validator/form/recover-password";
|
|
20
20
|
export { AccountInfoForm } from "./validator/form/account-info";
|
|
21
|
+
export { RaffleForm } from "./validator/form/raffle-form";
|
|
21
22
|
export { CustomerReviewForm } from "./validator/form/customer-review";
|
|
22
23
|
export * from "./component-renderer/index";
|
|
24
|
+
export { IkasRaffleList } from "./raffle-list/index";
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
import { IkasRaffle } from "../../data/raffle/index";
|
|
2
|
+
export declare class IkasRaffleList {
|
|
3
|
+
data: IkasRaffle[];
|
|
4
|
+
private _limit;
|
|
5
|
+
private _page;
|
|
6
|
+
private _count;
|
|
7
|
+
private _initialized;
|
|
8
|
+
private _minPage?;
|
|
9
|
+
private _start;
|
|
10
|
+
private _end;
|
|
11
|
+
private _includeDeleted;
|
|
12
|
+
private _name;
|
|
13
|
+
private _search;
|
|
14
|
+
private _id;
|
|
15
|
+
private _isLoading;
|
|
16
|
+
constructor(data?: IkasRaffleListParams);
|
|
17
|
+
get limit(): number;
|
|
18
|
+
get page(): number;
|
|
19
|
+
get count(): number;
|
|
20
|
+
get pageCount(): number;
|
|
21
|
+
get isInitialized(): boolean;
|
|
22
|
+
get hasPrev(): boolean;
|
|
23
|
+
get hasNext(): boolean;
|
|
24
|
+
get isLoading(): boolean;
|
|
25
|
+
get minPage(): number;
|
|
26
|
+
private getRaffleList;
|
|
27
|
+
private getInitial;
|
|
28
|
+
getPrev: () => Promise<void>;
|
|
29
|
+
getNext: () => Promise<void>;
|
|
30
|
+
getPage: (page: number) => Promise<void>;
|
|
31
|
+
toJSON(): {
|
|
32
|
+
data: IkasRaffle[];
|
|
33
|
+
limit: number;
|
|
34
|
+
page: number;
|
|
35
|
+
count: number;
|
|
36
|
+
initialized: boolean;
|
|
37
|
+
minPage: number | null | undefined;
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
export declare type IkasRaffleListParams = {
|
|
41
|
+
data?: IkasRaffle[];
|
|
42
|
+
limit?: number;
|
|
43
|
+
page?: number;
|
|
44
|
+
count?: number;
|
|
45
|
+
initialized?: boolean;
|
|
46
|
+
minPage?: number;
|
|
47
|
+
start?: number;
|
|
48
|
+
end?: number;
|
|
49
|
+
includeDeleted?: boolean;
|
|
50
|
+
name?: string;
|
|
51
|
+
search?: string;
|
|
52
|
+
id?: string;
|
|
53
|
+
customerId?: string;
|
|
54
|
+
};
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
import { IkasRaffle } from "../../../data/raffle/index";
|
|
2
|
+
declare type RaffleFormProps<T> = {
|
|
3
|
+
message: {
|
|
4
|
+
requiredRule: ((model: T) => string) | string;
|
|
5
|
+
emailRule: ((model: T) => string) | string;
|
|
6
|
+
phoneRule?: ((model: T) => string) | string;
|
|
7
|
+
birthdayRule?: ((model: T) => string) | string;
|
|
8
|
+
identityNumberRule?: ((model: T) => string) | string;
|
|
9
|
+
};
|
|
10
|
+
raffle: IkasRaffle;
|
|
11
|
+
};
|
|
12
|
+
declare type RaffleFormModel = {
|
|
13
|
+
firstName: string;
|
|
14
|
+
lastName: string;
|
|
15
|
+
email: string;
|
|
16
|
+
extraData: {
|
|
17
|
+
birthYear: number | null;
|
|
18
|
+
identityNumber: number | null;
|
|
19
|
+
};
|
|
20
|
+
phone: string;
|
|
21
|
+
};
|
|
22
|
+
export declare class RaffleForm {
|
|
23
|
+
private model;
|
|
24
|
+
private validator;
|
|
25
|
+
private raffle;
|
|
26
|
+
constructor(props: RaffleFormProps<RaffleFormModel>);
|
|
27
|
+
get firstName(): string;
|
|
28
|
+
set firstName(value: string);
|
|
29
|
+
get lastName(): string;
|
|
30
|
+
set lastName(value: string);
|
|
31
|
+
get email(): string;
|
|
32
|
+
set email(value: string);
|
|
33
|
+
get birthYear(): number | null;
|
|
34
|
+
set birthYear(value: number | null);
|
|
35
|
+
get identityNumber(): number | null;
|
|
36
|
+
set identityNumber(value: number | null);
|
|
37
|
+
get phone(): string;
|
|
38
|
+
set phone(value: string);
|
|
39
|
+
get firstNameErrorMessage(): string | undefined;
|
|
40
|
+
get lastNameErrorMessage(): string | undefined;
|
|
41
|
+
get emailErrorMessage(): string | undefined;
|
|
42
|
+
get birthYearErrorMessage(): string | undefined;
|
|
43
|
+
get identityNumberErrorMessage(): string | undefined;
|
|
44
|
+
get phoneErrorMessage(): string | undefined;
|
|
45
|
+
get redirect(): string | null | undefined;
|
|
46
|
+
onFirstNameChange: (value: string) => void;
|
|
47
|
+
onLastNameChange: (value: string) => void;
|
|
48
|
+
onEmailChange: (value: string) => void;
|
|
49
|
+
onBirthYearChange: (value: number) => void;
|
|
50
|
+
onIdentityNumberChange: (value: number) => void;
|
|
51
|
+
onPhoneChange: (value: string) => void;
|
|
52
|
+
get hasValidatorError(): boolean;
|
|
53
|
+
get results(): import("../index").ValidationResults;
|
|
54
|
+
validateAll(): Promise<boolean>;
|
|
55
|
+
submit(): Promise<{
|
|
56
|
+
isFormError: boolean;
|
|
57
|
+
isSuccess: boolean;
|
|
58
|
+
}>;
|
|
59
|
+
}
|
|
60
|
+
export {};
|
|
@@ -84,4 +84,8 @@ export declare class EqualsRule<T> extends ValidationRule<T> {
|
|
|
84
84
|
get errorMessage(): string;
|
|
85
85
|
run(): Promise<boolean>;
|
|
86
86
|
}
|
|
87
|
+
export declare class IdentityNumberRule<T> extends ValidationRule<T> {
|
|
88
|
+
get errorMessage(): string;
|
|
89
|
+
run(): Promise<boolean>;
|
|
90
|
+
}
|
|
87
91
|
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { GetStaticProps } from "next";
|
|
3
|
+
import { IkasPageProps } from "../../components/page/index";
|
|
4
|
+
declare const _default: React.FunctionComponent<IkasPageProps>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const getStaticProps: GetStaticProps;
|
package/build/pages/index.d.ts
CHANGED
|
@@ -17,4 +17,7 @@ import * as SearchPage from "./search";
|
|
|
17
17
|
import * as NotFoundPage from "./404";
|
|
18
18
|
import * as BlogPage from "./blog/index";
|
|
19
19
|
import * as BlogSlugPage from "./blog/[slug]";
|
|
20
|
-
|
|
20
|
+
import * as RafflePage from "./raffle/[slug]";
|
|
21
|
+
import * as RafflesPage from "./raffle/index";
|
|
22
|
+
import * as AccountRafflesPage from "./account/raffles";
|
|
23
|
+
export { IndexPage, SlugPage, CustomPage, CheckoutPage, AccountPage, AddressesPage, OrdersPage, OrderDetailPage, LoginPage, RegisterPage, ForgotPasswordPage, RecoverPasswordPage, CartPage, EditorPage, FavoriteProductsPage, SearchPage, NotFoundPage, BlogPage, BlogSlugPage, RafflePage, RafflesPage, AccountRafflesPage, };
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { GetStaticProps, GetStaticPaths } from "next";
|
|
3
|
+
import { IkasPageProps } from "../../components/page/index";
|
|
4
|
+
declare const _default: React.FunctionComponent<IkasPageProps>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const getStaticPaths: GetStaticPaths;
|
|
7
|
+
export declare const getStaticProps: GetStaticProps;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import * as React from "react";
|
|
2
|
+
import { GetStaticProps } from "next";
|
|
3
|
+
import { IkasPageProps } from "../../components/page/index";
|
|
4
|
+
declare const _default: React.FunctionComponent<IkasPageProps>;
|
|
5
|
+
export default _default;
|
|
6
|
+
export declare const getStaticProps: GetStaticProps;
|
|
@@ -2,8 +2,9 @@ import { IkasThemePageType } from "../models/index";
|
|
|
2
2
|
import { IkasCategoryListParams } from "../models/ui/category-list/index";
|
|
3
3
|
import { IkasAttributeList } from "../models/ui/product-attribute-list/index";
|
|
4
4
|
import { IkasProductListParams } from "../models/ui/product-list/index";
|
|
5
|
+
import { IkasRaffleListParams } from "../models/ui/raffle-list/index";
|
|
5
6
|
import { NextRouter } from "next/router";
|
|
6
|
-
import { IkasThemeSettings, IkasThemeComponentProp, IkasBrandListParams, IkasBrandList, IkasCategoryList, IkasProductList, IkasProductDetail, IkasAttributeDetail, IkasNavigationLink, IkasImage, IkasThemeCustomData, IkasComponentRenderer, IkasBlogListParams, IkasBlogList, IkasBlogCategoryListParams, IkasBlogCategoryList } from "../index";
|
|
7
|
+
import { IkasThemeSettings, IkasThemeComponentProp, IkasBrandListParams, IkasBrandList, IkasCategoryList, IkasProductList, IkasProductDetail, IkasAttributeDetail, IkasNavigationLink, IkasImage, IkasThemeCustomData, IkasComponentRenderer, IkasBlogListParams, IkasBlogList, IkasBlogCategoryListParams, IkasBlogCategoryList, IkasRaffleList } from "../index";
|
|
7
8
|
import { IkasPageComponentPropValue } from "./page-data-get";
|
|
8
9
|
import { IkasAttributePropValueData } from "./prop-value/attribute";
|
|
9
10
|
import { IkasAttributeListPropValueData } from "./prop-value/attribute-list";
|
|
@@ -13,6 +14,7 @@ import { IkasBrandPropValueData } from "./prop-value/brand";
|
|
|
13
14
|
import { IkasCategoryPropValueData } from "./prop-value/category";
|
|
14
15
|
import { CustomDataValue } from "./prop-value/custom";
|
|
15
16
|
import { IkasProductDetailData } from "./prop-value/product-detail";
|
|
17
|
+
import { IkasRafflePropValueData } from "./prop-value/raffle";
|
|
16
18
|
export declare class IkasPageDataInit {
|
|
17
19
|
static pageSpecificData: any;
|
|
18
20
|
static setPageSpecificData(pageSpecficicDataStr: string, pageType: IkasThemePageType, isBrowser: boolean): void;
|
|
@@ -55,4 +57,8 @@ export declare class IkasPageDataInit {
|
|
|
55
57
|
static _initBlogCategoryPropValue(propValue: IkasBlogCategoryPropValueData): any;
|
|
56
58
|
static initBlogCategoryListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
57
59
|
static _initBlogCategoryListPropValue(propValue: IkasBlogCategoryListParams): IkasBlogCategoryList;
|
|
60
|
+
static initRafflePropValue(prop: IkasThemeComponentProp, propValue: IkasRafflePropValueData, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
61
|
+
static _initRafflePropValue(propValue: IkasRafflePropValueData): any;
|
|
62
|
+
static initRaffleListPropValue(prop: IkasThemeComponentProp, propValue: any, pageComponentPropValue: IkasPageComponentPropValue): void;
|
|
63
|
+
static _initRaffleListPropValue(propValue: IkasRaffleListParams): IkasRaffleList;
|
|
58
64
|
}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import { IkasBlog, IkasBlogCategory, IkasBrand, IkasCategory, IkasProductDetail } from "../models/index";
|
|
1
|
+
import { IkasBlog, IkasBlogCategory, IkasBrand, IkasCategory, IkasProductDetail, IkasRaffle } from "../models/index";
|
|
2
2
|
export declare function getPlaceholderProduct(): IkasProductDetail;
|
|
3
3
|
export declare function getPlaceholderCategory(): IkasCategory;
|
|
4
4
|
export declare function getPlaceholderBrand(): IkasBrand;
|
|
5
5
|
export declare function getPlaceholderBlog(): IkasBlog;
|
|
6
6
|
export declare function getPlaceholderBlogCategory(): IkasBlogCategory;
|
|
7
|
+
export declare function getPlaceholderRaffle(): IkasRaffle;
|
|
@@ -35,6 +35,8 @@ export declare class IkasCustomPropValueProvider implements IkasPropValueProvide
|
|
|
35
35
|
private getBlogListValue;
|
|
36
36
|
private getBlogCategoryValue;
|
|
37
37
|
private getBlogCategoryListValue;
|
|
38
|
+
private getRaffleValue;
|
|
39
|
+
private getRaffleListValue;
|
|
38
40
|
}
|
|
39
41
|
export declare type CustomDataValue = {
|
|
40
42
|
value: any;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { IkasRaffle, IkasRafflePropValue } from "../../models/index";
|
|
2
|
+
import IkasPropValueProvider from "./index";
|
|
3
|
+
export declare class IkasRafflePropValueProvider implements IkasPropValueProvider<IkasRafflePropValueData | null> {
|
|
4
|
+
private rafflePropValue;
|
|
5
|
+
constructor(propValue: IkasRafflePropValue);
|
|
6
|
+
getValue(): Promise<IkasRafflePropValueData | null>;
|
|
7
|
+
}
|
|
8
|
+
export declare type IkasRafflePropValueData = {
|
|
9
|
+
raffle: IkasRaffle | null;
|
|
10
|
+
rafflePropValue: IkasRafflePropValue;
|
|
11
|
+
};
|
|
@@ -39,6 +39,7 @@ export declare class IkasCustomerStore {
|
|
|
39
39
|
sendReview: (input: IkasCustomerReviewForm) => Promise<false | import("../api/customer-review/__generated__/createCustomerReview").createCustomerReview_createCustomerReview | undefined>;
|
|
40
40
|
onCustomerConsentGrant: () => void;
|
|
41
41
|
waitUntilInitialized: () => Promise<unknown>;
|
|
42
|
+
getRaffles: () => Promise<import("../models/index").IkasRaffle[] | undefined>;
|
|
42
43
|
private init;
|
|
43
44
|
private routeChangeInit;
|
|
44
45
|
private getCustomer;
|