@omegagrid/grid-core 0.9.13 → 0.9.15
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.
package/dist/model/options.d.ts
CHANGED
|
@@ -91,6 +91,11 @@ export type ClipboardOptions = {
|
|
|
91
91
|
* rewrite_append = rewrite when columns are availible, otherwise insert new columns
|
|
92
92
|
*/
|
|
93
93
|
columnPasteMode?: PasteMode;
|
|
94
|
+
/**
|
|
95
|
+
* Skips hidden rows when pasting data.
|
|
96
|
+
* Values are pasted into nearest visible row.
|
|
97
|
+
*/
|
|
98
|
+
skipHiddenRows?: boolean;
|
|
94
99
|
};
|
|
95
100
|
export type PrintOptions = {
|
|
96
101
|
/** idexes of rows, after which page break will be inserted */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/model/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAqB,aAAa,EAAE,KAAK,EAAE,QAAQ,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACpG,OAAO,EAAE,cAAc,EAAE,oBAAoB,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC1E,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAGxD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACpD,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGtD,MAAM,MAAM,QAAQ,GAAG,MAAM,GAAG,cAAc,CAAC;AAE/C,MAAM,MAAM,cAAc,GAAG;IAC5B,gCAAgC;IAChC,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB,2BAA2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,GAAG,CAAC,UAAU,EAAC,CAAC;IACpF,GAAG,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,oBAAoB,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;IAEzE,IAAI,GAAG,CAAC,cAAc;QAAE,GAAG,CAAC,cAAc,GAAG,uBAAuB,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEzF,OAAO,GAAc,CAAC;AACvB,CAAC","sourcesContent":["import { numbers, initCommonOptions, CommonOptions, dates, MenuItem, paper } from \"@omegagrid/core\";\nimport { CellValidation, CellValidationSource, Renderer } from \"../types\";\nimport { CommentOptions, SortSettings } from \"../model\";\nimport constants, { DEFAULT_FILTER_OPTIONS, DEFAULT_TREE_OPTIONS } from \"../constants\";\nimport { utils } from \"@omegagrid/core\";\nimport { ElementModel } from \"./elementModel\";\nimport { CellModel, CellSource } from \"./cellModel\";\nimport { RowModel } from \"./rowModel\";\nimport { ColumnModel } from \"./columnModel\";\nimport { CellAddress, RangeAddress } from \"../common\";\nimport { normalizeCellValidation } from \"./validations\";\n\nexport type ViewMode = 'grid' | 'singleObject';\n\nexport type EditingOptions = {\n\t/** enable inserting new rows */\n\trowInsertion?: boolean,\n\n\t/** enable deleting rows */\n\trowDeletion?: boolean,\n\n\t/** enable editing row outline levels */\n\trowOutline?: boolean,\n\n\t/** enable inserting new columns */\n\tcolInsertion?: boolean,\n\n\t/** enable deleting columns */\n\tcolDeletion?: boolean,\n\n\t/** enable editing column outline levels */\n\tcolOutline?: boolean,\n\n\t/** use calendar editor for date cells */\n\tdateCalendarEditor?: boolean,\n\n};\n\nexport type ScrollingOptions = {\n\t/** maximum proximity of cursor to scrollbar to be visible */\n\tscrollbarVisibilityTreshold?: number,\n\n\t/** enable vertical overscroll */\n\tverticalOverscroll?: boolean,\n\n\t/** enable horizontal overscroll */\n\thorizontalOverscroll?: boolean,\n};\n\nexport type GridMenuItem<T extends ElementModel> = MenuItem & {\n\thidden?: (model: T) => boolean,\n}\n\nexport type MenuOptionsItem<T extends ElementModel> = {\n\titems: GridMenuItem<T>[],\n\thidden?: (model: T) => boolean,\n\treplace?: boolean\n};\n\nexport type MenuOptions = {\n\tcell: MenuOptionsItem<CellModel>,\n\trow: MenuOptionsItem<RowModel>,\n\tcolumn: MenuOptionsItem<ColumnModel>,\n};\n\nexport type EventOptions = {\n\t/** grid click event options */\n\tclick: {\n\t\t/** maximum mouse move path length, after click event is allowed */\n\t\tmouseMoveTreshold: number\n\t}\n};\n\nexport type SortingOptions = {\n\t/** column sorting enabled */\n\tenabled?: boolean,\n\t\n\t/** maximum number of columns that can be sorted */\n\tmaxColumns?: number,\n\t\n\t/** initial sorting settings */\n\tdefaultSettings?: SortSettings[]\n};\n\nexport type FilterOptions = {\n\tenabled?: boolean;\n\t/** the parents of the matched rows will be included in the results */\n\tincludeParents?: boolean;\n\t/** the children of the matched rows will be included in the results */\n\tincludeChildren?: boolean;\n}\n\nexport type SelectingOptions = {\n\tenabled?: boolean;\n\tmultiSelect?: boolean;\n}\n\n\nexport type TreeOptions = {\n\tenabled?: boolean;\n\treversed?: boolean;\n}\n\nexport type PasteMode = 'insert'|'rewrite'|'rewrite_append';\n\nexport type ClipboardOptions = {\n\tpasteProps: (keyof CellSource)[]|'all';\n\n\t/**\n\t * paste mode for rows, \n\t * \tinsert = always insert new rows\n\t * \trewrite = rewrite when rows are availible\n\t * \trewrite_append = rewrite when rows are availible, otherwise insert new rows; default\n\t */\n\trowPasteMode?: PasteMode;\n\n\t/**\n\t * paste mode for columns, \n\t * \tinsert = always insert new columns\n\t * \trewrite = rewrite when columns are availible; default\n\t * \trewrite_append = rewrite when columns are availible, otherwise insert new columns\n\t */\n\tcolumnPasteMode?: PasteMode;\n}\n\nexport type PrintOptions = {\n\t/** idexes of rows, after which page break will be inserted */\n\trowBreaks?: number[];\n\n\t/** range of rows to repeat at the top of each page, eg: \"1:20\" */\n\trowTitles?: RangeAddress;\n\n\t/** print scale, 50 = 50% */\n\tscale?: number;\n\n\t/** print page orientation */\n\torientation?: 'landscape'|'portrait';\n\n\t/** print quality */\n\tdpi?: number;\n\n\t/** print paper size */\n\tpaper?: paper.PaperType|paper.PaperSize;\n\n\t/** page margin settings */\n\tmargins?: {\n\t\ttop: number,\n\t\tbottom: number,\n\t\tleft: number,\n\t\tright: number,\n\t\theader: number,\n\t\tfooter: number\n\t}\n}\n\nexport type Options = {\n\tviewMode?: ViewMode,\n\n\t/** default number of rows */\n\trows?: number;\n\n\t/** default number of columns */\n\tcolumns?: number;\n\n\t/** readOnly cells */\n\treadOnly?: boolean;\n\n\t/** render column with row numbers */\n\trowNumbers?: boolean;\n\n\t/** render column with row numbers */\n\trowResize?: boolean;\n\n\t/** default row priority */\n\trowPriority?: number;\n\n\t/** render column with row tree outline */\n\trowTree?: TreeOptions;\n\n\t/** render header row with column letters */\n\tcolLetters?: boolean;\n\n\t/** render row with column tree outline */\n\tcolumnTree?: TreeOptions;\n\n\t/** default column priority */\n\tcolumnPriority?: number;\n\n\t/** render column with row numbers */\n\tcolumnResize?: boolean;\n\n\t/** render tree buttons in column header labels */\n\tcolumnHeaderTreeButtons?: boolean;\n\n\t/** number of freezed rows on the top */\n\tfreezeTop?: number;\n\t\n\t/** number of freezed columns on the left */\n\tfreezeLeft?: number;\n\n\t/** number of freezed columns on the right, not implemented yet */\n\tfreezeRight?: number;\n\n\t/** number of freezed rows on the bottom, not implemented yet */\n\tfreezeBottom?: number;\n\n\t/** default font size */\n\tfontSize?: number;\n\n\t/** default row height */\n\trowHeight?: number;\n\n\t/** remove row hidden property after its parent is expanded */\n\tunhideRowAfterExpand?: boolean;\n\n\t/** default column width */\n\tcolumnWidth?: number;\n\n\t/** remove column hidden property after its parent is expanded */\n\tunhideColumnAfterExpand?: boolean;\n\n\t/** style source are native css styles */\n\tcssStyles?: boolean;\n\n\t/** cell border visibility */\n\tgrid?: boolean,\n\t\n\t/** column filter options */\n\tfilters?: FilterOptions,\n\n\t/** default number format */\n\tnumberFormat?: string,\n\t\n\t/** tries to repair invalid number/date formats */\n\tfixNumberFormat?: boolean,\n\n\t/** shows click indicator even in cells without value */\n\temptyClickable?: boolean,\n\n\t/** custom number formatter function */\n\tnumberFormatter?: numbers.NumberFormatterFunction,\n\n\t/** custom date formatter function */\n\tdateFormatter?: dates.DateFormatterFunction,\n\t\n\t/** enables default cell editing */\n\teditable?: boolean,\n\n\t/** enables default cell commenting */\n\tcommentable?: boolean,\n\n\t/** enables autofill function */\n\tautofill?: boolean,\n\n\t/** number of rows on one page for dynamic row fetching */\n\tpageSize?: number,\n\n\t/** enables command window */\n\tcommandWindow?: boolean,\n\n\t/** enables undo/redo */\n\tundoRedo?: boolean,\n\n\t/** location of cell with level buttons */\n\tlevelButtonCell?: {c: number, r: number},\n\n\t/** shows placeholder if grid is empty */\n\temptyPlaceholder?: boolean,\n\n\t/** custom cell renderer applied after default renderers */\n\tafterRenderer?: Renderer,\n\n\t/** factor of cell indentation */\n\tcellIndentFactor?: number,\n\n\t/** factor of level indentation */\n\tlevelIndentFactor?: number,\n\n\t/** menu options */\n\tmenus?: MenuOptions,\n\n\t/** editing options */\n\tediting?: EditingOptions,\n\n\t/** selecting options */\n\tselecting?: SelectingOptions,\n\n\t/** comment options */\n\tcomments?: CommentOptions,\n\t\n\t/** scrolling options */\n\tscrolling?: ScrollingOptions,\n\n\t/** event options */\n\tevents?: EventOptions,\n\t\n\t/** max number of sorted columns, deprecated */\n\tmaxSortingColumns?: number;\n\n\t/** enabled column sorting, deprecated */\n\tcolumnSorting?: boolean,\n\n\t/** column sorting options */\n\tsorting?: SortingOptions,\n\n\t/** clipboard options */\n\tclipboard?: ClipboardOptions,\n\n\t/** default cell validation rules */\n\tcellValidation?: CellValidation,\n\n\t/** first cell in viewport */\n\tfirstCell?: CellAddress,\n\n\t/** cell element caching */\n\tcellCache?: boolean,\n\n\t/** use single cell model instance for all grid cells */\n\tsingleCellModel?: boolean,\n\n\t/** options for raw html export/print */\n\tprint?: PrintOptions,\n\n\t/** grid zoom factor */\n\tzoom?: number,\n} & CommonOptions;\n\nexport type OptionSource = Omit<Options, 'rowTree'|'columnTree'|'filters'|'cellValidation'> & {\n\trowTree?: boolean|TreeOptions;\n\tcolumnTree?: boolean|TreeOptions;\n\tfilters?: boolean|FilterOptions;\n\tcellValidation?: CellValidationSource;\n}\n\nexport function initOptions(options?: Partial<OptionSource>, origOptions: OptionSource = null): Options {\n\tconst opt = utils.mergeDeep<OptionSource>({}, constants.DEFAULT_OPTIONS, origOptions, initCommonOptions(options, origOptions));\n\t\n\tif (opt.numberFormat) {\n\t\topt.numberFormatter = numbers.getNumberFormatter(opt.formatLocale, opt.numberFormat);\n\t} else if (!opt.numberFormatter) {\n\t\topt.numberFormatter = numbers.getNumberFormatter(opt.formatLocale);\n\t}\n\n\tif (opt.dateFormat) {\n\t\topt.dateFormatter = dates.getDateFormatter(opt.formatLocale, opt.dateFormat);\n\t} else if (!opt.dateFormatter) {\n\t\topt.dateFormatter = dates.getDateFormatter(opt.formatLocale);\n\t}\n\n\tif (opt.columnSorting) {\n\t\topt.sorting = opt.sorting || {enabled: true};\n\t}\n\t\n\tif (typeof opt.filters === 'boolean') opt.filters = {enabled: opt.filters};\n\topt.filters = Object.assign({}, DEFAULT_FILTER_OPTIONS, opt.filters);\n\n\tif (typeof opt.rowTree === 'boolean') opt.rowTree = {enabled: opt.rowTree};\n\topt.rowTree = Object.assign({}, DEFAULT_TREE_OPTIONS, opt.rowTree);\n\n\tif (typeof opt.columnTree === 'boolean') opt.columnTree = {enabled: opt.columnTree};\n\topt.columnTree = Object.assign({}, DEFAULT_TREE_OPTIONS, opt.columnTree);\n\n\tif (opt.cellValidation) opt.cellValidation = normalizeCellValidation(opt.cellValidation);\n\n\treturn opt as Options;\n}"]}
|
|
1
|
+
{"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/model/options.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,iBAAiB,EAAiB,KAAK,EAAmB,MAAM,iBAAiB,CA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,GAAG,EAAC,OAAO,EAAE,GAAG,CAAC,OAAO,EAAC,CAAC;IAC3E,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,sBAAsB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAErE,IAAI,OAAO,GAAG,CAAC,OAAO,KAAK,SAAS;QAAE,GAAG,CAAC,OAAO,GAAG,EAAC,OAAO,EAAE,GAAG,CAAC,OAAO,EAAC,CAAC;IAC3E,GAAG,CAAC,OAAO,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,oBAAoB,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;IAEnE,IAAI,OAAO,GAAG,CAAC,UAAU,KAAK,SAAS;QAAE,GAAG,CAAC,UAAU,GAAG,EAAC,OAAO,EAAE,GAAG,CAAC,UAAU,EAAC,CAAC;IACpF,GAAG,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,oBAAoB,EAAE,GAAG,CAAC,UAAU,CAAC,CAAC;IAEzE,IAAI,GAAG,CAAC,cAAc;QAAE,GAAG,CAAC,cAAc,GAAG,uBAAuB,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC;IAEzF,OAAO,GAAc,CAAC;AACvB,CAAC","sourcesContent":["import { numbers, initCommonOptions, CommonOptions, dates, MenuItem, paper } from \"@omegagrid/core\";\nimport { CellValidation, CellValidationSource, Renderer } from \"../types\";\nimport { CommentOptions, SortSettings } from \"../model\";\nimport constants, { DEFAULT_FILTER_OPTIONS, DEFAULT_TREE_OPTIONS } from \"../constants\";\nimport { utils } from \"@omegagrid/core\";\nimport { ElementModel } from \"./elementModel\";\nimport { CellModel, CellSource } from \"./cellModel\";\nimport { RowModel } from \"./rowModel\";\nimport { ColumnModel } from \"./columnModel\";\nimport { CellAddress, RangeAddress } from \"../common\";\nimport { normalizeCellValidation } from \"./validations\";\n\nexport type ViewMode = 'grid' | 'singleObject';\n\nexport type EditingOptions = {\n\t/** enable inserting new rows */\n\trowInsertion?: boolean,\n\n\t/** enable deleting rows */\n\trowDeletion?: boolean,\n\n\t/** enable editing row outline levels */\n\trowOutline?: boolean,\n\n\t/** enable inserting new columns */\n\tcolInsertion?: boolean,\n\n\t/** enable deleting columns */\n\tcolDeletion?: boolean,\n\n\t/** enable editing column outline levels */\n\tcolOutline?: boolean,\n\n\t/** use calendar editor for date cells */\n\tdateCalendarEditor?: boolean,\n\n};\n\nexport type ScrollingOptions = {\n\t/** maximum proximity of cursor to scrollbar to be visible */\n\tscrollbarVisibilityTreshold?: number,\n\n\t/** enable vertical overscroll */\n\tverticalOverscroll?: boolean,\n\n\t/** enable horizontal overscroll */\n\thorizontalOverscroll?: boolean,\n};\n\nexport type GridMenuItem<T extends ElementModel> = MenuItem & {\n\thidden?: (model: T) => boolean,\n}\n\nexport type MenuOptionsItem<T extends ElementModel> = {\n\titems: GridMenuItem<T>[],\n\thidden?: (model: T) => boolean,\n\treplace?: boolean\n};\n\nexport type MenuOptions = {\n\tcell: MenuOptionsItem<CellModel>,\n\trow: MenuOptionsItem<RowModel>,\n\tcolumn: MenuOptionsItem<ColumnModel>,\n};\n\nexport type EventOptions = {\n\t/** grid click event options */\n\tclick: {\n\t\t/** maximum mouse move path length, after click event is allowed */\n\t\tmouseMoveTreshold: number\n\t}\n};\n\nexport type SortingOptions = {\n\t/** column sorting enabled */\n\tenabled?: boolean,\n\t\n\t/** maximum number of columns that can be sorted */\n\tmaxColumns?: number,\n\t\n\t/** initial sorting settings */\n\tdefaultSettings?: SortSettings[]\n};\n\nexport type FilterOptions = {\n\tenabled?: boolean;\n\t/** the parents of the matched rows will be included in the results */\n\tincludeParents?: boolean;\n\t/** the children of the matched rows will be included in the results */\n\tincludeChildren?: boolean;\n}\n\nexport type SelectingOptions = {\n\tenabled?: boolean;\n\tmultiSelect?: boolean;\n}\n\n\nexport type TreeOptions = {\n\tenabled?: boolean;\n\treversed?: boolean;\n}\n\nexport type PasteMode = 'insert'|'rewrite'|'rewrite_append';\n\nexport type ClipboardOptions = {\n\tpasteProps: (keyof CellSource)[]|'all';\n\n\t/**\n\t * paste mode for rows, \n\t * \tinsert = always insert new rows\n\t * \trewrite = rewrite when rows are availible\n\t * \trewrite_append = rewrite when rows are availible, otherwise insert new rows; default\n\t */\n\trowPasteMode?: PasteMode;\n\n\t/**\n\t * paste mode for columns, \n\t * \tinsert = always insert new columns\n\t * \trewrite = rewrite when columns are availible; default\n\t * \trewrite_append = rewrite when columns are availible, otherwise insert new columns\n\t */\n\tcolumnPasteMode?: PasteMode;\n\n\t/**\n\t * Skips hidden rows when pasting data.\n\t * Values are pasted into nearest visible row.\n\t */\n\tskipHiddenRows?: boolean;\n}\n\nexport type PrintOptions = {\n\t/** idexes of rows, after which page break will be inserted */\n\trowBreaks?: number[];\n\n\t/** range of rows to repeat at the top of each page, eg: \"1:20\" */\n\trowTitles?: RangeAddress;\n\n\t/** print scale, 50 = 50% */\n\tscale?: number;\n\n\t/** print page orientation */\n\torientation?: 'landscape'|'portrait';\n\n\t/** print quality */\n\tdpi?: number;\n\n\t/** print paper size */\n\tpaper?: paper.PaperType|paper.PaperSize;\n\n\t/** page margin settings */\n\tmargins?: {\n\t\ttop: number,\n\t\tbottom: number,\n\t\tleft: number,\n\t\tright: number,\n\t\theader: number,\n\t\tfooter: number\n\t}\n}\n\nexport type Options = {\n\tviewMode?: ViewMode,\n\n\t/** default number of rows */\n\trows?: number;\n\n\t/** default number of columns */\n\tcolumns?: number;\n\n\t/** readOnly cells */\n\treadOnly?: boolean;\n\n\t/** render column with row numbers */\n\trowNumbers?: boolean;\n\n\t/** render column with row numbers */\n\trowResize?: boolean;\n\n\t/** default row priority */\n\trowPriority?: number;\n\n\t/** render column with row tree outline */\n\trowTree?: TreeOptions;\n\n\t/** render header row with column letters */\n\tcolLetters?: boolean;\n\n\t/** render row with column tree outline */\n\tcolumnTree?: TreeOptions;\n\n\t/** default column priority */\n\tcolumnPriority?: number;\n\n\t/** render column with row numbers */\n\tcolumnResize?: boolean;\n\n\t/** render tree buttons in column header labels */\n\tcolumnHeaderTreeButtons?: boolean;\n\n\t/** number of freezed rows on the top */\n\tfreezeTop?: number;\n\t\n\t/** number of freezed columns on the left */\n\tfreezeLeft?: number;\n\n\t/** number of freezed columns on the right, not implemented yet */\n\tfreezeRight?: number;\n\n\t/** number of freezed rows on the bottom, not implemented yet */\n\tfreezeBottom?: number;\n\n\t/** default font size */\n\tfontSize?: number;\n\n\t/** default row height */\n\trowHeight?: number;\n\n\t/** remove row hidden property after its parent is expanded */\n\tunhideRowAfterExpand?: boolean;\n\n\t/** default column width */\n\tcolumnWidth?: number;\n\n\t/** remove column hidden property after its parent is expanded */\n\tunhideColumnAfterExpand?: boolean;\n\n\t/** style source are native css styles */\n\tcssStyles?: boolean;\n\n\t/** cell border visibility */\n\tgrid?: boolean,\n\t\n\t/** column filter options */\n\tfilters?: FilterOptions,\n\n\t/** default number format */\n\tnumberFormat?: string,\n\t\n\t/** tries to repair invalid number/date formats */\n\tfixNumberFormat?: boolean,\n\n\t/** shows click indicator even in cells without value */\n\temptyClickable?: boolean,\n\n\t/** custom number formatter function */\n\tnumberFormatter?: numbers.NumberFormatterFunction,\n\n\t/** custom date formatter function */\n\tdateFormatter?: dates.DateFormatterFunction,\n\t\n\t/** enables default cell editing */\n\teditable?: boolean,\n\n\t/** enables default cell commenting */\n\tcommentable?: boolean,\n\n\t/** enables autofill function */\n\tautofill?: boolean,\n\n\t/** number of rows on one page for dynamic row fetching */\n\tpageSize?: number,\n\n\t/** enables command window */\n\tcommandWindow?: boolean,\n\n\t/** enables undo/redo */\n\tundoRedo?: boolean,\n\n\t/** location of cell with level buttons */\n\tlevelButtonCell?: {c: number, r: number},\n\n\t/** shows placeholder if grid is empty */\n\temptyPlaceholder?: boolean,\n\n\t/** custom cell renderer applied after default renderers */\n\tafterRenderer?: Renderer,\n\n\t/** factor of cell indentation */\n\tcellIndentFactor?: number,\n\n\t/** factor of level indentation */\n\tlevelIndentFactor?: number,\n\n\t/** menu options */\n\tmenus?: MenuOptions,\n\n\t/** editing options */\n\tediting?: EditingOptions,\n\n\t/** selecting options */\n\tselecting?: SelectingOptions,\n\n\t/** comment options */\n\tcomments?: CommentOptions,\n\t\n\t/** scrolling options */\n\tscrolling?: ScrollingOptions,\n\n\t/** event options */\n\tevents?: EventOptions,\n\t\n\t/** max number of sorted columns, deprecated */\n\tmaxSortingColumns?: number;\n\n\t/** enabled column sorting, deprecated */\n\tcolumnSorting?: boolean,\n\n\t/** column sorting options */\n\tsorting?: SortingOptions,\n\n\t/** clipboard options */\n\tclipboard?: ClipboardOptions,\n\n\t/** default cell validation rules */\n\tcellValidation?: CellValidation,\n\n\t/** first cell in viewport */\n\tfirstCell?: CellAddress,\n\n\t/** cell element caching */\n\tcellCache?: boolean,\n\n\t/** use single cell model instance for all grid cells */\n\tsingleCellModel?: boolean,\n\n\t/** options for raw html export/print */\n\tprint?: PrintOptions,\n\n\t/** grid zoom factor */\n\tzoom?: number,\n} & CommonOptions;\n\nexport type OptionSource = Omit<Options, 'rowTree'|'columnTree'|'filters'|'cellValidation'> & {\n\trowTree?: boolean|TreeOptions;\n\tcolumnTree?: boolean|TreeOptions;\n\tfilters?: boolean|FilterOptions;\n\tcellValidation?: CellValidationSource;\n}\n\nexport function initOptions(options?: Partial<OptionSource>, origOptions: OptionSource = null): Options {\n\tconst opt = utils.mergeDeep<OptionSource>({}, constants.DEFAULT_OPTIONS, origOptions, initCommonOptions(options, origOptions));\n\t\n\tif (opt.numberFormat) {\n\t\topt.numberFormatter = numbers.getNumberFormatter(opt.formatLocale, opt.numberFormat);\n\t} else if (!opt.numberFormatter) {\n\t\topt.numberFormatter = numbers.getNumberFormatter(opt.formatLocale);\n\t}\n\n\tif (opt.dateFormat) {\n\t\topt.dateFormatter = dates.getDateFormatter(opt.formatLocale, opt.dateFormat);\n\t} else if (!opt.dateFormatter) {\n\t\topt.dateFormatter = dates.getDateFormatter(opt.formatLocale);\n\t}\n\n\tif (opt.columnSorting) {\n\t\topt.sorting = opt.sorting || {enabled: true};\n\t}\n\t\n\tif (typeof opt.filters === 'boolean') opt.filters = {enabled: opt.filters};\n\topt.filters = Object.assign({}, DEFAULT_FILTER_OPTIONS, opt.filters);\n\n\tif (typeof opt.rowTree === 'boolean') opt.rowTree = {enabled: opt.rowTree};\n\topt.rowTree = Object.assign({}, DEFAULT_TREE_OPTIONS, opt.rowTree);\n\n\tif (typeof opt.columnTree === 'boolean') opt.columnTree = {enabled: opt.columnTree};\n\topt.columnTree = Object.assign({}, DEFAULT_TREE_OPTIONS, opt.columnTree);\n\n\tif (opt.cellValidation) opt.cellValidation = normalizeCellValidation(opt.cellValidation);\n\n\treturn opt as Options;\n}"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@omegagrid/grid-core",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.15",
|
|
4
4
|
"license": "UNLICENSED",
|
|
5
5
|
"description": "Grid model, no ui components",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"generate-functions-docs": "node ./scripts/generate-functions-docs.cjs"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@omegagrid/core": "^0.9.
|
|
32
|
-
"@omegagrid/localize": "^0.9.
|
|
31
|
+
"@omegagrid/core": "^0.9.15",
|
|
32
|
+
"@omegagrid/localize": "^0.9.15",
|
|
33
33
|
"@stdlib/stats": "^0.0.13",
|
|
34
34
|
"color": "^4.2.3",
|
|
35
35
|
"date-fns": "^3.2.0",
|