Skip to content

Commit

Permalink
Mod/spr/23.1.10 alpha (#398)
Browse files Browse the repository at this point in the history
* global.d.ts and index.d.ts no longer necessary

* Update to tsconfig "lib" to allow use of es2021 (replaceAll, etc.)

* US-566715 : gbLoggedIn export replaced with new sdkIsLoggedIn method

* Change required to work with newer auth.js (that supports upcoming authCode flow updates for better error handling)

* Latest updates to branch for internal 8.23.12 pre-release testing

* Fix update for dx-component-builder-sdk and add path to jest.config.js

* Add test:functional script (for tests to be added next week)

* Update to use latest 8.8 typedefs

* Update packageversion and to expect SDK-8.23.0 ConstJS files

* Update package.json to proper 8.23 packages

* Updated to use latest tgz files

* Update to use latest 23.1.10 tgzs

* Update constellation-comp-config/tsconfig to enable es2021 constructs

* Mods related to latest authManager tokenStorage updates (#380)

Co-authored-by: serav <[email protected]>

* Update tsconfig with typeRoots

* Update to latest versions of r-s-c and dxcb tgzs

* Point to updated tgzs for @pega/react-sdk-*

* Update tsconfigs to work with new typedefs

* update version and typedefs version

* Update to use 20231012 version of react-sdk-components/overrides

* Update to expect latest R-S-C tgzs

* Update versions of @pega/react-sdk-* tgzs

* Initial draft updated README

* Update to 20231020 tgzs

* Remove test:functional

* Update to use latest published DXCB-SDK package

* 20231101 updates to package.json

* Update query test to match what's in react-sdk-components

* Add tinymce and update tgz names

* TinyMCE library package added (#394)

* Update to use newest dx-component-builder-sdk for 23.1

* Update to use 20231106 version of tgzs

* 23.1.10-Alpha updates to Storybook

* Add _internal-test-functional to package.json

* Use published versions of @pega/react-sdk-*

* More updates to README

* Update to latest published dx-component-builder-sdk version

* Update KeyReleaseUpdates.md

* Update README.md

* Fix MediaCo tests failure

* Update expected version for dx-component-builder-sdk

* new package lock

* Update package-lock

* Revert package-lock to avoid problems (needs more testing)

---------

Co-authored-by: serav <[email protected]>
Co-authored-by: Vinod Seraphin <[email protected]>
Co-authored-by: tumms2021389 <[email protected]>
Co-authored-by: Niall Riddell <[email protected]>
Co-authored-by: Vishal <[email protected]>
Co-authored-by: gagnp <[email protected]>
  • Loading branch information
7 people authored Nov 9, 2023
1 parent 924a7e2 commit 4924858
Show file tree
Hide file tree
Showing 19 changed files with 726 additions and 582 deletions.
10 changes: 9 additions & 1 deletion .storybook/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@ module.exports = {
webpackFinal: (config) => {
config.resolve.alias['@pega/react-sdk-components/lib/bridge/react_pconnect'] = path.resolve(__dirname, '../__mocks__/react_pconnect.jsx');
config.resolve.alias['@pega/react-sdk-components/lib/components/designSystemExtension/DetailsFields'] = path.resolve(__dirname, '../__mocks__/DetailsFields.js');
config.module.rules.push({
test: /\.(d.ts)$/,
loader: 'null-loader',
});
config.module.rules.push({
test: /\.(map)$/,
loader: 'null-loader',
});
return config;
},
};
};
3 changes: 3 additions & 0 deletions .storybook/preview.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ import {
} from '@pega/cosmos-react-core';

import { decorator } from "../__mocks__/react_pconnect";
import { getSdkComponentMap } from '@pega/react-sdk-components/lib/bridge/helpers/sdk_component_map';

getSdkComponentMap();

export const decorators: DecoratorFn[] = [
(Story, context) => {
Expand Down
50 changes: 23 additions & 27 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,34 @@
<p align="center"><img width=60% src="docs/media/ReactSDK-Logo.png">

# React SDK - Release Announcement - v23.1.10

This release - **SDK-R v23.1.10** - is **only compatible with Pega Infinity 23**. This release is related to the [**main** branch of the React SDK repository](https://github.com/pegasystems/react-sdk/tree/main).
<br>
(If you currently are using the React SDK with Pega Infinity 8.8, update your SDK to
the [SDK-R v8.8.20 - release/8.8.20 branch](https://github.com/pegasystems/react-sdk/tree/release/8.8.20).)

# <span style="color: red">COMING SOON: Release 23.1.10 and Release 8.8.20</span>

**_New features in both releases_**:
* **type definition support, DX Component Builder improvements, enhanced token storage/security, easier configuration, bug fixes**

As Pega Infinity&trade; and Constellation UI architecture evolve, the
Constellation SDKs (including the React SDK) need to evolve with them.
Until now, we have been able to support both Infinity 8.8 and the Infinity '23
(the latest Infinity version) with the same React SDK code - Release 8.23.11

However, staying aligned with the Infinity and Constellation versions has led
to additional configuration tweaks that have made getting started with the
React SDK more error prone than we want.

Therefore, in the coming weeks, we will be introducing separate React SDK releases for Infinity '23 and Infinity 8.8 environments:

* Release **SDK-R v23.1.10** is only compatible with Pega Infinity '23.
* If you are currently using Pega Infinity '23 with React SDK v8.23.11, you should prepare to update your SDK to SDK-R v23.1.0 to take advantage of the latest SDK enhancements and fixes. If using Pega Infinity 8.8, continue using SDK-R v8.23.11 or SDK-R v8.23.10 (they support Pega Infinity 8.8.* and 23.1.*), or update to SDK-R 8.8.20, it supports Pega Infinity 8.8 only and includes all enhancements in SDK-R v8.23.11 and SDK-R v8.23.10.
The SDK-R v23.1.10 and v8.8.20 releases allow React SDK users to to take advantage of the latest
[SDK enhancements and fixes noted in **What's New in the SDK?**](https://docs.pega.com/bundle/constellation-sdk/page/constellation-sdks/sdks/react-sdk-updates.html) including:

* The release **SDK-R v8.8.20** is only compatible with Pega Infinity 8.8.
* If you are currently using Pega Infinity 8.8 with React SDK 8.23.11, you should prepare to update your SDK to SDK-R v8.8.20 to take advantage of the latest SDK enhancements and fixes.
* Added the use of **TypeScript typedefs** (from @pega/pcore-pconnect-typedefs) to SDK components.
For more information, see [Using type definitions](https://docs.pega.com/bundle/constellation-sdk/page/constellation-sdks/sdks/type-definitions-constellation-sdks.html)
* Additional functionality including **RichTextEditor** and **Dynamic Tabs** components and **many-to-many data reference** support
* Updated Cosmos support to cosmos 4 (for custom Constellation components).
* Enhanced security including token storage and item obfuscation support.
* Bug fixes.
* Full set of merged PRs can be found in the [react-sdk-components GitHub repo list of merged PRs](https://github.com/pegasystems/react-sdk-components/pulls?q=is%3Apr+is%3Amerged+base%3Amaster+). This release includes all PRs since (and including) #166 and #230.

Information about these new releases will be included on this
[React SDK updates](https://docs.pega.com/bundle/constellation-sdk/page/constellation-sdks/sdks/react-sdk-updates.html) page which details all of
the React SDK releases.
<br />

<br>
This
[**React SDK updates**](https://docs.pega.com/bundle/constellation-sdk/page/constellation-sdks/sdks/react-sdk-updates.html) page provides details
about all of the React SDK releases.

<hr>

# React SDK - Release Announcement - v8.23.11
## Previous releases

### React SDK - Release Announcement - v8.23.11 - 10 August 2023

This (**main** branch) is the latest version of the React SDK. It is intended to be used with **Infinity 8.8.0+**. If you need to use **Infinity 8.7.***, please use the **release/8.8.10** branch instead of this **main** branch.

Expand Down Expand Up @@ -78,13 +74,13 @@ A **summary of the latest updates** to the **@pega/react-sdk-components** and

## Pega Infinity Server and Constellation-enabled Application

This version of the React SDK assumes that you have access to a Pega Infinity server (**8.8.0+**) running an application that is configured to run using the Constellation UI service. _(If you need to use Infinity 8.7.*, please use the **release/8.8.10** branch instead of this **main** branch.)_
This version of the React SDK assumes that you have access to a Pega Infinity server (**23.1.0+**) running an application that is configured to run using the Constellation UI service. _(If you need to use Infinity 8.8.*, please use the **release/8.8.20** branch instead of this **main** branch.)_

The **MediaCo** sample application is already configured as a Constellation application and can be found in the React SDK download associated with this repo which is available at [https://community.pega.com/marketplace/components/react-sdk](https://community.pega.com/marketplace/components/react-sdk). The OAuth 2.0 Client Registration records associated with the **MediaCo** application are available in the same React SDK download. For more information about the MediaCo sample application, see [MediaCo sample application](https://docs.pega.com/bundle/constellation-sdk/page/constellation-sdks/sdks/mediaco-sample-application.html).

The **React SDK** has been tested with:
- node 18.12.1/18.13.0
- npm 8.19.2/8.19.3
- npm 8.19.2/8.19.3 - **note: at this time, do not use _npm 9_**

Future updates to the SDK will support more recent LTS versions of node as Constellation supports them.

Expand Down
29 changes: 29 additions & 0 deletions constellation-comp-config/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"extends": "./tsconfig.json",
"include": [
"../src/components/custom-constellation/**/**/*.ts",
"../src/components/custom-constellation/**/**/*.tsx",
"../src/components/custom-constellation/**/**/*.js",
"../src/components/custom-constellation/**/**/*.jsx",
"../src/components/override-sdk/**/**/*.ts",
"../src/components/override-sdk/**/**/*.tsx",
"../src/components/override-sdk/**/**/*.js",
"../src/components/override-sdk/**/**/*.jsx"],
"exclude": [
"node_modules",
"../src/**/*.stories.ts",
"../src/**/*.stories.tsx",
"../src/**/*.stories.js",
"../src/**/*.stories.jsx"
],
"compilerOptions": {
"noEmit": false,
"composite": true,
"outDir": "../lib",
"rootDir": "../src",
"allowSyntheticDefaultImports": true,
// "skipLibCheck" must be true in order to not see errors in the @pega/pcore-pconnect-typedefs files themselves
"skipLibCheck": true,
}

}
23 changes: 23 additions & 0 deletions constellation-comp-config/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"compilerOptions": {
"outDir": "./dist/",
"experimentalDecorators": true,
"strict": true,
"sourceMap": true,
"module": "es2020",
"target": "es2020",
"lib": [ "es2021", "dom" ],
"moduleResolution": "node",
"jsx": "react",
"allowJs": true,
"noImplicitAny": false,
"allowSyntheticDefaultImports": true,
"esModuleInterop": true,

// Need to specify typeRoots to find the types and types to constrain
// where to look in @pega (to only get pcore-pconnect-typedefs)
// NOTE: need to point to relative path to node_modules (../)
"typeRoots": ["../node_modules/@types", "../node_modules/@pega"],
"types": [ "jest", "@testing-library/jest-dom", "pcore-pconnect-typedefs" ],
}
}
10 changes: 10 additions & 0 deletions docs/KeyReleaseUpdates.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
## 08-November-2023 - Developer exepreience improvements
<br />
<h3>On <strong>November 08, 2023</strong>, a <strong>significant update</strong> to the React SDK <strong>main and release/8.8.20</strong> branches was completed.</h3>
<br />

1. Added the use of **TypeScript typedefs** (from @pega/pcore-pconnect-typedefs) to SDK components.
For more information, see [Using type definitions](https://docs.pega.com/bundle/constellation-sdk/page/constellation-sdks/sdks/type-definitions-constellation-sdks.html)
2. Updated Cosmos support to cosmos 3-8.8 and 4-23.1 (for custom Constellation components).
3. Enhanced security including token storage and item obfuscation support.

## 24-April-2023 - Major change to React SDK Packaging
<br />
<h3>On <strong>April 24, 2023</strong>, a <strong>significant update</strong> to the React SDK <strong>main</strong> branch was completed.</h3>
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// eslint-disable-next-line strict
module.exports = {
testEnvironment: 'jsdom',
roots: ['<rootDir>/tests/unit/'],
roots: ['<rootDir>/tests/unit/', '<rootDir>/tests'],
preset: 'ts-jest',
transform: {
'^.+\\.(t|j)sx?$': 'ts-jest'
Expand Down
Loading

0 comments on commit 4924858

Please sign in to comment.