Skip to content

Commit

Permalink
Merge branch 'master' into stripes-904-test
Browse files Browse the repository at this point in the history
  • Loading branch information
zburke authored Apr 19, 2024
2 parents 6a6a463 + df17aa3 commit 8f8ec8c
Show file tree
Hide file tree
Showing 98 changed files with 3,516 additions and 2,216 deletions.
32 changes: 22 additions & 10 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
{
"extends": "@folio/eslint-config-stripes",
"parser": "@babel/eslint-parser",
"rules": {
"global-require": "off",
"import/no-cycle": [ 2, { "maxDepth": 1 } ],
"import/no-dynamic-require": "off",
"import/no-extraneous-dependencies": "off",
"prefer-object-spread": "off"
"env": {
"jest": true
},
"extends": "@folio/eslint-config-stripes",
"overrides": [
{
"files": [ "src/**/tests/*", "test/**/*", "*test.js" ],
Expand All @@ -21,7 +16,24 @@
}
}
],
"env": {
"jest": true
"parser": "@babel/eslint-parser",
"rules": {
"global-require": "off",
"import/no-cycle": [ 2, { "maxDepth": 1 } ],
"import/no-dynamic-require": "off",
"import/no-extraneous-dependencies": "off",
"prefer-object-spread": "off"
},
"settings": {
"import/resolver": {
"alias": {
"map": [
["__mock__", "./test/jest/__mock__"],
["fixtures", "./test/jest/fixtures"],
["helpers", "./test/jest/helpers"]
]
}
}
}
}

1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ yarn-error.log
artifacts
dist
junit.xml
.vscode/launch.json
28 changes: 19 additions & 9 deletions .stylelintrc
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
{
"extends": "stylelint-config-standard",

"rules": {
"alpha-value-notation": null,
"color-function-notation": null,
"declaration-block-no-redundant-longhand-properties": null,
"function-no-unknown": null,
"import-notation": null,
"media-feature-range-notation": null,
"no-descending-specificity": null,
"import-notation": "string",
"value-keyword-case": ["lower", {
"ignoreProperties": ["composes"]
}],
"keyframes-name-pattern": null,
"selector-class-pattern": null,
"value-keyword-case": null
"selector-pseudo-class-no-unknown": [true, {
"ignorePseudoClasses": [
"export",
"import",
"global",
"local"
]
}],
"property-no-unknown": [ true, {
"ignoreProperties": [
"composes",
"compose-with"
]
}]
}
}
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Change history for stripes-core

## 10.1.1 IN PROGRESS

* Utilize the `tenant` procured through the SSO login process. Refs STCOR-769.
* Remove tag-based selectors from Login, ResetPassword, Forgot UserName/Password form CSS. Refs STCOR-712.
* Provide `useUserTenantPermissions` hook. Refs STCOR-830.

## 10.1.0 IN PROGRESS

* Provide optional tenant argument to `useOkapiKy` hook. Refs STCOR-747.
Expand All @@ -13,6 +19,33 @@
* Opt-in: handle access-control via cookies. Refs STCOR-671.
* Opt-in: disable login when cookies are disabled. Refs STCOR-762.
* Add arial-label for `ProfileDropdown.js`. Refs STCOR-753.
* Upgrade, configure stylelint. Refs STCOR-799.
* Move `localforage.clear()` to `afterEach` for test suite. Refs STCOR-801.
* Show app/record when you have permission for that. Refs STCOR-800.
* Convert `<SSOLanding />` tests to jest. STCOR-798.
* Avoid calling `map` on `undefined` via optional-chaining. Refs STCOR-793.
* Make `<Settings>` a functional component. Update connected modules when `stripes` object changes. Fixes STCOR-797.
* `useOkapiKy` uses || instead of ?? to apply current tenant id when override was not provided. Refs STCOR-814.
* Correctly parse `.../_self` permissions object. Refs STCOR-813.
* Add `idName` and `limit` as passable props to `useChunkedCQLFetch`. Refs STCOR-821.
* Check for valid token before rotating during XHR send. Refs STCOR-817.
* Remove `autoComplete` from `<ForgotPassword>`, `<ForgotUsername>` fields. Refs STCOR-742.

## [10.0.3](https://github.com/folio-org/stripes-core/tree/v10.0.3) (2023-11-10)
[Full Changelog](https://github.com/folio-org/stripes-core/compare/v10.0.2...v10.0.3)

* Revert "Use cookies and RTR" until further notice. Refs FOLIO-3627.
* Ensure `<AppIcon>` is not cut off when app name is long. Refs STCOR-752.

## [10.0.2](https://github.com/folio-org/stripes-core/tree/v10.0.2) (2023-11-06)
[Full Changelog](https://github.com/folio-org/stripes-core/compare/v10.0.1...v10.0.2)

* Use cookies and RTR instead of directly handling the JWT. Refs STCOR-671, STCOR-754, STCOR-756, FOLIO-3627.

## [10.0.1](https://github.com/folio-org/stripes-core/tree/v10.0.1) (2023-10-25)
[Full Changelog](https://github.com/folio-org/stripes-core/compare/v10.0.0...v10.0.1)

* Export `validateUser`. Refs STCOR-749.

## [10.0.0](https://github.com/folio-org/stripes-core/tree/v10.0.0) (2023-10-11)
[Full Changelog](https://github.com/folio-org/stripes-core/compare/v9.0.0...v10.0.0)
Expand Down
4 changes: 4 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,10 @@ export {

/* Queries */
export { useChunkedCQLFetch } from './src/queries';
export { getUserTenantsPermissions } from './src/queries';

/* Hooks */
export { useUserTenantPermissions } from './src/hooks';

/* misc */
export { supportedLocales } from './src/loginServices';
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@folio/stripes-core",
"version": "10.1.0",
"version": "10.2.0",
"description": "The starting point for Stripes applications",
"license": "Apache-2.0",
"repository": "folio-org/stripes-core",
Expand Down Expand Up @@ -63,9 +63,9 @@
"react-redux": "^8.0.5",
"react-router": "^5.2.0",
"react-router-dom": "^5.2.0",
"stylelint": "^15.10.3",
"stylelint-config-standard": "^34.0.0",
"stylelint-junit-formatter": "^0.2.1"
"stylelint": "^16.2.0",
"stylelint-config-standard": "^36.0.0",
"stylelint-junit-formatter": "^0.2.2"
},
"dependencies": {
"@apollo/client": "^3.2.1",
Expand Down
7 changes: 2 additions & 5 deletions src/components/AppIcon/AppIcon.css
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,8 @@
&::after {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: 0;
right: 0;
box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
inset: 0;
box-shadow: inset 0 0 0 1px rgba(0 0 0 / 20%);
border-radius: 25%;
}

Expand Down
2 changes: 1 addition & 1 deletion src/components/BadRequestScreen/BadRequestScreen.css
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ h3.title {
text-align: center;
}

@media screen and (max-width: 900px) {
@media screen and (width <= 900px) {
h1.title {
font-size: var(--font-size-large);
}
Expand Down
46 changes: 25 additions & 21 deletions src/components/CreateResetPassword/CreateResetPassword.css
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,19 @@ body {
width: 100%;
outline: 0;
text-align: center;

& .passResetInput {
height: 44px;
padding: 8px;
font-size: var(--font-size-medium);
}

& .passResetSubmitButton {
height: 44px;
max-height: 100%;
margin-top: 1.5rem;
font-size: var(--font-size-medium);
}
}

.formGroup {
Expand All @@ -41,18 +54,7 @@ body {
margin-top: 10px;
}

input.input {
height: 44px;
padding: 8px;
font-size: var(--font-size-medium);
}

button.submitButton {
height: 44px;
max-height: 100%;
margin-top: 1.5rem;
font-size: var(--font-size-medium);
}

.toggleButtonWrapper {
display: flex;
Expand Down Expand Up @@ -96,15 +98,17 @@ button.submitButton {
min-height: initial;
}

button.submitButton {
height: 60px;
font-size: var(--font-size-large);
}
.form {
& .passResetSubmitButton {
height: 60px;
font-size: var(--font-size-large);
}

input.input {
height: 60px;
padding: 15px;
font-size: var(--font-size-medium);
& .passResetInput {
height: 60px;
padding: 15px;
font-size: var(--font-size-medium);
}
}

.passwordStrength {
Expand All @@ -126,13 +130,13 @@ button.submitButton {
}
}

@media only screen and (min-width: 1450px) {
@media only screen and (width >= 1450px) {
.container {
margin: 12vh 2rem 0;
}
}

@media (max-height: 440px) {
@media (height <= 440px) {
.container {
min-height: 330px;
}
Expand Down
6 changes: 3 additions & 3 deletions src/components/CreateResetPassword/CreateResetPassword.js
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ class CreateResetPassword extends Component {
name="newPassword"
autoComplete="new-password"
component={PasswordStrength}
inputClass={styles.input}
inputClass={styles.passResetInput}
type={passwordType}
hasClearIcon={false}
autoFocus
Expand Down Expand Up @@ -251,7 +251,7 @@ class CreateResetPassword extends Component {
type={passwordType}
marginBottom0
fullWidth
inputClass={styles.input}
inputClass={styles.passResetInput}
validationEnabled={false}
hasClearIcon={false}
autoComplete="new-password"
Expand Down Expand Up @@ -291,7 +291,7 @@ class CreateResetPassword extends Component {
buttonStyle="primary"
id="clickable-login"
type="submit"
buttonClass={styles.submitButton}
buttonClass={styles.passResetSubmitButton}
disabled={isButtonDisabled(getState)}
fullWidth
marginBottom0
Expand Down
44 changes: 23 additions & 21 deletions src/components/ForgotPassword/ForgotPasswordForm.css
Original file line number Diff line number Diff line change
Expand Up @@ -20,39 +20,39 @@
.form {
outline: 0;
text-align: center;
}

.form .formGroup:last-child {
margin-bottom: 0;
& .passForgotInput {
height: 60px;
font-size: var(--font-size-medium);
padding: 15px;
}

& .passForgotSubmitButton {
height: 60px;
max-height: 100%;
font-size: var(--font-size-large);
}
}

.formGroup {
margin-bottom: 10px;
}

.authErrorsWrapper {
margin-top: 10px;
}

input.input {
height: 60px;
font-size: var(--font-size-medium);
padding: 15px;
.form .formGroup:last-child {
margin-bottom: 0;
}

button.submitButton {
height: 60px;
max-height: 100%;
font-size: var(--font-size-large);
.authErrorsWrapper {
margin-top: 10px;
}

@media (max-height: 440px) {
@media (height <= 440px) {
.centered {
min-height: 330px;
}
}

@media (max-width: 640px) {
@media (width <= 640px) {
.centered {
min-height: 330px;
}
Expand All @@ -62,9 +62,11 @@ button.submitButton {
font-size: var(--font-size-medium);
}

input.input {
height: 44px;
font-size: var(--font-size-medium);
padding: 8px;
.form {
& .passForgotInput {
height: 44px;
font-size: var(--font-size-medium);
padding: 8px;
}
}
}
5 changes: 2 additions & 3 deletions src/components/ForgotPassword/ForgotPasswordForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,10 +72,9 @@ class ForgotPasswordForm extends Component {
type="text"
marginBottom0
fullWidth
inputClass={formStyles.input}
inputClass={formStyles.passForgotInput}
validationEnabled={false}
hasClearIcon={false}
autoComplete="on"
autoCapitalize="none"
autoFocus
placeholder={formatMessage({ id: 'stripes-core.placeholder.forgotPassword' })}
Expand All @@ -86,7 +85,7 @@ class ForgotPasswordForm extends Component {
id="clickable-login"
name="continue-button"
type="submit"
buttonClass={formStyles.submitButton}
buttonClass={formStyles.passForgotSubmitButton}
disabled={pristine}
fullWidth
marginBottom0
Expand Down
Loading

0 comments on commit 8f8ec8c

Please sign in to comment.