@jspreadsheet/validations
Advanced tools
Comparing version 1.4.4 to 1.4.5
@@ -1,56 +0,12 @@ | ||
declare module 'jspreadsheet' { | ||
interface Validation { | ||
/** Excel-like range format Sheet1!A1:A6 */ | ||
range: string; | ||
/** Validation type */ | ||
type: 'number' | 'text' | 'date' | 'list' | 'textLength' | 'empty' | 'notEmpty'; | ||
/** Validation action can be a warning or reject when the condition are not match or a format when the condition matches */ | ||
action: 'warning' | 'reject' | 'format'; | ||
/** Criteria to be match */ | ||
criteria: | ||
| '=' | ||
| '!=' | ||
| '>=' | ||
| '>' | ||
| '<=' | ||
| '<' | ||
| 'between' | ||
| 'not between' | ||
| 'valid date' | ||
| 'valid email' | ||
| 'valid url' | ||
| 'contains' | ||
| 'not contains' | ||
| 'begins with' | ||
| 'ends with' | ||
/** Custom message to the user */ | ||
text?: string; | ||
/** Ignore blank cells */ | ||
allowBlank?: boolean; | ||
/** For type: format you can apply some CSS when condition is matched */ | ||
format?: { | ||
color: string; | ||
'background-color': string; | ||
'font-weight': number; | ||
'font-style': string; | ||
} | ||
/** For type: format you can add a class when condition is matched */ | ||
className?: string; | ||
} | ||
/** | ||
* Official Type definitions for JSS Validations | ||
* https://jspreadsheet.com/products/validations | ||
* Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
*/ | ||
interface Validations { | ||
// Index position in the array of validations | ||
index?: number | null; | ||
// The validation definition object | ||
value: Validation; | ||
} | ||
interface validations { | ||
(): any | ||
[key: string]: any | ||
} | ||
interface worksheetInstance { | ||
// Get a validation object | ||
getValidations: (validationIndex: number | null) => Validation | Validation[]; | ||
// Insert or update existing validations by index | ||
setValidations: (validations: Validations[]) => void; | ||
// Reset validations by validation indexes | ||
resetValidations: (validationIndex: number | number[]) => void; | ||
} | ||
} | ||
export declare function validations(): any |
@@ -35,3 +35,3 @@ { | ||
"types": "dist/index.d.ts", | ||
"version": "1.4.4", | ||
"version": "1.4.5", | ||
"bugs": "https://github.com/jspreadsheet/pro/issues", | ||
@@ -38,0 +38,0 @@ "homepage": "https://github.com/jspreadsheet/pro", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
30366
256