neo.mjs 8.31.1 → 8.33.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.
- package/.github/LLM_PROMPTS.md +463 -0
- package/README.md +138 -55
- package/apps/ServiceWorker.mjs +2 -2
- package/apps/finance/app.mjs +6 -0
- package/apps/finance/index.html +12 -0
- package/apps/finance/model/Company.mjs +37 -0
- package/apps/finance/neo-config.json +7 -0
- package/apps/finance/resources/data/companies.json +103 -0
- package/apps/finance/resources/images/neo_logo_favicon.svg +16 -0
- package/apps/finance/store/Companies.mjs +37 -0
- package/apps/finance/view/GridContainer.mjs +58 -0
- package/apps/finance/view/Viewport.mjs +43 -0
- package/apps/finance/view/ViewportController.mjs +35 -0
- package/apps/finance/view/ViewportStateProvider.mjs +32 -0
- package/apps/portal/index.html +1 -1
- package/apps/portal/view/home/FooterContainer.mjs +1 -1
- package/apps/portal/view/home/MainContainer.mjs +1 -1
- package/apps/portal/view/home/parts/Colors.mjs +4 -8
- package/apps/portal/view/home/parts/Helix.mjs +5 -1
- package/buildScripts/buildAll.mjs +1 -1
- package/buildScripts/buildThemes.mjs +1 -1
- package/buildScripts/createApp.mjs +1 -1
- package/buildScripts/createAppMinimal.mjs +1 -1
- package/buildScripts/docs/jsdocx.mjs +1 -1
- package/buildScripts/injectPackageVersion.mjs +1 -1
- package/buildScripts/watchThemes.mjs +1 -1
- package/buildScripts/webpack/buildThreads.mjs +1 -1
- package/buildScripts/webpack/development/webpack.config.appworker.mjs +1 -1
- package/buildScripts/webpack/development/webpack.config.main.mjs +1 -1
- package/buildScripts/webpack/development/webpack.config.worker.mjs +1 -1
- package/buildScripts/webpack/production/webpack.config.appworker.mjs +1 -1
- package/buildScripts/webpack/production/webpack.config.main.mjs +1 -1
- package/buildScripts/webpack/production/webpack.config.worker.mjs +1 -1
- package/examples/README.md +5 -14
- package/examples/ServiceWorker.mjs +2 -2
- package/package.json +3 -3
- package/resources/scss/src/grid/plugin/AnimateRows.scss +10 -0
- package/src/DefaultConfig.mjs +2 -2
- package/src/calendar/view/SettingsContainer.mjs +3 -5
- package/src/calendar/view/week/Component.mjs +3 -5
- package/src/component/Base.mjs +3 -6
- package/src/component/Helix.mjs +2 -3
- package/src/component/MagicMoveText.mjs +13 -6
- package/src/controller/Component.mjs +3 -5
- package/src/data/Store.mjs +1 -1
- package/src/dialog/Base.mjs +3 -4
- package/src/grid/Container.mjs +6 -6
- package/src/grid/View.mjs +1 -7
- package/src/grid/column/AnimatedChange.mjs +8 -5
- package/src/grid/column/Base.mjs +6 -2
- package/src/grid/column/Currency.mjs +72 -0
- package/src/grid/column/_export.mjs +2 -1
- package/src/grid/plugin/AnimateRows.mjs +9 -31
- package/src/list/Base.mjs +1 -3
- package/src/list/plugin/Animate.mjs +3 -3
- package/src/main/addon/ServiceWorker.mjs +29 -19
- package/src/manager/Component.mjs +1 -3
- package/src/plugin/Base.mjs +23 -3
- package/src/selection/HelixModel.mjs +3 -6
- package/src/tab/Container.mjs +3 -4
- package/src/table/Container.mjs +6 -7
- package/src/util/Css.mjs +6 -6
- package/src/worker/App.mjs +0 -11
- package/src/worker/Manager.mjs +4 -0
- package/src/worker/ServiceBase.mjs +40 -30
package/README.md
CHANGED
@@ -11,87 +11,170 @@
|
|
11
11
|
<a href="./CONTRIBUTING.md"><img src="https://img.shields.io/badge/PRs-welcome-green.svg?logo=GitHub&logoColor=white" alt="PRs Welcome"></a>
|
12
12
|
</p>
|
13
13
|
|
14
|
-
#
|
15
|
-
|
16
|
-
component library and harness the power of multi-threading for extreme real-time performance.
|
14
|
+
# Build Ultra-Fast, Scalable, and Extensible Web Apps :zap:
|
15
|
+
:rocket: **Break Free from the Main Thread – Experience True Multi-Threading**
|
17
16
|
|
18
|
-
Neo.mjs
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
you have found the right spot.
|
17
|
+
Neo.mjs enables the creation of highly dynamic web applications by running everything **inside an App Worker**.
|
18
|
+
From components and state providers to view controllers, everything operates within the worker,
|
19
|
+
allowing the main thread to focus only on **DOM updates** and **delegating UI events**.
|
20
|
+
This ensures **high performance, smooth reactivity**, and **extensibility** for both **multi-window** and **SPA applications**.
|
23
21
|
|
24
22
|
<p align="center">
|
25
23
|
<a href="https://youtu.be/pYfM28Pz6_0"><img height="316px" width="400px" src="https://raw.githubusercontent.com/neomjs/pages/master/resources_pub/images/neo33s.png"></a>
|
26
24
|
<a href="https://youtu.be/aEA5333WiWY"><img height="316px" width="400px" src="https://raw.githubusercontent.com/neomjs/pages/master/resources_pub/images/neo-movie.png"></a>
|
27
25
|
</p>
|
28
26
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
27
|
+
</br></br>
|
28
|
+
## 🔍 Why Neo.mjs?
|
29
|
+
Neo is a worker thread-driven frontend framework designed to create multithreaded GUIs using JavaScript.
|
30
|
+
By leveraging the **Off Main Thread (OMT) paradigm**, Neo ensures that your application’s UI remains responsive,
|
31
|
+
even during computationally intensive tasks.
|
32
|
+
|
33
|
+
Unlike traditional single-threaded frameworks, Neo distributes workloads across multiple threads, unlocking new levels of performance and scalability.
|
34
|
+
Whether you’re building a small app or a large-scale enterprise solution, Neo’s architecture grows with your needs.
|
35
|
+
|
36
|
+
Key Benefits of Neo.mjs
|
37
|
+
1. **Multithreading for Performance**:
|
38
|
+
- Neo’s OMT paradigm moves tasks like data processing, state management, and rendering to worker threads, keeping the main thread free for rendering and user interactions.
|
39
|
+
- This approach eliminates UI freezes and ensures a smooth user experience, even for complex applications.
|
40
|
+
2. **Declarative Class Configuration**:
|
41
|
+
- Neo’s class config system allows you to define and manage classes in a clean, reusable way. This reduces boilerplate code and makes your codebase more maintainable.
|
42
|
+
- With declarative configurations, you can focus on building features instead of wrestling with setup and initialization.
|
43
|
+
3. **Modular and Scalable Architecture**:
|
44
|
+
- Neo’s modular design makes it easy to build scalable applications. Components are self-contained and reusable, promoting a clean separation of concerns.
|
45
|
+
- Whether you’re building a small app or a large-scale enterprise solution, Neo’s architecture grows with your needs.
|
46
|
+
4. **Ease of Use**:
|
47
|
+
- Neo’s intuitive API and comprehensive documentation make it easy to get started, even for developers new to multithreaded programming.
|
48
|
+
- The framework’s design prioritizes developer productivity, allowing you to focus on solving real-world problems.
|
49
|
+
5. **Future-Proof Technology**:
|
50
|
+
- Neo is built on modern web standards like JavaScript modules and worker threads, ensuring compatibility with the latest browser features.
|
51
|
+
- By embracing the OMT paradigm, Neo is uniquely positioned to take advantage of future advancements in web development.
|
52
|
+
|
53
|
+
**Real-World Applications**
|
54
|
+
|
55
|
+
Neo is ideal for:
|
56
|
+
- **Data-intensive applications**: Handle large datasets and complex calculations without compromising UI responsiveness.
|
57
|
+
- **Real-time dashboards**: Build dynamic, real-time dashboards that update seamlessly.
|
58
|
+
- **Enterprise solutions**: Scale your application to meet the demands of large organizations.
|
59
|
+
|
60
|
+
**Why Choose Neo Over Traditional Frameworks?**
|
61
|
+
|
62
|
+
Traditional single-threaded frameworks often struggle with performance bottlenecks, especially when handling complex UIs or large datasets.
|
63
|
+
Neo’s **multithreaded architecture** addresses these challenges head-on, delivering a responsive and scalable solution for modern web applications.
|
64
|
+
|
65
|
+
With Neo, you get:
|
66
|
+
- ✅ **Responsive UIs**: No more UI freezes or janky animations.
|
67
|
+
- 🚀 **Scalability**: Build applications that can handle increasing complexity without compromising performance.
|
68
|
+
- 💻 **Developer Productivity**: Spend less time optimizing and more time building features.
|
69
|
+
</br></br>
|
70
|
+
## 🌟 Key Features
|
71
|
+
🎭 **Actor Model**:</br>
|
72
|
+
The App Worker acts as the central actor, handling application state and logic, independent of the main thread.
|
73
|
+
This drives the OMT (off the main thread) paradigm into perfection,
|
74
|
+
since it is keeping the main thread free for non-blocking DOM updates and UI interactions.
|
37
75
|
|
38
|
-
|
39
|
-
Neo.mjs drives the OMT (off the main thread) paradigm into perfection,
|
40
|
-
which is intended to move expensive tasks into Workers.
|
76
|
+
<img src="./resources/images/workers-focus.svg">
|
41
77
|
|
42
|
-
|
78
|
+
🔄 **Reactive State Management**:</br>
|
79
|
+
Built-in reactivity allows dynamic, efficient updates between components and state providers.
|
43
80
|
|
44
|
-
|
81
|
+
⚡ **Instant JavaScript module based Development Mode**:</br>
|
82
|
+
**Zero builds or transpilations** required. Run your app directly in the browser, modify reactive properties in real-time, and see instant updates.
|
83
|
+
This gives you an **unmatched debugging experience**, saving time and reducing development costs.
|
84
|
+
You can even build **entire apps inside the console** if you wish.
|
45
85
|
|
46
|
-
|
47
|
-
|
86
|
+
📊 **Hierarchical State Management**:</br>
|
87
|
+
Seamlessly manage state between parent and child components with nested state providers.
|
88
|
+
Each component binds to the state data from its **closest** provider,
|
89
|
+
even combining data from multiple providers inside one binding.
|
48
90
|
|
49
|
-
|
50
|
-
|
91
|
+
🧩 **Clean Architecture**:</br>
|
92
|
+
View controllers ensure a **separation of concerns**, isolating business logic from UI components for easier maintenance and testing.
|
51
93
|
|
52
|
-
|
94
|
+
🌐 **Multi-Window & SPAs**:</br>
|
95
|
+
Easily build and manage complex, highly interactive applications that require multiple windows or traditional SPAs.
|
96
|
+
No native shell required.
|
53
97
|
|
54
|
-
|
55
|
-
|
98
|
+
🌀 **Dynamic Component Management**:</br>
|
99
|
+
Unmount, move, and remount components across the UI or even in separate browser windows
|
100
|
+
— without losing the component’s state or logic. This **runtime flexibility** is a game-changer, **preserving JS instances** while still updating the UI dynamically.
|
56
101
|
|
57
|
-
|
102
|
+
:dependabot: **No npm dependency hell**:</br>
|
103
|
+
Neo.mjs apps do not need any dependencies at all, just some dev dependencies for tooling.
|
104
|
+
</br></br>
|
105
|
+
## :bulb: Perfect for Complex Use Cases
|
106
|
+
Need a **web-based IDE, banking dashboard**, or an **enterprise-grade multi-window app**? Neo.mjs is built for it.
|
58
107
|
|
108
|
+
</br></br>
|
109
|
+
## 📦 Declarative Class Configuration
|
110
|
+
Neo’s class config system allows you to define and manage classes in a declarative and reusable way.
|
111
|
+
This simplifies class creation, reduces boilerplate code, and improves maintainability.
|
112
|
+
|
113
|
+
```javascript
|
114
|
+
import Component from '../../src/component/Base.mjs';
|
115
|
+
|
116
|
+
class MyComponent extends Component {
|
117
|
+
static config = {
|
118
|
+
className : 'MyComponent',
|
119
|
+
someProperty_: 'defaultValue',
|
120
|
+
domListeners : {
|
121
|
+
click: 'onClick'
|
122
|
+
}
|
123
|
+
}
|
124
|
+
|
125
|
+
afterSetSomeProperty(value, oldValue) {
|
126
|
+
console.log('someProperty changed:', value, oldValue)
|
127
|
+
}
|
128
|
+
|
129
|
+
onClick(data) {
|
130
|
+
console.log('Clicked!', data)
|
131
|
+
}
|
132
|
+
}
|
133
|
+
|
134
|
+
export default Neo.setupClass(MyComponent);
|
135
|
+
```
|
136
|
+
With Neo.mjs’s class config system, you can:
|
137
|
+
|
138
|
+
* Define default properties and methods in a clean, structured way.
|
139
|
+
* Easily extend and reuse configurations across classes.
|
140
|
+
* Keep your codebase organized and scalable.
|
141
|
+
|
142
|
+
For more details, check out the <a href="https://neomjs.com/dist/production/apps/portal/index.html#/learn/gettingstarted.Config">Class Config System documentation</a>.
|
59
143
|
|
60
|
-
|
144
|
+
</br></br>
|
145
|
+
## 🚀 Get Started
|
146
|
+
Quick Start
|
61
147
|
|
62
|
-
|
63
|
-
but instead on a super-fast update & navigation experience for returning users.
|
148
|
+
Run the following command in your terminal, and your new Neo app will be created, the local web server will start, and your app will open in a new browser window:
|
64
149
|
|
150
|
+
```bash
|
151
|
+
npx neo-app@latest
|
152
|
+
```
|
153
|
+
This one-liner sets up everything you need to start building with Neo, including:
|
154
|
+
- A new app workspace.
|
155
|
+
- A pre-configured app shell.
|
156
|
+
- A local development server.
|
157
|
+
- Opening your app inside a new browser window
|
65
158
|
|
66
|
-
|
67
|
-
1. Finance (Banking & Trading Apps)
|
68
|
-
2. Data Science
|
69
|
-
3. Web-based IDEs
|
70
|
-
4. Multi-Window Data Visualisation
|
71
|
-
5. Complex dynamic Forms
|
72
|
-
6. "Desktop-like" Apps
|
73
|
-
7. Enterprise Apps in general (e.g. Admin Dashboards)
|
159
|
+
:book: More details? Check out our <a href="./.github/GETTING_STARTED.md">Getting Started Guide</a>
|
74
160
|
|
75
|
-
|
76
|
-
Join our community:</br>
|
77
|
-
<a href="https://join.slack.com/t/neomjs/shared_invite/zt-6c50ueeu-3E1~M4T9xkNnb~M_prEEOA"><img src="https://img.shields.io/badge/Slack-neo.mjs-brightgreen.svg?logo=slack&style=for-the-badge" alt="Join the Slack channel"></a>
|
161
|
+
:student: Make sure to dive into the <a href="https://neomjs.com/dist/production/apps/portal/#/learn/gettingstarted.Setup">Learning Section</a>
|
78
162
|
|
79
|
-
|
80
|
-
|
163
|
+
:brain: The most advanced tutorial to help you with getting up to speed is this one:
|
164
|
+
<a href="https://neomjs.com/dist/production/apps/portal/#/learn/tutorials.Earthquakes">Earthquakes Tutorial</a>
|
81
165
|
|
82
|
-
|
166
|
+
Next steps:
|
167
|
+
* :star: **Explore exciting Examples here**: <a href="https://neomjs.com/dist/production/apps/portal/#/examples">Neo.mjs Examples</a>
|
168
|
+
* Many more are included inside the repos <a href="https://github.com/neomjs/neo/tree/dev/apps">apps</a>
|
169
|
+
& <a href="https://github.com/neomjs/neo/tree/dev/examples">examples</a> folders.
|
170
|
+
* :blue_book: All Blog Posts are listed here: <a href="https://neomjs.com/dist/production/apps/portal/#/blog">Neo.mjs Blog</a>
|
171
|
+
</br></br>
|
172
|
+
## :handshake: Join the Community
|
83
173
|
|
84
|
-
|
85
|
-
* Take a look at the <a href="./.github/GETTING_STARTED.md">Getting Started Guide</a>
|
86
|
-
* Make sure to dive into the <a href="https://neomjs.com/dist/production/apps/portal/#/learn/gettingstarted.Setup">Learning Section</a>
|
87
|
-
* The most advanced tutorial to help you with getting up to speed is this one:</br>
|
88
|
-
<a href="https://neomjs.com/dist/production/apps/portal/#/learn/tutorials.Earthquakes">Earthquakes Tutorial</a>
|
174
|
+
:speech_balloon: Have questions? Join our <a href="https://join.slack.com/t/neomjs/shared_invite/zt-6c50ueeu-3E1~M4T9xkNnb~M_prEEOA">Slack channel</a> and connect with other developers.
|
89
175
|
|
90
|
-
|
91
|
-
You can find an in-depth description here: <a href="./buildScripts/README.md">Neo.mjs CLI</a>
|
176
|
+
:hammer_and_wrench: Want to contribute? Check out our <a href="https://github.com/neomjs/neo/blob/dev/CONTRIBUTING.md">Contributing Guide</a>.
|
92
177
|
|
93
|
-
</br><h2 id="blog">7. Blog</h2>
|
94
|
-
All Blog Posts are listed here: <a href="https://neomjs.com/dist/production/apps/portal/#/blog">Neo.mjs Blog</a>
|
95
178
|
|
96
179
|
</br></br>
|
97
180
|
Copyright (c) 2015 - today, <a href="https://www.linkedin.com/in/tobiasuhlig/">Tobias Uhlig</a>
|
package/apps/ServiceWorker.mjs
CHANGED
@@ -0,0 +1,12 @@
|
|
1
|
+
<!DOCTYPE HTML>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<meta name="viewport" content="width=device-width, initial-scale=1">
|
5
|
+
<meta charset="UTF-8">
|
6
|
+
<title>Neo.mjs Finance Dashboard</title>
|
7
|
+
<link rel="icon" href="./resources/images/neo_logo_favicon.svg">
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
<script src="../../src/MicroLoader.mjs" type="module"></script>
|
11
|
+
</body>
|
12
|
+
</html>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import Model from '../../../src/data/Model.mjs';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @class Finance.model.Company
|
5
|
+
* @extends Neo.data.Model
|
6
|
+
*/
|
7
|
+
class Company extends Model {
|
8
|
+
static config = {
|
9
|
+
/**
|
10
|
+
* @member {String} className='Finance.model.Company'
|
11
|
+
* @protected
|
12
|
+
*/
|
13
|
+
className: 'Finance.model.Company',
|
14
|
+
/**
|
15
|
+
* @member {Object[]} fields
|
16
|
+
*/
|
17
|
+
fields: [{
|
18
|
+
name : 'change',
|
19
|
+
defaultValue: null,
|
20
|
+
type : 'Float'
|
21
|
+
}, {
|
22
|
+
name: 'name',
|
23
|
+
type: 'String'
|
24
|
+
}, {
|
25
|
+
name: 'sector',
|
26
|
+
type: 'String'
|
27
|
+
}, {
|
28
|
+
name: 'symbol',
|
29
|
+
type: 'String'
|
30
|
+
}, {
|
31
|
+
name: 'value',
|
32
|
+
type: 'Float'
|
33
|
+
}]
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
export default Neo.setupClass(Company);
|
@@ -0,0 +1,103 @@
|
|
1
|
+
[
|
2
|
+
{"symbol": "ADBE", "name": "Adobe Inc.", "sector": "Information Technology"},
|
3
|
+
{"symbol": "AMD", "name": "Advanced Micro Devices", "sector": "Information Technology"},
|
4
|
+
{"symbol": "ABNB", "name": "Airbnb", "sector": "Consumer Discretionary"},
|
5
|
+
{"symbol": "GOOGL", "name": "Alphabet Inc. (Class A)", "sector": "Communication Services"},
|
6
|
+
{"symbol": "GOOG", "name": "Alphabet Inc. (Class C)", "sector": "Communication Services"},
|
7
|
+
{"symbol": "AMZN", "name": "Amazon", "sector": "Consumer Discretionary"},
|
8
|
+
{"symbol": "AEP", "name": "American Electric Power", "sector": "Utilities"},
|
9
|
+
{"symbol": "AMGN", "name": "Amgen", "sector": "Health Care"},
|
10
|
+
{"symbol": "ADI", "name": "Analog Devices", "sector": "Information Technology"},
|
11
|
+
{"symbol": "ANSS", "name": "Ansys", "sector": "Information Technology"},
|
12
|
+
{"symbol": "AAPL", "name": "Apple Inc.", "sector": "Information Technology"},
|
13
|
+
{"symbol": "AMAT", "name": "Applied Materials", "sector": "Information Technology"},
|
14
|
+
{"symbol": "APP", "name": "AppLovin", "sector": "Information Technology"},
|
15
|
+
{"symbol": "ARM", "name": "Arm Holdings", "sector": "Information Technology"},
|
16
|
+
{"symbol": "ASML", "name": "ASML Holding", "sector": "Information Technology"},
|
17
|
+
{"symbol": "AZN", "name": "AstraZeneca", "sector": "Health Care"},
|
18
|
+
{"symbol": "TEAM", "name": "Atlassian", "sector": "Information Technology"},
|
19
|
+
{"symbol": "ADSK", "name": "Autodesk", "sector": "Information Technology"},
|
20
|
+
{"symbol": "ADP", "name": "Automatic Data Processing", "sector": "Industrials"},
|
21
|
+
{"symbol": "AXON", "name": "Axon Enterprise", "sector": "Industrials"},
|
22
|
+
{"symbol": "BKR", "name": "Baker Hughes", "sector": "Energy"},
|
23
|
+
{"symbol": "BIIB", "name": "Biogen", "sector": "Health Care"},
|
24
|
+
{"symbol": "BKNG", "name": "Booking Holdings", "sector": "Consumer Discretionary"},
|
25
|
+
{"symbol": "AVGO", "name": "Broadcom", "sector": "Information Technology"},
|
26
|
+
{"symbol": "CDNS", "name": "Cadence Design Systems", "sector": "Information Technology"},
|
27
|
+
{"symbol": "CDW", "name": "CDW Corporation", "sector": "Information Technology"},
|
28
|
+
{"symbol": "CHTR", "name": "Charter Communications", "sector": "Communication Services"},
|
29
|
+
{"symbol": "CTAS", "name": "Cintas", "sector": "Industrials"},
|
30
|
+
{"symbol": "CSCO", "name": "Cisco", "sector": "Information Technology"},
|
31
|
+
{"symbol": "CCEP", "name": "Coca-Cola Europacific Partners", "sector": "Consumer Staples"},
|
32
|
+
{"symbol": "CTSH", "name": "Cognizant", "sector": "Information Technology"},
|
33
|
+
{"symbol": "CMCSA", "name": "Comcast", "sector": "Communication Services"},
|
34
|
+
{"symbol": "CEG", "name": "Constellation Energy", "sector": "Utilities"},
|
35
|
+
{"symbol": "CPRT", "name": "Copart", "sector": "Industrials"},
|
36
|
+
{"symbol": "CSGP", "name": "CoStar Group", "sector": "Real Estate"},
|
37
|
+
{"symbol": "COST", "name": "Costco", "sector": "Consumer Staples"},
|
38
|
+
{"symbol": "CRWD", "name": "CrowdStrike", "sector": "Information Technology"},
|
39
|
+
{"symbol": "CSX", "name": "CSX Corporation", "sector": "Industrials"},
|
40
|
+
{"symbol": "DDOG", "name": "Datadog", "sector": "Information Technology"},
|
41
|
+
{"symbol": "DXCM", "name": "DexCom", "sector": "Health Care"},
|
42
|
+
{"symbol": "FANG", "name": "Diamondback Energy", "sector": "Energy"},
|
43
|
+
{"symbol": "DASH", "name": "DoorDash", "sector": "Consumer Discretionary"},
|
44
|
+
{"symbol": "EA", "name": "Electronic Arts", "sector": "Communication Services"},
|
45
|
+
{"symbol": "EXC", "name": "Exelon", "sector": "Utilities"},
|
46
|
+
{"symbol": "FAST", "name": "Fastenal", "sector": "Industrials"},
|
47
|
+
{"symbol": "FTNT", "name": "Fortinet", "sector": "Information Technology"},
|
48
|
+
{"symbol": "GEHC", "name": "GE HealthCare", "sector": "Health Care"},
|
49
|
+
{"symbol": "GILD", "name": "Gilead Sciences", "sector": "Health Care"},
|
50
|
+
{"symbol": "GFS", "name": "GlobalFoundries", "sector": "Information Technology"},
|
51
|
+
{"symbol": "HON", "name": "Honeywell", "sector": "Industrials"},
|
52
|
+
{"symbol": "IDXX", "name": "Idexx Laboratories", "sector": "Health Care"},
|
53
|
+
{"symbol": "INTC", "name": "Intel", "sector": "Information Technology"},
|
54
|
+
{"symbol": "INTU", "name": "Intuit", "sector": "Information Technology"},
|
55
|
+
{"symbol": "ISRG", "name": "Intuitive Surgical", "sector": "Health Care"},
|
56
|
+
{"symbol": "KDP", "name": "Keurig Dr Pepper", "sector": "Keurig Dr Pepper"},
|
57
|
+
{"symbol": "KLAC", "name": "KLA Corporation", "sector": "Information Technology"},
|
58
|
+
{"symbol": "KHC", "name": "Kraft Heinz", "sector": "Consumer Staples"},
|
59
|
+
{"symbol": "LRCX", "name": "Lam Research", "sector": "Information Technology"},
|
60
|
+
{"symbol": "LIN", "name": "Linde plc", "sector": "Materials"},
|
61
|
+
{"symbol": "LULU", "name": "Lululemon Athletica", "sector": "Consumer Discretionary"},
|
62
|
+
{"symbol": "MAR", "name": "Marriott International", "sector": "Consumer Discretionary"},
|
63
|
+
{"symbol": "MRVL", "name": "Marvell Technology", "sector": "Information Technology"},
|
64
|
+
{"symbol": "MELI", "name": "MercadoLibre", "sector": "Consumer Discretionary"},
|
65
|
+
{"symbol": "META", "name": "Meta Platforms", "sector": "Communication Services"},
|
66
|
+
{"symbol": "MCHP", "name": "Microchip Technology", "sector": "Information Technology"},
|
67
|
+
{"symbol": "MU", "name": "Micron Technology", "sector": "Information Technology"},
|
68
|
+
{"symbol": "MSFT", "name": "Microsoft", "sector": "Information Technology"},
|
69
|
+
{"symbol": "MSTR", "name": "MicroStrategy", "sector": "Information Technology"},
|
70
|
+
{"symbol": "MDLZ", "name": "Mondelez International", "sector": "Consumer Staples"},
|
71
|
+
{"symbol": "MDB", "name": "MongoDB Inc.", "sector": "Information Technology"},
|
72
|
+
{"symbol": "MNST", "name": "Monster Beverage", "sector": "Consumer Staples"},
|
73
|
+
{"symbol": "NFLX", "name": "Netflix, Inc.", "sector": "Communication Services"},
|
74
|
+
{"symbol": "NVDA", "name": "Nvidia", "sector": "Information Technology"},
|
75
|
+
{"symbol": "NXPI", "name": "NXP Semiconductors", "sector": "Information Technology"},
|
76
|
+
{"symbol": "ORLY", "name": "O'Reilly Automotive", "sector": "Consumer Discretionary"},
|
77
|
+
{"symbol": "ODFL", "name": "Old Dominion Freight Line", "sector": "Industrials"},
|
78
|
+
{"symbol": "ON", "name": "Onsemi", "sector": "Information Technology"},
|
79
|
+
{"symbol": "PCAR", "name": "Paccar", "sector": "Industrials"},
|
80
|
+
{"symbol": "PLTR", "name": "Palantir Technologies", "sector": "Information Technology"},
|
81
|
+
{"symbol": "PANW", "name": "Palo Alto Networks", "sector": "Information Technology"},
|
82
|
+
{"symbol": "PAYX", "name": "Paychex", "sector": "Industrials"},
|
83
|
+
{"symbol": "PYPL", "name": "PayPal", "sector": "Financials"},
|
84
|
+
{"symbol": "PDD", "name": "PDD Holdings", "sector": "Consumer Discretionary"},
|
85
|
+
{"symbol": "PEP", "name": "PepsiCo", "sector": "Consumer Staples"},
|
86
|
+
{"symbol": "QCOM", "name": "Qualcomm", "sector": "Information Technology"},
|
87
|
+
{"symbol": "REGN", "name": "Regeneron Pharmaceuticals", "sector": "Health Care"},
|
88
|
+
{"symbol": "ROP", "name": "Roper Technologies", "sector": "Information Technology"},
|
89
|
+
{"symbol": "ROST", "name": "Ross Stores", "sector": "Consumer Discretionary"},
|
90
|
+
{"symbol": "SBUX", "name": "Starbucks", "sector": "Consumer Discretionary"},
|
91
|
+
{"symbol": "SNPS", "name": "Synopsys", "sector": "Information Technology"},
|
92
|
+
{"symbol": "TTWO", "name": "Take-Two Interactive", "sector": "Communication Services"},
|
93
|
+
{"symbol": "TMUS", "name": "T-Mobile US", "sector": "Communication Services"},
|
94
|
+
{"symbol": "TSLA", "name": "Tesla, Inc.", "sector": "Consumer Discretionary"},
|
95
|
+
{"symbol": "TXN", "name": "Texas Instruments", "sector": "Information Technology"},
|
96
|
+
{"symbol": "TTD", "name": "Trade Desk (The)", "sector": "Communication Services"},
|
97
|
+
{"symbol": "VRSK", "name": "Verisk Analytics", "sector": "Industrials"},
|
98
|
+
{"symbol": "VRTX", "name": "Vertex Pharmaceuticals", "sector": "Health Care"},
|
99
|
+
{"symbol": "WBD", "name": "Warner Bros. Discovery", "sector": "Communication Services"},
|
100
|
+
{"symbol": "WDAY", "name": "Workday, Inc.", "sector": "Information Technology"},
|
101
|
+
{"symbol": "XEL", "name": "Xcel Energy", "sector": "Utilities"},
|
102
|
+
{"symbol": "ZS", "name": "Zscaler", "sector": "Information Technology"}
|
103
|
+
]
|
@@ -0,0 +1,16 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
3
|
+
<svg width="100%" height="100%" viewBox="0 0 157 157" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" xml:space="preserve" xmlns:serif="http://www.serif.com/" style="fill-rule:evenodd;clip-rule:evenodd;">
|
4
|
+
<style>
|
5
|
+
path {
|
6
|
+
stroke: #3E63DD;
|
7
|
+
}
|
8
|
+
@media (prefers-color-scheme: dark) {
|
9
|
+
path {
|
10
|
+
stroke: #fff;
|
11
|
+
}
|
12
|
+
}
|
13
|
+
</style>
|
14
|
+
<path d="M8.841,127.508L33.676,144.928L33.675,105.744L33.675,94.343L43.023,100.871L112.335,149.272L135.026,135.569L8.841,46.576L8.841,127.508Z" style="fill:white;fill-opacity:0;fill-rule:nonzero;stroke-width:11.89px;"/>
|
15
|
+
<path d="M144.867,30.661L120.032,13.241L120.033,52.425L120.034,63.826L110.686,57.298L41.374,8.897L18.682,22.6L144.867,111.593L144.867,30.661Z" style="fill:white;fill-opacity:0;fill-rule:nonzero;stroke-width:11.89px;"/>
|
16
|
+
</svg>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
import CompanyModel from '../model/Company.mjs';
|
2
|
+
import Store from '../../../src/data/Store.mjs';
|
3
|
+
|
4
|
+
/**
|
5
|
+
* @class Finance.store.Companies
|
6
|
+
* @extends Neo.data.Store
|
7
|
+
*/
|
8
|
+
class Companies extends Store {
|
9
|
+
static config = {
|
10
|
+
/**
|
11
|
+
* @member {String} className='Finance.store.Companies'
|
12
|
+
* @protected
|
13
|
+
*/
|
14
|
+
className: 'Finance.store.Companies',
|
15
|
+
/**
|
16
|
+
* @member {String} keyProperty='symbol'
|
17
|
+
*/
|
18
|
+
keyProperty: 'symbol',
|
19
|
+
/**
|
20
|
+
* @member {Neo.data.model} model=CompanyModel
|
21
|
+
*/
|
22
|
+
model: CompanyModel,
|
23
|
+
/**
|
24
|
+
* @member {Object[]} sorters=[{property:'name',direction:'ASC'}]
|
25
|
+
*/
|
26
|
+
sorters: [{
|
27
|
+
property : 'name',
|
28
|
+
direction: 'ASC'
|
29
|
+
}],
|
30
|
+
/**
|
31
|
+
* @member {String} url='../../apps/finance/resources/data/companies.json'
|
32
|
+
*/
|
33
|
+
url: '../../apps/finance/resources/data/companies.json'
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
export default Neo.setupClass(Companies);
|
@@ -0,0 +1,58 @@
|
|
1
|
+
import BaseGridContainer from '../../../src/grid/Container.mjs';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @class Finance.view.GridContainer
|
5
|
+
* @extends Neo.table.Container
|
6
|
+
*/
|
7
|
+
class GridContainer extends BaseGridContainer {
|
8
|
+
static config = {
|
9
|
+
/**
|
10
|
+
* @member {String} className='Finance.view.GridContainer'
|
11
|
+
* @protected
|
12
|
+
*/
|
13
|
+
className: 'Finance.view.GridContainer',
|
14
|
+
/**
|
15
|
+
* @member {Object} bind
|
16
|
+
*/
|
17
|
+
bind: {
|
18
|
+
store: 'stores.companies'
|
19
|
+
},
|
20
|
+
/**
|
21
|
+
* @member {Object[]} columns
|
22
|
+
*/
|
23
|
+
columns: [{
|
24
|
+
dataField: 'id',
|
25
|
+
text : '#',
|
26
|
+
type : 'index',
|
27
|
+
width : 40
|
28
|
+
}, {
|
29
|
+
dataField: 'symbol',
|
30
|
+
text : 'Symbol',
|
31
|
+
width : 100
|
32
|
+
}, {
|
33
|
+
dataField: 'name',
|
34
|
+
text : 'Name',
|
35
|
+
width : 250
|
36
|
+
}, {
|
37
|
+
dataField: 'sector',
|
38
|
+
text : 'Sector',
|
39
|
+
width : 200
|
40
|
+
}, {
|
41
|
+
cellAlign: 'right',
|
42
|
+
dataField: 'change',
|
43
|
+
locale : 'en-US',
|
44
|
+
text : 'Change',
|
45
|
+
type : 'currency',
|
46
|
+
width : 120
|
47
|
+
}, {
|
48
|
+
cellAlign: 'right',
|
49
|
+
dataField: 'value',
|
50
|
+
locale : 'en-US',
|
51
|
+
text : 'Value',
|
52
|
+
type : 'currency',
|
53
|
+
width : 120
|
54
|
+
}]
|
55
|
+
}
|
56
|
+
}
|
57
|
+
|
58
|
+
export default Neo.setupClass(GridContainer);
|
@@ -0,0 +1,43 @@
|
|
1
|
+
import BaseViewport from '../../../src/container/Viewport.mjs';
|
2
|
+
import GridContainer from './GridContainer.mjs';
|
3
|
+
import ViewportController from './ViewportController.mjs';
|
4
|
+
import ViewportStateProvider from './ViewportStateProvider.mjs';
|
5
|
+
|
6
|
+
/**
|
7
|
+
* @class Finance.view.Viewport
|
8
|
+
* @extends Neo.container.Viewport
|
9
|
+
*/
|
10
|
+
class Viewport extends BaseViewport {
|
11
|
+
static config = {
|
12
|
+
/**
|
13
|
+
* @member {String} className='Finance.view.Viewport'
|
14
|
+
* @protected
|
15
|
+
*/
|
16
|
+
className: 'Finance.view.Viewport',
|
17
|
+
/**
|
18
|
+
* @member {Neo.controller.Component} controller=ViewportController
|
19
|
+
*/
|
20
|
+
controller: ViewportController,
|
21
|
+
/**
|
22
|
+
* @member {Object[]} items
|
23
|
+
*/
|
24
|
+
items: [{
|
25
|
+
module : GridContainer,
|
26
|
+
reference: 'grid'
|
27
|
+
}],
|
28
|
+
/*
|
29
|
+
* @member {Object} layout={ntype:'fit'}
|
30
|
+
*/
|
31
|
+
layout: {ntype: 'fit'},
|
32
|
+
/**
|
33
|
+
* @member {Neo.state.Provider} stateProvider=ViewportStateProvider
|
34
|
+
*/
|
35
|
+
stateProvider: ViewportStateProvider,
|
36
|
+
/**
|
37
|
+
* @member {Object} style
|
38
|
+
*/
|
39
|
+
style: {padding: '2em'}
|
40
|
+
}
|
41
|
+
}
|
42
|
+
|
43
|
+
export default Neo.setupClass(Viewport);
|
@@ -0,0 +1,35 @@
|
|
1
|
+
import Controller from '../../../src/controller/Component.mjs';
|
2
|
+
|
3
|
+
/**
|
4
|
+
* @class Finance.view.ViewportController
|
5
|
+
* @extends Neo.controller.Component
|
6
|
+
*/
|
7
|
+
class ViewportController extends Controller {
|
8
|
+
static config = {
|
9
|
+
/**
|
10
|
+
* @member {String} className='Finance.view.ViewportController'
|
11
|
+
* @protected
|
12
|
+
*/
|
13
|
+
className: 'Finance.view.ViewportController'
|
14
|
+
}
|
15
|
+
|
16
|
+
/**
|
17
|
+
*
|
18
|
+
*/
|
19
|
+
onCompaniesStoreLoad() {
|
20
|
+
let me = this,
|
21
|
+
companiesStore = me.getStore('companies'),
|
22
|
+
items = [];
|
23
|
+
|
24
|
+
companiesStore.items.forEach(record => {
|
25
|
+
items.push({
|
26
|
+
symbol: record.symbol,
|
27
|
+
value : Math.random() * 1000
|
28
|
+
})
|
29
|
+
});
|
30
|
+
|
31
|
+
this.getReference('grid').bulkUpdateRecords(items)
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
export default Neo.setupClass(ViewportController);
|