@appcorp/fusion-storybook 0.1.62 → 0.1.64

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 (61) hide show
  1. package/base-modules/discount-code/context.d.ts +53 -43
  2. package/base-modules/discount-code/context.js +179 -135
  3. package/base-modules/discount-code/page.d.ts +13 -7
  4. package/base-modules/discount-code/page.js +17 -13
  5. package/base-modules/rbac/assign-permissions.d.ts +1 -0
  6. package/base-modules/rbac/assign-permissions.js +53 -0
  7. package/base-modules/rbac/cache.d.ts +27 -0
  8. package/base-modules/rbac/cache.js +46 -0
  9. package/base-modules/rbac/constants.d.ts +17 -0
  10. package/base-modules/rbac/constants.js +28 -0
  11. package/base-modules/rbac/context.d.ts +190 -0
  12. package/base-modules/rbac/context.js +539 -0
  13. package/base-modules/rbac/filter.d.ts +1 -0
  14. package/base-modules/rbac/filter.js +18 -0
  15. package/base-modules/rbac/form.d.ts +1 -0
  16. package/base-modules/rbac/form.js +13 -0
  17. package/base-modules/rbac/more-actions.d.ts +6 -0
  18. package/base-modules/rbac/more-actions.js +10 -0
  19. package/base-modules/rbac/page.d.ts +35 -0
  20. package/base-modules/rbac/page.js +142 -0
  21. package/base-modules/rbac/validate.d.ts +10 -0
  22. package/base-modules/rbac/validate.js +13 -0
  23. package/base-modules/rbac/view.d.ts +1 -0
  24. package/base-modules/rbac/view.js +33 -0
  25. package/base-modules/school/cache.d.ts +9 -0
  26. package/base-modules/school/cache.js +28 -0
  27. package/base-modules/school/constants.d.ts +9 -0
  28. package/base-modules/school/constants.js +17 -0
  29. package/base-modules/school/context.d.ts +157 -0
  30. package/base-modules/school/context.js +285 -0
  31. package/base-modules/school/drawer.d.ts +1 -0
  32. package/base-modules/school/drawer.js +24 -0
  33. package/base-modules/school/filter.d.ts +1 -0
  34. package/base-modules/school/filter.js +13 -0
  35. package/base-modules/school/form.d.ts +1 -0
  36. package/base-modules/school/form.js +30 -0
  37. package/base-modules/school/more-actions.d.ts +1 -0
  38. package/base-modules/school/more-actions.js +13 -0
  39. package/base-modules/school/page.d.ts +24 -0
  40. package/base-modules/school/page.js +41 -0
  41. package/base-modules/school/validate.d.ts +23 -0
  42. package/base-modules/school/validate.js +26 -0
  43. package/base-modules/school/view.d.ts +1 -0
  44. package/base-modules/school/view.js +24 -0
  45. package/base-modules/user/context.d.ts +4 -3
  46. package/base-modules/user/context.js +251 -229
  47. package/base-modules/user/page.d.ts +15 -9
  48. package/base-modules/user/page.js +19 -14
  49. package/base-modules/workspace/context.d.ts +14 -13
  50. package/base-modules/workspace/context.js +100 -98
  51. package/base-modules/workspace/drawer.js +3 -1
  52. package/base-modules/workspace/form.js +4 -4
  53. package/base-modules/workspace/page.d.ts +4 -2
  54. package/base-modules/workspace/page.js +15 -1
  55. package/base-modules/workspace-user/constants.js +1 -0
  56. package/base-modules/workspace-user/context.d.ts +19 -0
  57. package/base-modules/workspace-user/context.js +48 -31
  58. package/base-modules/workspace-user/page.d.ts +1 -1
  59. package/base-modules/workspace-user/page.js +22 -11
  60. package/package.json +1 -1
  61. package/tsconfig.build.tsbuildinfo +1 -1
@@ -1,4 +1,4 @@
1
- import { type RowAction, type TableRow } from "@appcorp/shadcn/components/enhanced-table";
1
+ import { type TableRow } from "@appcorp/shadcn/components/enhanced-table";
2
2
  import { DiscountCodeBE } from "../../type";
3
3
  export declare const DISCOUNT_CODE_DRAWER: {
4
4
  readonly FILTER_DRAWER: string;
@@ -19,14 +19,6 @@ export declare const DISCOUNT_CODE_ACTION_TYPES: {
19
19
  readonly SET_ERRORS: "SET_ERRORS";
20
20
  readonly SET_FILTERS: "SET_FILTERS";
21
21
  }, discountCodeModuleConfig: import("@react-pakistan/util-functions/factory/generic-module-factory").ModuleConfig<{
22
- items: DiscountCodeBE[];
23
- count: number;
24
- currentPage: number;
25
- pageLimit: number;
26
- searchQuery: string;
27
- disableSaveButton: boolean;
28
- drawer: null;
29
- modal: null;
30
22
  code: string;
31
23
  description: string;
32
24
  discountType: string;
@@ -35,15 +27,15 @@ export declare const DISCOUNT_CODE_ACTION_TYPES: {
35
27
  errors: Record<string, string>;
36
28
  filterEnabled: boolean | undefined;
37
29
  id: string;
38
- }>, initialDiscountCodeState: {
39
- items: DiscountCodeBE[];
40
30
  count: number;
31
+ items: DiscountCodeBE[];
41
32
  currentPage: number;
42
33
  pageLimit: number;
43
34
  searchQuery: string;
44
35
  disableSaveButton: boolean;
45
36
  drawer: null;
46
37
  modal: null;
38
+ }>, initialDiscountCodeState: {
47
39
  code: string;
48
40
  description: string;
49
41
  discountType: string;
@@ -52,17 +44,17 @@ export declare const DISCOUNT_CODE_ACTION_TYPES: {
52
44
  errors: Record<string, string>;
53
45
  filterEnabled: boolean | undefined;
54
46
  id: string;
55
- }, DiscountCodeProvider: import("react").FC<{
56
- children: React.ReactNode;
57
- }>, discountCodeReducer: (state: {
58
- items: DiscountCodeBE[];
59
47
  count: number;
48
+ items: DiscountCodeBE[];
60
49
  currentPage: number;
61
50
  pageLimit: number;
62
51
  searchQuery: string;
63
52
  disableSaveButton: boolean;
64
53
  drawer: null;
65
54
  modal: null;
55
+ }, DiscountCodeProvider: import("react").FC<{
56
+ children: React.ReactNode;
57
+ }>, discountCodeReducer: (state: {
66
58
  code: string;
67
59
  description: string;
68
60
  discountType: string;
@@ -71,15 +63,15 @@ export declare const DISCOUNT_CODE_ACTION_TYPES: {
71
63
  errors: Record<string, string>;
72
64
  filterEnabled: boolean | undefined;
73
65
  id: string;
74
- }, action: any) => {
75
- items: DiscountCodeBE[];
76
66
  count: number;
67
+ items: DiscountCodeBE[];
77
68
  currentPage: number;
78
69
  pageLimit: number;
79
70
  searchQuery: string;
80
71
  disableSaveButton: boolean;
81
72
  drawer: null;
82
73
  modal: null;
74
+ }, action: any) => {
83
75
  code: string;
84
76
  description: string;
85
77
  discountType: string;
@@ -88,15 +80,15 @@ export declare const DISCOUNT_CODE_ACTION_TYPES: {
88
80
  errors: Record<string, string>;
89
81
  filterEnabled: boolean | undefined;
90
82
  id: string;
91
- }, useDiscountCodeStateContext: () => import("@react-pakistan/util-functions/factory/generic-module-factory").GenericModuleContext<{
92
- items: DiscountCodeBE[];
93
83
  count: number;
84
+ items: DiscountCodeBE[];
94
85
  currentPage: number;
95
86
  pageLimit: number;
96
87
  searchQuery: string;
97
88
  disableSaveButton: boolean;
98
89
  drawer: null;
99
90
  modal: null;
91
+ }, useDiscountCodeStateContext: () => import("@react-pakistan/util-functions/factory/generic-module-factory").GenericModuleContext<{
100
92
  code: string;
101
93
  description: string;
102
94
  discountType: string;
@@ -105,39 +97,32 @@ export declare const DISCOUNT_CODE_ACTION_TYPES: {
105
97
  errors: Record<string, string>;
106
98
  filterEnabled: boolean | undefined;
107
99
  id: string;
100
+ count: number;
101
+ items: DiscountCodeBE[];
102
+ currentPage: number;
103
+ pageLimit: number;
104
+ searchQuery: string;
105
+ disableSaveButton: boolean;
106
+ drawer: null;
107
+ modal: null;
108
108
  }>;
109
109
  export declare const useDiscountCodeModule: () => {
110
- state: {
111
- items: DiscountCodeBE[];
112
- count: number;
113
- currentPage: number;
114
- pageLimit: number;
115
- searchQuery: string;
116
- disableSaveButton: boolean;
117
- drawer: null;
118
- modal: null;
119
- code: string;
120
- description: string;
121
- discountType: string;
122
- discountValue: number;
123
- enabled: boolean;
124
- errors: Record<string, string>;
125
- filterEnabled: boolean | undefined;
126
- id: string;
127
- };
128
- dispatch: import("react").Dispatch<any>;
129
110
  applyFilters: () => void;
130
111
  byIdLoading: boolean;
131
112
  clearFilters: () => void;
113
+ clearSearch: () => void;
114
+ closeDrawer: () => void;
132
115
  deleteLoading: boolean;
133
- handleChange: (field: string, value: string | number | boolean | undefined) => void;
134
- handleCloseDrawer: () => void;
116
+ handleChange: (key: string, value: string | number | boolean | string[]) => void;
135
117
  handleCreate: () => void;
136
118
  handleDelete: (row?: TableRow) => void;
137
119
  handleEdit: (row?: TableRow) => void;
138
120
  handleFilters: () => void;
121
+ handleMoreActions: () => void;
122
+ handleNextClick: () => void;
139
123
  handlePageChange: (page: number) => void;
140
- handlePageLimitChange: (limit: number) => void;
124
+ handlePageLimitChange: (k: string, value: object) => void;
125
+ handlePreviousClick: () => void;
141
126
  handleSearch: (query: string) => void;
142
127
  handleSubmit: () => void;
143
128
  handleView: (row?: TableRow) => void;
@@ -146,9 +131,34 @@ export declare const useDiscountCodeModule: () => {
146
131
  handleOnClick: () => void;
147
132
  label: string;
148
133
  order: number;
149
- icon: import("react").ForwardRefExoticComponent<Omit<import("lucide-react").LucideProps, "ref"> & import("react").RefAttributes<SVGSVGElement>>;
150
134
  }[];
135
+ listError: Error | undefined;
136
+ listFetchNow: (url?: string, config?: import("@react-pakistan/util-functions/hooks/use-fetch").FetchConfig) => void;
151
137
  listLoading: boolean;
152
- rowActions: RowAction[];
138
+ rowActions: {
139
+ enabled: boolean;
140
+ handleOnClick: (row?: TableRow) => void;
141
+ label: string;
142
+ order: number;
143
+ }[];
153
144
  updateLoading: boolean;
145
+ state: {
146
+ code: string;
147
+ description: string;
148
+ discountType: string;
149
+ discountValue: number;
150
+ enabled: boolean;
151
+ errors: Record<string, string>;
152
+ filterEnabled: boolean | undefined;
153
+ id: string;
154
+ count: number;
155
+ items: DiscountCodeBE[];
156
+ currentPage: number;
157
+ pageLimit: number;
158
+ searchQuery: string;
159
+ disableSaveButton: boolean;
160
+ drawer: null;
161
+ modal: null;
162
+ };
163
+ dispatch: React.Dispatch<any>;
154
164
  };