Skip to content

Commit

Permalink
Merge branch 'develop' into SN-261
Browse files Browse the repository at this point in the history
  • Loading branch information
NabeelAyubee committed Oct 4, 2024
2 parents 4a4b159 + 2fccfed commit 5904bd0
Show file tree
Hide file tree
Showing 13 changed files with 198 additions and 11 deletions.
2 changes: 1 addition & 1 deletion micro-ui/web/micro-ui-internals/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"dev:components": "cd packages/react-components && yarn start",
"dev:example": "cd example && yarn start",
"dev:core": "cd packages/modules/core && yarn start",
"devD:dss": "cd packages/modules/dss && yarn start",
"dev:dss": "cd packages/modules/dss && yarn start",
"dev:hrms": "cd packages/modules/hrms && yarn start",
"devD:common": "cd packages/modules/common && yarn start",
"devD:utilities": "cd packages/modules/utilities && yarn start",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,12 +116,12 @@ export const StoreService = {
stateInfo: {
code: tenantConfigFetch ? tenantConfigSearch?.[0]?.code : stateInfo.code,
name: tenantConfigFetch ? tenantConfigSearch?.[0]?.name : stateInfo.name,
logoUrl: tenantConfigFetch ? logoUrl?.data?.fileStoreIds?.[0]?.url ? logoUrl?.data?.fileStoreIds?.[0]?.url?.split(',')[0] : tenantConfigSearch?.[0]?.documents?.find((item) => item.type === "logoUrl")?.url : stateInfo.logoUrl,
logoUrl: tenantConfigFetch ? logoUrl?.data?.fileStoreIds?.[0]?.url ? logoUrl?.data?.fileStoreIds?.[0]?.url?.split('?')[0] : tenantConfigSearch?.[0]?.documents?.find((item) => item.type === "logoUrl")?.url : stateInfo.logoUrl,
statelogo: tenantConfigFetch ? tenantConfigSearch?.[0]?.documents?.find((item) => item.type === "statelogo")?.url : stateInfo.statelogo,
logoUrlWhite: tenantConfigFetch
? tenantConfigSearch?.[0]?.documents?.find((item) => item.type === "logoUrlWhite")?.url
: stateInfo.logoUrlWhite,
bannerUrl: tenantConfigFetch ? bannerUrl?.data?.fileStoreIds?.[0]?.url ? bannerUrl?.data?.fileStoreIds?.[0]?.url?.split(',')[0] : tenantConfigSearch?.[0]?.documents?.find((item) => item.type === "bannerUrl")?.url : stateInfo.bannerUrl,
bannerUrl: tenantConfigFetch ? bannerUrl?.data?.fileStoreIds?.[0]?.url ? bannerUrl?.data?.fileStoreIds?.[0]?.url?.split('?')[0] : tenantConfigSearch?.[0]?.documents?.find((item) => item.type === "bannerUrl")?.url : stateInfo.bannerUrl,
},
localizationModules: stateInfo.localizationModules,
modules:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -87,9 +87,14 @@ export const convertToLocaleData = (dropdownValues = [], key = "", t) => {
* @returns {Array} Returns the Array of object
*/
export const getTransformedLocale = (label) => {
if (typeof label === "number") return label;
label = label?.trim();
return label && label.toUpperCase().replace(/[.:-\s\/]/g, "_");
if (typeof label === "number") {
return label;
} else if (typeof label === "string") {
label = label?.trim();
return label && label.toUpperCase().replace(/[.:-\s\/]/g, "_");
} else {
return null;
}
};

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,4 +303,4 @@ const CustomPieChart = ({ dataKey = "value", data, setChartDenomination,variant=
);
};

export default CustomPieChart;
export default CustomPieChart;
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const ConfigUploaderComponent = ({ onSelect, ...props }) => {
variant="uploadFile"
onUpload={(files) => selectFile(files)}
iserror={uploadErrorMessage}
accept="image/*, .jpg, .png, .jpeg"
accept=".jpg, .png, .jpeg"
// if (files && files.length > 0) {
// handleUploadFile(files);
// }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const LogoUploaderComponent = ({ onSelect, ...props }) => {
variant="uploadFile"
onUpload={(files) => selectFile(files)}
iserror={uploadErrorMessage}
accept="image/*, .jpg, .png, .jpeg"
accept=".jpg, .png, .jpeg"
// if (files && files.length > 0) {
// handleUploadFile(files);
// }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -783,6 +783,9 @@ import {
ZoomIn,
ZoomOut,
ZoomOutMap,
ContractIcon,
HRIcon,
MeasurementMuktaIcon
} from "@egovernments/digit-ui-svg-components";


Expand Down Expand Up @@ -1572,4 +1575,7 @@ import {
ZoomIn,
ZoomOut,
ZoomOutMap,
ContractIcon,
HRIcon,
MeasurementMuktaIcon
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-svg-components",
"version": "1.0.11",
"version": "1.0.12",
"main": "dist/index.js",
"module": "dist/index.modern.js",
"source": "src/index.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -804,6 +804,9 @@ import { MapLayerIcon } from "./svg/MapLayerIcon"
import { Church } from "./svg/Church"
import { HealthFacility } from "./svg/HealthFacility"
import { SchoolBuilding } from "./svg/SchoolBuilding"
import { ContractIcon } from "./svg/ContractIcon";
import { MeasurementMuktaIcon } from "./svg/MeasurementMuktaIcon";
import { HRIcon } from "./svg/HRIcon";

export {
Add,
Expand Down Expand Up @@ -1611,5 +1614,8 @@ export {
Church,
HealthFacility,
SchoolBuilding,
Warehouse
Warehouse,
ContractIcon,
HRIcon,
MeasurementMuktaIcon
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
import React from "react";
import PropTypes from "prop-types";
import { COLOR_FILL } from "./constants";

export const ContractIcon = ({
className = "",
height = "27",
width = "24",
style = {},
fill = COLOR_FILL,
onClick = null,
}) => {
return (
<svg
width={width}
height={height}
onClick={onClick}
className={className}
style={style}
viewBox="0 0 24 27"
fill={fill}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M21.3333 3.00065H15.76C15.2 1.45398 13.7333 0.333984 12 0.333984C10.2667 0.333984 8.8 1.45398 8.24 3.00065H2.66667C1.2 3.00065 0 4.20065 0 5.66732V24.334C0 25.8007 1.2 27.0007 2.66667 27.0007H21.3333C22.8 27.0007 24 25.8007 24 24.334V5.66732C24 4.20065 22.8 3.00065 21.3333 3.00065ZM12 3.00065C12.7333 3.00065 13.3333 3.60065 13.3333 4.33398C13.3333 5.06732 12.7333 5.66732 12 5.66732C11.2667 5.66732 10.6667 5.06732 10.6667 4.33398C10.6667 3.60065 11.2667 3.00065 12 3.00065Z"
fill={fill}
/>
<g clipPath="url(#clip0_1_3)">
<path d="M14.9269 16.7879L13.3359 18.3789L17.8331 22.8761L19.4241 21.2851L14.9269 16.7879Z" fill="#0B4B66" />
<path
d="M16.1242 14.4996C17.5717 14.4996 18.7492 13.3221 18.7492 11.8746C18.7492 11.4396 18.6292 11.0346 18.4417 10.6746L16.4167 12.6996L15.2992 11.5821L17.3242 9.55711C16.9642 9.36961 16.5592 9.24961 16.1242 9.24961C14.6767 9.24961 13.4992 10.4271 13.4992 11.8746C13.4992 12.1821 13.5592 12.4746 13.6567 12.7446L12.2692 14.1321L10.9342 12.7971L11.4667 12.2646L10.4092 11.2071L11.9992 9.61711C11.1217 8.73961 9.69672 8.73961 8.81922 9.61711L6.16422 12.2721L7.22172 13.3296H5.10672L4.57422 13.8621L7.22922 16.5171L7.76172 15.9846V13.8621L8.81922 14.9196L9.35172 14.3871L10.6867 15.7221L5.12922 21.2796L6.71922 22.8696L15.2542 14.3421C15.5242 14.4396 15.8167 14.4996 16.1242 14.4996Z"
fill="#0B4B66"
/>
</g>
<defs>
<clipPath id="clip0_1_3">
<rect width="18" height="18" fill="white" transform="translate(3 7)" />
</clipPath>
</defs>
</svg>
);
};

ContractIcon.propTypes = {
/** custom width of the svg icon */
width: PropTypes.string,
/** custom height of the svg icon */
height: PropTypes.string,
/** custom colour of the svg icon */
fill: PropTypes.string,
/** custom class of the svg icon */
className: PropTypes.string,
/** custom style of the svg icon */
style: PropTypes.object,
/** Click Event handler when icon is clicked */
onClick: PropTypes.func,
};

ContractIcon.defaultProps = {
fill: COLOR_FILL,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
import React from "react";
import PropTypes from "prop-types";
import { COLOR_FILL } from "./constants";

export const HRIcon = ({
className = "",
height = "28",
width = "28",
style = {},
fill = COLOR_FILL,
onClick = null,
}) => {
return (
<svg
width={width}
height={height}
onClick={onClick}
className={className}
style={style}
viewBox="0 0 28 28"
fill={fill}
xmlns="http://www.w3.org/2000/svg"
>
<path
d="M3.33464 6.00033H0.667969V24.667C0.667969 26.1337 1.86797 27.3337 3.33464 27.3337H22.0013V24.667H3.33464V6.00033ZM24.668 0.666992H8.66797C7.2013 0.666992 6.0013 1.86699 6.0013 3.33366V19.3337C6.0013 20.8003 7.2013 22.0003 8.66797 22.0003H24.668C26.1346 22.0003 27.3346 20.8003 27.3346 19.3337V3.33366C27.3346 1.86699 26.1346 0.666992 24.668 0.666992ZM16.668 3.33366C18.8813 3.33366 20.668 5.12033 20.668 7.33366C20.668 9.54699 18.8813 11.3337 16.668 11.3337C14.4546 11.3337 12.668 9.54699 12.668 7.33366C12.668 5.12033 14.4546 3.33366 16.668 3.33366ZM24.668 19.3337H8.66797V17.3337C8.66797 14.6803 14.0013 13.3337 16.668 13.3337C19.3346 13.3337 24.668 14.6803 24.668 17.3337V19.3337Z"
fill={fill}
/>
</svg>
);
};

HRIcon.propTypes = {
/** custom width of the svg icon */
width: PropTypes.string,
/** custom height of the svg icon */
height: PropTypes.string,
/** custom colour of the svg icon */
fill: PropTypes.string,
/** custom class of the svg icon */
className: PropTypes.string,
/** custom style of the svg icon */
style: PropTypes.object,
/** Click Event handler when icon is clicked */
onClick: PropTypes.func,
};

HRIcon.defaultProps = {
fill: COLOR_FILL,
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import React from "react";
import PropTypes from "prop-types";

export const MeasurementMuktaIcon = ({
className = "",
height = "40",
width = "40",
style = {},
fill = "#FFFFFF",
onClick = null,
}) => {
return (
<svg
width={width}
height={height}
onClick={onClick}
className={className}
style={style}
viewBox="0 0 40 40"
fill={fill}
xmlns="http://www.w3.org/2000/svg"
>
<g clipPath="url(#clip0_9180_23766)">
<path
d="M35.0013 8.33333C33.1513 7.75 31.118 7.5 29.168 7.5C25.918 7.5 22.418 8.16667 20.0013 10C17.5846 8.16667 14.0846 7.5 10.8346 7.5C7.58463 7.5 4.08464 8.16667 1.66797 10V34.4167C1.66797 34.8333 2.08464 35.25 2.5013 35.25C2.66797 35.25 2.7513 35.1667 2.91797 35.1667C5.16797 34.0833 8.41797 33.3333 10.8346 33.3333C14.0846 33.3333 17.5846 34 20.0013 35.8333C22.2513 34.4167 26.3346 33.3333 29.168 33.3333C31.918 33.3333 34.7513 33.8333 37.0846 35.0833C37.2513 35.1667 37.3346 35.1667 37.5013 35.1667C37.918 35.1667 38.3346 34.75 38.3346 34.3333V10C37.3346 9.25 36.2513 8.75 35.0013 8.33333ZM35.0013 30.8333C33.168 30.25 31.168 30 29.168 30C26.3346 30 22.2513 31.0833 20.0013 32.5V13.3333C22.2513 11.9167 26.3346 10.8333 29.168 10.8333C31.168 10.8333 33.168 11.0833 35.0013 11.6667V30.8333Z"
fill={fill}
/>
<path
d="M29.168 17.5C30.6346 17.5 32.0513 17.65 33.3346 17.9333V15.4C32.018 15.15 30.6013 15 29.168 15C26.3346 15 23.768 15.4833 21.668 16.3833V19.15C23.5513 18.0833 26.168 17.5 29.168 17.5Z"
fill={fill}
/>
</g>
<defs>
<clipPath id="clip0_9180_23766">
<rect width="40" height="40" fill="white" />
</clipPath>
</defs>
</svg>
);
};

MeasurementMuktaIcon.propTypes = {
/** Custom width of the svg icon */
width: PropTypes.string,
/** Custom height of the svg icon */
height: PropTypes.string,
/** Custom color of the svg icon */
fill: PropTypes.string,
/** Custom class of the svg icon */
className: PropTypes.string,
/** Custom style of the svg icon */
style: PropTypes.object,
/** Click event handler for the icon */
onClick: PropTypes.func,
};

MeasurementMuktaIcon.defaultProps = {
fill: "#FFFFFF",
};
1 change: 1 addition & 0 deletions micro-ui/web/sandbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"@egovernments/digit-ui-module-sandbox": "0.0.1",
"@egovernments/digit-ui-module-workbench": "1.0.2-beta.8",
"@egovernments/digit-ui-components": "0.0.2-beta.31",
"@egovernments/digit-ui-module-dss": "1.8.1",
"@egovernments/digit-ui-module-core": "1.8.2-beta.19",
"@egovernments/digit-ui-module-hrms": "1.8.1-beta.1",
"@egovernments/digit-ui-module-dss": "1.8.1",
Expand Down

0 comments on commit 5904bd0

Please sign in to comment.