d2coreui 23.0.56 → 23.0.58

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.
Files changed (47) hide show
  1. package/CHANGELOG.md +41 -0
  2. package/README.md +154 -154
  3. package/components/date/dateRangeInputAdvancedPanel.js +5 -5
  4. package/components/date/dateRangeInputAdvancedPanel.js.map +1 -1
  5. package/components/date/dateRangeInputConfirm.js +5 -5
  6. package/components/date/dateRangeInputConfirm.js.map +1 -1
  7. package/components/date/dateTimeInput.d.ts +12 -3
  8. package/components/date/dateTimeInput.js +72 -11
  9. package/components/date/dateTimeInput.js.map +1 -1
  10. package/components/grid/config/columnTransfer.js +61 -43
  11. package/components/grid/config/columnTransfer.js.map +1 -1
  12. package/components/grid/config/dataGridEditor.d.ts +4 -3
  13. package/components/grid/config/dataGridEditor.js +16 -4
  14. package/components/grid/config/dataGridEditor.js.map +1 -1
  15. package/components/grid/dataGrid.d.ts +20 -5
  16. package/components/grid/dataGrid.js +13 -7
  17. package/components/grid/dataGrid.js.map +1 -1
  18. package/components/grid/export/contextMenu.d.ts +3 -2
  19. package/components/grid/export/contextMenu.js.map +1 -1
  20. package/components/grid/export/worker/pdfExport.js.map +1 -1
  21. package/components/grid/extendedDataGrid.d.ts +11 -4
  22. package/components/grid/extendedDataGrid.js +34 -24
  23. package/components/grid/extendedDataGrid.js.map +1 -1
  24. package/components/grid/header/simpleHeader.d.ts +1 -1
  25. package/components/grid/header/simpleHeader.js +3 -2
  26. package/components/grid/header/simpleHeader.js.map +1 -1
  27. package/components/input/autoCompleteInput.d.ts +3 -0
  28. package/components/input/autoCompleteInput.js +18 -3
  29. package/components/input/autoCompleteInput.js.map +1 -1
  30. package/components/modal/impl/draggableModal.d.ts +1 -1
  31. package/components/modal/impl/draggableModal.js.map +1 -1
  32. package/components/modal/impl/draggableModalInner.js +23 -11
  33. package/components/modal/impl/draggableModalInner.js.map +1 -1
  34. package/components/modal/impl/draggableModalReducer.d.ts +2 -3
  35. package/components/modal/impl/draggableModalReducer.js +9 -7
  36. package/components/modal/impl/draggableModalReducer.js.map +1 -1
  37. package/components/modal/impl/draggableModalStyles.js +126 -126
  38. package/components/modal/impl/draggableModalStyles.js.map +1 -1
  39. package/components/modal/impl/resizeHandle.js.map +1 -1
  40. package/components/modal/modalDialog.d.ts +3 -2
  41. package/components/modal/modalDialog.js +3 -2
  42. package/components/modal/modalDialog.js.map +1 -1
  43. package/i18n/components.cs.json +2 -0
  44. package/i18n/components.sk.json +2 -0
  45. package/i18n/components.uk.json +2 -0
  46. package/package.json +1 -1
  47. package/style/index.less +240 -240
@@ -1,4 +1,5 @@
1
1
  import { MenuProps } from "antd";
2
+ import { ResolvedUtcOffsetMode } from "d2core/i18n/localeHolder";
2
3
  import ProgressPopup from "./progressPopup";
3
4
  import { MenuElement } from "../dataGrid";
4
5
  /** Properties of {@link getContextMenu}. The whole object is also passed to `getExportContent`. */
@@ -9,8 +10,8 @@ export interface ContextMenuProps {
9
10
  showMilliseconds: boolean;
10
11
  /** Hint for `getExportContent` to format dates with the year. */
11
12
  showYear: boolean;
12
- /** Hint for `getExportContent` to format date-time values with the UTC offset. */
13
- showUtcOffset: boolean;
13
+ /** Hint for `getExportContent` how to format date-time values of the hour repeated at the end of the daylight saving time. */
14
+ showUtcOffset: ResolvedUtcOffsetMode;
14
15
  /** Copy to the clipboard without the progress (and error) notification. */
15
16
  hideNotificationOnClipboardCopy?: boolean;
16
17
  /** Page orientation of the PDF export, shown by the switch in the PDF menu item. */
@@ -1 +1 @@
1
- {"version":3,"file":"contextMenu.js","sourceRoot":"","sources":["../../../../../components/grid/export/contextMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAChG,OAAO,EAAY,MAAM,EAAE,UAAU,EAAC,MAAM,MAAM,CAAC;AACnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAA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port {MenuProps, Switch, Typography} from \"antd\";\r\nimport React from \"react\";\r\nimport i18n from \"d2core/i18n/i18n\";\r\nimport {spawn, Thread, Worker} from \"threads\"\r\nimport dayjs from \"dayjs\";\r\nimport ProgressPopup from \"./progressPopup\";\r\nimport {MenuElement} from \"../dataGrid\";\r\nimport {ClipboardUtils} from \"d2coreui/components/clipboard/clipboardUtils\";\r\nimport PlatformSpecific from \"d2coreui/components/platformSpecific\";\r\n\r\n\r\n/** Properties of {@link getContextMenu}. The whole object is also passed to `getExportContent`. */\r\nexport interface ContextMenuProps {\r\n /** Hint for `getExportContent` to export only the selected rows. */\r\n onlySelectedNodes?: boolean\r\n /** Hint for `getExportContent` to format date-time values with milliseconds. */\r\n showMilliseconds: boolean\r\n /** Hint for `getExportContent` to format dates with the year. */\r\n showYear: boolean\r\n /** Hint for `getExportContent` to format date-time values with the UTC offset. */\r\n showUtcOffset: boolean\r\n /** Copy to the clipboard without the progress (and error) notification. */\r\n hideNotificationOnClipboardCopy?: boolean\r\n /** Page orientation of the PDF export, shown by the switch in the PDF menu item. */\r\n pageOrientation: PageOrientation\r\n /** Disables the export items, e.g. while an export is running. */\r\n exporting: boolean\r\n\r\n /**\r\n * Produces the exported table: an array of rows of cell texts, the first row being the column headers.\r\n * It may report progress through `progressPopup`, which is `null` for a clipboard copy with\r\n * `hideNotificationOnClipboardCopy`.\r\n */\r\n getExportContent: (progressPopup: ProgressPopup | null, props: ContextMenuProps) => Promise<string[][]>\r\n /** Called when the user toggles the PDF orientation switch; the caller is expected to pass the new `pageOrientation` back. */\r\n onPageOrientationChange:(pageOrientation: PageOrientation)=>void\r\n /**\r\n * Called with `true` when any menu item is clicked and with `false` when the item has been processed. For the PDF\r\n * export, `false` comes before the PDF is produced (it is generated asynchronously), and it is not called at all when the\r\n * export fails.\r\n */\r\n onExport:(start: boolean)=>void\r\n\r\n /** Receives the built-in menu items and returns the items to show, e.g. with custom items added. */\r\n renderer?(menuElements: MenuElement[]): MenuElement[]\r\n\r\n /** Called with the key of every clicked item, built-in ones (`txtExport`, `csvExport`, `pdfExport`, `clipboardCopy`) included. */\r\n onClick?(key: string): void\r\n\r\n /** Called after a successful export with the number of exported data rows and the file name, or `\"[CLIPBOARD]\"` for a clipboard copy. */\r\n onExported?: (rowCount: number, destination: string) => void\r\n}\r\n\r\n/** Page orientation of the PDF export. */\r\nexport type PageOrientation = \"PORTRAIT\" | \"LANDSCAPE\";\r\n\r\n/**\r\n * Builds the export menu of a grid as antd `MenuProps` (for a `Dropdown`): export to TXT, CSV and PDF files and copy to\r\n * the clipboard. Content comes from `getExportContent` and is converted in a web worker; progress is shown by a\r\n * {@link ProgressPopup}, and files named `export_YYYYMMDD_HHmm.<ext>` are saved through {@link PlatformSpecific}.\r\n *\r\n * The workers are started with `new Worker(new URL(..., import.meta.url))`, so the consuming bundler must emit them as\r\n * separate chunks; a webpack application emitting its chunks into a subdirectory needs `output.publicPath: \"auto\"`.\r\n */\r\nexport default function getContextMenu(props: ContextMenuProps): MenuProps {\r\n const {hideNotificationOnClipboardCopy, getExportContent, renderer, onClick} = props;\r\n\r\n const onExportMenuClick = async (menuKey: string) => {\r\n props.onExport(true);\r\n switch (menuKey) {\r\n case \"txtExport\": {\r\n const progressPopup = new ProgressPopup(i18n(\"Export List to\") + \" TXT\");\r\n const tableContent = await getExportContent(progressPopup, props);\r\n const txtExport = await spawn(new Worker(new URL('./worker/txtExport.js', import.meta.url) as any, {type: 'module'}));\r\n const textContent = await txtExport(tableContent);\r\n const fileName = `export_${dayjs().format(\"YYYYMMDD_HHmm\")}.txt`;\r\n await Thread.terminate(txtExport);\r\n await progressPopup.update(100);\r\n PlatformSpecific.INSTANCE.saveContent(fileName, textContent, true);\r\n props.onExported?.(tableContent.length - 1, fileName);\r\n break;\r\n }\r\n case \"csvExport\": {\r\n const progressPopup = new ProgressPopup(i18n(\"Export List to\") + \" CSV\");\r\n const tableContent = await getExportContent(progressPopup, props);\r\n const csvExport = await spawn(new Worker(new URL('./worker/csvExport.js', import.meta.url) as any, {type: 'module'}));\r\n const csvContent = await csvExport(tableContent);\r\n const fileName = `export_${dayjs().format(\"YYYYMMDD_HHmm\")}.csv`;\r\n await Thread.terminate(csvExport);\r\n await progressPopup.update(100);\r\n PlatformSpecific.INSTANCE.saveContent(fileName, csvContent, true);\r\n props.onExported?.(tableContent.length - 1, fileName);\r\n break;\r\n }\r\n case \"clipboardCopy\": {\r\n const progressPopup = !hideNotificationOnClipboardCopy ? new ProgressPopup(i18n(\"Export List to\") + \" \" + i18n(\"Clipboard\")) : null;\r\n const tableContent = await getExportContent(progressPopup, props);\r\n const clipboardExport = await spawn(new Worker(new URL('./worker/clipboardExport.js', import.meta.url) as any, {type: 'module'}));\r\n const clipboardContent = await clipboardExport(tableContent);\r\n const success = ClipboardUtils.copyToClipboard(clipboardContent);\r\n if (success) {\r\n await Thread.terminate(clipboardExport);\r\n await progressPopup?.update(100);\r\n props.onExported?.(tableContent.length - 1, \"[CLIPBOARD]\");\r\n } else {\r\n progressPopup?.error();\r\n }\r\n break;\r\n }\r\n case \"pdfExport\": {\r\n const progressPopup = new ProgressPopup(i18n(\"Export List to\") + \" PDF\");\r\n const tableContent = await getExportContent(progressPopup, props);\r\n const pdfExport = await spawn(new Worker(new URL('./worker/pdfExport.js', import.meta.url) as any, {type: 'module'}));\r\n pdfExport.handler().subscribe(async (data: string) => {\r\n const fileName = `export_${dayjs().format(\"YYYYMMDD_HHmm\")}.pdf`;\r\n Thread.terminate(pdfExport);\r\n await progressPopup.update(100);\r\n PlatformSpecific.INSTANCE.saveContent(fileName, data, false);\r\n props.onExported?.(tableContent.length - 1, fileName);\r\n });\r\n pdfExport.export(tableContent, {pageOrientation: props.pageOrientation});\r\n break;\r\n }\r\n }\r\n props.onExport(false);\r\n }\r\n\r\n let menuItems: MenuElement[] = [\r\n {\r\n key: \"txtExport\",\r\n icon: <FileOutlined/>,\r\n disabled: props.exporting,\r\n label: i18n(\"Export List to\") + \" TXT\",\r\n },\r\n {\r\n key: \"csvExport\",\r\n icon: <FileTextOutlined/>,\r\n disabled: props.exporting,\r\n label: i18n(\"Export List to\") + \" CSV\",\r\n },\r\n {\r\n key: \"pdfExport\",\r\n icon: <FilePdfOutlined/>,\r\n disabled: props.exporting,\r\n label: <>\r\n {i18n(\"Export List to\") + \" PDF\"}\r\n <Switch\r\n style={{marginLeft: 8}}\r\n checkedChildren={i18n(\"Landscape\") + \" \"}\r\n unCheckedChildren={\"\" + i18n(\"Portrait\")}\r\n checked={props.pageOrientation !== \"PORTRAIT\"}\r\n onChange={(checked, e) => {\r\n e.stopPropagation();\r\n (e as any).nativeEvent.stopImmediatePropagation();\r\n props.onPageOrientationChange(checked ? \"LANDSCAPE\" : \"PORTRAIT\")\r\n }}\r\n />\r\n </>\r\n },\r\n {\r\n key: \"divider1\",\r\n type: \"divider\",\r\n },\r\n {\r\n key: \"clipboardCopy\",\r\n icon: <CopyOutlined/>,\r\n disabled: props.exporting,\r\n label: <>\r\n {i18n(\"Copy to Clipboard\")}\r\n <Typography.Text code style={{float: \"right\"}}>CTRL+C</Typography.Text>\r\n </>,\r\n }\r\n ];\r\n\r\n if (renderer) {\r\n menuItems = renderer(menuItems);\r\n }\r\n\r\n return {\r\n items: menuItems,\r\n onClick: (item) => {\r\n onExportMenuClick(item.key);\r\n if (onClick) {\r\n onClick(item.key.toString());\r\n }\r\n },\r\n }\r\n}\r\n"]}
1
+ {"version":3,"file":"contextMenu.js","sourceRoot":"","sources":["../../../../../components/grid/export/contextMenu.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAE,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAC,MAAM,mBAAmB,CAAC;AAChG,OAAO,EAAY,MAAM,EAAE,UAAU,EAAC,MAAM,MAAM,CAAC;AACnD,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,IAAI,MAAM,kBAAkB,CAAC;AAEpC,OAAO,EAAC,KAAK,EAAE,MAAM,EAAE,MAAM,EAAC,MAAM,SAA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BAAiB,EAAE,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,EACxC,OAAO,EAAE,KAAK,CAAC,eAAe,KAAK,UAAU,EAC7C,QAAQ,EAAE,CAAC,OAAO,EAAE,CAAC,EAAE,EAAE;wBACrB,CAAC,CAAC,eAAe,EAAE,CAAC;wBACnB,CAAS,CAAC,WAAW,CAAC,wBAAwB,EAAE,CAAC;wBAClD,KAAK,CAAC,uBAAuB,CAAC,OAAO,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,UAAU,CAAC,CAAA;oBACrE,CAAC,GACH,CACH;SACN;QACD;YACI,GAAG,EAAE,UAAU;YACf,IAAI,EAAE,SAAS;SAClB;QACD;YACI,GAAG,EAAE,eAAe;YACpB,IAAI,EAAE,oBAAC,YAAY,OAAE;YACrB,QAAQ,EAAE,KAAK,CAAC,SAAS;YACzB,KAAK,EAAE;gBACF,IAAI,CAAC,mBAAmB,CAAC;gBAC1B,oBAAC,UAAU,CAAC,IAAI,IAAC,IAAI,QAAC,KAAK,EAAE,EAAC,KAAK,EAAE,OAAO,EAAC,aAA0B,CACxE;SACN;KACJ,CAAC;IAEF,IAAI,QAAQ,EAAE,CAAC;QACX,SAAS,GAAG,QAAQ,CAAC,SAAS,CAAC,CAAC;IACpC,CAAC;IAED,OAAO;QACH,KAAK,EAAE,SAAS;QAChB,OAAO,EAAE,CAAC,IAAI,EAAE,EAAE;YACd,iBAAiB,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;YAC5B,IAAI,OAAO,EAAE,CAAC;gBACV,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC;YACjC,CAAC;QACL,CAAC;KACJ,CAAA;AACL,CAAC","sourcesContent":["import {CopyOutlined, FileOutlined, FilePdfOutlined, FileTextOutlined} from \"@ant-design/icons\";\r\nimport {MenuProps, Switch, Typography} from \"antd\";\r\nimport React from \"react\";\r\nimport i18n from \"d2core/i18n/i18n\";\r\nimport {ResolvedUtcOffsetMode} from \"d2core/i18n/localeHolder\";\r\nimport {spawn, Thread, Worker} from \"threads\"\r\nimport dayjs from \"dayjs\";\r\nimport ProgressPopup from \"./progressPopup\";\r\nimport {MenuElement} from \"../dataGrid\";\r\nimport {ClipboardUtils} from \"d2coreui/components/clipboard/clipboardUtils\";\r\nimport PlatformSpecific from \"d2coreui/components/platformSpecific\";\r\n\r\n\r\n/** Properties of {@link getContextMenu}. The whole object is also passed to `getExportContent`. */\r\nexport interface ContextMenuProps {\r\n /** Hint for `getExportContent` to export only the selected rows. */\r\n onlySelectedNodes?: boolean\r\n /** Hint for `getExportContent` to format date-time values with milliseconds. */\r\n showMilliseconds: boolean\r\n /** Hint for `getExportContent` to format dates with the year. */\r\n showYear: boolean\r\n /** Hint for `getExportContent` how to format date-time values of the hour repeated at the end of the daylight saving time. */\r\n showUtcOffset: ResolvedUtcOffsetMode\r\n /** Copy to the clipboard without the progress (and error) notification. */\r\n hideNotificationOnClipboardCopy?: boolean\r\n /** Page orientation of the PDF export, shown by the switch in the PDF menu item. */\r\n pageOrientation: PageOrientation\r\n /** Disables the export items, e.g. while an export is running. */\r\n exporting: boolean\r\n\r\n /**\r\n * Produces the exported table: an array of rows of cell texts, the first row being the column headers.\r\n * It may report progress through `progressPopup`, which is `null` for a clipboard copy with\r\n * `hideNotificationOnClipboardCopy`.\r\n */\r\n getExportContent: (progressPopup: ProgressPopup | null, props: ContextMenuProps) => Promise<string[][]>\r\n /** Called when the user toggles the PDF orientation switch; the caller is expected to pass the new `pageOrientation` back. */\r\n onPageOrientationChange:(pageOrientation: PageOrientation)=>void\r\n /**\r\n * Called with `true` when any menu item is clicked and with `false` when the item has been processed. For the PDF\r\n * export, `false` comes before the PDF is produced (it is generated asynchronously), and it is not called at all when the\r\n * export fails.\r\n */\r\n onExport:(start: boolean)=>void\r\n\r\n /** Receives the built-in menu items and returns the items to show, e.g. with custom items added. */\r\n renderer?(menuElements: MenuElement[]): MenuElement[]\r\n\r\n /** Called with the key of every clicked item, built-in ones (`txtExport`, `csvExport`, `pdfExport`, `clipboardCopy`) included. */\r\n onClick?(key: string): void\r\n\r\n /** Called after a successful export with the number of exported data rows and the file name, or `\"[CLIPBOARD]\"` for a clipboard copy. */\r\n onExported?: (rowCount: number, destination: string) => void\r\n}\r\n\r\n/** Page orientation of the PDF export. */\r\nexport type PageOrientation = \"PORTRAIT\" | \"LANDSCAPE\";\r\n\r\n/**\r\n * Builds the export menu of a grid as antd `MenuProps` (for a `Dropdown`): export to TXT, CSV and PDF files and copy to\r\n * the clipboard. Content comes from `getExportContent` and is converted in a web worker; progress is shown by a\r\n * {@link ProgressPopup}, and files named `export_YYYYMMDD_HHmm.<ext>` are saved through {@link PlatformSpecific}.\r\n *\r\n * The workers are started with `new Worker(new URL(..., import.meta.url))`, so the consuming bundler must emit them as\r\n * separate chunks; a webpack application emitting its chunks into a subdirectory needs `output.publicPath: \"auto\"`.\r\n */\r\nexport default function getContextMenu(props: ContextMenuProps): MenuProps {\r\n const {hideNotificationOnClipboardCopy, getExportContent, renderer, onClick} = props;\r\n\r\n const onExportMenuClick = async (menuKey: string) => {\r\n props.onExport(true);\r\n switch (menuKey) {\r\n case \"txtExport\": {\r\n const progressPopup = new ProgressPopup(i18n(\"Export List to\") + \" TXT\");\r\n const tableContent = await getExportContent(progressPopup, props);\r\n const txtExport = await spawn(new Worker(new URL('./worker/txtExport.js', import.meta.url) as any, {type: 'module'}));\r\n const textContent = await txtExport(tableContent);\r\n const fileName = `export_${dayjs().format(\"YYYYMMDD_HHmm\")}.txt`;\r\n await Thread.terminate(txtExport);\r\n await progressPopup.update(100);\r\n PlatformSpecific.INSTANCE.saveContent(fileName, textContent, true);\r\n props.onExported?.(tableContent.length - 1, fileName);\r\n break;\r\n }\r\n case \"csvExport\": {\r\n const progressPopup = new ProgressPopup(i18n(\"Export List to\") + \" CSV\");\r\n const tableContent = await getExportContent(progressPopup, props);\r\n const csvExport = await spawn(new Worker(new URL('./worker/csvExport.js', import.meta.url) as any, {type: 'module'}));\r\n const csvContent = await csvExport(tableContent);\r\n const fileName = `export_${dayjs().format(\"YYYYMMDD_HHmm\")}.csv`;\r\n await Thread.terminate(csvExport);\r\n await progressPopup.update(100);\r\n PlatformSpecific.INSTANCE.saveContent(fileName, csvContent, true);\r\n props.onExported?.(tableContent.length - 1, fileName);\r\n break;\r\n }\r\n case \"clipboardCopy\": {\r\n const progressPopup = !hideNotificationOnClipboardCopy ? new ProgressPopup(i18n(\"Export List to\") + \" \" + i18n(\"Clipboard\")) : null;\r\n const tableContent = await getExportContent(progressPopup, props);\r\n const clipboardExport = await spawn(new Worker(new URL('./worker/clipboardExport.js', import.meta.url) as any, {type: 'module'}));\r\n const clipboardContent = await clipboardExport(tableContent);\r\n const success = ClipboardUtils.copyToClipboard(clipboardContent);\r\n if (success) {\r\n await Thread.terminate(clipboardExport);\r\n await progressPopup?.update(100);\r\n props.onExported?.(tableContent.length - 1, \"[CLIPBOARD]\");\r\n } else {\r\n progressPopup?.error();\r\n }\r\n break;\r\n }\r\n case \"pdfExport\": {\r\n const progressPopup = new ProgressPopup(i18n(\"Export List to\") + \" PDF\");\r\n const tableContent = await getExportContent(progressPopup, props);\r\n const pdfExport = await spawn(new Worker(new URL('./worker/pdfExport.js', import.meta.url) as any, {type: 'module'}));\r\n pdfExport.handler().subscribe(async (data: string) => {\r\n const fileName = `export_${dayjs().format(\"YYYYMMDD_HHmm\")}.pdf`;\r\n Thread.terminate(pdfExport);\r\n await progressPopup.update(100);\r\n PlatformSpecific.INSTANCE.saveContent(fileName, data, false);\r\n props.onExported?.(tableContent.length - 1, fileName);\r\n });\r\n pdfExport.export(tableContent, {pageOrientation: props.pageOrientation});\r\n break;\r\n }\r\n }\r\n props.onExport(false);\r\n }\r\n\r\n let menuItems: MenuElement[] = [\r\n {\r\n key: \"txtExport\",\r\n icon: <FileOutlined/>,\r\n disabled: props.exporting,\r\n label: i18n(\"Export List to\") + \" TXT\",\r\n },\r\n {\r\n key: \"csvExport\",\r\n icon: <FileTextOutlined/>,\r\n disabled: props.exporting,\r\n label: i18n(\"Export List to\") + \" CSV\",\r\n },\r\n {\r\n key: \"pdfExport\",\r\n icon: <FilePdfOutlined/>,\r\n disabled: props.exporting,\r\n label: <>\r\n {i18n(\"Export List to\") + \" PDF\"}\r\n <Switch\r\n style={{marginLeft: 8}}\r\n checkedChildren={i18n(\"Landscape\") + \" \"}\r\n unCheckedChildren={\"\" + i18n(\"Portrait\")}\r\n checked={props.pageOrientation !== \"PORTRAIT\"}\r\n onChange={(checked, e) => {\r\n e.stopPropagation();\r\n (e as any).nativeEvent.stopImmediatePropagation();\r\n props.onPageOrientationChange(checked ? \"LANDSCAPE\" : \"PORTRAIT\")\r\n }}\r\n />\r\n </>\r\n },\r\n {\r\n key: \"divider1\",\r\n type: \"divider\",\r\n },\r\n {\r\n key: \"clipboardCopy\",\r\n icon: <CopyOutlined/>,\r\n disabled: props.exporting,\r\n label: <>\r\n {i18n(\"Copy to Clipboard\")}\r\n <Typography.Text code style={{float: \"right\"}}>CTRL+C</Typography.Text>\r\n </>,\r\n }\r\n ];\r\n\r\n if (renderer) {\r\n menuItems = renderer(menuItems);\r\n }\r\n\r\n return {\r\n items: menuItems,\r\n onClick: (item) => {\r\n onExportMenuClick(item.key);\r\n if (onClick) {\r\n onClick(item.key.toString());\r\n }\r\n },\r\n }\r\n}\r\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"pdfExport.js","sourceRoot":"","sources":["../../../../../../components/grid/export/worker/pdfExport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,gBAAgB,CAAA;AACrC,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAE5C,OAAO,QAAQ,MAAM,yBAAyB,CAAC;AAC/C,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAC,UAAU,EAAE,OAAO,EAAC,MAAM,oBAAoB,CAAA;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAEtD,O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Q,EAAE,EAAE;aACf;SACJ;QACD,YAAY,EAAE;YACV,wBAAwB;YACxB,QAAQ,EAAE,EAAE;SACf;QACD,MAAM,EAAE,UAAU,WAAmB,EAAE,SAAiB;YACpD,OAAO;gBACH,KAAK,EAAE;oBACH,MAAM,EAAE,CAAC,GAAG,CAAC;oBACb,IAAI,EAAE;wBACF;4BACI,EAAC,IAAI,EAAE,GAAG,WAAW,IAAI,SAAS,EAAE,EAAE,SAAS,EAAE,QAAQ,EAAC;yBAC7D;qBACJ;iBACJ;gBACD,MAAM,EAAE,WAAW;aACtB,CAAC;QACN,CAAC;QACD,IAAI,EAAE;YACF,KAAK,EAAE,UAAU,KAAK,EAAE,CAAC,MAAM,CAAC,YAAY,CAAC,iBAAiB,CAAC,IAAI,EAAE,IAAI,CAAC,CAAC,EAAE;YAC7E,MAAM,EAAE,OAAO;SAClB;QACD,eAAe,EAAE,UAAU,CAAC,eAAe;KAC9C,CAAC;AACN,CAAC;AAED,MAAM,OAAO,GAAG,IAAI,OAAO,EAAE,CAAC;AAC9B,MAAM,SAAS,GAAG;IACd,MAAM,CAAC,SAAwB,EAAE,UAAsB;QACnD,OAAO,CAAC,SAAS,CAAC,YAAY,CAAC,SAAS,EAAE,UAAU,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,IAAI,EAAE,EAAE;YACtE,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC;YACnB,OAAO,CAAC,QAAQ,EAAE,CAAC;QACvB,CAAC,CAAC,CAAC;IACP,CAAC;IACD,OAAO;QACH,OAAO,UAAU,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;CACJ,CAAC;AAEF,MAAM,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import {expose} from \"threads/worker\"\nimport pdfMake from \"pdfmake/build/pdfmake\";\nimport {PageOrientation, TDocumentDefinitions} from \"pdfmake/interfaces\";\nimport pdfFonts from \"pdfmake/build/vfs_fonts\";\nimport dayjs from \"dayjs\";\nimport {Observable, Subject} from \"threads/observable\"\nimport {LocaleHolder} from \"d2core/i18n/localeHolder\";\n\npdfMake.vfs = pdfFonts;\n\ninterface PageConfig {\n pageOrientation: PageOrientation\n}\n\ntype TableCell = string | { text: string, style: string }\n\nfunction getPdfConfig(tableData: TableCell[][], pageConfig: PageConfig): TDocumentDefinitions {\n // styling header\n tableData[0] = tableData[0].map((value) => {\n return {text: value as string, style: 'tableHeader'};\n });\n // escaping empty data\n tableData.forEach((row) => {\n row.forEach((value, index) => {\n if (value === undefined || value === null) {\n row[index] = \"\";\n }\n });\n });\n return {\n content: [{\n style: 'tableExample',\n table: {\n headerRows: 1,\n // dontBreakRows: true,\n // keepWithHeaderRows: 1,\n body: tableData\n }\n }],\n styles: {\n header: {\n fontSize: 10,\n bold: true,\n margin: [0, 0, 0, 10]\n },\n subheader: {\n fontSize: 9,\n bold: true,\n margin: [0, 10, 0, 5]\n },\n tableExample: {\n margin: [0, 5, 0, 15],\n\n },\n tableHeader: {\n bold: true,\n fontSize: 10,\n }\n },\n defaultStyle: {\n // alignment: 'justify',\n fontSize: 10,\n },\n footer: function (currentPage: number, pageCount: number) {\n return {\n table: {\n widths: ['*'],\n body: [\n [\n {text: `${currentPage}/${pageCount}`, alignment: 'center'},\n ]\n ]\n },\n layout: 'noBorders'\n };\n },\n info: {\n title: `Export ${dayjs().format(LocaleHolder.getDateTimeFormat(true, true))}`,\n author: 'D2000',\n },\n pageOrientation: pageConfig.pageOrientation\n };\n}\n\nconst subject = new Subject();\nconst pdfExport = {\n export(tableData: TableCell[][], pageConfig: PageConfig) {\n pdfMake.createPdf(getPdfConfig(tableData, pageConfig)).getBase64((data) => {\n subject.next(data);\n subject.complete();\n });\n },\n handler() {\n return Observable.from(subject);\n },\n};\n\nexpose(pdfExport);"]}
1
+ {"version":3,"file":"pdfExport.js","sourceRoot":"","sources":["../../../../../../components/grid/export/worker/pdfExport.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,MAAM,EAAC,MAAM,gBAA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AAC,OAAO,CAAC,CAAC;IACpC,CAAC;CACJ,CAAC;AAEF,MAAM,CAAC,SAAS,CAAC,CAAC","sourcesContent":["import {expose} from \"threads/worker\"\r\nimport pdfMake from \"pdfmake/build/pdfmake\";\r\nimport {PageOrientation, TDocumentDefinitions} from \"pdfmake/interfaces\";\r\nimport pdfFonts from \"pdfmake/build/vfs_fonts\";\r\nimport dayjs from \"dayjs\";\r\nimport {Observable, Subject} from \"threads/observable\"\r\nimport {LocaleHolder} from \"d2core/i18n/localeHolder\";\r\n\r\npdfMake.vfs = pdfFonts;\r\n\r\ninterface PageConfig {\r\n pageOrientation: PageOrientation\r\n}\r\n\r\ntype TableCell = string | { text: string, style: string }\r\n\r\nfunction getPdfConfig(tableData: TableCell[][], pageConfig: PageConfig): TDocumentDefinitions {\r\n // styling header\r\n tableData[0] = tableData[0].map((value) => {\r\n return {text: value as string, style: 'tableHeader'};\r\n });\r\n // escaping empty data\r\n tableData.forEach((row) => {\r\n row.forEach((value, index) => {\r\n if (value === undefined || value === null) {\r\n row[index] = \"\";\r\n }\r\n });\r\n });\r\n return {\r\n content: [{\r\n style: 'tableExample',\r\n table: {\r\n headerRows: 1,\r\n // dontBreakRows: true,\r\n // keepWithHeaderRows: 1,\r\n body: tableData\r\n }\r\n }],\r\n styles: {\r\n header: {\r\n fontSize: 10,\r\n bold: true,\r\n margin: [0, 0, 0, 10]\r\n },\r\n subheader: {\r\n fontSize: 9,\r\n bold: true,\r\n margin: [0, 10, 0, 5]\r\n },\r\n tableExample: {\r\n margin: [0, 5, 0, 15],\r\n\r\n },\r\n tableHeader: {\r\n bold: true,\r\n fontSize: 10,\r\n }\r\n },\r\n defaultStyle: {\r\n // alignment: 'justify',\r\n fontSize: 10,\r\n },\r\n footer: function (currentPage: number, pageCount: number) {\r\n return {\r\n table: {\r\n widths: ['*'],\r\n body: [\r\n [\r\n {text: `${currentPage}/${pageCount}`, alignment: 'center'},\r\n ]\r\n ]\r\n },\r\n layout: 'noBorders'\r\n };\r\n },\r\n info: {\r\n title: `Export ${dayjs().format(LocaleHolder.getDateTimeFormat(true, true))}`,\r\n author: 'D2000',\r\n },\r\n pageOrientation: pageConfig.pageOrientation\r\n };\r\n}\r\n\r\nconst subject = new Subject();\r\nconst pdfExport = {\r\n export(tableData: TableCell[][], pageConfig: PageConfig) {\r\n pdfMake.createPdf(getPdfConfig(tableData, pageConfig)).getBase64((data) => {\r\n subject.next(data);\r\n subject.complete();\r\n });\r\n },\r\n handler() {\r\n return Observable.from(subject);\r\n },\r\n};\r\n\r\nexpose(pdfExport);"]}
@@ -3,6 +3,7 @@ import DataGrid, { DataGridFilterProps, DataGridProps, DataGridSearchProps, Sort
3
3
  import { RowStyleRule } from "d2coreui/components/grid/cell/tableDefaultRowStyleRules";
4
4
  import { ColumnState, RowDataUpdatedEvent } from "ag-grid-community";
5
5
  import { DataChangeStateEnum } from "d2core/types/dataChangeStateEnum";
6
+ import { UtcOffsetMode } from "d2core/i18n/localeHolder";
6
7
  /**
7
8
  * Persistable user configuration of an {@link ExtendedDataGrid}: column state, paging, follow-last-record,
8
9
  * row styling, date-time formatting and side panel widths.
@@ -66,16 +67,17 @@ export interface GridConfiguration {
66
67
  */
67
68
  defaultHideYear?: boolean;
68
69
  /**
69
- * Show the UTC offset in date-time columns, so that the two readings of a DST fold stay distinguishable.
70
- * Only an explicit `false` turns it off.
70
+ * How date-time columns tell apart the two readings of a DST fold - see `UtcOffsetMode` of
71
+ * `d2core/i18n/localeHolder`: `true` / `"offset"` the UTC offset at every time, `"offsetInFold"` the UTC offset only
72
+ * in the repeated hour, `"hourLetter"` the hour as `A2` / `B2`, `false` / `"none"` not at all.
71
73
  * @default true
72
74
  */
73
- showUtcOffset?: boolean;
75
+ showUtcOffset?: UtcOffsetMode;
74
76
  /**
75
77
  * Value of {@link GridConfiguration.showUtcOffset} restored when the user reverts the table settings.
76
78
  * @default true
77
79
  */
78
- defaultShowUtcOffset?: boolean;
80
+ defaultShowUtcOffset?: UtcOffsetMode;
79
81
  /**
80
82
  * Width of the left filter panel in pixels; `0` means collapsed. When not set, the panel is shown with
81
83
  * `filterPanel.defaultWidth` (220 if that is not set either) if a `filterPanel` is configured.
@@ -379,6 +381,11 @@ export default class ExtendedDataGrid<T extends {
379
381
  private equalValues;
380
382
  private _onSelectionChanged;
381
383
  private _onViewportChanged;
384
+ private _onSortChanged;
385
+ private _onColumnsChanged;
386
+ private _onShowMilliseconds;
387
+ private _onShowYear;
388
+ private _onShowUtcOffset;
382
389
  private renderToolbarButtons;
383
390
  private renderToolbar;
384
391
  private renderSearchBadge;
@@ -132,6 +132,11 @@ class ExtendedDataGrid extends React.Component {
132
132
  this.selectNextPreviousRecord = this.selectNextPreviousRecord.bind(this);
133
133
  this._onSelectionChanged = this._onSelectionChanged.bind(this);
134
134
  this._onViewportChanged = this._onViewportChanged.bind(this);
135
+ this._onSortChanged = this._onSortChanged.bind(this);
136
+ this._onColumnsChanged = this._onColumnsChanged.bind(this);
137
+ this._onShowMilliseconds = this._onShowMilliseconds.bind(this);
138
+ this._onShowYear = this._onShowYear.bind(this);
139
+ this._onShowUtcOffset = this._onShowUtcOffset.bind(this);
135
140
  this._onResize = this._onResize.bind(this);
136
141
  }
137
142
  componentDidMount() {
@@ -671,6 +676,33 @@ class ExtendedDataGrid extends React.Component {
671
676
  this.props.onViewportChanged(dataGridEvent);
672
677
  }
673
678
  }
679
+ _onSortChanged(event) {
680
+ var _a, _b;
681
+ const sortModel = (_a = this.dataGrid) === null || _a === void 0 ? void 0 : _a.getSortModel();
682
+ if (this.state.gridConfiguration.followLastRecord && this.state.gridConfiguration.followLastRecordSortModel && !isEqual(this.state.gridConfiguration.followLastRecordSortModel, sortModel)) {
683
+ this.enableFollowLastRecord(false);
684
+ }
685
+ const columnState = (_b = this.gridApi) === null || _b === void 0 ? void 0 : _b.getColumnState();
686
+ this._changeConfiguration({ columnModel: this._withPendingColumnStates(columnState) });
687
+ if (this.props.onSortChanged) {
688
+ this.props.onSortChanged(event);
689
+ }
690
+ }
691
+ _onColumnsChanged(columnModel, event) {
692
+ this._changeConfiguration({ columnModel: this._withPendingColumnStates(columnModel) });
693
+ if (this.props.onColumnsChanged) {
694
+ this.props.onColumnsChanged(columnModel, event);
695
+ }
696
+ }
697
+ _onShowMilliseconds(showMillis, callback) {
698
+ this._changeConfiguration({ showMilliseconds: showMillis }, callback);
699
+ }
700
+ _onShowYear(showYear, callback) {
701
+ this._changeConfiguration({ hideYear: !showYear }, callback);
702
+ }
703
+ _onShowUtcOffset(showUtcOffset, callback) {
704
+ this._changeConfiguration({ showUtcOffset: showUtcOffset }, callback);
705
+ }
674
706
  renderToolbarButtons() {
675
707
  var _a, _b, _c;
676
708
  const renderFilter = this.props.filterPanel && this.props.filterPanel.renderer;
@@ -751,34 +783,12 @@ class ExtendedDataGrid extends React.Component {
751
783
  toolbarButtons: this.renderToolbarButtons(),
752
784
  hideRecordCount: toolbar === null || toolbar === void 0 ? void 0 : toolbar.hideRecordCount,
753
785
  extraContent: toolbar === null || toolbar === void 0 ? void 0 : toolbar.extraContent,
754
- }, onSortChanged: (event) => {
755
- var _a, _b;
756
- const sortModel = (_a = this.dataGrid) === null || _a === void 0 ? void 0 : _a.getSortModel();
757
- if (this.state.gridConfiguration.followLastRecord && this.state.gridConfiguration.followLastRecordSortModel && !isEqual(this.state.gridConfiguration.followLastRecordSortModel, sortModel)) {
758
- this.enableFollowLastRecord(false);
759
- }
760
- const columnState = (_b = this.gridApi) === null || _b === void 0 ? void 0 : _b.getColumnState();
761
- this._changeConfiguration({ columnModel: this._withPendingColumnStates(columnState) });
762
- if (onSortChanged) {
763
- onSortChanged(event);
764
- }
765
- }, onNewColumnsLoaded: this._onNewColumnsLoaded, onColumnsChanged: (columnModel, event) => {
766
- this._changeConfiguration({ columnModel: this._withPendingColumnStates(columnModel) });
767
- if (onColumnsChanged) {
768
- onColumnsChanged(columnModel, event);
769
- }
770
- }, onRowDataUpdated: this._onRowDataUpdated, tableConfigVisible: this.state.tableConfigVisible, onTableConfigVisible: (visible) => {
786
+ }, onSortChanged: this._onSortChanged, onNewColumnsLoaded: this._onNewColumnsLoaded, onColumnsChanged: this._onColumnsChanged, onRowDataUpdated: this._onRowDataUpdated, tableConfigVisible: this.state.tableConfigVisible, onTableConfigVisible: (visible) => {
771
787
  this.setState({ tableConfigVisible: visible });
772
788
  if (onTableConfigVisible) {
773
789
  onTableConfigVisible(visible);
774
790
  }
775
- }, onSelectionChanged: this._onSelectionChanged, rowStyleRules: this.state.gridConfiguration.rowStyleRules, defaultRowStyleRules: this.state.gridConfiguration.defaultRowStyleRules, onChangeRowStyleRules: this._onChangeRowStyleRules, onViewportChanged: this._onViewportChanged, showMilliseconds: this.state.gridConfiguration.showMilliseconds, defaultShowMilliseconds: this.state.gridConfiguration.defaultShowMilliseconds, onShowMilliseconds: (showMillis, callback) => {
776
- this._changeConfiguration({ showMilliseconds: showMillis }, callback);
777
- }, hideYear: this.state.gridConfiguration.hideYear, defaultHideYear: this.state.gridConfiguration.defaultHideYear, onShowYear: (showYear, callback) => {
778
- this._changeConfiguration({ hideYear: !showYear }, callback);
779
- }, showUtcOffset: this.state.gridConfiguration.showUtcOffset, defaultShowUtcOffset: this.state.gridConfiguration.defaultShowUtcOffset, onShowUtcOffset: (showUtcOffset, callback) => {
780
- this._changeConfiguration({ showUtcOffset: showUtcOffset }, callback);
781
- } })));
791
+ }, onSelectionChanged: this._onSelectionChanged, rowStyleRules: this.state.gridConfiguration.rowStyleRules, defaultRowStyleRules: this.state.gridConfiguration.defaultRowStyleRules, onChangeRowStyleRules: this._onChangeRowStyleRules, onViewportChanged: this._onViewportChanged, showMilliseconds: this.state.gridConfiguration.showMilliseconds, defaultShowMilliseconds: this.state.gridConfiguration.defaultShowMilliseconds, onShowMilliseconds: this._onShowMilliseconds, hideYear: this.state.gridConfiguration.hideYear, defaultHideYear: this.state.gridConfiguration.defaultHideYear, onShowYear: this._onShowYear, showUtcOffset: this.state.gridConfiguration.showUtcOffset, defaultShowUtcOffset: this.state.gridConfiguration.defaultShowUtcOffset, onShowUtcOffset: this._onShowUtcOffset })));
782
792
  }
783
793
  renderDataGridWithControlPanel() {
784
794
  if (this.props.controlPanel && this.props.controlPanel.renderer) {