diff --git a/src/components.ts b/src/components.ts index 8e4157447..7f0bc3544 100644 --- a/src/components.ts +++ b/src/components.ts @@ -65,7 +65,6 @@ export { default as PQuerySearchTags } from './inputs/search/query-search-tags/P export { default as PFilterableQueryDropdown } from './inputs/dropdown/filterable-query-dropdown/PFilterableQueryDropdown.vue'; export { default as PDataTable } from './data-display/tables/data-table/PDataTable.vue'; export { default as PDefinitionTable } from './data-display/tables/definition-table/PDefinitionTable.vue'; -export { default as PQuerySearchTable } from './data-display/tables/query-search-table/PQuerySearchTable.vue'; export { default as PSearchTable } from './data-display/tables/search-table/PSearchTable.vue'; export { default as PToolboxTable } from './data-display/tables/toolbox-table/PToolboxTable.vue'; export { default as PButtonTab } from './navigation/tabs/button-tab/PButtonTab.vue'; diff --git a/src/data-display/dynamic/dynamic-layout/templates/query-search-table/index.vue b/src/data-display/dynamic/dynamic-layout/templates/query-search-table/index.vue index d9aabd417..e53a9b519 100644 --- a/src/data-display/dynamic/dynamic-layout/templates/query-search-table/index.vue +++ b/src/data-display/dynamic/dynamic-layout/templates/query-search-table/index.vue @@ -86,8 +86,8 @@ import type { QuerySearchTableOptions } from '@/data-display/dynamic/dynamic-lay import { getValueByPath } from '@/data-display/dynamic/helper'; import PHeading from '@/data-display/heading/PHeading.vue'; import type { DataTableFieldType } from '@/data-display/tables/data-table/type'; -import type { Options } from '@/data-display/tables/query-search-table/type'; import PToolboxTable from '@/data-display/tables/toolbox-table/PToolboxTable.vue'; +import type { ToolboxTableOptions } from '@/data-display/tables/toolbox-table/type'; import type { KeyItemSet } from '@/inputs/search/query-search/type'; @@ -237,7 +237,7 @@ export default defineComponent({ emit('export'); }; - const onChange = (options: Options = {}) => { + const onChange = (options: ToolboxTableOptions = {}) => { emit('fetch', options); }; diff --git a/src/data-display/dynamic/dynamic-layout/templates/table/index.vue b/src/data-display/dynamic/dynamic-layout/templates/table/index.vue index 91dacae15..a2012e703 100644 --- a/src/data-display/dynamic/dynamic-layout/templates/table/index.vue +++ b/src/data-display/dynamic/dynamic-layout/templates/table/index.vue @@ -86,8 +86,8 @@ import type { DynamicLayoutFetchOptions, DynamicLayoutTypeOptions } from '@/data import type { TableOptions } from '@/data-display/dynamic/dynamic-layout/type/layout-schema'; import { getValueByPath } from '@/data-display/dynamic/helper'; import PHeading from '@/data-display/heading/PHeading.vue'; -import type { Options } from '@/data-display/tables/query-search-table/type'; import PToolboxTable from '@/data-display/tables/toolbox-table/PToolboxTable.vue'; +import type { ToolboxTableOptions } from '@/data-display/tables/toolbox-table/type'; export default defineComponent({ name: 'PDynamicLayoutTable', @@ -228,7 +228,7 @@ export default defineComponent({ emit('export'); }; - const onChange = (options: Options = {}) => { + const onChange = (options: ToolboxTableOptions = {}) => { emit('fetch', options); }; diff --git a/src/data-display/tables/query-search-table/PQuerySearchTable.md b/src/data-display/tables/query-search-table/PQuerySearchTable.md deleted file mode 100644 index 2fe6e1b00..000000000 --- a/src/data-display/tables/query-search-table/PQuerySearchTable.md +++ /dev/null @@ -1,59 +0,0 @@ - -# Slots - -* All ToolboxTable component's slots. -* All QuerySearchTags component's slots with prefix ```tag```. (e.g. ```tag-data-type-datetime```) - -# Functions -| Name | Description | -| ---- | ----------- | -| addTag | Use it when you want to add tag.
It takes ```QueryItem``` as parameters. | -| deleteTag | Use it when you want to delete one tag. Give the index you want to delete as a parameter. | -| deleteAllTags | Use it when you want to delete all tags. | - -```typescript -interface QuerySearchTableFunctions { - addTag(...queries: QueryItem[]): void; - deleteTag(index: number): void; - deleteAllTags(): void; -} -``` - -### Types - -```typescript -import { DataTableFieldType } from 'DataTable'; -import { KeyItemSet, ValueHandlerMap } from 'QuerySearch'; -import { QueryTag } from 'QuerySearchTags'; - -export interface QuerySearchTableProps { - fields: DataTableFieldType[]; - items: any[]; - loading: boolean; - sortBy: string; // sync - sortDesc: boolean; // sync - selectIndex: number[]; // sync - thisPage: number; // sync - pageSize: number; // sync - totalCount: number; - keyItemSets: KeyItemSet[]; - valueHandlerMap: ValueHandlerMap; - queryTags: QueryTag[]; -} - -interface Options { - sortBy: string; - sortDesc: boolean; - thisPage: number; - pageSize: number; - queryTags: QueryTag[]; -} - -interface listeners { - // Emitted when options are changed - change?: (options: Readonly, changedOptions: Readonly) => void|Promise; - export?: () => void|Promise; - select?: (selectIndex: number[]) => void|Promise; -} - -``` diff --git a/src/data-display/tables/query-search-table/PQuerySearchTable.vue b/src/data-display/tables/query-search-table/PQuerySearchTable.vue deleted file mode 100644 index 14008b1e8..000000000 --- a/src/data-display/tables/query-search-table/PQuerySearchTable.vue +++ /dev/null @@ -1,203 +0,0 @@ - - - - - diff --git a/src/data-display/tables/query-search-table/type.ts b/src/data-display/tables/query-search-table/type.ts deleted file mode 100644 index f3ee5b50b..000000000 --- a/src/data-display/tables/query-search-table/type.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { DataTableFieldType } from '@/data-display/tables/data-table/type'; -import type { QueryTag } from '@/inputs/search/query-search-tags/type'; -import type { KeyItemSet, QueryItem, ValueHandlerMap } from '@/inputs/search/query-search/type'; - -export interface QuerySearchTableProps { - fields: DataTableFieldType[]; - items: any[]; - loading: boolean; - sortBy?: string; // sync - sortDesc?: boolean; // sync - selectIndex?: number[]; // sync - thisPage?: number; // sync - pageSize?: number; // sync - totalCount: number; - keyItemSets: KeyItemSet[]; - valueHandlerMap: ValueHandlerMap; - queryTags?: QueryTag[]; // sync - selectable: boolean; - colCopy: boolean; - multiSelect: boolean; - excelVisible: boolean; - rowCursorPointer: boolean; - timezone: string; - searchable: boolean; -} - -export interface Options { - sortBy?: string; - sortDesc?: boolean; - pageStart?: number; - pageLimit?: number; - queryTags?: QueryTag[]; -} - -export interface QuerySearchTableFunctions { - addTag(...queries: QueryItem[]): void; - deleteTag(index: number): void; - deleteAllTags(): void; -}