otimus-library 0.3.12 → 0.3.15

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/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as i0 from '@angular/core';
2
- import { OnDestroy, OnChanges, ElementRef, Renderer2, NgZone, ChangeDetectorRef, SimpleChanges, OnInit, AfterViewInit, AfterContentInit, EventEmitter, QueryList } from '@angular/core';
2
+ import { OnDestroy, OnChanges, ElementRef, Renderer2, NgZone, ChangeDetectorRef, SimpleChanges, ViewContainerRef, EnvironmentInjector, OnInit, AfterViewInit, AfterContentInit, EventEmitter, QueryList } from '@angular/core';
3
3
  import { DomSanitizer } from '@angular/platform-browser';
4
4
  import { MaterialSymbol } from 'material-symbols';
5
5
  import * as rxjs from 'rxjs';
@@ -75,6 +75,41 @@ declare class OcTooltipDirective implements OnDestroy, OnChanges {
75
75
  static ɵdir: i0.ɵɵDirectiveDeclaration<OcTooltipDirective, "[ocTooltip]", never, { "content": { "alias": "content"; "required": false; }; "side": { "alias": "side"; "required": false; }; }, {}, never, never, true, never>;
76
76
  }
77
77
 
78
+ interface OcMenuType {
79
+ name: string;
80
+ url?: string;
81
+ callback?: any;
82
+ targetBlank?: boolean;
83
+ icon?: string;
84
+ checked?: boolean;
85
+ }
86
+
87
+ interface OcMenuHorizType extends Omit<OcMenuType, 'checked'> {
88
+ }
89
+
90
+ declare class OcMenuHorizDirective implements OnChanges, OnDestroy {
91
+ private readonly elemRef;
92
+ private readonly viewContainerRef;
93
+ private readonly injector;
94
+ private readonly renderer;
95
+ ocMenu: OcMenuHorizType[];
96
+ maxWidth?: string;
97
+ width?: string;
98
+ shouldCloseOnClickOut: boolean;
99
+ private menuRef;
100
+ private ocChangeSub?;
101
+ constructor(elemRef: ElementRef<HTMLElement>, viewContainerRef: ViewContainerRef, injector: EnvironmentInjector, renderer: Renderer2);
102
+ ngOnChanges(changes: SimpleChanges): void;
103
+ ngOnDestroy(): void;
104
+ /** create and attach component instance (idempotent) */
105
+ createOcMenu(): void;
106
+ open(): void;
107
+ close(): void;
108
+ private destroyMenu;
109
+ static ɵfac: i0.ɵɵFactoryDeclaration<OcMenuHorizDirective, never>;
110
+ static ɵdir: i0.ɵɵDirectiveDeclaration<OcMenuHorizDirective, "[OcMenuHorizontal]", ["OcMenuHorizontal"], { "ocMenu": { "alias": "ocMenu"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "width": { "alias": "width"; "required": false; }; "shouldCloseOnClickOut": { "alias": "shouldCloseOnClickOut"; "required": false; }; }, {}, never, never, true, never>;
111
+ }
112
+
78
113
  declare class OcBadgeComponent implements OnInit {
79
114
  ocSize: 'small' | 'medium' | 'large';
80
115
  ocColor: 'notification' | 'brand-g' | 'brand-p' | 'success' | 'warning';
@@ -334,15 +369,6 @@ declare class OcNotFoundComponent {
334
369
  static ɵcmp: i0.ɵɵComponentDeclaration<OcNotFoundComponent, "oc-not-found", never, {}, {}, never, never, true, never>;
335
370
  }
336
371
 
337
- interface OcMenuType {
338
- name: string;
339
- url?: string;
340
- callback?: any;
341
- targetBlank?: boolean;
342
- icon?: string;
343
- checked?: boolean;
344
- }
345
-
346
372
  declare class OcMenuComponent implements OnInit {
347
373
  private renderer;
348
374
  constructor(renderer: Renderer2);
@@ -361,9 +387,6 @@ declare class OcMenuComponent implements OnInit {
361
387
  static ɵcmp: i0.ɵɵComponentDeclaration<OcMenuComponent, "oc-menu", never, { "ocMenu": { "alias": "ocMenu"; "required": false; }; }, { "ocChange": "ocChange"; }, never, never, true, never>;
362
388
  }
363
389
 
364
- interface OcMenuHorizType extends Omit<OcMenuType, 'checked'> {
365
- }
366
-
367
390
  declare class OcMenuHorizComponent implements OnInit, OnDestroy {
368
391
  private readonly renderer;
369
392
  private readonly cdr;
@@ -372,13 +395,13 @@ declare class OcMenuHorizComponent implements OnInit, OnDestroy {
372
395
  maxWidth?: string;
373
396
  width?: string;
374
397
  shouldCloseOnClickOut: boolean;
398
+ hostElement?: HTMLElement;
375
399
  ocChange: EventEmitter<any>;
376
400
  menuElement?: ElementRef<HTMLDivElement>;
377
401
  itemsListElement?: ElementRef<HTMLUListElement>;
378
402
  protected isMenuShown: boolean;
379
403
  protected showOverflowMenu: boolean;
380
404
  protected buttonId?: string;
381
- private justOpened;
382
405
  protected visibleItems: OcMenuHorizType[];
383
406
  protected overflowItems: OcMenuHorizType[];
384
407
  private itemWidths;
@@ -389,7 +412,6 @@ declare class OcMenuHorizComponent implements OnInit, OnDestroy {
389
412
  close(): void;
390
413
  ngOnInit(): void;
391
414
  ngOnDestroy(): void;
392
- private findParentButton;
393
415
  private closeOnClickOut;
394
416
  private measureItems;
395
417
  private setupResizeObserver;
@@ -398,7 +420,7 @@ declare class OcMenuHorizComponent implements OnInit, OnDestroy {
398
420
  protected toggleOverflowMenu(event: Event): void;
399
421
  protected handleOverflowItemClick(callback?: () => void): void;
400
422
  static ɵfac: i0.ɵɵFactoryDeclaration<OcMenuHorizComponent, never>;
401
- static ɵcmp: i0.ɵɵComponentDeclaration<OcMenuHorizComponent, "oc-menu-horiz", never, { "ocMenu": { "alias": "ocMenu"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "width": { "alias": "width"; "required": false; }; "shouldCloseOnClickOut": { "alias": "shouldCloseOnClickOut"; "required": false; }; }, { "ocChange": "ocChange"; }, never, never, true, never>;
423
+ static ɵcmp: i0.ɵɵComponentDeclaration<OcMenuHorizComponent, "oc-menu-horiz", never, { "ocMenu": { "alias": "ocMenu"; "required": false; }; "maxWidth": { "alias": "maxWidth"; "required": false; }; "width": { "alias": "width"; "required": false; }; "shouldCloseOnClickOut": { "alias": "shouldCloseOnClickOut"; "required": false; }; "hostElement": { "alias": "hostElement"; "required": false; }; }, { "ocChange": "ocChange"; }, never, never, true, never>;
402
424
  }
403
425
 
404
426
  declare class OcToastComponent {
@@ -625,5 +647,5 @@ interface OcTableActionsType {
625
647
  print: () => any;
626
648
  }
627
649
 
628
- export { OcAccordionComponent, OcAccordionItemComponent, OcAutocompleteComponent, OcBadgeComponent, OcButtonMenuComponent, OcCheckboxComponent, OcChipComponent, OcDateSelectComponent, OcFilterComponent, OcInputComponent, OcKeyValueComponent, OcLogComponent, OcMenuComponent, OcMenuHorizComponent, OcMessageComponent, OcModalComponent, OcModalFooterComponent, OcNotFoundComponent, OcPaginationComponent, OcProfileComponent, OcProgressComponent, OcStepComponent, OcStepperComponent, OcTabComponent, OcTabsComponent, OcToastComponent, OcToastService, OcToggleComponent, OcTooltipDirective, OtimusLibraryComponent, OtimusLibraryService, StyleThemeService };
650
+ export { OcAccordionComponent, OcAccordionItemComponent, OcAutocompleteComponent, OcBadgeComponent, OcButtonMenuComponent, OcCheckboxComponent, OcChipComponent, OcDateSelectComponent, OcFilterComponent, OcInputComponent, OcKeyValueComponent, OcLogComponent, OcMenuComponent, OcMenuHorizComponent, OcMenuHorizDirective, OcMessageComponent, OcModalComponent, OcModalFooterComponent, OcNotFoundComponent, OcPaginationComponent, OcProfileComponent, OcProgressComponent, OcStepComponent, OcStepperComponent, OcTabComponent, OcTabsComponent, OcToastComponent, OcToastService, OcToggleComponent, OcTooltipDirective, OtimusLibraryComponent, OtimusLibraryService, StyleThemeService };
629
651
  export type { OcAutoCompleteType, OcMenuType, OcStyleThemeType, OcTableType, ToastType };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "otimus-library",
3
- "version": "0.3.12",
3
+ "version": "0.3.15",
4
4
  "license": "MIT",
5
5
  "peerDependencies": {
6
6
  "@angular/cdk": "^20.2.5",