@objectql/starter-basic 1.6.1
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 +17 -0
- package/dist/demo.app.yml +4 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +18 -0
- package/dist/index.js.map +1 -0
- package/dist/main.menu.yml +30 -0
- package/dist/modules/kitchen-sink/kitchen_sink.data.yml +18 -0
- package/dist/modules/kitchen-sink/kitchen_sink.object.yml +154 -0
- package/dist/modules/projects/pages/create_project_wizard.page.yml +244 -0
- package/dist/modules/projects/pages/project_detail.page.yml +258 -0
- package/dist/modules/projects/project_approval.workflow.yml +51 -0
- package/dist/modules/projects/project_status.report.yml +39 -0
- package/dist/modules/projects/projects.action.d.ts +104 -0
- package/dist/modules/projects/projects.action.js +363 -0
- package/dist/modules/projects/projects.action.js.map +1 -0
- package/dist/modules/projects/projects.data.yml +13 -0
- package/dist/modules/projects/projects.form.yml +41 -0
- package/dist/modules/projects/projects.hook.d.ts +15 -0
- package/dist/modules/projects/projects.hook.js +302 -0
- package/dist/modules/projects/projects.hook.js.map +1 -0
- package/dist/modules/projects/projects.object.yml +148 -0
- package/dist/modules/projects/projects.permission.yml +141 -0
- package/dist/modules/projects/projects.validation.yml +37 -0
- package/dist/modules/projects/projects.view.yml +35 -0
- package/dist/modules/tasks/tasks.data.yml +23 -0
- package/dist/modules/tasks/tasks.object.yml +34 -0
- package/dist/modules/tasks/tasks.permission.yml +167 -0
- package/dist/pages/dashboard.page.yml +206 -0
- package/dist/pages/landing.page.yml +275 -0
- package/dist/types/index.d.ts +3 -0
- package/dist/types/index.js +20 -0
- package/dist/types/index.js.map +1 -0
- package/dist/types/kitchen_sink.d.ts +99 -0
- package/dist/types/kitchen_sink.js +3 -0
- package/dist/types/kitchen_sink.js.map +1 -0
- package/dist/types/projects.d.ts +47 -0
- package/dist/types/projects.js +3 -0
- package/dist/types/projects.js.map +1 -0
- package/dist/types/tasks.d.ts +31 -0
- package/dist/types/tasks.js +3 -0
- package/dist/types/tasks.js.map +1 -0
- package/package.json +38 -0
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
# Project Detail Page
|
|
2
|
+
# A page for viewing and editing project details with a clean layout
|
|
3
|
+
|
|
4
|
+
name: project_detail
|
|
5
|
+
label: Project Details
|
|
6
|
+
description: View and edit project information
|
|
7
|
+
icon: folder
|
|
8
|
+
layout: two_column
|
|
9
|
+
|
|
10
|
+
# Page permissions
|
|
11
|
+
permissions:
|
|
12
|
+
view: ['admin', 'manager', 'user']
|
|
13
|
+
edit: ['admin', 'manager']
|
|
14
|
+
|
|
15
|
+
# Sections-based layout for two-column design
|
|
16
|
+
sections:
|
|
17
|
+
# Left Column - Main Content
|
|
18
|
+
- id: main_content
|
|
19
|
+
type: content
|
|
20
|
+
style:
|
|
21
|
+
width: 70%
|
|
22
|
+
components:
|
|
23
|
+
# Project Information Form
|
|
24
|
+
- id: project_form
|
|
25
|
+
type: form
|
|
26
|
+
label: Project Information
|
|
27
|
+
data_source:
|
|
28
|
+
object: projects
|
|
29
|
+
query:
|
|
30
|
+
op: findOne
|
|
31
|
+
filter: [['_id', '=', '{{route.params.id}}']]
|
|
32
|
+
config:
|
|
33
|
+
mode: edit # view, edit, create
|
|
34
|
+
layout: vertical
|
|
35
|
+
fields:
|
|
36
|
+
- name: name
|
|
37
|
+
label: Project Name
|
|
38
|
+
type: text
|
|
39
|
+
required: true
|
|
40
|
+
placeholder: Enter project name
|
|
41
|
+
- name: description
|
|
42
|
+
label: Description
|
|
43
|
+
type: textarea
|
|
44
|
+
rows: 4
|
|
45
|
+
- name: status
|
|
46
|
+
label: Status
|
|
47
|
+
type: select
|
|
48
|
+
options:
|
|
49
|
+
- label: Planning
|
|
50
|
+
value: planning
|
|
51
|
+
- label: Active
|
|
52
|
+
value: active
|
|
53
|
+
- label: On Hold
|
|
54
|
+
value: on_hold
|
|
55
|
+
- label: Completed
|
|
56
|
+
value: completed
|
|
57
|
+
- name: owner
|
|
58
|
+
label: Project Manager
|
|
59
|
+
type: lookup
|
|
60
|
+
reference_to: users
|
|
61
|
+
display_field: name
|
|
62
|
+
- name: start_date
|
|
63
|
+
label: Start Date
|
|
64
|
+
type: date
|
|
65
|
+
- name: end_date
|
|
66
|
+
label: End Date
|
|
67
|
+
type: date
|
|
68
|
+
- name: budget
|
|
69
|
+
label: Budget
|
|
70
|
+
type: currency
|
|
71
|
+
currency: USD
|
|
72
|
+
field_layout:
|
|
73
|
+
- row: [name]
|
|
74
|
+
- row: [description]
|
|
75
|
+
- row: [status, owner]
|
|
76
|
+
- row: [start_date, end_date]
|
|
77
|
+
- row: [budget]
|
|
78
|
+
actions:
|
|
79
|
+
on_submit:
|
|
80
|
+
type: run_action
|
|
81
|
+
object: projects
|
|
82
|
+
action: update
|
|
83
|
+
success_message: Project updated successfully
|
|
84
|
+
on_cancel:
|
|
85
|
+
type: navigate
|
|
86
|
+
path: /projects
|
|
87
|
+
style:
|
|
88
|
+
margin: 0 0 24px 0
|
|
89
|
+
|
|
90
|
+
# Tasks List
|
|
91
|
+
- id: project_tasks
|
|
92
|
+
type: data_grid
|
|
93
|
+
label: Tasks
|
|
94
|
+
data_source:
|
|
95
|
+
object: tasks
|
|
96
|
+
filters:
|
|
97
|
+
- ['project', '=', '{{route.params.id}}']
|
|
98
|
+
fields: ['name', 'status', 'priority', 'assigned_to', 'due_date']
|
|
99
|
+
sort: [['created_at', 'desc']]
|
|
100
|
+
expand:
|
|
101
|
+
assigned_to:
|
|
102
|
+
fields: ['name']
|
|
103
|
+
config:
|
|
104
|
+
columns:
|
|
105
|
+
- field: name
|
|
106
|
+
label: Task
|
|
107
|
+
width: 250
|
|
108
|
+
- field: status
|
|
109
|
+
label: Status
|
|
110
|
+
width: 120
|
|
111
|
+
- field: priority
|
|
112
|
+
label: Priority
|
|
113
|
+
width: 100
|
|
114
|
+
- field: assigned_to.name
|
|
115
|
+
label: Assigned To
|
|
116
|
+
width: 150
|
|
117
|
+
- field: due_date
|
|
118
|
+
label: Due Date
|
|
119
|
+
width: 120
|
|
120
|
+
toolbar_actions:
|
|
121
|
+
- label: New Task
|
|
122
|
+
icon: plus
|
|
123
|
+
action: create_task
|
|
124
|
+
row_actions:
|
|
125
|
+
- label: Edit
|
|
126
|
+
icon: edit
|
|
127
|
+
action: edit_task
|
|
128
|
+
- label: Delete
|
|
129
|
+
icon: trash
|
|
130
|
+
action: delete_task
|
|
131
|
+
confirm: Are you sure you want to delete this task?
|
|
132
|
+
actions:
|
|
133
|
+
on_load:
|
|
134
|
+
type: refresh
|
|
135
|
+
|
|
136
|
+
# Right Column - Sidebar
|
|
137
|
+
- id: sidebar
|
|
138
|
+
type: sidebar
|
|
139
|
+
style:
|
|
140
|
+
width: 30%
|
|
141
|
+
padding: 0 0 0 24px
|
|
142
|
+
components:
|
|
143
|
+
# Project Metrics
|
|
144
|
+
- id: project_stats
|
|
145
|
+
type: container
|
|
146
|
+
label: Project Statistics
|
|
147
|
+
components:
|
|
148
|
+
- id: task_count
|
|
149
|
+
type: metric
|
|
150
|
+
label: Total Tasks
|
|
151
|
+
data_source:
|
|
152
|
+
object: tasks
|
|
153
|
+
filters:
|
|
154
|
+
- ['project', '=', '{{route.params.id}}']
|
|
155
|
+
query:
|
|
156
|
+
op: count
|
|
157
|
+
config:
|
|
158
|
+
format: number
|
|
159
|
+
size: small
|
|
160
|
+
|
|
161
|
+
- id: completed_tasks
|
|
162
|
+
type: metric
|
|
163
|
+
label: Completed
|
|
164
|
+
data_source:
|
|
165
|
+
object: tasks
|
|
166
|
+
filters:
|
|
167
|
+
- ['project', '=', '{{route.params.id}}']
|
|
168
|
+
- 'and'
|
|
169
|
+
- ['status', '=', 'completed']
|
|
170
|
+
query:
|
|
171
|
+
op: count
|
|
172
|
+
config:
|
|
173
|
+
format: number
|
|
174
|
+
size: small
|
|
175
|
+
color: green
|
|
176
|
+
|
|
177
|
+
- id: progress
|
|
178
|
+
type: metric
|
|
179
|
+
label: Progress
|
|
180
|
+
config:
|
|
181
|
+
format: percent
|
|
182
|
+
value: '{{completed_tasks / task_count}}'
|
|
183
|
+
size: small
|
|
184
|
+
|
|
185
|
+
# Activity Timeline
|
|
186
|
+
- id: activity_timeline
|
|
187
|
+
type: timeline
|
|
188
|
+
label: Recent Activity
|
|
189
|
+
data_source:
|
|
190
|
+
object: activities
|
|
191
|
+
filters:
|
|
192
|
+
- ['related_to', '=', '{{route.params.id}}']
|
|
193
|
+
- 'and'
|
|
194
|
+
- ['entity_type', '=', 'project']
|
|
195
|
+
fields: ['action', 'user', 'created_at', 'description']
|
|
196
|
+
sort: [['created_at', 'desc']]
|
|
197
|
+
limit: 10
|
|
198
|
+
config:
|
|
199
|
+
group_by: date
|
|
200
|
+
show_user_avatar: true
|
|
201
|
+
|
|
202
|
+
# Quick Actions
|
|
203
|
+
- id: quick_actions
|
|
204
|
+
type: container
|
|
205
|
+
label: Quick Actions
|
|
206
|
+
components:
|
|
207
|
+
- id: archive_btn
|
|
208
|
+
type: button
|
|
209
|
+
label: Archive Project
|
|
210
|
+
config:
|
|
211
|
+
variant: outline
|
|
212
|
+
icon: archive
|
|
213
|
+
actions:
|
|
214
|
+
on_click:
|
|
215
|
+
type: run_action
|
|
216
|
+
object: projects
|
|
217
|
+
action: archive
|
|
218
|
+
confirm: Archive this project?
|
|
219
|
+
success_message: Project archived
|
|
220
|
+
|
|
221
|
+
- id: export_btn
|
|
222
|
+
type: button
|
|
223
|
+
label: Export Data
|
|
224
|
+
config:
|
|
225
|
+
variant: outline
|
|
226
|
+
icon: download
|
|
227
|
+
actions:
|
|
228
|
+
on_click:
|
|
229
|
+
type: custom
|
|
230
|
+
handler: exportProjectData
|
|
231
|
+
|
|
232
|
+
# Responsive configuration
|
|
233
|
+
responsive:
|
|
234
|
+
mobile:
|
|
235
|
+
# Stack columns vertically on mobile
|
|
236
|
+
columns: 1
|
|
237
|
+
tablet:
|
|
238
|
+
columns: 1
|
|
239
|
+
desktop:
|
|
240
|
+
columns: 2
|
|
241
|
+
|
|
242
|
+
# Page-level state
|
|
243
|
+
state:
|
|
244
|
+
initial:
|
|
245
|
+
edit_mode: false
|
|
246
|
+
persist: true
|
|
247
|
+
storage_key: project_detail_state
|
|
248
|
+
|
|
249
|
+
# AI context
|
|
250
|
+
ai_context:
|
|
251
|
+
intent: View and manage individual project details with tasks and metrics
|
|
252
|
+
persona: Project managers and team members
|
|
253
|
+
tasks:
|
|
254
|
+
- View project information
|
|
255
|
+
- Update project details
|
|
256
|
+
- Manage tasks within the project
|
|
257
|
+
- Track project progress
|
|
258
|
+
- View activity history
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
name: project_approval
|
|
2
|
+
label: "High Budget Project Approval"
|
|
3
|
+
type: approval
|
|
4
|
+
object: projects
|
|
5
|
+
description: "Approval process for high budget projects (> $50,000)"
|
|
6
|
+
|
|
7
|
+
trigger:
|
|
8
|
+
event: create_or_update
|
|
9
|
+
conditions:
|
|
10
|
+
- field: budget
|
|
11
|
+
operator: ">"
|
|
12
|
+
value: 50000
|
|
13
|
+
- field: status
|
|
14
|
+
operator: "="
|
|
15
|
+
value: "planned"
|
|
16
|
+
|
|
17
|
+
steps:
|
|
18
|
+
- name: manager_review
|
|
19
|
+
label: "Manager Review"
|
|
20
|
+
type: approval
|
|
21
|
+
|
|
22
|
+
assignee:
|
|
23
|
+
type: role
|
|
24
|
+
role: manager
|
|
25
|
+
|
|
26
|
+
actions:
|
|
27
|
+
approve:
|
|
28
|
+
label: "Approve"
|
|
29
|
+
next_step: finance_review
|
|
30
|
+
reject:
|
|
31
|
+
label: "Reject"
|
|
32
|
+
outcome: rejected
|
|
33
|
+
|
|
34
|
+
- name: finance_review
|
|
35
|
+
label: "Finance Review"
|
|
36
|
+
type: approval
|
|
37
|
+
|
|
38
|
+
assignee:
|
|
39
|
+
type: role
|
|
40
|
+
role: finance_admin
|
|
41
|
+
|
|
42
|
+
actions:
|
|
43
|
+
approve:
|
|
44
|
+
label: "Approve Funding"
|
|
45
|
+
outcome: approved
|
|
46
|
+
updates:
|
|
47
|
+
status: "in_progress"
|
|
48
|
+
approved_at: "$now"
|
|
49
|
+
reject:
|
|
50
|
+
label: "Reject Funding"
|
|
51
|
+
outcome: rejected
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
name: project_status_summary
|
|
2
|
+
label: "Project Status Report"
|
|
3
|
+
type: summary
|
|
4
|
+
object: projects
|
|
5
|
+
description: "Overview of projects grouped by status and priority"
|
|
6
|
+
|
|
7
|
+
# Columns to display in details
|
|
8
|
+
columns:
|
|
9
|
+
- field: name
|
|
10
|
+
label: Project Name
|
|
11
|
+
- field: owner
|
|
12
|
+
label: Owner
|
|
13
|
+
- field: budget
|
|
14
|
+
label: Budget
|
|
15
|
+
format: currency
|
|
16
|
+
|
|
17
|
+
# Grouping Configuration
|
|
18
|
+
groupings:
|
|
19
|
+
- field: status
|
|
20
|
+
label: Status
|
|
21
|
+
|
|
22
|
+
- field: priority
|
|
23
|
+
label: Priority
|
|
24
|
+
|
|
25
|
+
# Aggregations
|
|
26
|
+
aggregations:
|
|
27
|
+
- field: budget
|
|
28
|
+
function: sum
|
|
29
|
+
label: Total Budget
|
|
30
|
+
|
|
31
|
+
- field: _id
|
|
32
|
+
function: count
|
|
33
|
+
label: Project Count
|
|
34
|
+
|
|
35
|
+
# Default Filters
|
|
36
|
+
filters:
|
|
37
|
+
- field: created_at
|
|
38
|
+
operator: ">="
|
|
39
|
+
value: "2024-01-01"
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
import { ActionDefinition } from '@objectql/types';
|
|
2
|
+
import { Projects } from '../../types';
|
|
3
|
+
/**
|
|
4
|
+
* Project Actions - Comprehensive Examples
|
|
5
|
+
*
|
|
6
|
+
* This file demonstrates action patterns according to the ObjectQL specification:
|
|
7
|
+
* 1. Record actions (operate on specific records)
|
|
8
|
+
* 2. Global actions (operate on collections)
|
|
9
|
+
* 3. Input validation
|
|
10
|
+
* 4. Multi-step business logic
|
|
11
|
+
* 5. Error handling
|
|
12
|
+
*/
|
|
13
|
+
/**
|
|
14
|
+
* Input type for the complete action
|
|
15
|
+
*/
|
|
16
|
+
interface CompleteInput {
|
|
17
|
+
comment?: string;
|
|
18
|
+
completion_date?: Date;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* complete - Record Action Example
|
|
22
|
+
*
|
|
23
|
+
* Demonstrates:
|
|
24
|
+
* - Fetching and validating current state
|
|
25
|
+
* - Performing atomic updates
|
|
26
|
+
* - Returning structured results
|
|
27
|
+
* - Input parameter usage
|
|
28
|
+
*/
|
|
29
|
+
export declare const complete: ActionDefinition<Projects, CompleteInput>;
|
|
30
|
+
/**
|
|
31
|
+
* Input type for the approve action
|
|
32
|
+
*/
|
|
33
|
+
interface ApproveInput {
|
|
34
|
+
comment: string;
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* approve - Record Action with State Transition
|
|
38
|
+
*
|
|
39
|
+
* Demonstrates:
|
|
40
|
+
* - State machine validation
|
|
41
|
+
* - Required input parameters
|
|
42
|
+
* - Business logic enforcement
|
|
43
|
+
*/
|
|
44
|
+
export declare const approve: ActionDefinition<Projects, ApproveInput>;
|
|
45
|
+
/**
|
|
46
|
+
* Input type for clone action
|
|
47
|
+
*/
|
|
48
|
+
interface CloneInput {
|
|
49
|
+
new_name: string;
|
|
50
|
+
copy_tasks?: boolean;
|
|
51
|
+
}
|
|
52
|
+
/**
|
|
53
|
+
* clone - Record Action with Related Data
|
|
54
|
+
*
|
|
55
|
+
* Demonstrates:
|
|
56
|
+
* - Creating new records based on existing ones
|
|
57
|
+
* - Copying related data
|
|
58
|
+
* - Complex multi-step operations
|
|
59
|
+
*/
|
|
60
|
+
export declare const clone: ActionDefinition<Projects, CloneInput>;
|
|
61
|
+
/**
|
|
62
|
+
* Input type for bulk import
|
|
63
|
+
*/
|
|
64
|
+
interface ImportProjectsInput {
|
|
65
|
+
source: 'csv' | 'json' | 'api';
|
|
66
|
+
data?: any[];
|
|
67
|
+
file_url?: string;
|
|
68
|
+
}
|
|
69
|
+
/**
|
|
70
|
+
* import_projects - Global Action Example
|
|
71
|
+
*
|
|
72
|
+
* Demonstrates:
|
|
73
|
+
* - Batch operations
|
|
74
|
+
* - Data transformation
|
|
75
|
+
* - Error collection
|
|
76
|
+
* - Progress reporting
|
|
77
|
+
*/
|
|
78
|
+
export declare const import_projects: ActionDefinition<Projects, ImportProjectsInput>;
|
|
79
|
+
/**
|
|
80
|
+
* Input type for bulk update
|
|
81
|
+
*/
|
|
82
|
+
interface BulkUpdateStatusInput {
|
|
83
|
+
project_ids: string[];
|
|
84
|
+
new_status: 'planned' | 'in_progress' | 'completed';
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* bulk_update_status - Global Action for Batch Updates
|
|
88
|
+
*
|
|
89
|
+
* Demonstrates:
|
|
90
|
+
* - Operating on multiple records
|
|
91
|
+
* - Validation across multiple items
|
|
92
|
+
* - Transactional operations (if supported)
|
|
93
|
+
*/
|
|
94
|
+
export declare const bulk_update_status: ActionDefinition<Projects, BulkUpdateStatusInput>;
|
|
95
|
+
/**
|
|
96
|
+
* generate_report - Global Action for Reporting
|
|
97
|
+
*
|
|
98
|
+
* Demonstrates:
|
|
99
|
+
* - Aggregation and analysis
|
|
100
|
+
* - Data collection across records
|
|
101
|
+
* - Computed results
|
|
102
|
+
*/
|
|
103
|
+
export declare const generate_report: ActionDefinition<Projects, {}>;
|
|
104
|
+
export {};
|