dce-reactkit 3.2.2-beta.42 → 3.2.2-beta.44

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/esm/index.js CHANGED
@@ -2305,7 +2305,7 @@ const CSVDownloadButton = (props) => {
2305
2305
  /* Main UI */
2306
2306
  /*----------------------------------------*/
2307
2307
  // Render the button
2308
- return (React.createElement("a", { id: id, download: filename, href: `data:application/octet-stream,${csv}`, className: `CSVDownloadButton-button ${className !== null && className !== void 0 ? className : 'btn btn-secondary'}`, "aria-label": (ariaLabel
2308
+ return (React.createElement("a", { id: id, download: filename, href: `data:application/octet-stream,${encodeURIComponent(csv)}`, className: `CSVDownloadButton-button ${className !== null && className !== void 0 ? className : 'btn btn-secondary'}`, "aria-label": (ariaLabel
2309
2309
  ? `Click to download ${filename}`
2310
2310
  : ariaLabel), style: style, onClick: onClick },
2311
2311
  !children && (React.createElement(React.Fragment, null,
@@ -2386,8 +2386,10 @@ const IntelliTable = (props) => {
2386
2386
  const data = ((props.data && props.data.length > 0)
2387
2387
  ? props.data
2388
2388
  : [{ id: 'empty-row' }]);
2389
+ // Get CSV filename
2390
+ let filename = `${title}.csv`;
2389
2391
  if (props.csvName) {
2390
- (props.csvName.endsWith('.csv')
2392
+ filename = (props.csvName.endsWith('.csv')
2391
2393
  ? props.csvName
2392
2394
  : `${props.csvName}.csv`);
2393
2395
  }
@@ -2663,7 +2665,7 @@ const IntelliTable = (props) => {
2663
2665
  React.createElement("div", { className: "d-flex align-items-center justify-content-start" },
2664
2666
  React.createElement("h3", { className: "m-0" }, title),
2665
2667
  React.createElement("div", { className: "flex-grow-1 text-end" },
2666
- React.createElement(CSVDownloadButton, { "aria-label": `download data as csv for ${title}`, id: `IntelliTable-${id}-download-as-csv`, filename: `${title}.csv`, csv: csv }),
2668
+ React.createElement(CSVDownloadButton, { "aria-label": `download data as csv for ${title}`, id: `IntelliTable-${id}-download-as-csv`, filename: filename, csv: csv }),
2667
2669
  React.createElement("button", { type: "button", className: "btn btn-secondary ms-2", "aria-label": `show panel for customizing which columns show in table ${title}`, id: `IntelliTable-${id}-show-column-customization-modal`, onClick: () => {
2668
2670
  dispatch({
2669
2671
  type: ActionType$1.ToggleColVisCusModalVisibility,