@web-portal/view-shared 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/fesm2022/web-portal-view-shared.mjs +1355 -4
- package/fesm2022/web-portal-view-shared.mjs.map +1 -1
- package/lib/components/index.d.ts +2 -0
- package/lib/components/product-picker-dialog/index.d.ts +2 -0
- package/lib/components/product-picker-dialog/product-picker-dialog.component.d.ts +66 -0
- package/lib/components/promotion-picker-dialog/index.d.ts +2 -0
- package/lib/components/promotion-picker-dialog/promotion-picker-dialog.component.d.ts +63 -0
- package/lib/models/categories/category-tree.res.d.ts +23 -0
- package/lib/models/products/product-option.model.d.ts +80 -0
- package/lib/models/promotions/promotion.model.d.ts +61 -0
- package/lib/services/apis/categories/category-tree.api.service.d.ts +10 -0
- package/lib/services/apis/products/product-popup.api.service.d.ts +10 -0
- package/lib/services/apis/promotions/promotion.api.service.d.ts +10 -0
- package/lib/stores/apis/category-tree.api.store.d.ts +27 -0
- package/package.json +2 -5
- package/public-api.d.ts +9 -0
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
export interface CategoryTreeRes {
|
|
2
|
+
CategoryID?: number;
|
|
3
|
+
CategoryName?: string;
|
|
4
|
+
RefCategoryID?: string;
|
|
5
|
+
ParentCategoryID?: number;
|
|
6
|
+
Level?: number;
|
|
7
|
+
NodeTree?: string;
|
|
8
|
+
Description?: string;
|
|
9
|
+
IsAveragePrice?: boolean;
|
|
10
|
+
IsDefault?: boolean;
|
|
11
|
+
IsActived?: boolean;
|
|
12
|
+
VAT?: number;
|
|
13
|
+
CreatedDate?: string;
|
|
14
|
+
CreatedUser?: number;
|
|
15
|
+
UpdatedDate?: string;
|
|
16
|
+
UpdatedUser?: number;
|
|
17
|
+
CatLevel?: number;
|
|
18
|
+
ParentCategoryName?: string;
|
|
19
|
+
CreatedUsername?: string;
|
|
20
|
+
IsCategoryGroupID?: boolean;
|
|
21
|
+
children?: CategoryTreeRes[];
|
|
22
|
+
Children?: CategoryTreeRes[];
|
|
23
|
+
}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
export interface ProductRes {
|
|
2
|
+
SalePriceAfter?: number;
|
|
3
|
+
SalePrice?: number;
|
|
4
|
+
BuyPriceAfter?: number;
|
|
5
|
+
PID?: number;
|
|
6
|
+
ProductID?: string;
|
|
7
|
+
ProductName?: string;
|
|
8
|
+
CategoryID?: number;
|
|
9
|
+
CategoryName?: string;
|
|
10
|
+
UnitID?: number;
|
|
11
|
+
UnitName?: string;
|
|
12
|
+
ReferenceID?: string;
|
|
13
|
+
IsSerial?: boolean;
|
|
14
|
+
ColorName?: string;
|
|
15
|
+
ColorID?: number;
|
|
16
|
+
Image?: string;
|
|
17
|
+
ProductStatusID?: number;
|
|
18
|
+
ProductStatusName?: string;
|
|
19
|
+
ManufacturerID?: number;
|
|
20
|
+
ManufacturerName?: string;
|
|
21
|
+
ProductInputTypeID?: number;
|
|
22
|
+
ProductInputTypeName?: string;
|
|
23
|
+
VAT?: number;
|
|
24
|
+
VATPercent?: number;
|
|
25
|
+
VATIn?: number;
|
|
26
|
+
VATInPercent?: number;
|
|
27
|
+
Description?: string;
|
|
28
|
+
IsActived?: boolean;
|
|
29
|
+
NumOfBox?: number;
|
|
30
|
+
ProductCycleType?: boolean;
|
|
31
|
+
SizeID?: number;
|
|
32
|
+
SizeName?: string;
|
|
33
|
+
ProductWeightCC?: number;
|
|
34
|
+
ProductVolumeCC?: number;
|
|
35
|
+
ProductWeightSupplier?: number;
|
|
36
|
+
ProductVolumeSupplier?: number;
|
|
37
|
+
ProductGroup?: string;
|
|
38
|
+
SafetyNumber?: number;
|
|
39
|
+
QuantityMin?: number;
|
|
40
|
+
QuantityMax?: number;
|
|
41
|
+
Length?: number;
|
|
42
|
+
Width?: number;
|
|
43
|
+
Height?: number;
|
|
44
|
+
IsImportant?: boolean;
|
|
45
|
+
SupplierItemID?: string;
|
|
46
|
+
CreatedUser?: number;
|
|
47
|
+
CreatedDate?: Date;
|
|
48
|
+
UpdatedUser?: number;
|
|
49
|
+
UpdatedDate?: Date;
|
|
50
|
+
IsDeleted?: boolean;
|
|
51
|
+
IsInit?: boolean;
|
|
52
|
+
BoxCC?: number;
|
|
53
|
+
BoxSupplier?: number;
|
|
54
|
+
ProductSet?: string;
|
|
55
|
+
IsGift?: boolean;
|
|
56
|
+
}
|
|
57
|
+
export interface ProductOption {
|
|
58
|
+
id: string;
|
|
59
|
+
code: string;
|
|
60
|
+
name: string;
|
|
61
|
+
price?: number;
|
|
62
|
+
raw?: ProductRes;
|
|
63
|
+
}
|
|
64
|
+
export interface ProductPopupSearchRequest {
|
|
65
|
+
KeySearch?: string;
|
|
66
|
+
CategoryIDs?: (string | number)[];
|
|
67
|
+
IsActived?: boolean;
|
|
68
|
+
PageIndex: number;
|
|
69
|
+
PageSize: number;
|
|
70
|
+
}
|
|
71
|
+
export interface ProductPopupSearchResponse {
|
|
72
|
+
items?: ProductRes[];
|
|
73
|
+
data?: ProductRes[];
|
|
74
|
+
results?: ProductRes[];
|
|
75
|
+
total?: number;
|
|
76
|
+
totalItems?: number;
|
|
77
|
+
totalRecords?: number;
|
|
78
|
+
pageIndex?: number;
|
|
79
|
+
pageSize?: number;
|
|
80
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
export interface PromotionOutputTypeRes {
|
|
2
|
+
[key: string]: any;
|
|
3
|
+
}
|
|
4
|
+
export interface PromotionSearchDetailRes {
|
|
5
|
+
TotalRecord?: number;
|
|
6
|
+
PromotionID: number;
|
|
7
|
+
PromotionNo: string;
|
|
8
|
+
PromotionName: string;
|
|
9
|
+
BeginDate?: string;
|
|
10
|
+
EndDate?: string;
|
|
11
|
+
PromotionTypeID?: number;
|
|
12
|
+
PromotionTypeName?: string;
|
|
13
|
+
IsActivedOne: boolean;
|
|
14
|
+
IsActivedTwo: boolean;
|
|
15
|
+
RunStatus?: string;
|
|
16
|
+
CreatedUser_FullName?: string;
|
|
17
|
+
CreatedUser: number;
|
|
18
|
+
OutputTypes?: PromotionOutputTypeRes[];
|
|
19
|
+
IsDiscount: boolean;
|
|
20
|
+
DiscountAmount?: number;
|
|
21
|
+
DiscountPercent?: number;
|
|
22
|
+
ClaimBackTypeID?: number;
|
|
23
|
+
ClaimBackTypeName?: string;
|
|
24
|
+
ReceiptTypeID?: number;
|
|
25
|
+
ReceiptTypeName?: string;
|
|
26
|
+
PromotionSchemeID?: number;
|
|
27
|
+
PromotionSchemeCode?: string;
|
|
28
|
+
PromotionSchemeName?: string;
|
|
29
|
+
PromotionSchemeDescription?: string;
|
|
30
|
+
PromotionSchemeBeginDate?: string;
|
|
31
|
+
PromotionSchemeEndDate?: string;
|
|
32
|
+
COMCode?: string;
|
|
33
|
+
Legal?: string;
|
|
34
|
+
}
|
|
35
|
+
export interface PromotionSearchRes {
|
|
36
|
+
TotalRecord: number;
|
|
37
|
+
CurrentPageIndex?: number;
|
|
38
|
+
PageSize?: number;
|
|
39
|
+
Records: PromotionSearchDetailRes[];
|
|
40
|
+
}
|
|
41
|
+
export interface PromotionSearchRequest {
|
|
42
|
+
KeySearch?: string;
|
|
43
|
+
CreatedUser?: number;
|
|
44
|
+
DateFrom?: string;
|
|
45
|
+
DateTo?: string;
|
|
46
|
+
StoreID?: number;
|
|
47
|
+
PromotionTypeID: number;
|
|
48
|
+
CategoryIDs: number[];
|
|
49
|
+
OptionSearch: number;
|
|
50
|
+
TypeSearch: number;
|
|
51
|
+
PageIndex: number;
|
|
52
|
+
PageSize: number;
|
|
53
|
+
IsStopped: number;
|
|
54
|
+
IsActived: number;
|
|
55
|
+
}
|
|
56
|
+
export interface PromotionOption {
|
|
57
|
+
id: string;
|
|
58
|
+
code: string;
|
|
59
|
+
name: string;
|
|
60
|
+
raw?: PromotionSearchDetailRes;
|
|
61
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { BaseApiService } from "@cci-web-app/core";
|
|
3
|
+
import { CategoryTreeRes } from "../../../models/categories/category-tree.res";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class CategoryTreeApiService extends BaseApiService {
|
|
6
|
+
constructor();
|
|
7
|
+
list(): Observable<CategoryTreeRes[]>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<CategoryTreeApiService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<CategoryTreeApiService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { BaseApiService } from "@cci-web-app/core";
|
|
3
|
+
import { ProductPopupSearchRequest, ProductPopupSearchResponse } from "../../../models/products/product-option.model";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class ProductPopupApiService extends BaseApiService {
|
|
6
|
+
constructor();
|
|
7
|
+
popupSearch(payload: ProductPopupSearchRequest): Observable<ProductPopupSearchResponse>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<ProductPopupApiService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<ProductPopupApiService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { Observable } from "rxjs";
|
|
2
|
+
import { BaseApiService } from "@cci-web-app/core";
|
|
3
|
+
import { PromotionSearchRequest, PromotionSearchRes } from "../../../models/promotions/promotion.model";
|
|
4
|
+
import * as i0 from "@angular/core";
|
|
5
|
+
export declare class PromotionApiService extends BaseApiService {
|
|
6
|
+
constructor();
|
|
7
|
+
search(payload: PromotionSearchRequest): Observable<PromotionSearchRes>;
|
|
8
|
+
static ɵfac: i0.ɵɵFactoryDeclaration<PromotionApiService, never>;
|
|
9
|
+
static ɵprov: i0.ɵɵInjectableDeclaration<PromotionApiService>;
|
|
10
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CategoryTreeRes } from "../../models/categories/category-tree.res";
|
|
2
|
+
export declare const CATEGORY_TREE_STORE_KEY: {
|
|
3
|
+
LIST: string;
|
|
4
|
+
USER_LIST: string;
|
|
5
|
+
};
|
|
6
|
+
export declare const CategoryTreeStore: import("@angular/core").Type<{
|
|
7
|
+
loading: import("@angular/core").Signal<Record<any, boolean>>;
|
|
8
|
+
error: import("@angular/core").Signal<Record<any, any>>;
|
|
9
|
+
data: import("@angular/core").Signal<Record<any, CategoryTreeRes[]>>;
|
|
10
|
+
custom?: import("@ngrx/signals").DeepSignal<{}>;
|
|
11
|
+
keys: import("@angular/core").Signal<string[]>;
|
|
12
|
+
getLoading: import("@angular/core").Signal<(key: string) => boolean>;
|
|
13
|
+
getError: import("@angular/core").Signal<(key: string) => any>;
|
|
14
|
+
getData: import("@angular/core").Signal<(key: string) => CategoryTreeRes[]>;
|
|
15
|
+
getCustom: import("@angular/core").Signal<{}>;
|
|
16
|
+
setData: (key: string, data: CategoryTreeRes[]) => void;
|
|
17
|
+
setLoading: (key: string, loading: boolean) => void;
|
|
18
|
+
setError: (key: string, error: any) => void;
|
|
19
|
+
clearKey: (key: string) => void;
|
|
20
|
+
clearAll: () => void;
|
|
21
|
+
list: import("@ngrx/signals/rxjs-interop").RxMethod<any>;
|
|
22
|
+
} & import("@ngrx/signals").StateSource<{
|
|
23
|
+
loading: Record<any, boolean>;
|
|
24
|
+
error: Record<any, any>;
|
|
25
|
+
data: Record<any, CategoryTreeRes[]>;
|
|
26
|
+
custom?: {};
|
|
27
|
+
}>>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@web-portal/view-shared",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.2",
|
|
4
4
|
"peerDependencies": {
|
|
5
5
|
"@angular/common": "^19.2.0",
|
|
6
6
|
"@angular/core": "^19.2.0",
|
|
@@ -20,8 +20,5 @@
|
|
|
20
20
|
"types": "./index.d.ts",
|
|
21
21
|
"default": "./fesm2022/web-portal-view-shared.mjs"
|
|
22
22
|
}
|
|
23
|
-
}
|
|
24
|
-
"publishConfig": {
|
|
25
|
-
"access": "public"
|
|
26
|
-
}
|
|
23
|
+
}
|
|
27
24
|
}
|
package/public-api.d.ts
CHANGED
|
@@ -1,6 +1,15 @@
|
|
|
1
1
|
export * from './lib/components';
|
|
2
2
|
export * from './lib/components/tree-select/tree-select.interface';
|
|
3
|
+
export * from './lib/components/product-picker-dialog/product-picker-dialog.component';
|
|
4
|
+
export * from './lib/components/promotion-picker-dialog/promotion-picker-dialog.component';
|
|
5
|
+
export * from './lib/models/products/product-option.model';
|
|
6
|
+
export * from './lib/models/promotions/promotion.model';
|
|
7
|
+
export * from './lib/models/categories/category-tree.res';
|
|
3
8
|
export * from './lib/services/auth/auth-dialog.service';
|
|
9
|
+
export * from './lib/services/apis/products/product-popup.api.service';
|
|
10
|
+
export * from './lib/services/apis/promotions/promotion.api.service';
|
|
11
|
+
export * from './lib/services/apis/categories/category-tree.api.service';
|
|
12
|
+
export * from './lib/stores/apis/category-tree.api.store';
|
|
4
13
|
export * from './lib/sub-sink';
|
|
5
14
|
export * from './lib/UnsubscribeOnDestroyAdapter';
|
|
6
15
|
export * from './lib/base.store';
|