@htmlbricks/hb-table 0.62.30 → 0.62.31

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/manifest.json CHANGED
@@ -66,6 +66,18 @@
66
66
  ],
67
67
  "type": "object"
68
68
  },
69
+ "changePageSize": {
70
+ "additionalProperties": false,
71
+ "properties": {
72
+ "page_size": {
73
+ "type": "number"
74
+ }
75
+ },
76
+ "required": [
77
+ "page_size"
78
+ ],
79
+ "type": "object"
80
+ },
69
81
  "changeSort": {
70
82
  "additionalProperties": false,
71
83
  "properties": {
@@ -267,6 +279,7 @@
267
279
  },
268
280
  "required": [
269
281
  "pageChange",
282
+ "changePageSize",
270
283
  "removeFilter",
271
284
  "changeFilter",
272
285
  "tableCustomActionClick",
@@ -358,6 +371,18 @@
358
371
  "page": {
359
372
  "type": "number"
360
373
  },
374
+ "page_size_options": {
375
+ "description": "Comma-separated list of page size options for select mode (e.g. \"10,25,50,100\")",
376
+ "type": "string"
377
+ },
378
+ "page_size_type": {
379
+ "description": "Type of page size selector: \"number\" for free input, \"select\" for dropdown",
380
+ "enum": [
381
+ "number",
382
+ "select"
383
+ ],
384
+ "type": "string"
385
+ },
361
386
  "pages": {
362
387
  "type": "number"
363
388
  },
@@ -902,6 +927,24 @@
902
927
  },
903
928
  "removeFilter": {
904
929
  "action": "removeFilterEvent"
930
+ },
931
+ "page_size_type": {
932
+ "control": {
933
+ "type": "select"
934
+ },
935
+ "options": [
936
+ null,
937
+ "number",
938
+ "select"
939
+ ]
940
+ },
941
+ "page_size_options": {
942
+ "control": {
943
+ "type": "text"
944
+ }
945
+ },
946
+ "changePageSize": {
947
+ "action": "changePageSizeEvent"
905
948
  }
906
949
  },
907
950
  "styleSetup": {
@@ -2585,6 +2628,255 @@
2585
2628
  }
2586
2629
  ]
2587
2630
  }
2631
+ },
2632
+ {
2633
+ "name": "BasicTableWithPageSizeSelect",
2634
+ "description": "Table with page size selector (select dropdown)",
2635
+ "data": {
2636
+ "headers": [
2637
+ {
2638
+ "label": "title",
2639
+ "key": "title",
2640
+ "search": true
2641
+ },
2642
+ {
2643
+ "label": "description",
2644
+ "key": "description"
2645
+ },
2646
+ {
2647
+ "label": "nested",
2648
+ "key": "testnested.nested"
2649
+ },
2650
+ {
2651
+ "label": "data",
2652
+ "key": "time",
2653
+ "type": "datetime",
2654
+ "format": "DD MMMM YYYY"
2655
+ }
2656
+ ],
2657
+ "rows": [
2658
+ {
2659
+ "title": "bau",
2660
+ "videoSrc": "https://comapi.be-on.tv/v1/public/records/61043eedb50af916a6429fdc/video",
2661
+ "time": "2021-08-06T22:46:30.565Z",
2662
+ "_id": "bau",
2663
+ "status": "closed"
2664
+ },
2665
+ {
2666
+ "title": "bb1",
2667
+ "videoSrc": "https://comapi.be-on.tv/v1/public/records/61043eedb50af916a6429fdc/video",
2668
+ "time": "2021-08-06T22:46:31.565Z",
2669
+ "description": "ffff2",
2670
+ "_id": "bb1",
2671
+ "status": "closed"
2672
+ },
2673
+ {
2674
+ "title": "bb2",
2675
+ "time": "2021-08-02T22:46:32.565Z",
2676
+ "_id": "bb2",
2677
+ "status": "active"
2678
+ },
2679
+ {
2680
+ "title": "ss",
2681
+ "time": "2021-08-06T22:46:34.565Z",
2682
+ "description": "fffffff",
2683
+ "testnested": {
2684
+ "nested": "dddd"
2685
+ },
2686
+ "_id": "ss",
2687
+ "status": "active"
2688
+ },
2689
+ {
2690
+ "title": "bb4",
2691
+ "time": "2021-08-06T22:46:34.565Z",
2692
+ "_id": "bb4",
2693
+ "status": "active"
2694
+ },
2695
+ {
2696
+ "title": "aa5",
2697
+ "time": "2021-08-06T22:46:34.565Z",
2698
+ "_id": "aa5",
2699
+ "status": "active"
2700
+ },
2701
+ {
2702
+ "title": "bb6",
2703
+ "time": "2021-08-06T22:46:34.565Z",
2704
+ "_id": "bb6",
2705
+ "status": "active"
2706
+ },
2707
+ {
2708
+ "title": "bb7",
2709
+ "time": "2021-08-06T22:46:34.565Z",
2710
+ "_id": "bb7",
2711
+ "status": "active"
2712
+ },
2713
+ {
2714
+ "title": "bb8",
2715
+ "time": "2021-08-06T22:46:34.565Z",
2716
+ "_id": "bb8",
2717
+ "status": "active"
2718
+ },
2719
+ {
2720
+ "title": "bb9",
2721
+ "time": "2021-08-06T22:46:33.565Z",
2722
+ "_id": "bb9",
2723
+ "status": "active"
2724
+ },
2725
+ {
2726
+ "title": "bb10",
2727
+ "time": "2021-08-06T22:46:34.565Z",
2728
+ "_id": "bb10",
2729
+ "status": "active"
2730
+ },
2731
+ {
2732
+ "title": "bb11",
2733
+ "time": "2021-08-06T22:46:34.565Z",
2734
+ "_id": "bb11",
2735
+ "status": "active"
2736
+ },
2737
+ {
2738
+ "title": "bb12",
2739
+ "time": "2021-08-06T22:46:34.565Z",
2740
+ "videoSrc": "https://comapi.be-on.tv/v1/public/records/61043eedb50af916a6429fdc/video",
2741
+ "_id": "bb12",
2742
+ "status": "active"
2743
+ },
2744
+ {
2745
+ "title": "bb13",
2746
+ "time": "2021-08-07T22:46:39.565Z",
2747
+ "_id": "bb13",
2748
+ "status": "active"
2749
+ }
2750
+ ],
2751
+ "total": 14,
2752
+ "size": 5,
2753
+ "page_size_type": "select",
2754
+ "page_size_options": "5,10,25,50"
2755
+ }
2756
+ },
2757
+ {
2758
+ "name": "BasicTableWithPageSizeNumber",
2759
+ "description": "Table with page size selector (free number input)",
2760
+ "data": {
2761
+ "headers": [
2762
+ {
2763
+ "label": "title",
2764
+ "key": "title",
2765
+ "search": true
2766
+ },
2767
+ {
2768
+ "label": "description",
2769
+ "key": "description"
2770
+ },
2771
+ {
2772
+ "label": "nested",
2773
+ "key": "testnested.nested"
2774
+ },
2775
+ {
2776
+ "label": "data",
2777
+ "key": "time",
2778
+ "type": "datetime",
2779
+ "format": "DD MMMM YYYY"
2780
+ }
2781
+ ],
2782
+ "rows": [
2783
+ {
2784
+ "title": "bau",
2785
+ "videoSrc": "https://comapi.be-on.tv/v1/public/records/61043eedb50af916a6429fdc/video",
2786
+ "time": "2021-08-06T22:46:30.565Z",
2787
+ "_id": "bau",
2788
+ "status": "closed"
2789
+ },
2790
+ {
2791
+ "title": "bb1",
2792
+ "videoSrc": "https://comapi.be-on.tv/v1/public/records/61043eedb50af916a6429fdc/video",
2793
+ "time": "2021-08-06T22:46:31.565Z",
2794
+ "description": "ffff2",
2795
+ "_id": "bb1",
2796
+ "status": "closed"
2797
+ },
2798
+ {
2799
+ "title": "bb2",
2800
+ "time": "2021-08-02T22:46:32.565Z",
2801
+ "_id": "bb2",
2802
+ "status": "active"
2803
+ },
2804
+ {
2805
+ "title": "ss",
2806
+ "time": "2021-08-06T22:46:34.565Z",
2807
+ "description": "fffffff",
2808
+ "testnested": {
2809
+ "nested": "dddd"
2810
+ },
2811
+ "_id": "ss",
2812
+ "status": "active"
2813
+ },
2814
+ {
2815
+ "title": "bb4",
2816
+ "time": "2021-08-06T22:46:34.565Z",
2817
+ "_id": "bb4",
2818
+ "status": "active"
2819
+ },
2820
+ {
2821
+ "title": "aa5",
2822
+ "time": "2021-08-06T22:46:34.565Z",
2823
+ "_id": "aa5",
2824
+ "status": "active"
2825
+ },
2826
+ {
2827
+ "title": "bb6",
2828
+ "time": "2021-08-06T22:46:34.565Z",
2829
+ "_id": "bb6",
2830
+ "status": "active"
2831
+ },
2832
+ {
2833
+ "title": "bb7",
2834
+ "time": "2021-08-06T22:46:34.565Z",
2835
+ "_id": "bb7",
2836
+ "status": "active"
2837
+ },
2838
+ {
2839
+ "title": "bb8",
2840
+ "time": "2021-08-06T22:46:34.565Z",
2841
+ "_id": "bb8",
2842
+ "status": "active"
2843
+ },
2844
+ {
2845
+ "title": "bb9",
2846
+ "time": "2021-08-06T22:46:33.565Z",
2847
+ "_id": "bb9",
2848
+ "status": "active"
2849
+ },
2850
+ {
2851
+ "title": "bb10",
2852
+ "time": "2021-08-06T22:46:34.565Z",
2853
+ "_id": "bb10",
2854
+ "status": "active"
2855
+ },
2856
+ {
2857
+ "title": "bb11",
2858
+ "time": "2021-08-06T22:46:34.565Z",
2859
+ "_id": "bb11",
2860
+ "status": "active"
2861
+ },
2862
+ {
2863
+ "title": "bb12",
2864
+ "time": "2021-08-06T22:46:34.565Z",
2865
+ "videoSrc": "https://comapi.be-on.tv/v1/public/records/61043eedb50af916a6429fdc/video",
2866
+ "_id": "bb12",
2867
+ "status": "active"
2868
+ },
2869
+ {
2870
+ "title": "bb13",
2871
+ "time": "2021-08-07T22:46:39.565Z",
2872
+ "_id": "bb13",
2873
+ "status": "active"
2874
+ }
2875
+ ],
2876
+ "total": 14,
2877
+ "size": 5,
2878
+ "page_size_type": "number"
2879
+ }
2588
2880
  }
2589
2881
  ],
2590
2882
  "screenshots": [],
@@ -2605,5 +2897,5 @@
2605
2897
  "size": {},
2606
2898
  "iifePath": "main.iife.js",
2607
2899
  "repoName": "@htmlbricks/hb-table",
2608
- "version": "0.62.30"
2900
+ "version": "0.62.31"
2609
2901
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlbricks/hb-table",
3
- "version": "0.62.30",
3
+ "version": "0.62.31",
4
4
  "contributors": [],
5
5
  "description": "",
6
6
  "licenses": [
@@ -38,6 +38,18 @@
38
38
  "page": {
39
39
  "type": "number"
40
40
  },
41
+ "page_size_options": {
42
+ "description": "Comma-separated list of page size options for select mode (e.g. \"10,25,50,100\")",
43
+ "type": "string"
44
+ },
45
+ "page_size_type": {
46
+ "description": "Type of page size selector: \"number\" for free input, \"select\" for dropdown",
47
+ "enum": [
48
+ "number",
49
+ "select"
50
+ ],
51
+ "type": "string"
52
+ },
41
53
  "pages": {
42
54
  "type": "number"
43
55
  },
@@ -72,10 +72,15 @@ export type Component = {
72
72
  i18nlang?: string;
73
73
  total?: number;
74
74
  selected?: string;
75
+ /** Type of page size selector: "number" for free input, "select" for dropdown */
76
+ page_size_type?: "number" | "select";
77
+ /** Comma-separated list of page size options for select mode (e.g. "10,25,50,100") */
78
+ page_size_options?: string;
75
79
  };
76
80
 
77
81
  export type Events = {
78
82
  pageChange: { page: number; pages: number };
83
+ changePageSize: { page_size: number };
79
84
  removeFilter: { key: string };
80
85
  changeFilter: { filter: IFilter };
81
86
  tableCustomActionClick: { itemId: string; action: string };
@@ -64,6 +64,18 @@
64
64
  ],
65
65
  "type": "object"
66
66
  },
67
+ "changePageSize": {
68
+ "additionalProperties": false,
69
+ "properties": {
70
+ "page_size": {
71
+ "type": "number"
72
+ }
73
+ },
74
+ "required": [
75
+ "page_size"
76
+ ],
77
+ "type": "object"
78
+ },
67
79
  "changeSort": {
68
80
  "additionalProperties": false,
69
81
  "properties": {
@@ -265,6 +277,7 @@
265
277
  },
266
278
  "required": [
267
279
  "pageChange",
280
+ "changePageSize",
268
281
  "removeFilter",
269
282
  "changeFilter",
270
283
  "tableCustomActionClick",