@asaleh37/ui-base 25.9.16 → 25.9.17

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.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@asaleh37/ui-base",
3
- "version": "25.9.16",
3
+ "version": "25.9.17",
4
4
  "description": "",
5
5
  "license": "ISC",
6
6
  "author": "Ahmed Saleh Mohamed",
@@ -18,13 +18,17 @@ import { MsalProvider } from "@azure/msal-react";
18
18
 
19
19
  const App: React.FC<AppInfo> = (props: AppInfo) => {
20
20
  const dispatch = useDispatch();
21
- const msalInstance = new PublicClientApplication({
22
- auth: {
23
- clientId: props?.azureConfiguration?.frontEndClientId,
24
- authority: `https://login.microsoftonline.com/${props?.azureConfiguration?.tenantId}`,
25
- redirectUri: props?.azureConfiguration?.redirectURL,
26
- },
27
- });
21
+ let msalInstance;
22
+ if (props?.authenticationMethod === "AZURE") {
23
+ msalInstance = new PublicClientApplication({
24
+ auth: {
25
+ clientId: props?.azureConfiguration?.frontEndClientId,
26
+ authority: `https://login.microsoftonline.com/${props?.azureConfiguration?.tenantId}`,
27
+ redirectUri: props?.azureConfiguration?.redirectURL,
28
+ },
29
+ });
30
+ }
31
+
28
32
  LicenseInfo.setLicenseKey(props.muiPremiumKey);
29
33
  const LightThemeOptions: ThemeOptions = {
30
34
  components: {
@@ -0,0 +1,24 @@
1
+ import { useApiActions } from "../hooks";
2
+ import { FormElementProps, TemplateForm } from "./templates";
3
+
4
+ const ExampleTrial: React.FC = () => {
5
+ const formElements: FormElementProps[] = [
6
+ {
7
+ mode: "props",
8
+ type: "field",
9
+ props: {
10
+ fieldLabel: "test",
11
+ fieldName: "test",
12
+ fieldType: "combobox",
13
+ commonStoreKey: "SystemParameterTypes",
14
+ optionValueField: "value",
15
+ optionDisplayField: "value",
16
+ },
17
+ },
18
+ ];
19
+ const apiActions = useApiActions({});
20
+
21
+ return <TemplateForm apiActions={apiActions} elements={formElements} />;
22
+ };
23
+
24
+ export default ExampleTrial;
@@ -73,11 +73,13 @@ const ComboBox: React.FC<ComboBoxProps> = (props) => {
73
73
  props?.storeLoadParam,
74
74
  props?.dataQueryId,
75
75
  props?.commonStoreKey,
76
+ props?.options,
77
+ commonStoreData,
76
78
  ]);
77
79
 
78
80
  const { t } = useTranslation();
79
81
  const getValue = (v: string) => {
80
- for (let option of props.options) {
82
+ for (let option of comboboxData) {
81
83
  if (option[props.valueField] == v) {
82
84
  return option;
83
85
  }
@@ -31,5 +31,12 @@ export const findNavigationItemById = (
31
31
  };
32
32
 
33
33
  export const NavigationItems: TreeViewBaseItem<ExtendedTreeItemProps>[] = [
34
- ...AdministrationItems
34
+ ...AdministrationItems,
35
+ {
36
+ id: "example",
37
+ icon: "wind",
38
+ action: "NAVIGATION",
39
+ actionPayload: { path: "example" },
40
+ label: "Example",
41
+ },
35
42
  ];
@@ -1,5 +1,8 @@
1
-
1
+ import ExampleTrial from "../components/ExampleTrial";
2
2
  import { ADMINISTRATION_ROUTES } from "./administration";
3
3
  import { SystemRoute } from "./types";
4
4
 
5
- export const SYSTEM_ROUTES: Array<SystemRoute> = [...ADMINISTRATION_ROUTES];
5
+ export const SYSTEM_ROUTES: Array<SystemRoute> = [
6
+ ...ADMINISTRATION_ROUTES,
7
+ { path: "example", component: ExampleTrial },
8
+ ];