@gen3/frontend 0.11.25 → 0.11.27

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 (151) hide show
  1. package/dist/cjs/index.js +257 -4
  2. package/dist/cjs/index.js.map +1 -1
  3. package/dist/dts/components/Buttons/index.d.ts +1 -0
  4. package/dist/dts/components/Buttons/index.d.ts.map +1 -1
  5. package/dist/dts/components/Buttons/index.js +1 -0
  6. package/dist/dts/components/Buttons/index.js.map +1 -1
  7. package/dist/dts/components/Providers/Gen3Provider.d.ts +6 -6
  8. package/dist/dts/components/SegmentedControl.stories.d.ts +374 -0
  9. package/dist/dts/components/SegmentedControl.stories.d.ts.map +1 -0
  10. package/dist/dts/components/SegmentedControl.stories.js +28 -0
  11. package/dist/dts/components/SegmentedControl.stories.js.map +1 -0
  12. package/dist/dts/features/Analysis/AnalysisCardCompact.stories.d.ts +4 -4
  13. package/dist/dts/features/CohortBuilder/ExplorerTable/AccessCellRenderers.d.ts +3 -0
  14. package/dist/dts/features/CohortBuilder/ExplorerTable/AccessCellRenderers.d.ts.map +1 -0
  15. package/dist/dts/features/CohortBuilder/ExplorerTable/AccessCellRenderers.js +46 -0
  16. package/dist/dts/features/CohortBuilder/ExplorerTable/AccessCellRenderers.js.map +1 -0
  17. package/dist/dts/features/CohortBuilder/ExplorerTable/ArrayCellRenderer.d.ts +1 -1
  18. package/dist/dts/features/CohortBuilder/Repository/Repository.d.ts +4 -0
  19. package/dist/dts/features/CohortBuilder/Repository/Repository.d.ts.map +1 -0
  20. package/dist/dts/features/CohortBuilder/Repository/Repository.js +8 -0
  21. package/dist/dts/features/CohortBuilder/Repository/Repository.js.map +1 -0
  22. package/dist/dts/features/CohortBuilder/Repository/index.d.ts +4 -0
  23. package/dist/dts/features/CohortBuilder/Repository/index.d.ts.map +1 -0
  24. package/dist/dts/features/CohortBuilder/Repository/index.js +3 -0
  25. package/dist/dts/features/CohortBuilder/Repository/index.js.map +1 -0
  26. package/dist/dts/features/CohortBuilder/Repository/types.d.ts +12 -0
  27. package/dist/dts/features/CohortBuilder/Repository/types.d.ts.map +1 -0
  28. package/dist/dts/features/CohortBuilder/Repository/types.js.map +1 -0
  29. package/dist/dts/lib/session/session.d.ts.map +1 -1
  30. package/dist/dts/lib/session/session.js +36 -1
  31. package/dist/dts/lib/session/session.js.map +1 -1
  32. package/dist/dts/pages/Repository/Repository.d.ts +4 -0
  33. package/dist/dts/pages/Repository/Repository.d.ts.map +1 -0
  34. package/dist/dts/pages/Repository/Repository.js +24 -0
  35. package/dist/dts/pages/Repository/Repository.js.map +1 -0
  36. package/dist/dts/pages/Repository/data.d.ts +4 -0
  37. package/dist/dts/pages/Repository/data.d.ts.map +1 -0
  38. package/dist/dts/{features/CohortBuilder/CohortManager/cohortActionHooks.js → pages/Repository/data.js} +55 -42
  39. package/dist/dts/pages/Repository/data.js.map +1 -0
  40. package/dist/dts/pages/Repository/index.d.ts +4 -0
  41. package/dist/dts/pages/Repository/index.d.ts.map +1 -0
  42. package/dist/dts/pages/Repository/index.js +4 -0
  43. package/dist/dts/pages/Repository/index.js.map +1 -0
  44. package/dist/dts/pages/Repository/types.d.ts +6 -0
  45. package/dist/dts/pages/Repository/types.d.ts.map +1 -0
  46. package/dist/dts/pages/Repository/types.js +2 -0
  47. package/dist/dts/pages/Repository/types.js.map +1 -0
  48. package/dist/dts/types/icons.d.ts +2 -2
  49. package/dist/dts/types/icons.d.ts.map +1 -1
  50. package/dist/dts/types/icons.js +2 -2
  51. package/dist/dts/types/icons.js.map +1 -1
  52. package/dist/esm/index.js +259 -6
  53. package/dist/esm/index.js.map +1 -1
  54. package/dist/index.d.ts +6 -6
  55. package/dist/tsconfig.tsbuildinfo +1 -1
  56. package/package.json +3 -3
  57. package/dist/dts/components/DropdownMenu/DropdownMenu.d.ts +0 -64
  58. package/dist/dts/components/DropdownMenu/DropdownMenu.d.ts.map +0 -1
  59. package/dist/dts/components/DropdownMenu/DropdownMenu.js +0 -38
  60. package/dist/dts/components/DropdownMenu/DropdownMenu.js.map +0 -1
  61. package/dist/dts/components/DropdownMenu/DropdownMenu.unit.test.d.ts +0 -2
  62. package/dist/dts/components/DropdownMenu/DropdownMenu.unit.test.d.ts.map +0 -1
  63. package/dist/dts/components/DropdownMenu/DropdownMenu.unit.test.js +0 -141
  64. package/dist/dts/components/DropdownMenu/DropdownMenu.unit.test.js.map +0 -1
  65. package/dist/dts/components/DropdownMenu/index.d.ts +0 -3
  66. package/dist/dts/components/DropdownMenu/index.d.ts.map +0 -1
  67. package/dist/dts/components/DropdownMenu/index.js +0 -3
  68. package/dist/dts/components/DropdownMenu/index.js.map +0 -1
  69. package/dist/dts/components/MessageCards/ErrorMessage.d.ts +0 -7
  70. package/dist/dts/components/MessageCards/ErrorMessage.d.ts.map +0 -1
  71. package/dist/dts/components/MessageCards/ErrorMessage.js +0 -8
  72. package/dist/dts/components/MessageCards/ErrorMessage.js.map +0 -1
  73. package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.d.ts +0 -20
  74. package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.d.ts.map +0 -1
  75. package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.js +0 -37
  76. package/dist/dts/features/CohortBuilder/CohortManager/CohortActions.js.map +0 -1
  77. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotificationProvider.d.ts +0 -9
  78. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotificationProvider.d.ts.map +0 -1
  79. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotificationProvider.js +0 -122
  80. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotificationProvider.js.map +0 -1
  81. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotifications.d.ts +0 -19
  82. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotifications.d.ts.map +0 -1
  83. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotifications.js +0 -52
  84. package/dist/dts/features/CohortBuilder/CohortManager/CohortNotifications.js.map +0 -1
  85. package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.d.ts +0 -10
  86. package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.d.ts.map +0 -1
  87. package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.js +0 -37
  88. package/dist/dts/features/CohortBuilder/CohortManager/CohortSelector.js.map +0 -1
  89. package/dist/dts/features/CohortBuilder/CohortManager/CustomCohortSelectItem.d.ts +0 -13
  90. package/dist/dts/features/CohortBuilder/CohortManager/CustomCohortSelectItem.d.ts.map +0 -1
  91. package/dist/dts/features/CohortBuilder/CohortManager/CustomCohortSelectItem.js +0 -33
  92. package/dist/dts/features/CohortBuilder/CohortManager/CustomCohortSelectItem.js.map +0 -1
  93. package/dist/dts/features/CohortBuilder/CohortManager/cohortActionHooks.d.ts +0 -7
  94. package/dist/dts/features/CohortBuilder/CohortManager/cohortActionHooks.d.ts.map +0 -1
  95. package/dist/dts/features/CohortBuilder/CohortManager/cohortActionHooks.js.map +0 -1
  96. package/dist/dts/features/CohortBuilder/CohortManager/commonIcons.d.ts +0 -5
  97. package/dist/dts/features/CohortBuilder/CohortManager/commonIcons.d.ts.map +0 -1
  98. package/dist/dts/features/CohortBuilder/CohortManager/commonIcons.js +0 -5
  99. package/dist/dts/features/CohortBuilder/CohortManager/commonIcons.js.map +0 -1
  100. package/dist/dts/features/CohortBuilder/CohortManager/index.d.ts +0 -5
  101. package/dist/dts/features/CohortBuilder/CohortManager/index.d.ts.map +0 -1
  102. package/dist/dts/features/CohortBuilder/CohortManager/index.js +0 -4
  103. package/dist/dts/features/CohortBuilder/CohortManager/index.js.map +0 -1
  104. package/dist/dts/features/CohortBuilder/CohortManager/modals/GenericCohortModal.d.ts +0 -13
  105. package/dist/dts/features/CohortBuilder/CohortManager/modals/GenericCohortModal.d.ts.map +0 -1
  106. package/dist/dts/features/CohortBuilder/CohortManager/modals/GenericCohortModal.js +0 -15
  107. package/dist/dts/features/CohortBuilder/CohortManager/modals/GenericCohortModal.js.map +0 -1
  108. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortErrorModal.d.ts +0 -4
  109. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortErrorModal.d.ts.map +0 -1
  110. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortErrorModal.js +0 -8
  111. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortErrorModal.js.map +0 -1
  112. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.d.ts +0 -32
  113. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.d.ts.map +0 -1
  114. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.js +0 -190
  115. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.js.map +0 -1
  116. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.unit.test.d.ts +0 -2
  117. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.unit.test.d.ts.map +0 -1
  118. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.unit.test.js +0 -145
  119. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveCohortModal.unit.test.js.map +0 -1
  120. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.d.ts +0 -29
  121. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.d.ts.map +0 -1
  122. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.js +0 -79
  123. package/dist/dts/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.js.map +0 -1
  124. package/dist/dts/features/CohortBuilder/CohortManager/style.d.ts +0 -5
  125. package/dist/dts/features/CohortBuilder/CohortManager/style.d.ts.map +0 -1
  126. package/dist/dts/features/CohortBuilder/CohortManager/style.js +0 -21
  127. package/dist/dts/features/CohortBuilder/CohortManager/style.js.map +0 -1
  128. package/dist/dts/features/CohortBuilder/CohortManager/types.d.ts +0 -49
  129. package/dist/dts/features/CohortBuilder/CohortManager/types.d.ts.map +0 -1
  130. package/dist/dts/features/CohortBuilder/CohortManager/types.js.map +0 -1
  131. package/dist/dts/features/CohortBuilder/CohortManager.d.ts +0 -6
  132. package/dist/dts/features/CohortBuilder/CohortManager.d.ts.map +0 -1
  133. package/dist/dts/features/CohortBuilder/CohortManager.js +0 -8
  134. package/dist/dts/features/CohortBuilder/CohortManager.js.map +0 -1
  135. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.d.ts +0 -64
  136. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.d.ts.map +0 -1
  137. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.js +0 -572
  138. package/dist/dts/features/CohortDiscovery/CohortManagment/CohortStorage.js.map +0 -1
  139. package/dist/dts/features/CohortDiscovery/CohortSelectors.d.ts +0 -1
  140. package/dist/dts/features/CohortDiscovery/CohortSelectors.d.ts.map +0 -1
  141. package/dist/dts/features/CohortDiscovery/CohortSelectors.js +0 -41
  142. package/dist/dts/features/CohortDiscovery/CohortSelectors.js.map +0 -1
  143. package/dist/dts/features/CohortDiscovery/CohortSlice.d.ts +0 -1
  144. package/dist/dts/features/CohortDiscovery/CohortSlice.d.ts.map +0 -1
  145. package/dist/dts/features/CohortDiscovery/CohortSlice.js +0 -162
  146. package/dist/dts/features/CohortDiscovery/CohortSlice.js.map +0 -1
  147. package/dist/dts/features/CohortDiscovery/SavedCohortManagerSlice.d.ts +0 -1
  148. package/dist/dts/features/CohortDiscovery/SavedCohortManagerSlice.d.ts.map +0 -1
  149. package/dist/dts/features/CohortDiscovery/SavedCohortManagerSlice.js +0 -284
  150. package/dist/dts/features/CohortDiscovery/SavedCohortManagerSlice.js.map +0 -1
  151. /package/dist/dts/features/CohortBuilder/{CohortManager → Repository}/types.js +0 -0
@@ -1,145 +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 } from "react/jsx-runtime";
38
- import { render } from "@testing-library/react";
39
- import userEvent from "@testing-library/user-event";
40
- import SaveCohortModal from "./SaveCohortModal";
41
- var hooks = {
42
- useSelectCurrentCohort: jest.fn(),
43
- useSelectAvailableCohorts: jest.fn(),
44
- useDeleteCohort: jest.fn(),
45
- useDiscardChanges: jest.fn(),
46
- useUpdateFilters: jest.fn(),
47
- useSetActiveCohort: jest.fn().mockReturnValue(jest.fn()),
48
- useAddUnsavedCohort: jest.fn(),
49
- useExportCohort: jest.fn(),
50
- useImportCohort: jest.fn(),
51
- useSaveCohort: jest
52
- .fn()
53
- .mockReturnValue(jest.fn().mockResolvedValue({ cohortAlreadyExists: true })),
54
- useReplaceCohort: jest
55
- .fn()
56
- .mockReturnValue(jest.fn().mockResolvedValue({ newCohortId: "1" })),
57
- };
58
- describe("SaveCohortModal", function () {
59
- beforeEach(function () {
60
- jest.clearAllMocks();
61
- });
62
- test("populates name field from initialName", function () {
63
- var getByRole = render(_jsx(SaveCohortModal, { onClose: jest.fn(), opened: true, filters: {
64
- root: {
65
- "projects.program.name": {
66
- field: "projects.program.name",
67
- operands: ["TCGA"],
68
- operator: "includes",
69
- },
70
- },
71
- mode: "and",
72
- }, cohortId: "1", initialName: "cohort name", hooks: hooks, invalidCohortNames: [] })).getByRole;
73
- var nameInput = getByRole("textbox", {
74
- name: "Name",
75
- });
76
- expect(nameInput.value).toBe("cohort name");
77
- });
78
- test("replaces cohort with same name", function () { return __awaiter(void 0, void 0, void 0, function () {
79
- var getByText;
80
- return __generator(this, function (_a) {
81
- switch (_a.label) {
82
- case 0:
83
- getByText = render(_jsx(SaveCohortModal, { opened: true, onClose: jest.fn(), filters: {
84
- root: {
85
- "projects.program.name": {
86
- field: "projects.program.name",
87
- operands: ["TCGA"],
88
- operator: "includes",
89
- },
90
- },
91
- mode: "and",
92
- }, cohortId: "1", hooks: hooks, invalidCohortNames: [] })).getByText;
93
- return [4 /*yield*/, userEvent.type(getByText("Name"), "my new cohort")];
94
- case 1:
95
- _a.sent();
96
- return [4 /*yield*/, userEvent.click(getByText("Save"))];
97
- case 2:
98
- _a.sent();
99
- expect(getByText("A saved cohort with same name already exists. Are you sure you want to replace it?")).toBeInTheDocument();
100
- return [2 /*return*/];
101
- }
102
- });
103
- }); });
104
- test("clears state when modal is closed", function () { return __awaiter(void 0, void 0, void 0, function () {
105
- var _a, getByText, queryByText, rerender;
106
- return __generator(this, function (_b) {
107
- switch (_b.label) {
108
- case 0:
109
- _a = render(_jsx(SaveCohortModal, { opened: true, onClose: jest.fn(), filters: {
110
- root: {
111
- "projects.program.name": {
112
- field: "projects.program.name",
113
- operands: ["TCGA"],
114
- operator: "includes",
115
- },
116
- },
117
- mode: "and",
118
- }, cohortId: "1", hooks: hooks, invalidCohortNames: [] })), getByText = _a.getByText, queryByText = _a.queryByText, rerender = _a.rerender;
119
- return [4 /*yield*/, userEvent.type(getByText("Name"), "my new cohort")];
120
- case 1:
121
- _b.sent();
122
- return [4 /*yield*/, userEvent.click(getByText("Save"))];
123
- case 2:
124
- _b.sent();
125
- return [4 /*yield*/, userEvent.click(getByText("Replace"))];
126
- case 3:
127
- _b.sent();
128
- // Modal is closed
129
- rerender(_jsx(SaveCohortModal, { opened: true, onClose: jest.fn(), filters: {
130
- root: {
131
- "projects.program.name": {
132
- field: "projects.program.name",
133
- operands: ["TCGA"],
134
- operator: "includes",
135
- },
136
- },
137
- mode: "and",
138
- }, cohortId: "1", hooks: hooks, invalidCohortNames: [] }));
139
- expect(queryByText("Replace Existing Cohort")).not.toBeInTheDocument();
140
- return [2 /*return*/];
141
- }
142
- });
143
- }); });
144
- });
145
- //# sourceMappingURL=SaveCohortModal.unit.test.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SaveCohortModal.unit.test.js","sourceRoot":"","sources":["../../../../../../src/features/CohortBuilder/CohortManager/modals/SaveC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C,CAAC,GAAG,CAAC,iBAAiB,EAAE,CAAC;;;;SACxE,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -1,29 +0,0 @@
1
- interface SaveOrCreateEntityModalProps {
2
- entity: string;
3
- action?: string;
4
- initialName?: string;
5
- opened: boolean;
6
- onClose: () => void;
7
- onActionClick: (name: string) => void;
8
- onNameChange?: (name: string) => boolean;
9
- descriptionMessage?: string;
10
- additionalDuplicateMessage?: string;
11
- disallowedNames?: string[];
12
- }
13
- export declare const SaveOrCreateEntityModal: ({ entity, action, initialName, opened, onClose, onActionClick, onNameChange, descriptionMessage, additionalDuplicateMessage, disallowedNames, }: SaveOrCreateEntityModalProps) => JSX.Element;
14
- interface SaveOrCreateEntityBodyProps {
15
- entity: string;
16
- action?: string;
17
- initialName?: string;
18
- onClose: () => void;
19
- onActionClick: (name: string) => void;
20
- onNameChange?: (name: string) => boolean;
21
- descriptionMessage?: string;
22
- additionalDuplicateMessage?: string;
23
- closeOnAction?: boolean;
24
- loading?: boolean;
25
- disallowedNames?: string[];
26
- }
27
- export declare const SaveOrCreateEntityBody: ({ entity, action, initialName, onClose, onActionClick, onNameChange, descriptionMessage, additionalDuplicateMessage, closeOnAction, loading, disallowedNames, }: SaveOrCreateEntityBodyProps) => JSX.Element;
28
- export {};
29
- //# sourceMappingURL=SaveOrCreateEntityModal.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SaveOrCreateEntityModal.d.ts","sourceRoot":"","sources":["../../../../../../src/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.tsx"],"names":[],"mappings":"AAOA,UAAU,4BAA4B;IACpC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IACzC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AACD,eAAO,MAAM,uBAAuB,GAAI,iJAWrC,4BAA4B,KAAG,GAAG,CAAC,OAsBrC,CAAC;AAEF,UAAU,2BAA2B;IACnC,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,aAAa,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IACzC,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,0BAA0B,CAAC,EAAE,MAAM,CAAC;IACpC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,eAAe,CAAC,EAAE,MAAM,EAAE,CAAC;CAC5B;AAED,eAAO,MAAM,sBAAsB,GAAI,iKAYpC,2BAA2B,KAAG,GAAG,CAAC,OAuGpC,CAAC"}
@@ -1,79 +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, Fragment as _Fragment } from "react/jsx-runtime";
24
- import { upperFirst } from 'lodash';
25
- import { Button, Modal, TextInput, Loader } from '@mantine/core';
26
- import { useForm } from '@mantine/form';
27
- import ErrorMessage from '../../../../components/MessageCards/ErrorMessage';
28
- import { Icon } from '@iconify-icon/react';
29
- export var SaveOrCreateEntityModal = function (_a) {
30
- var entity = _a.entity, _b = _a.action, action = _b === void 0 ? 'Save' : _b, _c = _a.initialName, initialName = _c === void 0 ? '' : _c, opened = _a.opened, onClose = _a.onClose, onActionClick = _a.onActionClick, onNameChange = _a.onNameChange, descriptionMessage = _a.descriptionMessage, additionalDuplicateMessage = _a.additionalDuplicateMessage, _d = _a.disallowedNames, disallowedNames = _d === void 0 ? [] : _d;
31
- return (_jsx(Modal, { title: "".concat(upperFirst(action), " ").concat(upperFirst(entity)), opened: opened, padding: 0, radius: "md", onClose: onClose, children: _jsx(SaveOrCreateEntityBody, { entity: entity, action: action, initialName: initialName, onClose: onClose, onActionClick: onActionClick, onNameChange: onNameChange, descriptionMessage: descriptionMessage, additionalDuplicateMessage: additionalDuplicateMessage, disallowedNames: disallowedNames }) }));
32
- };
33
- export var SaveOrCreateEntityBody = function (_a) {
34
- var _b;
35
- var entity = _a.entity, _c = _a.action, action = _c === void 0 ? 'Save' : _c, _d = _a.initialName, initialName = _d === void 0 ? '' : _d, onClose = _a.onClose, onActionClick = _a.onActionClick, onNameChange = _a.onNameChange, descriptionMessage = _a.descriptionMessage, additionalDuplicateMessage = _a.additionalDuplicateMessage, _e = _a.closeOnAction, closeOnAction = _e === void 0 ? true : _e, _f = _a.loading, loading = _f === void 0 ? false : _f, _g = _a.disallowedNames, disallowedNames = _g === void 0 ? [] : _g;
36
- var validationMessages = {
37
- emptyField: 'Please fill out this field.',
38
- invalidName: function (value) {
39
- return "".concat(value, " is not a valid name for a saved ").concat(entity, ". Please try another name.");
40
- },
41
- };
42
- var form = useForm({
43
- initialValues: {
44
- name: initialName,
45
- },
46
- validate: {
47
- name: function (value) {
48
- if (value.length === 0) {
49
- return validationMessages.emptyField;
50
- }
51
- else if (disallowedNames.includes(value.trim().toLowerCase())) {
52
- return validationMessages.invalidName(value);
53
- }
54
- return null;
55
- },
56
- },
57
- });
58
- // ignoring this error object as new one is being defined below
59
- var _h = form.getInputProps('name'), _ = _h.error, inputProps = __rest(_h, ["error"]);
60
- var validationError = form.errors.name;
61
- var error = validationError && (_jsx(ErrorMessage, { message: validationError }));
62
- var description = Object.keys(form.errors).length === 0 &&
63
- (onNameChange && !onNameChange((((_b = form === null || form === void 0 ? void 0 : form.values) === null || _b === void 0 ? void 0 : _b.name) || '').trim()) ? (_jsxs("span", { className: "text-warningColorText", children: [_jsx(Icon, { icon: "gen3:wanring", className: "text-warningColor inline mr-0.5" }), "A ", entity, " with the same name already exists.", ' ', additionalDuplicateMessage && additionalDuplicateMessage] })) : (_jsx("span", { children: "Maximum 100 characters" })));
64
- var handleActionClick = function () {
65
- var _a;
66
- if (form.validate().hasErrors || loading)
67
- return;
68
- onActionClick((((_a = form === null || form === void 0 ? void 0 : form.values) === null || _a === void 0 ? void 0 : _a.name) || '').trim());
69
- if (closeOnAction) {
70
- onClose();
71
- }
72
- };
73
- return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "font-content mt-1 mr-6 mb-5 ml-3", children: [_jsx("p", { className: "mb-2 text-sm font-content", children: descriptionMessage && descriptionMessage }), _jsx(TextInput, __assign({ withAsterisk: true, label: "Name", placeholder: "New ".concat(upperFirst(entity), " Name"), description: description, classNames: {
74
- description: 'mt-1',
75
- input: 'font-content data-[invalid=true]:text-utility-error data-[invalid=true]:border-utility-error',
76
- error: 'text-utility-error',
77
- }, "data-autofocus": true, maxLength: 100, error: error, inputWrapperOrder: ['label', 'input', 'error', 'description'] }, inputProps, { "aria-required": true, "data-testid": "textbox-name-input-field" }))] }), _jsx("div", { className: "bg-base-lightest p-4", children: _jsxs("div", { className: "flex justify-end gap-3", children: [_jsx(Button, { "data-testid": "button-cancel-save", variant: "outline", classNames: { root: 'bg-base-max' }, color: "secondary", onClick: onClose, children: "Cancel" }), _jsx(Button, { variant: "filled", color: "secondary", onClick: handleActionClick, "data-testid": "button-save-name", leftSection: loading ? _jsx(Loader, { size: 15, color: "white" }) : undefined, children: upperFirst(action) })] }) })] }));
78
- };
79
- //# sourceMappingURL=SaveOrCreateEntityModal.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"SaveOrCreateEntityModal.js","sourceRoot":"","sources":["../../../../../../src/features/CohortBuilder/CohortManager/modals/SaveOrCreateEntityModal.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AACA,OAAO,EAAE,UAAU,EAAE,MAAM,QAAQ,CAAC;AACpC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACjE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,YAAY,MAAM,kDAAkD,CAAC;AAC5E,OAAO,EAAE,IAAI,EAAE,MAAM,qBAAqB,CAAC;AAc3C,MAAM,CAAC,IAAM,uBAAuB,GAAG,UAAC,EAWT;QAV7B,MAAM,YAAA,EACN,cAAe,EAAf,MAAM,mBAAG,MAAM,KAAA,EACf,mBAAgB,EAAhB,WAAW,mBAAG,EAAE,KAAA,EAChB,MAAM,YAAA,EACN,OAAO,aAAA,EACP,aAAa,mBAAA,EACb,YAAY,kBAAA,EACZ,kBAAkB,wBAAA,EAClB,0BAA0B,gCAAA,EAC1B,uBAAoB,EAApB,eAAe,mBAAG,EAAE,KAAA;IAEpB,OAAO,CACL,KAAC,KAAK,IACJ,KAAK,EAAE,UAAG,UAAU,CAAC,MAAM,CAAC,cAAI,UAAU,CAAC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EAAE,CAAC;YAClB,OAAO,EAAE,CAAC;QACZ,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,CACL,8BACE,eAAK,SAAS,EAAC,kCAAkC,aAC/C,YAAG,SAAS,EAAC,2BAA2B,YACrC,kBAAkB,IAAI,kBAAkB,GACvC,EACJ,KAAC,SAAS,aACR,YAAY,QACZ,KAAK,EAAC,MAAM,EACZ,WAAW,EAAE,cAAO,UAAU,CAAC,MAAM,CAAC,UAAO,EAC7C,WAAW,EAAE,WAAW,EACxB,UAAU,EAAE;4BACV,WAAW,EAAE,MAAM;4BACnB,KAAK,EACH,8FAA8F;4BAChG,KAAK,EAAE,oBAAoB;yBAC5B,0BAED,SAAS,EAAE,GAAG,EACd,KAAK,EAAE,KAAK,EACZ,iBAAiB,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,OAAO,EAAE,aAAa,CAAC,IACzD,UAAU,0CAEF,0BAA0B,IACtC,IACE,EACN,cAAK,SAAS,EAAC,sBAAsB,YACnC,eAAK,SAAS,EAAC,wBAAwB,aACrC,KAAC,MAAM,mBACO,oBAAoB,EAChC,OAAO,EAAC,SAAS,EACjB,UAAU,EAAE,EAAE,IAAI,EAAE,aAAa,EAAE,EACnC,KAAK,EAAC,WAAW,EACjB,OAAO,EAAE,OAAO,uBAGT,EACT,KAAC,MAAM,IACL,OAAO,EAAC,QAAQ,EAChB,KAAK,EAAC,WAAW,EACjB,OAAO,EAAE,iBAAiB,iBACd,kBAAkB,EAC9B,WAAW,EACT,OAAO,CAAC,CAAC,CAAC,KAAC,MAAM,IAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAC,OAAO,GAAG,CAAC,CAAC,CAAC,SAAS,YAGzD,UAAU,CAAC,MAAM,CAAC,GACZ,IACL,GACF,IACL,CACJ,CAAC;AACJ,CAAC,CAAC"}
@@ -1,5 +0,0 @@
1
- export declare const getCombinedClassesExpandCollapseQuery: (allQueryExpressionsCollapsed: boolean) => string;
2
- export declare const getCombinedClassesForRowCollapse: (filtersSectionCollapsed: boolean) => string;
3
- export declare const actionButtonVariant = "data-[variant=\"action\"]:h-12 data-[variant=\"action\"]:w-12 data-[variant=\"action\"]:flex data-[variant=\"action\"]:justify-center data-[variant=\"action\"]:items-center\n data-[variant=\"action\"]:transition-colors data-[variant=\"action\"]:focus-visible:outline-none data-[variant=\"action\"]:focus-visible:ring-offset-2 data-[variant=\"action\"]:focus-visible:ring-inset\n data-[variant=\"action\"]:focus-visible:ring-2 data-[variant=\"action\"]:focus-visible:ring-focusColor data-[variant=\"action\"]:disabled:opacity-50 data-[variant=\"action\"]:disabled:bg-base-max data-[variant=\"action\"]:disabled:text-primary\n data-[variant=\"action\"]:text-primary data-[variant=\"action\"]:hover:bg-primary-darkest data-[variant=\"action\"]:hover:text-primary-content-lightest data-[variant=\"action\"]:bg-base-max";
4
- export declare const darkFunctionVariant = "\ndata-[variant=\"darkFunction\"]:flex\ndata-[variant=\"darkFunction\"]:flex-row\ndata-[variant=\"darkFunction\"]:items-center\ndata-[variant=\"darkFunction\"]:bg-secondary\ndata-[variant=\"darkFunction\"]:text-secondary-contrast\ndata-[variant=\"darkFunction\"]:border\ndata-[variant=\"darkFunction\"]:border-solid\ndata-[variant=\"darkFunction\"]:font-heading\ndata-[variant=\"darkFunction\"]:disabled:opacity-60\ndata-[variant=\"darkFunction\"]:disabled:border-opacity-60\ndata-[variant=\"darkFunction\"]:disabled:text-opacity-60";
5
- //# sourceMappingURL=style.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"style.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/style.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qCAAqC,GAChD,8BAA8B,OAAO,WAWtC,CAAC;AAEF,eAAO,MAAM,gCAAgC,GAC3C,yBAAyB,OAAO,WAYjC,CAAC;AAEF,eAAO,MAAM,mBAAmB,szBAGwJ,CAAC;AAEzL,eAAO,MAAM,mBAAmB,yhBAWuB,CAAC"}
@@ -1,21 +0,0 @@
1
- export var getCombinedClassesExpandCollapseQuery = function (allQueryExpressionsCollapsed) {
2
- var baseClasses = "flex gap-0 items-center border-1 border-base-max rounded-md w-7 h-7";
3
- var dynamicClasses = allQueryExpressionsCollapsed
4
- ? "text-primary bg-base-max"
5
- : "text-base-max bg-transparent";
6
- var disabledClasses = "disabled:opacity-50";
7
- var enabledHoverClasses = "enabled:hover:bg-primary-darkest enabled:hover:text-primary-content-lightest enabled:hover:border-primary-darkest";
8
- return "".concat(dynamicClasses, " ").concat(disabledClasses, " ").concat(enabledHoverClasses, " ").concat(baseClasses);
9
- };
10
- export var getCombinedClassesForRowCollapse = function (filtersSectionCollapsed) {
11
- var baseClasses = "border-1 border-white rounded-md w-7 h-7 flex items-center";
12
- var dynamicClasses = !filtersSectionCollapsed
13
- ? "text-primary bg-base-max"
14
- : "text-base-max bg-transparent";
15
- var disabledClasses = "disabled:opacity-50 disabled:bg-base-max disabled:text-primary";
16
- var enabledHoverClasses = "enabled:hover:bg-primary-darkest enabled:hover:text-primary-content-lightest enabled:hover:border-primary-darkest";
17
- return "".concat(disabledClasses, " ").concat(enabledHoverClasses, " ").concat(baseClasses, " ").concat(dynamicClasses);
18
- };
19
- export var actionButtonVariant = "data-[variant=\"action\"]:h-12 data-[variant=\"action\"]:w-12 data-[variant=\"action\"]:flex data-[variant=\"action\"]:justify-center data-[variant=\"action\"]:items-center\n data-[variant=\"action\"]:transition-colors data-[variant=\"action\"]:focus-visible:outline-none data-[variant=\"action\"]:focus-visible:ring-offset-2 data-[variant=\"action\"]:focus-visible:ring-inset\n data-[variant=\"action\"]:focus-visible:ring-2 data-[variant=\"action\"]:focus-visible:ring-focusColor data-[variant=\"action\"]:disabled:opacity-50 data-[variant=\"action\"]:disabled:bg-base-max data-[variant=\"action\"]:disabled:text-primary\n data-[variant=\"action\"]:text-primary data-[variant=\"action\"]:hover:bg-primary-darkest data-[variant=\"action\"]:hover:text-primary-content-lightest data-[variant=\"action\"]:bg-base-max";
20
- export var darkFunctionVariant = "\ndata-[variant=\"darkFunction\"]:flex\ndata-[variant=\"darkFunction\"]:flex-row\ndata-[variant=\"darkFunction\"]:items-center\ndata-[variant=\"darkFunction\"]:bg-secondary\ndata-[variant=\"darkFunction\"]:text-secondary-contrast\ndata-[variant=\"darkFunction\"]:border\ndata-[variant=\"darkFunction\"]:border-solid\ndata-[variant=\"darkFunction\"]:font-heading\ndata-[variant=\"darkFunction\"]:disabled:opacity-60\ndata-[variant=\"darkFunction\"]:disabled:border-opacity-60\ndata-[variant=\"darkFunction\"]:disabled:text-opacity-60";
21
- //# sourceMappingURL=style.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"style.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/style.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,IAAM,qCAAqC,GAAG,UACnD,4BAAqC;IAErC,IAAM,WAAW,GACf,qEAAqE,CAAC;IACxE,IAAM,cAAc,GAAG,4BAA4B;QACjD,CAAC,CAAC,0BAA0B;QAC5B,CAAC,CAAC,8BAA8B,CAAC;IACnC,IAAM,eAAe,GAAG,qBAAqB,CAAC;IAC9C,IAAM,mBAAmB,GACvB,mHAAmH,CAAC;IACtH,OAAO,UAAG,cAAc,cAAI,eAAe,cAAI,mBAAmB,cAAI,WAAW,CAAE,CAAC;AACtF,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,gCAAgC,GAAG,UAC9C,uBAAgC;IAEhC,IAAM,WAAW,GACf,4DAA4D,CAAC;IAC/D,IAAM,cAAc,GAAG,CAAC,uBAAuB;QAC7C,CAAC,CAAC,0BAA0B;QAC5B,CAAC,CAAC,8BAA8B,CAAC;IACnC,IAAM,eAAe,GACnB,gEAAgE,CAAC;IACnE,IAAM,mBAAmB,GACvB,mHAAmH,CAAC;IACtH,OAAO,UAAG,eAAe,cAAI,mBAAmB,cAAI,WAAW,cAAI,cAAc,CAAE,CAAC;AACtF,CAAC,CAAC;AAEF,MAAM,CAAC,IAAM,mBAAmB,GAAG,mzBAGqJ,CAAC;AAEzL,MAAM,CAAC,IAAM,mBAAmB,GAAG,shBAWoB,CAAC"}
@@ -1,49 +0,0 @@
1
- import { type CohortPersistenceSaveReplaceParameters, type ReplacePersistedCohortResults, type SavePersistedCohortResult } from '@gen3/core';
2
- export interface DataFetchingResult<T> extends DataFetchingStatus {
3
- readonly data: T;
4
- }
5
- export interface DataFetchingStatus {
6
- readonly isSuccess?: boolean;
7
- readonly isFetching?: boolean;
8
- readonly isError?: boolean;
9
- readonly isUninitialized?: boolean;
10
- readonly error?: string;
11
- }
12
- export interface Cohort {
13
- readonly id: string;
14
- readonly name: string;
15
- readonly filters: Record<string, any>;
16
- readonly modified?: boolean;
17
- readonly modified_datetime: string;
18
- readonly saved?: boolean;
19
- }
20
- export type NotificationTypes = 'newCohort' | 'deleteCohort' | 'savedCohort' | 'savedCohortSetCurrent' | 'savedCurrentCohort' | 'discardChanges' | 'error';
21
- export interface CohortNotificationCommandWithParam {
22
- cmd: Omit<NotificationTypes, 'savedCurrentCohort' | 'discardChanges'>;
23
- param1: string;
24
- param2?: string;
25
- }
26
- export interface CohortNotificationCommandNoParam {
27
- cmd: 'savedCurrentCohort' | 'discardChanges';
28
- }
29
- export type CohortNotificationCommand = CohortNotificationCommandWithParam | CohortNotificationCommandNoParam;
30
- type SetCohortMessageFunc = (cmd: CohortNotificationCommand[]) => void;
31
- export interface CohortHooks {
32
- useSelectCurrentCohort: () => Cohort;
33
- useSelectAvailableCohorts: () => Cohort[];
34
- useDeleteCohort: () => () => Promise<void>;
35
- useDiscardChanges: () => () => Promise<void>;
36
- useUpdateFilters?: () => () => void;
37
- useSetActiveCohort: () => (cohortId: string) => void;
38
- useAddUnsavedCohort: () => () => void;
39
- useSaveCohort: () => ({ newName, cohortId, filters, caseFilters, createStaticCohort, saveAs, }: CohortPersistenceSaveReplaceParameters) => Promise<SavePersistedCohortResult>;
40
- useReplaceCohort: () => ({ newName, filters, caseFilters, createStaticCohort, cohortId, saveAs, }: CohortPersistenceSaveReplaceParameters) => Promise<ReplacePersistedCohortResults>;
41
- useExportCohort?: () => {
42
- handleExport: () => void;
43
- status: DataFetchingStatus;
44
- };
45
- useImportCohort?: () => () => void;
46
- useCreateCohortExternally?: (setCohortMessage?: SetCohortMessageFunc) => void;
47
- }
48
- export {};
49
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/types.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,sCAAsC,EAC3C,KAAK,6BAA6B,EAClC,KAAK,yBAAyB,EAC/B,MAAM,YAAY,CAAC;AAEpB,MAAM,WAAW,kBAAkB,CAAC,CAAC,CAAE,SAAQ,kBAAkB;IAC/D,QAAQ,CAAC,IAAI,EAAE,CAAC,CAAC;CAClB;AAED,MAAM,WAAW,kBAAkB;IACjC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,UAAU,CAAC,EAAE,OAAO,CAAC;IAC9B,QAAQ,CAAC,OAAO,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB;AAED,MAAM,WAAW,MAAM;IACrB,QAAQ,CAAC,EAAE,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IACtC,QAAQ,CAAC,QAAQ,CAAC,EAAE,OAAO,CAAC;IAC5B,QAAQ,CAAC,iBAAiB,EAAE,MAAM,CAAC;IACnC,QAAQ,CAAC,KAAK,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,MAAM,MAAM,iBAAiB,GACzB,WAAW,GACX,cAAc,GACd,aAAa,GACb,uBAAuB,GACvB,o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M,EAAE,kBAAkB,CAAC;KAC5B,CAAC;IACF,eAAe,CAAC,EAAE,MAAM,MAAM,IAAI,CAAC;IACnC,yBAAyB,CAAC,EAAE,CAAC,gBAAgB,CAAC,EAAE,oBAAoB,KAAK,IAAI,CAAC;CAC/E"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../../../../src/features/CohortBuilder/CohortManager/types.ts"],"names":[],"mappings":""}
@@ -1,6 +0,0 @@
1
- interface CohortManagerProps {
2
- index: string;
3
- }
4
- declare const CohortManager: ({ index }: CohortManagerProps) => import("react/jsx-runtime").JSX.Element;
5
- export default CohortManager;
6
- //# sourceMappingURL=CohortManager.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CohortManager.d.ts","sourceRoot":"","sources":["../../../../src/features/CohortBuilder/CohortManager.tsx"],"names":[],"mappings":"AAGA,UAAU,kBAAkB;IAC1B,KAAK,EAAE,MAAM,CAAC;CACf;AAED,QAAA,MAAM,aAAa,GAAI,WAAW,kBAAkB,4CAMnD,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,8 +0,0 @@
1
- import { jsx as _jsx } from "react/jsx-runtime";
2
- import QueryExpression from './QueryExpression';
3
- var CohortManager = function (_a) {
4
- var index = _a.index;
5
- return (_jsx("div", { className: "mb-2", children: _jsx(QueryExpression, { index: index }) }));
6
- };
7
- export default CohortManager;
8
- //# sourceMappingURL=CohortManager.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CohortManager.js","sourceRoot":"","sources":["../../../../src/features/CohortBuilder/CohortManager.tsx"],"names":[],"mappings":";AACA,OAAO,eAAe,MAAM,mBAAmB,CAAC;AAMhD,IAAM,aAAa,GAAG,UAAC,EAA6B;QAA3B,KAAK,WAAA;IAC5B,OAAO,CACL,cAAK,SAAS,EAAC,MAAM,YACnB,KAAC,eAAe,IAAC,KAAK,EAAE,KAAK,GAAI,GAC7B,CACP,CAAC;AACJ,CAAC,CAAC;AAEF,eAAe,aAAa,CAAC"}
@@ -1,64 +0,0 @@
1
- import { StorageOperationResults } from '@gen3/core';
2
- import { Cohort, CohortId } from '../types';
3
- import { CohortStorageReturnStatus } from './types';
4
- export declare class CohortStorage {
5
- private getDb;
6
- /**
7
- * Initialize the IndexedDB database with proper schema
8
- */
9
- private initializeDB;
10
- /**
11
- * Save a single cohort to the database
12
- */
13
- saveCohort(cohort: Cohort): Promise<StorageOperationResults>;
14
- /**
15
- * Save multiple cohorts in a single transaction (bulk operation)
16
- */
17
- saveCohorts(cohorts: Cohort[]): Promise<StorageOperationResults>;
18
- /**
19
- * Get a specific cohort by ID
20
- */
21
- getCohort(id: CohortId): Promise<CohortStorageReturnStatus<Cohort>>;
22
- /**
23
- * Get all cohorts from the database
24
- */
25
- getAllCohorts(): Promise<CohortStorageReturnStatus<Record<CohortId, Cohort>>>;
26
- /**
27
- * Search cohorts by name (case-insensitive partial match)
28
- */
29
- searchCohortsByName(searchTerm: string): Promise<CohortStorageReturnStatus<Record<CohortId, Cohort>>>;
30
- /**
31
- * Count total number of cohorts
32
- */
33
- getCohortCount(): Promise<CohortStorageReturnStatus<number>>;
34
- /**
35
- * Update an existing cohort (full replacement)
36
- */
37
- updateCohort(cohort: Cohort): Promise<StorageOperationResults>;
38
- /**
39
- * Delete a specific cohort by ID
40
- */
41
- deleteCohort(id: CohortId): Promise<StorageOperationResults>;
42
- /**
43
- * Delete all cohorts from the database
44
- */
45
- deleteAllCohorts(): Promise<StorageOperationResults>;
46
- /**
47
- * Check if a cohort exists
48
- */
49
- cohortExists(id: CohortId): Promise<CohortStorageReturnStatus<boolean>>;
50
- /**
51
- * Export all cohorts as JSON
52
- */
53
- exportCohorts(): Promise<CohortStorageReturnStatus<Record<CohortId, Cohort>>>;
54
- /**
55
- * Import cohorts from JSON data
56
- */
57
- importCohorts(cohorts: Cohort[], overwrite?: boolean): Promise<void | CohortStorageReturnStatus>;
58
- /**
59
- * Close the database connection
60
- */
61
- close(): Promise<void>;
62
- }
63
- export declare const cohortStorage: CohortStorage;
64
- //# sourceMappingURL=CohortStorage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"CohortStorage.d.ts","sourceRoot":"","sources":["../../../../../src/features/CohortDiscovery/CohortManagment/CohortStorage.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAgB,MAAM,YAAY,CAAC;AACnE,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AAC5C,OAAO,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAMpD,qBAAa,aAAa;IACxB,OAAO,CAAC,KAAK;IAkBb;;OAEG;YACW,YAAY;IAsC1B;;OAEG;IACG,UAAU,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAalE;;OAEG;IACG,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,uBAAuB,CAAC;IA0BtE;;OAEG;IACG,SAAS,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC,yBAAyB,CAAC,MAAM,CAAC,CAAC;IAqBzE;;OAEG;IACG,aAAa,IAAI,OAAO,CAC5B,yBAAyB,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CACpD;IAkCD;;OAEG;IACG,mBAAmB,CACvB,UAAU,EAAE,MAAM,GACjB,OAAO,CAAC,yBAAyB,CAAC,MAAM,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC,CAAC;IA4B/D;;OAEG;IACG,cAAc,IAAI,OAAO,CAAC,yBAAyB,CAAC,MAAM,CAAC,CAAC;IAqBlE;;OAEG;IACG,YAAY,CAAC,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,uBAAuB,CAAC;IAwCpE;;OAEG;IACG,YAAY,CAAC,EAAE,EAAE,QAAQ,GAAG,OAAO,CAAC,uBAAuB,CAAC;IA6BlE;;OAEG;IACG,gBAAgB,IAAI,OAAO,CAAC,uBAAuB,CAAC;IAqB1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