Skip to content

Commit

Permalink
VIEW COMPOSER ENHANCE FOR NO CARDSTYLE (#1567)
Browse files Browse the repository at this point in the history
* VIEW COMPOSER ENHANCE FOR NO CARDSTYLE

* package update
  • Loading branch information
abishekTa-egov authored Oct 18, 2024
1 parent bdb9943 commit 464357c
Show file tree
Hide file tree
Showing 12 changed files with 27 additions and 23 deletions.
2 changes: 1 addition & 1 deletion micro-ui/web/micro-ui-internals/example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"@egovernments/digit-ui-module-open-payment":"0.0.1",
"@egovernments/digit-ui-module-engagement": "1.5.20",
"@egovernments/digit-ui-components": "0.0.2-beta.48",
"@egovernments/digit-ui-react-components": "1.8.2-beta.13",
"@egovernments/digit-ui-react-components": "1.8.2-beta.14",
"@egovernments/digit-ui-module-sandbox": "0.0.1",
"http-proxy-middleware": "^1.0.5",
"react": "17.0.2",
Expand Down
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 @@ -73,7 +73,7 @@
"lodash": "4.17.21",
"microbundle-crl": "0.13.11",
"@egovernments/digit-ui-components": "0.0.2-beta.48",
"@egovernments/digit-ui-react-components": "1.8.2-beta.13",
"@egovernments/digit-ui-react-components": "1.8.2-beta.14",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-hook-form": "6.15.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"dependencies": {
"@egovernments/digit-ui-components": "0.0.2-beta.48",
"@egovernments/digit-ui-react-components": "1.8.2-beta.13",
"@egovernments/digit-ui-react-components": "1.8.2-beta.14",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-i18next": "11.16.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"react-router-dom": "5.3.0"
},
"dependencies": {
"@egovernments/digit-ui-react-components": "1.8.2-beta.13",
"@egovernments/digit-ui-react-components": "1.8.2-beta.14",
"@egovernments/digit-ui-module-utilities":"1.0.1-beta.39",
"jsonpath": "^1.1.1",
"react": "17.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"prepublish": "yarn build"
},
"dependencies": {
"@egovernments/digit-ui-react-components": "1.8.2-beta.13",
"@egovernments/digit-ui-react-components": "1.8.2-beta.14",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-hook-form": "6.15.8",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"react-router-dom": "5.3.0"
},
"dependencies": {
"@egovernments/digit-ui-react-components": "1.8.2-beta.13",
"@egovernments/digit-ui-react-components": "1.8.2-beta.14",
"@egovernments/digit-ui-components": "0.0.2-beta.18",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"react-router-dom": "5.3.0"
},
"dependencies": {
"@egovernments/digit-ui-react-components": "1.8.2-beta.13",
"@egovernments/digit-ui-react-components": "1.8.2-beta.14",
"lodash.merge": "^4.6.2",
"react": "17.0.2",
"react-dom": "17.0.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"react-router-dom": "5.3.0"
},
"dependencies": {
"@egovernments/digit-ui-react-components": "1.8.2-beta.13",
"@egovernments/digit-ui-react-components": "1.8.2-beta.14",
"@egovernments/digit-ui-components": "0.0.2-beta.48",
"react": "17.0.2",
"react-date-range": "^1.4.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"dependencies": {
"@cyntler/react-doc-viewer": "1.10.3",
"@egovernments/digit-ui-components": "0.0.2-beta.48",
"@egovernments/digit-ui-react-components": "1.8.2-beta.13",
"@egovernments/digit-ui-react-components": "1.8.2-beta.14",
"axios": "^1.7.2",
"react": "17.0.2",
"react-date-range": "^1.4.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"dependencies": {
"@egovernments/digit-ui-components": "0.0.2-beta.48",
"@egovernments/digit-ui-react-components": "1.8.2-beta.13",
"@egovernments/digit-ui-react-components": "1.8.2-beta.14",
"@rjsf/core": "5.10.0",
"@rjsf/utils": "5.10.0",
"@rjsf/validator-ajv8": "5.10.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@egovernments/digit-ui-react-components",
"version": "1.8.2-beta.13",
"version": "1.8.2-beta.14",
"license": "MIT",
"main": "dist/index.js",
"module": "dist/index.modern.js",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -164,20 +164,24 @@ const ViewComposer = ({ isLoading = false, data, cardErrors, ...props }) => {
{cards
?.filter((card) => !card?.navigationKey && card?.sections)
?.map((card, cardIdx) => {
const { sections } = card;
const { sections, noCardStyle } = card;
const hasErrors = cardErrors?.[card?.errorName]?.filter((i) => i?.name === card?.name)?.length > 0;
return (
<Card
style={activeNav && card.navigationKey ? (activeNav !== card.navigationKey ? { display: "none" } : {}) : {}}
className={`employeeCard-override ${card?.cardStyle ? card?.cardStyle : ""} ${hasErrors ? "card-error" : ""}`}
ReactRef={hasErrors ? (el) => (cardRefs.current[cardIdx] = el) : null}

>
{hasErrors && scrollToCard(cardIdx)}
{sections?.map((section, sectionIdx) => {
return renderCardSectionJSX(section, cardErrors?.[card?.errorName ? card?.errorName : card?.name]);
})}
</Card>
noCardStyle ?
<div>
{sections?.map((section, sectionIdx) => {
return renderCardSectionJSX(section, cardErrors?.[card?.errorName ? card?.errorName : card?.name]);
})}
</div> :
<Card
style={activeNav && card.navigationKey ? (activeNav !== card.navigationKey ? { display: "none" } : {}) : {}}
className={`employeeCard-override ${card?.cardStyle ? card?.cardStyle : ""} ${hasErrors ? "card-error" : ""}`}
ReactRef={hasErrors ? (el) => (cardRefs.current[cardIdx] = el) : null}>
{hasErrors && scrollToCard(cardIdx)}
{sections?.map((section, sectionIdx) => {
return renderCardSectionJSX(section, cardErrors?.[card?.errorName ? card?.errorName : card?.name]);
})}
</Card>
);
})}
{/* This second section is for rendering cards that are part of the navBar) */}
Expand Down

0 comments on commit 464357c

Please sign in to comment.