-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
255656e3a9b77617ee18b47774da06f753491c18
Sync to source repo @255656e3a9b77617ee18b47774da06f753491c18
- Loading branch information
Showing
5 changed files
with
106 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
/*! JQuery ui ui integration for DataTables' SearchBuilder | ||
* © SpryMedia Ltd - datatables.net/license | ||
*/ | ||
import $ from"jquery";import DataTable from"datatables.net-ju";import DataTable from"datatables.net-searchbuilder";$.extend(!0,DataTable.SearchBuilder.classes,{clearAll:"ui-button ui-corner-all ui-widget dtsb-clearAll"}),$.extend(!0,DataTable.Group.classes,{add:"ui-button ui-corner-all ui-widget dtsb-add",clearGroup:"ui-button ui-corner-all ui-widget dtsb-clearGroup",logic:"ui-button ui-corner-all ui-widget dtsb-logic"}),$.extend(!0,DataTable.Criteria.classes,{condition:"ui-selectmenu-button ui-button ui-widget ui-selectmenu-button-closed ui-corner-all dtsb-condition",data:"ui-selectmenu-button ui-button ui-widget ui-selectmenu-button-closed ui-corner-all dtsb-data",delete:"ui-button ui-corner-all ui-widget dtsb-delete",left:"ui-button ui-corner-all ui-widget dtsb-left",right:"ui-button ui-corner-all ui-widget dtsb-right",value:"ui-selectmenu-button ui-button ui-widget ui-selectmenu-button-closed ui-corner-all dtsb-value"});export default DataTable; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,99 @@ | ||
// Type definitions for DataTables SearchBuilder | ||
// | ||
// Project: https://datatables.net/extensions/searchbuilder/, https://datatables.net | ||
|
||
// Dist-DataTables-SearchBuilder-jQueryUI integration with jQueryUI exports the DataTables API having | ||
// set default values to complete the ingeration. | ||
import Api from "datatables.net"; | ||
/// <reference types="jquery" /> | ||
|
||
export default Api; | ||
import DataTables, {Api} from 'datatables.net'; | ||
import {IDefaults, IDetails, II18n} from './searchBuilder'; | ||
|
||
export default DataTables; | ||
|
||
type DeepPartial<T> = T extends object ? { | ||
[P in keyof T]?: DeepPartial<T[P]>; | ||
} : T; | ||
|
||
|
||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | ||
* DataTables' types integration | ||
*/ | ||
declare module 'datatables.net' { | ||
interface Config { | ||
/** | ||
* SearchBuilder extension options | ||
*/ | ||
searchBuilder?: boolean | string[] | ConfigSearchBuilder | ConfigSearchBuilder[]; | ||
} | ||
|
||
interface ConfigLanguage { | ||
/** | ||
* SearchBuilder language options | ||
*/ | ||
searchBuilder?: ConfigSearchBuilderLanguage; | ||
} | ||
|
||
interface Api<T> { | ||
/** | ||
* SearchBuilder methods container | ||
* | ||
* @returns Api for chaining with the additional SearchBuilder methods | ||
*/ | ||
searchBuilder: ApiSearchBuilder<T>; | ||
} | ||
|
||
interface ApiStatic { | ||
/** | ||
* SearchBuilder class | ||
*/ | ||
SearchBuilder: { | ||
/** | ||
* Create a new SearchBuilder instance for the target DataTable | ||
*/ | ||
new (dt: Api<any>, settings: string[] | ConfigSearchBuilder | ConfigSearchBuilder[]); | ||
|
||
/** | ||
* SearchBuilder version | ||
*/ | ||
version: string; | ||
|
||
/** | ||
* Default configuration values | ||
*/ | ||
defaults: ConfigSearchBuilder; | ||
} | ||
} | ||
} | ||
|
||
|
||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | ||
* Options | ||
*/ | ||
|
||
interface ConfigSearchBuilder extends Partial<IDefaults> {} | ||
|
||
interface ConfigSearchBuilderLanguage extends DeepPartial<II18n> {} | ||
|
||
|
||
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * | ||
* API | ||
*/ | ||
interface ApiSearchBuilder<T> extends Api<T> { | ||
/** | ||
* Returns the node of the SearchBuilder Container | ||
*/ | ||
container(): JQuery<HTMLElement>; | ||
|
||
/** | ||
* Gets the details of the current SearchBuilder setup | ||
*/ | ||
getDetails(): IDetails; | ||
|
||
/** | ||
* Rebuild the search to a given state. | ||
* | ||
* @param state Object of the same structure that is returned from searchBuilder.getDetails(). | ||
* This contains all of the details needed to rebuild the state. | ||
* @returns self for chaining | ||
*/ | ||
rebuild(state: IDetails): Api<T>; | ||
} |