UNPKG

2.82 kBJavaScriptView Raw
1/**
2 * ag-grid - Advanced Data Grid / Data Table supporting Javascript / React / AngularJS / Web Components
3 * @version v18.1.2
4 * @link http://www.ag-grid.com/
5 * @license MIT
6 */
7"use strict";
8var __extends = (this && this.__extends) || (function () {
9 var extendStatics = Object.setPrototypeOf ||
10 ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
11 function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
12 return function (d, b) {
13 extendStatics(d, b);
14 function __() { this.constructor = d; }
15 d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
16 };
17})();
18var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
19 var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
20 if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
21 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;
22 return c > 3 && r && Object.defineProperty(target, key, r), r;
23};
24var __metadata = (this && this.__metadata) || function (k, v) {
25 if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
26};
27Object.defineProperty(exports, "__esModule", { value: true });
28var gridOptionsWrapper_1 = require("../../gridOptionsWrapper");
29var context_1 = require("../../context/context");
30var component_1 = require("../../widgets/component");
31var LoadingOverlayComponent = (function (_super) {
32 __extends(LoadingOverlayComponent, _super);
33 function LoadingOverlayComponent() {
34 return _super.call(this) || this;
35 }
36 LoadingOverlayComponent.prototype.init = function (params) {
37 var template = this.gridOptionsWrapper.getOverlayLoadingTemplate() ?
38 this.gridOptionsWrapper.getOverlayLoadingTemplate() : LoadingOverlayComponent.DEFAULT_LOADING_OVERLAY_TEMPLATE;
39 var localeTextFunc = this.gridOptionsWrapper.getLocaleTextFunc();
40 var localisedTemplate = template.replace('[LOADING...]', localeTextFunc('loadingOoo', 'Loading...'));
41 this.setTemplate(localisedTemplate);
42 };
43 LoadingOverlayComponent.DEFAULT_LOADING_OVERLAY_TEMPLATE = '<span class="ag-overlay-loading-center">[LOADING...]</span>';
44 __decorate([
45 context_1.Autowired('gridOptionsWrapper'),
46 __metadata("design:type", gridOptionsWrapper_1.GridOptionsWrapper)
47 ], LoadingOverlayComponent.prototype, "gridOptionsWrapper", void 0);
48 return LoadingOverlayComponent;
49}(component_1.Component));
50exports.LoadingOverlayComponent = LoadingOverlayComponent;