@campxdev/campx-web-utils 2.0.0 → 2.0.2

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.
@@ -0,0 +1,2 @@
1
+ import { SingleSelectProps } from '@campxdev/react-blueprint';
2
+ export declare const ResearchExpertSelector: (props: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import { SingleSelectProps } from '@campxdev/react-blueprint';
2
+ export declare const ResearchStageSelector: (props: SingleSelectProps) => import("react/jsx-runtime").JSX.Element;
@@ -12,6 +12,8 @@ export * from './MonthYearSelector';
12
12
  export * from './PrintFormatSelector';
13
13
  export * from './ProgramSelector';
14
14
  export * from './RegulationSelector';
15
+ export * from './ResearchExpertSelector';
16
+ export * from './ResearchStageSelector';
15
17
  export * from './SemesterSelector';
16
18
  export * from './StudentSelector';
17
19
  export * from './StudentServicesSelector';
package/dist/index.d.ts CHANGED
@@ -168,6 +168,10 @@ declare const ProgramSelector: (props: SingleSelectProps) => react_jsx_runtime.J
168
168
 
169
169
  declare const RegulationSelector: (props: SingleSelectProps) => react_jsx_runtime.JSX.Element;
170
170
 
171
+ declare const ResearchExpertSelector: (props: SingleSelectProps) => react_jsx_runtime.JSX.Element;
172
+
173
+ declare const ResearchStageSelector: (props: SingleSelectProps) => react_jsx_runtime.JSX.Element;
174
+
171
175
  declare const SemesterSelector: (props: SingleSelectProps) => react_jsx_runtime.JSX.Element;
172
176
 
173
177
  declare const StudentSelector: (props: SingleSelectProps) => react_jsx_runtime.JSX.Element;
@@ -188,5 +192,5 @@ declare const workspaceApiMapping: Record<string, string>;
188
192
 
189
193
  declare const openInNewTab: (pathAfterBase: string, excludeInstitution?: boolean, excludeWorkspace?: boolean) => void;
190
194
 
191
- export { ApplicationStore, BatchSelector, ConfirmDialogProvider, CourseSelector, DepartmentSelector, EmployeesSelector, ErrorBoundary, ExamTypeSelector, ExamsRegulationSelector, FeeTypeSelector, HostelBlockSelector, HostelFloorSelector, HostelRoomSelector, MonthYearSelector, PrintFormatSelector, ProgramSelector, Providers, RegulationSelector, SemesterSelector, SnackbarProvider, StudentSelector, StudentServicesSelector, YearRangeSelector, axios, createRsbuildSharedConfig, initialApplicationState, institutionCode, isDevelopment, nonWorkspaceAxios, openInNewTab, tenantCode, useConfirm, workspace, workspaceApiMapping };
195
+ export { ApplicationStore, BatchSelector, ConfirmDialogProvider, CourseSelector, DepartmentSelector, EmployeesSelector, ErrorBoundary, ExamTypeSelector, ExamsRegulationSelector, FeeTypeSelector, HostelBlockSelector, HostelFloorSelector, HostelRoomSelector, MonthYearSelector, PrintFormatSelector, ProgramSelector, Providers, RegulationSelector, ResearchExpertSelector, ResearchStageSelector, SemesterSelector, SnackbarProvider, StudentSelector, StudentServicesSelector, YearRangeSelector, axios, createRsbuildSharedConfig, initialApplicationState, institutionCode, isDevelopment, nonWorkspaceAxios, openInNewTab, tenantCode, useConfirm, workspace, workspaceApiMapping };
192
196
  export type { ApplicationStoreType, ErrorBoundaryProps, InstitutionInfo };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@campxdev/campx-web-utils",
3
- "version": "2.0.0",
3
+ "version": "2.0.2",
4
4
  "author": "CampX",
5
5
  "license": "MIT",
6
6
  "keywords": [
@@ -0,0 +1,19 @@
1
+ import { SingleSelect, SingleSelectProps } from '@campxdev/react-blueprint';
2
+ import { nonWorkspaceAxios } from '../config';
3
+
4
+ export const ResearchExpertSelector = (props: SingleSelectProps) => {
5
+ return (
6
+ <SingleSelect
7
+ dbValueProps={{
8
+ valueKey: 'id',
9
+ }}
10
+ dbLabelProps={{
11
+ labelKey: 'name',
12
+ subLabelKey: 'organization',
13
+ }}
14
+ {...props}
15
+ optionsApiEndPoint="dropdowns/research-experts"
16
+ externalAxios={nonWorkspaceAxios}
17
+ />
18
+ );
19
+ };
@@ -0,0 +1,20 @@
1
+ import { nonWorkspaceAxios } from '@/config';
2
+ import { SingleSelect, SingleSelectProps } from '@campxdev/react-blueprint';
3
+
4
+ export const ResearchStageSelector = (props: SingleSelectProps) => {
5
+ // Escape 'order' column name as it's a reserved keyword in MySQL
6
+ return (
7
+ <SingleSelect
8
+ dbValueProps={{
9
+ valueKey: '`order`',
10
+ }}
11
+ dbLabelProps={{
12
+ labelKey: 'name',
13
+ subLabelKey: '`order`',
14
+ }}
15
+ {...props}
16
+ optionsApiEndPoint="dropdowns/research-stages"
17
+ externalAxios={nonWorkspaceAxios}
18
+ />
19
+ );
20
+ };
@@ -12,6 +12,8 @@ export * from './MonthYearSelector';
12
12
  export * from './PrintFormatSelector';
13
13
  export * from './ProgramSelector';
14
14
  export * from './RegulationSelector';
15
+ export * from './ResearchExpertSelector';
16
+ export * from './ResearchStageSelector';
15
17
  export * from './SemesterSelector';
16
18
  export * from './StudentSelector';
17
19
  export * from './StudentServicesSelector';