jupiter-dynamic-forms 1.0.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/LICENSE +21 -0
- package/README.md +384 -0
- package/dist/core/concept-tree.d.ts +19 -0
- package/dist/core/concept-tree.d.ts.map +1 -0
- package/dist/core/dynamic-form.d.ts +42 -0
- package/dist/core/dynamic-form.d.ts.map +1 -0
- package/dist/core/form-field.d.ts +23 -0
- package/dist/core/form-field.d.ts.map +1 -0
- package/dist/core/form-section.d.ts +20 -0
- package/dist/core/form-section.d.ts.map +1 -0
- package/dist/index.d.ts +8 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +784 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2082 -0
- package/dist/index.mjs.map +1 -0
- package/dist/schema/types.d.ts +151 -0
- package/dist/schema/types.d.ts.map +1 -0
- package/dist/schema/xbrl-types.d.ts +142 -0
- package/dist/schema/xbrl-types.d.ts.map +1 -0
- package/dist/utils/validation.d.ts +29 -0
- package/dist/utils/validation.d.ts.map +1 -0
- package/dist/utils/xbrl-form-builder.d.ts +52 -0
- package/dist/utils/xbrl-form-builder.d.ts.map +1 -0
- package/package.json +91 -0
- package/wrappers/angular/jupiter-dynamic-forms.module.ts +30 -0
- package/wrappers/angular/public-api.ts +13 -0
- package/wrappers/angular/types.ts +33 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Jupiter Forms
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,384 @@
|
|
|
1
|
+
# Jupiter Dynamic Forms
|
|
2
|
+
|
|
3
|
+
# Jupiter Dynamic Forms
|
|
4
|
+
|
|
5
|
+
> **Framework-agnostic dynamic form builder for XBRL entrypoints using Web Components**
|
|
6
|
+
|
|
7
|
+
[](https://badge.fury.io/js/%40jupiter%2Fdynamic-forms)
|
|
8
|
+
[](https://opensource.org/licenses/MIT)
|
|
9
|
+
[](https://www.typescriptlang.org/)
|
|
10
|
+
|
|
11
|
+
Jupiter Dynamic Forms is a powerful, framework-agnostic form builder specifically designed for XBRL (eXtensible Business Reporting Language) data. It automatically generates interactive forms with accordion sections from XBRL taxonomy data, supporting Angular 18+, React, Vue, and vanilla HTML applications.
|
|
12
|
+
|
|
13
|
+
## ✨ Key Features
|
|
14
|
+
|
|
15
|
+
- 🎭 **XBRL Integration**: Direct consumption of XBRL taxonomy JSON files
|
|
16
|
+
- 📱 **Framework Agnostic**: Works with Angular 18+, React, Vue, or vanilla HTML
|
|
17
|
+
- 🎨 **Accordion UI**: Automatic accordion sections for each presentation role
|
|
18
|
+
- 🏗️ **Hierarchical Display**: Nested concept trees with proper indentation
|
|
19
|
+
- 🔧 **Smart Field Types**: Automatic mapping from XBRL types to form controls
|
|
20
|
+
- 🌐 **Multi-language**: Intelligent label selection from XBRL labels
|
|
21
|
+
- 📊 **TypeScript**: Full type safety with comprehensive interfaces
|
|
22
|
+
- ⚡ **Web Components**: Built with Lit Element for maximum compatibility
|
|
23
|
+
|
|
24
|
+
## 🚀 Quick Start
|
|
25
|
+
|
|
26
|
+
### Installation
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install @jupiter/dynamic-forms
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### Angular 18+ Integration
|
|
33
|
+
|
|
34
|
+
```typescript
|
|
35
|
+
// app.module.ts
|
|
36
|
+
import { NgModule, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
|
37
|
+
import '@jupiter/dynamic-forms';
|
|
38
|
+
|
|
39
|
+
@NgModule({
|
|
40
|
+
// ... other config
|
|
41
|
+
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
|
42
|
+
})
|
|
43
|
+
export class AppModule { }
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
```typescript
|
|
47
|
+
// your-component.ts
|
|
48
|
+
import { Component } from '@angular/core';
|
|
49
|
+
|
|
50
|
+
@Component({
|
|
51
|
+
selector: 'app-form',
|
|
52
|
+
template: `
|
|
53
|
+
<jupiter-dynamic-form
|
|
54
|
+
[attr.xbrlInput]="xbrlData"
|
|
55
|
+
[attr.config]="formConfig"
|
|
56
|
+
(formSubmit)="onFormSubmit($event)"
|
|
57
|
+
(formChange)="onFormChange($event)">
|
|
58
|
+
</jupiter-dynamic-form>
|
|
59
|
+
`
|
|
60
|
+
})
|
|
61
|
+
export class FormComponent {
|
|
62
|
+
xbrlData = {
|
|
63
|
+
presentation: [/* your XBRL data */]
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
formConfig = {
|
|
67
|
+
showValidationSummary: true,
|
|
68
|
+
collapsibleSections: true
|
|
69
|
+
};
|
|
70
|
+
|
|
71
|
+
onFormSubmit(event: CustomEvent) {
|
|
72
|
+
console.log('Form submitted:', event.detail);
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
onFormChange(event: CustomEvent) {
|
|
76
|
+
console.log('Form changed:', event.detail);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
## 📊 XBRL Data Structure
|
|
82
|
+
|
|
83
|
+
Jupiter Dynamic Forms expects XBRL data in JSON format. Each presentation role automatically becomes an accordion section:
|
|
84
|
+
|
|
85
|
+
- **[000001] Filing Information** → Company details and registration
|
|
86
|
+
- **[000101] Profit or Loss Statement** → Income statement data
|
|
87
|
+
- **[000201] Comprehensive Income** → Comprehensive income items
|
|
88
|
+
- **[000301] Financial Position** → Balance sheet structure
|
|
89
|
+
- **[000401] Changes in Equity** → Equity movements
|
|
90
|
+
- **[000501] Cash Flows** → Cash flow analysis
|
|
91
|
+
|
|
92
|
+
## 🚀 Features
|
|
93
|
+
|
|
94
|
+
- **Framework Agnostic**: Works with Angular, React, Vue, and vanilla JavaScript
|
|
95
|
+
- **JSON Schema Driven**: Define complex forms using simple JSON schemas
|
|
96
|
+
- **XBRL Optimized**: Built specifically for XBRL entrypoint data collection
|
|
97
|
+
- **Accordion Sections**: Collapsible sections for better organization
|
|
98
|
+
- **Nested Concept Trees**: Hierarchical data organization with expandable/collapsible nodes
|
|
99
|
+
- **Tabular Layout**: Clean table-based layout with concept trees and input columns
|
|
100
|
+
- **Dynamic Columns**: Add/remove dimension columns on the fly
|
|
101
|
+
- **Rich Field Types**: Support for text, number, date, currency, boolean, select, and more
|
|
102
|
+
- **Built-in Validation**: Comprehensive validation with customizable rules
|
|
103
|
+
- **TypeScript Support**: Full TypeScript definitions included
|
|
104
|
+
- **Themeable**: CSS custom properties for easy styling customization
|
|
105
|
+
|
|
106
|
+
## 📦 Installation
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
npm install @jupiter/dynamic-forms
|
|
110
|
+
```
|
|
111
|
+
|
|
112
|
+
## 🎯 Quick Start
|
|
113
|
+
|
|
114
|
+
### Vanilla JavaScript / HTML
|
|
115
|
+
|
|
116
|
+
```html
|
|
117
|
+
<!DOCTYPE html>
|
|
118
|
+
<html>
|
|
119
|
+
<head>
|
|
120
|
+
<script type="module">
|
|
121
|
+
import '@jupiter/dynamic-forms';
|
|
122
|
+
</script>
|
|
123
|
+
</head>
|
|
124
|
+
<body>
|
|
125
|
+
<jupiter-dynamic-form id="my-form"></jupiter-dynamic-form>
|
|
126
|
+
|
|
127
|
+
<script>
|
|
128
|
+
const form = document.getElementById('my-form');
|
|
129
|
+
form.schema = {
|
|
130
|
+
version: '1.0',
|
|
131
|
+
formId: 'example',
|
|
132
|
+
title: 'My XBRL Form',
|
|
133
|
+
sections: [
|
|
134
|
+
// Your schema here
|
|
135
|
+
]
|
|
136
|
+
};
|
|
137
|
+
</script>
|
|
138
|
+
</body>
|
|
139
|
+
</html>
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Angular
|
|
143
|
+
|
|
144
|
+
```typescript
|
|
145
|
+
// app.module.ts
|
|
146
|
+
import { JupiterDynamicFormModule } from '@jupiter/dynamic-forms/angular';
|
|
147
|
+
|
|
148
|
+
@NgModule({
|
|
149
|
+
imports: [JupiterDynamicFormModule],
|
|
150
|
+
// ...
|
|
151
|
+
})
|
|
152
|
+
export class AppModule { }
|
|
153
|
+
```
|
|
154
|
+
|
|
155
|
+
```html
|
|
156
|
+
<!-- component.html -->
|
|
157
|
+
<jupiter-dynamic-form-ng
|
|
158
|
+
[schema]="formSchema"
|
|
159
|
+
[config]="formConfig"
|
|
160
|
+
(formSubmit)="onFormSubmit($event)"
|
|
161
|
+
></jupiter-dynamic-form-ng>
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
### React
|
|
165
|
+
|
|
166
|
+
```tsx
|
|
167
|
+
import { JupiterDynamicForm } from '@jupiter/dynamic-forms/react';
|
|
168
|
+
|
|
169
|
+
function MyComponent() {
|
|
170
|
+
const handleSubmit = (data) => {
|
|
171
|
+
console.log('Form data:', data);
|
|
172
|
+
};
|
|
173
|
+
|
|
174
|
+
return (
|
|
175
|
+
<JupiterDynamicForm
|
|
176
|
+
schema={formSchema}
|
|
177
|
+
config={formConfig}
|
|
178
|
+
onFormSubmit={handleSubmit}
|
|
179
|
+
/>
|
|
180
|
+
);
|
|
181
|
+
}
|
|
182
|
+
```
|
|
183
|
+
|
|
184
|
+
### Vue
|
|
185
|
+
|
|
186
|
+
```vue
|
|
187
|
+
<template>
|
|
188
|
+
<JupiterDynamicForm
|
|
189
|
+
:schema="formSchema"
|
|
190
|
+
:config="formConfig"
|
|
191
|
+
@form-submit="handleSubmit"
|
|
192
|
+
/>
|
|
193
|
+
</template>
|
|
194
|
+
|
|
195
|
+
<script>
|
|
196
|
+
import { JupiterDynamicForm } from '@jupiter/dynamic-forms/vue';
|
|
197
|
+
|
|
198
|
+
export default {
|
|
199
|
+
components: {
|
|
200
|
+
JupiterDynamicForm
|
|
201
|
+
},
|
|
202
|
+
// ...
|
|
203
|
+
}
|
|
204
|
+
</script>
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
## 📋 Schema Structure
|
|
208
|
+
|
|
209
|
+
The form is driven by a JSON schema that defines sections, concepts, and fields:
|
|
210
|
+
|
|
211
|
+
```json
|
|
212
|
+
{
|
|
213
|
+
"version": "1.0",
|
|
214
|
+
"formId": "financial-statement",
|
|
215
|
+
"title": "Financial Statement Form",
|
|
216
|
+
"description": "XBRL financial data entry",
|
|
217
|
+
"sections": [
|
|
218
|
+
{
|
|
219
|
+
"id": "balance-sheet",
|
|
220
|
+
"title": "Balance Sheet",
|
|
221
|
+
"expanded": true,
|
|
222
|
+
"concepts": [
|
|
223
|
+
{
|
|
224
|
+
"id": "assets",
|
|
225
|
+
"name": "Assets",
|
|
226
|
+
"label": "Total Assets",
|
|
227
|
+
"level": 0,
|
|
228
|
+
"fields": [
|
|
229
|
+
{
|
|
230
|
+
"id": "assets-base",
|
|
231
|
+
"conceptId": "assets",
|
|
232
|
+
"columnId": "base",
|
|
233
|
+
"type": "currency",
|
|
234
|
+
"label": "Assets",
|
|
235
|
+
"required": true,
|
|
236
|
+
"validation": [
|
|
237
|
+
{
|
|
238
|
+
"type": "required",
|
|
239
|
+
"message": "Assets value is required"
|
|
240
|
+
}
|
|
241
|
+
]
|
|
242
|
+
}
|
|
243
|
+
],
|
|
244
|
+
"children": [
|
|
245
|
+
// Nested concepts...
|
|
246
|
+
]
|
|
247
|
+
}
|
|
248
|
+
]
|
|
249
|
+
}
|
|
250
|
+
]
|
|
251
|
+
}
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
## 🎛️ Configuration Options
|
|
255
|
+
|
|
256
|
+
```typescript
|
|
257
|
+
const config = {
|
|
258
|
+
theme: 'light' | 'dark' | 'auto',
|
|
259
|
+
locale: 'en-US',
|
|
260
|
+
dateFormat: 'YYYY-MM-DD',
|
|
261
|
+
currencyCode: 'USD',
|
|
262
|
+
showValidationSummary: true,
|
|
263
|
+
collapsibleSections: true,
|
|
264
|
+
collapsibleConcepts: true,
|
|
265
|
+
enableColumnManagement: true,
|
|
266
|
+
maxColumns: 10,
|
|
267
|
+
autoSave: false,
|
|
268
|
+
autoSaveInterval: 30000
|
|
269
|
+
};
|
|
270
|
+
```
|
|
271
|
+
|
|
272
|
+
## 🔧 Field Types
|
|
273
|
+
|
|
274
|
+
- `text` - Single line text input
|
|
275
|
+
- `textarea` - Multi-line text input
|
|
276
|
+
- `number` - Numeric input
|
|
277
|
+
- `decimal` - Decimal number with formatting
|
|
278
|
+
- `currency` - Currency input with formatting
|
|
279
|
+
- `percentage` - Percentage input
|
|
280
|
+
- `date` - Date picker
|
|
281
|
+
- `datetime` - Date and time picker
|
|
282
|
+
- `boolean` - Checkbox
|
|
283
|
+
- `select` - Dropdown selection
|
|
284
|
+
- `multiselect` - Multiple selection
|
|
285
|
+
- `email` - Email input with validation
|
|
286
|
+
- `url` - URL input with validation
|
|
287
|
+
- `tel` - Telephone number input
|
|
288
|
+
|
|
289
|
+
## ✅ Validation Rules
|
|
290
|
+
|
|
291
|
+
- `required` - Field must have a value
|
|
292
|
+
- `min` / `max` - Numeric range validation
|
|
293
|
+
- `minLength` / `maxLength` - String length validation
|
|
294
|
+
- `pattern` - Regular expression validation
|
|
295
|
+
- `email` - Email format validation
|
|
296
|
+
- `url` - URL format validation
|
|
297
|
+
- `custom` - Custom validation functions
|
|
298
|
+
|
|
299
|
+
## 🎨 Styling
|
|
300
|
+
|
|
301
|
+
The component uses CSS custom properties for theming:
|
|
302
|
+
|
|
303
|
+
```css
|
|
304
|
+
:root {
|
|
305
|
+
--jupiter-primary-color: #1976d2;
|
|
306
|
+
--jupiter-background: #ffffff;
|
|
307
|
+
--jupiter-text-primary: #333333;
|
|
308
|
+
--jupiter-border-color: #dddddd;
|
|
309
|
+
--jupiter-error-color: #d32f2f;
|
|
310
|
+
/* ... more variables */
|
|
311
|
+
}
|
|
312
|
+
```
|
|
313
|
+
|
|
314
|
+
## 📚 API Reference
|
|
315
|
+
|
|
316
|
+
### Properties
|
|
317
|
+
|
|
318
|
+
| Property | Type | Description |
|
|
319
|
+
|----------|------|-------------|
|
|
320
|
+
| `schema` | `XBRLFormSchema` | The form schema definition |
|
|
321
|
+
| `config` | `ComponentConfig` | Configuration options |
|
|
322
|
+
| `initialData` | `FormData` | Initial form data |
|
|
323
|
+
| `disabled` | `boolean` | Disable the entire form |
|
|
324
|
+
| `readonly` | `boolean` | Make form read-only |
|
|
325
|
+
|
|
326
|
+
### Methods
|
|
327
|
+
|
|
328
|
+
| Method | Returns | Description |
|
|
329
|
+
|--------|---------|-------------|
|
|
330
|
+
| `getData()` | `FormData` | Get current form data |
|
|
331
|
+
| `setData(data)` | `void` | Set form data |
|
|
332
|
+
| `validate()` | `boolean` | Validate form and return result |
|
|
333
|
+
| `reset()` | `void` | Reset form to initial state |
|
|
334
|
+
| `getState()` | `FormState` | Get complete form state |
|
|
335
|
+
|
|
336
|
+
### Events
|
|
337
|
+
|
|
338
|
+
| Event | Detail | Description |
|
|
339
|
+
|-------|--------|-------------|
|
|
340
|
+
| `field-change` | `{fieldId, conceptId, columnId, value, oldValue}` | Field value changed |
|
|
341
|
+
| `section-expand` | `{sectionId, expanded}` | Section expanded/collapsed |
|
|
342
|
+
| `concept-expand` | `{conceptId, expanded}` | Concept expanded/collapsed |
|
|
343
|
+
| `column-add` | `{column}` | Column added |
|
|
344
|
+
| `column-remove` | `{columnId}` | Column removed |
|
|
345
|
+
| `form-submit` | `{data, valid, errors}` | Form submitted |
|
|
346
|
+
| `form-reset` | `{}` | Form reset |
|
|
347
|
+
|
|
348
|
+
## 🏗️ Development
|
|
349
|
+
|
|
350
|
+
```bash
|
|
351
|
+
# Install dependencies
|
|
352
|
+
npm install
|
|
353
|
+
|
|
354
|
+
# Start development server
|
|
355
|
+
npm run dev
|
|
356
|
+
|
|
357
|
+
# Build the library
|
|
358
|
+
npm run build
|
|
359
|
+
|
|
360
|
+
# Run tests
|
|
361
|
+
npm test
|
|
362
|
+
|
|
363
|
+
# Lint code
|
|
364
|
+
npm run lint
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
## 🤝 Contributing
|
|
368
|
+
|
|
369
|
+
1. Fork the repository
|
|
370
|
+
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
|
|
371
|
+
3. Commit your changes (`git commit -m 'Add some amazing feature'`)
|
|
372
|
+
4. Push to the branch (`git push origin feature/amazing-feature`)
|
|
373
|
+
5. Open a Pull Request
|
|
374
|
+
|
|
375
|
+
## 📄 License
|
|
376
|
+
|
|
377
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
378
|
+
|
|
379
|
+
## 🔗 Links
|
|
380
|
+
|
|
381
|
+
- [Documentation](https://github.com/your-org/jupiter-dynamic-forms/wiki)
|
|
382
|
+
- [Examples](./examples/)
|
|
383
|
+
- [Issue Tracker](https://github.com/your-org/jupiter-dynamic-forms/issues)
|
|
384
|
+
- [Changelog](CHANGELOG.md)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { ConceptTree, FormColumn } from '../schema/types';
|
|
3
|
+
|
|
4
|
+
export declare class JupiterConceptTree extends LitElement {
|
|
5
|
+
concept: ConceptTree;
|
|
6
|
+
columns: FormColumn[];
|
|
7
|
+
formData: Record<string, any>;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
locale: string;
|
|
10
|
+
private _expanded;
|
|
11
|
+
static styles: import('lit').CSSResult;
|
|
12
|
+
connectedCallback(): void;
|
|
13
|
+
private _toggleExpanded;
|
|
14
|
+
private _getFieldForColumn;
|
|
15
|
+
private _getFieldValue;
|
|
16
|
+
private _handleFieldChange;
|
|
17
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=concept-tree.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"concept-tree.d.ts","sourceRoot":"","sources":["../../src/core/concept-tree.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAa,MAAM,iBAAiB,CAAC;AACrE,OAAO,cAAc,CAAC;AAEtB,qBACa,kBAAmB,SAAQ,UAAU;IACpB,OAAO,EAAG,WAAW,CAAC;IACvB,OAAO,EAAE,UAAU,EAAE,CAAM;IAC1B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAClC,QAAQ,UAAS;IAClB,MAAM,SAAW;IAEpC,OAAO,CAAC,SAAS,CAAQ;IAElC,MAAM,CAAC,MAAM,0BA+FX;IAEF,iBAAiB;IAKjB,OAAO,CAAC,eAAe;IAYvB,OAAO,CAAC,kBAAkB;IAI1B,OAAO,CAAC,cAAc;IAItB,OAAO,CAAC,kBAAkB;IAS1B,MAAM;CA+DP"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { XBRLFormSchema, FormData, FormState, ComponentConfig } from '../schema/types';
|
|
3
|
+
import { XBRLFormInput } from '../schema/xbrl-types';
|
|
4
|
+
|
|
5
|
+
export declare class JupiterDynamicForm extends LitElement {
|
|
6
|
+
schema?: XBRLFormSchema;
|
|
7
|
+
xbrlInput?: XBRLFormInput;
|
|
8
|
+
config: ComponentConfig;
|
|
9
|
+
initialData: FormData;
|
|
10
|
+
disabled: boolean;
|
|
11
|
+
readonly: boolean;
|
|
12
|
+
private _formData;
|
|
13
|
+
private _columns;
|
|
14
|
+
private _errors;
|
|
15
|
+
private _touched;
|
|
16
|
+
private _dirty;
|
|
17
|
+
private _valid;
|
|
18
|
+
private _submitted;
|
|
19
|
+
private _currentSchema?;
|
|
20
|
+
static styles: import('lit').CSSResult;
|
|
21
|
+
connectedCallback(): void;
|
|
22
|
+
updated(changedProperties: Map<string, any>): void;
|
|
23
|
+
private _initializeForm;
|
|
24
|
+
private _getDefaultSchema;
|
|
25
|
+
private _getDefaultColumns;
|
|
26
|
+
private _validateForm;
|
|
27
|
+
private _handleFieldChange;
|
|
28
|
+
private _handleSectionExpand;
|
|
29
|
+
private _handleConceptExpand;
|
|
30
|
+
private _handleColumnRemove;
|
|
31
|
+
private _addColumn;
|
|
32
|
+
private _handleSubmit;
|
|
33
|
+
private _handleReset;
|
|
34
|
+
private _getFormState;
|
|
35
|
+
getData(): FormData;
|
|
36
|
+
setData(data: FormData): void;
|
|
37
|
+
validate(): boolean;
|
|
38
|
+
reset(): void;
|
|
39
|
+
getState(): FormState;
|
|
40
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=dynamic-form.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"dynamic-form.d.ts","sourceRoot":"","sources":["../../src/core/dynamic-form.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,OAAO,EACL,cAAc,EACd,QAAQ,EAGR,SAAS,EACT,eAAe,EAChB,MAAM,iBAAiB,CAAC;AACzB,OAAO,EAAE,aAAa,EAAE,MAAM,sBAAsB,CAAC;AAGrD,OAAO,gBAAgB,CAAC;AAExB,qBACa,kBAAmB,SAAQ,UAAU;IACpB,MAAM,CAAC,EAAE,cAAc,CAAC;IACxB,SAAS,CAAC,EAAE,aAAa,CAAC;IAC1B,MAAM,EAAE,eAAe,CAAM;IAC7B,WAAW,EAAE,QAAQ,CAAM;IAC1B,QAAQ,UAAS;IACjB,QAAQ,UAAS;IAErC,OAAO,CAAC,SAAS,CAAgB;IACjC,OAAO,CAAC,QAAQ,CAAoB;IACpC,OAAO,CAAC,OAAO,CAAyB;IACxC,OAAO,CAAC,QAAQ,CAAqB;IACrC,OAAO,CAAC,MAAM,CAAS;IACvB,OAAO,CAAC,MAAM,CAAQ;IACtB,OAAO,CAAC,UAAU,CAAS;IAC3B,OAAO,CAAC,cAAc,CAAC,CAAiB;IAEjD,MAAM,CAAC,MAAM,0BAqJX;IAEF,iBAAiB;IAKjB,OAAO,CAAC,iBAAiB,EAAE,GAAG,CAAC,MAAM,EAAE,GAAG,CAAC;IAM3C,OAAO,CAAC,eAAe;IA0CvB,OAAO,CAAC,iBAAiB;IAUzB,OAAO,CAAC,kBAAkB;IAa1B,OAAO,CAAC,aAAa;IA6BrB,OAAO,CAAC,kBAAkB;IA2B1B,OAAO,CAAC,oBAAoB;IAO5B,OAAO,CAAC,oBAAoB;IAO5B,OAAO,CAAC,mBAAmB;IAuB3B,OAAO,CAAC,UAAU;IA2BlB,OAAO,CAAC,aAAa;IAcrB,OAAO,CAAC,YAAY;IAcpB,OAAO,CAAC,aAAa;IAYd,OAAO,IAAI,QAAQ;IAInB,OAAO,CAAC,IAAI,EAAE,QAAQ;IAOtB,QAAQ,IAAI,OAAO;IAKnB,KAAK;IAIL,QAAQ,IAAI,SAAS;IAI5B,MAAM;CA8FP"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { LitElement, PropertyValues } from 'lit';
|
|
2
|
+
import { FormField } from '../schema/types';
|
|
3
|
+
|
|
4
|
+
export declare class JupiterFormField extends LitElement {
|
|
5
|
+
field: FormField;
|
|
6
|
+
conceptId: string;
|
|
7
|
+
columnId: string;
|
|
8
|
+
value: any;
|
|
9
|
+
disabled: boolean;
|
|
10
|
+
locale: string;
|
|
11
|
+
private _errors;
|
|
12
|
+
private _touched;
|
|
13
|
+
static styles: import('lit').CSSResult;
|
|
14
|
+
protected willUpdate(changedProperties: PropertyValues): void;
|
|
15
|
+
private _validateField;
|
|
16
|
+
private _handleInput;
|
|
17
|
+
private _handleFocus;
|
|
18
|
+
private _handleBlur;
|
|
19
|
+
private _renderInput;
|
|
20
|
+
private _getInputType;
|
|
21
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
22
|
+
}
|
|
23
|
+
//# sourceMappingURL=form-field.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-field.d.ts","sourceRoot":"","sources":["../../src/core/form-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,cAAc,EAAE,MAAM,KAAK,CAAC;AAE5D,OAAO,EAAE,SAAS,EAAmB,MAAM,iBAAiB,CAAC;AAG7D,qBACa,gBAAiB,SAAQ,UAAU;IAClB,KAAK,EAAG,SAAS,CAAC;IAClB,SAAS,EAAG,MAAM,CAAC;IACnB,QAAQ,EAAG,MAAM,CAAC;IAClC,KAAK,EAAE,GAAG,CAAQ;IACD,QAAQ,UAAS;IAClB,MAAM,SAAW;IAEpC,OAAO,CAAC,OAAO,CAAyB;IACxC,OAAO,CAAC,QAAQ,CAAS;IAElC,MAAM,CAAC,MAAM,0BAqGX;IAEF,SAAS,CAAC,UAAU,CAAC,iBAAiB,EAAE,cAAc;IAMtD,OAAO,CAAC,cAAc;IAatB,OAAO,CAAC,YAAY;IA0BpB,OAAO,CAAC,YAAY;IAWpB,OAAO,CAAC,WAAW;IAYnB,OAAO,CAAC,YAAY;IA0EpB,OAAO,CAAC,aAAa;IAsBrB,MAAM;CAyBP"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { LitElement } from 'lit';
|
|
2
|
+
import { FormSection, FormColumn } from '../schema/types';
|
|
3
|
+
|
|
4
|
+
export declare class JupiterFormSection extends LitElement {
|
|
5
|
+
section: FormSection;
|
|
6
|
+
columns: FormColumn[];
|
|
7
|
+
formData: Record<string, any>;
|
|
8
|
+
disabled: boolean;
|
|
9
|
+
collapsible: boolean;
|
|
10
|
+
locale: string;
|
|
11
|
+
private _expanded;
|
|
12
|
+
static styles: import('lit').CSSResult;
|
|
13
|
+
connectedCallback(): void;
|
|
14
|
+
private _toggleExpanded;
|
|
15
|
+
private _handleRemoveColumn;
|
|
16
|
+
private _handleFieldChange;
|
|
17
|
+
private _handleConceptExpand;
|
|
18
|
+
render(): import('lit-html').TemplateResult<1>;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=form-section.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"form-section.d.ts","sourceRoot":"","sources":["../../src/core/form-section.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAa,MAAM,KAAK,CAAC;AAE5C,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC1D,OAAO,gBAAgB,CAAC;AAExB,qBACa,kBAAmB,SAAQ,UAAU;IACpB,OAAO,EAAG,WAAW,CAAC;IACvB,OAAO,EAAE,UAAU,EAAE,CAAM;IAC1B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAM;IAClC,QAAQ,UAAS;IACjB,WAAW,UAAQ;IACpB,MAAM,SAAW;IAEpC,OAAO,CAAC,SAAS,CAAQ;IAElC,MAAM,CAAC,MAAM,0BA+IX;IAEF,iBAAiB;IAKjB,OAAO,CAAC,eAAe;IAcvB,OAAO,CAAC,mBAAmB;IAO3B,OAAO,CAAC,kBAAkB;IAQ1B,OAAO,CAAC,oBAAoB;IAQ5B,MAAM;CAgFP"}
|
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from './core/dynamic-form';
|
|
2
|
+
export * from './core/form-section';
|
|
3
|
+
export * from './core/concept-tree';
|
|
4
|
+
export * from './core/form-field';
|
|
5
|
+
export * from './schema/types';
|
|
6
|
+
export * from './utils/validation';
|
|
7
|
+
export declare const version = "1.0.0";
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,qBAAqB,CAAC;AACpC,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AAGnC,OAAO,qBAAqB,CAAC;AAC7B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,qBAAqB,CAAC;AAC7B,OAAO,mBAAmB,CAAC;AAG3B,eAAO,MAAM,OAAO,UAAU,CAAC"}
|