@kolektor/nucleus-material 0.0.8-pre.5672 → 0.0.9-pre.5707
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/{esm2015/kolektor-nucleus-material.js → esm2020/kolektor-nucleus-material.mjs} +0 -0
- package/{esm2015/lib/dialog/dialog.component.js → esm2020/lib/dialog/dialog.component.mjs} +5 -10
- package/{esm2015/lib/dialog/dialog.module.js → esm2020/lib/dialog/dialog.module.mjs} +4 -4
- package/esm2020/lib/dialog/dialog.service.mjs +40 -0
- package/{esm2015/lib/dialog/models.js → esm2020/lib/dialog/models.mjs} +0 -0
- package/esm2020/lib/loaded-content/loaded-content-component.mjs +71 -0
- package/{esm2015/lib/loaded-content/loaded-content-directive.js → esm2020/lib/loaded-content/loaded-content-directive.mjs} +3 -3
- package/{esm2015/lib/loaded-content/loaded-content-module.js → esm2020/lib/loaded-content/loaded-content-module.mjs} +4 -4
- package/esm2020/lib/loaded-content/loading-state.mjs +93 -0
- package/{esm2015/lib/native-styling/models.js → esm2020/lib/native-styling/models.mjs} +0 -0
- package/{esm2015/lib/native-styling/native-styling.service.js → esm2020/lib/native-styling/native-styling.service.mjs} +3 -3
- package/{esm2015/lib/snackbar/models.js → esm2020/lib/snackbar/models.mjs} +0 -0
- package/{esm2015/lib/snackbar/snackbar.module.js → esm2020/lib/snackbar/snackbar.module.mjs} +4 -4
- package/{esm2015/lib/snackbar/snackbar.service.js → esm2020/lib/snackbar/snackbar.service.mjs} +3 -3
- package/{esm2015/lib/swipe-tabs/swipe-tabs-directive.js → esm2020/lib/swipe-tabs/swipe-tabs-directive.mjs} +3 -3
- package/{esm2015/lib/swipe-tabs/swipe-tabs-module.js → esm2020/lib/swipe-tabs/swipe-tabs-module.mjs} +4 -4
- package/esm2020/lib/user-avatar/user-avatar-component.mjs +50 -0
- package/{esm2015/lib/user-avatar/user-avatar-module.js → esm2020/lib/user-avatar/user-avatar-module.mjs} +4 -4
- package/{esm2015/public-api.js → esm2020/public-api.mjs} +0 -0
- package/fesm2015/{kolektor-nucleus-material.js → kolektor-nucleus-material.mjs} +56 -70
- package/fesm2015/kolektor-nucleus-material.mjs.map +1 -0
- package/fesm2020/kolektor-nucleus-material.mjs +663 -0
- package/fesm2020/kolektor-nucleus-material.mjs.map +1 -0
- package/package.json +22 -9
- package/bundles/kolektor-nucleus-material.umd.js +0 -1135
- package/bundles/kolektor-nucleus-material.umd.js.map +0 -1
- package/esm2015/lib/dialog/dialog.service.js +0 -43
- package/esm2015/lib/loaded-content/loaded-content-component.js +0 -76
- package/esm2015/lib/loaded-content/loading-state.js +0 -93
- package/esm2015/lib/user-avatar/user-avatar-component.js +0 -55
- package/fesm2015/kolektor-nucleus-material.js.map +0 -1
|
@@ -1,1135 +0,0 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/material/dialog'), require('@angular/material/button'), require('@angular/common'), require('rxjs/operators'), require('@angular/material/progress-spinner'), require('@angular/material/icon'), require('@angular/router'), require('hammerjs'), require('@angular/material/tabs'), require('@angular/material/snack-bar')) :
|
|
3
|
-
typeof define === 'function' && define.amd ? define('@kolektor/nucleus-material', ['exports', '@angular/core', '@angular/material/dialog', '@angular/material/button', '@angular/common', 'rxjs/operators', '@angular/material/progress-spinner', '@angular/material/icon', '@angular/router', 'hammerjs', '@angular/material/tabs', '@angular/material/snack-bar'], factory) :
|
|
4
|
-
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.kolektor = global.kolektor || {}, global.kolektor['nucleus-material'] = {}), global.ng.core, global.ng.material.dialog, global.ng.material.button, global.ng.common, global.rxjs.operators, global.ng.material.progressSpinner, global.ng.material.icon, global.ng.router, global.Hammer, global.ng.material.tabs, global.ng.material.snackBar));
|
|
5
|
-
}(this, (function (exports, i0, i1, i2, i3, operators, i1$1, i3$1, i1$2, Hammer, i1$3, i1$4) { 'use strict';
|
|
6
|
-
|
|
7
|
-
function _interopNamespace(e) {
|
|
8
|
-
if (e && e.__esModule) return e;
|
|
9
|
-
var n = Object.create(null);
|
|
10
|
-
if (e) {
|
|
11
|
-
Object.keys(e).forEach(function (k) {
|
|
12
|
-
if (k !== 'default') {
|
|
13
|
-
var d = Object.getOwnPropertyDescriptor(e, k);
|
|
14
|
-
Object.defineProperty(n, k, d.get ? d : {
|
|
15
|
-
enumerable: true,
|
|
16
|
-
get: function () {
|
|
17
|
-
return e[k];
|
|
18
|
-
}
|
|
19
|
-
});
|
|
20
|
-
}
|
|
21
|
-
});
|
|
22
|
-
}
|
|
23
|
-
n['default'] = e;
|
|
24
|
-
return Object.freeze(n);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
|
|
28
|
-
var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
|
|
29
|
-
var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
|
|
30
|
-
var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
|
|
31
|
-
var i1__namespace$1 = /*#__PURE__*/_interopNamespace(i1$1);
|
|
32
|
-
var i3__namespace$1 = /*#__PURE__*/_interopNamespace(i3$1);
|
|
33
|
-
var i1__namespace$2 = /*#__PURE__*/_interopNamespace(i1$2);
|
|
34
|
-
var Hammer__namespace = /*#__PURE__*/_interopNamespace(Hammer);
|
|
35
|
-
var i1__namespace$3 = /*#__PURE__*/_interopNamespace(i1$3);
|
|
36
|
-
var i1__namespace$4 = /*#__PURE__*/_interopNamespace(i1$4);
|
|
37
|
-
|
|
38
|
-
/*! *****************************************************************************
|
|
39
|
-
Copyright (c) Microsoft Corporation.
|
|
40
|
-
|
|
41
|
-
Permission to use, copy, modify, and/or distribute this software for any
|
|
42
|
-
purpose with or without fee is hereby granted.
|
|
43
|
-
|
|
44
|
-
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
45
|
-
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
46
|
-
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
47
|
-
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
48
|
-
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
49
|
-
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
50
|
-
PERFORMANCE OF THIS SOFTWARE.
|
|
51
|
-
***************************************************************************** */
|
|
52
|
-
/* global Reflect, Promise */
|
|
53
|
-
var extendStatics = function (d, b) {
|
|
54
|
-
extendStatics = Object.setPrototypeOf ||
|
|
55
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
56
|
-
function (d, b) { for (var p in b)
|
|
57
|
-
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
58
|
-
d[p] = b[p]; };
|
|
59
|
-
return extendStatics(d, b);
|
|
60
|
-
};
|
|
61
|
-
function __extends(d, b) {
|
|
62
|
-
if (typeof b !== "function" && b !== null)
|
|
63
|
-
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
64
|
-
extendStatics(d, b);
|
|
65
|
-
function __() { this.constructor = d; }
|
|
66
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
67
|
-
}
|
|
68
|
-
var __assign = function () {
|
|
69
|
-
__assign = Object.assign || function __assign(t) {
|
|
70
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
71
|
-
s = arguments[i];
|
|
72
|
-
for (var p in s)
|
|
73
|
-
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
74
|
-
t[p] = s[p];
|
|
75
|
-
}
|
|
76
|
-
return t;
|
|
77
|
-
};
|
|
78
|
-
return __assign.apply(this, arguments);
|
|
79
|
-
};
|
|
80
|
-
function __rest(s, e) {
|
|
81
|
-
var t = {};
|
|
82
|
-
for (var p in s)
|
|
83
|
-
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
84
|
-
t[p] = s[p];
|
|
85
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
86
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
87
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
88
|
-
t[p[i]] = s[p[i]];
|
|
89
|
-
}
|
|
90
|
-
return t;
|
|
91
|
-
}
|
|
92
|
-
function __decorate(decorators, target, key, desc) {
|
|
93
|
-
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
94
|
-
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
95
|
-
r = Reflect.decorate(decorators, target, key, desc);
|
|
96
|
-
else
|
|
97
|
-
for (var i = decorators.length - 1; i >= 0; i--)
|
|
98
|
-
if (d = decorators[i])
|
|
99
|
-
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
100
|
-
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
101
|
-
}
|
|
102
|
-
function __param(paramIndex, decorator) {
|
|
103
|
-
return function (target, key) { decorator(target, key, paramIndex); };
|
|
104
|
-
}
|
|
105
|
-
function __metadata(metadataKey, metadataValue) {
|
|
106
|
-
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
107
|
-
return Reflect.metadata(metadataKey, metadataValue);
|
|
108
|
-
}
|
|
109
|
-
function __awaiter(thisArg, _arguments, P, generator) {
|
|
110
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
111
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
112
|
-
function fulfilled(value) { try {
|
|
113
|
-
step(generator.next(value));
|
|
114
|
-
}
|
|
115
|
-
catch (e) {
|
|
116
|
-
reject(e);
|
|
117
|
-
} }
|
|
118
|
-
function rejected(value) { try {
|
|
119
|
-
step(generator["throw"](value));
|
|
120
|
-
}
|
|
121
|
-
catch (e) {
|
|
122
|
-
reject(e);
|
|
123
|
-
} }
|
|
124
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
125
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
126
|
-
});
|
|
127
|
-
}
|
|
128
|
-
function __generator(thisArg, body) {
|
|
129
|
-
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
130
|
-
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
131
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
132
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
133
|
-
function step(op) {
|
|
134
|
-
if (f)
|
|
135
|
-
throw new TypeError("Generator is already executing.");
|
|
136
|
-
while (_)
|
|
137
|
-
try {
|
|
138
|
-
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)
|
|
139
|
-
return t;
|
|
140
|
-
if (y = 0, t)
|
|
141
|
-
op = [op[0] & 2, t.value];
|
|
142
|
-
switch (op[0]) {
|
|
143
|
-
case 0:
|
|
144
|
-
case 1:
|
|
145
|
-
t = op;
|
|
146
|
-
break;
|
|
147
|
-
case 4:
|
|
148
|
-
_.label++;
|
|
149
|
-
return { value: op[1], done: false };
|
|
150
|
-
case 5:
|
|
151
|
-
_.label++;
|
|
152
|
-
y = op[1];
|
|
153
|
-
op = [0];
|
|
154
|
-
continue;
|
|
155
|
-
case 7:
|
|
156
|
-
op = _.ops.pop();
|
|
157
|
-
_.trys.pop();
|
|
158
|
-
continue;
|
|
159
|
-
default:
|
|
160
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
161
|
-
_ = 0;
|
|
162
|
-
continue;
|
|
163
|
-
}
|
|
164
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
165
|
-
_.label = op[1];
|
|
166
|
-
break;
|
|
167
|
-
}
|
|
168
|
-
if (op[0] === 6 && _.label < t[1]) {
|
|
169
|
-
_.label = t[1];
|
|
170
|
-
t = op;
|
|
171
|
-
break;
|
|
172
|
-
}
|
|
173
|
-
if (t && _.label < t[2]) {
|
|
174
|
-
_.label = t[2];
|
|
175
|
-
_.ops.push(op);
|
|
176
|
-
break;
|
|
177
|
-
}
|
|
178
|
-
if (t[2])
|
|
179
|
-
_.ops.pop();
|
|
180
|
-
_.trys.pop();
|
|
181
|
-
continue;
|
|
182
|
-
}
|
|
183
|
-
op = body.call(thisArg, _);
|
|
184
|
-
}
|
|
185
|
-
catch (e) {
|
|
186
|
-
op = [6, e];
|
|
187
|
-
y = 0;
|
|
188
|
-
}
|
|
189
|
-
finally {
|
|
190
|
-
f = t = 0;
|
|
191
|
-
}
|
|
192
|
-
if (op[0] & 5)
|
|
193
|
-
throw op[1];
|
|
194
|
-
return { value: op[0] ? op[1] : void 0, done: true };
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
198
|
-
if (k2 === undefined)
|
|
199
|
-
k2 = k;
|
|
200
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
201
|
-
}) : (function (o, m, k, k2) {
|
|
202
|
-
if (k2 === undefined)
|
|
203
|
-
k2 = k;
|
|
204
|
-
o[k2] = m[k];
|
|
205
|
-
});
|
|
206
|
-
function __exportStar(m, o) {
|
|
207
|
-
for (var p in m)
|
|
208
|
-
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
209
|
-
__createBinding(o, m, p);
|
|
210
|
-
}
|
|
211
|
-
function __values(o) {
|
|
212
|
-
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
213
|
-
if (m)
|
|
214
|
-
return m.call(o);
|
|
215
|
-
if (o && typeof o.length === "number")
|
|
216
|
-
return {
|
|
217
|
-
next: function () {
|
|
218
|
-
if (o && i >= o.length)
|
|
219
|
-
o = void 0;
|
|
220
|
-
return { value: o && o[i++], done: !o };
|
|
221
|
-
}
|
|
222
|
-
};
|
|
223
|
-
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
224
|
-
}
|
|
225
|
-
function __read(o, n) {
|
|
226
|
-
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
227
|
-
if (!m)
|
|
228
|
-
return o;
|
|
229
|
-
var i = m.call(o), r, ar = [], e;
|
|
230
|
-
try {
|
|
231
|
-
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
232
|
-
ar.push(r.value);
|
|
233
|
-
}
|
|
234
|
-
catch (error) {
|
|
235
|
-
e = { error: error };
|
|
236
|
-
}
|
|
237
|
-
finally {
|
|
238
|
-
try {
|
|
239
|
-
if (r && !r.done && (m = i["return"]))
|
|
240
|
-
m.call(i);
|
|
241
|
-
}
|
|
242
|
-
finally {
|
|
243
|
-
if (e)
|
|
244
|
-
throw e.error;
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
return ar;
|
|
248
|
-
}
|
|
249
|
-
/** @deprecated */
|
|
250
|
-
function __spread() {
|
|
251
|
-
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
252
|
-
ar = ar.concat(__read(arguments[i]));
|
|
253
|
-
return ar;
|
|
254
|
-
}
|
|
255
|
-
/** @deprecated */
|
|
256
|
-
function __spreadArrays() {
|
|
257
|
-
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
258
|
-
s += arguments[i].length;
|
|
259
|
-
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
260
|
-
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
261
|
-
r[k] = a[j];
|
|
262
|
-
return r;
|
|
263
|
-
}
|
|
264
|
-
function __spreadArray(to, from, pack) {
|
|
265
|
-
if (pack || arguments.length === 2)
|
|
266
|
-
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
267
|
-
if (ar || !(i in from)) {
|
|
268
|
-
if (!ar)
|
|
269
|
-
ar = Array.prototype.slice.call(from, 0, i);
|
|
270
|
-
ar[i] = from[i];
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
return to.concat(ar || Array.prototype.slice.call(from));
|
|
274
|
-
}
|
|
275
|
-
function __await(v) {
|
|
276
|
-
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
277
|
-
}
|
|
278
|
-
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
279
|
-
if (!Symbol.asyncIterator)
|
|
280
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
281
|
-
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
282
|
-
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
283
|
-
function verb(n) { if (g[n])
|
|
284
|
-
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
285
|
-
function resume(n, v) { try {
|
|
286
|
-
step(g[n](v));
|
|
287
|
-
}
|
|
288
|
-
catch (e) {
|
|
289
|
-
settle(q[0][3], e);
|
|
290
|
-
} }
|
|
291
|
-
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
292
|
-
function fulfill(value) { resume("next", value); }
|
|
293
|
-
function reject(value) { resume("throw", value); }
|
|
294
|
-
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
295
|
-
resume(q[0][0], q[0][1]); }
|
|
296
|
-
}
|
|
297
|
-
function __asyncDelegator(o) {
|
|
298
|
-
var i, p;
|
|
299
|
-
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
300
|
-
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; }
|
|
301
|
-
}
|
|
302
|
-
function __asyncValues(o) {
|
|
303
|
-
if (!Symbol.asyncIterator)
|
|
304
|
-
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
305
|
-
var m = o[Symbol.asyncIterator], i;
|
|
306
|
-
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);
|
|
307
|
-
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); }); }; }
|
|
308
|
-
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
309
|
-
}
|
|
310
|
-
function __makeTemplateObject(cooked, raw) {
|
|
311
|
-
if (Object.defineProperty) {
|
|
312
|
-
Object.defineProperty(cooked, "raw", { value: raw });
|
|
313
|
-
}
|
|
314
|
-
else {
|
|
315
|
-
cooked.raw = raw;
|
|
316
|
-
}
|
|
317
|
-
return cooked;
|
|
318
|
-
}
|
|
319
|
-
;
|
|
320
|
-
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
321
|
-
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
322
|
-
}) : function (o, v) {
|
|
323
|
-
o["default"] = v;
|
|
324
|
-
};
|
|
325
|
-
function __importStar(mod) {
|
|
326
|
-
if (mod && mod.__esModule)
|
|
327
|
-
return mod;
|
|
328
|
-
var result = {};
|
|
329
|
-
if (mod != null)
|
|
330
|
-
for (var k in mod)
|
|
331
|
-
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
332
|
-
__createBinding(result, mod, k);
|
|
333
|
-
__setModuleDefault(result, mod);
|
|
334
|
-
return result;
|
|
335
|
-
}
|
|
336
|
-
function __importDefault(mod) {
|
|
337
|
-
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
338
|
-
}
|
|
339
|
-
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
340
|
-
if (kind === "a" && !f)
|
|
341
|
-
throw new TypeError("Private accessor was defined without a getter");
|
|
342
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
343
|
-
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
344
|
-
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
345
|
-
}
|
|
346
|
-
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
347
|
-
if (kind === "m")
|
|
348
|
-
throw new TypeError("Private method is not writable");
|
|
349
|
-
if (kind === "a" && !f)
|
|
350
|
-
throw new TypeError("Private accessor was defined without a setter");
|
|
351
|
-
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
352
|
-
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
353
|
-
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
354
|
-
}
|
|
355
|
-
|
|
356
|
-
var NucDialogComponent = /** @class */ (function () {
|
|
357
|
-
function NucDialogComponent(dialogRef, dialogData) {
|
|
358
|
-
this.dialogRef = dialogRef;
|
|
359
|
-
this.dialogData = dialogData;
|
|
360
|
-
}
|
|
361
|
-
return NucDialogComponent;
|
|
362
|
-
}());
|
|
363
|
-
NucDialogComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucDialogComponent, deps: [{ token: i1__namespace.MatDialogRef }, { token: i1.MAT_DIALOG_DATA }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
364
|
-
NucDialogComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.3", type: NucDialogComponent, selector: "nuc-dialog", ngImport: i0__namespace, template: "<ng-container *ngIf=\"dialogData\">\r\n <h2 mat-dialog-title *ngIf=\"dialogData.title\">\r\n {{dialogData.title}}\r\n </h2>\r\n <mat-dialog-content>{{dialogData.message}}</mat-dialog-content>\r\n <mat-dialog-actions>\r\n <ng-container *ngFor=\"let action of dialogData.actions\">\r\n <button color=\"{{action.color || 'primary'}}\" *ngIf=\"action.value === undefined\" mat-button mat-dialog-close>{{action.text}}</button>\r\n <button color=\"{{action.color || 'primary'}}\" *ngIf=\"action.value !== undefined\" mat-button [mat-dialog-close]=\"action.value\">{{action.text}}</button>\r\n </ng-container>\r\n </mat-dialog-actions>\r\n</ng-container>\r\n", styles: ["mat-dialog-actions{justify-content:flex-end}mat-dialog-content{white-space:pre-wrap}button{text-transform:uppercase;font-weight:700}\n"], components: [{ type: i2__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i1__namespace.MatDialogTitle, selector: "[mat-dialog-title], [matDialogTitle]", inputs: ["id"], exportAs: ["matDialogTitle"] }, { type: i1__namespace.MatDialogContent, selector: "[mat-dialog-content], mat-dialog-content, [matDialogContent]" }, { type: i1__namespace.MatDialogActions, selector: "[mat-dialog-actions], mat-dialog-actions, [matDialogActions]" }, { type: i3__namespace.NgForOf, selector: "[ngFor][ngForOf]", inputs: ["ngForOf", "ngForTrackBy", "ngForTemplate"] }, { type: i1__namespace.MatDialogClose, selector: "[mat-dialog-close], [matDialogClose]", inputs: ["type", "mat-dialog-close", "aria-label", "matDialogClose"], exportAs: ["matDialogClose"] }] });
|
|
365
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucDialogComponent, decorators: [{
|
|
366
|
-
type: i0.Component,
|
|
367
|
-
args: [{
|
|
368
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
369
|
-
selector: 'nuc-dialog',
|
|
370
|
-
templateUrl: './dialog.component.html',
|
|
371
|
-
styleUrls: ['./dialog.component.scss']
|
|
372
|
-
}]
|
|
373
|
-
}], ctorParameters: function () {
|
|
374
|
-
return [{ type: i1__namespace.MatDialogRef }, { type: undefined, decorators: [{
|
|
375
|
-
type: i0.Inject,
|
|
376
|
-
args: [i1.MAT_DIALOG_DATA]
|
|
377
|
-
}] }];
|
|
378
|
-
} });
|
|
379
|
-
|
|
380
|
-
var NucDialogService = /** @class */ (function () {
|
|
381
|
-
function NucDialogService(_matDialog) {
|
|
382
|
-
this._matDialog = _matDialog;
|
|
383
|
-
}
|
|
384
|
-
/**
|
|
385
|
-
* Opens a NucDialog with content from dialogData.
|
|
386
|
-
*
|
|
387
|
-
* @param dialogData NucDialogData containing title, message and possible actions.
|
|
388
|
-
* @param dialogConfig Extra configuration options. Data property is ignored, since it will be set to dialogData.
|
|
389
|
-
* @returns a promise with value that was specified inside pressed Nucleus action.
|
|
390
|
-
*/
|
|
391
|
-
NucDialogService.prototype.open = function (dialogData, dialogConfig) {
|
|
392
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
393
|
-
return __generator(this, function (_a) {
|
|
394
|
-
switch (_a.label) {
|
|
395
|
-
case 0:
|
|
396
|
-
if (!(dialogData.actions && dialogData.actions.length > 0)) return [3 /*break*/, 2];
|
|
397
|
-
if (dialogConfig) {
|
|
398
|
-
dialogConfig.data = dialogData;
|
|
399
|
-
}
|
|
400
|
-
else {
|
|
401
|
-
dialogConfig = { data: dialogData };
|
|
402
|
-
}
|
|
403
|
-
return [4 /*yield*/, this._matDialog.open(NucDialogComponent, dialogConfig).beforeClosed().toPromise()];
|
|
404
|
-
case 1: return [2 /*return*/, _a.sent()];
|
|
405
|
-
case 2:
|
|
406
|
-
console.error('Nucleus.AppCore: NucDialogData requires at least one action.');
|
|
407
|
-
_a.label = 3;
|
|
408
|
-
case 3: return [2 /*return*/];
|
|
409
|
-
}
|
|
410
|
-
});
|
|
411
|
-
});
|
|
412
|
-
};
|
|
413
|
-
return NucDialogService;
|
|
414
|
-
}());
|
|
415
|
-
NucDialogService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucDialogService, deps: [{ token: i1__namespace.MatDialog }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
416
|
-
NucDialogService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucDialogService, providedIn: 'root' });
|
|
417
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucDialogService, decorators: [{
|
|
418
|
-
type: i0.Injectable,
|
|
419
|
-
args: [{
|
|
420
|
-
providedIn: 'root'
|
|
421
|
-
}]
|
|
422
|
-
}], ctorParameters: function () { return [{ type: i1__namespace.MatDialog }]; } });
|
|
423
|
-
|
|
424
|
-
var NucDialogModule = /** @class */ (function () {
|
|
425
|
-
function NucDialogModule() {
|
|
426
|
-
}
|
|
427
|
-
return NucDialogModule;
|
|
428
|
-
}());
|
|
429
|
-
NucDialogModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucDialogModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
430
|
-
NucDialogModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucDialogModule, declarations: [NucDialogComponent], imports: [i3.CommonModule,
|
|
431
|
-
i1.MatDialogModule,
|
|
432
|
-
i2.MatButtonModule] });
|
|
433
|
-
NucDialogModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucDialogModule, imports: [[
|
|
434
|
-
i3.CommonModule,
|
|
435
|
-
i1.MatDialogModule,
|
|
436
|
-
i2.MatButtonModule
|
|
437
|
-
]] });
|
|
438
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucDialogModule, decorators: [{
|
|
439
|
-
type: i0.NgModule,
|
|
440
|
-
args: [{
|
|
441
|
-
declarations: [
|
|
442
|
-
NucDialogComponent
|
|
443
|
-
],
|
|
444
|
-
imports: [
|
|
445
|
-
i3.CommonModule,
|
|
446
|
-
i1.MatDialogModule,
|
|
447
|
-
i2.MatButtonModule
|
|
448
|
-
],
|
|
449
|
-
entryComponents: [
|
|
450
|
-
NucDialogComponent
|
|
451
|
-
]
|
|
452
|
-
}]
|
|
453
|
-
}] });
|
|
454
|
-
|
|
455
|
-
exports.NucColor = void 0;
|
|
456
|
-
(function (NucColor) {
|
|
457
|
-
/** Primary color of the theme. */
|
|
458
|
-
NucColor["primary"] = "primary";
|
|
459
|
-
/** Accent color of the theme. */
|
|
460
|
-
NucColor["accent"] = "accent";
|
|
461
|
-
/** Warning color of the theme. */
|
|
462
|
-
NucColor["warn"] = "warn";
|
|
463
|
-
})(exports.NucColor || (exports.NucColor = {}));
|
|
464
|
-
|
|
465
|
-
exports.LoadingStatus = void 0;
|
|
466
|
-
(function (LoadingStatus) {
|
|
467
|
-
LoadingStatus[LoadingStatus["completed"] = 0] = "completed";
|
|
468
|
-
LoadingStatus[LoadingStatus["inProgress"] = 1] = "inProgress";
|
|
469
|
-
LoadingStatus[LoadingStatus["failed"] = 2] = "failed";
|
|
470
|
-
LoadingStatus[LoadingStatus["undefined"] = 3] = "undefined";
|
|
471
|
-
})(exports.LoadingStatus || (exports.LoadingStatus = {}));
|
|
472
|
-
var LoadingState = /** @class */ (function () {
|
|
473
|
-
function LoadingState() {
|
|
474
|
-
this._status = exports.LoadingStatus.undefined;
|
|
475
|
-
this._message = null;
|
|
476
|
-
this._errorDetails = null;
|
|
477
|
-
this._lastSubscription = null;
|
|
478
|
-
}
|
|
479
|
-
Object.defineProperty(LoadingState.prototype, "status", {
|
|
480
|
-
get: function () {
|
|
481
|
-
return this._status;
|
|
482
|
-
},
|
|
483
|
-
enumerable: false,
|
|
484
|
-
configurable: true
|
|
485
|
-
});
|
|
486
|
-
Object.defineProperty(LoadingState.prototype, "message", {
|
|
487
|
-
get: function () {
|
|
488
|
-
return this._message;
|
|
489
|
-
},
|
|
490
|
-
enumerable: false,
|
|
491
|
-
configurable: true
|
|
492
|
-
});
|
|
493
|
-
Object.defineProperty(LoadingState.prototype, "errorDetails", {
|
|
494
|
-
get: function () {
|
|
495
|
-
return this._errorDetails;
|
|
496
|
-
},
|
|
497
|
-
enumerable: false,
|
|
498
|
-
configurable: true
|
|
499
|
-
});
|
|
500
|
-
LoadingState.prototype.load = function (observable, resultFunction, errorFunction, completeFunction) {
|
|
501
|
-
return this._load(true, null, observable, resultFunction, errorFunction, completeFunction);
|
|
502
|
-
};
|
|
503
|
-
LoadingState.prototype.loadWithMessage = function (observable, message, resultFunction, errorFunction, completeFunction) {
|
|
504
|
-
return this._load(true, message, observable, resultFunction, errorFunction, completeFunction);
|
|
505
|
-
};
|
|
506
|
-
LoadingState.prototype.invoke = function (observable, resultFunction, errorFunction, completeFunction) {
|
|
507
|
-
return this._load(false, null, observable, resultFunction, errorFunction, completeFunction);
|
|
508
|
-
};
|
|
509
|
-
LoadingState.prototype.invokeWithMessage = function (observable, message, resultFunction, errorFunction, completeFunction) {
|
|
510
|
-
return this._load(false, message, observable, resultFunction, errorFunction, completeFunction);
|
|
511
|
-
};
|
|
512
|
-
LoadingState.prototype.retry = function () {
|
|
513
|
-
if (this._lastSubscription) {
|
|
514
|
-
this._lastSubscription.unsubscribe();
|
|
515
|
-
}
|
|
516
|
-
this.setInProgress();
|
|
517
|
-
this._lastSubscription = this._loadObservable.subscribe(this._resultFunction, this._errorFunction, this._completeFunction);
|
|
518
|
-
return this._lastSubscription;
|
|
519
|
-
};
|
|
520
|
-
LoadingState.prototype.setInProgress = function (message) {
|
|
521
|
-
if (message === void 0) { message = null; }
|
|
522
|
-
this._status = exports.LoadingStatus.inProgress;
|
|
523
|
-
this._message = message;
|
|
524
|
-
};
|
|
525
|
-
LoadingState.prototype.setCompleted = function () {
|
|
526
|
-
this._status = exports.LoadingStatus.completed;
|
|
527
|
-
};
|
|
528
|
-
LoadingState.prototype.setFailed = function (message, error) {
|
|
529
|
-
if (message === void 0) { message = null; }
|
|
530
|
-
if (error === void 0) { error = null; }
|
|
531
|
-
this._status = exports.LoadingStatus.failed;
|
|
532
|
-
this._message = message;
|
|
533
|
-
this._errorDetails = error;
|
|
534
|
-
};
|
|
535
|
-
LoadingState.prototype._load = function (saveAsLoadObservable, progressMessage, observable, resultFunction, errorFunction, completeFunction) {
|
|
536
|
-
var _this = this;
|
|
537
|
-
if (this._lastSubscription) {
|
|
538
|
-
this._lastSubscription.unsubscribe();
|
|
539
|
-
}
|
|
540
|
-
this.setInProgress(progressMessage);
|
|
541
|
-
var obs = observable.pipe(operators.tap(function () {
|
|
542
|
-
if (!saveAsLoadObservable && _this.message) { // if message was used one time we clear it
|
|
543
|
-
_this._message = null;
|
|
544
|
-
}
|
|
545
|
-
_this.setCompleted();
|
|
546
|
-
}, function (err) {
|
|
547
|
-
_this.setFailed(null, LoadingState.getErrorDetails(err));
|
|
548
|
-
}));
|
|
549
|
-
if (saveAsLoadObservable) {
|
|
550
|
-
this._loadObservable = obs;
|
|
551
|
-
this._resultFunction = resultFunction;
|
|
552
|
-
this._errorFunction = errorFunction;
|
|
553
|
-
this._completeFunction = completeFunction;
|
|
554
|
-
}
|
|
555
|
-
this._lastSubscription = this._loadObservable.subscribe(this._resultFunction, this._errorFunction, this._completeFunction);
|
|
556
|
-
return this._lastSubscription;
|
|
557
|
-
};
|
|
558
|
-
LoadingState.getErrorDetails = function (error) {
|
|
559
|
-
// this routine tries to get the best error details from:
|
|
560
|
-
// - standard rfc7807 http error: https://datatracker.ietf.org/doc/html/rfc7807
|
|
561
|
-
// - angular HttpError
|
|
562
|
-
// - JS Error object
|
|
563
|
-
var problem = error === null || error === void 0 ? void 0 : error.error;
|
|
564
|
-
if ((problem === null || problem === void 0 ? void 0 : problem.title) && (problem === null || problem === void 0 ? void 0 : problem.detail)) {
|
|
565
|
-
return problem.title + ": " + problem.detail;
|
|
566
|
-
}
|
|
567
|
-
else {
|
|
568
|
-
return (problem === null || problem === void 0 ? void 0 : problem.title) || (problem === null || problem === void 0 ? void 0 : problem.detail) || error.message || error;
|
|
569
|
-
}
|
|
570
|
-
};
|
|
571
|
-
return LoadingState;
|
|
572
|
-
}());
|
|
573
|
-
|
|
574
|
-
var NucLoadedContentComponent = /** @class */ (function () {
|
|
575
|
-
function NucLoadedContentComponent() {
|
|
576
|
-
this._errorDetailsVisible = false;
|
|
577
|
-
this.errorMessage = 'We are having trouble loading the data.';
|
|
578
|
-
this.showRetry = true;
|
|
579
|
-
}
|
|
580
|
-
Object.defineProperty(NucLoadedContentComponent.prototype, "message", {
|
|
581
|
-
get: function () {
|
|
582
|
-
if (this.state.message != null) {
|
|
583
|
-
return this.state.message;
|
|
584
|
-
}
|
|
585
|
-
else {
|
|
586
|
-
if (this.state.status === exports.LoadingStatus.failed) {
|
|
587
|
-
return this.errorMessage;
|
|
588
|
-
}
|
|
589
|
-
else if (this.state.status === exports.LoadingStatus.inProgress) {
|
|
590
|
-
return this.inProgressMessage;
|
|
591
|
-
}
|
|
592
|
-
}
|
|
593
|
-
return null;
|
|
594
|
-
},
|
|
595
|
-
enumerable: false,
|
|
596
|
-
configurable: true
|
|
597
|
-
});
|
|
598
|
-
Object.defineProperty(NucLoadedContentComponent.prototype, "showRetryButton", {
|
|
599
|
-
get: function () {
|
|
600
|
-
return this.showRetry;
|
|
601
|
-
},
|
|
602
|
-
enumerable: false,
|
|
603
|
-
configurable: true
|
|
604
|
-
});
|
|
605
|
-
Object.defineProperty(NucLoadedContentComponent.prototype, "inProgress", {
|
|
606
|
-
get: function () {
|
|
607
|
-
var inProgress = this.state.status === exports.LoadingStatus.inProgress;
|
|
608
|
-
if (inProgress) {
|
|
609
|
-
this._errorDetailsVisible = false;
|
|
610
|
-
}
|
|
611
|
-
return inProgress;
|
|
612
|
-
},
|
|
613
|
-
enumerable: false,
|
|
614
|
-
configurable: true
|
|
615
|
-
});
|
|
616
|
-
Object.defineProperty(NucLoadedContentComponent.prototype, "failed", {
|
|
617
|
-
get: function () {
|
|
618
|
-
return this.state.status === exports.LoadingStatus.failed;
|
|
619
|
-
},
|
|
620
|
-
enumerable: false,
|
|
621
|
-
configurable: true
|
|
622
|
-
});
|
|
623
|
-
Object.defineProperty(NucLoadedContentComponent.prototype, "completed", {
|
|
624
|
-
get: function () {
|
|
625
|
-
return this.state.status === exports.LoadingStatus.completed;
|
|
626
|
-
},
|
|
627
|
-
enumerable: false,
|
|
628
|
-
configurable: true
|
|
629
|
-
});
|
|
630
|
-
Object.defineProperty(NucLoadedContentComponent.prototype, "errorDetailsVisible", {
|
|
631
|
-
get: function () {
|
|
632
|
-
return this._errorDetailsVisible;
|
|
633
|
-
},
|
|
634
|
-
enumerable: false,
|
|
635
|
-
configurable: true
|
|
636
|
-
});
|
|
637
|
-
NucLoadedContentComponent.prototype.showErrorDetails = function () {
|
|
638
|
-
this._errorDetailsVisible = true;
|
|
639
|
-
};
|
|
640
|
-
return NucLoadedContentComponent;
|
|
641
|
-
}());
|
|
642
|
-
NucLoadedContentComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucLoadedContentComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
643
|
-
NucLoadedContentComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.3", type: NucLoadedContentComponent, selector: "nuc-loaded-content-component", inputs: { completedTemplate: "completedTemplate", errorTemplate: "errorTemplate", inProgressTemplate: "inProgressTemplate", state: "state", inProgressMessage: "inProgressMessage", errorMessage: "errorMessage", showRetry: "showRetry" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"completed\">\r\n <ng-container *ngTemplateOutlet=\"completedTemplate\"></ng-container>\r\n</ng-container>\r\n\r\n<div class=\"indicators-container\" *ngIf=\"inProgress || failed\">\r\n <ng-container *ngIf=\"inProgress\">\r\n <ng-container *ngTemplateOutlet=\"inProgressTemplate ? inProgressTemplate: defaultInProgressTemplate\"></ng-container>\r\n </ng-container>\r\n <ng-container *ngIf=\"failed\">\r\n <ng-container *ngTemplateOutlet=\"errorTemplate ? errorTemplate: defaultErrorTemplate\"></ng-container>\r\n </ng-container>\r\n</div>\r\n\r\n<ng-template #defaultInProgressTemplate>\r\n <div class=\"spinner\">\r\n <mat-spinner [diameter]=\"45\"></mat-spinner>\r\n </div>\r\n <p>\r\n {{message}}\r\n </p>\r\n</ng-template>\r\n\r\n<ng-template #defaultErrorTemplate>\r\n <div>\r\n <p>\r\n {{message}}\r\n </p>\r\n\r\n <div *ngIf=\"state.errorDetails\">\r\n <button *ngIf=\"!errorDetailsVisible\" mat-button color=\"warn\" (click)=\"showErrorDetails()\">show details</button>\r\n\r\n <div *ngIf=\"errorDetailsVisible\" class=\"error-details mat-small\">\r\n <strong>details:</strong><br />\r\n <p>{{state.errorDetails}}</p>\r\n </div>\r\n </div>\r\n\r\n <p *ngIf=\"showRetryButton\">\r\n <button mat-mini-fab color=\"primary\" (click)=\"state.retry()\">\r\n <mat-icon>refresh</mat-icon>\r\n </button>\r\n </p>\r\n\r\n </div>\r\n</ng-template>\r\n", styles: [".indicators-container{text-align:center;margin:0 auto;padding-top:4rem}.error-details{margin-top:1rem}.spinner{display:flex;justify-content:center;align-items:center;margin-bottom:.5rem}\n"], components: [{ type: i1__namespace$1.MatSpinner, selector: "mat-spinner", inputs: ["color"] }, { type: i2__namespace.MatButton, selector: "button[mat-button], button[mat-raised-button], button[mat-icon-button], button[mat-fab], button[mat-mini-fab], button[mat-stroked-button], button[mat-flat-button]", inputs: ["disabled", "disableRipple", "color"], exportAs: ["matButton"] }, { type: i3__namespace$1.MatIcon, selector: "mat-icon", inputs: ["color", "inline", "svgIcon", "fontSet", "fontIcon"], exportAs: ["matIcon"] }], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgTemplateOutlet, selector: "[ngTemplateOutlet]", inputs: ["ngTemplateOutletContext", "ngTemplateOutlet"] }] });
|
|
644
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucLoadedContentComponent, decorators: [{
|
|
645
|
-
type: i0.Component,
|
|
646
|
-
args: [{
|
|
647
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
648
|
-
selector: 'nuc-loaded-content-component',
|
|
649
|
-
templateUrl: './loaded-content-component.html',
|
|
650
|
-
styleUrls: ['./loaded-content-component.scss']
|
|
651
|
-
}]
|
|
652
|
-
}], propDecorators: { completedTemplate: [{
|
|
653
|
-
type: i0.Input
|
|
654
|
-
}], errorTemplate: [{
|
|
655
|
-
type: i0.Input
|
|
656
|
-
}], inProgressTemplate: [{
|
|
657
|
-
type: i0.Input
|
|
658
|
-
}], state: [{
|
|
659
|
-
type: i0.Input
|
|
660
|
-
}], inProgressMessage: [{
|
|
661
|
-
type: i0.Input
|
|
662
|
-
}], errorMessage: [{
|
|
663
|
-
type: i0.Input
|
|
664
|
-
}], showRetry: [{
|
|
665
|
-
type: i0.Input
|
|
666
|
-
}] } });
|
|
667
|
-
|
|
668
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
669
|
-
var NucLoadedContentDirective = /** @class */ (function () {
|
|
670
|
-
function NucLoadedContentDirective(_viewContainer, templateRef, _componentResolver) {
|
|
671
|
-
this._viewContainer = _viewContainer;
|
|
672
|
-
this.templateRef = templateRef;
|
|
673
|
-
this._componentResolver = _componentResolver;
|
|
674
|
-
this._completedTemplateRef = null;
|
|
675
|
-
this._errorTemplateRef = null;
|
|
676
|
-
this._inProgressTemplateRef = null;
|
|
677
|
-
this._component = null;
|
|
678
|
-
this._completedTemplateRef = templateRef;
|
|
679
|
-
}
|
|
680
|
-
Object.defineProperty(NucLoadedContentDirective.prototype, "nucLoadedContent", {
|
|
681
|
-
set: function (state) {
|
|
682
|
-
// add some error handling if state is null, etc.
|
|
683
|
-
this._state = state;
|
|
684
|
-
this._updateView();
|
|
685
|
-
},
|
|
686
|
-
enumerable: false,
|
|
687
|
-
configurable: true
|
|
688
|
-
});
|
|
689
|
-
Object.defineProperty(NucLoadedContentDirective.prototype, "errorTemplate", {
|
|
690
|
-
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
691
|
-
set: function (templateRef) {
|
|
692
|
-
this._errorTemplateRef = templateRef;
|
|
693
|
-
this._updateView();
|
|
694
|
-
},
|
|
695
|
-
enumerable: false,
|
|
696
|
-
configurable: true
|
|
697
|
-
});
|
|
698
|
-
Object.defineProperty(NucLoadedContentDirective.prototype, "inProgressTemplate", {
|
|
699
|
-
// eslint-disable-next-line @angular-eslint/no-input-rename
|
|
700
|
-
set: function (templateRef) {
|
|
701
|
-
this._inProgressTemplateRef = templateRef;
|
|
702
|
-
this._updateView();
|
|
703
|
-
},
|
|
704
|
-
enumerable: false,
|
|
705
|
-
configurable: true
|
|
706
|
-
});
|
|
707
|
-
Object.defineProperty(NucLoadedContentDirective.prototype, "inProgressMessage", {
|
|
708
|
-
set: function (inProgressMessage) {
|
|
709
|
-
this._component.instance.inProgressMessage = inProgressMessage;
|
|
710
|
-
},
|
|
711
|
-
enumerable: false,
|
|
712
|
-
configurable: true
|
|
713
|
-
});
|
|
714
|
-
Object.defineProperty(NucLoadedContentDirective.prototype, "errorMessage", {
|
|
715
|
-
set: function (errorMessage) {
|
|
716
|
-
this._component.instance.errorMessage = errorMessage;
|
|
717
|
-
},
|
|
718
|
-
enumerable: false,
|
|
719
|
-
configurable: true
|
|
720
|
-
});
|
|
721
|
-
Object.defineProperty(NucLoadedContentDirective.prototype, "showRetry", {
|
|
722
|
-
set: function (showRetry) {
|
|
723
|
-
this._component.instance.showRetry = showRetry;
|
|
724
|
-
},
|
|
725
|
-
enumerable: false,
|
|
726
|
-
configurable: true
|
|
727
|
-
});
|
|
728
|
-
NucLoadedContentDirective.prototype._updateView = function () {
|
|
729
|
-
if (this._component == null) {
|
|
730
|
-
var fac = this._componentResolver.resolveComponentFactory(NucLoadedContentComponent);
|
|
731
|
-
this._component = this._viewContainer.createComponent(fac);
|
|
732
|
-
}
|
|
733
|
-
this._component.instance.state = this._state;
|
|
734
|
-
this._component.instance.completedTemplate = this._completedTemplateRef;
|
|
735
|
-
if (this._inProgressTemplateRef) {
|
|
736
|
-
this._component.instance.inProgressTemplate = this._inProgressTemplateRef;
|
|
737
|
-
}
|
|
738
|
-
if (this._errorTemplateRef) {
|
|
739
|
-
this._component.instance.errorTemplate = this._errorTemplateRef;
|
|
740
|
-
}
|
|
741
|
-
};
|
|
742
|
-
return NucLoadedContentDirective;
|
|
743
|
-
}());
|
|
744
|
-
NucLoadedContentDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucLoadedContentDirective, deps: [{ token: i0__namespace.ViewContainerRef }, { token: i0__namespace.TemplateRef }, { token: i0__namespace.ComponentFactoryResolver }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
745
|
-
NucLoadedContentDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.3", type: NucLoadedContentDirective, selector: "[nucLoadedContent]", inputs: { nucLoadedContent: "nucLoadedContent", errorTemplate: ["nucLoadedContentError", "errorTemplate"], inProgressTemplate: ["nucLoadedContentInProgress", "inProgressTemplate"], inProgressMessage: ["nucLoadedContentInProgressMessage", "inProgressMessage"], errorMessage: ["nucLoadedContentErrorMessage", "errorMessage"], showRetry: ["nucLoadedContentShowRetry", "showRetry"] }, ngImport: i0__namespace });
|
|
746
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucLoadedContentDirective, decorators: [{
|
|
747
|
-
type: i0.Directive,
|
|
748
|
-
args: [{ selector: '[nucLoadedContent]' }]
|
|
749
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ViewContainerRef }, { type: i0__namespace.TemplateRef }, { type: i0__namespace.ComponentFactoryResolver }]; }, propDecorators: { nucLoadedContent: [{
|
|
750
|
-
type: i0.Input
|
|
751
|
-
}], errorTemplate: [{
|
|
752
|
-
type: i0.Input,
|
|
753
|
-
args: ['nucLoadedContentError']
|
|
754
|
-
}], inProgressTemplate: [{
|
|
755
|
-
type: i0.Input,
|
|
756
|
-
args: ['nucLoadedContentInProgress']
|
|
757
|
-
}], inProgressMessage: [{
|
|
758
|
-
type: i0.Input,
|
|
759
|
-
args: ['nucLoadedContentInProgressMessage']
|
|
760
|
-
}], errorMessage: [{
|
|
761
|
-
type: i0.Input,
|
|
762
|
-
args: ['nucLoadedContentErrorMessage']
|
|
763
|
-
}], showRetry: [{
|
|
764
|
-
type: i0.Input,
|
|
765
|
-
args: ['nucLoadedContentShowRetry']
|
|
766
|
-
}] } });
|
|
767
|
-
|
|
768
|
-
var NucLoadedContentModule = /** @class */ (function () {
|
|
769
|
-
function NucLoadedContentModule() {
|
|
770
|
-
}
|
|
771
|
-
return NucLoadedContentModule;
|
|
772
|
-
}());
|
|
773
|
-
NucLoadedContentModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucLoadedContentModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
774
|
-
NucLoadedContentModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucLoadedContentModule, declarations: [NucLoadedContentDirective,
|
|
775
|
-
NucLoadedContentComponent], imports: [i3.CommonModule,
|
|
776
|
-
i1$1.MatProgressSpinnerModule,
|
|
777
|
-
i2.MatButtonModule,
|
|
778
|
-
i3$1.MatIconModule], exports: [NucLoadedContentDirective] });
|
|
779
|
-
NucLoadedContentModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucLoadedContentModule, imports: [[
|
|
780
|
-
i3.CommonModule,
|
|
781
|
-
i1$1.MatProgressSpinnerModule,
|
|
782
|
-
i2.MatButtonModule,
|
|
783
|
-
i3$1.MatIconModule
|
|
784
|
-
]] });
|
|
785
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucLoadedContentModule, decorators: [{
|
|
786
|
-
type: i0.NgModule,
|
|
787
|
-
args: [{
|
|
788
|
-
declarations: [
|
|
789
|
-
NucLoadedContentDirective,
|
|
790
|
-
NucLoadedContentComponent
|
|
791
|
-
],
|
|
792
|
-
imports: [
|
|
793
|
-
i3.CommonModule,
|
|
794
|
-
i1$1.MatProgressSpinnerModule,
|
|
795
|
-
i2.MatButtonModule,
|
|
796
|
-
i3$1.MatIconModule
|
|
797
|
-
],
|
|
798
|
-
exports: [
|
|
799
|
-
NucLoadedContentDirective
|
|
800
|
-
],
|
|
801
|
-
entryComponents: [
|
|
802
|
-
NucLoadedContentComponent
|
|
803
|
-
]
|
|
804
|
-
}]
|
|
805
|
-
}] });
|
|
806
|
-
|
|
807
|
-
/// <reference path="../../../../../node_modules/@types/winrt-uwp/index.d.ts" />
|
|
808
|
-
var NativeStylingService = /** @class */ (function () {
|
|
809
|
-
function NativeStylingService(router) {
|
|
810
|
-
this.router = router;
|
|
811
|
-
}
|
|
812
|
-
NativeStylingService.prototype.styleWindowsTitleBar = function (style) {
|
|
813
|
-
var _this = this;
|
|
814
|
-
if (window.Windows) {
|
|
815
|
-
var accentColor = this.convertColor(style.backgroundColor);
|
|
816
|
-
var hoverColor = style.hoverBackgroundColor ? this.convertColor(style.hoverBackgroundColor) : this.makeDarker(accentColor);
|
|
817
|
-
var foregroundColor = style.foreground === 'light' ? Windows.UI.Colors.white : Windows.UI.Colors.black;
|
|
818
|
-
var titleColor = style.hideTitle ? accentColor : foregroundColor;
|
|
819
|
-
var appView = Windows.UI.ViewManagement.ApplicationView.getForCurrentView();
|
|
820
|
-
var titleBar = appView.titleBar;
|
|
821
|
-
titleBar.foregroundColor = titleColor;
|
|
822
|
-
titleBar.inactiveForegroundColor = titleColor;
|
|
823
|
-
titleBar.buttonHoverBackgroundColor = hoverColor;
|
|
824
|
-
titleBar.buttonBackgroundColor = accentColor;
|
|
825
|
-
titleBar.buttonInactiveBackgroundColor = accentColor;
|
|
826
|
-
titleBar.buttonHoverForegroundColor = foregroundColor;
|
|
827
|
-
titleBar.buttonForegroundColor = foregroundColor;
|
|
828
|
-
titleBar.buttonInactiveForegroundColor = foregroundColor;
|
|
829
|
-
titleBar.backgroundColor = accentColor;
|
|
830
|
-
titleBar.inactiveBackgroundColor = accentColor;
|
|
831
|
-
if (style.hideBackButton) {
|
|
832
|
-
this.hideBackButton();
|
|
833
|
-
var subscription_1 = this.router.events.subscribe(function (event) {
|
|
834
|
-
if (event instanceof i1$2.NavigationEnd && event.id > 1) {
|
|
835
|
-
_this.hideBackButton();
|
|
836
|
-
subscription_1.unsubscribe();
|
|
837
|
-
}
|
|
838
|
-
});
|
|
839
|
-
}
|
|
840
|
-
}
|
|
841
|
-
};
|
|
842
|
-
NativeStylingService.prototype.hideBackButton = function () {
|
|
843
|
-
var systemNavigation = Windows.UI.Core.SystemNavigationManager.getForCurrentView();
|
|
844
|
-
systemNavigation.appViewBackButtonVisibility = Windows.UI.Core.AppViewBackButtonVisibility.collapsed;
|
|
845
|
-
};
|
|
846
|
-
NativeStylingService.prototype.convertColor = function (colorStr) {
|
|
847
|
-
var regEx = new RegExp('^#([A-Fa-f0-9]{6})$');
|
|
848
|
-
if (!regEx.test(colorStr)) {
|
|
849
|
-
throw new Error('Color is not in the right format. Should be #RRGGBB.');
|
|
850
|
-
}
|
|
851
|
-
var r = parseInt(colorStr.substr(1, 2), 16);
|
|
852
|
-
var g = parseInt(colorStr.substr(3, 2), 16);
|
|
853
|
-
var b = parseInt(colorStr.substr(5, 2), 16);
|
|
854
|
-
return Windows.UI.ColorHelper.fromArgb(255, r, g, b);
|
|
855
|
-
};
|
|
856
|
-
NativeStylingService.prototype.makeDarker = function (color, factor) {
|
|
857
|
-
if (factor === void 0) { factor = 0.80; }
|
|
858
|
-
return Windows.UI.ColorHelper.fromArgb(color.a, color.r * factor, color.g * factor, color.b * factor);
|
|
859
|
-
};
|
|
860
|
-
return NativeStylingService;
|
|
861
|
-
}());
|
|
862
|
-
NativeStylingService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NativeStylingService, deps: [{ token: i1__namespace$2.Router }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
863
|
-
NativeStylingService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NativeStylingService, providedIn: 'root' });
|
|
864
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NativeStylingService, decorators: [{
|
|
865
|
-
type: i0.Injectable,
|
|
866
|
-
args: [{
|
|
867
|
-
providedIn: 'root'
|
|
868
|
-
}]
|
|
869
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$2.Router }]; } });
|
|
870
|
-
|
|
871
|
-
var WindowsTitleBarSyle = /** @class */ (function () {
|
|
872
|
-
function WindowsTitleBarSyle() {
|
|
873
|
-
this.hoverBackgroundColor = null;
|
|
874
|
-
this.foreground = 'dark';
|
|
875
|
-
this.hideTitle = false;
|
|
876
|
-
this.hideBackButton = false;
|
|
877
|
-
}
|
|
878
|
-
return WindowsTitleBarSyle;
|
|
879
|
-
}());
|
|
880
|
-
|
|
881
|
-
// eslint-disable-next-line @angular-eslint/directive-selector
|
|
882
|
-
var NucSwipeTabsDirective = /** @class */ (function () {
|
|
883
|
-
function NucSwipeTabsDirective(element, // ElementRef<MatTabGroup> causes errors.
|
|
884
|
-
tabGroup) {
|
|
885
|
-
this.element = element;
|
|
886
|
-
this.tabGroup = tabGroup;
|
|
887
|
-
}
|
|
888
|
-
NucSwipeTabsDirective.prototype.ngOnInit = function () {
|
|
889
|
-
var _this = this;
|
|
890
|
-
var hammerJs = new Hammer__namespace.Manager(this.element.nativeElement, {
|
|
891
|
-
inputClass: Hammer__namespace.TouchInput
|
|
892
|
-
});
|
|
893
|
-
hammerJs.add(new Hammer__namespace.Pan({
|
|
894
|
-
direction: Hammer__namespace.DIRECTION_HORIZONTAL,
|
|
895
|
-
threshold: 30
|
|
896
|
-
}));
|
|
897
|
-
hammerJs.on('panleft panright', function (event) {
|
|
898
|
-
if (event.isFinal) {
|
|
899
|
-
// Check if any of the tabs are set to disabled
|
|
900
|
-
var tabs = _this.tabGroup._tabs.map(function (x) { return x.disabled; });
|
|
901
|
-
var anyTabDisabled = tabs.some(function (disabled) { return disabled; });
|
|
902
|
-
if (event.type === 'panleft' && event.direction === 2 && _this.tabGroup.selectedIndex < (_this.tabGroup._tabs.length - 1)) {
|
|
903
|
-
// Go to next tab
|
|
904
|
-
if (anyTabDisabled) {
|
|
905
|
-
var tabsToRight = tabs.slice(_this.tabGroup.selectedIndex + 1);
|
|
906
|
-
_this.tabGroup.selectedIndex += _this.getOffset(tabsToRight);
|
|
907
|
-
}
|
|
908
|
-
else {
|
|
909
|
-
_this.tabGroup.selectedIndex++;
|
|
910
|
-
}
|
|
911
|
-
}
|
|
912
|
-
else if (event.type === 'panright' && event.direction === 4 && _this.tabGroup.selectedIndex > 0) {
|
|
913
|
-
// Go to previous tab
|
|
914
|
-
if (anyTabDisabled) {
|
|
915
|
-
var tabsToLeft = tabs.slice().reverse().slice(-_this.tabGroup.selectedIndex);
|
|
916
|
-
_this.tabGroup.selectedIndex -= _this.getOffset(tabsToLeft);
|
|
917
|
-
}
|
|
918
|
-
else {
|
|
919
|
-
_this.tabGroup.selectedIndex--;
|
|
920
|
-
}
|
|
921
|
-
}
|
|
922
|
-
}
|
|
923
|
-
});
|
|
924
|
-
};
|
|
925
|
-
NucSwipeTabsDirective.prototype.getOffset = function (tabs) {
|
|
926
|
-
// Find offset to the first enabled tab
|
|
927
|
-
var offset = tabs.indexOf(tabs.find(function (disabled) { return !disabled; })) + 1;
|
|
928
|
-
return offset;
|
|
929
|
-
};
|
|
930
|
-
return NucSwipeTabsDirective;
|
|
931
|
-
}());
|
|
932
|
-
NucSwipeTabsDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucSwipeTabsDirective, deps: [{ token: i0__namespace.ElementRef }, { token: i1__namespace$3.MatTabGroup }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
933
|
-
NucSwipeTabsDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.3", type: NucSwipeTabsDirective, selector: "[nucSwipe]", ngImport: i0__namespace });
|
|
934
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucSwipeTabsDirective, decorators: [{
|
|
935
|
-
type: i0.Directive,
|
|
936
|
-
args: [{ selector: '[nucSwipe]' }]
|
|
937
|
-
}], ctorParameters: function () { return [{ type: i0__namespace.ElementRef }, { type: i1__namespace$3.MatTabGroup }]; } });
|
|
938
|
-
|
|
939
|
-
var NucSwipeTabsModule = /** @class */ (function () {
|
|
940
|
-
function NucSwipeTabsModule() {
|
|
941
|
-
}
|
|
942
|
-
return NucSwipeTabsModule;
|
|
943
|
-
}());
|
|
944
|
-
NucSwipeTabsModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucSwipeTabsModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
945
|
-
NucSwipeTabsModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucSwipeTabsModule, declarations: [NucSwipeTabsDirective], imports: [i3.CommonModule], exports: [NucSwipeTabsDirective] });
|
|
946
|
-
NucSwipeTabsModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucSwipeTabsModule, imports: [[
|
|
947
|
-
i3.CommonModule
|
|
948
|
-
]] });
|
|
949
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucSwipeTabsModule, decorators: [{
|
|
950
|
-
type: i0.NgModule,
|
|
951
|
-
args: [{
|
|
952
|
-
declarations: [
|
|
953
|
-
NucSwipeTabsDirective
|
|
954
|
-
],
|
|
955
|
-
imports: [
|
|
956
|
-
i3.CommonModule
|
|
957
|
-
],
|
|
958
|
-
exports: [
|
|
959
|
-
NucSwipeTabsDirective
|
|
960
|
-
]
|
|
961
|
-
}]
|
|
962
|
-
}] });
|
|
963
|
-
|
|
964
|
-
var NucSnackbarService = /** @class */ (function () {
|
|
965
|
-
function NucSnackbarService(_matSnackBar, _zone) {
|
|
966
|
-
this._matSnackBar = _matSnackBar;
|
|
967
|
-
this._zone = _zone;
|
|
968
|
-
}
|
|
969
|
-
NucSnackbarService.prototype.openSnackbar = function (type, message, action, duration) {
|
|
970
|
-
var _this = this;
|
|
971
|
-
var snackbarRef;
|
|
972
|
-
this._zone.run(function () {
|
|
973
|
-
snackbarRef = _this._matSnackBar.open(message, action, {
|
|
974
|
-
duration: duration,
|
|
975
|
-
panelClass: type + "-snackbar"
|
|
976
|
-
});
|
|
977
|
-
});
|
|
978
|
-
return snackbarRef;
|
|
979
|
-
};
|
|
980
|
-
NucSnackbarService.prototype.openSnackbarWithConfig = function (message, action, config) {
|
|
981
|
-
var _this = this;
|
|
982
|
-
var snackbarRef;
|
|
983
|
-
this._zone.run(function () {
|
|
984
|
-
snackbarRef = _this._matSnackBar.open(message, action, config);
|
|
985
|
-
});
|
|
986
|
-
return snackbarRef;
|
|
987
|
-
};
|
|
988
|
-
return NucSnackbarService;
|
|
989
|
-
}());
|
|
990
|
-
NucSnackbarService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucSnackbarService, deps: [{ token: i1__namespace$4.MatSnackBar }, { token: i0__namespace.NgZone }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
|
|
991
|
-
NucSnackbarService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucSnackbarService, providedIn: 'root' });
|
|
992
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucSnackbarService, decorators: [{
|
|
993
|
-
type: i0.Injectable,
|
|
994
|
-
args: [{
|
|
995
|
-
providedIn: 'root'
|
|
996
|
-
}]
|
|
997
|
-
}], ctorParameters: function () { return [{ type: i1__namespace$4.MatSnackBar }, { type: i0__namespace.NgZone }]; } });
|
|
998
|
-
|
|
999
|
-
var NucSnackbarModule = /** @class */ (function () {
|
|
1000
|
-
function NucSnackbarModule() {
|
|
1001
|
-
}
|
|
1002
|
-
return NucSnackbarModule;
|
|
1003
|
-
}());
|
|
1004
|
-
NucSnackbarModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucSnackbarModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1005
|
-
NucSnackbarModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucSnackbarModule, imports: [i3.CommonModule,
|
|
1006
|
-
i1$4.MatSnackBarModule] });
|
|
1007
|
-
NucSnackbarModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucSnackbarModule, imports: [[
|
|
1008
|
-
i3.CommonModule,
|
|
1009
|
-
i1$4.MatSnackBarModule
|
|
1010
|
-
]] });
|
|
1011
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucSnackbarModule, decorators: [{
|
|
1012
|
-
type: i0.NgModule,
|
|
1013
|
-
args: [{
|
|
1014
|
-
declarations: [],
|
|
1015
|
-
imports: [
|
|
1016
|
-
i3.CommonModule,
|
|
1017
|
-
i1$4.MatSnackBarModule
|
|
1018
|
-
],
|
|
1019
|
-
exports: []
|
|
1020
|
-
}]
|
|
1021
|
-
}] });
|
|
1022
|
-
|
|
1023
|
-
exports.NucSnackbarType = void 0;
|
|
1024
|
-
(function (NucSnackbarType) {
|
|
1025
|
-
NucSnackbarType["Info"] = "info";
|
|
1026
|
-
NucSnackbarType["Warning"] = "warning";
|
|
1027
|
-
NucSnackbarType["Danger"] = "danger";
|
|
1028
|
-
NucSnackbarType["Success"] = "success";
|
|
1029
|
-
})(exports.NucSnackbarType || (exports.NucSnackbarType = {}));
|
|
1030
|
-
|
|
1031
|
-
var NucUserAvatarComponent = /** @class */ (function () {
|
|
1032
|
-
function NucUserAvatarComponent() {
|
|
1033
|
-
this.size = 'medium';
|
|
1034
|
-
this.background = false;
|
|
1035
|
-
}
|
|
1036
|
-
NucUserAvatarComponent.prototype.getUserInitials = function () {
|
|
1037
|
-
var nameParts = this.name.split(' ');
|
|
1038
|
-
return nameParts[0].charAt(0).toUpperCase() + '' + nameParts[nameParts.length - 1].charAt(0).toUpperCase();
|
|
1039
|
-
};
|
|
1040
|
-
NucUserAvatarComponent.prototype.getHslString = function () {
|
|
1041
|
-
if (!this.background) {
|
|
1042
|
-
return "hsl(" + 0 + "," + 0 + "%," + 100 + "%)";
|
|
1043
|
-
}
|
|
1044
|
-
var hash = 0;
|
|
1045
|
-
for (var i = 0; i < this.name.length; i++) {
|
|
1046
|
-
/*
|
|
1047
|
-
* Javascript uses double precision floating-point format for all numerical datatypes.
|
|
1048
|
-
* Except when using bitwise operations, where operators are converted to 32-bit signed integers.
|
|
1049
|
-
* Result of bitwise operations are then converted back to double precision floating-point format.
|
|
1050
|
-
*
|
|
1051
|
-
* We make a bitwise OR operation between the new hash and 0.
|
|
1052
|
-
* This keeps only the lower 32 bits in the new hash value.
|
|
1053
|
-
*/
|
|
1054
|
-
// eslint-disable-next-line no-bitwise
|
|
1055
|
-
hash = (this.name.charCodeAt(i) + ((hash << 15) - hash)) | 0;
|
|
1056
|
-
}
|
|
1057
|
-
var hue = Math.abs(hash % 360);
|
|
1058
|
-
var lightness = 49.2;
|
|
1059
|
-
var saturation = 42.6;
|
|
1060
|
-
return "hsl(" + hue + "," + saturation + "%," + lightness + "%)";
|
|
1061
|
-
};
|
|
1062
|
-
return NucUserAvatarComponent;
|
|
1063
|
-
}());
|
|
1064
|
-
NucUserAvatarComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucUserAvatarComponent, deps: [], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1065
|
-
NucUserAvatarComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.3", type: NucUserAvatarComponent, selector: "nuc-user-avatar", inputs: { name: "name", image: "image", size: "size", background: "background" }, ngImport: i0__namespace, template: "<ng-container *ngIf=\"image\">\r\n <div class=\"user-avatar size-{{size}}\">\r\n <img src=\"{{image}}\" />\r\n </div>\r\n</ng-container>\r\n\r\n<ng-container *ngIf=\"!image\">\r\n <div class=\"user-avatar size-{{size}} unselectable\" [style.background-color]=\"getHslString()\" [ngClass]=\"{'white-text': background, 'black-text border': !background}\">\r\n {{getUserInitials()}}\r\n </div>\r\n</ng-container>\r\n", styles: [".user-avatar{display:flex;align-items:center;justify-content:center;border-radius:50%;position:relative;text-align:center;font-weight:400}.user-avatar img{-o-object-fit:contain;object-fit:contain;width:inherit;height:inherit;border-radius:50%}.white-text{color:#fff}.black-text{color:#333}.unselectable{-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.border{border:2px solid #333333}.user-avatar.size-small{height:24px;width:24px;font-size:.8em;line-height:24px}.user-avatar.size-medium{height:40px;width:40px;font-size:1.2em;line-height:40px}.user-avatar.size-large{height:64px;width:64px;font-size:2em;line-height:64px}.user-avatar.size-xlarge{height:90px;width:90px;font-size:3em;line-height:90px}\n"], directives: [{ type: i3__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] });
|
|
1066
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucUserAvatarComponent, decorators: [{
|
|
1067
|
-
type: i0.Component,
|
|
1068
|
-
args: [{
|
|
1069
|
-
// eslint-disable-next-line @angular-eslint/component-selector
|
|
1070
|
-
selector: 'nuc-user-avatar',
|
|
1071
|
-
templateUrl: './user-avatar-component.html',
|
|
1072
|
-
styleUrls: ['./user-avatar-component.scss']
|
|
1073
|
-
}]
|
|
1074
|
-
}], ctorParameters: function () { return []; }, propDecorators: { name: [{
|
|
1075
|
-
type: i0.Input
|
|
1076
|
-
}], image: [{
|
|
1077
|
-
type: i0.Input
|
|
1078
|
-
}], size: [{
|
|
1079
|
-
type: i0.Input
|
|
1080
|
-
}], background: [{
|
|
1081
|
-
type: i0.Input
|
|
1082
|
-
}] } });
|
|
1083
|
-
|
|
1084
|
-
var NucUserAvatarModule = /** @class */ (function () {
|
|
1085
|
-
function NucUserAvatarModule() {
|
|
1086
|
-
}
|
|
1087
|
-
return NucUserAvatarModule;
|
|
1088
|
-
}());
|
|
1089
|
-
NucUserAvatarModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucUserAvatarModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
|
|
1090
|
-
NucUserAvatarModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucUserAvatarModule, declarations: [NucUserAvatarComponent], imports: [i3.CommonModule], exports: [NucUserAvatarComponent] });
|
|
1091
|
-
NucUserAvatarModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucUserAvatarModule, imports: [[
|
|
1092
|
-
i3.CommonModule,
|
|
1093
|
-
]] });
|
|
1094
|
-
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.3", ngImport: i0__namespace, type: NucUserAvatarModule, decorators: [{
|
|
1095
|
-
type: i0.NgModule,
|
|
1096
|
-
args: [{
|
|
1097
|
-
declarations: [
|
|
1098
|
-
NucUserAvatarComponent
|
|
1099
|
-
],
|
|
1100
|
-
imports: [
|
|
1101
|
-
i3.CommonModule,
|
|
1102
|
-
],
|
|
1103
|
-
exports: [
|
|
1104
|
-
NucUserAvatarComponent
|
|
1105
|
-
]
|
|
1106
|
-
}]
|
|
1107
|
-
}] });
|
|
1108
|
-
|
|
1109
|
-
/*
|
|
1110
|
-
* Public API Surface of nucleus-material
|
|
1111
|
-
*/
|
|
1112
|
-
|
|
1113
|
-
/**
|
|
1114
|
-
* Generated bundle index. Do not edit.
|
|
1115
|
-
*/
|
|
1116
|
-
|
|
1117
|
-
exports.LoadingState = LoadingState;
|
|
1118
|
-
exports.NativeStylingService = NativeStylingService;
|
|
1119
|
-
exports.NucDialogModule = NucDialogModule;
|
|
1120
|
-
exports.NucDialogService = NucDialogService;
|
|
1121
|
-
exports.NucLoadedContentComponent = NucLoadedContentComponent;
|
|
1122
|
-
exports.NucLoadedContentDirective = NucLoadedContentDirective;
|
|
1123
|
-
exports.NucLoadedContentModule = NucLoadedContentModule;
|
|
1124
|
-
exports.NucSnackbarModule = NucSnackbarModule;
|
|
1125
|
-
exports.NucSnackbarService = NucSnackbarService;
|
|
1126
|
-
exports.NucSwipeTabsDirective = NucSwipeTabsDirective;
|
|
1127
|
-
exports.NucSwipeTabsModule = NucSwipeTabsModule;
|
|
1128
|
-
exports.NucUserAvatarComponent = NucUserAvatarComponent;
|
|
1129
|
-
exports.NucUserAvatarModule = NucUserAvatarModule;
|
|
1130
|
-
exports.WindowsTitleBarSyle = WindowsTitleBarSyle;
|
|
1131
|
-
|
|
1132
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
1133
|
-
|
|
1134
|
-
})));
|
|
1135
|
-
//# sourceMappingURL=kolektor-nucleus-material.umd.js.map
|