generator-folklore 3.0.52 → 3.0.54

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25,22 +25,32 @@ const PanneauContainer = ({
25
25
  uploadEndpoint = '/panneau/upload',
26
26
  statusCode = null,
27
27
  }: PanneauContainerProps) => {
28
- const { routes = {} } = definition;
28
+ const { routes = {}, intl = null } = definition;
29
+ const { locale = 'fr' } = intl || {};
29
30
  const isAuthorized = statusCode !== 401 && statusCode !== 403;
30
31
  const [localeLoaded, setLocaleLoaded] = useState(false);
31
32
 
32
33
  useEffect(() => {
33
34
  let canceled = false;
34
- const { locale = 'fr' } = definition.intl || {};
35
- import(locale === 'en' ? `@panneau/intl/locale/en` : `@panneau/intl/locale/fr`).then(() => {
36
- if (!canceled) {
37
- setLocaleLoaded(true);
38
- }
39
- });
35
+ if (locale === 'fr') {
36
+ import('@panneau/intl/locale/fr').then(() => {
37
+ if (!canceled) {
38
+ setLocaleLoaded(true);
39
+ }
40
+ });
41
+ } else if (locale === 'en') {
42
+ import('@panneau/intl/locale/en').then(() => {
43
+ if (!canceled) {
44
+ setLocaleLoaded(true);
45
+ }
46
+ });
47
+ } else {
48
+ setLocaleLoaded(true);
49
+ }
40
50
  return () => {
41
51
  canceled = true;
42
52
  };
43
- }, [definition]);
53
+ }, [locale]);
44
54
 
45
55
  return localeLoaded ? (
46
56
  <Panneau
@@ -32,7 +32,7 @@ class LaravelProjectGenerator extends _generator.default {
32
32
  this.option('laravel-version', {
33
33
  type: String,
34
34
  desc: 'Laravel version',
35
- defaults: '12'
35
+ defaults: '13'
36
36
  });
37
37
  this.option('laravel-branch', {
38
38
  type: String,
@@ -1,17 +1,17 @@
1
- import postcssGlobalData from '@csstools/postcss-global-data';
2
- import postcssCustomMedia from 'postcss-custom-media';
3
- import postcssImport from 'postcss-import';
4
- import postcssNormalize from 'postcss-normalize';
5
- import postcssPresetEnv from 'postcss-preset-env';
1
+ const postcssGlobalData = require('@csstools/postcss-global-data');
2
+ const postcssCustomMedia = require('postcss-custom-media');
3
+ const postcssImport = require('postcss-import');
4
+ const postcssNormalize = require('postcss-normalize');
5
+ const postcssPresetEnv = require('postcss-preset-env');
6
6
 
7
- export default {
7
+ module.exports = {
8
8
  plugins: [
9
9
  postcssImport({}),
10
- // postcssGlobalData({
11
- // files: [
12
- // 'src/styles/theme/variables.css',
13
- // ],
14
- // }),
10
+ postcssGlobalData({
11
+ files: [
12
+ './resources/styles/theme/medias.css',
13
+ ],
14
+ }),
15
15
  postcssCustomMedia({}),
16
16
  postcssPresetEnv({}),
17
17
  postcssNormalize({}),
@@ -106,7 +106,7 @@ class ReactAppGenerator extends _generator.default {
106
106
  wouter: '^3.7.1',
107
107
  classnames: '^2.5.1',
108
108
  '@folklore/auth': '^0.0.14',
109
- '@folklore/routes': '^0.2.47',
109
+ '@folklore/routes': '^0.4.11',
110
110
  '@folklore/fonts': '^0.0.20',
111
111
  '@folklore/forms': '^0.0.35',
112
112
  '@folklore/fetch': '^0.1.24',
@@ -3,6 +3,13 @@ import { Link } from 'wouter';
3
3
 
4
4
  import styles from '<%= getRelativeStylesPath('components/menus/Menu.jsx', 'menus/menu.module.css') %>';
5
5
 
6
+ interface MenuItem {
7
+ label: string;
8
+ url: string;
9
+ active?: boolean;
10
+ external?: boolean;
11
+ target?: string;
12
+ }
6
13
 
7
14
  interface MenuProps {
8
15
  items?: MenuItem[];
@@ -21,10 +28,7 @@ function Menu({ items = null, className = null }: MenuProps) {
21
28
  >
22
29
  <ul className={styles.items}>
23
30
  {(items || []).map(
24
- (
25
- { label, url, active = false, external = false, target = '_blank' },
26
- index,
27
- ) => (
31
+ ({ label = null, url = null, active = false, external = false, target = '_blank' }) => (
28
32
  <li
29
33
  className={classNames([
30
34
  styles.item,
@@ -32,7 +36,7 @@ function Menu({ items = null, className = null }: MenuProps) {
32
36
  [styles.active]: active,
33
37
  },
34
38
  ])}
35
- key={`item-${index}`}
39
+ key={`item-${label}-${url}`}
36
40
  >
37
41
  {external ? (
38
42
  <a href={url} target={target} className={styles.link}>
@@ -52,3 +56,4 @@ function Menu({ items = null, className = null }: MenuProps) {
52
56
  }
53
57
 
54
58
  export default Menu;
59
+
@@ -10,58 +10,71 @@ export const messages = defineMessages({
10
10
  metaTitle401: {
11
11
  id: 'meta.title_401',
12
12
  defaultMessage: 'Error 401',
13
+ description: 'Page title',
13
14
  },
14
15
  title401: {
15
16
  id: 'errors.title_401',
16
17
  defaultMessage: 'Error 401',
18
+ description: 'Page title',
17
19
  },
18
20
  description401: {
19
21
  id: 'errors.description_401',
20
22
  defaultMessage: 'You are not authorized to access this page.',
23
+ description: 'Page description',
21
24
  },
22
25
 
23
26
  metaTitle403: {
24
27
  id: 'meta.title_403',
25
28
  defaultMessage: 'Error 403',
29
+ description: 'Page title',
26
30
  },
27
31
  title403: {
28
32
  id: 'errors.title_403',
29
33
  defaultMessage: 'Error 403',
34
+ description: 'Page title',
30
35
  },
31
36
  description403: {
32
37
  id: 'errors.description_403',
33
38
  defaultMessage: 'Access to this page is forbidden',
39
+ description: 'Page description',
34
40
  },
35
41
 
36
42
  metaTitle404: {
37
43
  id: 'meta.title_404',
38
44
  defaultMessage: 'Error 404',
45
+ description: 'Page title',
39
46
  },
40
47
  title404: {
41
48
  id: 'errors.title_404',
42
49
  defaultMessage: 'Error 404',
50
+ description: 'Page title',
43
51
  },
44
52
  description404: {
45
53
  id: 'errors.description_404',
46
54
  defaultMessage: 'This page doesn’t exists',
55
+ description: 'Page description',
47
56
  },
48
57
 
49
58
  metaTitle500: {
50
59
  id: 'meta.title_500',
51
60
  defaultMessage: 'Error 500',
61
+ description: 'Page title',
52
62
  },
53
63
  title500: {
54
64
  id: 'errors.title_500',
55
65
  defaultMessage: 'Error 500',
66
+ description: 'Page title',
56
67
  },
57
68
  description500: {
58
69
  id: 'errors.description_500',
59
70
  defaultMessage: 'There was an error',
71
+ description: 'Page description',
60
72
  },
61
73
 
62
74
  gotoHome: {
63
75
  id: 'errors.goto_home',
64
76
  defaultMessage: 'Go to home',
77
+ description: 'Link label',
65
78
  },
66
79
  });
67
80
 
@@ -159,7 +159,7 @@ class ReactPackageGenerator extends _generator.default {
159
159
  if (this.options['skip-install']) {
160
160
  return;
161
161
  }
162
- this.addDependencies(['react@18.3.1', 'prop-types@latest', 'react-dom@18.3.1']);
162
+ this.addDependencies(['react@19.2.8', 'prop-types@latest', 'react-dom@19.2.8']);
163
163
  },
164
164
  npmInstallDev() {
165
165
  if (this.options['skip-install']) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "generator-folklore",
3
- "version": "3.0.52",
3
+ "version": "3.0.54",
4
4
  "description": "Yeoman generator for projects at Folklore",
5
5
  "keywords": [
6
6
  "yeoman-generator"
@@ -40,5 +40,5 @@
40
40
  "yeoman-generator": "5.9.0",
41
41
  "yeoman-remote": "^1.0.1"
42
42
  },
43
- "gitHead": "82e2bdf99a8fa975ea116593b54e8ad454a3a0b9"
43
+ "gitHead": "9405e6a69d84448512ac33d3bbdb8cac44637140"
44
44
  }