@cloudparker/moldex.js 0.0.103 → 0.0.106
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/services/dialog/dialog-service.d.ts +1 -1
- package/dist/services/dialog/dialog-service.js +6 -1
- package/dist/views/core/button/components/button-dropdown/button-dropdown.svelte +10 -8
- package/dist/views/core/button/components/button-list-item/button-list-item.svelte +1 -1
- package/dist/views/core/dialog/components/picker-dialog/picker-dialog.svelte +3 -3
- package/dist/views/core/icon/components/icon-circle/icon-circle.svelte +1 -1
- package/package.json +1 -1
|
@@ -35,7 +35,7 @@ export declare function openAlertDialog(params?: DialogProps & {
|
|
|
35
35
|
export declare function openDeleteConfirmDialog({ msg, title, footerOkButtonLable, footerOkButtonClassName, ...params }?: DialogProps & {
|
|
36
36
|
msg?: string;
|
|
37
37
|
}): Promise<unknown>;
|
|
38
|
-
export declare function openPickerDialog<R>({ items, value, multiple, hasCheckbox, hasArrow, maxlength, maxlengthMsg, identityFieldName, titleFieldName, searchFieldName, subtitleFieldName, itemTileSnippet, ...params }: DialogProps & PickerDialogProps): Promise<R>;
|
|
38
|
+
export declare function openPickerDialog<R>({ items, value, multiple, hasCheckbox, hasArrow, maxlength, maxlengthMsg, identityFieldName, titleFieldName, searchFieldName, subtitleFieldName, hasIcon, iconPath, iconClassName, isCircularIcon, circularIconClassName, itemTileSnippet, ...params }: DialogProps & PickerDialogProps): Promise<R>;
|
|
39
39
|
export declare function openNumberFieldDialog({ title, value, label, name, maxlength, fieldClassName, autofocus, required, appearance, size, floatingLabel, ...params }?: DialogProps & InputFieldProps & {
|
|
40
40
|
fieldClassName?: string;
|
|
41
41
|
}): Promise<unknown>;
|
|
@@ -82,7 +82,7 @@ export async function openDeleteConfirmDialog({ msg = 'Are you sure to delete?',
|
|
|
82
82
|
size: DialogSizeEnum.SM,
|
|
83
83
|
});
|
|
84
84
|
}
|
|
85
|
-
export async function openPickerDialog({ items, value, multiple, hasCheckbox = true, hasArrow, maxlength, maxlengthMsg, identityFieldName, titleFieldName, searchFieldName, subtitleFieldName, itemTileSnippet, ...params }) {
|
|
85
|
+
export async function openPickerDialog({ items, value, multiple, hasCheckbox = true, hasArrow, maxlength, maxlengthMsg, identityFieldName, titleFieldName, searchFieldName, subtitleFieldName, hasIcon, iconPath, iconClassName, isCircularIcon, circularIconClassName, itemTileSnippet, ...params }) {
|
|
86
86
|
if (hasArrow) {
|
|
87
87
|
multiple = false;
|
|
88
88
|
hasCheckbox = false;
|
|
@@ -101,6 +101,11 @@ export async function openPickerDialog({ items, value, multiple, hasCheckbox = t
|
|
|
101
101
|
titleFieldName,
|
|
102
102
|
searchFieldName,
|
|
103
103
|
subtitleFieldName,
|
|
104
|
+
hasIcon,
|
|
105
|
+
iconPath,
|
|
106
|
+
iconClassName,
|
|
107
|
+
isCircularIcon,
|
|
108
|
+
circularIconClassName,
|
|
104
109
|
itemTileSnippet,
|
|
105
110
|
},
|
|
106
111
|
hasHeader: true,
|
|
@@ -42,14 +42,16 @@ export function toggleDropdown(ev) {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
function adjustDropdownPosition() {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
45
|
+
if (buttonElement) {
|
|
46
|
+
const rect = buttonElement?.getBoundingClientRect();
|
|
47
|
+
const viewportHeight = window.innerHeight;
|
|
48
|
+
const spaceBelow = viewportHeight - rect.bottom;
|
|
49
|
+
const dropdownHeight = 200;
|
|
50
|
+
if (popup || spaceBelow < dropdownHeight) {
|
|
51
|
+
openUpward = rect.top > dropdownHeight;
|
|
52
|
+
} else {
|
|
53
|
+
openUpward = false;
|
|
54
|
+
}
|
|
53
55
|
}
|
|
54
56
|
}
|
|
55
57
|
onMount(() => {
|
|
@@ -121,7 +121,7 @@ let {
|
|
|
121
121
|
<Button
|
|
122
122
|
id="{id}-list-item-{index}"
|
|
123
123
|
type="button"
|
|
124
|
-
className="w-full !text-start !justify-start hover:bg-base-50 transition rounded-none dark:hover:bg-base-700 {className}"
|
|
124
|
+
className="w-full !text-start !justify-start gap-4 hover:bg-base-50 transition rounded-none dark:hover:bg-base-700 {className}"
|
|
125
125
|
{onClick}
|
|
126
126
|
{disabled}
|
|
127
127
|
{appearance}
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
<script lang="ts" module></script>
|
|
2
2
|
|
|
3
|
-
<script lang="ts">import {
|
|
3
|
+
<script lang="ts">import { showToast } from "../../../../../services";
|
|
4
4
|
import ButtonListItem from "../../../button/components/button-list-item/button-list-item.svelte";
|
|
5
5
|
import ButtonSearch from "../../../button/components/button-search/button-search.svelte";
|
|
6
|
-
import { onMount } from "svelte";
|
|
7
|
-
import Icon from "../../../icon/components/icon/icon.svelte";
|
|
8
6
|
import { mdiCheckCircle, mdiCheckCircleOutline, mdiChevronRight } from "../../../icon";
|
|
7
|
+
import Icon from "../../../icon/components/icon/icon.svelte";
|
|
8
|
+
import { onMount } from "svelte";
|
|
9
9
|
import { SvelteSet } from "svelte/reactivity";
|
|
10
10
|
let {
|
|
11
11
|
value,
|
|
@@ -5,5 +5,5 @@ let { circleClassName, iconPath, iconClassName = "w-5 h-5 text-primary" } = $pro
|
|
|
5
5
|
<div
|
|
6
6
|
class="aspect-square bg-primary-100 rounded-full w-10 h-10 flex items-center justify-center {circleClassName}"
|
|
7
7
|
>
|
|
8
|
-
<Icon path={iconPath!} className={iconClassName} />
|
|
8
|
+
<Icon path={iconPath!} className=" text-primary {iconClassName}" />
|
|
9
9
|
</div>
|