@coreui/angular-pro 4.3.4 → 4.3.5

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.
@@ -11290,6 +11290,7 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
11290
11290
  args: [DOCUMENT]
11291
11291
  }] }, { type: SidebarService }]; } });
11292
11292
 
11293
+ var _SidebarComponent_narrow, _SidebarComponent_overlaid, _SidebarComponent_unfoldable, _SidebarComponent_visible, _SidebarComponent_onMobile, _SidebarComponent_layoutChangeSubscription, _SidebarComponent_stateToggleSubscription, _SidebarComponent_stateInitial;
11293
11294
  class SidebarComponent {
11294
11295
  constructor(document, renderer, breakpointObserver, sidebarService, backdropService) {
11295
11296
  this.document = document;
@@ -11297,14 +11298,21 @@ class SidebarComponent {
11297
11298
  this.breakpointObserver = breakpointObserver;
11298
11299
  this.sidebarService = sidebarService;
11299
11300
  this.backdropService = backdropService;
11300
- this._narrow = false;
11301
- this._overlaid = false;
11302
- this._unfoldable = false;
11303
- this._visible = false;
11304
- this.onMobile = false;
11301
+ _SidebarComponent_narrow.set(this, false);
11302
+ _SidebarComponent_overlaid.set(this, false);
11303
+ _SidebarComponent_unfoldable.set(this, false);
11304
+ _SidebarComponent_visible.set(this, false);
11305
+ _SidebarComponent_onMobile.set(this, false);
11306
+ _SidebarComponent_layoutChangeSubscription.set(this, void 0);
11307
+ _SidebarComponent_stateToggleSubscription.set(this, void 0);
11305
11308
  this.state = {
11306
- sidebar: this
11309
+ sidebar: this,
11307
11310
  };
11311
+ _SidebarComponent_stateInitial.set(this, {
11312
+ narrow: false,
11313
+ visible: false,
11314
+ unfoldable: false,
11315
+ });
11308
11316
  /**
11309
11317
  * Place sidebar in non-static positions. [docs]
11310
11318
  * @default 'fixed'
@@ -11322,49 +11330,49 @@ class SidebarComponent {
11322
11330
  * @type boolean
11323
11331
  */
11324
11332
  set narrow(value) {
11325
- this._narrow = coerceBooleanProperty(value);
11333
+ __classPrivateFieldSet(this, _SidebarComponent_narrow, coerceBooleanProperty(value), "f");
11326
11334
  }
11327
11335
  get narrow() {
11328
- return this._narrow;
11336
+ return __classPrivateFieldGet(this, _SidebarComponent_narrow, "f");
11329
11337
  }
11330
11338
  /**
11331
11339
  * Set sidebar to overlaid variant.
11332
11340
  * @type boolean
11333
11341
  */
11334
11342
  set overlaid(value) {
11335
- this._overlaid = coerceBooleanProperty(value);
11343
+ __classPrivateFieldSet(this, _SidebarComponent_overlaid, coerceBooleanProperty(value), "f");
11336
11344
  }
11337
11345
  get overlaid() {
11338
- return this._overlaid;
11346
+ return __classPrivateFieldGet(this, _SidebarComponent_overlaid, "f");
11339
11347
  }
11340
11348
  /**
11341
11349
  * Expand narrowed sidebar on hover. [docs]
11342
11350
  */
11343
11351
  set unfoldable(value) {
11344
- this._unfoldable = coerceBooleanProperty(value);
11352
+ __classPrivateFieldSet(this, _SidebarComponent_unfoldable, coerceBooleanProperty(value), "f");
11345
11353
  }
11346
11354
  get unfoldable() {
11347
- return this._unfoldable;
11355
+ return __classPrivateFieldGet(this, _SidebarComponent_unfoldable, "f");
11348
11356
  }
11349
11357
  /**
11350
11358
  * Toggle the visibility of sidebar component. [docs]
11351
11359
  */
11352
11360
  set visible(value) {
11353
11361
  const visible = coerceBooleanProperty(value);
11354
- if (this._visible !== visible) {
11355
- this._visible = visible;
11356
- this.visibleChange.emit(this._visible);
11362
+ if (__classPrivateFieldGet(this, _SidebarComponent_visible, "f") !== visible) {
11363
+ __classPrivateFieldSet(this, _SidebarComponent_visible, visible, "f");
11364
+ this.visibleChange.emit(__classPrivateFieldGet(this, _SidebarComponent_visible, "f"));
11357
11365
  }
11358
11366
  }
11359
11367
  get visible() {
11360
- return this._visible;
11368
+ return __classPrivateFieldGet(this, _SidebarComponent_visible, "f");
11361
11369
  }
11362
11370
  set sidebarState(value) {
11363
11371
  const newState = value;
11364
11372
  if ('toggle' in newState) {
11365
11373
  if (newState.toggle === 'visible') {
11366
11374
  newState.visible = !this.state.visible;
11367
- this.visible = newState.visible && !this.overlaid;
11375
+ this.visible = newState.visible;
11368
11376
  }
11369
11377
  else if (newState.toggle === 'unfoldable') {
11370
11378
  newState.unfoldable = !this.state.unfoldable;
@@ -11376,21 +11384,24 @@ class SidebarComponent {
11376
11384
  }
11377
11385
  this.state = {
11378
11386
  ...this.state,
11379
- ...newState
11387
+ ...newState,
11380
11388
  };
11381
- this.state.mobile && this.state.visible ? this.backdropService.setBackdrop(this) : this.backdropService.clearBackdrop();
11389
+ this.state.mobile && this.state.visible
11390
+ ? this.backdropService.setBackdrop(this)
11391
+ : this.backdropService.clearBackdrop();
11382
11392
  }
11383
11393
  get sidebarState() {
11384
11394
  return this.state;
11385
11395
  }
11386
11396
  get getMobileBreakpoint() {
11387
- const element = this.document.firstElementChild;
11388
- const mobileBreakpoint = getComputedStyle(element).getPropertyValue('--cui-mobile-breakpoint') || 'md';
11397
+ const element = this.document.documentElement;
11398
+ const mobileBreakpoint = getComputedStyle(element).getPropertyValue('--cui-mobile-breakpoint') ||
11399
+ 'md';
11389
11400
  const breakpointValue = getComputedStyle(element).getPropertyValue(`--cui-breakpoint-${mobileBreakpoint.trim()}`) || '768px';
11390
- return `${parseFloat(breakpointValue.trim()) - .02}px` || '767.98px';
11401
+ return `${parseFloat(breakpointValue.trim()) - 0.02}px` || '767.98px';
11391
11402
  }
11392
11403
  get getClasses() {
11393
- const { mobile, unfoldable, visible } = this.sidebarState;
11404
+ const { mobile, visible } = this.sidebarState;
11394
11405
  return {
11395
11406
  sidebar: true,
11396
11407
  'sidebar-fixed': this.position === 'fixed' && !mobile,
@@ -11400,8 +11411,8 @@ class SidebarComponent {
11400
11411
  [`sidebar-${this.placement}`]: !!this.placement,
11401
11412
  [`sidebar-${this.colorScheme}`]: !!this.colorScheme,
11402
11413
  [`sidebar-${this.size}`]: !!this.size,
11403
- show: visible && this.onMobile,
11404
- hide: !visible && !this.onMobile
11414
+ show: visible && __classPrivateFieldGet(this, _SidebarComponent_onMobile, "f"),
11415
+ hide: !visible,
11405
11416
  };
11406
11417
  }
11407
11418
  ngOnInit() {
@@ -11434,48 +11445,52 @@ class SidebarComponent {
11434
11445
  }
11435
11446
  }
11436
11447
  setInitialState() {
11437
- this.sidebarService.toggle({
11448
+ __classPrivateFieldSet(this, _SidebarComponent_stateInitial, {
11438
11449
  narrow: this.narrow,
11439
11450
  visible: this.visible,
11440
11451
  unfoldable: this.unfoldable,
11441
- sidebar: this
11452
+ }, "f");
11453
+ this.sidebarService.toggle({
11454
+ ...__classPrivateFieldGet(this, _SidebarComponent_stateInitial, "f"),
11455
+ sidebar: this,
11442
11456
  });
11443
11457
  }
11444
11458
  stateToggleSubscribe(subscribe = true) {
11445
11459
  if (subscribe) {
11446
- this.stateToggleSubscription = this.sidebarService.sidebarState$.subscribe((state) => {
11460
+ __classPrivateFieldSet(this, _SidebarComponent_stateToggleSubscription, this.sidebarService.sidebarState$.subscribe((state) => {
11447
11461
  if (this === state.sidebar || this.id === state.id) {
11448
11462
  this.sidebarState = state;
11449
11463
  }
11450
- });
11464
+ }), "f");
11451
11465
  }
11452
11466
  else {
11453
- this.stateToggleSubscription.unsubscribe();
11467
+ __classPrivateFieldGet(this, _SidebarComponent_stateToggleSubscription, "f").unsubscribe();
11454
11468
  }
11455
11469
  }
11456
11470
  layoutChangeSubscribe(subscribe = true) {
11457
11471
  const onMobile = `(max-width: ${this.getMobileBreakpoint})`;
11458
11472
  if (subscribe) {
11459
11473
  const layoutChanges = this.breakpointObserver.observe([onMobile]);
11460
- this.layoutChangeSubscription = layoutChanges.subscribe((result) => {
11474
+ __classPrivateFieldSet(this, _SidebarComponent_layoutChangeSubscription, layoutChanges.subscribe((result) => {
11461
11475
  const isOnMobile = result.breakpoints[onMobile];
11462
11476
  const isUnfoldable = isOnMobile ? false : this.unfoldable;
11463
- if (this.onMobile !== isOnMobile) {
11464
- this.onMobile = isOnMobile;
11477
+ if (__classPrivateFieldGet(this, _SidebarComponent_onMobile, "f") !== isOnMobile) {
11478
+ __classPrivateFieldSet(this, _SidebarComponent_onMobile, isOnMobile, "f");
11465
11479
  this.sidebarService.toggle({
11466
11480
  mobile: isOnMobile,
11467
11481
  unfoldable: isUnfoldable,
11468
- visible: (!isOnMobile) || isUnfoldable,
11469
- sidebar: this
11482
+ visible: isOnMobile ? !isOnMobile : __classPrivateFieldGet(this, _SidebarComponent_stateInitial, "f").visible,
11483
+ sidebar: this,
11470
11484
  });
11471
11485
  }
11472
- });
11486
+ }), "f");
11473
11487
  }
11474
11488
  else {
11475
- this.layoutChangeSubscription.unsubscribe();
11489
+ __classPrivateFieldGet(this, _SidebarComponent_layoutChangeSubscription, "f").unsubscribe();
11476
11490
  }
11477
11491
  }
11478
11492
  }
11493
+ _SidebarComponent_narrow = new WeakMap(), _SidebarComponent_overlaid = new WeakMap(), _SidebarComponent_unfoldable = new WeakMap(), _SidebarComponent_visible = new WeakMap(), _SidebarComponent_onMobile = new WeakMap(), _SidebarComponent_layoutChangeSubscription = new WeakMap(), _SidebarComponent_stateToggleSubscription = new WeakMap(), _SidebarComponent_stateInitial = new WeakMap();
11479
11494
  SidebarComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SidebarComponent, deps: [{ token: DOCUMENT }, { token: i0.Renderer2 }, { token: i1$2.BreakpointObserver }, { token: SidebarService }, { token: SidebarBackdropService }], target: i0.ɵɵFactoryTarget.Component });
11480
11495
  SidebarComponent.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "14.0.0", version: "15.0.4", type: SidebarComponent, selector: "c-sidebar", inputs: { colorScheme: "colorScheme", id: "id", narrow: "narrow", overlaid: "overlaid", placement: "placement", position: "position", size: "size", unfoldable: "unfoldable", visible: "visible" }, outputs: { visibleChange: "visibleChange" }, host: { properties: { "class": "this.getClasses" } }, exportAs: ["cSidebar"], usesOnChanges: true, ngImport: i0, template: '<ng-content></ng-content>', isInline: true });
11481
11496
  i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImport: i0, type: SidebarComponent, decorators: [{
@@ -11483,9 +11498,9 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
11483
11498
  args: [{
11484
11499
  selector: 'c-sidebar',
11485
11500
  exportAs: 'cSidebar',
11486
- template: '<ng-content></ng-content>'
11501
+ template: '<ng-content></ng-content>',
11487
11502
  }]
11488
- }], ctorParameters: function () { return [{ type: undefined, decorators: [{
11503
+ }], ctorParameters: function () { return [{ type: Document, decorators: [{
11489
11504
  type: Inject,
11490
11505
  args: [DOCUMENT]
11491
11506
  }] }, { type: i0.Renderer2 }, { type: i1$2.BreakpointObserver }, { type: SidebarService }, { type: SidebarBackdropService }]; }, propDecorators: { colorScheme: [{
@@ -15312,3 +15327,4 @@ i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "15.0.4", ngImpor
15312
15327
 
15313
15328
  export { AccordionButtonDirective, AccordionComponent, AccordionItemComponent, AccordionModule, AlertComponent, AlertHeadingDirective, AlertLinkDirective, AlertModule, AlignDirective, AvatarComponent, AvatarModule, BadgeComponent, BadgeModule, BgColorDirective, BorderDirective, BreadcrumbComponent, BreadcrumbItemComponent, BreadcrumbModule, BreadcrumbRouterComponent, BreadcrumbRouterService, BreakpointInfix, ButtonCloseDirective, ButtonDirective, ButtonGroupComponent, ButtonGroupModule, ButtonModule, ButtonToolbarComponent, CalendarComponent, CalendarModule, CalendarMonthComponent, CalendarNavigationComponent, CalloutComponent, CalloutModule, CardBodyComponent, CardComponent, CardFooterComponent, CardGroupComponent, CardHeaderActionsComponent, CardHeaderComponent, CardImgDirective, CardImgOverlayComponent, CardLinkDirective, CardModule, CardSubtitleDirective, CardTextDirective, CardTitleDirective, CarouselCaptionComponent, CarouselComponent, CarouselConfig, CarouselControlComponent, CarouselIndicatorsComponent, CarouselInnerComponent, CarouselItemComponent, CarouselModule, ClassToggleService, ColComponent, ColDirective, CollapseDirective, CollapseModule, ContainerComponent, DatePickerComponent, DatePickerModule, DateRangePickerComponent, DateRangePickerModule, DropdownCloseDirective, DropdownComponent, DropdownDividerDirective, DropdownHeaderDirective, DropdownItemDirective, DropdownItemPlainDirective, DropdownMenuDirective, DropdownModule, DropdownService, DropdownToggleDirective, ElementCoverComponent, ElementCoverModule, FooterComponent, FooterModule, FormCheckComponent, FormCheckInputDirective, FormCheckLabelDirective, FormControlDirective, FormDirective, FormFeedbackComponent, FormFloatingDirective, FormLabelDirective, FormModule, FormSelectDirective, FormTextDirective, GridModule, GutterDirective, HeaderBrandComponent, HeaderComponent, HeaderDividerComponent, HeaderModule, HeaderNavComponent, HeaderTextComponent, HeaderTogglerDirective, HtmlAttributesDirective, ImgDirective, ImgModule, InputGroupComponent, InputGroupTextDirective, IntersectionService, ListGroupDirective, ListGroupItemDirective, ListGroupModule, LoadingButtonComponent, LoadingButtonModule, ModalBodyComponent, ModalComponent, ModalContentComponent, ModalDialogComponent, ModalFooterComponent, ModalHeaderComponent, ModalModule, ModalService, ModalTitleDirective, ModalToggleDirective, MultiSelectComponent, MultiSelectModule, MultiSelectOptgroupComponent, MultiSelectOptgroupLabelComponent, MultiSelectOptionComponent, MultiSelectTagComponent, NavComponent, NavItemComponent, NavLinkDirective, NavModule, NavbarBrandDirective, NavbarComponent, NavbarModule, NavbarNavComponent, NavbarTextComponent, NavbarTogglerDirective, OffcanvasBodyComponent, OffcanvasComponent, OffcanvasHeaderComponent, OffcanvasModule, OffcanvasService, OffcanvasTitleDirective, OffcanvasToggleDirective, PageItemComponent, PageItemDirective, PageLinkDirective, PaginationComponent, PaginationModule, PlaceholderAnimationDirective, PlaceholderDirective, PlaceholderModule, PopoverComponent, PopoverDirective, PopoverModule, ProgressBarComponent, ProgressComponent, ProgressModule, RoundedDirective, RowComponent, RowDirective, SharedModule, SidebarBrandComponent, SidebarComponent, SidebarFooterComponent, SidebarHeaderComponent, SidebarModule, SidebarNavComponent, SidebarService, SidebarToggleDirective, SidebarTogglerComponent, SmartPaginationComponent, SmartPaginationModule, SmartTableComponent, SmartTableFilterComponent, SmartTableModule, SpinnerComponent, SpinnerModule, TabContentComponent, TabContentRefDirective, TabPaneComponent, TabService, TableActiveDirective, TableColorDirective, TableDirective, TableModule, TabsModule, TemplateIdDirective, TextColorDirective, TimePickerComponent, TimePickerModule, ToastBodyComponent, ToastCloseDirective, ToastComponent, ToastHeaderComponent, ToastModule, ToasterComponent, ToasterHostDirective, ToasterPlacement, ToasterService, TooltipComponent, TooltipDirective, TooltipModule, UtilitiesModule, WidgetModule, WidgetStatAComponent, WidgetStatBComponent, WidgetStatCComponent, WidgetStatDComponent, WidgetStatEComponent, WidgetStatFComponent };
15314
15329
  //# sourceMappingURL=coreui-angular-pro.mjs.map
15330
+ //# sourceMappingURL=coreui-angular-pro.mjs.map