@wavemaker/app-ng-runtime 11.11.4-rc.6173 → 11.11.5-rc.6185
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/components/base/bundles/index.umd.js +12 -7
- package/components/base/esm2022/widgets/common/base/base-field-validations.mjs +13 -8
- package/components/base/fesm2022/index.mjs +12 -7
- package/components/base/fesm2022/index.mjs.map +1 -1
- package/components/data/form/bundles/index.umd.js +20 -1
- package/components/data/form/esm2022/form-action/form-action.directive.mjs +5 -2
- package/components/data/form/esm2022/form-field/form-field.directive.mjs +2 -1
- package/components/data/form/esm2022/form.component.mjs +15 -1
- package/components/data/form/esm2022/form.props.mjs +2 -1
- package/components/data/form/fesm2022/index.mjs +20 -1
- package/components/data/form/fesm2022/index.mjs.map +1 -1
- package/components/data/form/form.component.d.ts +1 -0
- package/components/data/list/bundles/index.umd.js +53 -10
- package/components/data/list/esm2022/list.component.mjs +51 -10
- package/components/data/list/esm2022/list.props.mjs +4 -2
- package/components/data/list/fesm2022/index.mjs +53 -10
- package/components/data/list/fesm2022/index.mjs.map +1 -1
- package/components/data/list/list.component.d.ts +7 -0
- package/components/data/pagination/bundles/index.umd.js +502 -106
- package/components/data/pagination/esm2022/pagination.component.mjs +500 -105
- package/components/data/pagination/esm2022/pagination.props.mjs +4 -1
- package/components/data/pagination/fesm2022/index.mjs +502 -104
- package/components/data/pagination/fesm2022/index.mjs.map +1 -1
- package/components/data/pagination/pagination.component.d.ts +21 -1
- package/components/data/table/bundles/index.umd.js +89 -11
- package/components/data/table/esm2022/table-column/table-column.directive.mjs +3 -2
- package/components/data/table/esm2022/table-column/table-column.props.mjs +2 -1
- package/components/data/table/esm2022/table.component.mjs +82 -12
- package/components/data/table/esm2022/table.props.mjs +7 -1
- package/components/data/table/fesm2022/index.mjs +90 -12
- package/components/data/table/fesm2022/index.mjs.map +1 -1
- package/components/data/table/table-column/table-column.directive.d.ts +1 -0
- package/components/data/table/table.component.d.ts +17 -0
- package/components/input/epoch/base-date-time.component.d.ts +3 -1
- package/components/input/epoch/bundles/index.umd.js +123 -65
- package/components/input/epoch/esm2022/base-date-time.component.mjs +31 -20
- package/components/input/epoch/esm2022/date/date.component.mjs +5 -6
- package/components/input/epoch/esm2022/date-time/date-time.component.mjs +45 -22
- package/components/input/epoch/esm2022/date-time/date-time.props.mjs +3 -2
- package/components/input/epoch/esm2022/time/time.component.mjs +40 -14
- package/components/input/epoch/esm2022/time/time.props.mjs +3 -2
- package/components/input/epoch/fesm2022/index.mjs +118 -60
- package/components/input/epoch/fesm2022/index.mjs.map +1 -1
- package/components/input/slider/bundles/index.umd.js +107 -38
- package/components/input/slider/esm2022/slider.component.mjs +86 -18
- package/components/input/slider/esm2022/slider.props.mjs +5 -3
- package/components/input/slider/fesm2022/index.mjs +88 -19
- package/components/input/slider/fesm2022/index.mjs.map +1 -1
- package/components/input/slider/slider.component.d.ts +5 -0
- package/npm-shrinkwrap.json +2 -2
- package/oAuth/esm2022/oAuth.service.mjs +1 -1
- package/oAuth/fesm2022/index.mjs.map +1 -1
- package/package-lock.json +2 -2
- package/package.json +1 -1
- package/runtime/base/bundles/index.umd.js +84 -34
- package/runtime/base/components/app-component/app.component.d.ts +10 -3
- package/runtime/base/esm2022/components/app-component/app.component.mjs +85 -34
- package/runtime/base/esm2022/util/wm-route-reuse-strategy.mjs +2 -2
- package/runtime/base/fesm2022/index.mjs +85 -35
- package/runtime/base/fesm2022/index.mjs.map +1 -1
- package/scripts/datatable/datatable.js +56 -10
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@wm/components/base'), require('@angular/forms'), require('@angular/core'), require('@wm/core'), require('lodash-es'), require('ngx-bootstrap/pagination')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define(['exports', '@angular/common', '@wm/components/base', '@angular/forms', '@angular/core', '@wm/core', 'lodash-es', 'ngx-bootstrap/pagination'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wm = global.wm || {}, global.wm.components = global.wm.components || {}, global.wm.components.data = global.wm.components.data || {}, global.wm.components.data.pagination = {}), global.ng.common, global.wm.components.base, global.ng.forms, global.ng.core, global.wm.core, global._, global.pagination));
|
|
5
|
-
})(this, (function (exports, i1, base, i2, i0, core, lodashEs, i3) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/common'), require('@wm/components/base'), require('@angular/forms'), require('@angular/core'), require('@wm/core'), require('lodash-es'), require('ngx-bootstrap/pagination'), require('ngx-bootstrap/dropdown'), require('@wm/components/navigation/menu')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define(['exports', '@angular/common', '@wm/components/base', '@angular/forms', '@angular/core', '@wm/core', 'lodash-es', 'ngx-bootstrap/pagination', 'ngx-bootstrap/dropdown', '@wm/components/navigation/menu'], factory) :
|
|
4
|
+
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.wm = global.wm || {}, global.wm.components = global.wm.components || {}, global.wm.components.data = global.wm.components.data || {}, global.wm.components.data.pagination = {}), global.ng.common, global.wm.components.base, global.ng.forms, global.ng.core, global.wm.core, global._, global.pagination, global.dropdown, global.wm.components.navigation.menu));
|
|
5
|
+
})(this, (function (exports, i1, base, i2, i0, core, lodashEs, i3, i4, menu) { 'use strict';
|
|
6
6
|
|
|
7
7
|
function _interopNamespaceDefault(e) {
|
|
8
8
|
var n = Object.create(null);
|
|
@@ -25,6 +25,7 @@
|
|
|
25
25
|
var i2__namespace = /*#__PURE__*/_interopNamespaceDefault(i2);
|
|
26
26
|
var i0__namespace = /*#__PURE__*/_interopNamespaceDefault(i0);
|
|
27
27
|
var i3__namespace = /*#__PURE__*/_interopNamespaceDefault(i3);
|
|
28
|
+
var i4__namespace = /*#__PURE__*/_interopNamespaceDefault(i4);
|
|
28
29
|
|
|
29
30
|
const registerProps = () => {
|
|
30
31
|
base.register('wm-pagination', new Map([
|
|
@@ -33,6 +34,9 @@
|
|
|
33
34
|
['dataset', base.PROP_ANY],
|
|
34
35
|
['directionlinks', { value: true, ...base.PROP_BOOLEAN }],
|
|
35
36
|
['forceellipses', { value: true, ...base.PROP_BOOLEAN }],
|
|
37
|
+
['allowpagesizechange', { value: false, ...base.PROP_BOOLEAN }],
|
|
38
|
+
['allowpagesizechange', { value: false, ...base.PROP_BOOLEAN }],
|
|
39
|
+
['pagesizeoptions', { value: '', ...base.PROP_STRING }],
|
|
36
40
|
['maxResults', base.PROP_NUMBER],
|
|
37
41
|
['maxsize', { value: 5, ...base.PROP_NUMBER }],
|
|
38
42
|
['name', base.PROP_STRING],
|
|
@@ -46,61 +50,129 @@
|
|
|
46
50
|
};
|
|
47
51
|
|
|
48
52
|
const _c0 = ["wmPagination", ""];
|
|
49
|
-
const _c1 = a0 => ({ "
|
|
50
|
-
const _c2 =
|
|
53
|
+
const _c1 = a0 => ({ "active": a0 });
|
|
54
|
+
const _c2 = a0 => ({ "disabled": a0 });
|
|
55
|
+
const _c3 = () => ({ standalone: true });
|
|
56
|
+
function PaginationComponent_Conditional_0_Conditional_1_ul_7_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
57
|
+
const _r3 = i0__namespace.ɵɵgetCurrentView();
|
|
58
|
+
i0__namespace.ɵɵelementStart(0, "li", 17)(1, "a", 18);
|
|
59
|
+
i0__namespace.ɵɵlistener("click", function PaginationComponent_Conditional_0_Conditional_1_ul_7_For_2_Template_a_click_1_listener($event) { const option_r4 = i0__namespace.ɵɵrestoreView(_r3).$implicit; const ctx_r1 = i0__namespace.ɵɵnextContext(4); return i0__namespace.ɵɵresetView(ctx_r1.onPageSizeChange($event, option_r4)); })("keydown", function PaginationComponent_Conditional_0_Conditional_1_ul_7_For_2_Template_a_keydown_1_listener($event) { const ɵ$index_21_r5 = i0__namespace.ɵɵrestoreView(_r3).$index; const ctx_r1 = i0__namespace.ɵɵnextContext(4); return i0__namespace.ɵɵresetView(ctx_r1.onDropdownKeydown($event, ɵ$index_21_r5)); });
|
|
60
|
+
i0__namespace.ɵɵtext(2);
|
|
61
|
+
i0__namespace.ɵɵelementEnd()();
|
|
62
|
+
} if (rf & 2) {
|
|
63
|
+
const option_r4 = ctx.$implicit;
|
|
64
|
+
const ɵ$index_21_r5 = ctx.$index;
|
|
65
|
+
const ctx_r1 = i0__namespace.ɵɵnextContext(4);
|
|
66
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(3, _c1, option_r4 == ctx_r1.maxResults));
|
|
67
|
+
i0__namespace.ɵɵadvance();
|
|
68
|
+
i0__namespace.ɵɵattribute("tabindex", ɵ$index_21_r5 === ctx_r1.focusedIndex ? 0 : -1);
|
|
69
|
+
i0__namespace.ɵɵadvance();
|
|
70
|
+
i0__namespace.ɵɵtextInterpolate(option_r4);
|
|
71
|
+
} }
|
|
72
|
+
function PaginationComponent_Conditional_0_Conditional_1_ul_7_Template(rf, ctx) { if (rf & 1) {
|
|
73
|
+
i0__namespace.ɵɵelementStart(0, "ul", 16);
|
|
74
|
+
i0__namespace.ɵɵrepeaterCreate(1, PaginationComponent_Conditional_0_Conditional_1_ul_7_For_2_Template, 3, 5, "li", 17, i0__namespace.ɵɵrepeaterTrackByIdentity);
|
|
75
|
+
i0__namespace.ɵɵelementEnd();
|
|
76
|
+
} if (rf & 2) {
|
|
77
|
+
const ctx_r1 = i0__namespace.ɵɵnextContext(3);
|
|
78
|
+
i0__namespace.ɵɵadvance();
|
|
79
|
+
i0__namespace.ɵɵrepeater(ctx_r1.pageSizeOptions);
|
|
80
|
+
} }
|
|
81
|
+
function PaginationComponent_Conditional_0_Conditional_1_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
82
|
+
i0__namespace.ɵɵelementStart(0, "li", 15)(1, "div")(2, "span");
|
|
83
|
+
i0__namespace.ɵɵtext(3);
|
|
84
|
+
i0__namespace.ɵɵelementEnd();
|
|
85
|
+
i0__namespace.ɵɵelementStart(4, "span");
|
|
86
|
+
i0__namespace.ɵɵtext(5, "of");
|
|
87
|
+
i0__namespace.ɵɵelementEnd();
|
|
88
|
+
i0__namespace.ɵɵelementStart(6, "span");
|
|
89
|
+
i0__namespace.ɵɵtext(7);
|
|
90
|
+
i0__namespace.ɵɵelementEnd()()();
|
|
91
|
+
} if (rf & 2) {
|
|
92
|
+
const ctx_r1 = i0__namespace.ɵɵnextContext(3);
|
|
93
|
+
i0__namespace.ɵɵadvance(3);
|
|
94
|
+
i0__namespace.ɵɵtextInterpolate2("", ctx_r1.rowSummary.startIndex, " - ", ctx_r1.rowSummary.endIndex, "");
|
|
95
|
+
i0__namespace.ɵɵadvance(4);
|
|
96
|
+
i0__namespace.ɵɵtextInterpolate(ctx_r1.rowSummary.totalRecords);
|
|
97
|
+
} }
|
|
51
98
|
function PaginationComponent_Conditional_0_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
52
99
|
const _r1 = i0__namespace.ɵɵgetCurrentView();
|
|
53
|
-
i0__namespace.ɵɵelementStart(0, "li",
|
|
54
|
-
i0__namespace.ɵɵ
|
|
55
|
-
i0__namespace.ɵɵ
|
|
56
|
-
i0__namespace.ɵɵ
|
|
100
|
+
i0__namespace.ɵɵelementStart(0, "li", 9)(1, "label", 10);
|
|
101
|
+
i0__namespace.ɵɵtext(2);
|
|
102
|
+
i0__namespace.ɵɵelementEnd();
|
|
103
|
+
i0__namespace.ɵɵelementStart(3, "div", 11);
|
|
104
|
+
i0__namespace.ɵɵlistener("isOpenChange", function PaginationComponent_Conditional_0_Conditional_1_Template_div_isOpenChange_3_listener($event) { i0__namespace.ɵɵrestoreView(_r1); const ctx_r1 = i0__namespace.ɵɵnextContext(2); return i0__namespace.ɵɵresetView(ctx_r1.onOpenChange($event)); });
|
|
105
|
+
i0__namespace.ɵɵelementStart(4, "button", 12);
|
|
106
|
+
i0__namespace.ɵɵtext(5);
|
|
107
|
+
i0__namespace.ɵɵelement(6, "span", 13);
|
|
108
|
+
i0__namespace.ɵɵelementEnd();
|
|
109
|
+
i0__namespace.ɵɵtemplate(7, PaginationComponent_Conditional_0_Conditional_1_ul_7_Template, 3, 0, "ul", 14);
|
|
110
|
+
i0__namespace.ɵɵelementEnd()();
|
|
111
|
+
i0__namespace.ɵɵtemplate(8, PaginationComponent_Conditional_0_Conditional_1_Conditional_8_Template, 8, 3, "li", 15);
|
|
112
|
+
} if (rf & 2) {
|
|
113
|
+
const ctx_r1 = i0__namespace.ɵɵnextContext(2);
|
|
114
|
+
i0__namespace.ɵɵadvance();
|
|
115
|
+
i0__namespace.ɵɵproperty("title", ctx_r1.appLocale.LABEL_ITEMS_PER_PAGE);
|
|
116
|
+
i0__namespace.ɵɵadvance();
|
|
117
|
+
i0__namespace.ɵɵtextInterpolate1("", ctx_r1.appLocale.LABEL_ITEMS_PER_PAGE, " :");
|
|
118
|
+
i0__namespace.ɵɵadvance(3);
|
|
119
|
+
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.maxResults, " ");
|
|
120
|
+
i0__namespace.ɵɵadvance(3);
|
|
121
|
+
i0__namespace.ɵɵconditional((ctx_r1.rowSummary == null ? null : ctx_r1.rowSummary.totalRecords) ? 8 : -1);
|
|
122
|
+
} }
|
|
123
|
+
function PaginationComponent_Conditional_0_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
124
|
+
const _r6 = i0__namespace.ɵɵgetCurrentView();
|
|
125
|
+
i0__namespace.ɵɵelementStart(0, "li", 5)(1, "a", 19);
|
|
126
|
+
i0__namespace.ɵɵlistener("click", function PaginationComponent_Conditional_0_Conditional_2_Template_a_click_1_listener($event) { i0__namespace.ɵɵrestoreView(_r6); const ctx_r1 = i0__namespace.ɵɵnextContext(2); return i0__namespace.ɵɵresetView(ctx_r1.navigatePage("first", $event)); });
|
|
127
|
+
i0__namespace.ɵɵelementStart(2, "span", 20);
|
|
128
|
+
i0__namespace.ɵɵelement(3, "i", 21);
|
|
57
129
|
i0__namespace.ɵɵelementEnd();
|
|
58
|
-
i0__namespace.ɵɵelementStart(4, "span",
|
|
130
|
+
i0__namespace.ɵɵelementStart(4, "span", 22);
|
|
59
131
|
i0__namespace.ɵɵtext(5);
|
|
60
132
|
i0__namespace.ɵɵelementEnd()()();
|
|
61
133
|
} if (rf & 2) {
|
|
62
134
|
const ctx_r1 = i0__namespace.ɵɵnextContext(2);
|
|
63
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4,
|
|
135
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c2, ctx_r1.isDisableFirst));
|
|
64
136
|
i0__namespace.ɵɵadvance();
|
|
65
137
|
i0__namespace.ɵɵproperty("title", ctx_r1.appLocale.LABEL_FIRST);
|
|
66
138
|
i0__namespace.ɵɵattribute("aria-disabled", ctx_r1.isDisableFirst);
|
|
67
139
|
i0__namespace.ɵɵadvance(4);
|
|
68
140
|
i0__namespace.ɵɵtextInterpolate1("Go to first page ", ctx_r1.isDisableFirst ? " , Disabled" : "", "");
|
|
69
141
|
} }
|
|
70
|
-
function
|
|
71
|
-
const
|
|
72
|
-
i0__namespace.ɵɵelementStart(0, "li",
|
|
73
|
-
i0__namespace.ɵɵlistener("click", function
|
|
74
|
-
i0__namespace.ɵɵelementStart(2, "span",
|
|
75
|
-
i0__namespace.ɵɵelement(3, "i",
|
|
142
|
+
function PaginationComponent_Conditional_0_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
143
|
+
const _r7 = i0__namespace.ɵɵgetCurrentView();
|
|
144
|
+
i0__namespace.ɵɵelementStart(0, "li", 5)(1, "a", 23);
|
|
145
|
+
i0__namespace.ɵɵlistener("click", function PaginationComponent_Conditional_0_Conditional_3_Template_a_click_1_listener($event) { i0__namespace.ɵɵrestoreView(_r7); const ctx_r1 = i0__namespace.ɵɵnextContext(2); return i0__namespace.ɵɵresetView(ctx_r1.navigatePage("prev", $event)); });
|
|
146
|
+
i0__namespace.ɵɵelementStart(2, "span", 20);
|
|
147
|
+
i0__namespace.ɵɵelement(3, "i", 24);
|
|
76
148
|
i0__namespace.ɵɵelementEnd();
|
|
77
|
-
i0__namespace.ɵɵelementStart(4, "span",
|
|
149
|
+
i0__namespace.ɵɵelementStart(4, "span", 22);
|
|
78
150
|
i0__namespace.ɵɵtext(5);
|
|
79
151
|
i0__namespace.ɵɵelementEnd()()();
|
|
80
152
|
} if (rf & 2) {
|
|
81
153
|
const ctx_r1 = i0__namespace.ɵɵnextContext(2);
|
|
82
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4,
|
|
154
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c2, ctx_r1.isDisablePrevious));
|
|
83
155
|
i0__namespace.ɵɵadvance();
|
|
84
156
|
i0__namespace.ɵɵproperty("title", ctx_r1.appLocale.LABEL_PREVIOUS);
|
|
85
157
|
i0__namespace.ɵɵattribute("aria-disabled", ctx_r1.isDisablePrevious);
|
|
86
158
|
i0__namespace.ɵɵadvance(4);
|
|
87
159
|
i0__namespace.ɵɵtextInterpolate1("Go to previous page ", ctx_r1.isDisablePrevious ? ", Disabled" : "", "");
|
|
88
160
|
} }
|
|
89
|
-
function
|
|
90
|
-
const
|
|
91
|
-
i0__namespace.ɵɵelementStart(0, "li",
|
|
92
|
-
i0__namespace.ɵɵtwoWayListener("ngModelChange", function
|
|
93
|
-
i0__namespace.ɵɵlistener("keydown", function
|
|
161
|
+
function PaginationComponent_Conditional_0_Conditional_4_Template(rf, ctx) { if (rf & 1) {
|
|
162
|
+
const _r8 = i0__namespace.ɵɵgetCurrentView();
|
|
163
|
+
i0__namespace.ɵɵelementStart(0, "li", 6)(1, "a", 25)(2, "input", 26);
|
|
164
|
+
i0__namespace.ɵɵtwoWayListener("ngModelChange", function PaginationComponent_Conditional_0_Conditional_4_Template_input_ngModelChange_2_listener($event) { i0__namespace.ɵɵrestoreView(_r8); const ctx_r1 = i0__namespace.ɵɵnextContext(2); i0__namespace.ɵɵtwoWayBindingSet(ctx_r1.dn.currentPage, $event) || (ctx_r1.dn.currentPage = $event); return i0__namespace.ɵɵresetView($event); });
|
|
165
|
+
i0__namespace.ɵɵlistener("keydown", function PaginationComponent_Conditional_0_Conditional_4_Template_input_keydown_2_listener($event) { i0__namespace.ɵɵrestoreView(_r8); const ctx_r1 = i0__namespace.ɵɵnextContext(2); return i0__namespace.ɵɵresetView(ctx_r1.onKeyDown($event)); })("change", function PaginationComponent_Conditional_0_Conditional_4_Template_input_change_2_listener($event) { i0__namespace.ɵɵrestoreView(_r8); const ctx_r1 = i0__namespace.ɵɵnextContext(2); return i0__namespace.ɵɵresetView(ctx_r1.onModelChange($event)); });
|
|
94
166
|
i0__namespace.ɵɵelementEnd()()();
|
|
95
167
|
} if (rf & 2) {
|
|
96
168
|
const ctx_r1 = i0__namespace.ɵɵnextContext(2);
|
|
97
169
|
i0__namespace.ɵɵadvance(2);
|
|
98
170
|
i0__namespace.ɵɵtwoWayProperty("ngModel", ctx_r1.dn.currentPage);
|
|
99
|
-
i0__namespace.ɵɵproperty("disabled", ctx_r1.isDisableCurrent)("ngModelOptions", i0__namespace.ɵɵpureFunction0(4,
|
|
171
|
+
i0__namespace.ɵɵproperty("disabled", ctx_r1.isDisableCurrent)("ngModelOptions", i0__namespace.ɵɵpureFunction0(4, _c3));
|
|
100
172
|
i0__namespace.ɵɵattribute("aria-label", "Showing Page " + ctx_r1.dn.currentPage + " of " + ctx_r1.pageCount);
|
|
101
173
|
} }
|
|
102
|
-
function
|
|
103
|
-
i0__namespace.ɵɵelementStart(0, "li",
|
|
174
|
+
function PaginationComponent_Conditional_0_Conditional_5_Template(rf, ctx) { if (rf & 1) {
|
|
175
|
+
i0__namespace.ɵɵelementStart(0, "li", 7)(1, "a", 27);
|
|
104
176
|
i0__namespace.ɵɵtext(2);
|
|
105
177
|
i0__namespace.ɵɵelementEnd()();
|
|
106
178
|
} if (rf & 2) {
|
|
@@ -110,46 +182,46 @@
|
|
|
110
182
|
i0__namespace.ɵɵadvance();
|
|
111
183
|
i0__namespace.ɵɵtextInterpolate1(" / ", ctx_r1.pageCount, "");
|
|
112
184
|
} }
|
|
113
|
-
function
|
|
114
|
-
const
|
|
115
|
-
i0__namespace.ɵɵelementStart(0, "li",
|
|
116
|
-
i0__namespace.ɵɵlistener("click", function
|
|
117
|
-
i0__namespace.ɵɵelementStart(2, "span",
|
|
118
|
-
i0__namespace.ɵɵelement(3, "i",
|
|
185
|
+
function PaginationComponent_Conditional_0_Conditional_6_Template(rf, ctx) { if (rf & 1) {
|
|
186
|
+
const _r9 = i0__namespace.ɵɵgetCurrentView();
|
|
187
|
+
i0__namespace.ɵɵelementStart(0, "li", 5)(1, "a", 28);
|
|
188
|
+
i0__namespace.ɵɵlistener("click", function PaginationComponent_Conditional_0_Conditional_6_Template_a_click_1_listener($event) { i0__namespace.ɵɵrestoreView(_r9); const ctx_r1 = i0__namespace.ɵɵnextContext(2); return i0__namespace.ɵɵresetView(ctx_r1.navigatePage("next", $event)); });
|
|
189
|
+
i0__namespace.ɵɵelementStart(2, "span", 20);
|
|
190
|
+
i0__namespace.ɵɵelement(3, "i", 29);
|
|
119
191
|
i0__namespace.ɵɵelementEnd();
|
|
120
|
-
i0__namespace.ɵɵelementStart(4, "span",
|
|
192
|
+
i0__namespace.ɵɵelementStart(4, "span", 22);
|
|
121
193
|
i0__namespace.ɵɵtext(5);
|
|
122
194
|
i0__namespace.ɵɵelementEnd()()();
|
|
123
195
|
} if (rf & 2) {
|
|
124
196
|
const ctx_r1 = i0__namespace.ɵɵnextContext(2);
|
|
125
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4,
|
|
197
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c2, ctx_r1.isDisableNext));
|
|
126
198
|
i0__namespace.ɵɵadvance();
|
|
127
199
|
i0__namespace.ɵɵproperty("title", ctx_r1.appLocale.LABEL_NEXT);
|
|
128
200
|
i0__namespace.ɵɵattribute("aria-disabled", ctx_r1.isDisableNext);
|
|
129
201
|
i0__namespace.ɵɵadvance(4);
|
|
130
202
|
i0__namespace.ɵɵtextInterpolate1("Go to next page ", ctx_r1.isDisableNext ? " , Disabled" : "", "");
|
|
131
203
|
} }
|
|
132
|
-
function
|
|
133
|
-
const
|
|
134
|
-
i0__namespace.ɵɵelementStart(0, "li",
|
|
135
|
-
i0__namespace.ɵɵlistener("click", function
|
|
136
|
-
i0__namespace.ɵɵelementStart(2, "span",
|
|
137
|
-
i0__namespace.ɵɵelement(3, "i",
|
|
204
|
+
function PaginationComponent_Conditional_0_Conditional_7_Template(rf, ctx) { if (rf & 1) {
|
|
205
|
+
const _r10 = i0__namespace.ɵɵgetCurrentView();
|
|
206
|
+
i0__namespace.ɵɵelementStart(0, "li", 5)(1, "a", 30);
|
|
207
|
+
i0__namespace.ɵɵlistener("click", function PaginationComponent_Conditional_0_Conditional_7_Template_a_click_1_listener($event) { i0__namespace.ɵɵrestoreView(_r10); const ctx_r1 = i0__namespace.ɵɵnextContext(2); return i0__namespace.ɵɵresetView(ctx_r1.navigatePage("last", $event)); });
|
|
208
|
+
i0__namespace.ɵɵelementStart(2, "span", 20);
|
|
209
|
+
i0__namespace.ɵɵelement(3, "i", 31);
|
|
138
210
|
i0__namespace.ɵɵelementEnd();
|
|
139
|
-
i0__namespace.ɵɵelementStart(4, "span",
|
|
211
|
+
i0__namespace.ɵɵelementStart(4, "span", 22);
|
|
140
212
|
i0__namespace.ɵɵtext(5);
|
|
141
213
|
i0__namespace.ɵɵelementEnd()()();
|
|
142
214
|
} if (rf & 2) {
|
|
143
215
|
const ctx_r1 = i0__namespace.ɵɵnextContext(2);
|
|
144
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4,
|
|
216
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(4, _c2, ctx_r1.isDisableLast));
|
|
145
217
|
i0__namespace.ɵɵadvance();
|
|
146
218
|
i0__namespace.ɵɵproperty("title", ctx_r1.appLocale.LABEL_LAST);
|
|
147
219
|
i0__namespace.ɵɵattribute("aria-disabled", ctx_r1.isDisableLast);
|
|
148
220
|
i0__namespace.ɵɵadvance(4);
|
|
149
221
|
i0__namespace.ɵɵtextInterpolate1("Go to last page ", ctx_r1.isDisableLast ? " , Disabled" : "", "");
|
|
150
222
|
} }
|
|
151
|
-
function
|
|
152
|
-
i0__namespace.ɵɵelementStart(0, "li",
|
|
223
|
+
function PaginationComponent_Conditional_0_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
224
|
+
i0__namespace.ɵɵelementStart(0, "li", 8)(1, "a", 32);
|
|
153
225
|
i0__namespace.ɵɵtext(2);
|
|
154
226
|
i0__namespace.ɵɵelementEnd()();
|
|
155
227
|
} if (rf & 2) {
|
|
@@ -159,13 +231,13 @@
|
|
|
159
231
|
} }
|
|
160
232
|
function PaginationComponent_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
161
233
|
i0__namespace.ɵɵelementStart(0, "ul");
|
|
162
|
-
i0__namespace.ɵɵtemplate(1, PaginationComponent_Conditional_0_Conditional_1_Template, 6, 6, "li",
|
|
234
|
+
i0__namespace.ɵɵtemplate(1, PaginationComponent_Conditional_0_Conditional_1_Template, 9, 4)(2, PaginationComponent_Conditional_0_Conditional_2_Template, 6, 6, "li", 5)(3, PaginationComponent_Conditional_0_Conditional_3_Template, 6, 6, "li", 5)(4, PaginationComponent_Conditional_0_Conditional_4_Template, 3, 5, "li", 6)(5, PaginationComponent_Conditional_0_Conditional_5_Template, 3, 2, "li", 7)(6, PaginationComponent_Conditional_0_Conditional_6_Template, 6, 6, "li", 5)(7, PaginationComponent_Conditional_0_Conditional_7_Template, 6, 6, "li", 5)(8, PaginationComponent_Conditional_0_Conditional_8_Template, 3, 2, "li", 8);
|
|
163
235
|
i0__namespace.ɵɵelementEnd();
|
|
164
236
|
} if (rf & 2) {
|
|
165
237
|
const ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
166
238
|
i0__namespace.ɵɵclassMapInterpolate1("pagination advanced ", ctx_r1.navigationClass, "");
|
|
167
239
|
i0__namespace.ɵɵadvance();
|
|
168
|
-
i0__namespace.ɵɵconditional(
|
|
240
|
+
i0__namespace.ɵɵconditional(ctx_r1.allowpagesizechange ? 1 : -1);
|
|
169
241
|
i0__namespace.ɵɵadvance();
|
|
170
242
|
i0__namespace.ɵɵconditional(!(ctx_r1.dataSize <= ctx_r1.maxResults) ? 2 : -1);
|
|
171
243
|
i0__namespace.ɵɵadvance();
|
|
@@ -177,33 +249,106 @@
|
|
|
177
249
|
i0__namespace.ɵɵadvance();
|
|
178
250
|
i0__namespace.ɵɵconditional(!(ctx_r1.dataSize <= ctx_r1.maxResults) ? 6 : -1);
|
|
179
251
|
i0__namespace.ɵɵadvance();
|
|
180
|
-
i0__namespace.ɵɵconditional(ctx_r1.
|
|
252
|
+
i0__namespace.ɵɵconditional(!(ctx_r1.dataSize <= ctx_r1.maxResults) ? 7 : -1);
|
|
253
|
+
i0__namespace.ɵɵadvance();
|
|
254
|
+
i0__namespace.ɵɵconditional(ctx_r1.showrecordcount ? 8 : -1);
|
|
181
255
|
} }
|
|
182
|
-
function
|
|
183
|
-
const
|
|
184
|
-
i0__namespace.ɵɵelementStart(0, "
|
|
185
|
-
i0__namespace.ɵɵlistener("click", function
|
|
186
|
-
i0__namespace.ɵɵ
|
|
187
|
-
i0__namespace.ɵɵ
|
|
256
|
+
function PaginationComponent_Conditional_1_Conditional_1_ul_7_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
257
|
+
const _r13 = i0__namespace.ɵɵgetCurrentView();
|
|
258
|
+
i0__namespace.ɵɵelementStart(0, "li", 17)(1, "a", 18);
|
|
259
|
+
i0__namespace.ɵɵlistener("click", function PaginationComponent_Conditional_1_Conditional_1_ul_7_For_2_Template_a_click_1_listener($event) { const option_r14 = i0__namespace.ɵɵrestoreView(_r13).$implicit; const ctx_r1 = i0__namespace.ɵɵnextContext(4); return i0__namespace.ɵɵresetView(ctx_r1.onPageSizeChange($event, option_r14)); })("keydown", function PaginationComponent_Conditional_1_Conditional_1_ul_7_For_2_Template_a_keydown_1_listener($event) { const ɵ$index_128_r15 = i0__namespace.ɵɵrestoreView(_r13).$index; const ctx_r1 = i0__namespace.ɵɵnextContext(4); return i0__namespace.ɵɵresetView(ctx_r1.onDropdownKeydown($event, ɵ$index_128_r15)); });
|
|
260
|
+
i0__namespace.ɵɵtext(2);
|
|
261
|
+
i0__namespace.ɵɵelementEnd()();
|
|
262
|
+
} if (rf & 2) {
|
|
263
|
+
const option_r14 = ctx.$implicit;
|
|
264
|
+
const ɵ$index_128_r15 = ctx.$index;
|
|
265
|
+
const ctx_r1 = i0__namespace.ɵɵnextContext(4);
|
|
266
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(3, _c1, option_r14 == ctx_r1.maxResults));
|
|
267
|
+
i0__namespace.ɵɵadvance();
|
|
268
|
+
i0__namespace.ɵɵattribute("tabindex", ɵ$index_128_r15 === ctx_r1.focusedIndex ? 0 : -1);
|
|
269
|
+
i0__namespace.ɵɵadvance();
|
|
270
|
+
i0__namespace.ɵɵtextInterpolate(option_r14);
|
|
271
|
+
} }
|
|
272
|
+
function PaginationComponent_Conditional_1_Conditional_1_ul_7_Template(rf, ctx) { if (rf & 1) {
|
|
273
|
+
i0__namespace.ɵɵelementStart(0, "ul", 16);
|
|
274
|
+
i0__namespace.ɵɵrepeaterCreate(1, PaginationComponent_Conditional_1_Conditional_1_ul_7_For_2_Template, 3, 5, "li", 17, i0__namespace.ɵɵrepeaterTrackByIdentity);
|
|
188
275
|
i0__namespace.ɵɵelementEnd();
|
|
189
|
-
|
|
190
|
-
i0__namespace.ɵɵ
|
|
276
|
+
} if (rf & 2) {
|
|
277
|
+
const ctx_r1 = i0__namespace.ɵɵnextContext(3);
|
|
278
|
+
i0__namespace.ɵɵadvance();
|
|
279
|
+
i0__namespace.ɵɵrepeater(ctx_r1.pageSizeOptions);
|
|
280
|
+
} }
|
|
281
|
+
function PaginationComponent_Conditional_1_Conditional_1_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
282
|
+
i0__namespace.ɵɵelementStart(0, "li", 15)(1, "div")(2, "span");
|
|
283
|
+
i0__namespace.ɵɵtext(3);
|
|
284
|
+
i0__namespace.ɵɵelementEnd();
|
|
285
|
+
i0__namespace.ɵɵelementStart(4, "span");
|
|
286
|
+
i0__namespace.ɵɵtext(5, "of");
|
|
287
|
+
i0__namespace.ɵɵelementEnd();
|
|
288
|
+
i0__namespace.ɵɵelementStart(6, "span");
|
|
191
289
|
i0__namespace.ɵɵtext(7);
|
|
192
290
|
i0__namespace.ɵɵelementEnd()()();
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
i0__namespace.ɵɵ
|
|
196
|
-
i0__namespace.ɵɵ
|
|
291
|
+
} if (rf & 2) {
|
|
292
|
+
const ctx_r1 = i0__namespace.ɵɵnextContext(3);
|
|
293
|
+
i0__namespace.ɵɵadvance(3);
|
|
294
|
+
i0__namespace.ɵɵtextInterpolate2("", ctx_r1.rowSummary.startIndex, " - ", ctx_r1.rowSummary.endIndex, "");
|
|
295
|
+
i0__namespace.ɵɵadvance(4);
|
|
296
|
+
i0__namespace.ɵɵtextInterpolate(ctx_r1.rowSummary.totalRecords);
|
|
297
|
+
} }
|
|
298
|
+
function PaginationComponent_Conditional_1_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
299
|
+
const _r12 = i0__namespace.ɵɵgetCurrentView();
|
|
300
|
+
i0__namespace.ɵɵelementStart(0, "li", 9)(1, "label", 10);
|
|
301
|
+
i0__namespace.ɵɵtext(2);
|
|
197
302
|
i0__namespace.ɵɵelementEnd();
|
|
198
|
-
i0__namespace.ɵɵ
|
|
199
|
-
i0__namespace.ɵɵ
|
|
200
|
-
i0__namespace.ɵɵ
|
|
303
|
+
i0__namespace.ɵɵelementStart(3, "div", 11);
|
|
304
|
+
i0__namespace.ɵɵlistener("isOpenChange", function PaginationComponent_Conditional_1_Conditional_1_Template_div_isOpenChange_3_listener($event) { i0__namespace.ɵɵrestoreView(_r12); const ctx_r1 = i0__namespace.ɵɵnextContext(2); return i0__namespace.ɵɵresetView(ctx_r1.onOpenChange($event)); });
|
|
305
|
+
i0__namespace.ɵɵelementStart(4, "button", 12);
|
|
306
|
+
i0__namespace.ɵɵtext(5);
|
|
307
|
+
i0__namespace.ɵɵelement(6, "span", 13);
|
|
308
|
+
i0__namespace.ɵɵelementEnd();
|
|
309
|
+
i0__namespace.ɵɵtemplate(7, PaginationComponent_Conditional_1_Conditional_1_ul_7_Template, 3, 0, "ul", 14);
|
|
310
|
+
i0__namespace.ɵɵelementEnd()();
|
|
311
|
+
i0__namespace.ɵɵtemplate(8, PaginationComponent_Conditional_1_Conditional_1_Conditional_8_Template, 8, 3, "li", 15);
|
|
312
|
+
} if (rf & 2) {
|
|
313
|
+
const ctx_r1 = i0__namespace.ɵɵnextContext(2);
|
|
314
|
+
i0__namespace.ɵɵadvance();
|
|
315
|
+
i0__namespace.ɵɵproperty("title", ctx_r1.appLocale.LABEL_ITEMS_PER_PAGE);
|
|
316
|
+
i0__namespace.ɵɵadvance();
|
|
317
|
+
i0__namespace.ɵɵtextInterpolate1("", ctx_r1.appLocale.LABEL_ITEMS_PER_PAGE, " :");
|
|
318
|
+
i0__namespace.ɵɵadvance(3);
|
|
319
|
+
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.maxResults, " ");
|
|
320
|
+
i0__namespace.ɵɵadvance(3);
|
|
321
|
+
i0__namespace.ɵɵconditional((ctx_r1.rowSummary == null ? null : ctx_r1.rowSummary.totalRecords) ? 8 : -1);
|
|
322
|
+
} }
|
|
323
|
+
function PaginationComponent_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
324
|
+
const _r11 = i0__namespace.ɵɵgetCurrentView();
|
|
325
|
+
i0__namespace.ɵɵelementStart(0, "ul");
|
|
326
|
+
i0__namespace.ɵɵtemplate(1, PaginationComponent_Conditional_1_Conditional_1_Template, 9, 4);
|
|
327
|
+
i0__namespace.ɵɵelementStart(2, "li", 33)(3, "a", 34);
|
|
328
|
+
i0__namespace.ɵɵlistener("click", function PaginationComponent_Conditional_1_Template_a_click_3_listener($event) { i0__namespace.ɵɵrestoreView(_r11); const ctx_r1 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(ctx_r1.navigatePage("prev", $event)); });
|
|
329
|
+
i0__namespace.ɵɵelementStart(4, "span", 20);
|
|
330
|
+
i0__namespace.ɵɵelement(5, "i", 24);
|
|
331
|
+
i0__namespace.ɵɵelementEnd();
|
|
332
|
+
i0__namespace.ɵɵtext(6);
|
|
333
|
+
i0__namespace.ɵɵelementStart(7, "span", 22);
|
|
334
|
+
i0__namespace.ɵɵtext(8);
|
|
335
|
+
i0__namespace.ɵɵelementEnd()()();
|
|
336
|
+
i0__namespace.ɵɵelementStart(9, "li", 35)(10, "a", 34);
|
|
337
|
+
i0__namespace.ɵɵlistener("click", function PaginationComponent_Conditional_1_Template_a_click_10_listener($event) { i0__namespace.ɵɵrestoreView(_r11); const ctx_r1 = i0__namespace.ɵɵnextContext(); return i0__namespace.ɵɵresetView(ctx_r1.navigatePage("next", $event)); });
|
|
338
|
+
i0__namespace.ɵɵelementStart(11, "span", 20);
|
|
339
|
+
i0__namespace.ɵɵelement(12, "i", 29);
|
|
340
|
+
i0__namespace.ɵɵelementEnd();
|
|
341
|
+
i0__namespace.ɵɵtext(13);
|
|
342
|
+
i0__namespace.ɵɵelementStart(14, "span", 22);
|
|
343
|
+
i0__namespace.ɵɵtext(15);
|
|
201
344
|
i0__namespace.ɵɵelementEnd()()()();
|
|
202
345
|
} if (rf & 2) {
|
|
203
346
|
const ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
204
347
|
i0__namespace.ɵɵclassMapInterpolate1("pager ", ctx_r1.navigationClass, "");
|
|
205
348
|
i0__namespace.ɵɵadvance();
|
|
206
|
-
i0__namespace.ɵɵ
|
|
349
|
+
i0__namespace.ɵɵconditional(ctx_r1.allowpagesizechange ? 1 : -1);
|
|
350
|
+
i0__namespace.ɵɵadvance();
|
|
351
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(12, _c2, ctx_r1.isDisablePrevious));
|
|
207
352
|
i0__namespace.ɵɵadvance();
|
|
208
353
|
i0__namespace.ɵɵattribute("aria-disabled", ctx_r1.isDisablePrevious);
|
|
209
354
|
i0__namespace.ɵɵadvance(3);
|
|
@@ -211,7 +356,7 @@
|
|
|
211
356
|
i0__namespace.ɵɵadvance(2);
|
|
212
357
|
i0__namespace.ɵɵtextInterpolate(ctx_r1.isDisablePrevious ? " , Disabled" : "");
|
|
213
358
|
i0__namespace.ɵɵadvance();
|
|
214
|
-
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(
|
|
359
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(14, _c2, ctx_r1.isDisableNext));
|
|
215
360
|
i0__namespace.ɵɵadvance();
|
|
216
361
|
i0__namespace.ɵɵattribute("aria-disabled", ctx_r1.isDisableNext);
|
|
217
362
|
i0__namespace.ɵɵadvance(3);
|
|
@@ -219,21 +364,96 @@
|
|
|
219
364
|
i0__namespace.ɵɵadvance(2);
|
|
220
365
|
i0__namespace.ɵɵtextInterpolate(ctx_r1.isDisableNext ? " , Disabled" : "");
|
|
221
366
|
} }
|
|
222
|
-
function
|
|
223
|
-
const
|
|
224
|
-
i0__namespace.ɵɵelementStart(0, "
|
|
225
|
-
i0__namespace.ɵɵlistener("
|
|
367
|
+
function PaginationComponent_Conditional_2_Conditional_0_ul_7_For_2_Template(rf, ctx) { if (rf & 1) {
|
|
368
|
+
const _r17 = i0__namespace.ɵɵgetCurrentView();
|
|
369
|
+
i0__namespace.ɵɵelementStart(0, "li", 17)(1, "a", 18);
|
|
370
|
+
i0__namespace.ɵɵlistener("click", function PaginationComponent_Conditional_2_Conditional_0_ul_7_For_2_Template_a_click_1_listener($event) { const option_r18 = i0__namespace.ɵɵrestoreView(_r17).$implicit; const ctx_r1 = i0__namespace.ɵɵnextContext(4); return i0__namespace.ɵɵresetView(ctx_r1.onPageSizeChange($event, option_r18)); })("keydown", function PaginationComponent_Conditional_2_Conditional_0_ul_7_For_2_Template_a_keydown_1_listener($event) { const ɵ$index_190_r19 = i0__namespace.ɵɵrestoreView(_r17).$index; const ctx_r1 = i0__namespace.ɵɵnextContext(4); return i0__namespace.ɵɵresetView(ctx_r1.onDropdownKeydown($event, ɵ$index_190_r19)); });
|
|
371
|
+
i0__namespace.ɵɵtext(2);
|
|
372
|
+
i0__namespace.ɵɵelementEnd()();
|
|
373
|
+
} if (rf & 2) {
|
|
374
|
+
const option_r18 = ctx.$implicit;
|
|
375
|
+
const ɵ$index_190_r19 = ctx.$index;
|
|
376
|
+
const ctx_r1 = i0__namespace.ɵɵnextContext(4);
|
|
377
|
+
i0__namespace.ɵɵproperty("ngClass", i0__namespace.ɵɵpureFunction1(3, _c1, option_r18 == ctx_r1.maxResults));
|
|
378
|
+
i0__namespace.ɵɵadvance();
|
|
379
|
+
i0__namespace.ɵɵattribute("tabindex", ɵ$index_190_r19 === ctx_r1.focusedIndex ? 0 : -1);
|
|
380
|
+
i0__namespace.ɵɵadvance();
|
|
381
|
+
i0__namespace.ɵɵtextInterpolate(option_r18);
|
|
382
|
+
} }
|
|
383
|
+
function PaginationComponent_Conditional_2_Conditional_0_ul_7_Template(rf, ctx) { if (rf & 1) {
|
|
384
|
+
i0__namespace.ɵɵelementStart(0, "ul", 16);
|
|
385
|
+
i0__namespace.ɵɵrepeaterCreate(1, PaginationComponent_Conditional_2_Conditional_0_ul_7_For_2_Template, 3, 5, "li", 17, i0__namespace.ɵɵrepeaterTrackByIdentity);
|
|
226
386
|
i0__namespace.ɵɵelementEnd();
|
|
227
387
|
} if (rf & 2) {
|
|
228
|
-
const ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
388
|
+
const ctx_r1 = i0__namespace.ɵɵnextContext(3);
|
|
389
|
+
i0__namespace.ɵɵadvance();
|
|
390
|
+
i0__namespace.ɵɵrepeater(ctx_r1.pageSizeOptions);
|
|
391
|
+
} }
|
|
392
|
+
function PaginationComponent_Conditional_2_Conditional_0_Conditional_8_Template(rf, ctx) { if (rf & 1) {
|
|
393
|
+
i0__namespace.ɵɵelementStart(0, "div", 15)(1, "div")(2, "span");
|
|
394
|
+
i0__namespace.ɵɵtext(3);
|
|
395
|
+
i0__namespace.ɵɵelementEnd();
|
|
396
|
+
i0__namespace.ɵɵelementStart(4, "span");
|
|
397
|
+
i0__namespace.ɵɵtext(5, "of");
|
|
398
|
+
i0__namespace.ɵɵelementEnd();
|
|
399
|
+
i0__namespace.ɵɵelementStart(6, "span");
|
|
400
|
+
i0__namespace.ɵɵtext(7);
|
|
401
|
+
i0__namespace.ɵɵelementEnd()()();
|
|
402
|
+
} if (rf & 2) {
|
|
403
|
+
const ctx_r1 = i0__namespace.ɵɵnextContext(3);
|
|
404
|
+
i0__namespace.ɵɵadvance(3);
|
|
405
|
+
i0__namespace.ɵɵtextInterpolate2("", ctx_r1.rowSummary.startIndex, " - ", ctx_r1.rowSummary.endIndex, "");
|
|
406
|
+
i0__namespace.ɵɵadvance(4);
|
|
407
|
+
i0__namespace.ɵɵtextInterpolate(ctx_r1.rowSummary.totalRecords);
|
|
408
|
+
} }
|
|
409
|
+
function PaginationComponent_Conditional_2_Conditional_0_Template(rf, ctx) { if (rf & 1) {
|
|
410
|
+
const _r16 = i0__namespace.ɵɵgetCurrentView();
|
|
411
|
+
i0__namespace.ɵɵelementStart(0, "div", 9)(1, "label", 10);
|
|
412
|
+
i0__namespace.ɵɵtext(2);
|
|
413
|
+
i0__namespace.ɵɵelementEnd();
|
|
414
|
+
i0__namespace.ɵɵelementStart(3, "div", 11);
|
|
415
|
+
i0__namespace.ɵɵlistener("isOpenChange", function PaginationComponent_Conditional_2_Conditional_0_Template_div_isOpenChange_3_listener($event) { i0__namespace.ɵɵrestoreView(_r16); const ctx_r1 = i0__namespace.ɵɵnextContext(2); return i0__namespace.ɵɵresetView(ctx_r1.onOpenChange($event)); });
|
|
416
|
+
i0__namespace.ɵɵelementStart(4, "button", 12);
|
|
417
|
+
i0__namespace.ɵɵtext(5);
|
|
418
|
+
i0__namespace.ɵɵelement(6, "span", 13);
|
|
419
|
+
i0__namespace.ɵɵelementEnd();
|
|
420
|
+
i0__namespace.ɵɵtemplate(7, PaginationComponent_Conditional_2_Conditional_0_ul_7_Template, 3, 0, "ul", 14);
|
|
421
|
+
i0__namespace.ɵɵelementEnd()();
|
|
422
|
+
i0__namespace.ɵɵtemplate(8, PaginationComponent_Conditional_2_Conditional_0_Conditional_8_Template, 8, 3, "div", 15);
|
|
423
|
+
} if (rf & 2) {
|
|
424
|
+
const ctx_r1 = i0__namespace.ɵɵnextContext(2);
|
|
425
|
+
i0__namespace.ɵɵadvance();
|
|
426
|
+
i0__namespace.ɵɵproperty("title", ctx_r1.appLocale.LABEL_ITEMS_PER_PAGE);
|
|
427
|
+
i0__namespace.ɵɵadvance();
|
|
428
|
+
i0__namespace.ɵɵtextInterpolate1("", ctx_r1.appLocale.LABEL_ITEMS_PER_PAGE, " :");
|
|
429
|
+
i0__namespace.ɵɵadvance(3);
|
|
430
|
+
i0__namespace.ɵɵtextInterpolate1(" ", ctx_r1.maxResults, " ");
|
|
431
|
+
i0__namespace.ɵɵadvance(3);
|
|
432
|
+
i0__namespace.ɵɵconditional((ctx_r1.rowSummary == null ? null : ctx_r1.rowSummary.totalRecords) ? 8 : -1);
|
|
433
|
+
} }
|
|
434
|
+
function PaginationComponent_Conditional_2_Conditional_1_Template(rf, ctx) { if (rf & 1) {
|
|
435
|
+
const _r20 = i0__namespace.ɵɵgetCurrentView();
|
|
436
|
+
i0__namespace.ɵɵelementStart(0, "pagination", 37);
|
|
437
|
+
i0__namespace.ɵɵlistener("pageChanged", function PaginationComponent_Conditional_2_Conditional_1_Template_pagination_pageChanged_0_listener($event) { i0__namespace.ɵɵrestoreView(_r20); const ctx_r1 = i0__namespace.ɵɵnextContext(2); return i0__namespace.ɵɵresetView(ctx_r1.pageChanged($event)); });
|
|
438
|
+
i0__namespace.ɵɵelementEnd();
|
|
439
|
+
} if (rf & 2) {
|
|
440
|
+
const ctx_r1 = i0__namespace.ɵɵnextContext(2);
|
|
441
|
+
const pageTemplate_r21 = i0__namespace.ɵɵreference(5);
|
|
442
|
+
const prevTemplate_r22 = i0__namespace.ɵɵreference(7);
|
|
443
|
+
const nextTemplate_r23 = i0__namespace.ɵɵreference(9);
|
|
444
|
+
i0__namespace.ɵɵproperty("ngClass", ctx_r1.navigationClass)("itemsPerPage", ctx_r1.maxResults)("totalItems", ctx_r1.dataSize)("ngModelOptions", i0__namespace.ɵɵpureFunction0(12, _c3))("ngModel", ctx_r1.dn.currentPage)("boundaryLinks", ctx_r1.boundarylinks)("maxSize", ctx_r1.maxsize)("directionLinks", ctx_r1.directionlinks)("customPreviousTemplate", prevTemplate_r22)("customNextTemplate", nextTemplate_r23)("customPageTemplate", pageTemplate_r21);
|
|
233
445
|
i0__namespace.ɵɵattribute("aria-label", "Showing Page " + ctx_r1.dn.currentPage + " of " + ctx_r1.pageCount + " pages");
|
|
234
446
|
} }
|
|
447
|
+
function PaginationComponent_Conditional_2_Template(rf, ctx) { if (rf & 1) {
|
|
448
|
+
i0__namespace.ɵɵtemplate(0, PaginationComponent_Conditional_2_Conditional_0_Template, 9, 4)(1, PaginationComponent_Conditional_2_Conditional_1_Template, 1, 13, "pagination", 36);
|
|
449
|
+
} if (rf & 2) {
|
|
450
|
+
const ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
451
|
+
i0__namespace.ɵɵconditional(ctx_r1.allowpagesizechange ? 0 : -1);
|
|
452
|
+
i0__namespace.ɵɵadvance();
|
|
453
|
+
i0__namespace.ɵɵconditional(!(ctx_r1.dataSize <= ctx_r1.maxResults) ? 1 : -1);
|
|
454
|
+
} }
|
|
235
455
|
function PaginationComponent_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
236
|
-
i0__namespace.ɵɵelementStart(0, "ul",
|
|
456
|
+
i0__namespace.ɵɵelementStart(0, "ul", 4)(1, "li", 38)(2, "a", 32);
|
|
237
457
|
i0__namespace.ɵɵtext(3);
|
|
238
458
|
i0__namespace.ɵɵelementEnd()()();
|
|
239
459
|
} if (rf & 2) {
|
|
@@ -242,50 +462,50 @@
|
|
|
242
462
|
i0__namespace.ɵɵtextInterpolate2("", ctx_r1.appLocale.LABEL_TOTAL_RECORDS, ": ", ctx_r1.dataSize, "");
|
|
243
463
|
} }
|
|
244
464
|
function PaginationComponent_ng_template_4_Conditional_3_Template(rf, ctx) { if (rf & 1) {
|
|
245
|
-
i0__namespace.ɵɵelementStart(0, "span",
|
|
465
|
+
i0__namespace.ɵɵelementStart(0, "span", 22);
|
|
246
466
|
i0__namespace.ɵɵtext(1);
|
|
247
467
|
i0__namespace.ɵɵelementEnd();
|
|
248
468
|
} if (rf & 2) {
|
|
249
|
-
const
|
|
469
|
+
const page_r24 = i0__namespace.ɵɵnextContext().$implicit;
|
|
250
470
|
const ctx_r1 = i0__namespace.ɵɵnextContext();
|
|
251
471
|
i0__namespace.ɵɵadvance();
|
|
252
|
-
i0__namespace.ɵɵtextInterpolate1(" ", ", Showing page " +
|
|
472
|
+
i0__namespace.ɵɵtextInterpolate1(" ", ", Showing page " + page_r24.number + " of " + ctx_r1.pageCount, "");
|
|
253
473
|
} }
|
|
254
474
|
function PaginationComponent_ng_template_4_Template(rf, ctx) { if (rf & 1) {
|
|
255
|
-
i0__namespace.ɵɵelementStart(0, "span",
|
|
475
|
+
i0__namespace.ɵɵelementStart(0, "span", 22);
|
|
256
476
|
i0__namespace.ɵɵtext(1);
|
|
257
477
|
i0__namespace.ɵɵelementEnd();
|
|
258
478
|
i0__namespace.ɵɵtext(2);
|
|
259
|
-
i0__namespace.ɵɵtemplate(3, PaginationComponent_ng_template_4_Conditional_3_Template, 2, 1, "span",
|
|
479
|
+
i0__namespace.ɵɵtemplate(3, PaginationComponent_ng_template_4_Conditional_3_Template, 2, 1, "span", 22);
|
|
260
480
|
} if (rf & 2) {
|
|
261
|
-
const
|
|
262
|
-
i0__namespace.ɵɵattribute("data-isacitvepage",
|
|
481
|
+
const page_r24 = ctx.$implicit;
|
|
482
|
+
i0__namespace.ɵɵattribute("data-isacitvepage", page_r24.active);
|
|
263
483
|
i0__namespace.ɵɵadvance();
|
|
264
484
|
i0__namespace.ɵɵtextInterpolate("Page ");
|
|
265
485
|
i0__namespace.ɵɵadvance();
|
|
266
|
-
i0__namespace.ɵɵtextInterpolate1(" ",
|
|
486
|
+
i0__namespace.ɵɵtextInterpolate1(" ", page_r24.number, " ");
|
|
267
487
|
i0__namespace.ɵɵadvance();
|
|
268
|
-
i0__namespace.ɵɵconditional(
|
|
488
|
+
i0__namespace.ɵɵconditional(page_r24.active ? 3 : -1);
|
|
269
489
|
} }
|
|
270
490
|
function PaginationComponent_ng_template_6_Template(rf, ctx) { if (rf & 1) {
|
|
271
|
-
i0__namespace.ɵɵelementStart(0, "span",
|
|
491
|
+
i0__namespace.ɵɵelementStart(0, "span", 22);
|
|
272
492
|
i0__namespace.ɵɵtext(1);
|
|
273
493
|
i0__namespace.ɵɵelementEnd();
|
|
274
494
|
} if (rf & 2) {
|
|
275
|
-
const
|
|
276
|
-
i0__namespace.ɵɵattribute("data-isdisabled",
|
|
495
|
+
const disabled_r25 = ctx.disabled;
|
|
496
|
+
i0__namespace.ɵɵattribute("data-isdisabled", disabled_r25);
|
|
277
497
|
i0__namespace.ɵɵadvance();
|
|
278
|
-
i0__namespace.ɵɵtextInterpolate1("Go to Previous page ",
|
|
498
|
+
i0__namespace.ɵɵtextInterpolate1("Go to Previous page ", disabled_r25 ? ", Disabled" : "", "");
|
|
279
499
|
} }
|
|
280
500
|
function PaginationComponent_ng_template_8_Template(rf, ctx) { if (rf & 1) {
|
|
281
|
-
i0__namespace.ɵɵelementStart(0, "span",
|
|
501
|
+
i0__namespace.ɵɵelementStart(0, "span", 22);
|
|
282
502
|
i0__namespace.ɵɵtext(1);
|
|
283
503
|
i0__namespace.ɵɵelementEnd();
|
|
284
504
|
} if (rf & 2) {
|
|
285
|
-
const
|
|
286
|
-
i0__namespace.ɵɵattribute("data-isdisabled",
|
|
505
|
+
const disabled_r26 = ctx.disabled;
|
|
506
|
+
i0__namespace.ɵɵattribute("data-isdisabled", disabled_r26);
|
|
287
507
|
i0__namespace.ɵɵadvance();
|
|
288
|
-
i0__namespace.ɵɵtextInterpolate1("Go to Next page ",
|
|
508
|
+
i0__namespace.ɵɵtextInterpolate1("Go to Next page ", disabled_r26 ? ", Disabled" : "", "");
|
|
289
509
|
} }
|
|
290
510
|
const DEFAULT_CLS = 'app-datanavigator clearfix';
|
|
291
511
|
const WIDGET_CONFIG = { widgetType: 'wm-pagination', hostClass: DEFAULT_CLS };
|
|
@@ -325,6 +545,8 @@
|
|
|
325
545
|
this.parent = parent;
|
|
326
546
|
this.resultEmitter = new i0.EventEmitter();
|
|
327
547
|
this.maxResultsEmitter = new i0.EventEmitter();
|
|
548
|
+
this.defaultPageSizeOptions = [];
|
|
549
|
+
this.focusedIndex = 0;
|
|
328
550
|
this.dn = {
|
|
329
551
|
currentPage: 1
|
|
330
552
|
};
|
|
@@ -336,10 +558,13 @@
|
|
|
336
558
|
this._debouncedApplyDataset = core.debounce(() => this.widget.dataset = this.dataset, base.DEBOUNCE_TIMES.PAGINATION_DEBOUNCE_TIME);
|
|
337
559
|
this._debouncedPageChanged = core.debounce(event => {
|
|
338
560
|
const currentPage = event && event.page;
|
|
561
|
+
const maxResults = event && (event.pagesize || event.itemsPerPage) || this.maxResults;
|
|
339
562
|
// Do not call goToPage if page has not changed
|
|
340
|
-
if (currentPage !== this.dn.currentPage) {
|
|
563
|
+
if (currentPage !== this.dn.currentPage || this.maxResults !== maxResults) {
|
|
341
564
|
const inst = this.parent || this;
|
|
342
565
|
this.dn.currentPage = currentPage;
|
|
566
|
+
this.maxResults = maxResults;
|
|
567
|
+
this.maxResultsEmitter.emit(this.maxResults);
|
|
343
568
|
inst.invokeEventCallback('paginationchange', { $event: undefined, $index: this.dn.currentPage });
|
|
344
569
|
this.goToPage();
|
|
345
570
|
if (this.navigation === 'Basic') {
|
|
@@ -348,6 +573,11 @@
|
|
|
348
573
|
}
|
|
349
574
|
}, base.DEBOUNCE_TIMES.PAGINATION_DEBOUNCE_TIME);
|
|
350
575
|
base.styler(this.nativeElement, this);
|
|
576
|
+
setTimeout(() => {
|
|
577
|
+
this.allowpagesizechange = this.parent.allowpagesizechange;
|
|
578
|
+
if (this.allowpagesizechange)
|
|
579
|
+
this.defaultPageSizeOptions = this.parent?.pagesizeoptions ? this.parent.pagesizeoptions?.split(',').map(Number).sort((a, b) => a - b) : [];
|
|
580
|
+
}, 0);
|
|
351
581
|
}
|
|
352
582
|
setResult(result) {
|
|
353
583
|
// TODO: Emit event only if result is changed
|
|
@@ -435,11 +665,22 @@
|
|
|
435
665
|
isDataSourceHasPaging() {
|
|
436
666
|
return this.datasource && this.datasource.execute(core.DataSource.Operation.IS_PAGEABLE);
|
|
437
667
|
}
|
|
668
|
+
// this function returns an object which gives summary of the current page data (ex: In UI it is shown as 1 to 10 out of 50 records)
|
|
669
|
+
getPageDetails(startIndex, endIndex, totalRecords) {
|
|
670
|
+
this.rowSummary = (core.isDefined(startIndex) && core.isDefined(endIndex) && core.isDefined(totalRecords)) ? {
|
|
671
|
+
startIndex: startIndex,
|
|
672
|
+
endIndex: endIndex,
|
|
673
|
+
totalRecords: totalRecords
|
|
674
|
+
} : {};
|
|
675
|
+
}
|
|
438
676
|
// Set the result for client side pagination
|
|
439
677
|
setNonPageableData(newVal) {
|
|
440
678
|
let dataSize, maxResults, currentPage, startIndex;
|
|
441
679
|
dataSize = lodashEs.isArray(newVal) ? newVal.length : (lodashEs.isEmpty(newVal) ? 0 : 1);
|
|
442
680
|
maxResults = (this.options && this.options.maxResults) || dataSize;
|
|
681
|
+
if (this.allowpagesizechange) { // when default page size is not given then use maxResults instead of options.maxResults
|
|
682
|
+
maxResults = this.maxResults;
|
|
683
|
+
}
|
|
443
684
|
// For static variable, keep the current page. For other variables without pagination reset the page to 1
|
|
444
685
|
// Fix for [WMS-23263]: gridOptions.isNextPageData flag is false when dataset is changed from script, so setting current page to 1
|
|
445
686
|
if (this.datasource && (this.datasource.execute(core.DataSource.Operation.IS_API_AWARE) || (this.parent.widgetType === 'wm-table' && (this.parent.gridOptions.isNavTypeScrollOrOndemand() && (lodashEs.get(this.parent, 'gridOptions.lastActionPerformed') === this.parent.gridOptions.ACTIONS.DATASET_UPDATE || !lodashEs.get(this.parent, 'gridOptions.isNextPageData')))))) {
|
|
@@ -451,11 +692,12 @@
|
|
|
451
692
|
this.setDefaultPagingValues(dataSize, maxResults, currentPage);
|
|
452
693
|
this.disableNavigation();
|
|
453
694
|
startIndex = (this.dn.currentPage - 1) * this.maxResults;
|
|
695
|
+
this.getPageDetails(startIndex + 1, Math.min(startIndex + this.maxResults, newVal?.length), newVal?.length);
|
|
454
696
|
this.setResult(lodashEs.isArray(newVal) ? newVal.slice(startIndex, startIndex + this.maxResults) : newVal);
|
|
455
697
|
}
|
|
456
698
|
/*Function to set the values needed for pagination*/
|
|
457
699
|
setPagingValues(newVal) {
|
|
458
|
-
let dataSize, maxResults, currentPage, dataSource;
|
|
700
|
+
let dataSize, maxResults, currentPage, startIndex, dataSource;
|
|
459
701
|
let variableOptions = {};
|
|
460
702
|
// Store the data in __fullData. This is used for client side searching witvah out modifying the actual dataset.
|
|
461
703
|
this.__fullData = newVal;
|
|
@@ -487,6 +729,8 @@
|
|
|
487
729
|
this.setDefaultPagingValues(dataSize, maxResults, currentPage);
|
|
488
730
|
this.disableNavigation();
|
|
489
731
|
this.checkDataSize(dataSize, this.pagination.numberOfElements, this.pagination.size);
|
|
732
|
+
startIndex = (currentPage - 1) * this.maxResults;
|
|
733
|
+
this.getPageDetails(startIndex + 1, startIndex + this.pagination.numberOfElements, dataSize);
|
|
490
734
|
this.setResult(newVal);
|
|
491
735
|
}
|
|
492
736
|
else if (!lodashEs.isString(newVal)) {
|
|
@@ -538,15 +782,19 @@
|
|
|
538
782
|
/*Function to navigate to the current page*/
|
|
539
783
|
goToPage(event, callback) {
|
|
540
784
|
this.firstRow = (this.dn.currentPage - 1) * this.maxResults;
|
|
541
|
-
const mode = this.parent.statePersistence.computeMode(this.statehandler);
|
|
785
|
+
const mode = this.parent.statePersistence.computeMode(this.statehandler), allowpagesizechange = this.parent.allowpagesizechange;
|
|
542
786
|
if (mode && mode.toLowerCase() !== 'none' && (this.parent.widgetType === 'wm-table' || this.parent.widgetType === 'wm-list')) {
|
|
543
787
|
this.parent._selectedItemsExist = true;
|
|
544
|
-
if (this.isFirstPage()) {
|
|
788
|
+
if (this.isFirstPage() && !allowpagesizechange) {
|
|
545
789
|
this.parent.statePersistence.removeWidgetState(this.parent, 'pagination');
|
|
546
790
|
}
|
|
547
791
|
else {
|
|
548
792
|
if (base.unsupportedStatePersistenceTypes.indexOf(this.parent.navigation) < 0) {
|
|
549
|
-
|
|
793
|
+
const state = { pagination: this.dn.currentPage };
|
|
794
|
+
if (allowpagesizechange) {
|
|
795
|
+
state.pagesize = this.maxResults;
|
|
796
|
+
}
|
|
797
|
+
this.parent.statePersistence.setWidgetState(this.parent, state);
|
|
550
798
|
}
|
|
551
799
|
else if (this.parent.widgetType === 'wm-list' || this.parent.widgetType === 'wm-table') {
|
|
552
800
|
console.warn('Retain State handling on Widget ' + this.parent.name + ' is not supported for current pagination type.');
|
|
@@ -579,12 +827,15 @@
|
|
|
579
827
|
}
|
|
580
828
|
this.datasource.execute(core.DataSource.Operation.LIST_RECORDS, {
|
|
581
829
|
'page': pageIndex,
|
|
830
|
+
'size': this.maxResults,
|
|
582
831
|
'filterFields': this.filterFields,
|
|
583
832
|
'orderBy': this.sortOptions,
|
|
584
833
|
'logicalOp': this.logicalOp,
|
|
585
834
|
'matchMode': 'anywhereignorecase'
|
|
586
835
|
}).then(response => {
|
|
587
836
|
this.onPageDataReady(event, response && response.data, callback);
|
|
837
|
+
startIndex = (this.dn.currentPage - 1) * this.maxResults;
|
|
838
|
+
this.getPageDetails(startIndex + 1, startIndex + this.pagination?.numberOfElements, this.pagination?.totalElements);
|
|
588
839
|
core.$appDigest();
|
|
589
840
|
}, error => {
|
|
590
841
|
});
|
|
@@ -597,6 +848,7 @@
|
|
|
597
848
|
startIndex = (this.dn.currentPage - 1) * this.maxResults;
|
|
598
849
|
}
|
|
599
850
|
data = lodashEs.isArray(this.__fullData) ? this.__fullData.slice(startIndex, startIndex + this.maxResults) : this.__fullData;
|
|
851
|
+
this.getPageDetails(startIndex + 1, Math.min(startIndex + this.maxResults, this.__fullData?.length), this.__fullData?.length);
|
|
600
852
|
this.setResult(data);
|
|
601
853
|
this.onPageDataReady(event, data, callback);
|
|
602
854
|
}
|
|
@@ -756,6 +1008,7 @@
|
|
|
756
1008
|
this.datasource = dataSource;
|
|
757
1009
|
}
|
|
758
1010
|
onPropertyChange(key, nv, ov) {
|
|
1011
|
+
let pageSize;
|
|
759
1012
|
if (key === 'dataset') {
|
|
760
1013
|
let data;
|
|
761
1014
|
if (this.parent && this.parent.onDataNavigatorDataSetChange) {
|
|
@@ -768,6 +1021,42 @@
|
|
|
768
1021
|
if (this.parent.widgetType === 'wm-table') {
|
|
769
1022
|
this.parent._triggeredByUser = false;
|
|
770
1023
|
}
|
|
1024
|
+
if (data?.length) { // calculate Pagesize options based on actual page size
|
|
1025
|
+
if (this.isDataSourceHasPaging()) { // for Live variables
|
|
1026
|
+
const currentPageSize = lodashEs.get(data, 'pagination.size') || lodashEs.get(this.datasource, 'pagination.size'), totalElements = lodashEs.get(data, 'pagination.totalElements') || lodashEs.get(this.datasource, 'pagination.totalElements'), widgetState = this.parent.statePersistence.getWidgetState(this.parent);
|
|
1027
|
+
this.actualPageSize = widgetState?.actualpagesize || currentPageSize;
|
|
1028
|
+
if (this.defaultPageSizeOptions.length > 0) {
|
|
1029
|
+
this.pageSizeOptions = [...this.defaultPageSizeOptions];
|
|
1030
|
+
}
|
|
1031
|
+
else {
|
|
1032
|
+
this.pageSizeOptions = lodashEs.range(this.actualPageSize, Math.max(this.actualPageSize + 1, this.actualPageSize + totalElements), this.actualPageSize); // here data has only that page data and pagesize has totalNoof Elements
|
|
1033
|
+
}
|
|
1034
|
+
if (widgetState?.selectedItem && widgetState.actualpagesize !== widgetState.pagesize) {
|
|
1035
|
+
if (!this.prevPageSize) {
|
|
1036
|
+
this.prevPageSize = this.actualPageSize || data?.length;
|
|
1037
|
+
}
|
|
1038
|
+
const updatedItems = this.handleStateParamsforNewPageSize(widgetState.selectedItem, this.prevPageSize, data?.length);
|
|
1039
|
+
if (updatedItems) {
|
|
1040
|
+
this.parent.statePersistence.setWidgetState(this.parent, {
|
|
1041
|
+
pagination: 1,
|
|
1042
|
+
pagesize: this.maxResults,
|
|
1043
|
+
actualpagesize: this.actualPageSize || this.maxResults,
|
|
1044
|
+
selectedItem: updatedItems
|
|
1045
|
+
});
|
|
1046
|
+
this.prevPageSize = undefined;
|
|
1047
|
+
}
|
|
1048
|
+
}
|
|
1049
|
+
}
|
|
1050
|
+
else {
|
|
1051
|
+
pageSize = this.parent.getActualPageSize();
|
|
1052
|
+
if (this.defaultPageSizeOptions.length > 0) {
|
|
1053
|
+
this.pageSizeOptions = [...this.defaultPageSizeOptions];
|
|
1054
|
+
}
|
|
1055
|
+
else {
|
|
1056
|
+
this.pageSizeOptions = lodashEs.range(pageSize, data.length + pageSize, pageSize);
|
|
1057
|
+
}
|
|
1058
|
+
}
|
|
1059
|
+
}
|
|
771
1060
|
// When the dataset is not in current page, but in previous ones directly set the result without setting page values
|
|
772
1061
|
if (this.isEditNotInCurrentPage()) {
|
|
773
1062
|
this.setResult(data);
|
|
@@ -796,6 +1085,105 @@
|
|
|
796
1085
|
super.onPropertyChange(key, nv, ov);
|
|
797
1086
|
}
|
|
798
1087
|
}
|
|
1088
|
+
// change the selectedItems page number and index in the stateparams when pagesize is changed
|
|
1089
|
+
handleStateParamsforNewPageSize(selectedItem, oldPageSize, newPageSize) {
|
|
1090
|
+
return selectedItem.map(({ page, index }) => {
|
|
1091
|
+
const absoluteIndex = (page - 1) * oldPageSize + index;
|
|
1092
|
+
const newPage = Math.floor(absoluteIndex / newPageSize) + 1; // back to 1-based
|
|
1093
|
+
const newIndex = absoluteIndex % newPageSize;
|
|
1094
|
+
return {
|
|
1095
|
+
page: newPage,
|
|
1096
|
+
index: newIndex
|
|
1097
|
+
};
|
|
1098
|
+
});
|
|
1099
|
+
}
|
|
1100
|
+
onDropdownKeydown(event, index) {
|
|
1101
|
+
const $items = $('ul#dropdown-basic a.dropdown-item');
|
|
1102
|
+
const maxIndex = this.pageSizeOptions.length - 1;
|
|
1103
|
+
let selectedOption;
|
|
1104
|
+
switch (event.key) {
|
|
1105
|
+
case 'ArrowDown':
|
|
1106
|
+
case 'Tab':
|
|
1107
|
+
event.preventDefault();
|
|
1108
|
+
if (event.key === 'Tab' && event.shiftKey) {
|
|
1109
|
+
// Treat Shift+Tab as ArrowUp
|
|
1110
|
+
this.focusedIndex = (index - 1) < 0 ? maxIndex : index - 1;
|
|
1111
|
+
}
|
|
1112
|
+
else {
|
|
1113
|
+
// Treat Tab or ArrowDown as ArrowDown
|
|
1114
|
+
this.focusedIndex = (index + 1) > maxIndex ? 0 : index + 1;
|
|
1115
|
+
}
|
|
1116
|
+
break;
|
|
1117
|
+
case 'ArrowUp':
|
|
1118
|
+
event.preventDefault();
|
|
1119
|
+
this.focusedIndex = (index - 1) < 0 ? maxIndex : index - 1;
|
|
1120
|
+
break;
|
|
1121
|
+
case 'Enter':
|
|
1122
|
+
event.preventDefault();
|
|
1123
|
+
selectedOption = this.pageSizeOptions[this.focusedIndex];
|
|
1124
|
+
this.onPageSizeChange(event, selectedOption);
|
|
1125
|
+
this.closeDropdown();
|
|
1126
|
+
return;
|
|
1127
|
+
case 'Escape':
|
|
1128
|
+
event.preventDefault();
|
|
1129
|
+
this.closeDropdown();
|
|
1130
|
+
return;
|
|
1131
|
+
default:
|
|
1132
|
+
return;
|
|
1133
|
+
}
|
|
1134
|
+
// Move focus after index is updated
|
|
1135
|
+
setTimeout(() => {
|
|
1136
|
+
$items.eq(this.focusedIndex)?.focus();
|
|
1137
|
+
});
|
|
1138
|
+
}
|
|
1139
|
+
closeDropdown() {
|
|
1140
|
+
// Close dropdown
|
|
1141
|
+
this.bsDropdown.hide();
|
|
1142
|
+
const $toggleButton = $('button[aria-controls="dropdown-basic"]');
|
|
1143
|
+
$toggleButton.focus(); // Return focus to button
|
|
1144
|
+
}
|
|
1145
|
+
// Function gets called on dropdown open & close
|
|
1146
|
+
onOpenChange(isOpen) {
|
|
1147
|
+
if (isOpen) {
|
|
1148
|
+
this.focusedIndex = 0;
|
|
1149
|
+
setTimeout(() => {
|
|
1150
|
+
// manually focus the dropdown as dropdown has container="body"
|
|
1151
|
+
const $items = $('ul#dropdown-basic a.dropdown-item');
|
|
1152
|
+
const $firstItem = $items.eq(this.focusedIndex);
|
|
1153
|
+
$firstItem?.focus();
|
|
1154
|
+
}, 0);
|
|
1155
|
+
}
|
|
1156
|
+
}
|
|
1157
|
+
onPageSizeChange($event, newPageSize) {
|
|
1158
|
+
const widgetState = this.parent.statePersistence.getWidgetState(this.parent);
|
|
1159
|
+
let updatedItems;
|
|
1160
|
+
if (widgetState?.selectedItem) {
|
|
1161
|
+
updatedItems = this.handleStateParamsforNewPageSize(widgetState.selectedItem, this.maxResults, +newPageSize);
|
|
1162
|
+
}
|
|
1163
|
+
this.actualPageSize = this.actualPageSize || this.maxResults;
|
|
1164
|
+
this.maxResults = +newPageSize;
|
|
1165
|
+
this.maxResultsEmitter.emit(this.maxResults);
|
|
1166
|
+
if (this.isDataSourceHasPaging() && this.datasource) {
|
|
1167
|
+
this.datasource.maxResults = this.maxResults;
|
|
1168
|
+
}
|
|
1169
|
+
if (updatedItems) {
|
|
1170
|
+
this.parent.statePersistence.setWidgetState(this.parent, {
|
|
1171
|
+
pagination: 1,
|
|
1172
|
+
pagesize: this.maxResults,
|
|
1173
|
+
actualpagesize: this.actualPageSize || this.maxResults,
|
|
1174
|
+
selectedItem: updatedItems
|
|
1175
|
+
});
|
|
1176
|
+
}
|
|
1177
|
+
else {
|
|
1178
|
+
this.parent.statePersistence.setWidgetState(this.parent, {
|
|
1179
|
+
pagination: 1,
|
|
1180
|
+
pagesize: this.maxResults,
|
|
1181
|
+
actualpagesize: this.actualPageSize || this.maxResults
|
|
1182
|
+
});
|
|
1183
|
+
}
|
|
1184
|
+
this.navigatePage('first', $event, true);
|
|
1185
|
+
this.calculatePagingValues();
|
|
1186
|
+
}
|
|
799
1187
|
ngAfterViewInit() {
|
|
800
1188
|
const paginationElem = this.nativeElement;
|
|
801
1189
|
paginationElem.onclick = (event) => {
|
|
@@ -803,25 +1191,30 @@
|
|
|
803
1191
|
};
|
|
804
1192
|
}
|
|
805
1193
|
static { this.ɵfac = function PaginationComponent_Factory(__ngFactoryType__) { return new (__ngFactoryType__ || PaginationComponent)(i0__namespace.ɵɵdirectiveInject(i0__namespace.Injector), i0__namespace.ɵɵdirectiveInject(base.WidgetRef, 4), i0__namespace.ɵɵdirectiveInject('EXPLICIT_CONTEXT', 8)); }; }
|
|
806
|
-
static { this.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: PaginationComponent, selectors: [["", "wmPagination", ""]],
|
|
1194
|
+
static { this.ɵcmp = /*@__PURE__*/ i0__namespace.ɵɵdefineComponent({ type: PaginationComponent, selectors: [["", "wmPagination", ""]], viewQuery: function PaginationComponent_Query(rf, ctx) { if (rf & 1) {
|
|
1195
|
+
i0__namespace.ɵɵviewQuery(i4.BsDropdownDirective, 5);
|
|
1196
|
+
} if (rf & 2) {
|
|
1197
|
+
let _t;
|
|
1198
|
+
i0__namespace.ɵɵqueryRefresh(_t = i0__namespace.ɵɵloadQuery()) && (ctx.bsDropdown = _t.first);
|
|
1199
|
+
} }, outputs: { resultEmitter: "resultEmitter", maxResultsEmitter: "maxResultsEmitter" }, standalone: true, features: [i0__namespace.ɵɵProvidersFeature([
|
|
807
1200
|
base.provideAsWidgetRef(PaginationComponent)
|
|
808
|
-
]), i0__namespace.ɵɵInheritDefinitionFeature, i0__namespace.ɵɵStandaloneFeature], attrs: _c0, decls: 10, vars: 4, consts: [["pageTemplate", ""], ["prevTemplate", ""], ["nextTemplate", ""], [3, "class"], ["
|
|
809
|
-
i0__namespace.ɵɵtemplate(0, PaginationComponent_Conditional_0_Template,
|
|
1201
|
+
]), i0__namespace.ɵɵInheritDefinitionFeature, i0__namespace.ɵɵStandaloneFeature], attrs: _c0, decls: 10, vars: 4, consts: [["pageTemplate", ""], ["prevTemplate", ""], ["nextTemplate", ""], [3, "class"], [1, "pagination"], [3, "ngClass"], [1, "pagecount", "disabled"], [1, "disabled"], [1, "totalcount", "disabled"], [1, "items-per-page"], [1, "app-label", 3, "title"], ["dropdown", "", "container", "body", 1, "btn-group", 3, "isOpenChange"], ["id", "button-basic", "dropdownToggle", "", "type", "button", "aria-controls", "dropdown-basic", 1, "btn", "app-button", "dropdown-toggle"], [1, "caret"], ["id", "dropdown-basic", "class", "dropdown-menu pagesize-options", "role", "menu", "aria-labelledby", "button-basic", 4, "dropdownMenu"], [1, "item-range"], ["id", "dropdown-basic", "role", "menu", "aria-labelledby", "button-basic", 1, "dropdown-menu", "pagesize-options"], ["role", "menuitem", 3, "ngClass"], [1, "dropdown-item", 3, "click", "keydown"], ["name", "first", "href", "javascript:void(0);", 3, "click", "title"], ["aria-hidden", "true"], [1, "wi", "wi-first-page"], [1, "sr-only"], ["name", "prev", "href", "javascript:void(0);", 3, "click", "title"], [1, "wi", "wi-chevron-left"], ["href", "javascript:void(0);", "aria-label", "Change Page Number"], ["type", "number", 1, "form-control", 3, "ngModelChange", "keydown", "change", "ngModel", "disabled", "ngModelOptions"], [3, "hidden"], ["name", "next", "href", "javascript:void(0);", 3, "click", "title"], [1, "wi", "wi-chevron-right"], ["name", "last", "href", "javascript:void(0);", 3, "click", "title"], [1, "wi", "wi-last-page"], ["href", "javascript:void(0);", "tabindex", "-1", "aria-disabled", "true"], [1, "previous", 3, "ngClass"], ["href", "javascript:void(0);", 3, "click"], [1, "next", 3, "ngClass"], ["role", "navigation", "firstText", "Firtst", "lastText", "Last", 1, "pagination", "basic", 3, "ngClass", "itemsPerPage", "totalItems", "ngModelOptions", "ngModel", "boundaryLinks", "maxSize", "directionLinks", "customPreviousTemplate", "customNextTemplate", "customPageTemplate"], ["role", "navigation", "firstText", "Firtst", "lastText", "Last", 1, "pagination", "basic", 3, "pageChanged", "ngClass", "itemsPerPage", "totalItems", "ngModelOptions", "ngModel", "boundaryLinks", "maxSize", "directionLinks", "customPreviousTemplate", "customNextTemplate", "customPageTemplate"], [1, "totalcount", "disabled", "basiccount"]], template: function PaginationComponent_Template(rf, ctx) { if (rf & 1) {
|
|
1202
|
+
i0__namespace.ɵɵtemplate(0, PaginationComponent_Conditional_0_Template, 9, 11, "ul", 3)(1, PaginationComponent_Conditional_1_Template, 16, 16, "ul", 3)(2, PaginationComponent_Conditional_2_Template, 2, 2)(3, PaginationComponent_Conditional_3_Template, 4, 2, "ul", 4)(4, PaginationComponent_ng_template_4_Template, 4, 4, "ng-template", null, 0, i0__namespace.ɵɵtemplateRefExtractor)(6, PaginationComponent_ng_template_6_Template, 2, 2, "ng-template", null, 1, i0__namespace.ɵɵtemplateRefExtractor)(8, PaginationComponent_ng_template_8_Template, 2, 2, "ng-template", null, 2, i0__namespace.ɵɵtemplateRefExtractor);
|
|
810
1203
|
} if (rf & 2) {
|
|
811
1204
|
i0__namespace.ɵɵconditional(ctx.navcontrols === "Classic" ? 0 : -1);
|
|
812
1205
|
i0__namespace.ɵɵadvance();
|
|
813
1206
|
i0__namespace.ɵɵconditional(ctx.navcontrols === "Pager" ? 1 : -1);
|
|
814
1207
|
i0__namespace.ɵɵadvance();
|
|
815
|
-
i0__namespace.ɵɵconditional(ctx.navcontrols === "Basic"
|
|
1208
|
+
i0__namespace.ɵɵconditional(ctx.navcontrols === "Basic" ? 2 : -1);
|
|
816
1209
|
i0__namespace.ɵɵadvance();
|
|
817
1210
|
i0__namespace.ɵɵconditional(ctx.navcontrols === "Basic" && ctx.showrecordcount ? 3 : -1);
|
|
818
|
-
} }, dependencies: [i1.CommonModule, i1__namespace.NgClass, base.WmComponentsModule, i2.FormsModule, i2__namespace.DefaultValueAccessor, i2__namespace.NumberValueAccessor, i2__namespace.NgControlStatus, i2__namespace.NgModel, i3.PaginationModule, i3__namespace.PaginationComponent], encapsulation: 2 }); }
|
|
1211
|
+
} }, dependencies: [i1.CommonModule, i1__namespace.NgClass, base.WmComponentsModule, i2.FormsModule, i2__namespace.DefaultValueAccessor, i2__namespace.NumberValueAccessor, i2__namespace.NgControlStatus, i2__namespace.NgModel, i3.PaginationModule, i3__namespace.PaginationComponent, i4.BsDropdownModule, i4__namespace.BsDropdownMenuDirective, i4__namespace.BsDropdownToggleDirective, i4__namespace.BsDropdownDirective], encapsulation: 2 }); }
|
|
819
1212
|
}
|
|
820
1213
|
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassMetadata(PaginationComponent, [{
|
|
821
1214
|
type: i0.Component,
|
|
822
|
-
args: [{ standalone: true, imports: [i1.CommonModule, base.WmComponentsModule, i2.FormsModule, i3.PaginationModule], selector: '[wmPagination]', providers: [
|
|
1215
|
+
args: [{ standalone: true, imports: [i1.CommonModule, base.WmComponentsModule, i2.FormsModule, i3.PaginationModule, i4.BsDropdownModule, menu.MenuComponent], selector: '[wmPagination]', providers: [
|
|
823
1216
|
base.provideAsWidgetRef(PaginationComponent)
|
|
824
|
-
], template: "\n@if (navcontrols === 'Classic') {\n<ul class=\"pagination advanced {{navigationClass}}\">\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]=\"{'disabled':isDisableFirst}\">\n <a [title]=\"appLocale.LABEL_FIRST\" name=\"first\" href=\"javascript:void(0);\"\n [attr.aria-disabled]=\"isDisableFirst\"\n (click)=\"navigatePage('first', $event)\">\n <span aria-hidden=\"true\"><i class=\"wi wi-first-page\"></i></span>\n <span class=\"sr-only\">Go to first page {{ isDisableFirst ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]=\"{'disabled':isDisablePrevious}\">\n <a [title]=\"appLocale.LABEL_PREVIOUS\" name=\"prev\" href=\"javascript:void(0);\"\n [attr.aria-disabled]=\"isDisablePrevious\"\n (click)=\"navigatePage('prev', $event)\">\n <span aria-hidden=\"true\"><i class=\"wi wi-chevron-left\"></i></span>\n <span class=\"sr-only\">Go to previous page {{ isDisablePrevious ? ', Disabled' : ''}}</span>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li class=\"pagecount disabled\">\n <a href=\"javascript:void(0);\" aria-label=\"Change Page Number\">\n <input [(ngModel)]=\"dn.currentPage\" [attr.aria-label]=\"'Showing Page ' + dn.currentPage + ' of ' + pageCount\" [disabled]=\"isDisableCurrent\"\n [ngModelOptions]=\"{standalone: true}\"\n type=\"number\"\n (keydown)=\"onKeyDown($event)\" (change)=\"onModelChange($event)\" class=\"form-control\"/>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li class=\"disabled\">\n <a [hidden]=\"isDisableCount\"> / {{pageCount}}</a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]=\"{'disabled':isDisableNext}\">\n <a [title]=\"appLocale.LABEL_NEXT\" name=\"next\" href=\"javascript:void(0);\"\n [attr.aria-disabled]=\"isDisableNext\"\n (click)=\"navigatePage('next', $event)\">\n <span aria-hidden=\"true\"><i class=\"wi wi-chevron-right\"></i></span>\n <span class=\"sr-only\">Go to next page {{ isDisableNext ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]=\"{'disabled':isDisableLast}\">\n <a [title]=\"appLocale.LABEL_LAST\" name=\"last\" href=\"javascript:void(0);\"\n [attr.aria-disabled]=\"isDisableLast\"\n (click)=\"navigatePage('last', $event)\">\n <span aria-hidden=\"true\"><i class=\"wi wi-last-page\"></i></span>\n <span class=\"sr-only\">Go to last page {{ isDisableLast ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n }\n @if (showrecordcount) {\n <li class=\"totalcount disabled\">\n <a href=\"javascript:void(0);\" tabindex=\"-1\" aria-disabled=\"true\">{{appLocale.LABEL_TOTAL_RECORDS}}: {{dataSize}}</a>\n </li>\n }\n </ul>\n}\n@if (navcontrols === 'Pager') {\n <ul class=\"pager {{navigationClass}}\">\n <li class=\"previous\" [ngClass]=\"{'disabled':isDisablePrevious}\">\n <a href=\"javascript:void(0);\" (click)=\"navigatePage('prev', $event)\"\n [attr.aria-disabled]=\"isDisablePrevious\">\n <span aria-hidden=\"true\"><i class=\"wi wi-chevron-left\"></i></span>\n {{appLocale.LABEL_PREVIOUS}}\n <span class=\"sr-only\">{{ isDisablePrevious ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n <li class=\"next\" [ngClass]=\"{'disabled':isDisableNext}\">\n <a href=\"javascript:void(0);\" (click)=\"navigatePage('next', $event)\"\n [attr.aria-disabled]=\"isDisableNext\">\n <span aria-hidden=\"true\"><i class=\"wi wi-chevron-right\"></i></span>\n {{appLocale.LABEL_NEXT}}\n <span class=\"sr-only\">{{ isDisableNext ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n </ul>\n}\n\n@if (navcontrols === 'Basic' && !(dataSize<=maxResults)) {\n <pagination class=\"pagination basic\" [ngClass]=\"navigationClass\" role=\"navigation\"\n [itemsPerPage]=\"maxResults\" [totalItems]=\"dataSize\"\n (pageChanged)=\"pageChanged($event)\" [ngModelOptions]=\"{standalone:true}\" [ngModel]=\"dn.currentPage\"\n [attr.aria-label]=\"'Showing Page ' + dn.currentPage + ' of ' + pageCount + ' pages'\"\n [boundaryLinks]=\"boundarylinks\" [maxSize]=\"maxsize\"\n [directionLinks]=\"directionlinks\"\n firstText=\"Firtst\" lastText=\"Last\"\n [customPreviousTemplate]=\"prevTemplate\"\n [customNextTemplate]=\"nextTemplate\"\n [customPageTemplate]=\"pageTemplate\"></pagination>\n}\n\n@if (navcontrols === 'Basic' && showrecordcount) {\n <ul class=\"pagination\">\n <li class=\"totalcount disabled basiccount\">\n <a href=\"javascript:void(0);\" tabindex=\"-1\" aria-disabled=\"true\">{{appLocale.LABEL_TOTAL_RECORDS}}: {{dataSize}}</a>\n </li>\n </ul>\n}\n\n<ng-template #pageTemplate let-page>\n <span class=\"sr-only\" [attr.data-isacitvepage]=\"page.active\">{{'Page '}}</span>\n {{page.number}}\n @if (page.active) {\n <span class=\"sr-only\"> {{', Showing page ' + page.number + ' of ' + pageCount}}</span>\n }\n</ng-template>\n<ng-template #prevTemplate let-disabled=\"disabled\">\n <span class=\"sr-only\" [attr.data-isdisabled]=\"disabled\">Go to Previous page {{disabled ? ', Disabled' : ''}}</span>\n</ng-template>\n<ng-template #nextTemplate let-disabled=\"disabled\">\n <span class=\"sr-only\" [attr.data-isdisabled]=\"disabled\">Go to Next page {{disabled ? ', Disabled' : ''}}</span>\n</ng-template>\n" }]
|
|
1217
|
+
], template: "\n@if (navcontrols === 'Classic') {\n<ul class=\"pagination advanced {{navigationClass}}\">\n @if (allowpagesizechange) {\n <li class=\"items-per-page\">\n <label [title]=\"appLocale.LABEL_ITEMS_PER_PAGE\" class=\"app-label\">{{appLocale.LABEL_ITEMS_PER_PAGE}} :</label>\n\n <div class=\"btn-group\" dropdown container=\"body\" (isOpenChange)=\"onOpenChange($event)\">\n <button id=\"button-basic\" dropdownToggle type=\"button\" class=\"btn app-button dropdown-toggle\"\n aria-controls=\"dropdown-basic\">\n {{maxResults}} <span class=\"caret\"></span>\n </button>\n <ul id=\"dropdown-basic\" *dropdownMenu class=\"dropdown-menu pagesize-options\"\n role=\"menu\" aria-labelledby=\"button-basic\">\n @for (option of pageSizeOptions; track option; let i = $index) {\n <li role=\"menuitem\" [ngClass]=\"{ 'active': option == maxResults }\">\n <a class=\"dropdown-item\" (click)=\"onPageSizeChange($event, option)\" (keydown)=\"onDropdownKeydown($event, i)\"\n [attr.tabindex]=\"i === focusedIndex ? 0 : -1\">{{option}}</a>\n </li>\n }\n </ul>\n </div>\n </li>\n @if (rowSummary?.totalRecords) {\n <li class=\"item-range\">\n <div>\n <span>{{rowSummary.startIndex}} - {{rowSummary.endIndex}}</span>\n <span>of</span>\n <span>{{rowSummary.totalRecords}}</span>\n </div>\n </li>\n }\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]=\"{'disabled':isDisableFirst}\">\n <a [title]=\"appLocale.LABEL_FIRST\" name=\"first\" href=\"javascript:void(0);\"\n [attr.aria-disabled]=\"isDisableFirst\"\n (click)=\"navigatePage('first', $event)\">\n <span aria-hidden=\"true\"><i class=\"wi wi-first-page\"></i></span>\n <span class=\"sr-only\">Go to first page {{ isDisableFirst ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]=\"{'disabled':isDisablePrevious}\">\n <a [title]=\"appLocale.LABEL_PREVIOUS\" name=\"prev\" href=\"javascript:void(0);\"\n [attr.aria-disabled]=\"isDisablePrevious\"\n (click)=\"navigatePage('prev', $event)\">\n <span aria-hidden=\"true\"><i class=\"wi wi-chevron-left\"></i></span>\n <span class=\"sr-only\">Go to previous page {{ isDisablePrevious ? ', Disabled' : ''}}</span>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li class=\"pagecount disabled\">\n <a href=\"javascript:void(0);\" aria-label=\"Change Page Number\">\n <input [(ngModel)]=\"dn.currentPage\" [attr.aria-label]=\"'Showing Page ' + dn.currentPage + ' of ' + pageCount\" [disabled]=\"isDisableCurrent\"\n [ngModelOptions]=\"{standalone: true}\"\n type=\"number\"\n (keydown)=\"onKeyDown($event)\" (change)=\"onModelChange($event)\" class=\"form-control\"/>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li class=\"disabled\">\n <a [hidden]=\"isDisableCount\"> / {{pageCount}}</a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]=\"{'disabled':isDisableNext}\">\n <a [title]=\"appLocale.LABEL_NEXT\" name=\"next\" href=\"javascript:void(0);\"\n [attr.aria-disabled]=\"isDisableNext\"\n (click)=\"navigatePage('next', $event)\">\n <span aria-hidden=\"true\"><i class=\"wi wi-chevron-right\"></i></span>\n <span class=\"sr-only\">Go to next page {{ isDisableNext ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n }\n @if (!(dataSize<=maxResults)) {\n <li [ngClass]=\"{'disabled':isDisableLast}\">\n <a [title]=\"appLocale.LABEL_LAST\" name=\"last\" href=\"javascript:void(0);\"\n [attr.aria-disabled]=\"isDisableLast\"\n (click)=\"navigatePage('last', $event)\">\n <span aria-hidden=\"true\"><i class=\"wi wi-last-page\"></i></span>\n <span class=\"sr-only\">Go to last page {{ isDisableLast ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n }\n @if (showrecordcount) {\n <li class=\"totalcount disabled\">\n <a href=\"javascript:void(0);\" tabindex=\"-1\" aria-disabled=\"true\">{{appLocale.LABEL_TOTAL_RECORDS}}: {{dataSize}}</a>\n </li>\n }\n</ul>\n}\n@if (navcontrols === 'Pager') {\n <ul class=\"pager {{navigationClass}}\">\n @if (allowpagesizechange) {\n <li class=\"items-per-page\">\n <label [title]=\"appLocale.LABEL_ITEMS_PER_PAGE\" class=\"app-label\">{{appLocale.LABEL_ITEMS_PER_PAGE}} :</label>\n\n <div class=\"btn-group\" dropdown container=\"body\" (isOpenChange)=\"onOpenChange($event)\">\n <button id=\"button-basic\" dropdownToggle type=\"button\" class=\"btn app-button dropdown-toggle\"\n aria-controls=\"dropdown-basic\">\n {{maxResults}} <span class=\"caret\"></span>\n </button>\n <ul id=\"dropdown-basic\" *dropdownMenu class=\"dropdown-menu pagesize-options\"\n role=\"menu\" aria-labelledby=\"button-basic\">\n @for (option of pageSizeOptions; track option; let i = $index) {\n <li role=\"menuitem\" [ngClass]=\"{ 'active': option == maxResults }\">\n <a class=\"dropdown-item\" (click)=\"onPageSizeChange($event, option)\" (keydown)=\"onDropdownKeydown($event, i)\"\n [attr.tabindex]=\"i === focusedIndex ? 0 : -1\">{{option}}</a>\n </li>\n }\n </ul>\n </div>\n </li>\n @if (rowSummary?.totalRecords) {\n <li class=\"item-range\">\n <div>\n <span>{{rowSummary.startIndex}} - {{rowSummary.endIndex}}</span>\n <span>of</span>\n <span>{{rowSummary.totalRecords}}</span>\n </div>\n </li>\n }\n }\n\n <li class=\"previous\" [ngClass]=\"{'disabled':isDisablePrevious}\">\n <a href=\"javascript:void(0);\" (click)=\"navigatePage('prev', $event)\"\n [attr.aria-disabled]=\"isDisablePrevious\">\n <span aria-hidden=\"true\"><i class=\"wi wi-chevron-left\"></i></span>\n {{appLocale.LABEL_PREVIOUS}}\n <span class=\"sr-only\">{{ isDisablePrevious ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n <li class=\"next\" [ngClass]=\"{'disabled':isDisableNext}\">\n <a href=\"javascript:void(0);\" (click)=\"navigatePage('next', $event)\"\n [attr.aria-disabled]=\"isDisableNext\">\n <span aria-hidden=\"true\"><i class=\"wi wi-chevron-right\"></i></span>\n {{appLocale.LABEL_NEXT}}\n <span class=\"sr-only\">{{ isDisableNext ? ' , Disabled' : ''}}</span>\n </a>\n </li>\n </ul>\n}\n\n@if (navcontrols === 'Basic') {\n @if (allowpagesizechange) {\n <div class=\"items-per-page\">\n <label [title]=\"appLocale.LABEL_ITEMS_PER_PAGE\" class=\"app-label\">{{appLocale.LABEL_ITEMS_PER_PAGE }} :</label>\n\n <div class=\"btn-group\" dropdown container=\"body\" (isOpenChange)=\"onOpenChange($event)\">\n <button id=\"button-basic\" dropdownToggle type=\"button\" class=\"btn app-button dropdown-toggle\"\n aria-controls=\"dropdown-basic\">\n {{maxResults}} <span class=\"caret\"></span>\n </button>\n <ul id=\"dropdown-basic\" *dropdownMenu class=\"dropdown-menu pagesize-options\"\n role=\"menu\" aria-labelledby=\"button-basic\">\n @for (option of pageSizeOptions; track option; let i = $index) {\n <li role=\"menuitem\" [ngClass]=\"{ 'active': option == maxResults }\">\n <a class=\"dropdown-item\" (click)=\"onPageSizeChange($event, option)\" (keydown)=\"onDropdownKeydown($event, i)\"\n [attr.tabindex]=\"i === focusedIndex ? 0 : -1\">{{option}}</a>\n </li>\n }\n </ul>\n </div>\n </div>\n @if (rowSummary?.totalRecords) {\n <div class=\"item-range\">\n <div>\n <span>{{rowSummary.startIndex}} - {{rowSummary.endIndex}}</span>\n <span>of</span>\n <span>{{rowSummary.totalRecords}}</span>\n </div>\n </div>\n }\n }\n @if (!(dataSize<=maxResults)) {\n <pagination class=\"pagination basic\" [ngClass]=\"navigationClass\" role=\"navigation\"\n [itemsPerPage]=\"maxResults\" [totalItems]=\"dataSize\"\n (pageChanged)=\"pageChanged($event)\" [ngModelOptions]=\"{standalone:true}\" [ngModel]=\"dn.currentPage\"\n [attr.aria-label]=\"'Showing Page ' + dn.currentPage + ' of ' + pageCount + ' pages'\"\n [boundaryLinks]=\"boundarylinks\" [maxSize]=\"maxsize\"\n [directionLinks]=\"directionlinks\"\n firstText=\"Firtst\" lastText=\"Last\"\n [customPreviousTemplate]=\"prevTemplate\"\n [customNextTemplate]=\"nextTemplate\"\n [customPageTemplate]=\"pageTemplate\"></pagination>\n }\n}\n\n@if (navcontrols === 'Basic' && showrecordcount) {\n <ul class=\"pagination\">\n <li class=\"totalcount disabled basiccount\">\n <a href=\"javascript:void(0);\" tabindex=\"-1\" aria-disabled=\"true\">{{appLocale.LABEL_TOTAL_RECORDS}}: {{dataSize}}</a>\n </li>\n </ul>\n}\n\n<ng-template #pageTemplate let-page>\n <span class=\"sr-only\" [attr.data-isacitvepage]=\"page.active\">{{'Page '}}</span>\n {{page.number}}\n @if (page.active) {\n <span class=\"sr-only\"> {{', Showing page ' + page.number + ' of ' + pageCount}}</span>\n }\n</ng-template>\n<ng-template #prevTemplate let-disabled=\"disabled\">\n <span class=\"sr-only\" [attr.data-isdisabled]=\"disabled\">Go to Previous page {{disabled ? ', Disabled' : ''}}</span>\n</ng-template>\n<ng-template #nextTemplate let-disabled=\"disabled\">\n <span class=\"sr-only\" [attr.data-isdisabled]=\"disabled\">Go to Next page {{disabled ? ', Disabled' : ''}}</span>\n</ng-template>\n" }]
|
|
825
1218
|
}], () => [{ type: i0__namespace.Injector }, { type: undefined, decorators: [{
|
|
826
1219
|
type: i0.SkipSelf
|
|
827
1220
|
}, {
|
|
@@ -836,8 +1229,11 @@
|
|
|
836
1229
|
type: i0.Output
|
|
837
1230
|
}], maxResultsEmitter: [{
|
|
838
1231
|
type: i0.Output
|
|
1232
|
+
}], bsDropdown: [{
|
|
1233
|
+
type: i0.ViewChild,
|
|
1234
|
+
args: [i4.BsDropdownDirective]
|
|
839
1235
|
}] }); })();
|
|
840
|
-
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassDebugInfo(PaginationComponent, { className: "PaginationComponent", filePath: "pagination.component.ts", lineNumber:
|
|
1236
|
+
(() => { (typeof ngDevMode === "undefined" || ngDevMode) && i0__namespace.ɵsetClassDebugInfo(PaginationComponent, { className: "PaginationComponent", filePath: "pagination.component.ts", lineNumber: 49 }); })();
|
|
841
1237
|
|
|
842
1238
|
exports.PaginationComponent = PaginationComponent;
|
|
843
1239
|
|