grep-components 2.25.0 → 2.26.0-GREPF-2861.1
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/index.d.ts +1 -0
- package/dist/index.js +19 -1
- package/dist/index.js.map +1 -1
- package/dist/utils/download.d.ts +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/package.json +2 -8
package/dist/index.d.ts
CHANGED
|
@@ -29,6 +29,7 @@ export { default as SortableTable } from './components/SortableTable';
|
|
|
29
29
|
export { default as GrepEditor } from './components/GrepEditor';
|
|
30
30
|
export { default as AppBar } from './components/AppBar/AppBar';
|
|
31
31
|
export type { ParseableDate } from './utils/dateHelper';
|
|
32
|
+
export { downloadBlob } from './utils';
|
|
32
33
|
export { Utils };
|
|
33
34
|
export * from './components';
|
|
34
35
|
export * from './hooks';
|
package/dist/index.js
CHANGED
|
@@ -139,6 +139,23 @@ const getTime = (datetime, options) => parseDate(datetime, options).format('[kl.
|
|
|
139
139
|
const getFullDate = (datetime, options) => parseDate(datetime, options).format('LLL');
|
|
140
140
|
const getExcelDateTime = (datetime, options) => parseDate(datetime, options).format('L HH:mm');
|
|
141
141
|
|
|
142
|
+
const downloadBlob = (blob, filename) => {
|
|
143
|
+
const url = URL.createObjectURL(blob);
|
|
144
|
+
const anchor = document.createElement('a');
|
|
145
|
+
anchor.href = url;
|
|
146
|
+
anchor.download = filename;
|
|
147
|
+
anchor.hidden = true;
|
|
148
|
+
try {
|
|
149
|
+
document.body.appendChild(anchor);
|
|
150
|
+
anchor.click();
|
|
151
|
+
}
|
|
152
|
+
finally {
|
|
153
|
+
anchor.remove();
|
|
154
|
+
// Allow the browser to start the download before releasing the URL.
|
|
155
|
+
setTimeout(() => URL.revokeObjectURL(url), 1000);
|
|
156
|
+
}
|
|
157
|
+
};
|
|
158
|
+
|
|
142
159
|
/** An incomplete list deriving values from:
|
|
143
160
|
* https://developer.mozilla.org/en-US/docs/Web/API/UI_Events/Keyboard_event_key_values
|
|
144
161
|
* and
|
|
@@ -177,6 +194,7 @@ var index = /*#__PURE__*/Object.freeze({
|
|
|
177
194
|
__proto__: null,
|
|
178
195
|
DateRangeValue: DateRangeValue,
|
|
179
196
|
DateTime: dayjs,
|
|
197
|
+
downloadBlob: downloadBlob,
|
|
180
198
|
getExcelDateTime: getExcelDateTime,
|
|
181
199
|
getFullDate: getFullDate,
|
|
182
200
|
getShortDate: getShortDate,
|
|
@@ -10511,5 +10529,5 @@ const GrepTableOfContent = ({ style, className, setSelectedValue, percentageRend
|
|
|
10511
10529
|
};
|
|
10512
10530
|
GrepTableOfContent.displayName = 'Grep.ToC';
|
|
10513
10531
|
|
|
10514
|
-
export { AppBar, AppBarNavList, AppBarProfile, BodyLayout, CircularLoading, Colors, ConfirmationServiceProvider, ContainedLinkList, DropdownMenu, Footer, GDPR, GrepCrumbs, GrepDatePicker, GrepDateRange, GrepDialogServiceProvider, GrepEditor, GrepInput, GrepSelect, GrepTable, GrepTableCard, GrepTableOfContent, GrepTableRow, GreyCover, InfoContainer, LinkList, LoadingOverlay, MainLayout, NavGuard, OverflowTooltip, ProfileInfo, SearchBar, ServiceMessage, Sidebar, SortableTable, index as Utils, convertToRgba, filterElements as filterContentElements, hex2rgb, hex2rgba, makeStyles, useConfirmation, useContentElements, useDate, useDebounce, useGrepDialog, useStyles$c as useStyles, withStyles };
|
|
10532
|
+
export { AppBar, AppBarNavList, AppBarProfile, BodyLayout, CircularLoading, Colors, ConfirmationServiceProvider, ContainedLinkList, DropdownMenu, Footer, GDPR, GrepCrumbs, GrepDatePicker, GrepDateRange, GrepDialogServiceProvider, GrepEditor, GrepInput, GrepSelect, GrepTable, GrepTableCard, GrepTableOfContent, GrepTableRow, GreyCover, InfoContainer, LinkList, LoadingOverlay, MainLayout, NavGuard, OverflowTooltip, ProfileInfo, SearchBar, ServiceMessage, Sidebar, SortableTable, index as Utils, convertToRgba, downloadBlob, filterElements as filterContentElements, hex2rgb, hex2rgba, makeStyles, useConfirmation, useContentElements, useDate, useDebounce, useGrepDialog, useStyles$c as useStyles, withStyles };
|
|
10515
10533
|
//# sourceMappingURL=index.js.map
|