@itrocks/table 0.1.3 → 0.1.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.
Files changed (3) hide show
  1. package/package.json +1 -1
  2. package/table.d.ts +6 -6
  3. package/table.js +2 -1
package/package.json CHANGED
@@ -56,5 +56,5 @@
56
56
  },
57
57
  "type": "module",
58
58
  "types": "./table.d.ts",
59
- "version": "0.1.3"
59
+ "version": "0.1.5"
60
60
  }
package/table.d.ts CHANGED
@@ -1,19 +1,19 @@
1
- import { HasPlugins, Options as PluginOptions } from '../plugin/plugin.js';
1
+ import { HasPlugins, Options } from '../plugin/plugin.js';
2
2
  export declare function applyStyleSheets(): void;
3
3
  export declare function garbageCollector(): void;
4
4
  export declare function getTables(): Table[];
5
- export type Options = PluginOptions<Table>;
5
+ export { Options };
6
6
  export declare class Table extends HasPlugins<Table> {
7
7
  readonly element: HTMLTableElement;
8
8
  readonly id: number;
9
9
  readonly selector: string;
10
10
  readonly onReset: (() => void)[];
11
11
  readonly styleSheet: string[];
12
- constructor(element: HTMLTableElement, options?: Partial<Options>);
12
+ constructor(element: HTMLTableElement, options?: Partial<Options<Table>>);
13
13
  addEventListener<T extends keyof GlobalEventHandlersEventMap>(element: Document | Element | Window, type: T, listener: (this: Element, ev: GlobalEventHandlersEventMap[T]) => any, options?: AddEventListenerOptions | boolean): void;
14
14
  cellColumnNumber(cell: HTMLTableCellElement): number;
15
15
  reset(): Table;
16
16
  }
17
- export declare function tableByElement(element: HTMLTableElement, options?: Partial<Options>): Table;
18
- export declare function tableByElements(elements: Array<HTMLTableElement> | NodeListOf<HTMLTableElement>, options?: Partial<Options>): Table[];
19
- export declare function tableBySelector(selector: string, options?: Partial<Options>): Table[];
17
+ export declare function tableByElement(element: HTMLTableElement, options?: Partial<Options<Table>>): Table;
18
+ export declare function tableByElements(elements: Array<HTMLTableElement> | NodeListOf<HTMLTableElement>, options?: Partial<Options<Table>>): Table[];
19
+ export declare function tableBySelector(selector: string, options?: Partial<Options<Table>>): Table[];
package/table.js CHANGED
@@ -1,4 +1,4 @@
1
- import { HasPlugins } from '../plugin/plugin.js';
1
+ import { HasPlugins, Options } from '../plugin/plugin.js';
2
2
  const styleSheets = new CSSStyleSheet;
3
3
  document.adoptedStyleSheets.push(styleSheets);
4
4
  let tableCounter = 0;
@@ -24,6 +24,7 @@ function nextTableId(table) {
24
24
  }
25
25
  return tableCounter;
26
26
  }
27
+ export { Options };
27
28
  export class Table extends HasPlugins {
28
29
  element;
29
30
  id;