Skip to content

Commit

Permalink
Merge pull request #67 from merative/ab/replace-spm-with-curam
Browse files Browse the repository at this point in the history
Replace SPM -> Curam
  • Loading branch information
bdjos1 authored May 27, 2024
2 parents 4606e4a + 70f2bbd commit 6905d08
Show file tree
Hide file tree
Showing 18 changed files with 45 additions and 48 deletions.
6 changes: 3 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,11 @@ Not applicable

For more information about the React Developer Tools browser extension, see [React Developer Tools](https://chrome.google.com/webstore/detail/react-developer-tools/fmkadmapgofadopljbjfkapdkoienihi?hl=en).

For more information about Merative™ Social Program Management, see the [documentation](https://curam-spm-devops.github.io/wh-support-docs/spm/pdf-documentation).
For more information about Cúram, see the [documentation](https://curam-spm-devops.github.io/wh-support-docs/spm/pdf-documentation).

For more information about server-side changes, see the [Merative Social Program Management release notes](https://www-01.ibm.com/support/docview.wss?uid=swg27037963) for your version.
For more information about server-side changes, see the [Cúram release notes](https://www-01.ibm.com/support/docview.wss?uid=swg27037963) for your version.

For more information about the IBM Carbon Design System v10, see [https://v10.carbondesignsystem.com/](https://v10.carbondesignsystem.com/).
For more information about the IBM Carbon Design System, see [https://carbondesignsystem.com/](https://carbondesignsystem.com/).

## 1.0.0 - 26/11/2021 ![SPM 8.0.1](https://img.shields.io/badge/-SPM_8.0.1-green)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# UI Addon Development Environment

A collection of front-end tools and libraries that can be used to extend UIM with JavaScript components. It enables rapid development of SPM custom application pages based on the IBM Carbon Design System.
A collection of front-end tools and libraries that can be used to extend UIM with JavaScript components. It enables rapid development of Cúram custom application pages based on the IBM Carbon Design System.

The documentation is available at this URL: [https://merative.github.io/spm-ui-addon-devenv/](https://merative.github.io/spm-ui-addon-devenv/)
5 changes: 2 additions & 3 deletions cookbook/gatsby-config.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
const siteTitle = "Merative SPM UI Addon Development Environment";
const siteTitle = "Cúram UI Addon Development Environment";
const sitePrefix = process.env.SITE_PREFIX || "/spm-ui-addon-devenv";

module.exports = {
siteMetadata: {
title: siteTitle,
description:
"Merative Social Program Management UI Addon Development Environment",
description: "Cúram UI Addon Development Environment",
keywords: "merative,curam,containers",
},
pathPrefix: sitePrefix,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import Header from 'gatsby-theme-carbon/src/components/Header';

const CustomHeader = (props) => (
<Header {...props}>
Merative&nbsp;<span>SPM UI Addon Development Environment</span>
<span>Cúram UI Addon Development Environment</span>
</Header>
);

Expand Down
2 changes: 1 addition & 1 deletion cookbook/src/gatsby-theme-carbon/templates/Homepage.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import HomepageTemplate from 'gatsby-theme-carbon/src/templates/Homepage';

import Carbon from '../../images/carbon.jpg';

const BannerText = () => <h1>Social Program Management UI Add-on Development Environment</h1>;
const BannerText = () => <h1>Cúram UI Add-on Development Environment</h1>;

const customProps = {
Banner: <HomepageBanner renderText={BannerText} image={Carbon} />,
Expand Down
2 changes: 1 addition & 1 deletion cookbook/src/pages/build.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ Build your components in your development environment during development. For mo
npm run dev
```

If you use the GraphQL mock service, use this command to run the development build. The command is the same as the `npm run dev` command, but prioritizes the data from the mock GraphQL service over the real REST Service when running in Social Program Management.
If you use the GraphQL mock service, use this command to run the development build. The command is the same as the `npm run dev` command, but prioritizes the data from the mock GraphQL service over the real REST Service when running in Cúram.

```
export GRAPHQL_SERVER_URL=http://localhost:4000/graphql && npm run dev-with-mockgraphql
Expand Down
6 changes: 3 additions & 3 deletions cookbook/src/pages/command-reference.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ This command builds the deliverable artefacts from the installed codebase. For m
npm run dev
```

This command tests the integration with Social Program Management. It requires the `CLIENT_DIR` environment variable to be set.
It copies the generated artefects from `npm run build` to the location where they can be picked up by Social Program Management.
This command tests the integration with Cúram. It requires the `CLIENT_DIR` environment variable to be set.
It copies the generated artefects from `npm run build` to the location where they can be picked up by Cúram.
After you run the command, any JavaScript or SCSS files that are updated are automatically generated. For more information, see [Building during development](build).

```
export GRAPHQL_SERVER_URL=http://localhost:4000/graphql && npm run dev-with-mockgraphql
```

This command is the same as the `npm run dev` command, but prioritizes the data from the mock GraphQL service over the real REST Service when running in SPM. It requires the `CLIENT_DIR` environment variable to be set.
This command is the same as the `npm run dev` command, but prioritizes the data from the mock GraphQL service over the real REST Service when running in Cúram. It requires the `CLIENT_DIR` environment variable to be set.

```
npm run test
Expand Down
4 changes: 2 additions & 2 deletions cookbook/src/pages/development-environment.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ carbon-addon-devenv

An `npm` file is provided for the following open source packages:

- Carbon Design System, which is an IBM open source design system. It consists of working code, design tools and resources, and human interface guidelines. For more information, see the [Carbon v10 website](https://v10.carbondesignsystem.com/).
- Carbon Design System, which is an IBM open source design system. It consists of working code, design tools and resources, and human interface guidelines. For more information, see the [Carbon website](https://carbondesignsystem.com/).
- React, which is an open source JavaScript library that enables developers to build human-centered user interfaces.
- GraphQL, which is an open source data query language that enables developers to query and configure complex data queries that aggregate information from different database entities.
- Apollo Client, which is an open source library that enables GraphQL developers to manage information state. Apollo Client provides the infrastructure for caching data.
Expand All @@ -55,7 +55,7 @@ custom-carbon-addons
## The `graphql-mocks` package

The `graphql-mocks` package is where you can place data for mock GraphQL queries. This package essentially provides a
lightweight mock GraphQL service that simulates the real GraphQL service from SPM.
lightweight mock GraphQL service that simulates the real GraphQL service from Cúram.

```
graphql-mocks
Expand Down
8 changes: 4 additions & 4 deletions cookbook/src/pages/development-process.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ description: Development process

- Use the React Add-on Development environment to develop React components. You can use React components directly from the IBM Carbon Design System or, if you can't find what you need, create your own Carbon Add-on components in React. A Carbon add-on is a custom component that conforms to the IBM Carbon Design System guidelines. Some sample add-on components are provided in the repository for reference. You can do your front-end development in parallel with your back-end development or in isolation.

- Use the standard Social Program Management client development environment (CDEJ) to create UIM pages and create Java renderers to render your components on UIM pages in the web client application.
- Use the standard Cúram client development environment (CDEJ) to create UIM pages and create Java renderers to render your components on UIM pages in the web client application.

## Getting started with Carbon React JavaScript development

The Carbon Design System provides design guidance for the development of user interface components based on the Carbon Design System and implemented in a number of frameworks, including React.

- For more information about IBM Carbon Design System, see the [Carbon v10 website](https://v10.carbondesignsystem.com/) and the [Carbon v10 Storybook](https://v10-react.carbondesignsystem.com/?path=/story/getting-started--welcome).
- For more information about IBM Carbon Design System, see the [Carbon website](https://carbondesignsystem.com/) and the [Carbon Storybook](https://react.carbondesignsystem.com/?path=/docs/getting-started-welcome--welcome).

- If you are new to Carbon and React development, see [Carbon React Frameworks](https://v10.carbondesignsystem.com/developing/frameworks/react/) and the [Carbon v10 React tutorial](https://v10.carbondesignsystem.com/developing/react-tutorial/overview/), and the Facebook [Create React App](https://github.com/facebook/create-react-app/blob/main/packages/cra-template/template/README.md) documentation to get you started.
- If you are new to Carbon and React development, see [Carbon React Frameworks](https://carbondesignsystem.com/developing/frameworks/react/) and the [Carbon React tutorial](https://.carbondesignsystem.com/developing/react-tutorial/overview/), and the Facebook [Create React App](https://github.com/facebook/create-react-app/blob/main/packages/cra-template/template/README.md) documentation to get you started.

# Back-end development

Using the Social Program Management server development environment and GraphQL functionality, implement domain definitions and the services (business logic) to create/update/get the data for your components. GraphQL is recommended for the back-end data service, especially for data intensive screens, see [https://www.ibm.com/docs/en/spm/8.0.2?topic=apis-graphql](https://www.ibm.com/docs/en/spm/8.0.2?topic=apis-graphql).
Using the Cúram server development environment and GraphQL functionality, implement domain definitions and the services (business logic) to create/update/get the data for your components. GraphQL is recommended for the back-end data service, especially for data intensive screens, see [https://www.ibm.com/docs/en/spm/8.0.2?topic=apis-graphql](https://www.ibm.com/docs/en/spm/8.0.2?topic=apis-graphql).
4 changes: 2 additions & 2 deletions cookbook/src/pages/environment-variables.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The following environment variables are available for the development environmen

### CLIENT_DIR

Specifies the location of the `webclient` directory in the development installation. This value is used to test the integration of components with custom UIM or VIM pages in Social Program Management.
Specifies the location of the `webclient` directory in the development installation. This value is used to test the integration of components with custom UIM or VIM pages in Cúram.

```
CLIENT_DIR=<CLIENT_DIR> 
Expand Down Expand Up @@ -48,7 +48,7 @@ Where `server` is the domain name or IP address of the server and `port` is the

## Security Configuration

If you have enabled Cross-Site Request Forgery (CSRF) protection in Social Program Management, you must set the following environment variables for production (.env).
If you have enabled Cross-Site Request Forgery (CSRF) protection in Cúram, you must set the following environment variables for production (.env).
For more information about configuring CSRF in a React environment, see [Enabling Cross-Site Request Forgery (CSRF) protection for Universal Access](https://www.ibm.com/docs/en/spm/8.0.2?topic=sauara-enabling-cross-site-request-forgery-csrf-protection-universal-access).

### CSRF_TOKEN_ENPOINT
Expand Down
6 changes: 3 additions & 3 deletions cookbook/src/pages/graphql-query.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,13 @@ description: Implement a GraphQL query

A GraphQL query provides the data access between the service layer that contains the business logic and the UI components on your custom page. GraphQL queries can be large and used to serve data for many components, or they can be more granular and used for a specific component, such as `componentX`.

In Merative Social Program Management, the GraphQL infrastructure is built into the REST application and is deployed as part of the REST EAR. In your Tomcat development environment, build and deploy the GraphQL APIs to work on GraphQL queries.
In Cúram, the GraphQL infrastructure is built into the REST application and is deployed as part of the REST EAR. In your Tomcat development environment, build and deploy the GraphQL APIs to work on GraphQL queries.

Alternatively, the UI Addon Development Environment provides a lightweight mock GraphQL service, so you can develop and test your Carbon components before the GraphQL queries are available.

# Getting started with GraphQL

Use the following guidance to familiarize yourself with GraphQL queries in Social Program Management. You can look at an existing GraphQL API and run some simple test queries to return data.
Use the following guidance to familiarize yourself with GraphQL queries in Cúram. You can look at an existing GraphQL API and run some simple test queries to return data.

1. You must enable GraphQL and GraphQL introspection by setting the `curam.graphql.endpoint.enabled` and `curam.graphql.introspection.enabled` system properties, see [Configuring GraphQL properties](https://www.ibm.com/docs/en/spm/8.0.2?topic=graphql-configuring-properties).
2. Build the application in your Tomcat environment to make the GraphQL APIs available, see [Building and deploying GraphQL APIs on Tomcat](https://www.ibm.com/docs/en/spm/8.0.2?topic=apis-building-deploying-graphql-tomcat).
Expand All @@ -26,7 +26,7 @@ For data that is not available through existing GraphQL APIs, create your own Gr

# Setting up the mock GraphQL service

While the REST Service provides the real data from the GraphQL queries in Social Program Management, you can use a lightweight mock GraphQL service to enable rapid development almost exclusively in your front-end environment. To develop your Carbon components before the real GraphQL queries are available, you can use the mock GraphQL service with Carbon components in Storybook or when testing the integration with SPM.
While the REST Service provides the real data from the GraphQL queries in Cúram, you can use a lightweight mock GraphQL service to enable rapid development almost exclusively in your front-end environment. To develop your Carbon components before the real GraphQL queries are available, you can use the mock GraphQL service with Carbon components in Storybook or when testing the integration with Cúram.

To add mock data to the mock GraphQL service, complete the following steps in the `graphql-mocks` package. Refer to the provided examples in the directories for guidance.

Expand Down
2 changes: 1 addition & 1 deletion cookbook/src/pages/integrate-addon-in-uim.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ description: Integrating components with the UIM page
Here's how to integrate a component with a UIM page with reference to the sample add-on components in the `carbon-addon-devenv` package.

1. Implement GraphQL to match the sample query. A GraphQL back-end service is needed to provide the data access for the sample components.
For the components to display properly when integrated in a UIM page, You must implement a GraphQL query in Social Program Management.
For the components to display properly when integrated in a UIM page, You must implement a GraphQL query in Cúram.
The query must match the data expected in the front-end queries of the sample components.
2. Reference the sample Sass. To enable the look and feel for the sample components,
uncomment the commented line in the `scss/index.scss` file.
Expand Down
4 changes: 2 additions & 2 deletions cookbook/src/pages/new-custom-component.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,14 @@ The steps do not need to be done in this order, but it is currently the recommen
- In the `custom-carbon-addons` package, create a directory for the component in the `react` directory. For example, `custom-carbon-addons/src/react/addons/componentX`.
- Create the JavaScript files for `componentX` in the directory. To create add-on components that are based on Carbon components, import the Carbon components from the `carbon-components` node module.
- You can do your unit tests in parallel to test the generated HTML output from the component.
2. Implement the look and feel of the component with Sass. Ensure that you follow the Carbon and Social Program Management design guidance.
2. Implement the look and feel of the component with Sass. Ensure that you follow the Carbon and Cúram design guidance.
- In the `custom-carbon-addon/src/scss/addons` directory, create an SCSS file for the component. For example, `componentX.scss`.
- Import `componentX.scss` into the `index.scss` file.
3. Implement a query provider in Apollo Client. An Apollo Client query provider enables the cached data from GraphQL to be integrated with a React component. Complete the following steps:
- Create a directory in the `custom-carbon-addon/src/apollo-client-hooks/hooks` directory. For example, `componentX`.
- Create the JavaScript files for your query provider with reference to the samples in `carbon-addons-devenv/src/apollo-client-hooks/hooks/hook_samples`.
Use the `ApolloClientDataProvider`, `ApolloClientQueryProvider`, and `ApolloClientHookTemplate` React helper components in `carbon-addons-devenv/src/apollo-client-hooks/hooks/core` to help with this task.
- Create a query that accesses data from the back-end by importing `gql` and `useQuery` from `@apollo/client`. If you already have a GraphQL query that serves a number of components, you can use that query.
4. Test the Carbon component in Storybook. To test `componentX` in storybook, you can test components in isolation before you integrate them into Social Program Management.
4. Test the Carbon component in Storybook. To test `componentX` in storybook, you can test components in isolation before you integrate them into Cúram.
- In the `stories` directory of the `custom-carbon-addon` package, create a directory for the component. For example, `custom-carbon-addon/stories/componentX`. Run `npm run storybook` to test components.
5. Create a JavaScript renderer function. You can use the `Renderer.create()` helper function to implement a JavaScript Renderer function to integrate the component into a Java Renderer on the UIM page. You can place your renderer functions in the `custom-carbon-addon/renderers` directory. For example, create the`CarbonComponentXViewRenderer` function.
2 changes: 1 addition & 1 deletion cookbook/src/pages/overview-customization.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ title: Overview of customization
description: Overview of customization
---

You can use this JavaScript development environment to create or customize JavaScript components that are rendered on a UIM page in the Social Program Management application.
You can use this JavaScript development environment to create or customize JavaScript components that are rendered on a UIM page in the Cúram application.
You can customize the application as follows:

- Create a custom page, see [Creating custom pages](custom-pages).
Expand Down
Loading

0 comments on commit 6905d08

Please sign in to comment.