@skyux/popovers 5.9.1 → 5.9.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bundles/skyux-popovers-testing.umd.js +12 -6
- package/bundles/skyux-popovers.umd.js +397 -69
- package/documentation.json +422 -334
- package/esm2015/index.js +1 -0
- package/esm2015/index.js.map +1 -1
- package/esm2015/lib/modules/dropdown/dropdown-item.component.js.map +1 -1
- package/esm2015/lib/modules/dropdown/dropdown-menu.component.js +1 -4
- package/esm2015/lib/modules/dropdown/dropdown-menu.component.js.map +1 -1
- package/esm2015/lib/modules/dropdown/dropdown.component.js +10 -7
- package/esm2015/lib/modules/dropdown/dropdown.component.js.map +1 -1
- package/esm2015/lib/modules/popover/popover-content.component.js +19 -42
- package/esm2015/lib/modules/popover/popover-content.component.js.map +1 -1
- package/esm2015/lib/modules/popover/popover-context.js.map +1 -1
- package/esm2015/lib/modules/popover/popover.component.js +13 -6
- package/esm2015/lib/modules/popover/popover.component.js.map +1 -1
- package/esm2015/lib/modules/popover/popover.directive.js +29 -10
- package/esm2015/lib/modules/popover/popover.directive.js.map +1 -1
- package/esm2015/lib/modules/popover/types/popover-type.js +2 -0
- package/esm2015/lib/modules/popover/types/popover-type.js.map +1 -0
- package/esm2015/testing/dropdown/dropdown-fixture.js +7 -1
- package/esm2015/testing/dropdown/dropdown-fixture.js.map +1 -1
- package/esm2015/testing/dropdown/popovers-fixture-dropdown.js.map +1 -1
- package/esm2015/testing/popover/popover-fixture.js +8 -8
- package/esm2015/testing/popover/popover-fixture.js.map +1 -1
- package/fesm2015/skyux-popovers-testing.js +15 -9
- package/fesm2015/skyux-popovers-testing.js.map +1 -1
- package/fesm2015/skyux-popovers.js +71 -69
- package/fesm2015/skyux-popovers.js.map +1 -1
- package/index.d.ts +1 -0
- package/lib/modules/dropdown/dropdown-item.component.d.ts +1 -1
- package/lib/modules/dropdown/dropdown-menu.component.d.ts +3 -3
- package/lib/modules/dropdown/dropdown.component.d.ts +12 -12
- package/lib/modules/popover/popover-content.component.d.ts +13 -12
- package/lib/modules/popover/popover-context.d.ts +2 -2
- package/lib/modules/popover/popover.component.d.ts +9 -9
- package/lib/modules/popover/popover.directive.d.ts +10 -9
- package/lib/modules/popover/types/popover-type.d.ts +4 -0
- package/package.json +6 -6
- package/testing/dropdown/dropdown-fixture.d.ts +7 -7
- package/testing/dropdown/popovers-fixture-dropdown.d.ts +2 -2
- package/testing/popover/popover-fixture.d.ts +6 -6
|
@@ -218,6 +218,324 @@
|
|
|
218
218
|
type: i0.Input
|
|
219
219
|
}] } });
|
|
220
220
|
|
|
221
|
+
/*! *****************************************************************************
|
|
222
|
+
Copyright (c) Microsoft Corporation.
|
|
223
|
+
|
|
224
|
+
Permission to use, copy, modify, and/or distribute this software for any
|
|
225
|
+
purpose with or without fee is hereby granted.
|
|
226
|
+
|
|
227
|
+
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
|
228
|
+
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|
|
229
|
+
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
|
230
|
+
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
|
|
231
|
+
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
|
232
|
+
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
|
233
|
+
PERFORMANCE OF THIS SOFTWARE.
|
|
234
|
+
***************************************************************************** */
|
|
235
|
+
/* global Reflect, Promise */
|
|
236
|
+
var extendStatics = function (d, b) {
|
|
237
|
+
extendStatics = Object.setPrototypeOf ||
|
|
238
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
239
|
+
function (d, b) { for (var p in b)
|
|
240
|
+
if (Object.prototype.hasOwnProperty.call(b, p))
|
|
241
|
+
d[p] = b[p]; };
|
|
242
|
+
return extendStatics(d, b);
|
|
243
|
+
};
|
|
244
|
+
function __extends(d, b) {
|
|
245
|
+
if (typeof b !== "function" && b !== null)
|
|
246
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
247
|
+
extendStatics(d, b);
|
|
248
|
+
function __() { this.constructor = d; }
|
|
249
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
250
|
+
}
|
|
251
|
+
var __assign = function () {
|
|
252
|
+
__assign = Object.assign || function __assign(t) {
|
|
253
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
254
|
+
s = arguments[i];
|
|
255
|
+
for (var p in s)
|
|
256
|
+
if (Object.prototype.hasOwnProperty.call(s, p))
|
|
257
|
+
t[p] = s[p];
|
|
258
|
+
}
|
|
259
|
+
return t;
|
|
260
|
+
};
|
|
261
|
+
return __assign.apply(this, arguments);
|
|
262
|
+
};
|
|
263
|
+
function __rest(s, e) {
|
|
264
|
+
var t = {};
|
|
265
|
+
for (var p in s)
|
|
266
|
+
if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
267
|
+
t[p] = s[p];
|
|
268
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
269
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
270
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
271
|
+
t[p[i]] = s[p[i]];
|
|
272
|
+
}
|
|
273
|
+
return t;
|
|
274
|
+
}
|
|
275
|
+
function __decorate(decorators, target, key, desc) {
|
|
276
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
277
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function")
|
|
278
|
+
r = Reflect.decorate(decorators, target, key, desc);
|
|
279
|
+
else
|
|
280
|
+
for (var i = decorators.length - 1; i >= 0; i--)
|
|
281
|
+
if (d = decorators[i])
|
|
282
|
+
r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
283
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
284
|
+
}
|
|
285
|
+
function __param(paramIndex, decorator) {
|
|
286
|
+
return function (target, key) { decorator(target, key, paramIndex); };
|
|
287
|
+
}
|
|
288
|
+
function __metadata(metadataKey, metadataValue) {
|
|
289
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function")
|
|
290
|
+
return Reflect.metadata(metadataKey, metadataValue);
|
|
291
|
+
}
|
|
292
|
+
function __awaiter(thisArg, _arguments, P, generator) {
|
|
293
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
294
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
295
|
+
function fulfilled(value) { try {
|
|
296
|
+
step(generator.next(value));
|
|
297
|
+
}
|
|
298
|
+
catch (e) {
|
|
299
|
+
reject(e);
|
|
300
|
+
} }
|
|
301
|
+
function rejected(value) { try {
|
|
302
|
+
step(generator["throw"](value));
|
|
303
|
+
}
|
|
304
|
+
catch (e) {
|
|
305
|
+
reject(e);
|
|
306
|
+
} }
|
|
307
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
308
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
309
|
+
});
|
|
310
|
+
}
|
|
311
|
+
function __generator(thisArg, body) {
|
|
312
|
+
var _ = { label: 0, sent: function () { if (t[0] & 1)
|
|
313
|
+
throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
314
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function () { return this; }), g;
|
|
315
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
316
|
+
function step(op) {
|
|
317
|
+
if (f)
|
|
318
|
+
throw new TypeError("Generator is already executing.");
|
|
319
|
+
while (_)
|
|
320
|
+
try {
|
|
321
|
+
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)
|
|
322
|
+
return t;
|
|
323
|
+
if (y = 0, t)
|
|
324
|
+
op = [op[0] & 2, t.value];
|
|
325
|
+
switch (op[0]) {
|
|
326
|
+
case 0:
|
|
327
|
+
case 1:
|
|
328
|
+
t = op;
|
|
329
|
+
break;
|
|
330
|
+
case 4:
|
|
331
|
+
_.label++;
|
|
332
|
+
return { value: op[1], done: false };
|
|
333
|
+
case 5:
|
|
334
|
+
_.label++;
|
|
335
|
+
y = op[1];
|
|
336
|
+
op = [0];
|
|
337
|
+
continue;
|
|
338
|
+
case 7:
|
|
339
|
+
op = _.ops.pop();
|
|
340
|
+
_.trys.pop();
|
|
341
|
+
continue;
|
|
342
|
+
default:
|
|
343
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) {
|
|
344
|
+
_ = 0;
|
|
345
|
+
continue;
|
|
346
|
+
}
|
|
347
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) {
|
|
348
|
+
_.label = op[1];
|
|
349
|
+
break;
|
|
350
|
+
}
|
|
351
|
+
if (op[0] === 6 && _.label < t[1]) {
|
|
352
|
+
_.label = t[1];
|
|
353
|
+
t = op;
|
|
354
|
+
break;
|
|
355
|
+
}
|
|
356
|
+
if (t && _.label < t[2]) {
|
|
357
|
+
_.label = t[2];
|
|
358
|
+
_.ops.push(op);
|
|
359
|
+
break;
|
|
360
|
+
}
|
|
361
|
+
if (t[2])
|
|
362
|
+
_.ops.pop();
|
|
363
|
+
_.trys.pop();
|
|
364
|
+
continue;
|
|
365
|
+
}
|
|
366
|
+
op = body.call(thisArg, _);
|
|
367
|
+
}
|
|
368
|
+
catch (e) {
|
|
369
|
+
op = [6, e];
|
|
370
|
+
y = 0;
|
|
371
|
+
}
|
|
372
|
+
finally {
|
|
373
|
+
f = t = 0;
|
|
374
|
+
}
|
|
375
|
+
if (op[0] & 5)
|
|
376
|
+
throw op[1];
|
|
377
|
+
return { value: op[0] ? op[1] : void 0, done: true };
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
var __createBinding = Object.create ? (function (o, m, k, k2) {
|
|
381
|
+
if (k2 === undefined)
|
|
382
|
+
k2 = k;
|
|
383
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function () { return m[k]; } });
|
|
384
|
+
}) : (function (o, m, k, k2) {
|
|
385
|
+
if (k2 === undefined)
|
|
386
|
+
k2 = k;
|
|
387
|
+
o[k2] = m[k];
|
|
388
|
+
});
|
|
389
|
+
function __exportStar(m, o) {
|
|
390
|
+
for (var p in m)
|
|
391
|
+
if (p !== "default" && !Object.prototype.hasOwnProperty.call(o, p))
|
|
392
|
+
__createBinding(o, m, p);
|
|
393
|
+
}
|
|
394
|
+
function __values(o) {
|
|
395
|
+
var s = typeof Symbol === "function" && Symbol.iterator, m = s && o[s], i = 0;
|
|
396
|
+
if (m)
|
|
397
|
+
return m.call(o);
|
|
398
|
+
if (o && typeof o.length === "number")
|
|
399
|
+
return {
|
|
400
|
+
next: function () {
|
|
401
|
+
if (o && i >= o.length)
|
|
402
|
+
o = void 0;
|
|
403
|
+
return { value: o && o[i++], done: !o };
|
|
404
|
+
}
|
|
405
|
+
};
|
|
406
|
+
throw new TypeError(s ? "Object is not iterable." : "Symbol.iterator is not defined.");
|
|
407
|
+
}
|
|
408
|
+
function __read(o, n) {
|
|
409
|
+
var m = typeof Symbol === "function" && o[Symbol.iterator];
|
|
410
|
+
if (!m)
|
|
411
|
+
return o;
|
|
412
|
+
var i = m.call(o), r, ar = [], e;
|
|
413
|
+
try {
|
|
414
|
+
while ((n === void 0 || n-- > 0) && !(r = i.next()).done)
|
|
415
|
+
ar.push(r.value);
|
|
416
|
+
}
|
|
417
|
+
catch (error) {
|
|
418
|
+
e = { error: error };
|
|
419
|
+
}
|
|
420
|
+
finally {
|
|
421
|
+
try {
|
|
422
|
+
if (r && !r.done && (m = i["return"]))
|
|
423
|
+
m.call(i);
|
|
424
|
+
}
|
|
425
|
+
finally {
|
|
426
|
+
if (e)
|
|
427
|
+
throw e.error;
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
return ar;
|
|
431
|
+
}
|
|
432
|
+
/** @deprecated */
|
|
433
|
+
function __spread() {
|
|
434
|
+
for (var ar = [], i = 0; i < arguments.length; i++)
|
|
435
|
+
ar = ar.concat(__read(arguments[i]));
|
|
436
|
+
return ar;
|
|
437
|
+
}
|
|
438
|
+
/** @deprecated */
|
|
439
|
+
function __spreadArrays() {
|
|
440
|
+
for (var s = 0, i = 0, il = arguments.length; i < il; i++)
|
|
441
|
+
s += arguments[i].length;
|
|
442
|
+
for (var r = Array(s), k = 0, i = 0; i < il; i++)
|
|
443
|
+
for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)
|
|
444
|
+
r[k] = a[j];
|
|
445
|
+
return r;
|
|
446
|
+
}
|
|
447
|
+
function __spreadArray(to, from, pack) {
|
|
448
|
+
if (pack || arguments.length === 2)
|
|
449
|
+
for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
450
|
+
if (ar || !(i in from)) {
|
|
451
|
+
if (!ar)
|
|
452
|
+
ar = Array.prototype.slice.call(from, 0, i);
|
|
453
|
+
ar[i] = from[i];
|
|
454
|
+
}
|
|
455
|
+
}
|
|
456
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
457
|
+
}
|
|
458
|
+
function __await(v) {
|
|
459
|
+
return this instanceof __await ? (this.v = v, this) : new __await(v);
|
|
460
|
+
}
|
|
461
|
+
function __asyncGenerator(thisArg, _arguments, generator) {
|
|
462
|
+
if (!Symbol.asyncIterator)
|
|
463
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
464
|
+
var g = generator.apply(thisArg, _arguments || []), i, q = [];
|
|
465
|
+
return i = {}, verb("next"), verb("throw"), verb("return"), i[Symbol.asyncIterator] = function () { return this; }, i;
|
|
466
|
+
function verb(n) { if (g[n])
|
|
467
|
+
i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }
|
|
468
|
+
function resume(n, v) { try {
|
|
469
|
+
step(g[n](v));
|
|
470
|
+
}
|
|
471
|
+
catch (e) {
|
|
472
|
+
settle(q[0][3], e);
|
|
473
|
+
} }
|
|
474
|
+
function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }
|
|
475
|
+
function fulfill(value) { resume("next", value); }
|
|
476
|
+
function reject(value) { resume("throw", value); }
|
|
477
|
+
function settle(f, v) { if (f(v), q.shift(), q.length)
|
|
478
|
+
resume(q[0][0], q[0][1]); }
|
|
479
|
+
}
|
|
480
|
+
function __asyncDelegator(o) {
|
|
481
|
+
var i, p;
|
|
482
|
+
return i = {}, verb("next"), verb("throw", function (e) { throw e; }), verb("return"), i[Symbol.iterator] = function () { return this; }, i;
|
|
483
|
+
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; }
|
|
484
|
+
}
|
|
485
|
+
function __asyncValues(o) {
|
|
486
|
+
if (!Symbol.asyncIterator)
|
|
487
|
+
throw new TypeError("Symbol.asyncIterator is not defined.");
|
|
488
|
+
var m = o[Symbol.asyncIterator], i;
|
|
489
|
+
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);
|
|
490
|
+
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); }); }; }
|
|
491
|
+
function settle(resolve, reject, d, v) { Promise.resolve(v).then(function (v) { resolve({ value: v, done: d }); }, reject); }
|
|
492
|
+
}
|
|
493
|
+
function __makeTemplateObject(cooked, raw) {
|
|
494
|
+
if (Object.defineProperty) {
|
|
495
|
+
Object.defineProperty(cooked, "raw", { value: raw });
|
|
496
|
+
}
|
|
497
|
+
else {
|
|
498
|
+
cooked.raw = raw;
|
|
499
|
+
}
|
|
500
|
+
return cooked;
|
|
501
|
+
}
|
|
502
|
+
;
|
|
503
|
+
var __setModuleDefault = Object.create ? (function (o, v) {
|
|
504
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
505
|
+
}) : function (o, v) {
|
|
506
|
+
o["default"] = v;
|
|
507
|
+
};
|
|
508
|
+
function __importStar(mod) {
|
|
509
|
+
if (mod && mod.__esModule)
|
|
510
|
+
return mod;
|
|
511
|
+
var result = {};
|
|
512
|
+
if (mod != null)
|
|
513
|
+
for (var k in mod)
|
|
514
|
+
if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k))
|
|
515
|
+
__createBinding(result, mod, k);
|
|
516
|
+
__setModuleDefault(result, mod);
|
|
517
|
+
return result;
|
|
518
|
+
}
|
|
519
|
+
function __importDefault(mod) {
|
|
520
|
+
return (mod && mod.__esModule) ? mod : { default: mod };
|
|
521
|
+
}
|
|
522
|
+
function __classPrivateFieldGet(receiver, state, kind, f) {
|
|
523
|
+
if (kind === "a" && !f)
|
|
524
|
+
throw new TypeError("Private accessor was defined without a getter");
|
|
525
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
526
|
+
throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
|
527
|
+
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
|
528
|
+
}
|
|
529
|
+
function __classPrivateFieldSet(receiver, state, value, kind, f) {
|
|
530
|
+
if (kind === "m")
|
|
531
|
+
throw new TypeError("Private method is not writable");
|
|
532
|
+
if (kind === "a" && !f)
|
|
533
|
+
throw new TypeError("Private accessor was defined without a setter");
|
|
534
|
+
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver))
|
|
535
|
+
throw new TypeError("Cannot write private member to an object whose class did not declare it");
|
|
536
|
+
return (kind === "a" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;
|
|
537
|
+
}
|
|
538
|
+
|
|
221
539
|
function parseAffixHorizontalAlignment$1(alignment) {
|
|
222
540
|
switch (alignment) {
|
|
223
541
|
case 'center':
|
|
@@ -232,6 +550,7 @@
|
|
|
232
550
|
}
|
|
233
551
|
}
|
|
234
552
|
|
|
553
|
+
var _SkyDropdownComponent_positionTimeout;
|
|
235
554
|
/**
|
|
236
555
|
* Creates a dropdown menu that displays menu items that users may select.
|
|
237
556
|
*/
|
|
@@ -250,6 +569,7 @@
|
|
|
250
569
|
this.isVisible = false;
|
|
251
570
|
this.ngUnsubscribe = new rxjs.Subject();
|
|
252
571
|
this._isOpen = false;
|
|
572
|
+
_SkyDropdownComponent_positionTimeout.set(this, void 0);
|
|
253
573
|
}
|
|
254
574
|
Object.defineProperty(SkyDropdownComponent.prototype, "buttonStyle", {
|
|
255
575
|
get: function () {
|
|
@@ -369,7 +689,7 @@
|
|
|
369
689
|
if (value) {
|
|
370
690
|
this._menuContainerElementRef = value;
|
|
371
691
|
this.destroyAffixer();
|
|
372
|
-
this.createAffixer();
|
|
692
|
+
this.createAffixer(value);
|
|
373
693
|
this.changeDetector.markForCheck();
|
|
374
694
|
}
|
|
375
695
|
},
|
|
@@ -393,10 +713,9 @@
|
|
|
393
713
|
SkyDropdownComponent.prototype.ngOnDestroy = function () {
|
|
394
714
|
this.destroyAffixer();
|
|
395
715
|
this.destroyOverlay();
|
|
396
|
-
clearTimeout(this
|
|
716
|
+
clearTimeout(__classPrivateFieldGet(this, _SkyDropdownComponent_positionTimeout, "f"));
|
|
397
717
|
this.ngUnsubscribe.next();
|
|
398
718
|
this.ngUnsubscribe.complete();
|
|
399
|
-
this.ngUnsubscribe = undefined;
|
|
400
719
|
};
|
|
401
720
|
SkyDropdownComponent.prototype.addEventListeners = function () {
|
|
402
721
|
var _this = this;
|
|
@@ -511,9 +830,9 @@
|
|
|
511
830
|
this.overlay = undefined;
|
|
512
831
|
}
|
|
513
832
|
};
|
|
514
|
-
SkyDropdownComponent.prototype.createAffixer = function () {
|
|
833
|
+
SkyDropdownComponent.prototype.createAffixer = function (menuContainerElementRef) {
|
|
515
834
|
var _this = this;
|
|
516
|
-
var affixer = this.affixService.createAffixer(
|
|
835
|
+
var affixer = this.affixService.createAffixer(menuContainerElementRef);
|
|
517
836
|
affixer.placementChange
|
|
518
837
|
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
519
838
|
.subscribe(function (change) {
|
|
@@ -557,7 +876,7 @@
|
|
|
557
876
|
this.changeDetector.markForCheck();
|
|
558
877
|
// Explicitly declare the `setTimeout` from the `window` object in order to use the DOM typings
|
|
559
878
|
// during a unit test (instead of confusing this with Node's `setTimeout`).
|
|
560
|
-
this
|
|
879
|
+
__classPrivateFieldSet(this, _SkyDropdownComponent_positionTimeout, window.setTimeout(function () {
|
|
561
880
|
_this.affixer.affixTo(_this.triggerButton.nativeElement, {
|
|
562
881
|
autoFitContext: i1.SkyAffixAutoFitContext.Viewport,
|
|
563
882
|
enableAutoFit: true,
|
|
@@ -567,10 +886,11 @@
|
|
|
567
886
|
});
|
|
568
887
|
_this.isVisible = true;
|
|
569
888
|
_this.changeDetector.markForCheck();
|
|
570
|
-
});
|
|
889
|
+
}), "f");
|
|
571
890
|
};
|
|
572
891
|
return SkyDropdownComponent;
|
|
573
892
|
}());
|
|
893
|
+
_SkyDropdownComponent_positionTimeout = new WeakMap();
|
|
574
894
|
SkyDropdownComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyDropdownComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i1__namespace.SkyAffixService }, { token: i1__namespace.SkyOverlayService }, { token: i2__namespace.SkyThemeService, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
575
895
|
SkyDropdownComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyDropdownComponent, selector: "sky-dropdown", inputs: { buttonStyle: "buttonStyle", buttonType: "buttonType", disabled: "disabled", dismissOnBlur: "dismissOnBlur", label: "label", horizontalAlignment: "horizontalAlignment", messageStream: "messageStream", title: "title", trigger: "trigger" }, viewQueries: [{ propertyName: "menuContainerElementRef", first: true, predicate: ["menuContainerElementRef"], descendants: true, read: i0.ElementRef }, { propertyName: "menuContainerTemplateRef", first: true, predicate: ["menuContainerTemplateRef"], descendants: true, read: i0.TemplateRef, static: true }, { propertyName: "triggerButton", first: true, predicate: ["triggerButton"], descendants: true, read: i0.ElementRef, static: true }], ngImport: i0__namespace, template: "<div class=\"sky-dropdown\">\n <button\n class=\"sky-btn sky-dropdown-button\"\n type=\"button\"\n [attr.aria-expanded]=\"isOpen\"\n [attr.aria-controls]=\"isOpen ? menuId : null\"\n [attr.aria-haspopup]=\"menuAriaRole\"\n [attr.aria-label]=\"\n label || ('skyux_dropdown_context_menu_default_label' | skyLibResources)\n \"\n [attr.title]=\"title\"\n [disabled]=\"disabled\"\n [ngClass]=\"[\n 'sky-dropdown-button-type-' + buttonType,\n 'sky-btn-' + buttonStyle\n ]\"\n #triggerButton\n >\n <ng-container [ngSwitch]=\"buttonType\">\n <ng-template ngSwitchCase=\"context-menu\">\n <sky-icon *skyThemeIf=\"'default'\" icon=\"ellipsis-h\"></sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n icon=\"ellipsis\"\n iconType=\"skyux\"\n ></sky-icon>\n </ng-template>\n\n <ng-template ngSwitchDefault>\n <div\n *ngIf=\"buttonType === 'select' || buttonType === 'tab' || !buttonType\"\n class=\"sky-dropdown-button-container\"\n >\n <div class=\"sky-dropdown-button-content-container\">\n <ng-content select=\"sky-dropdown-button\"> </ng-content>\n </div>\n <div class=\"sky-dropdown-button-icon-container\">\n <sky-icon\n *skyThemeIf=\"'default'\"\n class=\"sky-dropdown-caret\"\n icon=\"caret-down\"\n >\n </sky-icon>\n <sky-icon\n *skyThemeIf=\"'modern'\"\n class=\"sky-dropdown-caret\"\n icon=\"chevron-down\"\n iconType=\"skyux\"\n >\n </sky-icon>\n </div>\n </div>\n <div\n *ngIf=\"buttonType !== 'select' && buttonType !== 'tab' && buttonType\"\n >\n <sky-icon [icon]=\"buttonType\" size=\"lg\"></sky-icon>\n </div>\n </ng-template>\n </ng-container>\n </button>\n</div>\n\n<ng-template #menuContainerTemplateRef>\n <div\n class=\"sky-dropdown-menu-container\"\n [class.hidden]=\"!isVisible\"\n #menuContainerElementRef\n >\n <ng-content select=\"sky-dropdown-menu\"></ng-content>\n </div>\n</ng-template>\n", styles: [".sky-dropdown-button-type-tab{background-color:transparent;border:none;border-radius:4px 4px 0 0;color:#686c73;cursor:pointer;display:inline-block;font-weight:600;line-height:1.8;padding:8px 16px;background-color:#0974a1;color:#fff;max-width:100%;text-align:left}.sky-dropdown-button-type-tab:hover:not(.sky-btn-tab-disabled){background-color:#eeeeef;color:#212327;text-decoration:none}.sky-dropdown-button-type-tab.sky-btn-tab-disabled{background-color:#cdcfd2;cursor:default;outline:none;text-decoration:none}.sky-dropdown-button-type-tab.sky-btn-tab-disabled:hover{color:#686c73;cursor:default;text-decoration:none}.sky-dropdown-button-type-tab:hover:not(.sky-btn-tab-disabled){background-color:#0974a1;color:#fff}.sky-dropdown-button-type-context-menu{border-radius:50%;padding:3px 8px}.sky-dropdown-caret{margin-left:10px}.sky-dropdown-button-container{display:flex}.sky-dropdown-button-content-container{flex-shrink:1;overflow:hidden;text-overflow:ellipsis}.sky-dropdown-button-icon-container{flex-grow:1}.sky-dropdown-menu-container{position:fixed}.hidden{visibility:hidden}:host-context(.sky-theme-modern) .sky-dropdown-button-type-tab{border:none;border-radius:0;font-weight:400;padding:10px 15px;transition:box-shadow .15s;background-color:transparent;color:#212327}:host-context(.sky-theme-modern) .sky-dropdown-button-type-tab:hover:not(.sky-btn-tab-disabled):not(.sky-btn-tab-selected):not(.sky-dropdown-button-type-tab):not(:focus){background-color:transparent;border-bottom:solid 1px #00b4f1;padding-bottom:9px}:host-context(.sky-theme-modern) .sky-dropdown-button-type-tab:focus{background-color:transparent;outline:none}:host-context(.sky-theme-modern) .sky-dropdown-button-type-tab:focus:not(:active){outline:solid 2px #1870B8;outline-offset:-2px;box-shadow:0 1px 8px #0000004d}:host-context(.sky-theme-modern) .sky-dropdown-button-type-tab:active{border-bottom:solid 3px #00b4f1;padding-bottom:7px}:host-context(.sky-theme-modern) .sky-dropdown-button-type-tab:not(:active){border-bottom:solid 3px #1870B8;padding-bottom:7px}:host-context(.sky-theme-modern) .sky-dropdown-button-type-tab:hover:not(.sky-btn-tab-disabled){background-color:transparent;color:#212327}:host-context(.sky-theme-modern) .sky-dropdown-button-type-tab .sky-btn-tab-close,:host-context(.sky-theme-modern) .sky-dropdown-button-type-tab .sky-tab-header-count{color:#686c73}:host-context(.sky-theme-modern) .sky-dropdown-caret{margin-left:10px}.sky-theme-modern .sky-dropdown-button-type-tab{border:none;border-radius:0;font-weight:400;padding:10px 15px;transition:box-shadow .15s;background-color:transparent;color:#212327}.sky-theme-modern .sky-dropdown-button-type-tab:hover:not(.sky-btn-tab-disabled):not(.sky-btn-tab-selected):not(.sky-dropdown-button-type-tab):not(:focus){background-color:transparent;border-bottom:solid 1px #00b4f1;padding-bottom:9px}.sky-theme-modern .sky-dropdown-button-type-tab:focus{background-color:transparent;outline:none}.sky-theme-modern .sky-dropdown-button-type-tab:focus:not(:active){outline:solid 2px #1870B8;outline-offset:-2px;box-shadow:0 1px 8px #0000004d}.sky-theme-modern .sky-dropdown-button-type-tab:active{border-bottom:solid 3px #00b4f1;padding-bottom:7px}.sky-theme-modern .sky-dropdown-button-type-tab:not(:active){border-bottom:solid 3px #1870B8;padding-bottom:7px}.sky-theme-modern .sky-dropdown-button-type-tab:hover:not(.sky-btn-tab-disabled){background-color:transparent;color:#212327}.sky-theme-modern .sky-dropdown-button-type-tab .sky-btn-tab-close,.sky-theme-modern .sky-dropdown-button-type-tab .sky-tab-header-count{color:#686c73}.sky-theme-modern .sky-dropdown-caret{margin-left:10px}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-dropdown-button-type-tab{color:#fff}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-dropdown-button-type-tab:hover{color:#fff}:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-dropdown-button-type-tab .sky-btn-tab-close,:host-context(.sky-theme-modern.sky-theme-mode-dark) .sky-dropdown-button-type-tab .sky-tab-header-count{color:#efefef}.sky-theme-modern.sky-theme-mode-dark .sky-dropdown-button-type-tab{color:#fff}.sky-theme-modern.sky-theme-mode-dark .sky-dropdown-button-type-tab:hover{color:#fff}.sky-theme-modern.sky-theme-mode-dark .sky-dropdown-button-type-tab .sky-btn-tab-close,.sky-theme-modern.sky-theme-mode-dark .sky-dropdown-button-type-tab .sky-tab-header-count{color:#efefef}\n"], components: [{ type: i3__namespace.λ4, selector: "sky-icon", inputs: ["icon", "iconType", "size", "fixedWidth", "variant"] }], directives: [{ type: i4__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i4__namespace.NgSwitch, selector: "[ngSwitch]", inputs: ["ngSwitch"] }, { type: i4__namespace.NgSwitchCase, selector: "[ngSwitchCase]", inputs: ["ngSwitchCase"] }, { type: i2__namespace.λ3, selector: "[skyThemeIf]", inputs: ["skyThemeIf"] }, { type: i4__namespace.NgSwitchDefault, selector: "[ngSwitchDefault]" }, { type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], pipes: { "skyLibResources": i5__namespace.SkyLibResourcesPipe }, changeDetection: i0__namespace.ChangeDetectionStrategy.OnPush });
|
|
576
896
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyDropdownComponent, decorators: [{
|
|
@@ -762,7 +1082,6 @@
|
|
|
762
1082
|
SkyDropdownMenuComponent.prototype.ngOnDestroy = function () {
|
|
763
1083
|
this.ngUnsubscribe.next();
|
|
764
1084
|
this.ngUnsubscribe.complete();
|
|
765
|
-
this.ngUnsubscribe = undefined;
|
|
766
1085
|
};
|
|
767
1086
|
SkyDropdownMenuComponent.prototype.focusFirstItem = function () {
|
|
768
1087
|
if (!this.hasFocusableItems) {
|
|
@@ -834,9 +1153,7 @@
|
|
|
834
1153
|
});
|
|
835
1154
|
};
|
|
836
1155
|
SkyDropdownMenuComponent.prototype.getItemByIndex = function (index) {
|
|
837
|
-
return this.menuItems.find(function (
|
|
838
|
-
return i === index;
|
|
839
|
-
});
|
|
1156
|
+
return this.menuItems.find(function (_, i) { return i === index; });
|
|
840
1157
|
};
|
|
841
1158
|
SkyDropdownMenuComponent.prototype.selectItemByEventTarget = function (target) {
|
|
842
1159
|
var _this = this;
|
|
@@ -1147,7 +1464,7 @@
|
|
|
1147
1464
|
this.dismissOnBlur = true;
|
|
1148
1465
|
this.enableAnimations = true;
|
|
1149
1466
|
this.isOpen = false;
|
|
1150
|
-
this.
|
|
1467
|
+
this.placement = null;
|
|
1151
1468
|
this.ngUnsubscribe = new rxjs.Subject();
|
|
1152
1469
|
this._closed = new rxjs.Subject();
|
|
1153
1470
|
this._isMouseEnter = new rxjs.Subject();
|
|
@@ -1183,9 +1500,7 @@
|
|
|
1183
1500
|
});
|
|
1184
1501
|
SkyPopoverContentComponent.prototype.ngOnInit = function () {
|
|
1185
1502
|
var _this = this;
|
|
1186
|
-
|
|
1187
|
-
/*istanbul ignore next*/
|
|
1188
|
-
this.contentTarget.createEmbeddedView((_a = this.context) === null || _a === void 0 ? void 0 : _a.contentTemplateRef);
|
|
1503
|
+
this.contentTarget.createEmbeddedView(this.context.contentTemplateRef);
|
|
1189
1504
|
this.addEventListeners();
|
|
1190
1505
|
/*istanbul ignore else*/
|
|
1191
1506
|
if (this.themeSvc) {
|
|
@@ -1207,27 +1522,19 @@
|
|
|
1207
1522
|
/* istanbul ignore else */
|
|
1208
1523
|
if (this.affixer) {
|
|
1209
1524
|
this.affixer.destroy();
|
|
1525
|
+
this.affixer = undefined;
|
|
1210
1526
|
}
|
|
1211
|
-
this._closed =
|
|
1212
|
-
this._isMouseEnter =
|
|
1213
|
-
this._opened =
|
|
1214
|
-
this.affixer =
|
|
1215
|
-
this.ngUnsubscribe =
|
|
1216
|
-
undefined;
|
|
1217
1527
|
};
|
|
1218
1528
|
SkyPopoverContentComponent.prototype.onAnimationEvent = function (event) {
|
|
1219
|
-
var _a, _b;
|
|
1220
1529
|
if (event.fromState === 'void') {
|
|
1221
1530
|
return;
|
|
1222
1531
|
}
|
|
1223
1532
|
if (event.phaseName === 'done') {
|
|
1224
1533
|
if (event.toState === 'open') {
|
|
1225
|
-
|
|
1226
|
-
(_a = this._opened) === null || _a === void 0 ? void 0 : _a.next();
|
|
1534
|
+
this._opened.next();
|
|
1227
1535
|
}
|
|
1228
1536
|
else {
|
|
1229
|
-
|
|
1230
|
-
(_b = this._closed) === null || _b === void 0 ? void 0 : _b.next();
|
|
1537
|
+
this._closed.next();
|
|
1231
1538
|
}
|
|
1232
1539
|
}
|
|
1233
1540
|
};
|
|
@@ -1239,9 +1546,7 @@
|
|
|
1239
1546
|
this.horizontalAlignment = config.horizontalAlignment;
|
|
1240
1547
|
this.placement = config.placement;
|
|
1241
1548
|
this.popoverTitle = config.popoverTitle;
|
|
1242
|
-
|
|
1243
|
-
this.popoverType = config.popoverType;
|
|
1244
|
-
}
|
|
1549
|
+
this.popoverType = config.popoverType;
|
|
1245
1550
|
this.changeDetector.markForCheck();
|
|
1246
1551
|
// Indicates if the popover should be displayed statically.
|
|
1247
1552
|
// Please note: This feature is internal-only and used by the visual tests to capture multiple
|
|
@@ -1254,11 +1559,7 @@
|
|
|
1254
1559
|
}
|
|
1255
1560
|
// Let the styles render before gauging the affix dimensions.
|
|
1256
1561
|
setTimeout(function () {
|
|
1257
|
-
|
|
1258
|
-
/*istanbul ignore next*/
|
|
1259
|
-
if (!((_a = _this.popoverRef) === null || _a === void 0 ? void 0 : _a.nativeElement) ||
|
|
1260
|
-
!_this.ngUnsubscribe ||
|
|
1261
|
-
_this.ngUnsubscribe.isStopped) {
|
|
1562
|
+
if (!_this.popoverRef.nativeElement || _this.ngUnsubscribe.isStopped) {
|
|
1262
1563
|
return;
|
|
1263
1564
|
}
|
|
1264
1565
|
if (!_this.affixer) {
|
|
@@ -1271,18 +1572,11 @@
|
|
|
1271
1572
|
isSticky: true,
|
|
1272
1573
|
placement: parseAffixPlacement(_this.placement),
|
|
1273
1574
|
};
|
|
1274
|
-
// Ensure
|
|
1275
|
-
// are the default alignments for all popovers but ensure that we are future proof here.
|
|
1575
|
+
// Ensure vertical alignment is set according to the popover's placement value.
|
|
1276
1576
|
if (affixOptions.placement === 'left' ||
|
|
1277
1577
|
affixOptions.placement === 'right') {
|
|
1278
1578
|
affixOptions.verticalAlignment = 'middle';
|
|
1279
1579
|
}
|
|
1280
|
-
else if (affixOptions.placement === 'above') {
|
|
1281
|
-
affixOptions.verticalAlignment = 'bottom';
|
|
1282
|
-
}
|
|
1283
|
-
else {
|
|
1284
|
-
affixOptions.verticalAlignment = 'top';
|
|
1285
|
-
}
|
|
1286
1580
|
_this.affixer.affixTo(_this.caller.nativeElement, affixOptions);
|
|
1287
1581
|
_this.updateArrowOffset();
|
|
1288
1582
|
_this.isOpen = true;
|
|
@@ -1318,13 +1612,15 @@
|
|
|
1318
1612
|
this.affixer = affixer;
|
|
1319
1613
|
};
|
|
1320
1614
|
SkyPopoverContentComponent.prototype.updateArrowOffset = function () {
|
|
1321
|
-
|
|
1322
|
-
|
|
1323
|
-
|
|
1324
|
-
|
|
1325
|
-
|
|
1326
|
-
|
|
1327
|
-
|
|
1615
|
+
if (this.placement) {
|
|
1616
|
+
var _c = this.adapterService.getArrowCoordinates({
|
|
1617
|
+
caller: this.caller,
|
|
1618
|
+
popover: this.popoverRef,
|
|
1619
|
+
popoverArrow: this.arrowRef,
|
|
1620
|
+
}, this.placement, this.themeName), top = _c.top, left = _c.left;
|
|
1621
|
+
this.arrowTop = top;
|
|
1622
|
+
this.arrowLeft = left;
|
|
1623
|
+
}
|
|
1328
1624
|
};
|
|
1329
1625
|
SkyPopoverContentComponent.prototype.isFocusLeavingElement = function (event) {
|
|
1330
1626
|
var focusableItems = this.coreAdapterService.getFocusableChildren(this.elementRef.nativeElement);
|
|
@@ -1374,7 +1670,7 @@
|
|
|
1374
1670
|
};
|
|
1375
1671
|
return SkyPopoverContentComponent;
|
|
1376
1672
|
}());
|
|
1377
|
-
SkyPopoverContentComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPopoverContentComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.ElementRef }, { token: i1__namespace.SkyAffixService }, { token: i1__namespace.SkyCoreAdapterService }, { token: SkyPopoverAdapterService }, { token: SkyPopoverContext
|
|
1673
|
+
SkyPopoverContentComponent.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPopoverContentComponent, deps: [{ token: i0__namespace.ChangeDetectorRef }, { token: i0__namespace.ElementRef }, { token: i1__namespace.SkyAffixService }, { token: i1__namespace.SkyCoreAdapterService }, { token: SkyPopoverAdapterService }, { token: SkyPopoverContext }, { token: i2__namespace.SkyThemeService, optional: true }], target: i0__namespace.ɵɵFactoryTarget.Component });
|
|
1378
1674
|
SkyPopoverContentComponent.ɵcmp = i0__namespace.ɵɵngDeclareComponent({ minVersion: "12.0.0", version: "12.2.16", type: SkyPopoverContentComponent, selector: "sky-popover-content", providers: [SkyPopoverAdapterService], viewQueries: [{ propertyName: "arrowRef", first: true, predicate: ["arrowRef"], descendants: true, read: i0.ElementRef, static: true }, { propertyName: "popoverRef", first: true, predicate: ["popoverRef"], descendants: true, read: i0.ElementRef, static: true }, { propertyName: "contentTarget", first: true, predicate: ["contentTarget"], descendants: true, read: i0.ViewContainerRef, static: true }], ngImport: i0__namespace, template: "<div\n class=\"sky-popover-container sky-popover-max-height\"\n [@.disabled]=\"!enableAnimations\"\n [@skyPopoverAnimation]=\"animationState\"\n [class.sky-popover-hidden]=\"!placement\"\n [ngClass]=\"[\n 'sky-popover-alignment-' + horizontalAlignment,\n 'sky-popover-placement-' + placement,\n 'sky-popover-' + popoverType\n ]\"\n (@skyPopoverAnimation.done)=\"onAnimationEvent($event)\"\n (@skyPopoverAnimation.start)=\"onAnimationEvent($event)\"\n #popoverRef\n>\n <div\n class=\"sky-popover\"\n tabindex=\"-1\"\n [skyThemeClass]=\"{\n 'sky-rounded-corners sky-shadow': 'default',\n 'sky-elevation-4': 'modern'\n }\"\n >\n <header\n *ngIf=\"popoverTitle\"\n class=\"sky-popover-header\"\n [skyThemeClass]=\"{\n 'sky-padding-even-default': 'default',\n 'sky-padding-even-lg sky-margin-stacked-lg': 'modern'\n }\"\n >\n <h1\n *ngIf=\"popoverTitle\"\n class=\"sky-popover-title\"\n [skyThemeClass]=\"{\n 'sky-emphasized': 'default',\n 'sky-font-emphasized': 'modern'\n }\"\n >\n {{ popoverTitle }}\n </h1>\n </header>\n <div\n class=\"sky-popover-body\"\n [skyThemeClass]=\"{\n 'sky-padding-even-default': 'default',\n 'sky-padding-even-lg': 'modern'\n }\"\n >\n <ng-container #contentTarget></ng-container>\n </div>\n <span\n aria-hidden=\"true\"\n class=\"sky-popover-arrow\"\n [style.left.px]=\"arrowLeft\"\n [style.top.px]=\"arrowTop\"\n #arrowRef\n ></span>\n </div>\n</div>\n", styles: [".sky-popover-container{position:fixed;min-width:276px;max-width:276px}.sky-popover-container.sky-popover-hidden{visibility:hidden;opacity:0;pointer-events:none!important}.sky-popover-container.sky-popover-hidden *{pointer-events:none!important}.sky-popover-container.sky-popover-static .sky-popover-arrow{position:absolute}.sky-popover-container:focus{outline:none}@media (max-width: 276px){.sky-popover-container{max-width:100%;min-width:auto}}.sky-popover{background-color:#fff}.sky-popover-header{padding-bottom:0}.sky-popover-header+.sky-popover-body{padding-top:2px}.sky-popover-title{margin:0}.sky-popover-arrow{width:0;height:0;position:fixed;border:10px solid transparent}.sky-popover-placement-above{padding-bottom:10px}.sky-popover-placement-above .sky-popover{border-bottom:10px solid #00b4f1}.sky-popover-placement-above .sky-popover-arrow{border-bottom:0;border-top-color:#00b4f1;bottom:0;left:50%;margin-left:-10px}.sky-popover-placement-above.sky-popover-danger .sky-popover{border-bottom-color:#ef4044}.sky-popover-placement-above.sky-popover-danger .sky-popover-arrow{border-top-color:#ef4044}.sky-popover-placement-below{padding-top:10px}.sky-popover-placement-below .sky-popover{border-top:10px solid #00b4f1}.sky-popover-placement-below .sky-popover-arrow{border-top:0;border-bottom-color:#00b4f1;top:0;left:50%;margin-left:-10px}.sky-popover-placement-below.sky-popover-danger .sky-popover{border-top-color:#ef4044}.sky-popover-placement-below.sky-popover-danger .sky-popover-arrow{border-bottom-color:#ef4044}.sky-popover-placement-right{padding-left:10px}.sky-popover-placement-right .sky-popover{border-left:10px solid #00b4f1}.sky-popover-placement-right .sky-popover-arrow{border-left:0;border-right-color:#00b4f1;left:0;top:50%;margin-top:-10px}.sky-popover-placement-right.sky-popover-danger .sky-popover{border-left-color:#ef4044}.sky-popover-placement-right.sky-popover-danger .sky-popover-arrow{border-right-color:#ef4044}.sky-popover-placement-left{padding-right:10px}.sky-popover-placement-left .sky-popover{border-right:10px solid #00b4f1}.sky-popover-placement-left .sky-popover-arrow{border-right:0;border-left-color:#00b4f1;right:0;top:50%;margin-top:-10px}.sky-popover-placement-left.sky-popover-danger .sky-popover{border-right-color:#ef4044}.sky-popover-placement-left.sky-popover-danger .sky-popover-arrow{border-left-color:#ef4044}.sky-popover-placement-above.sky-popover-alignment-left .sky-popover-arrow,.sky-popover-placement-below.sky-popover-alignment-left .sky-popover-arrow{left:40px;right:auto}.sky-popover-placement-above.sky-popover-alignment-right .sky-popover-arrow,.sky-popover-placement-below.sky-popover-alignment-right .sky-popover-arrow{left:auto;right:40px}.sky-popover-max-height .sky-popover{overflow-y:auto;overflow-x:hidden;min-height:35px;max-height:calc(50vh - 50px)}:host-context(.sky-theme-modern) .sky-popover{border-radius:6px}:host-context(.sky-theme-modern) .sky-popover-arrow{transform:rotate(45deg);border-color:transparent}:host-context(.sky-theme-modern) .sky-popover-placement-above{padding-bottom:10px}:host-context(.sky-theme-modern) .sky-popover-placement-above .sky-popover{border-bottom:6px solid #00b4f1}:host-context(.sky-theme-modern) .sky-popover-placement-above .sky-popover-arrow{bottom:1px;border-radius:0 0 3px;border-bottom:solid 10px #00b4f1;border-right:solid 10px #00b4f1}:host-context(.sky-theme-modern) .sky-popover-placement-above.sky-popover-danger .sky-popover{border-bottom-color:#ef4044}:host-context(.sky-theme-modern) .sky-popover-placement-above.sky-popover-danger .sky-popover-arrow{border-bottom-color:#ef4044;border-right-color:#ef4044;border-top-color:transparent;border-left-color:transparent}:host-context(.sky-theme-modern) .sky-popover-placement-below{padding-top:10px}:host-context(.sky-theme-modern) .sky-popover-placement-below .sky-popover{border-top:6px solid #00b4f1}:host-context(.sky-theme-modern) .sky-popover-placement-below .sky-popover-arrow{top:1px;border-radius:3px 0 0;border-top:solid 10px #00b4f1;border-left:solid 10px #00b4f1}:host-context(.sky-theme-modern) .sky-popover-placement-below.sky-popover-danger .sky-popover{border-top-color:#ef4044}:host-context(.sky-theme-modern) .sky-popover-placement-below.sky-popover-danger .sky-popover-arrow{border-top-color:#ef4044;border-left-color:#ef4044;border-bottom-color:transparent;border-right-color:transparent}:host-context(.sky-theme-modern) .sky-popover-placement-right{padding-left:10px}:host-context(.sky-theme-modern) .sky-popover-placement-right .sky-popover{border-left:6px solid #00b4f1}:host-context(.sky-theme-modern) .sky-popover-placement-right .sky-popover-arrow{left:1px;border-radius:0 0 0 3px;border-bottom:solid 10px #00b4f1;border-left:solid 10px #00b4f1}:host-context(.sky-theme-modern) .sky-popover-placement-right.sky-popover-danger .sky-popover{border-left-color:#ef4044}:host-context(.sky-theme-modern) .sky-popover-placement-right.sky-popover-danger .sky-popover-arrow{border-bottom-color:#ef4044;border-left-color:#ef4044;border-top-color:transparent;border-right-color:transparent}:host-context(.sky-theme-modern) .sky-popover-placement-left{padding-right:10px}:host-context(.sky-theme-modern) .sky-popover-placement-left .sky-popover{border-right:6px solid #00b4f1}:host-context(.sky-theme-modern) .sky-popover-placement-left .sky-popover-arrow{right:1px;border-radius:0 3px 0 0;border-top:solid 10px #00b4f1;border-right:solid 10px #00b4f1}:host-context(.sky-theme-modern) .sky-popover-placement-left.sky-popover-danger .sky-popover{border-right-color:#ef4044}:host-context(.sky-theme-modern) .sky-popover-placement-left.sky-popover-danger .sky-popover-arrow{border-top-color:#ef4044;border-right-color:#ef4044;border-bottom-color:transparent;border-left-color:transparent}.sky-theme-modern .sky-popover{border-radius:6px}.sky-theme-modern .sky-popover-arrow{transform:rotate(45deg);border-color:transparent}.sky-theme-modern .sky-popover-placement-above{padding-bottom:10px}.sky-theme-modern .sky-popover-placement-above .sky-popover{border-bottom:6px solid #00b4f1}.sky-theme-modern .sky-popover-placement-above .sky-popover-arrow{bottom:1px;border-radius:0 0 3px;border-bottom:solid 10px #00b4f1;border-right:solid 10px #00b4f1}.sky-theme-modern .sky-popover-placement-above.sky-popover-danger .sky-popover{border-bottom-color:#ef4044}.sky-theme-modern .sky-popover-placement-above.sky-popover-danger .sky-popover-arrow{border-bottom-color:#ef4044;border-right-color:#ef4044;border-top-color:transparent;border-left-color:transparent}.sky-theme-modern .sky-popover-placement-below{padding-top:10px}.sky-theme-modern .sky-popover-placement-below .sky-popover{border-top:6px solid #00b4f1}.sky-theme-modern .sky-popover-placement-below .sky-popover-arrow{top:1px;border-radius:3px 0 0;border-top:solid 10px #00b4f1;border-left:solid 10px #00b4f1}.sky-theme-modern .sky-popover-placement-below.sky-popover-danger .sky-popover{border-top-color:#ef4044}.sky-theme-modern .sky-popover-placement-below.sky-popover-danger .sky-popover-arrow{border-top-color:#ef4044;border-left-color:#ef4044;border-bottom-color:transparent;border-right-color:transparent}.sky-theme-modern .sky-popover-placement-right{padding-left:10px}.sky-theme-modern .sky-popover-placement-right .sky-popover{border-left:6px solid #00b4f1}.sky-theme-modern .sky-popover-placement-right .sky-popover-arrow{left:1px;border-radius:0 0 0 3px;border-bottom:solid 10px #00b4f1;border-left:solid 10px #00b4f1}.sky-theme-modern .sky-popover-placement-right.sky-popover-danger .sky-popover{border-left-color:#ef4044}.sky-theme-modern .sky-popover-placement-right.sky-popover-danger .sky-popover-arrow{border-bottom-color:#ef4044;border-left-color:#ef4044;border-top-color:transparent;border-right-color:transparent}.sky-theme-modern .sky-popover-placement-left{padding-right:10px}.sky-theme-modern .sky-popover-placement-left .sky-popover{border-right:6px solid #00b4f1}.sky-theme-modern .sky-popover-placement-left .sky-popover-arrow{right:1px;border-radius:0 3px 0 0;border-top:solid 10px #00b4f1;border-right:solid 10px #00b4f1}.sky-theme-modern .sky-popover-placement-left.sky-popover-danger .sky-popover{border-right-color:#ef4044}.sky-theme-modern .sky-popover-placement-left.sky-popover-danger .sky-popover-arrow{border-top-color:#ef4044;border-right-color:#ef4044;border-bottom-color:transparent;border-left-color:transparent}\n"], directives: [{ type: i4__namespace.NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }, { type: i2__namespace.λ2, selector: "[skyThemeClass]", inputs: ["class", "skyThemeClass"] }, { type: i4__namespace.NgIf, selector: "[ngIf]", inputs: ["ngIf", "ngIfThen", "ngIfElse"] }], animations: [skyPopoverAnimation] });
|
|
1379
1675
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPopoverContentComponent, decorators: [{
|
|
1380
1676
|
type: i0.Component,
|
|
@@ -1386,9 +1682,7 @@
|
|
|
1386
1682
|
providers: [SkyPopoverAdapterService],
|
|
1387
1683
|
}]
|
|
1388
1684
|
}], ctorParameters: function () {
|
|
1389
|
-
return [{ type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.ElementRef }, { type: i1__namespace.SkyAffixService }, { type: i1__namespace.SkyCoreAdapterService }, { type: SkyPopoverAdapterService }, { type: SkyPopoverContext, decorators: [{
|
|
1390
|
-
type: i0.Optional
|
|
1391
|
-
}] }, { type: i2__namespace.SkyThemeService, decorators: [{
|
|
1685
|
+
return [{ type: i0__namespace.ChangeDetectorRef }, { type: i0__namespace.ElementRef }, { type: i1__namespace.SkyAffixService }, { type: i1__namespace.SkyCoreAdapterService }, { type: SkyPopoverAdapterService }, { type: SkyPopoverContext }, { type: i2__namespace.SkyThemeService, decorators: [{
|
|
1392
1686
|
type: i0.Optional
|
|
1393
1687
|
}] }];
|
|
1394
1688
|
}, propDecorators: { arrowRef: [{
|
|
@@ -1443,8 +1737,7 @@
|
|
|
1443
1737
|
},
|
|
1444
1738
|
/**
|
|
1445
1739
|
* Specifies the horizontal alignment of the popover in relation to the trigger element.
|
|
1446
|
-
* The `skyPopoverAlignment` property on the popover directive
|
|
1447
|
-
* Options include:`"center"`, `"right"`, and `'"left"`.
|
|
1740
|
+
* The `skyPopoverAlignment` property on the popover directive takes precedence over this property when specified.
|
|
1448
1741
|
* @default "center"
|
|
1449
1742
|
*/
|
|
1450
1743
|
set: function (value) {
|
|
@@ -1477,8 +1770,7 @@
|
|
|
1477
1770
|
},
|
|
1478
1771
|
/**
|
|
1479
1772
|
* Specifies the placement of the popover in relation to the trigger element.
|
|
1480
|
-
* The `skyPopoverPlacement` property on the popover directive
|
|
1481
|
-
* Options include:`"above"`, `"below"`, `"right"`, and `"left"`.
|
|
1773
|
+
* The `skyPopoverPlacement` property on the popover directive takes precedence over this property when specified.
|
|
1482
1774
|
* @default "above"
|
|
1483
1775
|
*/
|
|
1484
1776
|
set: function (value) {
|
|
@@ -1487,10 +1779,23 @@
|
|
|
1487
1779
|
enumerable: false,
|
|
1488
1780
|
configurable: true
|
|
1489
1781
|
});
|
|
1782
|
+
Object.defineProperty(SkyPopoverComponent.prototype, "popoverType", {
|
|
1783
|
+
get: function () {
|
|
1784
|
+
return this._popoverType || 'info';
|
|
1785
|
+
},
|
|
1786
|
+
/**
|
|
1787
|
+
* Specifies the type of popover.
|
|
1788
|
+
* @default "info"
|
|
1789
|
+
*/
|
|
1790
|
+
set: function (value) {
|
|
1791
|
+
this._popoverType = value;
|
|
1792
|
+
},
|
|
1793
|
+
enumerable: false,
|
|
1794
|
+
configurable: true
|
|
1795
|
+
});
|
|
1490
1796
|
SkyPopoverComponent.prototype.ngOnDestroy = function () {
|
|
1491
1797
|
this.ngUnsubscribe.next();
|
|
1492
1798
|
this.ngUnsubscribe.complete();
|
|
1493
|
-
this.ngUnsubscribe = undefined;
|
|
1494
1799
|
if (this.overlay) {
|
|
1495
1800
|
this.overlayService.close(this.overlay);
|
|
1496
1801
|
this.overlay = undefined;
|
|
@@ -1569,7 +1874,7 @@
|
|
|
1569
1874
|
});
|
|
1570
1875
|
contentRef.closed.pipe(operators.takeUntil(this.ngUnsubscribe)).subscribe(function () {
|
|
1571
1876
|
/*istanbul ignore else*/
|
|
1572
|
-
if (_this.isActive) {
|
|
1877
|
+
if (_this.isActive && _this.overlay) {
|
|
1573
1878
|
_this.overlayService.close(_this.overlay);
|
|
1574
1879
|
_this.overlay = undefined;
|
|
1575
1880
|
_this.isActive = false;
|
|
@@ -1644,15 +1949,29 @@
|
|
|
1644
1949
|
SkyPopoverMessageType[SkyPopoverMessageType["Focus"] = 3] = "Focus";
|
|
1645
1950
|
})(exports.SkyPopoverMessageType || (exports.SkyPopoverMessageType = {}));
|
|
1646
1951
|
|
|
1952
|
+
var _SkyPopoverDirective_messageStreamSub;
|
|
1647
1953
|
var SkyPopoverDirective = /** @class */ (function () {
|
|
1648
1954
|
function SkyPopoverDirective(elementRef) {
|
|
1649
1955
|
this.elementRef = elementRef;
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
*/
|
|
1653
|
-
this.skyPopoverMessageStream = new rxjs.Subject();
|
|
1956
|
+
this._skyPopoverMessageStream = new rxjs.Subject();
|
|
1957
|
+
_SkyPopoverDirective_messageStreamSub.set(this, void 0);
|
|
1654
1958
|
this.ngUnsubscribe = new rxjs.Subject();
|
|
1959
|
+
this.subscribeMessageStream();
|
|
1655
1960
|
}
|
|
1961
|
+
Object.defineProperty(SkyPopoverDirective.prototype, "skyPopoverMessageStream", {
|
|
1962
|
+
get: function () {
|
|
1963
|
+
return this._skyPopoverMessageStream;
|
|
1964
|
+
},
|
|
1965
|
+
/**
|
|
1966
|
+
* Provides an RxJS `Subject` to send commands to the popover that respect the `SkyPopoverMessage` type.
|
|
1967
|
+
*/
|
|
1968
|
+
set: function (value) {
|
|
1969
|
+
this._skyPopoverMessageStream = value !== null && value !== void 0 ? value : new rxjs.Subject();
|
|
1970
|
+
this.subscribeMessageStream();
|
|
1971
|
+
},
|
|
1972
|
+
enumerable: false,
|
|
1973
|
+
configurable: true
|
|
1974
|
+
});
|
|
1656
1975
|
Object.defineProperty(SkyPopoverDirective.prototype, "skyPopoverTrigger", {
|
|
1657
1976
|
get: function () {
|
|
1658
1977
|
return this._trigger || 'click';
|
|
@@ -1671,6 +1990,7 @@
|
|
|
1671
1990
|
};
|
|
1672
1991
|
SkyPopoverDirective.prototype.ngOnDestroy = function () {
|
|
1673
1992
|
this.removeEventListeners();
|
|
1993
|
+
this.unsubscribeMessageStream();
|
|
1674
1994
|
};
|
|
1675
1995
|
SkyPopoverDirective.prototype.togglePopover = function () {
|
|
1676
1996
|
if (this.skyPopover.isActive) {
|
|
@@ -1696,11 +2016,6 @@
|
|
|
1696
2016
|
SkyPopoverDirective.prototype.addEventListeners = function () {
|
|
1697
2017
|
var _this = this;
|
|
1698
2018
|
var element = this.elementRef.nativeElement;
|
|
1699
|
-
this.skyPopoverMessageStream
|
|
1700
|
-
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
1701
|
-
.subscribe(function (message) {
|
|
1702
|
-
_this.handleIncomingMessages(message);
|
|
1703
|
-
});
|
|
1704
2019
|
rxjs.fromEvent(element, 'keydown')
|
|
1705
2020
|
.pipe(operators.takeUntil(this.ngUnsubscribe))
|
|
1706
2021
|
.subscribe(function (event) {
|
|
@@ -1771,7 +2086,6 @@
|
|
|
1771
2086
|
SkyPopoverDirective.prototype.removeEventListeners = function () {
|
|
1772
2087
|
this.ngUnsubscribe.next();
|
|
1773
2088
|
this.ngUnsubscribe.complete();
|
|
1774
|
-
this.ngUnsubscribe = undefined;
|
|
1775
2089
|
};
|
|
1776
2090
|
SkyPopoverDirective.prototype.handleIncomingMessages = function (message) {
|
|
1777
2091
|
/* tslint:disable-next-line:switch-default */
|
|
@@ -1799,8 +2113,22 @@
|
|
|
1799
2113
|
SkyPopoverDirective.prototype.sendMessage = function (messageType) {
|
|
1800
2114
|
this.skyPopoverMessageStream.next({ type: messageType });
|
|
1801
2115
|
};
|
|
2116
|
+
SkyPopoverDirective.prototype.subscribeMessageStream = function () {
|
|
2117
|
+
var _this = this;
|
|
2118
|
+
this.unsubscribeMessageStream();
|
|
2119
|
+
__classPrivateFieldSet(this, _SkyPopoverDirective_messageStreamSub, this.skyPopoverMessageStream.subscribe(function (message) {
|
|
2120
|
+
_this.handleIncomingMessages(message);
|
|
2121
|
+
}), "f");
|
|
2122
|
+
};
|
|
2123
|
+
SkyPopoverDirective.prototype.unsubscribeMessageStream = function () {
|
|
2124
|
+
if (__classPrivateFieldGet(this, _SkyPopoverDirective_messageStreamSub, "f")) {
|
|
2125
|
+
__classPrivateFieldGet(this, _SkyPopoverDirective_messageStreamSub, "f").unsubscribe();
|
|
2126
|
+
__classPrivateFieldSet(this, _SkyPopoverDirective_messageStreamSub, undefined, "f");
|
|
2127
|
+
}
|
|
2128
|
+
};
|
|
1802
2129
|
return SkyPopoverDirective;
|
|
1803
2130
|
}());
|
|
2131
|
+
_SkyPopoverDirective_messageStreamSub = new WeakMap();
|
|
1804
2132
|
SkyPopoverDirective.ɵfac = i0__namespace.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPopoverDirective, deps: [{ token: i0__namespace.ElementRef }], target: i0__namespace.ɵɵFactoryTarget.Directive });
|
|
1805
2133
|
SkyPopoverDirective.ɵdir = i0__namespace.ɵɵngDeclareDirective({ minVersion: "12.0.0", version: "12.2.16", type: SkyPopoverDirective, selector: "[skyPopover]", inputs: { skyPopover: "skyPopover", skyPopoverAlignment: "skyPopoverAlignment", skyPopoverMessageStream: "skyPopoverMessageStream", skyPopoverPlacement: "skyPopoverPlacement", skyPopoverTrigger: "skyPopoverTrigger" }, ngImport: i0__namespace });
|
|
1806
2134
|
i0__namespace.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "12.2.16", ngImport: i0__namespace, type: SkyPopoverDirective, decorators: [{
|