Skip to content

Commit

Permalink
Merge branch 'master' into snyk-fix-c4ea8a327f046ea6e23ea6e7d8c3e8f3
Browse files Browse the repository at this point in the history
  • Loading branch information
ashleynolan authored Nov 25, 2023
2 parents 556cae4 + eddcd91 commit 18458aa
Show file tree
Hide file tree
Showing 45 changed files with 4,619 additions and 2,660 deletions.
1 change: 1 addition & 0 deletions .yarnrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@


yarn-path ".yarn/releases/yarn-1.22.19.js"
--ignore-engines true
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

v7.54.4
------------------------------
*November 24, 2023*

### Changed
- Updated chromedriver to 119.0.1.


v7.54.2
------------------------------
Expand Down
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "root",
"version": "7.54.2",
"version": "7.54.3",
"private": true,
"scripts": {
"build": "cross-env-shell turbo run build --continue --token=${TURBO_TOKEN}",
Expand Down Expand Up @@ -49,7 +49,8 @@
},
"resolutions": {
"webpack": "4.46.0",
"ua-parser-js": "1.0.35"
"ua-parser-js": "1.0.35",
"typesafe-i18n": "5.16.3"
},
"devDependencies": {
"@babel/cli": "7.14.8",
Expand Down Expand Up @@ -89,8 +90,8 @@
"babel-jest": "26.1.0",
"babel-loader": "8.1.0",
"bundlewatch": "0.3.1",
"chromedriver": "115.0.0",
"core-js": "3.26.1",
"chromedriver": "119.0.1",
"core-js": "3.33.2",
"cross-env": "7.0.2",
"css-loader": "1.0.1",
"danger": "11.2.8",
Expand Down
16 changes: 16 additions & 0 deletions packages/components/organisms/f-header/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,22 @@
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

v10.17.0
------------------------------
*November 24, 2023*

### Changed
- Added translations (which also enables) for 'Become a courier' links for AU & NZ.


v10.16.0
------------------------------
*November 15, 2023*

### Changed
- Added translations (which also enables) for corporate ordering links for ES & IT.


v10.15.0
------------------------------
*June 23, 2023*
Expand Down
2 changes: 1 addition & 1 deletion packages/components/organisms/f-header/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@justeat/f-header",
"description": "Fozzie Header - Globalised Header Component",
"version": "10.15.0",
"version": "10.17.0",
"main": "dist/f-header.umd.min.js",
"maxBundleSize": "46kB",
"files": [
Expand Down
5 changes: 5 additions & 0 deletions packages/components/organisms/f-header/src/tenants/en-AU.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ export default {
url: '/account/logout',
gtm: 'click_logout'
},
deliveryEnquiry: {
text: 'Become a courier',
url: 'https://couriers.menulog.com.au/application',
gtm: 'click_courier_signup'
},
offers: {
text: 'For you',
url: '/offers'
Expand Down
5 changes: 5 additions & 0 deletions packages/components/organisms/f-header/src/tenants/en-NZ.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,11 @@ export default {
url: '/account/logout',
gtm: 'click_logout'
},
deliveryEnquiry: {
text: 'Become a courier',
url: 'https://couriers.menulog.co.nz/application/',
gtm: 'click_courier_signup'
},
offers: {
text: 'For you',
url: '/offers'
Expand Down
5 changes: 5 additions & 0 deletions packages/components/organisms/f-header/src/tenants/es-ES.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,10 @@ export default {
currentCountryKey: 'es',
changeCurrentCountry: 'Estás en Just Eat España, haz clic aquí para cambiar país',
goBackToMainMenu: 'Vuelve al menú principal'
},
corporate: {
text: 'Pedidos para Empresas',
url: 'https://www.just-eat.es/business',
gtm: 'click_corporate_ordering'
}
};
5 changes: 5 additions & 0 deletions packages/components/organisms/f-header/src/tenants/it-IT.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,5 +71,10 @@ export default {
currentCountryKey: 'it',
changeCurrentCountry: 'Sei sul sito Italiano, licca qui per cambiare stato',
goBackToMainMenu: 'Torna al menu principale'
},
corporate: {
text: 'Ordine aziendale',
url: 'https://www.justeat.it/business',
gtm: 'click_corporate_ordering'
}
};
2 changes: 2 additions & 0 deletions packages/components/pages/f-self-exclusion/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
dist
25 changes: 25 additions & 0 deletions packages/components/pages/f-self-exclusion/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Changelog

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

v1.0.1
------------------------------
*November 23, 2023*

### Added
- Changed `f-button` version and buttonSize values

v1.0.0
------------------------------
*November 22, 2023*

### Added
- updated `f-self-exclusion`

v0.1.0
------------------------------
*November 21, 2023*

### Added
- `f-self-exclusion` page created with base functionality
17 changes: 17 additions & 0 deletions packages/components/pages/f-self-exclusion/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/

Copyright (c) Just Eat Holding Ltd

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
127 changes: 127 additions & 0 deletions packages/components/pages/f-self-exclusion/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
<div align="center">

# f-self-exclusion

<img width="125" alt="Fozzie Bear" src="../../../../bear.png" />

Customers must be able to voluntarily self-exclude or nominate themselves for self exclusion for a specified time period or permanently (includes purchasing and marketing), and their account (associated to the email address or phone number provided during self exclusions) must be blocked from purchasing alcohol and other items.

</div>

---

[![npm version](https://badge.fury.io/js/%40justeat%2Ff-self-exclusion.svg)](https://badge.fury.io/js/%40justeat%2Ff-self-exclusion)
[![CircleCI](https://circleci.com/gh/justeat/fozzie-components.svg?style=svg)](https://circleci.com/gh/justeat/workflows/fozzie-components)
[![Coverage Status](https://coveralls.io/repos/github/justeat/f-self-exclusion/badge.svg)](https://coveralls.io/github/justeat/f-self-exclusion)
[![Known Vulnerabilities](https://snyk.io/test/github/justeat/f-self-exclusion/badge.svg?targetFile=package.json)](https://snyk.io/test/github/justeat/f-self-exclusion?targetFile=package.json)

---

## Usage

### Installation

Install the module using npm or Yarn:

```sh
yarn add @justeat/f-self-exclusion
```

```sh
npm install @justeat/f-self-exclusion
```



### Vue Applications

You can import it in your Vue SFC like this (please note that styles have to be imported separately):

```js
import SelfExclusion from '@justeat/f-self-exclusion';
import '@justeat/f-self-exclusion/dist/f-self-exclusion.css';

export default {
components: {
SelfExclusion
}
}
```

If you are using Webpack, you can import the component dynamically to separate the `self-exclusion` bundle from the main `bundle.client.js`:

```js
import '@justeat/f-self-exclusion/dist/f-self-exclusion.css';

export default {
components: {
//
SelfExclusion: () => import(/* webpackChunkName: "self-exclusion" */ '@justeat/f-self-exclusion')
}
}
```

## Configuration

### Props

There may be props that allow you to customise its functionality.

The props that can be defined are as follows (if any):

| Prop | Type | Default | Description |
| ----- | ----- | ------- | ----------- |

### Events

The events that can be subscribed to are as follows (if any):

| Event | Description |
| ----- | ----------- |

## Development

Start by cloning the repository and installing the required dependencies:

```sh
$ git clone [email protected]:justeat/fozzie-components.git
$ cd fozzie-components
$ yarn
```

Change directory to the `f-self-exclusion` package:

```sh
$ cd packages/components/pages/f-self-exclusion
```

## Testing

To test all components, run from root directory.
To test only `f-self-exclusion`, run from the `./fozzie-components/packages/components/pages/f-self-exclusion` directory.

### Unit and Integration tests

```sh
yarn test
```

### Component and Accessibility Tests

```bash
# Note: Ensure Storybook is running when running the following commands
cd ./fozzie-components

yarn storybook:build
yarn storybook:serve-static
```

yarn test-component:chrome
```
### Accessibility tests
```bash
yarn test-a11y:chrome
```
## Documentation to be completed once module is in stable state.


26 changes: 26 additions & 0 deletions packages/components/pages/f-self-exclusion/babel.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = api => {
// Use `isTest` to determine what presets and plugins to use with jest
const isTest = api.env('test');
const presets = [];
const plugins = [
'@babel/plugin-proposal-optional-chaining' // https://babeljs.io/docs/en/babel-plugin-proposal-optional-chaining
];
const builtIns = (api.env('development') ? 'entry' : false);

if (!isTest) {
api.cache(true); // Caches the computed babel config function – https://babeljs.io/docs/en/config-files#apicache
presets.push(['@vue/app', { useBuiltIns: builtIns }]);
// Alias for @babel/preset-env
// Hooks into browserslist to provide smart Babel transforms
// https://babeljs.io/docs/en/babel-preset-env
presets.push('@babel/env');
} else {
// use current node version for transpiling test files
presets.push(['@babel/env', { targets: { node: 'current' } }]);
}

return {
presets,
plugins
};
};
43 changes: 43 additions & 0 deletions packages/components/pages/f-self-exclusion/jest.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
module.exports = {
moduleFileExtensions: [
'js',
'json',
'vue'
],

transform: {
'^.+\\.js$': 'babel-jest',
'^.+\\.vue$': 'vue-jest',
'.+\\.(css|styl|less|sass|scss|svg|png|jpg|ttf|woff|woff2)$': 'jest-transform-stub'
},

transformIgnorePatterns: [
'node_modules/(?!(lodash-es)/)'
],

moduleNameMapper: {
'^@/(.*)$': '<rootDir>/src/$1',
'^~include-media/(.*)$': '<rootDir>../../node_modules/include-media/$1',
'^~@justeat/(.*)$': '<rootDir>../../node_modules/@justeat/$1',
'\\.(css|scss)$': 'jest-transform-stub'
},

snapshotSerializers: [
'jest-serializer-vue'
],

globals: {
'vue-jest': {
hideStyleWarn: true, // We hide style warnings given the first time we run the tests it complains about some styles. The second time the tests are run, the warning disappears. https://github.com/vuejs/vue-jest/issues/178#issuecomment-529175129
experimentalCSSCompile: false // hoping this will be a temporary fix, as tests fail when updating to dart-sass currently with vue-cli
}
},

modulePathIgnorePatterns: [
'./test/component/',
'./test/accessibility',
'./test/visual'
],

testURL: 'http://localhost/'
};
Loading

0 comments on commit 18458aa

Please sign in to comment.