@gen3/frontend 0.11.26 → 0.11.28

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 (149) hide show
  1. package/dist/cjs/index.js +44 -6
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/dts/components/Providers/Gen3Provider.d.ts +6 -6
  4. package/dist/dts/components/SegmentedControl.stories.d.ts +374 -0
  5. package/dist/dts/components/SegmentedControl.stories.d.ts.map +1 -0
  6. package/dist/dts/components/SegmentedControl.stories.js +28 -0
  7. package/dist/dts/components/SegmentedControl.stories.js.map +1 -0
  8. package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts +4 -4
  9. package/dist/dts/features/CohortBuilder/ExplorerTable/AccessCellRenderers.d.ts +3 -0
  10. package/dist/dts/features/CohortBuilder/ExplorerTable/AccessCellRenderers.d.ts.map +1 -0
  11. package/dist/dts/features/CohortBuilder/ExplorerTable/AccessCellRenderers.js +46 -0
  12. package/dist/dts/features/CohortBuilder/ExplorerTable/AccessCellRenderers.js.map +1 -0
  13. package/dist/dts/features/CohortBuilder/Repository/Repository.d.ts +4 -0
  14. package/dist/dts/features/CohortBuilder/Repository/Repository.d.ts.map +1 -0
  15. package/dist/dts/features/CohortBuilder/Repository/Repository.js +8 -0
  16. package/dist/dts/features/CohortBuilder/Repository/Repository.js.map +1 -0
  17. package/dist/dts/features/CohortBuilder/Repository/index.d.ts +4 -0
  18. package/dist/dts/features/CohortBuilder/Repository/index.d.ts.map +1 -0
  19. package/dist/dts/features/CohortBuilder/Repository/index.js +3 -0
  20. package/dist/dts/features/CohortBuilder/Repository/index.js.map +1 -0
  21. package/dist/dts/features/CohortBuilder/Repository/types.d.ts +12 -0
  22. package/dist/dts/features/CohortBuilder/Repository/types.d.ts.map +1 -0
  23. package/dist/dts/features/CohortBuilder/Repository/types.js.map +1 -0
  24. package/dist/dts/lib/session/session.d.ts.map +1 -1
  25. package/dist/dts/lib/session/session.js +36 -1
  26. package/dist/dts/lib/session/session.js.map +1 -1
  27. package/dist/dts/pages/Repository/Repository.d.ts +4 -0
  28. package/dist/dts/pages/Repository/Repository.d.ts.map +1 -0
  29. package/dist/dts/pages/Repository/Repository.js +24 -0
  30. package/dist/dts/pages/Repository/Repository.js.map +1 -0
  31. package/dist/dts/pages/Repository/data.d.ts +4 -0
  32. package/dist/dts/pages/Repository/data.d.ts.map +1 -0
  33. package/dist/dts/{features/CohortBuilder/CohortManager/cohortActionHooks.js → pages/Repository/data.js} +55 -42
  34. package/dist/dts/pages/Repository/data.js.map +1 -0
  35. package/dist/dts/pages/Repository/index.d.ts +4 -0
  36. package/dist/dts/pages/Repository/index.d.ts.map +1 -0
  37. package/dist/dts/pages/Repository/index.js +4 -0
  38. package/dist/dts/pages/Repository/index.js.map +1 -0
  39. package/dist/dts/pages/Repository/types.d.ts +6 -0
  40. package/dist/dts/pages/Repository/types.d.ts.map +1 -0
  41. package/dist/dts/pages/Repository/types.js +2 -0
  42. package/dist/dts/pages/Repository/types.js.map +1 -0
  43. package/dist/dts/pages/TabbedCohortBuilder/TabbedCohortBuilderPage.d.ts.map +1 -1
  44. package/dist/dts/pages/TabbedCohortBuilder/TabbedCohortBuilderPage.js +3 -2
  45. package/dist/dts/pages/TabbedCohortBuilder/TabbedCohortBuilderPage.js.map +1 -1
  46. package/dist/dts/types/icons.d.ts +2 -2
  47. package/dist/dts/types/icons.d.ts.map +1 -1
  48. package/dist/dts/types/icons.js +2 -2
  49. package/dist/dts/types/icons.js.map +1 -1
  50. package/dist/esm/index.js +45 -7
  51. package/dist/esm/index.js.map +1 -1
  52. package/dist/index.d.ts +6 -6
  53. package/dist/tsconfig.tsbuildinfo +1 -1
  54. package/package.json +3 -3
  55. package/dist/dts/components/DropdownMenu/DropdownMenu.d.ts +0 -64
  56. package/dist/dts/components/DropdownMenu/DropdownMenu.d.ts.map +0 -1
  57. package/dist/dts/components/DropdownMenu/DropdownMenu.js +0 -38
  58. package/dist/dts/components/DropdownMenu/DropdownMenu.js.map +0 -1
  59. package/dist/dts/components/DropdownMenu/DropdownMenu.unit.test.d.ts +0 -2
  60. package/dist/dts/components/DropdownMenu/DropdownMenu.unit.test.d.ts.map +0 -1
  61. package/dist/dts/components/DropdownMenu/DropdownMenu.unit.test.js +0 -141
  62. package/dist/dts/components/DropdownMenu/DropdownMenu.unit.test.js.map +0 -1
  63. package/dist/dts/components/DropdownMenu/index.d.ts +0 -3
  64. package/dist/dts/components/DropdownMenu/index.d.ts.map +0 -1
  65. package/dist/dts/components/DropdownMenu/index.js +0 -3
  66. package/dist/dts/components/DropdownMenu/index.js.map +0 -1
  67. package/dist/dts/components/MessageCards/ErrorMessage.d.ts +0 -7
  68. package/dist/dts/components/MessageCards/ErrorMessage.d.ts.map +0 -1
  69. package/dist/dts/components/MessageCards/ErrorMessage.js +0 -8
  70. package/dist/dts/components/MessageCards/ErrorMessage.js.map +0 -1
  71. package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.d.ts +0 -20
  72. package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.d.ts.map +0 -1
  73. package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.js +0 -37
  74. package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.js.map +0 -1
  75. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotificationProvider.d.ts +0 -9
  76. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotificationProvider.d.ts.map +0 -1
  77. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotificationProvider.js +0 -122
  78. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotificationProvider.js.map +0 -1
  79. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotifications.d.ts +0 -19
  80. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotifications.d.ts.map +0 -1
  81. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotifications.js +0 -52
  82. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotifications.js.map +0 -1
  83. package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.d.ts +0 -10
  84. package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.d.ts.map +0 -1
  85. package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.js +0 -37
  86. package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.js.map +0 -1
  87. package/dist/dts/features/CohortBuilder/CohortManager/CustomCohortSelectItem.d.ts +0 -13
  88. package/dist/dts/features/CohortBuilder/CohortManager/CustomCohortSelectItem.d.ts.map +0 -1
  89. package/dist/dts/features/CohortBuilder/CohortManager/CustomCohortSelectItem.js +0 -33
  90. package/dist/dts/features/CohortBuilder/CohortManager/CustomCohortSelectItem.js.map +0 -1
  91. package/dist/dts/features/CohortBuilder/CohortManager/cohortActionHooks.d.ts +0 -7
  92. package/dist/dts/features/CohortBuilder/CohortManager/cohortActionHooks.d.ts.map +0 -1
  93. package/dist/dts/features/CohortBuilder/CohortManager/cohortActionHooks.js.map +0 -1
  94. package/dist/dts/features/CohortBuilder/CohortManager/commonIcons.d.ts +0 -5
  95. package/dist/dts/features/CohortBuilder/CohortManager/commonIcons.d.ts.map +0 -1
  96. package/dist/dts/features/CohortBuilder/CohortManager/commonIcons.js +0 -5
  97. package/dist/dts/features/CohortBuilder/CohortManager/commonIcons.js.map +0 -1
  98. package/dist/dts/features/CohortBuilder/CohortManager/index.d.ts +0 -5
  99. package/dist/dts/features/CohortBuilder/CohortManager/index.d.ts.map +0 -1
  100. package/dist/dts/features/CohortBuilder/CohortManager/index.js +0 -4
  101. package/dist/dts/features/CohortBuilder/CohortManager/index.js.map +0 -1
  102. package/dist/dts/features/CohortBuilder/CohortManager/modals/GenericCohortModal.d.ts +0 -13
  103. package/dist/dts/features/CohortBuilder/CohortManager/modals/GenericCohortModal.d.ts.map +0 -1
  104. package/dist/dts/features/CohortBuilder/CohortManager/modals/GenericCohortModal.js +0 -15
  105. package/dist/dts/features/CohortBuilder/CohortManager/modals/GenericCohortModal.js.map +0 -1
  106. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortErrorModal.d.ts +0 -4
  107. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortErrorModal.d.ts.map +0 -1
  108. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortErrorModal.js +0 -8
  109. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortErrorModal.js.map +0 -1
  110. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.d.ts +0 -32
  111. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.d.ts.map +0 -1
  112. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.js +0 -190
  113. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.js.map +0 -1
  114. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.unit.test.d.ts +0 -2
  115. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.unit.test.d.ts.map +0 -1
  116. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.unit.test.js +0 -145
  117. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.unit.test.js.map +0 -1
  118. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.d.ts +0 -29
  119. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.d.ts.map +0 -1
  120. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.js +0 -79
  121. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.js.map +0 -1
  122. package/dist/dts/features/CohortBuilder/CohortManager/style.d.ts +0 -5
  123. package/dist/dts/features/CohortBuilder/CohortManager/style.d.ts.map +0 -1
  124. package/dist/dts/features/CohortBuilder/CohortManager/style.js +0 -21
  125. package/dist/dts/features/CohortBuilder/CohortManager/style.js.map +0 -1
  126. package/dist/dts/features/CohortBuilder/CohortManager/types.d.ts +0 -49
  127. package/dist/dts/features/CohortBuilder/CohortManager/types.d.ts.map +0 -1
  128. package/dist/dts/features/CohortBuilder/CohortManager/types.js.map +0 -1
  129. package/dist/dts/features/CohortBuilder/CohortManager.d.ts +0 -6
  130. package/dist/dts/features/CohortBuilder/CohortManager.d.ts.map +0 -1
  131. package/dist/dts/features/CohortBuilder/CohortManager.js +0 -8
  132. package/dist/dts/features/CohortBuilder/CohortManager.js.map +0 -1
  133. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.d.ts +0 -64
  134. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.d.ts.map +0 -1
  135. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.js +0 -572
  136. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.js.map +0 -1
  137. package/dist/dts/features/CohortDiscovery/CohortSelectors.d.ts +0 -1
  138. package/dist/dts/features/CohortDiscovery/CohortSelectors.d.ts.map +0 -1
  139. package/dist/dts/features/CohortDiscovery/CohortSelectors.js +0 -41
  140. package/dist/dts/features/CohortDiscovery/CohortSelectors.js.map +0 -1
  141. package/dist/dts/features/CohortDiscovery/CohortSlice.d.ts +0 -1
  142. package/dist/dts/features/CohortDiscovery/CohortSlice.d.ts.map +0 -1
  143. package/dist/dts/features/CohortDiscovery/CohortSlice.js +0 -162
  144. package/dist/dts/features/CohortDiscovery/CohortSlice.js.map +0 -1
  145. package/dist/dts/features/CohortDiscovery/SavedCohortManagerSlice.d.ts +0 -1
  146. package/dist/dts/features/CohortDiscovery/SavedCohortManagerSlice.d.ts.map +0 -1
  147. package/dist/dts/features/CohortDiscovery/SavedCohortManagerSlice.js +0 -284
  148. package/dist/dts/features/CohortDiscovery/SavedCohortManagerSlice.js.map +0 -1
  149. /package/dist/dts/features/CohortBuilder/{CohortManager → Repository}/types.js +0 -0
@@ -1,52 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { Button } from '@mantine/core';
3
- import { cleanNotifications } from '@mantine/notifications';
4
- export var NewCohortNotification = function (_a) {
5
- var cohortName = _a.cohortName;
6
- return (_jsx(_Fragment, { children: _jsxs("p", { children: [_jsx("b", { children: cohortName }), " has been created. This is now your current cohort."] }) }));
7
- };
8
- export var SavedCohortNotification = function (_a) {
9
- var cohortName = _a.cohortName;
10
- return (_jsx(_Fragment, { children: _jsxs("p", { children: [_jsx("b", { children: cohortName }), " has been saved. This is now your current cohort."] }) }));
11
- };
12
- export var NewCohortNotificationWithSetAsCurrent = function (_a) {
13
- var cohortName = _a.cohortName, cohortId = _a.cohortId, useSetActiveCohort = _a.useSetActiveCohort;
14
- var setActiveCohort = useSetActiveCohort();
15
- return (_jsx(_Fragment, { children: _jsxs("p", { children: [_jsx("b", { children: cohortName }), " has been created.", _jsx(Button, { variant: "white", onClick: function () {
16
- setActiveCohort(cohortId);
17
- cleanNotifications();
18
- }, children: "Set this as your current cohort." })] }) }));
19
- };
20
- export var SavedCohortNotificationWithSetAsCurrent = function (_a) {
21
- var cohortName = _a.cohortName, cohortId = _a.cohortId, useSetActiveCohort = _a.useSetActiveCohort;
22
- var setActiveCohort = useSetActiveCohort();
23
- return (_jsx(_Fragment, { children: _jsxs("p", { children: [_jsx("b", { children: cohortName }), " has been saved.", _jsx(Button, { variant: "white", onClick: function () {
24
- setActiveCohort(cohortId);
25
- cleanNotifications();
26
- }, children: "Set this as your current cohort." })] }) }));
27
- };
28
- export var DeleteCohortNotification = function (_a) {
29
- var cohortName = _a.cohortName;
30
- return (_jsx(_Fragment, { children: _jsxs("p", { children: [_jsx("b", { children: cohortName }), " has been deleted."] }) }));
31
- };
32
- export var SavedCurrentCohortNotification = function () {
33
- return (_jsx(_Fragment, { children: _jsx("p", { children: "Cohort has been saved." }) }));
34
- };
35
- export var DiscardChangesCohortNotification = function () {
36
- return (_jsx(_Fragment, { children: _jsx("p", { children: "Cohort changes have been discarded." }) }));
37
- };
38
- export var ErrorCohortNotification = function (_a) {
39
- var errorType = _a.errorType;
40
- var errorText = '';
41
- if (errorType === 'saving') {
42
- errorText = 'There was a problem saving the cohort.';
43
- }
44
- else if (errorType === 'deleting') {
45
- errorText = 'There was a problem deleting the cohort.';
46
- }
47
- else if (errorType === 'discarding') {
48
- errorText = 'There was a problem discarding the unsaved changes';
49
- }
50
- return (_jsx(_Fragment, { children: _jsx("p", { children: errorText }) }));
51
- };
52
- //# sourceMappingURL=CohortNotifications.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CohortNotifications.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/CohortNotifications.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAM5D,MAAM,CAAC,IAAM,qBAAqB,GAAsC,UAAC,EAE/C;QADxB,UAAU,gBAAA;IAEV,OAAO,CACL,4BACE,wBACE,sBAAI,UAAU,GAAK,2DACjB,GACH,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,uBAAuB,GAAsC,UAAC,EAEjD;QADxB,UAAU,gBAAA;IAEV,OAAO,CACL,4BACE,wBACE,sBAAI,UAAU,GAAK,yDACjB,GACH,CACJ,CAAC;AACJ,CAAC,CAAC;AAQF,MAAM,CAAC,IAAM,qCAAqC,GAE9C,UAAC,EAIkC;QAHrC,UAAU,gBAAA,EACV,QAAQ,cAAA,EACR,kBAAkB,wBAAA;IAElB,IAAM,eAAe,GAAG,kBAAkB,EAAE,CAAC;IAE7C,OAAO,CACL,4BACE,wBACE,sBAAI,UAAU,GAAK,wBACnB,KAAC,MAAM,IACL,OAAO,EAAC,OAAO,EACf,OAAO,EAAE;wBACP,eAAe,CAAC,QAAQ,CAAC,CAAC;wBAC1B,kBAAkB,EAAE,CAAC;oBACvB,CAAC,iDAGM,IACP,GACH,CACJ,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,uCAAuC,GAEhD,UAAC,EAIkC;QA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only selectAvailableCohorts: () => Cohort[];
5
- readonly selectCurrentCohort: () => Cohort;
6
- readonly setActiveCohort: (newCohort: string) => void;
7
- }
8
- declare const CohortSelector2: React.FC<CohortSelectorProps>;
9
- export default CohortSelector2;
10
- //# sourceMappingURL=CohortSelector.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CohortSelector.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/CohortSelector.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EAAE,MAAM,EAAE,MAAM,SAAS,CAAC;AAGjC,UAAU,mBAAmB;IAC3B,QAAQ,CAAC,sBAAsB,EAAE,MAAM,MAAM,EAAE,CAAC;IAChD,QAAQ,CAAC,mBAAmB,EAAE,MAAM,MAAM,CAAC;IAC3C,QAAQ,CAAC,eAAe,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;CACvD;AAED,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,mBAAmB,CAqElD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,37 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { useDeepCompareMemo } from 'use-deep-compare';
3
- import { Select } from '@mantine/core';
4
- import { UnsavedIcon, CustomCohortSelectItem } from './CustomCohortSelectItem';
5
- import { FaCaretDown as DropdownIcon } from 'react-icons/fa';
6
- var CohortSelector2 = function (_a) {
7
- var selectAvailableCohorts = _a.selectAvailableCohorts, selectCurrentCohort = _a.selectCurrentCohort, setActiveCohort = _a.setActiveCohort;
8
- var cohorts = selectAvailableCohorts();
9
- var currentCohort = selectCurrentCohort();
10
- var cohortStatusMessage = currentCohort.saved
11
- ? 'Changes not saved'
12
- : 'Cohort not saved';
13
- var isSavedUnchanged = currentCohort.saved && !currentCohort.modified;
14
- var cohortList = useDeepCompareMemo(function () {
15
- return cohorts
16
- .sort(function (a, b) { return (a.modified_datetime <= b.modified_datetime ? 1 : -1); })
17
- .map(function (x) { return ({
18
- value: x.id,
19
- label: x.name,
20
- isSavedUnchanged: x.saved && !x.modified,
21
- cohortStatusMessage: x.saved
22
- ? 'Changes not saved'
23
- : 'Cohort not saved',
24
- }); });
25
- }, [cohorts]);
26
- return (_jsxs("div", { className: "flex flex-col pt-5", "data-testid": "cohort-list-dropdown", children: [_jsx(Select, { data: cohortList, searchable: true, clearable: false, value: currentCohort.id, onChange: function (id) {
27
- if (id !== null) {
28
- setActiveCohort(id);
29
- }
30
- }, renderOption: CustomCohortSelectItem, classNames: {
31
- root: 'border-secondary-darkest w-56 md:w-80 z-[290]',
32
- input: 'text-heading font-medium text-primary-darkest rounded-l-none h-[50px] border-primary border-l-2',
33
- option: 'text-heading font-normal text-primary-darkest data-selected:bg-primary-lighter hover:bg-accent-lightest hover:text-accent-contrast-lightest my-0.5',
34
- }, "aria-label": "Select cohort", "data-testid": "switchButton", rightSection: _jsxs("div", { className: "flex gap-1 items-center", children: [!isSavedUnchanged && _jsx(UnsavedIcon, { label: cohortStatusMessage }), _jsx(DropdownIcon, { size: 20, className: "text-primary" })] }), rightSectionWidth: !isSavedUnchanged ? 45 : 30, styles: { section: { pointerEvents: 'none' } } }), _jsx("div", { "data-testid": "text-cohort-bar-message", className: "ml-auto text-heading text-sm font-semibold mt-0.85 text-primary-contrast ".concat(!isSavedUnchanged ? 'visible' : 'invisible'), children: cohortStatusMessage })] }));
35
- };
36
- export default CohortSelector2;
37
- //# sourceMappingURL=CohortSelector.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CohortSelector.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/CohortSelector.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,WAAW,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,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AAE,UAAC,EAAE;oBACX,IAAI,EAAE,KAAK,IAAI,EAAE,CAAC;wBAChB,eAAe,CAAC,EAAE,CAAC,CAAC;oBACtB,CAAC;gBACH,CAAC,EACD,YAAY,EAAE,sBAA6B,EAC3C,UAAU,EAAE;oBACV,IAAI,EAAE,+CAA+C;oBACrD,KAAK,EACH,iGAAiG;oBACnG,MAAM,EACJ,oJAAoJ;iBACvJ,gBACU,eAAe,iBACd,cAAc,EAC1B,YAAY,EACV,eAAK,SAAS,EAAC,yBAAyB,aACrC,CAAC,gBAAgB,IAAI,KAAC,WAAW,IAAC,KAAK,EAAE,mBAAmB,GAAI,EACjE,KAAC,YAAY,IAAC,IAAI,EAAE,EAAE,EAAE,SAAS,EAAC,cAAc,GAAG,IAC/C,EAER,iBAAiB,EAAE,CAAC,gBAAgB,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE,EAC9C,MAAM,EAAE,EAAE,OAAO,EAAE,EAAE,aAAa,EAAE,MAAM,EAAE,EAAE,GAC9C,EACF,6BACc,yBAAyB,EACrC,SAAS,EAAE,mFACT,CAAC,gBAAgB,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAC3C,YAED,mBAAmB,GAChB,IACF,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- import { ComboboxItem, ComboboxLikeRenderOptionInput } from '@mantine/core';
3
- interface UnsavedIconProps {
4
- readonly label: string;
5
- }
6
- export declare const UnsavedIcon: React.FC<UnsavedIconProps>;
7
- export interface ComboboxItemModified extends ComboboxItem {
8
- readonly isSavedUnchanged: boolean;
9
- readonly cohortStatusMessage: string;
10
- }
11
- export declare const CustomCohortSelectItem: ({ option: { value, label, isSavedUnchanged, cohortStatusMessage, ...others }, }: ComboboxLikeRenderOptionInput<ComboboxItemModified>) => import("react/jsx-runtime").JSX.Element;
12
- export {};
13
- //# sourceMappingURL=CustomCohortSelectItem.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CustomCohortSelectItem.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/CustomCohortSelectItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAEL,YAAY,EACZ,6BAA6B,EAC9B,MAAM,eAAe,CAAC;AAEvB,UAAU,gBAAgB;IACxB,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,WAAW,EAAE,KAAK,CAAC,EAAE,CAAC,gBAAgB,CA+ClD,CAAC;AAEF,MAAM,WAAW,oBAAqB,SAAQ,YAAY;IACxD,QAAQ,CAAC,gBAAgB,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,CAAC;CACtC;AAED,eAAO,MAAM,sBAAsB,GAAI,iFAEpC,6BAA6B,CAAC,oBAAoB,CAAC,4CAWrD,CAAC"}
@@ -1,33 +0,0 @@
1
- var __assign = (this && this.__assign) || function () {
2
- __assign = Object.assign || function(t) {
3
- for (var s, i = 1, n = arguments.length; i < n; i++) {
4
- s = arguments[i];
5
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
- t[p] = s[p];
7
- }
8
- return t;
9
- };
10
- return __assign.apply(this, arguments);
11
- };
12
- var __rest = (this && this.__rest) || function (s, e) {
13
- var t = {};
14
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
15
- t[p] = s[p];
16
- if (s != null && typeof Object.getOwnPropertySymbols === "function")
17
- for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
18
- if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
19
- t[p[i]] = s[p[i]];
20
- }
21
- return t;
22
- };
23
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
24
- import { Tooltip, } from '@mantine/core';
25
- export var UnsavedIcon = function (_a) {
26
- var label = _a.label;
27
- return (_jsx(Tooltip, { label: label, withArrow: true, children: _jsx("span", { className: "leading-0 pointer-events-auto", children: _jsxs("svg", { xmlns: "http://www.w3.org/2000/svg", width: "16", height: "16", viewBox: "0 0 16 16", role: "img", children: [_jsx("title", { children: label }), _jsxs("g", { id: "Group_811", "data-name": "Group 811", transform: "translate(-1952 -56)", children: [_jsx("circle", { id: "Ellipse_39", "data-name": "Ellipse 39", cx: "8", cy: "8", r: "8", transform: "translate(1952 56)", fill: "#fff" }), _jsx("circle", { id: "Ellipse_38", "data-name": "Ellipse 38", cx: "7", cy: "7", r: "7", transform: "translate(1953 57)", fill: "#825d00" }), _jsx("path", { id: "Icon_awesome-exclamation-circle", "data-name": "Icon awesome-exclamation-circle", d: "M12.563,6.563a6,6,0,1,1-6-6A6,6,0,0,1,12.563,6.563Zm-6,1.21A1.113,1.113,0,1,0,7.675,8.885,1.113,1.113,0,0,0,6.563,7.772Zm-1.057-4,.179,3.29a.29.29,0,0,0,.29.275H7.15a.29.29,0,0,0,.29-.275l.179-3.29a.29.29,0,0,0-.29-.306H5.8A.29.29,0,0,0,5.506,3.772Z", transform: "translate(1953.438 57.524)", fill: "#faaf00" })] })] }) }) }));
28
- };
29
- export var CustomCohortSelectItem = function (_a) {
30
- var _b = _a.option, value = _b.value, label = _b.label, isSavedUnchanged = _b.isSavedUnchanged, cohortStatusMessage = _b.cohortStatusMessage, others = __rest(_b, ["value", "label", "isSavedUnchanged", "cohortStatusMessage"]);
31
- return (_jsx("div", __assign({}, others, { className: "w-full", children: _jsxs("span", { className: "flex justify-between gap-2 items-center", children: [_jsx("span", { className: "basis-11/12 break-all", children: label }), _jsx("div", { className: "basis-1/12 text-right leading-0", children: !isSavedUnchanged && _jsx(UnsavedIcon, { label: cohortStatusMessage }) })] }) })));
32
- };
33
- //# sourceMappingURL=CustomCohortSelectItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CustomCohortSelectItem.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/CustomCohortSelectItem.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EACL,OAAO,GAGR,MAAM,eAAe,CAAC;AAMvB,MAAM,CAAC,IAAM,WAAW,GAA+B,UAAC,EAAS;QAAP,KAAK,WAAA;IAC7D,OAAO,CACL,KAAC,OAAO,IAAC,KAAK,EAAE,KAAK,EAAE,SAAS,kBAC9B,eAAM,SAAS,EAAC,+BAA+B,YAC7C,eACE,KAAK,EAAC,4BAA4B,EAClC,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,KAAK,aAEV,0BAAQ,KAAK,GAAS,EACtB,aACE,EAAE,EAAC,WAAW,eACJ,WAAW,EACrB,SAAS,EAAC,sBAAsB,aAEhC,iBACE,EAAE,EAAC,YAAY,eACL,YAAY,EACtB,EAAE,EAAC,GAAG,EACN,EAAE,EAAC,GAAG,EACN,CAAC,EAAC,GAAG,EACL,SAAS,EAAC,oBAAoB,EAC9B,IAAI,EAAC,MAAM,GACX,EACF,iBACE,EAAE,EAAC,YAAY,eACL,YAAY,EACtB,EAAE,EAAC,GAAG,EACN,EAAE,EAAC,GAAG,EACN,CAAC,EAAC,GAAG,EACL,SAAS,EAAC,oBAAoB,EAC9B,IAAI,EAAC,SAAS,GACd,EACF,eACE,EAAE,EAAC,iCAAiC,eAC1B,iCAAiC,EAC3C,CAAC,EAAC,2PAA2P,EAC7P,SAAS,EAAC,4BAA4B,EACtC,IAAI,EAAC,SAAS,GACd,IACA,IACA,GACD,GACC,CACX,CAAC;AACJ,CAAC,CAAC;AAOF,MAAM,CAAC,IAAM,sBAAsB,GAAG,UAAC,EAEe;QADpD,cAA0E,EAAhE,KAAK,WAAA,EAAE,KAAK,WAAA,EAAE,gBAAgB,sBAAA,EAAE,mBAAmB,yBAAA,EAAK,MAAM,cAAhE,6DAAkE,CAAF;IAExE,OAAO,CACL,yBAAS,MAAM,IAAE,SAAS,EAAC,QAAQ,YACjC,gBAAM,SAAS,EAAC,yCAAyC,aACvD,eAAM,SAAS,EAAC,uBAAuB,YAAE,KAAK,GAAQ,EACtD,cAAK,SAAS,EAAC,iCAAiC,YAC7C,CAAC,gBAAgB,IAAI,KAAC,WAAW,IAAC,KAAK,EAAE,mBAAmB,GAAI,GAC7D,IACD,IACH,CACP,CAAC;AACJ,CAAC,CAAC"}
@@ -1,7 +0,0 @@
1
- export declare const useSelectAvailableCohorts: () => import("@gen3/core").Cohort[];
2
- export declare const useSelectCurrentCohort: () => import("@gen3/core").Cohort;
3
- export declare const useAddUnsavedCohort: () => () => void;
4
- export declare const useSetActiveCohort: () => (id: string) => void;
5
- export declare const useDeleteCohort: () => () => Promise<void>;
6
- export declare const useImportCohort: () => () => void;
7
- //# sourceMappingURL=cohortActionHooks.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"cohortActionHooks.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/cohortActionHooks.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,yBAAyB,qCAErC,CAAC;AAEF,eAAO,MAAM,sBAAsB,mCAElC,CAAC;AAEF,eAAO,MAAM,mBAAmB,kBAM/B,CAAC;AAEF,eAAO,MAAM,kBAAkB,aAItB,MAAM,SAOd,CAAC;AAEF,eAAO,MAAM,eAAe,2BAiB3B,CAAC;AAEF,eAAO,MAAM,eAAe,kBAM3B,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"cohortActionHooks.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/cohortActionHooks.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,kBAAkB,CAAC;AAC1D,OAAO,EACL,0BAA0B,EAC1B,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,eAAe,EACf,YAA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CAAC;gBACZ,CAAC,CAAC,EAAC;;SACJ,EAAE,CAAC,aAAa,EAAE,YAAY,CAAC,CAAC,CAAC;IAElC,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,eAAe,GAAG;IAC7B,IAAM,YAAY,GAAG,eAAe,EAAE,CAAC;IAEvC,IAAM,YAAY,GAAG,sBAAsB,CAAC,cAAO,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEtE,OAAO,YAAY,CAAC;AACtB,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- import { MdAdd as AddIcon, MdDelete as DeleteIcon, MdSave as SaveIcon, MdFileUpload as UploadIcon, MdDownload as DownloadIcon, MdClose as CloseIcon, MdAddCircle as MoreIcon, MdRemoveCircle as LessIcon, MdExpandLess as ExpandLessIcon, MdExpandMore as ExpandMoreIcon, MdSearch as SearchIcon, MdFlip as FlipIcon, MdLibraryAdd as AddFacetIcon, MdWarning as WarningTriangleIcon } from 'react-icons/md';
2
- import { FaCaretDown as DropdownIcon, FaUndo as UndoIcon, FaPlus as PlusIcon, FaMinus as MinusIcon, FaCircle as CircleIcon } from 'react-icons/fa';
3
- import { RiErrorWarningFill as WarningMessageIcon } from 'react-icons/ri';
4
- export { UndoIcon, DropdownIcon, AddIcon, DeleteIcon, UploadIcon, SaveIcon, DownloadIcon, WarningMessageIcon, CloseIcon, CircleIcon, MoreIcon, LessIcon, ExpandLessIcon, ExpandMoreIcon, SearchIcon, FlipIcon, AddFacetIcon, WarningTriangleIcon, PlusIcon, MinusIcon, };
5
- //# sourceMappingURL=commonIcons.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commonIcons.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/commonIcons.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,OAAO,EAChB,QAAQ,IAAI,UAAU,EACtB,MAAM,IAAI,QAAQ,EAClB,YAAY,IAAI,UAAU,EAC1B,UAAU,IAAI,YAAY,EAC1B,OAAO,IAAI,SAAS,EACpB,WAAW,IAAI,QAAQ,EACvB,cAAc,IAAI,QAAQ,EAC1B,YAAY,IAAI,cAAc,EAC9B,YAAY,IAAI,cAAc,EAC9B,QAAQ,IAAI,UAAU,EACtB,MAAM,IAAI,QAAQ,EAClB,YAAY,IAAI,YAAY,EAC5B,SAAS,IAAI,mBAAmB,EACjC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,WAAW,IAAI,YAAY,EAC3B,MAAM,IAAI,QAAQ,EAClB,MAAM,IAAI,QAAQ,EAClB,OAAO,IAAI,SAAS,EACpB,QAAQ,IAAI,UAAU,EACvB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,kBAAkB,IAAI,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,UAAU,EACV,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,cAAc,EACd,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,SAAS,GACV,CAAC"}
@@ -1,5 +0,0 @@
1
- import { MdAdd as AddIcon, MdDelete as DeleteIcon, MdSave as SaveIcon, MdFileUpload as UploadIcon, MdDownload as DownloadIcon, MdClose as CloseIcon, MdAddCircle as MoreIcon, MdRemoveCircle as LessIcon, MdExpandLess as ExpandLessIcon, MdExpandMore as ExpandMoreIcon, MdSearch as SearchIcon, MdFlip as FlipIcon, MdLibraryAdd as AddFacetIcon, MdWarning as WarningTriangleIcon, } from 'react-icons/md';
2
- import { FaCaretDown as DropdownIcon, FaUndo as UndoIcon, FaPlus as PlusIcon, FaMinus as MinusIcon, FaCircle as CircleIcon, } from 'react-icons/fa';
3
- import { RiErrorWarningFill as WarningMessageIcon } from 'react-icons/ri';
4
- export { UndoIcon, DropdownIcon, AddIcon, DeleteIcon, UploadIcon, SaveIcon, DownloadIcon, WarningMessageIcon, CloseIcon, CircleIcon, MoreIcon, LessIcon, ExpandLessIcon, ExpandMoreIcon, SearchIcon, FlipIcon, AddFacetIcon, WarningTriangleIcon, PlusIcon, MinusIcon, };
5
- //# sourceMappingURL=commonIcons.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"commonIcons.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/commonIcons.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,IAAI,OAAO,EAChB,QAAQ,IAAI,UAAU,EACtB,MAAM,IAAI,QAAQ,EAClB,YAAY,IAAI,UAAU,EAC1B,UAAU,IAAI,YAAY,EAC1B,OAAO,IAAI,SAAS,EACpB,WAAW,IAAI,QAAQ,EACvB,cAAc,IAAI,QAAQ,EAC1B,YAAY,IAAI,cAAc,EAC9B,YAAY,IAAI,cAAc,EAC9B,QAAQ,IAAI,UAAU,EACtB,MAAM,IAAI,QAAQ,EAClB,YAAY,IAAI,YAAY,EAC5B,SAAS,IAAI,mBAAmB,GACjC,MAAM,gBAAgB,CAAC;AAExB,OAAO,EACL,WAAW,IAAI,YAAY,EAC3B,MAAM,IAAI,QAAQ,EAClB,MAAM,IAAI,QAAQ,EAClB,OAAO,IAAI,SAAS,EACpB,QAAQ,IAAI,UAAU,GACvB,MAAM,gBAAgB,CAAC;AAExB,OAAO,EAAE,kBAAkB,IAAI,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAC1E,OAAO,EACL,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,UAAU,EACV,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,kBAAkB,EAClB,SAAS,EACT,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,cAAc,EACd,cAAc,EACd,UAAU,EACV,QAAQ,EACR,YAAY,EACZ,mBAAmB,EACnB,QAAQ,EACR,SAAS,GACV,CAAC"}
@@ -1,5 +0,0 @@
1
- import CohortManager from './CohortManager';
2
- import CohortNotificationProvider from './CohortNotificationProvider';
3
- import { type CohortHooks } from './types';
4
- export { CohortManager, CohortNotificationProvider, type CohortHooks };
5
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AACtE,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,OAAO,EAAE,aAAa,EAAE,0BAA0B,EAAE,KAAK,WAAW,EAAE,CAAC"}
@@ -1,4 +0,0 @@
1
- import CohortManager from './CohortManager';
2
- import CohortNotificationProvider from './CohortNotificationProvider';
3
- export { CohortManager, CohortNotificationProvider };
4
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/index.ts"],"names":[],"mappings":"AAAA,OAAO,aAAa,MAAM,iBAAiB,CAAC;AAC5C,OAAO,0BAA0B,MAAM,8BAA8B,CAAC;AAGtE,OAAO,EAAE,aAAa,EAAE,0BAA0B,EAAoB,CAAC"}
@@ -1,13 +0,0 @@
1
- import React from "react";
2
- interface GenericCohortModalProps {
3
- opened: boolean;
4
- title: string;
5
- onClose: () => void;
6
- actionText: string;
7
- mainText: JSX.Element;
8
- subText: JSX.Element;
9
- onActionClick: () => void;
10
- }
11
- declare const GenericCohortModal: React.FC<GenericCohortModalProps>;
12
- export default GenericCohortModal;
13
- //# sourceMappingURL=GenericCohortModal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GenericCohortModal.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CohortBuilder/CohortManager/modals/GenericCohortModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,uBAAuB;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,QAAQ,EAAE,GAAG,CAAC,OAAO,CAAC;IACtB,OAAO,EAAE,GAAG,CAAC,OAAO,CAAC;IACrB,aAAa,EAAE,MAAM,IAAI,CAAC;CAC3B;AAED,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAiDzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -1,15 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Modal, Button } from "@mantine/core";
3
- var GenericCohortModal = function (_a) {
4
- var opened = _a.opened, title = _a.title, onClose = _a.onClose, actionText = _a.actionText, onActionClick = _a.onActionClick, mainText = _a.mainText, subText = _a.subText;
5
- return (_jsxs(Modal, { title: title, opened: opened, padding: 0, radius: "md", onClose: onClose, children: [_jsxs("div", { className: "font-montserrat py-5 pr-6 pl-2.5", children: [_jsx("p", { className: "font-medium text-[0.95rem] text-base-ink", children: mainText }), _jsx("p", { className: "text-sm pt-3 text-base-ink", children: subText })] }), _jsx("div", { className: "bg-base-lightest p-4", children: _jsxs("div", { className: "flex justify-end gap-3", children: [_jsx(Button, { variant: "outline", styles: {
6
- root: {
7
- backgroundColor: "white",
8
- },
9
- }, color: "secondary", onClick: onClose, children: "Cancel" }), _jsx(Button, { variant: "filled", color: "secondary", onClick: function () {
10
- onActionClick();
11
- onClose();
12
- }, children: actionText })] }) })] }));
13
- };
14
- export default GenericCohortModal;
15
- //# sourceMappingURL=GenericCohortModal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GenericCohortModal.js","sourceRoot":"","sources":["../../../../../../src/features/CohortBuilder/CohortManager/modals/GenericCohortModal.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAY9C,IAAM,kBAAkB,GAAsC,UAAC,EAQ9D;QAPC,MAAM,YAAA,EACN,KAAK,WAAA,EACL,OAAO,aAAA,EACP,UAAU,gBAAA,EACV,aAAa,mBAAA,EACb,QAAQ,cAAA,EACR,OAAO,aAAA;IAEP,OAAO,CACL,MAAC,KAAK,IACJ,KAAK,EAAE,KAAK,EACZ,MAAM,EAAE,MAAM,EACd,OAAO,EAAE,CAAC,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAE,OAAO,aAEhB,eAAK,SAAS,EAAC,kCAAkC,aAC/C,YAAG,SAAS,EAAC,0CAA0C,YAAE,QAAQ,GAAK,EACtE,YAAG,SAAS,EAAC,4BAA4B,YAAE,OAAO,GAAK,IACnD,EACN,cAAK,SAAS,EAAC,sBAAsB,YACnC,eAAK,SAAS,EAAC,wBAAwB,aACrC,KAAC,MAAM,IACL,OAAO,EAAC,SAAS,EACjB,MAAM,EAAE;gCACN,IAAI,EAAE;oCACJ,eAAe,EAAE,OAAO;iCACzB;6BACF,EACD,KAAK,EAAC,WAAW,EACjB,OAAO,EAAE,OAAO,uBAGT,EACT,KAAC,MAAM,IACL,OAAO,EAAC,QAAQ,EAChB,KAAK,EAAC,WAAW,EACjB,OAAO,EAAE;gCACP,aAAa,EAAE,CAAC;gCAChB,OAAO,EAAE,CAAC;4BACZ,CAAC,YAEA,UAAU,GACJ,IACL,GACF,IACA,CACT,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -1,4 +0,0 @@
1
- import { ContextModalProps } from '@mantine/modals';
2
- declare const SaveCohortErrorModal: ({ context, id }: ContextModalProps) => import("react/jsx-runtime").JSX.Element;
3
- export default SaveCohortErrorModal;
4
- //# sourceMappingURL=SaveCohortErrorModal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SaveCohortErrorModal.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CohortBuilder/CohortManager/modals/SaveCohortErrorModal.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAIpD,QAAA,MAAM,oBAAoB,GAAI,iBAAiB,iBAAiB,4CAY/D,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { Button } from '@mantine/core';
3
- var SaveCohortErrorModal = function (_a) {
4
- var context = _a.context, id = _a.id;
5
- return (_jsxs(_Fragment, { children: [_jsx("p", { className: "py-2 px-4", children: "There was a problem saving the cohort." }), _jsx("div", { className: "bg-base-lightest flex p-4 gap-4 justify-end mt-4 rounded-b-lg sticky", "data-testid": "modal-button-container", children: _jsx(Button, { onClick: function () { return context.closeModal(id); }, variant: "darkFunction", children: "OK" }) })] }));
6
- };
7
- export default SaveCohortErrorModal;
8
- //# sourceMappingURL=SaveCohortErrorModal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SaveCohortErrorModal.js","sourceRoot":"","sources":["../../../../../../src/features/CohortBuilder/CohortManager/modals/SaveCohortErrorModal.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAGvC,IAAM,oBAAoB,GAAG,UAAC,EAAkC;QAAhC,OAAO,aAAA,EAAE,EAAE,QAAA;IAA0B,OAAA,CACnE,8BACE,YAAG,SAAS,EAAC,WAAW,uDAA2C,EACnE,cACE,SAAS,EAAC,sEAAsE,iBACpE,wBAAwB,YAEpC,KAAC,MAAM,IAAC,OAAO,EAAE,cAAM,OAAA,OAAO,CAAC,UAAU,CAAC,EAAE,CAAC,EAAtB,CAAsB,EAAE,OAAO,EAAC,cAAc,mBAE5D,GACL,IACL,CACJ;AAZoE,CAYpE,CAAC;AAEF,eAAe,oBAAoB,CAAC"}
@@ -1,32 +0,0 @@
1
- import React from 'react';
2
- import { CohortHooks } from '../types';
3
- interface SaveCohortModalProps {
4
- readonly opened: boolean;
5
- readonly hooks: CohortHooks;
6
- readonly initialName?: string;
7
- readonly onClose: () => void;
8
- readonly cohortId: string;
9
- readonly invalidCohortNames: string[];
10
- readonly filters: any;
11
- readonly caseFilters?: any;
12
- readonly createStaticCohort?: boolean;
13
- readonly setAsCurrent?: boolean;
14
- readonly saveAs?: boolean;
15
- }
16
- /**
17
- * SaveCohortModal handles saving a user's cohort
18
- * @param opened - Whether the modal is open or not
19
- * @param hooks - Collection of hooks for performing saving, deleting, etc operations on cohorts
20
- * @param initialName - populates inital value of name field
21
- * @param onClose - callback triggered when modal closes
22
- * @param cohortId - id of existing cohort we are saving, if undefined we are not saving a cohort that already exists
23
- * @param invalidCohortNames - list of cohort names that the user is barred from using
24
- * @param filters - the filters associated with the cohort
25
- * @param caseFilters - the case filters to use for the cohort
26
- * @param createStaticCohort - whether to create a case set from the filters so the cases in the cohort remain static
27
- * @param setAsCurrent - whether to set the new cohort as the user's current cohort, should not also pass in cohortId
28
- * @param saveAs - whether to save existing cohort as new cohort, requires cohortId
29
- */
30
- declare const SaveCohortModal: React.FC<SaveCohortModalProps>;
31
- export default SaveCohortModal;
32
- //# sourceMappingURL=SaveCohortModal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SaveCohortModal.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CohortBuilder/CohortManager/modals/SaveCohortModal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4C,MAAM,OAAO,CAAC;AAIjE,OAAO,EAAE,WAAW,EAAqB,MAAM,UAAU,CAAC;AAG1D,UAAU,oBAAoB;IAC5B,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC;IACzB,QAAQ,CAAC,KAAK,EAAE,WAAW,CAAC;IAC5B,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,QAAQ,CAAC,OAAO,EAAE,MAAM,IAAI,CAAC;IAC7B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,kBAAkB,EAAE,MAAM,EAAE,CAAC;IACtC,QAAQ,CAAC,OAAO,EAAE,GAAG,CAAC;IACtB,QAAQ,CAAC,WAAW,CAAC,EAAE,GAAG,CAAC;IAC3B,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAC;IACtC,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAC;IAChC,QAAQ,CAAC,MAAM,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED;;;;;;;;;;;;;GAaG;AACH,QAAA,MAAM,eAAe,EAAE,KAAK,CAAC,EAAE,CAAC,oBAAoB,CA8MnD,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,190 +0,0 @@
1
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
2
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
3
- return new (P || (P = Promise))(function (resolve, reject) {
4
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
5
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
6
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
7
- step((generator = generator.apply(thisArg, _arguments || [])).next());
8
- });
9
- };
10
- var __generator = (this && this.__generator) || function (thisArg, body) {
11
- var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
12
- return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
13
- function verb(n) { return function (v) { return step([n, v]); }; }
14
- function step(op) {
15
- if (f) throw new TypeError("Generator is already executing.");
16
- while (g && (g = 0, op[0] && (_ = 0)), _) try {
17
- if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
18
- if (y = 0, t) op = [op[0] & 2, t.value];
19
- switch (op[0]) {
20
- case 0: case 1: t = op; break;
21
- case 4: _.label++; return { value: op[1], done: false };
22
- case 5: _.label++; y = op[1]; op = [0]; continue;
23
- case 7: op = _.ops.pop(); _.trys.pop(); continue;
24
- default:
25
- if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
26
- if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
27
- if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
28
- if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
29
- if (t[2]) _.ops.pop();
30
- _.trys.pop(); continue;
31
- }
32
- op = body.call(thisArg, _);
33
- } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
34
- if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
35
- }
36
- };
37
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
38
- import { useState, useCallback, useContext } from 'react';
39
- import { Modal, Button, Loader } from '@mantine/core';
40
- import { modals } from '@mantine/modals';
41
- import { CohortNotificationContext } from '../CohortNotificationProvider';
42
- import { SaveOrCreateEntityBody } from './SaveOrCreateEntityModal';
43
- /**
44
- * SaveCohortModal handles saving a user's cohort
45
- * @param opened - Whether the modal is open or not
46
- * @param hooks - Collection of hooks for performing saving, deleting, etc operations on cohorts
47
- * @param initialName - populates inital value of name field
48
- * @param onClose - callback triggered when modal closes
49
- * @param cohortId - id of existing cohort we are saving, if undefined we are not saving a cohort that already exists
50
- * @param invalidCohortNames - list of cohort names that the user is barred from using
51
- * @param filters - the filters associated with the cohort
52
- * @param caseFilters - the case filters to use for the cohort
53
- * @param createStaticCohort - whether to create a case set from the filters so the cases in the cohort remain static
54
- * @param setAsCurrent - whether to set the new cohort as the user's current cohort, should not also pass in cohortId
55
- * @param saveAs - whether to save existing cohort as new cohort, requires cohortId
56
- */
57
- var SaveCohortModal = function (_a) {
58
- var opened = _a.opened, hooks = _a.hooks, _b = _a.initialName, initialName = _b === void 0 ? '' : _b, onClose = _a.onClose, cohortId = _a.cohortId, invalidCohortNames = _a.invalidCohortNames, filters = _a.filters, caseFilters = _a.caseFilters, _c = _a.createStaticCohort, createStaticCohort = _c === void 0 ? false : _c, _d = _a.setAsCurrent, setAsCurrent = _d === void 0 ? false : _d, _e = _a.saveAs, saveAs = _e === void 0 ? false : _e;
59
- var _f = useState(false), showReplaceCohort = _f[0], setShowReplaceCohort = _f[1];
60
- var _g = useState(''), enteredName = _g[0], setEnteredName = _g[1];
61
- var _h = useState(false), isSaving = _h[0], setIsSaving = _h[1];
62
- var saveCohort = hooks.useSaveCohort();
63
- var replaceCohort = hooks.useReplaceCohort();
64
- var setActiveCohort = hooks.useSetActiveCohort();
65
- var setCohortMessage = useContext(CohortNotificationContext);
66
- var closeModal = useCallback(function () {
67
- onClose();
68
- // Reset modal state on close
69
- setShowReplaceCohort(false);
70
- setEnteredName('');
71
- setIsSaving(false);
72
- }, [onClose]);
73
- var saveAction = function (newName, replace) { return __awaiter(void 0, void 0, void 0, function () {
74
- return __generator(this, function (_a) {
75
- if (isSaving)
76
- return [2 /*return*/];
77
- setIsSaving(true);
78
- if (replace) {
79
- replaceCohort({
80
- newName: newName,
81
- filters: filters,
82
- caseFilters: caseFilters,
83
- createStaticCohort: createStaticCohort,
84
- cohortId: cohortId,
85
- saveAs: saveAs,
86
- })
87
- .then(function (_a) {
88
- var newCohortId = _a.newCohortId;
89
- if (newCohortId) {
90
- if (setAsCurrent || saveAs) {
91
- setCohortMessage &&
92
- setCohortMessage([
93
- {
94
- cmd: setAsCurrent ? 'savedCohort' : 'savedCurrentCohort',
95
- param1: newName,
96
- param2: newCohortId,
97
- },
98
- ]);
99
- setActiveCohort(newCohortId);
100
- }
101
- else {
102
- setCohortMessage &&
103
- setCohortMessage([
104
- {
105
- cmd: 'savedCohortSetCurrent',
106
- param1: newName,
107
- param2: newCohortId,
108
- },
109
- ]);
110
- }
111
- closeModal();
112
- }
113
- })
114
- .catch(function () {
115
- modals.openContextModal({
116
- modal: 'saveCohortError',
117
- title: 'Save Cohort Error',
118
- innerProps: {},
119
- });
120
- setIsSaving(false);
121
- });
122
- }
123
- else {
124
- saveCohort({
125
- newName: newName,
126
- cohortId: cohortId,
127
- filters: filters,
128
- caseFilters: caseFilters,
129
- createStaticCohort: createStaticCohort,
130
- saveAs: saveAs,
131
- })
132
- .then(function (_a) {
133
- var cohortAlreadyExists = _a.cohortAlreadyExists, newCohortId = _a.newCohortId;
134
- if (cohortAlreadyExists) {
135
- setShowReplaceCohort(true);
136
- setIsSaving(false);
137
- }
138
- else {
139
- if (newCohortId && (setAsCurrent || saveAs)) {
140
- setActiveCohort(newCohortId);
141
- }
142
- var cmd = void 0;
143
- if (cohortId) {
144
- cmd = saveAs ? 'savedCohort' : 'savedCurrentCohort';
145
- }
146
- else {
147
- cmd = setAsCurrent ? 'savedCohort' : 'savedCohortSetCurrent';
148
- }
149
- setCohortMessage &&
150
- setCohortMessage([
151
- {
152
- cmd: cmd,
153
- param1: newName,
154
- param2: newCohortId,
155
- },
156
- ]);
157
- closeModal();
158
- }
159
- })
160
- .catch(function () {
161
- modals.openContextModal({
162
- modal: 'saveCohortError',
163
- title: 'Save Cohort Error',
164
- innerProps: {},
165
- });
166
- setIsSaving(false);
167
- });
168
- }
169
- return [2 /*return*/];
170
- });
171
- }); };
172
- var UpdateBody = function () { return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "p-4", children: [_jsx("p", { className: "font-content text-sm", children: "A saved cohort with same name already exists. Are you sure you want to replace it?" }), _jsx("p", { className: "text-xs font-content mt-1", children: "You cannot undo this action." })] }), _jsxs("div", { className: "bg-base-lightest flex p-4 gap-4 justify-end mt-4 rounded-b-lg sticky", "data-testid": "modal-button-container", children: [_jsx(Button, { variant: "outline", className: 'bg-white', color: "secondary", onClick: function () { return setShowReplaceCohort(false); }, children: "Cancel" }), _jsx(Button, { variant: "filled", color: "secondary", onClick: function () {
173
- saveAction(enteredName, true);
174
- }, "data-testid": "replace-cohort-button", leftSection: isSaving ? _jsx(Loader, { size: 15, color: "white" }) : undefined, children: "Replace" })] })] })); };
175
- return (_jsx(Modal, { opened: opened, onClose: showReplaceCohort ? function () { return setShowReplaceCohort(false); } : onClose, title: showReplaceCohort
176
- ? 'Replace Existing Cohort'
177
- : saveAs
178
- ? 'Save Cohort As'
179
- : 'Save Cohort', size: "md", classNames: {
180
- content: 'p-0',
181
- title: 'text-xl',
182
- }, children: showReplaceCohort ? (_jsx(UpdateBody, {})) : (_jsx(SaveOrCreateEntityBody, { entity: "cohort", action: "Save", initialName: initialName, onClose: onClose, onActionClick: function (name) {
183
- saveAction(name, false);
184
- setEnteredName(name);
185
- }, descriptionMessage: saveAs
186
- ? 'Provide a name to save your current cohort as a new cohort'
187
- : 'Provide a name to save the cohort.', closeOnAction: false, loading: isSaving, disallowedNames: invalidCohortNames })) }));
188
- };
189
- export default SaveCohortModal;
190
- //# sourceMappingURL=SaveCohortModal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SaveCohortModal.js","sourceRoot":"","sources":["../../../../../../src/features/CohortBuilder/CohortManager/modals/SaveCohortModal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAc,EAAE,QAAQ,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,iBAAiB,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,+BAA+B,CAAC;AAE1E,OAAO,EAAE,sBAAsB,EAAE,MAAM,2BAA2B,CAAC;AAgBnE;;;;;;;;;;;;;GAaG;AACH,IAAM,eAAe,GAAmC,UAAC,EAYxD;QAXC,MAAM,YAAA,EACN,KA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C;AACJ,CAAC,CAAC;AAEF,eAAe,eAAe,CAAC"}
@@ -1,2 +0,0 @@
1
- export {};
2
- //# sourceMappingURL=SaveCohortModal.unit.test.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SaveCohortModal.unit.test.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CohortBuilder/CohortManager/modals/SaveCohortModal.unit.test.tsx"],"names":[],"mappings":""}