@bryntum/grid-trial 7.3.3 → 7.3.4

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/grid.thin.d.ts CHANGED
@@ -243,6 +243,16 @@ type ExportConfig = {
243
243
  * Set to true to output as a CSV file, or as an object where you can specify delimiters.
244
244
  */
245
245
  csv?: boolean|object
246
+ /**
247
+ * MIME type used when creating the CSV Blob. Defaults to `text/csv`. Use
248
+ * `application/octet-stream` in Salesforce LWS environments.
249
+ */
250
+ csvMimeType?: string
251
+ /**
252
+ * MIME type used when creating the XLSX download Blob. Use
253
+ * `application/octet-stream` in Salesforce LWS environments.
254
+ */
255
+ xlsxMimeType?: string
246
256
  }
247
257
 
248
258
  type XLSColumn = {
@@ -25608,6 +25618,11 @@ type ExcelExporterConfig = {
25608
25618
  * [More...](https://bryntum.com/products/grid/docs/api/Grid/feature/experimental/ExcelExporter#config-convertEmptyValueToEmptyString)
25609
25619
  */
25610
25620
  convertEmptyValueToEmptyString?: boolean
25621
+ /**
25622
+ * MIME type used when creating the CSV Blob for download. Some environments (e.g. Salesforce Lightning Web
25623
+ * Security) block `text/csv` for `URL.createObjectURL`. Use `application/octet-stream` there instead.
25624
+ */
25625
+ csvMimeType?: string
25611
25626
  /**
25612
25627
  * Defines how dates in a cell will be formatted
25613
25628
  */
@@ -25663,6 +25678,12 @@ type ExcelExporterConfig = {
25663
25678
  * [More...](https://bryntum.com/products/grid/docs/api/Grid/feature/experimental/ExcelExporter#config-xlsProvider)
25664
25679
  */
25665
25680
  xlsProvider?: typeof XlsProviderBase
25681
+ /**
25682
+ * MIME type used when creating the XLSX download Blob. Some environments (e.g. Salesforce Lightning Web
25683
+ * Security) block the default XLSX MIME type for `URL.createObjectURL`. Use `application/octet-stream` in such case
25684
+ * instead.
25685
+ */
25686
+ xlsxMimeType?: string
25666
25687
  /**
25667
25688
  * Fires before an object is destroyed.
25668
25689
  * @param {object} event Event object
@@ -25745,10 +25766,12 @@ export class ExcelExporter extends InstancePlugin {
25745
25766
  * @param {boolean,object} [config.csv] Set to `true` to output as a CSV file, or as an object where you can specify delimiters.
25746
25767
  * @param {string} [config.csv.columnDelimiter] The CSV delimiter to separate values on one line, defaults to `,`.
25747
25768
  * @param {string} [config.csv.lineDelimiter] The CSV delimiter to separate lines, defaults to `\n`.
25769
+ * @param {string} [config.csvMimeType] MIME type used when creating the CSV Blob. Overrides [csvMimeType](https://bryntum.com/products/grid/docs/api/Grid/feature/experimental/ExcelExporter#config-csvMimeType).
25770
+ * @param {string} [config.xlsxMimeType] MIME type used when creating the XLSX download Blob. Overrides [xlsxMimeType](https://bryntum.com/products/grid/docs/api/Grid/feature/experimental/ExcelExporter#config-xlsxMimeType).
25748
25771
  * @param {string[],object[]} [config.columns] An array of column configuration objects
25749
25772
  * @param {Core.data.Model[]} [config.rows] An array of records to export
25750
25773
  */
25751
- export(config: { filename?: string, dateFormat?: string, csv?: boolean|{ columnDelimiter?: string, lineDelimiter?: string }, columns?: string[]|object[], rows?: Model[] }): Promise<any>;
25774
+ export(config: { filename?: string, dateFormat?: string, csv?: boolean|{ columnDelimiter?: string, lineDelimiter?: string }, csvMimeType?: string, xlsxMimeType?: string, columns?: string[]|object[], rows?: Model[] }): Promise<any>;
25752
25775
  }
25753
25776
 
25754
25777
  /**
@@ -25972,9 +25995,10 @@ export class WriteExcelFileProvider {
25972
25995
  * @param {object} config.sheet *deprecated, to be removed in 7.0* Object with columns and data
25973
25996
  * @param {any[][]} config.sheet.data Array of rows, each row is an array of cells
25974
25997
  * @param {XLSColumn[]} config.sheet.cols Array of columns
25975
- * @param {string} config.MIME File MIME type
25998
+ * @param {string} config.mimeType MIME type used when creating the download Blob, passed from [xlsxMimeType](https://bryntum.com/products/grid/docs/api/Grid/feature/experimental/ExcelExporter#config-xlsxMimeType).
25999
+ * @param {string} [config.MIME] *deprecated, use `mimeType` instead*
25976
26000
  */
25977
- static write(config: { filename: string, rows: any[], columns: XLSColumn[], sheet: { data: any[], cols: XLSColumn[] }, MIME: string }): void;
26001
+ static write(config: { filename: string, rows: any[], columns: XLSColumn[], sheet: { data: any[], cols: XLSColumn[] }, mimeType: string, MIME?: string }): Promise<any>;
25978
26002
  }
25979
26003
 
25980
26004
  /**
@@ -25983,17 +26007,18 @@ export class WriteExcelFileProvider {
25983
26007
  */
25984
26008
  export class XlsProviderBase {
25985
26009
  /**
25986
- * Implement this method to write data to an xls file
26010
+ * Implement this method to write data to an xls file. May return a Promise if the
26011
+ * implementation needs to perform asynchronous work (e.g. awaiting a 3rd-party library).
26012
+ * [ExcelExporter](https://bryntum.com/products/grid/docs/api/Grid/feature/experimental/ExcelExporter) awaits the return value, so both sync
26013
+ * and async implementations are supported.
25987
26014
  * @param {object} config
25988
26015
  * @param {string} config.filename Name of the exported file
25989
26016
  * @param {any[][]} config.rows Array of rows, each row is an array of cells
25990
26017
  * @param {XLSColumn[]} config.columns Array of columns
25991
- * @param {object} config.sheet *deprecated, to be removed in 7.0* Object with columns and data
25992
- * @param {any[][]} config.sheet.data Array of rows, each row is an array of cells
25993
- * @param {XLSColumn[]} config.sheet.cols Array of columns
25994
- * @param {string} config.MIME File MIME type
26018
+ * @param {string} config.mimeType MIME type to use when creating the download Blob. Configured via [xlsxMimeType](https://bryntum.com/products/grid/docs/api/Grid/feature/experimental/ExcelExporter#config-xlsxMimeType).
26019
+ * @param {string} [config.MIME] *deprecated, use `mimeType` instead*
25995
26020
  */
25996
- static write(config: { filename: string, rows: any[], columns: XLSColumn[], sheet: { data: any[], cols: XLSColumn[] }, MIME: string }): void;
26021
+ static write(config: { filename: string, rows: any[], columns: XLSColumn[], mimeType: string, MIME?: string }): Promise<void|any>;
25997
26022
  }
25998
26023
 
25999
26024
  /**
@@ -45489,6 +45514,7 @@ type AIFilterFieldConfig = {
45489
45514
  * Show a trigger to clear field, if this field is not [readOnly](https://bryntum.com/products/grid/docs/api/Core/widget/Field#config-readOnly). The trigger is available
45490
45515
  * in the [triggers](https://bryntum.com/products/grid/docs/api/Core/widget/Field#property-triggers) object under the name `clear`. May also be an object which
45491
45516
  * configures the `clear` [trigger](https://bryntum.com/products/grid/docs/api/Core/widget/Field#property-triggers).
45517
+ * [More...](https://bryntum.com/products/grid/docs/api/Grid/widget/AIFilterField#config-clearable)
45492
45518
  */
45493
45519
  clearable?: boolean|FieldTriggerConfig
45494
45520
  /**
@@ -46673,6 +46699,7 @@ type ChecklistFilterComboConfig = {
46673
46699
  * Show a trigger to clear field, if this field is not [readOnly](https://bryntum.com/products/grid/docs/api/Core/widget/Field#config-readOnly). The trigger is available
46674
46700
  * in the [triggers](https://bryntum.com/products/grid/docs/api/Core/widget/Field#property-triggers) object under the name `clear`. May also be an object which
46675
46701
  * configures the `clear` [trigger](https://bryntum.com/products/grid/docs/api/Core/widget/Field#property-triggers).
46702
+ * [More...](https://bryntum.com/products/grid/docs/api/Grid/widget/ChecklistFilterCombo#config-clearable)
46676
46703
  */
46677
46704
  clearable?: boolean|FieldTriggerConfig
46678
46705
  /**
@@ -52027,6 +52054,7 @@ type TreeComboConfig = {
52027
52054
  * Show a trigger to clear field, if this field is not [readOnly](https://bryntum.com/products/grid/docs/api/Core/widget/Field#config-readOnly). The trigger is available
52028
52055
  * in the [triggers](https://bryntum.com/products/grid/docs/api/Core/widget/Field#property-triggers) object under the name `clear`. May also be an object which
52029
52056
  * configures the `clear` [trigger](https://bryntum.com/products/grid/docs/api/Core/widget/Field#property-triggers).
52057
+ * [More...](https://bryntum.com/products/grid/docs/api/Grid/widget/TreeCombo#config-clearable)
52030
52058
  */
52031
52059
  clearable?: boolean|FieldTriggerConfig
52032
52060
  /**