@humandialog/forms.svelte 1.8.9 → 1.8.11
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/contextmenu.svelte +9 -2
- package/components/kanban/Kanban.d.ts +1 -0
- package/components/kanban/Kanban.js +1 -0
- package/components/kanban/internal/kanban.column.svelte +12 -9
- package/components/kanban/internal/kanban.column.svelte.d.ts +2 -0
- package/components/kanban/kanban.column.svelte +2 -0
- package/components/kanban/kanban.column.svelte.d.ts +1 -0
- package/components/kanban/kanban.svelte +105 -20
- package/components/kanban/kanban.svelte.d.ts +6 -0
- package/components/list/internal/list.element.properties.svelte +76 -4
- package/components/list/internal/list.element.svelte +35 -24
- package/components/r.icon.svelte +9 -1
- package/components/ricons/external-link.svelte +21 -0
- package/components/ricons/external-link.svelte.d.ts +27 -0
- package/components/ricons/settings.svelte +21 -0
- package/components/ricons/settings.svelte.d.ts +27 -0
- package/components/ricons/toggle-left.svelte +19 -0
- package/components/ricons/toggle-left.svelte.d.ts +27 -0
- package/components/ricons/toggle-right.svelte +19 -0
- package/components/ricons/toggle-right.svelte.d.ts +27 -0
- package/desk.svelte +24 -25
- package/horizontal.nav.tabs.svelte +13 -8
- package/modal.svelte +9 -0
- package/modal.svelte.d.ts +6 -0
- package/package.json +6 -1
- package/page.svelte +1 -1
- package/paper.svelte +8 -9
- package/paper.table.svelte +6 -4
- package/tenant.members.svelte +54 -49
- package/tenant.user.props.svelte +295 -0
- package/tenant.user.props.svelte.d.ts +32 -0
- package/vertical.toolbar.svelte +13 -8
|
@@ -507,9 +507,16 @@ function isOperationDisabled(operation) {
|
|
|
507
507
|
|
|
508
508
|
|
|
509
509
|
<h4 class = "font-normal my-0 py-2"> <!-- test -->
|
|
510
|
-
<div class=" w-full flex flex-row justify-between">
|
|
510
|
+
<div class=" w-full flex flex-row justify-between">
|
|
511
511
|
{#if operation.mricon}
|
|
512
|
-
|
|
512
|
+
{@const color=operation.color ?? ''}
|
|
513
|
+
<div class="py-1 mr-1 w-4 {color}"><Ricon icon = {operation.mricon} s/></div>
|
|
514
|
+
{:else if operation.toggle !== undefined}
|
|
515
|
+
{#if operation.toggle}
|
|
516
|
+
<div class="py-1 mr-1 w-4 text-orange-800 dark:text-orange-200"><Ricon icon='toggle-right' s/></div>
|
|
517
|
+
{:else}
|
|
518
|
+
<div class="py-1 mr-1 w-4"><Ricon icon='toggle-left' s/></div>
|
|
519
|
+
{/if}
|
|
513
520
|
{:else if operation.icon}
|
|
514
521
|
<div class="py-1 mr-1 w-4 text-orange-500"><Icon s="md" component={operation.icon}/></div>
|
|
515
522
|
{:else}
|
|
@@ -8,6 +8,7 @@ import { FaPlus, FaCheck } from "svelte-icons/fa";
|
|
|
8
8
|
import Icon from "../../r.icon.svelte";
|
|
9
9
|
export let currentColumnIdx;
|
|
10
10
|
export let onInsert;
|
|
11
|
+
export let definition;
|
|
11
12
|
let column_element;
|
|
12
13
|
export function getHeight() {
|
|
13
14
|
if (!column_element)
|
|
@@ -40,7 +41,6 @@ export function setBorder(what_to_do) {
|
|
|
40
41
|
break;
|
|
41
42
|
}
|
|
42
43
|
}
|
|
43
|
-
let definition = getContext("rKanban-definition");
|
|
44
44
|
let columnDef = definition.columns[currentColumnIdx];
|
|
45
45
|
let column_items = void 0;
|
|
46
46
|
$:
|
|
@@ -55,7 +55,9 @@ $:
|
|
|
55
55
|
focused_class = is_row_active ? "bg-stone-50 dark:bg-stone-800" : "";
|
|
56
56
|
$:
|
|
57
57
|
force_rerender($data_tick_store, $contextItemsStore);
|
|
58
|
+
let is_visible = false;
|
|
58
59
|
export function reload() {
|
|
60
|
+
columnDef = definition.columns[currentColumnIdx];
|
|
59
61
|
let allItems = definition.getItems();
|
|
60
62
|
if (definition.stateAttrib) {
|
|
61
63
|
if (columnDef.state < 0) {
|
|
@@ -73,6 +75,7 @@ export function reload() {
|
|
|
73
75
|
} else
|
|
74
76
|
column_items = allItems.filter((e) => e[definition.stateAttrib] == columnDef.state);
|
|
75
77
|
}
|
|
78
|
+
is_visible = isVisible();
|
|
76
79
|
}
|
|
77
80
|
export function isVisible() {
|
|
78
81
|
if (columnDef.state < 0) {
|
|
@@ -81,7 +84,7 @@ export function isVisible() {
|
|
|
81
84
|
else
|
|
82
85
|
return false;
|
|
83
86
|
} else
|
|
84
|
-
return
|
|
87
|
+
return !columnDef.notVisible;
|
|
85
88
|
}
|
|
86
89
|
function setup_data(...args) {
|
|
87
90
|
reload();
|
|
@@ -226,20 +229,20 @@ async function dblclick(e) {
|
|
|
226
229
|
|
|
227
230
|
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
228
231
|
|
|
229
|
-
{#if
|
|
232
|
+
{#if is_visible}
|
|
230
233
|
|
|
231
234
|
<div class=" snap-center
|
|
232
|
-
|
|
235
|
+
xsm:snap-start
|
|
236
|
+
flex-none
|
|
233
237
|
|
|
234
238
|
w-full
|
|
235
|
-
|
|
236
|
-
flex-none
|
|
237
239
|
sm:w-1/2
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
sm:px-4
|
|
240
|
+
lg:w-1/3
|
|
241
|
+
2xl:w-1/4
|
|
241
242
|
|
|
243
|
+
sm:px-4
|
|
242
244
|
|
|
245
|
+
xbg-stone-900
|
|
243
246
|
|
|
244
247
|
|
|
245
248
|
{selected_class} {focused_class}"
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { SvelteComponentTyped } from "svelte";
|
|
2
|
+
import type { rKanban_definition } from '../Kanban';
|
|
2
3
|
declare const __propDef: {
|
|
3
4
|
props: {
|
|
4
5
|
currentColumnIdx: number;
|
|
5
6
|
onInsert: Function;
|
|
7
|
+
definition: rKanban_definition;
|
|
6
8
|
getHeight?: (() => number) | undefined;
|
|
7
9
|
editName?: ((onFinish?: Function | undefined) => void) | undefined;
|
|
8
10
|
SET_LEFT?: 0 | undefined;
|
|
@@ -6,6 +6,7 @@ export let state = "";
|
|
|
6
6
|
export let finishing = false;
|
|
7
7
|
export let operations = void 0;
|
|
8
8
|
export let onTitleChanged = void 0;
|
|
9
|
+
export let notVisible = false;
|
|
9
10
|
let definition = getContext("rKanban-definition");
|
|
10
11
|
let column = new rKanban_column();
|
|
11
12
|
column.id = definition.columns.length + 1;
|
|
@@ -15,6 +16,7 @@ column.state = state;
|
|
|
15
16
|
column.finishing = finishing;
|
|
16
17
|
column.operations = operations;
|
|
17
18
|
column.onTitleChanged = onTitleChanged;
|
|
19
|
+
column.notVisible = notVisible;
|
|
18
20
|
definition.columns.push(column);
|
|
19
21
|
</script>
|
|
20
22
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>import { setContext, getContext, afterUpdate, tick } from "svelte";
|
|
2
|
-
import { KanbanColumnBottom, KanbanColumnTop, rKanban_definition } from "./Kanban";
|
|
2
|
+
import { KanbanColumnBottom, KanbanColumnTop, rKanban_definition, rKanban_column } from "./Kanban";
|
|
3
3
|
import { parseWidthDirective, clearActiveItem, getPrev, getNext, remove, insertAt, insertAfter, swapElements, getActive } from "../../utils";
|
|
4
4
|
import { contextItemsStore, contextTypesStore, data_tick_store } from "../../stores";
|
|
5
5
|
import KanbanColumn from "./internal/kanban.column.svelte";
|
|
@@ -102,7 +102,7 @@ export async function reload(data, selectElement = KEEP_SELECTION) {
|
|
|
102
102
|
else
|
|
103
103
|
definition.self = data;
|
|
104
104
|
definition.items = null;
|
|
105
|
-
columns
|
|
105
|
+
columns?.forEach((c2) => c2?.reload());
|
|
106
106
|
await tick();
|
|
107
107
|
allItems = definition.getItems();
|
|
108
108
|
if (selectElementId > 0) {
|
|
@@ -192,6 +192,74 @@ export function moveDown(item) {
|
|
|
192
192
|
pushChanges();
|
|
193
193
|
column.reload();
|
|
194
194
|
}
|
|
195
|
+
export function moveTop(item) {
|
|
196
|
+
let allItems = definition.getItems();
|
|
197
|
+
const oa = definition.orderAttrib;
|
|
198
|
+
const sa = definition.stateAttrib;
|
|
199
|
+
const columnIdx = getColumnIdx(item);
|
|
200
|
+
const columnState = definition.columns[columnIdx].state;
|
|
201
|
+
const toListTop = allItems.find((e) => e[sa] == columnState);
|
|
202
|
+
const toListBottom = allItems.findLast((e) => e[sa] == columnState);
|
|
203
|
+
if (item == toListTop)
|
|
204
|
+
return;
|
|
205
|
+
const columnElement = columns[columnIdx];
|
|
206
|
+
const prevItem = getPrev(allItems, toListTop);
|
|
207
|
+
if (!prevItem) {
|
|
208
|
+
item[oa] = toListTop[oa] - ORDER_STEP;
|
|
209
|
+
informModification(item, oa);
|
|
210
|
+
remove(allItems, item);
|
|
211
|
+
insertAt(allItems, 0, item);
|
|
212
|
+
} else {
|
|
213
|
+
let prevOrder = prevItem[oa];
|
|
214
|
+
let nextOrder = toListTop[oa];
|
|
215
|
+
let orderSpace = nextOrder - prevOrder;
|
|
216
|
+
if (orderSpace < 2) {
|
|
217
|
+
reorderElements(allItems, prevItem, false);
|
|
218
|
+
prevOrder = prevItem[oa];
|
|
219
|
+
nextOrder = toListTop[oa];
|
|
220
|
+
orderSpace = nextOrder - prevOrder;
|
|
221
|
+
}
|
|
222
|
+
item[oa] = prevOrder + Math.floor(orderSpace / 2);
|
|
223
|
+
informModification(item, oa);
|
|
224
|
+
remove(allItems, item);
|
|
225
|
+
insertAfter(allItems, prevItem, item);
|
|
226
|
+
}
|
|
227
|
+
columnElement.reload();
|
|
228
|
+
}
|
|
229
|
+
export function moveBottom(item) {
|
|
230
|
+
let allItems = definition.getItems();
|
|
231
|
+
const oa = definition.orderAttrib;
|
|
232
|
+
const sa = definition.stateAttrib;
|
|
233
|
+
const columnIdx = getColumnIdx(item);
|
|
234
|
+
const columnState = definition.columns[columnIdx].state;
|
|
235
|
+
const toListTop = allItems.find((e) => e[sa] == columnState);
|
|
236
|
+
const toListBottom = allItems.findLast((e) => e[sa] == columnState);
|
|
237
|
+
if (item == toListBottom)
|
|
238
|
+
return;
|
|
239
|
+
const columnElement = columns[columnIdx];
|
|
240
|
+
const nextItem = getNext(allItems, toListBottom);
|
|
241
|
+
if (!nextItem) {
|
|
242
|
+
item[oa] = toListBottom[oa] + ORDER_STEP;
|
|
243
|
+
informModification(item, oa);
|
|
244
|
+
remove(allItems, item);
|
|
245
|
+
insertAfter(allItems, toListBottom, item);
|
|
246
|
+
} else {
|
|
247
|
+
let nextOrder = nextItem[oa];
|
|
248
|
+
let prevOrder = toListBottom[oa];
|
|
249
|
+
let orderSpace = nextOrder - prevOrder;
|
|
250
|
+
if (orderSpace < 2) {
|
|
251
|
+
reorderElements(allItems, toListBottom, false);
|
|
252
|
+
prevOrder = toListBottom[oa];
|
|
253
|
+
nextOrder = nextItem[oa];
|
|
254
|
+
orderSpace = nextOrder - prevOrder;
|
|
255
|
+
}
|
|
256
|
+
item[oa] = prevOrder + Math.floor(orderSpace / 2);
|
|
257
|
+
informModification(item, oa);
|
|
258
|
+
remove(allItems, item);
|
|
259
|
+
insertAfter(allItems, toListBottom, item);
|
|
260
|
+
}
|
|
261
|
+
columnElement.reload();
|
|
262
|
+
}
|
|
195
263
|
const ORDER_STEP = 64;
|
|
196
264
|
const MIN_ORDER = 0;
|
|
197
265
|
function reorderElements(items, from = null, pushImediatelly = true) {
|
|
@@ -426,13 +494,27 @@ export function setCardsState(items, state) {
|
|
|
426
494
|
item[sa] = state;
|
|
427
495
|
informModification(item, sa);
|
|
428
496
|
});
|
|
429
|
-
pushChanges();
|
|
430
497
|
}
|
|
431
498
|
export function add(item, columnIdx = -1) {
|
|
432
499
|
if (columnIdx < 0)
|
|
433
500
|
columnIdx = getColumnIdx(item);
|
|
434
501
|
columns[columnIdx].add(item);
|
|
435
502
|
}
|
|
503
|
+
export function setColumns(columnsDefinition) {
|
|
504
|
+
definition.columns = [];
|
|
505
|
+
columnsDefinition.forEach((c2) => {
|
|
506
|
+
let column = new rKanban_column();
|
|
507
|
+
column.id = definition.columns.length + 1;
|
|
508
|
+
column.title = c2.title;
|
|
509
|
+
column.width = c2.width ?? "";
|
|
510
|
+
column.state = c2.state;
|
|
511
|
+
column.finishing = c2.finishing ?? false;
|
|
512
|
+
column.notVisible = c2.notVisible ?? false;
|
|
513
|
+
column.operations = c2.operations ?? void 0;
|
|
514
|
+
column.onTitleChanged = c2.onTitleChanged ?? void 0;
|
|
515
|
+
definition.columns.push(column);
|
|
516
|
+
});
|
|
517
|
+
}
|
|
436
518
|
</script>
|
|
437
519
|
|
|
438
520
|
{#key renderToken}
|
|
@@ -445,35 +527,38 @@ export function add(item, columnIdx = -1) {
|
|
|
445
527
|
|
|
446
528
|
<!--hr class="hidden sm:block w-full"-->
|
|
447
529
|
|
|
448
|
-
<
|
|
530
|
+
<div id="__hd_svelte_kanban_columns_container"
|
|
449
531
|
class="h-full flex flex-row no-wrap
|
|
450
|
-
overflow-x-scroll sm:overflow-x-visible
|
|
532
|
+
overflow-x-scroll grow sm:overflow-x-visible
|
|
451
533
|
snap-x snap-mandatory
|
|
452
534
|
xbg-lime-500
|
|
453
535
|
sm: space-x-0
|
|
454
536
|
sm:divide-x
|
|
455
537
|
divide-stone-500 dark:divide-stone-700
|
|
456
538
|
pb-20
|
|
539
|
+
xbg-lime-800
|
|
457
540
|
"> <!--sm:justify-center -->
|
|
458
|
-
{#each definition.columns as column, idx (column.
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
541
|
+
{#each definition.columns as column, idx (column.title + column.state)}
|
|
542
|
+
<KanbanColumn currentColumnIdx={idx}
|
|
543
|
+
{onInsert}
|
|
544
|
+
{definition}
|
|
545
|
+
bind:this={columns[idx]}>
|
|
462
546
|
|
|
463
547
|
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
548
|
+
<svelte:fragment slot="kanbanCardTopProps" let:element>
|
|
549
|
+
<slot name="kanbanCardTopProps" {element}/>
|
|
550
|
+
</svelte:fragment>
|
|
467
551
|
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
552
|
+
<svelte:fragment slot="kanbanCardMiddleProps" let:element>
|
|
553
|
+
<slot name="kanbanCardMiddleProps" {element}/>
|
|
554
|
+
</svelte:fragment>
|
|
471
555
|
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
556
|
+
<svelte:fragment slot="kanbanCardBottomProps" let:element>
|
|
557
|
+
<slot name="kanbanCardBottomProps" {element}/>
|
|
558
|
+
</svelte:fragment>
|
|
475
559
|
|
|
476
|
-
|
|
560
|
+
</KanbanColumn>
|
|
561
|
+
|
|
477
562
|
{/each}
|
|
478
|
-
</
|
|
563
|
+
</div>
|
|
479
564
|
{/key}
|
|
@@ -20,12 +20,15 @@ declare const __propDef: {
|
|
|
20
20
|
scrollViewToCard?: ((item: any) => void) | undefined;
|
|
21
21
|
moveUp?: ((item: object) => void) | undefined;
|
|
22
22
|
moveDown?: ((item: object) => void) | undefined;
|
|
23
|
+
moveTop?: ((item: object) => void) | undefined;
|
|
24
|
+
moveBottom?: ((item: object) => void) | undefined;
|
|
23
25
|
replace?: ((item: any, toColumnIdx: any, afterElement: any) => Promise<void>) | undefined;
|
|
24
26
|
activateColumn?: ((columnIdx: number) => void) | undefined;
|
|
25
27
|
editColumnName?: ((columnIdx: number, onFinish?: Function | undefined) => void) | undefined;
|
|
26
28
|
moveCardsTo?: ((items: object[], toColumnIdx: number) => void) | undefined;
|
|
27
29
|
setCardsState?: ((items: object[], state: number) => void) | undefined;
|
|
28
30
|
add?: ((item: object | number, columnIdx?: number) => void) | undefined;
|
|
31
|
+
setColumns?: ((columnsDefinition: any) => void) | undefined;
|
|
29
32
|
};
|
|
30
33
|
events: {
|
|
31
34
|
[evt: string]: CustomEvent<any>;
|
|
@@ -61,11 +64,14 @@ export default class Kanban extends SvelteComponentTyped<KanbanProps, KanbanEven
|
|
|
61
64
|
get scrollViewToCard(): (item: any) => void;
|
|
62
65
|
get moveUp(): (item: object) => void;
|
|
63
66
|
get moveDown(): (item: object) => void;
|
|
67
|
+
get moveTop(): (item: object) => void;
|
|
68
|
+
get moveBottom(): (item: object) => void;
|
|
64
69
|
get replace(): (item: any, toColumnIdx: any, afterElement: any) => Promise<void>;
|
|
65
70
|
get activateColumn(): (columnIdx: number) => void;
|
|
66
71
|
get editColumnName(): (columnIdx: number, onFinish?: Function | undefined) => void;
|
|
67
72
|
get moveCardsTo(): (items: object[], toColumnIdx: number) => void;
|
|
68
73
|
get setCardsState(): (items: object[], state: number) => void;
|
|
69
74
|
get add(): (item: number | object, columnIdx?: number) => void;
|
|
75
|
+
get setColumns(): (columnsDefinition: any) => void;
|
|
70
76
|
}
|
|
71
77
|
export {};
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
|
|
2
2
|
<script>import RIcon from "../../r.icon.svelte";
|
|
3
3
|
import { getNiceStringDate } from "../../date_utils";
|
|
4
|
+
import DatePicker from "../../date.svelte";
|
|
5
|
+
import Combo from "../../combo/combo.svelte";
|
|
4
6
|
export let self;
|
|
5
7
|
export let properties = void 0;
|
|
6
8
|
export let icons_size = "s";
|
|
@@ -11,6 +13,8 @@ function properties_visible(group) {
|
|
|
11
13
|
let prop = group[0];
|
|
12
14
|
if (prop[0] == "#" || prop[0] == "&" || prop[0] == ":")
|
|
13
15
|
prop = prop.substr(1);
|
|
16
|
+
else if (prop[0] == "^")
|
|
17
|
+
prop = prop_combo_a(prop);
|
|
14
18
|
if (self[prop])
|
|
15
19
|
return true;
|
|
16
20
|
}
|
|
@@ -23,10 +27,12 @@ function properties_line_visible() {
|
|
|
23
27
|
return true;
|
|
24
28
|
if (properties_visible(properties.c))
|
|
25
29
|
return true;
|
|
30
|
+
if (properties_visible(properties.r))
|
|
31
|
+
return true;
|
|
26
32
|
return false;
|
|
27
33
|
}
|
|
28
34
|
function prop_is_text(prop) {
|
|
29
|
-
if (prop[0] != "#" && prop[0] != "&" && prop[0] != ":")
|
|
35
|
+
if (prop[0] != "#" && prop[0] != "&" && prop[0] != ":" && prop[0] != "^")
|
|
30
36
|
return true;
|
|
31
37
|
return false;
|
|
32
38
|
}
|
|
@@ -45,6 +51,48 @@ function prop_is_date(prop) {
|
|
|
45
51
|
return true;
|
|
46
52
|
return false;
|
|
47
53
|
}
|
|
54
|
+
function prop_is_combo(prop) {
|
|
55
|
+
if (prop[0] == "^")
|
|
56
|
+
return true;
|
|
57
|
+
return false;
|
|
58
|
+
}
|
|
59
|
+
function prop_combo_a(prop) {
|
|
60
|
+
const segments = prop.split(";");
|
|
61
|
+
if (segments.length < 2)
|
|
62
|
+
return null;
|
|
63
|
+
const a = segments[0].substr(1);
|
|
64
|
+
return a;
|
|
65
|
+
}
|
|
66
|
+
function prop_combo_info(prop) {
|
|
67
|
+
const segments = prop.split(";");
|
|
68
|
+
if (segments.length < 2)
|
|
69
|
+
return null;
|
|
70
|
+
let entries = [];
|
|
71
|
+
const a = segments[0].substr(1);
|
|
72
|
+
const collection_a = segments[1];
|
|
73
|
+
let name_a = "Name";
|
|
74
|
+
if (segments.length > 2)
|
|
75
|
+
name_a = segments[2];
|
|
76
|
+
let key_a = "$ref";
|
|
77
|
+
if (segments.length > 3)
|
|
78
|
+
key_a = segments[3];
|
|
79
|
+
const isAssoc = key_a == "$ref";
|
|
80
|
+
if (collection_a[0] == "#") {
|
|
81
|
+
} else {
|
|
82
|
+
entries = self[collection_a];
|
|
83
|
+
}
|
|
84
|
+
let combo_info = {
|
|
85
|
+
a,
|
|
86
|
+
def: {
|
|
87
|
+
source: [],
|
|
88
|
+
collection: entries,
|
|
89
|
+
element_key: key_a,
|
|
90
|
+
element_name: name_a
|
|
91
|
+
},
|
|
92
|
+
association: isAssoc
|
|
93
|
+
};
|
|
94
|
+
return combo_info;
|
|
95
|
+
}
|
|
48
96
|
</script>
|
|
49
97
|
|
|
50
98
|
{#if properties_line_visible() }
|
|
@@ -62,7 +110,15 @@ function prop_is_date(prop) {
|
|
|
62
110
|
{:else if prop_is_tnumber(prop)}
|
|
63
111
|
<span>{ Number(self[prop.substr(1)]/1000) }</span>
|
|
64
112
|
{:else if prop_is_date(prop)}
|
|
65
|
-
<
|
|
113
|
+
<DatePicker {self} a={prop.substr(1)} typo compact inContext="props"/>
|
|
114
|
+
{:else if prop_is_combo(prop)}
|
|
115
|
+
{@const info=prop_combo_info(prop)}
|
|
116
|
+
{#if info}
|
|
117
|
+
<Combo compact typo inContext="props"
|
|
118
|
+
{self} a={info.a}
|
|
119
|
+
isAssociation={info.association}
|
|
120
|
+
definition={info.def}/>
|
|
121
|
+
{/if}
|
|
66
122
|
{:else}
|
|
67
123
|
<span>{prop}</span>
|
|
68
124
|
{/if}
|
|
@@ -82,7 +138,15 @@ function prop_is_date(prop) {
|
|
|
82
138
|
{:else if prop_is_tnumber(prop)}
|
|
83
139
|
<span>{ Number(self[prop.substr(1)]/1000) }</span>
|
|
84
140
|
{:else if prop_is_date(prop)}
|
|
85
|
-
<
|
|
141
|
+
<DatePicker {self} a={prop.substr(1)} typo compact inContext="props"/>
|
|
142
|
+
{:else if prop_is_combo(prop)}
|
|
143
|
+
{@const info=prop_combo_info(prop)}
|
|
144
|
+
{#if info}
|
|
145
|
+
<Combo compact typo inContext="props"
|
|
146
|
+
{self} a={info.a}
|
|
147
|
+
isAssociation={info.association}
|
|
148
|
+
definition={info.def}/>
|
|
149
|
+
{/if}
|
|
86
150
|
{:else}
|
|
87
151
|
<span>{prop}</span>
|
|
88
152
|
{/if}
|
|
@@ -102,7 +166,15 @@ function prop_is_date(prop) {
|
|
|
102
166
|
{:else if prop_is_tnumber(prop)}
|
|
103
167
|
<span>{ Number(self[prop.substr(1)]/1000) }</span>
|
|
104
168
|
{:else if prop_is_date(prop)}
|
|
105
|
-
<
|
|
169
|
+
<DatePicker {self} a={prop.substr(1)} typo compact inContext="props"/>
|
|
170
|
+
{:else if prop_is_combo(prop)}
|
|
171
|
+
{@const info=prop_combo_info(prop)}
|
|
172
|
+
{#if info}
|
|
173
|
+
<Combo compact typo inContext="props"
|
|
174
|
+
{self} a={info.a}
|
|
175
|
+
isAssociation={info.association}
|
|
176
|
+
definition={info.def}/>
|
|
177
|
+
{/if}
|
|
106
178
|
{:else}
|
|
107
179
|
<span>{prop}</span>
|
|
108
180
|
{/if}
|
|
@@ -245,10 +245,11 @@ async function onDownloadFile(e) {
|
|
|
245
245
|
bind:this={rootElement}
|
|
246
246
|
use:selectable={item}
|
|
247
247
|
on:click={(e) => {activate_row(e, item)}}>
|
|
248
|
-
<!--
|
|
248
|
+
<!-- top info -->
|
|
249
249
|
<figcaption>
|
|
250
250
|
<ListElementProperties self = {item} properties = {element_properties?.t}/>
|
|
251
251
|
</figcaption>
|
|
252
|
+
|
|
252
253
|
<!-------------------------------->
|
|
253
254
|
<!--@el------------------------->
|
|
254
255
|
<h4 class="-indent-8 sm:hover:cursor-default">
|
|
@@ -257,21 +258,25 @@ async function onDownloadFile(e) {
|
|
|
257
258
|
<Ricon icon = {element_icon}/>
|
|
258
259
|
</div>{translated_element_title}
|
|
259
260
|
</h4>
|
|
260
|
-
|
|
261
|
+
|
|
262
|
+
<!-- middle info -->
|
|
261
263
|
<figcaption>
|
|
262
|
-
<
|
|
263
|
-
<span>Andrzej</span>
|
|
264
|
-
<span class="text-center"></span>
|
|
265
|
-
<span class="text-right">Specyfikacje</span>
|
|
266
|
-
</div>
|
|
264
|
+
<ListElementProperties self = {item} properties = {element_properties?.m}/>
|
|
267
265
|
</figcaption>
|
|
268
|
-
|
|
266
|
+
<!-------------------------------->
|
|
269
267
|
|
|
270
268
|
{#if summary && item[summary]}
|
|
271
269
|
<figcaption>
|
|
272
270
|
{item[summary]}
|
|
273
271
|
</figcaption>
|
|
274
272
|
{/if}
|
|
273
|
+
|
|
274
|
+
<!-- bottom info -->
|
|
275
|
+
<figcaption>
|
|
276
|
+
<ListElementProperties self = {item} properties = {element_properties?.b}/>
|
|
277
|
+
</figcaption>
|
|
278
|
+
<!-------------------------------->
|
|
279
|
+
|
|
275
280
|
</figure>
|
|
276
281
|
|
|
277
282
|
<!------------------------------------------------------------------------------------------------->
|
|
@@ -291,7 +296,7 @@ async function onDownloadFile(e) {
|
|
|
291
296
|
use:selectable={item}
|
|
292
297
|
on:click={onToggleMultiSelect}>
|
|
293
298
|
<figure class={multiselect_class} bind:this={rootElement}>
|
|
294
|
-
<!--
|
|
299
|
+
<!-- top info -->
|
|
295
300
|
<figcaption>
|
|
296
301
|
<ListElementProperties self = {item} properties = {element_properties?.t}/>
|
|
297
302
|
</figcaption>
|
|
@@ -314,21 +319,24 @@ async function onDownloadFile(e) {
|
|
|
314
319
|
</div>{translated_element_title}
|
|
315
320
|
<!--div class="inline-block w-4 h-4 ml-1 mr-1 py-0.5 align-baseline"> <Circle size = "s"/></div-->
|
|
316
321
|
</h4>
|
|
317
|
-
<!-- comming soon - middle info
|
|
322
|
+
<!-- comming soon - middle info -->
|
|
318
323
|
<figcaption>
|
|
319
|
-
<
|
|
320
|
-
<span>Andrzej</span>
|
|
321
|
-
<span class="text-center"></span>
|
|
322
|
-
<span class="text-right">Specyfikacje</span>
|
|
323
|
-
</div>
|
|
324
|
+
<ListElementProperties self = {item} properties = {element_properties?.m}/>
|
|
324
325
|
</figcaption>
|
|
325
|
-
|
|
326
|
+
<!-------------------------------->
|
|
326
327
|
|
|
327
328
|
{#if summary && (item[summary] || placeholder=='Summary')}
|
|
328
329
|
<figcaption>
|
|
329
330
|
{ext(item[summary])}
|
|
330
331
|
</figcaption>
|
|
331
332
|
{/if}
|
|
333
|
+
|
|
334
|
+
<!-- bottom info -->
|
|
335
|
+
<figcaption>
|
|
336
|
+
<ListElementProperties self = {item} properties = {element_properties?.b}/>
|
|
337
|
+
</figcaption>
|
|
338
|
+
<!-------------------------------->
|
|
339
|
+
|
|
332
340
|
</figure>
|
|
333
341
|
</div>
|
|
334
342
|
<!------------------------------------------------------------------------------------------------->
|
|
@@ -364,7 +372,7 @@ async function onDownloadFile(e) {
|
|
|
364
372
|
use:selectable={item}
|
|
365
373
|
on:click={(e) => {activate_row(e, item)}}
|
|
366
374
|
>
|
|
367
|
-
<!--
|
|
375
|
+
<!-- top info -->
|
|
368
376
|
<figcaption>
|
|
369
377
|
<ListElementProperties self = {item} properties = {element_properties?.t}/>
|
|
370
378
|
</figcaption>
|
|
@@ -429,15 +437,12 @@ async function onDownloadFile(e) {
|
|
|
429
437
|
</h4>
|
|
430
438
|
{/if}
|
|
431
439
|
|
|
432
|
-
<!--
|
|
440
|
+
<!-- middle info -->
|
|
433
441
|
<figcaption>
|
|
434
|
-
<
|
|
435
|
-
<span>Andrzej</span>
|
|
436
|
-
<span class="text-center"></span>
|
|
437
|
-
<span class="text-right">Specyfikacje</span>
|
|
438
|
-
</div>
|
|
442
|
+
<ListElementProperties self = {item} properties = {element_properties?.m}/>
|
|
439
443
|
</figcaption>
|
|
440
|
-
|
|
444
|
+
|
|
445
|
+
<!-------------------------------->
|
|
441
446
|
|
|
442
447
|
{#if (summary && (item[summary])) || (placeholder=='Summary')}
|
|
443
448
|
<figcaption><Editable self={item}
|
|
@@ -447,6 +452,12 @@ async function onDownloadFile(e) {
|
|
|
447
452
|
</figcaption>
|
|
448
453
|
{/if}
|
|
449
454
|
|
|
455
|
+
<!-- bottom info -->
|
|
456
|
+
<figcaption>
|
|
457
|
+
<ListElementProperties self = {item} properties = {element_properties?.b}/>
|
|
458
|
+
</figcaption>
|
|
459
|
+
<!-------------------------------->
|
|
460
|
+
|
|
450
461
|
</figure>
|
|
451
462
|
</div>
|
|
452
463
|
|
package/components/r.icon.svelte
CHANGED
|
@@ -95,6 +95,10 @@
|
|
|
95
95
|
import StarOff from './ricons/star-off.svelte'
|
|
96
96
|
import Heart from './ricons/heart.svelte'
|
|
97
97
|
import HeartOff from './ricons/heart-off.svelte'
|
|
98
|
+
import ExternalLink from './ricons/external-link.svelte'
|
|
99
|
+
import ToggleLeft from './ricons/toggle-left.svelte'
|
|
100
|
+
import ToggleRight from './ricons/toggle-right.svelte'
|
|
101
|
+
import Settings from './ricons/settings.svelte'
|
|
98
102
|
|
|
99
103
|
let ricons_box = {
|
|
100
104
|
"arrow-up": ArrowUp,
|
|
@@ -181,7 +185,11 @@
|
|
|
181
185
|
'star': Star,
|
|
182
186
|
'star-off': StarOff,
|
|
183
187
|
'heart': Heart,
|
|
184
|
-
'heart-off': HeartOff
|
|
188
|
+
'heart-off': HeartOff,
|
|
189
|
+
'external-link': ExternalLink,
|
|
190
|
+
'toggle-left': ToggleLeft,
|
|
191
|
+
'toggle-right': ToggleRight,
|
|
192
|
+
'settings': Settings
|
|
185
193
|
}
|
|
186
194
|
|
|
187
195
|
let width = 24;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
export let w = 24;
|
|
3
|
+
export let h = 24;
|
|
4
|
+
export let s = 1;
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<svg
|
|
8
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
9
|
+
width={w}
|
|
10
|
+
height={h}
|
|
11
|
+
viewBox="0 0 24 24"
|
|
12
|
+
fill="none"
|
|
13
|
+
stroke="currentColor"
|
|
14
|
+
stroke-width={s}
|
|
15
|
+
stroke-linecap="round"
|
|
16
|
+
stroke-linejoin="round"
|
|
17
|
+
class="lucide lucide-external-link-icon lucide-external-link"
|
|
18
|
+
><path d="M15 3h6v6" /><path d="M10 14 21 3" /><path
|
|
19
|
+
d="M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6"
|
|
20
|
+
/></svg
|
|
21
|
+
>
|