@likable-hair/svelte 3.3.2 → 3.3.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/dist/components/composed/common/QuickActions.svelte +4 -2
- package/dist/components/composed/list/DynamicTable.svelte +24 -28
- package/dist/components/composed/list/DynamicTable.svelte.d.ts +1 -0
- package/dist/components/simple/forms/FileInputList.svelte +13 -0
- package/dist/components/simple/forms/FileInputList.svelte.d.ts +11 -0
- package/package.json +1 -1
|
@@ -10,7 +10,7 @@ export let selectedItems, showSelectContainer, isSelectedAll, totalRows, slotSel
|
|
|
10
10
|
let actions = [], extraActions = [], moreActionsActivator, openMoreActions = false, infoActivators = {}, disabledInfoActivators = {};
|
|
11
11
|
$: {
|
|
12
12
|
if (!!slotSelectActionsContainer) {
|
|
13
|
-
let numberOfSplit = $mediaQuery.xl ? 5 : $mediaQuery.l ?
|
|
13
|
+
let numberOfSplit = $mediaQuery.xl ? 5 : $mediaQuery.l ? 4 : $mediaQuery.m ? 2 : $mediaQuery.s ? 0 : $mediaQuery.xs ? 0 : 3;
|
|
14
14
|
if (actionsForSelectedItems.length > numberOfSplit) {
|
|
15
15
|
extraActions = actionsForSelectedItems.slice(numberOfSplit);
|
|
16
16
|
actions = actionsForSelectedItems.slice(0, numberOfSplit);
|
|
@@ -227,11 +227,12 @@ $: {
|
|
|
227
227
|
--quick-actions-z-index,
|
|
228
228
|
var(--quick-actions-default-z-index)
|
|
229
229
|
);
|
|
230
|
-
width:
|
|
230
|
+
width: 90%;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
.container-top {
|
|
234
234
|
top: 16px;
|
|
235
|
+
left: 250px;
|
|
235
236
|
}
|
|
236
237
|
|
|
237
238
|
.container-bottom {
|
|
@@ -247,6 +248,7 @@ $: {
|
|
|
247
248
|
|
|
248
249
|
.container-top {
|
|
249
250
|
top: 16px;
|
|
251
|
+
left: auto;
|
|
250
252
|
}
|
|
251
253
|
|
|
252
254
|
.container-bottom {
|
|
@@ -49,8 +49,8 @@ const [send, receive] = crossfade({
|
|
|
49
49
|
let clazz = {};
|
|
50
50
|
export { clazz as class };
|
|
51
51
|
const dispatch = createEventDispatcher();
|
|
52
|
-
export let headers = [], headersToShowInTable = headers, subHeaders = [], customizeHeaders = false, rows = [], sortedBy = void 0, sortDirection = "asc", cellEdit = false, noItemsText = "No items to show", showSelect = false, showSelectContainer = true, selectMode = "single", selectedItems = [], showExpand = false, loading = false, disabled = false, filters = [], searchBarColumns = void 0, searchBarVisible = false, searchBarPlaceholder = "Type to search for identification code, description and MRN...", filtersVisible = false, quickFiltersVisible = false, lang = "en", editFilterMode = "one-edit", showActiveFilters = true, quickFilters = [], actionsForSelectedItems = [], hasMoreToLoad = false, totalRows = rows.length;
|
|
53
|
-
let openCellEditor = false, cellEditorActivator, cellEditorContainer, menuElementCellEditor, menuElementQuickFilters, cellEditorInfoActive, saveEditDisabled = false,
|
|
52
|
+
export let headers = [], headersToShowInTable = headers, subHeaders = [], customizeHeaders = false, rows = [], sortedBy = void 0, sortDirection = "asc", cellEdit = false, noItemsText = "No items to show", showSelect = false, showSelectContainer = true, selectMode = "single", selectedItems = [], showExpand = false, loading = false, disabled = false, filters = [], searchBarColumns = void 0, searchBarVisible = false, searchBarPlaceholder = "Type to search for identification code, description and MRN...", filtersVisible = false, quickFiltersVisible = false, lang = "en", editFilterMode = "one-edit", showActiveFilters = true, quickFilters = [], actionsForSelectedItems = [], hasMoreToLoad = false, totalRows = rows.length, searchText = void 0;
|
|
53
|
+
let openCellEditor = false, cellEditorActivator, cellEditorContainer, menuElementCellEditor, menuElementQuickFilters, cellEditorInfoActive, saveEditDisabled = false, searchBarInput = void 0, openQuickFilter = false, quickFilterActivator, quickFilterActive, globalBuilder = new FilterBuilder(), slotSelectActionsContainer, isSelectedAll = false, calendarOpened = false, calendarOpened2 = false, selectedIndexes = [], cellEditorIndexRow, cellEditorIndexHeader, cellEditorSubItem;
|
|
54
54
|
let openHeaderDrawer = false, headersToSelect = !!headers ? headers.filter((h) => {
|
|
55
55
|
return !headersToShowInTable.find((hst) => hst.value == h.value);
|
|
56
56
|
}).map((h) => {
|
|
@@ -697,33 +697,29 @@ function handleLoadMore() {
|
|
|
697
697
|
on:click={() => handleHeaderClick(head)}
|
|
698
698
|
>
|
|
699
699
|
<slot name="header" {head}>
|
|
700
|
-
<span class="header-label">
|
|
701
|
-
<slot name="headerLabel">
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
|
|
707
|
-
|
|
708
|
-
/>
|
|
709
|
-
{/if}
|
|
710
|
-
</div>
|
|
711
|
-
{#if !!head.info}
|
|
712
|
-
<ToolTip
|
|
713
|
-
appearTimeout={1000}
|
|
714
|
-
activator={infoActivators[index]}
|
|
715
|
-
>
|
|
716
|
-
<div
|
|
717
|
-
style:background-color='rgb(var(--global-color-background-300), .95)'
|
|
718
|
-
style:border-radius="5px"
|
|
719
|
-
style:padding="10px"
|
|
720
|
-
>
|
|
721
|
-
{head.info}
|
|
722
|
-
</div>
|
|
723
|
-
</ToolTip>
|
|
724
|
-
{/if}
|
|
725
|
-
</slot>
|
|
700
|
+
<span class="header-label" bind:this={infoActivators[index]}>
|
|
701
|
+
<slot name="headerLabel">{head.label}</slot>
|
|
702
|
+
{#if !!head.info}
|
|
703
|
+
<Icon
|
|
704
|
+
name="mdi-help-circle-outline"
|
|
705
|
+
--icon-size="16px"
|
|
706
|
+
/>
|
|
707
|
+
{/if}
|
|
726
708
|
</span>
|
|
709
|
+
{#if !!head.info}
|
|
710
|
+
<ToolTip
|
|
711
|
+
appearTimeout={1000}
|
|
712
|
+
activator={infoActivators[index]}
|
|
713
|
+
>
|
|
714
|
+
<div
|
|
715
|
+
style:background-color='rgb(var(--global-color-background-300), .95)'
|
|
716
|
+
style:border-radius="5px"
|
|
717
|
+
style:padding="10px"
|
|
718
|
+
>
|
|
719
|
+
{head.info}
|
|
720
|
+
</div>
|
|
721
|
+
</ToolTip>
|
|
722
|
+
{/if}
|
|
727
723
|
{#if head.sortable}
|
|
728
724
|
<span
|
|
729
725
|
class="header-sort-icon"
|
|
@@ -3,8 +3,10 @@ import "./FileInputList.css";
|
|
|
3
3
|
import Button from "../buttons/Button.svelte";
|
|
4
4
|
import FileInput from "./FileInput.svelte";
|
|
5
5
|
import Icon from "../media/Icon.svelte";
|
|
6
|
+
import { createEventDispatcher } from "svelte";
|
|
6
7
|
let clazz = "";
|
|
7
8
|
export { clazz as class };
|
|
9
|
+
let dispatch = createEventDispatcher();
|
|
8
10
|
export let files = [], persistOverUpload = true, dropAreaActive = true, icon = "mdi-file-document", disabled = false, maxFiles = void 0;
|
|
9
11
|
let fileActive = null;
|
|
10
12
|
function handleFileMouseEnter(file) {
|
|
@@ -22,6 +24,13 @@ function handleRemove(file) {
|
|
|
22
24
|
files = files.filter((elem) => {
|
|
23
25
|
return elem != file;
|
|
24
26
|
});
|
|
27
|
+
dispatch("fileChange", { files });
|
|
28
|
+
}
|
|
29
|
+
function handleFileDrop() {
|
|
30
|
+
dispatch("fileChange", { files });
|
|
31
|
+
}
|
|
32
|
+
function handleFileSelect() {
|
|
33
|
+
dispatch("fileChange", { files });
|
|
25
34
|
}
|
|
26
35
|
</script>
|
|
27
36
|
|
|
@@ -36,6 +45,10 @@ function handleRemove(file) {
|
|
|
36
45
|
--file-input-height="var(--file-input-list-height,var(--file-input-list-default-height))"
|
|
37
46
|
--file-input-width="var(--file-input-list-width,var(--file-input-list-default-width))"
|
|
38
47
|
on:change
|
|
48
|
+
on:fileDrop={handleFileDrop}
|
|
49
|
+
on:fileDrop
|
|
50
|
+
on:fileSelect={handleFileSelect}
|
|
51
|
+
on:fileSelect
|
|
39
52
|
{maxFiles}
|
|
40
53
|
>
|
|
41
54
|
<span
|
|
@@ -13,6 +13,17 @@ declare const __propDef: {
|
|
|
13
13
|
};
|
|
14
14
|
events: {
|
|
15
15
|
change: Event;
|
|
16
|
+
fileDrop: CustomEvent<{
|
|
17
|
+
nativeEvent: DragEvent;
|
|
18
|
+
files: File[];
|
|
19
|
+
}>;
|
|
20
|
+
fileSelect: CustomEvent<{
|
|
21
|
+
nativeEvent: Event;
|
|
22
|
+
files: File[];
|
|
23
|
+
}>;
|
|
24
|
+
fileChange: CustomEvent<{
|
|
25
|
+
files: File[];
|
|
26
|
+
}>;
|
|
16
27
|
} & {
|
|
17
28
|
[evt: string]: CustomEvent<any>;
|
|
18
29
|
};
|