Skip to content
This repository has been archived by the owner on May 24, 2024. It is now read-only.

Commit

Permalink
Merge branch 'main' into update-with-v2
Browse files Browse the repository at this point in the history
  • Loading branch information
sdadn committed May 24, 2024
2 parents fb177be + 674f446 commit 6ca82b1
Show file tree
Hide file tree
Showing 219 changed files with 24,618 additions and 17,507 deletions.
7 changes: 4 additions & 3 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
node_modules
coverage
aggregated-translations
build
coverage
generated-themes
lib
**/aggregated-translations/*.*

packages/terra-polyfill/src/index.js
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ packages/**/package-lock.json
# generated folders
aggregated-translations
generated-themes
build
lib
node_modules
reports
Expand Down
9 changes: 9 additions & 0 deletions .stylelintrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
extends: "@cerner/stylelint-config-terra"
rules:
scss/at-mixin-pattern: "^(terra-)[a-z]+([a-z0-9-]+[a-z0-9]+)?$"

overrides:
- files:
- packages/terra-application-docs/src/terra-dev-site/**/*.scss
rules:
terra/custom-property-namespace: false
2 changes: 1 addition & 1 deletion jest.enzymeSetup.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-disable import/no-extraneous-dependencies */
/* eslint-disable object-curly-newline */
import Enzyme, { mount, render, shallow } from 'enzyme';
import { mockIntl, mountWithIntl, renderWithIntl, shallowWithIntl } from 'terra-enzyme-intl';
import { mockIntl, mountWithIntl, renderWithIntl, shallowWithIntl } from '@cerner/terra-enzyme-intl';
import Adapter from 'enzyme-adapter-react-16';

Enzyme.configure({ adapter: new Adapter() });
Expand Down
33,251 changes: 19,526 additions & 13,725 deletions package-lock.json

Large diffs are not rendered by default.

18 changes: 6 additions & 12 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"packages/*"
],
"engines": {
"node": "10 || 12 || 14",
"npm": "6 || 9"
"node": "14",
"npm": "9"
},
"browserslist": [
"extends @cerner/browserslist-config-terra"
Expand All @@ -32,16 +32,10 @@
"extends": "@cerner/package-json-lint-config-terra/package-json-lint.config.js",
"projectType": "module"
},
"stylelint": {
"extends": "@cerner/stylelint-config-terra",
"rules": {
"scss/at-mixin-pattern": "^(terra-)[a-z]+([a-z0-9-]+[a-z0-9]+)?$"
}
},
"peerDependencies": {
"react": "16",
"react-dom": "16",
"react-intl": "2"
"react-intl": "5"
},
"devDependencies": {
"@babel/cli": "7",
Expand All @@ -52,11 +46,12 @@
"@babel/preset-react": "7",
"@cerner/browserslist-config-terra": "4",
"@cerner/eslint-config-terra": "5",
"@cerner/jest-config-terra": "2",
"@cerner/jest-config-terra": "3",
"@cerner/package-json-lint": "2",
"@cerner/package-json-lint-config-terra": "2",
"@cerner/stylelint-config-terra": "5",
"@cerner/terra-cli": "1",
"@cerner/terra-enzyme-intl": "4",
"@cerner/terra-functional-testing": "4",
"@cerner/terra-open-source-scripts": "1",
"@cerner/webpack-config-terra": "3",
Expand All @@ -71,11 +66,10 @@
"enzyme-to-json": "3",
"eslint": "7",
"gh-pages": "5",
"jest": "27",
"jest": "29",
"lerna": "6",
"postcss": "8",
"stylelint": "15",
"terra-enzyme-intl": "3",
"webpack": "5",
"webpack-cli": "4",
"webpack-dev-server": "4",
Expand Down
33 changes: 33 additions & 0 deletions packages/terra-application-docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,39 @@

## Unreleased

## 3.3.0 - (May 20, 2024)

* Added
* Added upgrade guide for terra-application v2.

* Changed
* Moved docs from the `terra-application` package.

## 3.2.0 - (May 8, 2024)

* Changed
* Set minimum Node version to 14.
* Updated docs to utilize the new terra-application imports.

*Note: Some of the changes in this release are considered breaking changes. However, these changes are passive in nature as terra-application-docs v3.x has not been deployed to production yet.*

## 3.1.0 - (June 22, 2022)

* Changed
* Minor dependency version bump

## 3.0.1 - (June 8, 2022)

* Changed
* Minor dependency bump.

## 3.0.0 - (May 31, 2022)

* Breaking Changes
* Dropped react-intl v2-v4 support.

---

## 2.15.0 - (May 1, 2024)

* Changed
Expand Down
13 changes: 5 additions & 8 deletions packages/terra-application-docs/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@cerner/terra-application-docs",
"version": "2.15.0",
"version": "3.3.0",
"description": "Contains documentation for packages in the terra-application monorepo",
"author": "Cerner Corporation",
"repository": {
Expand All @@ -22,7 +22,7 @@
"access": "public"
},
"engines": {
"node": ">=10.13.0"
"node": "14"
},
"main": "index.js",
"files": [
Expand All @@ -32,11 +32,11 @@
"peerDependencies": {
"react": "16",
"react-dom": "16",
"react-intl": "2 || 3 || 4 || 5",
"terra-application": "1"
"react-intl": "5",
"terra-application": "2"
},
"dependencies": {
"@cerner/terra-dev-site": "^7.14.0",
"@cerner/terra-dev-site": "^8.2.0",
"@cerner/terra-docs": "1",
"classnames": "2",
"prop-types": "15",
Expand All @@ -47,9 +47,6 @@
"terra-mixins": "1",
"terra-toolbar": "1"
},
"devDependencies": {
"terra-application": "^1.58.0"
},
"scripts": {
"compile": "babel --root-mode upward src --out-dir lib --copy-files",
"lint": "eslint --ext .js,.jsx .",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
/* eslint-disable import/no-unresolved */

import React from 'react';
import classNames from 'classnames/bind';
import { ApplicationIntlContext } from 'terra-application/lib/application-intl';
import { ThemeContext } from 'terra-application/lib/theme';
import { ApplicationIntlContext } from 'terra-application/application-intl';
import { ThemeContext } from 'terra-application/theme';

import styles from './ThemedComponent.module.scss';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,76 +37,140 @@ Terra Application contains many components designed to help solve common web app

The ApplicationBase component is the entrypoint into the Terra application framework. Applications must render ApplicationBase around their content to provide the content with ApplicationBase's features.

- [Application Base API](/application/terra-application/components/application-base)
```js
import ApplicationBase from 'terra-application/application-base';
```

- [Application Base API](./components/application-base)

### Application Navigation

Consistent navigation throughout Cerner applications helps provide a positive user experience by teaching users what to expect when interacting with applications. The ApplicationNavigation component provides a styled layout and controls used for navigating within an application.

- [Application Navigation API](/application/terra-application/components/application-navigation)
```js
import ApplicationNavigation, {
ApplicationNavigationActionsContext,
extensionItemsPropType,
navigationItemsPropType,
titleConfigPropType,
userConfigPropType,
utilityItemsPropType,
} from 'terra-application/application-navigation';
```

- [Application Navigation API](./components/application-navigation)

### JS Error Handling

Typically when a javascript error occurs in a web application, the entire page will be broken. Using [react error boundaries](https://reactjs.org/docs/error-boundaries.html), Terra provides a way to isolate the error to prevent the entire application from being taken down.

- [Application Error Boundary API](/application/terra-application/components/application-error-boundary)
```js
import ApplicationErrorBoundary from 'terra-application/application-error-bounary';
```

- [Application Error Boundary API](./components/application-error-boundary)

### Overlays

Presenting overlays over content being loaded or saved to a server is a common application pattern. Terra provides an application overlay to overlay loading content, as well as an application overlay provider to redefine what portion of the page should be overlaid.

- [Application Overlay API](/application/terra-application/components/application-loading-overlay)
- [Application Overlay Provider API](/application/terra-application/components/application-loading-overlay-provider)
```js
import ApplicationLoadingOverlay, { ApplicationLoadingOverlayContext, ApplicationLoadingOverlayProvider } from 'terra-application/application-loading-overlay';
```

- [Application Overlay API](./components/application-loading-overlay)
- [Application Overlay Provider API](./components/application-loading-overlay-provider)

### Status Views

Presenting status views to show the current state of the page is a common application pattern. Terra provides an application status view to present a status view over the content, as well as an application status view provider to redefine what portion of the page should be overlaid.

- [Application Status View API](/application/terra-application/components/application-status-overlay)
- [Application Status View Provider API](/application/terra-application/components/application-status-overlay-provider)
```js
import ApplicationStatusOverlay, { ApplicationStatusOverlayContext, ApplicationStatusOverlayProvider } from 'terra-application/application-status-overlay';
```

- [Application Status View API](./components/application-status-overlay)
- [Application Status View Provider API](./components/application-status-overlay-provider)

### Notification Banners

Notification Banners are used to bring the user's attention to important displayed information. This common interface pattern requires strategic placement and ordering on the application screen to be effective. Terra Application provides banner management to align with these needs.

- [Notification Banners API](/application/terra-application/components/notification-banner)
```js
import NotificationBanner from 'terra-application/notification-banner';
```

- [Notification Banners API](./components/notification-banner)

### Modal disclosure

Presenting content within a modal is a common, yet tricky pattern. To help reduce this complexity Terra provides API's, through the disclosure manager, to present modal content.

- [Disclosure Manager API](/application/terra-application/contexts/disclosure-manager-context)
```js
import DisclosureManager,{
DisclosureManagerContext,
DisclosureManagerDelegate,
DisclosureManagerHeaderAdapter,
DisclosureManagerHeaderAdapterContext,
availableDisclosureHeights,
availableDisclosureSizes,
availableDisclosureWidths,
closeMostRecentDisclosure,
disclosureManagerShape,
getActiveDisclosureCount
withDisclosureManager,
} from 'terra-application/disclosure-manager';
```

- [Disclosure Manager API](./contexts/disclosure-manager-context)

### Unsaved Changes

Unsaved form data is another common pattern. Terra provides the Navigation prompt to prevent navigating away from unsaved changes.

- [Navigation Prompt API](/application/terra-application/components/navigation-prompt)
```js
import NavigationPrompt,{
NavigationPromptCheckpoint,
PromptRegistrationContext,
getUnsavedChangesPromptOptions,
navigationPromptResolutionOptionsShape,
} from 'terra-application/navigation-prompt';
```

- [Navigation Prompt API](./components/navigation-prompt)

### Slide panel disclosure

Presenting content to a slide panel is less common, yet still tricky. Similar to modal manager we provide the disclosure manager api to disclose content to slide panels, as well as a slide panel manager to define the slide panel in the application.

- [Slide Panel Manager](/application/terra-application/components/slide-panel-manager)
- [Disclosure Manager API](/application/terra-application/contexts/disclosure-manager-context)
```js
import SlidePanelManager from 'terra-application/slide-panel-manager';
```

- [Slide Panel Manager](./components/slide-panel-manager)
- [Disclosure Manager API](./contexts/disclosure-manager-context)

### Active Breakpoints

Many applications respond to the current active breakpoint to adjust for screen size. We provide the active breakpoint as a context to limit the number of component that listen to the browser resize event.

- [Active Breakpoint Context API](/application/terra-application/contexts/active-breakpoint-context)
- [Active Breakpoint Context API](./contexts/active-breakpoint-context)

### Internationalization

Terra applications must work for many locales, The Application Intl Context provides access to the frameworks i18n APIs.
Terra applications must work for many locales, `react-intl` should be utilized for i18n api's.

- [Application Intl Context API](/application/terra-application/contexts/application-intl-context)
- [react-intl](https://formatjs.io/)

### Theming

Applications commonly switch between light and dark modes. Terra provides theme APIs to allow theming of custom components within a terra application.

- [Theme Context API](/application/terra-application/contexts/theme-context)
```js
import { ThemeContext } from 'terra-application/theme';
```

- [Theme Context API](./contexts/theme-context)

### Component Composition

Expand Down
Loading

0 comments on commit 6ca82b1

Please sign in to comment.