@humandialog/forms.svelte 1.6.2 → 1.6.3
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/document/editor.svelte +6 -6
- package/components/document/internal/palette.svelte +1 -3
- package/components/list/internal/list.element.svelte +5 -0
- package/components/sidebar/sidebar.group.svelte +29 -12
- package/components/sidebar/sidebar.group.svelte.d.ts +2 -0
- package/kicks.js +1 -1
- package/package.json +1 -1
|
@@ -1094,15 +1094,15 @@ const paletteInsertCommands = () => [
|
|
|
1094
1094
|
];
|
|
1095
1095
|
const paletteCommands = [
|
|
1096
1096
|
{
|
|
1097
|
-
caption: i18n({ en: "
|
|
1097
|
+
caption: i18n({ en: "Styles", es: "Estilos", pl: "Style" }),
|
|
1098
1098
|
separator: true
|
|
1099
1099
|
},
|
|
1100
|
-
...
|
|
1100
|
+
...paletteStylesCommands(),
|
|
1101
1101
|
{
|
|
1102
|
-
caption: i18n({ en: "
|
|
1102
|
+
caption: i18n({ en: "Text", es: "Texto", pl: "Tekst" }),
|
|
1103
1103
|
separator: true
|
|
1104
1104
|
},
|
|
1105
|
-
...
|
|
1105
|
+
...paletteMarksCommands(),
|
|
1106
1106
|
{
|
|
1107
1107
|
caption: i18n({ en: "Insert", es: "Insertar", pl: "Wstaw" }),
|
|
1108
1108
|
separator: true
|
|
@@ -1162,10 +1162,10 @@ function getPaletteCommands() {
|
|
|
1162
1162
|
});
|
|
1163
1163
|
commands.push({ separator: true });
|
|
1164
1164
|
}
|
|
1165
|
-
commands = [...commands, { caption: i18n({ en: "Text", es: "Texto", pl: "Tekst" }), separator: true }];
|
|
1166
|
-
commands = [...commands, ...paletteMarksCommands()];
|
|
1167
1165
|
commands = [...commands, { caption: i18n({ en: "Styles", es: "Estilos", pl: "Style" }), separator: true }];
|
|
1168
1166
|
commands = [...commands, ...paletteStylesCommands()];
|
|
1167
|
+
commands = [...commands, { caption: i18n({ en: "Text", es: "Texto", pl: "Tekst" }), separator: true }];
|
|
1168
|
+
commands = [...commands, ...paletteMarksCommands()];
|
|
1169
1169
|
commands = [...commands, { caption: i18n({ en: "Insert", es: "Insertar", pl: "Wstaw" }), separator: true }];
|
|
1170
1170
|
if (extraInsertPaletteCommands && extraInsertPaletteCommands.length > 0) {
|
|
1171
1171
|
extraInsertPaletteCommands.forEach((exc) => {
|
|
@@ -29,7 +29,6 @@ export function showAsToolbox(rect) {
|
|
|
29
29
|
toolboxY = rect.bottom + margin;
|
|
30
30
|
toolboxY += window.scrollY;
|
|
31
31
|
css_style = `left:${toolboxX}px; top:${toolboxY}px;`;
|
|
32
|
-
console.log("toolbox: ", css_style);
|
|
33
32
|
dispatch("palette_shown");
|
|
34
33
|
}
|
|
35
34
|
let paletteElement;
|
|
@@ -62,7 +61,6 @@ export function show(x, y, up = false) {
|
|
|
62
61
|
const rect = paletteElement.getBoundingClientRect();
|
|
63
62
|
closeButtonPos = `right: ${15}px; top: calc(${rect.y}px - 1.75rem)`;
|
|
64
63
|
}, 0);
|
|
65
|
-
console.trace();
|
|
66
64
|
}
|
|
67
65
|
export function show_fullscreen(_width_px, _height_px) {
|
|
68
66
|
isToolbox = false;
|
|
@@ -319,7 +317,7 @@ function isRowActive(cmd) {
|
|
|
319
317
|
style={css_style} >
|
|
320
318
|
|
|
321
319
|
{#if filtered_commands && filtered_commands.length}
|
|
322
|
-
{#each filtered_commands as cmd, idx
|
|
320
|
+
{#each filtered_commands as cmd, idx }
|
|
323
321
|
{#if cmd.separator}
|
|
324
322
|
{#if idx>0 && idx<filtered_commands.length-1} <!-- not first or last place -->
|
|
325
323
|
<hr class="mx-4 my-1 border-stone-300 dark:border-stone-700"/>
|
|
@@ -165,10 +165,15 @@ function getHRef() {
|
|
|
165
165
|
return "";
|
|
166
166
|
}
|
|
167
167
|
function activate_row(e, item2) {
|
|
168
|
+
const openable = !!definition.title_href || !!definition.title_href_func;
|
|
168
169
|
if (toolbarOperations) {
|
|
169
170
|
activateItem("props", item2, toolbarOperations(item2));
|
|
170
171
|
if (e)
|
|
171
172
|
e.stopPropagation();
|
|
173
|
+
} else if (openable) {
|
|
174
|
+
activateItem("props", item2, []);
|
|
175
|
+
if (e)
|
|
176
|
+
e.stopPropagation();
|
|
172
177
|
}
|
|
173
178
|
}
|
|
174
179
|
function on_contextmenu(e) {
|
|
@@ -1,12 +1,15 @@
|
|
|
1
1
|
<script>
|
|
2
2
|
import {FaChevronDown, FaChevronUp} from 'svelte-icons/fa'
|
|
3
|
+
import {i18n} from '../../i18n'
|
|
4
|
+
import {link} from 'svelte-spa-router'
|
|
3
5
|
|
|
4
6
|
export let border = false;
|
|
5
7
|
export let title = ''
|
|
6
8
|
export let collapsable = false;
|
|
7
9
|
export let onExpand = undefined
|
|
10
|
+
export let moreHref = undefined
|
|
8
11
|
|
|
9
|
-
let border_class = border ? " pt-4 mt-4 border-t border-stone-200 dark:border-stone-700" : ""
|
|
12
|
+
let border_class = border ? " pt-4 mt-4 border-t border-stone-200 dark:border-stone-700" : "mt-6"
|
|
10
13
|
let title_border = title ? border_class : ""
|
|
11
14
|
let list_border = title ? "" : border_class
|
|
12
15
|
let collapsed = true;
|
|
@@ -18,21 +21,35 @@
|
|
|
18
21
|
|
|
19
22
|
collapsed = !collapsed;
|
|
20
23
|
}
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
|
|
21
27
|
</script>
|
|
22
28
|
|
|
23
29
|
{#if title}
|
|
24
|
-
<
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
{
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
<div class="w-full flex flex-row justify-between {title_border} mb-2">
|
|
31
|
+
<p class="text-xs uppercase font-semibold">
|
|
32
|
+
{title}
|
|
33
|
+
{#if collapsable}
|
|
34
|
+
<button class="inline-block ml-3 sm:ml-2 sm:mt-0.5 w-4 sm:w-3 h-4 sm:h-3" on:click={toggleCollapsed}>
|
|
35
|
+
{#if collapsed}
|
|
36
|
+
<FaChevronDown/>
|
|
37
|
+
{:else}
|
|
38
|
+
<FaChevronUp/>
|
|
39
|
+
{/if}
|
|
40
|
+
</button>
|
|
41
|
+
{/if}
|
|
42
|
+
</p>
|
|
43
|
+
|
|
44
|
+
{#if moreHref}
|
|
45
|
+
<p class="text-xs uppercase font-semibold mr-2 text-stone-900 dark:text-stone-400">
|
|
46
|
+
<a href={moreHref} class="text-right" use:link>
|
|
47
|
+
{i18n({en: 'More...', es: 'Más...', pl: 'Więcej...'})}
|
|
48
|
+
</a>
|
|
49
|
+
</p>
|
|
34
50
|
{/if}
|
|
35
|
-
</
|
|
51
|
+
</div>
|
|
52
|
+
|
|
36
53
|
{/if}
|
|
37
54
|
|
|
38
55
|
{#if !collapsable}
|
|
@@ -6,6 +6,7 @@ export default class Sidebar extends SvelteComponentTyped<{
|
|
|
6
6
|
border?: boolean | undefined;
|
|
7
7
|
collapsable?: boolean | undefined;
|
|
8
8
|
onExpand?: any;
|
|
9
|
+
moreHref?: any;
|
|
9
10
|
}, {
|
|
10
11
|
[evt: string]: CustomEvent<any>;
|
|
11
12
|
}, {
|
|
@@ -22,6 +23,7 @@ declare const __propDef: {
|
|
|
22
23
|
border?: boolean | undefined;
|
|
23
24
|
collapsable?: boolean | undefined;
|
|
24
25
|
onExpand?: any;
|
|
26
|
+
moreHref?: any;
|
|
25
27
|
};
|
|
26
28
|
events: {
|
|
27
29
|
[evt: string]: CustomEvent<any>;
|
package/kicks.js
CHANGED
|
@@ -100,7 +100,7 @@ function checkKicks(informObservers=true)
|
|
|
100
100
|
{
|
|
101
101
|
const s = get(session)
|
|
102
102
|
const appId = s.appId ? s.appId : 'octopus'
|
|
103
|
-
const tid = s.tid ? s.tid : 'octopus/
|
|
103
|
+
const tid = s.tid ? s.tid : 'octopus/13'
|
|
104
104
|
console.log(s.isActive, appId, tid)
|
|
105
105
|
if(s.isActive && appId && tid)
|
|
106
106
|
{
|