Skip to content

Commit 8fdb12a

Browse files
authored
Merge branch 'master' into enhancement/pr-auto-close
2 parents 995ff51 + 17e2063 commit 8fdb12a

File tree

94 files changed

+423
-162
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

94 files changed

+423
-162
lines changed

.github/ISSUE_TEMPLATE/FEATURE_REQUEST.md

+11-1
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@ about: Suggest an idea for this project 💡!
77

88
<!-- ⚠️ Make sure to browse the opened and closed issues before submitting your issue. -->
99

10-
**What is the expected behavior?**
10+
<!--
11+
Please also submit your idea on the Strapi Product Board:
12+
https://portal.productboard.com/strapi/tabs/2-under-consideration/submit-idea
1113
14+
If your request on the product board is accepted this feature request issue will be closed,
15+
but will still accept public discussion.
16+
-->
17+
18+
- [ ] **I have created my request on the Product Board before I submitted this issue**
19+
- [ ] **I have looked at all the other requests on the Product Board before I submitted this issue**
20+
21+
**Please describe your feature request:**
1222

docs/1.x.x/users.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ To use the providers authentication, set your credentials in
7474

7575
Redirect your user to: `GET /connect/:provider`.
7676

77-
After his approval, he will be redirected to `/auth/:provider/callback`. The jwt and user will be available in the querystring.
77+
After their approval, they will be redirected to `/auth/:provider/callback`. The jwt and user will be available in the querystring.
7878

7979
Response payload:
8080

docs/3.x.x/guides/email.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ By default Strapi provides a local email system. You might want to send email wi
2626
To install a new provider run:
2727

2828
```
29-
$ npm install strapi-email-sendgrid@alpha --save
29+
$ npm install strapi-provider-email-sendgrid@alpha --save
3030
```
3131

32-
We have two providers available `strapi-email-sendgrid` and `strapi-upload-mailgun`, use the alpha tag to install one of them. Then, visit `/admin/plugins/email/configurations/development` on your web browser and configure the provider.
32+
We have two providers available `strapi-provider-email-sendgrid` and `strapi-provider-upload-mailgun`, use the alpha tag to install one of them. Then, visit `/admin/plugins/email/configurations/development` on your web browser and configure the provider.
3333

34-
If you want to create your own, make sure the name starts with `strapi-email-` (duplicating an existing one will be easier to create), modify the `auth` config object and customize the `send` functions.
34+
If you want to create your own, make sure the name starts with `strapi-provider-email-` (duplicating an existing one will be easier to create), modify the `auth` config object and customize the `send` functions.
3535

36-
Check all community providers available on npmjs.org - [Providers list](https://www.npmjs.com/search?q=strapi-email-)
36+
Check all community providers available on npmjs.org - [Providers list](https://www.npmjs.com/search?q=strapi-provider-email-)

docs/3.x.x/guides/graphql.md

+1-6
Original file line numberDiff line numberDiff line change
@@ -672,15 +672,10 @@ module.exports = {
672672

673673
In this example, the policy `isAuthenticated` located in `./plugins/users-permissions/config/policies/isAuthenticated.js` will be executed first. Then, the `isOwner` policy located in the `Post` API `./api/post/config/policies/isOwner.js`. Next, it will execute the `logging` policy located in `./config/policies/logging.js`. Finally, the resolver will be executed.
674674

675-
<<<<<<< HEAD:docs/3.x.x/guides/graphql.md
675+
676676
::: note
677677
There is no custom resolver in that case, so it will execute the default resolver (Post.find) provided by the Shadow CRUD feature.
678678
:::
679-
=======
680-
The same process is applied to the `createPost` mutation.
681-
682-
> Note: There is no custom resolver in that case, so it will execute the default resolver (Post.find) provided by the Shadow CRUD feature.
683-
>>>>>>> 5705158a4368b144541493e08570ce0e93734ed8:docs/3.x.x/en/guides/graphql.md
684679

685680
### Link a query or mutation to a controller action
686681

docs/3.x.x/guides/models.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -296,7 +296,7 @@ A `product` can be related to many `categories`, so a `category` can have many `
296296
```
297297

298298
::: note
299-
The `dominant` key allows you to define in which table/collection (only for NoSQL databases) should be stored the array that defines the relationship. Because there is no join table in NoSQL, this key is required for NoSQL databases (ex: MongoDB).
299+
(NoSQL databases only) The `dominant` key defines which table/collection should store the array that defines the relationship. Because there are no join tables in NoSQL, this key is required for NoSQL databases (ex: MongoDB).
300300
:::
301301

302302
**Path —** `./api/category/models/Category.settings.json`.

docs/3.x.x/guides/upload.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Please send the request using multipart/form-data encoding
1717
**Parameters**
1818

1919
- `files`: The file(s) to upload. The value(s) can be a Buffer or Stream.
20-
- `path`: (optional): The folder where the file(s) will be uploaded to (only supported on strapi-upload-aws-s3 now).
20+
- `path`: (optional): The folder where the file(s) will be uploaded to (only supported on strapi-provider-upload-aws-s3 now).
2121
- `refId`: (optional): The ID of the entry which the file(s) will be linked to.
2222
- `ref`: (optional): The name of the model which the file(s) will be linked to (see more below).
2323
- `source`: (optional): The name of the plugin where the model is located.
@@ -136,11 +136,11 @@ By default Strapi provides a local file upload system. You might want to upload
136136
To install a new provider run:
137137

138138
```
139-
$ npm install strapi-upload-aws-s3@alpha --save
139+
$ npm install strapi-provider-upload-aws-s3@alpha --save
140140
```
141141

142-
We have two providers available `strapi-upload-aws-s3` and `strapi-upload-cloudinary`, use the alpha tag to install one of them. Then, visit `/admin/plugins/upload/configurations/development` on your web browser and configure the provider.
142+
We have two providers available `strapi-provider-upload-aws-s3` and `strapi-provider-upload-cloudinary`, use the alpha tag to install one of them. Then, visit `/admin/plugins/upload/configurations/development` on your web browser and configure the provider.
143143

144-
If you want to create your own, make sure the name starts with `strapi-upload-` (duplicating an existing one will be easier to create), modify the `auth` config object and customize the `upload` and `delete` functions.
144+
If you want to create your own, make sure the name starts with `strapi-provider-upload-` (duplicating an existing one will be easier to create), modify the `auth` config object and customize the `upload` and `delete` functions.
145145

146-
Check all community providers available on npmjs.org - [Providers list](https://www.npmjs.com/search?q=strapi-upload-)
146+
Check all community providers available on npmjs.org - [Providers list](https://www.npmjs.com/search?q=strapi-provider-upload-)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
/*
2+
* Copyright@React-FullStory (https://github.com/cereallarceny/react-fullstory)
3+
*/
4+
5+
import React from 'react';
6+
import PropTypes from 'prop-types';
7+
8+
const canUseDOM = !!(
9+
typeof window !== 'undefined' &&
10+
window.document &&
11+
window.document.createElement
12+
);
13+
14+
export const getWindowFullStory = () => window[window['_fs_namespace']];
15+
16+
class FullStory extends React.Component {
17+
constructor(props) {
18+
super(props);
19+
20+
window['_fs_debug'] = false;
21+
window['_fs_host'] = 'fullstory.com';
22+
window['_fs_org'] = props.org;
23+
window['_fs_namespace'] = 'FS';
24+
(function(m,n,e,t,l,o,g,y) {
25+
if (e in m) {
26+
if(m.console && m.console.log) {
27+
m.console.log('FullStory namespace conflict. Please set window["_fs_namespace"].');
28+
}
29+
30+
return;
31+
}
32+
33+
g = m[e]= function(a,b,s) {
34+
g.q ? g.q.push([a,b,s]) : g._api(a,b,s);
35+
};
36+
g.q=[];
37+
o = n.createElement(t);
38+
o.async = 1;
39+
o.src = `https://${window._fs_host}/s/fs.js`;
40+
y = n.getElementsByTagName(t)[0];
41+
y.parentNode.insertBefore(o,y);
42+
g.identify = function(i,v,s) {
43+
g(l,{ uid:i },s);
44+
45+
if (v) {
46+
g(l,v,s);
47+
}
48+
};
49+
g.setUserVars = function(v,s) {
50+
g(l,v,s);
51+
};
52+
g.event = function(i,v,s) {
53+
g('event',{ n:i,p:v },s);
54+
};
55+
g.shutdown = function() {
56+
g("rec",!1);
57+
};
58+
g.restart = function() {
59+
g("rec",!0);
60+
};
61+
g.consent = function(a) {
62+
g("consent",!arguments.length||a);
63+
};
64+
g.identifyAccount = function(i,v) {
65+
o = 'account';
66+
v = v||{};
67+
v.acctId = i;
68+
g(o,v);
69+
};
70+
g.clearUserCookie = function() {};
71+
})(window, document, window['_fs_namespace'], 'script', 'user');
72+
}
73+
74+
shouldComponentUpdate() {
75+
return false;
76+
}
77+
78+
componentWillUnmount() {
79+
if (!canUseDOM || !getWindowFullStory()) return false;
80+
81+
getWindowFullStory().shutdown();
82+
83+
delete getWindowFullStory();
84+
}
85+
86+
render() {
87+
return false;
88+
}
89+
}
90+
91+
FullStory.propTypes = {
92+
org: PropTypes.string.isRequired,
93+
};
94+
95+
export default FullStory;
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
"languages": ["en", "ar", "es", "fr", "de", "it", "ko", "nl", "pl", "pt", "pt-BR", "ru", "tr", "zh", "zh-Hans", "ja"]
2+
"languages": ["en", "ar", "es", "fa", "fr", "de", "it", "ko", "nl", "pl", "pt", "pt-BR", "ru", "tr", "zh", "zh-Hans", "ja"]
33
}

packages/strapi-admin/admin/src/containers/AdminPage/index.js

+4-2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ import Logout from 'components/Logout';
4343
import NotFoundPage from 'containers/NotFoundPage/Loadable';
4444
import OverlayBlocker from 'components/OverlayBlocker';
4545
import PluginPage from 'containers/PluginPage';
46+
import FullStory from 'components/FullStory';
4647
// Utils
4748
import auth from 'utils/auth';
4849
import injectReducer from 'utils/injectReducer';
@@ -73,12 +74,12 @@ export class AdminPage extends React.Component {
7374
}
7475

7576
componentDidUpdate(prevProps) {
76-
const { adminPage: { allowGa }, location: { pathname }, plugins } = this.props;
77+
const { adminPage: { uuid }, location: { pathname }, plugins } = this.props;
7778

7879
if (prevProps.location.pathname !== pathname) {
7980
this.checkLogin(this.props);
8081

81-
if (allowGa) {
82+
if (uuid) {
8283
ReactGA.pageview(pathname);
8384
}
8485
}
@@ -198,6 +199,7 @@ export class AdminPage extends React.Component {
198199

199200
return (
200201
<div className={styles.adminPage}>
202+
{this.props.adminPage.uuid ? <FullStory org="GK708" /> : ''}
201203
{this.showLeftMenu() && (
202204
<LeftMenu
203205
plugins={this.retrievePlugins()}

packages/strapi-admin/admin/src/containers/AdminPage/reducer.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import {
1111
} from './constants';
1212

1313
const initialState = fromJS({
14-
allowGa: true,
14+
uuid: false,
1515
currentEnvironment: 'development',
1616
isLoading: true,
1717
layout: Map({}),
@@ -22,7 +22,7 @@ function adminPageReducer(state = initialState, action) {
2222
switch (action.type) {
2323
case GET_ADMIN_DATA_SUCCEEDED:
2424
return state
25-
.update('allowGa', () => action.data.allowGa)
25+
.update('uuid', () => action.data.uuid)
2626
.update('currentEnvironment', () => action.data.currentEnvironment)
2727
.update('layout', () => Map(action.data.layout))
2828
.update('strapiVersion', () => action.data.strapiVersion)

packages/strapi-admin/admin/src/containers/AdminPage/saga.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,13 @@ function* getData() {
1616
yield call(request, `${strapi.backendURL}/users/me`, { method: 'GET' });
1717
}
1818

19-
const [{ allowGa }, { strapiVersion }, { currentEnvironment }, { layout }] = yield all([
19+
const [{ uuid }, { strapiVersion }, { currentEnvironment }, { layout }] = yield all([
2020
call(request, '/admin/gaConfig', { method: 'GET' }),
2121
call(request, '/admin/strapiVersion', { method: 'GET' }),
2222
call(request, '/admin/currentEnvironment', { method: 'GET' }),
2323
call(request, '/admin/layout', { method: 'GET' }),
2424
]);
25-
yield put(getAdminDataSucceeded({ allowGa, strapiVersion, currentEnvironment, layout }));
25+
yield put(getAdminDataSucceeded({ uuid, strapiVersion, currentEnvironment, layout }));
2626

2727
} catch(err) {
2828
console.log(err); // eslint-disable-line no-console

packages/strapi-admin/admin/src/containers/LocaleToggle/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,8 @@ export class LocaleToggle extends React.Component { // eslint-disable-line
3737
return 'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/kr.svg';
3838
case 'ja':
3939
return 'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/jp.svg';
40+
case 'fa':
41+
return 'https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/ir.svg';
4042
default:
4143
return `https://cdnjs.cloudflare.com/ajax/libs/flag-icon-css/3.1.0/flags/4x3/${locale}.svg`;
4244
}

packages/strapi-admin/admin/src/translations/es.json

+5-5
Original file line numberDiff line numberDiff line change
@@ -28,19 +28,19 @@
2828
"app.components.EmptyAttributes.title": "Aún no hay campos",
2929
"app.components.HomePage.button.blog": "VER MÁS EN EL BLOG",
3030
"app.components.HomePage.button.quickStart": "INICIAR EL TUTORIAL DE INICIO RÁPIDO",
31-
"app.components.HomePage.community": "Encuentra la comunidad en la web",
32-
"app.components.HomePage.community.content": "Discutir con los miembros del equipo, colaboradores y desarrolladores en diferentes canales.",
31+
"app.components.HomePage.community": "Encuentre la comunidad en la web",
32+
"app.components.HomePage.community.content": "Hable con los miembros del equipo, colaboradores y desarrolladores en diferentes canales.",
3333
"app.components.HomePage.create": "Crea tu primer Tipo de Contenido",
3434
"app.components.HomePage.createBlock.content.first": "El ",
35-
"app.components.HomePage.createBlock.content.second": " le ayudará a definir la estructura de datos de sus modelos. Si eres nuevo aquí, te recomendamos encarecidamente que sigas nuestro ",
35+
"app.components.HomePage.createBlock.content.second": " le ayudará a definir la estructura de datos de sus modelos. Si es nuevo aquí, le recomendamos encarecidamente que siga nuestro ",
3636
"app.components.HomePage.createBlock.content.tutorial": " ",
3737
"app.components.HomePage.cta": "CONFIRMAR",
3838
"app.components.HomePage.newsLetter": "Suscríbase al boletín de noticias para ponerse en contacto con Strapi",
3939
"app.components.HomePage.support": "APÓYANOS",
4040
"app.components.HomePage.support.content": "¡Al comprar la camiseta, nos permitirá continuar nuestro trabajo en el proyecto para darle la mejor experiencia posible!",
41-
"app.components.HomePage.support.link": "CONSIGUE TU CAMISETA AHORA",
41+
"app.components.HomePage.support.link": "CONSIGA SU CAMISETA AHORA",
4242
"app.components.HomePage.welcome": "¡Bienvenido a bordo!",
43-
"app.components.HomePage.welcome.again": "Bienvenido ",
43+
"app.components.HomePage.welcome.again": "¡Bienvenido ",
4444
"app.components.HomePage.welcomeBlock.content": "Estamos felices de tenerlo como miembro de la comunidad. Estamos constantemente en busca de comentarios así que no dude en enviarnos un DM en ",
4545
"app.components.HomePage.welcomeBlock.content.again": "Esperamos que estés progresando en tu proyecto.... Siéntase libre de leer las últimas novedades sobre Strapi. Estamos dando lo mejor de nosotros mismos para mejorar el producto basándonos en sus comentarios.",
4646
"app.components.HomePage.welcomeBlock.content.issues": "problema.",

0 commit comments

Comments
 (0)