@firestitch/popover 12.3.1 → 15.0.0

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.
Files changed (29) hide show
  1. package/app/components/popover/popover.component.d.ts +1 -1
  2. package/app/components/popover-wrapper/popover-wrapper.component.d.ts +1 -1
  3. package/app/directives/popover.directive.d.ts +1 -1
  4. package/esm2020/app/components/popover/popover.component.mjs +15 -0
  5. package/{esm2015/app/components/popover-wrapper/popover-wrapper.component.js → esm2020/app/components/popover-wrapper/popover-wrapper.component.mjs} +6 -12
  6. package/esm2020/app/directives/popover.directive.mjs +221 -0
  7. package/{esm2015/app/fs-popover.module.js → esm2020/app/fs-popover.module.mjs} +6 -8
  8. package/{esm2015/app/services/popover.service.js → esm2020/app/services/popover.service.mjs} +3 -3
  9. package/fesm2015/firestitch-popover.mjs +611 -0
  10. package/fesm2015/firestitch-popover.mjs.map +1 -0
  11. package/{fesm2015/firestitch-popover.js → fesm2020/firestitch-popover.mjs} +23 -37
  12. package/fesm2020/firestitch-popover.mjs.map +1 -0
  13. package/package.json +21 -8
  14. package/bundles/firestitch-popover.umd.js +0 -1070
  15. package/bundles/firestitch-popover.umd.js.map +0 -1
  16. package/esm2015/app/components/popover/popover.component.js +0 -20
  17. package/esm2015/app/directives/popover.directive.js +0 -222
  18. package/fesm2015/firestitch-popover.js.map +0 -1
  19. /package/{esm2015/app/class/popover-ref.js → esm2020/app/class/popover-ref.mjs} +0 -0
  20. /package/{esm2015/app/enums/position.js → esm2020/app/enums/position.mjs} +0 -0
  21. /package/{esm2015/app/helpers/create-injector.js → esm2020/app/helpers/create-injector.mjs} +0 -0
  22. /package/{esm2015/app/helpers/create-overlay-ref.js → esm2020/app/helpers/create-overlay-ref.mjs} +0 -0
  23. /package/{esm2015/app/helpers/create-position-strategy.js → esm2020/app/helpers/create-position-strategy.mjs} +0 -0
  24. /package/{esm2015/app/helpers/create-template-portal.js → esm2020/app/helpers/create-template-portal.mjs} +0 -0
  25. /package/{esm2015/app/helpers/point-in-rect.js → esm2020/app/helpers/point-in-rect.mjs} +0 -0
  26. /package/{esm2015/app/interfaces/popover-config.interface.js → esm2020/app/interfaces/popover-config.interface.mjs} +0 -0
  27. /package/{esm2015/firestitch-popover.js → esm2020/firestitch-popover.mjs} +0 -0
  28. /package/{esm2015/public_api.js → esm2020/public_api.mjs} +0 -0
  29. /package/{firestitch-popover.d.ts → index.d.ts} +0 -0
@@ -1,1070 +0,0 @@
1
- (function (global, factory) {
2
- typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('@angular/core'), require('@angular/common'), require('@angular/cdk/portal'), require('@angular/router'), require('rxjs'), require('rxjs/operators'), require('@firestitch/common'), require('@angular/cdk/overlay')) :
3
- typeof define === 'function' && define.amd ? define('@firestitch/popover', ['exports', '@angular/core', '@angular/common', '@angular/cdk/portal', '@angular/router', 'rxjs', 'rxjs/operators', '@firestitch/common', '@angular/cdk/overlay'], factory) :
4
- (global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory((global.firestitch = global.firestitch || {}, global.firestitch.popover = {}), global.ng.core, global.ng.common, global.ng.cdk.portal, global.ng.router, global.rxjs, global.rxjs.operators, global.common, global.ng.cdk.overlay));
5
- })(this, (function (exports, i0, i2, i3, i2$1, rxjs, operators, common, i1) { '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 () { return e[k]; }
17
- });
18
- }
19
- });
20
- }
21
- n["default"] = e;
22
- return Object.freeze(n);
23
- }
24
-
25
- var i0__namespace = /*#__PURE__*/_interopNamespace(i0);
26
- var i2__namespace = /*#__PURE__*/_interopNamespace(i2);
27
- var i3__namespace = /*#__PURE__*/_interopNamespace(i3);
28
- var i2__namespace$1 = /*#__PURE__*/_interopNamespace(i2$1);
29
- var i1__namespace = /*#__PURE__*/_interopNamespace(i1);
30
-
31
- /*! *****************************************************************************
32
- Copyright (c) Microsoft Corporation.
33
-
34
- Permission to use, copy, modify, and/or distribute this software for any
35
- purpose with or without fee is hereby granted.
36
-
37
- THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
38
- REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
39
- AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
40
- INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
41
- LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
42
- OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
43
- PERFORMANCE OF THIS SOFTWARE.
44
- ***************************************************************************** */
45
- /* global Reflect, Promise */
46
- var extendStatics = function (d, b) {
47
- extendStatics = Object.setPrototypeOf ||
48
- ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
49
- function (d, b) { for (var p in b)
50
- if (Object.prototype.hasOwnProperty.call(b, p))
51
- d[p] = b[p]; };
52
- return extendStatics(d, b);
53
- };
54
- function __extends(d, b) {
55
- if (typeof b !== "function" && b !== null)
56
- throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
57
- extendStatics(d, b);
58
- function __() { this.constructor = d; }
59
- d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
60
- }
61
- var __assign = function () {
62
- __assign = Object.assign || function __assign(t) {
63
- for (var s, i = 1, n = arguments.length; i < n; i++) {
64
- s = arguments[i];
65
- for (var p in s)
66
- if (Object.prototype.hasOwnProperty.call(s, p))
67
- t[p] = s[p];
68
- }
69
- return t;
70
- };
71
- return __assign.apply(this, arguments);
72
- };
73
- function __rest(s, e) {
74
- var t = {};
75
- for (var p in s)
76
- if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
77
- t[p] = s[p];
78
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
79
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
80
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
81
- t[p[i]] = s[p[i]];
82
- }
83
- return t;
84
- }
85
- function __decorate(decorators, target, key, desc) {
86
- var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
87
- if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
88
- r = Reflect.decorate(decorators, target, key, desc);
89
- else
90
- for (var i = decorators.length - 1; i >= 0; i--)
91
- if (d = decorators[i])
92
- r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
93
- return c > 3 && r && Object.defineProperty(target, key, r), r;
94
- }
95
- function __param(paramIndex, decorator) {
96
- return function (target, key) { decorator(target, key, paramIndex); };
97
- }
98
- function __metadata(metadataKey, metadataValue) {
99
- if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
100
- return Reflect.metadata(metadataKey, metadataValue);
101
- }
102
- function __awaiter(thisArg, _arguments, P, generator) {
103
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
104
- return new (P || (P = Promise))(function (resolve, reject) {
105
- function fulfilled(value) { try {
106
- step(generator.next(value));
107
- }
108
- catch (e) {
109
- reject(e);
110
- } }
111
- function rejected(value) { try {
112
- step(generator["throw"](value));
113
- }
114
- catch (e) {
115
- reject(e);
116
- } }
117
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
118
- step((generator = generator.apply(thisArg, _arguments || [])).next());
119
- });
120
- }
121
- function __generator(thisArg, body) {
122
- var _ = { label: 0, sent: function () { if (t[0] & 1)
123
- throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
124
- return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
125
- function verb(n) { return function (v) { return step([n, v]); }; }
126
- function step(op) {
127
- if (f)
128
- throw new TypeError("Generator is already executing.");
129
- while (_)
130
- try {
131
- 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)
132
- return t;
133
- if (y = 0, t)
134
- op = [op[0] & 2, t.value];
135
- switch (op[0]) {
136
- case 0:
137
- case 1:
138
- t = op;
139
- break;
140
- case 4:
141
- _.label++;
142
- return { value: op[1], done: false };
143
- case 5:
144
- _.label++;
145
- y = op[1];
146
- op = [0];
147
- continue;
148
- case 7:
149
- op = _.ops.pop();
150
- _.trys.pop();
151
- continue;
152
- default:
153
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
154
- _ = 0;
155
- continue;
156
- }
157
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
158
- _.label = op[1];
159
- break;
160
- }
161
- if (op[0] === 6 && _.label < t[1]) {
162
- _.label = t[1];
163
- t = op;
164
- break;
165
- }
166
- if (t && _.label < t[2]) {
167
- _.label = t[2];
168
- _.ops.push(op);
169
- break;
170
- }
171
- if (t[2])
172
- _.ops.pop();
173
- _.trys.pop();
174
- continue;
175
- }
176
- op = body.call(thisArg, _);
177
- }
178
- catch (e) {
179
- op = [6, e];
180
- y = 0;
181
- }
182
- finally {
183
- f = t = 0;
184
- }
185
- if (op[0] & 5)
186
- throw op[1];
187
- return { value: op[0] ? op[1] : void 0, done: true };
188
- }
189
- }
190
- var __createBinding = Object.create ? (function (o, m, k, k2) {
191
- if (k2 === undefined)
192
- k2 = k;
193
- Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
194
- }) : (function (o, m, k, k2) {
195
- if (k2 === undefined)
196
- k2 = k;
197
- o[k2] = m[k];
198
- });
199
- function __exportStar(m, o) {
200
- for (var p in m)
201
- if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
202
- __createBinding(o, m, p);
203
- }
204
- function __values(o) {
205
- var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
206
- if (m)
207
- return m.call(o);
208
- if (o && typeof o.length === "number")
209
- return {
210
- next: function () {
211
- if (o && i >= o.length)
212
- o = void 0;
213
- return { value: o && o[i++], done: !o };
214
- }
215
- };
216
- throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
217
- }
218
- function __read(o, n) {
219
- var m = typeof Symbol === "function" && o[Symbol.iterator];
220
- if (!m)
221
- return o;
222
- var i = m.call(o), r, ar = [], e;
223
- try {
224
- while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
225
- ar.push(r.value);
226
- }
227
- catch (error) {
228
- e = { error: error };
229
- }
230
- finally {
231
- try {
232
- if (r && !r.done && (m = i["return"]))
233
- m.call(i);
234
- }
235
- finally {
236
- if (e)
237
- throw e.error;
238
- }
239
- }
240
- return ar;
241
- }
242
- /** @deprecated */
243
- function __spread() {
244
- for (var ar = [], i = 0; i < arguments.length; i++)
245
- ar = ar.concat(__read(arguments[i]));
246
- return ar;
247
- }
248
- /** @deprecated */
249
- function __spreadArrays() {
250
- for (var s = 0, i = 0, il = arguments.length; i < il; i++)
251
- s += arguments[i].length;
252
- for (var r = Array(s), k = 0, i = 0; i < il; i++)
253
- for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
254
- r[k] = a[j];
255
- return r;
256
- }
257
- function __spreadArray(to, from, pack) {
258
- if (pack || arguments.length === 2)
259
- for (var i = 0, l = from.length, ar; i < l; i++) {
260
- if (ar || !(i in from)) {
261
- if (!ar)
262
- ar = Array.prototype.slice.call(from, 0, i);
263
- ar[i] = from[i];
264
- }
265
- }
266
- return to.concat(ar || Array.prototype.slice.call(from));
267
- }
268
- function __await(v) {
269
- return this instanceof __await ? (this.v = v, this) : new __await(v);
270
- }
271
- function __asyncGenerator(thisArg, _arguments, generator) {
272
- if (!Symbol.asyncIterator)
273
- throw new TypeError("Symbol.asyncIterator is not defined.");
274
- var g = generator.apply(thisArg, _arguments || []), i, q = [];
275
- return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
276
- function verb(n) { if (g[n])
277
- i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
278
- function resume(n, v) { try {
279
- step(g[n](v));
280
- }
281
- catch (e) {
282
- settle(q[0][3], e);
283
- } }
284
- function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
285
- function fulfill(value) { resume("next", value); }
286
- function reject(value) { resume("throw", value); }
287
- function settle(f, v) { if (f(v), q.shift(), q.length)
288
- resume(q[0][0], q[0][1]); }
289
- }
290
- function __asyncDelegator(o) {
291
- var i, p;
292
- return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
293
- 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; }
294
- }
295
- function __asyncValues(o) {
296
- if (!Symbol.asyncIterator)
297
- throw new TypeError("Symbol.asyncIterator is not defined.");
298
- var m = o[Symbol.asyncIterator], i;
299
- 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);
300
- 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); }); }; }
301
- function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
302
- }
303
- function __makeTemplateObject(cooked, raw) {
304
- if (Object.defineProperty) {
305
- Object.defineProperty(cooked, "raw", { value: raw });
306
- }
307
- else {
308
- cooked.raw = raw;
309
- }
310
- return cooked;
311
- }
312
- ;
313
- var __setModuleDefault = Object.create ? (function (o, v) {
314
- Object.defineProperty(o, "default", { enumerable: true, value: v });
315
- }) : function (o, v) {
316
- o["default"] = v;
317
- };
318
- function __importStar(mod) {
319
- if (mod && mod.__esModule)
320
- return mod;
321
- var result = {};
322
- if (mod != null)
323
- for (var k in mod)
324
- if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
325
- __createBinding(result, mod, k);
326
- __setModuleDefault(result, mod);
327
- return result;
328
- }
329
- function __importDefault(mod) {
330
- return (mod && mod.__esModule) ? mod : { default: mod };
331
- }
332
- function __classPrivateFieldGet(receiver, state, kind, f) {
333
- if (kind === "a" && !f)
334
- throw new TypeError("Private accessor was defined without a getter");
335
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
336
- throw new TypeError("Cannot read private member from an object whose class did not declare it");
337
- return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
338
- }
339
- function __classPrivateFieldSet(receiver, state, value, kind, f) {
340
- if (kind === "m")
341
- throw new TypeError("Private method is not writable");
342
- if (kind === "a" && !f)
343
- throw new TypeError("Private accessor was defined without a setter");
344
- if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
345
- throw new TypeError("Cannot write private member to an object whose class did not declare it");
346
- return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
347
- }
348
-
349
- exports.Position = void 0;
350
- (function (Position) {
351
- Position["North"] = "north";
352
- Position["South"] = "south";
353
- Position["East"] = "east";
354
- Position["West"] = "west";
355
- })(exports.Position || (exports.Position = {}));
356
-
357
- function pointInRect(x1, y1, x2, y2, px, py) {
358
- return (px > x1 && px < x2) && (py > y1 && py < y2);
359
- }
360
-
361
- var FsPopoverRef = /** @class */ (function () {
362
- function FsPopoverRef(config) {
363
- if (config === void 0) { config = {}; }
364
- this._autoShow$ = new rxjs.BehaviorSubject(true);
365
- this._autoClose$ = new rxjs.BehaviorSubject(true);
366
- this._componentLoading$ = new rxjs.BehaviorSubject(true);
367
- this._init(config);
368
- }
369
- Object.defineProperty(FsPopoverRef.prototype, "loadingDiameter", {
370
- get: function () {
371
- return this._loadingDiameter;
372
- },
373
- enumerable: false,
374
- configurable: true
375
- });
376
- Object.defineProperty(FsPopoverRef.prototype, "size", {
377
- get: function () {
378
- return this._size;
379
- },
380
- enumerable: false,
381
- configurable: true
382
- });
383
- Object.defineProperty(FsPopoverRef.prototype, "theme", {
384
- get: function () {
385
- return this._theme;
386
- },
387
- enumerable: false,
388
- configurable: true
389
- });
390
- Object.defineProperty(FsPopoverRef.prototype, "loading", {
391
- get: function () {
392
- return this._loading;
393
- },
394
- enumerable: false,
395
- configurable: true
396
- });
397
- Object.defineProperty(FsPopoverRef.prototype, "autoShow$", {
398
- get: function () {
399
- return this._autoShow$.asObservable();
400
- },
401
- enumerable: false,
402
- configurable: true
403
- });
404
- Object.defineProperty(FsPopoverRef.prototype, "autoShow", {
405
- get: function () {
406
- return this._autoShow$.getValue();
407
- },
408
- set: function (value) {
409
- this._autoShow$.next(value);
410
- },
411
- enumerable: false,
412
- configurable: true
413
- });
414
- Object.defineProperty(FsPopoverRef.prototype, "autoClose$", {
415
- get: function () {
416
- return this._autoClose$.asObservable();
417
- },
418
- enumerable: false,
419
- configurable: true
420
- });
421
- Object.defineProperty(FsPopoverRef.prototype, "autoClose", {
422
- get: function () {
423
- return this._autoClose$.getValue();
424
- },
425
- set: function (value) {
426
- this._autoClose$.next(value);
427
- },
428
- enumerable: false,
429
- configurable: true
430
- });
431
- Object.defineProperty(FsPopoverRef.prototype, "componentVisible$", {
432
- get: function () {
433
- return rxjs.combineLatest([
434
- this.autoShow$,
435
- this.componentLoading$,
436
- ]).pipe(operators.map(function (_a) {
437
- var _b = __read(_a, 2), autoShow = _b[0], componentLoading = _b[1];
438
- return autoShow || !componentLoading;
439
- }));
440
- },
441
- enumerable: false,
442
- configurable: true
443
- });
444
- Object.defineProperty(FsPopoverRef.prototype, "componentLoading$", {
445
- get: function () {
446
- return this._componentLoading$.asObservable();
447
- },
448
- enumerable: false,
449
- configurable: true
450
- });
451
- Object.defineProperty(FsPopoverRef.prototype, "componentLoading", {
452
- get: function () {
453
- return this._componentLoading$.getValue();
454
- },
455
- enumerable: false,
456
- configurable: true
457
- });
458
- Object.defineProperty(FsPopoverRef.prototype, "wrapperClass", {
459
- get: function () {
460
- return this._wrapperClass;
461
- },
462
- enumerable: false,
463
- configurable: true
464
- });
465
- Object.defineProperty(FsPopoverRef.prototype, "maxWidth", {
466
- get: function () {
467
- return this._maxWidth;
468
- },
469
- enumerable: false,
470
- configurable: true
471
- });
472
- FsPopoverRef.prototype.show = function () {
473
- var _this = this;
474
- setTimeout(function () {
475
- _this._componentLoading$.next(false);
476
- setTimeout(function () {
477
- _this.updatePosition();
478
- });
479
- });
480
- };
481
- FsPopoverRef.prototype.close = function () {
482
- this.overlayRef.detach();
483
- this._componentLoading$.next(true);
484
- };
485
- FsPopoverRef.prototype.updatePosition = function () {
486
- this.overlayRef.updatePosition();
487
- };
488
- FsPopoverRef.prototype._init = function (config) {
489
- this._wrapperClass = config.wrapperClass;
490
- this._maxWidth = config.maxWidth;
491
- this._loading = config.loading;
492
- this._loadingDiameter = config.loadingDiameter;
493
- this._size = config.size;
494
- this._theme = config.theme;
495
- this._autoShow$.next(config.autoShow);
496
- this._autoClose$.next(config.autoClose);
497
- };
498
- return FsPopoverRef;
499
- }());
500
-
501
- var FsPopoverWrapperComponent = /** @class */ (function (_super) {
502
- __extends(FsPopoverWrapperComponent, _super);
503
- function FsPopoverWrapperComponent(popoverRef, _el, _zone, _renderer) {
504
- var _this = _super.call(this) || this;
505
- _this.popoverRef = popoverRef;
506
- _this._el = _el;
507
- _this._zone = _zone;
508
- _this._renderer = _renderer;
509
- _this._updatePosition = new rxjs.Subject();
510
- _this._destroy$ = new rxjs.Subject();
511
- _this._updateClass();
512
- _this.wrapperClass = _this.popoverRef.wrapperClass;
513
- _this.maxWidth = _this.popoverRef.maxWidth;
514
- return _this;
515
- }
516
- Object.defineProperty(FsPopoverWrapperComponent.prototype, "maxWidth", {
517
- set: function (value) {
518
- this._el.nativeElement.style.maxWidth = value ? value + 'px' : void 0;
519
- },
520
- enumerable: false,
521
- configurable: true
522
- });
523
- Object.defineProperty(FsPopoverWrapperComponent.prototype, "wrapperClass", {
524
- set: function (value) {
525
- this._wrapperClass = value;
526
- this._updateClass();
527
- },
528
- enumerable: false,
529
- configurable: true
530
- });
531
- FsPopoverWrapperComponent.prototype.ngOnInit = function () {
532
- if (!this.popoverRef.autoShow && this.popoverRef.componentLoading) {
533
- this._watchMousePosition();
534
- }
535
- this._observeContentChanges();
536
- this._listenUpdatePositionRequests();
537
- };
538
- FsPopoverWrapperComponent.prototype.ngOnDestroy = function () {
539
- this._contentChangesObserver.disconnect();
540
- this._destroy$.next();
541
- this._destroy$.complete();
542
- };
543
- /**
544
- * Attach a TemplatePortal as content to this popover container.
545
- * @param portal Portal to be attached as the popover content.
546
- */
547
- FsPopoverWrapperComponent.prototype.attachTemplatePortal = function (portal) {
548
- if (this._portalOutlet.hasAttached()) {
549
- throw Error('Popover template already attached');
550
- }
551
- return this._portalOutlet.attachTemplatePortal(portal);
552
- };
553
- /**
554
- * Attach a ComponentPortal as content to this popover container.
555
- * @param portal Portal to be attached as the popover content.
556
- */
557
- FsPopoverWrapperComponent.prototype.attachComponentPortal = function (portal) {
558
- if (this._portalOutlet.hasAttached()) {
559
- throw Error('Popover component already attached');
560
- }
561
- return this._portalOutlet.attachComponentPortal(portal);
562
- };
563
- FsPopoverWrapperComponent.prototype.setTextualContent = function (content) {
564
- this.content = content;
565
- };
566
- FsPopoverWrapperComponent.prototype.updatePosition = function () {
567
- this._updatePosition.next();
568
- };
569
- FsPopoverWrapperComponent.prototype._watchMousePosition = function () {
570
- var _this = this;
571
- var componentVisibilityChange$ = this.popoverRef.componentVisible$
572
- .pipe(operators.filter(function (value) { return value === true; }));
573
- this._zone.runOutsideAngular(function () {
574
- rxjs.fromEvent(document, 'mousemove')
575
- .pipe(operators.takeUntil(componentVisibilityChange$), operators.takeUntil(_this._destroy$))
576
- .subscribe(function (e) {
577
- _this.spinner.nativeElement.style.left = e.x + 'px';
578
- _this.spinner.nativeElement.style.top = (e.y + 20) + 'px';
579
- });
580
- });
581
- };
582
- FsPopoverWrapperComponent.prototype._updateClass = function () {
583
- if (this._wrapperClass) {
584
- this._renderer.addClass(this._el.nativeElement, this._wrapperClass);
585
- }
586
- };
587
- FsPopoverWrapperComponent.prototype._observeContentChanges = function () {
588
- var _this = this;
589
- var config = {
590
- childList: true,
591
- subtree: true
592
- };
593
- this._contentChangesObserver = new MutationObserver(function () {
594
- _this.updatePosition();
595
- });
596
- this._contentChangesObserver.observe(this._el.nativeElement, config);
597
- };
598
- FsPopoverWrapperComponent.prototype._listenUpdatePositionRequests = function () {
599
- var _this = this;
600
- this._updatePosition
601
- .pipe(operators.debounceTime(50), operators.takeUntil(this._destroy$))
602
- .subscribe(function () {
603
- _this.popoverRef.updatePosition();
604
- });
605
- };
606
- return FsPopoverWrapperComponent;
607
- }(i3.BasePortalOutlet));
608
- FsPopoverWrapperComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsPopoverWrapperComponent, deps: [{ token: FsPopoverRef }, { token: i0__namespace.ElementRef }, { token: i0__namespace.NgZone }, { token: i0__namespace.Renderer2 }], target: i0__namespace.ɵɵFactoryTarget.Component });
609
- FsPopoverWrapperComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsPopoverWrapperComponent, selector: "fs-popover-wrapper", host: { classAttribute: "fs-popover-wrapper" }, viewQueries: [{ propertyName: "_portalOutlet", first: true, predicate: i3.CdkPortalOutlet, descendants: true, static: true }, { propertyName: "spinner", first: true, predicate: ["spinner"], descendants: true }], usesInheritance: true, ngImport: i0__namespace, template: "<div class=\"wrapper\" [ngClass]=\"{\n 'theme-dark' : popoverRef.theme === 'dark',\n 'size-tiny': popoverRef.size === 'tiny',\n 'size-small': popoverRef.size === 'small',\n 'hidden': !(popoverRef.componentVisible$ | async)\n }\">\n <div class=\"mat-elevation-z4 popover-content\">\n <ng-container *ngIf=\"content\">\n {{content}}\n </ng-container>\n\n <ng-template cdkPortalOutlet></ng-template>\n </div>\n\n <div class=\"fs-popover-arrow light\"></div>\n <div class=\"fs-popover-arrow dark\"></div>\n</div>\n\n<div class=\"loading-spinner\"\n #spinner\n *ngIf=\"popoverRef.loading && !(popoverRef.componentVisible$ | async)\">\n <svg xmlns=\"http://www.w3.org/2000/svg\" [attr.width]=\"popoverRef.loadingDiameter\" [attr.height]=\"popoverRef.loadingDiameter\" viewBox=\"0 0 42 42\" stroke=\"grey\">\n <g fill=\"none\" fill-rule=\"evenodd\">\n <g transform=\"translate(1 1)\" stroke-width=\"3\">\n <circle stroke-opacity=\".5\" cx=\"18\" cy=\"18\" r=\"18\"/>\n <path d=\"M36 18c0-9.94-8.06-18-18-18\">\n <animateTransform attributeName=\"transform\" type=\"rotate\" from=\"0 18 18\" to=\"360 18 18\" dur=\"1s\" repeatCount=\"indefinite\"/>\n </path>\n </g>\n </g>\n </svg>\n</div>\n", styles: [".wrapper{padding:6px;animation:fadeIn ease .2s}.wrapper.hidden{display:none}.wrapper .popover-content{background:#fff;border-radius:4px;padding:8px;color:#1b1b1b;box-sizing:border-box;overflow:hidden}.wrapper.theme-dark .popover-content{background-color:#707070;color:#fff}.wrapper.size-small .popover-content{font-size:80%}.wrapper.size-tiny .popover-content{font-size:70%}.wrapper .fs-popover-arrow{width:0;height:0;font-size:0;line-height:0;position:absolute;z-index:200;z-index:1}.wrapper .fs-popover-arrow.dark{z-index:0}::ng-deep .fs-popover-top .fs-popover-arrow,::ng-deep .fs-popover-bottom .fs-popover-arrow{border-left:10px solid transparent;border-right:10px solid transparent}::ng-deep .fs-popover-left .fs-popover-arrow,::ng-deep .fs-popover-right .fs-popover-arrow{border-top:10px solid transparent;border-bottom:10px solid transparent}::ng-deep .fs-popover-top .fs-popover-arrow{bottom:-3px;left:calc(50% - 10px);border-top:10px solid #fff}::ng-deep .fs-popover-top .fs-popover-arrow.dark{border-top-color:#dfdfdf40;bottom:-4px}::ng-deep .fs-popover-bottom .fs-popover-arrow{top:-3px;left:calc(50% - 10px);border-bottom:10px solid #fff}::ng-deep .fs-popover-bottom .fs-popover-arrow.dark{border-bottom-color:#dfdfdf40;top:-4px}::ng-deep .fs-popover-left .fs-popover-arrow{left:-3px;top:calc(50% - 10px);border-right:10px solid #fff}::ng-deep .fs-popover-left .fs-popover-arrow.dark{border-right-color:#dfdfdf40;left:-4px}::ng-deep .fs-popover-right .fs-popover-arrow{right:-3px;top:calc(50% - 10px);border-left:10px solid #fff}::ng-deep .fs-popover-right .fs-popover-arrow.dark{border-left-color:#dfdfdf40;right:-4px}::ng-deep .fs-popover-bottom .wrapper.theme-dark .fs-popover-arrow{border-bottom-color:#707070}::ng-deep .fs-popover-left .wrapper.theme-dark .fs-popover-arrow{border-right-color:#707070}::ng-deep .fs-popover-right .wrapper.theme-dark .fs-popover-arrow{border-left-color:#707070}::ng-deep .fs-popover-top .wrapper.theme-dark .fs-popover-arrow{border-top-color:#707070}@keyframes fadeIn{0%{opacity:0}to{opacity:1}}\n"], directives: [{ type: i2__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }, { type: i3__namespace.CdkPortalOutlet, selector: "[cdkPortalOutlet]", inputs: ["cdkPortalOutlet"], outputs: ["attached"], exportAs: ["cdkPortalOutlet"] }], pipes: { "async": i2__namespace.AsyncPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
610
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsPopoverWrapperComponent, decorators: [{
611
- type: i0.Component,
612
- args: [{
613
- selector: 'fs-popover-wrapper',
614
- templateUrl: 'popover-wrapper.component.html',
615
- styleUrls: ['popover-wrapper.component.scss'],
616
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
617
- host: {
618
- 'class': 'fs-popover-wrapper',
619
- },
620
- }]
621
- }], ctorParameters: function () { return [{ type: FsPopoverRef }, { type: i0__namespace.ElementRef }, { type: i0__namespace.NgZone }, { type: i0__namespace.Renderer2 }]; }, propDecorators: { _portalOutlet: [{
622
- type: i0.ViewChild,
623
- args: [i3.CdkPortalOutlet, { static: true }]
624
- }], spinner: [{
625
- type: i0.ViewChild,
626
- args: ['spinner']
627
- }] } });
628
-
629
- function createPopupPositionStrategy(el, overlay, position) {
630
- var overlayX = 'center';
631
- var overlayY = 'center';
632
- var originX = 'center';
633
- var originY = 'center';
634
- var offsetX = 0;
635
- var offsetY = 0;
636
- var panelClass = [];
637
- switch (position) {
638
- case exports.Position.North:
639
- originY = 'top';
640
- overlayY = 'bottom';
641
- panelClass = ['fs-popover-top'];
642
- offsetY = -8;
643
- break;
644
- case exports.Position.South:
645
- originY = 'bottom';
646
- overlayY = 'top';
647
- panelClass = ['fs-popover-bottom'];
648
- offsetY = 8;
649
- break;
650
- case exports.Position.East:
651
- overlayX = 'start';
652
- originX = 'end';
653
- panelClass = ['fs-popover-left'];
654
- offsetX = 8;
655
- break;
656
- case exports.Position.West:
657
- overlayX = 'end';
658
- originX = 'start';
659
- panelClass = ['fs-popover-right'];
660
- offsetX = -8;
661
- break;
662
- }
663
- return createBasePopupPositionStrategy(el, overlay)
664
- .withPositions([
665
- {
666
- originX: originX,
667
- originY: originY,
668
- overlayX: overlayX,
669
- overlayY: overlayY,
670
- offsetX: offsetX,
671
- offsetY: offsetY,
672
- panelClass: panelClass,
673
- }
674
- ]);
675
- }
676
- function createBasePopupPositionStrategy(el, overlay) {
677
- return overlay.position()
678
- .flexibleConnectedTo(el)
679
- .withGrowAfterOpen(true)
680
- .withFlexibleDimensions(false)
681
- .withViewportMargin(4);
682
- }
683
-
684
- function createOverlayRef(el, overlay, position) {
685
- var config = {
686
- positionStrategy: createPopupPositionStrategy(el, overlay, position),
687
- scrollStrategy: overlay.scrollStrategies.reposition(),
688
- hasBackdrop: false
689
- };
690
- var overlayConfig = new i1.OverlayConfig(config);
691
- return overlay.create(overlayConfig);
692
- }
693
-
694
- function createInjector(popoverRef, parentInjector) {
695
- var injectionTokens = new WeakMap([
696
- [FsPopoverRef, popoverRef],
697
- ]);
698
- return new i3.PortalInjector(parentInjector, injectionTokens);
699
- }
700
-
701
- function createTempatePortal(template, popoverRef, data) {
702
- return new i3.TemplatePortal(template, void 0, { data: data, popover: popoverRef });
703
- }
704
-
705
- var FsPopoverService = /** @class */ (function () {
706
- function FsPopoverService(_injector, _overlay) {
707
- this._injector = _injector;
708
- this._overlay = _overlay;
709
- }
710
- Object.defineProperty(FsPopoverService.prototype, "hasActivePopover", {
711
- get: function () {
712
- return !!this._activeElement;
713
- },
714
- enumerable: false,
715
- configurable: true
716
- });
717
- Object.defineProperty(FsPopoverService.prototype, "activeElementGUID", {
718
- get: function () {
719
- return this._activeElementGUID;
720
- },
721
- enumerable: false,
722
- configurable: true
723
- });
724
- FsPopoverService.prototype.setActivePopoverGUID = function (value) {
725
- this._activeElementGUID = value;
726
- };
727
- FsPopoverService.prototype.openPopover = function (el, content, data, popoverRef, position) {
728
- if (this._activeElement) {
729
- this.close(this._activeElement.popoverRef);
730
- }
731
- var overlayRef = createOverlayRef(el, this._overlay, position);
732
- var containerRef = this._openPortalPreview(FsPopoverWrapperComponent, overlayRef, popoverRef);
733
- if (content instanceof i0.TemplateRef) {
734
- var templatePortal = createTempatePortal(content, popoverRef, data);
735
- containerRef.instance.attachTemplatePortal(templatePortal);
736
- }
737
- else {
738
- containerRef.instance.setTextualContent(content);
739
- }
740
- popoverRef.overlayRef = overlayRef;
741
- this._activeElement = {
742
- overlayRef: overlayRef,
743
- popoverRef: popoverRef,
744
- };
745
- return containerRef.location.nativeElement;
746
- };
747
- FsPopoverService.prototype.close = function (popoverRef) {
748
- if (popoverRef === void 0) { popoverRef = null; }
749
- if (this._activeElement.popoverRef === popoverRef) {
750
- popoverRef.close();
751
- this._activeElement = void 0;
752
- this._activeElementGUID = void 0;
753
- }
754
- };
755
- FsPopoverService.prototype._openPortalPreview = function (component, overlayRef, popoverRef) {
756
- var containerPortal = new i3.ComponentPortal(component, void 0, createInjector(popoverRef, this._injector));
757
- return overlayRef.attach(containerPortal);
758
- };
759
- return FsPopoverService;
760
- }());
761
- FsPopoverService.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsPopoverService, deps: [{ token: i0__namespace.Injector }, { token: i1__namespace.Overlay }], target: i0__namespace.ɵɵFactoryTarget.Injectable });
762
- FsPopoverService.ɵprov = i0__namespace.ɵɵngDeclareInjectable({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsPopoverService, providedIn: 'root' });
763
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsPopoverService, decorators: [{
764
- type: i0.Injectable,
765
- args: [{
766
- providedIn: 'root',
767
- }]
768
- }], ctorParameters: function () { return [{ type: i0__namespace.Injector }, { type: i1__namespace.Overlay }]; } });
769
-
770
- var FsPopoverDirective = /** @class */ (function () {
771
- function FsPopoverDirective(_elRef, _popoverService, _ngZone, _router) {
772
- this._elRef = _elRef;
773
- this._popoverService = _popoverService;
774
- this._ngZone = _ngZone;
775
- this._router = _router;
776
- this._guid = common.guid('xxxxxxx');
777
- this.leaveDelay = 100;
778
- this.showDelay = 0;
779
- this.maxWidth = 250;
780
- this.autoShow = true;
781
- this.autoClose = true;
782
- this.loadingDiameter = 20;
783
- this.loading = true;
784
- this.indication = true;
785
- this.position = exports.Position.South;
786
- this.theme = 'light';
787
- this.size = 'normal';
788
- this.trigger = 'mouseover';
789
- this.enabled = true;
790
- this._initialized = false;
791
- this._mouseEnter$ = rxjs.fromEvent(this._elRef.nativeElement, 'mouseenter');
792
- this._mouseMove$ = rxjs.fromEvent(document, 'mousemove', { passive: true });
793
- this._mouseLeave$ = rxjs.fromEvent(this._elRef.nativeElement, 'mouseleave');
794
- this._popoverClosed$ = new rxjs.Subject();
795
- this._destroy$ = new rxjs.Subject();
796
- }
797
- Object.defineProperty(FsPopoverDirective.prototype, "openTimer$", {
798
- get: function () {
799
- return rxjs.timer(this.showDelay);
800
- },
801
- enumerable: false,
802
- configurable: true
803
- });
804
- Object.defineProperty(FsPopoverDirective.prototype, "closeTimer$", {
805
- get: function () {
806
- return rxjs.timer(this.leaveDelay);
807
- },
808
- enumerable: false,
809
- configurable: true
810
- });
811
- FsPopoverDirective.prototype.ngOnInit = function () {
812
- if (this.enabled) {
813
- this._initialize();
814
- }
815
- };
816
- FsPopoverDirective.prototype.ngOnChanges = function (changes) {
817
- var _a, _b;
818
- if (((_a = changes.enabled) === null || _a === void 0 ? void 0 : _a.currentValue) !== ((_b = changes.enabled) === null || _b === void 0 ? void 0 : _b.previousValue)) {
819
- if (this.enabled && !this._initialized) {
820
- this._initialize();
821
- }
822
- }
823
- };
824
- FsPopoverDirective.prototype.ngOnDestroy = function () {
825
- this._popoverClosed$.next();
826
- this._destroy$.next();
827
- };
828
- FsPopoverDirective.prototype._closePopover = function () {
829
- var _this = this;
830
- this._popoverClosed$.next();
831
- this._ngZone.run(function () {
832
- _this._wrapperElement = null;
833
- if (_this._popoverService.hasActivePopover) {
834
- _this._popoverService.close(_this._popoverRef);
835
- }
836
- });
837
- };
838
- FsPopoverDirective.prototype._initialize = function () {
839
- var _this = this;
840
- if (this._initialized) {
841
- return;
842
- }
843
- this._popoverRef = new FsPopoverRef({
844
- maxWidth: this.maxWidth,
845
- wrapperClass: this.wrapperClass,
846
- autoShow: this.autoShow,
847
- autoClose: this.autoClose,
848
- loadingDiameter: this.loadingDiameter,
849
- loading: this.loading,
850
- size: this.size,
851
- theme: this.theme,
852
- });
853
- this._ngZone.runOutsideAngular(function () {
854
- if (_this.trigger === 'click') {
855
- _this._listenMouseHostClick();
856
- }
857
- else {
858
- _this._listenMouseHostEnter();
859
- }
860
- });
861
- this._listenRouteChange();
862
- this._initialized = true;
863
- };
864
- FsPopoverDirective.prototype._listenRouteChange = function () {
865
- var _this = this;
866
- this._router.events
867
- .pipe(operators.filter(function (event) {
868
- return event instanceof i2$1.NavigationEnd;
869
- }), rxjs.pipe(operators.takeUntil(this._destroy$
870
- .pipe(operators.delay(200)))))
871
- .subscribe(function () {
872
- _this._closePopover();
873
- });
874
- };
875
- FsPopoverDirective.prototype._listenMouseHostClick = function () {
876
- var _this = this;
877
- rxjs.fromEvent(this._elRef.nativeElement, 'click', { passive: true })
878
- .pipe(operators.filter(function () { return _this.enabled; }), operators.tap(function (e) {
879
- e.stopPropagation();
880
- _this._openPopover();
881
- }), operators.switchMap(function () { return _this._listenMouseHostLeave$(); }), operators.switchMap(function () { return _this.closeTimer$; }), operators.takeUntil(this._destroy$))
882
- .subscribe(function () {
883
- _this._closePopover();
884
- });
885
- };
886
- FsPopoverDirective.prototype._listenMouseHostEnter = function () {
887
- var _this = this;
888
- var actualMouseState$ = rxjs.merge(this._mouseLeave$.pipe(operators.mapTo(true)), this._mouseEnter$.pipe(operators.mapTo(false)))
889
- .pipe(operators.startWith(false), operators.distinctUntilChanged());
890
- this._mouseEnter$
891
- .pipe(operators.filter(function () { return _this.enabled; }), operators.filter(function () {
892
- return !_this._wrapperElement;
893
- }), operators.tap(function () {
894
- _this._popoverService.setActivePopoverGUID(_this._guid);
895
- }), operators.switchMap(function () { return _this.openTimer$; }),
896
- // we have to check that after all delays mouse still over an elemen
897
- operators.withLatestFrom(actualMouseState$), operators.filter(function (_c) {
898
- var _d = __read(_c, 2), _ = _d[0], mouseLeave = _d[1];
899
- return !mouseLeave;
900
- }), operators.tap(function () { return _this._openPopover(); }), operators.switchMap(function () { return _this._listenMouseHostLeave$(); }), operators.switchMap(function () { return _this.closeTimer$; }), operators.tap(function () { return _this._closePopover(); }), operators.finalize(function () { return _this._closePopover(); }), operators.takeUntil(this._destroy$))
901
- .subscribe();
902
- };
903
- FsPopoverDirective.prototype._openPopover = function () {
904
- var _this = this;
905
- if (this.trigger === 'mouseover' && this._popoverService.activeElementGUID !== this._guid) {
906
- return;
907
- }
908
- this._hostBounds = this._elRef.nativeElement.getBoundingClientRect();
909
- this._ngZone.run(function () {
910
- if (_this.template) {
911
- _this._wrapperElement = _this._popoverService.openPopover(_this._elRef, _this.template, _this.data, _this._popoverRef, _this.position);
912
- }
913
- else {
914
- _this._wrapperElement = _this._popoverService.openPopover(_this._elRef, _this.text, _this.data, _this._popoverRef, _this.position);
915
- }
916
- });
917
- };
918
- FsPopoverDirective.prototype._listenMouseHostLeave$ = function () {
919
- var _this = this;
920
- var mouseMove$ = this._mouseMove$
921
- .pipe(operators.debounceTime(50), operators.filter(function () { return !!_this._wrapperElement; }), operators.filter(function (event) {
922
- return _this._popoverRef.autoClose && _this._mouseLeftTheTargets(event);
923
- }));
924
- var mouseClick$ = rxjs.fromEvent(this._elRef.nativeElement, 'click');
925
- return rxjs.merge(mouseMove$, mouseClick$);
926
- //
927
- // return this._mouseLeave$
928
- // .pipe(
929
- // //
930
- // timeoutWith(200, mouseMove$),
931
- // );
932
- };
933
- // Check if mouse left target or popover rects
934
- FsPopoverDirective.prototype._mouseLeftTheTargets = function (event) {
935
- var hostBounds = this._hostBounds;
936
- var popoverBounds = this._wrapperElement.getBoundingClientRect();
937
- var pointInHostRect = pointInRect(hostBounds.x, hostBounds.y, hostBounds.x + hostBounds.width, hostBounds.y + hostBounds.height, event.x, event.y);
938
- var pointInPopoverRect = pointInRect(popoverBounds.x, popoverBounds.y, popoverBounds.x + popoverBounds.width, popoverBounds.y + popoverBounds.height, event.x, event.y);
939
- return !pointInHostRect && !pointInPopoverRect;
940
- };
941
- return FsPopoverDirective;
942
- }());
943
- FsPopoverDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsPopoverDirective, deps: [{ token: i0__namespace.ElementRef }, { token: FsPopoverService }, { token: i0__namespace.NgZone }, { token: i2__namespace$1.Router, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Directive });
944
- FsPopoverDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: FsPopoverDirective, selector: "[fsPopover]", inputs: { text: "text", template: "template", data: "data", leaveDelay: "leaveDelay", showDelay: "showDelay", maxWidth: "maxWidth", wrapperClass: "wrapperClass", autoShow: "autoShow", autoClose: "autoClose", loadingDiameter: "loadingDiameter", loading: "loading", indication: "indication", position: "position", theme: "theme", size: "size", trigger: "trigger", enabled: "enabled" }, host: { properties: { "class.indication": "this.indication", "class.fs-popover-enabled": "this.enabled" }, classAttribute: "fs-popover" }, usesOnChanges: true, ngImport: i0__namespace });
945
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsPopoverDirective, decorators: [{
946
- type: i0.Directive,
947
- args: [{
948
- selector: '[fsPopover]',
949
- host: {
950
- 'class': 'fs-popover',
951
- },
952
- }]
953
- }], ctorParameters: function () {
954
- return [{ type: i0__namespace.ElementRef }, { type: FsPopoverService }, { type: i0__namespace.NgZone }, { type: i2__namespace$1.Router, decorators: [{
955
- type: i0.Optional
956
- }] }];
957
- }, propDecorators: { text: [{
958
- type: i0.Input
959
- }], template: [{
960
- type: i0.Input
961
- }], data: [{
962
- type: i0.Input
963
- }], leaveDelay: [{
964
- type: i0.Input
965
- }], showDelay: [{
966
- type: i0.Input
967
- }], maxWidth: [{
968
- type: i0.Input
969
- }], wrapperClass: [{
970
- type: i0.Input
971
- }], autoShow: [{
972
- type: i0.Input
973
- }], autoClose: [{
974
- type: i0.Input
975
- }], loadingDiameter: [{
976
- type: i0.Input
977
- }], loading: [{
978
- type: i0.Input
979
- }], indication: [{
980
- type: i0.Input
981
- }, {
982
- type: i0.HostBinding,
983
- args: ['class.indication']
984
- }], position: [{
985
- type: i0.Input
986
- }], theme: [{
987
- type: i0.Input
988
- }], size: [{
989
- type: i0.Input
990
- }], trigger: [{
991
- type: i0.Input
992
- }], enabled: [{
993
- type: i0.Input
994
- }, {
995
- type: i0.HostBinding,
996
- args: ['class.fs-popover-enabled']
997
- }] } });
998
-
999
- var FsPopoverComponent = /** @class */ (function (_super) {
1000
- __extends(FsPopoverComponent, _super);
1001
- function FsPopoverComponent() {
1002
- return _super !== null && _super.apply(this, arguments) || this;
1003
- }
1004
- return FsPopoverComponent;
1005
- }(FsPopoverDirective));
1006
- FsPopoverComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsPopoverComponent, deps: null, target: i0__namespace.ɵɵFactoryTarget.Component });
1007
- FsPopoverComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: FsPopoverComponent, selector: "fs-popover", host: { classAttribute: "fs-popover-component" }, usesInheritance: true, ngImport: i0__namespace, template: "<span [ngClass]=\"{'popover-container': enabled}\">\n <ng-content></ng-content>\n</span>\n", directives: [{ type: i2__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }], changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
1008
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsPopoverComponent, decorators: [{
1009
- type: i0.Component,
1010
- args: [{
1011
- selector: 'fs-popover',
1012
- templateUrl: 'popover.component.html',
1013
- changeDetection: i0.ChangeDetectionStrategy.OnPush,
1014
- host: {
1015
- 'class': 'fs-popover-component',
1016
- }
1017
- }]
1018
- }] });
1019
-
1020
- var FsPopoverModule = /** @class */ (function () {
1021
- function FsPopoverModule() {
1022
- }
1023
- return FsPopoverModule;
1024
- }());
1025
- FsPopoverModule.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsPopoverModule, deps: [], target: i0__namespace.ɵɵFactoryTarget.NgModule });
1026
- FsPopoverModule.ɵmod = i0__namespace.ɵɵngDeclareNgModule({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsPopoverModule, declarations: [FsPopoverComponent,
1027
- FsPopoverWrapperComponent,
1028
- FsPopoverDirective], imports: [i2.CommonModule,
1029
- i3.PortalModule], exports: [FsPopoverComponent,
1030
- FsPopoverDirective] });
1031
- FsPopoverModule.ɵinj = i0__namespace.ɵɵngDeclareInjector({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsPopoverModule, imports: [[
1032
- i2.CommonModule,
1033
- i3.PortalModule,
1034
- ]] });
1035
- i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: FsPopoverModule, decorators: [{
1036
- type: i0.NgModule,
1037
- args: [{
1038
- imports: [
1039
- i2.CommonModule,
1040
- i3.PortalModule,
1041
- ],
1042
- declarations: [
1043
- FsPopoverComponent,
1044
- FsPopoverWrapperComponent,
1045
- FsPopoverDirective,
1046
- ],
1047
- exports: [
1048
- FsPopoverComponent,
1049
- FsPopoverDirective,
1050
- ],
1051
- }]
1052
- }] });
1053
-
1054
- /*
1055
- * Public API Surface of fs-menu
1056
- */
1057
-
1058
- /**
1059
- * Generated bundle index. Do not edit.
1060
- */
1061
-
1062
- exports.FsPopoverComponent = FsPopoverComponent;
1063
- exports.FsPopoverDirective = FsPopoverDirective;
1064
- exports.FsPopoverModule = FsPopoverModule;
1065
- exports.FsPopoverRef = FsPopoverRef;
1066
-
1067
- Object.defineProperty(exports, '__esModule', { value: true });
1068
-
1069
- }));
1070
- //# sourceMappingURL=firestitch-popover.umd.js.map