neo.mjs 3.0.3 → 3.1.0

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.
Files changed (38) hide show
  1. package/README.md +0 -2
  2. package/apps/website/data/blog.json +26 -0
  3. package/buildScripts/buildAll.mjs +136 -0
  4. package/buildScripts/buildThemes.mjs +444 -0
  5. package/buildScripts/{copyFolder.js → copyFolder.mjs} +3 -5
  6. package/buildScripts/createApp.mjs +288 -0
  7. package/buildScripts/docs/{jsdocx.js → jsdocx.mjs} +31 -32
  8. package/buildScripts/webpack/buildMyApps.mjs +125 -0
  9. package/buildScripts/webpack/buildThreads.mjs +115 -0
  10. package/buildScripts/webpack/development/{webpack.config.appworker.js → webpack.config.appworker.mjs} +20 -22
  11. package/buildScripts/webpack/development/webpack.config.main.mjs +24 -0
  12. package/buildScripts/webpack/development/{webpack.config.myapps.js → webpack.config.myapps.mjs} +15 -15
  13. package/buildScripts/webpack/development/{webpack.config.worker.js → webpack.config.worker.mjs} +12 -9
  14. package/buildScripts/webpack/production/{webpack.config.appworker.js → webpack.config.appworker.mjs} +20 -22
  15. package/buildScripts/webpack/production/webpack.config.main.mjs +23 -0
  16. package/buildScripts/webpack/production/{webpack.config.myapps.js → webpack.config.myapps.mjs} +15 -15
  17. package/buildScripts/webpack/production/{webpack.config.worker.js → webpack.config.worker.mjs} +12 -9
  18. package/buildScripts/webpack/{webpack.server.config.js → webpack.server.config.mjs} +2 -2
  19. package/docs/app/view/classdetails/MembersList.mjs +7 -13
  20. package/examples/list/animate/List.mjs +1 -1
  21. package/examples/list/animate/MainContainer.mjs +44 -5
  22. package/examples/list/animate/MainStore.mjs +17 -0
  23. package/package.json +14 -13
  24. package/resources/scss/src/examples/list/animate/List.scss +0 -1
  25. package/src/collection/Filter.mjs +7 -2
  26. package/src/list/Base.mjs +1 -1
  27. package/src/list/plugin/Animate.mjs +218 -71
  28. package/src/main/addon/Stylesheet.mjs +35 -2
  29. package/src/plugin/Base.mjs +5 -1
  30. package/src/util/Css.mjs +19 -5
  31. package/buildScripts/buildAll.js +0 -148
  32. package/buildScripts/buildThemes.js +0 -442
  33. package/buildScripts/createApp.js +0 -283
  34. package/buildScripts/webpack/buildMyApps.js +0 -125
  35. package/buildScripts/webpack/buildThreads.js +0 -112
  36. package/buildScripts/webpack/development/webpack.config.main.js +0 -21
  37. package/buildScripts/webpack/index.ejs +0 -25
  38. package/buildScripts/webpack/production/webpack.config.main.js +0 -20
@@ -1,28 +1,30 @@
1
+ import fs from 'fs-extra';
2
+ import path from 'path';
3
+ import webpack from 'webpack';
4
+ import WebpackHookPlugin from 'webpack-hook-plugin';
5
+
1
6
  const cwd = process.cwd(),
2
- fs = require('fs-extra'),
3
- path = require('path'),
4
- buildTarget = require('./buildTarget.json'),
5
- WebpackHookPlugin = require('webpack-hook-plugin'),
6
7
  configPath = path.resolve(cwd, 'buildScripts/myApps.json'),
7
- packageJson = require(path.resolve(cwd, 'package.json')),
8
+ requireJson = path => JSON.parse(fs.readFileSync((path))),
9
+ packageJson = requireJson(path.resolve(cwd, 'package.json')),
8
10
  neoPath = packageJson.name === 'neo.mjs' ? './' : './node_modules/neo.mjs/',
9
- filenameConfig = require(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
11
+ buildTarget = requireJson(path.resolve(neoPath, 'buildScripts/webpack/development/buildTarget.json')),
12
+ filenameConfig = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
10
13
  plugins = [],
11
14
  regexIndexNodeModules = /node_modules/g,
12
- regexTopLevel = /\.\.\//g,
13
- webpack = require('webpack');
15
+ regexTopLevel = /\.\.\//g;
14
16
 
15
17
  let config, examplesPath;
16
18
 
17
19
  if (fs.existsSync(configPath)) {
18
- config = require(configPath);
20
+ config = requireJson(configPath);
19
21
  } else {
20
22
  const myAppsPath = path.resolve(neoPath, 'buildScripts/webpack/json/myApps.json');
21
23
 
22
24
  if (fs.existsSync(myAppsPath)) {
23
- config = require(myAppsPath);
25
+ config = requireJson(myAppsPath);
24
26
  } else {
25
- config = require(path.resolve(neoPath, 'buildScripts/webpack/json/myApps.template.json'));
27
+ config = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/myApps.template.json'));
26
28
  }
27
29
  }
28
30
 
@@ -30,7 +32,7 @@ if (!buildTarget.folder) {
30
32
  buildTarget.folder = 'dist/development';
31
33
  }
32
34
 
33
- module.exports = env => {
35
+ export default env => {
34
36
  let examples = [],
35
37
  insideNeo = env.insideNeo == 'true',
36
38
  content, inputPath, outputPath;
@@ -63,7 +65,7 @@ module.exports = env => {
63
65
  inputPath = path.resolve(cwd, folder, lAppName, 'neo-config.json');
64
66
  outputPath = path.resolve(cwd, buildTarget.folder, folder, lAppName, 'neo-config.json');
65
67
 
66
- content = require(inputPath);
68
+ content = requireJson(inputPath);
67
69
 
68
70
  content.appPath = content.appPath.replace(regexTopLevel, '');
69
71
 
@@ -85,9 +87,7 @@ module.exports = env => {
85
87
  fs.writeFileSync(outputPath, content);
86
88
  };
87
89
 
88
- const isFile = fileName => {
89
- return fs.lstatSync(fileName).isFile()
90
- };
90
+ const isFile = fileName => fs.lstatSync(fileName).isFile();
91
91
 
92
92
  const parseFolder = (folderPath, index, relativePath) => {
93
93
  let itemPath;
@@ -105,11 +105,9 @@ module.exports = env => {
105
105
  });
106
106
  };
107
107
 
108
- if (config.apps) {
109
- config.apps.forEach(key => {
110
- createStartingPoint(key, key === 'Docs' ? '' : 'apps');
111
- });
112
- }
108
+ config.apps?.forEach(key => {
109
+ createStartingPoint(key, key === 'Docs' ? '' : 'apps');
110
+ });
113
111
 
114
112
  examplesPath = path.join(cwd, 'examples');
115
113
 
@@ -138,7 +136,7 @@ module.exports = env => {
138
136
  }
139
137
  }),
140
138
  new WebpackHookPlugin({
141
- onBuildEnd: ['node '+path.resolve(neoPath, 'buildScripts/copyFolder.js')+' -s '+path.resolve(neoPath, 'docs/resources')+' -t '+path.resolve(cwd, buildTarget.folder, 'docs/resources')]
139
+ onBuildEnd: ['node '+path.resolve(neoPath, 'buildScripts/copyFolder.mjs')+' -s '+path.resolve(neoPath, 'docs/resources')+' -t '+path.resolve(cwd, buildTarget.folder, 'docs/resources')]
142
140
  }),
143
141
  ...plugins
144
142
  ],
@@ -0,0 +1,24 @@
1
+ import fs from 'fs-extra';
2
+ import path from 'path';
3
+
4
+ const cwd = process.cwd(),
5
+ requireJson = path => JSON.parse(fs.readFileSync((path))),
6
+ packageJson = requireJson(path.resolve(cwd, 'package.json')),
7
+ neoPath = packageJson.name === 'neo.mjs' ? './' : './node_modules/neo.mjs/',
8
+ buildTarget = requireJson(path.resolve(neoPath, 'buildScripts/webpack/development/buildTarget.json')),
9
+ filenameConfig = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
10
+ entry = {main: path.resolve(neoPath, filenameConfig.mainInput)};
11
+
12
+ export default {
13
+ mode : 'development',
14
+ devtool: 'inline-source-map',
15
+ entry,
16
+ target : 'web',
17
+
18
+ output: {
19
+ chunkFilename: 'chunks/main/[id].js',
20
+ filename : filenameConfig.mainOutput,
21
+ path : path.resolve(cwd, buildTarget.folder),
22
+ publicPath : ''
23
+ }
24
+ };
@@ -1,41 +1,41 @@
1
+ import fs from 'fs-extra';
2
+ import path from 'path';
3
+ import webpack from 'webpack';
4
+
1
5
  const cwd = process.cwd(),
2
- fs = require('fs-extra'),
3
- buildTarget = require('./buildTarget.json'),
4
- path = require('path'),
5
6
  configPath = path.resolve(cwd, 'buildScripts/myApps.json'),
6
- packageJson = require(path.resolve(cwd, 'package.json')),
7
+ requireJson = path => JSON.parse(fs.readFileSync((path))),
8
+ packageJson = requireJson(path.resolve(cwd, 'package.json')),
7
9
  neoPath = packageJson.name === 'neo.mjs' ? './' : './node_modules/neo.mjs/',
8
- filenameConfig = require(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
10
+ buildTarget = requireJson(path.resolve(neoPath, 'buildScripts/webpack/development/buildTarget.json')),
11
+ filenameConfig = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
9
12
  plugins = [],
10
13
  regexIndexNodeModules = /node_modules/g,
11
- regexTopLevel = /\.\.\//g,
12
- webpack = require('webpack');
14
+ regexTopLevel = /\.\.\//g;
13
15
 
14
16
  let config;
15
17
 
16
18
  if (fs.existsSync(configPath)) {
17
- config = require(configPath);
19
+ config = requireJson(configPath);
18
20
  } else {
19
21
  const myAppsPath = path.resolve(neoPath, 'buildScripts/webpack/json/myApps.json');
20
22
 
21
23
  if (fs.existsSync(myAppsPath)) {
22
- config = require(myAppsPath);
24
+ config = requireJson(myAppsPath);
23
25
  } else {
24
- config = require(path.resolve(neoPath, 'buildScripts/webpack/json/myApps.template.json'));
26
+ config = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/myApps.template.json'));
25
27
  }
26
28
  }
27
29
 
28
30
  let index = config.apps.indexOf('Docs');
29
31
 
30
- if (index > -1) {
31
- config.apps.splice(index, 1);
32
- }
32
+ index > -1 && config.apps.splice(index, 1);
33
33
 
34
34
  if (!buildTarget.folder) {
35
35
  buildTarget.folder = 'dist/development';
36
36
  }
37
37
 
38
- module.exports = env => {
38
+ export default env => {
39
39
  let apps = env.apps.split(','),
40
40
  insideNeo = env.insideNeo == 'true',
41
41
  buildAll = apps.includes('all'),
@@ -75,7 +75,7 @@ module.exports = env => {
75
75
  inputPath = path.resolve(cwd, 'apps', lAppName, 'neo-config.json');
76
76
  outputPath = path.resolve(cwd, buildTarget.folder, 'apps', lAppName, 'neo-config.json');
77
77
 
78
- content = require(inputPath);
78
+ content = requireJson(inputPath);
79
79
 
80
80
  content.appPath = content.appPath.replace(regexTopLevel, '');
81
81
 
@@ -1,13 +1,16 @@
1
- const path = require('path'),
2
- buildTarget = require('./buildTarget.json'),
3
- processRoot = process.cwd(),
4
- packageJson = require(path.resolve(processRoot, 'package.json')),
1
+ import fs from 'fs-extra';
2
+ import path from 'path';
3
+ import webpack from 'webpack';
4
+
5
+ const cwd = process.cwd(),
6
+ requireJson = path => JSON.parse(fs.readFileSync((path))),
7
+ packageJson = requireJson(path.resolve(cwd, 'package.json')),
5
8
  neoPath = packageJson.name === 'neo.mjs' ? './' : './node_modules/neo.mjs/',
6
- filenameConfig = require(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
7
- entry = {},
8
- webpack = require('webpack');
9
+ buildTarget = requireJson(path.resolve(neoPath, 'buildScripts/webpack/development/buildTarget.json')),
10
+ filenameConfig = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
11
+ entry = {};
9
12
 
10
- module.exports = env => {
13
+ export default env => {
11
14
  let insideNeo = env.insideNeo == 'true';
12
15
 
13
16
  if (filenameConfig.workers) {
@@ -43,7 +46,7 @@ module.exports = env => {
43
46
  }
44
47
  },
45
48
 
46
- path: path.resolve(processRoot, buildTarget.folder)
49
+ path: path.resolve(cwd, buildTarget.folder)
47
50
  }
48
51
  }
49
52
  };
@@ -1,31 +1,33 @@
1
+ import fs from 'fs-extra';
2
+ import path from 'path';
3
+ import webpack from 'webpack';
4
+ import WebpackHookPlugin from 'webpack-hook-plugin';
5
+
1
6
  const cwd = process.cwd(),
2
- fs = require('fs-extra'),
3
- path = require('path'),
4
- buildTarget = require('./buildTarget.json'),
5
- WebpackHookPlugin = require('webpack-hook-plugin'),
6
7
  configPath = path.resolve(cwd, 'buildScripts/myApps.json'),
7
- packageJson = require(path.resolve(cwd, 'package.json')),
8
+ requireJson = path => JSON.parse(fs.readFileSync((path))),
9
+ packageJson = requireJson(path.resolve(cwd, 'package.json')),
8
10
  neoPath = packageJson.name === 'neo.mjs' ? './' : './node_modules/neo.mjs/',
9
- filenameConfig = require(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
11
+ buildTarget = requireJson(path.resolve(neoPath, 'buildScripts/webpack/production/buildTarget.json')),
12
+ filenameConfig = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
10
13
  plugins = [],
11
14
  regexIndexNodeModules = /node_modules/g,
12
15
  regexLineBreak = /(\r\n|\n|\r)/gm,
13
16
  regexTopLevel = /\.\.\//g,
14
17
  regexTrimEnd = /\s+$/gm,
15
- regexTrimStart = /^\s+/gm,
16
- webpack = require('webpack');
18
+ regexTrimStart = /^\s+/gm;
17
19
 
18
20
  let config, examplesPath;
19
21
 
20
22
  if (fs.existsSync(configPath)) {
21
- config = require(configPath);
23
+ config = requireJson(configPath);
22
24
  } else {
23
25
  const myAppsPath = path.resolve(neoPath, 'buildScripts/webpack/json/myApps.json');
24
26
 
25
27
  if (fs.existsSync(myAppsPath)) {
26
- config = require(myAppsPath);
28
+ config = requireJson(myAppsPath);
27
29
  } else {
28
- config = require(path.resolve(neoPath, 'buildScripts/webpack/json/myApps.template.json'));
30
+ config = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/myApps.template.json'));
29
31
  }
30
32
  }
31
33
 
@@ -33,7 +35,7 @@ if (!buildTarget.folder) {
33
35
  buildTarget.folder = 'dist/production';
34
36
  }
35
37
 
36
- module.exports = env => {
38
+ export default env => {
37
39
  let examples = [],
38
40
  insideNeo = env.insideNeo == 'true',
39
41
  content, inputPath, outputPath;
@@ -67,7 +69,7 @@ module.exports = env => {
67
69
  inputPath = path.resolve(cwd, folder, lAppName, 'neo-config.json');
68
70
  outputPath = path.resolve(cwd, buildTarget.folder, folder, lAppName, 'neo-config.json');
69
71
 
70
- content = require(inputPath);
72
+ content = requireJson(inputPath);
71
73
  delete content.environment;
72
74
 
73
75
  content.appPath = content.appPath.replace(regexTopLevel, '');
@@ -94,9 +96,7 @@ module.exports = env => {
94
96
  fs.writeFileSync(outputPath, content);
95
97
  };
96
98
 
97
- const isFile = fileName => {
98
- return fs.lstatSync(fileName).isFile()
99
- };
99
+ const isFile = fileName => fs.lstatSync(fileName).isFile();
100
100
 
101
101
  const parseFolder = (folderPath, index, relativePath) => {
102
102
  let itemPath;
@@ -114,11 +114,9 @@ module.exports = env => {
114
114
  });
115
115
  };
116
116
 
117
- if (config.apps) {
118
- config.apps.forEach(key => {
119
- createStartingPoint(key, key === 'Docs' ? '' : 'apps');
120
- });
121
- }
117
+ config.apps?.forEach(key => {
118
+ createStartingPoint(key, key === 'Docs' ? '' : 'apps');
119
+ });
122
120
 
123
121
  examplesPath = path.join(cwd, 'examples');
124
122
 
@@ -142,7 +140,7 @@ module.exports = env => {
142
140
  }
143
141
  }),
144
142
  new WebpackHookPlugin({
145
- onBuildEnd: ['node '+path.resolve(neoPath, 'buildScripts/copyFolder.js')+' -s '+path.resolve(neoPath, 'docs/resources')+' -t '+path.resolve(cwd, buildTarget.folder, 'docs/resources')]
143
+ onBuildEnd: ['node '+path.resolve(neoPath, 'buildScripts/copyFolder.mjs')+' -s '+path.resolve(neoPath, 'docs/resources')+' -t '+path.resolve(cwd, buildTarget.folder, 'docs/resources')]
146
144
  }),
147
145
  ...plugins
148
146
  ],
@@ -0,0 +1,23 @@
1
+ import fs from 'fs-extra';
2
+ import path from 'path';
3
+
4
+ const cwd = process.cwd(),
5
+ requireJson = path => JSON.parse(fs.readFileSync((path))),
6
+ packageJson = requireJson(path.resolve(cwd, 'package.json')),
7
+ neoPath = packageJson.name === 'neo.mjs' ? './' : './node_modules/neo.mjs/',
8
+ buildTarget = requireJson(path.resolve(neoPath, 'buildScripts/webpack/production/buildTarget.json')),
9
+ filenameConfig = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
10
+ entry = {main: path.resolve(neoPath, filenameConfig.mainInput)};
11
+
12
+ export default {
13
+ mode : 'production',
14
+ entry,
15
+ target: 'web',
16
+
17
+ output: {
18
+ chunkFilename: 'chunks/main/[id].js',
19
+ filename : filenameConfig.mainOutput,
20
+ path : path.resolve(cwd, buildTarget.folder),
21
+ publicPath : ''
22
+ }
23
+ };
@@ -1,44 +1,44 @@
1
+ import fs from 'fs-extra';
2
+ import path from 'path';
3
+ import webpack from 'webpack';
4
+
1
5
  const cwd = process.cwd(),
2
- fs = require('fs-extra'),
3
- path = require('path'),
4
- buildTarget = require('./buildTarget.json'),
5
6
  configPath = path.resolve(cwd, 'buildScripts/myApps.json'),
6
- packageJson = require(path.resolve(cwd, 'package.json')),
7
+ requireJson = path => JSON.parse(fs.readFileSync((path))),
8
+ packageJson = requireJson(path.resolve(cwd, 'package.json')),
7
9
  neoPath = packageJson.name === 'neo.mjs' ? './' : './node_modules/neo.mjs/',
8
- filenameConfig = require(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
10
+ buildTarget = requireJson(path.resolve(neoPath, 'buildScripts/webpack/production/buildTarget.json')),
11
+ filenameConfig = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
9
12
  plugins = [],
10
13
  regexIndexNodeModules = /node_modules/g,
11
14
  regexLineBreak = /(\r\n|\n|\r)/gm,
12
15
  regexTopLevel = /\.\.\//g,
13
16
  regexTrimEnd = /\s+$/gm,
14
- regexTrimStart = /^\s+/gm,
15
- webpack = require('webpack');
17
+ regexTrimStart = /^\s+/gm;
16
18
 
17
19
  let config;
18
20
 
19
21
  if (fs.existsSync(configPath)) {
20
- config = require(configPath);
22
+ config = requireJson(configPath);
21
23
  } else {
22
24
  const myAppsPath = path.resolve(neoPath, 'buildScripts/webpack/json/myApps.json');
23
25
 
24
26
  if (fs.existsSync(myAppsPath)) {
25
- config = require(myAppsPath);
27
+ config = requireJson(myAppsPath);
26
28
  } else {
27
- config = require(path.resolve(neoPath, 'buildScripts/webpack/json/myApps.template.json'));
29
+ config = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/myApps.template.json'));
28
30
  }
29
31
  }
30
32
 
31
33
  let index = config.apps.indexOf('Docs');
32
34
 
33
- if (index > -1) {
34
- config.apps.splice(index, 1);
35
- }
35
+ index > -1 && config.apps.splice(index, 1);
36
36
 
37
37
  if (!buildTarget.folder) {
38
38
  buildTarget.folder = 'dist/production';
39
39
  }
40
40
 
41
- module.exports = env => {
41
+ export default env => {
42
42
  let apps = env.apps.split(','),
43
43
  insideNeo = env.insideNeo == 'true',
44
44
  buildAll = apps.includes('all'),
@@ -80,7 +80,7 @@ module.exports = env => {
80
80
  inputPath = path.resolve(cwd, 'apps', lAppName, 'neo-config.json');
81
81
  outputPath = path.resolve(cwd, buildTarget.folder, 'apps', lAppName, 'neo-config.json');
82
82
 
83
- content = require(inputPath);
83
+ content = requireJson(inputPath);
84
84
  delete content.environment;
85
85
 
86
86
  content.appPath = content.appPath.replace(regexTopLevel, '');
@@ -1,13 +1,16 @@
1
- const path = require('path'),
2
- buildTarget = require('./buildTarget.json'),
3
- processRoot = process.cwd(),
4
- packageJson = require(path.resolve(processRoot, 'package.json')),
1
+ import fs from 'fs-extra';
2
+ import path from 'path';
3
+ import webpack from 'webpack';
4
+
5
+ const cwd = process.cwd(),
6
+ requireJson = path => JSON.parse(fs.readFileSync((path))),
7
+ packageJson = requireJson(path.resolve(cwd, 'package.json')),
5
8
  neoPath = packageJson.name === 'neo.mjs' ? './' : './node_modules/neo.mjs/',
6
- filenameConfig = require(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
7
- entry = {},
8
- webpack = require('webpack');
9
+ buildTarget = requireJson(path.resolve(neoPath, 'buildScripts/webpack/production/buildTarget.json')),
10
+ filenameConfig = requireJson(path.resolve(neoPath, 'buildScripts/webpack/json/build.json')),
11
+ entry = {};
9
12
 
10
- module.exports = env => {
13
+ export default env => {
11
14
  let insideNeo = env.insideNeo == 'true';
12
15
 
13
16
  if (filenameConfig.workers) {
@@ -42,7 +45,7 @@ module.exports = env => {
42
45
  }
43
46
  },
44
47
 
45
- path: path.resolve(processRoot, buildTarget.folder)
48
+ path: path.resolve(cwd, buildTarget.folder)
46
49
  }
47
50
  }
48
51
  };
@@ -1,7 +1,7 @@
1
- module.exports = {
1
+ export default {
2
2
  mode: 'production',
3
3
 
4
4
  devServer: {
5
5
  static: process.cwd()
6
6
  }
7
- };
7
+ };
@@ -83,9 +83,7 @@ class MembersList extends Base {
83
83
  * @protected
84
84
  */
85
85
  afterSetFilterMembersQuery(value, oldValue) {
86
- if (oldValue !== undefined) {
87
- this.onRefreshClassMembers();
88
- }
86
+ oldValue !== undefined && this.onRefreshClassMembers();
89
87
  }
90
88
 
91
89
  /**
@@ -95,9 +93,7 @@ class MembersList extends Base {
95
93
  * @protected
96
94
  */
97
95
  afterSetShowProtectedMembers(value, oldValue) {
98
- if (oldValue !== undefined) {
99
- this.onRefreshClassMembers();
100
- }
96
+ oldValue !== undefined && this.onRefreshClassMembers();
101
97
  }
102
98
 
103
99
  /**
@@ -107,9 +103,7 @@ class MembersList extends Base {
107
103
  * @protected
108
104
  */
109
105
  afterSetShowPrivateMembers(value, oldValue) {
110
- if (oldValue !== undefined) {
111
- this.onRefreshClassMembers();
112
- }
106
+ oldValue !== undefined && this.onRefreshClassMembers();
113
107
  }
114
108
 
115
109
  /**
@@ -119,9 +113,7 @@ class MembersList extends Base {
119
113
  * @protected
120
114
  */
121
115
  afterSetShowStaticMembers(value, oldValue) {
122
- if (oldValue !== undefined) {
123
- this.onRefreshClassMembers();
124
- }
116
+ oldValue !== undefined && this.onRefreshClassMembers();
125
117
  }
126
118
 
127
119
  /**
@@ -547,8 +539,10 @@ class MembersList extends Base {
547
539
 
548
540
  filters.push({
549
541
  scope : me,
550
- filterBy: function(item, filteredItems, allItems) {
542
+ filterBy: function(opts) {
551
543
  let me = this,
544
+ filteredItems = opts.filteredItems,
545
+ item = opts.item,
552
546
  targetClassName = me.targetClassName,
553
547
  filteredItem, i, len;
554
548
 
@@ -36,7 +36,7 @@ class List extends BaseList {
36
36
 
37
37
  return [
38
38
  {cls: ['neo-list-item-content'], id: `${id}__content`, cn: [
39
- {tag: 'img', id: `${id}__image`, src: `../../../resources/examples/${record.image}`},
39
+ {tag: 'img', id: `${id}__image`, src: `${Neo.config.resourcesPath}examples/${record.image}`},
40
40
  {cls: ['neo-list-item-text'], id: `${id}__content_wrapper`, cn: [
41
41
  {html: record.firstname, id: `${id}__firstname`},
42
42
  {cls: ['neo-lastname'], id: `${id}__lastname`, html: record.lastname},
@@ -1,8 +1,10 @@
1
- import CheckBox from '../../../src/form/field/CheckBox.mjs';
2
- import List from './List.mjs';
3
- import MainStore from './MainStore.mjs';
4
- import Toolbar from '../../../src/container/Toolbar.mjs';
5
- import Viewport from '../../../src/container/Viewport.mjs';
1
+ import CheckBox from '../../../src/form/field/CheckBox.mjs';
2
+ import List from './List.mjs';
3
+ import MainStore from './MainStore.mjs';
4
+ import NumberField from '../../../src/form/field/Number.mjs';
5
+ import TextField from '../../../src/form/field/Text.mjs';
6
+ import Toolbar from '../../../src/container/Toolbar.mjs';
7
+ import Viewport from '../../../src/container/Viewport.mjs';
6
8
 
7
9
  /**
8
10
  * @class Neo.examples.list.animate.MainContainer
@@ -54,6 +56,27 @@ class MainContainer extends Viewport {
54
56
  listeners : {change: me.changeIsOnlineFilter.bind(me)},
55
57
  style : {marginLeft: '50px'}
56
58
  }]
59
+ }, {
60
+ module : TextField,
61
+ flex : 'none',
62
+ labelText : 'Search',
63
+ labelWidth: 60,
64
+ listeners : {change: me.changeNameFilter.bind(me)},
65
+ style : {marginLeft: '10px'},
66
+ width : 262
67
+ }, {
68
+ module : NumberField,
69
+ clearToOriginalValue: true,
70
+ flex : 'none',
71
+ labelText : 'Transition Duration',
72
+ labelWidth : 150,
73
+ listeners : {change: me.changeTransitionDuration.bind(me)},
74
+ maxValue : 5000,
75
+ minValue : 100,
76
+ stepSize : 100,
77
+ style : {marginLeft: '10px'},
78
+ value : 500,
79
+ width : 262
57
80
  }, {
58
81
  module: List,
59
82
  store : MainStore
@@ -69,6 +92,15 @@ class MainContainer extends Viewport {
69
92
  store.getFilter('isOnline').disabled = !data.value;
70
93
  }
71
94
 
95
+ /**
96
+ * @param {Object} data
97
+ */
98
+ changeNameFilter(data) {
99
+ let store = this.down({module: List}).store;
100
+
101
+ store.getFilter('name').value = data.value;
102
+ }
103
+
72
104
  /**
73
105
  * @param {String} property
74
106
  * @param {Object} data
@@ -97,6 +129,13 @@ class MainContainer extends Viewport {
97
129
 
98
130
  me.sortBy = property;
99
131
  }
132
+
133
+ /**
134
+ * @param {Object} data
135
+ */
136
+ changeTransitionDuration(data) {
137
+ this.down({module: List}).getPlugin('animate').transitionDuration = data.value;
138
+ }
100
139
  }
101
140
 
102
141
  Neo.applyClassConfig(MainContainer);
@@ -17,6 +17,23 @@ class MainStore extends Store {
17
17
  disabled : true,
18
18
  property : 'isOnline',
19
19
  value : true
20
+ }, {
21
+ property : 'name',
22
+ value : null,
23
+
24
+ filterBy: opts => {
25
+ let record = opts.item,
26
+ value = opts.value?.toLowerCase();
27
+
28
+ if (value) {
29
+ return !(
30
+ record.firstname.toLowerCase().includes(value) ||
31
+ record.lastname .toLowerCase().includes(value)
32
+ );
33
+ }
34
+
35
+ return false;
36
+ }
20
37
  }],
21
38
 
22
39
  sorters: [{