@oneblink/apps-react 5.12.0-beta.1 → 5.12.0-beta.11

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 (154) hide show
  1. package/dist/OneBlinkFormBase.js +9 -8
  2. package/dist/OneBlinkFormBase.js.map +1 -1
  3. package/dist/PaymentReceipt.js +2 -1
  4. package/dist/PaymentReceipt.js.map +1 -1
  5. package/dist/components/ArcGISWebMap.d.ts +3 -1
  6. package/dist/components/ArcGISWebMap.js +4 -3
  7. package/dist/components/ArcGISWebMap.js.map +1 -1
  8. package/dist/components/CopyToClipboardIconButton.js +2 -2
  9. package/dist/components/CopyToClipboardIconButton.js.map +1 -1
  10. package/dist/components/CustomAccordion.d.ts +1 -1
  11. package/dist/components/ErrorSnackbar.js +6 -8
  12. package/dist/components/ErrorSnackbar.js.map +1 -1
  13. package/dist/components/IconComponent.d.ts +7 -0
  14. package/dist/components/IconComponent.js +13 -0
  15. package/dist/components/IconComponent.js.map +1 -0
  16. package/dist/components/Lists.d.ts +1 -1
  17. package/dist/components/MaterialIcon.d.ts +2 -0
  18. package/dist/components/MaterialIcon.js +6 -0
  19. package/dist/components/MaterialIcon.js.map +1 -0
  20. package/dist/components/formStore/FormStoreTableProvider.js +4 -3
  21. package/dist/components/formStore/FormStoreTableProvider.js.map +1 -1
  22. package/dist/components/formStore/OneBlinkFormStoreClearFiltersButton.js +2 -2
  23. package/dist/components/formStore/OneBlinkFormStoreClearFiltersButton.js.map +1 -1
  24. package/dist/components/formStore/OneBlinkFormStoreColumnsButton.js +3 -3
  25. package/dist/components/formStore/OneBlinkFormStoreColumnsButton.js.map +1 -1
  26. package/dist/components/formStore/OneBlinkFormStoreDownloadButton.js +3 -3
  27. package/dist/components/formStore/OneBlinkFormStoreDownloadButton.js.map +1 -1
  28. package/dist/components/formStore/OneBlinkFormStoreRefreshButton.js +2 -2
  29. package/dist/components/formStore/OneBlinkFormStoreRefreshButton.js.map +1 -1
  30. package/dist/components/formStore/OneBlinkFormStoreTable.js +7 -8
  31. package/dist/components/formStore/OneBlinkFormStoreTable.js.map +1 -1
  32. package/dist/components/formStore/display/ElementDisplay.js +2 -2
  33. package/dist/components/formStore/display/ElementDisplay.js.map +1 -1
  34. package/dist/components/formStore/display/FormStoreIcon.d.ts +3 -2
  35. package/dist/components/formStore/display/FormStoreIcon.js +5 -2
  36. package/dist/components/formStore/display/FormStoreIcon.js.map +1 -1
  37. package/dist/components/formStore/table/ActionedByTableCell.js +4 -4
  38. package/dist/components/formStore/table/ActionedByTableCell.js.map +1 -1
  39. package/dist/components/formStore/table/HeaderCellMoreButton.js +9 -6
  40. package/dist/components/formStore/table/HeaderCellMoreButton.js.map +1 -1
  41. package/dist/components/formStore/table/RepeatableSetCellAccordion.js +2 -2
  42. package/dist/components/formStore/table/RepeatableSetCellAccordion.js.map +1 -1
  43. package/dist/components/messages/ErrorMessage.js +2 -1
  44. package/dist/components/messages/ErrorMessage.js.map +1 -1
  45. package/dist/components/messages/LargeIconMessage.d.ts +3 -3
  46. package/dist/components/messages/LargeIconMessage.js.map +1 -1
  47. package/dist/components/payments/PaymentForm.js +2 -1
  48. package/dist/components/payments/PaymentForm.js.map +1 -1
  49. package/dist/components/payments/WestpacQuickStreamPaymentForm.js +2 -1
  50. package/dist/components/payments/WestpacQuickStreamPaymentForm.js.map +1 -1
  51. package/dist/components/receipts/ReceiptList.js +3 -2
  52. package/dist/components/receipts/ReceiptList.js.map +1 -1
  53. package/dist/components/receipts/ReceiptListItem.js +3 -2
  54. package/dist/components/receipts/ReceiptListItem.js.map +1 -1
  55. package/dist/components/renderer/AutocompleteDropdown.d.ts +2 -1
  56. package/dist/components/renderer/AutocompleteDropdown.js +5 -4
  57. package/dist/components/renderer/AutocompleteDropdown.js.map +1 -1
  58. package/dist/components/renderer/CopyToClipboardButton.js +2 -1
  59. package/dist/components/renderer/CopyToClipboardButton.js.map +1 -1
  60. package/dist/components/renderer/CustomisableButtonInner.js +2 -1
  61. package/dist/components/renderer/CustomisableButtonInner.js.map +1 -1
  62. package/dist/components/renderer/FormElementLabelContainer.d.ts +4 -2
  63. package/dist/components/renderer/FormElementLabelContainer.js +8 -7
  64. package/dist/components/renderer/FormElementLabelContainer.js.map +1 -1
  65. package/dist/components/renderer/LookupButton.js +2 -1
  66. package/dist/components/renderer/LookupButton.js.map +1 -1
  67. package/dist/components/renderer/LookupNotification.js +4 -3
  68. package/dist/components/renderer/LookupNotification.js.map +1 -1
  69. package/dist/components/renderer/attachments/AttachmentStatus.js +5 -4
  70. package/dist/components/renderer/attachments/AttachmentStatus.js.map +1 -1
  71. package/dist/components/renderer/attachments/DropdownMenu.js +2 -1
  72. package/dist/components/renderer/attachments/DropdownMenu.js.map +1 -1
  73. package/dist/components/renderer/attachments/FileCardContent.js +2 -1
  74. package/dist/components/renderer/attachments/FileCardContent.js.map +1 -1
  75. package/dist/components/renderer/attachments/ImagePreviewUnavailable.js +3 -2
  76. package/dist/components/renderer/attachments/ImagePreviewUnavailable.js.map +1 -1
  77. package/dist/form-elements/ComplianceButton.js +2 -1
  78. package/dist/form-elements/ComplianceButton.js.map +1 -1
  79. package/dist/form-elements/FormElementABN.js +3 -1
  80. package/dist/form-elements/FormElementABN.js.map +1 -1
  81. package/dist/form-elements/FormElementAPINSWLiquorLicence.js +3 -1
  82. package/dist/form-elements/FormElementAPINSWLiquorLicence.js.map +1 -1
  83. package/dist/form-elements/FormElementArcGISWebMap.js +3 -1
  84. package/dist/form-elements/FormElementArcGISWebMap.js.map +1 -1
  85. package/dist/form-elements/FormElementAutocomplete.js +5 -2
  86. package/dist/form-elements/FormElementAutocomplete.js.map +1 -1
  87. package/dist/form-elements/FormElementBSB.js +3 -1
  88. package/dist/form-elements/FormElementBSB.js.map +1 -1
  89. package/dist/form-elements/FormElementBarcodeScanner.js +8 -5
  90. package/dist/form-elements/FormElementBarcodeScanner.js.map +1 -1
  91. package/dist/form-elements/FormElementBoolean.js +3 -1
  92. package/dist/form-elements/FormElementBoolean.js.map +1 -1
  93. package/dist/form-elements/FormElementCalculation.js +2 -1
  94. package/dist/form-elements/FormElementCalculation.js.map +1 -1
  95. package/dist/form-elements/FormElementCamera.js +6 -3
  96. package/dist/form-elements/FormElementCamera.js.map +1 -1
  97. package/dist/form-elements/FormElementCheckBoxes.js +6 -2
  98. package/dist/form-elements/FormElementCheckBoxes.js.map +1 -1
  99. package/dist/form-elements/FormElementCivicaStreetName.js +3 -1
  100. package/dist/form-elements/FormElementCivicaStreetName.js.map +1 -1
  101. package/dist/form-elements/FormElementCompliance.js +3 -1
  102. package/dist/form-elements/FormElementCompliance.js.map +1 -1
  103. package/dist/form-elements/FormElementDate.js +5 -2
  104. package/dist/form-elements/FormElementDate.js.map +1 -1
  105. package/dist/form-elements/FormElementDateTime.js +5 -2
  106. package/dist/form-elements/FormElementDateTime.js.map +1 -1
  107. package/dist/form-elements/FormElementEmail.js +5 -2
  108. package/dist/form-elements/FormElementEmail.js.map +1 -1
  109. package/dist/form-elements/FormElementFiles.js +5 -2
  110. package/dist/form-elements/FormElementFiles.js.map +1 -1
  111. package/dist/form-elements/FormElementFreshdeskDependentField.js.map +1 -1
  112. package/dist/form-elements/FormElementGeoscapeAddress.js +3 -1
  113. package/dist/form-elements/FormElementGeoscapeAddress.js.map +1 -1
  114. package/dist/form-elements/FormElementImage.js +1 -1
  115. package/dist/form-elements/FormElementImage.js.map +1 -1
  116. package/dist/form-elements/FormElementLocation.js +23 -21
  117. package/dist/form-elements/FormElementLocation.js.map +1 -1
  118. package/dist/form-elements/FormElementNumber.js +5 -2
  119. package/dist/form-elements/FormElementNumber.js.map +1 -1
  120. package/dist/form-elements/FormElementPointAddress.js +3 -1
  121. package/dist/form-elements/FormElementPointAddress.js.map +1 -1
  122. package/dist/form-elements/FormElementRadio.js +5 -1
  123. package/dist/form-elements/FormElementRadio.js.map +1 -1
  124. package/dist/form-elements/FormElementRepeatableSet.js +3 -2
  125. package/dist/form-elements/FormElementRepeatableSet.js.map +1 -1
  126. package/dist/form-elements/FormElementSection.js +6 -4
  127. package/dist/form-elements/FormElementSection.js.map +1 -1
  128. package/dist/form-elements/FormElementSelect.js +3 -1
  129. package/dist/form-elements/FormElementSelect.js.map +1 -1
  130. package/dist/form-elements/FormElementTelephone.js +5 -2
  131. package/dist/form-elements/FormElementTelephone.js.map +1 -1
  132. package/dist/form-elements/FormElementText.js +3 -1
  133. package/dist/form-elements/FormElementText.js.map +1 -1
  134. package/dist/form-elements/FormElementTextarea.js +3 -1
  135. package/dist/form-elements/FormElementTextarea.js.map +1 -1
  136. package/dist/form-elements/FormElementTime.js +5 -2
  137. package/dist/form-elements/FormElementTime.js.map +1 -1
  138. package/dist/form-elements/OptionButton.d.ts +1 -0
  139. package/dist/form-elements/OptionButton.js +2 -2
  140. package/dist/form-elements/OptionButton.js.map +1 -1
  141. package/dist/hooks/useDynamicOptionsLoaderState.d.ts +1 -1
  142. package/dist/hooks/useDynamicOptionsLoaderState.js +2 -1
  143. package/dist/hooks/useDynamicOptionsLoaderState.js.map +1 -1
  144. package/dist/hooks/useElementAriaDescribedby.d.ts +3 -0
  145. package/dist/hooks/useElementAriaDescribedby.js +9 -0
  146. package/dist/hooks/useElementAriaDescribedby.js.map +1 -0
  147. package/dist/hooks/useFormSubmissionState.d.ts +1 -1
  148. package/dist/hooks/useFormSubmissionState.js.map +1 -1
  149. package/dist/styles.css +8 -4
  150. package/dist/styles.scss +4 -1
  151. package/dist/types/mui-color.d.ts +4 -0
  152. package/dist/types/mui-color.js +2 -0
  153. package/dist/types/mui-color.js.map +1 -0
  154. package/package.json +3 -4
@@ -1 +1 @@
1
- {"version":3,"file":"ArcGISWebMap.js","sourceRoot":"","sources":["../../src/components/ArcGISWebMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,OAAO,MAAM,4BAA4B,CAAA;AAChD,OAAO,MAAM,MAAM,qBAAqB,CAAA;AACxC,OAAO,IAAI,MAAM,2BAA2B,CA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CAAA;IACH,CAAC,EAAE,CAAC,OAAO,CAAC,CAAC,CAAA;IAEb,IAAI,SAAS,EAAE;QACb,OAAO,CACL,gCAAQ,SAAS,EAAC,WAAW;YAC3B,6BAAK,SAAS,EAAC,kCAAkC;gBAC/C,2BAAG,SAAS,EAAC,gEAAgE,YAEzE;gBACJ,4BAAI,SAAS,EAAC,YAAY,6CAA4C;gBACtE,+BAAI,SAAS,CAAC,OAAO,CAAK,CACtB,CACC,CACV,CAAA;KACF;IAED,OAAO,CACL;QACG,SAAS,IAAI,oBAAC,SAAS,OAAG;QAC3B,6BAAK,SAAS,EAAC,gBAAgB,EAAC,GAAG,EAAE,GAAG,GAAI,CAC3C,CACJ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport { FormTypes } from '@oneblink/types'\nimport MapView from '@arcgis/core/views/MapView'\nimport WebMap from '@arcgis/core/WebMap'\nimport Home from '@arcgis/core/widgets/Home'\nimport Search from '@arcgis/core/widgets/Search'\nimport Zoom from '@arcgis/core/widgets/Zoom'\nimport LayerList from '@arcgis/core/widgets/LayerList'\nimport Expand from '@arcgis/core/widgets/Expand'\nimport BaseMapGallery from '@arcgis/core/widgets/BasemapGallery'\nimport OnLoading from '../components/renderer/OnLoading'\nimport '../styles/arcgis-external.css'\n\ntype Props = {\n element: FormTypes.ArcGISWebMapElement\n}\n\nfunction FormElementArcGISWebMap({ element }: Props) {\n const [loadError, setLoadError] = React.useState<Error>()\n const ref = React.useRef<HTMLDivElement | null>(null)\n const [isLoading, setIsLoading] = React.useState<boolean>(true)\n\n React.useEffect(() => {\n let view: MapView\n\n const loadMap = async () => {\n try {\n const map = new WebMap({\n portalItem: {\n id: element.webMapId,\n },\n })\n await map.load()\n\n view = new MapView({\n map: map,\n container: ref.current || undefined,\n })\n\n // remove default widgets\n const components = view.ui.getComponents()\n for (const component of components) {\n view.ui.remove(component)\n }\n\n view.ui.add(\n new Search({\n view,\n }),\n 'top-left',\n )\n view.ui.add(\n new Home({\n view,\n }),\n 'top-left',\n )\n view.ui.add(\n new Zoom({\n view,\n }),\n 'bottom-left',\n )\n\n const layerList = new LayerList({\n view,\n })\n\n view.ui.add(\n new Expand({\n expandIcon: 'layers',\n view,\n content: layerList,\n expanded: element.showLayerPanel,\n mode: 'floating',\n }),\n 'top-right',\n )\n\n const baseMapGallery = new BaseMapGallery({ view })\n\n view.ui.add(\n new Expand({\n expandIcon: 'basemap',\n view,\n content: baseMapGallery,\n mode: 'floating',\n }),\n 'bottom-right',\n )\n\n // once the view has loaded\n view.when(() => {\n setIsLoading(false)\n })\n } catch (e) {\n console.warn('Error while trying to load arcgis web map ', e)\n setLoadError(e as Error)\n setIsLoading(false)\n }\n }\n\n loadMap()\n\n return () => {\n if (view) {\n view.destroy()\n }\n }\n }, [element])\n\n if (loadError) {\n return (\n <figure className=\"ob-figure\">\n <div className=\"figure-content has-text-centered\">\n <i className=\"material-icons icon-large has-margin-bottom-6 has-text-warning\">\n error\n </i>\n <h4 className=\"title is-4\">We were unable to display your web map</h4>\n <p>{loadError.message}</p>\n </div>\n </figure>\n )\n }\n\n return (\n <>\n {isLoading && <OnLoading />}\n <div className=\"arcgis-web-map\" ref={ref} />\n </>\n )\n}\n\nexport default React.memo(FormElementArcGISWebMap)\n"]}
1
+ {"version":3,"file":"ArcGISWebMap.js","sourceRoot":"","sources":["../../src/components/ArcGISWebMap.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,OAAO,MAAM,4BAA4B,CAAA;AAChD,OAAO,MAAM,MAAM,qBAAqB,CAAA;AACxC,OAAO,IAAI,MAAM,2BAA2B,CAAA;AAC5C,OAAO,MAAM,MAAM,6BAA6B,CAAA;AAChD,OAAO,IAAI,MAAM,2BAA2B,CAAA;AAC5C,OAAO,SAAS,MAAM,gCAAgC,CAAA;AACtD,OAAO,MAAM,MAAM,6BAA6B,CA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O,CACL,gCAAQ,SAAS,EAAC,WAAW;YAC3B,6BAAK,SAAS,EAAC,kCAAkC;gBAC/C,oBAAC,YAAY,IAAC,SAAS,EAAC,iDAAiD,YAE1D;gBACf,4BAAI,SAAS,EAAC,YAAY,6CAA4C;gBACtE,+BAAI,SAAS,CAAC,OAAO,CAAK,CACtB,CACC,CACV,CAAA;KACF;IAED,OAAO,CACL;QACG,SAAS,IAAI,oBAAC,SAAS,OAAG;QAC3B,6BACE,SAAS,EAAC,gBAAgB,EAC1B,GAAG,EAAE,GAAG,EACR,EAAE,EAAE,EAAE,sBACY,KAAK,CAAC,kBAAkB,CAAC,GAC3C,CACD,CACJ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,uBAAuB,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport { FormTypes } from '@oneblink/types'\nimport MapView from '@arcgis/core/views/MapView'\nimport WebMap from '@arcgis/core/WebMap'\nimport Home from '@arcgis/core/widgets/Home'\nimport Search from '@arcgis/core/widgets/Search'\nimport Zoom from '@arcgis/core/widgets/Zoom'\nimport LayerList from '@arcgis/core/widgets/LayerList'\nimport Expand from '@arcgis/core/widgets/Expand'\nimport BaseMapGallery from '@arcgis/core/widgets/BasemapGallery'\nimport OnLoading from '../components/renderer/OnLoading'\nimport MaterialIcon from './MaterialIcon'\n\nimport '../styles/arcgis-external.css'\n\ntype Props = {\n element: FormTypes.ArcGISWebMapElement\n id: string\n 'aria-describedby'?: string\n}\n\nfunction FormElementArcGISWebMap({ element, id, ...props }: Props) {\n const [loadError, setLoadError] = React.useState<Error>()\n const ref = React.useRef<HTMLDivElement | null>(null)\n const [isLoading, setIsLoading] = React.useState<boolean>(true)\n\n React.useEffect(() => {\n let view: MapView\n\n const loadMap = async () => {\n try {\n const map = new WebMap({\n portalItem: {\n id: element.webMapId,\n },\n })\n await map.load()\n\n view = new MapView({\n map: map,\n container: ref.current || undefined,\n })\n\n // remove default widgets\n const components = view.ui.getComponents()\n for (const component of components) {\n view.ui.remove(component)\n }\n\n view.ui.add(\n new Search({\n view,\n }),\n 'top-left',\n )\n view.ui.add(\n new Home({\n view,\n }),\n 'top-left',\n )\n view.ui.add(\n new Zoom({\n view,\n }),\n 'bottom-left',\n )\n\n const layerList = new LayerList({\n view,\n })\n\n view.ui.add(\n new Expand({\n expandIcon: 'layers',\n view,\n content: layerList,\n expanded: element.showLayerPanel,\n mode: 'floating',\n }),\n 'top-right',\n )\n\n const baseMapGallery = new BaseMapGallery({ view })\n\n view.ui.add(\n new Expand({\n expandIcon: 'basemap',\n view,\n content: baseMapGallery,\n mode: 'floating',\n }),\n 'bottom-right',\n )\n\n // once the view has loaded\n view.when(() => {\n setIsLoading(false)\n })\n } catch (e) {\n console.warn('Error while trying to load arcgis web map ', e)\n setLoadError(e as Error)\n setIsLoading(false)\n }\n }\n\n loadMap()\n\n return () => {\n if (view) {\n view.destroy()\n }\n }\n }, [element])\n\n if (loadError) {\n return (\n <figure className=\"ob-figure\">\n <div className=\"figure-content has-text-centered\">\n <MaterialIcon className=\"icon-large has-margin-bottom-6 has-text-warning\">\n error\n </MaterialIcon>\n <h4 className=\"title is-4\">We were unable to display your web map</h4>\n <p>{loadError.message}</p>\n </div>\n </figure>\n )\n }\n\n return (\n <>\n {isLoading && <OnLoading />}\n <div\n className=\"arcgis-web-map\"\n ref={ref}\n id={id}\n aria-describedby={props['aria-describedby']}\n />\n </>\n )\n}\n\nexport default React.memo(FormElementArcGISWebMap)\n"]}
@@ -1,7 +1,7 @@
1
1
  import * as React from 'react';
2
2
  import copy from 'copy-to-clipboard';
3
3
  import { IconButton, Tooltip, Snackbar, Portal } from '@mui/material';
4
- import FileCopy from '@mui/icons-material/FileCopy';
4
+ import MaterialIcon from './MaterialIcon';
5
5
  const noMargin = {
6
6
  marginTop: -1,
7
7
  marginBottom: -1,
@@ -21,7 +21,7 @@ export function CopyToClipBoardIconButton({ text, large, noMarginY, className, .
21
21
  e.stopPropagation();
22
22
  copyToClipboard();
23
23
  }, "data-cypress": "copy-to-clip-board-button", className: className, sx: noMarginY ? noMargin : undefined, ...rest },
24
- React.createElement(FileCopy, { sx: large ? undefined : { fontSize: 18 } }))),
24
+ React.createElement(MaterialIcon, { style: large ? undefined : { fontSize: 18 } }, "file_copy"))),
25
25
  React.createElement(Portal, null,
26
26
  React.createElement(Snackbar, { anchorOrigin: {
27
27
  vertical: 'bottom',
@@ -1 +1 @@
1
- {"version":3,"file":"CopyToClipboardIconButton.js","sourceRoot":"","sources":["../../src/components/CopyToClipboardIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,IAAI,MAAM,mBAAmB,CAAA;AACpC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAW,MAAM,EAAE,MAAM,eAAe,CAAA;AAC9E,OAAO,QAAQ,MAAM,8BAA8B,CAAA;AAQnD,MAAM,QAAQ,GAAY;IACxB,SAAS,EAAE,CAAC,CAAC;IACb,YAAY,EAAE,CAAC,CAAC;CACjB,CAAA;AACD,MAAM,UAAU,yBAAyB,CAAC,EACxC,IAAI,EACJ,KAAK,EACL,SAAS,EACT,SAAS,EACT,GAAG,IAAI,EACD;IACN,MAAM,CAAC,qBAAqB,EAAE,wBAAwB,CAAC,GACrD,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IACvB,MAAM,eAAe,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QAC7C,IAAI,CAAC,IAAI,CAAC,CAAA;QACV,wBAAwB,CAAC,IAAI,CAAC,CAAA;IAChC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;IACV,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QACzC,wBAAwB,CAAC,KAAK,CAAC,CAAA;IACjC,CAAC,EAAE,EAAE,CAAC,CAAA;IACN,OAAO,CACL;QACE,oBAAC,OAAO,IAAC,KAAK,EAAC,mBAAmB;YAChC,oBAAC,UAAU,IACT,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACb,CAAC,CAAC,eAAe,EAAE,CAAA;oBACnB,eAAe,EAAE,CAAA;gBACnB,CAAC,kBACY,2BAA2B,EACxC,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,KAChC,IAAI;gBAER,oBAAC,QAAQ,IAAC,EAAE,EAAE,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,GAAI,CAC3C,CACL;QACV,oBAAC,MAAM;YACL,oBAAC,QAAQ,IACP,YAAY,EAAE;oBACZ,QAAQ,EAAE,QAAQ;oBAClB,UAAU,EAAE,OAAO;iBACpB,EACD,IAAI,EAAE,qBAAqB,EAC3B,OAAO,EAAE,WAAW,EACpB,gBAAgB,EAAE,IAAI,EACtB,YAAY,EAAE;oBACZ,kBAAkB,EAAE,4BAA4B;iBACjD,EACD,OAAO,EACL,8BACE,EAAE,EAAC,4BAA4B,kBAClB,mCAAmC,0BAG3C,GAET,CACK,CACR,CACJ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport copy from 'copy-to-clipboard'\nimport { IconButton, Tooltip, Snackbar, SxProps, Portal } from '@mui/material'\nimport FileCopy from '@mui/icons-material/FileCopy'\n\ntype Props = {\n text: string\n large?: boolean\n noMarginY?: boolean\n} & React.ComponentProps<typeof IconButton>\n\nconst noMargin: SxProps = {\n marginTop: -1,\n marginBottom: -1,\n}\nexport function CopyToClipBoardIconButton({\n text,\n large,\n noMarginY,\n className,\n ...rest\n}: Props) {\n const [isCopyToClipboardOpen, setIsCopyToClipboardOpen] =\n React.useState(false)\n const copyToClipboard = React.useCallback(() => {\n copy(text)\n setIsCopyToClipboardOpen(true)\n }, [text])\n const handleClose = React.useCallback(() => {\n setIsCopyToClipboardOpen(false)\n }, [])\n return (\n <>\n <Tooltip title=\"Copy to clipboard\">\n <IconButton\n onClick={(e) => {\n e.stopPropagation()\n copyToClipboard()\n }}\n data-cypress=\"copy-to-clip-board-button\"\n className={className}\n sx={noMarginY ? noMargin : undefined}\n {...rest}\n >\n <FileCopy sx={large ? undefined : { fontSize: 18 }} />\n </IconButton>\n </Tooltip>\n <Portal>\n <Snackbar\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'right',\n }}\n open={isCopyToClipboardOpen}\n onClose={handleClose}\n autoHideDuration={1500}\n ContentProps={{\n 'aria-describedby': 'copy-clip-board-message-id',\n }}\n message={\n <span\n id=\"copy-clip-board-message-id\"\n data-cypress=\"copied-text-to-clip-board-message\"\n >\n Copied to Clipboard\n </span>\n }\n />\n </Portal>\n </>\n )\n}\n\nexport default React.memo(CopyToClipBoardIconButton)\n"]}
1
+ {"version":3,"file":"CopyToClipboardIconButton.js","sourceRoot":"","sources":["../../src/components/CopyToClipboardIconButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,IAAI,MAAM,mBAAmB,CAAA;AACpC,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,EAAW,MAAM,EAAE,MAAM,eAAe,CAAA;AAC9E,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAQzC,MAAM,QAAQ,GAAY;IACxB,SAAS,EAAE,CAAC,CAAC;IACb,YAAY,EAAE,CAAC,CAAC;CACjB,CAAA;AACD,MAAM,UAAU,yBAAyB,CAAC,EACxC,IAAI,EACJ,KAAK,EACL,SAAS,EACT,SAAS,EACT,GAAG,IAAI,EACD;IACN,MAAM,CAAC,qBAAqB,EAAE,wBAAwB,CAAC,GACrD,KAAK,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;IACvB,MAAM,eAAe,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QAC7C,IAAI,CAAC,IAAI,CAAC,CAAA;QACV,wBAAwB,CAAC,IAAI,CAAC,CAAA;IAChC,CAAC,EAAE,CAAC,IAAI,CAAC,CAAC,CAAA;IACV,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,GAAG,EAAE;QACzC,wBAAwB,CAAC,KAAK,CAAC,CAAA;IACjC,CAAC,EAAE,EAAE,CAAC,CAAA;IACN,OAAO,CACL;QACE,oBAAC,OAAO,IAAC,KAAK,EAAC,mBAAmB;YAChC,oBAAC,UAAU,IACT,OAAO,EAAE,CAAC,CAAC,EAAE,EAAE;oBACb,CAAC,CAAC,eAAe,EAAE,CAAA;oBACnB,eAAe,EAAE,CAAA;gBACnB,CAAC,kBACY,2BAA2B,EACxC,SAAS,EAAE,SAAS,EACpB,EAAE,EAAE,SAAS,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,SAAS,KAChC,IAAI;gBAER,oBAAC,YAAY,IAAC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,EAAE,QAAQ,EAAE,EAAE,EAAE,gBAE1C,CACJ,CACL;QACV,oBAAC,MAAM;YACL,oBAAC,QAAQ,IACP,YAAY,EAAE;oBACZ,QAAQ,EAAE,QAAQ;oBAClB,UAAU,EAAE,OAAO;iBACpB,EACD,IAAI,EAAE,qBAAqB,EAC3B,OAAO,EAAE,WAAW,EACpB,gBAAgB,EAAE,IAAI,EACtB,YAAY,EAAE;oBACZ,kBAAkB,EAAE,4BAA4B;iBACjD,EACD,OAAO,EACL,8BACE,EAAE,EAAC,4BAA4B,kBAClB,mCAAmC,0BAG3C,GAET,CACK,CACR,CACJ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,yBAAyB,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport copy from 'copy-to-clipboard'\nimport { IconButton, Tooltip, Snackbar, SxProps, Portal } from '@mui/material'\nimport MaterialIcon from './MaterialIcon'\n\ntype Props = {\n text: string\n large?: boolean\n noMarginY?: boolean\n} & React.ComponentProps<typeof IconButton>\n\nconst noMargin: SxProps = {\n marginTop: -1,\n marginBottom: -1,\n}\nexport function CopyToClipBoardIconButton({\n text,\n large,\n noMarginY,\n className,\n ...rest\n}: Props) {\n const [isCopyToClipboardOpen, setIsCopyToClipboardOpen] =\n React.useState(false)\n const copyToClipboard = React.useCallback(() => {\n copy(text)\n setIsCopyToClipboardOpen(true)\n }, [text])\n const handleClose = React.useCallback(() => {\n setIsCopyToClipboardOpen(false)\n }, [])\n return (\n <>\n <Tooltip title=\"Copy to clipboard\">\n <IconButton\n onClick={(e) => {\n e.stopPropagation()\n copyToClipboard()\n }}\n data-cypress=\"copy-to-clip-board-button\"\n className={className}\n sx={noMarginY ? noMargin : undefined}\n {...rest}\n >\n <MaterialIcon style={large ? undefined : { fontSize: 18 }}>\n file_copy\n </MaterialIcon>\n </IconButton>\n </Tooltip>\n <Portal>\n <Snackbar\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'right',\n }}\n open={isCopyToClipboardOpen}\n onClose={handleClose}\n autoHideDuration={1500}\n ContentProps={{\n 'aria-describedby': 'copy-clip-board-message-id',\n }}\n message={\n <span\n id=\"copy-clip-board-message-id\"\n data-cypress=\"copied-text-to-clip-board-message\"\n >\n Copied to Clipboard\n </span>\n }\n />\n </Portal>\n </>\n )\n}\n\nexport default React.memo(CopyToClipBoardIconButton)\n"]}
@@ -14,7 +14,7 @@ export declare const CustomAccordion: import("@emotion/styled").StyledComponent<
14
14
  TransitionProps?: import("@mui/material/transitions").TransitionProps | undefined;
15
15
  } & import("@mui/material").AccordionSlotsAndSlotProps & Omit<import("@mui/material").PaperOwnProps, "classes" | "onChange"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
16
16
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
17
- }, "children" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "onChange" | "elevation" | "disabled" | "variant" | "disableGutters" | "square" | "defaultExpanded" | "expanded" | "TransitionComponent" | "TransitionProps" | keyof import("@mui/material").AccordionSlotsAndSlotProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
17
+ }, "children" | keyof import("@mui/material/OverridableComponent").CommonProps | "sx" | "onChange" | "elevation" | "disabled" | "variant" | "disableGutters" | "expanded" | "square" | "defaultExpanded" | "TransitionComponent" | "TransitionProps" | keyof import("@mui/material").AccordionSlotsAndSlotProps> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
18
18
  export declare const CustomAccordionSummary: import("@emotion/styled").StyledComponent<import("@mui/material").AccordionSummaryOwnProps & Omit<import("@mui/material").ButtonBaseOwnProps, "classes"> & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "ref"> & {
19
19
  ref?: ((instance: HTMLDivElement | null) => void) | import("react").RefObject<HTMLDivElement> | null | undefined;
20
20
  }, "className" | "style" | "children" | "classes" | "sx" | "tabIndex" | "disabled" | "action" | "centerRipple" | "disableRipple" | "disableTouchRipple" | "focusRipple" | "focusVisibleClassName" | "LinkComponent" | "onFocusVisible" | "TouchRippleProps" | "touchRippleRef" | "expandIcon"> & import("@mui/system").MUIStyledCommonProps<import("@mui/material").Theme>, {}, {}>;
@@ -1,11 +1,12 @@
1
1
  import * as React from 'react';
2
- import { Snackbar, IconButton } from '@mui/material';
3
- import { Close } from '@mui/icons-material';
4
- import MuiAlert from '@mui/material/Alert';
5
- import { styled } from '@mui/material/styles';
2
+ import { Snackbar, IconButton, Alert as MuiAlert, styled, } from '@mui/material';
3
+ import MaterialIcon from './MaterialIcon';
6
4
  const Alert = React.forwardRef(function Alert(props, ref) {
7
5
  return React.createElement(MuiAlert, { elevation: 6, ref: ref, variant: "filled", ...props });
8
6
  });
7
+ const StyledIcon = styled(MaterialIcon)(() => ({
8
+ fontSize: 20,
9
+ }));
9
10
  function ErrorSnackbar({ open, onClose, children, }) {
10
11
  const handleClose = React.useCallback((e, reason) => {
11
12
  if (reason !== 'clickaway') {
@@ -17,10 +18,7 @@ function ErrorSnackbar({ open, onClose, children, }) {
17
18
  horizontal: 'right',
18
19
  }, open: open, onClose: handleClose, className: "ob-error-snackbar" },
19
20
  React.createElement(Alert, { severity: "error", action: React.createElement(IconButton, { key: "close", "aria-label": "Close", color: "inherit", onClick: handleClose, "data-cypress": "error-snackbar-close", size: "large" },
20
- React.createElement(StyledCloseIcon, null)) }, children)));
21
+ React.createElement(StyledIcon, null, "close")) }, children)));
21
22
  }
22
- const StyledCloseIcon = styled(Close)(() => ({
23
- fontSize: 20,
24
- }));
25
23
  export default React.memo(ErrorSnackbar);
26
24
  //# sourceMappingURL=ErrorSnackbar.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorSnackbar.js","sourceRoot":"","sources":["../../src/components/ErrorSnackbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AACpD,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAA;AAC3C,OAAO,QAAwB,MAAM,qBAAqB,CAAA;AAC1D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAE7C,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAC5B,SAAS,KAAK,CAAC,KAAK,EAAE,GAAG;IACvB,OAAO,oBAAC,QAAQ,IAAC,SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAC,QAAQ,KAAK,KAAK,GAAI,CAAA;AACzE,CAAC,CACF,CAAA;AAED,SAAS,aAAa,CAAC,EACrB,IAAI,EACJ,OAAO,EACP,QAAQ,GAKT;IACC,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CACnC,CAAC,CAAU,EAAE,MAAe,EAAE,EAAE;QAC9B,IAAI,MAAM,KAAK,WAAW,EAAE;YAC1B,OAAO,CAAC,IAAI,CAAC,CAAA;SACd;IACH,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAA;IACD,OAAO,CACL,oBAAC,QAAQ,IACP,YAAY,EAAE;YACZ,QAAQ,EAAE,QAAQ;YAClB,UAAU,EAAE,OAAO;SACpB,EACD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,WAAW,EACpB,SAAS,EAAC,mBAAmB;QAE7B,oBAAC,KAAK,IACJ,QAAQ,EAAC,OAAO,EAChB,MAAM,EACJ,oBAAC,UAAU,IACT,GAAG,EAAC,OAAO,gBACA,OAAO,EAClB,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,WAAW,kBACP,sBAAsB,EACnC,IAAI,EAAC,OAAO;gBAEZ,oBAAC,eAAe,OAAG,CACR,IAGd,QAAQ,CACH,CACC,CACZ,CAAA;AACH,CAAC;AAED,MAAM,eAAe,GAAG,MAAM,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC3C,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC,CAAA;AAEH,eAAe,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport { Snackbar, IconButton } from '@mui/material'\nimport { Close } from '@mui/icons-material'\nimport MuiAlert, { AlertProps } from '@mui/material/Alert'\nimport { styled } from '@mui/material/styles'\n\nconst Alert = React.forwardRef<HTMLDivElement, AlertProps>(\n function Alert(props, ref) {\n return <MuiAlert elevation={6} ref={ref} variant=\"filled\" {...props} />\n },\n)\n\nfunction ErrorSnackbar({\n open,\n onClose,\n children,\n}: {\n open: boolean\n children: React.ReactNode\n onClose: (arg: null) => unknown\n}) {\n const handleClose = React.useCallback(\n (e: unknown, reason?: string) => {\n if (reason !== 'clickaway') {\n onClose(null)\n }\n },\n [onClose],\n )\n return (\n <Snackbar\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'right',\n }}\n open={open}\n onClose={handleClose}\n className=\"ob-error-snackbar\"\n >\n <Alert\n severity=\"error\"\n action={\n <IconButton\n key=\"close\"\n aria-label=\"Close\"\n color=\"inherit\"\n onClick={handleClose}\n data-cypress=\"error-snackbar-close\"\n size=\"large\"\n >\n <StyledCloseIcon />\n </IconButton>\n }\n >\n {children}\n </Alert>\n </Snackbar>\n )\n}\n\nconst StyledCloseIcon = styled(Close)(() => ({\n fontSize: 20,\n}))\n\nexport default React.memo(ErrorSnackbar)\n"]}
1
+ {"version":3,"file":"ErrorSnackbar.js","sourceRoot":"","sources":["../../src/components/ErrorSnackbar.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,QAAQ,EACR,UAAU,EACV,KAAK,IAAI,QAAQ,EAEjB,MAAM,GACP,MAAM,eAAe,CAAA;AACtB,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAEzC,MAAM,KAAK,GAAG,KAAK,CAAC,UAAU,CAC5B,SAAS,KAAK,CAAC,KAAK,EAAE,GAAG;IACvB,OAAO,oBAAC,QAAQ,IAAC,SAAS,EAAE,CAAC,EAAE,GAAG,EAAE,GAAG,EAAE,OAAO,EAAC,QAAQ,KAAK,KAAK,GAAI,CAAA;AACzE,CAAC,CACF,CAAA;AAED,MAAM,UAAU,GAAG,MAAM,CAAC,YAAY,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;IAC7C,QAAQ,EAAE,EAAE;CACb,CAAC,CAAC,CAAA;AAEH,SAAS,aAAa,CAAC,EACrB,IAAI,EACJ,OAAO,EACP,QAAQ,GAKT;IACC,MAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CACnC,CAAC,CAAU,EAAE,MAAe,EAAE,EAAE;QAC9B,IAAI,MAAM,KAAK,WAAW,EAAE;YAC1B,OAAO,CAAC,IAAI,CAAC,CAAA;SACd;IACH,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAA;IACD,OAAO,CACL,oBAAC,QAAQ,IACP,YAAY,EAAE;YACZ,QAAQ,EAAE,QAAQ;YAClB,UAAU,EAAE,OAAO;SACpB,EACD,IAAI,EAAE,IAAI,EACV,OAAO,EAAE,WAAW,EACpB,SAAS,EAAC,mBAAmB;QAE7B,oBAAC,KAAK,IACJ,QAAQ,EAAC,OAAO,EAChB,MAAM,EACJ,oBAAC,UAAU,IACT,GAAG,EAAC,OAAO,gBACA,OAAO,EAClB,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,WAAW,kBACP,sBAAsB,EACnC,IAAI,EAAC,OAAO;gBAEZ,oBAAC,UAAU,gBAAmB,CACnB,IAGd,QAAQ,CACH,CACC,CACZ,CAAA;AACH,CAAC;AAED,eAAe,KAAK,CAAC,IAAI,CAAC,aAAa,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport {\n Snackbar,\n IconButton,\n Alert as MuiAlert,\n AlertProps,\n styled,\n} from '@mui/material'\nimport MaterialIcon from './MaterialIcon'\n\nconst Alert = React.forwardRef<HTMLDivElement, AlertProps>(\n function Alert(props, ref) {\n return <MuiAlert elevation={6} ref={ref} variant=\"filled\" {...props} />\n },\n)\n\nconst StyledIcon = styled(MaterialIcon)(() => ({\n fontSize: 20,\n}))\n\nfunction ErrorSnackbar({\n open,\n onClose,\n children,\n}: {\n open: boolean\n children: React.ReactNode\n onClose: (arg: null) => unknown\n}) {\n const handleClose = React.useCallback(\n (e: unknown, reason?: string) => {\n if (reason !== 'clickaway') {\n onClose(null)\n }\n },\n [onClose],\n )\n return (\n <Snackbar\n anchorOrigin={{\n vertical: 'bottom',\n horizontal: 'right',\n }}\n open={open}\n onClose={handleClose}\n className=\"ob-error-snackbar\"\n >\n <Alert\n severity=\"error\"\n action={\n <IconButton\n key=\"close\"\n aria-label=\"Close\"\n color=\"inherit\"\n onClick={handleClose}\n data-cypress=\"error-snackbar-close\"\n size=\"large\"\n >\n <StyledIcon>close</StyledIcon>\n </IconButton>\n }\n >\n {children}\n </Alert>\n </Snackbar>\n )\n}\n\nexport default React.memo(ErrorSnackbar)\n"]}
@@ -0,0 +1,7 @@
1
+ import * as React from 'react';
2
+ import MaterialIcon from './MaterialIcon';
3
+ import { Color } from '../types/mui-color';
4
+ export default function IconComponent({ icon, color, ...props }: {
5
+ color: Color;
6
+ icon: string;
7
+ } & React.ComponentProps<typeof MaterialIcon>): React.JSX.Element;
@@ -0,0 +1,13 @@
1
+ import * as React from 'react';
2
+ import { styled } from '@mui/material';
3
+ import MaterialIcon from './MaterialIcon';
4
+ const StyledMaterialIcon = styled(({ icon, ...props }) => (React.createElement(MaterialIcon, { ...props }, icon)))(({ theme, color }) => {
5
+ var _a;
6
+ return ({
7
+ color: (_a = theme.palette[color]) === null || _a === void 0 ? void 0 : _a.main,
8
+ });
9
+ });
10
+ export default function IconComponent({ icon, color, ...props }) {
11
+ return React.createElement(StyledMaterialIcon, { color: color, icon: icon, ...props });
12
+ }
13
+ //# sourceMappingURL=IconComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"IconComponent.js","sourceRoot":"","sources":["../../src/components/IconComponent.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,YAAY,MAAM,gBAAgB,CAAA;AAGzC,MAAM,kBAAkB,GAAG,MAAM,CAAC,CAAC,EAAE,IAAI,EAAE,GAAG,KAAK,EAAoB,EAAE,EAAE,CAAC,CAC1E,oBAAC,YAAY,OAAK,KAAK,IAAG,IAAI,CAAgB,CAC/C,CAAC,CAAiC,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,EAAE;;IAAC,OAAA,CAAC;QACxD,KAAK,EAAE,MAAA,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,0CAAE,IAAI;KAClC,CAAC,CAAA;CAAA,CAAC,CAAA;AAEH,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,IAAI,EACJ,KAAK,EACL,GAAG,KAAK,EACmE;IAC3E,OAAO,oBAAC,kBAAkB,IAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,KAAM,KAAK,GAAI,CAAA;AACpE,CAAC","sourcesContent":["import * as React from 'react'\nimport { styled } from '@mui/material'\nimport MaterialIcon from './MaterialIcon'\nimport { Color } from '../types/mui-color'\n\nconst StyledMaterialIcon = styled(({ icon, ...props }: { icon: string }) => (\n <MaterialIcon {...props}>{icon}</MaterialIcon>\n))<{ color: Color; icon: string }>(({ theme, color }) => ({\n color: theme.palette[color]?.main,\n}))\n\nexport default function IconComponent({\n icon,\n color,\n ...props\n}: { color: Color; icon: string } & React.ComponentProps<typeof MaterialIcon>) {\n return <StyledMaterialIcon color={color} icon={icon} {...props} />\n}\n"]}
@@ -11,5 +11,5 @@ type ListProps = {
11
11
  };
12
12
  export declare const ListItem: import("@emotion/styled").StyledComponent<Omit<import("@mui/material").TypographyOwnProps & import("@mui/material/OverridableComponent").CommonProps & Omit<Omit<React.DetailedHTMLProps<React.HTMLAttributes<HTMLSpanElement>, HTMLSpanElement>, "ref"> & {
13
13
  ref?: ((instance: HTMLSpanElement | null) => void) | React.RefObject<HTMLSpanElement> | null | undefined;
14
- }, "className" | "p" | "style" | "children" | "classes" | "sx" | "color" | "height" | "width" | "display" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "order" | "overflow" | "visibility" | "align" | "top" | "right" | "bottom" | "left" | "border" | "borderTop" | "borderRight" | "borderBottom" | "borderLeft" | "borderColor" | "borderRadius" | "displayPrint" | "textOverflow" | "whiteSpace" | "flexBasis" | "flexDirection" | "flexWrap" | "justifyContent" | "alignItems" | "alignContent" | "flex" | "flexGrow" | "flexShrink" | "alignSelf" | "justifyItems" | "justifySelf" | "gap" | "columnGap" | "rowGap" | "gridColumn" | "gridRow" | "gridAutoFlow" | "gridAutoColumns" | "gridAutoRows" | "gridTemplateColumns" | "gridTemplateRows" | "gridTemplateAreas" | "gridArea" | "bgcolor" | "zIndex" | "position" | "boxShadow" | "maxWidth" | "minWidth" | "maxHeight" | "minHeight" | "boxSizing" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "margin" | "marginTop" | "marginRight" | "marginBottom" | "marginLeft" | "marginX" | "marginY" | "marginInline" | "marginInlineStart" | "marginInlineEnd" | "marginBlock" | "marginBlockStart" | "marginBlockEnd" | "padding" | "paddingTop" | "paddingRight" | "paddingBottom" | "paddingLeft" | "paddingX" | "paddingY" | "paddingInline" | "paddingInlineStart" | "paddingInlineEnd" | "paddingBlock" | "paddingBlockStart" | "paddingBlockEnd" | "typography" | "lineHeight" | "textAlign" | "textTransform" | "gutterBottom" | "noWrap" | "paragraph" | "variant" | "variantMapping">, "ref"> & import("@mui/system").MUIStyledCommonProps<Theme> & ListProps, {}, {}>;
14
+ }, "className" | "p" | "style" | "children" | "classes" | "sx" | "color" | "height" | "width" | "display" | "fontFamily" | "fontSize" | "fontStyle" | "fontWeight" | "letterSpacing" | "order" | "overflow" | "visibility" | "align" | "top" | "right" | "bottom" | "left" | "variant" | "gutterBottom" | "alignContent" | "alignItems" | "alignSelf" | "boxShadow" | "boxSizing" | "columnGap" | "flexBasis" | "flexDirection" | "flexGrow" | "flexShrink" | "flexWrap" | "gridAutoColumns" | "gridAutoFlow" | "gridAutoRows" | "gridTemplateAreas" | "gridTemplateColumns" | "gridTemplateRows" | "justifyContent" | "justifyItems" | "justifySelf" | "lineHeight" | "marginBlockEnd" | "marginBlockStart" | "marginBottom" | "marginInlineEnd" | "marginInlineStart" | "marginLeft" | "marginRight" | "marginTop" | "maxHeight" | "maxWidth" | "minHeight" | "minWidth" | "paddingBlockEnd" | "paddingBlockStart" | "paddingBottom" | "paddingInlineEnd" | "paddingInlineStart" | "paddingLeft" | "paddingRight" | "paddingTop" | "position" | "rowGap" | "textAlign" | "textOverflow" | "textTransform" | "whiteSpace" | "zIndex" | "border" | "borderBottom" | "borderColor" | "borderLeft" | "borderRadius" | "borderRight" | "borderTop" | "flex" | "gap" | "gridArea" | "gridColumn" | "gridRow" | "margin" | "marginBlock" | "marginInline" | "padding" | "paddingBlock" | "paddingInline" | "displayPrint" | "bgcolor" | "m" | "mt" | "mr" | "mb" | "ml" | "mx" | "my" | "pt" | "pr" | "pb" | "pl" | "px" | "py" | "marginX" | "marginY" | "paddingX" | "paddingY" | "typography" | "noWrap" | "paragraph" | "variantMapping">, "ref"> & import("@mui/system").MUIStyledCommonProps<Theme> & ListProps, {}, {}>;
15
15
  export {};
@@ -0,0 +1,2 @@
1
+ import * as React from 'react';
2
+ export default function MaterialIcon({ className, children, ...props }: React.ComponentProps<'i'>): React.JSX.Element;
@@ -0,0 +1,6 @@
1
+ import * as React from 'react';
2
+ import clsx from 'clsx';
3
+ export default function MaterialIcon({ className, children, ...props }) {
4
+ return (React.createElement("i", { className: clsx('material-icons', className), "aria-hidden": true, ...props }, children));
5
+ }
6
+ //# sourceMappingURL=MaterialIcon.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MaterialIcon.js","sourceRoot":"","sources":["../../src/components/MaterialIcon.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,IAAI,MAAM,MAAM,CAAA;AAEvB,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,EACnC,SAAS,EACT,QAAQ,EACR,GAAG,KAAK,EACkB;IAC1B,OAAO,CACL,2BAAG,SAAS,EAAE,IAAI,CAAC,gBAAgB,EAAE,SAAS,CAAC,0BAAkB,KAAK,IACnE,QAAQ,CACP,CACL,CAAA;AACH,CAAC","sourcesContent":["import * as React from 'react'\nimport clsx from 'clsx'\n\nexport default function MaterialIcon({\n className,\n children,\n ...props\n}: React.ComponentProps<'i'>) {\n return (\n <i className={clsx('material-icons', className)} aria-hidden {...props}>\n {children}\n </i>\n )\n}\n"]}
@@ -6,13 +6,14 @@ import useInfiniteScrollDataLoad from '../../hooks/useInfiniteScrollDataLoad';
6
6
  import useFormStoreTable from './table/useFormStoreTable';
7
7
  import { Box, Button, Grid } from '@mui/material';
8
8
  import { LoadingButton } from '@mui/lab';
9
- import { Settings as SettingsIcon, ReadMore as LoadMoreIcon, } from '@mui/icons-material';
10
9
  import useSubmissionIdValidationMessage, { validateIsUUID, } from '../../hooks/useSubmissionIdIsValid';
11
10
  import ErrorMessage from '../messages/ErrorMessage';
12
11
  import LoadingWithMessage from '../LoadingWithMessage';
13
12
  import NoResourcesYet from '../messages/NoResourcesYet';
14
13
  import FormStoreIcon from './display/FormStoreIcon';
15
14
  import { FormStoreTableContext } from './useFormStoreTableContext';
15
+ import MaterialIcon from '../MaterialIcon';
16
+ import IconComponent from '../IconComponent';
16
17
  const TABLE_PARAMETERS_FORM_STORE_KEY = 'REACT_TABLE_PARAMETERS_FORM_STORE';
17
18
  function getParamsFromLocalStorage() {
18
19
  const text = localStorage.getItem(TABLE_PARAMETERS_FORM_STORE_KEY);
@@ -105,7 +106,7 @@ export function FormStoreTableProvider({ form, children, }) {
105
106
  });
106
107
  return (React.createElement(FormStoreTableContext.Provider, { value: formStoreTable },
107
108
  children,
108
- formStoreTable.visibleColumns.length ? (React.createElement(React.Fragment, null, !formStoreRecords.length && !isLoading && !loadError && (React.createElement(NoResourcesYet, { IconComponent: FormStoreIcon, title: "No Records Found..." }, "There are no Submissions matching your filters.")))) : (React.createElement(NoResourcesYet, { IconComponent: SettingsIcon, title: "No Columns Visible", gutterBottom: true }, "It looks like you have hidden all of the available columns. Please enable at least one column to view submissions.")),
109
+ formStoreTable.visibleColumns.length ? (React.createElement(React.Fragment, null, !formStoreRecords.length && !isLoading && !loadError && (React.createElement(NoResourcesYet, { IconComponent: FormStoreIcon, title: "No Records Found..." }, "There are no Submissions matching your filters.")))) : (React.createElement(NoResourcesYet, { IconComponent: (props) => (React.createElement(IconComponent, { ...props, icon: "settings" })), title: "No Columns Visible", gutterBottom: true }, "It looks like you have hidden all of the available columns. Please enable at least one column to view submissions.")),
109
110
  isLoading === 'INITIAL' && (React.createElement("div", { className: "ob-form-store-loading-initial" },
110
111
  React.createElement(LoadingWithMessage, { message: "Loading initial records..." }))),
111
112
  loadError && (React.createElement(React.Fragment, null,
@@ -114,7 +115,7 @@ export function FormStoreTableProvider({ form, children, }) {
114
115
  React.createElement(Button, { className: "ob-form-store-try-again-button", variant: "outlined", color: "primary", onClick: () => onTryAgain() }, "Try Again")))),
115
116
  !!nextOffset && !loadError && isLoading !== 'INITIAL' && (React.createElement(Box, { padding: 4, className: "ob-form-store-load-more-button-container" },
116
117
  React.createElement(Grid, { container: true, justifyContent: "center" },
117
- React.createElement(LoadingButton, { className: "ob-form-store-load-more-button", variant: "outlined", color: "primary", onClick: () => onTryAgain(nextOffset), loading: isLoading === 'MORE', size: "large", loadingPosition: "start", startIcon: React.createElement(LoadMoreIcon, null), classes: {
118
+ React.createElement(LoadingButton, { className: "ob-form-store-load-more-button", variant: "outlined", color: "primary", onClick: () => onTryAgain(nextOffset), loading: isLoading === 'MORE', size: "large", loadingPosition: "start", startIcon: React.createElement(MaterialIcon, null, "read_more"), classes: {
118
119
  loadingIndicator: 'ob-form-store-loading-more-indicator',
119
120
  } }, "Load More"))))));
120
121
  }
@@ -1 +1 @@
1
- {"version":3,"file":"FormStoreTableProvider.js","sourceRoot":"","sources":["../../../src/components/formStore/FormStoreTableProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAC1D,OAAO,WAAW,MAAM,cAAc,CAAA;AAEtC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,yBAAyB,MAAM,uCAAuC,CAAA;AAC7E,OAAO,iBAAiB,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,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AU,CAAC,EACrC,OAAO,EAAE,SAAS,KAAK,MAAM,EAC7B,IAAI,EAAC,OAAO,EACZ,eAAe,EAAC,OAAO,EACvB,SAAS,EAAE,oBAAC,YAAY,OAAG,EAC3B,OAAO,EAAE;wBACP,gBAAgB,EAAE,sCAAsC;qBACzD,gBAGa,CACX,CACH,CACP,CAC8B,CAClC,CAAA;AACH,CAAC","sourcesContent":["import * as React from 'react'\nimport { useHistory, useLocation } from 'react-router-dom'\nimport querystring from 'query-string'\nimport { FormStoreRecord } from '@oneblink/types/typescript/submissions'\nimport { formStoreService } from '@oneblink/apps'\nimport useInfiniteScrollDataLoad from '../../hooks/useInfiniteScrollDataLoad'\nimport useFormStoreTable from './table/useFormStoreTable'\nimport { Box, Button, Grid } from '@mui/material'\nimport { LoadingButton } from '@mui/lab'\nimport {\n Settings as SettingsIcon,\n ReadMore as LoadMoreIcon,\n} from '@mui/icons-material'\nimport { FormTypes } from '@oneblink/types'\nimport useSubmissionIdValidationMessage, {\n validateIsUUID,\n} from '../../hooks/useSubmissionIdIsValid'\nimport ErrorMessage from '../messages/ErrorMessage'\nimport LoadingWithMessage from '../LoadingWithMessage'\nimport NoResourcesYet from '../messages/NoResourcesYet'\nimport FormStoreIcon from './display/FormStoreIcon'\nimport { FormStoreTableContext } from './useFormStoreTableContext'\n\nconst TABLE_PARAMETERS_FORM_STORE_KEY = 'REACT_TABLE_PARAMETERS_FORM_STORE'\n\nfunction getParamsFromLocalStorage() {\n const text = localStorage.getItem(TABLE_PARAMETERS_FORM_STORE_KEY)\n if (text) {\n return JSON.parse(text)\n }\n}\n\nexport function FormStoreTableProvider({\n form,\n children,\n}: {\n form: FormTypes.Form\n children: React.ReactNode\n}) {\n const history = useHistory()\n const location = useLocation()\n const {\n isLoading,\n loadError,\n records: formStoreRecords,\n onTryAgain,\n onRefresh,\n filters: parameters,\n onChangeFilters: onChangeParameters,\n nextOffset,\n } = useInfiniteScrollDataLoad<\n formStoreService.FormStoreParameters,\n FormStoreRecord\n >({\n limit: 50,\n isManual: true,\n debounceSearchMs: 1000,\n onDefaultFilters: React.useCallback((query) => {\n let defaultParameters: formStoreService.FormStoreParameters = {}\n const localStorageParams = getParamsFromLocalStorage()\n if (\n localStorageParams &&\n Object(localStorageParams) === localStorageParams\n ) {\n defaultParameters = localStorageParams\n }\n try {\n if (typeof query.parameters === 'string') {\n //allow qs params to override local storage\n defaultParameters = {\n ...defaultParameters,\n ...JSON.parse(query.parameters),\n }\n }\n } catch (error) {\n console.warn('Could not parse filter as JSON', error)\n }\n if (!defaultParameters.sorting) {\n defaultParameters.sorting = [\n { property: 'dateTimeSubmitted', direction: 'descending' },\n ]\n }\n return defaultParameters\n }, []),\n onSearch: React.useCallback(\n async (currentParameters, paging, abortSignal) => {\n // Exclude all search parameters if searching\n // for a specific submission using an identifier\n const filters = currentParameters.filters?.submissionId\n ? {\n submissionId: currentParameters.filters.submissionId,\n }\n : currentParameters.filters\n const result = await formStoreService.searchFormStoreRecords(\n {\n ...currentParameters,\n paging,\n formId: form.id,\n filters,\n },\n abortSignal,\n )\n return {\n records: result.formStoreRecords,\n meta: result.meta,\n }\n },\n [form.id],\n ),\n onValidateFilters: React.useCallback(\n (currentParameters: formStoreService.FormStoreParameters) => {\n return validateIsUUID(currentParameters.filters?.submissionId?.$eq)\n },\n [],\n ),\n })\n\n React.useEffect(() => {\n const currentSearch = querystring.parse(location.search)\n history.replace({\n search: querystring.stringify({\n ...currentSearch,\n parameters: JSON.stringify(parameters),\n }),\n })\n }, [history, location.search, parameters])\n\n const submissionIdValidationMessage = useSubmissionIdValidationMessage(\n parameters.filters?.submissionId?.$eq,\n )\n\n React.useEffect(() => {\n const paramsToStore = {\n unwindRepeatableSets: parameters?.unwindRepeatableSets,\n }\n localStorage.setItem(\n TABLE_PARAMETERS_FORM_STORE_KEY,\n JSON.stringify(paramsToStore),\n )\n }, [parameters?.unwindRepeatableSets])\n\n const formStoreTable = useFormStoreTable({\n formStoreRecords,\n parameters,\n onChangeParameters,\n submissionIdValidationMessage,\n form,\n onRefresh,\n })\n\n return (\n <FormStoreTableContext.Provider value={formStoreTable}>\n {children}\n {formStoreTable.visibleColumns.length ? (\n <>\n {!formStoreRecords.length && !isLoading && !loadError && (\n <NoResourcesYet\n IconComponent={FormStoreIcon}\n title=\"No Records Found...\"\n >\n There are no Submissions matching your filters.\n </NoResourcesYet>\n )}\n </>\n ) : (\n <NoResourcesYet\n IconComponent={SettingsIcon}\n title=\"No Columns Visible\"\n gutterBottom\n >\n It looks like you have hidden all of the available columns. Please\n enable at least one column to view submissions.\n </NoResourcesYet>\n )}\n\n {isLoading === 'INITIAL' && (\n <div className=\"ob-form-store-loading-initial\">\n <LoadingWithMessage message=\"Loading initial records...\" />\n </div>\n )}\n\n {loadError && (\n <>\n <ErrorMessage\n title=\"Error Retrieving Submissions\"\n gutterBottom\n gutterTop\n >\n {loadError.message}\n </ErrorMessage>\n <Grid container justifyContent=\"center\">\n <Button\n className=\"ob-form-store-try-again-button\"\n variant=\"outlined\"\n color=\"primary\"\n onClick={() => onTryAgain()}\n >\n Try Again\n </Button>\n </Grid>\n </>\n )}\n\n {!!nextOffset && !loadError && isLoading !== 'INITIAL' && (\n <Box padding={4} className=\"ob-form-store-load-more-button-container\">\n <Grid container justifyContent=\"center\">\n <LoadingButton\n className=\"ob-form-store-load-more-button\"\n variant=\"outlined\"\n color=\"primary\"\n onClick={() => onTryAgain(nextOffset)}\n loading={isLoading === 'MORE'}\n size=\"large\"\n loadingPosition=\"start\"\n startIcon={<LoadMoreIcon />}\n classes={{\n loadingIndicator: 'ob-form-store-loading-more-indicator',\n }}\n >\n Load More\n </LoadingButton>\n </Grid>\n </Box>\n )}\n </FormStoreTableContext.Provider>\n )\n}\n"]}
1
+ {"version":3,"file":"FormStoreTableProvider.js","sourceRoot":"","sources":["../../../src/components/formStore/FormStoreTableProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,UAAU,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AC,SAAS,IAAI,SAAS,KAAK,SAAS,IAAI,CACxD,oBAAC,GAAG,IAAC,OAAO,EAAE,CAAC,EAAE,SAAS,EAAC,0CAA0C;YACnE,oBAAC,IAAI,IAAC,SAAS,QAAC,cAAc,EAAC,QAAQ;gBACrC,oBAAC,aAAa,IACZ,SAAS,EAAC,gCAAgC,EAC1C,OAAO,EAAC,UAAU,EAClB,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,GAAG,EAAE,CAAC,UAAU,CAAC,UAAU,CAAC,EACrC,OAAO,EAAE,SAAS,KAAK,MAAM,EAC7B,IAAI,EAAC,OAAO,EACZ,eAAe,EAAC,OAAO,EACvB,SAAS,EAAE,oBAAC,YAAY,oBAAyB,EACjD,OAAO,EAAE;wBACP,gBAAgB,EAAE,sCAAsC;qBACzD,gBAGa,CACX,CACH,CACP,CAC8B,CAClC,CAAA;AACH,CAAC","sourcesContent":["import * as React from 'react'\nimport { useHistory, useLocation } from 'react-router-dom'\nimport querystring from 'query-string'\nimport { FormStoreRecord } from '@oneblink/types/typescript/submissions'\nimport { formStoreService } from '@oneblink/apps'\nimport useInfiniteScrollDataLoad from '../../hooks/useInfiniteScrollDataLoad'\nimport useFormStoreTable from './table/useFormStoreTable'\nimport { Box, Button, Grid } from '@mui/material'\nimport { LoadingButton } from '@mui/lab'\nimport { FormTypes } from '@oneblink/types'\nimport useSubmissionIdValidationMessage, {\n validateIsUUID,\n} from '../../hooks/useSubmissionIdIsValid'\nimport ErrorMessage from '../messages/ErrorMessage'\nimport LoadingWithMessage from '../LoadingWithMessage'\nimport NoResourcesYet from '../messages/NoResourcesYet'\nimport FormStoreIcon from './display/FormStoreIcon'\nimport { FormStoreTableContext } from './useFormStoreTableContext'\nimport MaterialIcon from '../MaterialIcon'\nimport IconComponent from '../IconComponent'\n\nconst TABLE_PARAMETERS_FORM_STORE_KEY = 'REACT_TABLE_PARAMETERS_FORM_STORE'\n\nfunction getParamsFromLocalStorage() {\n const text = localStorage.getItem(TABLE_PARAMETERS_FORM_STORE_KEY)\n if (text) {\n return JSON.parse(text)\n }\n}\n\nexport function FormStoreTableProvider({\n form,\n children,\n}: {\n form: FormTypes.Form\n children: React.ReactNode\n}) {\n const history = useHistory()\n const location = useLocation()\n const {\n isLoading,\n loadError,\n records: formStoreRecords,\n onTryAgain,\n onRefresh,\n filters: parameters,\n onChangeFilters: onChangeParameters,\n nextOffset,\n } = useInfiniteScrollDataLoad<\n formStoreService.FormStoreParameters,\n FormStoreRecord\n >({\n limit: 50,\n isManual: true,\n debounceSearchMs: 1000,\n onDefaultFilters: React.useCallback((query) => {\n let defaultParameters: formStoreService.FormStoreParameters = {}\n const localStorageParams = getParamsFromLocalStorage()\n if (\n localStorageParams &&\n Object(localStorageParams) === localStorageParams\n ) {\n defaultParameters = localStorageParams\n }\n try {\n if (typeof query.parameters === 'string') {\n //allow qs params to override local storage\n defaultParameters = {\n ...defaultParameters,\n ...JSON.parse(query.parameters),\n }\n }\n } catch (error) {\n console.warn('Could not parse filter as JSON', error)\n }\n if (!defaultParameters.sorting) {\n defaultParameters.sorting = [\n { property: 'dateTimeSubmitted', direction: 'descending' },\n ]\n }\n return defaultParameters\n }, []),\n onSearch: React.useCallback(\n async (currentParameters, paging, abortSignal) => {\n // Exclude all search parameters if searching\n // for a specific submission using an identifier\n const filters = currentParameters.filters?.submissionId\n ? {\n submissionId: currentParameters.filters.submissionId,\n }\n : currentParameters.filters\n const result = await formStoreService.searchFormStoreRecords(\n {\n ...currentParameters,\n paging,\n formId: form.id,\n filters,\n },\n abortSignal,\n )\n return {\n records: result.formStoreRecords,\n meta: result.meta,\n }\n },\n [form.id],\n ),\n onValidateFilters: React.useCallback(\n (currentParameters: formStoreService.FormStoreParameters) => {\n return validateIsUUID(currentParameters.filters?.submissionId?.$eq)\n },\n [],\n ),\n })\n\n React.useEffect(() => {\n const currentSearch = querystring.parse(location.search)\n history.replace({\n search: querystring.stringify({\n ...currentSearch,\n parameters: JSON.stringify(parameters),\n }),\n })\n }, [history, location.search, parameters])\n\n const submissionIdValidationMessage = useSubmissionIdValidationMessage(\n parameters.filters?.submissionId?.$eq,\n )\n\n React.useEffect(() => {\n const paramsToStore = {\n unwindRepeatableSets: parameters?.unwindRepeatableSets,\n }\n localStorage.setItem(\n TABLE_PARAMETERS_FORM_STORE_KEY,\n JSON.stringify(paramsToStore),\n )\n }, [parameters?.unwindRepeatableSets])\n\n const formStoreTable = useFormStoreTable({\n formStoreRecords,\n parameters,\n onChangeParameters,\n submissionIdValidationMessage,\n form,\n onRefresh,\n })\n\n return (\n <FormStoreTableContext.Provider value={formStoreTable}>\n {children}\n {formStoreTable.visibleColumns.length ? (\n <>\n {!formStoreRecords.length && !isLoading && !loadError && (\n <NoResourcesYet\n IconComponent={FormStoreIcon}\n title=\"No Records Found...\"\n >\n There are no Submissions matching your filters.\n </NoResourcesYet>\n )}\n </>\n ) : (\n <NoResourcesYet\n IconComponent={(props) => (\n <IconComponent {...props} icon=\"settings\" />\n )}\n title=\"No Columns Visible\"\n gutterBottom\n >\n It looks like you have hidden all of the available columns. Please\n enable at least one column to view submissions.\n </NoResourcesYet>\n )}\n\n {isLoading === 'INITIAL' && (\n <div className=\"ob-form-store-loading-initial\">\n <LoadingWithMessage message=\"Loading initial records...\" />\n </div>\n )}\n\n {loadError && (\n <>\n <ErrorMessage\n title=\"Error Retrieving Submissions\"\n gutterBottom\n gutterTop\n >\n {loadError.message}\n </ErrorMessage>\n <Grid container justifyContent=\"center\">\n <Button\n className=\"ob-form-store-try-again-button\"\n variant=\"outlined\"\n color=\"primary\"\n onClick={() => onTryAgain()}\n >\n Try Again\n </Button>\n </Grid>\n </>\n )}\n\n {!!nextOffset && !loadError && isLoading !== 'INITIAL' && (\n <Box padding={4} className=\"ob-form-store-load-more-button-container\">\n <Grid container justifyContent=\"center\">\n <LoadingButton\n className=\"ob-form-store-load-more-button\"\n variant=\"outlined\"\n color=\"primary\"\n onClick={() => onTryAgain(nextOffset)}\n loading={isLoading === 'MORE'}\n size=\"large\"\n loadingPosition=\"start\"\n startIcon={<MaterialIcon>read_more</MaterialIcon>}\n classes={{\n loadingIndicator: 'ob-form-store-loading-more-indicator',\n }}\n >\n Load More\n </LoadingButton>\n </Grid>\n </Box>\n )}\n </FormStoreTableContext.Provider>\n )\n}\n"]}
@@ -1,13 +1,13 @@
1
1
  import * as React from 'react';
2
2
  import { Button } from '@mui/material';
3
- import { FilterList as FilterIcon } from '@mui/icons-material';
4
3
  import useFormStoreTableContext from './useFormStoreTableContext';
4
+ import MaterialIcon from '../MaterialIcon';
5
5
  function OneBlinkFormStoreClearFiltersButton(props) {
6
6
  const { onChangeParameters, parameters } = useFormStoreTableContext();
7
7
  const isDisabled = React.useMemo(() => {
8
8
  return !parameters.filters || !Object.keys(parameters.filters).length;
9
9
  }, [parameters.filters]);
10
- return (React.createElement(Button, { className: "ob-form-store-clear-filters-button", startIcon: React.createElement(FilterIcon, null), disabled: isDisabled, onClick: () => {
10
+ return (React.createElement(Button, { className: "ob-form-store-clear-filters-button", startIcon: React.createElement(MaterialIcon, null, "filter_list"), disabled: isDisabled, onClick: () => {
11
11
  onChangeParameters((currentParameters) => ({
12
12
  ...currentParameters,
13
13
  filters: undefined,
@@ -1 +1 @@
1
- {"version":3,"file":"OneBlinkFormStoreClearFiltersButton.js","sourceRoot":"","sources":["../../../src/components/formStore/OneBlinkFormStoreClearFiltersButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,UAAU,IAAI,UAAU,EAAE,MAAM,qBAAqB,CAAA;AAC9D,OAAO,wBAAwB,MAAM,4BAA4B,CAAA;AAEjE,SAAS,mCAAmC,CAC1C,KAA0C;IAE1C,MAAM,EAAE,kBAAkB,EAAE,UAAU,EAAE,GAAG,wBAAwB,EAAE,CAAA;IACrE,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACpC,OAAO,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,MAAM,CAAA;IACvE,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAA;IACxB,OAAO,CACL,oBAAC,MAAM,IACL,SAAS,EAAC,oCAAoC,EAC9C,SAAS,EAAE,oBAAC,UAAU,OAAG,EACzB,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,GAAG,EAAE;YACZ,kBAAkB,CAChB,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;gBACtB,GAAG,iBAAiB;gBACpB,OAAO,EAAE,SAAS;aACnB,CAAC,EACF,KAAK,CACN,CAAA;QACH,CAAC;QACD,kDAAkD;QAClD,QAAQ,EAAE,0DAAkB,KACxB,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,eAAe,KAAK,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport { Button } from '@mui/material'\nimport { FilterList as FilterIcon } from '@mui/icons-material'\nimport useFormStoreTableContext from './useFormStoreTableContext'\n\nfunction OneBlinkFormStoreClearFiltersButton(\n props: React.ComponentProps<typeof Button>,\n) {\n const { onChangeParameters, parameters } = useFormStoreTableContext()\n const isDisabled = React.useMemo(() => {\n return !parameters.filters || !Object.keys(parameters.filters).length\n }, [parameters.filters])\n return (\n <Button\n className=\"ob-form-store-clear-filters-button\"\n startIcon={<FilterIcon />}\n disabled={isDisabled}\n onClick={() => {\n onChangeParameters(\n (currentParameters) => ({\n ...currentParameters,\n filters: undefined,\n }),\n false,\n )\n }}\n // eslint-disable-next-line react/no-children-prop\n children={<>Clear Filters</>}\n {...props}\n />\n )\n}\n\n/**\n * @param props\n * @returns\n * @group Components\n */\nexport default React.memo(OneBlinkFormStoreClearFiltersButton)\n"]}
1
+ {"version":3,"file":"OneBlinkFormStoreClearFiltersButton.js","sourceRoot":"","sources":["../../../src/components/formStore/OneBlinkFormStoreClearFiltersButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,wBAAwB,MAAM,4BAA4B,CAAA;AACjE,OAAO,YAAY,MAAM,iBAAiB,CAAA;AAE1C,SAAS,mCAAmC,CAC1C,KAA0C;IAE1C,MAAM,EAAE,kBAAkB,EAAE,UAAU,EAAE,GAAG,wBAAwB,EAAE,CAAA;IACrE,MAAM,UAAU,GAAG,KAAK,CAAC,OAAO,CAAC,GAAG,EAAE;QACpC,OAAO,CAAC,UAAU,CAAC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,MAAM,CAAA;IACvE,CAAC,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,CAAA;IACxB,OAAO,CACL,oBAAC,MAAM,IACL,SAAS,EAAC,oCAAoC,EAC9C,SAAS,EAAE,oBAAC,YAAY,sBAA2B,EACnD,QAAQ,EAAE,UAAU,EACpB,OAAO,EAAE,GAAG,EAAE;YACZ,kBAAkB,CAChB,CAAC,iBAAiB,EAAE,EAAE,CAAC,CAAC;gBACtB,GAAG,iBAAiB;gBACpB,OAAO,EAAE,SAAS;aACnB,CAAC,EACF,KAAK,CACN,CAAA;QACH,CAAC;QACD,kDAAkD;QAClD,QAAQ,EAAE,0DAAkB,KACxB,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,eAAe,KAAK,CAAC,IAAI,CAAC,mCAAmC,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport { Button } from '@mui/material'\nimport useFormStoreTableContext from './useFormStoreTableContext'\nimport MaterialIcon from '../MaterialIcon'\n\nfunction OneBlinkFormStoreClearFiltersButton(\n props: React.ComponentProps<typeof Button>,\n) {\n const { onChangeParameters, parameters } = useFormStoreTableContext()\n const isDisabled = React.useMemo(() => {\n return !parameters.filters || !Object.keys(parameters.filters).length\n }, [parameters.filters])\n return (\n <Button\n className=\"ob-form-store-clear-filters-button\"\n startIcon={<MaterialIcon>filter_list</MaterialIcon>}\n disabled={isDisabled}\n onClick={() => {\n onChangeParameters(\n (currentParameters) => ({\n ...currentParameters,\n filters: undefined,\n }),\n false,\n )\n }}\n // eslint-disable-next-line react/no-children-prop\n children={<>Clear Filters</>}\n {...props}\n />\n )\n}\n\n/**\n * @param props\n * @returns\n * @group Components\n */\nexport default React.memo(OneBlinkFormStoreClearFiltersButton)\n"]}
@@ -1,9 +1,9 @@
1
1
  import * as React from 'react';
2
2
  import { Alert, AlertTitle, Box, Button, Checkbox, Collapse, Dialog, DialogActions, DialogContent, DialogTitle, Divider, FormControlLabel, FormGroup, Grid, IconButton, Typography, } from '@mui/material';
3
- import { Help, Settings as SettingsIcon } from '@mui/icons-material';
4
3
  import useBooleanState from '../../hooks/useBooleanState';
5
4
  import useFormStoreTableContext from './useFormStoreTableContext';
6
5
  import { ListItem, UnorderedList } from '../Lists';
6
+ import MaterialIcon from '../MaterialIcon';
7
7
  function OneBlinkFormStoreColumnsButton(props) {
8
8
  const { getToggleHideAllColumnsProps, allColumns, parameters, onChangeParameters, } = useFormStoreTableContext();
9
9
  const [isConfiguringColumns, showColumnConfiguration, hideColumnConfiguration,] = useBooleanState(false);
@@ -12,7 +12,7 @@ function OneBlinkFormStoreColumnsButton(props) {
12
12
  const hasRepeatableSets = React.useMemo(() => parameters.unwindRepeatableSets ||
13
13
  allColumns.some((c) => c.formElementType === 'repeatableSet'), [allColumns, parameters.unwindRepeatableSets]);
14
14
  return (React.createElement(React.Fragment, null,
15
- React.createElement(Button, { className: "ob-form-store-columns-button", startIcon: React.createElement(SettingsIcon, null), onClick: showColumnConfiguration,
15
+ React.createElement(Button, { className: "ob-form-store-columns-button", startIcon: () => React.createElement(MaterialIcon, null, "settings"), onClick: showColumnConfiguration,
16
16
  // eslint-disable-next-line react/no-children-prop
17
17
  children: React.createElement(React.Fragment, null, "Columns"), ...props }),
18
18
  React.createElement(Dialog, { open: isConfiguringColumns, maxWidth: "sm", fullWidth: true, onClose: hideColumnConfiguration },
@@ -38,7 +38,7 @@ function OneBlinkFormStoreColumnsButton(props) {
38
38
  }, label: "Output a row per repeatable set entry" }))),
39
39
  React.createElement(Grid, { item: true },
40
40
  React.createElement(IconButton, { onClick: toggleHelp },
41
- React.createElement(Help, null)))),
41
+ React.createElement(MaterialIcon, null, "help")))),
42
42
  React.createElement(Collapse, { in: isHelpOpen },
43
43
  React.createElement(Alert, { severity: "info" },
44
44
  React.createElement(AlertTitle, null, "When this setting is enabled:"),
@@ -1 +1 @@
1
- {"version":3,"file":"OneBlinkFormStoreColumnsButton.js","sourceRoot":"","sources":["../../../src/components/formStore/OneBlinkFormStoreColumnsButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,KAAK,EACL,UAAU,EACV,GAAG,EACH,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,aAAa,EACb,aAAa,EACb,WAAW,EACX,OAAO,EACP,gBAAgB,EAChB,SAAS,EACT,IAAI,EACJ,UAAU,EACV,UAAU,GACX,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,IAAI,EAAE,QAAQ,IAAI,YAAY,EAAE,MAAM,qBAAqB,CAAA;AACpE,OAAO,eAAe,MAAM,6BAA6B,CAAA;AACzD,OAAO,wBAAwB,MAAM,4BAA4B,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAElD,SAAS,8BAA8B,CACrC,KAA0C;IAE1C,MAAM,EACJ,4BAA4B,EAC5B,UAAU,EACV,UAAU,EACV,kBAAkB,GACnB,GAAG,wBAAwB,EAAE,CAAA;IAC9B,MAAM,CACJ,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACxB,GAAG,eAAe,CAAC,KAAK,CA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AC,CAAC,CACQ,CACE;YAChB,oBAAC,aAAa;gBACZ,oBAAC,MAAM,IACL,OAAO,EAAE,uBAAuB,EAChC,KAAK,EAAC,SAAS,EACf,OAAO,EAAC,WAAW,WAGZ,CACK,CACT,CACR,CACJ,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,eAAe,KAAK,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport {\n Alert,\n AlertTitle,\n Box,\n Button,\n Checkbox,\n Collapse,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n Divider,\n FormControlLabel,\n FormGroup,\n Grid,\n IconButton,\n Typography,\n} from '@mui/material'\nimport { Help, Settings as SettingsIcon } from '@mui/icons-material'\nimport useBooleanState from '../../hooks/useBooleanState'\nimport useFormStoreTableContext from './useFormStoreTableContext'\nimport { ListItem, UnorderedList } from '../Lists'\n\nfunction OneBlinkFormStoreColumnsButton(\n props: React.ComponentProps<typeof Button>,\n) {\n const {\n getToggleHideAllColumnsProps,\n allColumns,\n parameters,\n onChangeParameters,\n } = useFormStoreTableContext()\n const [\n isConfiguringColumns,\n showColumnConfiguration,\n hideColumnConfiguration,\n ] = useBooleanState(false)\n const [isHelpOpen, , , toggleHelp] = useBooleanState(false)\n\n const toggleHideAllColumnsProps = getToggleHideAllColumnsProps()\n\n const hasRepeatableSets = React.useMemo(\n () =>\n parameters.unwindRepeatableSets ||\n allColumns.some((c) => c.formElementType === 'repeatableSet'),\n [allColumns, parameters.unwindRepeatableSets],\n )\n\n return (\n <>\n <Button\n className=\"ob-form-store-columns-button\"\n startIcon={<SettingsIcon />}\n onClick={showColumnConfiguration}\n // eslint-disable-next-line react/no-children-prop\n children={<>Columns</>}\n {...props}\n />\n <Dialog\n open={isConfiguringColumns}\n maxWidth=\"sm\"\n fullWidth\n onClose={hideColumnConfiguration}\n >\n <DialogTitle>Column Configuration</DialogTitle>\n <DialogContent dividers>\n {hasRepeatableSets && (\n <>\n <Grid container>\n <Grid item>\n <FormGroup>\n <FormControlLabel\n control={\n <Checkbox checked={!!parameters.unwindRepeatableSets} />\n }\n onChange={(e, checked) => {\n onChangeParameters(\n (currentParameters) => ({\n ...currentParameters,\n sorting: checked\n ? currentParameters.sorting\n : [\n {\n property: 'dateTimeSubmitted',\n direction: 'descending',\n },\n ],\n unwindRepeatableSets: checked,\n }),\n false,\n )\n }}\n label=\"Output a row per repeatable set entry\"\n />\n </FormGroup>\n </Grid>\n <Grid item>\n <IconButton onClick={toggleHelp}>\n <Help />\n </IconButton>\n </Grid>\n </Grid>\n <Collapse in={isHelpOpen}>\n <Alert severity=\"info\">\n <AlertTitle>When this setting is enabled:</AlertTitle>\n <UnorderedList>\n <ListItem>\n Repeatable set columns will be expanded and create\n duplicate rows per entry\n </ListItem>\n <ListItem>\n Columns inside repeatable set entries can be sorted and\n filtered\n </ListItem>\n <ListItem>\n Columns inside repeatable set entries will be included in\n the CSV download\n </ListItem>\n </UnorderedList>\n </Alert>\n </Collapse>\n <Box marginY={2}>\n <Divider />\n </Box>\n </>\n )}\n <FormGroup>\n <FormControlLabel\n control={\n <Checkbox\n {...toggleHideAllColumnsProps}\n indeterminate={!!toggleHideAllColumnsProps.indeterminate}\n />\n }\n label={<b>Toggle All</b>}\n />\n {allColumns.map((column) => {\n return (\n <React.Fragment key={column.id}>\n <FormControlLabel\n control={<Checkbox {...column.getToggleHiddenProps()} />}\n label={\n <>\n {column.headerText}\n {column.tooltip && (\n <Typography component=\"span\" color=\"textSecondary\">\n {' '}\n ({column.tooltip})\n </Typography>\n )}\n </>\n }\n />\n </React.Fragment>\n )\n })}\n </FormGroup>\n </DialogContent>\n <DialogActions>\n <Button\n onClick={hideColumnConfiguration}\n color=\"primary\"\n variant=\"contained\"\n >\n Done\n </Button>\n </DialogActions>\n </Dialog>\n </>\n )\n}\n\n/**\n * @param props\n * @returns\n * @group Components\n */\nexport default React.memo(OneBlinkFormStoreColumnsButton)\n"]}
1
+ {"version":3,"file":"OneBlinkFormStoreColumnsButton.js","sourceRoot":"","sources":["../../../src/components/formStore/OneBlinkFormStoreColumnsButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,KAAK,EACL,UAAU,EACV,GAAG,EACH,MAAM,EACN,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,aAAa,EACb,aAAa,EACb,WAAW,EACX,OAAO,EACP,gBAAgB,EAChB,SAAS,EACT,IAAI,EACJ,UAAU,EACV,UAAU,GACX,MAAM,eAAe,CAAA;AACtB,OAAO,eAAe,MAAM,6BAA6B,CAAA;AACzD,OAAO,wBAAwB,MAAM,4BAA4B,CAAA;AACjE,OAAO,EAAE,QAAQ,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AAClD,OAAO,YAAY,MAAM,iBAAiB,CAAA;AAE1C,SAAS,8BAA8B,CACrC,KAA0C;IAE1C,MAAM,EACJ,4BAA4B,EAC5B,UAAU,EACV,UAAU,EACV,kBAAkB,GACnB,GAAG,wBAAwB,EAAE,CAAA;IAC9B,MAAM,CACJ,oBAAoB,EACpB,uBAAuB,EACvB,uBAAuB,EACxB,GAAG,eAAe,CAAC,KAAK,CAAC,CAAA;IAC1B,MAAM,CAAC,UAAU,EAAE,AAAD,EAAG,AAAD,EAAG,UAAU,CAAC,GAAG,eAAe,CAAC,KAAK,CAAC,CAAA;IAE3D,MAAM,yBAAyB,GAAG,4BAA4B,EAAE,CAAA;IAEhE,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,CACrC,GAAG,EAAE,CACH,UAAU,CAAC,oBAAoB;QAC/B,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,eAAe,KAAK,eAAe,CAAC,EAC/D,CAAC,UAAU,EAAE,UAAU,CAAC,oBAAoB,CAAC,CAC9C,CAAA;IAED,OAAO,CACL;QACE,oBAAC,MAAM,IACL,SAAS,EAAC,8BAA8B,EACxC,SAAS,EAAE,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2EAGE;gCACX,oBAAC,QAAQ,qFAGE,CACG,CACV,CACC;oBACX,oBAAC,GAAG,IAAC,OAAO,EAAE,CAAC;wBACb,oBAAC,OAAO,OAAG,CACP,CACL,CACJ;gBACD,oBAAC,SAAS;oBACR,oBAAC,gBAAgB,IACf,OAAO,EACL,oBAAC,QAAQ,OACH,yBAAyB,EAC7B,aAAa,EAAE,CAAC,CAAC,yBAAyB,CAAC,aAAa,GACxD,EAEJ,KAAK,EAAE,4CAAiB,GACxB;oBACD,UAAU,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;wBACzB,OAAO,CACL,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,MAAM,CAAC,EAAE;4BAC5B,oBAAC,gBAAgB,IACf,OAAO,EAAE,oBAAC,QAAQ,OAAK,MAAM,CAAC,oBAAoB,EAAE,GAAI,EACxD,KAAK,EACH;oCACG,MAAM,CAAC,UAAU;oCACjB,MAAM,CAAC,OAAO,IAAI,CACjB,oBAAC,UAAU,IAAC,SAAS,EAAC,MAAM,EAAC,KAAK,EAAC,eAAe;wCAC/C,GAAG;;wCACF,MAAM,CAAC,OAAO;4CACL,CACd,CACA,GAEL,CACa,CAClB,CAAA;oBACH,CAAC,CAAC,CACQ,CACE;YAChB,oBAAC,aAAa;gBACZ,oBAAC,MAAM,IACL,OAAO,EAAE,uBAAuB,EAChC,KAAK,EAAC,SAAS,EACf,OAAO,EAAC,WAAW,WAGZ,CACK,CACT,CACR,CACJ,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,eAAe,KAAK,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport {\n Alert,\n AlertTitle,\n Box,\n Button,\n Checkbox,\n Collapse,\n Dialog,\n DialogActions,\n DialogContent,\n DialogTitle,\n Divider,\n FormControlLabel,\n FormGroup,\n Grid,\n IconButton,\n Typography,\n} from '@mui/material'\nimport useBooleanState from '../../hooks/useBooleanState'\nimport useFormStoreTableContext from './useFormStoreTableContext'\nimport { ListItem, UnorderedList } from '../Lists'\nimport MaterialIcon from '../MaterialIcon'\n\nfunction OneBlinkFormStoreColumnsButton(\n props: React.ComponentProps<typeof Button>,\n) {\n const {\n getToggleHideAllColumnsProps,\n allColumns,\n parameters,\n onChangeParameters,\n } = useFormStoreTableContext()\n const [\n isConfiguringColumns,\n showColumnConfiguration,\n hideColumnConfiguration,\n ] = useBooleanState(false)\n const [isHelpOpen, , , toggleHelp] = useBooleanState(false)\n\n const toggleHideAllColumnsProps = getToggleHideAllColumnsProps()\n\n const hasRepeatableSets = React.useMemo(\n () =>\n parameters.unwindRepeatableSets ||\n allColumns.some((c) => c.formElementType === 'repeatableSet'),\n [allColumns, parameters.unwindRepeatableSets],\n )\n\n return (\n <>\n <Button\n className=\"ob-form-store-columns-button\"\n startIcon={() => <MaterialIcon>settings</MaterialIcon>}\n onClick={showColumnConfiguration}\n // eslint-disable-next-line react/no-children-prop\n children={<>Columns</>}\n {...props}\n />\n <Dialog\n open={isConfiguringColumns}\n maxWidth=\"sm\"\n fullWidth\n onClose={hideColumnConfiguration}\n >\n <DialogTitle>Column Configuration</DialogTitle>\n <DialogContent dividers>\n {hasRepeatableSets && (\n <>\n <Grid container>\n <Grid item>\n <FormGroup>\n <FormControlLabel\n control={\n <Checkbox checked={!!parameters.unwindRepeatableSets} />\n }\n onChange={(e, checked) => {\n onChangeParameters(\n (currentParameters) => ({\n ...currentParameters,\n sorting: checked\n ? currentParameters.sorting\n : [\n {\n property: 'dateTimeSubmitted',\n direction: 'descending',\n },\n ],\n unwindRepeatableSets: checked,\n }),\n false,\n )\n }}\n label=\"Output a row per repeatable set entry\"\n />\n </FormGroup>\n </Grid>\n <Grid item>\n <IconButton onClick={toggleHelp}>\n <MaterialIcon>help</MaterialIcon>\n </IconButton>\n </Grid>\n </Grid>\n <Collapse in={isHelpOpen}>\n <Alert severity=\"info\">\n <AlertTitle>When this setting is enabled:</AlertTitle>\n <UnorderedList>\n <ListItem>\n Repeatable set columns will be expanded and create\n duplicate rows per entry\n </ListItem>\n <ListItem>\n Columns inside repeatable set entries can be sorted and\n filtered\n </ListItem>\n <ListItem>\n Columns inside repeatable set entries will be included in\n the CSV download\n </ListItem>\n </UnorderedList>\n </Alert>\n </Collapse>\n <Box marginY={2}>\n <Divider />\n </Box>\n </>\n )}\n <FormGroup>\n <FormControlLabel\n control={\n <Checkbox\n {...toggleHideAllColumnsProps}\n indeterminate={!!toggleHideAllColumnsProps.indeterminate}\n />\n }\n label={<b>Toggle All</b>}\n />\n {allColumns.map((column) => {\n return (\n <React.Fragment key={column.id}>\n <FormControlLabel\n control={<Checkbox {...column.getToggleHiddenProps()} />}\n label={\n <>\n {column.headerText}\n {column.tooltip && (\n <Typography component=\"span\" color=\"textSecondary\">\n {' '}\n ({column.tooltip})\n </Typography>\n )}\n </>\n }\n />\n </React.Fragment>\n )\n })}\n </FormGroup>\n </DialogContent>\n <DialogActions>\n <Button\n onClick={hideColumnConfiguration}\n color=\"primary\"\n variant=\"contained\"\n >\n Done\n </Button>\n </DialogActions>\n </Dialog>\n </>\n )\n}\n\n/**\n * @param props\n * @returns\n * @group Components\n */\nexport default React.memo(OneBlinkFormStoreColumnsButton)\n"]}
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { Tooltip, Dialog, DialogTitle, DialogContent, DialogContentText, DialogActions, Button, } from '@mui/material';
3
3
  import { LoadingButton } from '@mui/lab';
4
- import CsvIcon from '@mui/icons-material/Download';
5
4
  import ErrorSnackbar from '../ErrorSnackbar';
6
5
  import { formStoreService } from '@oneblink/apps';
7
6
  import useFormStoreTableContext from './useFormStoreTableContext';
7
+ import MaterialIcon from '../MaterialIcon';
8
8
  function OneBlinkFormStoreDownloadButton(props) {
9
9
  const { visibleColumns, parameters, form } = useFormStoreTableContext();
10
10
  const [{ isDownloadingCsv, isPromptingDownloadCsv, downloadingCsvError }, setState,] = React.useState({
@@ -64,7 +64,7 @@ function OneBlinkFormStoreDownloadButton(props) {
64
64
  }, []);
65
65
  return (React.createElement(React.Fragment, null,
66
66
  React.createElement(Tooltip, { title: "Download submission data as a CSV file" },
67
- React.createElement(LoadingButton, { className: "ob-form-store-download-csv-button", type: "button", loading: isDownloadingCsv, loadingPosition: "start", startIcon: React.createElement(CsvIcon, null), onClick: promptDownloadCsv,
67
+ React.createElement(LoadingButton, { className: "ob-form-store-download-csv-button", type: "button", loading: isDownloadingCsv, loadingPosition: "start", startIcon: React.createElement(MaterialIcon, null, "download"), onClick: promptDownloadCsv,
68
68
  // eslint-disable-next-line react/no-children-prop
69
69
  children: React.createElement(React.Fragment, null, "Download"), ...props })),
70
70
  React.createElement(ErrorSnackbar, { open: !!downloadingCsvError, onClose: clearError },
@@ -81,7 +81,7 @@ function OneBlinkFormStoreDownloadButton(props) {
81
81
  ".")),
82
82
  React.createElement(DialogActions, null,
83
83
  React.createElement(Button, { onClick: cancelPromptDownloadCsv, variant: "text" }, "Cancel"),
84
- React.createElement(Button, { onClick: downloadCsv, startIcon: React.createElement(CsvIcon, null), color: "primary", variant: "contained" }, "Download")))));
84
+ React.createElement(Button, { onClick: downloadCsv, startIcon: React.createElement(MaterialIcon, null, "download"), color: "primary", variant: "contained" }, "Download")))));
85
85
  }
86
86
  /**
87
87
  * @param props
@@ -1 +1 @@
1
- {"version":3,"file":"OneBlinkFormStoreDownloadButton.js","sourceRoot":"","sources":["../../../src/components/formStore/OneBlinkFormStoreDownloadButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,OAAO,EACP,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,MAAM,GACP,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,OAAO,MAAM,8BAA8B,CAAA;AAClD,OAAO,aAAa,MAAM,kBAAkB,CAAA;AAG5C,OAAO,EAAE,gBAAgB,EAAE,MA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ACT,CACM;QAEV,oBAAC,aAAa,IAAC,IAAI,EAAE,CAAC,CAAC,mBAAmB,EAAE,OAAO,EAAE,UAAU;YAC7D,8CAAmB,2BAA2B,IAC3C,mBAAmB,IAAI,mBAAmB,CAAC,OAAO,CAC9C,CACO;QAEhB,oBAAC,MAAM,IACL,IAAI,EAAE,sBAAsB,EAC5B,QAAQ,EAAC,IAAI,EACb,SAAS,QACT,OAAO,EAAE,uBAAuB;YAEhC,oBAAC,WAAW,+BAAmC;YAC/C,oBAAC,aAAa;gBACZ,oBAAC,iBAAiB;;oBACqD,GAAG;oBACxE,uEAA4C;;oBACtC,sDAA2B;wBACf,CACN;YAChB,oBAAC,aAAa;gBACZ,oBAAC,MAAM,IAAC,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAC,MAAM,aAE/C;gBACT,oBAAC,MAAM,IACL,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,oBAAC,OAAO,OAAG,EACtB,KAAK,EAAC,SAAS,EACf,OAAO,EAAC,WAAW,eAGZ,CACK,CACT,CACR,CACJ,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,eAAe,KAAK,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport {\n Tooltip,\n Dialog,\n DialogTitle,\n DialogContent,\n DialogContentText,\n DialogActions,\n Button,\n} from '@mui/material'\nimport { LoadingButton } from '@mui/lab'\nimport CsvIcon from '@mui/icons-material/Download'\nimport ErrorSnackbar from '../ErrorSnackbar'\nimport { ColumnInstance } from 'react-table'\nimport { FormStoreRecord } from '@oneblink/types/typescript/submissions'\nimport { formStoreService } from '@oneblink/apps'\nimport useFormStoreTableContext from './useFormStoreTableContext'\n\nfunction OneBlinkFormStoreDownloadButton(\n props: React.ComponentProps<typeof LoadingButton>,\n) {\n const { visibleColumns, parameters, form } = useFormStoreTableContext()\n const [\n { isDownloadingCsv, isPromptingDownloadCsv, downloadingCsvError },\n setState,\n ] = React.useState<{\n isDownloadingCsv: boolean\n isPromptingDownloadCsv: boolean\n downloadingCsvError: Error | null\n }>({\n isDownloadingCsv: false,\n isPromptingDownloadCsv: false,\n downloadingCsvError: null,\n })\n\n const clearError = React.useCallback(() => {\n setState((currentState) => ({\n ...currentState,\n downloadingCsvError: null,\n }))\n }, [])\n\n const downloadCsv = React.useCallback(async () => {\n setState({\n isPromptingDownloadCsv: false,\n isDownloadingCsv: true,\n downloadingCsvError: null,\n })\n try {\n await formStoreService.exportFormStoreRecords(form.name, {\n formId: form.id,\n includeColumns: visibleColumns.map(\n (visibleColumn: ColumnInstance<FormStoreRecord>) => visibleColumn.id,\n ),\n ...parameters,\n })\n setState((currentState) => ({\n ...currentState,\n isDownloadingCsv: false,\n downloadingCsvError: null,\n }))\n } catch (error) {\n setState((currentState) => ({\n ...currentState,\n isDownloadingCsv: false,\n downloadingCsvError: error as Error,\n }))\n }\n }, [form, parameters, visibleColumns])\n\n const promptDownloadCsv = React.useCallback(() => {\n if (\n !parameters.unwindRepeatableSets &&\n visibleColumns.some((c) => c.formElementType === 'repeatableSet')\n ) {\n setState((currentState) => ({\n ...currentState,\n downloadingCsvError: null,\n isPromptingDownloadCsv: true,\n }))\n return\n }\n downloadCsv()\n }, [downloadCsv, parameters.unwindRepeatableSets, visibleColumns])\n\n const cancelPromptDownloadCsv = React.useCallback(() => {\n setState((currentState) => ({\n ...currentState,\n isPromptingDownloadCsv: false,\n }))\n }, [])\n\n return (\n <>\n <Tooltip title=\"Download submission data as a CSV file\">\n <LoadingButton\n className=\"ob-form-store-download-csv-button\"\n type=\"button\"\n loading={isDownloadingCsv}\n loadingPosition=\"start\"\n startIcon={<CsvIcon />}\n onClick={promptDownloadCsv}\n // eslint-disable-next-line react/no-children-prop\n children={<>Download</>}\n {...props}\n />\n </Tooltip>\n\n <ErrorSnackbar open={!!downloadingCsvError} onClose={clearError}>\n <span data-cypress=\"edit-dialog-error-message\">\n {downloadingCsvError && downloadingCsvError.message}\n </span>\n </ErrorSnackbar>\n\n <Dialog\n open={isPromptingDownloadCsv}\n maxWidth=\"sm\"\n fullWidth\n onClose={cancelPromptDownloadCsv}\n >\n <DialogTitle>Column Configuration</DialogTitle>\n <DialogContent>\n <DialogContentText>\n Repeatable set columns will not be included in the export unless the{' '}\n <b>Output a row per repeatable set entry</b> option is turned on\n under <b>Column Configuration</b>.\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button onClick={cancelPromptDownloadCsv} variant=\"text\">\n Cancel\n </Button>\n <Button\n onClick={downloadCsv}\n startIcon={<CsvIcon />}\n color=\"primary\"\n variant=\"contained\"\n >\n Download\n </Button>\n </DialogActions>\n </Dialog>\n </>\n )\n}\n\n/**\n * @param props\n * @returns\n * @group Components\n */\nexport default React.memo(OneBlinkFormStoreDownloadButton)\n"]}
1
+ {"version":3,"file":"OneBlinkFormStoreDownloadButton.js","sourceRoot":"","sources":["../../../src/components/formStore/OneBlinkFormStoreDownloadButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EACL,OAAO,EACP,MAAM,EACN,WAAW,EACX,aAAa,EACb,iBAAiB,EACjB,aAAa,EACb,MAAM,GACP,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,aAAa,EAAE,MAAM,UAAU,CAAA;AACxC,OAAO,aAAa,MAAM,kBAAkB,CAAA;AAG5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,wBAAwB,MAAM,4BAA4B,CAAA;AACjE,OAAO,YAAY,MAAM,iBAAiB,CAAA;AAE1C,SAAS,+BAA+B,CACtC,KAAiD;IAEjD,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,IAAI,EAAE,GAAG,wBAAwB,EAAE,CAAA;IACvE,MAAM,CACJ,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,mBAAmB,EAAE,EACjE,QAAQ,EACT,GAAG,KAAK,CAAC,QAAQ,CAIf;QACD,gBAAgB,EAAE,KAAK;QAC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C,aAAa;gBACZ,oBAAC,iBAAiB;;oBACqD,GAAG;oBACxE,uEAA4C;;oBACtC,sDAA2B;wBACf,CACN;YAChB,oBAAC,aAAa;gBACZ,oBAAC,MAAM,IAAC,OAAO,EAAE,uBAAuB,EAAE,OAAO,EAAC,MAAM,aAE/C;gBACT,oBAAC,MAAM,IACL,OAAO,EAAE,WAAW,EACpB,SAAS,EAAE,oBAAC,YAAY,mBAAwB,EAChD,KAAK,EAAC,SAAS,EACf,OAAO,EAAC,WAAW,eAGZ,CACK,CACT,CACR,CACJ,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,eAAe,KAAK,CAAC,IAAI,CAAC,+BAA+B,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport {\n Tooltip,\n Dialog,\n DialogTitle,\n DialogContent,\n DialogContentText,\n DialogActions,\n Button,\n} from '@mui/material'\nimport { LoadingButton } from '@mui/lab'\nimport ErrorSnackbar from '../ErrorSnackbar'\nimport { ColumnInstance } from 'react-table'\nimport { FormStoreRecord } from '@oneblink/types/typescript/submissions'\nimport { formStoreService } from '@oneblink/apps'\nimport useFormStoreTableContext from './useFormStoreTableContext'\nimport MaterialIcon from '../MaterialIcon'\n\nfunction OneBlinkFormStoreDownloadButton(\n props: React.ComponentProps<typeof LoadingButton>,\n) {\n const { visibleColumns, parameters, form } = useFormStoreTableContext()\n const [\n { isDownloadingCsv, isPromptingDownloadCsv, downloadingCsvError },\n setState,\n ] = React.useState<{\n isDownloadingCsv: boolean\n isPromptingDownloadCsv: boolean\n downloadingCsvError: Error | null\n }>({\n isDownloadingCsv: false,\n isPromptingDownloadCsv: false,\n downloadingCsvError: null,\n })\n\n const clearError = React.useCallback(() => {\n setState((currentState) => ({\n ...currentState,\n downloadingCsvError: null,\n }))\n }, [])\n\n const downloadCsv = React.useCallback(async () => {\n setState({\n isPromptingDownloadCsv: false,\n isDownloadingCsv: true,\n downloadingCsvError: null,\n })\n try {\n await formStoreService.exportFormStoreRecords(form.name, {\n formId: form.id,\n includeColumns: visibleColumns.map(\n (visibleColumn: ColumnInstance<FormStoreRecord>) => visibleColumn.id,\n ),\n ...parameters,\n })\n setState((currentState) => ({\n ...currentState,\n isDownloadingCsv: false,\n downloadingCsvError: null,\n }))\n } catch (error) {\n setState((currentState) => ({\n ...currentState,\n isDownloadingCsv: false,\n downloadingCsvError: error as Error,\n }))\n }\n }, [form, parameters, visibleColumns])\n\n const promptDownloadCsv = React.useCallback(() => {\n if (\n !parameters.unwindRepeatableSets &&\n visibleColumns.some((c) => c.formElementType === 'repeatableSet')\n ) {\n setState((currentState) => ({\n ...currentState,\n downloadingCsvError: null,\n isPromptingDownloadCsv: true,\n }))\n return\n }\n downloadCsv()\n }, [downloadCsv, parameters.unwindRepeatableSets, visibleColumns])\n\n const cancelPromptDownloadCsv = React.useCallback(() => {\n setState((currentState) => ({\n ...currentState,\n isPromptingDownloadCsv: false,\n }))\n }, [])\n\n return (\n <>\n <Tooltip title=\"Download submission data as a CSV file\">\n <LoadingButton\n className=\"ob-form-store-download-csv-button\"\n type=\"button\"\n loading={isDownloadingCsv}\n loadingPosition=\"start\"\n startIcon={<MaterialIcon>download</MaterialIcon>}\n onClick={promptDownloadCsv}\n // eslint-disable-next-line react/no-children-prop\n children={<>Download</>}\n {...props}\n />\n </Tooltip>\n\n <ErrorSnackbar open={!!downloadingCsvError} onClose={clearError}>\n <span data-cypress=\"edit-dialog-error-message\">\n {downloadingCsvError && downloadingCsvError.message}\n </span>\n </ErrorSnackbar>\n\n <Dialog\n open={isPromptingDownloadCsv}\n maxWidth=\"sm\"\n fullWidth\n onClose={cancelPromptDownloadCsv}\n >\n <DialogTitle>Column Configuration</DialogTitle>\n <DialogContent>\n <DialogContentText>\n Repeatable set columns will not be included in the export unless the{' '}\n <b>Output a row per repeatable set entry</b> option is turned on\n under <b>Column Configuration</b>.\n </DialogContentText>\n </DialogContent>\n <DialogActions>\n <Button onClick={cancelPromptDownloadCsv} variant=\"text\">\n Cancel\n </Button>\n <Button\n onClick={downloadCsv}\n startIcon={<MaterialIcon>download</MaterialIcon>}\n color=\"primary\"\n variant=\"contained\"\n >\n Download\n </Button>\n </DialogActions>\n </Dialog>\n </>\n )\n}\n\n/**\n * @param props\n * @returns\n * @group Components\n */\nexport default React.memo(OneBlinkFormStoreDownloadButton)\n"]}
@@ -1,10 +1,10 @@
1
1
  import * as React from 'react';
2
2
  import { Button } from '@mui/material';
3
- import { Sync as SyncIcon } from '@mui/icons-material';
4
3
  import useFormStoreTableContext from './useFormStoreTableContext';
4
+ import MaterialIcon from '../MaterialIcon';
5
5
  function OneBlinkFormStoreRefreshButton(props) {
6
6
  const { onRefresh, submissionIdValidationMessage } = useFormStoreTableContext();
7
- return (React.createElement(Button, { className: "ob-form-store-refresh-button", startIcon: React.createElement(SyncIcon, null), onClick: onRefresh, color: "primary", variant: "contained", disabled: !!submissionIdValidationMessage,
7
+ return (React.createElement(Button, { className: "ob-form-store-refresh-button", startIcon: React.createElement(MaterialIcon, null, "sync"), onClick: onRefresh, color: "primary", variant: "contained", disabled: !!submissionIdValidationMessage,
8
8
  // eslint-disable-next-line react/no-children-prop
9
9
  children: React.createElement(React.Fragment, null, "Refresh"), ...props }));
10
10
  }
@@ -1 +1 @@
1
- {"version":3,"file":"OneBlinkFormStoreRefreshButton.js","sourceRoot":"","sources":["../../../src/components/formStore/OneBlinkFormStoreRefreshButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,qBAAqB,CAAA;AACtD,OAAO,wBAAwB,MAAM,4BAA4B,CAAA;AAEjE,SAAS,8BAA8B,CACrC,KAA0C;IAE1C,MAAM,EAAE,SAAS,EAAE,6BAA6B,EAAE,GAChD,wBAAwB,EAAE,CAAA;IAC5B,OAAO,CACL,oBAAC,MAAM,IACL,SAAS,EAAC,8BAA8B,EACxC,SAAS,EAAE,oBAAC,QAAQ,OAAG,EACvB,OAAO,EAAE,SAAS,EAClB,KAAK,EAAC,SAAS,EACf,OAAO,EAAC,WAAW,EACnB,QAAQ,EAAE,CAAC,CAAC,6BAA6B;QACzC,kDAAkD;QAClD,QAAQ,EAAE,oDAAY,KAClB,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,eAAe,KAAK,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport { Button } from '@mui/material'\nimport { Sync as SyncIcon } from '@mui/icons-material'\nimport useFormStoreTableContext from './useFormStoreTableContext'\n\nfunction OneBlinkFormStoreRefreshButton(\n props: React.ComponentProps<typeof Button>,\n) {\n const { onRefresh, submissionIdValidationMessage } =\n useFormStoreTableContext()\n return (\n <Button\n className=\"ob-form-store-refresh-button\"\n startIcon={<SyncIcon />}\n onClick={onRefresh}\n color=\"primary\"\n variant=\"contained\"\n disabled={!!submissionIdValidationMessage}\n // eslint-disable-next-line react/no-children-prop\n children={<>Refresh</>}\n {...props}\n />\n )\n}\n\n/**\n * @param props\n * @returns\n * @group Components\n */\nexport default React.memo(OneBlinkFormStoreRefreshButton)\n"]}
1
+ {"version":3,"file":"OneBlinkFormStoreRefreshButton.js","sourceRoot":"","sources":["../../../src/components/formStore/OneBlinkFormStoreRefreshButton.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AACtC,OAAO,wBAAwB,MAAM,4BAA4B,CAAA;AACjE,OAAO,YAAY,MAAM,iBAAiB,CAAA;AAE1C,SAAS,8BAA8B,CACrC,KAA0C;IAE1C,MAAM,EAAE,SAAS,EAAE,6BAA6B,EAAE,GAChD,wBAAwB,EAAE,CAAA;IAC5B,OAAO,CACL,oBAAC,MAAM,IACL,SAAS,EAAC,8BAA8B,EACxC,SAAS,EAAE,oBAAC,YAAY,eAAoB,EAC5C,OAAO,EAAE,SAAS,EAClB,KAAK,EAAC,SAAS,EACf,OAAO,EAAC,WAAW,EACnB,QAAQ,EAAE,CAAC,CAAC,6BAA6B;QACzC,kDAAkD;QAClD,QAAQ,EAAE,oDAAY,KAClB,KAAK,GACT,CACH,CAAA;AACH,CAAC;AAED;;;;GAIG;AACH,eAAe,KAAK,CAAC,IAAI,CAAC,8BAA8B,CAAC,CAAA","sourcesContent":["import * as React from 'react'\nimport { Button } from '@mui/material'\nimport useFormStoreTableContext from './useFormStoreTableContext'\nimport MaterialIcon from '../MaterialIcon'\n\nfunction OneBlinkFormStoreRefreshButton(\n props: React.ComponentProps<typeof Button>,\n) {\n const { onRefresh, submissionIdValidationMessage } =\n useFormStoreTableContext()\n return (\n <Button\n className=\"ob-form-store-refresh-button\"\n startIcon={<MaterialIcon>sync</MaterialIcon>}\n onClick={onRefresh}\n color=\"primary\"\n variant=\"contained\"\n disabled={!!submissionIdValidationMessage}\n // eslint-disable-next-line react/no-children-prop\n children={<>Refresh</>}\n {...props}\n />\n )\n}\n\n/**\n * @param props\n * @returns\n * @group Components\n */\nexport default React.memo(OneBlinkFormStoreRefreshButton)\n"]}
@@ -1,12 +1,15 @@
1
1
  import * as React from 'react';
2
2
  import clsx from 'clsx';
3
3
  import { styled, Tooltip } from '@mui/material';
4
- import { FilterList as FilterListIcon, Warning as WarningIcon, ArrowDownward, } from '@mui/icons-material';
5
4
  import { IsHoveringProvider } from '../../hooks/useIsHovering';
6
5
  import HeaderCellMoreButton from './table/HeaderCellMoreButton';
7
6
  import useFormStoreTableContext from './useFormStoreTableContext';
8
- const SortingIcon = styled(ArrowDownward)(({ theme }) => ({
7
+ import MaterialIcon from '../MaterialIcon';
8
+ const StyledIcon = styled(({ icon, ...props }) => (React.createElement(MaterialIcon, { ...props }, icon)))(({ theme, color, sortingDirection }) => ({
9
9
  transition: theme.transitions.create('transform'),
10
+ transform: sortingDirection === 'ascending' ? 'rotate(180deg)' : undefined,
11
+ fontSize: theme.typography.h6.fontSize + '!important',
12
+ color: theme.palette[color].main,
10
13
  }));
11
14
  const Table = styled('div')(({ theme }) => ({
12
15
  display: 'inline-block',
@@ -151,13 +154,9 @@ function OneBlinkFormStoreTable() {
151
154
  React.createElement(IsHoveringProvider, { className: "th-content" },
152
155
  React.createElement("div", { className: "th-label" },
153
156
  React.createElement("span", null, headerGroup.headerText),
154
- sortingDirection && (React.createElement(SortingIcon, { fontSize: "small", color: "primary", sx: sortingDirection === 'ascending'
155
- ? {
156
- transform: 'rotate(180deg)',
157
- }
158
- : undefined, className: "th-icon" })),
157
+ sortingDirection && (React.createElement(StyledIcon, { className: "th-icon", sortingDirection: sortingDirection, color: "primary", icon: "arrow_downward" })),
159
158
  ((_c = headerGroup.filter) === null || _c === void 0 ? void 0 : _c.isInvalid) ? (React.createElement(Tooltip, { title: ((_d = headerGroup.filter) === null || _d === void 0 ? void 0 : _d.validationMessage) || '' },
160
- React.createElement(WarningIcon, { fontSize: "small", color: "error", className: "th-icon" }))) : ((_e = headerGroup.filter) === null || _e === void 0 ? void 0 : _e.value) ? (React.createElement(FilterListIcon, { fontSize: "small", color: "primary", className: "th-icon" })) : null),
159
+ React.createElement(StyledIcon, { color: "error", icon: "warning", className: "th-icon" }))) : ((_e = headerGroup.filter) === null || _e === void 0 ? void 0 : _e.value) ? (React.createElement(StyledIcon, { color: "primary", icon: "filter_list", className: "th-icon" })) : null),
161
160
  React.createElement(HeaderCellMoreButton, { headerGroup: headerGroup, onHide: headerGroup.toggleHidden }),
162
161
  React.createElement("div", { ...headerGroup.getResizerProps(), className: clsx('resizer', {
163
162
  'is-resizing': headerGroup.isResizing,