@sybilion/uilib 1.2.5 → 1.2.8
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/assets/standalone-global.css +12 -11
- package/dist/esm/components/ui/AppHeader/AppHeader.styl.js +1 -1
- package/dist/esm/components/ui/Logo/Logo.js +7 -2
- package/dist/esm/components/ui/Logo/Logo.styl.js +1 -1
- package/dist/esm/components/ui/NavUserHeader/NavUserHeader.js +4 -2
- package/dist/esm/components/ui/Sidebar/Sidebar.styl.js +1 -1
- package/dist/esm/components/widgets/SybilionAppHeader/SybilionAppHeader.js +4 -2
- package/dist/esm/components/widgets/SybilionAppHeader/SybilionAppHeader.styl.js +2 -2
- package/dist/esm/docs/contexts/theme-context.js +14 -0
- package/dist/esm/docs/lib/theme.js +23 -0
- package/dist/esm/types/src/components/ui/Logo/Logo.d.ts +5 -0
- package/dist/esm/types/src/components/ui/NavUserHeader/NavUserHeader.d.ts +1 -1
- package/dist/esm/types/src/components/ui/NavUserHeader/NavUserHeader.types.d.ts +0 -4
- package/dist/esm/types/src/components/widgets/SybilionAppHeader/SybilionAppHeader.d.ts +7 -1
- package/dist/esm/types/src/docs/contexts/theme-context.d.ts +1 -0
- package/dist/esm/types/src/docs/pages/StandaloneAppLayoutPage/StandaloneAppLayoutPage.constants.d.ts +7 -0
- package/docs/standalone-apps.md +111 -12
- package/package.json +3 -2
- package/src/assets/logo.svg +3 -0
- package/src/components/ui/AppHeader/AppHeader.styl +5 -0
- package/src/components/ui/Logo/Logo.styl +2 -0
- package/src/components/ui/Logo/Logo.tsx +12 -1
- package/src/components/ui/NavUserHeader/NavUserHeader.tsx +15 -17
- package/src/components/ui/NavUserHeader/NavUserHeader.types.ts +0 -4
- package/src/components/ui/Sidebar/Sidebar.styl +1 -1
- package/src/components/widgets/SybilionAppHeader/SybilionAppHeader.styl +46 -0
- package/src/components/widgets/SybilionAppHeader/SybilionAppHeader.styl.d.ts +3 -0
- package/src/components/widgets/SybilionAppHeader/SybilionAppHeader.tsx +23 -0
- package/src/docs/config/webpack.config.js +4 -3
- package/src/docs/contexts/theme-context.tsx +14 -1
- package/src/docs/pages/NavUserHeaderPage.tsx +1 -20
- package/src/docs/pages/StandaloneAppLayoutPage/StandaloneAppLayoutPage.constants.ts +444 -0
- package/src/docs/pages/{StandaloneAppLayoutPage.styl → StandaloneAppLayoutPage/StandaloneAppLayoutPage.styl} +11 -21
- package/src/docs/pages/{StandaloneAppLayoutPage.styl.d.ts → StandaloneAppLayoutPage/StandaloneAppLayoutPage.styl.d.ts} +1 -0
- package/src/docs/pages/{StandaloneAppLayoutPage.tsx → StandaloneAppLayoutPage/StandaloneAppLayoutPage.tsx} +18 -116
- package/src/docs/registry.ts +2 -1
- /package/dist/esm/types/src/docs/pages/{StandaloneAppLayoutPage.d.ts → StandaloneAppLayoutPage/StandaloneAppLayoutPage.d.ts} +0 -0
|
@@ -0,0 +1,444 @@
|
|
|
1
|
+
import { WorkspaceAppEntry } from '#uilib/components/ui/WorkspaceAppSwitcher';
|
|
2
|
+
import { SidebarDatasetsItemsGroupedDataset } from '#uilib/components/widgets/SidebarDatasetsItemsGrouped';
|
|
3
|
+
|
|
4
|
+
export const MOCK_DATASETS: SidebarDatasetsItemsGroupedDataset[] = [
|
|
5
|
+
{
|
|
6
|
+
id: 1,
|
|
7
|
+
name: 'Acetic Acid Price - China - Dollar/MT',
|
|
8
|
+
status: 'active',
|
|
9
|
+
created_at: '2024-01-01',
|
|
10
|
+
updated_at: '2024-01-02',
|
|
11
|
+
keywords: '',
|
|
12
|
+
category: { id: 10, name: 'Chemicals' },
|
|
13
|
+
target_type_id: 1,
|
|
14
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
15
|
+
trend: 0,
|
|
16
|
+
regular_price: '0',
|
|
17
|
+
sale_price: '0',
|
|
18
|
+
regions: [
|
|
19
|
+
{ id: 1, name: 'Asia' },
|
|
20
|
+
{ id: 2, name: 'China' },
|
|
21
|
+
],
|
|
22
|
+
unit: { id: 1, name: 'USD/MT' },
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
id: 2,
|
|
26
|
+
name: 'Freight index — spot volume (China)',
|
|
27
|
+
status: 'active',
|
|
28
|
+
created_at: '2024-01-01',
|
|
29
|
+
updated_at: '2024-01-02',
|
|
30
|
+
keywords: '',
|
|
31
|
+
category: { id: 10, name: 'Chemicals' },
|
|
32
|
+
target_type_id: 2,
|
|
33
|
+
target_type: { id: 2, name: 'Freight index' },
|
|
34
|
+
trend: 0,
|
|
35
|
+
regular_price: '0',
|
|
36
|
+
sale_price: '0',
|
|
37
|
+
regions: [
|
|
38
|
+
{ id: 1, name: 'Asia' },
|
|
39
|
+
{ id: 2, name: 'China' },
|
|
40
|
+
],
|
|
41
|
+
unit: { id: 1, name: 'Index' },
|
|
42
|
+
},
|
|
43
|
+
{
|
|
44
|
+
id: 3,
|
|
45
|
+
name: 'Ethanol Price Europe Per Kg In USD',
|
|
46
|
+
status: 'active',
|
|
47
|
+
created_at: '2024-01-01',
|
|
48
|
+
updated_at: '2024-01-02',
|
|
49
|
+
keywords: '',
|
|
50
|
+
category: { id: 11, name: 'Energy' },
|
|
51
|
+
target_type_id: 1,
|
|
52
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
53
|
+
trend: 0,
|
|
54
|
+
regular_price: '0',
|
|
55
|
+
sale_price: '0',
|
|
56
|
+
regions: [{ id: 5, name: 'Europe' }],
|
|
57
|
+
unit: { id: 1, name: 'USD/kg' },
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
id: 4,
|
|
61
|
+
name: 'Brent Crude Oil — Front Month (ICE)',
|
|
62
|
+
status: 'active',
|
|
63
|
+
created_at: '2024-01-03',
|
|
64
|
+
updated_at: '2024-01-04',
|
|
65
|
+
keywords: '',
|
|
66
|
+
category: { id: 11, name: 'Energy' },
|
|
67
|
+
target_type_id: 1,
|
|
68
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
69
|
+
trend: 0,
|
|
70
|
+
regular_price: '0',
|
|
71
|
+
sale_price: '0',
|
|
72
|
+
regions: [{ id: 5, name: 'Europe' }],
|
|
73
|
+
unit: { id: 2, name: 'USD/bbl' },
|
|
74
|
+
},
|
|
75
|
+
{
|
|
76
|
+
id: 5,
|
|
77
|
+
name: 'WTI Crude — Cushing Spot',
|
|
78
|
+
status: 'active',
|
|
79
|
+
created_at: '2024-01-05',
|
|
80
|
+
updated_at: '2024-01-06',
|
|
81
|
+
keywords: '',
|
|
82
|
+
category: { id: 11, name: 'Energy' },
|
|
83
|
+
target_type_id: 1,
|
|
84
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
85
|
+
trend: 0,
|
|
86
|
+
regular_price: '0',
|
|
87
|
+
sale_price: '0',
|
|
88
|
+
regions: [
|
|
89
|
+
{ id: 3, name: 'North America' },
|
|
90
|
+
{ id: 4, name: 'United States' },
|
|
91
|
+
],
|
|
92
|
+
unit: { id: 2, name: 'USD/bbl' },
|
|
93
|
+
},
|
|
94
|
+
{
|
|
95
|
+
id: 6,
|
|
96
|
+
name: 'Natural Gas Henry Hub — USD/MMBtu',
|
|
97
|
+
status: 'active',
|
|
98
|
+
created_at: '2024-01-07',
|
|
99
|
+
updated_at: '2024-01-08',
|
|
100
|
+
keywords: '',
|
|
101
|
+
category: { id: 11, name: 'Energy' },
|
|
102
|
+
target_type_id: 1,
|
|
103
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
104
|
+
trend: 0,
|
|
105
|
+
regular_price: '0',
|
|
106
|
+
sale_price: '0',
|
|
107
|
+
regions: [
|
|
108
|
+
{ id: 3, name: 'North America' },
|
|
109
|
+
{ id: 4, name: 'United States' },
|
|
110
|
+
],
|
|
111
|
+
unit: { id: 3, name: 'USD/MMBtu' },
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
id: 7,
|
|
115
|
+
name: 'LNG JKM — Japan-Korea Marker',
|
|
116
|
+
status: 'active',
|
|
117
|
+
created_at: '2024-01-09',
|
|
118
|
+
updated_at: '2024-01-10',
|
|
119
|
+
keywords: '',
|
|
120
|
+
category: { id: 11, name: 'Energy' },
|
|
121
|
+
target_type_id: 1,
|
|
122
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
123
|
+
trend: 0,
|
|
124
|
+
regular_price: '0',
|
|
125
|
+
sale_price: '0',
|
|
126
|
+
regions: [
|
|
127
|
+
{ id: 1, name: 'Asia' },
|
|
128
|
+
{ id: 2, name: 'China' },
|
|
129
|
+
],
|
|
130
|
+
unit: { id: 4, name: 'USD/MMBtu' },
|
|
131
|
+
},
|
|
132
|
+
{
|
|
133
|
+
id: 8,
|
|
134
|
+
name: 'Copper — LME Cash Official USD/MT',
|
|
135
|
+
status: 'active',
|
|
136
|
+
created_at: '2024-01-11',
|
|
137
|
+
updated_at: '2024-01-12',
|
|
138
|
+
keywords: '',
|
|
139
|
+
category: { id: 12, name: 'Metals' },
|
|
140
|
+
target_type_id: 1,
|
|
141
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
142
|
+
trend: 0,
|
|
143
|
+
regular_price: '0',
|
|
144
|
+
sale_price: '0',
|
|
145
|
+
regions: [{ id: 5, name: 'Europe' }],
|
|
146
|
+
unit: { id: 1, name: 'USD/MT' },
|
|
147
|
+
},
|
|
148
|
+
{
|
|
149
|
+
id: 9,
|
|
150
|
+
name: 'Aluminium — LME 3M USD/MT',
|
|
151
|
+
status: 'active',
|
|
152
|
+
created_at: '2024-01-13',
|
|
153
|
+
updated_at: '2024-01-14',
|
|
154
|
+
keywords: '',
|
|
155
|
+
category: { id: 12, name: 'Metals' },
|
|
156
|
+
target_type_id: 1,
|
|
157
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
158
|
+
trend: 0,
|
|
159
|
+
regular_price: '0',
|
|
160
|
+
sale_price: '0',
|
|
161
|
+
regions: [{ id: 5, name: 'Europe' }],
|
|
162
|
+
unit: { id: 1, name: 'USD/MT' },
|
|
163
|
+
},
|
|
164
|
+
{
|
|
165
|
+
id: 10,
|
|
166
|
+
name: 'Steel HRC — US Midwest ($/st)',
|
|
167
|
+
status: 'active',
|
|
168
|
+
created_at: '2024-01-15',
|
|
169
|
+
updated_at: '2024-01-16',
|
|
170
|
+
keywords: '',
|
|
171
|
+
category: { id: 12, name: 'Metals' },
|
|
172
|
+
target_type_id: 1,
|
|
173
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
174
|
+
trend: 0,
|
|
175
|
+
regular_price: '0',
|
|
176
|
+
sale_price: '0',
|
|
177
|
+
regions: [
|
|
178
|
+
{ id: 3, name: 'North America' },
|
|
179
|
+
{ id: 4, name: 'United States' },
|
|
180
|
+
],
|
|
181
|
+
unit: { id: 5, name: 'USD/st' },
|
|
182
|
+
},
|
|
183
|
+
{
|
|
184
|
+
id: 11,
|
|
185
|
+
name: 'Urea FOB Middle East — Granular',
|
|
186
|
+
status: 'active',
|
|
187
|
+
created_at: '2024-01-17',
|
|
188
|
+
updated_at: '2024-01-18',
|
|
189
|
+
keywords: '',
|
|
190
|
+
category: { id: 13, name: 'Agriculture' },
|
|
191
|
+
target_type_id: 1,
|
|
192
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
193
|
+
trend: 0,
|
|
194
|
+
regular_price: '0',
|
|
195
|
+
sale_price: '0',
|
|
196
|
+
regions: [{ id: 6, name: 'Middle East' }],
|
|
197
|
+
unit: { id: 1, name: 'USD/MT' },
|
|
198
|
+
},
|
|
199
|
+
{
|
|
200
|
+
id: 12,
|
|
201
|
+
name: 'Corn — CBOT Nearby (cents/bu)',
|
|
202
|
+
status: 'active',
|
|
203
|
+
created_at: '2024-01-19',
|
|
204
|
+
updated_at: '2024-01-20',
|
|
205
|
+
keywords: '',
|
|
206
|
+
category: { id: 13, name: 'Agriculture' },
|
|
207
|
+
target_type_id: 1,
|
|
208
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
209
|
+
trend: 0,
|
|
210
|
+
regular_price: '0',
|
|
211
|
+
sale_price: '0',
|
|
212
|
+
regions: [
|
|
213
|
+
{ id: 3, name: 'North America' },
|
|
214
|
+
{ id: 4, name: 'United States' },
|
|
215
|
+
],
|
|
216
|
+
unit: { id: 6, name: 'cents/bu' },
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
id: 13,
|
|
220
|
+
name: 'Soybeans — CBOT Nearby',
|
|
221
|
+
status: 'active',
|
|
222
|
+
created_at: '2024-01-21',
|
|
223
|
+
updated_at: '2024-01-22',
|
|
224
|
+
keywords: '',
|
|
225
|
+
category: { id: 13, name: 'Agriculture' },
|
|
226
|
+
target_type_id: 1,
|
|
227
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
228
|
+
trend: 0,
|
|
229
|
+
regular_price: '0',
|
|
230
|
+
sale_price: '0',
|
|
231
|
+
regions: [
|
|
232
|
+
{ id: 3, name: 'North America' },
|
|
233
|
+
{ id: 4, name: 'United States' },
|
|
234
|
+
],
|
|
235
|
+
unit: { id: 7, name: 'USD/bu' },
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
id: 14,
|
|
239
|
+
name: 'Coffee Arabica — ICE NY',
|
|
240
|
+
status: 'active',
|
|
241
|
+
created_at: '2024-01-23',
|
|
242
|
+
updated_at: '2024-01-24',
|
|
243
|
+
keywords: '',
|
|
244
|
+
category: { id: 13, name: 'Agriculture' },
|
|
245
|
+
target_type_id: 1,
|
|
246
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
247
|
+
trend: 0,
|
|
248
|
+
regular_price: '0',
|
|
249
|
+
sale_price: '0',
|
|
250
|
+
regions: [{ id: 8, name: 'Latin America' }],
|
|
251
|
+
unit: { id: 8, name: 'USD/lb' },
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
id: 15,
|
|
255
|
+
name: 'Sugar #11 — ICE NY',
|
|
256
|
+
status: 'active',
|
|
257
|
+
created_at: '2024-01-25',
|
|
258
|
+
updated_at: '2024-01-26',
|
|
259
|
+
keywords: '',
|
|
260
|
+
category: { id: 13, name: 'Agriculture' },
|
|
261
|
+
target_type_id: 1,
|
|
262
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
263
|
+
trend: 0,
|
|
264
|
+
regular_price: '0',
|
|
265
|
+
sale_price: '0',
|
|
266
|
+
regions: [{ id: 8, name: 'Latin America' }],
|
|
267
|
+
unit: { id: 8, name: 'USD/lb' },
|
|
268
|
+
},
|
|
269
|
+
{
|
|
270
|
+
id: 16,
|
|
271
|
+
name: 'Polyethylene HDPE — CFR China',
|
|
272
|
+
status: 'active',
|
|
273
|
+
created_at: '2024-01-27',
|
|
274
|
+
updated_at: '2024-01-28',
|
|
275
|
+
keywords: '',
|
|
276
|
+
category: { id: 10, name: 'Chemicals' },
|
|
277
|
+
target_type_id: 1,
|
|
278
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
279
|
+
trend: 0,
|
|
280
|
+
regular_price: '0',
|
|
281
|
+
sale_price: '0',
|
|
282
|
+
regions: [
|
|
283
|
+
{ id: 1, name: 'Asia' },
|
|
284
|
+
{ id: 2, name: 'China' },
|
|
285
|
+
],
|
|
286
|
+
unit: { id: 1, name: 'USD/MT' },
|
|
287
|
+
},
|
|
288
|
+
{
|
|
289
|
+
id: 17,
|
|
290
|
+
name: 'Methanol — CFR China',
|
|
291
|
+
status: 'active',
|
|
292
|
+
created_at: '2024-01-29',
|
|
293
|
+
updated_at: '2024-01-30',
|
|
294
|
+
keywords: '',
|
|
295
|
+
category: { id: 10, name: 'Chemicals' },
|
|
296
|
+
target_type_id: 1,
|
|
297
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
298
|
+
trend: 0,
|
|
299
|
+
regular_price: '0',
|
|
300
|
+
sale_price: '0',
|
|
301
|
+
regions: [
|
|
302
|
+
{ id: 1, name: 'Asia' },
|
|
303
|
+
{ id: 2, name: 'China' },
|
|
304
|
+
],
|
|
305
|
+
unit: { id: 1, name: 'USD/MT' },
|
|
306
|
+
},
|
|
307
|
+
{
|
|
308
|
+
id: 18,
|
|
309
|
+
name: 'Charter rates — Panamax Atlantic',
|
|
310
|
+
status: 'active',
|
|
311
|
+
created_at: '2024-02-01',
|
|
312
|
+
updated_at: '2024-02-02',
|
|
313
|
+
keywords: '',
|
|
314
|
+
category: { id: 10, name: 'Chemicals' },
|
|
315
|
+
target_type_id: 2,
|
|
316
|
+
target_type: { id: 2, name: 'Freight index' },
|
|
317
|
+
trend: 0,
|
|
318
|
+
regular_price: '0',
|
|
319
|
+
sale_price: '0',
|
|
320
|
+
regions: [{ id: 5, name: 'Europe' }],
|
|
321
|
+
unit: { id: 1, name: 'Index' },
|
|
322
|
+
},
|
|
323
|
+
{
|
|
324
|
+
id: 19,
|
|
325
|
+
name: 'Container freight — Asia to US West Coast',
|
|
326
|
+
status: 'active',
|
|
327
|
+
created_at: '2024-02-03',
|
|
328
|
+
updated_at: '2024-02-04',
|
|
329
|
+
keywords: '',
|
|
330
|
+
category: { id: 10, name: 'Chemicals' },
|
|
331
|
+
target_type_id: 2,
|
|
332
|
+
target_type: { id: 2, name: 'Freight index' },
|
|
333
|
+
trend: 0,
|
|
334
|
+
regular_price: '0',
|
|
335
|
+
sale_price: '0',
|
|
336
|
+
regions: [
|
|
337
|
+
{ id: 1, name: 'Asia' },
|
|
338
|
+
{ id: 2, name: 'China' },
|
|
339
|
+
],
|
|
340
|
+
unit: { id: 1, name: 'Index' },
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
id: 20,
|
|
344
|
+
name: 'Thermal Coal — Newcastle 6,000 kcal',
|
|
345
|
+
status: 'active',
|
|
346
|
+
created_at: '2024-02-05',
|
|
347
|
+
updated_at: '2024-02-06',
|
|
348
|
+
keywords: '',
|
|
349
|
+
category: { id: 11, name: 'Energy' },
|
|
350
|
+
target_type_id: 1,
|
|
351
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
352
|
+
trend: 0,
|
|
353
|
+
regular_price: '0',
|
|
354
|
+
sale_price: '0',
|
|
355
|
+
regions: [{ id: 9, name: 'Oceania' }],
|
|
356
|
+
unit: { id: 1, name: 'USD/MT' },
|
|
357
|
+
},
|
|
358
|
+
{
|
|
359
|
+
id: 21,
|
|
360
|
+
name: 'Diesel ARA — USD/MT',
|
|
361
|
+
status: 'active',
|
|
362
|
+
created_at: '2024-02-07',
|
|
363
|
+
updated_at: '2024-02-08',
|
|
364
|
+
keywords: '',
|
|
365
|
+
category: { id: 11, name: 'Energy' },
|
|
366
|
+
target_type_id: 1,
|
|
367
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
368
|
+
trend: 0,
|
|
369
|
+
regular_price: '0',
|
|
370
|
+
sale_price: '0',
|
|
371
|
+
regions: [{ id: 5, name: 'Europe' }],
|
|
372
|
+
unit: { id: 1, name: 'USD/MT' },
|
|
373
|
+
},
|
|
374
|
+
{
|
|
375
|
+
id: 22,
|
|
376
|
+
name: 'Propylene — Contract FD NWE',
|
|
377
|
+
status: 'active',
|
|
378
|
+
created_at: '2024-02-09',
|
|
379
|
+
updated_at: '2024-02-10',
|
|
380
|
+
keywords: '',
|
|
381
|
+
category: { id: 10, name: 'Chemicals' },
|
|
382
|
+
target_type_id: 1,
|
|
383
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
384
|
+
trend: 0,
|
|
385
|
+
regular_price: '0',
|
|
386
|
+
sale_price: '0',
|
|
387
|
+
regions: [{ id: 5, name: 'Europe' }],
|
|
388
|
+
unit: { id: 1, name: 'EUR/MT' },
|
|
389
|
+
},
|
|
390
|
+
{
|
|
391
|
+
id: 23,
|
|
392
|
+
name: 'Ammonia — CFR India',
|
|
393
|
+
status: 'active',
|
|
394
|
+
created_at: '2024-02-11',
|
|
395
|
+
updated_at: '2024-02-12',
|
|
396
|
+
keywords: '',
|
|
397
|
+
category: { id: 10, name: 'Chemicals' },
|
|
398
|
+
target_type_id: 1,
|
|
399
|
+
target_type: { id: 1, name: 'Commodity price' },
|
|
400
|
+
trend: 0,
|
|
401
|
+
regular_price: '0',
|
|
402
|
+
sale_price: '0',
|
|
403
|
+
regions: [{ id: 1, name: 'Asia' }],
|
|
404
|
+
unit: { id: 1, name: 'USD/MT' },
|
|
405
|
+
},
|
|
406
|
+
];
|
|
407
|
+
|
|
408
|
+
export type PreviewPanel = 'home' | 'datasets';
|
|
409
|
+
|
|
410
|
+
export const TEST_HEADER_ID = 'test-header-id';
|
|
411
|
+
|
|
412
|
+
export const DOCS_WORKSPACE_APPS_LS_KEY = 'uilib.docs.workspaceApps';
|
|
413
|
+
|
|
414
|
+
export const DOCS_PREVIEW_APPS: WorkspaceAppEntry[] = [
|
|
415
|
+
{
|
|
416
|
+
id: 'docs-home',
|
|
417
|
+
displayName: 'Datasets Dashboard',
|
|
418
|
+
subtitle: 'Data analysis tools',
|
|
419
|
+
iconKey: 'grid-four',
|
|
420
|
+
accent: '#0d9488',
|
|
421
|
+
accentMuted: 'rgba(13, 148, 136, 0.12)',
|
|
422
|
+
href: '/docs-preview/home',
|
|
423
|
+
matchPathPrefixes: ['/docs-preview/home'],
|
|
424
|
+
},
|
|
425
|
+
{
|
|
426
|
+
id: 'docs-datasets',
|
|
427
|
+
displayName: 'Datasets',
|
|
428
|
+
subtitle: 'Dataset library',
|
|
429
|
+
iconKey: 'package',
|
|
430
|
+
accent: '#6366f1',
|
|
431
|
+
accentMuted: 'rgba(99, 102, 241, 0.12)',
|
|
432
|
+
href: '/docs-preview/datasets',
|
|
433
|
+
matchPathPrefixes: ['/docs-preview/datasets'],
|
|
434
|
+
},
|
|
435
|
+
{
|
|
436
|
+
id: 'my-custom-app',
|
|
437
|
+
displayName: 'Custom app',
|
|
438
|
+
subtitle: 'Slug-only app (sybilion.io/apps/…)',
|
|
439
|
+
iconKey: 'boat',
|
|
440
|
+
accent: '#0ea5e9',
|
|
441
|
+
accentMuted: 'rgba(14, 165, 233, 0.12)',
|
|
442
|
+
href: '/apps/my-custom-app',
|
|
443
|
+
},
|
|
444
|
+
];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
@import '
|
|
1
|
+
@import '../../../lib/theme.styl'
|
|
2
2
|
|
|
3
3
|
// Embed preview: Sidebar uses position:fixed + viewport top/height; PageScroll uses 100vh.
|
|
4
4
|
// Transform creates a containing block for `fixed` children; overrides stop bleed into docs chrome.
|
|
@@ -24,23 +24,13 @@
|
|
|
24
24
|
height auto !important
|
|
25
25
|
flex 1
|
|
26
26
|
|
|
27
|
-
.
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
height 100% !important
|
|
38
|
-
max-height 100% !important
|
|
39
|
-
|
|
40
|
-
@media (min-width MOBILE)
|
|
41
|
-
height 100% !important
|
|
42
|
-
|
|
43
|
-
.preview [data-slot="sidebar-resize-handle"]
|
|
44
|
-
top 0 !important
|
|
45
|
-
height 100% !important
|
|
46
|
-
max-height 100%
|
|
27
|
+
// Datasets panel: tall block for scroll testing inside PageScroll.
|
|
28
|
+
.scrollTestBlock
|
|
29
|
+
min-height 100vh
|
|
30
|
+
margin-top var(--p-4)
|
|
31
|
+
padding var(--p-4)
|
|
32
|
+
border-radius var(--p-2)
|
|
33
|
+
border 2px dashed var(--border)
|
|
34
|
+
background-color var(--background)
|
|
35
|
+
color var(--muted-foreground)
|
|
36
|
+
font-size var(--text-sm)
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { useState } from 'react';
|
|
2
2
|
|
|
3
3
|
import { AppHeaderHost } from '#uilib/components/ui/AppHeader';
|
|
4
4
|
import { DropdownMenuItem } from '#uilib/components/ui/DropdownMenu';
|
|
@@ -14,119 +14,26 @@ import { PageScroll } from '#uilib/components/ui/Page/PageScroll/PageScroll';
|
|
|
14
14
|
import {
|
|
15
15
|
Sidebar,
|
|
16
16
|
SidebarContent,
|
|
17
|
-
SidebarMenu,
|
|
18
17
|
SidebarMenuButton,
|
|
19
18
|
SidebarMenuItem,
|
|
20
19
|
SidebarProvider,
|
|
21
20
|
} from '#uilib/components/ui/Sidebar/Sidebar';
|
|
22
|
-
import
|
|
23
|
-
import {
|
|
24
|
-
SidebarDatasetsItemsGrouped,
|
|
25
|
-
type SidebarDatasetsItemsGroupedDataset,
|
|
26
|
-
} from '#uilib/components/widgets/SidebarDatasetsItemsGrouped';
|
|
21
|
+
import { SidebarDatasetsItemsGrouped } from '#uilib/components/widgets/SidebarDatasetsItemsGrouped';
|
|
27
22
|
import { SybilionAppHeader } from '#uilib/components/widgets/SybilionAppHeader';
|
|
28
23
|
import { GearSixIcon, UserCircleIcon } from '@phosphor-icons/react';
|
|
29
24
|
import { House } from 'lucide-react';
|
|
30
25
|
|
|
31
|
-
import { AppPageHeader } from '
|
|
32
|
-
import { DocsHeaderActions } from '
|
|
26
|
+
import { AppPageHeader } from '../../components/AppPageHeader/AppPageHeader';
|
|
27
|
+
import { DocsHeaderActions } from '../../docsHeaderActions';
|
|
28
|
+
import {
|
|
29
|
+
DOCS_PREVIEW_APPS,
|
|
30
|
+
DOCS_WORKSPACE_APPS_LS_KEY,
|
|
31
|
+
MOCK_DATASETS,
|
|
32
|
+
PreviewPanel,
|
|
33
|
+
TEST_HEADER_ID,
|
|
34
|
+
} from './StandaloneAppLayoutPage.constants';
|
|
33
35
|
import S from './StandaloneAppLayoutPage.styl';
|
|
34
36
|
|
|
35
|
-
const MOCK_DATASETS: SidebarDatasetsItemsGroupedDataset[] = [
|
|
36
|
-
{
|
|
37
|
-
id: 1,
|
|
38
|
-
name: 'Acetic Acid Price - China - Dollar/MT',
|
|
39
|
-
status: 'active',
|
|
40
|
-
created_at: '2024-01-01',
|
|
41
|
-
updated_at: '2024-01-02',
|
|
42
|
-
keywords: '',
|
|
43
|
-
category: { id: 10, name: 'Chemicals' },
|
|
44
|
-
target_type_id: 1,
|
|
45
|
-
target_type: { id: 1, name: 'Commodity price' },
|
|
46
|
-
trend: 0,
|
|
47
|
-
regular_price: '0',
|
|
48
|
-
sale_price: '0',
|
|
49
|
-
regions: [
|
|
50
|
-
{ id: 1, name: 'Asia' },
|
|
51
|
-
{ id: 2, name: 'China' },
|
|
52
|
-
],
|
|
53
|
-
unit: { id: 1, name: 'USD/MT' },
|
|
54
|
-
},
|
|
55
|
-
{
|
|
56
|
-
id: 2,
|
|
57
|
-
name: 'Freight index — spot volume (China)',
|
|
58
|
-
status: 'active',
|
|
59
|
-
created_at: '2024-01-01',
|
|
60
|
-
updated_at: '2024-01-02',
|
|
61
|
-
keywords: '',
|
|
62
|
-
category: { id: 10, name: 'Chemicals' },
|
|
63
|
-
target_type_id: 2,
|
|
64
|
-
target_type: { id: 2, name: 'Freight index' },
|
|
65
|
-
trend: 0,
|
|
66
|
-
regular_price: '0',
|
|
67
|
-
sale_price: '0',
|
|
68
|
-
regions: [
|
|
69
|
-
{ id: 1, name: 'Asia' },
|
|
70
|
-
{ id: 2, name: 'China' },
|
|
71
|
-
],
|
|
72
|
-
unit: { id: 1, name: 'Index' },
|
|
73
|
-
},
|
|
74
|
-
{
|
|
75
|
-
id: 3,
|
|
76
|
-
name: 'Ethanol Price Europe Per Kg In USD',
|
|
77
|
-
status: 'active',
|
|
78
|
-
created_at: '2024-01-01',
|
|
79
|
-
updated_at: '2024-01-02',
|
|
80
|
-
keywords: '',
|
|
81
|
-
category: { id: 11, name: 'Energy' },
|
|
82
|
-
target_type_id: 1,
|
|
83
|
-
target_type: { id: 1, name: 'Commodity price' },
|
|
84
|
-
trend: 0,
|
|
85
|
-
regular_price: '0',
|
|
86
|
-
sale_price: '0',
|
|
87
|
-
regions: [{ id: 5, name: 'Europe' }],
|
|
88
|
-
unit: { id: 1, name: 'USD/kg' },
|
|
89
|
-
},
|
|
90
|
-
];
|
|
91
|
-
|
|
92
|
-
type PreviewPanel = 'home' | 'datasets';
|
|
93
|
-
|
|
94
|
-
const TEST_HEADER_ID = 'test-header-id';
|
|
95
|
-
|
|
96
|
-
const DOCS_WORKSPACE_APPS_LS_KEY = 'uilib.docs.workspaceApps';
|
|
97
|
-
|
|
98
|
-
const DOCS_PREVIEW_APPS: WorkspaceAppEntry[] = [
|
|
99
|
-
{
|
|
100
|
-
id: 'docs-home',
|
|
101
|
-
displayName: 'Datasets Dashboard',
|
|
102
|
-
subtitle: 'Data analysis tools',
|
|
103
|
-
iconKey: 'grid-four',
|
|
104
|
-
accent: '#0d9488',
|
|
105
|
-
accentMuted: 'rgba(13, 148, 136, 0.12)',
|
|
106
|
-
href: '/docs-preview/home',
|
|
107
|
-
matchPathPrefixes: ['/docs-preview/home'],
|
|
108
|
-
},
|
|
109
|
-
{
|
|
110
|
-
id: 'docs-datasets',
|
|
111
|
-
displayName: 'Datasets',
|
|
112
|
-
subtitle: 'Dataset library',
|
|
113
|
-
iconKey: 'package',
|
|
114
|
-
accent: '#6366f1',
|
|
115
|
-
accentMuted: 'rgba(99, 102, 241, 0.12)',
|
|
116
|
-
href: '/docs-preview/datasets',
|
|
117
|
-
matchPathPrefixes: ['/docs-preview/datasets'],
|
|
118
|
-
},
|
|
119
|
-
{
|
|
120
|
-
id: 'my-custom-app',
|
|
121
|
-
displayName: 'Custom app',
|
|
122
|
-
subtitle: 'Slug-only app (sybilion.io/apps/…)',
|
|
123
|
-
iconKey: 'boat',
|
|
124
|
-
accent: '#0ea5e9',
|
|
125
|
-
accentMuted: 'rgba(14, 165, 233, 0.12)',
|
|
126
|
-
href: '/apps/my-custom-app',
|
|
127
|
-
},
|
|
128
|
-
];
|
|
129
|
-
|
|
130
37
|
function DemoAppSidebar({
|
|
131
38
|
panel,
|
|
132
39
|
onSelectPanel,
|
|
@@ -139,11 +46,7 @@ function DemoAppSidebar({
|
|
|
139
46
|
onSelectDatasetId: (id: number | undefined) => void;
|
|
140
47
|
}) {
|
|
141
48
|
return (
|
|
142
|
-
<Sidebar
|
|
143
|
-
variant="inset"
|
|
144
|
-
collapsible="offcanvas"
|
|
145
|
-
style={{ maxHeight: '100%', height: '100%' }}
|
|
146
|
-
>
|
|
49
|
+
<Sidebar variant="inset" collapsible="offcanvas">
|
|
147
50
|
<SidebarContent>
|
|
148
51
|
<SidebarDatasetsItemsGrouped
|
|
149
52
|
preItems={
|
|
@@ -208,23 +111,24 @@ function DemoMainBody({ panel }: { panel: PreviewPanel }) {
|
|
|
208
111
|
box.
|
|
209
112
|
</p>
|
|
210
113
|
</PageContentSection>
|
|
114
|
+
<PageContentSection title="Scroll test">
|
|
115
|
+
<div className={S.scrollTestBlock}>
|
|
116
|
+
Placeholder region with <code>min-height: 100vh</code> — scroll the
|
|
117
|
+
main column to verify PageScroll / AppShell behavior.
|
|
118
|
+
</div>
|
|
119
|
+
</PageContentSection>
|
|
211
120
|
</PageContent>
|
|
212
121
|
</>
|
|
213
122
|
);
|
|
214
123
|
}
|
|
215
124
|
|
|
216
125
|
function StandaloneLayoutPreview() {
|
|
217
|
-
const [theme, setTheme] = useState<'light' | 'dark'>('light');
|
|
218
126
|
const [panel, setPanel] = useState<PreviewPanel>('home');
|
|
219
127
|
const [previewPath, setPreviewPath] = useState('/docs-preview/home');
|
|
220
128
|
const [selectedDatasetId, setSelectedDatasetId] = useState<
|
|
221
129
|
number | undefined
|
|
222
130
|
>();
|
|
223
131
|
|
|
224
|
-
const onThemeToggle = useCallback(() => {
|
|
225
|
-
setTheme(t => (t === 'dark' ? 'light' : 'dark'));
|
|
226
|
-
}, []);
|
|
227
|
-
|
|
228
132
|
return (
|
|
229
133
|
<div className={S.preview}>
|
|
230
134
|
<PageScroll rootClassName={S.previewScrollRoot}>
|
|
@@ -257,8 +161,6 @@ function StandaloneLayoutPreview() {
|
|
|
257
161
|
email: 'preview@example.com',
|
|
258
162
|
avatar: '',
|
|
259
163
|
}}
|
|
260
|
-
theme={theme}
|
|
261
|
-
onThemeToggle={onThemeToggle}
|
|
262
164
|
onLogout={() => undefined}
|
|
263
165
|
menuItems={
|
|
264
166
|
<>
|
package/src/docs/registry.ts
CHANGED
|
@@ -220,7 +220,8 @@ export const DOC_REGISTRY: DocEntry[] = [
|
|
|
220
220
|
slug: 'standalone-app-layout',
|
|
221
221
|
title: 'Standalone app layout',
|
|
222
222
|
section: 'Layout',
|
|
223
|
-
load: () =>
|
|
223
|
+
load: () =>
|
|
224
|
+
import('./pages/StandaloneAppLayoutPage/StandaloneAppLayoutPage'),
|
|
224
225
|
},
|
|
225
226
|
{
|
|
226
227
|
slug: 'progress',
|