@ribajs/shopify
Version:
Shopify extension for Riba.js
45 lines (44 loc) • 1.75 kB
TypeScript
import { Component, ScopeBase } from "@ribajs/core";
import { EventDispatcher } from "@ribajs/events";
import { Linklist, LinklistLink } from "../../interfaces/index.js";
export interface Scope extends ScopeBase {
linklist?: Linklist;
handle?: string;
pills: boolean;
vertical: boolean;
collapseOnNewPage: boolean;
showOnActiveChild: boolean;
toggle: ShopifyLinklistComponent["toggle"];
collapse: ShopifyLinklistComponent["collapse"];
collapseAll: ShopifyLinklistComponent["collapseAll"];
show: ShopifyLinklistComponent["show"];
showAll: ShopifyLinklistComponent["showAll"];
}
export interface State {
url: string;
namespace?: string;
}
export declare class ShopifyLinklistComponent extends Component {
static tagName: string;
protected mainDispatcher: EventDispatcher;
protected autobind: boolean;
static get observedAttributes(): string[];
scope: Scope;
constructor();
protected connectedCallback(): void;
protected disconnectedCallback(): void;
toggle(link: LinklistLink): void;
collapse(link: LinklistLink): void;
show(link: LinklistLink): void;
showAll(): void;
collapseAll(): void;
showByChildUrl(url: string): void;
protected attributeChangedCallback(name: string, oldValue: any, newValue: any, namespace: string | null): Promise<void>;
protected collapseAllByLinks(links: LinklistLink[]): void;
protected showAllByLinks(links: LinklistLink[]): void;
protected onNewPageReady(viewId: string, currentStatus: State): void;
protected beforeBind(): Promise<any>;
protected transformLinks(links: LinklistLink[]): void;
protected requiredAttributes(): string[];
protected template(): Promise<string | null>;
}