@htmlbricks/hb-paginate 0.64.0 → 0.65.1

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
@@ -113,6 +113,10 @@
113
113
  ],
114
114
  "type": "string"
115
115
  },
116
+ "sort_direction_disabled": {
117
+ "description": "Whether the sort direction is disabled",
118
+ "type": "boolean"
119
+ },
116
120
  "sort_disabled": {
117
121
  "description": "Whether the sort controls are disabled",
118
122
  "type": "boolean"
@@ -136,6 +140,10 @@
136
140
  },
137
141
  "type": "array"
138
142
  },
143
+ "sort_strict_direction": {
144
+ "description": "When true, sort_direction can only be \"asc\" or \"desc\" (no \"default\" state)",
145
+ "type": "boolean"
146
+ },
139
147
  "total": {
140
148
  "type": "number"
141
149
  }
@@ -235,7 +243,8 @@
235
243
  "pages": 4,
236
244
  "info": {
237
245
  "total": 47,
238
- "size": 10
246
+ "size": 10,
247
+ "sort_direction_disabled": true
239
248
  }
240
249
  }
241
250
  },
@@ -380,6 +389,35 @@
380
389
  }
381
390
  }
382
391
  },
392
+ {
393
+ "name": "withSortStrictDirection",
394
+ "description": "Sort direction only allows asc/desc (no default state)",
395
+ "data": {
396
+ "page": 0,
397
+ "pages": 4,
398
+ "info": {
399
+ "total": 100,
400
+ "size": 25,
401
+ "sort_fields": [
402
+ {
403
+ "value": "title",
404
+ "label": "Title"
405
+ },
406
+ {
407
+ "value": "date",
408
+ "label": "Date"
409
+ },
410
+ {
411
+ "value": "status",
412
+ "label": "Status"
413
+ }
414
+ ],
415
+ "sort_by": "title",
416
+ "sort_direction": "asc",
417
+ "sort_strict_direction": true
418
+ }
419
+ }
420
+ },
383
421
  {
384
422
  "name": "withSortAndPageSize",
385
423
  "description": "Pagination with sort and page size selector",
@@ -425,5 +463,5 @@
425
463
  "size": {},
426
464
  "iifePath": "main.iife.js",
427
465
  "repoName": "@htmlbricks/hb-paginate",
428
- "version": "0.64.0"
466
+ "version": "0.65.1"
429
467
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlbricks/hb-paginate",
3
- "version": "0.64.0",
3
+ "version": "0.65.1",
4
4
  "contributors": [],
5
5
  "description": "",
6
6
  "licenses": [
@@ -50,6 +50,10 @@
50
50
  ],
51
51
  "type": "string"
52
52
  },
53
+ "sort_direction_disabled": {
54
+ "description": "Whether the sort direction is disabled",
55
+ "type": "boolean"
56
+ },
53
57
  "sort_disabled": {
54
58
  "description": "Whether the sort controls are disabled",
55
59
  "type": "boolean"
@@ -73,6 +77,10 @@
73
77
  },
74
78
  "type": "array"
75
79
  },
80
+ "sort_strict_direction": {
81
+ "description": "When true, sort_direction can only be \"asc\" or \"desc\" (no \"default\" state)",
82
+ "type": "boolean"
83
+ },
76
84
  "total": {
77
85
  "type": "number"
78
86
  }
@@ -18,6 +18,10 @@ export type Component = {
18
18
  sort_direction?: "asc" | "desc" | "default";
19
19
  /** Whether the sort controls are disabled */
20
20
  sort_disabled?: boolean;
21
+ /** Whether the sort direction is disabled */
22
+ sort_direction_disabled?: boolean;
23
+ /** When true, sort_direction can only be "asc" or "desc" (no "default" state) */
24
+ sort_strict_direction?: boolean;
21
25
  /** Value for the "Default" sort option (emitted as sort_by when default is selected) */
22
26
  sort_default_value?: string;
23
27
  /** Custom label for the "Default" sort option (e.g. "Relevance") */