@humandialog/forms.svelte 0.4.38 → 0.4.40
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/components/Fab.svelte +1 -0
- package/components/list/list.svelte +3 -0
- package/desk.svelte +9 -3
- package/horizontal.toolbar.svelte +4 -1
- package/package.json +1 -1
- package/stores.d.ts +1 -0
- package/stores.js +1 -0
- package/tenant.members.svelte +80 -1
package/components/Fab.svelte
CHANGED
|
@@ -7,6 +7,7 @@ $:
|
|
|
7
7
|
update($page_toolbar_operations, $context_toolbar_operations);
|
|
8
8
|
let operations = [];
|
|
9
9
|
function update(...args) {
|
|
10
|
+
expanded = false;
|
|
10
11
|
if ($context_toolbar_operations && $context_toolbar_operations.length > 0)
|
|
11
12
|
operations = $context_toolbar_operations;
|
|
12
13
|
else
|
|
@@ -137,6 +137,7 @@ export function edit(element, property_name) {
|
|
|
137
137
|
<hr class="w-full">
|
|
138
138
|
{/if}
|
|
139
139
|
|
|
140
|
+
<!--div class="w-full h-full overflow-y-auto"-->
|
|
140
141
|
|
|
141
142
|
{#if items && items.length > 0 && !!item_key }
|
|
142
143
|
{#each items as element, i (element[item_key])}
|
|
@@ -166,3 +167,5 @@ export function edit(element, property_name) {
|
|
|
166
167
|
bind:this={inserter} />
|
|
167
168
|
{/if}
|
|
168
169
|
|
|
170
|
+
<!--/div-->
|
|
171
|
+
|
package/desk.svelte
CHANGED
|
@@ -13,7 +13,8 @@
|
|
|
13
13
|
dark_mode_store,
|
|
14
14
|
data_tick_store,
|
|
15
15
|
set_default_tools_visible,
|
|
16
|
-
set_dark_mode_default
|
|
16
|
+
set_dark_mode_default,
|
|
17
|
+
sidebar_left_pos } from './stores.js'
|
|
17
18
|
|
|
18
19
|
import { AuthorizedView} from '@humandialog/auth.svelte'
|
|
19
20
|
import { handle_select, is_device_smaller_than } from './utils'
|
|
@@ -186,11 +187,15 @@
|
|
|
186
187
|
<!--#######################################################-->
|
|
187
188
|
<!--## MAIN SIDE BAR ##################-->
|
|
188
189
|
<!--#######################################################-->
|
|
190
|
+
{#if true}
|
|
191
|
+
{@const sidebar_left = $sidebar_left_pos==0 ? "left-0" : "left-[40px]"}
|
|
192
|
+
{@const sidebar_small_width = $sidebar_left_pos==0 ? "w-full" : "w-[calc(100vw-40px)]"}
|
|
193
|
+
|
|
189
194
|
<div class="{main_side_panel_visibility}
|
|
190
|
-
|
|
195
|
+
{sidebar_left} sm:left-[40px]
|
|
191
196
|
top-[40px] sm:top-0
|
|
192
197
|
h-[calc(100vh-40px)] sm:h-full {lg_main_sidebar_height}
|
|
193
|
-
|
|
198
|
+
{sidebar_small_width} sm:w-[320px]
|
|
194
199
|
z-20 overflow-x-hidden">
|
|
195
200
|
|
|
196
201
|
<div class=" bg-slate-50 w-full h-full dark:bg-slate-800 overflow-y-auto py-4 px-0">
|
|
@@ -199,6 +204,7 @@
|
|
|
199
204
|
</Configurable>
|
|
200
205
|
</div>
|
|
201
206
|
</div>
|
|
207
|
+
{/if}
|
|
202
208
|
|
|
203
209
|
<section on:click|capture={auto_hide_sidebar}>
|
|
204
210
|
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
tools_visible_store,
|
|
23
23
|
bottom_bar_visible_store,
|
|
24
24
|
previously_visible_sidebar,
|
|
25
|
-
main_sidebar_visible_store
|
|
25
|
+
main_sidebar_visible_store,
|
|
26
|
+
sidebar_left_pos
|
|
26
27
|
} from "./stores.js";
|
|
27
28
|
import Icon from './components/icon.svelte';
|
|
28
29
|
import {session, signin_href, signout_href} from '@humandialog/auth.svelte'
|
|
@@ -66,6 +67,7 @@
|
|
|
66
67
|
{
|
|
67
68
|
if(tabs.length == 1)
|
|
68
69
|
{
|
|
70
|
+
$sidebar_left_pos = 0;
|
|
69
71
|
toggle_sidebar(tabs[0]);
|
|
70
72
|
}
|
|
71
73
|
else
|
|
@@ -79,6 +81,7 @@
|
|
|
79
81
|
sidebar = previously_visible_sidebar;
|
|
80
82
|
}
|
|
81
83
|
|
|
84
|
+
$sidebar_left_pos = 40;
|
|
82
85
|
toggle_sidebar(sidebar)
|
|
83
86
|
}
|
|
84
87
|
}
|
package/package.json
CHANGED
package/stores.d.ts
CHANGED
|
@@ -27,6 +27,7 @@ export const page_toolbar_operations: import("svelte/store").Writable<never[]>;
|
|
|
27
27
|
export const dark_mode_store: import("svelte/store").Writable<any>;
|
|
28
28
|
export const main_sidebar_visible_store: import("svelte/store").Writable<any>;
|
|
29
29
|
export let previously_visible_sidebar: string;
|
|
30
|
+
export let sidebar_left_pos: import("svelte/store").Writable<number>;
|
|
30
31
|
export const tools_visible_store: import("svelte/store").Writable<any>;
|
|
31
32
|
export const bottom_bar_visible_store: import("svelte/store").Writable<any>;
|
|
32
33
|
export const right_sidebar_visible_store: import("svelte/store").Writable<boolean>;
|
package/stores.js
CHANGED
|
@@ -46,6 +46,7 @@ export const main_sidebar_visible_store = writable((localStorage.main_sidebar_vi
|
|
|
46
46
|
main_sidebar_visible_store.subscribe( (value) => { localStorage.main_sidebar_visible_store = value });
|
|
47
47
|
|
|
48
48
|
export let previously_visible_sidebar = "";
|
|
49
|
+
export let sidebar_left_pos = writable(0)
|
|
49
50
|
|
|
50
51
|
let has_saved_tools_visible = false;
|
|
51
52
|
function create_tools_visible_store()
|
package/tenant.members.svelte
CHANGED
|
@@ -42,6 +42,8 @@
|
|
|
42
42
|
let reef_users = [];
|
|
43
43
|
let new_reef_user_id = 1;
|
|
44
44
|
|
|
45
|
+
let fake_users;
|
|
46
|
+
|
|
45
47
|
async function init()
|
|
46
48
|
{
|
|
47
49
|
reef_users = [];
|
|
@@ -68,6 +70,9 @@
|
|
|
68
70
|
})
|
|
69
71
|
}
|
|
70
72
|
|
|
73
|
+
//fake_users = [];
|
|
74
|
+
//add_fake_users(fake_users);
|
|
75
|
+
|
|
71
76
|
await fetch_details();
|
|
72
77
|
|
|
73
78
|
}
|
|
@@ -84,7 +89,11 @@
|
|
|
84
89
|
|
|
85
90
|
handled_no++;
|
|
86
91
|
if(handled_no == reef_users.length)
|
|
92
|
+
{
|
|
93
|
+
|
|
94
|
+
|
|
87
95
|
list?.update_objects(reef_users);
|
|
96
|
+
}
|
|
88
97
|
} )
|
|
89
98
|
}
|
|
90
99
|
|
|
@@ -294,6 +303,74 @@
|
|
|
294
303
|
return !!s;
|
|
295
304
|
}
|
|
296
305
|
|
|
306
|
+
function add_fake_users(reef_users)
|
|
307
|
+
{
|
|
308
|
+
const names = [
|
|
309
|
+
"Evangeline Burnett",
|
|
310
|
+
"Veronica Shaffer",
|
|
311
|
+
"Evan Moyer",
|
|
312
|
+
"Maisey Knox",
|
|
313
|
+
"Princess Taylor",
|
|
314
|
+
"Lilli Brown",
|
|
315
|
+
"Celine Terrell",
|
|
316
|
+
"Alexander Simmons",
|
|
317
|
+
"Leslie Rowland",
|
|
318
|
+
"Amira Reeves",
|
|
319
|
+
"Remi Parks",
|
|
320
|
+
"Daniela Holder",
|
|
321
|
+
"Sonny Watkins",
|
|
322
|
+
"Kiran Patton",
|
|
323
|
+
"Nadia O'Brien",
|
|
324
|
+
"Aine Lyons",
|
|
325
|
+
"Arran Mccoy",
|
|
326
|
+
"Aliya Hart",
|
|
327
|
+
"Zara Ross",
|
|
328
|
+
"Chad Ramirez",
|
|
329
|
+
"Aron Briggs",
|
|
330
|
+
"Nicole Hall",
|
|
331
|
+
"Mitchell Hendricks",
|
|
332
|
+
"Lila Chandler",
|
|
333
|
+
"Carter Padilla",
|
|
334
|
+
"Christian Thompson",
|
|
335
|
+
"Ishaq Smith",
|
|
336
|
+
"Sofia Blanchard",
|
|
337
|
+
"Taha Kelly",
|
|
338
|
+
"Jensen Huber",
|
|
339
|
+
"Jaya Hewitt",
|
|
340
|
+
"Hari Nielsen",
|
|
341
|
+
"Celeste Higgins",
|
|
342
|
+
"Soraya Farrell",
|
|
343
|
+
"Jacob Copeland",
|
|
344
|
+
"Robbie Soto",
|
|
345
|
+
"Krishan Kelley",
|
|
346
|
+
"Erica Ferrell",
|
|
347
|
+
"Moshe Valenzuela",
|
|
348
|
+
"Ahmed Mathews",
|
|
349
|
+
"Emilie Moore",
|
|
350
|
+
"Anisa Gamble",
|
|
351
|
+
"Esmee Haines",
|
|
352
|
+
"Francesca Fischer",
|
|
353
|
+
"Md Mcdaniel",
|
|
354
|
+
"Saarah Zamora",
|
|
355
|
+
"Tomos Ponce",
|
|
356
|
+
"Sonia Barrera",
|
|
357
|
+
"Pedro Hogan",
|
|
358
|
+
"Connie Weeks"
|
|
359
|
+
]
|
|
360
|
+
const how_many = 50
|
|
361
|
+
for(let i=0; i<how_many; i++)
|
|
362
|
+
{
|
|
363
|
+
reef_users.push(
|
|
364
|
+
{
|
|
365
|
+
[name_attrib]: names[i],
|
|
366
|
+
[email_attrib]: 'u@fake.com',
|
|
367
|
+
[ref_attrib]: `./User/${1000+i}`,
|
|
368
|
+
__hd_internal_item_id: 1000+i
|
|
369
|
+
}
|
|
370
|
+
)
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
297
374
|
async function on_new_user_requested()
|
|
298
375
|
{
|
|
299
376
|
if(!name_input?.validate())
|
|
@@ -328,6 +405,8 @@
|
|
|
328
405
|
list?.update_objects(reef_users);
|
|
329
406
|
}
|
|
330
407
|
|
|
408
|
+
|
|
409
|
+
|
|
331
410
|
new_user.name = '';
|
|
332
411
|
new_user.email = '';
|
|
333
412
|
new_user.maintainer = false;
|
|
@@ -345,7 +424,7 @@
|
|
|
345
424
|
</script>
|
|
346
425
|
|
|
347
426
|
<Page self={data_item}
|
|
348
|
-
cl="!bg-white dark:!bg-slate-900 w-full h-full flex flex-col overflow-y-
|
|
427
|
+
cl="!bg-white dark:!bg-slate-900 w-full h-full flex flex-col overflow-y-auto overflow-x-hidden py-1 px-1 border-0"
|
|
349
428
|
toolbar_operations={page_operations}
|
|
350
429
|
clears_context='props sel'>
|
|
351
430
|
<a href="/" class="underline text-sm font-semibold ml-3"> < Back to root</a>
|