slickgrid
Advanced tools
Comparing version 5.11.0 to 5.12.0
@@ -209,15 +209,18 @@ "use strict"; | ||
init() { | ||
this.input = Utils.createDomElement("input", { type: "text", className: "editor-text" }, this.args.container), this.input.focus(), this.input.select(), this.flatpickrInstance = flatpickr(this.input, { | ||
var _a, _b, _c; | ||
this.input = Utils.createDomElement("input", { type: "text", className: "editor-text" }, this.args.container), this.input.focus(), this.input.select(); | ||
let editorOptions = (_a = this.args.column.params) == null ? void 0 : _a.editorOptions; | ||
this.flatpickrInstance = flatpickr(this.input, { | ||
closeOnSelect: !0, | ||
allowInput: !0, | ||
altInput: !0, | ||
altFormat: "m/d/Y", | ||
dateFormat: "m/d/Y", | ||
altFormat: (_b = editorOptions == null ? void 0 : editorOptions.altFormat) != null ? _b : "m/d/Y", | ||
dateFormat: (_c = editorOptions == null ? void 0 : editorOptions.dateFormat) != null ? _c : "m/d/Y", | ||
onChange: () => { | ||
var _a, _b; | ||
var _a2, _b2; | ||
if (this.args.compositeEditorOptions) { | ||
let activeCell = this.args.grid.getActiveCell(); | ||
this.validate().valid && this.applyValue(this.args.item, this.serializeValue()), this.applyValue(this.args.compositeEditorOptions.formValues, this.serializeValue()), this.args.grid.onCompositeEditorChange.notify({ | ||
row: (_a = activeCell == null ? void 0 : activeCell.row) != null ? _a : 0, | ||
cell: (_b = activeCell == null ? void 0 : activeCell.cell) != null ? _b : 0, | ||
row: (_a2 = activeCell == null ? void 0 : activeCell.row) != null ? _a2 : 0, | ||
cell: (_b2 = activeCell == null ? void 0 : activeCell.cell) != null ? _b2 : 0, | ||
item: this.args.item, | ||
@@ -224,0 +227,0 @@ column: this.args.column, |
@@ -95,2 +95,4 @@ import type { AutoSize, CellMenuOption, CustomTooltipOption, Editor, EditorConstructor, EditorValidator, Formatter, FormatterResultWithHtml, FormatterResultWithText, GroupTotalsFormatter, Grouping, HeaderButtonsOrMenu } from './index'; | ||
offsetWidth?: number; | ||
/** extra custom generic parameters that could be used by your Formatter/Editor or anything else */ | ||
params?: any | any[]; | ||
/** column previous width */ | ||
@@ -97,0 +99,0 @@ previousWidth?: number; |
@@ -150,3 +150,6 @@ import type { Column as BaseColumn, CellMenuOption, ColumnPickerOption, ColumnReorderFunction, ContextMenuOption, CustomTooltipOption, EditCommand, EditorConstructor, ExcelCopyBufferOption, Formatter, GridMenuOption, ItemMetadata } from './index'; | ||
forceFitColumns?: boolean; | ||
/** Defaults to false, force synchronous scrolling */ | ||
/** | ||
* Defaults to false, force synchronous scrolling without throttling the UI render when scrolling. | ||
* Note: it might be risky to disable this option on large dataset, use at your own risk | ||
*/ | ||
forceSyncScrolling?: boolean; | ||
@@ -213,5 +216,11 @@ /** Formatter classes factory */ | ||
rowHighlightDuration?: number; | ||
/** | ||
* Defaults to "top", what CSS style to we want to use to render each row top offset (we can use "top" or "transform"). | ||
* For example, with a default `rowHeight: 22`, the 2nd row will have a `top` offset of 44px and by default have a CSS style of `top: 44px`. | ||
* NOTE: for perf reasons, the "transform" might become the default in our future major version. | ||
*/ | ||
rowTopOffsetRenderType?: 'top' | 'transform'; | ||
/** Optional sanitizer function to use for sanitizing data to avoid XSS attacks */ | ||
sanitizer?: (dirtyHtml: string) => string; | ||
/** Defaults to 50, render throttling when scrolling large dataset */ | ||
/** Defaults to 10(ms), render throttling when using virtual scroll on large dataset */ | ||
scrollRenderThrottling?: number; | ||
@@ -218,0 +227,0 @@ /** CSS class name used when cell is selected */ |
@@ -13,3 +13,3 @@ import type SortableInstance from 'sortablejs'; | ||
* | ||
* SlickGrid v5.11.0 | ||
* SlickGrid v5.12.0 | ||
* | ||
@@ -16,0 +16,0 @@ * NOTES: |
{ | ||
"name": "slickgrid", | ||
"version": "5.11.0", | ||
"version": "5.12.0", | ||
"description": "A lightning fast JavaScript grid/spreadsheet", | ||
@@ -5,0 +5,0 @@ "main": "./dist/cjs/index.js", |
@@ -152,2 +152,5 @@ import type { | ||
/** extra custom generic parameters that could be used by your Formatter/Editor or anything else */ | ||
params?: any | any[]; | ||
/** column previous width */ | ||
@@ -154,0 +157,0 @@ previousWidth?: number; |
@@ -199,3 +199,6 @@ import type { Column as BaseColumn, CellMenuOption, ColumnPickerOption, ColumnReorderFunction, ContextMenuOption, CustomTooltipOption, EditCommand, EditorConstructor, ExcelCopyBufferOption, Formatter, GridMenuOption, ItemMetadata, } from './index'; | ||
/** Defaults to false, force synchronous scrolling */ | ||
/** | ||
* Defaults to false, force synchronous scrolling without throttling the UI render when scrolling. | ||
* Note: it might be risky to disable this option on large dataset, use at your own risk | ||
*/ | ||
forceSyncScrolling?: boolean; | ||
@@ -286,6 +289,13 @@ | ||
/** | ||
* Defaults to "top", what CSS style to we want to use to render each row top offset (we can use "top" or "transform"). | ||
* For example, with a default `rowHeight: 22`, the 2nd row will have a `top` offset of 44px and by default have a CSS style of `top: 44px`. | ||
* NOTE: for perf reasons, the "transform" might become the default in our future major version. | ||
*/ | ||
rowTopOffsetRenderType?: 'top' | 'transform'; | ||
/** Optional sanitizer function to use for sanitizing data to avoid XSS attacks */ | ||
sanitizer?: (dirtyHtml: string) => string; | ||
/** Defaults to 50, render throttling when scrolling large dataset */ | ||
/** Defaults to 10(ms), render throttling when using virtual scroll on large dataset */ | ||
scrollRenderThrottling?: number; | ||
@@ -292,0 +302,0 @@ |
@@ -72,2 +72,3 @@ import type { Column, CompositeEditorOption, Editor, EditorArguments, HtmlElementPosition } from './models/index'; | ||
// @ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/no-this-alias | ||
const context: any = this; | ||
@@ -74,0 +75,0 @@ let editors: Array<Editor & { args: EditorArguments }> = []; |
@@ -744,3 +744,3 @@ /** | ||
if (i === length) { | ||
// @ts-ignore | ||
// eslint-disable-next-line @typescript-eslint/no-this-alias | ||
target = this; | ||
@@ -747,0 +747,0 @@ i--; |
@@ -346,2 +346,3 @@ import type { Column, Editor, EditorArguments, EditorValidationResult, ElementPosition, GridOption, OnCompositeEditorChangeEventArgs } from './models/index'; | ||
this.input.select(); | ||
const editorOptions = this.args.column.params?.editorOptions; // i.e.: { id: 'start', params: { editorOptions: {altFormat: 'd/m/Y', dateFormat: 'd/m/Y'}} } | ||
this.flatpickrInstance = flatpickr(this.input, { | ||
@@ -351,4 +352,4 @@ closeOnSelect: true, | ||
altInput: true, | ||
altFormat: 'm/d/Y', | ||
dateFormat: 'm/d/Y', | ||
altFormat: editorOptions?.altFormat ?? 'm/d/Y', | ||
dateFormat: editorOptions?.dateFormat ?? 'm/d/Y', | ||
onChange: () => { | ||
@@ -355,0 +356,0 @@ // trigger onCompositeEditorChange event when input changes and it's a Composite Editor |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
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
7275798
59465