@m4l/layouts 0.0.12 → 0.0.15

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.
@@ -72,7 +72,7 @@ function MasterDetailLayout(props) {
72
72
  } = props;
73
73
  const {
74
74
  host_static_assets,
75
- environment
75
+ environment_assets
76
76
  } = useEnvironment();
77
77
  const [splitPosition, setSplitPosition] = useState("vertical");
78
78
  const isDesktop = useResponsiveDesktop();
@@ -90,7 +90,7 @@ function MasterDetailLayout(props) {
90
90
  setSplitPosition(newPostion);
91
91
  };
92
92
  const initialSplitActions = [{
93
- urlIcon: `${host_static_assets}/${environment}/frontend/components/masterdetaillayout/assets/icons/split_vertical.svg`,
93
+ urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/masterdetaillayout/assets/icons/split_vertical.svg`,
94
94
  onClick: () => onChangePostionInternal("vertical"),
95
95
  disabled: true,
96
96
  visibility: "main",
@@ -98,7 +98,7 @@ function MasterDetailLayout(props) {
98
98
  tag: "vertical",
99
99
  className: "splitactions"
100
100
  }, {
101
- urlIcon: `${host_static_assets}/${environment}/frontend/components/masterdetaillayout/assets/icons/split_horizontal.svg`,
101
+ urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/masterdetaillayout/assets/icons/split_horizontal.svg`,
102
102
  onClick: () => onChangePostionInternal("horizontal"),
103
103
  disabled: false,
104
104
  visibility: "main",
@@ -106,7 +106,7 @@ function MasterDetailLayout(props) {
106
106
  tag: "horizontal",
107
107
  className: "splitactions"
108
108
  }, {
109
- urlIcon: `${host_static_assets}/${environment}/frontend/components/masterdetaillayout/assets/icons/no_split.svg`,
109
+ urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/masterdetaillayout/assets/icons/no_split.svg`,
110
110
  onClick: () => onChangePostionInternal("none"),
111
111
  disabled: false,
112
112
  visibility: "main",
@@ -125,7 +125,7 @@ function MasterDetailLayout(props) {
125
125
  }, [detailComponent]);
126
126
  const viewDetailAction = useMemo(() => {
127
127
  return {
128
- urlIcon: `${host_static_assets}/${environment}/frontend/components/masterdetaillayout/assets/icons/view_detail.svg`,
128
+ urlIcon: `${host_static_assets}/${environment_assets}/frontend/components/masterdetaillayout/assets/icons/view_detail.svg`,
129
129
  onClick: onClickViewDetail,
130
130
  disabled: false,
131
131
  visibility: "allways",
@@ -134,7 +134,7 @@ function MasterDetailLayout(props) {
134
134
  className: "",
135
135
  component: ButtonDetail
136
136
  };
137
- }, [environment, onClickViewDetail]);
137
+ }, [environment_assets, onClickViewDetail]);
138
138
  const [splitActions, setSplitActions] = useState(initialSplitActions);
139
139
  const finalModuleActions = useMemo(() => {
140
140
  const actions = getTotalModuleActions(splitActions, moduleActions, viewDetailAction, isDesktop);
@@ -3,7 +3,7 @@ import type { ReactNode } from 'react';
3
3
  import type { ModuleAction } from '../../types';
4
4
  export interface ModuleLayoutContextStateProps {
5
5
  urlIcon: string;
6
- moduleId: number;
6
+ moduleId: string;
7
7
  moduleNameField: string;
8
8
  breadcrumbLinks: TLink[];
9
9
  }
@@ -178,7 +178,7 @@ function SKTModuleHeader() {
178
178
  });
179
179
  }
180
180
  const initialState = {
181
- moduleId: 0,
181
+ moduleId: "",
182
182
  moduleNameField: "module_name",
183
183
  urlIcon: "",
184
184
  moduleActions: [],
@@ -16,7 +16,7 @@ export interface ModuleAction extends MenuAction {
16
16
  className?: string;
17
17
  }
18
18
  export interface ModuleLayoutProps extends HeaderProps {
19
- moduleId: number;
19
+ moduleId: string;
20
20
  urlIcon: string;
21
21
  moduleNameField?: string;
22
22
  breadcrumbLinks: TLink[];
@@ -4,7 +4,7 @@ export interface DomainStyleOptions {
4
4
  company_logo_normal_url: string;
5
5
  }
6
6
  export interface NoAuthModuleLayoutProviderProps {
7
- moduleId: number;
7
+ moduleId: string;
8
8
  children: ReactNode;
9
9
  }
10
10
  export interface NoAuthModuleLayoutContextProps extends Pick<NoAuthModuleLayoutProviderProps, 'moduleId'> {
@@ -109,7 +109,7 @@ const ModuleWrapper = (props) => {
109
109
  isSekeleton: isSkeleton,
110
110
  width: "100%",
111
111
  height: "auto",
112
- src: "https://s3.amazonaws.com/static.made4labs/environments/d1/frontend/domain/host/login/assets/img/illustration_login.png",
112
+ src: "https://s3.amazonaws.com/static.made4labs/environment_assetss/d1/frontend/domain/host/login/assets/img/illustration_login.png",
113
113
  alt: "illustration module",
114
114
  effect: "opacity"
115
115
  })]
@@ -151,7 +151,7 @@ const ModuleWrapper = (props) => {
151
151
  });
152
152
  };
153
153
  const initialState = {
154
- moduleId: 0,
154
+ moduleId: "",
155
155
  styleOptions: {
156
156
  company_logo_small_url: "",
157
157
  company_logo_normal_url: ""
@@ -4,7 +4,7 @@ export interface ContainerProps {
4
4
  }
5
5
  export declare type MenuActionType = 'main' | 'allways' | 'normal';
6
6
  export interface NoAuthModuleLayoutProps {
7
- moduleId: number;
7
+ moduleId: string;
8
8
  moduleName?: string;
9
9
  componentsDictionary: string[];
10
10
  children: ReactNode;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@m4l/layouts",
3
3
  "private": false,
4
- "version": "0.0.12",
4
+ "version": "0.0.15",
5
5
  "license": "UNLICENSED",
6
6
  "scripts": {
7
7
  "dev": "vite",
@@ -14,19 +14,16 @@
14
14
  "format": "npm run prettier:fix && npm run lint:fix"
15
15
  },
16
16
  "dependencies": {
17
- "@m4l/core": "^0.0.32",
18
- "@m4l/graphics": "^0.0.24",
17
+ "@m4l/components": "^0.0.38",
19
18
  "react": "^17.0.0 || 18.x",
20
19
  "react-dom": "^18.0.0"
21
20
  },
22
21
  "peerDependencies": {
23
- "@m4l/components": "^0.0.34",
24
22
  "react": "^17.0.0 || 18.x",
25
23
  "react-dom": "^18.0.0"
26
24
  },
27
25
  "devDependencies": {
28
26
  "@emotion/styled": "^11.9.3",
29
- "@m4l/components": "^0.0.34",
30
27
  "@testing-library/react": "^13.3.0",
31
28
  "@testing-library/user-event": "^14.2.1",
32
29
  "@types/node": "^17.0.40",