@qrunio/qqq-frontend-core 1.3.7-SNAPSHOT → 1.3.13-SNAPSHOT

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/LICENSE CHANGED
@@ -1,3 +1,22 @@
1
+ QQQ - Low-code Application Framework for Engineers
2
+ Copyright (C) 2021-2025 QRun-IO, LLC
3
+ https://www.qrun.io | https://github.com/QRun-IO
4
+
5
+ This program is free software: you can redistribute it and/or modify
6
+ it under the terms of the GNU Affero General Public License as published
7
+ by the Free Software Foundation, either version 3 of the License, or
8
+ (at your option) any later version.
9
+
10
+ This program is distributed in the hope that it will be useful,
11
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
+ GNU Affero General Public License for more details.
14
+
15
+ You should have received a copy of the GNU Affero General Public License
16
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
17
+
18
+ --------------------------------------------------------------------------------
19
+
1
20
  GNU AFFERO GENERAL PUBLIC LICENSE
2
21
  Version 3, 19 November 2007
3
22
 
@@ -617,3 +636,45 @@ Program, unless a warranty or assumption of liability accompanies a
617
636
  copy of the Program in return for a fee.
618
637
 
619
638
  END OF TERMS AND CONDITIONS
639
+
640
+ How to Apply These Terms to Your New Programs
641
+
642
+ If you develop a new program, and you want it to be of the greatest
643
+ possible use to the public, the best way to achieve this is to make it
644
+ free software which everyone can redistribute and change under these terms.
645
+
646
+ To do so, attach the following notices to the program. It is safest
647
+ to attach them to the start of each source file to most effectively
648
+ state the exclusion of warranty; and each file should have at least
649
+ the "copyright" line and a pointer to where the full notice is found.
650
+
651
+ <one line to give the program's name and a brief idea of what it does.>
652
+ Copyright (C) <year> <name of author>
653
+
654
+ This program is free software: you can redistribute it and/or modify
655
+ it under the terms of the GNU Affero General Public License as published by
656
+ the Free Software Foundation, either version 3 of the License, or
657
+ (at your option) any later version.
658
+
659
+ This program is distributed in the hope that it will be useful,
660
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
661
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
662
+ GNU Affero General Public License for more details.
663
+
664
+ You should have received a copy of the GNU Affero General Public License
665
+ along with this program. If not, see <https://www.gnu.org/licenses/>.
666
+
667
+ Also add information on how to contact you by electronic and paper mail.
668
+
669
+ If your software can interact with users remotely through a computer
670
+ network, you should also make sure that it provides a way for users to
671
+ get its source. For example, if your program is a web application, its
672
+ interface could display a "Source" link that leads users to an archive
673
+ of the code. There are many ways you could offer source, and different
674
+ solutions will be better for different programs; see section 13 for the
675
+ specific requirements.
676
+
677
+ You should also get your employer (if you work as a programmer) or school,
678
+ if any, to sign a "copyright disclaimer" for the program, if necessary.
679
+ For more information on this, and how to apply and follow the GNU AGPL, see
680
+ <https://www.gnu.org/licenses/>.
package/README.md CHANGED
@@ -1,516 +1,155 @@
1
- # QQQ Frontend Core
1
+ # qqq-frontend-core
2
2
 
3
- [![Version](https://img.shields.io/badge/version-1.0.128-blue.svg)](https://github.com/Kingsrook/qqq-frontend-core)
4
- [![License](https://img.shields.io/badge/license-GNU%20Affero%20GPL%20v3-green.svg)](https://www.gnu.org/licenses/agpl-3.0.en.html)
5
- [![TypeScript](https://img.shields.io/badge/TypeScript-4.4.4-blue.svg)](https://www.typescriptlang.org/)
6
- [![NPM Package](https://img.shields.io/badge/npm-%40qrunio%2Fqqq--frontend--core-red.svg)](https://www.npmjs.com/package/@qrunio/qqq-frontend-core)
3
+ TypeScript client library for building frontends on QQQ applications.
7
4
 
8
- > **Core Frontend Library for QQQ - Low-code Application Framework for Engineers**
5
+ **For:** Developers building custom UIs or integrating QQQ into existing applications
6
+ **Status:** Stable
9
7
 
10
- A TypeScript/JavaScript library that provides the core client-side functionality for interacting with QQQ backend servers. This library is framework-agnostic and can be used in any JavaScript environment, including React, Vue, Angular, or vanilla JavaScript applications.
8
+ ## Why This Exists
11
9
 
12
- ## 🚀 Overview
10
+ QQQ applications expose a backend API for metadata, records, and processes. If you're building a custom frontend instead of using the standard dashboard, you need a client that:
13
11
 
14
- QQQ Frontend Core is the **foundational library** that enables frontend applications to communicate with QQQ backend servers. It provides:
12
+ - Understands QQQ's metadata-driven architecture
13
+ - Handles authentication flows (OAuth2, tokens)
14
+ - Provides typed interfaces for records, queries, and processes
15
+ - Manages API communication reliably
15
16
 
16
- - **HTTP Client**: Axios-based HTTP client for QQQ API interactions
17
- - **Data Models**: TypeScript interfaces and classes for QQQ data structures
18
- - **Controllers**: High-level abstractions for common QQQ operations
19
- - **Exception Handling**: Standardized error handling for QQQ operations
20
- - **Authentication**: Built-in authentication management and token handling
17
+ This library is that client. It's framework-agnostic - use it with React, Vue, Angular, or plain JavaScript.
21
18
 
22
- ### What This Repository Contains
19
+ If you want a ready-to-use admin UI, use [qqq-frontend-material-dashboard](https://github.com/QRun-IO/qqq-frontend-material-dashboard) instead. It's built on this library.
23
20
 
24
- - **Core Library**: TypeScript/JavaScript library for QQQ client operations
25
- - **Data Models**: Complete type definitions for QQQ metadata and data structures
26
- - **HTTP Controllers**: Controllers for interacting with QQQ backend APIs
27
- - **Exception Classes**: Standardized error handling for QQQ operations
28
- - **Type Definitions**: Full TypeScript support with strict typing
21
+ ## Features
29
22
 
30
- ### What This Repository Does NOT Contain
23
+ - **Typed API client** - Full TypeScript support for QQQ operations
24
+ - **Metadata loading** - Fetch table, process, and app definitions from QQQ
25
+ - **Record CRUD** - Create, read, update, delete with query filters
26
+ - **Process execution** - Run backend processes with parameter passing
27
+ - **Auth handling** - OAuth2, bearer tokens, and custom auth flows
28
+ - **Error normalization** - Consistent exception handling across operations
31
29
 
32
- - **QQQ Server**: The actual low-code engine and backend
33
- - **UI Components**: Visual components or user interface elements
34
- - **Framework Bindings**: React, Vue, or Angular specific implementations
35
- - **Business Logic**: Application-specific business rules or processes
30
+ ## Quick Start
36
31
 
37
- ## 🏗️ Architecture
38
-
39
- ### Technology Stack
40
-
41
- - **Language**: TypeScript with strict typing
42
- - **HTTP Client**: Axios for HTTP requests
43
- - **Build Tool**: TypeScript compiler with ES modules
44
- - **Testing**: Jest with TypeScript support
45
- - **Linting**: ESLint with TypeScript rules
46
-
47
- ### Core Dependencies
48
-
49
- - **axios**: HTTP client for API communication
50
- - **form-data**: Form data handling for file uploads
51
- - **TypeScript**: Type safety and modern JavaScript features
52
-
53
- ### Development Dependencies
54
-
55
- - **jest**: Testing framework
56
- - **eslint**: Code quality and style enforcement
57
- - **typescript**: TypeScript compiler and tools
58
-
59
- ## 📁 Project Structure
60
-
61
- ```
62
- src/
63
- ├── controllers/ # HTTP controllers for QQQ operations
64
- │ ├── QController.ts # Main controller for QQQ interactions
65
- │ └── QControllerV1.ts # Version 1 controller implementation
66
- ├── model/ # Data models and type definitions
67
- │ ├── metaData/ # QQQ metadata models
68
- │ │ ├── QInstance.ts # QQQ instance metadata
69
- │ │ ├── QTableMetaData.ts # Table structure definitions
70
- │ │ ├── QProcessMetaData.ts # Process definitions
71
- │ │ ├── QAppMetaData.ts # Application metadata
72
- │ │ └── ... # Other metadata models
73
- │ ├── query/ # Query and filter models
74
- │ ├── processes/ # Process execution models
75
- │ ├── QRecord.ts # Data record model
76
- │ └── QPossibleValue.ts # Possible value model
77
- ├── exceptions/ # Exception handling
78
- │ └── QException.ts # Standard QQQ exception class
79
- └── qqq-frontend-core.ts # Main library entry point
80
- ```
81
-
82
- ## 🎯 Core Functionality
83
-
84
- ### HTTP Controllers
85
-
86
- The library provides high-level controllers for common QQQ operations:
87
-
88
- ```typescript
89
- import { QController } from '@qrunio/qqq-frontend-core';
90
-
91
- const controller = new QController('https://your-qqq-server.com');
92
-
93
- // Load metadata
94
- const metadata = await controller.loadMetaData();
95
-
96
- // Query records
97
- const records = await controller.queryRecords('tableName', filters);
98
-
99
- // Execute processes
100
- const result = await controller.executeProcess('processName', parameters);
101
- ```
102
-
103
- ### Data Models
104
-
105
- Complete TypeScript models for all QQQ data structures:
106
-
107
- ```typescript
108
- import {
109
- QInstance,
110
- QTableMetaData,
111
- QProcessMetaData
112
- } from '@qrunio/qqq-frontend-core';
113
-
114
- // Instance metadata
115
- const instance: QInstance = new QInstance(rawData);
116
-
117
- // Table metadata
118
- const table: QTableMetaData = new QTableMetaData(tableData);
119
-
120
- // Process metadata
121
- const process: QProcessMetaData = new QProcessMetaData(processData);
122
- ```
123
-
124
- ### Exception Handling
125
-
126
- Standardized error handling for QQQ operations:
127
-
128
- ```typescript
129
- import { QException } from '@qrunio/qqq-frontend-core';
130
-
131
- try {
132
- const result = await controller.executeProcess('processName', params);
133
- } catch (error) {
134
- if (error instanceof QException) {
135
- console.error(`QQQ Error: ${error.message} (Status: ${error.status})`);
136
- }
137
- }
138
- ```
139
-
140
- ## 🚀 Getting Started
141
-
142
- ### Installation
32
+ **Prerequisites:** Node.js 18+
143
33
 
144
34
  ```bash
145
35
  npm install @qrunio/qqq-frontend-core
146
36
  ```
147
37
 
148
- ### Basic Usage
149
-
150
38
  ```typescript
151
39
  import { QController } from '@qrunio/qqq-frontend-core';
152
40
 
153
- // Create controller instance
154
- const controller = new QController('https://your-qqq-server.com');
155
-
156
- // Set authentication (if required)
157
- controller.setAuthorizationHeaderValue('Bearer your-token');
158
-
159
- // Load QQQ instance metadata
160
- const metadata = await controller.loadMetaData();
161
-
162
- // Query records from a table
163
- const records = await controller.queryRecords('users', {
164
- filters: [{ field: 'active', operator: '=', value: true }],
165
- limit: 100
166
- });
167
-
168
- // Execute a process
169
- const result = await controller.executeProcess('sendNotification', {
170
- userId: 123,
171
- message: 'Hello World'
172
- });
173
- ```
174
-
175
- ### Advanced Usage
41
+ const api = new QController('https://your-qqq-server.com');
176
42
 
177
- ```typescript
178
- // Custom exception handler
179
- const controller = new QController('https://your-qqq-server.com', (error) => {
180
- console.error('Custom error handling:', error);
181
- // Handle error appropriately
182
- });
183
-
184
- // Set custom timeout
185
- controller.setStepTimeoutMillis(120000); // 2 minutes
43
+ // Load what tables and processes exist
44
+ const metadata = await api.loadMetaData();
45
+ console.log('Tables:', [...metadata.tables.keys()]);
186
46
 
187
- // Handle authentication
188
- controller.setAuthenticationMetaData({
189
- type: 'OAUTH2',
190
- clientId: 'your-client-id',
191
- // ... other auth config
47
+ // Query records
48
+ const users = await api.queryRecords('user', {
49
+ filters: [{ field: 'isActive', operator: '=', value: true }],
50
+ limit: 10
192
51
  });
193
52
  ```
194
53
 
195
- ## 🔧 Configuration
54
+ ## Usage
196
55
 
197
- ### Environment Setup
56
+ ### Authentication
198
57
 
199
58
  ```typescript
200
- // Development
201
- const controller = new QController('http://localhost:8080');
202
-
203
- // Production
204
- const controller = new QController('https://api.yourdomain.com');
59
+ // Bearer token (simplest)
60
+ api.setAuthorizationHeaderValue('Bearer your-jwt-token');
205
61
 
206
- // With custom configuration
207
- const controller = new QController('https://api.yourdomain.com', {
208
- timeout: 30000,
209
- headers: {
210
- 'X-Custom-Header': 'value'
211
- }
212
- });
213
- ```
214
-
215
- ### Authentication Configuration
216
-
217
- ```typescript
218
62
  // OAuth2
219
- controller.setAuthenticationMetaData({
63
+ api.setAuthenticationMetaData({
220
64
  type: 'OAUTH2',
221
65
  clientId: 'your-client-id',
222
- clientSecret: 'your-client-secret',
223
- authorizationUrl: 'https://auth.yourdomain.com/oauth2/authorize',
224
- tokenUrl: 'https://auth.yourdomain.com/oauth2/token'
66
+ tokenUrl: 'https://auth.example.com/token'
225
67
  });
226
-
227
- // Custom token
228
- controller.setAuthorizationHeaderValue('Bearer your-jwt-token');
229
68
  ```
230
69
 
231
- ## 🧪 Testing
232
-
233
- ### Running Tests
234
-
235
- ```bash
236
- # Run all tests
237
- npm test
238
-
239
- # Run tests in watch mode
240
- npm test -- --watch
241
-
242
- # Run tests with coverage
243
- npm test -- --coverage
244
- ```
245
-
246
- ### Test Structure
247
-
248
- - **Unit Tests**: Individual component testing
249
- - **Integration Tests**: Controller and model testing
250
- - **Mock Data**: Comprehensive test fixtures
251
-
252
- ## 📦 Building for Production
253
-
254
- ### Build Process
255
-
256
- ```bash
257
- # Clean and build
258
- npm run clean-and-install
259
- npm run prepublishOnly
260
- ```
261
-
262
- The build process:
263
- - Compiles TypeScript to JavaScript
264
- - Generates ES modules and CommonJS outputs
265
- - Creates optimized production bundles
266
- - Generates type definitions
267
-
268
- ### Output Files
269
-
270
- - **lib/**: Compiled JavaScript files
271
- - **qqq-frontend-core.js**: CommonJS bundle
272
- - **qqq-frontend-core.esm.js**: ES module bundle
273
- - **Type definitions**: Full TypeScript support
274
-
275
- ## 🔐 Authentication
276
-
277
- ### Supported Authentication Methods
278
-
279
- 1. **OAuth2**: Standard OAuth2 flow
280
- 2. **Custom Tokens**: JWT or other token-based auth
281
- 3. **API Keys**: Simple API key authentication
282
-
283
- ### Authentication Flow
70
+ ### Working with Records
284
71
 
285
72
  ```typescript
286
- // OAuth2 flow
287
- await controller.authenticateOAuth2({
288
- username: 'user@example.com',
289
- password: 'password'
73
+ // Create
74
+ const order = await api.createRecord('order', {
75
+ customerId: 42,
76
+ status: 'pending'
290
77
  });
291
78
 
292
- // Custom token
293
- controller.setAuthorizationHeaderValue('Bearer token');
294
-
295
- // Check authentication status
296
- const isAuthenticated = controller.isAuthenticated();
297
- ```
79
+ // Read
80
+ const record = await api.getRecord('order', order.id);
298
81
 
299
- ## 📊 Data Management
82
+ // Update
83
+ await api.updateRecord('order', order.id, { status: 'shipped' });
300
84
 
301
- ### Record Operations
85
+ // Delete
86
+ await api.deleteRecord('order', order.id);
302
87
 
303
- ```typescript
304
- // Create record
305
- const newRecord = await controller.createRecord('users', {
306
- name: 'John Doe',
307
- email: 'john@example.com'
308
- });
309
-
310
- // Update record
311
- const updatedRecord = await controller.updateRecord('users', 123, {
312
- name: 'John Smith'
313
- });
314
-
315
- // Delete record
316
- await controller.deleteRecord('users', 123);
317
-
318
- // Query records
319
- const records = await controller.queryRecords('users', {
320
- filters: [{ field: 'active', operator: '=', value: true }],
321
- sort: [{ field: 'name', direction: 'ASC' }],
322
- limit: 50,
323
- offset: 0
88
+ // Query with filters
89
+ const pending = await api.queryRecords('order', {
90
+ filters: [{ field: 'status', operator: '=', value: 'pending' }],
91
+ sort: [{ field: 'createdAt', direction: 'DESC' }],
92
+ limit: 50
324
93
  });
325
94
  ```
326
95
 
327
- ### Process Execution
96
+ ### Running Processes
328
97
 
329
98
  ```typescript
330
- // Execute process
331
- const result = await controller.executeProcess('sendEmail', {
332
- to: 'user@example.com',
333
- subject: 'Welcome',
334
- body: 'Welcome to our platform!'
99
+ const result = await api.executeProcess('generateInvoice', {
100
+ orderId: 123,
101
+ format: 'pdf'
335
102
  });
336
-
337
- // Monitor process status
338
- const status = await controller.getProcessStatus('process-id');
339
-
340
- // Cancel process
341
- await controller.cancelProcess('process-id');
342
103
  ```
343
104
 
344
- ## 🎨 Integration Examples
345
-
346
- ### React Integration
105
+ ### Error Handling
347
106
 
348
107
  ```typescript
349
- import React, { useEffect, useState } from 'react';
350
- import { QController, QInstance } from '@qrunio/qqq-frontend-core';
351
-
352
- function QQQApp() {
353
- const [metadata, setMetadata] = useState<QInstance | null>(null);
354
- const [loading, setLoading] = useState(true);
355
-
356
- useEffect(() => {
357
- const controller = new QController('https://your-qqq-server.com');
358
-
359
- controller.loadMetaData()
360
- .then(setMetadata)
361
- .finally(() => setLoading(false));
362
- }, []);
363
-
364
- if (loading) return <div>Loading...</div>;
365
- if (!metadata) return <div>No metadata available</div>;
366
-
367
- return (
368
- <div>
369
- <h1>QQQ Application</h1>
370
- <p>Tables: {metadata.tables?.size || 0}</p>
371
- <p>Processes: {metadata.processes?.size || 0}</p>
372
- </div>
373
- );
374
- }
375
- ```
376
-
377
- ### Vue Integration
108
+ import { QException } from '@qrunio/qqq-frontend-core';
378
109
 
379
- ```typescript
380
- import { defineComponent, ref, onMounted } from 'vue';
381
- import { QController, QInstance } from '@qrunio/qqq-frontend-core';
382
-
383
- export default defineComponent({
384
- setup() {
385
- const metadata = ref<QInstance | null>(null);
386
- const loading = ref(true);
387
-
388
- onMounted(async () => {
389
- const controller = new QController('https://your-qqq-server.com');
390
-
391
- try {
392
- metadata.value = await controller.loadMetaData();
393
- } finally {
394
- loading.value = false;
395
- }
396
- });
397
-
398
- return { metadata, loading };
110
+ try {
111
+ await api.executeProcess('riskyOperation', params);
112
+ } catch (e) {
113
+ if (e instanceof QException) {
114
+ console.error(`QQQ error: ${e.message} (${e.status})`);
399
115
  }
400
- });
116
+ throw e;
117
+ }
401
118
  ```
402
119
 
403
- ### Vanilla JavaScript
120
+ ## Configuration
404
121
 
405
- ```javascript
406
- import { QController } from '@qrunio/qqq-frontend-core';
122
+ ```typescript
123
+ // Custom timeout (default: 60s)
124
+ api.setStepTimeoutMillis(120000);
407
125
 
408
- const controller = new QController('https://your-qqq-server.com');
409
-
410
- // Load metadata
411
- controller.loadMetaData()
412
- .then(metadata => {
413
- console.log('Tables:', metadata.tables);
414
- console.log('Processes:', metadata.processes);
415
- })
416
- .catch(error => {
417
- console.error('Error loading metadata:', error);
418
- });
126
+ // Global error handler
127
+ const api = new QController('https://...', (error) => {
128
+ logToMonitoring(error);
129
+ });
419
130
  ```
420
131
 
421
- ## 🚀 Performance
422
-
423
- ### Optimization Features
424
-
425
- - **Memoization**: Cached metadata promises
426
- - **Connection Reuse**: Persistent HTTP connections
427
- - **Batch Operations**: Efficient bulk operations
428
- - **Lazy Loading**: On-demand metadata loading
132
+ ## Project Status
429
133
 
430
- ### Best Practices
134
+ **Maturity:** Stable, used in production
135
+ **Breaking changes:** Follow semver; major versions may break API
431
136
 
432
- - **Reuse Controllers**: Don't create new controllers unnecessarily
433
- - **Cache Metadata**: Use cached metadata when possible
434
- - **Handle Errors**: Implement proper error handling
435
- - **Monitor Performance**: Track API response times
137
+ **Roadmap:**
138
+ - WebSocket support for real-time updates
139
+ - Request batching for bulk operations
140
+ - Offline queue for intermittent connectivity
436
141
 
437
- ## 🤝 Contributing
142
+ ## Contributing
438
143
 
439
- **Important**: This repository is a core component of the QQQ framework. All contributions, issues, and discussions should go through the main QQQ repository.
440
-
441
- ### Development Workflow
442
-
443
- 1. **Fork the main QQQ repository**: https://github.com/Kingsrook/qqq
444
- 2. **Create a feature branch**: `git checkout -b feature/amazing-feature`
445
- 3. **Make your changes** (including core library changes if applicable)
446
- 4. **Run tests**: `npm test`
447
- 5. **Commit your changes**: `git commit -m 'Add amazing feature'`
448
- 6. **Push to the branch**: `git push origin feature/amazing-feature`
449
- 7. **Open a Pull Request** to the main QQQ repository
450
-
451
- ### Code Standards
452
-
453
- - **TypeScript**: Strict type checking enabled
454
- - **ESLint**: Code quality and style enforcement
455
- - **Testing**: Comprehensive test coverage
456
- - **Documentation**: Clear API documentation
457
-
458
- ## 📄 License
459
-
460
- This project is licensed under the GNU Affero General Public License v3.0 - see the [LICENSE](LICENSE) file for details.
461
-
462
- ```
463
- QQQ Frontend Core
464
- Copyright (C) 2021-2022 Kingsrook, LLC
465
- 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States
466
- contact@kingsrook.com | https://github.com/Kingsrook/
144
+ ```bash
145
+ git clone https://github.com/QRun-IO/qqq-frontend-core
146
+ cd qqq-frontend-core
147
+ npm install
148
+ npm test
467
149
  ```
468
150
 
469
- **Note**: This is a core component of the QQQ framework. For the complete license and more information, see the main QQQ repository: https://github.com/Kingsrook/qqq
470
-
471
- ## 🆘 Support & Community
472
-
473
- ### ⚠️ Important: Use Main QQQ Repository
474
-
475
- **All support, issues, discussions, and community interactions should go through the main QQQ repository:**
476
-
477
- - **Main Repository**: https://github.com/Kingsrook/qqq
478
- - **Issues**: https://github.com/Kingsrook/qqq/issues
479
- - **Discussions**: https://github.com/Kingsrook/qqq/discussions
480
- - **Wiki**: https://github.com/Kingsrook/qqq.wiki
481
-
482
- ### Why This Repository Exists
483
-
484
- This repository is maintained separately from the main QQQ repository to:
485
- - **Enable independent library development** and versioning
486
- - **Allow library-specific CI/CD** and deployment pipelines
487
- - **Provide clear separation** between core library and framework concerns
488
- - **Support different release cycles** for library vs. framework updates
489
-
490
- ### Getting Help
491
-
492
- - **Documentation**: Check the [QQQ Wiki](https://github.com/Kingsrook/qqq.wiki)
493
- - **Issues**: Report bugs and feature requests on [Main QQQ Issues](https://github.com/Kingsrook/qqq/issues)
494
- - **Discussions**: Join community discussions on [Main QQQ Discussions](https://github.com/Kingsrook/qqq/discussions)
495
- - **Questions**: Ask questions in the main QQQ repository
496
-
497
- ### Contact Information
498
-
499
- - **Company**: Kingsrook, LLC
500
- - **Email**: contact@kingsrook.com
501
- - **Website**: https://kingsrook.com
502
- - **Main GitHub**: https://github.com/Kingsrook/qqq
503
-
504
- ## 🙏 Acknowledgments
505
-
506
- - **TypeScript Team**: For the powerful type system
507
- - **Axios Team**: For the excellent HTTP client library
508
- - **QQQ Framework Team**: For the underlying low-code platform
509
- - **Open Source Community**: For the tools and libraries that make this possible
510
-
511
- ---
512
-
513
- **Built with ❤️ by the Kingsrook Team**
151
+ Submit issues and PRs to the [main QQQ repository](https://github.com/QRun-IO/qqq/issues).
514
152
 
515
- **This is a core library component of the QQQ framework. For complete information, support, and community, visit: https://github.com/Kingsrook/qqq**
153
+ ## License
516
154
 
155
+ AGPL-3.0
@@ -5,6 +5,7 @@ import { QHelpContent } from "./QHelpContent";
5
5
  import { QProcessMetaData } from "./QProcessMetaData";
6
6
  import { QReportMetaData } from "./QReportMetaData";
7
7
  import { QTableMetaData } from "./QTableMetaData";
8
+ import { QThemeMetaData } from "./QThemeMetaData";
8
9
  import { QWidgetMetaData } from "./QWidgetMetaData";
9
10
  /*******************************************************************************
10
11
  ** Meta-Data definition of a QQQ Instance
@@ -18,6 +19,7 @@ export declare class QInstance {
18
19
  apps?: Map<string, QAppMetaData>;
19
20
  appTree?: QAppTreeNode[];
20
21
  branding?: QBrandingMetaData;
22
+ theme?: QThemeMetaData;
21
23
  environmentValues?: Map<string, string>;
22
24
  helpContent?: Map<string, QHelpContent[]>;
23
25
  supplementalInstanceMetaData: Map<String, any>;
@@ -26,6 +26,7 @@ import { QHelpContent } from "./QHelpContent";
26
26
  import { QProcessMetaData } from "./QProcessMetaData";
27
27
  import { QReportMetaData } from "./QReportMetaData";
28
28
  import { QTableMetaData } from "./QTableMetaData";
29
+ import { QThemeMetaData } from "./QThemeMetaData";
29
30
  import { QWidgetMetaData } from "./QWidgetMetaData";
30
31
  /*******************************************************************************
31
32
  ** Meta-Data definition of a QQQ Instance
@@ -83,6 +84,9 @@ var QInstance = /** @class */ (function () {
83
84
  for (var key in object.supplementalInstanceMetaData) {
84
85
  this.supplementalInstanceMetaData.set(key, object.supplementalInstanceMetaData[key]);
85
86
  }
87
+ if (object.supplementalInstanceMetaData["theme"]) {
88
+ this.theme = new QThemeMetaData(object.supplementalInstanceMetaData["theme"]);
89
+ }
86
90
  }
87
91
  this.helpContent = QHelpContent.buildMap(object.helpContents);
88
92
  }
@@ -1 +1 @@
1
- {"version":3,"file":"QInstance.js","sourceRoot":"","sources":["../../../src/model/metaData/QInstance.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,iBAAiB,EAAC,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AACpD,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAClD,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAC,eAAe,EAAC,MAAM,mBAAmB,CAAC;AAElD;;;iFAGiF;AACjF;IAaG,mBAAY,MAAW;QAFvB,iCAA4B,GAAqB,IAAI,GAAG,EAAE,CAAC;QAIxD,IAAI,MAAM,CAAC,MAAM,EACjB;YACG,IAAI,CAAC,MAAM,GAAG,IAAI,GAAG,EAA0B,CAAC;YAChD,KAAK,IAAM,GA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>;
15
+ virtualFields?: Map<string, QFieldMetaData>;
15
16
  iconName?: string;
16
17
  sections?: QTableSection[];
17
18
  exposedJoins?: QExposedJoin[];
@@ -64,6 +64,12 @@ var QTableMetaData = /** @class */ (function () {
64
64
  this.fields.set(key, new QFieldMetaData(object.fields[key]));
65
65
  }
66
66
  }
67
+ if (object.virtualFields) {
68
+ this.virtualFields = new Map();
69
+ for (var key in object.virtualFields) {
70
+ this.virtualFields.set(key, new QFieldMetaData(object.virtualFields[key]));
71
+ }
72
+ }
67
73
  if (object.sections) {
68
74
  this.sections = [];
69
75
  for (var i_1 = 0; i_1 < object.sections.length; i_1++) {
@@ -100,6 +106,12 @@ var QTableMetaData = /** @class */ (function () {
100
106
  fieldsClone.set(name, field.clone());
101
107
  });
102
108
  }
109
+ var virtualFieldsClone = this.virtualFields ? new Map() : undefined;
110
+ if (this.virtualFields && virtualFieldsClone) {
111
+ this.virtualFields.forEach(function (field, name) {
112
+ virtualFieldsClone.set(name, field.clone());
113
+ });
114
+ }
103
115
  var sectionsClone = this.sections ? [] : undefined;
104
116
  if (this.sections && sectionsClone) {
105
117
  for (var _i = 0, _a = this.sections; _i < _a.length; _i++) {
@@ -139,6 +151,7 @@ var QTableMetaData = /** @class */ (function () {
139
151
  });
140
152
  var clone = new QTableMetaData(__assign({}, this));
141
153
  clone.fields = fieldsClone;
154
+ clone.virtualFields = virtualFieldsClone;
142
155
  clone.sections = sectionsClone;
143
156
  clone.exposedJoins = exposedJoinsClone;
144
157
  clone.capabilities = capabilitiesClone;
@@ -1 +1 @@
1
- {"version":3,"file":"QTableMetaData.js","sourceRoot":"","sources":["../../../src/model/metaData/QTableMetaData.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;AAEH,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAC5C,OAAO,EAAC,cAAc,EAAC,MAAM,kBAAkB,CAAC;AAChD,OAAO,EAAC,YAAY,EAAC,MAAM,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C;IAClB,CAAC;IAGJ,qBAAC;AAAD,CAAC,AArLD,IAqLC"}
@@ -13,6 +13,7 @@ export declare class QTableSection {
13
13
  isHidden: boolean;
14
14
  gridColumns?: number;
15
15
  helpContents?: QHelpContent[];
16
+ alternatives?: Map<string, QTableSection>;
16
17
  /*******************************************************************************
17
18
  **
18
19
  *******************************************************************************/
@@ -29,6 +29,15 @@ var __assign = (this && this.__assign) || function () {
29
29
  };
30
30
  return __assign.apply(this, arguments);
31
31
  };
32
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
33
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
34
+ if (ar || !(i in from)) {
35
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
36
+ ar[i] = from[i];
37
+ }
38
+ }
39
+ return to.concat(ar || Array.prototype.slice.call(from));
40
+ };
32
41
  import { QHelpContent } from "./QHelpContent";
33
42
  /*******************************************************************************
34
43
  ** Meta-Data to define a section (of fields) in a table in a QQQ instance.
@@ -50,11 +59,21 @@ var QTableSection = /** @class */ (function () {
50
59
  this.widgetName = object.widgetName;
51
60
  this.gridColumns = object.gridColumns;
52
61
  this.helpContents = QHelpContent.buildArray(object.helpContents);
62
+ if (object.alternatives) {
63
+ this.alternatives = new Map();
64
+ for (var type in object.alternatives) {
65
+ this.alternatives.set(type, new QTableSection(object.alternatives[type]));
66
+ }
67
+ }
53
68
  }
54
69
  /***************************************************************************
55
70
  *
56
71
  ***************************************************************************/
57
72
  QTableSection.prototype.clone = function () {
73
+ var fieldNamesClone = undefined;
74
+ if (this.fieldNames) {
75
+ fieldNamesClone = __spreadArray([], this.fieldNames, true);
76
+ }
58
77
  var helpContentsClone = (this.helpContents ? [] : undefined);
59
78
  if (this.helpContents && helpContentsClone) {
60
79
  for (var _i = 0, _a = this.helpContents; _i < _a.length; _i++) {
@@ -62,7 +81,16 @@ var QTableSection = /** @class */ (function () {
62
81
  helpContentsClone.push(helpContent.clone());
63
82
  }
64
83
  }
65
- var clone = new QTableSection(__assign(__assign({}, this), { helpContents: helpContentsClone }));
84
+ var alternativesClone = (this.alternatives ? new Map : undefined);
85
+ if (this.alternatives && alternativesClone) {
86
+ this.alternatives.forEach(function (value, key) {
87
+ return alternativesClone.set(key, value.clone());
88
+ });
89
+ }
90
+ var clone = new QTableSection(__assign({}, this));
91
+ clone.fieldNames = fieldNamesClone;
92
+ clone.helpContents = helpContentsClone;
93
+ clone.alternatives = alternativesClone;
66
94
  return (clone);
67
95
  };
68
96
  return QTableSection;
@@ -1 +1 @@
1
- {"version":3,"file":"QTableSection.js","sourceRoot":"","sources":["../../../src/model/metaData/QTableSection.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;;;;;;;;;;AAEH,OAAO,EAAC,YAAY,EAAC,MAAM,gBAAgB,CAAC;AAE5C;;;iFAGiF;AACjF;IAaG;;qFAEiF;IACjF,uBAAY,MAAW;QAEpB,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,KAAK,GAAG,MAAM,CAAC,KAAK,CAAC;QAC1B,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,IAAI,CAAC;QACxB,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC;QAEjE,IAAI,MAAM,CAAC,UAAU,EACrB;YACG,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;SACtC;QAED,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QACpC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QAEtC,IAAI,CAAC,YAAY,GAAG,YAAY,CAAC,UAAU,CAAC,MAAM,CAAC,YAAY,CAAC,CAAA;IACn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AI,CAAC,YAAY,CAAC,OAAO,CAAC,UAAC,KAAoB,EAAE,GAAW;gBACzD,OAAA,iBAAiB,CAAC,GAAG,CAAC,GAAG,EAAE,KAAK,CAAC,KAAK,EAAE,CAAC;YAAzC,CAAyC,CAAC,CAAC;SAChD;QAED,IAAM,KAAK,GAAG,IAAI,aAAa,cAAK,IAAI,EAAE,CAAC;QAE3C,KAAK,CAAC,UAAU,GAAG,eAAe,CAAC;QACnC,KAAK,CAAC,YAAY,GAAG,iBAAiB,CAAC;QACvC,KAAK,CAAC,YAAY,GAAG,iBAAiB,CAAC;QAEvC,OAAO,CAAC,KAAK,CAAC,CAAC;IAClB,CAAC;IAEJ,oBAAC;AAAD,CAAC,AAjFD,IAiFC"}
@@ -0,0 +1,26 @@
1
+ /*******************************************************************************
2
+ ** Meta-Data to define theme configuration in a QQQ instance.
3
+ **
4
+ *******************************************************************************/
5
+ export declare class QThemeMetaData {
6
+ primaryColor?: string;
7
+ secondaryColor?: string;
8
+ backgroundColor?: string;
9
+ surfaceColor?: string;
10
+ textPrimary?: string;
11
+ textSecondary?: string;
12
+ errorColor?: string;
13
+ warningColor?: string;
14
+ successColor?: string;
15
+ infoColor?: string;
16
+ fontFamily?: string;
17
+ headerFontFamily?: string;
18
+ borderRadius?: string;
19
+ density?: "compact" | "normal" | "comfortable";
20
+ logoPath?: string;
21
+ iconPath?: string;
22
+ faviconPath?: string;
23
+ customCss?: string;
24
+ iconStyle?: "filled" | "outlined" | "rounded" | "sharp" | "two-tone";
25
+ constructor(object: any);
26
+ }
@@ -0,0 +1,50 @@
1
+ /*
2
+ * QQQ - Low-code Application Framework for Engineers.
3
+ * Copyright (C) 2021-2025. Kingsrook, LLC
4
+ * 651 N Broad St Ste 205 # 6917 | Middletown DE 19709 | United States
5
+ * contact@kingsrook.com
6
+ * https://github.com/Kingsrook/
7
+ *
8
+ * This program is free software: you can redistribute it and/or modify
9
+ * it under the terms of the GNU Affero General Public License as
10
+ * published by the Free Software Foundation, either version 3 of the
11
+ * License, or (at your option) any later version.
12
+ *
13
+ * This program is distributed in the hope that it will be useful,
14
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
15
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
+ * GNU Affero General Public License for more details.
17
+ *
18
+ * You should have received a copy of the GNU Affero General Public License
19
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
20
+ */
21
+ /*******************************************************************************
22
+ ** Meta-Data to define theme configuration in a QQQ instance.
23
+ **
24
+ *******************************************************************************/
25
+ var QThemeMetaData = /** @class */ (function () {
26
+ function QThemeMetaData(object) {
27
+ this.primaryColor = object.primaryColor;
28
+ this.secondaryColor = object.secondaryColor;
29
+ this.backgroundColor = object.backgroundColor;
30
+ this.surfaceColor = object.surfaceColor;
31
+ this.textPrimary = object.textPrimary;
32
+ this.textSecondary = object.textSecondary;
33
+ this.errorColor = object.errorColor;
34
+ this.warningColor = object.warningColor;
35
+ this.successColor = object.successColor;
36
+ this.infoColor = object.infoColor;
37
+ this.fontFamily = object.fontFamily;
38
+ this.headerFontFamily = object.headerFontFamily;
39
+ this.borderRadius = object.borderRadius;
40
+ this.density = object.density;
41
+ this.logoPath = object.logoPath;
42
+ this.iconPath = object.iconPath;
43
+ this.faviconPath = object.faviconPath;
44
+ this.customCss = object.customCss;
45
+ this.iconStyle = object.iconStyle;
46
+ }
47
+ return QThemeMetaData;
48
+ }());
49
+ export { QThemeMetaData };
50
+ //# sourceMappingURL=QThemeMetaData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QThemeMetaData.js","sourceRoot":"","sources":["../../../src/model/metaData/QThemeMetaData.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH;;;iFAGiF;AACjF;IAiCG,wBAAY,MAAW;QAEpB,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;QACxC,IAAI,CAAC,cAAc,GAAG,MAAM,CAAC,cAAc,CAAC;QAC5C,IAAI,CAAC,eAAe,GAAG,MAAM,CAAC,eAAe,CAAC;QAC9C,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;QACxC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QACtC,IAAI,CAAC,aAAa,GAAG,MAAM,CAAC,aAAa,CAAC;QAC1C,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QACpC,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;QACxC,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;QACxC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,UAAU,CAAC;QACpC,IAAI,CAAC,gBAAgB,GAAG,MAAM,CAAC,gBAAgB,CAAC;QAChD,IAAI,CAAC,YAAY,GAAG,MAAM,CAAC,YAAY,CAAC;QACxC,IAAI,CAAC,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC;QAC9B,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,QAAQ,CAAC;QAChC,IAAI,CAAC,WAAW,GAAG,MAAM,CAAC,WAAW,CAAC;QACtC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;QAClC,IAAI,CAAC,SAAS,GAAG,MAAM,CAAC,SAAS,CAAC;IACrC,CAAC;IACJ,qBAAC;AAAD,CAAC,AAvDD,IAuDC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qrunio/qqq-frontend-core",
3
- "version": "1.3.7-SNAPSHOT",
3
+ "version": "1.3.13-SNAPSHOT",
4
4
  "description": "",
5
5
  "main": "qqq-frontend-core.js",
6
6
  "module": "lib/qqq-frontend-core.esm.js",