@telia-ace/widget-side-menu 1.1.120-rc.0 → 1.1.120-rc.2

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.
@@ -0,0 +1,17 @@
1
+ import { ReactiveController, ReactiveControllerHost } from 'lit';
2
+ import { SideMenuOption } from '../side-menu-option';
3
+ import { CreateSideMenuOption } from '../types';
4
+ export declare class OptionsController implements ReactiveController {
5
+ private _host;
6
+ private _options;
7
+ private _subscription;
8
+ constructor(host: ReactiveControllerHost);
9
+ hostConnected(): void;
10
+ hostDisconnected(): void;
11
+ addOption(payload: CreateSideMenuOption): SideMenuOption;
12
+ removeOption(option: SideMenuOption): void;
13
+ private handleUpdate;
14
+ set options(value: SideMenuOption[]);
15
+ get options(): SideMenuOption[];
16
+ hasOptions(): boolean;
17
+ }
package/index.d.ts ADDED
@@ -0,0 +1,2 @@
1
+ import { SideMenuComponent } from './side-menu-component';
2
+ export default SideMenuComponent;
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "@telia-ace/widget-side-menu",
3
- "version": "1.1.120-rc.0",
3
+ "version": "1.1.120-rc.2",
4
4
  "dependencies": {
5
5
  "lit": "^3.0.2",
6
6
  "rxjs": "^7.8.2",
7
- "@telia-ace/widget-core-flamingo": "1.1.119",
7
+ "@telia-ace/widget-core-flamingo": "1.1.120-rc.2",
8
8
  "@teliads/components": "^22.1.1",
9
9
  "@lit-labs/motion": "^1.0.8",
10
10
  "lit-html": "^3.0.2"
@@ -0,0 +1,2 @@
1
+ import { Application } from '../../core/src/index.ts';
2
+ export declare const SideMenuComponent: (app: Application) => Promise<void>;
@@ -0,0 +1,17 @@
1
+ import { OptionsController } from './controllers/options-controller';
2
+ export declare class SideMenuOption {
3
+ label: string;
4
+ icon: string | null;
5
+ onClick: () => void;
6
+ closeOnClick: boolean;
7
+ key: string;
8
+ private update;
9
+ private _controller;
10
+ id: string;
11
+ enabled: boolean;
12
+ constructor(label: string, icon: string | null, onClick: () => void, closeOnClick: boolean, key: string, controller: OptionsController, enabled?: boolean);
13
+ updateLabel(value: string): void;
14
+ updateIcon(value: string): void;
15
+ remove(): void;
16
+ subscribe(): import('rxjs').Observable<void>;
17
+ }
package/side-menu.d.ts ADDED
@@ -0,0 +1,19 @@
1
+ import { LitElement, nothing } from 'lit';
2
+ import { CreateSideMenuOption } from './types';
3
+ import { SideMenuOption } from './side-menu-option';
4
+ declare const WidgetElement: (new (...args: any[]) => import('../../core/src/index.ts').WidgetComponentType) & typeof LitElement;
5
+ export declare class SideMenu extends WidgetElement {
6
+ static styles: import('lit').CSSResultGroup[];
7
+ optionsIsVisible: boolean;
8
+ private options;
9
+ private optionsRef;
10
+ private optionsTriggerRef;
11
+ addOption(option: CreateSideMenuOption): SideMenuOption;
12
+ removeOption(option: SideMenuOption): void;
13
+ private _onToggleOptionsMenuClick;
14
+ connectedCallback(): void;
15
+ disconnectedCallback(): void;
16
+ private _onClickOutside;
17
+ render(): typeof nothing | import('lit-html').TemplateResult<1>;
18
+ }
19
+ export default SideMenu;
package/types.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export type CreateSideMenuOption = {
2
+ label: string;
3
+ onClick: () => void;
4
+ icon: string | null;
5
+ closeOnClick: boolean;
6
+ key: string;
7
+ };
@@ -0,0 +1 @@
1
+ export declare const uuid: () => string;