You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
912 lines
51 KiB
912 lines
51 KiB
(function (global, factory) {
|
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(require('@angular/core'),require('@angular/common'),require('@angular/material/button'),require('@angular/material/tooltip'),require('@angular/material/form-field'),require('@angular/material/select'),require('@angular/material/core'),exports, require('@angular/common'), require('@angular/core'), require('@angular/material/core'), require('@angular/material/button'), require('@angular/material/select'), require('@angular/material/tooltip'), require('@angular/cdk/coercion'), require('rxjs')) :
|
|
typeof define === 'function' && define.amd ? define('@angular/material/paginator', ['@angular/core','@angular/common','@angular/material/button','@angular/material/tooltip','@angular/material/form-field','@angular/material/select','@angular/material/core','exports', '@angular/common', '@angular/core', '@angular/material/core', '@angular/material/button', '@angular/material/select', '@angular/material/tooltip', '@angular/cdk/coercion', 'rxjs'], factory) :
|
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.ng.core,global.ng.common,global.ng.material.button,global.ng.material.tooltip,global.ng.material.formField,global.ng.material.select,global.ng.material.core,(global.ng = global.ng || {}, global.ng.material = global.ng.material || {}, global.ng.material.paginator = {}), global.ng.common, global.ng.core, global.ng.material.core, global.ng.material.button, global.ng.material.select, global.ng.material.tooltip, global.ng.cdk.coercion, global.rxjs));
|
|
}(this, (function (ɵngcc0,ɵngcc1,ɵngcc2,ɵngcc3,ɵngcc4,ɵngcc5,ɵngcc6,exports, common, i0, core, button, select, tooltip, coercion, rxjs) {
|
|
function MatPaginator_div_2_mat_form_field_3_mat_option_2_Template(rf, ctx) { if (rf & 1) {
|
|
ɵngcc0.ɵɵelementStart(0, "mat-option", 19);
|
|
ɵngcc0.ɵɵtext(1);
|
|
ɵngcc0.ɵɵelementEnd();
|
|
} if (rf & 2) {
|
|
var pageSizeOption_r6 = ctx.$implicit;
|
|
ɵngcc0.ɵɵproperty("value", pageSizeOption_r6);
|
|
ɵngcc0.ɵɵadvance(1);
|
|
ɵngcc0.ɵɵtextInterpolate1(" ", pageSizeOption_r6, " ");
|
|
} }
|
|
function MatPaginator_div_2_mat_form_field_3_Template(rf, ctx) { if (rf & 1) {
|
|
var _r8 = ɵngcc0.ɵɵgetCurrentView();
|
|
ɵngcc0.ɵɵelementStart(0, "mat-form-field", 16);
|
|
ɵngcc0.ɵɵelementStart(1, "mat-select", 17);
|
|
ɵngcc0.ɵɵlistener("selectionChange", function MatPaginator_div_2_mat_form_field_3_Template_mat_select_selectionChange_1_listener($event) { ɵngcc0.ɵɵrestoreView(_r8); var ctx_r7 = ɵngcc0.ɵɵnextContext(2); return ctx_r7._changePageSize($event.value); });
|
|
ɵngcc0.ɵɵtemplate(2, MatPaginator_div_2_mat_form_field_3_mat_option_2_Template, 2, 2, "mat-option", 18);
|
|
ɵngcc0.ɵɵelementEnd();
|
|
ɵngcc0.ɵɵelementEnd();
|
|
} if (rf & 2) {
|
|
var ctx_r3 = ɵngcc0.ɵɵnextContext(2);
|
|
ɵngcc0.ɵɵproperty("appearance", ctx_r3._formFieldAppearance)("color", ctx_r3.color);
|
|
ɵngcc0.ɵɵadvance(1);
|
|
ɵngcc0.ɵɵproperty("value", ctx_r3.pageSize)("disabled", ctx_r3.disabled)("aria-label", ctx_r3._intl.itemsPerPageLabel);
|
|
ɵngcc0.ɵɵadvance(1);
|
|
ɵngcc0.ɵɵproperty("ngForOf", ctx_r3._displayedPageSizeOptions);
|
|
} }
|
|
function MatPaginator_div_2_div_4_Template(rf, ctx) { if (rf & 1) {
|
|
ɵngcc0.ɵɵelementStart(0, "div", 20);
|
|
ɵngcc0.ɵɵtext(1);
|
|
ɵngcc0.ɵɵelementEnd();
|
|
} if (rf & 2) {
|
|
var ctx_r4 = ɵngcc0.ɵɵnextContext(2);
|
|
ɵngcc0.ɵɵadvance(1);
|
|
ɵngcc0.ɵɵtextInterpolate(ctx_r4.pageSize);
|
|
} }
|
|
function MatPaginator_div_2_Template(rf, ctx) { if (rf & 1) {
|
|
ɵngcc0.ɵɵelementStart(0, "div", 12);
|
|
ɵngcc0.ɵɵelementStart(1, "div", 13);
|
|
ɵngcc0.ɵɵtext(2);
|
|
ɵngcc0.ɵɵelementEnd();
|
|
ɵngcc0.ɵɵtemplate(3, MatPaginator_div_2_mat_form_field_3_Template, 3, 6, "mat-form-field", 14);
|
|
ɵngcc0.ɵɵtemplate(4, MatPaginator_div_2_div_4_Template, 2, 1, "div", 15);
|
|
ɵngcc0.ɵɵelementEnd();
|
|
} if (rf & 2) {
|
|
var ctx_r0 = ɵngcc0.ɵɵnextContext();
|
|
ɵngcc0.ɵɵadvance(2);
|
|
ɵngcc0.ɵɵtextInterpolate1(" ", ctx_r0._intl.itemsPerPageLabel, " ");
|
|
ɵngcc0.ɵɵadvance(1);
|
|
ɵngcc0.ɵɵproperty("ngIf", ctx_r0._displayedPageSizeOptions.length > 1);
|
|
ɵngcc0.ɵɵadvance(1);
|
|
ɵngcc0.ɵɵproperty("ngIf", ctx_r0._displayedPageSizeOptions.length <= 1);
|
|
} }
|
|
function MatPaginator_button_6_Template(rf, ctx) { if (rf & 1) {
|
|
var _r10 = ɵngcc0.ɵɵgetCurrentView();
|
|
ɵngcc0.ɵɵelementStart(0, "button", 21);
|
|
ɵngcc0.ɵɵlistener("click", function MatPaginator_button_6_Template_button_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r10); var ctx_r9 = ɵngcc0.ɵɵnextContext(); return ctx_r9.firstPage(); });
|
|
ɵngcc0.ɵɵnamespaceSVG();
|
|
ɵngcc0.ɵɵelementStart(1, "svg", 7);
|
|
ɵngcc0.ɵɵelement(2, "path", 22);
|
|
ɵngcc0.ɵɵelementEnd();
|
|
ɵngcc0.ɵɵelementEnd();
|
|
} if (rf & 2) {
|
|
var ctx_r1 = ɵngcc0.ɵɵnextContext();
|
|
ɵngcc0.ɵɵproperty("matTooltip", ctx_r1._intl.firstPageLabel)("matTooltipDisabled", ctx_r1._previousButtonsDisabled())("matTooltipPosition", "above")("disabled", ctx_r1._previousButtonsDisabled());
|
|
ɵngcc0.ɵɵattribute("aria-label", ctx_r1._intl.firstPageLabel);
|
|
} }
|
|
function MatPaginator_button_13_Template(rf, ctx) { if (rf & 1) {
|
|
var _r12 = ɵngcc0.ɵɵgetCurrentView();
|
|
ɵngcc0.ɵɵnamespaceSVG();
|
|
ɵngcc0.ɵɵnamespaceHTML();
|
|
ɵngcc0.ɵɵelementStart(0, "button", 23);
|
|
ɵngcc0.ɵɵlistener("click", function MatPaginator_button_13_Template_button_click_0_listener() { ɵngcc0.ɵɵrestoreView(_r12); var ctx_r11 = ɵngcc0.ɵɵnextContext(); return ctx_r11.lastPage(); });
|
|
ɵngcc0.ɵɵnamespaceSVG();
|
|
ɵngcc0.ɵɵelementStart(1, "svg", 7);
|
|
ɵngcc0.ɵɵelement(2, "path", 24);
|
|
ɵngcc0.ɵɵelementEnd();
|
|
ɵngcc0.ɵɵelementEnd();
|
|
} if (rf & 2) {
|
|
var ctx_r2 = ɵngcc0.ɵɵnextContext();
|
|
ɵngcc0.ɵɵproperty("matTooltip", ctx_r2._intl.lastPageLabel)("matTooltipDisabled", ctx_r2._nextButtonsDisabled())("matTooltipPosition", "above")("disabled", ctx_r2._nextButtonsDisabled());
|
|
ɵngcc0.ɵɵattribute("aria-label", ctx_r2._intl.lastPageLabel);
|
|
} }
|
|
'use strict';
|
|
|
|
function _interopNamespace(e) {
|
|
if (e && e.__esModule) return e;
|
|
var n = Object.create(null);
|
|
if (e) {
|
|
Object.keys(e).forEach(function (k) {
|
|
if (k !== 'default') {
|
|
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
Object.defineProperty(n, k, d.get ? d : {
|
|
enumerable: true,
|
|
get: function () {
|
|
return e[k];
|
|
}
|
|
});
|
|
}
|
|
});
|
|
}
|
|
n['default'] = e;
|
|
return Object.freeze(n);
|
|
}
|
|
|
|
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
|
|
/*! *****************************************************************************
|
|
Copyright (c) Microsoft Corporation.
|
|
|
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
purpose with or without fee is hereby granted.
|
|
|
|
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
PERFORMANCE OF THIS SOFTWARE.
|
|
***************************************************************************** */
|
|
/* global Reflect, Promise */
|
|
var extendStatics = function (d, b) {
|
|
extendStatics = Object.setPrototypeOf ||
|
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
function (d, b) { for (var p in b)
|
|
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
d[p] = b[p]; };
|
|
return extendStatics(d, b);
|
|
};
|
|
function __extends(d, b) {
|
|
if (typeof b !== "function" && b !== null)
|
|
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
extendStatics(d, b);
|
|
function __() { this.constructor = d; }
|
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
}
|
|
var __assign = function () {
|
|
__assign = Object.assign || function __assign(t) {
|
|
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
s = arguments[i];
|
|
for (var p in s)
|
|
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
t[p] = s[p];
|
|
}
|
|
return t;
|
|
};
|
|
return __assign.apply(this, arguments);
|
|
};
|
|
function __rest(s, e) {
|
|
var t = {};
|
|
for (var p in s)
|
|
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
t[p] = s[p];
|
|
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
t[p[i]] = s[p[i]];
|
|
}
|
|
return t;
|
|
}
|
|
function __decorate(decorators, target, key, desc) {
|
|
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
r = Reflect.decorate(decorators, target, key, desc);
|
|
else
|
|
for (var i = decorators.length - 1; i >= 0; i--)
|
|
if (d = decorators[i])
|
|
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
}
|
|
function __param(paramIndex, decorator) {
|
|
return function (target, key) { decorator(target, key, paramIndex); };
|
|
}
|
|
function __metadata(metadataKey, metadataValue) {
|
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
return Reflect.metadata(metadataKey, metadataValue);
|
|
}
|
|
function __awaiter(thisArg, _arguments, P, generator) {
|
|
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
return new (P || (P = Promise))(function (resolve, reject) {
|
|
function fulfilled(value) { try {
|
|
step(generator.next(value));
|
|
}
|
|
catch (e) {
|
|
reject(e);
|
|
} }
|
|
function rejected(value) { try {
|
|
step(generator["throw"](value));
|
|
}
|
|
catch (e) {
|
|
reject(e);
|
|
} }
|
|
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
});
|
|
}
|
|
function __generator(thisArg, body) {
|
|
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
function step(op) {
|
|
if (f)
|
|
throw new TypeError("Generator is already executing.");
|
|
while (_)
|
|
try {
|
|
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done)
|
|
return t;
|
|
if (y = 0, t)
|
|
op = [op[0] & 2, t.value];
|
|
switch (op[0]) {
|
|
case 0:
|
|
case 1:
|
|
t = op;
|
|
break;
|
|
case 4:
|
|
_.label++;
|
|
return { value: op[1], done: false };
|
|
case 5:
|
|
_.label++;
|
|
y = op[1];
|
|
op = [0];
|
|
continue;
|
|
case 7:
|
|
op = _.ops.pop();
|
|
_.trys.pop();
|
|
continue;
|
|
default:
|
|
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
_ = 0;
|
|
continue;
|
|
}
|
|
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
_.label = op[1];
|
|
break;
|
|
}
|
|
if (op[0] === 6 && _.label < t[1]) {
|
|
_.label = t[1];
|
|
t = op;
|
|
break;
|
|
}
|
|
if (t && _.label < t[2]) {
|
|
_.label = t[2];
|
|
_.ops.push(op);
|
|
break;
|
|
}
|
|
if (t[2])
|
|
_.ops.pop();
|
|
_.trys.pop();
|
|
continue;
|
|
}
|
|
op = body.call(thisArg, _);
|
|
}
|
|
catch (e) {
|
|
op = [6, e];
|
|
y = 0;
|
|
}
|
|
finally {
|
|
f = t = 0;
|
|
}
|
|
if (op[0] & 5)
|
|
throw op[1];
|
|
return { value: op[0] ? op[1] : void 0, done: true };
|
|
}
|
|
}
|
|
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
if (k2 === undefined)
|
|
k2 = k;
|
|
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
}) : (function (o, m, k, k2) {
|
|
if (k2 === undefined)
|
|
k2 = k;
|
|
o[k2] = m[k];
|
|
});
|
|
function __exportStar(m, o) {
|
|
for (var p in m)
|
|
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
__createBinding(o, m, p);
|
|
}
|
|
function __values(o) {
|
|
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
if (m)
|
|
return m.call(o);
|
|
if (o && typeof o.length === "number")
|
|
return {
|
|
next: function () {
|
|
if (o && i >= o.length)
|
|
o = void 0;
|
|
return { value: o && o[i++], done: !o };
|
|
}
|
|
};
|
|
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
}
|
|
function __read(o, n) {
|
|
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
if (!m)
|
|
return o;
|
|
var i = m.call(o), r, ar = [], e;
|
|
try {
|
|
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
ar.push(r.value);
|
|
}
|
|
catch (error) {
|
|
e = { error: error };
|
|
}
|
|
finally {
|
|
try {
|
|
if (r && !r.done && (m = i["return"]))
|
|
m.call(i);
|
|
}
|
|
finally {
|
|
if (e)
|
|
throw e.error;
|
|
}
|
|
}
|
|
return ar;
|
|
}
|
|
/** @deprecated */
|
|
function __spread() {
|
|
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
ar = ar.concat(__read(arguments[i]));
|
|
return ar;
|
|
}
|
|
/** @deprecated */
|
|
function __spreadArrays() {
|
|
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
s += arguments[i].length;
|
|
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
r[k] = a[j];
|
|
return r;
|
|
}
|
|
function __spreadArray(to, from, pack) {
|
|
if (pack || arguments.length === 2)
|
|
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
if (ar || !(i in from)) {
|
|
if (!ar)
|
|
ar = Array.prototype.slice.call(from, 0, i);
|
|
ar[i] = from[i];
|
|
}
|
|
}
|
|
return to.concat(ar || from);
|
|
}
|
|
function __await(v) {
|
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
}
|
|
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
if (!Symbol.asyncIterator)
|
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
function verb(n) { if (g[n])
|
|
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
function resume(n, v) { try {
|
|
step(g[n](v));
|
|
}
|
|
catch (e) {
|
|
settle(q[0][3], e);
|
|
} }
|
|
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
function fulfill(value) { resume("next", value); }
|
|
function reject(value) { resume("throw", value); }
|
|
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
resume(q[0][0], q[0][1]); }
|
|
}
|
|
function __asyncDelegator(o) {
|
|
var i, p;
|
|
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === "return" } : f ? f(v) : v; } : f; }
|
|
}
|
|
function __asyncValues(o) {
|
|
if (!Symbol.asyncIterator)
|
|
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
var m = o[Symbol.asyncIterator], i;
|
|
return m ? m.call(o) : (o = typeof __values === "function" ? __values(o) : o[Symbol.iterator](), i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i);
|
|
function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }
|
|
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
}
|
|
function __makeTemplateObject(cooked, raw) {
|
|
if (Object.defineProperty) {
|
|
Object.defineProperty(cooked, "raw", { value: raw });
|
|
}
|
|
else {
|
|
cooked.raw = raw;
|
|
}
|
|
return cooked;
|
|
}
|
|
;
|
|
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
}) : function (o, v) {
|
|
o["default"] = v;
|
|
};
|
|
function __importStar(mod) {
|
|
if (mod && mod.__esModule)
|
|
return mod;
|
|
var result = {};
|
|
if (mod != null)
|
|
for (var k in mod)
|
|
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
__createBinding(result, mod, k);
|
|
__setModuleDefault(result, mod);
|
|
return result;
|
|
}
|
|
function __importDefault(mod) {
|
|
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
}
|
|
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
if (kind === "a" && !f)
|
|
throw new TypeError("Private accessor was defined without a getter");
|
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
}
|
|
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
if (kind === "m")
|
|
throw new TypeError("Private method is not writable");
|
|
if (kind === "a" && !f)
|
|
throw new TypeError("Private accessor was defined without a setter");
|
|
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
}
|
|
|
|
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
/**
|
|
* To modify the labels and text displayed, create a new instance of MatPaginatorIntl and
|
|
* include it in a custom provider
|
|
*/
|
|
var MatPaginatorIntl = /** @class */ (function () {
|
|
function MatPaginatorIntl() {
|
|
/**
|
|
* Stream to emit from when labels are changed. Use this to notify components when the labels have
|
|
* changed after initialization.
|
|
*/
|
|
this.changes = new rxjs.Subject();
|
|
/** A label for the page size selector. */
|
|
this.itemsPerPageLabel = 'Items per page:';
|
|
/** A label for the button that increments the current page. */
|
|
this.nextPageLabel = 'Next page';
|
|
/** A label for the button that decrements the current page. */
|
|
this.previousPageLabel = 'Previous page';
|
|
/** A label for the button that moves to the first page. */
|
|
this.firstPageLabel = 'First page';
|
|
/** A label for the button that moves to the last page. */
|
|
this.lastPageLabel = 'Last page';
|
|
/** A label for the range of items within the current page and the length of the whole list. */
|
|
this.getRangeLabel = function (page, pageSize, length) {
|
|
if (length == 0 || pageSize == 0) {
|
|
return "0 of " + length;
|
|
}
|
|
length = Math.max(length, 0);
|
|
var startIndex = page * pageSize;
|
|
// If the start index exceeds the list length, do not try and fix the end index to the end.
|
|
var endIndex = startIndex < length ?
|
|
Math.min(startIndex + pageSize, length) :
|
|
startIndex + pageSize;
|
|
return startIndex + 1 + " \u2013 " + endIndex + " of " + length;
|
|
};
|
|
}
|
|
MatPaginatorIntl.ɵfac = function MatPaginatorIntl_Factory(t) { return new (t || MatPaginatorIntl)(); };
|
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(MatPaginatorIntl, [{
|
|
type: i0.Injectable,
|
|
args: [{ providedIn: 'root' }]
|
|
}], function () { return []; }, null); })();
|
|
return MatPaginatorIntl;
|
|
}());
|
|
MatPaginatorIntl.ɵprov = i0__namespace.ɵɵdefineInjectable({ factory: function MatPaginatorIntl_Factory() { return new MatPaginatorIntl(); }, token: MatPaginatorIntl, providedIn: "root" });
|
|
/** @docs-private */
|
|
function MAT_PAGINATOR_INTL_PROVIDER_FACTORY(parentIntl) {
|
|
return parentIntl || new MatPaginatorIntl();
|
|
}
|
|
/** @docs-private */
|
|
var MAT_PAGINATOR_INTL_PROVIDER = {
|
|
// If there is already an MatPaginatorIntl available, use that. Otherwise, provide a new one.
|
|
provide: MatPaginatorIntl,
|
|
deps: [[new i0.Optional(), new i0.SkipSelf(), MatPaginatorIntl]],
|
|
useFactory: MAT_PAGINATOR_INTL_PROVIDER_FACTORY
|
|
};
|
|
|
|
/** The default page size if there is no page size and there are no provided page size options. */
|
|
var DEFAULT_PAGE_SIZE = 50;
|
|
/**
|
|
* Change event object that is emitted when the user selects a
|
|
* different page size or navigates to another page.
|
|
*/
|
|
var PageEvent = /** @class */ (function () {
|
|
function PageEvent() {
|
|
}
|
|
return PageEvent;
|
|
}());
|
|
/** Injection token that can be used to provide the default options for the paginator module. */
|
|
var MAT_PAGINATOR_DEFAULT_OPTIONS = new i0.InjectionToken('MAT_PAGINATOR_DEFAULT_OPTIONS');
|
|
// Boilerplate for applying mixins to _MatPaginatorBase.
|
|
/** @docs-private */
|
|
var _MatPaginatorMixinBase = core.mixinDisabled(core.mixinInitialized(/** @class */ (function () {
|
|
function class_1() {
|
|
}
|
|
return class_1;
|
|
}())));
|
|
/**
|
|
* Base class with all of the `MatPaginator` functionality.
|
|
* @docs-private
|
|
*/
|
|
var _MatPaginatorBase = /** @class */ (function (_super) {
|
|
__extends(_MatPaginatorBase, _super);
|
|
function _MatPaginatorBase(_intl, _changeDetectorRef, defaults) {
|
|
var _this = _super.call(this) || this;
|
|
_this._intl = _intl;
|
|
_this._changeDetectorRef = _changeDetectorRef;
|
|
_this._pageIndex = 0;
|
|
_this._length = 0;
|
|
_this._pageSizeOptions = [];
|
|
_this._hidePageSize = false;
|
|
_this._showFirstLastButtons = false;
|
|
/** Event emitted when the paginator changes the page size or page index. */
|
|
_this.page = new i0.EventEmitter();
|
|
_this._intlChanges = _intl.changes.subscribe(function () { return _this._changeDetectorRef.markForCheck(); });
|
|
if (defaults) {
|
|
var pageSize = defaults.pageSize, pageSizeOptions = defaults.pageSizeOptions, hidePageSize = defaults.hidePageSize, showFirstLastButtons = defaults.showFirstLastButtons;
|
|
if (pageSize != null) {
|
|
_this._pageSize = pageSize;
|
|
}
|
|
if (pageSizeOptions != null) {
|
|
_this._pageSizeOptions = pageSizeOptions;
|
|
}
|
|
if (hidePageSize != null) {
|
|
_this._hidePageSize = hidePageSize;
|
|
}
|
|
if (showFirstLastButtons != null) {
|
|
_this._showFirstLastButtons = showFirstLastButtons;
|
|
}
|
|
}
|
|
return _this;
|
|
}
|
|
Object.defineProperty(_MatPaginatorBase.prototype, "pageIndex", {
|
|
/** The zero-based page index of the displayed list of items. Defaulted to 0. */
|
|
get: function () { return this._pageIndex; },
|
|
set: function (value) {
|
|
this._pageIndex = Math.max(coercion.coerceNumberProperty(value), 0);
|
|
this._changeDetectorRef.markForCheck();
|
|
},
|
|
enumerable: false,
|
|
configurable: true
|
|
});
|
|
Object.defineProperty(_MatPaginatorBase.prototype, "length", {
|
|
/** The length of the total number of items that are being paginated. Defaulted to 0. */
|
|
get: function () { return this._length; },
|
|
set: function (value) {
|
|
this._length = coercion.coerceNumberProperty(value);
|
|
this._changeDetectorRef.markForCheck();
|
|
},
|
|
enumerable: false,
|
|
configurable: true
|
|
});
|
|
Object.defineProperty(_MatPaginatorBase.prototype, "pageSize", {
|
|
/** Number of items to display on a page. By default set to 50. */
|
|
get: function () { return this._pageSize; },
|
|
set: function (value) {
|
|
this._pageSize = Math.max(coercion.coerceNumberProperty(value), 0);
|
|
this._updateDisplayedPageSizeOptions();
|
|
},
|
|
enumerable: false,
|
|
configurable: true
|
|
});
|
|
Object.defineProperty(_MatPaginatorBase.prototype, "pageSizeOptions", {
|
|
/** The set of provided page size options to display to the user. */
|
|
get: function () { return this._pageSizeOptions; },
|
|
set: function (value) {
|
|
this._pageSizeOptions = (value || []).map(function (p) { return coercion.coerceNumberProperty(p); });
|
|
this._updateDisplayedPageSizeOptions();
|
|
},
|
|
enumerable: false,
|
|
configurable: true
|
|
});
|
|
Object.defineProperty(_MatPaginatorBase.prototype, "hidePageSize", {
|
|
/** Whether to hide the page size selection UI from the user. */
|
|
get: function () { return this._hidePageSize; },
|
|
set: function (value) {
|
|
this._hidePageSize = coercion.coerceBooleanProperty(value);
|
|
},
|
|
enumerable: false,
|
|
configurable: true
|
|
});
|
|
Object.defineProperty(_MatPaginatorBase.prototype, "showFirstLastButtons", {
|
|
/** Whether to show the first/last buttons UI to the user. */
|
|
get: function () { return this._showFirstLastButtons; },
|
|
set: function (value) {
|
|
this._showFirstLastButtons = coercion.coerceBooleanProperty(value);
|
|
},
|
|
enumerable: false,
|
|
configurable: true
|
|
});
|
|
_MatPaginatorBase.prototype.ngOnInit = function () {
|
|
this._initialized = true;
|
|
this._updateDisplayedPageSizeOptions();
|
|
this._markInitialized();
|
|
};
|
|
_MatPaginatorBase.prototype.ngOnDestroy = function () {
|
|
this._intlChanges.unsubscribe();
|
|
};
|
|
/** Advances to the next page if it exists. */
|
|
_MatPaginatorBase.prototype.nextPage = function () {
|
|
if (!this.hasNextPage()) {
|
|
return;
|
|
}
|
|
var previousPageIndex = this.pageIndex;
|
|
this.pageIndex++;
|
|
this._emitPageEvent(previousPageIndex);
|
|
};
|
|
/** Move back to the previous page if it exists. */
|
|
_MatPaginatorBase.prototype.previousPage = function () {
|
|
if (!this.hasPreviousPage()) {
|
|
return;
|
|
}
|
|
var previousPageIndex = this.pageIndex;
|
|
this.pageIndex--;
|
|
this._emitPageEvent(previousPageIndex);
|
|
};
|
|
/** Move to the first page if not already there. */
|
|
_MatPaginatorBase.prototype.firstPage = function () {
|
|
// hasPreviousPage being false implies at the start
|
|
if (!this.hasPreviousPage()) {
|
|
return;
|
|
}
|
|
var previousPageIndex = this.pageIndex;
|
|
this.pageIndex = 0;
|
|
this._emitPageEvent(previousPageIndex);
|
|
};
|
|
/** Move to the last page if not already there. */
|
|
_MatPaginatorBase.prototype.lastPage = function () {
|
|
// hasNextPage being false implies at the end
|
|
if (!this.hasNextPage()) {
|
|
return;
|
|
}
|
|
var previousPageIndex = this.pageIndex;
|
|
this.pageIndex = this.getNumberOfPages() - 1;
|
|
this._emitPageEvent(previousPageIndex);
|
|
};
|
|
/** Whether there is a previous page. */
|
|
_MatPaginatorBase.prototype.hasPreviousPage = function () {
|
|
return this.pageIndex >= 1 && this.pageSize != 0;
|
|
};
|
|
/** Whether there is a next page. */
|
|
_MatPaginatorBase.prototype.hasNextPage = function () {
|
|
var maxPageIndex = this.getNumberOfPages() - 1;
|
|
return this.pageIndex < maxPageIndex && this.pageSize != 0;
|
|
};
|
|
/** Calculate the number of pages */
|
|
_MatPaginatorBase.prototype.getNumberOfPages = function () {
|
|
if (!this.pageSize) {
|
|
return 0;
|
|
}
|
|
return Math.ceil(this.length / this.pageSize);
|
|
};
|
|
/**
|
|
* Changes the page size so that the first item displayed on the page will still be
|
|
* displayed using the new page size.
|
|
*
|
|
* For example, if the page size is 10 and on the second page (items indexed 10-19) then
|
|
* switching so that the page size is 5 will set the third page as the current page so
|
|
* that the 10th item will still be displayed.
|
|
*/
|
|
_MatPaginatorBase.prototype._changePageSize = function (pageSize) {
|
|
// Current page needs to be updated to reflect the new page size. Navigate to the page
|
|
// containing the previous page's first item.
|
|
var startIndex = this.pageIndex * this.pageSize;
|
|
var previousPageIndex = this.pageIndex;
|
|
this.pageIndex = Math.floor(startIndex / pageSize) || 0;
|
|
this.pageSize = pageSize;
|
|
this._emitPageEvent(previousPageIndex);
|
|
};
|
|
/** Checks whether the buttons for going forwards should be disabled. */
|
|
_MatPaginatorBase.prototype._nextButtonsDisabled = function () {
|
|
return this.disabled || !this.hasNextPage();
|
|
};
|
|
/** Checks whether the buttons for going backwards should be disabled. */
|
|
_MatPaginatorBase.prototype._previousButtonsDisabled = function () {
|
|
return this.disabled || !this.hasPreviousPage();
|
|
};
|
|
/**
|
|
* Updates the list of page size options to display to the user. Includes making sure that
|
|
* the page size is an option and that the list is sorted.
|
|
*/
|
|
_MatPaginatorBase.prototype._updateDisplayedPageSizeOptions = function () {
|
|
if (!this._initialized) {
|
|
return;
|
|
}
|
|
// If no page size is provided, use the first page size option or the default page size.
|
|
if (!this.pageSize) {
|
|
this._pageSize = this.pageSizeOptions.length != 0 ?
|
|
this.pageSizeOptions[0] :
|
|
DEFAULT_PAGE_SIZE;
|
|
}
|
|
this._displayedPageSizeOptions = this.pageSizeOptions.slice();
|
|
if (this._displayedPageSizeOptions.indexOf(this.pageSize) === -1) {
|
|
this._displayedPageSizeOptions.push(this.pageSize);
|
|
}
|
|
// Sort the numbers using a number-specific sort function.
|
|
this._displayedPageSizeOptions.sort(function (a, b) { return a - b; });
|
|
this._changeDetectorRef.markForCheck();
|
|
};
|
|
/** Emits an event notifying that a change of the paginator's properties has been triggered. */
|
|
_MatPaginatorBase.prototype._emitPageEvent = function (previousPageIndex) {
|
|
this.page.emit({
|
|
previousPageIndex: previousPageIndex,
|
|
pageIndex: this.pageIndex,
|
|
pageSize: this.pageSize,
|
|
length: this.length
|
|
});
|
|
};
|
|
_MatPaginatorBase.ɵfac = function _MatPaginatorBase_Factory(t) { return new (t || _MatPaginatorBase)(ɵngcc0.ɵɵdirectiveInject(MatPaginatorIntl), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef), ɵngcc0.ɵɵdirectiveInject(undefined)); };
|
|
_MatPaginatorBase.ɵdir = /*@__PURE__*/ ɵngcc0.ɵɵdefineDirective({ type: _MatPaginatorBase, inputs: { pageIndex: "pageIndex", length: "length", pageSize: "pageSize", pageSizeOptions: "pageSizeOptions", hidePageSize: "hidePageSize", showFirstLastButtons: "showFirstLastButtons", color: "color" }, outputs: { page: "page" }, features: [ɵngcc0.ɵɵInheritDefinitionFeature] });
|
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(_MatPaginatorBase, [{
|
|
type: i0.Directive
|
|
}], function () { return [{ type: MatPaginatorIntl }, { type: ɵngcc0.ChangeDetectorRef }, { type: undefined }]; }, { pageIndex: [{
|
|
type: i0.Input
|
|
}], length: [{
|
|
type: i0.Input
|
|
}], pageSize: [{
|
|
type: i0.Input
|
|
}], pageSizeOptions: [{
|
|
type: i0.Input
|
|
}], hidePageSize: [{
|
|
type: i0.Input
|
|
}], showFirstLastButtons: [{
|
|
type: i0.Input
|
|
}], color: [{
|
|
type: i0.Input
|
|
}], page: [{
|
|
type: i0.Output
|
|
}] }); })();
|
|
return _MatPaginatorBase;
|
|
}(_MatPaginatorMixinBase));
|
|
_MatPaginatorBase.ctorParameters = function () { return [
|
|
{ type: MatPaginatorIntl },
|
|
{ type: i0.ChangeDetectorRef },
|
|
{ type: undefined }
|
|
]; };
|
|
_MatPaginatorBase.propDecorators = {
|
|
color: [{ type: i0.Input }],
|
|
pageIndex: [{ type: i0.Input }],
|
|
length: [{ type: i0.Input }],
|
|
pageSize: [{ type: i0.Input }],
|
|
pageSizeOptions: [{ type: i0.Input }],
|
|
hidePageSize: [{ type: i0.Input }],
|
|
showFirstLastButtons: [{ type: i0.Input }],
|
|
page: [{ type: i0.Output }]
|
|
};
|
|
/**
|
|
* Component to provide navigation between paged information. Displays the size of the current
|
|
* page, user-selectable options to change that size, what items are being shown, and
|
|
* navigational button to go to the previous or next page.
|
|
*/
|
|
var MatPaginator = /** @class */ (function (_super) {
|
|
__extends(MatPaginator, _super);
|
|
function MatPaginator(intl, changeDetectorRef, defaults) {
|
|
var _this = _super.call(this, intl, changeDetectorRef, defaults) || this;
|
|
if (defaults && defaults.formFieldAppearance != null) {
|
|
_this._formFieldAppearance = defaults.formFieldAppearance;
|
|
}
|
|
return _this;
|
|
}
|
|
MatPaginator.ɵfac = function MatPaginator_Factory(t) { return new (t || MatPaginator)(ɵngcc0.ɵɵdirectiveInject(MatPaginatorIntl), ɵngcc0.ɵɵdirectiveInject(ɵngcc0.ChangeDetectorRef), ɵngcc0.ɵɵdirectiveInject(MAT_PAGINATOR_DEFAULT_OPTIONS, 8)); };
|
|
MatPaginator.ɵcmp = /*@__PURE__*/ ɵngcc0.ɵɵdefineComponent({ type: MatPaginator, selectors: [["mat-paginator"]], hostAttrs: ["role", "group", 1, "mat-paginator"], inputs: { disabled: "disabled" }, exportAs: ["matPaginator"], features: [ɵngcc0.ɵɵInheritDefinitionFeature], decls: 14, vars: 14, consts: [[1, "mat-paginator-outer-container"], [1, "mat-paginator-container"], ["class", "mat-paginator-page-size", 4, "ngIf"], [1, "mat-paginator-range-actions"], [1, "mat-paginator-range-label"], ["mat-icon-button", "", "type", "button", "class", "mat-paginator-navigation-first", 3, "matTooltip", "matTooltipDisabled", "matTooltipPosition", "disabled", "click", 4, "ngIf"], ["mat-icon-button", "", "type", "button", 1, "mat-paginator-navigation-previous", 3, "matTooltip", "matTooltipDisabled", "matTooltipPosition", "disabled", "click"], ["viewBox", "0 0 24 24", "focusable", "false", 1, "mat-paginator-icon"], ["d", "M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z"], ["mat-icon-button", "", "type", "button", 1, "mat-paginator-navigation-next", 3, "matTooltip", "matTooltipDisabled", "matTooltipPosition", "disabled", "click"], ["d", "M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z"], ["mat-icon-button", "", "type", "button", "class", "mat-paginator-navigation-last", 3, "matTooltip", "matTooltipDisabled", "matTooltipPosition", "disabled", "click", 4, "ngIf"], [1, "mat-paginator-page-size"], [1, "mat-paginator-page-size-label"], ["class", "mat-paginator-page-size-select", 3, "appearance", "color", 4, "ngIf"], ["class", "mat-paginator-page-size-value", 4, "ngIf"], [1, "mat-paginator-page-size-select", 3, "appearance", "color"], [3, "value", "disabled", "aria-label", "selectionChange"], [3, "value", 4, "ngFor", "ngForOf"], [3, "value"], [1, "mat-paginator-page-size-value"], ["mat-icon-button", "", "type", "button", 1, "mat-paginator-navigation-first", 3, "matTooltip", "matTooltipDisabled", "matTooltipPosition", "disabled", "click"], ["d", "M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z"], ["mat-icon-button", "", "type", "button", 1, "mat-paginator-navigation-last", 3, "matTooltip", "matTooltipDisabled", "matTooltipPosition", "disabled", "click"], ["d", "M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z"]], template: function MatPaginator_Template(rf, ctx) { if (rf & 1) {
|
|
ɵngcc0.ɵɵelementStart(0, "div", 0);
|
|
ɵngcc0.ɵɵelementStart(1, "div", 1);
|
|
ɵngcc0.ɵɵtemplate(2, MatPaginator_div_2_Template, 5, 3, "div", 2);
|
|
ɵngcc0.ɵɵelementStart(3, "div", 3);
|
|
ɵngcc0.ɵɵelementStart(4, "div", 4);
|
|
ɵngcc0.ɵɵtext(5);
|
|
ɵngcc0.ɵɵelementEnd();
|
|
ɵngcc0.ɵɵtemplate(6, MatPaginator_button_6_Template, 3, 5, "button", 5);
|
|
ɵngcc0.ɵɵelementStart(7, "button", 6);
|
|
ɵngcc0.ɵɵlistener("click", function MatPaginator_Template_button_click_7_listener() { return ctx.previousPage(); });
|
|
ɵngcc0.ɵɵnamespaceSVG();
|
|
ɵngcc0.ɵɵelementStart(8, "svg", 7);
|
|
ɵngcc0.ɵɵelement(9, "path", 8);
|
|
ɵngcc0.ɵɵelementEnd();
|
|
ɵngcc0.ɵɵelementEnd();
|
|
ɵngcc0.ɵɵnamespaceHTML();
|
|
ɵngcc0.ɵɵelementStart(10, "button", 9);
|
|
ɵngcc0.ɵɵlistener("click", function MatPaginator_Template_button_click_10_listener() { return ctx.nextPage(); });
|
|
ɵngcc0.ɵɵnamespaceSVG();
|
|
ɵngcc0.ɵɵelementStart(11, "svg", 7);
|
|
ɵngcc0.ɵɵelement(12, "path", 10);
|
|
ɵngcc0.ɵɵelementEnd();
|
|
ɵngcc0.ɵɵelementEnd();
|
|
ɵngcc0.ɵɵtemplate(13, MatPaginator_button_13_Template, 3, 5, "button", 11);
|
|
ɵngcc0.ɵɵelementEnd();
|
|
ɵngcc0.ɵɵelementEnd();
|
|
ɵngcc0.ɵɵelementEnd();
|
|
} if (rf & 2) {
|
|
ɵngcc0.ɵɵadvance(2);
|
|
ɵngcc0.ɵɵproperty("ngIf", !ctx.hidePageSize);
|
|
ɵngcc0.ɵɵadvance(3);
|
|
ɵngcc0.ɵɵtextInterpolate1(" ", ctx._intl.getRangeLabel(ctx.pageIndex, ctx.pageSize, ctx.length), " ");
|
|
ɵngcc0.ɵɵadvance(1);
|
|
ɵngcc0.ɵɵproperty("ngIf", ctx.showFirstLastButtons);
|
|
ɵngcc0.ɵɵadvance(1);
|
|
ɵngcc0.ɵɵproperty("matTooltip", ctx._intl.previousPageLabel)("matTooltipDisabled", ctx._previousButtonsDisabled())("matTooltipPosition", "above")("disabled", ctx._previousButtonsDisabled());
|
|
ɵngcc0.ɵɵattribute("aria-label", ctx._intl.previousPageLabel);
|
|
ɵngcc0.ɵɵadvance(3);
|
|
ɵngcc0.ɵɵproperty("matTooltip", ctx._intl.nextPageLabel)("matTooltipDisabled", ctx._nextButtonsDisabled())("matTooltipPosition", "above")("disabled", ctx._nextButtonsDisabled());
|
|
ɵngcc0.ɵɵattribute("aria-label", ctx._intl.nextPageLabel);
|
|
ɵngcc0.ɵɵadvance(3);
|
|
ɵngcc0.ɵɵproperty("ngIf", ctx.showFirstLastButtons);
|
|
} }, directives: [ɵngcc1.NgIf, ɵngcc2.MatButton, ɵngcc3.MatTooltip, ɵngcc4.MatFormField, ɵngcc5.MatSelect, ɵngcc1.NgForOf, ɵngcc6.MatOption], styles: [".mat-paginator{display:block}.mat-paginator-outer-container{display:flex}.mat-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-paginator-page-size{margin-right:0;margin-left:8px}.mat-paginator-page-size-label{margin:0 4px}.mat-paginator-page-size-select{margin:6px 4px 0 4px;width:56px}.mat-paginator-page-size-select.mat-form-field-appearance-outline{width:64px}.mat-paginator-page-size-select.mat-form-field-appearance-fill{width:64px}.mat-paginator-range-label{margin:0 32px 0 24px}.mat-paginator-range-actions{display:flex;align-items:center}.mat-paginator-icon{width:28px;fill:currentColor}[dir=rtl] .mat-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-paginator-icon{fill:CanvasText}\n"], encapsulation: 2, changeDetection: 0 });
|
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(MatPaginator, [{
|
|
type: i0.Component,
|
|
args: [{
|
|
selector: 'mat-paginator',
|
|
exportAs: 'matPaginator',
|
|
template: "<div class=\"mat-paginator-outer-container\">\n <div class=\"mat-paginator-container\">\n <div class=\"mat-paginator-page-size\" *ngIf=\"!hidePageSize\">\n <div class=\"mat-paginator-page-size-label\">\n {{_intl.itemsPerPageLabel}}\n </div>\n\n <mat-form-field\n *ngIf=\"_displayedPageSizeOptions.length > 1\"\n [appearance]=\"_formFieldAppearance!\"\n [color]=\"color\"\n class=\"mat-paginator-page-size-select\">\n <mat-select\n [value]=\"pageSize\"\n [disabled]=\"disabled\"\n [aria-label]=\"_intl.itemsPerPageLabel\"\n (selectionChange)=\"_changePageSize($event.value)\">\n <mat-option *ngFor=\"let pageSizeOption of _displayedPageSizeOptions\" [value]=\"pageSizeOption\">\n {{pageSizeOption}}\n </mat-option>\n </mat-select>\n </mat-form-field>\n\n <div\n class=\"mat-paginator-page-size-value\"\n *ngIf=\"_displayedPageSizeOptions.length <= 1\">{{pageSize}}</div>\n </div>\n\n <div class=\"mat-paginator-range-actions\">\n <div class=\"mat-paginator-range-label\">\n {{_intl.getRangeLabel(pageIndex, pageSize, length)}}\n </div>\n\n <button mat-icon-button type=\"button\"\n class=\"mat-paginator-navigation-first\"\n (click)=\"firstPage()\"\n [attr.aria-label]=\"_intl.firstPageLabel\"\n [matTooltip]=\"_intl.firstPageLabel\"\n [matTooltipDisabled]=\"_previousButtonsDisabled()\"\n [matTooltipPosition]=\"'above'\"\n [disabled]=\"_previousButtonsDisabled()\"\n *ngIf=\"showFirstLastButtons\">\n <svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\">\n <path d=\"M18.41 16.59L13.82 12l4.59-4.59L17 6l-6 6 6 6zM6 6h2v12H6z\"/>\n </svg>\n </button>\n <button mat-icon-button type=\"button\"\n class=\"mat-paginator-navigation-previous\"\n (click)=\"previousPage()\"\n [attr.aria-label]=\"_intl.previousPageLabel\"\n [matTooltip]=\"_intl.previousPageLabel\"\n [matTooltipDisabled]=\"_previousButtonsDisabled()\"\n [matTooltipPosition]=\"'above'\"\n [disabled]=\"_previousButtonsDisabled()\">\n <svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\">\n <path d=\"M15.41 7.41L14 6l-6 6 6 6 1.41-1.41L10.83 12z\"/>\n </svg>\n </button>\n <button mat-icon-button type=\"button\"\n class=\"mat-paginator-navigation-next\"\n (click)=\"nextPage()\"\n [attr.aria-label]=\"_intl.nextPageLabel\"\n [matTooltip]=\"_intl.nextPageLabel\"\n [matTooltipDisabled]=\"_nextButtonsDisabled()\"\n [matTooltipPosition]=\"'above'\"\n [disabled]=\"_nextButtonsDisabled()\">\n <svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\">\n <path d=\"M10 6L8.59 7.41 13.17 12l-4.58 4.59L10 18l6-6z\"/>\n </svg>\n </button>\n <button mat-icon-button type=\"button\"\n class=\"mat-paginator-navigation-last\"\n (click)=\"lastPage()\"\n [attr.aria-label]=\"_intl.lastPageLabel\"\n [matTooltip]=\"_intl.lastPageLabel\"\n [matTooltipDisabled]=\"_nextButtonsDisabled()\"\n [matTooltipPosition]=\"'above'\"\n [disabled]=\"_nextButtonsDisabled()\"\n *ngIf=\"showFirstLastButtons\">\n <svg class=\"mat-paginator-icon\" viewBox=\"0 0 24 24\" focusable=\"false\">\n <path d=\"M5.59 7.41L10.18 12l-4.59 4.59L7 18l6-6-6-6zM16 6h2v12h-2z\"/>\n </svg>\n </button>\n </div>\n </div>\n</div>\n",
|
|
inputs: ['disabled'],
|
|
host: {
|
|
'class': 'mat-paginator',
|
|
'role': 'group'
|
|
},
|
|
changeDetection: i0.ChangeDetectionStrategy.OnPush,
|
|
encapsulation: i0.ViewEncapsulation.None,
|
|
styles: [".mat-paginator{display:block}.mat-paginator-outer-container{display:flex}.mat-paginator-container{display:flex;align-items:center;justify-content:flex-end;padding:0 8px;flex-wrap:wrap-reverse;width:100%}.mat-paginator-page-size{display:flex;align-items:baseline;margin-right:8px}[dir=rtl] .mat-paginator-page-size{margin-right:0;margin-left:8px}.mat-paginator-page-size-label{margin:0 4px}.mat-paginator-page-size-select{margin:6px 4px 0 4px;width:56px}.mat-paginator-page-size-select.mat-form-field-appearance-outline{width:64px}.mat-paginator-page-size-select.mat-form-field-appearance-fill{width:64px}.mat-paginator-range-label{margin:0 32px 0 24px}.mat-paginator-range-actions{display:flex;align-items:center}.mat-paginator-icon{width:28px;fill:currentColor}[dir=rtl] .mat-paginator-icon{transform:rotate(180deg)}.cdk-high-contrast-active .mat-paginator-icon{fill:CanvasText}\n"]
|
|
}]
|
|
}], function () { return [{ type: MatPaginatorIntl }, { type: ɵngcc0.ChangeDetectorRef }, { type: undefined, decorators: [{
|
|
type: i0.Optional
|
|
}, {
|
|
type: i0.Inject,
|
|
args: [MAT_PAGINATOR_DEFAULT_OPTIONS]
|
|
}] }]; }, null); })();
|
|
return MatPaginator;
|
|
}(_MatPaginatorBase));
|
|
MatPaginator.ctorParameters = function () { return [
|
|
{ type: MatPaginatorIntl },
|
|
{ type: i0.ChangeDetectorRef },
|
|
{ type: undefined, decorators: [{ type: i0.Optional }, { type: i0.Inject, args: [MAT_PAGINATOR_DEFAULT_OPTIONS,] }] }
|
|
]; };
|
|
|
|
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
var MatPaginatorModule = /** @class */ (function () {
|
|
function MatPaginatorModule() {
|
|
}
|
|
MatPaginatorModule.ɵfac = function MatPaginatorModule_Factory(t) { return new (t || MatPaginatorModule)(); };
|
|
MatPaginatorModule.ɵmod = /*@__PURE__*/ ɵngcc0.ɵɵdefineNgModule({ type: MatPaginatorModule });
|
|
MatPaginatorModule.ɵinj = /*@__PURE__*/ ɵngcc0.ɵɵdefineInjector({ providers: [MAT_PAGINATOR_INTL_PROVIDER], imports: [[
|
|
common.CommonModule,
|
|
button.MatButtonModule,
|
|
select.MatSelectModule,
|
|
tooltip.MatTooltipModule,
|
|
core.MatCommonModule,
|
|
]] });
|
|
(function () { (typeof ngDevMode === "undefined" || ngDevMode) && ɵngcc0.ɵsetClassMetadata(MatPaginatorModule, [{
|
|
type: i0.NgModule,
|
|
args: [{
|
|
imports: [
|
|
common.CommonModule,
|
|
button.MatButtonModule,
|
|
select.MatSelectModule,
|
|
tooltip.MatTooltipModule,
|
|
core.MatCommonModule,
|
|
],
|
|
exports: [MatPaginator],
|
|
declarations: [MatPaginator],
|
|
providers: [MAT_PAGINATOR_INTL_PROVIDER]
|
|
}]
|
|
}], function () { return []; }, null); })();
|
|
(function () { (typeof ngJitMode === "undefined" || ngJitMode) && ɵngcc0.ɵɵsetNgModuleScope(MatPaginatorModule, { declarations: [MatPaginator], imports: [ɵngcc1.CommonModule, ɵngcc2.MatButtonModule, ɵngcc5.MatSelectModule, ɵngcc3.MatTooltipModule, ɵngcc6.MatCommonModule], exports: [MatPaginator] }); })();
|
|
return MatPaginatorModule;
|
|
}());
|
|
|
|
/**
|
|
* @license
|
|
* Copyright Google LLC All Rights Reserved.
|
|
*
|
|
* Use of this source code is governed by an MIT-style license that can be
|
|
* found in the LICENSE file at https://angular.io/license
|
|
*/
|
|
|
|
/**
|
|
* Generated bundle index. Do not edit.
|
|
*/
|
|
|
|
exports.MAT_PAGINATOR_DEFAULT_OPTIONS = MAT_PAGINATOR_DEFAULT_OPTIONS;
|
|
exports.MAT_PAGINATOR_INTL_PROVIDER = MAT_PAGINATOR_INTL_PROVIDER;
|
|
exports.MAT_PAGINATOR_INTL_PROVIDER_FACTORY = MAT_PAGINATOR_INTL_PROVIDER_FACTORY;
|
|
exports.MatPaginator = MatPaginator;
|
|
exports.MatPaginatorIntl = MatPaginatorIntl;
|
|
exports.MatPaginatorModule = MatPaginatorModule;
|
|
exports.PageEvent = PageEvent;
|
|
exports._MatPaginatorBase = _MatPaginatorBase;
|
|
|
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
|
|
})));
|
|
|
|
//# sourceMappingURL=material-paginator.umd.js.map
|