@coreui/angular-pro 4.2.27 → 4.2.29
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/esm2020/lib/backdrop/backdrop.service.mjs +8 -2
- package/esm2020/lib/modal/modal/modal.component.mjs +2 -8
- package/esm2020/lib/multi-select/multi-select/multi-select.component.mjs +8 -4
- package/esm2020/lib/multi-select/multi-select-option/multi-select-option.component.mjs +8 -6
- package/esm2020/lib/offcanvas/offcanvas/offcanvas.component.mjs +143 -69
- package/esm2020/lib/sidebar/sidebar/sidebar.component.mjs +2 -2
- package/fesm2015/coreui-angular-pro.mjs +161 -82
- package/fesm2015/coreui-angular-pro.mjs.map +1 -1
- package/fesm2020/coreui-angular-pro.mjs +158 -81
- package/fesm2020/coreui-angular-pro.mjs.map +1 -1
- package/lib/backdrop/backdrop.service.d.ts +2 -1
- package/lib/modal/modal/modal.component.d.ts +0 -1
- package/lib/offcanvas/offcanvas/offcanvas.component.d.ts +28 -16
- package/package.json +1 -1
|
@@ -8457,11 +8457,13 @@ class MultiSelectOptionComponent {
|
|
|
8457
8457
|
return this.selected;
|
|
8458
8458
|
}
|
|
8459
8459
|
onKeyUp($event) {
|
|
8460
|
-
if (
|
|
8461
|
-
$event.
|
|
8462
|
-
|
|
8463
|
-
|
|
8464
|
-
|
|
8460
|
+
if (this.dropdownVisible) {
|
|
8461
|
+
if (['Enter', 'Space'].includes($event.code)) {
|
|
8462
|
+
$event.stopImmediatePropagation();
|
|
8463
|
+
$event.preventDefault();
|
|
8464
|
+
this.selected = this.disabled ? this.selected : !this.selected;
|
|
8465
|
+
this.focus('keyboard');
|
|
8466
|
+
}
|
|
8465
8467
|
}
|
|
8466
8468
|
}
|
|
8467
8469
|
onClick() {
|
|
@@ -8940,8 +8942,13 @@ class MultiSelectComponent {
|
|
|
8940
8942
|
this.selectOptions();
|
|
8941
8943
|
});
|
|
8942
8944
|
this.multiselectVisibleSubscription = this.multiSelectService.multiSelectVisible$.subscribe((visible) => {
|
|
8943
|
-
this.isDropdownVisible
|
|
8944
|
-
|
|
8945
|
+
if (this.isDropdownVisible !== visible) {
|
|
8946
|
+
this.isDropdownVisible = visible;
|
|
8947
|
+
this.visibleChange.emit(visible);
|
|
8948
|
+
if (!visible) {
|
|
8949
|
+
this.setFocus('program', 'multiSelectVisible$');
|
|
8950
|
+
}
|
|
8951
|
+
}
|
|
8945
8952
|
});
|
|
8946
8953
|
this.multiselectStateSubscription = this.multiSelectService.multiSelectState$.subscribe((option) => {
|
|
8947
8954
|
if (option.selected === true && !this.multiple) {
|
|
@@ -8954,7 +8961,6 @@ class MultiSelectComponent {
|
|
|
8954
8961
|
// close dropdown for single select (!multiple)
|
|
8955
8962
|
this.visible = false;
|
|
8956
8963
|
this.searchValue = '';
|
|
8957
|
-
this.setFocus('program', 'multiselectSubscribe');
|
|
8958
8964
|
}
|
|
8959
8965
|
// todo?
|
|
8960
8966
|
// if (!!option) {
|
|
@@ -9794,6 +9800,13 @@ class BackdropService {
|
|
|
9794
9800
|
this.backdropClick$ = this.backdropClick.asObservable();
|
|
9795
9801
|
this.renderer = rendererFactory.createRenderer(null, null);
|
|
9796
9802
|
}
|
|
9803
|
+
get scrollbarWidth() {
|
|
9804
|
+
var _a;
|
|
9805
|
+
// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
|
|
9806
|
+
const documentWidth = this.document.documentElement.clientWidth;
|
|
9807
|
+
const scrollbarWidth = Math.abs(((_a = window === null || window === void 0 ? void 0 : window.innerWidth) !== null && _a !== void 0 ? _a : documentWidth) - documentWidth);
|
|
9808
|
+
return `${scrollbarWidth}px`;
|
|
9809
|
+
}
|
|
9797
9810
|
setBackdrop(type = 'modal') {
|
|
9798
9811
|
const backdropElement = this.renderer.createElement('div');
|
|
9799
9812
|
this.renderer.addClass(backdropElement, `${type}-backdrop`);
|
|
@@ -9830,7 +9843,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
9830
9843
|
providedIn: 'root'
|
|
9831
9844
|
}]
|
|
9832
9845
|
}], ctorParameters: function () {
|
|
9833
|
-
return [{ type:
|
|
9846
|
+
return [{ type: Document, decorators: [{
|
|
9834
9847
|
type: Inject,
|
|
9835
9848
|
args: [DOCUMENT]
|
|
9836
9849
|
}] }, { type: i0.RendererFactory2 }];
|
|
@@ -9935,15 +9948,8 @@ class ModalComponent {
|
|
|
9935
9948
|
set show(value) {
|
|
9936
9949
|
this._show = value;
|
|
9937
9950
|
}
|
|
9938
|
-
get scrollbarWidth() {
|
|
9939
|
-
var _a;
|
|
9940
|
-
// https://developer.mozilla.org/en-US/docs/Web/API/Window/innerWidth#usage_notes
|
|
9941
|
-
const documentWidth = this.document.documentElement.clientWidth;
|
|
9942
|
-
const scrollbarWidth = Math.abs(((_a = window === null || window === void 0 ? void 0 : window.innerWidth) !== null && _a !== void 0 ? _a : documentWidth) - documentWidth);
|
|
9943
|
-
return `${scrollbarWidth}px`;
|
|
9944
|
-
}
|
|
9945
9951
|
animateStart(event) {
|
|
9946
|
-
const scrollbarWidth = this.scrollbarWidth;
|
|
9952
|
+
const scrollbarWidth = this.backdropService.scrollbarWidth;
|
|
9947
9953
|
if (event.toState === 'visible') {
|
|
9948
9954
|
this.renderer.setStyle(this.document.body, 'overflow', 'hidden');
|
|
9949
9955
|
this.renderer.setStyle(this.document.body, 'padding-right', scrollbarWidth);
|
|
@@ -10213,18 +10219,20 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
10213
10219
|
}]
|
|
10214
10220
|
}], ctorParameters: function () { return []; } });
|
|
10215
10221
|
|
|
10222
|
+
var _OffcanvasComponent_scroll, _OffcanvasComponent_visible, _OffcanvasComponent_activeBackdrop, _OffcanvasComponent_scrollbarWidth, _OffcanvasComponent_stateToggleSubscription, _OffcanvasComponent_backdropClickSubscription, _OffcanvasComponent_layoutChangeSubscription, _OffcanvasComponent_show;
|
|
10216
10223
|
let nextId = 0;
|
|
10217
10224
|
class OffcanvasComponent {
|
|
10218
|
-
constructor(document, platformId, renderer, hostElement, offcanvasService, backdropService) {
|
|
10225
|
+
constructor(document, platformId, renderer, hostElement, offcanvasService, backdropService, breakpointObserver) {
|
|
10219
10226
|
this.document = document;
|
|
10220
10227
|
this.platformId = platformId;
|
|
10221
10228
|
this.renderer = renderer;
|
|
10222
10229
|
this.hostElement = hostElement;
|
|
10223
10230
|
this.offcanvasService = offcanvasService;
|
|
10224
10231
|
this.backdropService = backdropService;
|
|
10232
|
+
this.breakpointObserver = breakpointObserver;
|
|
10225
10233
|
/**
|
|
10226
10234
|
* Apply a backdrop on body while offcanvas is open.
|
|
10227
|
-
* @type boolean
|
|
10235
|
+
* @type boolean | 'static'
|
|
10228
10236
|
* @default true
|
|
10229
10237
|
*/
|
|
10230
10238
|
this.backdrop = true;
|
|
@@ -10240,7 +10248,14 @@ class OffcanvasComponent {
|
|
|
10240
10248
|
* @default 'start'
|
|
10241
10249
|
*/
|
|
10242
10250
|
this.placement = 'start';
|
|
10243
|
-
|
|
10251
|
+
/**
|
|
10252
|
+
* Responsive offcanvas property hides content outside the viewport from a specified breakpoint and down.
|
|
10253
|
+
* @type boolean | 'sm' | 'md' | 'lg' | 'xl' | 'xxl';
|
|
10254
|
+
* @default true
|
|
10255
|
+
* @since 4.3.10
|
|
10256
|
+
*/
|
|
10257
|
+
this.responsive = true;
|
|
10258
|
+
_OffcanvasComponent_scroll.set(this, false);
|
|
10244
10259
|
this.id = `offcanvas-${this.placement}-${nextId++}`;
|
|
10245
10260
|
/**
|
|
10246
10261
|
* Default role for offcanvas. [docs]
|
|
@@ -10254,169 +10269,226 @@ class OffcanvasComponent {
|
|
|
10254
10269
|
* @default true
|
|
10255
10270
|
*/
|
|
10256
10271
|
this.ariaModal = true;
|
|
10272
|
+
_OffcanvasComponent_visible.set(this, false);
|
|
10257
10273
|
/**
|
|
10258
10274
|
* Event triggered on visible change.
|
|
10259
10275
|
*/
|
|
10260
10276
|
this.visibleChange = new EventEmitter();
|
|
10277
|
+
_OffcanvasComponent_activeBackdrop.set(this, void 0);
|
|
10278
|
+
_OffcanvasComponent_scrollbarWidth.set(this, void 0);
|
|
10279
|
+
_OffcanvasComponent_stateToggleSubscription.set(this, void 0);
|
|
10280
|
+
_OffcanvasComponent_backdropClickSubscription.set(this, void 0);
|
|
10281
|
+
_OffcanvasComponent_layoutChangeSubscription.set(this, void 0);
|
|
10282
|
+
_OffcanvasComponent_show.set(this, false);
|
|
10261
10283
|
}
|
|
10262
10284
|
/**
|
|
10263
10285
|
* Allow body scrolling while offcanvas is visible.
|
|
10264
10286
|
* @type boolean
|
|
10287
|
+
* @default false
|
|
10265
10288
|
*/
|
|
10266
10289
|
set scroll(value) {
|
|
10267
|
-
this
|
|
10290
|
+
__classPrivateFieldSet(this, _OffcanvasComponent_scroll, coerceBooleanProperty(value), "f");
|
|
10268
10291
|
}
|
|
10269
|
-
;
|
|
10270
10292
|
get scroll() {
|
|
10271
|
-
return this
|
|
10293
|
+
return __classPrivateFieldGet(this, _OffcanvasComponent_scroll, "f");
|
|
10272
10294
|
}
|
|
10273
10295
|
/**
|
|
10274
10296
|
* Toggle the visibility of offcanvas component.
|
|
10275
10297
|
* @type boolean
|
|
10298
|
+
* @default false
|
|
10276
10299
|
*/
|
|
10277
10300
|
set visible(value) {
|
|
10278
|
-
this
|
|
10279
|
-
if (
|
|
10301
|
+
__classPrivateFieldSet(this, _OffcanvasComponent_visible, coerceBooleanProperty(value), "f");
|
|
10302
|
+
if (__classPrivateFieldGet(this, _OffcanvasComponent_visible, "f")) {
|
|
10280
10303
|
this.setBackdrop(this.backdrop);
|
|
10281
10304
|
this.setFocus();
|
|
10282
10305
|
}
|
|
10283
10306
|
else {
|
|
10284
10307
|
this.setBackdrop(false);
|
|
10285
10308
|
}
|
|
10286
|
-
this.
|
|
10309
|
+
this.layoutChangeSubscribe(__classPrivateFieldGet(this, _OffcanvasComponent_visible, "f"));
|
|
10287
10310
|
this.visibleChange.emit(value);
|
|
10288
10311
|
}
|
|
10289
10312
|
get visible() {
|
|
10290
|
-
return this
|
|
10313
|
+
return __classPrivateFieldGet(this, _OffcanvasComponent_visible, "f");
|
|
10291
10314
|
}
|
|
10292
10315
|
get hostClasses() {
|
|
10293
10316
|
return {
|
|
10294
|
-
offcanvas:
|
|
10317
|
+
offcanvas: typeof this.responsive === 'boolean',
|
|
10318
|
+
[`offcanvas-${this.responsive}`]: typeof this.responsive !== 'boolean',
|
|
10295
10319
|
[`offcanvas-${this.placement}`]: !!this.placement,
|
|
10296
|
-
show: this.
|
|
10320
|
+
show: this.show
|
|
10297
10321
|
};
|
|
10298
10322
|
}
|
|
10299
10323
|
get ariaHidden() {
|
|
10300
10324
|
return this.visible ? null : true;
|
|
10301
10325
|
}
|
|
10302
|
-
;
|
|
10303
10326
|
get tabIndex() {
|
|
10304
10327
|
return '-1';
|
|
10305
10328
|
}
|
|
10306
|
-
get
|
|
10307
|
-
return this.visible;
|
|
10329
|
+
get animateTrigger() {
|
|
10330
|
+
return this.visible ? 'visible' : 'hidden';
|
|
10331
|
+
}
|
|
10332
|
+
get show() {
|
|
10333
|
+
return this.visible && __classPrivateFieldGet(this, _OffcanvasComponent_show, "f");
|
|
10334
|
+
}
|
|
10335
|
+
set show(value) {
|
|
10336
|
+
__classPrivateFieldSet(this, _OffcanvasComponent_show, value, "f");
|
|
10337
|
+
}
|
|
10338
|
+
animateStart(event) {
|
|
10339
|
+
const scrollbarWidth = __classPrivateFieldGet(this, _OffcanvasComponent_scrollbarWidth, "f");
|
|
10340
|
+
if (event.toState === 'visible') {
|
|
10341
|
+
if (!this.scroll) {
|
|
10342
|
+
this.renderer.setStyle(this.document.body, 'overflow', 'hidden');
|
|
10343
|
+
this.renderer.setStyle(this.document.body, 'padding-right', scrollbarWidth);
|
|
10344
|
+
}
|
|
10345
|
+
this.renderer.addClass(this.hostElement.nativeElement, 'showing');
|
|
10346
|
+
}
|
|
10347
|
+
else {
|
|
10348
|
+
this.renderer.addClass(this.hostElement.nativeElement, 'hiding');
|
|
10349
|
+
}
|
|
10350
|
+
}
|
|
10351
|
+
animateDone(event) {
|
|
10352
|
+
setTimeout(() => {
|
|
10353
|
+
if (event.toState === 'visible') {
|
|
10354
|
+
this.renderer.removeClass(this.hostElement.nativeElement, 'showing');
|
|
10355
|
+
}
|
|
10356
|
+
if (event.toState === 'hidden') {
|
|
10357
|
+
this.renderer.removeClass(this.hostElement.nativeElement, 'hiding');
|
|
10358
|
+
this.renderer.removeStyle(this.document.body, 'overflow');
|
|
10359
|
+
this.renderer.removeStyle(this.document.body, 'paddingRight');
|
|
10360
|
+
}
|
|
10361
|
+
});
|
|
10362
|
+
this.show = this.visible;
|
|
10308
10363
|
}
|
|
10309
10364
|
onKeyDownHandler(event) {
|
|
10310
|
-
if (event.key === 'Escape' &&
|
|
10365
|
+
if (event.key === 'Escape' &&
|
|
10366
|
+
this.keyboard &&
|
|
10367
|
+
this.visible &&
|
|
10368
|
+
this.backdrop !== 'static') {
|
|
10311
10369
|
this.offcanvasService.toggle({ show: false, id: this.id });
|
|
10312
10370
|
}
|
|
10313
10371
|
}
|
|
10314
10372
|
ngOnInit() {
|
|
10315
|
-
this.
|
|
10373
|
+
__classPrivateFieldSet(this, _OffcanvasComponent_scrollbarWidth, this.backdropService.scrollbarWidth, "f");
|
|
10316
10374
|
this.stateToggleSubscribe();
|
|
10375
|
+
setTimeout(() => {
|
|
10376
|
+
// hotfix to avoid offcanvas flicker on the first render
|
|
10377
|
+
this.renderer.setStyle(this.hostElement.nativeElement, 'display', 'flex');
|
|
10378
|
+
});
|
|
10317
10379
|
}
|
|
10318
10380
|
ngOnDestroy() {
|
|
10319
10381
|
this.offcanvasService.toggle({ show: false, id: this.id });
|
|
10320
10382
|
this.stateToggleSubscribe(false);
|
|
10321
10383
|
}
|
|
10322
|
-
ngOnChanges(changes) {
|
|
10323
|
-
if (changes['scroll']) {
|
|
10324
|
-
this.setScroll();
|
|
10325
|
-
}
|
|
10326
|
-
}
|
|
10327
10384
|
stateToggleSubscribe(subscribe = true) {
|
|
10328
10385
|
if (subscribe) {
|
|
10329
|
-
this
|
|
10386
|
+
__classPrivateFieldSet(this, _OffcanvasComponent_stateToggleSubscription, this.offcanvasService.offcanvasState$.subscribe((action) => {
|
|
10330
10387
|
if (this === action.offcanvas || this.id === action.id) {
|
|
10331
10388
|
if ('show' in action) {
|
|
10332
|
-
this.visible =
|
|
10389
|
+
this.visible =
|
|
10390
|
+
(action === null || action === void 0 ? void 0 : action.show) === 'toggle' ? !this.visible : action.show;
|
|
10333
10391
|
}
|
|
10334
10392
|
}
|
|
10335
|
-
});
|
|
10393
|
+
}), "f");
|
|
10336
10394
|
}
|
|
10337
10395
|
else {
|
|
10338
|
-
this.
|
|
10396
|
+
__classPrivateFieldGet(this, _OffcanvasComponent_stateToggleSubscription, "f").unsubscribe();
|
|
10339
10397
|
}
|
|
10340
10398
|
}
|
|
10341
10399
|
backdropClickSubscribe(subscribe = true) {
|
|
10342
10400
|
var _a;
|
|
10343
10401
|
if (subscribe) {
|
|
10344
|
-
this
|
|
10402
|
+
__classPrivateFieldSet(this, _OffcanvasComponent_backdropClickSubscription, this.backdropService.backdropClick$.subscribe((clicked) => {
|
|
10345
10403
|
this.offcanvasService.toggle({ show: !clicked, id: this.id });
|
|
10346
|
-
});
|
|
10404
|
+
}), "f");
|
|
10347
10405
|
}
|
|
10348
10406
|
else {
|
|
10349
|
-
(_a = this
|
|
10407
|
+
(_a = __classPrivateFieldGet(this, _OffcanvasComponent_backdropClickSubscription, "f")) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
10350
10408
|
}
|
|
10351
10409
|
}
|
|
10352
10410
|
setBackdrop(setBackdrop) {
|
|
10353
|
-
|
|
10354
|
-
|
|
10355
|
-
this.
|
|
10356
|
-
|
|
10357
|
-
|
|
10358
|
-
this.activeBackdrop = this.backdropService.clearBackdrop(this.activeBackdrop);
|
|
10359
|
-
this.backdropClickSubscribe(false);
|
|
10360
|
-
}
|
|
10411
|
+
__classPrivateFieldSet(this, _OffcanvasComponent_scrollbarWidth, this.backdropService.scrollbarWidth, "f");
|
|
10412
|
+
__classPrivateFieldSet(this, _OffcanvasComponent_activeBackdrop, !!setBackdrop ? this.backdropService.setBackdrop('offcanvas')
|
|
10413
|
+
: this.backdropService.clearBackdrop(__classPrivateFieldGet(this, _OffcanvasComponent_activeBackdrop, "f")), "f");
|
|
10414
|
+
setBackdrop === true ? this.backdropClickSubscribe()
|
|
10415
|
+
: this.backdropClickSubscribe(false);
|
|
10361
10416
|
}
|
|
10362
10417
|
setFocus() {
|
|
10363
10418
|
if (isPlatformBrowser(this.platformId)) {
|
|
10364
10419
|
setTimeout(() => this.hostElement.nativeElement.focus());
|
|
10365
10420
|
}
|
|
10366
10421
|
}
|
|
10367
|
-
|
|
10368
|
-
if (this.
|
|
10369
|
-
|
|
10370
|
-
|
|
10371
|
-
|
|
10422
|
+
get responsiveBreakpoint() {
|
|
10423
|
+
if (typeof this.responsive !== 'string') {
|
|
10424
|
+
return false;
|
|
10425
|
+
}
|
|
10426
|
+
const element = this.document.documentElement;
|
|
10427
|
+
const responsiveBreakpoint = this.responsive;
|
|
10428
|
+
const breakpointValue = getComputedStyle(element).getPropertyValue(`--cui-breakpoint-${responsiveBreakpoint.trim()}`) || false;
|
|
10429
|
+
return breakpointValue ? `${parseFloat(breakpointValue.trim()) - 0.02}px` : false;
|
|
10430
|
+
}
|
|
10431
|
+
layoutChangeSubscribe(subscribe = true) {
|
|
10432
|
+
var _a;
|
|
10433
|
+
if (subscribe) {
|
|
10434
|
+
if (!this.responsiveBreakpoint) {
|
|
10435
|
+
return;
|
|
10372
10436
|
}
|
|
10373
|
-
|
|
10437
|
+
const responsiveBreakpoint = `(max-width: ${this.responsiveBreakpoint})`;
|
|
10438
|
+
const layoutChanges = this.breakpointObserver.observe([responsiveBreakpoint]);
|
|
10439
|
+
__classPrivateFieldSet(this, _OffcanvasComponent_layoutChangeSubscription, layoutChanges
|
|
10440
|
+
.pipe(filter(breakpointState => !breakpointState.matches))
|
|
10441
|
+
.subscribe((breakpointState) => {
|
|
10442
|
+
this.visible = breakpointState.matches;
|
|
10443
|
+
}), "f");
|
|
10374
10444
|
}
|
|
10375
|
-
|
|
10376
|
-
|
|
10377
|
-
this.renderer.removeStyle(this.document.body, 'paddingRight');
|
|
10445
|
+
else {
|
|
10446
|
+
(_a = __classPrivateFieldGet(this, _OffcanvasComponent_layoutChangeSubscription, "f")) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
10378
10447
|
}
|
|
10379
10448
|
}
|
|
10380
10449
|
}
|
|
10381
|
-
|
|
10382
|
-
OffcanvasComponent.ɵ
|
|
10450
|
+
_OffcanvasComponent_scroll = new WeakMap(), _OffcanvasComponent_visible = new WeakMap(), _OffcanvasComponent_activeBackdrop = new WeakMap(), _OffcanvasComponent_scrollbarWidth = new WeakMap(), _OffcanvasComponent_stateToggleSubscription = new WeakMap(), _OffcanvasComponent_backdropClickSubscription = new WeakMap(), _OffcanvasComponent_layoutChangeSubscription = new WeakMap(), _OffcanvasComponent_show = new WeakMap();
|
|
10451
|
+
OffcanvasComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: OffcanvasComponent, deps: [{ token: DOCUMENT }, { token: PLATFORM_ID }, { token: i0.Renderer2 }, { token: i0.ElementRef }, { token: OffcanvasService }, { token: BackdropService }, { token: i1$2.BreakpointObserver }], target: i0.ɵɵFactoryTarget.Component });
|
|
10452
|
+
OffcanvasComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "14.2.12", type: OffcanvasComponent, selector: "c-offcanvas", inputs: { backdrop: "backdrop", keyboard: "keyboard", placement: "placement", responsive: "responsive", scroll: "scroll", id: "id", role: "role", ariaModal: "ariaModal", visible: "visible" }, outputs: { visibleChange: "visibleChange" }, host: { listeners: { "@showHide.start": "animateStart($event)", "@showHide.done": "animateDone($event)", "document:keydown": "onKeyDownHandler($event)" }, properties: { "attr.role": "this.role", "attr.aria-modal": "this.ariaModal", "class": "this.hostClasses", "attr.aria-hidden": "this.ariaHidden", "attr.tabindex": "this.tabIndex", "@showHide": "this.animateTrigger" } }, exportAs: ["cOffcanvas"], ngImport: i0, template: "<div cdkTrapFocus cdkTrapFocusAutoCapture>\n <ng-content></ng-content>\n</div>\n\n", styles: [":host{display:none}\n"], dependencies: [{ kind: "directive", type: i1$3.CdkTrapFocus, selector: "[cdkTrapFocus]", inputs: ["cdkTrapFocus", "cdkTrapFocusAutoCapture"], exportAs: ["cdkTrapFocus"] }], animations: [
|
|
10383
10453
|
trigger('showHide', [
|
|
10384
|
-
state('
|
|
10385
|
-
|
|
10454
|
+
state('visible', style({
|
|
10455
|
+
// visibility: 'visible'
|
|
10386
10456
|
})),
|
|
10387
|
-
state('
|
|
10388
|
-
|
|
10457
|
+
state('hidden', style({
|
|
10458
|
+
// visibility: 'hidden'
|
|
10389
10459
|
})),
|
|
10390
|
-
transition('
|
|
10391
|
-
])
|
|
10460
|
+
transition('visible <=> *', [animate('300ms')])
|
|
10461
|
+
])
|
|
10392
10462
|
] });
|
|
10393
10463
|
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImport: i0, type: OffcanvasComponent, decorators: [{
|
|
10394
10464
|
type: Component,
|
|
10395
10465
|
args: [{ selector: 'c-offcanvas', animations: [
|
|
10396
10466
|
trigger('showHide', [
|
|
10397
|
-
state('
|
|
10398
|
-
|
|
10467
|
+
state('visible', style({
|
|
10468
|
+
// visibility: 'visible'
|
|
10399
10469
|
})),
|
|
10400
|
-
state('
|
|
10401
|
-
|
|
10470
|
+
state('hidden', style({
|
|
10471
|
+
// visibility: 'hidden'
|
|
10402
10472
|
})),
|
|
10403
|
-
transition('
|
|
10404
|
-
])
|
|
10405
|
-
], exportAs: 'cOffcanvas', template: "<div cdkTrapFocus cdkTrapFocusAutoCapture>\n <ng-content></ng-content>\n</div>\n\n" }]
|
|
10473
|
+
transition('visible <=> *', [animate('300ms')])
|
|
10474
|
+
])
|
|
10475
|
+
], exportAs: 'cOffcanvas', template: "<div cdkTrapFocus cdkTrapFocusAutoCapture>\n <ng-content></ng-content>\n</div>\n\n", styles: [":host{display:none}\n"] }]
|
|
10406
10476
|
}], ctorParameters: function () {
|
|
10407
|
-
return [{ type:
|
|
10477
|
+
return [{ type: Document, decorators: [{
|
|
10408
10478
|
type: Inject,
|
|
10409
10479
|
args: [DOCUMENT]
|
|
10410
10480
|
}] }, { type: undefined, decorators: [{
|
|
10411
10481
|
type: Inject,
|
|
10412
10482
|
args: [PLATFORM_ID]
|
|
10413
|
-
}] }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: OffcanvasService }, { type: BackdropService }];
|
|
10483
|
+
}] }, { type: i0.Renderer2 }, { type: i0.ElementRef }, { type: OffcanvasService }, { type: BackdropService }, { type: i1$2.BreakpointObserver }];
|
|
10414
10484
|
}, propDecorators: { backdrop: [{
|
|
10415
10485
|
type: Input
|
|
10416
10486
|
}], keyboard: [{
|
|
10417
10487
|
type: Input
|
|
10418
10488
|
}], placement: [{
|
|
10419
10489
|
type: Input
|
|
10490
|
+
}], responsive: [{
|
|
10491
|
+
type: Input
|
|
10420
10492
|
}], scroll: [{
|
|
10421
10493
|
type: Input
|
|
10422
10494
|
}], id: [{
|
|
@@ -10444,9 +10516,15 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "14.2.12", ngImpo
|
|
|
10444
10516
|
}], tabIndex: [{
|
|
10445
10517
|
type: HostBinding,
|
|
10446
10518
|
args: ['attr.tabindex']
|
|
10447
|
-
}],
|
|
10519
|
+
}], animateTrigger: [{
|
|
10448
10520
|
type: HostBinding,
|
|
10449
10521
|
args: ['@showHide']
|
|
10522
|
+
}], animateStart: [{
|
|
10523
|
+
type: HostListener,
|
|
10524
|
+
args: ['@showHide.start', ['$event']]
|
|
10525
|
+
}], animateDone: [{
|
|
10526
|
+
type: HostListener,
|
|
10527
|
+
args: ['@showHide.done', ['$event']]
|
|
10450
10528
|
}], onKeyDownHandler: [{
|
|
10451
10529
|
type: HostListener,
|
|
10452
10530
|
args: ['document:keydown', ['$event']]
|
|
@@ -11607,6 +11685,7 @@ class SidebarComponent {
|
|
|
11607
11685
|
this.sidebarService.toggle(Object.assign(Object.assign({}, __classPrivateFieldGet(this, _SidebarComponent_stateInitial, "f")), { sidebar: this }));
|
|
11608
11686
|
}
|
|
11609
11687
|
stateToggleSubscribe(subscribe = true) {
|
|
11688
|
+
var _a;
|
|
11610
11689
|
if (subscribe) {
|
|
11611
11690
|
__classPrivateFieldSet(this, _SidebarComponent_stateToggleSubscription, this.sidebarService.sidebarState$.subscribe((state) => {
|
|
11612
11691
|
if (this === state.sidebar || this.id === state.id) {
|
|
@@ -11615,7 +11694,7 @@ class SidebarComponent {
|
|
|
11615
11694
|
}), "f");
|
|
11616
11695
|
}
|
|
11617
11696
|
else {
|
|
11618
|
-
__classPrivateFieldGet(this, _SidebarComponent_stateToggleSubscription, "f").unsubscribe();
|
|
11697
|
+
(_a = __classPrivateFieldGet(this, _SidebarComponent_stateToggleSubscription, "f")) === null || _a === void 0 ? void 0 : _a.unsubscribe();
|
|
11619
11698
|
}
|
|
11620
11699
|
}
|
|
11621
11700
|
layoutChangeSubscribe(subscribe = true) {
|