Skip to content

Commit

Permalink
Update to react 3 and messages 1
Browse files Browse the repository at this point in the history
Release v1.3.2

Changing tests defaultLocales and messages location
  • Loading branch information
Bruno Dias authored and salesfelipe committed Mar 15, 2019
1 parent ba195b7 commit 6674790
Show file tree
Hide file tree
Showing 24 changed files with 254 additions and 94 deletions.
39 changes: 39 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,34 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

## [Unreleased]

### Changed

- Get changes made at version `v0.25.0`.

## [0.25.0] - 2019-03-15

### Changed

- Returning to the `returnUrl` if it is present on the url.

## [1.4.0] - 2019-03-13

### Changed

- Get changes made at version `v0.24.0`.

## [0.24.0] - 2019-03-13

### Added

- Italian translation

## [1.3.2] - 2019-02-26

### Changed

- Add changes from versions `v0.23.2` and `v0.23.1`

## [0.23.2] - 2019-02-26

### Fixed
Expand All @@ -31,6 +47,29 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.

- Add missing required prop, resulting in a error in address form

## [1.3.1] - 2019-02-19

### Changed

- Get changes made between versions `v0.20.0` and `v0.23.0`.

## [1.3.0] - 2019-01-22

## [1.2.0] - 2019-01-22

## [1.1.0] - 2019-01-18

### Changed

- Update React builder to 3.x.
- Bump vtex.styleguide to 9.x.

## [1.0.0] - 2018-12-28

### Changed

- New builders are in town! Add messages and store builders.

## [0.23.0] - 2019-02-12

### Added
Expand Down
43 changes: 16 additions & 27 deletions manifest.json
Original file line number Diff line number Diff line change
@@ -1,27 +1,25 @@
{
"name": "my-account",
"vendor": "vtex",
"version": "0.25.0",
"version": "1.4.0",
"title": "My Account",
"description": "",
"mustUpdateAt": "2019-07-09",
"categories": [],
"registries": [
"smartcheckout"
],
"dependencies": {
"vtex.my-cards": "0.x",
"vtex.my-orders-app": "2.x",
"vtex.my-account-commons": "0.x",
"vtex.my-subscriptions": "1.x",
"vtex.my-cards": "1.x",
"vtex.my-orders-app": "3.x",
"vtex.my-account-commons": "1.x",
"vtex.store-graphql": "2.x",
"vtex.styleguide": "8.x",
"vtex.profile-form": "2.x",
"vtex.country-codes": "1.x",
"vtex.address-form": "3.x"
"vtex.styleguide": "9.x",
"vtex.profile-form": "3.x",
"vtex.country-codes": "2.x",
"vtex.address-form": "4.x"
},
"builders": {
"react": "2.x",
"pages": "0.x",
"react": "3.x",
"store": "0.x",
"messages": "1.x",
"node": "3.x"
},
"scripts": {
Expand Down Expand Up @@ -49,10 +47,7 @@
"useMap": {
"title": "Use Google Maps to fill address data",
"type": "boolean",
"enum": [
false,
true
],
"enum": [false, true],
"default": false
}
},
Expand All @@ -62,25 +57,19 @@
{
"properties": {
"useMap": {
"enum": [
true
]
"enum": [true]
},
"apiKey": {
"title": "Your Google Maps API Key",
"type": "string"
}
},
"required": [
"apiKey"
]
"required": ["apiKey"]
},
{
"properties": {
"useMap": {
"enum": [
false
]
"enum": [false]
}
}
}
Expand Down
File renamed without changes.
46 changes: 46 additions & 0 deletions messages/en.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{
"userInfo.greeting": "Hi",
"pages.addresses": "Addresses",
"pages.addressCreate": "Add address",
"pages.addressEdit": "Edit address",
"pages.profile": "Profile",
"pages.profileEdit": "Edit Profile",
"pages.myAccount": "My account",
"personalData.redefinePassword": "Redefine password",
"personalData.saveData": "Save changes",
"personalData.password": "Password",
"personalData.currentPassword": "Current password",
"personalData.newPassword": "New password",
"personalData.confirmPassword": "Confirm new password",
"personalData.savePassword": "Save password",
"personalData.yourPasswordMust": "Your password must have at least:",
"personalData.8chars": "8 characters",
"personalData.1number": "1 number",
"personalData.1upLetter": "1 uppercase letter",
"personalData.1lowLetter": "1 lowercase letter",
"upload.loading": "Loading…",
"upload.choosePhoto": "Choose a Picture",
"upload.chooseAgain": "Choose another Picture",
"upload.save": "Save",
"upload.dragYourPhoto": "Drag your new profile picture here",
"upload.photoUpdated": "Your profile picture was successfully updated.",
"upload.or": "or",
"addresses.addAddress": "Add address",
"addresses.saveAddress": "Save address",
"addresses.deleteAddress": "Delete address",
"addresses.notFound": "You don't have any addresses yet!",
"commons.edit": "Edit",
"alert.addressNotFound": "The selected address was not found.",
"alert.success": "Your information was successfully saved.",
"alert.fileTooBig": "This image is above the 4MB limit, choose a smaller one.",
"alert.passwordMismatch": "Passwords do not match.",
"alert.wrongPassword": "Current password is wrong.",
"alert.wrongAndAboutToBlock": "Current password is wrong. One more invalid attempt will block your account for one hour.",
"alert.blockedUser": "You have been blocked, try again later.",
"editor.defaultRoute.name": "My Account - Home",
"editor.defaultRoute.description": "My Account's default page",
"editor.defaultRoute.field": "My Account's default path",
"editor.menu.name": "My Account - Menu",
"editor.menu.description": "My Account's side menu",
"editor.menu.field": "Menu's Extension Point"
}
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
7 changes: 6 additions & 1 deletion node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,11 @@
"version": "0.18.0",
"main": "index.js",
"devDependencies": {
"@types/node": "^10.12.20"
"@types/bluebird": "^3.5.0",
"@types/bluebird-global": "^3.5.0",
"@types/es6-shim": "^0.31.32",
"@types/node": "^7.0.8",
"tslint": "^5.8.0",
"tslint-config-vtex": "^2.0.0"
}
}
29 changes: 29 additions & 0 deletions node/tsconfig.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
{
"compilerOptions": {
"types": [
"bluebird-global",
"node"
],
"typeRoots": [
"node_modules/@types"
],
"lib": [
"esnext.asynciterable",
"es2017"
],
"target": "es2017",
"module": "commonjs",
"sourceMap": false,
"allowJs": true
},
"typeAcquisition": {
"enable": false
},
"include": [
"./**/*"
],
"exclude": [
"node_modules"
],
"compileOnSave": true
}
3 changes: 3 additions & 0 deletions node/tslint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "tslint-config-vtex"
}
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"version": "0.25.0",
"version": "1.4.0",
"devDependencies": {
"@types/exenv": "^1.2.0",
"@vtex/intl-equalizer": "^2.0.1",
Expand All @@ -16,6 +16,6 @@
},
"intl-equalizer": {
"referenceLocale": "en",
"localeDirectory": "react/locales/"
"localeDirectory": "messages"
}
}
54 changes: 0 additions & 54 deletions pages/pages.json

This file was deleted.

2 changes: 1 addition & 1 deletion react/DefaultRoute.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { ExtensionPoint } from 'render'
import { ExtensionPoint } from 'vtex.render-runtime'
import { Link, withRouter } from 'react-router-dom'

class DefaultRoute extends Component {
Expand Down
2 changes: 1 addition & 1 deletion react/Menu.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import { ExtensionPoint } from 'render'
import { ExtensionPoint } from 'vtex.render-runtime'
import { Link, withRouter } from 'react-router-dom'

class Menu extends Component {
Expand Down
2 changes: 1 addition & 1 deletion react/components/AppRouter.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component, Fragment } from 'react'
import { Route, Switch, Redirect, HashRouter } from 'react-router-dom'
import Media from 'react-media'
import { ExtensionPoint } from 'render'
import { ExtensionPoint } from 'vtex.render-runtime'
import Menu from './Menu'
import Addresses from './pages/Addresses'
import Profile from './pages/Profile'
Expand Down
2 changes: 1 addition & 1 deletion react/components/Menu/MenuLinksList.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import React from 'react'
import { injectIntl, intlShape } from 'react-intl'
import { ExtensionPoint } from 'render'
import { ExtensionPoint } from 'vtex.render-runtime'
import MenuLink from './MenuLink'

const links = [
Expand Down
2 changes: 1 addition & 1 deletion react/components/Menu/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Component } from 'react'
import UserInfo from './UserInfo'
import MenuLinksList from './MenuLinksList'
import { ExtensionPoint } from 'render'
import { ExtensionPoint } from 'vtex.render-runtime'

class Menu extends Component {
state = {
Expand Down
4 changes: 2 additions & 2 deletions react/components/Profile/ProfileBox.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import React, { Fragment } from 'react'
import PropTypes from 'prop-types'
import { injectIntl, intlShape } from 'react-intl'
import { ExtensionPoint } from 'render'
import { ExtensionPoint } from 'vtex.render-runtime'
import { ProfileRules, ProfileSummary } from 'vtex.profile-form'
import ContentBox from '../shared/ContentBox'
import DataEntry from '../shared/DataEntry'
Expand Down Expand Up @@ -118,7 +118,7 @@ const ProfileBox = ({ profile, storeCountry, onEditClick, intl }) => {
</ProfileSummary>
</ProfileRules>
<ExtensionPoint
id="profile/display"
id="profile-display"
render={fields => (
<div className="flex-ns flex-wrap">
{fields.map(({ label, value }) => (
Expand Down
4 changes: 2 additions & 2 deletions react/components/Profile/ProfileFormBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import PropTypes from 'prop-types'
import { intlShape, injectIntl } from 'react-intl'
import { graphql } from 'react-apollo'
import { compose } from 'recompose'
import { ExtensionPoint } from 'render'
import { ExtensionPoint } from 'vtex.render-runtime'
import { Button } from 'vtex.styleguide'
import { ProfileRules, ProfileContainer } from 'vtex.profile-form'
import ContentBox from '../shared/ContentBox'
Expand Down Expand Up @@ -92,7 +92,7 @@ class ProfileFormBox extends Component {
</Button>
}>
<ExtensionPoint
id="profile/input"
id="profile-input"
registerValidator={this.registerValidator}
registerSubmitter={this.registerSubmitter}
/>
Expand Down
2 changes: 1 addition & 1 deletion react/testUtils/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, { ReactNode } from 'react'
import { IntlProvider } from 'react-intl'
import * as reactTestingLibrary from 'react-testing-library'

import defaultStrings from '../locales/en.json'
import defaultStrings from '../../messages/en.json'

const customRender = (node: ReactNode, options?: any) => {
const rendered = reactTestingLibrary.render(
Expand Down
Loading

0 comments on commit 6674790

Please sign in to comment.