@schneideress/dashboardframework 0.0.274 → 0.0.276
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/bundles/schneideress-dashboardframework.umd.js +139 -443
- package/bundles/schneideress-dashboardframework.umd.js.map +1 -1
- package/bundles/schneideress-dashboardframework.umd.min.js +15 -1
- package/bundles/schneideress-dashboardframework.umd.min.js.map +1 -1
- package/esm2015/gridster/lib/gridsterItem.component.js +1 -1
- package/esm2015/gridster/lib/gridsterRenderer.service.js +1 -1
- package/esm2015/lib/ra-dashboard-area/ra.dashboard.area.js +75 -171
- package/esm2015/lib/ra-widget-container/ra.widget.container.component.js +36 -66
- package/esm2015/lib/ra.base.dashboard.template.js +2 -4
- package/esm2015/lib/ra.dashboard.responsive.service.js +2 -12
- package/esm2015/lib/ra.dashboard.service.js +2 -7
- package/esm2015/lib/ra.event.enum.js +1 -7
- package/esm2015/lib/ra.gridster.config.js +3 -3
- package/esm5/gridster/lib/gridsterItem.component.js +1 -1
- package/esm5/gridster/lib/gridsterRenderer.service.js +1 -1
- package/esm5/lib/ra-dashboard-area/ra.dashboard.area.js +75 -173
- package/esm5/lib/ra-widget-container/ra.widget.container.component.js +36 -66
- package/esm5/lib/ra.base.dashboard.template.js +2 -4
- package/esm5/lib/ra.dashboard.responsive.service.js +2 -12
- package/esm5/lib/ra.dashboard.service.js +2 -7
- package/esm5/lib/ra.event.enum.js +1 -7
- package/esm5/lib/ra.gridster.config.js +3 -3
- package/fesm2015/schneideress-dashboardframework.js +114 -263
- package/fesm2015/schneideress-dashboardframework.js.map +1 -1
- package/fesm5/schneideress-dashboardframework.js +115 -266
- package/fesm5/schneideress-dashboardframework.js.map +1 -1
- package/lib/ra-dashboard-area/ra.dashboard.area.d.ts +5 -25
- package/lib/ra-widget-container/ra.widget.container.component.d.ts +2 -6
- package/lib/ra.base.dashboard.template.d.ts +2 -4
- package/lib/ra.dashboard.responsive.service.d.ts +1 -1
- package/lib/ra.dashboard.service.d.ts +1 -0
- package/lib/ra.event.enum.d.ts +1 -7
- package/package.json +1 -1
- package/schneideress-dashboardframework.metadata.json +1 -1
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@schneideress/ra-common'), require('rxjs/operators'), require('ngx-ui-loader'), require('angular-notifier'), require('@schneideress/widgetframework'), require('@angular/platform-browser'), require('@angular/common/http'), require('@angular/common'), require('@schneideress/user-controls'), require('@schneideress/common-controls')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@schneideress/dashboardframework', ['exports', '@angular/core', 'rxjs', '@schneideress/ra-common', 'rxjs/operators', 'ngx-ui-loader', 'angular-notifier', '@schneideress/widgetframework', '@angular/platform-browser', '@angular/common/http', '@angular/common', '@schneideress/user-controls', '@schneideress/common-controls'], factory) :
|
|
4
|
-
(global = global || self, factory((global.schneideress = global.schneideress || {}, global.schneideress.dashboardframework = {}), global.ng.core, global.rxjs, global.raCommon, global.rxjs.operators, global['ngx-ui-loader'], global['angular-notifier'], global.widgetframework, global.ng.platformBrowser, global.ng.common.http, global.ng.common, global.userControls, global.commonControls));
|
|
5
|
-
}(this, (function (exports, core, rxjs, raCommon, operators, ngxUiLoader, angularNotifier, widgetframework, platformBrowser, http, common, userControls, commonControls) { 'use strict';
|
|
2
|
+
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('rxjs'), require('@schneideress/ra-common'), require('rxjs/operators'), require('ngx-ui-loader'), require('angular-notifier'), require('@angular/router'), require('@schneideress/widgetframework'), require('@angular/platform-browser'), require('@angular/common/http'), require('@angular/common'), require('@schneideress/user-controls'), require('@schneideress/common-controls')) :
|
|
3
|
+
typeof define === 'function' && define.amd ? define('@schneideress/dashboardframework', ['exports', '@angular/core', 'rxjs', '@schneideress/ra-common', 'rxjs/operators', 'ngx-ui-loader', 'angular-notifier', '@angular/router', '@schneideress/widgetframework', '@angular/platform-browser', '@angular/common/http', '@angular/common', '@schneideress/user-controls', '@schneideress/common-controls'], factory) :
|
|
4
|
+
(global = global || self, factory((global.schneideress = global.schneideress || {}, global.schneideress.dashboardframework = {}), global.ng.core, global.rxjs, global.raCommon, global.rxjs.operators, global['ngx-ui-loader'], global['angular-notifier'], global.ng.router, global.widgetframework, global.ng.platformBrowser, global.ng.common.http, global.ng.common, global.userControls, global.commonControls));
|
|
5
|
+
}(this, (function (exports, core, rxjs, raCommon, operators, ngxUiLoader, angularNotifier, router, widgetframework, platformBrowser, http, common, userControls, commonControls) { 'use strict';
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
/*! *****************************************************************************
|
|
8
8
|
Copyright (c) Microsoft Corporation.
|
|
9
9
|
|
|
10
10
|
Permission to use, copy, modify, and/or distribute this software for any
|
|
@@ -18,18 +18,16 @@
|
|
|
18
18
|
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
19
19
|
PERFORMANCE OF THIS SOFTWARE.
|
|
20
20
|
***************************************************************************** */
|
|
21
|
-
/* global Reflect, Promise
|
|
21
|
+
/* global Reflect, Promise */
|
|
22
22
|
|
|
23
23
|
var extendStatics = function(d, b) {
|
|
24
24
|
extendStatics = Object.setPrototypeOf ||
|
|
25
25
|
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
26
|
-
function (d, b) { for (var p in b) if (
|
|
26
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
27
27
|
return extendStatics(d, b);
|
|
28
28
|
};
|
|
29
29
|
|
|
30
30
|
function __extends(d, b) {
|
|
31
|
-
if (typeof b !== "function" && b !== null)
|
|
32
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
33
31
|
extendStatics(d, b);
|
|
34
32
|
function __() { this.constructor = d; }
|
|
35
33
|
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
@@ -69,51 +67,6 @@
|
|
|
69
67
|
return function (target, key) { decorator(target, key, paramIndex); }
|
|
70
68
|
}
|
|
71
69
|
|
|
72
|
-
function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
|
|
73
|
-
function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
|
|
74
|
-
var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
|
|
75
|
-
var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
|
|
76
|
-
var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
|
|
77
|
-
var _, done = false;
|
|
78
|
-
for (var i = decorators.length - 1; i >= 0; i--) {
|
|
79
|
-
var context = {};
|
|
80
|
-
for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
|
|
81
|
-
for (var p in contextIn.access) context.access[p] = contextIn.access[p];
|
|
82
|
-
context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
|
|
83
|
-
var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
|
|
84
|
-
if (kind === "accessor") {
|
|
85
|
-
if (result === void 0) continue;
|
|
86
|
-
if (result === null || typeof result !== "object") throw new TypeError("Object expected");
|
|
87
|
-
if (_ = accept(result.get)) descriptor.get = _;
|
|
88
|
-
if (_ = accept(result.set)) descriptor.set = _;
|
|
89
|
-
if (_ = accept(result.init)) initializers.unshift(_);
|
|
90
|
-
}
|
|
91
|
-
else if (_ = accept(result)) {
|
|
92
|
-
if (kind === "field") initializers.unshift(_);
|
|
93
|
-
else descriptor[key] = _;
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
if (target) Object.defineProperty(target, contextIn.name, descriptor);
|
|
97
|
-
done = true;
|
|
98
|
-
};
|
|
99
|
-
|
|
100
|
-
function __runInitializers(thisArg, initializers, value) {
|
|
101
|
-
var useValue = arguments.length > 2;
|
|
102
|
-
for (var i = 0; i < initializers.length; i++) {
|
|
103
|
-
value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
|
|
104
|
-
}
|
|
105
|
-
return useValue ? value : void 0;
|
|
106
|
-
};
|
|
107
|
-
|
|
108
|
-
function __propKey(x) {
|
|
109
|
-
return typeof x === "symbol" ? x : "".concat(x);
|
|
110
|
-
};
|
|
111
|
-
|
|
112
|
-
function __setFunctionName(f, name, prefix) {
|
|
113
|
-
if (typeof name === "symbol") name = name.description ? "[".concat(name.description, "]") : "";
|
|
114
|
-
return Object.defineProperty(f, "name", { configurable: true, value: prefix ? "".concat(prefix, " ", name) : name });
|
|
115
|
-
};
|
|
116
|
-
|
|
117
70
|
function __metadata(metadataKey, metadataValue) {
|
|
118
71
|
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(metadataKey, metadataValue);
|
|
119
72
|
}
|
|
@@ -134,7 +87,7 @@
|
|
|
134
87
|
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
135
88
|
function step(op) {
|
|
136
89
|
if (f) throw new TypeError("Generator is already executing.");
|
|
137
|
-
while (
|
|
90
|
+
while (_) try {
|
|
138
91
|
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;
|
|
139
92
|
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
140
93
|
switch (op[0]) {
|
|
@@ -156,20 +109,13 @@
|
|
|
156
109
|
}
|
|
157
110
|
}
|
|
158
111
|
|
|
159
|
-
|
|
160
|
-
if (k2 === undefined) k2 = k;
|
|
161
|
-
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
162
|
-
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
163
|
-
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
164
|
-
}
|
|
165
|
-
Object.defineProperty(o, k2, desc);
|
|
166
|
-
}) : (function(o, m, k, k2) {
|
|
112
|
+
function __createBinding(o, m, k, k2) {
|
|
167
113
|
if (k2 === undefined) k2 = k;
|
|
168
114
|
o[k2] = m[k];
|
|
169
|
-
}
|
|
115
|
+
}
|
|
170
116
|
|
|
171
|
-
function __exportStar(m,
|
|
172
|
-
for (var p in m) if (p !== "default" && !
|
|
117
|
+
function __exportStar(m, exports) {
|
|
118
|
+
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) exports[p] = m[p];
|
|
173
119
|
}
|
|
174
120
|
|
|
175
121
|
function __values(o) {
|
|
@@ -201,31 +147,19 @@
|
|
|
201
147
|
return ar;
|
|
202
148
|
}
|
|
203
149
|
|
|
204
|
-
/** @deprecated */
|
|
205
150
|
function __spread() {
|
|
206
151
|
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
207
152
|
ar = ar.concat(__read(arguments[i]));
|
|
208
153
|
return ar;
|
|
209
154
|
}
|
|
210
155
|
|
|
211
|
-
/** @deprecated */
|
|
212
156
|
function __spreadArrays() {
|
|
213
157
|
for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;
|
|
214
158
|
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
215
159
|
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
216
160
|
r[k] = a[j];
|
|
217
161
|
return r;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
function __spreadArray(to, from, pack) {
|
|
221
|
-
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
222
|
-
if (ar || !(i in from)) {
|
|
223
|
-
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
224
|
-
ar[i] = from[i];
|
|
225
|
-
}
|
|
226
|
-
}
|
|
227
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
228
|
-
}
|
|
162
|
+
};
|
|
229
163
|
|
|
230
164
|
function __await(v) {
|
|
231
165
|
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
@@ -246,7 +180,7 @@
|
|
|
246
180
|
function __asyncDelegator(o) {
|
|
247
181
|
var i, p;
|
|
248
182
|
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
249
|
-
function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done:
|
|
183
|
+
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; }
|
|
250
184
|
}
|
|
251
185
|
|
|
252
186
|
function __asyncValues(o) {
|
|
@@ -262,17 +196,11 @@
|
|
|
262
196
|
return cooked;
|
|
263
197
|
};
|
|
264
198
|
|
|
265
|
-
var __setModuleDefault = Object.create ? (function(o, v) {
|
|
266
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
267
|
-
}) : function(o, v) {
|
|
268
|
-
o["default"] = v;
|
|
269
|
-
};
|
|
270
|
-
|
|
271
199
|
function __importStar(mod) {
|
|
272
200
|
if (mod && mod.__esModule) return mod;
|
|
273
201
|
var result = {};
|
|
274
|
-
if (mod != null) for (var k in mod) if (
|
|
275
|
-
|
|
202
|
+
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
|
|
203
|
+
result.default = mod;
|
|
276
204
|
return result;
|
|
277
205
|
}
|
|
278
206
|
|
|
@@ -280,106 +208,27 @@
|
|
|
280
208
|
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
281
209
|
}
|
|
282
210
|
|
|
283
|
-
function __classPrivateFieldGet(receiver,
|
|
284
|
-
if (
|
|
285
|
-
|
|
286
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
287
|
-
}
|
|
288
|
-
|
|
289
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
290
|
-
if (kind === "m") throw new TypeError("Private method is not writable");
|
|
291
|
-
if (kind === "a" && !f) throw new TypeError("Private accessor was defined without a setter");
|
|
292
|
-
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");
|
|
293
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
294
|
-
}
|
|
295
|
-
|
|
296
|
-
function __classPrivateFieldIn(state, receiver) {
|
|
297
|
-
if (receiver === null || (typeof receiver !== "object" && typeof receiver !== "function")) throw new TypeError("Cannot use 'in' operator on non-object");
|
|
298
|
-
return typeof state === "function" ? receiver === state : state.has(receiver);
|
|
299
|
-
}
|
|
300
|
-
|
|
301
|
-
function __addDisposableResource(env, value, async) {
|
|
302
|
-
if (value !== null && value !== void 0) {
|
|
303
|
-
if (typeof value !== "object" && typeof value !== "function") throw new TypeError("Object expected.");
|
|
304
|
-
var dispose;
|
|
305
|
-
if (async) {
|
|
306
|
-
if (!Symbol.asyncDispose) throw new TypeError("Symbol.asyncDispose is not defined.");
|
|
307
|
-
dispose = value[Symbol.asyncDispose];
|
|
308
|
-
}
|
|
309
|
-
if (dispose === void 0) {
|
|
310
|
-
if (!Symbol.dispose) throw new TypeError("Symbol.dispose is not defined.");
|
|
311
|
-
dispose = value[Symbol.dispose];
|
|
312
|
-
}
|
|
313
|
-
if (typeof dispose !== "function") throw new TypeError("Object not disposable.");
|
|
314
|
-
env.stack.push({ value: value, dispose: dispose, async: async });
|
|
315
|
-
}
|
|
316
|
-
else if (async) {
|
|
317
|
-
env.stack.push({ async: true });
|
|
211
|
+
function __classPrivateFieldGet(receiver, privateMap) {
|
|
212
|
+
if (!privateMap.has(receiver)) {
|
|
213
|
+
throw new TypeError("attempted to get private field on non-instance");
|
|
318
214
|
}
|
|
319
|
-
return
|
|
215
|
+
return privateMap.get(receiver);
|
|
320
216
|
}
|
|
321
217
|
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
};
|
|
326
|
-
|
|
327
|
-
function __disposeResources(env) {
|
|
328
|
-
function fail(e) {
|
|
329
|
-
env.error = env.hasError ? new _SuppressedError(e, env.error, "An error was suppressed during disposal.") : e;
|
|
330
|
-
env.hasError = true;
|
|
218
|
+
function __classPrivateFieldSet(receiver, privateMap, value) {
|
|
219
|
+
if (!privateMap.has(receiver)) {
|
|
220
|
+
throw new TypeError("attempted to set private field on non-instance");
|
|
331
221
|
}
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
try {
|
|
336
|
-
var result = rec.dispose && rec.dispose.call(rec.value);
|
|
337
|
-
if (rec.async) return Promise.resolve(result).then(next, function(e) { fail(e); return next(); });
|
|
338
|
-
}
|
|
339
|
-
catch (e) {
|
|
340
|
-
fail(e);
|
|
341
|
-
}
|
|
342
|
-
}
|
|
343
|
-
if (env.hasError) throw env.error;
|
|
344
|
-
}
|
|
345
|
-
return next();
|
|
346
|
-
}
|
|
347
|
-
|
|
348
|
-
var tslib_es6 = {
|
|
349
|
-
__extends: __extends,
|
|
350
|
-
__assign: __assign,
|
|
351
|
-
__rest: __rest,
|
|
352
|
-
__decorate: __decorate,
|
|
353
|
-
__param: __param,
|
|
354
|
-
__metadata: __metadata,
|
|
355
|
-
__awaiter: __awaiter,
|
|
356
|
-
__generator: __generator,
|
|
357
|
-
__createBinding: __createBinding,
|
|
358
|
-
__exportStar: __exportStar,
|
|
359
|
-
__values: __values,
|
|
360
|
-
__read: __read,
|
|
361
|
-
__spread: __spread,
|
|
362
|
-
__spreadArrays: __spreadArrays,
|
|
363
|
-
__spreadArray: __spreadArray,
|
|
364
|
-
__await: __await,
|
|
365
|
-
__asyncGenerator: __asyncGenerator,
|
|
366
|
-
__asyncDelegator: __asyncDelegator,
|
|
367
|
-
__asyncValues: __asyncValues,
|
|
368
|
-
__makeTemplateObject: __makeTemplateObject,
|
|
369
|
-
__importStar: __importStar,
|
|
370
|
-
__importDefault: __importDefault,
|
|
371
|
-
__classPrivateFieldGet: __classPrivateFieldGet,
|
|
372
|
-
__classPrivateFieldSet: __classPrivateFieldSet,
|
|
373
|
-
__classPrivateFieldIn: __classPrivateFieldIn,
|
|
374
|
-
__addDisposableResource: __addDisposableResource,
|
|
375
|
-
__disposeResources: __disposeResources,
|
|
376
|
-
};
|
|
222
|
+
privateMap.set(receiver, value);
|
|
223
|
+
return value;
|
|
224
|
+
}
|
|
377
225
|
|
|
378
226
|
var RaDashboardService = /** @class */ (function (_super) {
|
|
379
227
|
__extends(RaDashboardService, _super);
|
|
380
228
|
function RaDashboardService(injector) {
|
|
381
229
|
var _this = _super.call(this, injector, '') || this;
|
|
382
230
|
_this.loadedScripts = [];
|
|
231
|
+
_this.clientId = undefined;
|
|
383
232
|
return _this;
|
|
384
233
|
}
|
|
385
234
|
/*
|
|
@@ -432,12 +281,6 @@
|
|
|
432
281
|
/**To Update widgetInfo in database */
|
|
433
282
|
RaDashboardService.prototype.updateWidget = function (widgetInfo, appConfig) {
|
|
434
283
|
this.baseUrl = appConfig.apiBaseUrl;
|
|
435
|
-
var info = {};
|
|
436
|
-
info.widgetConfigInfo = widgetInfo.widgetConfigInfo;
|
|
437
|
-
info.widgetInstanceId = widgetInfo.widgetInstanceId;
|
|
438
|
-
info.widgetTitle = widgetInfo.widgetTitle;
|
|
439
|
-
info.widgetType = widgetInfo.widgetType;
|
|
440
|
-
info.widgetId = widgetInfo.widgetId;
|
|
441
284
|
return this.post('widget/UpdateUserWidget', widgetInfo);
|
|
442
285
|
};
|
|
443
286
|
/** To Move or change position if current widget container*/
|
|
@@ -553,12 +396,6 @@
|
|
|
553
396
|
RAEvent["UpdateAppledFiterForInapplicableFilter"] = "UpdateAppledFiterForInapplicableFilter";
|
|
554
397
|
/**show inapplicable filter message in global filter flyout */
|
|
555
398
|
RAEvent["ShowInapplicableFilterMessage"] = "ShowInapplicableFilterMessage";
|
|
556
|
-
/** Bulk Action Clicked */
|
|
557
|
-
RAEvent["BulkActionClick"] = "BulkActionClick";
|
|
558
|
-
/** Global Filter Clicked */
|
|
559
|
-
/** When user change the curated filter(eg:data streams), system will create/delete widgets */
|
|
560
|
-
RAEvent["CuratedFilterChange"] = "CuratedFilterChange";
|
|
561
|
-
RAEvent["GlobalFilterClick"] = "GlobalFilterClick";
|
|
562
399
|
})(exports.RAEvent || (exports.RAEvent = {}));
|
|
563
400
|
|
|
564
401
|
(function (RAEventKey) {
|
|
@@ -572,9 +409,9 @@
|
|
|
572
409
|
margin: 10,
|
|
573
410
|
outerMargin: true,
|
|
574
411
|
outerMarginTop: 10,
|
|
575
|
-
outerMarginRight:
|
|
412
|
+
outerMarginRight: 10,
|
|
576
413
|
outerMarginBottom: 30,
|
|
577
|
-
outerMarginLeft:
|
|
414
|
+
outerMarginLeft: 10,
|
|
578
415
|
useTransformPositioning: true,
|
|
579
416
|
mobileBreakpoint: 640,
|
|
580
417
|
minCols: 10,
|
|
@@ -689,7 +526,7 @@
|
|
|
689
526
|
enumerable: true,
|
|
690
527
|
configurable: true
|
|
691
528
|
});
|
|
692
|
-
RADashboardResponsiveService.prototype.getGridsterConfig = function (isWidgetMgmnt
|
|
529
|
+
RADashboardResponsiveService.prototype.getGridsterConfig = function (isWidgetMgmnt) {
|
|
693
530
|
var config = GridsterConfigDefaultSettings;
|
|
694
531
|
config.minCols = this.currentResInfo.maxCols;
|
|
695
532
|
config.maxCols = this.currentResInfo.maxCols;
|
|
@@ -711,13 +548,6 @@
|
|
|
711
548
|
config.swap = true;
|
|
712
549
|
config.draggable.enabled = true;
|
|
713
550
|
}
|
|
714
|
-
if (!resize) {
|
|
715
|
-
config.resizable.enabled = false;
|
|
716
|
-
config.swap = false;
|
|
717
|
-
}
|
|
718
|
-
if (!canMove) {
|
|
719
|
-
config.draggable.enabled = false;
|
|
720
|
-
}
|
|
721
551
|
return config;
|
|
722
552
|
};
|
|
723
553
|
/**To map IwidgetInfo object to gridsterItem */
|
|
@@ -725,9 +555,6 @@
|
|
|
725
555
|
if (widget.widgetSettings) {
|
|
726
556
|
widget.settings = JSON.parse(widget.widgetSettings);
|
|
727
557
|
}
|
|
728
|
-
if (widget.templateSettings) {
|
|
729
|
-
widget.templateWidgetSettings = JSON.parse(widget.templateSettings);
|
|
730
|
-
}
|
|
731
558
|
var gridsterItem = {
|
|
732
559
|
cols: this.getWidth(widget.width),
|
|
733
560
|
rows: this.getHeight(widget.height),
|
|
@@ -778,7 +605,7 @@
|
|
|
778
605
|
}());
|
|
779
606
|
|
|
780
607
|
var RADashboardArea = /** @class */ (function () {
|
|
781
|
-
function RADashboardArea(dashboardService, ngZone, ngxService, translateService, notifier, responsiveService, permissionService) {
|
|
608
|
+
function RADashboardArea(dashboardService, ngZone, ngxService, translateService, notifier, responsiveService, permissionService, router) {
|
|
782
609
|
this.dashboardService = dashboardService;
|
|
783
610
|
this.ngZone = ngZone;
|
|
784
611
|
this.ngxService = ngxService;
|
|
@@ -786,6 +613,7 @@
|
|
|
786
613
|
this.notifier = notifier;
|
|
787
614
|
this.responsiveService = responsiveService;
|
|
788
615
|
this.permissionService = permissionService;
|
|
616
|
+
this.router = router;
|
|
789
617
|
this.widgetList = Array();
|
|
790
618
|
this.gridheight = 300;
|
|
791
619
|
this.gridcellHeight = 0;
|
|
@@ -795,21 +623,14 @@
|
|
|
795
623
|
this.domResized = false;
|
|
796
624
|
this.showEmptyDashboard = false;
|
|
797
625
|
this.isWidgetMgmnt = false;
|
|
798
|
-
this.initialWidgetCount = 10;
|
|
799
|
-
this.currentLoadedIndex = 0;
|
|
800
|
-
this.loading = false;
|
|
801
626
|
this.widgetHeight = 2;
|
|
802
627
|
this.widgetWidth = 4;
|
|
803
628
|
this.hideDashboardBanner = new core.EventEmitter();
|
|
804
629
|
}
|
|
805
630
|
RADashboardArea.prototype.ngOnInit = function () {
|
|
806
631
|
var _this = this;
|
|
807
|
-
window.addEventListener('scroll', function () {
|
|
808
|
-
_this.loadNext();
|
|
809
|
-
});
|
|
810
632
|
this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
|
|
811
633
|
this.initiateGridsterConfig();
|
|
812
|
-
this.setEmptyDashboardConfig();
|
|
813
634
|
this.lastViewType = this.responsiveService.IsDesktopView ? 'desktop' : 'mobile';
|
|
814
635
|
this.responsiveService.resized.subscribe(function (isDesktop) {
|
|
815
636
|
if (_this.lastViewType != (isDesktop ? 'desktop' : 'mobile') || !isDesktop) {
|
|
@@ -838,11 +659,6 @@
|
|
|
838
659
|
}, 100);
|
|
839
660
|
}
|
|
840
661
|
});
|
|
841
|
-
setTimeout(function () {
|
|
842
|
-
_this.bulkActionClick = _this.raDashboardEventBus.subscribe(exports.RAEvent.BulkActionClick).subscribe(function (data) {
|
|
843
|
-
_this.bulkActionData = JSON.parse(JSON.stringify(data)); // To create a new reference;
|
|
844
|
-
});
|
|
845
|
-
});
|
|
846
662
|
};
|
|
847
663
|
RADashboardArea.prototype.ngOnChanges = function (changes) {
|
|
848
664
|
this.isWidgetMgmnt = this.permissionService.hasPermission('ra.widgetmanagement');
|
|
@@ -850,44 +666,28 @@
|
|
|
850
666
|
this.isWidgetLoaded = true;
|
|
851
667
|
this.loadWidgets(this.userDashboardId, this.areaKey);
|
|
852
668
|
}
|
|
853
|
-
this.initiateGridsterConfig();
|
|
854
669
|
if (changes.raDashboardEventBus && changes.raDashboardEventBus.currentValue != changes.raDashboardEventBus.previousValue) {
|
|
855
670
|
this.inititateEventBusSubscritions();
|
|
856
671
|
}
|
|
857
672
|
};
|
|
858
|
-
RADashboardArea.prototype.setEmptyDashboardConfig = function () {
|
|
859
|
-
if (this.dashboardInfo && this.dashboardInfo.templateConfig.emptyDashboardHeader) {
|
|
860
|
-
this.emptyDashboardTitle = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.titleKey);
|
|
861
|
-
this.emptyDashboardMsg1 = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey1);
|
|
862
|
-
this.emptyDashboardMsg2 = (this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2) ? this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.descriptionKey2) : '';
|
|
863
|
-
this.emptyDashboardButtonText = this.translateService.translate("dashboard." + this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonTextKey);
|
|
864
|
-
this.emptyDashboardButtonIcon = this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon ? this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonIcon : '';
|
|
865
|
-
this.emptyDashboardButtonAction = this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction ? this.dashboardInfo.templateConfig.emptyDashboardHeader.buttonAction : '';
|
|
866
|
-
}
|
|
867
|
-
};
|
|
868
673
|
/**To set GridsterConfig */
|
|
869
674
|
RADashboardArea.prototype.initiateGridsterConfig = function () {
|
|
870
675
|
var _this = this;
|
|
871
|
-
|
|
872
|
-
|
|
873
|
-
|
|
874
|
-
|
|
875
|
-
|
|
876
|
-
|
|
877
|
-
|
|
878
|
-
|
|
879
|
-
|
|
880
|
-
if (
|
|
881
|
-
|
|
882
|
-
_this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
883
|
-
}
|
|
676
|
+
/**To override default configuration values to the gridster control */
|
|
677
|
+
this.options = this.responsiveService.getGridsterConfig(this.isWidgetMgmnt);
|
|
678
|
+
this.options.initCallback = function (gridster) {
|
|
679
|
+
if (_this.options.api) {
|
|
680
|
+
_this.gridcellHeight = _this.options.api.getCurrentRowHeight();
|
|
681
|
+
}
|
|
682
|
+
};
|
|
683
|
+
this.options.itemChangeCallback = function (item) {
|
|
684
|
+
if (_this.responsiveService.IsDesktopView) {
|
|
685
|
+
if (item.widgetInfo && item.widgetInfo.widgetInstanceId) {
|
|
686
|
+
_this.updateWidgetPosition(item.widgetInfo.widgetInstanceId);
|
|
884
687
|
}
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
}
|
|
888
|
-
};
|
|
889
|
-
RADashboardArea.prototype.widgetLoaded = function (widget) {
|
|
890
|
-
widget.canLoadData = true;
|
|
688
|
+
}
|
|
689
|
+
_this.setAreaHeight();
|
|
690
|
+
};
|
|
891
691
|
};
|
|
892
692
|
/** To initiate eventbus subsctiptions */
|
|
893
693
|
RADashboardArea.prototype.inititateEventBusSubscritions = function () {
|
|
@@ -907,11 +707,6 @@
|
|
|
907
707
|
_this.addWidget(e);
|
|
908
708
|
});
|
|
909
709
|
});
|
|
910
|
-
this.curatedFilterChange = this.raDashboardEventBus.subscribe(exports.RAEvent.CuratedFilterChange).subscribe(function (e) {
|
|
911
|
-
_this.ngZone.run(function () {
|
|
912
|
-
_this.loadWidgets(_this.userDashboardId, _this.areaKey);
|
|
913
|
-
});
|
|
914
|
-
});
|
|
915
710
|
this.rearrangeWidgetClick = this.raDashboardEventBus.subscribe(exports.RAEvent.RearrangeClicked).subscribe(function (e) {
|
|
916
711
|
_this.ngZone.run(function () {
|
|
917
712
|
_this.rearrangeWidgets();
|
|
@@ -960,10 +755,6 @@
|
|
|
960
755
|
this.widgetLibraryDoneClick.unsubscribe();
|
|
961
756
|
if (this.rearrangeWidgetClick)
|
|
962
757
|
this.rearrangeWidgetClick.unsubscribe();
|
|
963
|
-
if (this.curatedFilterChange)
|
|
964
|
-
this.curatedFilterChange.unsubscribe();
|
|
965
|
-
if (this.bulkActionClick)
|
|
966
|
-
this.bulkActionClick.unsubscribe();
|
|
967
758
|
};
|
|
968
759
|
/**To update position/dimention of all widgets in the area */
|
|
969
760
|
RADashboardArea.prototype.updateWidgets = function () {
|
|
@@ -1000,16 +791,14 @@
|
|
|
1000
791
|
/** To retrieve widgets based on userDashboardid and area name */
|
|
1001
792
|
RADashboardArea.prototype.loadWidgets = function (userDashboarId, areaKey) {
|
|
1002
793
|
var _this = this;
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
this.initialWidgetCount = 1000;
|
|
1008
|
-
this.currentLoadedIndex = 0;
|
|
1009
|
-
this.loading = false;
|
|
794
|
+
var currentUrl = this.router.url;
|
|
795
|
+
var IsTypeIndicator = false;
|
|
796
|
+
if (currentUrl.includes('indicatorDashboard'))
|
|
797
|
+
IsTypeIndicator = true;
|
|
1010
798
|
var widgetInfo = {
|
|
1011
799
|
dashboardId: userDashboarId.toString(),
|
|
1012
|
-
dashboardAreaKey: areaKey
|
|
800
|
+
dashboardAreaKey: areaKey,
|
|
801
|
+
IsTypeIndicator: IsTypeIndicator
|
|
1013
802
|
};
|
|
1014
803
|
this.widgetList = [];
|
|
1015
804
|
this.dashboardService.getWidgetsByDashboardArea(widgetInfo, this.appConfig).subscribe(function (widgets) {
|
|
@@ -1025,8 +814,9 @@
|
|
|
1025
814
|
});
|
|
1026
815
|
_this.checkPAMWidgets();
|
|
1027
816
|
if (widgets && widgets.length > 0) {
|
|
1028
|
-
_this.
|
|
1029
|
-
_this.
|
|
817
|
+
_this.dashboardService.clientId = widgets[0].clientId;
|
|
818
|
+
_this.widgetList = _this.mapObjectListToGridsterItemList(widgets);
|
|
819
|
+
_this.setAreaHeight();
|
|
1030
820
|
_this.raDashboardEventBus.publish(exports.RAEvent.HideDashboardBanner, false);
|
|
1031
821
|
}
|
|
1032
822
|
else {
|
|
@@ -1035,45 +825,6 @@
|
|
|
1035
825
|
}
|
|
1036
826
|
});
|
|
1037
827
|
};
|
|
1038
|
-
RADashboardArea.prototype.loadWidgetsDelta = function () {
|
|
1039
|
-
var _this = this;
|
|
1040
|
-
var _a;
|
|
1041
|
-
if (!this.loading) {
|
|
1042
|
-
this.loading = true;
|
|
1043
|
-
var widgets = this.mapObjectListToGridsterItemList(this.userWidgets.slice(this.currentLoadedIndex, (this.currentLoadedIndex + this.initialWidgetCount)));
|
|
1044
|
-
this.currentLoadedIndex += this.initialWidgetCount;
|
|
1045
|
-
(_a = this.widgetList).push.apply(_a, __spread(widgets));
|
|
1046
|
-
this.setAreaHeight();
|
|
1047
|
-
setTimeout(function () {
|
|
1048
|
-
_this.loading = false;
|
|
1049
|
-
});
|
|
1050
|
-
}
|
|
1051
|
-
};
|
|
1052
|
-
RADashboardArea.prototype.dataLoaded = function (widgetElement) {
|
|
1053
|
-
this.loadNext();
|
|
1054
|
-
};
|
|
1055
|
-
RADashboardArea.prototype.loadNext = function () {
|
|
1056
|
-
if (this.divBottom) {
|
|
1057
|
-
if (this.elementInViewport(this.divBottom.nativeElement)) {
|
|
1058
|
-
this.loadWidgetsDelta();
|
|
1059
|
-
}
|
|
1060
|
-
}
|
|
1061
|
-
};
|
|
1062
|
-
RADashboardArea.prototype.elementInViewport = function (el) {
|
|
1063
|
-
var top = el.offsetTop;
|
|
1064
|
-
var left = el.offsetLeft;
|
|
1065
|
-
var width = el.offsetWidth;
|
|
1066
|
-
var height = el.offsetHeight;
|
|
1067
|
-
while (el.offsetParent) {
|
|
1068
|
-
el = el.offsetParent;
|
|
1069
|
-
top += el.offsetTop;
|
|
1070
|
-
left += el.offsetLeft;
|
|
1071
|
-
}
|
|
1072
|
-
return (top >= window.scrollY &&
|
|
1073
|
-
left >= window.scrollX &&
|
|
1074
|
-
(top + height) <= (window.scrollY + window.innerHeight) &&
|
|
1075
|
-
(left + width) <= (window.scrollX + window.innerWidth));
|
|
1076
|
-
};
|
|
1077
828
|
/** To set Area(Gridster) height dynamically as widgets are added/removed */
|
|
1078
829
|
RADashboardArea.prototype.setAreaHeight = function () {
|
|
1079
830
|
var _this = this;
|
|
@@ -1117,22 +868,22 @@
|
|
|
1117
868
|
/** To remove a widget instance from dashboard and to save info in database */
|
|
1118
869
|
RADashboardArea.prototype.deleteWidget = function (widgetInstanceId, isalertDisabled) {
|
|
1119
870
|
if (isalertDisabled === void 0) { isalertDisabled = false; }
|
|
1120
|
-
var widget = this.userWidgets.filter(function (item) {
|
|
1121
|
-
return item.widgetInstanceId === widgetInstanceId;
|
|
1122
|
-
});
|
|
1123
|
-
if (widget.length > 0) {
|
|
1124
|
-
this.userWidgets.splice(this.userWidgets.indexOf(widget[0]), 1);
|
|
1125
|
-
}
|
|
1126
|
-
if (this.PAMWidgets.length > 0) {
|
|
1127
|
-
var indx = this.PAMWidgets.indexOf(widgetInstanceId);
|
|
1128
|
-
if (indx > -1)
|
|
1129
|
-
this.PAMWidgets.splice(indx, 1);
|
|
1130
|
-
this.checkPAMWidgets();
|
|
1131
|
-
}
|
|
1132
871
|
var gridsterItem = this.widgetList.filter(function (item) {
|
|
1133
872
|
return item.widgetInfo.widgetInstanceId === widgetInstanceId;
|
|
1134
873
|
});
|
|
1135
874
|
if (gridsterItem.length > 0) {
|
|
875
|
+
var widget = this.userWidgets.filter(function (item) {
|
|
876
|
+
return item.widgetInstanceId === widgetInstanceId;
|
|
877
|
+
});
|
|
878
|
+
if (widget.length > 0) {
|
|
879
|
+
this.userWidgets.splice(this.userWidgets.indexOf(widget[0]), 1);
|
|
880
|
+
}
|
|
881
|
+
if (this.PAMWidgets.length > 0) {
|
|
882
|
+
var indx = this.PAMWidgets.indexOf(widgetInstanceId);
|
|
883
|
+
if (indx > -1)
|
|
884
|
+
this.PAMWidgets.splice(indx, 1);
|
|
885
|
+
this.checkPAMWidgets();
|
|
886
|
+
}
|
|
1136
887
|
this.widgetList.splice(this.widgetList.indexOf(gridsterItem[0]), 1);
|
|
1137
888
|
this.setAreaHeight();
|
|
1138
889
|
if (!isalertDisabled) {
|
|
@@ -1147,15 +898,11 @@
|
|
|
1147
898
|
/**To rearrange widgets position in the dashboard, compactLeft&Up,compactLeft,compactUp,etc*/
|
|
1148
899
|
RADashboardArea.prototype.rearrangeWidgets = function () {
|
|
1149
900
|
var _this = this;
|
|
1150
|
-
this.currentLoadedIndex = 0;
|
|
1151
|
-
this.loading = false;
|
|
1152
901
|
for (var i = 0; i < this.userWidgets.length; i++) {
|
|
1153
902
|
this.userWidgets[i].position_x = 0;
|
|
1154
903
|
this.userWidgets[i].position_y = 0;
|
|
1155
904
|
}
|
|
1156
|
-
this.widgetList =
|
|
1157
|
-
this.loadWidgetsDelta();
|
|
1158
|
-
this.raDashboardEventBus.publish(exports.RAEvent.HideDashboardBanner, false);
|
|
905
|
+
this.widgetList = this.mapObjectListToGridsterItemList(this.userWidgets);
|
|
1159
906
|
if (this.widgetList.length > 0)
|
|
1160
907
|
this.updateWidgetPosition(this.widgetList[0].widgetInfo.widgetInstanceId);
|
|
1161
908
|
setTimeout(function () {
|
|
@@ -1188,33 +935,30 @@
|
|
|
1188
935
|
this.ngxService.start();
|
|
1189
936
|
this.dashboardService.addWidget(data, this.appConfig).subscribe(function (widget) {
|
|
1190
937
|
_this.userWidgets.push(widget);
|
|
1191
|
-
|
|
1192
|
-
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
_this.
|
|
1196
|
-
if (
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
widget.rowHeight = curRowHeight;
|
|
1200
|
-
_this.gridcellHeight = curRowHeight;
|
|
1201
|
-
}
|
|
1202
|
-
}
|
|
1203
|
-
var widgetInstanceId = 0;
|
|
1204
|
-
if (widget && widget.widgetInstanceId) {
|
|
1205
|
-
widgetInstanceId = widget.widgetInstanceId;
|
|
1206
|
-
/**To save added widget position in db */
|
|
1207
|
-
if (_this.responsiveService.IsDesktopView) {
|
|
1208
|
-
setTimeout(function () {
|
|
1209
|
-
_this.updateWidgetPosition(widgetInstanceId);
|
|
1210
|
-
});
|
|
1211
|
-
}
|
|
938
|
+
var gridsterItem = _this.responsiveService.getGridsterItem(widget);
|
|
939
|
+
_this.widgetList.push(gridsterItem);
|
|
940
|
+
_this.setAreaHeight();
|
|
941
|
+
if (_this.options.api) {
|
|
942
|
+
var curRowHeight = Number(_this.options.api.getCurrentRowHeight());
|
|
943
|
+
if (curRowHeight > 0) {
|
|
944
|
+
widget.rowHeight = curRowHeight;
|
|
945
|
+
_this.gridcellHeight = curRowHeight;
|
|
1212
946
|
}
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
947
|
+
}
|
|
948
|
+
var widgetInstanceId = 0;
|
|
949
|
+
if (widget && widget.widgetInstanceId) {
|
|
950
|
+
widgetInstanceId = widget.widgetInstanceId;
|
|
951
|
+
/**To save added widget position in db */
|
|
952
|
+
if (_this.responsiveService.IsDesktopView) {
|
|
953
|
+
setTimeout(function () {
|
|
954
|
+
_this.updateWidgetPosition(widgetInstanceId);
|
|
955
|
+
});
|
|
1216
956
|
}
|
|
1217
957
|
}
|
|
958
|
+
if (widget.settings && widget.settings.isPAMWidget) {
|
|
959
|
+
_this.PAMWidgets.push(widget.widgetInstanceId);
|
|
960
|
+
_this.checkPAMWidgets();
|
|
961
|
+
}
|
|
1218
962
|
_this.raDashboardEventBus.publish(exports.RAEvent.WidgetAdded, widget);
|
|
1219
963
|
});
|
|
1220
964
|
};
|
|
@@ -1243,15 +987,12 @@
|
|
|
1243
987
|
});
|
|
1244
988
|
}
|
|
1245
989
|
this.userWidgets.push(data);
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
this.
|
|
1251
|
-
|
|
1252
|
-
this.PAMWidgets.push(data.widgetInstanceId);
|
|
1253
|
-
this.checkPAMWidgets();
|
|
1254
|
-
}
|
|
990
|
+
var gridsterItem = this.responsiveService.getGridsterItem(data);
|
|
991
|
+
this.widgetList.push(gridsterItem);
|
|
992
|
+
this.setAreaHeight();
|
|
993
|
+
if (data.settings && data.settings.isPAMWidget) {
|
|
994
|
+
this.PAMWidgets.push(data.widgetInstanceId);
|
|
995
|
+
this.checkPAMWidgets();
|
|
1255
996
|
}
|
|
1256
997
|
};
|
|
1257
998
|
RADashboardArea.prototype.mapObjectListToGridsterItemList = function (widgetList) {
|
|
@@ -1280,11 +1021,8 @@
|
|
|
1280
1021
|
});
|
|
1281
1022
|
return widgetListArray;
|
|
1282
1023
|
};
|
|
1283
|
-
RADashboardArea.prototype.
|
|
1284
|
-
|
|
1285
|
-
this.raDashboardEventBus.publish(exports.RAEvent.AddNewWidgetToDashboard, null);
|
|
1286
|
-
else if (this.emptyDashboardButtonAction == "filter")
|
|
1287
|
-
this.raDashboardEventBus.publish(exports.RAEvent.GlobalFilterClick, null);
|
|
1024
|
+
RADashboardArea.prototype.addNewWidget = function () {
|
|
1025
|
+
this.raDashboardEventBus.publish(exports.RAEvent.AddNewWidgetToDashboard, null);
|
|
1288
1026
|
};
|
|
1289
1027
|
RADashboardArea.prototype.updateAppliedFilters = function (data) {
|
|
1290
1028
|
this.raDashboardEventBus.publish(exports.RAEvent.UpdateAppledFiterForInapplicableFilter, data);
|
|
@@ -1304,7 +1042,8 @@
|
|
|
1304
1042
|
{ type: raCommon.RATranslateService },
|
|
1305
1043
|
{ type: angularNotifier.NotifierService },
|
|
1306
1044
|
{ type: RADashboardResponsiveService },
|
|
1307
|
-
{ type: raCommon.RAPermissionService }
|
|
1045
|
+
{ type: raCommon.RAPermissionService },
|
|
1046
|
+
{ type: router.Router }
|
|
1308
1047
|
]; };
|
|
1309
1048
|
__decorate([
|
|
1310
1049
|
core.Input('user-dashboard-id'),
|
|
@@ -1334,14 +1073,6 @@
|
|
|
1334
1073
|
core.Input('app-config'),
|
|
1335
1074
|
__metadata("design:type", Object)
|
|
1336
1075
|
], RADashboardArea.prototype, "appConfig", void 0);
|
|
1337
|
-
__decorate([
|
|
1338
|
-
core.Input('dashboard-info'),
|
|
1339
|
-
__metadata("design:type", Object)
|
|
1340
|
-
], RADashboardArea.prototype, "dashboardInfo", void 0);
|
|
1341
|
-
__decorate([
|
|
1342
|
-
core.Input(),
|
|
1343
|
-
__metadata("design:type", Object)
|
|
1344
|
-
], RADashboardArea.prototype, "templateConfig", void 0);
|
|
1345
1076
|
__decorate([
|
|
1346
1077
|
core.Output(),
|
|
1347
1078
|
__metadata("design:type", Object)
|
|
@@ -1350,15 +1081,11 @@
|
|
|
1350
1081
|
core.ViewChild('gridWrapper', { static: false }),
|
|
1351
1082
|
__metadata("design:type", core.ElementRef)
|
|
1352
1083
|
], RADashboardArea.prototype, "gridWrapper", void 0);
|
|
1353
|
-
__decorate([
|
|
1354
|
-
core.ViewChild('divBottom', { static: false }),
|
|
1355
|
-
__metadata("design:type", core.ElementRef)
|
|
1356
|
-
], RADashboardArea.prototype, "divBottom", void 0);
|
|
1357
1084
|
RADashboardArea = __decorate([
|
|
1358
1085
|
core.Component({
|
|
1359
1086
|
selector: 'ra-dashboard-area',
|
|
1360
|
-
template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\"
|
|
1361
|
-
styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#
|
|
1087
|
+
template: "<div #gridWrapper class=\"wrap gridster gridster-mobile\" [ngStyle]=\"{'height': userWidgets.length > 0 ? (gridheight + 'px') : 'unset'}\">\r\n <!-- <div #gridWrapper class=\"wrap gridster\"> -->\r\n <gridster [options]=\"options\" style=\"height:100%;\" *ngIf=\"userWidgets.length > 0\">\r\n <gridster-item [item]=\"item\" *ngFor=\"let item of widgetList\">\r\n <ra-widget-container [app-config]=\"appConfig\" [event-bus]=\"raDashboardEventBus\"\r\n (widgetDeleted)=\"deleteWidget($event)\" [data]=\"item\" [global-filter]=\"globalFilter\"\r\n [grid-cell-height]=\"gridcellHeight\" *ngIf=\"gridcellHeight && gridcellHeight > 0\" [widget-width]=\"item.cols\"\r\n [widget-height]=\"item.rows\" [widget-instance-id]=\"item.widgetInstanceId\" [dom-resized]=\"domResized\"\r\n (updateAppliedFilters)=\"updateAppliedFilters($event)\">\r\n </ra-widget-container>\r\n </gridster-item>\r\n </gridster>\r\n\r\n <div class=\"empty-padding kiosk-hide\" *ngIf=\"showEmptyDashboard\">\r\n <div class=\"empty-wrapper\">\r\n <div></div>\r\n <div class=\"m-1 empty-prefix\">\r\n <i class=\"fal fa-edit edit-icon\"></i>\r\n <span class=\"empty-title\">{{'dashboard.emptydashboard'|translate}}</span>\r\n </div>\r\n <div class=\"empty-content light\">\r\n <div>\r\n <div class=\"col-sm-12 empty-msg\">\r\n {{'dashboard.emptydashboardmessage'|translate}} <br />\r\n {{'dashboard.emptydashboardmessage2'|translate}}\r\n </div>\r\n <button *ngIf=\"isWidgetMgmnt\" class=\"btn btnLib btn-sm m-1 dashboard-button light\" (click)=\"addNewWidget()\">\r\n <i class=\"fal fa-plus m-1\"></i>{{'dashboard.addawidgets'|translate}}</button>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n\r\n <notifier-container></notifier-container>\r\n</div>",
|
|
1088
|
+
styles: ["gridster{width:inherit;resize:height;display:flex;background-color:#ededed;overflow-y:hidden!important}.dvheader{width:100%;height:35px;background:#000;color:#fff;padding:7px 3px 5px 6px;text-transform:uppercase}gridster-item{box-sizing:border-box;z-index:1;position:absolute;overflow:hidden;transition:.3s;display:none;background:#fff;-webkit-user-select:text;-moz-user-select:text;user-select:text;box-shadow:0 1px 10px rgba(0,0,0,.05)}gridster-item:hover{box-shadow:0 1px 10px rgba(0,0,0,.15)}@media screen and (max-width:685px){.gridster-mobile{height:auto!important;margin-bottom:50px!important}}@media screen and (max-width:350px){.gridster-mobile{min-height:330px!important;margin-bottom:0!important}}.empty-padding{padding:40px 20px 20px;background-color:#ededed;display:flex;justify-content:center;align-content:center}.empty-wrapper{display:flex;background-color:#fff;border-radius:8px;min-height:125px;width:72%}.empty-prefix{color:#32ad3c;font-size:18px;display:flex;align-items:center;padding:10px 30px;min-width:max-content;min-width:-moz-max-content}.empty-content{color:#333;border-left:1px solid #a9afb1;width:100%;display:flex;align-items:center;padding:15px 30px 10px 40px}.empty-msg{padding:0 0 5px;font-size:16px}.dashboard-button{padding:5px 10px 5px 5px!important}.btnLib{background-color:#ededed;color:#333!important}.btn-group-sm>.btn,.btn-sm{padding:5px 20px 5px 5px}.edit-icon{color:#32ad3c;font-size:24px;margin-right:15px}.empty-title{margin-top:10px}@media screen and (max-width:600px){.empty-padding{padding:10px;background-color:#ededed;width:100%;display:block}.empty-wrapper{display:flex;background-color:#fff;border-radius:8px;min-height:125px;width:100%}.empty-prefix{color:#32ad3c;font-size:16px;display:flex;height:40px;padding:6px 10px 8px}.empty-content{color:#333;display:flex;padding:5px 10px 10px;margin-top:44px;margin-left:-185px;border-left:none}.empty-msg{padding:12px 10px 10px 5px;font-size:14px;border-top:1px solid #a9afb1}.edit-icon{color:#32ad3c;font-size:20px;margin-right:6px}.empty-title{margin-top:6px}}"]
|
|
1362
1089
|
}),
|
|
1363
1090
|
__metadata("design:paramtypes", [RaDashboardService,
|
|
1364
1091
|
core.NgZone,
|
|
@@ -1366,7 +1093,8 @@
|
|
|
1366
1093
|
raCommon.RATranslateService,
|
|
1367
1094
|
angularNotifier.NotifierService,
|
|
1368
1095
|
RADashboardResponsiveService,
|
|
1369
|
-
raCommon.RAPermissionService
|
|
1096
|
+
raCommon.RAPermissionService,
|
|
1097
|
+
router.Router])
|
|
1370
1098
|
], RADashboardArea);
|
|
1371
1099
|
return RADashboardArea;
|
|
1372
1100
|
}());
|
|
@@ -1461,11 +1189,8 @@
|
|
|
1461
1189
|
this.showExcell = true;
|
|
1462
1190
|
this.hideTitle = false;
|
|
1463
1191
|
this.inapplicableFilters = [];
|
|
1464
|
-
this.canLoadData = false;
|
|
1465
1192
|
this.widgetDeleted = new core.EventEmitter();
|
|
1466
1193
|
this.updateAppliedFilters = new core.EventEmitter();
|
|
1467
|
-
this.dataLoaded = new core.EventEmitter();
|
|
1468
|
-
this.widgetLoaded = new core.EventEmitter();
|
|
1469
1194
|
this.isWidgetStateApplicable = false;
|
|
1470
1195
|
this.widgetEmptyState = '';
|
|
1471
1196
|
this.lockVisible = false;
|
|
@@ -1490,7 +1215,7 @@
|
|
|
1490
1215
|
configurable: true
|
|
1491
1216
|
});
|
|
1492
1217
|
RAWidgetContainer.prototype.ngOnInit = function () {
|
|
1493
|
-
this.WidgetDisplayName = this.
|
|
1218
|
+
this.WidgetDisplayName = this.getwidgetTitleTranslation(this.data.widgetInfo.widgetTitle);
|
|
1494
1219
|
this.lockIconTitle = this.translateService.translate('Common.lockedfields');
|
|
1495
1220
|
this.lockIconFooter = this.translateService.translate('Common.lockedfieldseditinfo');
|
|
1496
1221
|
this.inapplicableIconTitle = this.translateService.translate('Common.InapplicableFilters');
|
|
@@ -1511,32 +1236,19 @@
|
|
|
1511
1236
|
});
|
|
1512
1237
|
});
|
|
1513
1238
|
}
|
|
1514
|
-
if (this.widgetElement) {
|
|
1515
|
-
|
|
1516
|
-
|
|
1517
|
-
|
|
1518
|
-
|
|
1239
|
+
if (this.widgetElement && changes.globalFilter && changes.globalFilter.currentValue != changes.globalFilter.previousValue) {
|
|
1240
|
+
var filterObj = this.getParsedConfig(this.globalFilter);
|
|
1241
|
+
if (filterObj.WidgetInstanceId) {
|
|
1242
|
+
if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
|
|
1243
|
+
this.refreshWidget(this.data.widgetInfo);
|
|
1519
1244
|
}
|
|
1520
|
-
|
|
1521
|
-
|
|
1522
|
-
var filterObj = this.getParsedConfig(this.globalFilter);
|
|
1523
|
-
if (filterObj.WidgetInstanceId) {
|
|
1524
|
-
if (this.data.widgetInfo.widgetInstanceId != filterObj.WidgetInstanceId)
|
|
1525
|
-
this.refreshWidget(this.data.widgetInfo);
|
|
1526
|
-
}
|
|
1527
|
-
else {
|
|
1528
|
-
//this.refreshWidget(this.data.widgetInfo);
|
|
1529
|
-
}
|
|
1530
|
-
}
|
|
1531
|
-
}
|
|
1532
|
-
if (changes.width && changes.width.currentValue != changes.width.previousValue ||
|
|
1533
|
-
(changes.height && changes.height.currentValue != changes.height.previousValue)) {
|
|
1534
|
-
this.invokeWidgetResizedEvent();
|
|
1245
|
+
else {
|
|
1246
|
+
this.refreshWidget(this.data.widgetInfo);
|
|
1535
1247
|
}
|
|
1536
1248
|
}
|
|
1537
|
-
if (changes.
|
|
1538
|
-
|
|
1539
|
-
|
|
1249
|
+
if (changes.width && changes.width.currentValue != changes.width.previousValue ||
|
|
1250
|
+
(changes.height && changes.height.currentValue != changes.height.previousValue)) {
|
|
1251
|
+
this.invokeWidgetResizedEvent();
|
|
1540
1252
|
}
|
|
1541
1253
|
};
|
|
1542
1254
|
RAWidgetContainer.prototype.invokeWidgetResizedEvent = function () {
|
|
@@ -1728,10 +1440,6 @@
|
|
|
1728
1440
|
_this.showPanel = true;
|
|
1729
1441
|
else
|
|
1730
1442
|
_this.showPanel = false;
|
|
1731
|
-
if (!_this.data.dataLoaded) {
|
|
1732
|
-
_this.data.dataLoaded = true;
|
|
1733
|
-
_this.dataLoaded.emit(_this.widgetElement);
|
|
1734
|
-
}
|
|
1735
1443
|
break;
|
|
1736
1444
|
case 'onConfigEditClicked':
|
|
1737
1445
|
_this.editWidget();
|
|
@@ -1804,9 +1512,7 @@
|
|
|
1804
1512
|
widgetConfigFilter.configChanges = this.getConfigChanges(false);
|
|
1805
1513
|
widgetConfigFilter.widgetInfo.widgetName = widgetInfo.widgetName;
|
|
1806
1514
|
widgetConfigFilter.globalFilter = this.globalFilter;
|
|
1807
|
-
|
|
1808
|
-
//this.widgetElement.loadContent(widgetConfigFilter);
|
|
1809
|
-
this.widgetLoaded.emit();
|
|
1515
|
+
this.widgetElement.loadContent(widgetConfigFilter);
|
|
1810
1516
|
return [4 /*yield*/, this.setLock(widgetConfigFilter.config)];
|
|
1811
1517
|
case 1:
|
|
1812
1518
|
_a.sent();
|
|
@@ -1889,8 +1595,7 @@
|
|
|
1889
1595
|
globalFilter: this.globalFilter,
|
|
1890
1596
|
appConfig: this.appConfig,
|
|
1891
1597
|
widgetInfo: widgetInfo,
|
|
1892
|
-
configChanges: this.getConfigChanges(configChanged)
|
|
1893
|
-
dashboardInfo: this.dashboardInfo
|
|
1598
|
+
configChanges: this.getConfigChanges(configChanged)
|
|
1894
1599
|
};
|
|
1895
1600
|
if (!widgetContainerContext.isWidgetLoaded) return [3 /*break*/, 3];
|
|
1896
1601
|
if (this.widgetElement && typeof (this.widgetElement.setConfigFilter) == 'function') {
|
|
@@ -2077,12 +1782,9 @@
|
|
|
2077
1782
|
var html = '<div id="ra-db-widget-menu"' + 'style="' + style + '" class="download-content dropdown-content widget-config-item dropdown-click" style="z-index: 1002;">';
|
|
2078
1783
|
var settings = '';
|
|
2079
1784
|
if (this.isWidgetMgmnt) {
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
|
|
2084
|
-
if (!this.data.widgetInfo.templateWidgetSettings || !this.data.widgetInfo.templateWidgetSettings.hideMove)
|
|
2085
|
-
settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
|
|
1785
|
+
settings += this.getHtmlForButton('wcEditWidget', 'fal fa-edit', this.editText);
|
|
1786
|
+
settings += this.getHtmlForButton('wcCopyWidget', 'fal fa-copy', this.copyText);
|
|
1787
|
+
settings += this.getHtmlForButton('wcMoveWidget', 'fal fa-arrows-alt', this.moveText);
|
|
2086
1788
|
}
|
|
2087
1789
|
var customPageParams = false;
|
|
2088
1790
|
if (this.data.widgetInfo && this.data.widgetInfo.widgetSettings) {
|
|
@@ -2091,14 +1793,14 @@
|
|
|
2091
1793
|
customPageParams = true;
|
|
2092
1794
|
}
|
|
2093
1795
|
}
|
|
2094
|
-
if (
|
|
1796
|
+
if ((this.detailPageUrl || customPageParams) && this.checkVisitLinkVisiblity()) {
|
|
2095
1797
|
settings += '<a style="max-height: 30px;align-items: center;align-content: center; display: flex;" id="wcVisitWidget">';
|
|
2096
1798
|
settings += '<i style="padding-left: 4px;font-size: 27px !important;" class="fal fa-angle-right"></i> ';
|
|
2097
1799
|
settings += '<span style="padding-left: 11px;margin-top: 2px;" style="padding-left: 6px;">';
|
|
2098
1800
|
settings += this.translateService.translate('Common.visitpage');
|
|
2099
1801
|
settings += '</span></a>';
|
|
2100
1802
|
}
|
|
2101
|
-
if (
|
|
1803
|
+
if ((this.detailPageUrl && this.checkVisitLinkVisiblity()) || this.isWidgetMgmnt) {
|
|
2102
1804
|
html += '<div style="color: #9FA0A4;font-size: 12px;padding-top: 8px;padding-left: 12px;">';
|
|
2103
1805
|
html += this.translateService.translate('Common.settings') + '</div>';
|
|
2104
1806
|
html += settings;
|
|
@@ -2130,7 +1832,7 @@
|
|
|
2130
1832
|
if (this.isDownloadIconVisible && this.isWidgetMgmnt && this.showExcell) {
|
|
2131
1833
|
html += this.getHr();
|
|
2132
1834
|
}
|
|
2133
|
-
if (this.isWidgetMgmnt
|
|
1835
|
+
if (this.isWidgetMgmnt) {
|
|
2134
1836
|
html += '<a id="wcWidgetDelete"><i class="fal fa-times" style="padding-left: 3px;color: red;"></i><span>';
|
|
2135
1837
|
html += this.deleteText;
|
|
2136
1838
|
html += '</span></a>';
|
|
@@ -2211,6 +1913,22 @@
|
|
|
2211
1913
|
if (this.currentComponent)
|
|
2212
1914
|
this.popupInstance.removeMe(this.currentComponent);
|
|
2213
1915
|
};
|
|
1916
|
+
RAWidgetContainer.prototype.getwidgetTitleTranslation = function (item) {
|
|
1917
|
+
var rKey = 'DBW_' + this.translateService.makeCode(item);
|
|
1918
|
+
var translatedString = '';
|
|
1919
|
+
if (this.dashboardService.clientId) {
|
|
1920
|
+
var translationModule = this.dashboardService.clientId + '_DBW';
|
|
1921
|
+
translatedString = this.translateService.translate(translationModule + '.' + rKey);
|
|
1922
|
+
if (translatedString.toLowerCase() === rKey.toLowerCase()) {
|
|
1923
|
+
return item;
|
|
1924
|
+
}
|
|
1925
|
+
else {
|
|
1926
|
+
return translatedString;
|
|
1927
|
+
}
|
|
1928
|
+
}
|
|
1929
|
+
else
|
|
1930
|
+
return item;
|
|
1931
|
+
};
|
|
2214
1932
|
RAWidgetContainer.ctorParameters = function () { return [
|
|
2215
1933
|
{ type: RaDashboardService },
|
|
2216
1934
|
{ type: ngxUiLoader.NgxUiLoaderService },
|
|
@@ -2253,10 +1971,6 @@
|
|
|
2253
1971
|
core.Input('global-filter'),
|
|
2254
1972
|
__metadata("design:type", Object)
|
|
2255
1973
|
], RAWidgetContainer.prototype, "globalFilter", void 0);
|
|
2256
|
-
__decorate([
|
|
2257
|
-
core.Input('dashboard-info'),
|
|
2258
|
-
__metadata("design:type", Object)
|
|
2259
|
-
], RAWidgetContainer.prototype, "dashboardInfo", void 0);
|
|
2260
1974
|
__decorate([
|
|
2261
1975
|
core.Input('data'),
|
|
2262
1976
|
__metadata("design:type", Object)
|
|
@@ -2281,14 +1995,6 @@
|
|
|
2281
1995
|
core.Input('grid-cell-height'),
|
|
2282
1996
|
__metadata("design:type", Number)
|
|
2283
1997
|
], RAWidgetContainer.prototype, "gridCellHeight", void 0);
|
|
2284
|
-
__decorate([
|
|
2285
|
-
core.Input('bulk-action-data'),
|
|
2286
|
-
__metadata("design:type", Object)
|
|
2287
|
-
], RAWidgetContainer.prototype, "bulkActionData", void 0);
|
|
2288
|
-
__decorate([
|
|
2289
|
-
core.Input(),
|
|
2290
|
-
__metadata("design:type", Boolean)
|
|
2291
|
-
], RAWidgetContainer.prototype, "canLoadData", void 0);
|
|
2292
1998
|
__decorate([
|
|
2293
1999
|
core.Output(),
|
|
2294
2000
|
__metadata("design:type", Object)
|
|
@@ -2297,14 +2003,6 @@
|
|
|
2297
2003
|
core.Output(),
|
|
2298
2004
|
__metadata("design:type", Object)
|
|
2299
2005
|
], RAWidgetContainer.prototype, "updateAppliedFilters", void 0);
|
|
2300
|
-
__decorate([
|
|
2301
|
-
core.Output(),
|
|
2302
|
-
__metadata("design:type", Object)
|
|
2303
|
-
], RAWidgetContainer.prototype, "dataLoaded", void 0);
|
|
2304
|
-
__decorate([
|
|
2305
|
-
core.Output(),
|
|
2306
|
-
__metadata("design:type", Object)
|
|
2307
|
-
], RAWidgetContainer.prototype, "widgetLoaded", void 0);
|
|
2308
2006
|
__decorate([
|
|
2309
2007
|
core.Input('dom-resized'),
|
|
2310
2008
|
__metadata("design:type", Boolean),
|
|
@@ -5303,13 +5001,11 @@
|
|
|
5303
5001
|
function RaBaseDashboardTemplate(ngZone) {
|
|
5304
5002
|
var _this = this;
|
|
5305
5003
|
this.ngZone = ngZone;
|
|
5306
|
-
this.initialize = function (eventBus, userDashboardId, appConfig
|
|
5004
|
+
this.initialize = function (eventBus, userDashboardId, appConfig) {
|
|
5307
5005
|
_this.ngZone.run(function () {
|
|
5308
5006
|
_this.userDashboardId = userDashboardId;
|
|
5309
5007
|
_this.appConfig = appConfig;
|
|
5310
5008
|
_this.raDashboardEventBus = eventBus;
|
|
5311
|
-
_this.dashboardInfo = dashboardInfo;
|
|
5312
|
-
_this.templateConfig = templateConfig;
|
|
5313
5009
|
});
|
|
5314
5010
|
_this.init();
|
|
5315
5011
|
};
|