dzql 0.1.4 → 0.1.6
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/docs/CLAUDE.md +1169 -0
- package/docs/CLIENT-QUICK-START.md +183 -0
- package/docs/CLIENT-STORES.md +730 -0
- package/docs/GETTING_STARTED.md +1104 -0
- package/docs/REFERENCE.md +960 -0
- package/docs/compiler/ADVANCED_FILTERS.md +183 -0
- package/docs/compiler/CODING_STANDARDS.md +349 -0
- package/docs/compiler/COMPARISON.md +673 -0
- package/docs/compiler/OVERNIGHT_BUILD.md +474 -0
- package/docs/compiler/QUICKSTART.md +326 -0
- package/docs/compiler/SESSION_SUMMARY.md +266 -0
- package/docs/compiler/SUMMARY.md +528 -0
- package/package.json +6 -4
- package/src/client/stores/README.md +95 -0
- package/src/client/stores/index.js +8 -0
- package/src/client/stores/useAppStore.js +285 -0
- package/src/client/stores/useWsStore.js +289 -0
- package/src/compiler/codegen/operation-codegen.js +28 -3
- package/src/index.js +35 -14
- package/src/client/ui-configs/sample-2.js +0 -207
- package/src/client/ui-loader.js +0 -618
- package/src/client/ui.js +0 -990
- package/src/client.js +0 -9
|
@@ -1,207 +0,0 @@
|
|
|
1
|
-
// Rights Management UI Configuration
|
|
2
|
-
export const uiConfig = {
|
|
3
|
-
type: 'container',
|
|
4
|
-
class: 'app',
|
|
5
|
-
children: [
|
|
6
|
-
// Header
|
|
7
|
-
{
|
|
8
|
-
type: 'div',
|
|
9
|
-
class: 'header',
|
|
10
|
-
children: [
|
|
11
|
-
{ type: 'h1', text: '🏛️ Rights Management' },
|
|
12
|
-
{ type: 'p', text: 'Manage venues, packages, and contractor rights' },
|
|
13
|
-
{
|
|
14
|
-
type: 'span',
|
|
15
|
-
class: '${state.wsStatus === "connected" ? "status connected" : "status disconnected"}',
|
|
16
|
-
text: '${state.wsStatus || "disconnected"}'
|
|
17
|
-
}
|
|
18
|
-
]
|
|
19
|
-
},
|
|
20
|
-
|
|
21
|
-
// Navigation tabs
|
|
22
|
-
{
|
|
23
|
-
type: 'div',
|
|
24
|
-
class: 'nav-bar',
|
|
25
|
-
children: [{
|
|
26
|
-
type: 'div',
|
|
27
|
-
class: 'nav-tabs',
|
|
28
|
-
children: [
|
|
29
|
-
'dashboard', 'organisations', 'venues', 'packages', 'allocations', 'rights'
|
|
30
|
-
].map(tab => ({
|
|
31
|
-
type: 'button',
|
|
32
|
-
class: '${state.activeTab === "' + tab + '" ? "tab active" : "tab"}',
|
|
33
|
-
text: tab.charAt(0).toUpperCase() + tab.slice(1),
|
|
34
|
-
onClick: {
|
|
35
|
-
actions: [
|
|
36
|
-
{ type: 'setState', path: 'activeTab', value: tab },
|
|
37
|
-
tab !== 'dashboard' ? {
|
|
38
|
-
type: 'call',
|
|
39
|
-
operation: 'search',
|
|
40
|
-
entity: tab === 'rights' ? 'contractor_rights' : tab,
|
|
41
|
-
params: { limit: 25 },
|
|
42
|
-
resultPath: tab + '.list'
|
|
43
|
-
} : null
|
|
44
|
-
].filter(Boolean)
|
|
45
|
-
}
|
|
46
|
-
}))
|
|
47
|
-
}]
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
// Content area
|
|
51
|
-
{
|
|
52
|
-
type: 'div',
|
|
53
|
-
class: 'content',
|
|
54
|
-
children: [
|
|
55
|
-
// Dashboard
|
|
56
|
-
{
|
|
57
|
-
type: 'if',
|
|
58
|
-
condition: "${state.activeTab === 'dashboard'}",
|
|
59
|
-
then: {
|
|
60
|
-
type: 'section',
|
|
61
|
-
children: [
|
|
62
|
-
{ type: 'h2', text: 'Dashboard' },
|
|
63
|
-
{
|
|
64
|
-
type: 'div',
|
|
65
|
-
class: 'grid',
|
|
66
|
-
children: ['venues', 'packages', 'allocations', 'organisations'].map(entity => ({
|
|
67
|
-
type: 'div',
|
|
68
|
-
class: 'card',
|
|
69
|
-
children: [
|
|
70
|
-
{ type: 'h3', text: entity.charAt(0).toUpperCase() + entity.slice(1) },
|
|
71
|
-
{ type: 'div', class: 'stat-value', text: '${state.stats?.' + entity + ' || "..."}' },
|
|
72
|
-
{ type: 'div', class: 'stat-label', text: 'Total ' + entity }
|
|
73
|
-
]
|
|
74
|
-
}))
|
|
75
|
-
}
|
|
76
|
-
]
|
|
77
|
-
}
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
// Entity views (organisations, venues, packages, allocations)
|
|
81
|
-
...['organisations', 'venues', 'packages', 'allocations'].map(entity => ({
|
|
82
|
-
type: 'if',
|
|
83
|
-
condition: "${state.activeTab === '" + entity + "'}",
|
|
84
|
-
then: {
|
|
85
|
-
type: 'section',
|
|
86
|
-
children: [
|
|
87
|
-
{ type: 'h2', text: entity.charAt(0).toUpperCase() + entity.slice(1) },
|
|
88
|
-
{
|
|
89
|
-
type: 'div',
|
|
90
|
-
class: 'search-bar',
|
|
91
|
-
children: [
|
|
92
|
-
{
|
|
93
|
-
type: 'input',
|
|
94
|
-
bind: '${state.' + entity + '.search}',
|
|
95
|
-
attributes: { placeholder: 'Search ' + entity + '...' }
|
|
96
|
-
},
|
|
97
|
-
{
|
|
98
|
-
type: 'button',
|
|
99
|
-
text: 'Search',
|
|
100
|
-
onClick: {
|
|
101
|
-
actions: [{
|
|
102
|
-
type: 'call',
|
|
103
|
-
operation: 'search',
|
|
104
|
-
entity: entity,
|
|
105
|
-
params: {
|
|
106
|
-
filters: { _search: '${state.' + entity + '.search}' },
|
|
107
|
-
limit: 25
|
|
108
|
-
},
|
|
109
|
-
resultPath: entity + '.list'
|
|
110
|
-
}]
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
]
|
|
114
|
-
},
|
|
115
|
-
{
|
|
116
|
-
type: 'if',
|
|
117
|
-
condition: '${state.' + entity + '.list}',
|
|
118
|
-
then: {
|
|
119
|
-
type: 'table',
|
|
120
|
-
data: '${state.' + entity + '.list.data}',
|
|
121
|
-
columns: getColumnsForEntity(entity)
|
|
122
|
-
}
|
|
123
|
-
}
|
|
124
|
-
]
|
|
125
|
-
}
|
|
126
|
-
})),
|
|
127
|
-
|
|
128
|
-
// Rights view
|
|
129
|
-
{
|
|
130
|
-
type: 'if',
|
|
131
|
-
condition: "${state.activeTab === 'rights'}",
|
|
132
|
-
then: {
|
|
133
|
-
type: 'section',
|
|
134
|
-
children: [
|
|
135
|
-
{ type: 'h2', text: 'Rights Management' },
|
|
136
|
-
{
|
|
137
|
-
type: 'div',
|
|
138
|
-
class: 'pill-nav',
|
|
139
|
-
children: ['contractor', 'promotion'].map(type => ({
|
|
140
|
-
type: 'button',
|
|
141
|
-
class: '${state.rightsType === "' + type + '" ? "pill active" : "pill"}',
|
|
142
|
-
text: type.charAt(0).toUpperCase() + type.slice(1) + ' Rights',
|
|
143
|
-
onClick: {
|
|
144
|
-
actions: [
|
|
145
|
-
{ type: 'setState', path: 'rightsType', value: type },
|
|
146
|
-
{
|
|
147
|
-
type: 'call',
|
|
148
|
-
operation: 'search',
|
|
149
|
-
entity: type + '_rights',
|
|
150
|
-
params: { limit: 25 },
|
|
151
|
-
resultPath: 'rights.' + type
|
|
152
|
-
}
|
|
153
|
-
]
|
|
154
|
-
}
|
|
155
|
-
}))
|
|
156
|
-
},
|
|
157
|
-
{
|
|
158
|
-
type: 'if',
|
|
159
|
-
condition: '${state.rights.contractor}',
|
|
160
|
-
then: {
|
|
161
|
-
type: 'table',
|
|
162
|
-
data: '${state.rights.contractor.data}',
|
|
163
|
-
columns: [
|
|
164
|
-
{ field: 'contractor_org.name', label: 'Contractor' },
|
|
165
|
-
{ field: 'venue.name', label: 'Venue' },
|
|
166
|
-
{ field: 'valid_from', label: 'From' },
|
|
167
|
-
{ field: 'valid_to', label: 'To' }
|
|
168
|
-
]
|
|
169
|
-
}
|
|
170
|
-
}
|
|
171
|
-
]
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
]
|
|
175
|
-
}
|
|
176
|
-
]
|
|
177
|
-
};
|
|
178
|
-
|
|
179
|
-
// Helper function for table columns
|
|
180
|
-
function getColumnsForEntity(entity) {
|
|
181
|
-
const columnSets = {
|
|
182
|
-
organisations: [
|
|
183
|
-
{ field: 'id', label: 'ID' },
|
|
184
|
-
{ field: 'name', label: 'Name' },
|
|
185
|
-
{ field: 'description', label: 'Description' }
|
|
186
|
-
],
|
|
187
|
-
venues: [
|
|
188
|
-
{ field: 'id', label: 'ID' },
|
|
189
|
-
{ field: 'name', label: 'Name' },
|
|
190
|
-
{ field: 'address', label: 'Address' },
|
|
191
|
-
{ field: 'org.name', label: 'Organisation' }
|
|
192
|
-
],
|
|
193
|
-
packages: [
|
|
194
|
-
{ field: 'id', label: 'ID' },
|
|
195
|
-
{ field: 'name', label: 'Name' },
|
|
196
|
-
{ field: 'owner.name', label: 'Owner' },
|
|
197
|
-
{ field: 'sponsor.name', label: 'Sponsor' }
|
|
198
|
-
],
|
|
199
|
-
allocations: [
|
|
200
|
-
{ field: 'id', label: 'ID' },
|
|
201
|
-
{ field: 'package.name', label: 'Package' },
|
|
202
|
-
{ field: 'site.name', label: 'Site' },
|
|
203
|
-
{ field: 'from_datetime', label: 'From' }
|
|
204
|
-
]
|
|
205
|
-
};
|
|
206
|
-
return columnSets[entity] || [];
|
|
207
|
-
}
|