@internetarchive/ads-table 0.0.7 → 1.0.0

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.
@@ -1,4 +1,4 @@
1
- import { LitElement, PropertyValues, TemplateResult } from "lit";
1
+ import { CSSResultGroup, LitElement, PropertyValues, TemplateResult } from "lit";
2
2
  import { SortComparisonFunction, TableColumn, TableDataType, TableRow } from "./types";
3
3
  export declare abstract class AdsTable<T> extends LitElement {
4
4
  tableElement: HTMLTableElement | undefined;
@@ -20,9 +20,10 @@ export declare abstract class AdsTable<T> extends LitElement {
20
20
  };
21
21
  protected get sortedRows(): TableRow<T>[];
22
22
  protected get selectedRows(): TableRow<T>[];
23
+ protected get selectedColumn(): TableColumn<T>;
23
24
  protected onColumnClick(column: TableColumn<T>, defaultSortDirection?: "ascending" | "descending"): void;
24
- protected get columnKeyToDataType(): {
25
- [columnKey: string]: TableDataType<T>;
25
+ protected get columnByKey(): {
26
+ [columnKey: string]: TableColumn<T>;
26
27
  };
27
28
  protected get sortColumnDataType(): TableDataType<T> | undefined;
28
29
  protected get secondarySortDataType(): TableDataType<T> | undefined;
@@ -43,7 +44,7 @@ export declare abstract class AdsTable<T> extends LitElement {
43
44
  protected constrainIndex(index: number): number;
44
45
  connectedCallback(): void;
45
46
  render(): TemplateResult<1>;
46
- static styles: import("lit").CSSResult;
47
+ static styles: CSSResultGroup;
47
48
  }
48
49
  export declare class AdsSimpleTable<T> extends AdsTable<T> {
49
50
  columns: TableColumn<T>[];
@@ -1,6 +1,6 @@
1
1
  import { __decorate } from "tslib";
2
2
  // interface class for a Lit component class that contains table data
3
- import { css, html, LitElement } from "lit";
3
+ import { css, html, LitElement, } from "lit";
4
4
  import { property, state, query, customElement } from "lit/decorators.js";
5
5
  import { EventHelpers } from "@internetarchive/ads-library";
6
6
  import { getUserOS, UserOperatingSystem } from "@internetarchive/ads-library";
@@ -59,6 +59,10 @@ export class AdsTable extends LitElement {
59
59
  }
60
60
  get sortedRows() {
61
61
  var _a;
62
+ // if sorting has been done already, return the rows as-is.
63
+ if (this.selectedColumn.preSorted) {
64
+ return this.rows;
65
+ }
62
66
  const sortByPrimaryKey = this.getSortFunction(this.sortColumnDataType, this.sortDirection);
63
67
  const sortBySecondaryKey = this.getSortFunction(this.secondarySortDataType, ((_a = this.secondarySortDataType) === null || _a === void 0 ? void 0 : _a.defaultSortDirection) || this.sortDirection);
64
68
  return this.rows.sort((rowA, rowB) => {
@@ -73,9 +77,14 @@ export class AdsTable extends LitElement {
73
77
  }
74
78
  });
75
79
  }
80
+ // rows highlighted by user
76
81
  get selectedRows() {
77
82
  return this.selectedRowIds.map((id) => this.rowsById[id]).filter((x) => x);
78
83
  }
84
+ // the column you are currently sorting by
85
+ get selectedColumn() {
86
+ return this.columnByKey[this.sortKey];
87
+ }
79
88
  // handler for when a user clicks on a column header
80
89
  onColumnClick(column, defaultSortDirection = this
81
90
  .defaultSortDirection) {
@@ -97,13 +106,13 @@ export class AdsTable extends LitElement {
97
106
  });
98
107
  }
99
108
  // a map of column keys to their respective data types so we don't have to call .find everywhere
100
- get columnKeyToDataType() {
101
- return Object.fromEntries(this.columns.map((col) => [col.key, col.dataType]));
109
+ get columnByKey() {
110
+ return Object.fromEntries(this.columns.map((col) => [col.key, col]));
102
111
  }
103
112
  // data type of the currently sorted column
104
113
  get sortColumnDataType() {
105
114
  if (this.sortKey) {
106
- return this.columnKeyToDataType[this.sortKey];
115
+ return this.columnByKey[this.sortKey].dataType;
107
116
  }
108
117
  else {
109
118
  return undefined;
@@ -112,7 +121,7 @@ export class AdsTable extends LitElement {
112
121
  // data type of the secondary sort column
113
122
  get secondarySortDataType() {
114
123
  if (this.secondarySortKey) {
115
- return this.columnKeyToDataType[this.secondarySortKey];
124
+ return this.columnByKey[this.secondarySortKey].dataType;
116
125
  }
117
126
  else {
118
127
  return undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"ads-table.js","sourceRoot":"","sources":["../src/ads-table.ts"],"names":[],"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,SAAS,CAAC,EAAE,CAAC;YACrC,IAAI,CAAC,OAAO,GAAG,MAAA,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,0CAAE,GAAG,CAAC;QACtC,CAAC;IACH,CAAC;CACF,CAAA;AAb4B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;+CAAgC;AAE9B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wDAAmD;AAGrE;IAAR,KAAK,EAAE;+CAAqD;AAPlD,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAe1B","sourcesContent":["// interface class for a Lit component class that contains table data\nimport { css, html, LitElement, PropertyValues, TemplateResult } from \"lit\";\nimport {\n SortComparisonFunction,\n TableColumn,\n TableDataType,\n TableRow,\n} from \"./types\";\nimport { property, state, query, customElement } from \"lit/decorators.js\";\nimport { EventHelpers } from \"@internetarchive/ads-library\";\nimport { getUserOS, UserOperatingSystem } from \"@internetarchive/ads-library\";\n\nexport abstract class AdsTable<T> extends LitElement {\n @query(\"#main-table\") tableElement: HTMLTableElement | undefined;\n\n // base list of data that this class sorts\n @property({ type: Array }) rows: TableRow<T>[] = [];\n\n // abstract members to override\n protected abstract columns: TableColumn<T>[];\n protected abstract sortKey: keyof T | undefined;\n protected abstract secondarySortKey: keyof T | undefined;\n\n protected noDataText: string = \"No items found\";\n\n protected readonly defaultSortDirection: \"ascending\" | \"descending\" =\n \"ascending\";\n\n @state() protected sortDirection: \"ascending\" | \"descending\" =\n this.defaultSortDirection;\n\n // list of selected rows in order of least to most recently added\n @state() protected selectedRowIds: string[] = [];\n\n @state() isLoading: boolean = false;\n\n protected override updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n if (changedProperties.has(\"selectedRowIds\")) {\n // report selected rows to parent via an event\n this.emitEvent(\"row-select\", { selectedRows: this.selectedRows });\n }\n\n // if rows change, re-ensure selected rows exist in table\n if (this.rowsDidUpdate(changedProperties)) {\n this.filterSelectedRowsToExistingRows();\n }\n }\n\n // rather than compare references, determine if 'this.rows' has updated. an update occurs if:\n // - row list is a different size\n // - any elements in the sorted list may have changed place\n protected rowsDidUpdate(changedProperties: PropertyValues): boolean {\n // if the sort properties change, assume the elements have rearranged\n if (\n changedProperties.has(\"sortKey\") ||\n changedProperties.has(\"sortDirection\")\n ) {\n return true;\n }\n if (!changedProperties.has(\"rows\") || !changedProperties.get(\"rows\")) {\n return false;\n }\n const oldRowIds: string[] = (\n changedProperties.get(\"rows\") as TableRow<T>[]\n ).map((row: TableRow<T>) => row.id);\n // first check length. if list length changes, rows have changed.\n if (oldRowIds.length !== this.rows.length) {\n return true;\n }\n // otherwise, if they're the same size, compare individual items and ensure they're the same set of items\n const newRowsIdsSet: Set<string> = new Set(this.rows.map((row) => row.id));\n return !oldRowIds.every((id) => newRowsIdsSet.has(id));\n }\n\n protected emitEvent(eventName: string, detail = {}) {\n this.dispatchEvent(\n EventHelpers.createEvent(eventName, detail ? { detail } : {}),\n );\n }\n\n protected get visibleColumns(): TableColumn<T>[] {\n return this.columns.filter(({ isHidden }) => !isHidden);\n }\n\n protected get rowsById(): { [key: string]: TableRow<T> } {\n return Object.fromEntries<TableRow<T>>(\n this.rows.map((row) => [row.id, row]),\n );\n }\n\n protected get sortedRows(): TableRow<T>[] {\n const sortByPrimaryKey = this.getSortFunction(\n this.sortColumnDataType,\n this.sortDirection,\n );\n const sortBySecondaryKey = this.getSortFunction(\n this.secondarySortDataType,\n this.secondarySortDataType?.defaultSortDirection || this.sortDirection,\n );\n return this.rows.sort((rowA, rowB) => {\n // sort by primary key: the selected column and direction\n const sortResult = sortByPrimaryKey?.(rowA.data, rowB.data) || 0;\n // if sort result on primary sort key is inconclusive, use secondary sort data type\n if (sortResult === 0) {\n return sortBySecondaryKey?.(rowA.data, rowB.data) || 0;\n } else {\n return sortResult;\n }\n });\n }\n\n protected get selectedRows(): TableRow<T>[] {\n return this.selectedRowIds.map((id) => this.rowsById[id]).filter((x) => x);\n }\n\n // handler for when a user clicks on a column header\n protected onColumnClick(\n column: TableColumn<T>,\n defaultSortDirection: \"ascending\" | \"descending\" = this\n .defaultSortDirection,\n ): void {\n if (this.sortKey === column.key) {\n // toggle the sort direction if the column you are clicking is already sorted\n this.sortDirection =\n this.sortDirection === \"ascending\" ? \"descending\" : \"ascending\";\n } else {\n // otherwise, sort by the column you clicked on, and in the default sort direction\n this.sortKey = column.key;\n this.sortDirection =\n column.dataType.defaultSortDirection || defaultSortDirection;\n }\n this.emitEvent(\"column-click\", {\n column,\n sortKey: this.sortKey,\n sortDirection: this.sortDirection,\n });\n }\n\n // a map of column keys to their respective data types so we don't have to call .find everywhere\n protected get columnKeyToDataType(): {\n [columnKey: string]: TableDataType<T>;\n } {\n return Object.fromEntries<TableDataType<T>>(\n this.columns.map((col) => [col.key, col.dataType]),\n );\n }\n\n // data type of the currently sorted column\n protected get sortColumnDataType(): TableDataType<T> | undefined {\n if (this.sortKey) {\n return this.columnKeyToDataType[this.sortKey as string];\n } else {\n return undefined;\n }\n }\n\n // data type of the secondary sort column\n protected get secondarySortDataType(): TableDataType<T> | undefined {\n if (this.secondarySortKey) {\n return this.columnKeyToDataType[this.secondarySortKey as string];\n } else {\n return undefined;\n }\n }\n\n // swaps the parameters of the sort function to reverse the sort direction\n protected getSortFunction(\n dataType: TableDataType<T> | undefined,\n sortDirection: \"ascending\" | \"descending\",\n ): SortComparisonFunction<T> | undefined {\n if (!dataType) {\n return undefined;\n }\n if (sortDirection === \"ascending\") {\n // return the original comparison function\n return dataType.compare;\n } else if (dataType.compare !== undefined) {\n // swap compare function parameters for descending\n return (a, b) => dataType.compare?.(b, a) || 0;\n } else {\n return undefined;\n }\n }\n\n protected renderArrowIcon(columnKey: keyof T): TemplateResult {\n if (columnKey !== this.sortKey) {\n return html``;\n } else if (this.sortDirection === \"ascending\") {\n return html`▲`;\n } else {\n return html`▼`;\n }\n }\n\n protected get selectedRowIdsSet(): Set<string> {\n return new Set(this.selectedRowIds);\n }\n\n protected get rowIdsSet(): Set<string> {\n return new Set(this.rows.map((row) => row.id));\n }\n\n protected isSelected(row: TableRow<T>): boolean {\n return this.selectedRowIdsSet.has(row.id);\n }\n\n protected toggleRowSelected(rowId: string): void {\n if (this.selectedRowIdsSet.has(rowId)) {\n // row is already selected: filter out clicked id\n this.selectedRowIds = this.selectedRowIds.filter((id) => id !== rowId);\n } else {\n // row is not yet selected: append clicked id\n this.selectedRowIds = [...this.selectedRowIds, rowId];\n }\n }\n\n protected get lastSelectedRowId(): string {\n return this.selectedRowIds[this.selectedRowIds.length - 1];\n }\n\n protected get indexOfLastSelectedRow(): number {\n return this.rows.findIndex((row) => row.id === this.lastSelectedRowId);\n }\n\n // select rows in order from the last selected element up til the given index\n protected groupRowSelect(rowIndex: number): void {\n const getRowsToAdd = (): TableRow<T>[] => {\n // get rows between index of last selected until index of selected row\n if (rowIndex > this.indexOfLastSelectedRow) {\n return this.rows.filter(\n (_, i) => rowIndex >= i && i >= this.indexOfLastSelectedRow,\n );\n } else {\n // reverse order of adding rows since clicked index is lower than last selected\n return this.rows\n .filter((_, i) => this.indexOfLastSelectedRow >= i && i >= rowIndex)\n .reverse();\n }\n };\n const rowIdsToAdd: string[] = getRowsToAdd().map((row) => row.id);\n const rowIdsSet: Set<string> = new Set(rowIdsToAdd);\n // first remove ids you are about to re-add, so they'll be in renewed order\n this.selectedRowIds = this.selectedRowIds.filter(\n (id) => !rowIdsSet.has(id),\n );\n // finally, add the new rows\n this.selectedRowIds = [...this.selectedRowIds, ...rowIdsToAdd];\n }\n\n protected onRowClick(\n event: MouseEvent,\n clickedRow: TableRow<T>,\n rowIndex: number,\n ): void {\n const userOs = getUserOS();\n // meta (cmd) key for mac, control key for non-mac\n const macHoldingHotKey =\n userOs === UserOperatingSystem.MAC && event.metaKey;\n const nonMacHoldingHotKey =\n userOs !== UserOperatingSystem.MAC && event.ctrlKey;\n // if holding meta on mac or ctrl on windows/linux, toggle individual row selection\n if (macHoldingHotKey || nonMacHoldingHotKey) {\n this.toggleRowSelected(clickedRow.id);\n } else if (event.shiftKey) {\n // if holding shift, select rows between this selection and the last selection\n this.groupRowSelect(rowIndex);\n } else {\n // clicking a row will select just that row.\n this.selectedRowIds = [clickedRow.id];\n }\n this.filterSelectedRowsToExistingRows();\n // emit event so users can hook into this action\n this.emitEvent(\"row-click\", { row: clickedRow });\n }\n\n // filter selected down to rows that actually exist in the table\n protected filterSelectedRowsToExistingRows() {\n this.selectedRowIds = this.selectedRowIds.filter((id) =>\n this.rowIdsSet.has(id),\n );\n }\n\n protected onRowDoubleClick(clickedRow: TableRow<T>): void {\n // emit event so users can hook into this event\n this.emitEvent(\"row-double-click\", { row: clickedRow });\n }\n\n // All keyboard events implemented through this method.\n protected onKeyDown(event: KeyboardEvent): void {\n switch (event.key) {\n case \"ArrowUp\":\n case \"ArrowDown\":\n event.preventDefault();\n // shift focus to table element when navigating with arrow keys\n this.tableElement?.focus();\n return this.onUpDownArrowKey(event.key);\n }\n }\n\n protected onUpDownArrowKey(key: \"ArrowUp\" | \"ArrowDown\"): void {\n if (this.selectedRowIds.length === 0) {\n // select the first row if none are selected\n this.selectedRowIds = [this.rows[0].id];\n return;\n }\n // offset in the proper direction of the arrow\n const indexOffset = key === \"ArrowUp\" ? -1 : 1;\n const newSelectedRowIndex = this.constrainIndex(\n this.indexOfLastSelectedRow + indexOffset,\n );\n const newSelectedRowId = this.rows[newSelectedRowIndex].id;\n this.selectedRowIds = [newSelectedRowId];\n }\n\n // ensures index values are kept to the closest in-bounds index\n protected constrainIndex(index: number): number {\n return Math.max(Math.min(index, this.rows.length - 1), 0);\n }\n\n connectedCallback() {\n super.connectedCallback();\n // attach keyboard listener\n window.addEventListener(\"keydown\", (e: KeyboardEvent) => this.onKeyDown(e));\n }\n\n render() {\n return html`\n <table id=\"main-table\" tabindex=\"0\">\n <thead>\n <tr>\n ${this.visibleColumns.map(\n (column) => html`\n <th\n @click=${() => this.onColumnClick(column)}\n class=${column.dataType.compare ? \"sortable\" : \"\"}\n style=${`flex: ${column.flexRatio}`}\n >\n ${column.label}\n ${column.dataType.compare\n ? html`<span>${this.renderArrowIcon(column.key)}</span>`\n : \"\"}\n </th>\n `,\n )}\n </tr>\n </thead>\n <tbody>\n ${!this.isLoading\n ? this.sortedRows.map(\n (row, index) => html`\n <tr\n @click=${(e: MouseEvent) => this.onRowClick(e, row, index)}\n @dblclick=${() => this.onRowDoubleClick(row)}\n class=${this.isSelected(row) ? \"row-selected\" : \"\"}\n data-row-selected=${this.isSelected(row)}\n data-id=${row.id}\n >\n ${this.visibleColumns.map(\n (column) => html`\n <td style=${`flex: ${column.flexRatio}`}>\n ${column.dataType.format(row.data)}\n </td>\n `,\n )}\n </tr>\n `,\n )\n : html`\n <tr>\n <td class=\"no-data\">Loading...</td>\n </tr>\n `}\n ${!this.isLoading && this.sortedRows.length === 0\n ? html`\n <tr>\n <td class=\"no-data\">${this.noDataText}</td>\n </tr>\n `\n : null}\n </tbody>\n </table>\n `;\n }\n\n static styles = css`\n table {\n display: flex;\n flex-direction: column;\n user-select: none;\n border-collapse: collapse;\n }\n\n thead,\n tbody {\n display: flex;\n flex-direction: column;\n }\n\n thead {\n background: #2a282c;\n }\n\n tbody {\n scrollbar-gutter: stable;\n }\n\n tr {\n display: flex;\n width: 100%;\n min-height: 40px;\n flex-shrink: 0;\n }\n\n tr.row-selected {\n background: #ccddf2;\n }\n\n td.no-data {\n font-style: italic;\n justify-content: center;\n }\n\n td,\n th {\n display: flex;\n flex: 1;\n justify-content: flex-start;\n align-items: center;\n padding: 0 12px;\n height: 40px;\n\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n }\n\n th {\n color: white;\n }\n\n th.sortable {\n cursor: pointer;\n }\n\n th.sortable:hover {\n background: #525252;\n }\n\n th span {\n padding-left: 5px;\n }\n\n td {\n border-bottom: 1px solid #bbbbbb;\n }\n `;\n}\n\n// a simple, generic, out-of-the box implementation of AdsTable\n@customElement(\"ads-simple-table\")\nexport class AdsSimpleTable<T> extends AdsTable<T> {\n // columns are exposed as a parameter like rows, not a class member to implement\n @property({ type: Array }) columns: TableColumn<T>[] = [];\n\n @property({ type: String }) secondarySortKey: keyof T | undefined = undefined;\n\n // sort key is automatically held in state\n @state() sortKey: keyof T | undefined = this.columns[0]?.key;\n\n protected override updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n if (changedProperties.has(\"columns\")) {\n this.sortKey = this.columns[0]?.key;\n }\n }\n}\n"]}
1
+ {"version":3,"file":"ads-table.js","sourceRoot":"","sources":["../src/ads-table.ts"],"names":[],"mappings":";AAAA,qEAAqE;AACrE,OAAO,EACL,GAAG,EAEH,IAAI,EACJ,UAAU,GAGX,MAAM,KAAK,CAAC;AAOb,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAC1E,OAAO,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,mBAAmB,EAAE,MAAM,8BAA8B,CAAC;AAE9E,MAAM,OAAgB,QAAY,SAAQ,UAAU;IAApD;;QAGE,0CAA0C;QACf,SAAI,GAAkB,EAAE,CAAC;QAO1C,eAAU,GAAW,gBAAgB,CAAC;QAE7B,yBAAoB,GACrC,WAAW,CAAC;QAEK,kBAAa,GAC9B,IAAI,CAAC,oBAAoB,CAAC;QAE5B,iEAAiE;QAC9C,mBAAc,GAAa,EAAE,CAAC;QAExC,cAAS,GAAY,KAAK,CAAC;IAkbtC,CAAC;IAhboB,OAAO,CAAC,iBAAiC;QAC1D,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACjC,IAAI,iBAAiB,CAAC,GAAG,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC5C,8CAA8C;YAC9C,IAAI,CAAC,SAAS,CAAC,YAAY,EAAE,EAAE,YAAY,EAAE,IAAI,CAAC,YAAY,EAAE,CAAC,CAAC;QACpE,CA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AwElC,AAxEY,CAwEX;AAtcoB;IAArB,KAAK,CAAC,aAAa,CAAC;8CAA4C;AAGtC;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;sCAA0B;AAYjC;IAAlB,KAAK,EAAE;+CACoB;AAGT;IAAlB,KAAK,EAAE;gDAAyC;AAExC;IAAR,KAAK,EAAE;2CAA4B;AAobtC,+DAA+D;AAExD,IAAM,cAAc,GAApB,MAAM,cAAkB,SAAQ,QAAW;IAA3C;;;QACL,gFAAgF;QACrD,YAAO,GAAqB,EAAE,CAAC;QAE9B,qBAAgB,GAAwB,SAAS,CAAC;QAE9E,0CAA0C;QACjC,YAAO,GAAwB,MAAA,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,0CAAE,GAAG,CAAC;IAQ/D,CAAC;IANoB,OAAO,CAAC,iBAAiC;;QAC1D,KAAK,CAAC,OAAO,CAAC,iBAAiB,CAAC,CAAC;QACjC,IAAI,iBAAiB,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,CAAC;YACrC,IAAI,CAAC,OAAO,GAAG,MAAA,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,0CAAE,GAAG,CAAC;QACtC,CAAC;IACH,CAAC;CACF,CAAA;AAb4B;IAA1B,QAAQ,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC;+CAAgC;AAE9B;IAA3B,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC;wDAAmD;AAGrE;IAAR,KAAK,EAAE;+CAAqD;AAPlD,cAAc;IAD1B,aAAa,CAAC,kBAAkB,CAAC;GACrB,cAAc,CAe1B","sourcesContent":["// interface class for a Lit component class that contains table data\nimport {\n css,\n CSSResultGroup,\n html,\n LitElement,\n PropertyValues,\n TemplateResult,\n} from \"lit\";\nimport {\n SortComparisonFunction,\n TableColumn,\n TableDataType,\n TableRow,\n} from \"./types\";\nimport { property, state, query, customElement } from \"lit/decorators.js\";\nimport { EventHelpers } from \"@internetarchive/ads-library\";\nimport { getUserOS, UserOperatingSystem } from \"@internetarchive/ads-library\";\n\nexport abstract class AdsTable<T> extends LitElement {\n @query(\"#main-table\") tableElement: HTMLTableElement | undefined;\n\n // base list of data that this class sorts\n @property({ type: Array }) rows: TableRow<T>[] = [];\n\n // abstract members to override\n protected abstract columns: TableColumn<T>[];\n protected abstract sortKey: keyof T | undefined;\n protected abstract secondarySortKey: keyof T | undefined;\n\n protected noDataText: string = \"No items found\";\n\n protected readonly defaultSortDirection: \"ascending\" | \"descending\" =\n \"ascending\";\n\n @state() protected sortDirection: \"ascending\" | \"descending\" =\n this.defaultSortDirection;\n\n // list of selected rows in order of least to most recently added\n @state() protected selectedRowIds: string[] = [];\n\n @state() isLoading: boolean = false;\n\n protected override updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n if (changedProperties.has(\"selectedRowIds\")) {\n // report selected rows to parent via an event\n this.emitEvent(\"row-select\", { selectedRows: this.selectedRows });\n }\n\n // if rows change, re-ensure selected rows exist in table\n if (this.rowsDidUpdate(changedProperties)) {\n this.filterSelectedRowsToExistingRows();\n }\n }\n\n // rather than compare references, determine if 'this.rows' has updated. an update occurs if:\n // - row list is a different size\n // - any elements in the sorted list may have changed place\n protected rowsDidUpdate(changedProperties: PropertyValues): boolean {\n // if the sort properties change, assume the elements have rearranged\n if (\n changedProperties.has(\"sortKey\") ||\n changedProperties.has(\"sortDirection\")\n ) {\n return true;\n }\n if (!changedProperties.has(\"rows\") || !changedProperties.get(\"rows\")) {\n return false;\n }\n const oldRowIds: string[] = (\n changedProperties.get(\"rows\") as TableRow<T>[]\n ).map((row: TableRow<T>) => row.id);\n // first check length. if list length changes, rows have changed.\n if (oldRowIds.length !== this.rows.length) {\n return true;\n }\n // otherwise, if they're the same size, compare individual items and ensure they're the same set of items\n const newRowsIdsSet: Set<string> = new Set(this.rows.map((row) => row.id));\n return !oldRowIds.every((id) => newRowsIdsSet.has(id));\n }\n\n protected emitEvent(eventName: string, detail = {}) {\n this.dispatchEvent(\n EventHelpers.createEvent(eventName, detail ? { detail } : {}),\n );\n }\n\n protected get visibleColumns(): TableColumn<T>[] {\n return this.columns.filter(({ isHidden }) => !isHidden);\n }\n\n protected get rowsById(): { [key: string]: TableRow<T> } {\n return Object.fromEntries<TableRow<T>>(\n this.rows.map((row) => [row.id, row]),\n );\n }\n\n protected get sortedRows(): TableRow<T>[] {\n // if sorting has been done already, return the rows as-is.\n if (this.selectedColumn.preSorted) {\n return this.rows;\n }\n const sortByPrimaryKey = this.getSortFunction(\n this.sortColumnDataType,\n this.sortDirection,\n );\n const sortBySecondaryKey = this.getSortFunction(\n this.secondarySortDataType,\n this.secondarySortDataType?.defaultSortDirection || this.sortDirection,\n );\n return this.rows.sort((rowA, rowB) => {\n // sort by primary key: the selected column and direction\n const sortResult = sortByPrimaryKey?.(rowA.data, rowB.data) || 0;\n // if sort result on primary sort key is inconclusive, use secondary sort data type\n if (sortResult === 0) {\n return sortBySecondaryKey?.(rowA.data, rowB.data) || 0;\n } else {\n return sortResult;\n }\n });\n }\n\n // rows highlighted by user\n protected get selectedRows(): TableRow<T>[] {\n return this.selectedRowIds.map((id) => this.rowsById[id]).filter((x) => x);\n }\n\n // the column you are currently sorting by\n protected get selectedColumn(): TableColumn<T> {\n return this.columnByKey[this.sortKey as string];\n }\n\n // handler for when a user clicks on a column header\n protected onColumnClick(\n column: TableColumn<T>,\n defaultSortDirection: \"ascending\" | \"descending\" = this\n .defaultSortDirection,\n ): void {\n if (this.sortKey === column.key) {\n // toggle the sort direction if the column you are clicking is already sorted\n this.sortDirection =\n this.sortDirection === \"ascending\" ? \"descending\" : \"ascending\";\n } else {\n // otherwise, sort by the column you clicked on, and in the default sort direction\n this.sortKey = column.key;\n this.sortDirection =\n column.dataType.defaultSortDirection || defaultSortDirection;\n }\n this.emitEvent(\"column-click\", {\n column,\n sortKey: this.sortKey,\n sortDirection: this.sortDirection,\n });\n }\n\n // a map of column keys to their respective data types so we don't have to call .find everywhere\n protected get columnByKey(): {\n [columnKey: string]: TableColumn<T>;\n } {\n return Object.fromEntries<TableColumn<T>>(\n this.columns.map((col) => [col.key, col]),\n );\n }\n\n // data type of the currently sorted column\n protected get sortColumnDataType(): TableDataType<T> | undefined {\n if (this.sortKey) {\n return this.columnByKey[this.sortKey as string].dataType;\n } else {\n return undefined;\n }\n }\n\n // data type of the secondary sort column\n protected get secondarySortDataType(): TableDataType<T> | undefined {\n if (this.secondarySortKey) {\n return this.columnByKey[this.secondarySortKey as string].dataType;\n } else {\n return undefined;\n }\n }\n\n // swaps the parameters of the sort function to reverse the sort direction\n protected getSortFunction(\n dataType: TableDataType<T> | undefined,\n sortDirection: \"ascending\" | \"descending\",\n ): SortComparisonFunction<T> | undefined {\n if (!dataType) {\n return undefined;\n }\n if (sortDirection === \"ascending\") {\n // return the original comparison function\n return dataType.compare;\n } else if (dataType.compare !== undefined) {\n // swap compare function parameters for descending\n return (a, b) => dataType.compare?.(b, a) || 0;\n } else {\n return undefined;\n }\n }\n\n protected renderArrowIcon(columnKey: keyof T): TemplateResult {\n if (columnKey !== this.sortKey) {\n return html``;\n } else if (this.sortDirection === \"ascending\") {\n return html`▲`;\n } else {\n return html`▼`;\n }\n }\n\n protected get selectedRowIdsSet(): Set<string> {\n return new Set(this.selectedRowIds);\n }\n\n protected get rowIdsSet(): Set<string> {\n return new Set(this.rows.map((row) => row.id));\n }\n\n protected isSelected(row: TableRow<T>): boolean {\n return this.selectedRowIdsSet.has(row.id);\n }\n\n protected toggleRowSelected(rowId: string): void {\n if (this.selectedRowIdsSet.has(rowId)) {\n // row is already selected: filter out clicked id\n this.selectedRowIds = this.selectedRowIds.filter((id) => id !== rowId);\n } else {\n // row is not yet selected: append clicked id\n this.selectedRowIds = [...this.selectedRowIds, rowId];\n }\n }\n\n protected get lastSelectedRowId(): string {\n return this.selectedRowIds[this.selectedRowIds.length - 1];\n }\n\n protected get indexOfLastSelectedRow(): number {\n return this.rows.findIndex((row) => row.id === this.lastSelectedRowId);\n }\n\n // select rows in order from the last selected element up til the given index\n protected groupRowSelect(rowIndex: number): void {\n const getRowsToAdd = (): TableRow<T>[] => {\n // get rows between index of last selected until index of selected row\n if (rowIndex > this.indexOfLastSelectedRow) {\n return this.rows.filter(\n (_, i) => rowIndex >= i && i >= this.indexOfLastSelectedRow,\n );\n } else {\n // reverse order of adding rows since clicked index is lower than last selected\n return this.rows\n .filter((_, i) => this.indexOfLastSelectedRow >= i && i >= rowIndex)\n .reverse();\n }\n };\n const rowIdsToAdd: string[] = getRowsToAdd().map((row) => row.id);\n const rowIdsSet: Set<string> = new Set(rowIdsToAdd);\n // first remove ids you are about to re-add, so they'll be in renewed order\n this.selectedRowIds = this.selectedRowIds.filter(\n (id) => !rowIdsSet.has(id),\n );\n // finally, add the new rows\n this.selectedRowIds = [...this.selectedRowIds, ...rowIdsToAdd];\n }\n\n protected onRowClick(\n event: MouseEvent,\n clickedRow: TableRow<T>,\n rowIndex: number,\n ): void {\n const userOs = getUserOS();\n // meta (cmd) key for mac, control key for non-mac\n const macHoldingHotKey =\n userOs === UserOperatingSystem.MAC && event.metaKey;\n const nonMacHoldingHotKey =\n userOs !== UserOperatingSystem.MAC && event.ctrlKey;\n // if holding meta on mac or ctrl on windows/linux, toggle individual row selection\n if (macHoldingHotKey || nonMacHoldingHotKey) {\n this.toggleRowSelected(clickedRow.id);\n } else if (event.shiftKey) {\n // if holding shift, select rows between this selection and the last selection\n this.groupRowSelect(rowIndex);\n } else {\n // clicking a row will select just that row.\n this.selectedRowIds = [clickedRow.id];\n }\n this.filterSelectedRowsToExistingRows();\n // emit event so users can hook into this action\n this.emitEvent(\"row-click\", { row: clickedRow });\n }\n\n // filter selected down to rows that actually exist in the table\n protected filterSelectedRowsToExistingRows() {\n this.selectedRowIds = this.selectedRowIds.filter((id) =>\n this.rowIdsSet.has(id),\n );\n }\n\n protected onRowDoubleClick(clickedRow: TableRow<T>): void {\n // emit event so users can hook into this event\n this.emitEvent(\"row-double-click\", { row: clickedRow });\n }\n\n // All keyboard events implemented through this method.\n protected onKeyDown(event: KeyboardEvent): void {\n switch (event.key) {\n case \"ArrowUp\":\n case \"ArrowDown\":\n event.preventDefault();\n // shift focus to table element when navigating with arrow keys\n this.tableElement?.focus();\n return this.onUpDownArrowKey(event.key);\n }\n }\n\n protected onUpDownArrowKey(key: \"ArrowUp\" | \"ArrowDown\"): void {\n if (this.selectedRowIds.length === 0) {\n // select the first row if none are selected\n this.selectedRowIds = [this.rows[0].id];\n return;\n }\n // offset in the proper direction of the arrow\n const indexOffset = key === \"ArrowUp\" ? -1 : 1;\n const newSelectedRowIndex = this.constrainIndex(\n this.indexOfLastSelectedRow + indexOffset,\n );\n const newSelectedRowId = this.rows[newSelectedRowIndex].id;\n this.selectedRowIds = [newSelectedRowId];\n }\n\n // ensures index values are kept to the closest in-bounds index\n protected constrainIndex(index: number): number {\n return Math.max(Math.min(index, this.rows.length - 1), 0);\n }\n\n connectedCallback() {\n super.connectedCallback();\n // attach keyboard listener\n window.addEventListener(\"keydown\", (e: KeyboardEvent) => this.onKeyDown(e));\n }\n\n render() {\n return html`\n <table id=\"main-table\" tabindex=\"0\">\n <thead>\n <tr>\n ${this.visibleColumns.map(\n (column) => html`\n <th\n @click=${() => this.onColumnClick(column)}\n class=${column.dataType.compare ? \"sortable\" : \"\"}\n style=${`flex: ${column.flexRatio}`}\n >\n ${column.label}\n ${column.dataType.compare\n ? html`<span>${this.renderArrowIcon(column.key)}</span>`\n : \"\"}\n </th>\n `,\n )}\n </tr>\n </thead>\n <tbody>\n ${!this.isLoading\n ? this.sortedRows.map(\n (row, index) => html`\n <tr\n @click=${(e: MouseEvent) => this.onRowClick(e, row, index)}\n @dblclick=${() => this.onRowDoubleClick(row)}\n class=${this.isSelected(row) ? \"row-selected\" : \"\"}\n data-row-selected=${this.isSelected(row)}\n data-id=${row.id}\n >\n ${this.visibleColumns.map(\n (column) => html`\n <td style=${`flex: ${column.flexRatio}`}>\n ${column.dataType.format(row.data)}\n </td>\n `,\n )}\n </tr>\n `,\n )\n : html`\n <tr>\n <td class=\"no-data\">Loading...</td>\n </tr>\n `}\n ${!this.isLoading && this.sortedRows.length === 0\n ? html`\n <tr>\n <td class=\"no-data\">${this.noDataText}</td>\n </tr>\n `\n : null}\n </tbody>\n </table>\n `;\n }\n\n static styles: CSSResultGroup = css`\n table {\n display: flex;\n flex-direction: column;\n user-select: none;\n border-collapse: collapse;\n }\n\n thead,\n tbody {\n display: flex;\n flex-direction: column;\n }\n\n thead {\n background: #2a282c;\n }\n\n tbody {\n scrollbar-gutter: stable;\n }\n\n tr {\n display: flex;\n width: 100%;\n min-height: 40px;\n flex-shrink: 0;\n }\n\n tr.row-selected {\n background: #ccddf2;\n }\n\n td.no-data {\n font-style: italic;\n justify-content: center;\n }\n\n td,\n th {\n display: flex;\n flex: 1;\n justify-content: flex-start;\n align-items: center;\n padding: 0 12px;\n height: 40px;\n\n overflow: hidden;\n text-overflow: ellipsis;\n white-space: nowrap;\n min-width: 0;\n }\n\n th {\n color: white;\n }\n\n th.sortable {\n cursor: pointer;\n }\n\n th.sortable:hover {\n background: #525252;\n }\n\n th span {\n padding-left: 5px;\n }\n\n td {\n border-bottom: 1px solid #bbbbbb;\n }\n `;\n}\n\n// a simple, generic, out-of-the box implementation of AdsTable\n@customElement(\"ads-simple-table\")\nexport class AdsSimpleTable<T> extends AdsTable<T> {\n // columns are exposed as a parameter like rows, not a class member to implement\n @property({ type: Array }) columns: TableColumn<T>[] = [];\n\n @property({ type: String }) secondarySortKey: keyof T | undefined = undefined;\n\n // sort key is automatically held in state\n @state() sortKey: keyof T | undefined = this.columns[0]?.key;\n\n protected override updated(changedProperties: PropertyValues) {\n super.updated(changedProperties);\n if (changedProperties.has(\"columns\")) {\n this.sortKey = this.columns[0]?.key;\n }\n }\n}\n"]}
@@ -10,6 +10,7 @@ export interface TableColumn<T> {
10
10
  key: keyof T;
11
11
  label: string;
12
12
  dataType: TableDataType<T>;
13
+ preSorted?: boolean;
13
14
  flexRatio?: number;
14
15
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AAS;QACb,MAAM,CAAC,KAAoB;YACzB,OAAO,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC9C,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,0GAA0G;AAC1G,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,cAAgC,EAChC,GAAY,EACM,EAAE,CAAC,CAAC;IACtB,GAAG,cAAc;IACjB,OAAO,EAAE,CAAC,CAAI,EAAE,CAAI,EAAE,EAAE,WACtB,OAAA,CAAA,MAAA,cAAc,CAAC,OAAO,+DAAG,CAAC,CAAC,GAAG,CAAM,EAAE,CAAC,CAAC,GAAG,CAAM,CAAC,KAAI,CAAC,CAAA,EAAA;IACzD,MAAM,EAAE,CAAC,IAAO,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAM,CAAC;CAC3D,CAAC,CAAC;AAEH,0GAA0G;AAC1G,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,QAA0B,EACR,EAAE,CAAC,CAAC;IACtB,GAAG,QAAQ;IACX,OAAO,EAAE,SAAS;CACnB,CAAC,CAAC","sourcesContent":["// T is the type you will be comparing and formatting\nimport { TemplateResult } from \"lit\";\nimport { formatDate, humanBytes } from \"@internetarchive/ads-library\";\n\nexport type SortComparisonResult = -1 | 0 | 1;\nexport type SortComparisonFunction<T> = (a: T, b: T) => SortComparisonResult;\n\nexport interface TableDataType<T> {\n compare: SortComparisonFunction<T> | undefined;\n format: (value: T) => string | TemplateResult;\n // will override default sort direction if provided\n defaultSortDirection?: \"ascending\" | \"descending\";\n}\n\n// Each table column extends a data type associated with it\nexport interface TableColumn<T> {\n key: keyof T;\n label: string;\n dataType: TableDataType<T>;\n // default is 1\n flexRatio?: number;\n // shown by default\n isHidden?: boolean;\n}\n\n// for basic string comparison\nexport const StringDataType: TableDataType<string> = {\n compare: (a: string, b: string): SortComparisonResult => {\n if (a.toLowerCase() === b.toLowerCase()) {\n return 0;\n }\n return a.toLowerCase() > b.toLowerCase() ? 1 : -1;\n },\n format(value: string): string | TemplateResult {\n return value;\n },\n};\n\n// for basic boolean comparison\nexport const BooleanDataType: TableDataType<boolean> = {\n compare: (a: boolean, b: boolean): SortComparisonResult => {\n if (a !== b) {\n return a ? 1 : -1;\n }\n return 0;\n },\n format(value: boolean): string | TemplateResult {\n return value.toString();\n },\n defaultSortDirection: \"descending\",\n};\n\n// for basic number comparison\nexport const NumberDataType: TableDataType<number> = {\n compare: (a: number, b: number): SortComparisonResult => {\n if (a === b) {\n return 0;\n }\n return a > b ? 1 : -1;\n },\n format(value: number): string | TemplateResult {\n return value.toFixed(0);\n },\n defaultSortDirection: \"descending\",\n};\n\n// for comparing and formatting dates - Note, date formatting operation\n// is SLOW relative to some other operations.\nexport const DateDataType: TableDataType<Date> = {\n compare: (a: Date, b: Date): SortComparisonResult => {\n return NumberDataType.compare?.(a.getTime(), b.getTime()) || 0;\n },\n format: (date: Date) => formatDate(date),\n defaultSortDirection: \"descending\",\n};\n\n// for comparing and formatting numbers that represent bytes\nexport const BytesDataType: TableDataType<number> = {\n compare: NumberDataType.compare,\n format: humanBytes,\n};\n\n// will return a DataType that extends the given DataType to handle undefined values\nexport const UndefinedHelpers = <T>(\n dataType: TableDataType<T>,\n): TableDataType<T | undefined> => {\n // if a compare function exists, extend it to handle potentially undefined inputs\n return {\n compare: dataType.compare\n ? (a: T | undefined, b: T | undefined) => {\n if (a && b) {\n return dataType.compare?.(a, b) || 0;\n } else if (a === b) {\n // both are undefined\n return 0;\n }\n // if a is defined, it's first, if not, b is defined and first\n return a ? 1 : -1;\n }\n : undefined,\n format(value: T | undefined): string | TemplateResult {\n return value ? dataType.format(value) : \"–\";\n },\n };\n};\n\n// quickly define a wrapper around an interface key, applying sorting / formatting rules from a given type\nexport const FromKey = <S, T>(\n targetDataType: TableDataType<S>,\n key: keyof T,\n): TableDataType<T> => ({\n ...targetDataType,\n compare: (a: T, b: T) =>\n targetDataType.compare?.(a[key] as S, b[key] as S) || 0,\n format: (item: T) => targetDataType.format(item[key] as S),\n});\n\n// will return a DataType to have an undefined comparison function, turning sorting off for this data type\nexport const NonSortable = <T>(\n dataType: TableDataType<T>,\n): TableDataType<T> => ({\n ...dataType,\n compare: undefined,\n});\n\nexport interface TableRow<T> {\n data: T;\n // row-specific unique identifier\n id: string;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,8BAA8B,CAAC;AA0BtE,8BAA8B;AAC9B,MAAM,CAAC,MAAM,cAAc,GAA0B;IACnD,OAAO,EAAE,CAAC,CAAS,EAAE,CAAS,EAAwB,EAAE;QACtD,IAAI,CAAC,CAAC,WAAW,EAAE,KAAK,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC;YACxC,OAAO,CAAC,CAAC;QACX,CAAC;QACD,OAAO,CAAC,CAAC,WAAW,EAAE,GAAG,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;IACpD,CAAC;IACD,MAAM,CAAC,KAAa;QAClB,OAAO,KAAK,CAAC;IACf,CAAC;CACF,CAAC;AAEF,+BAA+B;AAC/B,MAAM,CAAC,MAAM,eAAe,GAA2B;IACrD,OAAO,EAAE,CAAC,CAAU,EAAE,CAAU,EAAwB,EAAE;QACxD,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;YACZ,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QACpB,CAAC;QACD,OAAO,CAAC,CAAC;IACX,CAAC;IACD,MAAM,CAAC,KAAc;QACnB,OAAO,KAAK,CAAC,QAAQ,EAAE,CAAC;IAC1B,CAAC;IACD,oBAAoB,EAAE,YAAY;CACnC,CAAC;AAEF,8BAA8B;AAC9B,MAAM,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C;qBAAM,IAAI,CAAC,KAAK,CAAC,EAAE,CAAC;oBACnB,qBAAqB;oBACrB,OAAO,CAAC,CAAC;gBACX,CAAC;gBACD,8DAA8D;gBAC9D,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACpB,CAAC;YACH,CAAC,CAAC,SAAS;QACb,MAAM,CAAC,KAAoB;YACzB,OAAO,KAAK,CAAC,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC;QAC9C,CAAC;KACF,CAAC;AACJ,CAAC,CAAC;AAEF,0GAA0G;AAC1G,MAAM,CAAC,MAAM,OAAO,GAAG,CACrB,cAAgC,EAChC,GAAY,EACM,EAAE,CAAC,CAAC;IACtB,GAAG,cAAc;IACjB,OAAO,EAAE,CAAC,CAAI,EAAE,CAAI,EAAE,EAAE,WACtB,OAAA,CAAA,MAAA,cAAc,CAAC,OAAO,+DAAG,CAAC,CAAC,GAAG,CAAM,EAAE,CAAC,CAAC,GAAG,CAAM,CAAC,KAAI,CAAC,CAAA,EAAA;IACzD,MAAM,EAAE,CAAC,IAAO,EAAE,EAAE,CAAC,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,CAAM,CAAC;CAC3D,CAAC,CAAC;AAEH,0GAA0G;AAC1G,MAAM,CAAC,MAAM,WAAW,GAAG,CACzB,QAA0B,EACR,EAAE,CAAC,CAAC;IACtB,GAAG,QAAQ;IACX,OAAO,EAAE,SAAS;CACnB,CAAC,CAAC","sourcesContent":["// T is the type you will be comparing and formatting\nimport { TemplateResult } from \"lit\";\nimport { formatDate, humanBytes } from \"@internetarchive/ads-library\";\n\nexport type SortComparisonResult = -1 | 0 | 1;\nexport type SortComparisonFunction<T> = (a: T, b: T) => SortComparisonResult;\n\nexport interface TableDataType<T> {\n compare: SortComparisonFunction<T> | undefined;\n format: (value: T) => string | TemplateResult;\n // will override default sort direction if provided\n defaultSortDirection?: \"ascending\" | \"descending\";\n}\n\n// Each table column extends a data type associated with it\nexport interface TableColumn<T> {\n key: keyof T;\n label: string;\n dataType: TableDataType<T>;\n // will ignore the datatype compare function and will\n // display the rows as-is when this column is sorting\n preSorted?: boolean;\n // default is 1\n flexRatio?: number;\n // shown by default\n isHidden?: boolean;\n}\n\n// for basic string comparison\nexport const StringDataType: TableDataType<string> = {\n compare: (a: string, b: string): SortComparisonResult => {\n if (a.toLowerCase() === b.toLowerCase()) {\n return 0;\n }\n return a.toLowerCase() > b.toLowerCase() ? 1 : -1;\n },\n format(value: string): string | TemplateResult {\n return value;\n },\n};\n\n// for basic boolean comparison\nexport const BooleanDataType: TableDataType<boolean> = {\n compare: (a: boolean, b: boolean): SortComparisonResult => {\n if (a !== b) {\n return a ? 1 : -1;\n }\n return 0;\n },\n format(value: boolean): string | TemplateResult {\n return value.toString();\n },\n defaultSortDirection: \"descending\",\n};\n\n// for basic number comparison\nexport const NumberDataType: TableDataType<number> = {\n compare: (a: number, b: number): SortComparisonResult => {\n if (a === b) {\n return 0;\n }\n return a > b ? 1 : -1;\n },\n format(value: number): string | TemplateResult {\n return value.toFixed(0);\n },\n defaultSortDirection: \"descending\",\n};\n\n// for comparing and formatting dates - Note, date formatting operation\n// is SLOW relative to some other operations.\nexport const DateDataType: TableDataType<Date> = {\n compare: (a: Date, b: Date): SortComparisonResult => {\n return NumberDataType.compare?.(a.getTime(), b.getTime()) || 0;\n },\n format: (date: Date) => formatDate(date),\n defaultSortDirection: \"descending\",\n};\n\n// for comparing and formatting numbers that represent bytes\nexport const BytesDataType: TableDataType<number> = {\n compare: NumberDataType.compare,\n format: humanBytes,\n};\n\n// will return a DataType that extends the given DataType to handle undefined values\nexport const UndefinedHelpers = <T>(\n dataType: TableDataType<T>,\n): TableDataType<T | undefined> => {\n // if a compare function exists, extend it to handle potentially undefined inputs\n return {\n compare: dataType.compare\n ? (a: T | undefined, b: T | undefined) => {\n if (a && b) {\n return dataType.compare?.(a, b) || 0;\n } else if (a === b) {\n // both are undefined\n return 0;\n }\n // if a is defined, it's first, if not, b is defined and first\n return a ? 1 : -1;\n }\n : undefined,\n format(value: T | undefined): string | TemplateResult {\n return value ? dataType.format(value) : \"–\";\n },\n };\n};\n\n// quickly define a wrapper around an interface key, applying sorting / formatting rules from a given type\nexport const FromKey = <S, T>(\n targetDataType: TableDataType<S>,\n key: keyof T,\n): TableDataType<T> => ({\n ...targetDataType,\n compare: (a: T, b: T) =>\n targetDataType.compare?.(a[key] as S, b[key] as S) || 0,\n format: (item: T) => targetDataType.format(item[key] as S),\n});\n\n// will return a DataType to have an undefined comparison function, turning sorting off for this data type\nexport const NonSortable = <T>(\n dataType: TableDataType<T>,\n): TableDataType<T> => ({\n ...dataType,\n compare: undefined,\n});\n\nexport interface TableRow<T> {\n data: T;\n // row-specific unique identifier\n id: string;\n}\n"]}
@@ -1 +1 @@
1
- {"program":{"fileNames":["./node_modules/typescript/lib/lib.es5.d.ts","./node_modules/typescript/lib/lib.es2015.d.ts","./node_modules/typescript/lib/lib.es2016.d.ts","./node_modules/typescript/lib/lib.es2017.d.ts","./node_modules/typescript/lib/lib.es2018.d.ts","./node_modules/typescript/lib/lib.es2019.d.ts","./node_modules/typescript/lib/lib.es2020.d.ts","./node_modules/typescript/lib/lib.es2021.d.ts","./node_modules/typescript/lib/lib.dom.d.ts","./node_modules/typescript/lib/lib.es2015.core.d.ts","./node_modules/typescript/lib/lib.es2015.collection.d.ts","./node_modules/typescript/lib/lib.es2015.generator.d.ts","./node_modules/typescript/lib/lib.es2015.iterable.d.ts","./node_modules/typescript/lib/lib.es2015.promise.d.ts","./node_modules/typescript/lib/lib.es2015.proxy.d.ts","./node_modules/typescript/lib/lib.es2015.reflect.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2016.array.include.d.ts","./node_modules/typescript/lib/lib.es2016.intl.d.ts","./node_modules/typescript/lib/lib.es2017.date.d.ts","./node_modules/typescript/lib/lib.es2017.object.d.ts","./node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2017.string.d.ts","./node_modules/typescript/lib/lib.es2017.intl.d.ts","./node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","./node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","./node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","./node_modules/typescript/lib/lib.es2018.intl.d.ts","./node_modules/typescript/lib/lib.es2018.promise.d.ts","./node_modules/typescript/lib/lib.es2018.regexp.d.ts","./node_modules/typescript/lib/lib.es2019.array.d.ts","./node_modules/typescript/lib/lib.es2019.object.d.ts","./node_modules/typescript/lib/lib.es2019.string.d.ts","./node_modules/typescript/lib/lib.es2019.symbol.d.ts","./node_modules/typescript/lib/lib.es2019.intl.d.ts","./node_modules/typescript/lib/lib.es2020.bigint.d.ts","./node_modules/typescript/lib/lib.es2020.date.d.ts","./node_modules/typescript/lib/lib.es2020.promise.d.ts","./node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2020.string.d.ts","./node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2020.intl.d.ts","./node_modules/typescript/lib/lib.es2020.number.d.ts","./node_modules/typescript/lib/lib.es2021.promise.d.ts","./node_modules/typescript/lib/lib.es2021.string.d.ts","./node_modules/typescript/lib/lib.es2021.weakref.d.ts","./node_modules/typescript/lib/lib.es2021.intl.d.ts","./node_modules/typescript/lib/lib.decorators.d.ts","./node_modules/typescript/lib/lib.decorators.legacy.d.ts","./node_modules/tslib/tslib.d.ts","./node_modules/@lit/reactive-element/css-tag.d.ts","./node_modules/@lit/reactive-element/reactive-controller.d.ts","./node_modules/@lit/reactive-element/reactive-element.d.ts","./node_modules/@types/trusted-types/lib/index.d.ts","./node_modules/@types/trusted-types/index.d.ts","./node_modules/lit-html/directive.d.ts","./node_modules/lit-html/lit-html.d.ts","./node_modules/lit-element/lit-element.d.ts","./node_modules/lit-html/is-server.d.ts","./node_modules/lit/index.d.ts","./node_modules/@lit/reactive-element/decorators/base.d.ts","./node_modules/@lit/reactive-element/decorators/custom-element.d.ts","./node_modules/@lit/reactive-element/decorators/property.d.ts","./node_modules/@lit/reactive-element/decorators/state.d.ts","./node_modules/@lit/reactive-element/decorators/event-options.d.ts","./node_modules/@lit/reactive-element/decorators/query.d.ts","./node_modules/@lit/reactive-element/decorators/query-all.d.ts","./node_modules/@lit/reactive-element/decorators/query-async.d.ts","./node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts","./node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts","./node_modules/lit/decorators.d.ts","./node_modules/@internetarchive/ads-library/src/events.ts","./node_modules/type-fest/source/primitive.d.ts","./node_modules/type-fest/source/typed-array.d.ts","./node_modules/type-fest/source/basic.d.ts","./node_modules/type-fest/source/observable-like.d.ts","./node_modules/type-fest/source/keys-of-union.d.ts","./node_modules/type-fest/source/distributed-omit.d.ts","./node_modules/type-fest/source/distributed-pick.d.ts","./node_modules/type-fest/source/empty-object.d.ts","./node_modules/type-fest/source/if-empty-object.d.ts","./node_modules/type-fest/source/required-keys-of.d.ts","./node_modules/type-fest/source/has-required-keys.d.ts","./node_modules/type-fest/source/is-equal.d.ts","./node_modules/type-fest/source/except.d.ts","./node_modules/type-fest/source/require-at-least-one.d.ts","./node_modules/type-fest/source/non-empty-object.d.ts","./node_modules/type-fest/source/unknown-record.d.ts","./node_modules/type-fest/source/unknown-array.d.ts","./node_modules/type-fest/source/tagged-union.d.ts","./node_modules/type-fest/source/simplify.d.ts","./node_modules/type-fest/source/writable.d.ts","./node_modules/type-fest/source/trim.d.ts","./node_modules/type-fest/source/is-any.d.ts","./node_modules/type-fest/source/numeric.d.ts","./node_modules/type-fest/source/greater-than.d.ts","./node_modules/type-fest/source/greater-than-or-equal.d.ts","./node_modules/type-fest/source/less-than.d.ts","./node_modules/type-fest/source/is-never.d.ts","./node_modules/type-fest/source/is-literal.d.ts","./node_modules/type-fest/source/internal.d.ts","./node_modules/type-fest/source/writable-deep.d.ts","./node_modules/type-fest/source/omit-index-signature.d.ts","./node_modules/type-fest/source/pick-index-signature.d.ts","./node_modules/type-fest/source/merge.d.ts","./node_modules/type-fest/source/conditional-simplify.d.ts","./node_modules/type-fest/source/enforce-optional.d.ts","./node_modules/type-fest/source/merge-deep.d.ts","./node_modules/type-fest/source/merge-exclusive.d.ts","./node_modules/type-fest/source/require-exactly-one.d.ts","./node_modules/type-fest/source/require-all-or-none.d.ts","./node_modules/type-fest/source/require-one-or-none.d.ts","./node_modules/type-fest/source/single-key-object.d.ts","./node_modules/type-fest/source/partial-deep.d.ts","./node_modules/type-fest/source/required-deep.d.ts","./node_modules/type-fest/source/paths.d.ts","./node_modules/type-fest/source/union-to-intersection.d.ts","./node_modules/type-fest/source/pick-deep.d.ts","./node_modules/type-fest/source/sum.d.ts","./node_modules/type-fest/source/subtract.d.ts","./node_modules/type-fest/source/array-splice.d.ts","./node_modules/type-fest/source/literal-union.d.ts","./node_modules/type-fest/source/shared-union-fields-deep.d.ts","./node_modules/type-fest/source/omit-deep.d.ts","./node_modules/type-fest/source/is-unknown.d.ts","./node_modules/type-fest/source/if-unknown.d.ts","./node_modules/type-fest/source/partial-on-undefined-deep.d.ts","./node_modules/type-fest/source/undefined-on-partial-deep.d.ts","./node_modules/type-fest/source/readonly-deep.d.ts","./node_modules/type-fest/source/promisable.d.ts","./node_modules/type-fest/source/opaque.d.ts","./node_modules/type-fest/source/invariant-of.d.ts","./node_modules/type-fest/source/set-optional.d.ts","./node_modules/type-fest/source/set-readonly.d.ts","./node_modules/type-fest/source/set-required.d.ts","./node_modules/type-fest/source/set-non-nullable.d.ts","./node_modules/type-fest/source/value-of.d.ts","./node_modules/type-fest/source/async-return-type.d.ts","./node_modules/type-fest/source/conditional-keys.d.ts","./node_modules/type-fest/source/conditional-except.d.ts","./node_modules/type-fest/source/conditional-pick.d.ts","./node_modules/type-fest/source/conditional-pick-deep.d.ts","./node_modules/type-fest/source/stringified.d.ts","./node_modules/type-fest/source/join.d.ts","./node_modules/type-fest/source/less-than-or-equal.d.ts","./node_modules/type-fest/source/array-slice.d.ts","./node_modules/type-fest/source/string-slice.d.ts","./node_modules/type-fest/source/fixed-length-array.d.ts","./node_modules/type-fest/source/multidimensional-array.d.ts","./node_modules/type-fest/source/multidimensional-readonly-array.d.ts","./node_modules/type-fest/source/iterable-element.d.ts","./node_modules/type-fest/source/entry.d.ts","./node_modules/type-fest/source/entries.d.ts","./node_modules/type-fest/source/set-return-type.d.ts","./node_modules/type-fest/source/set-parameter-type.d.ts","./node_modules/type-fest/source/asyncify.d.ts","./node_modules/type-fest/source/jsonify.d.ts","./node_modules/type-fest/source/jsonifiable.d.ts","./node_modules/type-fest/source/schema.d.ts","./node_modules/type-fest/source/literal-to-primitive.d.ts","./node_modules/type-fest/source/literal-to-primitive-deep.d.ts","./node_modules/type-fest/source/string-key-of.d.ts","./node_modules/type-fest/source/exact.d.ts","./node_modules/type-fest/source/readonly-tuple.d.ts","./node_modules/type-fest/source/optional-keys-of.d.ts","./node_modules/type-fest/source/override-properties.d.ts","./node_modules/type-fest/source/has-optional-keys.d.ts","./node_modules/type-fest/source/readonly-keys-of.d.ts","./node_modules/type-fest/source/has-readonly-keys.d.ts","./node_modules/type-fest/source/writable-keys-of.d.ts","./node_modules/type-fest/source/has-writable-keys.d.ts","./node_modules/type-fest/source/spread.d.ts","./node_modules/type-fest/source/tuple-to-union.d.ts","./node_modules/type-fest/source/int-range.d.ts","./node_modules/type-fest/source/if-any.d.ts","./node_modules/type-fest/source/if-never.d.ts","./node_modules/type-fest/source/array-indices.d.ts","./node_modules/type-fest/source/array-values.d.ts","./node_modules/type-fest/source/set-field-type.d.ts","./node_modules/type-fest/source/split-words.d.ts","./node_modules/type-fest/source/camel-case.d.ts","./node_modules/type-fest/source/camel-cased-properties.d.ts","./node_modules/type-fest/source/camel-cased-properties-deep.d.ts","./node_modules/type-fest/source/delimiter-case.d.ts","./node_modules/type-fest/source/kebab-case.d.ts","./node_modules/type-fest/source/delimiter-cased-properties.d.ts","./node_modules/type-fest/source/kebab-cased-properties.d.ts","./node_modules/type-fest/source/delimiter-cased-properties-deep.d.ts","./node_modules/type-fest/source/kebab-cased-properties-deep.d.ts","./node_modules/type-fest/source/pascal-case.d.ts","./node_modules/type-fest/source/pascal-cased-properties.d.ts","./node_modules/type-fest/source/pascal-cased-properties-deep.d.ts","./node_modules/type-fest/source/snake-case.d.ts","./node_modules/type-fest/source/snake-cased-properties.d.ts","./node_modules/type-fest/source/snake-cased-properties-deep.d.ts","./node_modules/type-fest/source/includes.d.ts","./node_modules/type-fest/source/screaming-snake-case.d.ts","./node_modules/type-fest/source/split.d.ts","./node_modules/type-fest/source/replace.d.ts","./node_modules/type-fest/source/get.d.ts","./node_modules/type-fest/source/last-array-element.d.ts","./node_modules/type-fest/source/global-this.d.ts","./node_modules/type-fest/source/package-json.d.ts","./node_modules/type-fest/source/tsconfig-json.d.ts","./node_modules/type-fest/index.d.ts","./node_modules/camelcase-keys/index.d.ts","./node_modules/@internetarchive/ads-library/src/api.ts","./node_modules/@internetarchive/ads-library/src/browser.ts","./node_modules/@internetarchive/ads-library/src/formats.ts","./node_modules/@internetarchive/ads-library/src/index.ts","./src/types.ts","./src/ads-table.ts","./src/ads-table-storybook.ts","./src/index.ts","./node_modules/@types/estree/index.d.ts","./node_modules/@types/resolve/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/semver/classes/semver.d.ts","../../node_modules/@types/semver/functions/parse.d.ts","../../node_modules/@types/semver/functions/valid.d.ts","../../node_modules/@types/semver/functions/clean.d.ts","../../node_modules/@types/semver/functions/inc.d.ts","../../node_modules/@types/semver/functions/diff.d.ts","../../node_modules/@types/semver/functions/major.d.ts","../../node_modules/@types/semver/functions/minor.d.ts","../../node_modules/@types/semver/functions/patch.d.ts","../../node_modules/@types/semver/functions/prerelease.d.ts","../../node_modules/@types/semver/functions/compare.d.ts","../../node_modules/@types/semver/functions/rcompare.d.ts","../../node_modules/@types/semver/functions/compare-loose.d.ts","../../node_modules/@types/semver/functions/compare-build.d.ts","../../node_modules/@types/semver/functions/sort.d.ts","../../node_modules/@types/semver/functions/rsort.d.ts","../../node_modules/@types/semver/functions/gt.d.ts","../../node_modules/@types/semver/functions/lt.d.ts","../../node_modules/@types/semver/functions/eq.d.ts","../../node_modules/@types/semver/functions/neq.d.ts","../../node_modules/@types/semver/functions/gte.d.ts","../../node_modules/@types/semver/functions/lte.d.ts","../../node_modules/@types/semver/functions/cmp.d.ts","../../node_modules/@types/semver/functions/coerce.d.ts","../../node_modules/@types/semver/classes/comparator.d.ts","../../node_modules/@types/semver/classes/range.d.ts","../../node_modules/@types/semver/functions/satisfies.d.ts","../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../node_modules/@types/semver/ranges/min-version.d.ts","../../node_modules/@types/semver/ranges/valid.d.ts","../../node_modules/@types/semver/ranges/outside.d.ts","../../node_modules/@types/semver/ranges/gtr.d.ts","../../node_modules/@types/semver/ranges/ltr.d.ts","../../node_modules/@types/semver/ranges/intersects.d.ts","../../node_modules/@types/semver/ranges/simplify.d.ts","../../node_modules/@types/semver/ranges/subset.d.ts","../../node_modules/@types/semver/internals/identifiers.d.ts","../../node_modules/@types/semver/index.d.ts"],"fileInfos":[{"version":"824cb491a40f7e8fdeb56f1df5edf91b23f3e3ee6b4cde84d4a99be32338faee","affectsGlobalScope":true},"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","9a68c0c07ae2fa71b44384a839b7b8d81662a236d4b9ac30916718f7510b1b2d","5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569",{"version":"87d693a4920d794a73384b3c779cadcb8548ac6945aa7a925832fe2418c9527a","affectsGlobalScope":true},{"version":"138fb588d26538783b78d1e3b2c2cc12d55840b97bf5e08bca7f7a174fbe2f17","affectsGlobalScope":true},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true},{"version":"4443e68b35f3332f753eacc66a04ac1d2053b8b035a0e0ac1d455392b5e243b3","affectsGlobalScope":true},{"version":"bc47685641087c015972a3f072480889f0d6c65515f12bd85222f49a98952ed7","affectsGlobalScope":true},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true},{"version":"93495ff27b8746f55d19fcbcdbaccc99fd95f19d057aed1bd2c0cafe1335fbf0","affectsGlobalScope":true},{"version":"6fc23bb8c3965964be8c597310a2878b53a0306edb71d4b5a4dfe760186bcc01","affectsGlobalScope":true},{"version":"ea011c76963fb15ef1cdd7ce6a6808b46322c527de2077b6cfdf23ae6f5f9ec7","affectsGlobalScope":true},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true},{"version":"bb42a7797d996412ecdc5b2787720de477103a0b2e53058569069a0e2bae6c7e","affectsGlobalScope":true},{"version":"4738f2420687fd85629c9efb470793bb753709c2379e5f85bc1815d875ceadcd","affectsGlobalScope":true},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true},{"version":"9fc46429fbe091ac5ad2608c657201eb68b6f1b8341bd6d670047d32ed0a88fa","affectsGlobalScope":true},{"version":"61c37c1de663cf4171e1192466e52c7a382afa58da01b1dc75058f032ddf0839","affectsGlobalScope":true},{"version":"b541a838a13f9234aba650a825393ffc2292dc0fc87681a5d81ef0c96d281e7a","affectsGlobalScope":true},{"version":"b20fe0eca9a4e405f1a5ae24a2b3290b37cf7f21eba6cbe4fc3fab979237d4f3","affectsGlobalScope":true},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true},{"version":"49ed889be54031e1044af0ad2c603d627b8bda8b50c1a68435fe85583901d072","affectsGlobalScope":true},{"version":"e93d098658ce4f0c8a0779e6cab91d0259efb88a318137f686ad76f8410ca270","affectsGlobalScope":true},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true},{"version":"bf14a426dbbf1022d11bd08d6b8e709a2e9d246f0c6c1032f3b2edb9a902adbe","affectsGlobalScope":true},{"version":"5e07ed3809d48205d5b985642a59f2eba47c402374a7cf8006b686f79efadcbd","affectsGlobalScope":true},{"version":"2b72d528b2e2fe3c57889ca7baef5e13a56c957b946906d03767c642f386bbc3","affectsGlobalScope":true},{"version":"8073890e29d2f46fdbc19b8d6d2eb9ea58db9a2052f8640af20baff9afbc8640","affectsGlobalScope":true},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true},{"version":"51e547984877a62227042850456de71a5c45e7fe86b7c975c6e68896c86fa23b","affectsGlobalScope":true},{"version":"956d27abdea9652e8368ce029bb1e0b9174e9678a273529f426df4b3d90abd60","affectsGlobalScope":true},{"version":"33358442698bb565130f52ba79bfd3d4d484ac85fe33f3cb1759c54d18201393","affectsGlobalScope":true},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true},"7a1971efcba559ea9002ada4c4e3c925004fb67a755300d53b5edf9399354900","e056bb30bf82271634daeee81f772f4a7960085f01f6d4d09c8da1ebe5f6a623","5e30131b6a5587fe666926ad1d9807e733c0a597ed12d682669fcaa331aea576",{"version":"86492a546c3308feaf1dde967afd325c321483b5e96f5fa9e9b6e691dc23fa9e","affectsGlobalScope":true},"15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e",{"version":"2c3b8be03577c98530ef9cb1a76e2c812636a871f367e9edf4c5f3ce702b77f8","affectsGlobalScope":true},"d4b4f6148a6444ec92db4ac4c7dd7050ffc32b21a10276a59498e04740e8fd8d","2524f58c8d67af441b487c0ce0e0dd9c18bf3d06c05f621874dcda9780d8e22c","c7dd759e5948a94b42422ba7cf70eb8455416def9447614a3bdc1a99b81fc8bb","1bcd560deed90a43c51b08aa18f7f55229f2e30974ab5ed1b7bb5721be379013","dc08fe04e50bc24d1baded4f33e942222bbdd5d77d6341a93cfe6e4e4586a3be","cdeae34aca6700620ebf3f27cf7d439c3af97595dd6e2729fa4780483add5680","3ff87ea3471b51beaf4aa8fd8f4422862b11d343fdbb55bf383e0f8cc195a445","1cc188904259bd0985b24d9dc2a160891cb5e94210901466b951716fcdb4ff62","732fb71ecb695d6f36ddcbb72ebfe4ff6b6491d45101a00fa2b75a26b80d640f","039cb05125d7621f8143616c495b8e6b54249c4e64d2754b80ff93867f7f4b01","1b81f1fa82ad30af01ab1cae91ccaddc10c48f5916bbd6d282155e44a65d858d","a0fc7a02a75802678a67000607f20266cf1a49dc0e787967efe514e31b9ed0c3","5ebf098a1d81d400b8af82807cf19893700335cf91a7b9dbd83a5d737af34b11","101cf83ac3f9c5e1a7355a02e4fbe988877ef83c4ebec0ff0f02b2af022254a3","d017e2fcd44b46ca80cd2b592a6314e75f5caab5bda230f0f4a45e964049a43a","a8992b852521a66f63e0cedc6e1f054b28f972232b6fa5ca59771db6a1c8bbea","99fcb5cb22533d211b6eeb306649d1d3fe6bc2a44e627506ce563e0618e9dfa8","cd51ceafea7762ad639afb3ca5b68e1e4ffeaacaa402d7ef2cae17016e29e098","1b8357b3fef5be61b5de6d6a4805a534d68fe3e040c11f1944e27d4aec85936a","130ec22c8432ade59047e0225e552c62a47683d870d44785bee95594c8d65408",{"version":"4f24c2781b21b6cd65eede543669327d68a8cf0c6d9cf106a1146b164a7c8ef9","affectsGlobalScope":true},"8c44636cd32c9f5279e967d56e67d7623341d90382871adf63eb9ba427a3f820","d9720d542df1d7feba0aa80ed11b4584854951f9064232e8d7a76e65dc676136","d0fb3d0c64beba3b9ab25916cc018150d78ccb4952fac755c53721d9d624ba0d","86b484bcf6344a27a9ee19dd5cef1a5afbbd96aeb07708cc6d8b43d7dfa8466c","ba93f0192c9c30d895bee1141dd0c307b75df16245deef7134ac0152294788cc","75a7db3b7ddf0ca49651629bb665e0294fda8d19ba04fddc8a14d32bb35eb248","eb31477c87de3309cbe4e9984fa74a052f31581edb89103f8590f01874b4e271","15ab3db8aa099e50e8e6edd5719b05dd8abf2c75f56dc3895432d92ec3f6cd6b","6ff14b0a89cb61cef9424434ee740f91b239c09272c02031db85d388b84b7442","865f3db83300a1303349cc49ed80943775a858e0596e7e5a052cc65ac03b10bb","28fa41063a242eafcf51e1a62013fccdd9fd5d6760ded6e3ff5ce10a13c2ab31","ada60ff3698e7fd0c7ed0e4d93286ee28aed87f648f6748e668a57308fde5a67","1a67ba5891772a62706335b59a50720d89905196c90719dad7cec9c81c2990e6","5d6f919e1966d45ea297c2478c1985d213e41e2f9a6789964cdb53669e3f7a6f","884eaf5bcae2539fd5e7219561315c02e6d5cb452df236b7d6a08e961ec11dad","d7735a9ccd17767352ab6e799d76735016209aadd5c038a2fc07a29e7b235f02","8504003e88870caa5474ab8bd270f318d0985ba7ede4ee30fe37646768b5362a","1cf99fe49768500d01d873870085c68caa2b311fd40c1b05e831de0306f5f257","705e3c77bc26211b37a4cce5fe66a49fe7e8262023765eea335976a26e5c0f48","3ab9e6df1adff76fd09605427966e58c2628dc4dd91cbf8eda15ef08611c3828","0915ce92bb54e905387b7907e98982620cb7143f7b44291974fb2e592602fe00","3cd6df04a43858a6d18402c87a22a68534425e1c8c2fc5bb53fead29af027fcc","f9b229aaa696a31f6566b290305f99e5471340b0a041d5ae9bd291f69d96a618","896f58c68322025b149b953b9748f58c73baa7712cf4bd96f9dfd4472adf59f2","a053db14ce413b71dea2ead95731c838a1f25d4b2655899213e6c8090b313d99","843e98d09268e2b5b9e6ff60487cf68f4643a72c2e55f7c29b35d1091a4ee4e9","4502caaa3fff6c9766bfc145b1b586ef26d53e5f104271db046122b8eef57fd1","382f061a24f63ef8bfb1f7a748e1a2568ea62fb91ed1328901a6cf5ad129d61c","6927ceeb41bb451f47593de0180c8ff1be7403965d10dc9147ee8d5c91372fff","ef4c9ef3ec432ccbf6508f8aa12fbb8b7f4d535c8b484258a3888476de2c6c36","952c4a8d2338e19ef26c1c0758815b1de6c082a485f88368f5bece1e555f39d4","ea159c326134119644f5f9b84c43c62f727400e8f74101307f3810a04d63b4a1","f981ffdbd651f67db134479a5352dac96648ca195f981284e79dc0a1dbc53fd5","a1c85a61ff2b66291676ab84ae03c1b1ff7139ffde1942173f6aee8dc4ee357b","b7c8d88e7e36758e8dc59551c04a97b61dc12d9add949ca84e355e03921ef548","f1a5a12e04ad1471647484e7ff11e36eef7960f54740f2e60e17799d99d6f5ab","02f9dc3cac531ad3fdc7514ef06dd4462a9b4904836640678c4871d6f8dcaaf0","ed1b2a459aa469d032f0bd482f4550d0bcd38e9e013532907eb30157054a52d7","5a0d920468aa4e792285943cadad77bcb312ba2acf1c665e364ada1b1ee56264","fd4362832f71cd8910a72732c2ee62bd9fb843f5a34b2f5c5dba217edb3e58d2","928f96b9948742cbaec33e1c34c406c127c2dad5906edb7df08e92b963500a41","a2e4333bf0c330ae26b90c68e395ad0a8af06121f1c977979c75c4a5f9f6bc29","e45042186d925b3b677942b9d3a836a89f6e6bf4a8ac954747283b23cf69d44b","b5398d8209a0e0021f5245d141a5882930d1007f5af8273c6a27be3f73f43814","f29768cdfdf7120ace7341b42cdcf1a215933b65da9b64784e9d5b8c7b0e1d3d","da2aa652d2bf03cc042e2ff31e4194f4f18f042b8344dcb2568f761daaf7869f","e68a372f031a576af235bb036e9fa655c731039145e21f2e53cf9ec05987720a","9ce1974fec7e50f8610db4db76cf680b5f138f9f7606eda3aa2f7cdc2b25cf64","3146e973c617598b8e2866b811fdfcafe71e162e907d717758d2412ba9b72c28","309586820e31406ed70bb03ea8bca88b7ec15215e82d0aa85392da25d0b68630","98245fec2e886e8eb5398ce8f734bd0d0b05558c6633aefc09b48c4169596e4e","bc804b7497ce6bd5ac86d416711ffaf7b10e7bc160a1e4a9ed519ee30269e489","c6843fd4514c67ab4caf76efab7772ceb990fbb1a09085fbcf72b4437a307cf7","03ed68319c97cd4ce8f1c4ded110d9b40b8a283c3242b9fe934ccfa834e45572","ef47cea0b5bceb9c5f14c27f6c5430c7a7340ba1ed256bee80c77b8490e7647a","7052a59c7fb2efb270f0bf4b3e88cde5fb8a6db42e597474294774118b6db2cd","b0cefbc19466a38f5883079f0845babcb856637f7d4f3f594b746d39b74390f7","16219e7997bfc39ed9e0bb5f068646c0cdc15de5658d1263e2b44adf0a94ebef","4ccedab1527b8bf338730810280cce9f7caf450f1e9e2a6cbabaa880d80d4cf9","1f0ee5ddb64540632c6f9a5b63e242b06e49dd6472f3f5bd7dfeb96d12543e15","18b86125c67d99150f54225df07349ddd07acde086b55f3eeac1c34c81e424d8","2d3f23c577a913d0f396184f31998507e18c8712bc74303a433cf47f94fd7e07","e804dae55e7fd99d5e47320e39b25c6907e62ba9e984cda5fcb926196f1a2557","aa79b64f5b3690c66892f292e63dfe3e84eb678a886df86521f67c109d57a0c5","a692e092c3b9860c9554698d84baf308ba51fc8f32ddd6646e01a287810b16c6","64df9b13259fe3e3fea8ed9cdce950b7a0d40859d706c010eeea8c8d353d53fd","1848ebe5252ccb5ca1ca4ff52114516bdbbc7512589d6d0839beeea768bfb400","d2e3a1de4fde9291f9fb3b43672a8975a83e79896466f1af0f50066f78dbf39e","e37650b39727a6cf036c45a2b6df055e9c69a0afdd6dbab833ab957eb7f1a389","47424acf4233b4fb01c95ee89eeb4f86c00f0183b97dca411ca2e8ea364d955a","dd8ded51112dedf953e09e211e423bcc9c8a3943b4b42d0c66c89466e55635a6","31073e7d0e51f33b1456ff2ab7f06546c95e24e11c29d5b39a634bc51f86d914","9ce0473b0fbaf7287afb01b6a91bd38f73a31093e59ee86de1fd3f352f3fc817","6f0d708924c3c4ee64b0fef8f10ad2b4cb87aa70b015eb758848c1ea02db0ed7","a90339d50728b60f761127fe75192e632aa07055712a377acd8d20bb5d61e80c","37569cc8f21262ca62ec9d3aa8eb5740f96e1f325fad3d6aa00a19403bd27b96","fa18c6fe108031717db1ada404c14dc75b8b38c54daa3bb3af4c4999861ca653","14be139e0f6d380a3d24aaf9b67972add107bea35cf7f2b1b1febac6553c3ede","23195b09849686462875673042a12b7f4cd34b4e27d38e40ca9c408dae8e6656","ff1731974600a4dad7ec87770e95fc86ca3d329b1ce200032766340f83585e47","8736a50583d6bb5f8529ebfbe34c909a6fe0d443005083637d4d9b482f840c94","8dd284442b56814717e70f11ca22f4ea5b35feeca680f475bfcf8f65ba4ba296","95956d470e8b5a94cb86d437480e3e2cb65d00cd5f79f7521b57de3fc0726de9","e79e530a8216ee171b4aca8fc7b99bd37f5e84555cba57dc3de4cd57580ff21a","ceb2c0bc630cca2d0fdd48b0f48915d1e768785efaabf50e31c8399926fee5b1","f351eaa598ba2046e3078e5480a7533be7051e4db9212bb40f4eeb84279aa24d","918a3548c08e566b04a61b4eb13955f19b2b82eca35cf4f7d02eaf0145d01db4","4ce53edb8fb1d2f8b2f6814084b773cdf5846f49bf5a426fbe4029327bda95bf","1edc9192dfc277c60b92525cdfa1980e1bfd161ae77286c96777d10db36be73c","85d63aaff358e8390b666a6bc68d3f56985f18764ab05f750cb67910f7bccb1a","0a0bf0cb43af5e0ac1703b48325ebc18ad86f6bf796bdbe96a429c0e95ca4486","22fcfd509683e3edfaf0150c255f6afdf437fec04f033f56b43d66fe392e2ad3","f08d2151bd91cdaa152532d51af04e29201cfc5d1ea40f8f7cfca0eb4f0b7cf3","3d5d9aa6266ea07199ce0a1e1f9268a56579526fad4b511949ddb9f974644202","b9c889d8a4595d02ebb3d3a72a335900b2fe9e5b5c54965da404379002b4ac44","587ce54f0e8ad1eea0c9174d6f274fb859648cebb2b8535c7adb3975aee74c21","1502a23e43fd7e9976a83195dc4eaf54acaff044687e0988a3bd4f19fc26b02b","519309b84996e8aea3e0fc269814104f12ea3b2ed2140c856c8c8b6b1b76b8d9","d9c6f10eebf03d123396d4fee1efbe88bc967a47655ec040ffe7e94271a34fc7","0f2c77683296ca2d0e0bee84f8aa944a05df23bc4c5b5fef31dda757e75f660f","380b4fe5dac74984ac6a58a116f7726bede1bdca7cec5362034c0b12971ac9c1","00de72aa7abede86b016f0b3bfbf767a08b5cff060991b0722d78b594a4c2105","710e09a2711b011cc9681d237da0c1c450d12551b0d21c764826822e548b5464","11e4e2be18385fa1b4ffa0244c6c626f767058f445bbc66f1c7155cc8e1ec5b4","f47280c45ddbc8aa4909396e1d8b526f64dfad4a845aec2356a6c1dc7b6fe722","7b7f39411329342a28ea19a4ca3aa4c7f7d888c9f01a411b05e4126280026ea6","7f89aebd8a6aa9ff7dfc72d12352478f1db227e2d79d5b5f9d8a59cf1b5c6b48","7d936e6db7d5d73c02471a8e872739f1ddbacf213c159e97d1d94cca315ea3f2","a86492d82baf906c071536e8de073e601eaa5deed138c2d9c42d471d72395d7e","789110b95e963c99ace4e9ad8b60901201ddc4cab59f32bde5458c1359a4d887","92eb8a98444729aa61be5e6e489602363d763da27d1bcfdf89356c1d360484da","8b1b00637b2d15830b84bd51be2a42168ba9d2bec706da55215db3d034737e0e","d729b8b400507b9b51ff40d11e012379dbf0acd6e2f66bf596a3bc59444d9bf1","32ac4394bb4b0348d46211f2575f22ab762babb399aca1e34cf77998cdef73b2","665c7850d78c30326b541d50c4dfad08cea616a7f58df6bb9c4872dd36778ad0","1567c6dcf728b0c1044606f830aafd404c00590af56d375399edef82e9ddce92","c00b402135ef36fb09d59519e34d03445fd6541c09e68b189abb64151f211b12","e08e58ac493a27b29ceee80da90bb31ec64341b520907d480df6244cdbec01f8","c0fe2b1135ca803efa203408c953e1e12645b8065e1a4c1336ad8bb11ea1101b","d82c245bfb76da44dd573948eca299ff75759b9714f8410468d2d055145a4b64","25b1108faedaf2043a97a76218240b1b537459bbca5ae9e2207c236c40dcfdef","5a4d0b09de173c391d5d50064fc20166becc194248b1ce738e8a56af5196d28c","0e0b8353d6d7f7cc3344adbabf3866e64f2f2813b23477254ba51f69e8fdf0eb","5b73f64003389d41273a4caab40cf80419156b01e777d53a184e7f42776c8094","db08c1807e3ae065930d88a3449d926273816d019e6c2a534e82da14e796686d","9e5c7463fc0259a38938c9afbdeda92e802cff87560277fd3e385ad24663f214","ef83477cca76be1c2d0539408c32b0a2118abcd25c9004f197421155a4649c37","3266af228c9961f6b63a6fa30b1ddd11642696a88a6779aabba3afb3d812a5d2","32399d30d99b2f47e1a36831db55c938aaad02856445bab28fc869aac488c094","cf2515244e6f0016e4f6af83031e714ba4c01ddaad48a8949e6433332e6f0c2d","76c9759bd624366b91248c109d71511407c81bbc3df6eaca5ae6a770c3a61fc1","183debab24b5c2fb0dd05ce51d84e6aa59c9499952062e215a4357eeb0732f6a","d3943bf1135f414c0e25b9e20845b02eb35c1f1bcb8ebead3dc43cb0942b4eda","0e794541b2fa3b96113d868c12346d9c9ae565cace5677afb356d10c5ee477b9",{"version":"00ddd0a1a650280eecb2ecc6240d36a73a2377d8d783aafaa16fcba8512fde41","signature":"e6385ad1bae3bc64bee2431edaabc90faa08ab22820370c9f15d5ffcac1a5899"},{"version":"47f7ed945049caac3301148af4a6bfea786670a59106f51b23e36b62ace075c9","signature":"5c9ee6863aa27c041ddf87d5aaaf677d95fe31f4e8970271ea02bee06b3440af"},{"version":"19b7ef1651546454a568dcca70cc8dc6aae882fd43a0b8bb51861156df3f47b6","signature":"37546d1064dd9387352471fa78de778906a50c09366a879fda42b26caf386551"},{"version":"a93ac4780f69f1b2f601a350bdda88ed3cc937b37e6092280ca9ccaadad08d74","signature":"e38bc79cf0fcd29b5a7435e04bf583d1d924d382e791c7a5ec356c509c841f14"},"ee7d8894904b465b072be0d2e4b45cf6b887cdba16a467645c4e200982ece7ea","8baa5d0febc68db886c40bf341e5c90dc215a90cd64552e47e8184be6b7e3358","f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","cf3d384d082b933d987c4e2fe7bfb8710adfd9dc8155190056ed6695a25a559e","9871b7ee672bc16c78833bdab3052615834b08375cb144e4d2cba74473f4a589","c863198dae89420f3c552b5a03da6ed6d0acfa3807a64772b895db624b0de707","8b03a5e327d7db67112ebbc93b4f744133eda2c1743dbb0a990c61a8007823ef","86c73f2ee1752bac8eeeece234fd05dfcf0637a4fbd8032e4f5f43102faa8eec","42fad1f540271e35ca37cecda12c4ce2eef27f0f5cf0f8dd761d723c744d3159","ff3743a5de32bee10906aff63d1de726f6a7fd6ee2da4b8229054dfa69de2c34","83acd370f7f84f203e71ebba33ba61b7f1291ca027d7f9a662c6307d74e4ac22","1445cec898f90bdd18b2949b9590b3c012f5b7e1804e6e329fb0fe053946d5ec","0e5318ec2275d8da858b541920d9306650ae6ac8012f0e872fe66eb50321a669","cf530297c3fb3a92ec9591dd4fa229d58b5981e45fe6702a0bd2bea53a5e59be","c1f6f7d08d42148ddfe164d36d7aba91f467dbcb3caa715966ff95f55048b3a4","f4e9bf9103191ef3b3612d3ec0044ca4044ca5be27711fe648ada06fad4bcc85","0c1ee27b8f6a00097c2d6d91a21ee4d096ab52c1e28350f6362542b55380059a","7677d5b0db9e020d3017720f853ba18f415219fb3a9597343b1b1012cfd699f7","bc1c6bc119c1784b1a2be6d9c47addec0d83ef0d52c8fbe1f14a51b4dfffc675","52cf2ce99c2a23de70225e252e9822a22b4e0adb82643ab0b710858810e00bf1","770625067bb27a20b9826255a8d47b6b5b0a2d3dfcbd21f89904c731f671ba77","d1ed6765f4d7906a05968fb5cd6d1db8afa14dbe512a4884e8ea5c0f5e142c80","799c0f1b07c092626cf1efd71d459997635911bb5f7fc1196efe449bba87e965","2a184e4462b9914a30b1b5c41cf80c6d3428f17b20d3afb711fff3f0644001fd","9eabde32a3aa5d80de34af2c2206cdc3ee094c6504a8d0c2d6d20c7c179503cc","397c8051b6cfcb48aa22656f0faca2553c5f56187262135162ee79d2b2f6c966","a8ead142e0c87dcd5dc130eba1f8eeed506b08952d905c47621dc2f583b1bff9","a02f10ea5f73130efca046429254a4e3c06b5475baecc8f7b99a0014731be8b3","c2576a4083232b0e2d9bd06875dd43d371dee2e090325a9eac0133fd5650c1cb","4c9a0564bb317349de6a24eb4efea8bb79898fa72ad63a1809165f5bd42970dd","f40ac11d8859092d20f953aae14ba967282c3bb056431a37fced1866ec7a2681","cc11e9e79d4746cc59e0e17473a59d6f104692fd0eeea1bdb2e206eabed83b03","b444a410d34fb5e98aa5ee2b381362044f4884652e8bc8a11c8fe14bbd85518e","c35808c1f5e16d2c571aa65067e3cb95afeff843b259ecfa2fc107a9519b5392","14d5dc055143e941c8743c6a21fa459f961cbc3deedf1bfe47b11587ca4b3ef5","a3ad4e1fc542751005267d50a6298e6765928c0c3a8dce1572f2ba6ca518661c","f237e7c97a3a89f4591afd49ecb3bd8d14f51a1c4adc8fcae3430febedff5eb6","3ffdfbec93b7aed71082af62b8c3e0cc71261cc68d796665faa1e91604fbae8f","662201f943ed45b1ad600d03a90dffe20841e725203ced8b708c91fcd7f9379a","c9ef74c64ed051ea5b958621e7fb853fe3b56e8787c1587aefc6ea988b3c7e79","2462ccfac5f3375794b861abaa81da380f1bbd9401de59ffa43119a0b644253d","34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","7d8ddf0f021c53099e34ee831a06c394d50371816caa98684812f089b4c6b3d4"],"root":[[212,215]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"declaration":true,"declarationDir":"./dist","emitDeclarationOnly":false,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitHelpers":true,"noEmitOnError":true,"noImplicitAny":true,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":6},"fileIdsList":[[219,258],[219,243,258],[258],[219],[219,244,258],[219,220,221,222,223,224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255,256,257],[244,258],[51,207],[51],[51,73,208,209,210],[62],[54,62],[54,62,70],[64],[52,53],[55],[206],[54,58],[58],[56,57],[63,64,65,66,67,68,69,70,71],[54,58,59,60],[74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,103,104,105,106,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,146,147,148,149,150,151,152,153,154,155,156,157,158,159,160,161,162,163,164,165,166,167,168,169,170,171,172,173,174,175,176,177,178,179,180,182,183,184,185,186,187,188,189,190,191,192,193,194,195,196,197,198,199,200,201,202,203,204,205],[85,96,97,98,102,120,122,146],[90,98,102,121],[155],[181],[182],[86,140],[81,85,89,102,107,141],[140],[102],[90,102,185],[185],[78],[92],[153],[78,85,102,132],[85],[102,163,199],[97],[85,96,102],[166],[169],[83],[171],[95],[81],[100],[126],[102,121],[74,85,89,90,92,94,95,96,97,99,100,101],[132],[74,96,100,102],[76],[75,76,81,90,95,96,100,102,126],[189],[187],[98],[104,161],[74],[89,102,104,105,106,107,108],[92,104,105],[85,121],[84,87],[85,90,100,102,109,117,122,123,124],[106],[76,123],[102,106,127],[182,191],[81,90,95,100,102],[90,92,100,102,117,118],[86],[102,111],[185,194,197],[86,92],[90,102,126],[90,100,102],[102,206],[83,86,92],[102,145,147],[85,96,99,102,120],[85,96,102,121],[102,106],[51,61,72,212,213],[51,61,72,211,212],[51,212,213],[51,61,211],[58,61,213],[61,212],[212,213],[61]],"referencedMap":[[243,1],[244,2],[219,3],[222,3],[241,1],[242,1],[232,1],[231,4],[229,1],[224,1],[237,1],[235,1],[239,1],[223,1],[236,1],[240,1],[225,1],[226,1],[238,1],[220,1],[227,1],[228,1],[230,1],[234,1],[245,5],[233,1],[221,1],[258,6],[252,5],[254,7],[253,5],[246,5],[247,5],[249,5],[251,5],[255,7],[256,7],[248,7],[250,7],[208,8],[209,9],[73,9],[210,9],[211,10],[63,11],[66,12],[64,12],[68,12],[71,13],[70,12],[69,12],[67,12],[65,14],[54,15],[56,16],[207,17],[59,18],[57,19],[58,20],[72,21],[61,22],[206,23],[147,24],[122,25],[157,26],[182,27],[184,28],[183,28],[141,29],[143,30],[142,31],[185,32],[189,33],[187,34],[79,35],[80,35],[108,36],[154,37],[164,38],[86,39],[201,40],[98,41],[97,42],[168,43],[170,44],[84,45],[172,46],[176,47],[82,48],[177,49],[127,50],[197,39],[175,51],[102,52],[133,53],[101,54],[126,32],[159,55],[158,56],[186,34],[190,57],[188,58],[146,41],[99,59],[162,60],[123,61],[109,62],[106,63],[150,64],[151,64],[88,65],[125,66],[167,67],[204,68],[115,32],[128,69],[191,28],[193,70],[192,70],[117,71],[119,72],[130,32],[169,39],[112,32],[87,73],[113,74],[116,32],[198,75],[180,76],[134,76],[156,77],[135,76],[136,76],[155,50],[124,78],[114,79],[194,34],[196,57],[195,58],[181,32],[173,80],[148,81],[121,82],[120,83],[94,32],[129,84],[103,32],[171,39],[93,76],[214,85],[213,86],[215,87],[212,88]],"exportedModulesMap":[[243,1],[244,2],[219,3],[222,3],[241,1],[242,1],[232,1],[231,4],[229,1],[224,1],[237,1],[235,1],[239,1],[223,1],[236,1],[240,1],[225,1],[226,1],[238,1],[220,1],[227,1],[228,1],[230,1],[234,1],[245,5],[233,1],[221,1],[258,6],[252,5],[254,7],[253,5],[246,5],[247,5],[249,5],[251,5],[255,7],[256,7],[248,7],[250,7],[208,8],[209,9],[73,9],[210,9],[211,10],[63,11],[66,12],[64,12],[68,12],[71,13],[70,12],[69,12],[67,12],[65,14],[54,15],[56,16],[207,17],[59,18],[57,19],[58,20],[72,21],[61,22],[206,23],[147,24],[122,25],[157,26],[182,27],[184,28],[183,28],[141,29],[143,30],[142,31],[185,32],[189,33],[187,34],[79,35],[80,35],[108,36],[154,37],[164,38],[86,39],[201,40],[98,41],[97,42],[168,43],[170,44],[84,45],[172,46],[176,47],[82,48],[177,49],[127,50],[197,39],[175,51],[102,52],[133,53],[101,54],[126,32],[159,55],[158,56],[186,34],[190,57],[188,58],[146,41],[99,59],[162,60],[123,61],[109,62],[106,63],[150,64],[151,64],[88,65],[125,66],[167,67],[204,68],[115,32],[128,69],[191,28],[193,70],[192,70],[117,71],[119,72],[130,32],[169,39],[112,32],[87,73],[113,74],[116,32],[198,75],[180,76],[134,76],[156,77],[135,76],[136,76],[155,50],[124,78],[114,79],[194,34],[196,57],[195,58],[181,32],[173,80],[148,81],[121,82],[120,83],[94,32],[129,84],[103,32],[171,39],[93,76],[214,89],[213,90],[215,91],[212,92]],"semanticDiagnosticsPerFile":[218,243,244,219,222,241,242,232,231,229,224,237,235,239,223,236,240,225,226,238,220,227,228,230,234,245,233,221,258,257,252,254,253,246,247,249,251,255,256,248,250,208,209,73,210,211,52,62,63,66,64,68,71,70,69,67,65,53,54,216,217,56,55,207,59,57,60,58,72,61,51,206,178,147,122,179,139,157,76,182,184,183,141,140,143,142,107,185,189,187,79,80,81,108,154,153,164,86,149,201,203,98,97,168,170,84,172,176,82,177,127,197,175,102,133,95,85,101,100,126,152,145,159,158,186,190,188,78,202,146,99,162,161,123,109,110,106,150,151,88,96,77,125,104,132,166,167,204,115,128,191,193,192,117,119,105,74,131,130,169,165,200,112,87,111,113,116,83,160,198,180,137,134,156,135,136,155,124,92,114,194,196,195,181,199,173,163,148,144,121,120,91,94,205,174,75,129,118,90,89,138,103,171,93,49,50,9,11,10,2,12,13,14,15,16,17,18,19,3,20,4,21,25,22,23,24,26,27,28,5,29,30,31,32,6,36,33,34,35,37,7,38,43,44,39,40,41,42,8,48,45,46,47,1,214,213,215,212]},"version":"5.4.2"}
1
+ {"fileNames":["./node_modules/typescript/lib/lib.es5.d.ts","./node_modules/typescript/lib/lib.es2015.d.ts","./node_modules/typescript/lib/lib.es2016.d.ts","./node_modules/typescript/lib/lib.es2017.d.ts","./node_modules/typescript/lib/lib.es2018.d.ts","./node_modules/typescript/lib/lib.es2019.d.ts","./node_modules/typescript/lib/lib.es2020.d.ts","./node_modules/typescript/lib/lib.es2021.d.ts","./node_modules/typescript/lib/lib.dom.d.ts","./node_modules/typescript/lib/lib.es2015.core.d.ts","./node_modules/typescript/lib/lib.es2015.collection.d.ts","./node_modules/typescript/lib/lib.es2015.generator.d.ts","./node_modules/typescript/lib/lib.es2015.iterable.d.ts","./node_modules/typescript/lib/lib.es2015.promise.d.ts","./node_modules/typescript/lib/lib.es2015.proxy.d.ts","./node_modules/typescript/lib/lib.es2015.reflect.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.d.ts","./node_modules/typescript/lib/lib.es2015.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2016.array.include.d.ts","./node_modules/typescript/lib/lib.es2016.intl.d.ts","./node_modules/typescript/lib/lib.es2017.arraybuffer.d.ts","./node_modules/typescript/lib/lib.es2017.date.d.ts","./node_modules/typescript/lib/lib.es2017.object.d.ts","./node_modules/typescript/lib/lib.es2017.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2017.string.d.ts","./node_modules/typescript/lib/lib.es2017.intl.d.ts","./node_modules/typescript/lib/lib.es2017.typedarrays.d.ts","./node_modules/typescript/lib/lib.es2018.asyncgenerator.d.ts","./node_modules/typescript/lib/lib.es2018.asynciterable.d.ts","./node_modules/typescript/lib/lib.es2018.intl.d.ts","./node_modules/typescript/lib/lib.es2018.promise.d.ts","./node_modules/typescript/lib/lib.es2018.regexp.d.ts","./node_modules/typescript/lib/lib.es2019.array.d.ts","./node_modules/typescript/lib/lib.es2019.object.d.ts","./node_modules/typescript/lib/lib.es2019.string.d.ts","./node_modules/typescript/lib/lib.es2019.symbol.d.ts","./node_modules/typescript/lib/lib.es2019.intl.d.ts","./node_modules/typescript/lib/lib.es2020.bigint.d.ts","./node_modules/typescript/lib/lib.es2020.date.d.ts","./node_modules/typescript/lib/lib.es2020.promise.d.ts","./node_modules/typescript/lib/lib.es2020.sharedmemory.d.ts","./node_modules/typescript/lib/lib.es2020.string.d.ts","./node_modules/typescript/lib/lib.es2020.symbol.wellknown.d.ts","./node_modules/typescript/lib/lib.es2020.intl.d.ts","./node_modules/typescript/lib/lib.es2020.number.d.ts","./node_modules/typescript/lib/lib.es2021.promise.d.ts","./node_modules/typescript/lib/lib.es2021.string.d.ts","./node_modules/typescript/lib/lib.es2021.weakref.d.ts","./node_modules/typescript/lib/lib.es2021.intl.d.ts","./node_modules/typescript/lib/lib.decorators.d.ts","./node_modules/typescript/lib/lib.decorators.legacy.d.ts","./node_modules/tslib/tslib.d.ts","./node_modules/@lit/reactive-element/css-tag.d.ts","./node_modules/@lit/reactive-element/reactive-controller.d.ts","./node_modules/@lit/reactive-element/reactive-element.d.ts","./node_modules/lit-html/directive.d.ts","./node_modules/@types/trusted-types/lib/index.d.ts","./node_modules/lit-html/lit-html.d.ts","./node_modules/lit-element/lit-element.d.ts","./node_modules/lit-html/is-server.d.ts","./node_modules/lit/index.d.ts","./node_modules/@lit/reactive-element/decorators/base.d.ts","./node_modules/@lit/reactive-element/decorators/custom-element.d.ts","./node_modules/@lit/reactive-element/decorators/property.d.ts","./node_modules/@lit/reactive-element/decorators/state.d.ts","./node_modules/@lit/reactive-element/decorators/event-options.d.ts","./node_modules/@lit/reactive-element/decorators/query.d.ts","./node_modules/@lit/reactive-element/decorators/query-all.d.ts","./node_modules/@lit/reactive-element/decorators/query-async.d.ts","./node_modules/@lit/reactive-element/decorators/query-assigned-nodes.d.ts","./node_modules/@lit/reactive-element/decorators/query-assigned-elements.d.ts","./node_modules/lit/decorators.d.ts","./node_modules/@internetarchive/ads-library/dist/events.d.ts","./node_modules/@internetarchive/ads-library/dist/api.d.ts","./node_modules/@internetarchive/ads-library/dist/browser.d.ts","./node_modules/@internetarchive/ads-library/dist/formats.d.ts","./node_modules/@internetarchive/ads-library/dist/index.d.ts","./src/types.ts","./src/ads-table.ts","./src/ads-table-storybook.ts","./src/index.ts","./node_modules/@types/estree/index.d.ts","./node_modules/@types/resolve/index.d.ts","./node_modules/@types/trusted-types/index.d.ts","../../node_modules/@types/json-schema/index.d.ts","../../node_modules/@types/semver/classes/semver.d.ts","../../node_modules/@types/semver/functions/parse.d.ts","../../node_modules/@types/semver/functions/valid.d.ts","../../node_modules/@types/semver/functions/clean.d.ts","../../node_modules/@types/semver/functions/inc.d.ts","../../node_modules/@types/semver/functions/diff.d.ts","../../node_modules/@types/semver/functions/major.d.ts","../../node_modules/@types/semver/functions/minor.d.ts","../../node_modules/@types/semver/functions/patch.d.ts","../../node_modules/@types/semver/functions/prerelease.d.ts","../../node_modules/@types/semver/functions/compare.d.ts","../../node_modules/@types/semver/functions/rcompare.d.ts","../../node_modules/@types/semver/functions/compare-loose.d.ts","../../node_modules/@types/semver/functions/compare-build.d.ts","../../node_modules/@types/semver/functions/sort.d.ts","../../node_modules/@types/semver/functions/rsort.d.ts","../../node_modules/@types/semver/functions/gt.d.ts","../../node_modules/@types/semver/functions/lt.d.ts","../../node_modules/@types/semver/functions/eq.d.ts","../../node_modules/@types/semver/functions/neq.d.ts","../../node_modules/@types/semver/functions/gte.d.ts","../../node_modules/@types/semver/functions/lte.d.ts","../../node_modules/@types/semver/functions/cmp.d.ts","../../node_modules/@types/semver/functions/coerce.d.ts","../../node_modules/@types/semver/classes/comparator.d.ts","../../node_modules/@types/semver/classes/range.d.ts","../../node_modules/@types/semver/functions/satisfies.d.ts","../../node_modules/@types/semver/ranges/max-satisfying.d.ts","../../node_modules/@types/semver/ranges/min-satisfying.d.ts","../../node_modules/@types/semver/ranges/to-comparators.d.ts","../../node_modules/@types/semver/ranges/min-version.d.ts","../../node_modules/@types/semver/ranges/valid.d.ts","../../node_modules/@types/semver/ranges/outside.d.ts","../../node_modules/@types/semver/ranges/gtr.d.ts","../../node_modules/@types/semver/ranges/ltr.d.ts","../../node_modules/@types/semver/ranges/intersects.d.ts","../../node_modules/@types/semver/ranges/simplify.d.ts","../../node_modules/@types/semver/ranges/subset.d.ts","../../node_modules/@types/semver/internals/identifiers.d.ts","../../node_modules/@types/semver/index.d.ts"],"fileIdsList":[[86,125],[86,110,125],[125],[86],[86,111,125],[86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124],[111,125],[73,74,75,76],[62],[55,62],[55,62,70],[64],[53,54],[57],[55,58],[58],[56,57],[63,64,65,66,67,68,69,70,71],[55,58,59,60],[52,61,72,78,79],[52,61,72,77,78],[52,78,79],[52,61,77]],"fileInfos":[{"version":"69684132aeb9b5642cbcd9e22dff7818ff0ee1aa831728af0ecf97d3364d5546","affectsGlobalScope":true,"impliedFormat":1},{"version":"45b7ab580deca34ae9729e97c13cfd999df04416a79116c3bfb483804f85ded4","impliedFormat":1},{"version":"3facaf05f0c5fc569c5649dd359892c98a85557e3e0c847964caeb67076f4d75","impliedFormat":1},{"version":"e44bb8bbac7f10ecc786703fe0a6a4b952189f908707980ba8f3c8975a760962","impliedFormat":1},{"version":"5e1c4c362065a6b95ff952c0eab010f04dcd2c3494e813b493ecfd4fcb9fc0d8","impliedFormat":1},{"version":"68d73b4a11549f9c0b7d352d10e91e5dca8faa3322bfb77b661839c42b1ddec7","impliedFormat":1},{"version":"5efce4fc3c29ea84e8928f97adec086e3dc876365e0982cc8479a07954a3efd4","impliedFormat":1},{"version":"feecb1be483ed332fad555aff858affd90a48ab19ba7272ee084704eb7167569","impliedFormat":1},{"version":"092c2bfe125ce69dbb1223c85d68d4d2397d7d8411867b5cc03cec902c233763","affectsGlobalScope":true,"impliedFormat":1},{"version":"c57796738e7f83dbc4b8e65132f11a377649c00dd3eee333f672b8f0a6bea671","affectsGlobalScope":true,"impliedFormat":1},{"version":"dc2df20b1bcdc8c2d34af4926e2c3ab15ffe1160a63e58b7e09833f616efff44","affectsGlobalScope":true,"impliedFormat":1},{"version":"515d0b7b9bea2e31ea4ec968e9edd2c39d3eebf4a2d5cbd04e88639819ae3b71","affectsGlobalScope":true,"impliedFormat":1},{"version":"0559b1f683ac7505ae451f9a96ce4c3c92bdc71411651ca6ddb0e88baaaad6a3","affectsGlobalScope":true,"impliedFormat":1},{"version":"0dc1e7ceda9b8b9b455c3a2d67b0412feab00bd2f66656cd8850e8831b08b537","affectsGlobalScope":true,"impliedFormat":1},{"version":"ce691fb9e5c64efb9547083e4a34091bcbe5bdb41027e310ebba8f7d96a98671","affectsGlobalScope":true,"impliedFormat":1},{"version":"8d697a2a929a5fcb38b7a65594020fcef05ec1630804a33748829c5ff53640d0","affectsGlobalScope":true,"impliedFormat":1},{"version":"4ff2a353abf8a80ee399af572debb8faab2d33ad38c4b4474cff7f26e7653b8d","affectsGlobalScope":true,"impliedFormat":1},{"version":"936e80ad36a2ee83fc3caf008e7c4c5afe45b3cf3d5c24408f039c1d47bdc1df","affectsGlobalScope":true,"impliedFormat":1},{"version":"d15bea3d62cbbdb9797079416b8ac375ae99162a7fba5de2c6c505446486ac0a","affectsGlobalScope":true,"impliedFormat":1},{"version":"68d18b664c9d32a7336a70235958b8997ebc1c3b8505f4f1ae2b7e7753b87618","affectsGlobalScope":true,"impliedFormat":1},{"version":"eb3d66c8327153d8fa7dd03f9c58d351107fe824c79e9b56b462935176cdf12a","affectsGlobalScope":true,"impliedFormat":1},{"version":"38f0219c9e23c915ef9790ab1d680440d95419ad264816fa15009a8851e79119","affectsGlobalScope":true,"impliedFormat":1},{"version":"69ab18c3b76cd9b1be3d188eaf8bba06112ebbe2f47f6c322b5105a6fbc45a2e","affectsGlobalScope":true,"impliedFormat":1},{"version":"fef8cfad2e2dc5f5b3d97a6f4f2e92848eb1b88e897bb7318cef0e2820bceaab","affectsGlobalScope":true,"impliedFormat":1},{"version":"2f11ff796926e0832f9ae148008138ad583bd181899ab7dd768a2666700b1893","affectsGlobalScope":true,"impliedFormat":1},{"version":"4de680d5bb41c17f7f68e0419412ca23c98d5749dcaaea1896172f06435891fc","affectsGlobalScope":true,"impliedFormat":1},{"version":"954296b30da6d508a104a3a0b5d96b76495c709785c1d11610908e63481ee667","affectsGlobalScope":true,"impliedFormat":1},{"version":"ac9538681b19688c8eae65811b329d3744af679e0bdfa5d842d0e32524c73e1c","affectsGlobalScope":true,"impliedFormat":1},{"version":"0a969edff4bd52585473d24995c5ef223f6652d6ef46193309b3921d65dd4376","affectsGlobalScope":true,"impliedFormat":1},{"version":"9e9fbd7030c440b33d021da145d3232984c8bb7916f277e8ffd3dc2e3eae2bdb","affectsGlobalScope":true,"impliedFormat":1},{"version":"811ec78f7fefcabbda4bfa93b3eb67d9ae166ef95f9bff989d964061cbf81a0c","affectsGlobalScope":true,"impliedFormat":1},{"version":"717937616a17072082152a2ef351cb51f98802fb4b2fdabd32399843875974ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"d7e7d9b7b50e5f22c915b525acc5a49a7a6584cf8f62d0569e557c5cfc4b2ac2","affectsGlobalScope":true,"impliedFormat":1},{"version":"71c37f4c9543f31dfced6c7840e068c5a5aacb7b89111a4364b1d5276b852557","affectsGlobalScope":true,"impliedFormat":1},{"version":"576711e016cf4f1804676043e6a0a5414252560eb57de9faceee34d79798c850","affectsGlobalScope":true,"impliedFormat":1},{"version":"89c1b1281ba7b8a96efc676b11b264de7a8374c5ea1e6617f11880a13fc56dc6","affectsGlobalScope":true,"impliedFormat":1},{"version":"74f7fa2d027d5b33eb0471c8e82a6c87216223181ec31247c357a3e8e2fddc5b","affectsGlobalScope":true,"impliedFormat":1},{"version":"d6d7ae4d1f1f3772e2a3cde568ed08991a8ae34a080ff1151af28b7f798e22ca","affectsGlobalScope":true,"impliedFormat":1},{"version":"063600664504610fe3e99b717a1223f8b1900087fab0b4cad1496a114744f8df","affectsGlobalScope":true,"impliedFormat":1},{"version":"934019d7e3c81950f9a8426d093458b65d5aff2c7c1511233c0fd5b941e608ab","affectsGlobalScope":true,"impliedFormat":1},{"version":"52ada8e0b6e0482b728070b7639ee42e83a9b1c22d205992756fe020fd9f4a47","affectsGlobalScope":true,"impliedFormat":1},{"version":"3bdefe1bfd4d6dee0e26f928f93ccc128f1b64d5d501ff4a8cf3c6371200e5e6","affectsGlobalScope":true,"impliedFormat":1},{"version":"59fb2c069260b4ba00b5643b907ef5d5341b167e7d1dbf58dfd895658bda2867","affectsGlobalScope":true,"impliedFormat":1},{"version":"639e512c0dfc3fad96a84caad71b8834d66329a1f28dc95e3946c9b58176c73a","affectsGlobalScope":true,"impliedFormat":1},{"version":"368af93f74c9c932edd84c58883e736c9e3d53cec1fe24c0b0ff451f529ceab1","affectsGlobalScope":true,"impliedFormat":1},{"version":"af3dd424cf267428f30ccfc376f47a2c0114546b55c44d8c0f1d57d841e28d74","affectsGlobalScope":true,"impliedFormat":1},{"version":"995c005ab91a498455ea8dfb63aa9f83fa2ea793c3d8aa344be4a1678d06d399","affectsGlobalScope":true,"impliedFormat":1},{"version":"959d36cddf5e7d572a65045b876f2956c973a586da58e5d26cde519184fd9b8a","affectsGlobalScope":true,"impliedFormat":1},{"version":"965f36eae237dd74e6cca203a43e9ca801ce38824ead814728a2807b1910117d","affectsGlobalScope":true,"impliedFormat":1},{"version":"8e7f8264d0fb4c5339605a15daadb037bf238c10b654bb3eee14208f860a32ea","affectsGlobalScope":true,"impliedFormat":1},{"version":"782dec38049b92d4e85c1585fbea5474a219c6984a35b004963b00beb1aab538","affectsGlobalScope":true,"impliedFormat":1},{"version":"a6a5253138c5432c68a1510c70fe78a644fe2e632111ba778e1978010d6edfec","impliedFormat":1},{"version":"74012d464fbc5354ca3a7d5e71bee43b17da01a853c8ff10971bbe3680c76f40","impliedFormat":99},{"version":"5e30131b6a5587fe666926ad1d9807e733c0a597ed12d682669fcaa331aea576","impliedFormat":99},{"version":"1aa53fff8e30c86e74eceb7514d715efa71c7820e5eb8bce70e2dd1b5a8b13ff","affectsGlobalScope":true,"impliedFormat":99},{"version":"00cb63103f9670f8094c238a4a7e252c8b4c06ba371fea5c44add7e41b7247e4","impliedFormat":99},{"version":"15fe687c59d62741b4494d5e623d497d55eb38966ecf5bea7f36e48fc3fbe15e","impliedFormat":1},{"version":"d854b2f06015f4241109d05b4b214d9f1fdd5fb15d2606843a8e0d6cd795a37d","impliedFormat":99},{"version":"9a318e3a8900672b85cd3c8c3a5acf51b88049557a3ae897ccdcf2b85a8f61f9","impliedFormat":99},{"version":"1bcd560deed90a43c51b08aa18f7f55229f2e30974ab5ed1b7bb5721be379013","impliedFormat":99},{"version":"dc08fe04e50bc24d1baded4f33e942222bbdd5d77d6341a93cfe6e4e4586a3be","impliedFormat":99},{"version":"cdeae34aca6700620ebf3f27cf7d439c3af97595dd6e2729fa4780483add5680","impliedFormat":99},{"version":"3ff87ea3471b51beaf4aa8fd8f4422862b11d343fdbb55bf383e0f8cc195a445","impliedFormat":99},{"version":"99bdf729529cdbf12e2bf76ea751b662011133dcf9e35abcb3def47bb02f7b0a","impliedFormat":99},{"version":"732fb71ecb695d6f36ddcbb72ebfe4ff6b6491d45101a00fa2b75a26b80d640f","impliedFormat":99},{"version":"039cb05125d7621f8143616c495b8e6b54249c4e64d2754b80ff93867f7f4b01","impliedFormat":99},{"version":"1b81f1fa82ad30af01ab1cae91ccaddc10c48f5916bbd6d282155e44a65d858d","impliedFormat":99},{"version":"a0fc7a02a75802678a67000607f20266cf1a49dc0e787967efe514e31b9ed0c3","impliedFormat":99},{"version":"5ebf098a1d81d400b8af82807cf19893700335cf91a7b9dbd83a5d737af34b11","impliedFormat":99},{"version":"101cf83ac3f9c5e1a7355a02e4fbe988877ef83c4ebec0ff0f02b2af022254a3","impliedFormat":99},{"version":"d017e2fcd44b46ca80cd2b592a6314e75f5caab5bda230f0f4a45e964049a43a","impliedFormat":99},{"version":"a8992b852521a66f63e0cedc6e1f054b28f972232b6fa5ca59771db6a1c8bbea","impliedFormat":99},{"version":"efac18e8bcab303fc3979c3c8f83f6d34a9e12a5184ee8c83276225202fd49fd","impliedFormat":1},{"version":"a256ea37de21fdca25bab737a3b761ebd882c89a03841661d5671c1b7682509e","impliedFormat":1},{"version":"c8f4194bcafc4b3b3330c5bd39a09ac7076c7809e25cfa780fd6baf00258e118","impliedFormat":1},{"version":"750b84af2e5b83ce66f0e4d0c883d0940d0523c09830414e879481077b345a0c","impliedFormat":1},{"version":"2b2c5eaa3ad5937aa63802f9623596cb1516003775a00143e2e6bda89abc8ba7","impliedFormat":1},"f1cdbbb73f157732d70c85b02fb775824a2c83f6009f3429726b1fe8e3aaa021","27e55ddf4821533850f940bcb5b025d020395c0aa766a6bd44ea26af65dcda92","19b7ef1651546454a568dcca70cc8dc6aae882fd43a0b8bb51861156df3f47b6","a93ac4780f69f1b2f601a350bdda88ed3cc937b37e6092280ca9ccaadad08d74",{"version":"e2b48abff5a8adc6bb1cd13a702b9ef05e6045a98e7cfa95a8779b53b6d0e69d","impliedFormat":1},{"version":"8baa5d0febc68db886c40bf341e5c90dc215a90cd64552e47e8184be6b7e3358","impliedFormat":1},{"version":"2c3b8be03577c98530ef9cb1a76e2c812636a871f367e9edf4c5f3ce702b77f8","affectsGlobalScope":true,"impliedFormat":1},{"version":"f3d8c757e148ad968f0d98697987db363070abada5f503da3c06aefd9d4248c1","impliedFormat":1},{"version":"cf3d384d082b933d987c4e2fe7bfb8710adfd9dc8155190056ed6695a25a559e","impliedFormat":1},{"version":"9871b7ee672bc16c78833bdab3052615834b08375cb144e4d2cba74473f4a589","impliedFormat":1},{"version":"c863198dae89420f3c552b5a03da6ed6d0acfa3807a64772b895db624b0de707","impliedFormat":1},{"version":"8b03a5e327d7db67112ebbc93b4f744133eda2c1743dbb0a990c61a8007823ef","impliedFormat":1},{"version":"86c73f2ee1752bac8eeeece234fd05dfcf0637a4fbd8032e4f5f43102faa8eec","impliedFormat":1},{"version":"42fad1f540271e35ca37cecda12c4ce2eef27f0f5cf0f8dd761d723c744d3159","impliedFormat":1},{"version":"ff3743a5de32bee10906aff63d1de726f6a7fd6ee2da4b8229054dfa69de2c34","impliedFormat":1},{"version":"83acd370f7f84f203e71ebba33ba61b7f1291ca027d7f9a662c6307d74e4ac22","impliedFormat":1},{"version":"1445cec898f90bdd18b2949b9590b3c012f5b7e1804e6e329fb0fe053946d5ec","impliedFormat":1},{"version":"0e5318ec2275d8da858b541920d9306650ae6ac8012f0e872fe66eb50321a669","impliedFormat":1},{"version":"cf530297c3fb3a92ec9591dd4fa229d58b5981e45fe6702a0bd2bea53a5e59be","impliedFormat":1},{"version":"c1f6f7d08d42148ddfe164d36d7aba91f467dbcb3caa715966ff95f55048b3a4","impliedFormat":1},{"version":"f4e9bf9103191ef3b3612d3ec0044ca4044ca5be27711fe648ada06fad4bcc85","impliedFormat":1},{"version":"0c1ee27b8f6a00097c2d6d91a21ee4d096ab52c1e28350f6362542b55380059a","impliedFormat":1},{"version":"7677d5b0db9e020d3017720f853ba18f415219fb3a9597343b1b1012cfd699f7","impliedFormat":1},{"version":"bc1c6bc119c1784b1a2be6d9c47addec0d83ef0d52c8fbe1f14a51b4dfffc675","impliedFormat":1},{"version":"52cf2ce99c2a23de70225e252e9822a22b4e0adb82643ab0b710858810e00bf1","impliedFormat":1},{"version":"770625067bb27a20b9826255a8d47b6b5b0a2d3dfcbd21f89904c731f671ba77","impliedFormat":1},{"version":"d1ed6765f4d7906a05968fb5cd6d1db8afa14dbe512a4884e8ea5c0f5e142c80","impliedFormat":1},{"version":"799c0f1b07c092626cf1efd71d459997635911bb5f7fc1196efe449bba87e965","impliedFormat":1},{"version":"2a184e4462b9914a30b1b5c41cf80c6d3428f17b20d3afb711fff3f0644001fd","impliedFormat":1},{"version":"9eabde32a3aa5d80de34af2c2206cdc3ee094c6504a8d0c2d6d20c7c179503cc","impliedFormat":1},{"version":"397c8051b6cfcb48aa22656f0faca2553c5f56187262135162ee79d2b2f6c966","impliedFormat":1},{"version":"a8ead142e0c87dcd5dc130eba1f8eeed506b08952d905c47621dc2f583b1bff9","impliedFormat":1},{"version":"a02f10ea5f73130efca046429254a4e3c06b5475baecc8f7b99a0014731be8b3","impliedFormat":1},{"version":"c2576a4083232b0e2d9bd06875dd43d371dee2e090325a9eac0133fd5650c1cb","impliedFormat":1},{"version":"4c9a0564bb317349de6a24eb4efea8bb79898fa72ad63a1809165f5bd42970dd","impliedFormat":1},{"version":"f40ac11d8859092d20f953aae14ba967282c3bb056431a37fced1866ec7a2681","impliedFormat":1},{"version":"cc11e9e79d4746cc59e0e17473a59d6f104692fd0eeea1bdb2e206eabed83b03","impliedFormat":1},{"version":"b444a410d34fb5e98aa5ee2b381362044f4884652e8bc8a11c8fe14bbd85518e","impliedFormat":1},{"version":"c35808c1f5e16d2c571aa65067e3cb95afeff843b259ecfa2fc107a9519b5392","impliedFormat":1},{"version":"14d5dc055143e941c8743c6a21fa459f961cbc3deedf1bfe47b11587ca4b3ef5","impliedFormat":1},{"version":"a3ad4e1fc542751005267d50a6298e6765928c0c3a8dce1572f2ba6ca518661c","impliedFormat":1},{"version":"f237e7c97a3a89f4591afd49ecb3bd8d14f51a1c4adc8fcae3430febedff5eb6","impliedFormat":1},{"version":"3ffdfbec93b7aed71082af62b8c3e0cc71261cc68d796665faa1e91604fbae8f","impliedFormat":1},{"version":"662201f943ed45b1ad600d03a90dffe20841e725203ced8b708c91fcd7f9379a","impliedFormat":1},{"version":"c9ef74c64ed051ea5b958621e7fb853fe3b56e8787c1587aefc6ea988b3c7e79","impliedFormat":1},{"version":"2462ccfac5f3375794b861abaa81da380f1bbd9401de59ffa43119a0b644253d","impliedFormat":1},{"version":"34baf65cfee92f110d6653322e2120c2d368ee64b3c7981dff08ed105c4f19b0","impliedFormat":1},{"version":"7d8ddf0f021c53099e34ee831a06c394d50371816caa98684812f089b4c6b3d4","impliedFormat":1}],"root":[[78,81]],"options":{"allowJs":true,"allowSyntheticDefaultImports":true,"declaration":true,"declarationDir":"./dist","emitDeclarationOnly":false,"esModuleInterop":true,"experimentalDecorators":true,"importHelpers":true,"inlineSources":true,"module":99,"noEmitHelpers":true,"noEmitOnError":true,"noImplicitAny":true,"outDir":"./dist","rootDir":"./src","skipLibCheck":true,"sourceMap":true,"strict":true,"target":6},"referencedMap":[[110,1],[111,2],[86,3],[89,3],[108,1],[109,1],[99,1],[98,4],[96,1],[91,1],[104,1],[102,1],[106,1],[90,1],[103,1],[107,1],[92,1],[93,1],[105,1],[87,1],[94,1],[95,1],[97,1],[101,1],[112,5],[100,1],[88,1],[125,6],[119,5],[121,7],[120,5],[113,5],[114,5],[116,5],[118,5],[122,7],[123,7],[115,7],[117,7],[77,8],[63,9],[66,10],[64,10],[68,10],[71,11],[70,10],[69,10],[67,10],[65,12],[55,13],[84,14],[59,15],[56,16],[58,17],[72,18],[61,19],[80,20],[79,21],[81,22],[78,23]],"version":"5.8.3"}
@@ -0,0 +1,88 @@
1
+ import { __decorate } from "tslib";
2
+ import { html, css, LitElement } from "lit";
3
+ import { customElement } from "lit/decorators.js";
4
+ import "./ads-table";
5
+ import { BooleanDataType, FromKey, NumberDataType, StringDataType, UndefinedHelpers, } from "./types";
6
+ // corresponding columns for each field in PersonData
7
+ const columns = [
8
+ {
9
+ key: "firstName",
10
+ label: "First Name",
11
+ dataType: FromKey(StringDataType, "firstName"),
12
+ },
13
+ {
14
+ key: "lastName",
15
+ label: "Last Name",
16
+ dataType: FromKey(StringDataType, "lastName"),
17
+ },
18
+ {
19
+ key: "age",
20
+ label: "Age",
21
+ dataType: FromKey(NumberDataType, "age"),
22
+ },
23
+ {
24
+ key: "hasRegistered",
25
+ label: "Registered?",
26
+ dataType: FromKey(BooleanDataType, "hasRegistered"),
27
+ },
28
+ {
29
+ key: "catsName",
30
+ label: "Cat's Name",
31
+ dataType: FromKey(UndefinedHelpers(StringDataType), "catsName"),
32
+ },
33
+ ];
34
+ // sample data, a list of PersonData instances with IDs
35
+ const rows = [
36
+ {
37
+ id: "a",
38
+ data: {
39
+ firstName: "Tyler",
40
+ lastName: "Allgeier",
41
+ age: 22,
42
+ hasRegistered: true,
43
+ catsName: "Cookie",
44
+ },
45
+ },
46
+ {
47
+ id: "b",
48
+ data: {
49
+ firstName: "Drake",
50
+ lastName: "London",
51
+ age: 23,
52
+ hasRegistered: true,
53
+ catsName: "Garbanzo",
54
+ },
55
+ },
56
+ {
57
+ id: "c",
58
+ data: {
59
+ firstName: "Matt",
60
+ lastName: "Bryant",
61
+ age: 50,
62
+ hasRegistered: true,
63
+ catsName: "Boots",
64
+ },
65
+ },
66
+ {
67
+ id: "d",
68
+ data: {
69
+ firstName: "Jeff",
70
+ lastName: "Klein",
71
+ age: 30,
72
+ hasRegistered: false,
73
+ },
74
+ },
75
+ ];
76
+ let AdsTableStorybook = class AdsTableStorybook extends LitElement {
77
+ render() {
78
+ return html `
79
+ <ads-simple-table .columns=${columns} .rows=${rows}> </ads-simple-table>
80
+ `;
81
+ }
82
+ };
83
+ AdsTableStorybook.styles = css ``;
84
+ AdsTableStorybook = __decorate([
85
+ customElement("ads-table-storybook")
86
+ ], AdsTableStorybook);
87
+ export { AdsTableStorybook };
88
+ //# sourceMappingURL=ads-table-storybook.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ads-table-storybook.js","sourceRoot":"","sources":["../src/ads-table-storybook.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,UAAU,EAAE,MAAM,KAAK,CAAC;AAC5C,OAAO,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAClD,OAAO,aAAa,CAAC;AACrB,OAAO,EACL,eAAe,EACf,OAAO,EACP,cAAc,EACd,cAAc,EAGd,gBAAgB,GACjB,MAAM,SAAS,CAAC;AAWjB,qDAAqD;AACrD,MAAM,OAAO,GAA8B;IACzC;QACE,GAAG,EAAE,WAAW;QAChB,KAAK,EAAE,YAAY;QACnB,QAAQ,EAAE,OAAO,CAAC,cAAc,EAAE,WAAW,CAAC;KAC/C;IACD;QACE,GAAG,EAAE,UAAU;QACf,KAAK,EAAE,WAAW;QAClB,QAAQ,EAAE,OAAO,CAAC,cAAc,EAAE,UAAU,CAAC;KAC9C;IACD;QACE,GAAG,EAAE,KAAK;QACV,KAAK,EAAE,KAAK;QACZ,QAAQ,EAAE,OAAO,CAAC,cAAc,EAAE,KAAK,CAAC;KACzC;IACD;QACE,GAAG,EAAE,eAAe;QACpB,KAAK,EAAE,aAAa;QACpB,QAAQ,EAAE,OAAO,CAAC,eAAe,EAAE,eAAe,CAAC;KACpD;IACD;QACE,GAAG,EAAE,UAAU;QACf,KAAK,EAAE,YAAY;QACnB,QAAQ,EAAE,OAAO,CAAC,gBAAgB,CAAC,cAAc,CAAC,EAAE,UAAU,CAAC;KAChE;CACF,CAAC;AAEF,uDAAuD;AACvD,MAAM,IAAI,GAA2B;IACnC;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE;YACJ,SAAS,EAAE,OAAO;YAClB,QAAQ,EAAE,UAAU;YACpB,GAAG,EAAE,EAAE;YACP,aAAa,EAAE,IAAI;YACnB,QAAQ,EAAE,QAAQ;SACnB;KACF;IACD;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE;YACJ,SAAS,EAAE,OAAO;YAClB,QAAQ,EAAE,QAAQ;YAClB,GAAG,EAAE,EAAE;YACP,aAAa,EAAE,IAAI;YACnB,QAAQ,EAAE,UAAU;SACrB;KACF;IACD;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE;YACJ,SAAS,EAAE,MAAM;YACjB,QAAQ,EAAE,QAAQ;YAClB,GAAG,EAAE,EAAE;YACP,aAAa,EAAE,IAAI;YACnB,QAAQ,EAAE,OAAO;SAClB;KACF;IACD;QACE,EAAE,EAAE,GAAG;QACP,IAAI,EAAE;YACJ,SAAS,EAAE,MAAM;YACjB,QAAQ,EAAE,OAAO;YACjB,GAAG,EAAE,EAAE;YACP,aAAa,EAAE,KAAK;SACrB;KACF;CACF,CAAC;AAGK,IAAM,iBAAiB,GAAvB,MAAM,iBAAkB,SAAQ,UAAU;IAC/C,MAAM;QACJ,OAAO,IAAI,CAAA;mCACoB,OAAO,UAAU,IAAI;KACnD,CAAC;IACJ,CAAC;;AAEM,wBAAM,GAAG,GAAG,CAAA,EAAE,AAAR,CAAS;AAPX,iBAAiB;IAD7B,aAAa,CAAC,qBAAqB,CAAC;GACxB,iBAAiB,CAQ7B","sourcesContent":["import { html, css, LitElement } from \"lit\";\nimport { customElement } from \"lit/decorators.js\";\nimport \"./ads-table\";\nimport {\n BooleanDataType,\n FromKey,\n NumberDataType,\n StringDataType,\n TableColumn,\n TableRow,\n UndefinedHelpers,\n} from \"./types\";\n\n// a simple interface for a sample table\ninterface PersonData {\n firstName: string;\n lastName: string;\n age: number;\n hasRegistered: boolean;\n catsName?: string;\n}\n\n// corresponding columns for each field in PersonData\nconst columns: TableColumn<PersonData>[] = [\n {\n key: \"firstName\",\n label: \"First Name\",\n dataType: FromKey(StringDataType, \"firstName\"),\n },\n {\n key: \"lastName\",\n label: \"Last Name\",\n dataType: FromKey(StringDataType, \"lastName\"),\n },\n {\n key: \"age\",\n label: \"Age\",\n dataType: FromKey(NumberDataType, \"age\"),\n },\n {\n key: \"hasRegistered\",\n label: \"Registered?\",\n dataType: FromKey(BooleanDataType, \"hasRegistered\"),\n },\n {\n key: \"catsName\",\n label: \"Cat's Name\",\n dataType: FromKey(UndefinedHelpers(StringDataType), \"catsName\"),\n },\n];\n\n// sample data, a list of PersonData instances with IDs\nconst rows: TableRow<PersonData>[] = [\n {\n id: \"a\",\n data: {\n firstName: \"Tyler\",\n lastName: \"Allgeier\",\n age: 22,\n hasRegistered: true,\n catsName: \"Cookie\",\n },\n },\n {\n id: \"b\",\n data: {\n firstName: \"Drake\",\n lastName: \"London\",\n age: 23,\n hasRegistered: true,\n catsName: \"Garbanzo\",\n },\n },\n {\n id: \"c\",\n data: {\n firstName: \"Matt\",\n lastName: \"Bryant\",\n age: 50,\n hasRegistered: true,\n catsName: \"Boots\",\n },\n },\n {\n id: \"d\",\n data: {\n firstName: \"Jeff\",\n lastName: \"Klein\",\n age: 30,\n hasRegistered: false,\n },\n },\n];\n\n@customElement(\"ads-table-storybook\")\nexport class AdsTableStorybook extends LitElement {\n render() {\n return html`\n <ads-simple-table .columns=${columns} .rows=${rows}> </ads-simple-table>\n `;\n }\n\n static styles = css``;\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { LitElement, PropertyValues, TemplateResult } from "lit";
1
+ import { CSSResultGroup, LitElement, PropertyValues, TemplateResult } from "lit";
2
2
  import { SortComparisonFunction, TableColumn, TableDataType, TableRow } from "./types";
3
3
  export declare abstract class AdsTable<T> extends LitElement {
4
4
  tableElement: HTMLTableElement | undefined;
@@ -20,9 +20,10 @@ export declare abstract class AdsTable<T> extends LitElement {
20
20
  };
21
21
  protected get sortedRows(): TableRow<T>[];
22
22
  protected get selectedRows(): TableRow<T>[];
23
+ protected get selectedColumn(): TableColumn<T>;
23
24
  protected onColumnClick(column: TableColumn<T>, defaultSortDirection?: "ascending" | "descending"): void;
24
- protected get columnKeyToDataType(): {
25
- [columnKey: string]: TableDataType<T>;
25
+ protected get columnByKey(): {
26
+ [columnKey: string]: TableColumn<T>;
26
27
  };
27
28
  protected get sortColumnDataType(): TableDataType<T> | undefined;
28
29
  protected get secondarySortDataType(): TableDataType<T> | undefined;
@@ -43,7 +44,7 @@ export declare abstract class AdsTable<T> extends LitElement {
43
44
  protected constrainIndex(index: number): number;
44
45
  connectedCallback(): void;
45
46
  render(): TemplateResult<1>;
46
- static styles: import("lit").CSSResult;
47
+ static styles: CSSResultGroup;
47
48
  }
48
49
  export declare class AdsSimpleTable<T> extends AdsTable<T> {
49
50
  columns: TableColumn<T>[];