robobyte-front-builder 1.0.25 → 1.0.27
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/INTEGRATION.md +94 -10
- package/LICENSE +65 -0
- package/README.md +149 -21
- package/docs/ReportViewer.md +581 -0
- package/docs/fetchReportData.md +379 -0
- package/docs/printLayout.md +405 -0
- package/package.json +29 -1
- package/src/lib/agGridTheme.js +58 -0
- package/src/lib/agGridThemeContext.jsx +42 -0
- package/src/lib/index.js +7 -0
- package/src/lib/providers/RoboByteFrontBuilderProvider.jsx +14 -0
- package/src/views/builder/viewer/renderers/DataGridRenderer.jsx +4 -4
- package/src/views/genericTable/SGrid.js +5 -5
- package/src/views/genericTable/TAGGrid.js +3 -5
- package/src/views/rolePermissions/UpdateReportPermissionDialog.js +4 -0
- package/training/00-index.md +168 -0
- package/training/01-input.md +144 -0
- package/training/02-checkbox.md +107 -0
- package/training/03-dropdown.md +135 -0
- package/training/04-datepicker.md +139 -0
- package/training/05-radio.md +123 -0
- package/training/06-number.md +133 -0
- package/training/07-textarea.md +114 -0
- package/training/08-richtext.md +112 -0
- package/training/09-tag.md +110 -0
- package/training/10-time.md +107 -0
- package/training/11-toggle.md +108 -0
- package/training/12-signature.md +107 -0
- package/training/13-autocomplete.md +134 -0
- package/training/14-button.md +168 -0
- package/training/15-label.md +138 -0
- package/training/16-header.md +128 -0
- package/training/17-divider.md +96 -0
- package/training/18-image.md +105 -0
- package/training/19-link.md +108 -0
- package/training/20-banner.md +122 -0
- package/training/21-progress-circle.md +101 -0
- package/training/22-progress-line.md +93 -0
- package/training/23-menu.md +139 -0
- package/training/24-popover.md +114 -0
- package/training/25-layout.md +116 -0
- package/training/26-layout-cell.md +143 -0
- package/training/27-card.md +87 -0
- package/training/28-wizard.md +126 -0
- package/training/29-wizard-step.md +92 -0
- package/training/30-repeater.md +123 -0
- package/training/31-dialog.md +131 -0
- package/training/32-breadcrumb.md +121 -0
- package/training/33-dataGrid.md +129 -0
- package/training/34-dataTableViewer.md +115 -0
- package/training/35-reportViewer.md +673 -0
- package/training/36-viewRenderer.md +110 -0
- package/training/37-treeView.md +170 -0
- package/training/38-kpi-metric.md +148 -0
- package/training/39-kpi-trend.md +105 -0
- package/training/40-kpi-badge.md +112 -0
- package/training/41-kpi-statusDot.md +118 -0
- package/training/42-kpi-iconBox.md +114 -0
- package/training/43-kpi-gauge.md +143 -0
- package/training/44-kpi-bulletChart.md +126 -0
- package/training/45-kpi-colorScale.md +143 -0
- package/training/46-kpi-rating.md +125 -0
- package/training/47-kpi-countdown.md +151 -0
- package/training/48-fetchReportData.md +276 -0
- package/training/49-printLayout.md +215 -0
- package/training/examples/01-login-form.json +176 -0
- package/training/examples/02-contact-form.json +141 -0
- package/training/examples/03-kpi-cards-row.json +123 -0
- package/training/examples/04-settings-toggles.json +153 -0
- package/training/examples/05-user-profile-card.json +136 -0
- package/training/examples/06-date-range-filter.json +108 -0
- package/training/examples/07-search-bar-results.json +130 -0
- package/training/examples/08-notification-settings.json +131 -0
- package/training/examples/09-employee-profile-form.json +259 -0
- package/training/examples/10-invoice-form.json +241 -0
- package/training/examples/11-dashboard-overview.json +251 -0
- package/training/examples/12-registration-wizard.json +154 -0
- package/training/examples/13-product-catalog.json +168 -0
- package/training/examples/14-data-table-with-filters.json +180 -0
- package/training/examples/15-tabbed-profile.json +92 -0
- package/training/examples/16-kpi-full-row.json +203 -0
- package/training/examples/17-tree-detail-view.json +139 -0
- package/training/examples/18-employee-management.json +233 -0
- package/training/examples/19-sales-dashboard.json +272 -0
- package/training/examples/20-checkout-wizard.json +225 -0
- package/training/examples/21-analytics-page.json +222 -0
- package/training/examples/22-hr-onboarding.json +222 -0
- package/training/examples/23-document-browser.json +241 -0
- package/training/examples/24-order-management.json +290 -0
- package/training/examples/25-crm-contact-page.json +272 -0
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "HR onboarding wizard: 4 steps — personal, job, documents, and e-signature with richtext policy",
|
|
3
|
+
"components_used": ["layout", "layout-cell", "wizard", "wizard-step", "header", "label", "input", "dropdown", "datepicker", "richtext", "signature", "checkbox", "tag", "banner", "divider"],
|
|
4
|
+
"root": {
|
|
5
|
+
"type": "layout",
|
|
6
|
+
"props": { "cols": 1, "rowGap": 0 },
|
|
7
|
+
"children": [
|
|
8
|
+
{
|
|
9
|
+
"type": "layout-cell",
|
|
10
|
+
"props": {},
|
|
11
|
+
"style": { "padding": "0 0 20px 0" },
|
|
12
|
+
"children": [
|
|
13
|
+
{ "type": "header", "props": { "text": "New Employee Onboarding", "variant": "h4", "component": "h1", "color": "textPrimary", "prefix": "PersonAddOutlined", "prefixColor": "primary.main", "iconGap": "12px" } },
|
|
14
|
+
{ "type": "label", "props": { "text": "Complete all steps to finish your onboarding. This typically takes 15–20 minutes.", "variant": "body2", "color": "textSecondary" } }
|
|
15
|
+
]
|
|
16
|
+
},
|
|
17
|
+
{
|
|
18
|
+
"type": "layout-cell",
|
|
19
|
+
"props": {},
|
|
20
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "16px", "boxShadow": "0 4px 20px rgba(0,0,0,0.10)", "overflow": "hidden" },
|
|
21
|
+
"children": [
|
|
22
|
+
{
|
|
23
|
+
"type": "wizard",
|
|
24
|
+
"props": {
|
|
25
|
+
"key": "onboarding",
|
|
26
|
+
"variant": "linear",
|
|
27
|
+
"orientation": "horizontal",
|
|
28
|
+
"showStepNumbers": true,
|
|
29
|
+
"showProgress": true,
|
|
30
|
+
"completeLabel": "Submit Onboarding",
|
|
31
|
+
"nextLabel": "Next Step",
|
|
32
|
+
"backLabel": "Previous"
|
|
33
|
+
},
|
|
34
|
+
"children": [
|
|
35
|
+
{
|
|
36
|
+
"type": "wizard-step",
|
|
37
|
+
"props": { "label": "Personal Details", "description": "Your basic information" },
|
|
38
|
+
"children": [
|
|
39
|
+
{
|
|
40
|
+
"type": "layout",
|
|
41
|
+
"props": { "cols": 2, "gap": 20, "rowGap": 20 },
|
|
42
|
+
"children": [
|
|
43
|
+
{ "type": "layout-cell", "props": { "colSpan": 2 }, "style": { "padding": "0 0 8px 0" }, "children": [
|
|
44
|
+
{ "type": "banner", "props": { "message": "Welcome! Please fill in your personal details accurately as they will appear in official records.", "severity": "info", "variant": "outlined", "open": true, "dismissible": false } }
|
|
45
|
+
]},
|
|
46
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
47
|
+
{ "type": "input", "props": { "key": "legalFirstName", "label": "Legal First Name", "required": true, "helperText": "As it appears on your ID" }, "style": { "width": "100%" } }
|
|
48
|
+
]},
|
|
49
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
50
|
+
{ "type": "input", "props": { "key": "legalLastName", "label": "Legal Last Name", "required": true }, "style": { "width": "100%" } }
|
|
51
|
+
]},
|
|
52
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
53
|
+
{ "type": "input", "props": { "key": "preferredName", "label": "Preferred Name (optional)", "placeholder": "What should we call you?" }, "style": { "width": "100%" } }
|
|
54
|
+
]},
|
|
55
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
56
|
+
{ "type": "datepicker", "props": { "key": "dob", "label": "Date of Birth", "required": true, "fullWidth": true, "format": "MM/DD/YYYY" } }
|
|
57
|
+
]},
|
|
58
|
+
{ "type": "layout-cell", "props": { "colSpan": 2 }, "style": {}, "children": [
|
|
59
|
+
{ "type": "input", "props": { "key": "personalEmail", "label": "Personal Email", "required": true, "prefix": "EmailOutlined", "helperText": "Different from your work email" }, "style": { "width": "100%" } }
|
|
60
|
+
]},
|
|
61
|
+
{ "type": "layout-cell", "props": { "colSpan": 2 }, "style": {}, "children": [
|
|
62
|
+
{ "type": "input", "props": { "key": "phone", "label": "Mobile Phone", "required": true, "prefix": "PhoneOutlined" }, "style": { "width": "100%" } }
|
|
63
|
+
]},
|
|
64
|
+
{ "type": "layout-cell", "props": { "colSpan": 2 }, "style": {}, "children": [
|
|
65
|
+
{ "type": "input", "props": { "key": "emergencyContact", "label": "Emergency Contact Name", "required": true, "prefix": "LocalHospitalOutlined" }, "style": { "width": "100%" } }
|
|
66
|
+
]},
|
|
67
|
+
{ "type": "layout-cell", "props": { "colSpan": 2 }, "style": {}, "children": [
|
|
68
|
+
{ "type": "input", "props": { "key": "emergencyPhone", "label": "Emergency Contact Phone", "required": true, "prefix": "PhoneOutlined" }, "style": { "width": "100%" } }
|
|
69
|
+
]}
|
|
70
|
+
]
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
{
|
|
75
|
+
"type": "wizard-step",
|
|
76
|
+
"props": { "label": "Job Setup", "description": "Your role and preferences" },
|
|
77
|
+
"children": [
|
|
78
|
+
{
|
|
79
|
+
"type": "layout",
|
|
80
|
+
"props": { "cols": 2, "gap": 20, "rowGap": 20 },
|
|
81
|
+
"children": [
|
|
82
|
+
{ "type": "layout-cell", "props": { "colSpan": 2 }, "style": {}, "children": [
|
|
83
|
+
{ "type": "header", "props": { "text": "Your Role", "variant": "h6", "component": "h2", "color": "textPrimary" } }
|
|
84
|
+
]},
|
|
85
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
86
|
+
{ "type": "label", "props": { "text": "Department", "variant": "body2", "color": "textSecondary" } },
|
|
87
|
+
{ "type": "label", "props": { "text": "data.employee.department", "variant": "body1", "color": "textPrimary", "fontWeight": "600" } }
|
|
88
|
+
]},
|
|
89
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
90
|
+
{ "type": "label", "props": { "text": "Job Title", "variant": "body2", "color": "textSecondary" } },
|
|
91
|
+
{ "type": "label", "props": { "text": "data.employee.title", "variant": "body1", "color": "textPrimary", "fontWeight": "600" } }
|
|
92
|
+
]},
|
|
93
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
94
|
+
{ "type": "label", "props": { "text": "Start Date", "variant": "body2", "color": "textSecondary" } },
|
|
95
|
+
{ "type": "label", "props": { "text": "data.employee.startDate", "variant": "body1", "color": "textPrimary", "fontWeight": "600" } }
|
|
96
|
+
]},
|
|
97
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
98
|
+
{ "type": "label", "props": { "text": "Manager", "variant": "body2", "color": "textSecondary" } },
|
|
99
|
+
{ "type": "label", "props": { "text": "data.employee.managerName", "variant": "body1", "color": "textPrimary", "fontWeight": "600" } }
|
|
100
|
+
]},
|
|
101
|
+
{ "type": "layout-cell", "props": { "colSpan": 2 }, "style": {}, "children": [
|
|
102
|
+
{ "type": "divider", "props": { "orientation": "horizontal" } }
|
|
103
|
+
]},
|
|
104
|
+
{ "type": "layout-cell", "props": { "colSpan": 2 }, "style": {}, "children": [
|
|
105
|
+
{ "type": "header", "props": { "text": "Work Preferences", "variant": "h6", "component": "h2", "color": "textPrimary" } }
|
|
106
|
+
]},
|
|
107
|
+
{ "type": "layout-cell", "props": { "colSpan": 2 }, "style": {}, "children": [
|
|
108
|
+
{
|
|
109
|
+
"type": "dropdown",
|
|
110
|
+
"props": {
|
|
111
|
+
"key": "workSchedule",
|
|
112
|
+
"label": "Preferred Work Schedule",
|
|
113
|
+
"fullWidth": true,
|
|
114
|
+
"options": [
|
|
115
|
+
{ "label": "Standard 9-5", "value": "standard" },
|
|
116
|
+
{ "label": "Early Bird (7am-3pm)", "value": "early" },
|
|
117
|
+
{ "label": "Night Owl (11am-7pm)", "value": "late" },
|
|
118
|
+
{ "label": "Flexible", "value": "flexible" }
|
|
119
|
+
]
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
]},
|
|
123
|
+
{ "type": "layout-cell", "props": { "colSpan": 2 }, "style": {}, "children": [
|
|
124
|
+
{
|
|
125
|
+
"type": "dropdown",
|
|
126
|
+
"props": {
|
|
127
|
+
"key": "workLocation",
|
|
128
|
+
"label": "Work Location",
|
|
129
|
+
"required": true,
|
|
130
|
+
"fullWidth": true,
|
|
131
|
+
"options": [
|
|
132
|
+
{ "label": "Office (Full-Time)", "value": "office" },
|
|
133
|
+
{ "label": "Remote (Full-Time)", "value": "remote" },
|
|
134
|
+
{ "label": "Hybrid (2-3 days office)", "value": "hybrid" }
|
|
135
|
+
]
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
]},
|
|
139
|
+
{ "type": "layout-cell", "props": { "colSpan": 2 }, "style": {}, "children": [
|
|
140
|
+
{ "type": "tag", "props": { "key": "skills", "label": "Your Skills / Expertise", "fullWidth": true, "placeholder": "Type skills and press Enter..." } }
|
|
141
|
+
]}
|
|
142
|
+
]
|
|
143
|
+
}
|
|
144
|
+
]
|
|
145
|
+
},
|
|
146
|
+
{
|
|
147
|
+
"type": "wizard-step",
|
|
148
|
+
"props": { "label": "Required Reading", "description": "Company policies" },
|
|
149
|
+
"children": [
|
|
150
|
+
{
|
|
151
|
+
"type": "layout",
|
|
152
|
+
"props": { "cols": 1, "rowGap": 16 },
|
|
153
|
+
"children": [
|
|
154
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
155
|
+
{ "type": "header", "props": { "text": "Company Policies", "variant": "h5", "component": "h2", "color": "textPrimary" } },
|
|
156
|
+
{ "type": "label", "props": { "text": "Please review the following policies carefully before proceeding.", "variant": "body2", "color": "textSecondary" } }
|
|
157
|
+
]},
|
|
158
|
+
{ "type": "layout-cell", "props": {}, "style": { "backgroundColor": "#f8f9fa", "borderRadius": "8px", "padding": "16px", "border": "1px solid #e0e0e0", "maxHeight": "300px", "overflow": "auto" }, "children": [
|
|
159
|
+
{ "type": "richtext", "props": { "key": "policyNotes", "value": "data.companyPolicies", "readOnly": true, "toolbar": false, "minHeight": "250px" } }
|
|
160
|
+
]},
|
|
161
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
162
|
+
{ "type": "checkbox", "props": { "key": "readCodeOfConduct", "label": "I have read and understood the Code of Conduct", "labelPosition": "right", "required": true } }
|
|
163
|
+
]},
|
|
164
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
165
|
+
{ "type": "checkbox", "props": { "key": "readPrivacyPolicy", "label": "I have read and understood the Privacy & Data Policy", "labelPosition": "right", "required": true } }
|
|
166
|
+
]},
|
|
167
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
168
|
+
{ "type": "checkbox", "props": { "key": "readSecurityPolicy", "label": "I have read and understood the IT Security Policy", "labelPosition": "right", "required": true } }
|
|
169
|
+
]}
|
|
170
|
+
]
|
|
171
|
+
}
|
|
172
|
+
]
|
|
173
|
+
},
|
|
174
|
+
{
|
|
175
|
+
"type": "wizard-step",
|
|
176
|
+
"props": { "label": "Sign & Submit", "description": "Final confirmation" },
|
|
177
|
+
"children": [
|
|
178
|
+
{
|
|
179
|
+
"type": "layout",
|
|
180
|
+
"props": { "cols": 1, "rowGap": 20 },
|
|
181
|
+
"children": [
|
|
182
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
183
|
+
{ "type": "header", "props": { "text": "Electronic Signature", "variant": "h5", "component": "h2", "color": "textPrimary" } },
|
|
184
|
+
{ "type": "label", "props": { "text": "By signing below, you confirm that all information provided is accurate and that you agree to all company policies.", "variant": "body2", "color": "textSecondary" } }
|
|
185
|
+
]},
|
|
186
|
+
{ "type": "layout-cell", "props": {}, "style": { "backgroundColor": "#f8f9fa", "borderRadius": "8px", "padding": "16px" }, "children": [
|
|
187
|
+
{ "type": "label", "props": { "text": "Legal Name: data.employee.fullName", "variant": "body1", "color": "textPrimary" } },
|
|
188
|
+
{ "type": "label", "props": { "text": "Employee ID: data.employee.id", "variant": "body2", "color": "textSecondary" } },
|
|
189
|
+
{ "type": "label", "props": { "text": "Date: data.today", "variant": "body2", "color": "textSecondary" } }
|
|
190
|
+
]},
|
|
191
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
192
|
+
{ "type": "signature", "props": { "key": "employeeSignature", "label": "Signature", "height": "150px", "width": "100%", "clearable": true, "required": true } }
|
|
193
|
+
]},
|
|
194
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
195
|
+
{ "type": "divider", "props": { "orientation": "horizontal", "text": "HR Use Only" } }
|
|
196
|
+
]},
|
|
197
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
198
|
+
{ "type": "signature", "props": { "key": "hrSignature", "label": "HR Representative Signature", "height": "120px", "width": "100%", "clearable": true } }
|
|
199
|
+
]},
|
|
200
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
201
|
+
{ "type": "input", "props": { "key": "hrRepName", "label": "HR Representative Name" }, "style": { "width": "300px" } }
|
|
202
|
+
]}
|
|
203
|
+
]
|
|
204
|
+
}
|
|
205
|
+
]
|
|
206
|
+
}
|
|
207
|
+
]
|
|
208
|
+
}
|
|
209
|
+
]
|
|
210
|
+
}
|
|
211
|
+
]
|
|
212
|
+
},
|
|
213
|
+
"dialogs": [],
|
|
214
|
+
"actions": [
|
|
215
|
+
{
|
|
216
|
+
"key": "onOnboardingComplete",
|
|
217
|
+
"type": "custom",
|
|
218
|
+
"code": "submitOnboarding({ personalInfo: { firstName: form.legalFirstName, lastName: form.legalLastName, dob: form.dob, email: form.personalEmail }, jobPrefs: { schedule: form.workSchedule, location: form.workLocation }, signature: form.employeeSignature })"
|
|
219
|
+
}
|
|
220
|
+
],
|
|
221
|
+
"timers": []
|
|
222
|
+
}
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
{
|
|
2
|
+
"description": "Document browser with tree navigation, breadcrumb trail, data grid, and file preview dialog",
|
|
3
|
+
"components_used": ["layout", "layout-cell", "header", "label", "input", "button", "treeView", "breadcrumb", "dataGrid", "dialog", "kpi-metric", "kpi-badge", "banner"],
|
|
4
|
+
"root": {
|
|
5
|
+
"type": "layout",
|
|
6
|
+
"props": { "cols": 1, "rowGap": 16 },
|
|
7
|
+
"children": [
|
|
8
|
+
{
|
|
9
|
+
"type": "layout-cell",
|
|
10
|
+
"props": {},
|
|
11
|
+
"style": { "justifyContent": "space-between", "alignItems": "center" },
|
|
12
|
+
"children": [
|
|
13
|
+
{ "type": "header", "props": { "text": "Document Library", "variant": "h4", "component": "h1", "color": "textPrimary" } },
|
|
14
|
+
{
|
|
15
|
+
"type": "layout",
|
|
16
|
+
"props": { "cols": 1, "rowGap": 0 },
|
|
17
|
+
"children": [
|
|
18
|
+
{ "type": "layout-cell", "props": {}, "style": { "gap": "10px" }, "children": [
|
|
19
|
+
{ "type": "input", "props": { "key": "docSearch", "label": "Search documents...", "prefix": "SearchOutlined", "size": "small" }, "style": { "width": "240px" } },
|
|
20
|
+
{ "type": "button", "props": { "label": "Upload", "variant": "contained", "color": "primary", "size": "small", "prefix": "UploadOutlined" }, "actions": { "onClick": { "type": "custom", "code": "openUploadDialog()" } } }
|
|
21
|
+
]}
|
|
22
|
+
]
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
"type": "layout-cell",
|
|
28
|
+
"props": {},
|
|
29
|
+
"style": {},
|
|
30
|
+
"children": [
|
|
31
|
+
{
|
|
32
|
+
"type": "banner",
|
|
33
|
+
"props": { "key": "docBanner", "message": "data.bannerMessage", "severity": "data.bannerSeverity", "open": "data.showBanner", "dismissible": true },
|
|
34
|
+
"actions": { "onClose": { "type": "custom", "code": "setData({ showBanner: false })" } }
|
|
35
|
+
}
|
|
36
|
+
]
|
|
37
|
+
},
|
|
38
|
+
{
|
|
39
|
+
"type": "layout-cell",
|
|
40
|
+
"props": {},
|
|
41
|
+
"style": {},
|
|
42
|
+
"children": [
|
|
43
|
+
{
|
|
44
|
+
"type": "layout",
|
|
45
|
+
"props": { "cols": 4, "gap": 0 },
|
|
46
|
+
"children": [
|
|
47
|
+
{
|
|
48
|
+
"type": "layout-cell",
|
|
49
|
+
"props": {},
|
|
50
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "12px 0 0 12px", "boxShadow": "0 2px 8px rgba(0,0,0,0.08)", "borderRight": "1px solid #e8e8e8", "overflow": "hidden" },
|
|
51
|
+
"children": [
|
|
52
|
+
{
|
|
53
|
+
"type": "layout",
|
|
54
|
+
"props": { "cols": 1, "rowGap": 0 },
|
|
55
|
+
"children": [
|
|
56
|
+
{
|
|
57
|
+
"type": "layout-cell",
|
|
58
|
+
"props": {},
|
|
59
|
+
"style": { "padding": "12px 16px", "backgroundColor": "#fafafa", "borderBottom": "1px solid #e8e8e8" },
|
|
60
|
+
"children": [
|
|
61
|
+
{ "type": "label", "props": { "text": "Folders", "variant": "overline", "color": "textSecondary" } }
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"type": "layout-cell",
|
|
66
|
+
"props": {},
|
|
67
|
+
"style": { "padding": "8px" },
|
|
68
|
+
"children": [
|
|
69
|
+
{
|
|
70
|
+
"type": "treeView",
|
|
71
|
+
"props": {
|
|
72
|
+
"dataKey": "data.folderTree",
|
|
73
|
+
"idField": "id",
|
|
74
|
+
"labelField": "name",
|
|
75
|
+
"childrenField": "children",
|
|
76
|
+
"selectedKey": "data.selectedFolderId",
|
|
77
|
+
"selectable": true,
|
|
78
|
+
"defaultIcon": "FolderOutlined",
|
|
79
|
+
"leafIcon": "FolderOpenOutlined",
|
|
80
|
+
"showCount": true,
|
|
81
|
+
"dense": true,
|
|
82
|
+
"showLines": false,
|
|
83
|
+
"height": "520px",
|
|
84
|
+
"selectedBg": "#e3f2fd",
|
|
85
|
+
"selectedColor": "#1565c0"
|
|
86
|
+
},
|
|
87
|
+
"actions": {
|
|
88
|
+
"onSelectCode": "setData({ selectedFolderId: selectedNode.id, currentPath: selectedNode.path, breadcrumbs: selectedNode.breadcrumbs })"
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
]
|
|
92
|
+
}
|
|
93
|
+
]
|
|
94
|
+
}
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
"type": "layout-cell",
|
|
99
|
+
"props": { "colSpan": 3 },
|
|
100
|
+
"style": { "backgroundColor": "#f8f9fa", "borderRadius": "0 12px 12px 0", "boxShadow": "0 2px 8px rgba(0,0,0,0.08)", "overflow": "hidden" },
|
|
101
|
+
"children": [
|
|
102
|
+
{
|
|
103
|
+
"type": "layout",
|
|
104
|
+
"props": { "cols": 1, "rowGap": 0 },
|
|
105
|
+
"children": [
|
|
106
|
+
{
|
|
107
|
+
"type": "layout-cell",
|
|
108
|
+
"props": {},
|
|
109
|
+
"style": { "padding": "12px 20px", "backgroundColor": "#ffffff", "borderBottom": "1px solid #e8e8e8", "justifyContent": "space-between", "alignItems": "center" },
|
|
110
|
+
"children": [
|
|
111
|
+
{
|
|
112
|
+
"type": "breadcrumb",
|
|
113
|
+
"props": {
|
|
114
|
+
"itemsKey": "data.breadcrumbs",
|
|
115
|
+
"labelField": "name",
|
|
116
|
+
"hrefField": "path",
|
|
117
|
+
"separator": "/",
|
|
118
|
+
"maxItems": 5,
|
|
119
|
+
"itemsAfterCollapse": 2
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
{ "type": "kpi-metric", "props": { "valueKey": "data.folderStats.fileCount", "label": "files", "format": "number", "fontSize": "13px", "fontWeight": "600", "align": "right", "labelPosition": "right", "labelFontSize": "12px", "labelColor": "text.secondary" } }
|
|
123
|
+
]
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
"type": "layout-cell",
|
|
127
|
+
"props": {},
|
|
128
|
+
"style": { "padding": "16px" },
|
|
129
|
+
"children": [
|
|
130
|
+
{
|
|
131
|
+
"type": "layout",
|
|
132
|
+
"props": { "cols": 3, "gap": 12 },
|
|
133
|
+
"children": [
|
|
134
|
+
{
|
|
135
|
+
"type": "layout-cell",
|
|
136
|
+
"props": {},
|
|
137
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "8px", "padding": "12px 16px", "boxShadow": "0 1px 3px rgba(0,0,0,0.06)" },
|
|
138
|
+
"children": [
|
|
139
|
+
{ "type": "kpi-metric", "props": { "valueKey": "data.folderStats.totalSize", "label": "Total Size", "format": "number", "decimals": 1, "suffix": " MB", "fontSize": "18px", "fontWeight": "600", "align": "left", "labelPosition": "above", "labelFontSize": "11px" } }
|
|
140
|
+
]
|
|
141
|
+
},
|
|
142
|
+
{
|
|
143
|
+
"type": "layout-cell",
|
|
144
|
+
"props": {},
|
|
145
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "8px", "padding": "12px 16px", "boxShadow": "0 1px 3px rgba(0,0,0,0.06)" },
|
|
146
|
+
"children": [
|
|
147
|
+
{ "type": "kpi-metric", "props": { "valueKey": "data.folderStats.subfolders", "label": "Subfolders", "format": "number", "fontSize": "18px", "fontWeight": "600", "align": "left", "labelPosition": "above", "labelFontSize": "11px" } }
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"type": "layout-cell",
|
|
152
|
+
"props": {},
|
|
153
|
+
"style": { "backgroundColor": "#ffffff", "borderRadius": "8px", "padding": "12px 16px", "boxShadow": "0 1px 3px rgba(0,0,0,0.06)" },
|
|
154
|
+
"children": [
|
|
155
|
+
{ "type": "kpi-badge", "props": { "valueKey": "data.folderStats.accessLevel", "variant": "soft", "size": "medium", "thresholds": [{ "operator": "==", "value": "public", "color": "success.main", "label": "Public" }, { "operator": "==", "value": "restricted", "color": "warning.main", "label": "Restricted" }, { "operator": "==", "value": "private", "color": "error.main", "label": "Private" }] } }
|
|
156
|
+
]
|
|
157
|
+
}
|
|
158
|
+
]
|
|
159
|
+
}
|
|
160
|
+
]
|
|
161
|
+
},
|
|
162
|
+
{
|
|
163
|
+
"type": "layout-cell",
|
|
164
|
+
"props": {},
|
|
165
|
+
"style": { "padding": "0 16px 16px 16px" },
|
|
166
|
+
"children": [
|
|
167
|
+
{
|
|
168
|
+
"type": "dataGrid",
|
|
169
|
+
"props": {
|
|
170
|
+
"key": "documentsGrid",
|
|
171
|
+
"dataKey": "data.documents",
|
|
172
|
+
"height": "360px",
|
|
173
|
+
"readOnly": true,
|
|
174
|
+
"showAddBtn": false,
|
|
175
|
+
"showDeleteCol": false,
|
|
176
|
+
"rowSelection": "single",
|
|
177
|
+
"columns": "data.documentColumns"
|
|
178
|
+
},
|
|
179
|
+
"actions": {
|
|
180
|
+
"onRowClick": { "type": "custom", "code": "setData({ previewDoc: clickedRow }); openDialog('docPreviewDialog')" }
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
]
|
|
184
|
+
}
|
|
185
|
+
]
|
|
186
|
+
}
|
|
187
|
+
]
|
|
188
|
+
}
|
|
189
|
+
]
|
|
190
|
+
}
|
|
191
|
+
]
|
|
192
|
+
}
|
|
193
|
+
]
|
|
194
|
+
},
|
|
195
|
+
"dialogs": [
|
|
196
|
+
{
|
|
197
|
+
"key": "docPreviewDialog",
|
|
198
|
+
"title": "data.previewDoc.name",
|
|
199
|
+
"width": "700px",
|
|
200
|
+
"children": [
|
|
201
|
+
{
|
|
202
|
+
"type": "layout",
|
|
203
|
+
"props": { "cols": 2, "gap": 20, "rowGap": 12 },
|
|
204
|
+
"children": [
|
|
205
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
206
|
+
{ "type": "label", "props": { "text": "File Name", "variant": "caption", "color": "textSecondary" } },
|
|
207
|
+
{ "type": "label", "props": { "text": "data.previewDoc.name", "variant": "body1", "color": "textPrimary", "fontWeight": "500" } }
|
|
208
|
+
]},
|
|
209
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
210
|
+
{ "type": "label", "props": { "text": "File Type", "variant": "caption", "color": "textSecondary" } },
|
|
211
|
+
{ "type": "label", "props": { "text": "data.previewDoc.type", "variant": "body1", "color": "textPrimary", "fontWeight": "500" } }
|
|
212
|
+
]},
|
|
213
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
214
|
+
{ "type": "label", "props": { "text": "Size", "variant": "caption", "color": "textSecondary" } },
|
|
215
|
+
{ "type": "label", "props": { "text": "data.previewDoc.sizeFormatted", "variant": "body1", "color": "textPrimary" } }
|
|
216
|
+
]},
|
|
217
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
218
|
+
{ "type": "label", "props": { "text": "Last Modified", "variant": "caption", "color": "textSecondary" } },
|
|
219
|
+
{ "type": "label", "props": { "text": "data.previewDoc.modifiedAt", "variant": "body1", "color": "textPrimary" } }
|
|
220
|
+
]},
|
|
221
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
222
|
+
{ "type": "label", "props": { "text": "Author", "variant": "caption", "color": "textSecondary" } },
|
|
223
|
+
{ "type": "label", "props": { "text": "data.previewDoc.author", "variant": "body1", "color": "textPrimary" } }
|
|
224
|
+
]},
|
|
225
|
+
{ "type": "layout-cell", "props": {}, "style": {}, "children": [
|
|
226
|
+
{ "type": "label", "props": { "text": "Version", "variant": "caption", "color": "textSecondary" } },
|
|
227
|
+
{ "type": "label", "props": { "text": "data.previewDoc.version", "variant": "body1", "color": "textPrimary" } }
|
|
228
|
+
]}
|
|
229
|
+
]
|
|
230
|
+
}
|
|
231
|
+
],
|
|
232
|
+
"actions": {
|
|
233
|
+
"onConfirm": { "type": "custom", "code": "downloadDocument(data.previewDoc.id)" },
|
|
234
|
+
"confirmLabel": "Download",
|
|
235
|
+
"cancelLabel": "Close"
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
],
|
|
239
|
+
"actions": [],
|
|
240
|
+
"timers": []
|
|
241
|
+
}
|