fuma 1.0.19 → 1.0.21
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.
|
@@ -1,7 +1,26 @@
|
|
|
1
1
|
import { SvelteComponent } from "svelte";
|
|
2
|
-
import {
|
|
2
|
+
import type { HTMLInputAttributes } from 'svelte/elements';
|
|
3
3
|
declare const __propDef: {
|
|
4
|
-
props:
|
|
4
|
+
props: {
|
|
5
|
+
class?: string | undefined;
|
|
6
|
+
classLabel?: string | undefined;
|
|
7
|
+
key?: string | undefined;
|
|
8
|
+
label?: string | import("svelte").ComponentType | import("../../index.js").ComponentAndProps | undefined;
|
|
9
|
+
error?: string | undefined;
|
|
10
|
+
hint?: string | undefined;
|
|
11
|
+
prefix?: string | number | undefined;
|
|
12
|
+
prefixFor?: string | number | undefined;
|
|
13
|
+
enhanceDisabled?: boolean | undefined;
|
|
14
|
+
labelPosition?: ("top" | "left" | "right") | undefined;
|
|
15
|
+
} & {
|
|
16
|
+
input?: HTMLInputAttributes | undefined;
|
|
17
|
+
inputElement?: HTMLInputElement | undefined;
|
|
18
|
+
classWrapper?: string | undefined;
|
|
19
|
+
value?: Date | null | undefined;
|
|
20
|
+
bindWithParams?: boolean | undefined;
|
|
21
|
+
} & {
|
|
22
|
+
getDefaultDate?: (() => Date) | undefined;
|
|
23
|
+
};
|
|
5
24
|
events: {
|
|
6
25
|
focus: FocusEvent;
|
|
7
26
|
blur: FocusEvent;
|
|
@@ -8,15 +8,18 @@ import { DropDown } from "../menu/index.js";
|
|
|
8
8
|
import { InputTime } from "../input/index.js";
|
|
9
9
|
import { RangePicker } from "./index.js";
|
|
10
10
|
import { jsonParse } from "../../utils/jsonParse.js";
|
|
11
|
-
export let minDate = void 0;
|
|
12
|
-
export let maxDate = void 0;
|
|
13
11
|
let dropDown;
|
|
14
12
|
let rangePicker;
|
|
13
|
+
let klass = "";
|
|
15
14
|
export let key = "range";
|
|
16
15
|
export let range = jsonParse($urlParam.get(key), {
|
|
17
16
|
start: null,
|
|
18
17
|
end: null
|
|
19
18
|
});
|
|
19
|
+
export let minDate = void 0;
|
|
20
|
+
export let maxDate = void 0;
|
|
21
|
+
export { klass as class };
|
|
22
|
+
export let classLabel = "";
|
|
20
23
|
$:
|
|
21
24
|
isValidPeriod = !!range.start && !!range.end;
|
|
22
25
|
function getLabel(_range) {
|
|
@@ -36,12 +39,12 @@ async function writeURL() {
|
|
|
36
39
|
</script>
|
|
37
40
|
|
|
38
41
|
<DropDown bind:this={dropDown} tippyProps={{ onHidden: writeURL }} class="max-h-full">
|
|
39
|
-
<button slot="activator" class="btn btn-sm">
|
|
42
|
+
<button slot="activator" class="min-width-0 btn btn-sm flex-nowrap {klass}">
|
|
40
43
|
<Icon path={mdiCalendarMonthOutline} class="opacity-60" size={20} />
|
|
41
44
|
{#if isValidPeriod}
|
|
42
45
|
<span
|
|
43
46
|
transition:slide={{ axis: 'x', duration: 200 }}
|
|
44
|
-
class="whitespace-nowrap text-xs font-medium opacity-80"
|
|
47
|
+
class="whitespace-nowrap text-xs font-medium opacity-80 {classLabel}"
|
|
45
48
|
>
|
|
46
49
|
{getLabel(range)}
|
|
47
50
|
</span>
|
|
@@ -2,10 +2,12 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
import { type RangeAsDate } from './index.js';
|
|
3
3
|
declare const __propDef: {
|
|
4
4
|
props: {
|
|
5
|
-
minDate?: Date | number | string | undefined;
|
|
6
|
-
maxDate?: Date | number | string | undefined;
|
|
7
5
|
key?: string | undefined;
|
|
8
6
|
range?: RangeAsDate | undefined;
|
|
7
|
+
minDate?: Date | number | string | undefined;
|
|
8
|
+
maxDate?: Date | number | string | undefined;
|
|
9
|
+
class?: string | undefined;
|
|
10
|
+
classLabel?: string | undefined;
|
|
9
11
|
};
|
|
10
12
|
events: {
|
|
11
13
|
[evt: string]: CustomEvent<any>;
|