@htmlbricks/hb-paginate 0.62.30 → 0.62.33

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
@@ -7,6 +7,34 @@
7
7
  "Events": {
8
8
  "additionalProperties": false,
9
9
  "properties": {
10
+ "changePageSize": {
11
+ "additionalProperties": false,
12
+ "properties": {
13
+ "page_size": {
14
+ "type": "number"
15
+ }
16
+ },
17
+ "required": [
18
+ "page_size"
19
+ ],
20
+ "type": "object"
21
+ },
22
+ "changeSort": {
23
+ "additionalProperties": false,
24
+ "properties": {
25
+ "sort_by": {
26
+ "type": "string"
27
+ },
28
+ "sort_direction": {
29
+ "type": "string"
30
+ }
31
+ },
32
+ "required": [
33
+ "sort_by",
34
+ "sort_direction"
35
+ ],
36
+ "type": "object"
37
+ },
10
38
  "pageChange": {
11
39
  "additionalProperties": false,
12
40
  "properties": {
@@ -25,7 +53,9 @@
25
53
  }
26
54
  },
27
55
  "required": [
28
- "pageChange"
56
+ "pageChange",
57
+ "changePageSize",
58
+ "changeSort"
29
59
  ],
30
60
  "type": "object"
31
61
  }
@@ -47,9 +77,57 @@
47
77
  "info": {
48
78
  "additionalProperties": false,
49
79
  "properties": {
80
+ "page_size_options": {
81
+ "description": "Comma-separated list of page size options for select mode (e.g. \"10,25,50,100\")",
82
+ "type": "string"
83
+ },
84
+ "page_size_type": {
85
+ "description": "Type of page size selector: \"number\" for free input, \"select\" for dropdown",
86
+ "enum": [
87
+ "number",
88
+ "select"
89
+ ],
90
+ "type": "string"
91
+ },
50
92
  "size": {
51
93
  "type": "number"
52
94
  },
95
+ "sort_by": {
96
+ "description": "Currently selected sort field",
97
+ "type": "string"
98
+ },
99
+ "sort_direction": {
100
+ "description": "Current sort direction",
101
+ "enum": [
102
+ "asc",
103
+ "desc",
104
+ "default"
105
+ ],
106
+ "type": "string"
107
+ },
108
+ "sort_disabled": {
109
+ "description": "Whether the sort controls are disabled",
110
+ "type": "boolean"
111
+ },
112
+ "sort_fields": {
113
+ "description": "Available sort fields. At least one must be present to show the sort indicator",
114
+ "items": {
115
+ "additionalProperties": false,
116
+ "properties": {
117
+ "label": {
118
+ "type": "string"
119
+ },
120
+ "value": {
121
+ "type": "string"
122
+ }
123
+ },
124
+ "required": [
125
+ "value"
126
+ ],
127
+ "type": "object"
128
+ },
129
+ "type": "array"
130
+ },
53
131
  "total": {
54
132
  "type": "number"
55
133
  }
@@ -107,6 +185,12 @@
107
185
  },
108
186
  "pageChange": {
109
187
  "action": "pageChange"
188
+ },
189
+ "changePageSize": {
190
+ "action": "changePageSize"
191
+ },
192
+ "changeSort": {
193
+ "action": "changeSort"
110
194
  }
111
195
  },
112
196
  "styleSetup": {
@@ -150,6 +234,87 @@
150
234
  "size": 10
151
235
  }
152
236
  }
237
+ },
238
+ {
239
+ "name": "withPageSizeNumber",
240
+ "description": "Pagination with a free number input for page size",
241
+ "data": {
242
+ "page": 0,
243
+ "pages": 10,
244
+ "info": {
245
+ "total": 100,
246
+ "size": 10,
247
+ "page_size_type": "number"
248
+ }
249
+ }
250
+ },
251
+ {
252
+ "name": "withPageSizeSelect",
253
+ "description": "Pagination with a select dropdown for page size",
254
+ "data": {
255
+ "page": 0,
256
+ "pages": 4,
257
+ "info": {
258
+ "total": 100,
259
+ "size": 25,
260
+ "page_size_type": "select",
261
+ "page_size_options": "10,25,50,100"
262
+ }
263
+ }
264
+ },
265
+ {
266
+ "name": "withSort",
267
+ "description": "Pagination with sort indicator",
268
+ "data": {
269
+ "page": 0,
270
+ "pages": 4,
271
+ "info": {
272
+ "total": 100,
273
+ "size": 25,
274
+ "sort_fields": [
275
+ {
276
+ "value": "title",
277
+ "label": "Title"
278
+ },
279
+ {
280
+ "value": "date",
281
+ "label": "Date"
282
+ },
283
+ {
284
+ "value": "status",
285
+ "label": "Status"
286
+ }
287
+ ],
288
+ "sort_by": "title",
289
+ "sort_direction": "asc"
290
+ }
291
+ }
292
+ },
293
+ {
294
+ "name": "withSortAndPageSize",
295
+ "description": "Pagination with sort and page size selector",
296
+ "data": {
297
+ "page": 0,
298
+ "pages": 4,
299
+ "info": {
300
+ "total": 100,
301
+ "size": 25,
302
+ "page_size_type": "select",
303
+ "page_size_options": "10,25,50,100",
304
+ "sort_fields": [
305
+ {
306
+ "value": "title",
307
+ "label": "Title"
308
+ },
309
+ {
310
+ "value": "date",
311
+ "label": "Date"
312
+ }
313
+ ],
314
+ "sort_by": "title",
315
+ "sort_direction": "asc"
316
+ }
317
+ }
153
318
  }
154
319
  ],
155
320
  "screenshots": [],
@@ -170,5 +335,5 @@
170
335
  "size": {},
171
336
  "iifePath": "main.iife.js",
172
337
  "repoName": "@htmlbricks/hb-paginate",
173
- "version": "0.62.30"
338
+ "version": "0.62.33"
174
339
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@htmlbricks/hb-paginate",
3
- "version": "0.62.30",
3
+ "version": "0.62.33",
4
4
  "contributors": [],
5
5
  "description": "",
6
6
  "licenses": [
@@ -14,9 +14,57 @@
14
14
  "info": {
15
15
  "additionalProperties": false,
16
16
  "properties": {
17
+ "page_size_options": {
18
+ "description": "Comma-separated list of page size options for select mode (e.g. \"10,25,50,100\")",
19
+ "type": "string"
20
+ },
21
+ "page_size_type": {
22
+ "description": "Type of page size selector: \"number\" for free input, \"select\" for dropdown",
23
+ "enum": [
24
+ "number",
25
+ "select"
26
+ ],
27
+ "type": "string"
28
+ },
17
29
  "size": {
18
30
  "type": "number"
19
31
  },
32
+ "sort_by": {
33
+ "description": "Currently selected sort field",
34
+ "type": "string"
35
+ },
36
+ "sort_direction": {
37
+ "description": "Current sort direction",
38
+ "enum": [
39
+ "asc",
40
+ "desc",
41
+ "default"
42
+ ],
43
+ "type": "string"
44
+ },
45
+ "sort_disabled": {
46
+ "description": "Whether the sort controls are disabled",
47
+ "type": "boolean"
48
+ },
49
+ "sort_fields": {
50
+ "description": "Available sort fields. At least one must be present to show the sort indicator",
51
+ "items": {
52
+ "additionalProperties": false,
53
+ "properties": {
54
+ "label": {
55
+ "type": "string"
56
+ },
57
+ "value": {
58
+ "type": "string"
59
+ }
60
+ },
61
+ "required": [
62
+ "value"
63
+ ],
64
+ "type": "object"
65
+ },
66
+ "type": "array"
67
+ },
20
68
  "total": {
21
69
  "type": "number"
22
70
  }
@@ -6,11 +6,24 @@ export type Component = {
6
6
  info?: {
7
7
  total: number;
8
8
  size: number;
9
- }
9
+ /** Type of page size selector: "number" for free input, "select" for dropdown */
10
+ page_size_type?: "number" | "select";
11
+ /** Comma-separated list of page size options for select mode (e.g. "10,25,50,100") */
12
+ page_size_options?: string;
13
+ /** Available sort fields. At least one must be present to show the sort indicator */
14
+ sort_fields?: { value: string; label?: string }[];
15
+ /** Currently selected sort field */
16
+ sort_by?: string;
17
+ /** Current sort direction */
18
+ sort_direction?: "asc" | "desc" | "default";
19
+ /** Whether the sort controls are disabled */
20
+ sort_disabled?: boolean;
21
+ };
10
22
  i18nlang?: string;
11
-
12
23
  };
13
24
 
14
25
  export type Events = {
15
26
  pageChange: { page: number; pages: number };
27
+ changePageSize: { page_size: number };
28
+ changeSort: { sort_by: string; sort_direction: string };
16
29
  };
@@ -5,6 +5,34 @@
5
5
  "Events": {
6
6
  "additionalProperties": false,
7
7
  "properties": {
8
+ "changePageSize": {
9
+ "additionalProperties": false,
10
+ "properties": {
11
+ "page_size": {
12
+ "type": "number"
13
+ }
14
+ },
15
+ "required": [
16
+ "page_size"
17
+ ],
18
+ "type": "object"
19
+ },
20
+ "changeSort": {
21
+ "additionalProperties": false,
22
+ "properties": {
23
+ "sort_by": {
24
+ "type": "string"
25
+ },
26
+ "sort_direction": {
27
+ "type": "string"
28
+ }
29
+ },
30
+ "required": [
31
+ "sort_by",
32
+ "sort_direction"
33
+ ],
34
+ "type": "object"
35
+ },
8
36
  "pageChange": {
9
37
  "additionalProperties": false,
10
38
  "properties": {
@@ -23,7 +51,9 @@
23
51
  }
24
52
  },
25
53
  "required": [
26
- "pageChange"
54
+ "pageChange",
55
+ "changePageSize",
56
+ "changeSort"
27
57
  ],
28
58
  "type": "object"
29
59
  }