@htmlbricks/hb-table 0.62.31 → 0.64.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.
package/manifest.json CHANGED
@@ -347,6 +347,10 @@
347
347
  "add_item": {
348
348
  "type": "boolean"
349
349
  },
350
+ "disable_paginate_sort": {
351
+ "description": "When true, hides the sort select and direction button from the pagination bar",
352
+ "type": "boolean"
353
+ },
350
354
  "disablepagination": {
351
355
  "type": "boolean"
352
356
  },
@@ -405,6 +409,14 @@
405
409
  "size": {
406
410
  "type": "number"
407
411
  },
412
+ "sort_default": {
413
+ "description": "Default sort field value — if it matches a sortable column, that column is pre-selected with \"default\" direction (e.g. \"title\")",
414
+ "type": "string"
415
+ },
416
+ "sort_default_label": {
417
+ "description": "Custom label for the \"Default\" sort option in the pagination bar (e.g. \"Relevance\")",
418
+ "type": "string"
419
+ },
408
420
  "style": {
409
421
  "type": "string"
410
422
  },
@@ -943,6 +955,21 @@
943
955
  "type": "text"
944
956
  }
945
957
  },
958
+ "sort_default": {
959
+ "control": {
960
+ "type": "text"
961
+ }
962
+ },
963
+ "sort_default_label": {
964
+ "control": {
965
+ "type": "text"
966
+ }
967
+ },
968
+ "disable_paginate_sort": {
969
+ "control": {
970
+ "type": "boolean"
971
+ }
972
+ },
946
973
  "changePageSize": {
947
974
  "action": "changePageSizeEvent"
948
975
  }
@@ -2877,6 +2904,509 @@
2877
2904
  "size": 5,
2878
2905
  "page_size_type": "number"
2879
2906
  }
2907
+ },
2908
+ {
2909
+ "name": "BasicTableWithSortAndPageSize",
2910
+ "description": "Table with sort indicator and page size selector in pagination",
2911
+ "data": {
2912
+ "headers": [
2913
+ {
2914
+ "label": "title",
2915
+ "key": "title",
2916
+ "search": true
2917
+ },
2918
+ {
2919
+ "label": "description",
2920
+ "key": "description"
2921
+ },
2922
+ {
2923
+ "label": "nested",
2924
+ "key": "testnested.nested"
2925
+ },
2926
+ {
2927
+ "label": "data",
2928
+ "key": "time",
2929
+ "type": "datetime",
2930
+ "format": "DD MMMM YYYY"
2931
+ }
2932
+ ],
2933
+ "rows": [
2934
+ {
2935
+ "title": "bau",
2936
+ "videoSrc": "https://comapi.be-on.tv/v1/public/records/61043eedb50af916a6429fdc/video",
2937
+ "time": "2021-08-06T22:46:30.565Z",
2938
+ "_id": "bau",
2939
+ "status": "closed"
2940
+ },
2941
+ {
2942
+ "title": "bb1",
2943
+ "videoSrc": "https://comapi.be-on.tv/v1/public/records/61043eedb50af916a6429fdc/video",
2944
+ "time": "2021-08-06T22:46:31.565Z",
2945
+ "description": "ffff2",
2946
+ "_id": "bb1",
2947
+ "status": "closed"
2948
+ },
2949
+ {
2950
+ "title": "bb2",
2951
+ "time": "2021-08-02T22:46:32.565Z",
2952
+ "_id": "bb2",
2953
+ "status": "active"
2954
+ },
2955
+ {
2956
+ "title": "ss",
2957
+ "time": "2021-08-06T22:46:34.565Z",
2958
+ "description": "fffffff",
2959
+ "testnested": {
2960
+ "nested": "dddd"
2961
+ },
2962
+ "_id": "ss",
2963
+ "status": "active"
2964
+ },
2965
+ {
2966
+ "title": "bb4",
2967
+ "time": "2021-08-06T22:46:34.565Z",
2968
+ "_id": "bb4",
2969
+ "status": "active"
2970
+ },
2971
+ {
2972
+ "title": "aa5",
2973
+ "time": "2021-08-06T22:46:34.565Z",
2974
+ "_id": "aa5",
2975
+ "status": "active"
2976
+ },
2977
+ {
2978
+ "title": "bb6",
2979
+ "time": "2021-08-06T22:46:34.565Z",
2980
+ "_id": "bb6",
2981
+ "status": "active"
2982
+ },
2983
+ {
2984
+ "title": "bb7",
2985
+ "time": "2021-08-06T22:46:34.565Z",
2986
+ "_id": "bb7",
2987
+ "status": "active"
2988
+ },
2989
+ {
2990
+ "title": "bb8",
2991
+ "time": "2021-08-06T22:46:34.565Z",
2992
+ "_id": "bb8",
2993
+ "status": "active"
2994
+ },
2995
+ {
2996
+ "title": "bb9",
2997
+ "time": "2021-08-06T22:46:33.565Z",
2998
+ "_id": "bb9",
2999
+ "status": "active"
3000
+ },
3001
+ {
3002
+ "title": "bb10",
3003
+ "time": "2021-08-06T22:46:34.565Z",
3004
+ "_id": "bb10",
3005
+ "status": "active"
3006
+ },
3007
+ {
3008
+ "title": "bb11",
3009
+ "time": "2021-08-06T22:46:34.565Z",
3010
+ "_id": "bb11",
3011
+ "status": "active"
3012
+ },
3013
+ {
3014
+ "title": "bb12",
3015
+ "time": "2021-08-06T22:46:34.565Z",
3016
+ "videoSrc": "https://comapi.be-on.tv/v1/public/records/61043eedb50af916a6429fdc/video",
3017
+ "_id": "bb12",
3018
+ "status": "active"
3019
+ },
3020
+ {
3021
+ "title": "bb13",
3022
+ "time": "2021-08-07T22:46:39.565Z",
3023
+ "_id": "bb13",
3024
+ "status": "active"
3025
+ }
3026
+ ],
3027
+ "total": 14,
3028
+ "size": 5,
3029
+ "page_size_type": "select",
3030
+ "page_size_options": "5,10,25"
3031
+ }
3032
+ },
3033
+ {
3034
+ "name": "BasicTableWithSortDefault",
3035
+ "description": "Default sort set to 'title' — Title column is pre-selected in pagination sort",
3036
+ "data": {
3037
+ "headers": [
3038
+ {
3039
+ "label": "title",
3040
+ "key": "title",
3041
+ "search": true
3042
+ },
3043
+ {
3044
+ "label": "description",
3045
+ "key": "description"
3046
+ },
3047
+ {
3048
+ "label": "nested",
3049
+ "key": "testnested.nested"
3050
+ },
3051
+ {
3052
+ "label": "data",
3053
+ "key": "time",
3054
+ "type": "datetime",
3055
+ "format": "DD MMMM YYYY"
3056
+ }
3057
+ ],
3058
+ "rows": [
3059
+ {
3060
+ "title": "bau",
3061
+ "videoSrc": "https://comapi.be-on.tv/v1/public/records/61043eedb50af916a6429fdc/video",
3062
+ "time": "2021-08-06T22:46:30.565Z",
3063
+ "_id": "bau",
3064
+ "status": "closed"
3065
+ },
3066
+ {
3067
+ "title": "bb1",
3068
+ "videoSrc": "https://comapi.be-on.tv/v1/public/records/61043eedb50af916a6429fdc/video",
3069
+ "time": "2021-08-06T22:46:31.565Z",
3070
+ "description": "ffff2",
3071
+ "_id": "bb1",
3072
+ "status": "closed"
3073
+ },
3074
+ {
3075
+ "title": "bb2",
3076
+ "time": "2021-08-02T22:46:32.565Z",
3077
+ "_id": "bb2",
3078
+ "status": "active"
3079
+ },
3080
+ {
3081
+ "title": "ss",
3082
+ "time": "2021-08-06T22:46:34.565Z",
3083
+ "description": "fffffff",
3084
+ "testnested": {
3085
+ "nested": "dddd"
3086
+ },
3087
+ "_id": "ss",
3088
+ "status": "active"
3089
+ },
3090
+ {
3091
+ "title": "bb4",
3092
+ "time": "2021-08-06T22:46:34.565Z",
3093
+ "_id": "bb4",
3094
+ "status": "active"
3095
+ },
3096
+ {
3097
+ "title": "aa5",
3098
+ "time": "2021-08-06T22:46:34.565Z",
3099
+ "_id": "aa5",
3100
+ "status": "active"
3101
+ },
3102
+ {
3103
+ "title": "bb6",
3104
+ "time": "2021-08-06T22:46:34.565Z",
3105
+ "_id": "bb6",
3106
+ "status": "active"
3107
+ },
3108
+ {
3109
+ "title": "bb7",
3110
+ "time": "2021-08-06T22:46:34.565Z",
3111
+ "_id": "bb7",
3112
+ "status": "active"
3113
+ },
3114
+ {
3115
+ "title": "bb8",
3116
+ "time": "2021-08-06T22:46:34.565Z",
3117
+ "_id": "bb8",
3118
+ "status": "active"
3119
+ },
3120
+ {
3121
+ "title": "bb9",
3122
+ "time": "2021-08-06T22:46:33.565Z",
3123
+ "_id": "bb9",
3124
+ "status": "active"
3125
+ },
3126
+ {
3127
+ "title": "bb10",
3128
+ "time": "2021-08-06T22:46:34.565Z",
3129
+ "_id": "bb10",
3130
+ "status": "active"
3131
+ },
3132
+ {
3133
+ "title": "bb11",
3134
+ "time": "2021-08-06T22:46:34.565Z",
3135
+ "_id": "bb11",
3136
+ "status": "active"
3137
+ },
3138
+ {
3139
+ "title": "bb12",
3140
+ "time": "2021-08-06T22:46:34.565Z",
3141
+ "videoSrc": "https://comapi.be-on.tv/v1/public/records/61043eedb50af916a6429fdc/video",
3142
+ "_id": "bb12",
3143
+ "status": "active"
3144
+ },
3145
+ {
3146
+ "title": "bb13",
3147
+ "time": "2021-08-07T22:46:39.565Z",
3148
+ "_id": "bb13",
3149
+ "status": "active"
3150
+ }
3151
+ ],
3152
+ "total": 14,
3153
+ "size": 5,
3154
+ "sort_default": "title",
3155
+ "page_size_type": "select",
3156
+ "page_size_options": "5,10,25"
3157
+ }
3158
+ },
3159
+ {
3160
+ "name": "BasicTableWithSortDefaultLabel",
3161
+ "description": "Custom label for the default sort option (shows 'Relevance' instead of 'Default')",
3162
+ "data": {
3163
+ "headers": [
3164
+ {
3165
+ "label": "title",
3166
+ "key": "title",
3167
+ "search": true
3168
+ },
3169
+ {
3170
+ "label": "description",
3171
+ "key": "description"
3172
+ },
3173
+ {
3174
+ "label": "nested",
3175
+ "key": "testnested.nested"
3176
+ },
3177
+ {
3178
+ "label": "data",
3179
+ "key": "time",
3180
+ "type": "datetime",
3181
+ "format": "DD MMMM YYYY"
3182
+ }
3183
+ ],
3184
+ "rows": [
3185
+ {
3186
+ "title": "bau",
3187
+ "videoSrc": "https://comapi.be-on.tv/v1/public/records/61043eedb50af916a6429fdc/video",
3188
+ "time": "2021-08-06T22:46:30.565Z",
3189
+ "_id": "bau",
3190
+ "status": "closed"
3191
+ },
3192
+ {
3193
+ "title": "bb1",
3194
+ "videoSrc": "https://comapi.be-on.tv/v1/public/records/61043eedb50af916a6429fdc/video",
3195
+ "time": "2021-08-06T22:46:31.565Z",
3196
+ "description": "ffff2",
3197
+ "_id": "bb1",
3198
+ "status": "closed"
3199
+ },
3200
+ {
3201
+ "title": "bb2",
3202
+ "time": "2021-08-02T22:46:32.565Z",
3203
+ "_id": "bb2",
3204
+ "status": "active"
3205
+ },
3206
+ {
3207
+ "title": "ss",
3208
+ "time": "2021-08-06T22:46:34.565Z",
3209
+ "description": "fffffff",
3210
+ "testnested": {
3211
+ "nested": "dddd"
3212
+ },
3213
+ "_id": "ss",
3214
+ "status": "active"
3215
+ },
3216
+ {
3217
+ "title": "bb4",
3218
+ "time": "2021-08-06T22:46:34.565Z",
3219
+ "_id": "bb4",
3220
+ "status": "active"
3221
+ },
3222
+ {
3223
+ "title": "aa5",
3224
+ "time": "2021-08-06T22:46:34.565Z",
3225
+ "_id": "aa5",
3226
+ "status": "active"
3227
+ },
3228
+ {
3229
+ "title": "bb6",
3230
+ "time": "2021-08-06T22:46:34.565Z",
3231
+ "_id": "bb6",
3232
+ "status": "active"
3233
+ },
3234
+ {
3235
+ "title": "bb7",
3236
+ "time": "2021-08-06T22:46:34.565Z",
3237
+ "_id": "bb7",
3238
+ "status": "active"
3239
+ },
3240
+ {
3241
+ "title": "bb8",
3242
+ "time": "2021-08-06T22:46:34.565Z",
3243
+ "_id": "bb8",
3244
+ "status": "active"
3245
+ },
3246
+ {
3247
+ "title": "bb9",
3248
+ "time": "2021-08-06T22:46:33.565Z",
3249
+ "_id": "bb9",
3250
+ "status": "active"
3251
+ },
3252
+ {
3253
+ "title": "bb10",
3254
+ "time": "2021-08-06T22:46:34.565Z",
3255
+ "_id": "bb10",
3256
+ "status": "active"
3257
+ },
3258
+ {
3259
+ "title": "bb11",
3260
+ "time": "2021-08-06T22:46:34.565Z",
3261
+ "_id": "bb11",
3262
+ "status": "active"
3263
+ },
3264
+ {
3265
+ "title": "bb12",
3266
+ "time": "2021-08-06T22:46:34.565Z",
3267
+ "videoSrc": "https://comapi.be-on.tv/v1/public/records/61043eedb50af916a6429fdc/video",
3268
+ "_id": "bb12",
3269
+ "status": "active"
3270
+ },
3271
+ {
3272
+ "title": "bb13",
3273
+ "time": "2021-08-07T22:46:39.565Z",
3274
+ "_id": "bb13",
3275
+ "status": "active"
3276
+ }
3277
+ ],
3278
+ "total": 14,
3279
+ "size": 5,
3280
+ "sort_default_label": "Relevance",
3281
+ "page_size_type": "select",
3282
+ "page_size_options": "5,10,25"
3283
+ }
3284
+ },
3285
+ {
3286
+ "name": "BasicTableWithPaginateSortDisabled",
3287
+ "description": "Table with sort on columns but sort controls hidden from pagination bar",
3288
+ "data": {
3289
+ "headers": [
3290
+ {
3291
+ "label": "title",
3292
+ "key": "title",
3293
+ "search": true
3294
+ },
3295
+ {
3296
+ "label": "description",
3297
+ "key": "description"
3298
+ },
3299
+ {
3300
+ "label": "nested",
3301
+ "key": "testnested.nested"
3302
+ },
3303
+ {
3304
+ "label": "data",
3305
+ "key": "time",
3306
+ "type": "datetime",
3307
+ "format": "DD MMMM YYYY"
3308
+ }
3309
+ ],
3310
+ "rows": [
3311
+ {
3312
+ "title": "bau",
3313
+ "videoSrc": "https://comapi.be-on.tv/v1/public/records/61043eedb50af916a6429fdc/video",
3314
+ "time": "2021-08-06T22:46:30.565Z",
3315
+ "_id": "bau",
3316
+ "status": "closed"
3317
+ },
3318
+ {
3319
+ "title": "bb1",
3320
+ "videoSrc": "https://comapi.be-on.tv/v1/public/records/61043eedb50af916a6429fdc/video",
3321
+ "time": "2021-08-06T22:46:31.565Z",
3322
+ "description": "ffff2",
3323
+ "_id": "bb1",
3324
+ "status": "closed"
3325
+ },
3326
+ {
3327
+ "title": "bb2",
3328
+ "time": "2021-08-02T22:46:32.565Z",
3329
+ "_id": "bb2",
3330
+ "status": "active"
3331
+ },
3332
+ {
3333
+ "title": "ss",
3334
+ "time": "2021-08-06T22:46:34.565Z",
3335
+ "description": "fffffff",
3336
+ "testnested": {
3337
+ "nested": "dddd"
3338
+ },
3339
+ "_id": "ss",
3340
+ "status": "active"
3341
+ },
3342
+ {
3343
+ "title": "bb4",
3344
+ "time": "2021-08-06T22:46:34.565Z",
3345
+ "_id": "bb4",
3346
+ "status": "active"
3347
+ },
3348
+ {
3349
+ "title": "aa5",
3350
+ "time": "2021-08-06T22:46:34.565Z",
3351
+ "_id": "aa5",
3352
+ "status": "active"
3353
+ },
3354
+ {
3355
+ "title": "bb6",
3356
+ "time": "2021-08-06T22:46:34.565Z",
3357
+ "_id": "bb6",
3358
+ "status": "active"
3359
+ },
3360
+ {
3361
+ "title": "bb7",
3362
+ "time": "2021-08-06T22:46:34.565Z",
3363
+ "_id": "bb7",
3364
+ "status": "active"
3365
+ },
3366
+ {
3367
+ "title": "bb8",
3368
+ "time": "2021-08-06T22:46:34.565Z",
3369
+ "_id": "bb8",
3370
+ "status": "active"
3371
+ },
3372
+ {
3373
+ "title": "bb9",
3374
+ "time": "2021-08-06T22:46:33.565Z",
3375
+ "_id": "bb9",
3376
+ "status": "active"
3377
+ },
3378
+ {
3379
+ "title": "bb10",
3380
+ "time": "2021-08-06T22:46:34.565Z",
3381
+ "_id": "bb10",
3382
+ "status": "active"
3383
+ },
3384
+ {
3385
+ "title": "bb11",
3386
+ "time": "2021-08-06T22:46:34.565Z",
3387
+ "_id": "bb11",
3388
+ "status": "active"
3389
+ },
3390
+ {
3391
+ "title": "bb12",
3392
+ "time": "2021-08-06T22:46:34.565Z",
3393
+ "videoSrc": "https://comapi.be-on.tv/v1/public/records/61043eedb50af916a6429fdc/video",
3394
+ "_id": "bb12",
3395
+ "status": "active"
3396
+ },
3397
+ {
3398
+ "title": "bb13",
3399
+ "time": "2021-08-07T22:46:39.565Z",
3400
+ "_id": "bb13",
3401
+ "status": "active"
3402
+ }
3403
+ ],
3404
+ "total": 14,
3405
+ "size": 5,
3406
+ "disable_paginate_sort": true,
3407
+ "page_size_type": "select",
3408
+ "page_size_options": "5,10,25"
3409
+ }
2880
3410
  }
2881
3411
  ],
2882
3412
  "screenshots": [],
@@ -2897,5 +3427,5 @@
2897
3427
  "size": {},
2898
3428
  "iifePath": "main.iife.js",
2899
3429
  "repoName": "@htmlbricks/hb-table",
2900
- "version": "0.62.31"
3430
+ "version": "0.64.0"
2901
3431
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlbricks/hb-table",
3
- "version": "0.62.31",
3
+ "version": "0.64.0",
4
4
  "contributors": [],
5
5
  "description": "",
6
6
  "licenses": [
@@ -14,6 +14,10 @@
14
14
  "add_item": {
15
15
  "type": "boolean"
16
16
  },
17
+ "disable_paginate_sort": {
18
+ "description": "When true, hides the sort select and direction button from the pagination bar",
19
+ "type": "boolean"
20
+ },
17
21
  "disablepagination": {
18
22
  "type": "boolean"
19
23
  },
@@ -72,6 +76,14 @@
72
76
  "size": {
73
77
  "type": "number"
74
78
  },
79
+ "sort_default": {
80
+ "description": "Default sort field value — if it matches a sortable column, that column is pre-selected with \"default\" direction (e.g. \"title\")",
81
+ "type": "string"
82
+ },
83
+ "sort_default_label": {
84
+ "description": "Custom label for the \"Default\" sort option in the pagination bar (e.g. \"Relevance\")",
85
+ "type": "string"
86
+ },
75
87
  "style": {
76
88
  "type": "string"
77
89
  },
@@ -76,6 +76,12 @@ export type Component = {
76
76
  page_size_type?: "number" | "select";
77
77
  /** Comma-separated list of page size options for select mode (e.g. "10,25,50,100") */
78
78
  page_size_options?: string;
79
+ /** Default sort field value — if it matches a sortable column, that column is pre-selected with "default" direction (e.g. "title") */
80
+ sort_default?: string;
81
+ /** Custom label for the "Default" sort option in the pagination bar (e.g. "Relevance") */
82
+ sort_default_label?: string;
83
+ /** When true, hides the sort select and direction button from the pagination bar */
84
+ disable_paginate_sort?: boolean;
79
85
  };
80
86
 
81
87
  export type Events = {