@fewangsit/wangsvue-fats 1.0.0-alpha.52 → 1.0.0-alpha.54

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.
@@ -46,6 +46,7 @@ export { default as Loading } from './loading/Loading.vue';
46
46
  export { default as Menu } from './menu/Menu.vue';
47
47
  export { default as MultiSelect } from './multiselect/MultiSelect.vue';
48
48
  export { default as OverlayPanel } from './overlaypanel/OverlayPanel.vue';
49
+ export { default as Paginator } from './paginator/Paginator.vue';
49
50
  export { default as TabMenu } from './tabmenu/TabMenu.vue';
50
51
  export { default as Textarea } from './textarea/Textarea.vue';
51
52
  export { default as Timeline } from './timeline/Timeline.vue';
@@ -0,0 +1,285 @@
1
+ /**
2
+ *
3
+ * Paginator is a generic component to display content in paged format.
4
+ *
5
+ * [Live Demo](https://TSVue v2.org/paginator)
6
+ *
7
+ * @module paginator
8
+ *
9
+ */
10
+ import { VNode } from 'vue';
11
+
12
+ import { PassThroughOptions } from '../passthrough';
13
+ import {
14
+ ClassComponent,
15
+ GlobalComponentConstructor,
16
+ PassThrough,
17
+ } from '../ts-helpers';
18
+
19
+ import {
20
+ PaginatorPassThroughAttributes,
21
+ PaginatorPassThroughOptions,
22
+ } from 'primevue/paginator';
23
+
24
+ export declare type PaginatorPassThroughOptionType<T = any> =
25
+ | PaginatorPassThroughAttributes
26
+ | ((
27
+ options: PaginatorPassThroughMethodOptions<T>,
28
+ ) => PaginatorPassThroughAttributes | string)
29
+ | string
30
+ | null
31
+ | undefined;
32
+
33
+ /**
34
+ * Custom passthrough(pt) option method.
35
+ */
36
+ export interface PaginatorPassThroughMethodOptions<T> {
37
+ /**
38
+ * Defines instance.
39
+ */
40
+ instance: any;
41
+ /**
42
+ * Defines valid properties.
43
+ */
44
+ props: PaginatorProps;
45
+ /**
46
+ * Defines current inline state.
47
+ */
48
+ state: PaginatorState;
49
+ /**
50
+ * Defines parent instance.
51
+ */
52
+ parent: T;
53
+ /**
54
+ * Defines current options.
55
+ */
56
+ context: PaginatorContext;
57
+ /**
58
+ * Defines passthrough(pt) options in global config.
59
+ */
60
+ global: object | undefined;
61
+ }
62
+
63
+ /**
64
+ * Custom shared passthrough(pt) option method.
65
+ */
66
+ export interface PaginatorSharedPassThroughMethodOptions {
67
+ /**
68
+ * Defines valid properties.
69
+ */
70
+ props: PaginatorProps;
71
+ /**
72
+ * Defines current inline state.
73
+ */
74
+ state: PaginatorState;
75
+ }
76
+
77
+ /**
78
+ * Defines current inline state in Paginator component.
79
+ */
80
+ export interface PaginatorState {
81
+ /**
82
+ * Current index of first record as a number.
83
+ */
84
+ d_first: number;
85
+ /**
86
+ * Current number of rows to display in new page as a number.
87
+ */
88
+ d_rows: number;
89
+ }
90
+
91
+ /**
92
+ * Defines current options in Paginator component.
93
+ */
94
+ export interface PaginatorContext {
95
+ /**
96
+ * Current active state as a boolean.
97
+ * @defaultValue false
98
+ */
99
+ active: boolean;
100
+ /**
101
+ * Current disabled state of the button as a boolean.
102
+ * @defaultValue false
103
+ */
104
+ disabled: boolean;
105
+ }
106
+
107
+ /**
108
+ * Paginator page state metadata.
109
+ */
110
+ export interface PageState {
111
+ /**
112
+ * Index of first record
113
+ */
114
+ first: number;
115
+ /**
116
+ * Number of rows to display in new page
117
+ */
118
+ rows: number;
119
+ /**
120
+ * New page number
121
+ */
122
+ page: number;
123
+ /**
124
+ * Total number of pages
125
+ */
126
+ pageCount?: number;
127
+ }
128
+
129
+ /**
130
+ * Defines valid properties in Paginator component.
131
+ */
132
+ export interface PaginatorProps {
133
+ /**
134
+ * Number of total records.
135
+ * @defaultValue 0
136
+ */
137
+ totalRecords?: number | undefined;
138
+ /**
139
+ * Data count to display per page.
140
+ * @defaultValue 0
141
+ */
142
+ rows?: number | undefined;
143
+ /**
144
+ * Zero-relative number of the first row to be displayed.
145
+ * @defaultValue 0
146
+ */
147
+ first?: number | undefined;
148
+ /**
149
+ * Number of page links to display.
150
+ * @defaultValue 5
151
+ */
152
+ pageLinkSize?: number | undefined;
153
+ /**
154
+ * Array of integer values to display inside rows per page dropdown.
155
+ */
156
+ rowsPerPageOptions?: number[] | undefined;
157
+ /**
158
+ * Template of the paginator, can either be a string or an object with key-value pairs to define templates per breakpoint. Available templates are the following;
159
+ *
160
+ * - FirstPageLink
161
+ * - PrevPageLink
162
+ * - PageLinks
163
+ * - NextPageLink
164
+ * - LastPageLink
165
+ * - RowsPerPageDropdown
166
+ * - JumpToPageDropdown
167
+ * - JumpToPageInput
168
+ * - CurrentPageReport
169
+ */
170
+ template?: any | string;
171
+ /**
172
+ * Template of the current page report element. It displays information about the pagination state. Available placeholders are the following;
173
+ *
174
+ * - {currentPage}
175
+ * - {totalPages}
176
+ * - {rows}
177
+ * - {first}
178
+ * - {last}
179
+ * - {totalRecords}
180
+ *
181
+ * @defaultValue '({currentPage} of {totalPages})'
182
+ */
183
+ currentPageReportTemplate?: string | undefined;
184
+ /**
185
+ * Whether to show the paginator even there is only one page.
186
+ * @defaultValue true
187
+ */
188
+ alwaysShow?: boolean | undefined;
189
+ /**
190
+ * Used to pass attributes to DOM elements inside the component.
191
+ * @type {PaginatorPassThroughOptions}
192
+ */
193
+ pt?: PassThrough<PaginatorPassThroughOptions>;
194
+ /**
195
+ * Used to configure passthrough(pt) options of the component.
196
+ * @type {PassThroughOptions}
197
+ */
198
+ ptOptions?: PassThroughOptions;
199
+ }
200
+
201
+ /**
202
+ * Defines valid slots in Paginator component.
203
+ */
204
+ export interface PaginatorSlots {
205
+ /**
206
+ * Custom start template.
207
+ * @param {Object} scope - start slot's params.
208
+ */
209
+ start(scope: {
210
+ /**
211
+ * Current state
212
+ * @see PageState
213
+ */
214
+ state: PageState;
215
+ }): VNode[];
216
+ /**
217
+ * Custom end template.
218
+ * @param {Object} scope - end slot's params.
219
+ */
220
+ end(scope: {
221
+ /**
222
+ * Current state
223
+ * @see PageState
224
+ */
225
+ state: PageState;
226
+ }): VNode[];
227
+ /**
228
+ * Custom first page link icon template.
229
+ */
230
+ firstpagelinkicon(): VNode[];
231
+ /**
232
+ * Custom previous page link icon template.
233
+ */
234
+ prevpagelinkicon(): VNode[];
235
+ /**
236
+ * Custom finextrst page link icon template.
237
+ */
238
+ nextpagelinkicon(): VNode[];
239
+ /**
240
+ * Custom last page link icon template.
241
+ */
242
+ lastpagelinkicon(): VNode[];
243
+ /**
244
+ * Custom rowsperpagedropdownicon template.
245
+ * @param {Object} scope - rowsperpagedropdownicon's params.
246
+ */
247
+ rowsperpagedropdownicon(scope: {
248
+ /**
249
+ * Style class of the rowsperpagedropdown icon.
250
+ */
251
+ class: string;
252
+ }): VNode[];
253
+ /**
254
+ * Custom jumptopagedropdownicon template.
255
+ * @param {Object} scope - jumptopagedropdownicon's params.
256
+ */
257
+ jumptopagedropdownicon(scope: {
258
+ /**
259
+ * Style class of the jumptopagedropdown icon.
260
+ */
261
+ class: string;
262
+ }): VNode[];
263
+ }
264
+
265
+ /**
266
+ * Defines valid emits in Paginator component.
267
+ */
268
+ export type PaginatorEmits = {
269
+ 'page': [event: PageState];
270
+ 'update:rows': [];
271
+ };
272
+
273
+ declare class Paginator extends ClassComponent<
274
+ PaginatorProps,
275
+ PaginatorSlots,
276
+ PaginatorEmits
277
+ > {}
278
+
279
+ declare module '@vue/runtime-core' {
280
+ interface GlobalComponents {
281
+ Paginator: GlobalComponentConstructor<Paginator>;
282
+ }
283
+ }
284
+
285
+ export default Paginator;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fewangsit/wangsvue-fats",
3
- "version": "1.0.0-alpha.52",
3
+ "version": "1.0.0-alpha.54",
4
4
  "author": "Wangsit FE Developer",
5
5
  "description": "Fixed Asset Tagsamurai VueJS Component Library",
6
6
  "type": "module",