mall-components 1.0.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.
Files changed (122) hide show
  1. package/README.md +128 -0
  2. package/build/_components-raw.css +791 -0
  3. package/build/_shims/antd.js +1 -0
  4. package/build/_shims/icons.js +1 -0
  5. package/build/_shims/moment.js +1 -0
  6. package/build/_shims/react-dom.js +1 -0
  7. package/build/_shims/react.js +1 -0
  8. package/build/adapters/DataSourceAdapter.d.ts +46 -0
  9. package/build/components/AdminLayout/AdminLayout.d.ts +5 -0
  10. package/build/components/AdminLayout/Breadcrumb.d.ts +8 -0
  11. package/build/components/AdminLayout/MainContent.d.ts +17 -0
  12. package/build/components/AdminLayout/Navbar.d.ts +10 -0
  13. package/build/components/AdminLayout/Sidebar.d.ts +14 -0
  14. package/build/components/AdminLayout/TabBar.d.ts +13 -0
  15. package/build/components/AdminLayout/TabPane.d.ts +4 -0
  16. package/build/components/AdminLayout/index.d.ts +3 -0
  17. package/build/components/AdminLayout/types.d.ts +42 -0
  18. package/build/components/CouponCard/CouponCard.d.ts +20 -0
  19. package/build/components/CouponCard/index.d.ts +1 -0
  20. package/build/components/OrderForm/OrderForm.d.ts +18 -0
  21. package/build/components/OrderForm/index.d.ts +1 -0
  22. package/build/components/OrderList/OrderList.d.ts +29 -0
  23. package/build/components/OrderList/index.d.ts +1 -0
  24. package/build/components/ProductForm/ProductForm.d.ts +18 -0
  25. package/build/components/ProductForm/index.d.ts +3 -0
  26. package/build/components/ProductList/ProductList.d.ts +47 -0
  27. package/build/components/ProductList/index.d.ts +3 -0
  28. package/build/components/PromotionCard/PromotionCard.d.ts +22 -0
  29. package/build/components/PromotionCard/index.d.ts +1 -0
  30. package/build/components/RoleCard/RoleCard.d.ts +18 -0
  31. package/build/components/RoleCard/index.d.ts +1 -0
  32. package/build/components/UserCard/UserCard.d.ts +17 -0
  33. package/build/components/UserCard/index.d.ts +1 -0
  34. package/build/entry-meta.d.ts +603 -0
  35. package/build/index.css +1 -0
  36. package/build/index.js +1 -0
  37. package/build/mall-components-meta.js +2563 -0
  38. package/build/mall-components.cdn.umd.css +1 -0
  39. package/build/mall-components.cdn.umd.js +8 -0
  40. package/build/mall-components.codesandbox.combined.js +1094 -0
  41. package/build/mall-components.codesandbox.css +401 -0
  42. package/build/mall-components.codesandbox.js +1080 -0
  43. package/build/mall-components.umd.css +1 -0
  44. package/build/mall-components.umd.js +8 -0
  45. package/build/meta/adminLayoutMeta.d.ts +3 -0
  46. package/build/meta/couponCardMeta.d.ts +128 -0
  47. package/build/meta/icons.d.ts +10 -0
  48. package/build/meta/orderFormMeta.d.ts +111 -0
  49. package/build/meta/orderListMeta.d.ts +170 -0
  50. package/build/meta/productFormMeta.d.ts +3 -0
  51. package/build/meta/productListMeta.d.ts +200 -0
  52. package/build/meta/promotionCardMeta.d.ts +129 -0
  53. package/build/meta/roleCardMeta.d.ts +3 -0
  54. package/build/meta/tabPaneMeta.d.ts +3 -0
  55. package/build/meta/userCardMeta.d.ts +3 -0
  56. package/build/meta.d.ts +605 -0
  57. package/build/setters/RestApiTester.d.ts +11 -0
  58. package/build/types/common.d.ts +17 -0
  59. package/build/types/marketing.d.ts +128 -0
  60. package/build/types/order.d.ts +174 -0
  61. package/build/types/permission.d.ts +101 -0
  62. package/build/types/product.d.ts +47 -0
  63. package/package.json +1 -0
  64. package/src/adapters/DataSourceAdapter.ts +445 -0
  65. package/src/components/AdminLayout/AdminLayout.scss +447 -0
  66. package/src/components/AdminLayout/AdminLayout.tsx +681 -0
  67. package/src/components/AdminLayout/Breadcrumb.tsx +60 -0
  68. package/src/components/AdminLayout/MainContent.tsx +54 -0
  69. package/src/components/AdminLayout/Navbar.tsx +76 -0
  70. package/src/components/AdminLayout/Sidebar.tsx +256 -0
  71. package/src/components/AdminLayout/TabBar.tsx +177 -0
  72. package/src/components/AdminLayout/TabPane.tsx +29 -0
  73. package/src/components/AdminLayout/index.ts +3 -0
  74. package/src/components/AdminLayout/types.ts +46 -0
  75. package/src/components/CouponCard/CouponCard.scss +55 -0
  76. package/src/components/CouponCard/CouponCard.tsx +687 -0
  77. package/src/components/CouponCard/index.ts +1 -0
  78. package/src/components/OrderForm/OrderForm.scss +148 -0
  79. package/src/components/OrderForm/OrderForm.tsx +503 -0
  80. package/src/components/OrderForm/index.ts +1 -0
  81. package/src/components/OrderList/OrderList.scss +160 -0
  82. package/src/components/OrderList/OrderList.tsx +885 -0
  83. package/src/components/OrderList/index.ts +1 -0
  84. package/src/components/ProductForm/ProductForm.scss +23 -0
  85. package/src/components/ProductForm/ProductForm.tsx +442 -0
  86. package/src/components/ProductForm/index.ts +3 -0
  87. package/src/components/ProductList/ProductList.scss +293 -0
  88. package/src/components/ProductList/ProductList.tsx +454 -0
  89. package/src/components/ProductList/index.ts +3 -0
  90. package/src/components/PromotionCard/PromotionCard.scss +71 -0
  91. package/src/components/PromotionCard/PromotionCard.tsx +579 -0
  92. package/src/components/PromotionCard/index.ts +1 -0
  93. package/src/components/RoleCard/RoleCard.scss +77 -0
  94. package/src/components/RoleCard/RoleCard.tsx +463 -0
  95. package/src/components/RoleCard/index.ts +1 -0
  96. package/src/components/UserCard/UserCard.scss +51 -0
  97. package/src/components/UserCard/UserCard.tsx +432 -0
  98. package/src/components/UserCard/index.ts +1 -0
  99. package/src/entry-components.ts +39 -0
  100. package/src/entry-meta.ts +23 -0
  101. package/src/index.scss +4 -0
  102. package/src/index.ts +36 -0
  103. package/src/index.tsx +17 -0
  104. package/src/meta/adminLayoutMeta.ts +154 -0
  105. package/src/meta/couponCardMeta.ts +287 -0
  106. package/src/meta/icons.ts +41 -0
  107. package/src/meta/orderFormMeta.ts +279 -0
  108. package/src/meta/orderListMeta.ts +443 -0
  109. package/src/meta/productFormMeta.ts +253 -0
  110. package/src/meta/productListMeta.ts +434 -0
  111. package/src/meta/promotionCardMeta.ts +276 -0
  112. package/src/meta/roleCardMeta.ts +142 -0
  113. package/src/meta/tabPaneMeta.ts +69 -0
  114. package/src/meta/userCardMeta.ts +128 -0
  115. package/src/meta.ts +25 -0
  116. package/src/setters/RestApiTester.tsx +219 -0
  117. package/src/shims/require.js +8 -0
  118. package/src/types/common.ts +19 -0
  119. package/src/types/marketing.ts +124 -0
  120. package/src/types/order.ts +169 -0
  121. package/src/types/permission.ts +102 -0
  122. package/src/types/product.ts +49 -0
@@ -0,0 +1,605 @@
1
+ declare const _default: {
2
+ components: (import("@alilc/lowcode-types/lib").IPublicTypeComponentMetadata | {
3
+ componentName: string;
4
+ title: string;
5
+ docUrl: string;
6
+ screenshot: string;
7
+ npm: {
8
+ package: string;
9
+ version: string;
10
+ exportName: string;
11
+ destructuring: boolean;
12
+ };
13
+ props: ({
14
+ name: string;
15
+ propType: string;
16
+ description: string;
17
+ defaultValue: string;
18
+ } | {
19
+ name: string;
20
+ propType: string;
21
+ description: string;
22
+ defaultValue?: undefined;
23
+ } | {
24
+ name: string;
25
+ propType: string;
26
+ description: string;
27
+ defaultValue: boolean;
28
+ } | {
29
+ name: string;
30
+ propType: string;
31
+ description: string;
32
+ defaultValue: number;
33
+ })[];
34
+ configure: {
35
+ supports: {
36
+ style: boolean;
37
+ events: {
38
+ name: string;
39
+ description: string;
40
+ }[];
41
+ };
42
+ props: ({
43
+ type: string;
44
+ title: string;
45
+ display: string;
46
+ items: ({
47
+ name: string;
48
+ title: string;
49
+ setter: {
50
+ componentName: string;
51
+ props: {
52
+ options: {
53
+ label: string;
54
+ value: string;
55
+ }[];
56
+ rows?: undefined;
57
+ placeholder?: undefined;
58
+ setters?: undefined;
59
+ };
60
+ };
61
+ extraProps: {
62
+ display: string;
63
+ };
64
+ condition?: undefined;
65
+ } | {
66
+ name: string;
67
+ title: string;
68
+ setter: {
69
+ componentName: string;
70
+ props: {
71
+ rows: number;
72
+ placeholder: string;
73
+ options?: undefined;
74
+ setters?: undefined;
75
+ };
76
+ };
77
+ extraProps: {
78
+ display: string;
79
+ };
80
+ condition: (target: any) => boolean;
81
+ } | {
82
+ name: string;
83
+ title: string;
84
+ setter: {
85
+ componentName: string;
86
+ props: {
87
+ setters: string[];
88
+ options?: undefined;
89
+ rows?: undefined;
90
+ placeholder?: undefined;
91
+ };
92
+ };
93
+ extraProps: {
94
+ display: string;
95
+ };
96
+ condition: (target: any) => boolean;
97
+ })[];
98
+ } | {
99
+ type: string;
100
+ title: string;
101
+ display: string;
102
+ items: {
103
+ name: string;
104
+ title: string;
105
+ setter: string;
106
+ extraProps: {
107
+ display: string;
108
+ };
109
+ }[];
110
+ } | {
111
+ type: string;
112
+ title: string;
113
+ display: string;
114
+ items: {
115
+ name: string;
116
+ title: string;
117
+ setter: {
118
+ componentName: string;
119
+ props: {
120
+ min: number;
121
+ max: number;
122
+ };
123
+ };
124
+ extraProps: {
125
+ display: string;
126
+ };
127
+ }[];
128
+ })[];
129
+ };
130
+ icon: import("@types/react").CElement<{}, import("@types/react").Component<{}, any, any>> | null;
131
+ category: string;
132
+ group: string;
133
+ snippets: ({
134
+ title: string;
135
+ schema: {
136
+ componentName: string;
137
+ props: {
138
+ dataSourceType: string;
139
+ mockData: string;
140
+ showFilter: boolean;
141
+ showStatusFilter: boolean;
142
+ showSearch: boolean;
143
+ showDatePicker: boolean;
144
+ showActions: boolean;
145
+ showBatchOperations: boolean;
146
+ showExport: boolean;
147
+ showPagination: boolean;
148
+ defaultPageSize: number;
149
+ };
150
+ };
151
+ } | {
152
+ title: string;
153
+ schema: {
154
+ componentName: string;
155
+ props: {
156
+ dataSourceType: string;
157
+ mockData: string;
158
+ showFilter: boolean;
159
+ showActions: boolean;
160
+ showBatchOperations: boolean;
161
+ showExport: boolean;
162
+ showPagination: boolean;
163
+ defaultPageSize: number;
164
+ showStatusFilter?: undefined;
165
+ showSearch?: undefined;
166
+ showDatePicker?: undefined;
167
+ };
168
+ };
169
+ })[];
170
+ } | {
171
+ componentName: string;
172
+ title: string;
173
+ docUrl: string;
174
+ screenshot: string;
175
+ npm: {
176
+ package: string;
177
+ version: string;
178
+ exportName: string;
179
+ destructuring: boolean;
180
+ };
181
+ props: ({
182
+ name: string;
183
+ propType: string;
184
+ description: string;
185
+ defaultValue: string;
186
+ setter?: undefined;
187
+ } | {
188
+ name: string;
189
+ propType: string;
190
+ description: string;
191
+ defaultValue: string;
192
+ setter: {
193
+ componentName: string;
194
+ props: {
195
+ options: {
196
+ label: string;
197
+ value: string;
198
+ }[];
199
+ };
200
+ };
201
+ } | {
202
+ name: string;
203
+ propType: string;
204
+ description: string;
205
+ defaultValue: boolean;
206
+ setter: string;
207
+ })[];
208
+ configure: {
209
+ supports: {
210
+ style: boolean;
211
+ events: {
212
+ name: string;
213
+ description: string;
214
+ }[];
215
+ };
216
+ props: ({
217
+ type: string;
218
+ title: string;
219
+ display: string;
220
+ items: ({
221
+ name: string;
222
+ title: string;
223
+ setter: {
224
+ componentName: string;
225
+ props: {
226
+ options: {
227
+ label: string;
228
+ value: string;
229
+ }[];
230
+ rows?: undefined;
231
+ placeholder?: undefined;
232
+ };
233
+ };
234
+ extraProps?: undefined;
235
+ } | {
236
+ name: string;
237
+ title: string;
238
+ setter: {
239
+ componentName: string;
240
+ props: {
241
+ rows: number;
242
+ placeholder: string;
243
+ options?: undefined;
244
+ };
245
+ };
246
+ extraProps: {
247
+ display: string;
248
+ };
249
+ })[];
250
+ } | {
251
+ type: string;
252
+ title: string;
253
+ display: string;
254
+ items: {
255
+ name: string;
256
+ title: string;
257
+ setter: string;
258
+ }[];
259
+ })[];
260
+ };
261
+ icon: import("@types/react").CElement<{}, import("@types/react").Component<{}, any, any>> | null;
262
+ category: string;
263
+ group: string;
264
+ snippets: {
265
+ title: string;
266
+ schema: {
267
+ componentName: string;
268
+ props: {
269
+ mode: string;
270
+ initialValues: string;
271
+ showBasicInfo: boolean;
272
+ showReceiverInfo: boolean;
273
+ showMoneyInfo: boolean;
274
+ showOrderItems: boolean;
275
+ showStatusInfo: boolean;
276
+ };
277
+ };
278
+ }[];
279
+ } | {
280
+ componentName: string;
281
+ title: string;
282
+ docUrl: string;
283
+ screenshot: string;
284
+ devMode: string;
285
+ npm: {
286
+ package: string;
287
+ version: string;
288
+ exportName: string;
289
+ main: string;
290
+ destructuring: boolean;
291
+ subName: string;
292
+ };
293
+ category: string;
294
+ group: string;
295
+ icon: import("@types/react").CElement<{}, import("@types/react").Component<{}, any, any>> | null;
296
+ props: ({
297
+ name: string;
298
+ propType: string;
299
+ description: string;
300
+ defaultValue: string;
301
+ } | {
302
+ name: string;
303
+ propType: string;
304
+ description: string;
305
+ defaultValue?: undefined;
306
+ } | {
307
+ name: string;
308
+ propType: string;
309
+ description: string;
310
+ defaultValue: boolean;
311
+ })[];
312
+ configure: {
313
+ supports: {
314
+ style: boolean;
315
+ className: boolean;
316
+ events: {
317
+ name: string;
318
+ description: string;
319
+ }[];
320
+ };
321
+ props: ({
322
+ type: string;
323
+ title: string;
324
+ display: string;
325
+ items: ({
326
+ name: string;
327
+ title: string;
328
+ setter: {
329
+ componentName: string;
330
+ props: {
331
+ options: {
332
+ label: string;
333
+ value: string;
334
+ }[];
335
+ rows?: undefined;
336
+ placeholder?: undefined;
337
+ setters?: undefined;
338
+ };
339
+ };
340
+ extraProps: {
341
+ display: string;
342
+ };
343
+ condition?: undefined;
344
+ } | {
345
+ name: string;
346
+ title: string;
347
+ setter: {
348
+ componentName: string;
349
+ props: {
350
+ rows: number;
351
+ placeholder: string;
352
+ options?: undefined;
353
+ setters?: undefined;
354
+ };
355
+ };
356
+ extraProps: {
357
+ display: string;
358
+ };
359
+ condition: (target: any) => boolean;
360
+ } | {
361
+ name: string;
362
+ title: string;
363
+ setter: {
364
+ componentName: string;
365
+ props: {
366
+ setters: string[];
367
+ options?: undefined;
368
+ rows?: undefined;
369
+ placeholder?: undefined;
370
+ };
371
+ };
372
+ extraProps: {
373
+ display: string;
374
+ };
375
+ condition: (target: any) => boolean;
376
+ })[];
377
+ } | {
378
+ type: string;
379
+ title: string;
380
+ display: string;
381
+ items: {
382
+ name: string;
383
+ title: string;
384
+ setter: string;
385
+ extraProps: {
386
+ display: string;
387
+ };
388
+ }[];
389
+ })[];
390
+ };
391
+ snippets: {
392
+ title: string;
393
+ screenshot: string;
394
+ schema: {
395
+ componentName: string;
396
+ props: {
397
+ dataSourceType: string;
398
+ mockData: string;
399
+ showCreateButton: boolean;
400
+ showFilter: boolean;
401
+ showStatistics: boolean;
402
+ };
403
+ };
404
+ }[];
405
+ } | {
406
+ componentName: string;
407
+ title: string;
408
+ docUrl: string;
409
+ screenshot: string;
410
+ npm: {
411
+ package: string;
412
+ version: string;
413
+ exportName: string;
414
+ destructuring: boolean;
415
+ };
416
+ props: ({
417
+ name: string;
418
+ propType: string;
419
+ description: string;
420
+ defaultValue: string;
421
+ } | {
422
+ name: string;
423
+ propType: string;
424
+ description: string;
425
+ defaultValue?: undefined;
426
+ } | {
427
+ name: string;
428
+ propType: string;
429
+ description: string;
430
+ defaultValue: boolean;
431
+ })[];
432
+ configure: {
433
+ supports: {
434
+ style: boolean;
435
+ events: {
436
+ name: string;
437
+ description: string;
438
+ }[];
439
+ };
440
+ props: ({
441
+ type: string;
442
+ title: string;
443
+ display: string;
444
+ items: ({
445
+ name: string;
446
+ title: string;
447
+ setter: {
448
+ componentName: string;
449
+ props: {
450
+ options: {
451
+ label: string;
452
+ value: string;
453
+ }[];
454
+ rows?: undefined;
455
+ placeholder?: undefined;
456
+ setters?: undefined;
457
+ };
458
+ };
459
+ extraProps: {
460
+ display: string;
461
+ };
462
+ condition?: undefined;
463
+ } | {
464
+ name: string;
465
+ title: string;
466
+ setter: {
467
+ componentName: string;
468
+ props: {
469
+ rows: number;
470
+ placeholder: string;
471
+ options?: undefined;
472
+ setters?: undefined;
473
+ };
474
+ };
475
+ extraProps: {
476
+ display: string;
477
+ };
478
+ condition: (target: any) => boolean;
479
+ } | {
480
+ name: string;
481
+ title: string;
482
+ setter: {
483
+ componentName: string;
484
+ props: {
485
+ setters: string[];
486
+ options?: undefined;
487
+ rows?: undefined;
488
+ placeholder?: undefined;
489
+ };
490
+ };
491
+ extraProps: {
492
+ display: string;
493
+ };
494
+ condition: (target: any) => boolean;
495
+ })[];
496
+ } | {
497
+ type: string;
498
+ title: string;
499
+ display: string;
500
+ items: {
501
+ name: string;
502
+ title: string;
503
+ setter: string;
504
+ extraProps: {
505
+ display: string;
506
+ };
507
+ }[];
508
+ } | {
509
+ type: string;
510
+ title: string;
511
+ display: string;
512
+ items: {
513
+ name: string;
514
+ title: string;
515
+ setter: {
516
+ componentName: string;
517
+ props: {
518
+ item: {
519
+ setters: {
520
+ componentName: string;
521
+ props: {
522
+ config: {
523
+ items: ({
524
+ name: string;
525
+ description: string;
526
+ setter: string;
527
+ } | {
528
+ name: string;
529
+ description: string;
530
+ setter: {
531
+ componentName: string;
532
+ props: {
533
+ options: {
534
+ label: string;
535
+ value: string;
536
+ }[];
537
+ };
538
+ };
539
+ })[];
540
+ };
541
+ };
542
+ }[];
543
+ };
544
+ };
545
+ };
546
+ extraProps: {
547
+ display: string;
548
+ };
549
+ }[];
550
+ })[];
551
+ };
552
+ icon: import("@types/react").CElement<{}, import("@types/react").Component<{}, any, any>> | null;
553
+ category: string;
554
+ group: string;
555
+ snippets: ({
556
+ title: string;
557
+ schema: {
558
+ componentName: string;
559
+ props: {
560
+ dataSourceType: string;
561
+ mockData: string;
562
+ showFilter: boolean;
563
+ showAction: boolean;
564
+ showSelection: boolean;
565
+ showOperation: boolean;
566
+ showStatus: boolean;
567
+ showPagination: boolean;
568
+ actionButtons: ({
569
+ text: string;
570
+ icon: string;
571
+ type: string;
572
+ onClick: string;
573
+ } | {
574
+ text: string;
575
+ icon: string;
576
+ type: string;
577
+ onClick?: undefined;
578
+ })[];
579
+ batchOperations: {
580
+ text: string;
581
+ value: string;
582
+ }[];
583
+ };
584
+ };
585
+ } | {
586
+ title: string;
587
+ schema: {
588
+ componentName: string;
589
+ props: {
590
+ dataSourceType: string;
591
+ mockData: string;
592
+ showFilter: boolean;
593
+ showAction: boolean;
594
+ showSelection: boolean;
595
+ showOperation: boolean;
596
+ showStatus: boolean;
597
+ showPagination: boolean;
598
+ actionButtons?: undefined;
599
+ batchOperations?: undefined;
600
+ };
601
+ };
602
+ })[];
603
+ })[];
604
+ };
605
+ export default _default;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ interface RestApiTesterProps {
3
+ value?: {
4
+ api: string;
5
+ method: 'GET' | 'POST';
6
+ };
7
+ onChange?: (value: any) => void;
8
+ multi?: boolean;
9
+ }
10
+ declare const RestApiTester: React.FC<RestApiTesterProps>;
11
+ export default RestApiTester;
@@ -0,0 +1,17 @@
1
+ export type CommonResult<T> = {
2
+ code: number;
3
+ message: string;
4
+ data: T;
5
+ };
6
+ export type CommonPage<T> = {
7
+ pageNum: number;
8
+ pageSize: number;
9
+ totalPage: number;
10
+ total: number;
11
+ list: T[];
12
+ };
13
+ export type PageParam = {
14
+ pageNum: number;
15
+ pageSize: number;
16
+ keyword?: string;
17
+ };