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/cjs/index.js CHANGED
@@ -2313,7 +2313,7 @@ const CSVDownloadButton = (props) => {
2313
2313
  /* Main UI */
2314
2314
  /*----------------------------------------*/
2315
2315
  // Render the button
2316
- return (React__default["default"].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
2316
+ return (React__default["default"].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
2317
2317
  ? `Click to download ${filename}`
2318
2318
  : ariaLabel), style: style, onClick: onClick },
2319
2319
  !children && (React__default["default"].createElement(React__default["default"].Fragment, null,
@@ -2394,8 +2394,10 @@ const IntelliTable = (props) => {
2394
2394
  const data = ((props.data && props.data.length > 0)
2395
2395
  ? props.data
2396
2396
  : [{ id: 'empty-row' }]);
2397
+ // Get CSV filename
2398
+ let filename = `${title}.csv`;
2397
2399
  if (props.csvName) {
2398
- (props.csvName.endsWith('.csv')
2400
+ filename = (props.csvName.endsWith('.csv')
2399
2401
  ? props.csvName
2400
2402
  : `${props.csvName}.csv`);
2401
2403
  }
@@ -2671,7 +2673,7 @@ const IntelliTable = (props) => {
2671
2673
  React__default["default"].createElement("div", { className: "d-flex align-items-center justify-content-start" },
2672
2674
  React__default["default"].createElement("h3", { className: "m-0" }, title),
2673
2675
  React__default["default"].createElement("div", { className: "flex-grow-1 text-end" },
2674
- React__default["default"].createElement(CSVDownloadButton, { "aria-label": `download data as csv for ${title}`, id: `IntelliTable-${id}-download-as-csv`, filename: `${title}.csv`, csv: csv }),
2676
+ React__default["default"].createElement(CSVDownloadButton, { "aria-label": `download data as csv for ${title}`, id: `IntelliTable-${id}-download-as-csv`, filename: filename, csv: csv }),
2675
2677
  React__default["default"].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: () => {
2676
2678
  dispatch({
2677
2679
  type: ActionType$1.ToggleColVisCusModalVisibility,