@finsweet/webflow-apps-utils 1.0.2 → 1.0.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/README.md +162 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.js +1 -0
- package/dist/providers/GlobalProvider.mdx +322 -0
- package/dist/providers/GlobalProvider.svelte +58 -0
- package/dist/providers/GlobalProvider.svelte.d.ts +4 -0
- package/dist/providers/configuratorUtils.d.ts +37 -0
- package/dist/providers/configuratorUtils.js +219 -0
- package/dist/providers/globalContext.svelte.d.ts +18 -0
- package/dist/providers/globalContext.svelte.js +439 -0
- package/dist/providers/index.d.ts +5 -0
- package/dist/providers/index.js +7 -0
- package/dist/providers/types.d.ts +103 -0
- package/dist/providers/types.js +6 -0
- package/dist/router/README.md +2 -2
- package/dist/stores/index.d.ts +0 -1
- package/dist/stores/index.js +0 -1
- package/dist/types/webflow.d.ts +31 -47
- package/dist/ui/components/LoadingScreen.svelte +2 -1
- package/dist/ui/components/button/Button.svelte +1 -1
- package/dist/ui/components/button-group/ButtonGroup.stories.js +112 -0
- package/dist/ui/components/{ButtonGroup.svelte → button-group/ButtonGroup.svelte} +20 -33
- package/dist/ui/components/button-group/ButtonGroup.svelte.d.ts +13 -0
- package/dist/ui/components/button-group/index.d.ts +2 -0
- package/dist/ui/components/button-group/index.js +1 -0
- package/dist/ui/components/button-group/types.d.ts +32 -0
- package/dist/ui/components/checkbox/Checkbox.stories.d.ts +55 -0
- package/dist/ui/components/checkbox/Checkbox.stories.js +162 -0
- package/dist/ui/components/checkbox/Checkbox.svelte +141 -0
- package/dist/ui/components/checkbox/Checkbox.svelte.d.ts +4 -0
- package/dist/ui/components/checkbox/index.d.ts +2 -0
- package/dist/ui/components/checkbox/index.js +1 -0
- package/dist/ui/components/checkbox/types.d.ts +32 -0
- package/dist/ui/components/controlled-buttons/ControlledButtons.stories.d.ts +32 -0
- package/dist/ui/components/controlled-buttons/ControlledButtons.stories.js +152 -0
- package/dist/ui/components/{buttons/FooterButton.svelte → controlled-buttons/ControlledButtons.svelte} +18 -67
- package/dist/ui/components/controlled-buttons/ControlledButtons.svelte.d.ts +4 -0
- package/dist/ui/components/controlled-buttons/index.d.ts +2 -0
- package/dist/ui/components/controlled-buttons/index.js +1 -0
- package/dist/ui/components/{buttons → controlled-buttons}/types.d.ts +11 -4
- package/dist/ui/components/divider/Divider.stories.svelte +134 -0
- package/dist/ui/components/{clickable/Clickable.stories.svelte.d.ts → divider/Divider.stories.svelte.d.ts} +4 -4
- package/dist/ui/components/divider/Divider.svelte +30 -0
- package/dist/ui/components/divider/Divider.svelte.d.ts +4 -0
- package/dist/ui/components/divider/index.d.ts +2 -0
- package/dist/ui/components/divider/index.js +1 -0
- package/dist/ui/components/divider/types.d.ts +23 -0
- package/dist/ui/components/divider/types.js +1 -0
- package/dist/ui/components/iframe/Iframe.stories.svelte +122 -0
- package/dist/ui/components/{ToggleItem.svelte.d.ts → iframe/Iframe.stories.svelte.d.ts} +7 -8
- package/dist/ui/components/iframe/Iframe.svelte +75 -0
- package/dist/ui/components/iframe/Iframe.svelte.d.ts +4 -0
- package/dist/ui/components/iframe/index.d.ts +2 -0
- package/dist/ui/components/iframe/index.js +1 -0
- package/dist/ui/components/iframe/types.d.ts +38 -0
- package/dist/ui/components/iframe/types.js +1 -0
- package/dist/ui/components/index.d.ts +12 -39
- package/dist/ui/components/index.js +12 -39
- package/dist/ui/components/input/Input.stories.d.ts +24 -0
- package/dist/ui/components/input/Input.stories.js +98 -0
- package/dist/ui/components/input/Input.svelte +321 -80
- package/dist/ui/components/input/types.d.ts +27 -1
- package/dist/ui/components/layout/Layout.stories.svelte +3 -3
- package/dist/ui/components/layout/Layout.svelte +3 -5
- package/dist/ui/components/layout/common/EditModeMessage.svelte +24 -12
- package/dist/ui/components/layout/{ExampleLayout.svelte → examples/ExampleLayout.svelte} +34 -22
- package/dist/ui/components/layout/examples/Wrapper.svelte +9 -0
- package/dist/ui/components/{NoSettingsNeeded.svelte.d.ts → layout/examples/Wrapper.svelte.d.ts} +3 -3
- package/dist/ui/components/layout/examples/index.d.ts +2 -0
- package/dist/ui/components/layout/examples/index.js +2 -0
- package/dist/ui/components/layout/index.d.ts +2 -1
- package/dist/ui/components/layout/index.js +2 -1
- package/dist/ui/components/modal/Example.svelte +320 -0
- package/dist/ui/components/modal/Example.svelte.d.ts +3 -0
- package/dist/ui/components/modal/Modal.stories.svelte +18 -0
- package/dist/ui/components/modal/Modal.stories.svelte.d.ts +26 -0
- package/dist/ui/components/modal/Modal.svelte +490 -0
- package/dist/ui/components/modal/Modal.svelte.d.ts +130 -0
- package/dist/ui/components/modal/index.d.ts +2 -0
- package/dist/ui/components/modal/index.js +1 -0
- package/dist/ui/components/modal/types.d.ts +75 -0
- package/dist/ui/components/modal/types.js +1 -0
- package/dist/ui/components/notification/Notification.stories.svelte +228 -0
- package/dist/ui/components/{ToggleList.svelte.d.ts → notification/Notification.stories.svelte.d.ts} +9 -21
- package/dist/ui/components/notification/Notification.svelte +289 -0
- package/dist/ui/components/notification/Notification.svelte.d.ts +67 -0
- package/dist/ui/components/notification/index.d.ts +2 -0
- package/dist/ui/components/notification/index.js +1 -0
- package/dist/ui/components/notification/types.d.ts +68 -0
- package/dist/ui/components/notification/types.js +1 -0
- package/dist/ui/components/section/Section.stories.svelte +263 -0
- package/dist/ui/components/section/Section.stories.svelte.d.ts +27 -0
- package/dist/ui/components/section/Section.svelte +324 -0
- package/dist/ui/components/section/Section.svelte.d.ts +5 -0
- package/dist/ui/components/section/index.d.ts +2 -0
- package/dist/ui/components/section/index.js +1 -0
- package/dist/ui/components/section/types.d.ts +106 -0
- package/dist/ui/components/section/types.js +1 -0
- package/dist/ui/components/{ImageUpload.svelte → shared/ImageUpload.svelte} +3 -3
- package/dist/ui/components/{SelectBodyOrDivBlock.svelte → shared/SelectBodyOrDivBlock.svelte} +1 -1
- package/dist/ui/components/shared/index.d.ts +2 -0
- package/dist/ui/components/shared/index.js +2 -0
- package/dist/ui/index.css +33 -5
- package/dist/utils/api/checkIfAppModeIsDesign.d.ts +1 -2
- package/dist/utils/api/checkIfAppModeIsDesign.js +1 -2
- package/dist/utils/api/clipboard/handlePaste.d.ts +6 -37
- package/dist/utils/api/clipboard/handlePaste.js +2 -6
- package/dist/utils/api/getAllAssets.d.ts +1 -2
- package/dist/utils/api/getAllAssets.js +1 -2
- package/dist/utils/api/getFinsweetComponentsEnvironment.d.ts +1 -2
- package/dist/utils/api/getFinsweetComponentsEnvironment.js +3 -6
- package/dist/utils/api/index.d.ts +0 -1
- package/dist/utils/api/index.js +0 -1
- package/dist/utils/api/insertWithXSCP.d.ts +1 -2
- package/dist/utils/api/insertWithXSCP.js +1 -2
- package/dist/utils/auth/crossWindowLogin.d.ts +3 -0
- package/dist/utils/auth/crossWindowLogin.js +3 -0
- package/dist/utils/auth/index.d.ts +9 -25
- package/dist/utils/auth/index.js +9 -25
- package/dist/utils/browser-storage/localStorage.d.ts +4 -12
- package/dist/utils/browser-storage/localStorage.js +4 -12
- package/dist/utils/browser-storage/sessionStorage.d.ts +4 -12
- package/dist/utils/browser-storage/sessionStorage.js +4 -12
- package/dist/utils/custom-code/api.d.ts +3 -7
- package/dist/utils/custom-code/api.js +3 -7
- package/dist/utils/helpers/cleanupTooltipMessage.d.ts +1 -2
- package/dist/utils/helpers/cleanupTooltipMessage.js +1 -2
- package/dist/utils/helpers/goto.d.ts +1 -4
- package/dist/utils/helpers/goto.js +2 -7
- package/dist/utils/helpers/index.d.ts +1 -0
- package/dist/utils/helpers/index.js +1 -0
- package/dist/utils/helpers/noop.d.ts +1 -1
- package/dist/utils/helpers/noop.js +1 -1
- package/dist/utils/helpers/numbers.d.ts +4 -14
- package/dist/utils/helpers/numbers.js +4 -14
- package/dist/utils/helpers/objectsToModuleExports.d.ts +1 -3
- package/dist/utils/helpers/objectsToModuleExports.js +1 -3
- package/dist/utils/helpers/trimText.d.ts +1 -8
- package/dist/utils/helpers/trimText.js +1 -8
- package/dist/utils/index.d.ts +4 -0
- package/dist/utils/index.js +4 -0
- package/dist/utils/logger/index.d.ts +0 -2
- package/dist/utils/logger/index.js +0 -2
- package/dist/utils/webflow-canvas/attributes/getAllWebflowElementAttributes.d.ts +1 -3
- package/dist/utils/webflow-canvas/attributes/getAllWebflowElementAttributes.js +1 -3
- package/dist/utils/webflow-canvas/attributes/getInstanceNamesFromObject.d.ts +1 -5
- package/dist/utils/webflow-canvas/attributes/getInstanceNamesFromObject.js +1 -5
- package/dist/utils/webflow-canvas/attributes/getWebflowElementAttribute.d.ts +1 -4
- package/dist/utils/webflow-canvas/attributes/getWebflowElementAttribute.js +1 -4
- package/dist/utils/webflow-canvas/attributes/getWebflowElementTextContent.d.ts +1 -3
- package/dist/utils/webflow-canvas/attributes/getWebflowElementTextContent.js +1 -3
- package/dist/utils/webflow-canvas/attributes/removeWebflowElementAttribute.d.ts +1 -4
- package/dist/utils/webflow-canvas/attributes/removeWebflowElementAttribute.js +1 -4
- package/dist/utils/webflow-canvas/attributes/setStyles.d.ts +1 -3
- package/dist/utils/webflow-canvas/attributes/setStyles.js +1 -3
- package/dist/utils/webflow-canvas/attributes/setWebflowElementAttribute.d.ts +1 -8
- package/dist/utils/webflow-canvas/attributes/setWebflowElementAttribute.js +1 -13
- package/dist/utils/webflow-canvas/findInstanceElement.d.ts +0 -6
- package/dist/utils/webflow-canvas/findInstanceElement.js +1 -7
- package/dist/utils/webflow-canvas/getAllPages.d.ts +3 -10
- package/dist/utils/webflow-canvas/getAllPages.js +3 -10
- package/dist/utils/webflow-canvas/getSiteStagingUrl.d.ts +1 -4
- package/dist/utils/webflow-canvas/getSiteStagingUrl.js +1 -4
- package/dist/utils/webflow-canvas/index.d.ts +1 -0
- package/dist/utils/webflow-canvas/index.js +1 -0
- package/package.json +9 -2
- package/dist/stores/globalStore.d.ts +0 -10
- package/dist/stores/globalStore.js +0 -10
- package/dist/ui/components/ButtonGroup.svelte.d.ts +0 -28
- package/dist/ui/components/Checkbox.svelte +0 -94
- package/dist/ui/components/Checkbox.svelte.d.ts +0 -36
- package/dist/ui/components/Copy.svelte +0 -329
- package/dist/ui/components/Copy.svelte.d.ts +0 -35
- package/dist/ui/components/CustomModal.svelte +0 -192
- package/dist/ui/components/CustomModal.svelte.d.ts +0 -45
- package/dist/ui/components/DisableInEditMode.svelte +0 -66
- package/dist/ui/components/DisableInEditMode.svelte.d.ts +0 -33
- package/dist/ui/components/Divider.svelte +0 -31
- package/dist/ui/components/Divider.svelte.d.ts +0 -31
- package/dist/ui/components/Header.svelte +0 -30
- package/dist/ui/components/Header.svelte.d.ts +0 -20
- package/dist/ui/components/Iframe.svelte +0 -89
- package/dist/ui/components/Iframe.svelte.d.ts +0 -40
- package/dist/ui/components/InjectComponent.svelte +0 -297
- package/dist/ui/components/InjectComponent.svelte.d.ts +0 -27
- package/dist/ui/components/Modal.svelte +0 -139
- package/dist/ui/components/Modal.svelte.d.ts +0 -42
- package/dist/ui/components/Navbar.svelte +0 -132
- package/dist/ui/components/Navbar.svelte.d.ts +0 -29
- package/dist/ui/components/NoSettingsNeeded.svelte +0 -31
- package/dist/ui/components/Notification.svelte +0 -193
- package/dist/ui/components/Notification.svelte.d.ts +0 -64
- package/dist/ui/components/PlusMinusButton.svelte +0 -91
- package/dist/ui/components/PlusMinusButton.svelte.d.ts +0 -22
- package/dist/ui/components/PreviewBar.svelte +0 -40
- package/dist/ui/components/PreviewBar.svelte.d.ts +0 -20
- package/dist/ui/components/ScrollableContent.svelte +0 -18
- package/dist/ui/components/ScrollableContent.svelte.d.ts +0 -31
- package/dist/ui/components/Section.svelte +0 -97
- package/dist/ui/components/Section.svelte.d.ts +0 -50
- package/dist/ui/components/Spacer.svelte +0 -9
- package/dist/ui/components/Spacer.svelte.d.ts +0 -22
- package/dist/ui/components/SpinnerPlusMinus.svelte +0 -75
- package/dist/ui/components/SpinnerPlusMinus.svelte.d.ts +0 -23
- package/dist/ui/components/SpinnerUpDown.svelte +0 -194
- package/dist/ui/components/SpinnerUpDown.svelte.d.ts +0 -31
- package/dist/ui/components/Tabs.svelte +0 -71
- package/dist/ui/components/Tabs.svelte.d.ts +0 -26
- package/dist/ui/components/ToggleItem.svelte +0 -29
- package/dist/ui/components/ToggleList.svelte +0 -57
- package/dist/ui/components/buttons/FooterButton.svelte.d.ts +0 -10
- package/dist/ui/components/buttons/index.d.ts +0 -5
- package/dist/ui/components/buttons/index.js +0 -5
- package/dist/ui/components/clickable/Clickable.stories.svelte +0 -213
- package/dist/ui/components/clickable/Clickable.svelte +0 -93
- package/dist/ui/components/clickable/Clickable.svelte.d.ts +0 -4
- package/dist/ui/components/clickable/index.d.ts +0 -2
- package/dist/ui/components/clickable/index.js +0 -1
- package/dist/ui/components/clickable/types.d.ts +0 -17
- package/dist/utils/api/copyPaste/index.d.ts +0 -18
- /package/dist/ui/components/{buttons → button-group}/types.js +0 -0
- /package/dist/ui/components/{clickable → checkbox}/types.js +0 -0
- /package/dist/{utils/api/copyPaste/index.js → ui/components/controlled-buttons/types.js} +0 -0
- /package/dist/ui/components/layout/{ExampleLayout.svelte.d.ts → examples/ExampleLayout.svelte.d.ts} +0 -0
- /package/dist/ui/components/{ImageUpload.svelte.d.ts → shared/ImageUpload.svelte.d.ts} +0 -0
- /package/dist/ui/components/{SelectBodyOrDivBlock.svelte.d.ts → shared/SelectBodyOrDivBlock.svelte.d.ts} +0 -0
|
@@ -1,192 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { createEventDispatcher, onMount, tick } from 'svelte';
|
|
3
|
-
|
|
4
|
-
const dispatch = createEventDispatcher<{
|
|
5
|
-
closemodal: boolean;
|
|
6
|
-
}>();
|
|
7
|
-
|
|
8
|
-
import { LoadingScreen } from '../components';
|
|
9
|
-
import { CloseIcon } from '../icons';
|
|
10
|
-
|
|
11
|
-
export let showModal: boolean;
|
|
12
|
-
export let disableClose: boolean = false;
|
|
13
|
-
export let showHeader: boolean = true;
|
|
14
|
-
export let padding: string = 'var(--padding-regular)';
|
|
15
|
-
export let width: string = '42em';
|
|
16
|
-
export let height: string = '100%';
|
|
17
|
-
export let preventOverlayClose: boolean = false;
|
|
18
|
-
export let closeIcon: boolean = true;
|
|
19
|
-
export let loading: boolean = false;
|
|
20
|
-
export let className: string = '';
|
|
21
|
-
let modalElement: HTMLElement;
|
|
22
|
-
let closeButton: HTMLButtonElement;
|
|
23
|
-
|
|
24
|
-
onMount(async () => {
|
|
25
|
-
await tick(); // Ensure DOM is updated
|
|
26
|
-
if (showModal) {
|
|
27
|
-
closeButton?.focus();
|
|
28
|
-
}
|
|
29
|
-
});
|
|
30
|
-
|
|
31
|
-
$: {
|
|
32
|
-
if (modalElement) {
|
|
33
|
-
if (showModal) {
|
|
34
|
-
document.body.style.overflow = 'hidden'; // Prevent scrolling
|
|
35
|
-
} else {
|
|
36
|
-
document.body.style.overflow = '';
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Close the modal
|
|
43
|
-
*/
|
|
44
|
-
const handleClose = () => {
|
|
45
|
-
if (disableClose) return;
|
|
46
|
-
|
|
47
|
-
showModal = false;
|
|
48
|
-
dispatch('closemodal', true);
|
|
49
|
-
};
|
|
50
|
-
|
|
51
|
-
/**
|
|
52
|
-
* Handle keydown event
|
|
53
|
-
* @param e
|
|
54
|
-
*/
|
|
55
|
-
const handleKeyDown = (e: KeyboardEvent) => {
|
|
56
|
-
if (e.key === 'Escape') {
|
|
57
|
-
if (!preventOverlayClose) {
|
|
58
|
-
handleClose();
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
};
|
|
62
|
-
</script>
|
|
63
|
-
|
|
64
|
-
{#if showModal}
|
|
65
|
-
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
|
66
|
-
<div
|
|
67
|
-
class="modal-overlay {preventOverlayClose ? 'prevent-overlay-close' : ''} {className}"
|
|
68
|
-
on:click={() => {
|
|
69
|
-
if (!preventOverlayClose) {
|
|
70
|
-
handleClose();
|
|
71
|
-
}
|
|
72
|
-
}}
|
|
73
|
-
on:keydown={handleKeyDown}
|
|
74
|
-
tabindex="-1"
|
|
75
|
-
>
|
|
76
|
-
<!-- svelte-ignore a11y-click-events-have-key-events -->
|
|
77
|
-
<!-- svelte-ignore a11y-no-static-element-interactions -->
|
|
78
|
-
<div
|
|
79
|
-
class="modal-content"
|
|
80
|
-
bind:this={modalElement}
|
|
81
|
-
on:click|stopPropagation
|
|
82
|
-
style="padding: {padding}; width: {width}; height: {height};"
|
|
83
|
-
>
|
|
84
|
-
{#if loading}
|
|
85
|
-
<LoadingScreen message="Please wait..." active spinnerSize={20} position="absolute" />
|
|
86
|
-
{/if}
|
|
87
|
-
{#if showHeader}
|
|
88
|
-
<div class="header-bar">
|
|
89
|
-
<slot name="header" />
|
|
90
|
-
{#if closeIcon}
|
|
91
|
-
<button
|
|
92
|
-
on:click={() => {
|
|
93
|
-
handleClose();
|
|
94
|
-
dispatch('closemodal', true);
|
|
95
|
-
}}
|
|
96
|
-
bind:this={closeButton}><CloseIcon /></button
|
|
97
|
-
>
|
|
98
|
-
{/if}
|
|
99
|
-
</div>
|
|
100
|
-
{/if}
|
|
101
|
-
|
|
102
|
-
{#if $$slots?.customModalContent}
|
|
103
|
-
{#if loading}
|
|
104
|
-
<LoadingScreen message="Please wait..." spinnerSize={20} position="absolute" />
|
|
105
|
-
{/if}
|
|
106
|
-
<slot name="customModalContent" />
|
|
107
|
-
{:else}
|
|
108
|
-
<slot />
|
|
109
|
-
{/if}
|
|
110
|
-
</div>
|
|
111
|
-
</div>
|
|
112
|
-
{/if}
|
|
113
|
-
|
|
114
|
-
<style>
|
|
115
|
-
.modal-overlay {
|
|
116
|
-
position: fixed;
|
|
117
|
-
top: 0;
|
|
118
|
-
left: 0;
|
|
119
|
-
width: 100vw;
|
|
120
|
-
height: 100vh;
|
|
121
|
-
display: flex;
|
|
122
|
-
align-items: center;
|
|
123
|
-
justify-content: center;
|
|
124
|
-
background: rgba(0, 0, 0, 0.4);
|
|
125
|
-
z-index: 99999999997;
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
.modal-content {
|
|
129
|
-
border-radius: var(--border-radius);
|
|
130
|
-
background: var(--background1);
|
|
131
|
-
color: var(--text1);
|
|
132
|
-
animation: zoom 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
|
|
133
|
-
position: relative;
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
@keyframes zoom {
|
|
137
|
-
from {
|
|
138
|
-
transform: scale(0.95);
|
|
139
|
-
}
|
|
140
|
-
to {
|
|
141
|
-
transform: scale(1);
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
|
|
145
|
-
@keyframes fade {
|
|
146
|
-
from {
|
|
147
|
-
opacity: 0;
|
|
148
|
-
}
|
|
149
|
-
to {
|
|
150
|
-
opacity: 1;
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
button {
|
|
154
|
-
border: none;
|
|
155
|
-
user-select: none;
|
|
156
|
-
width: 24px;
|
|
157
|
-
padding: 0px 4px;
|
|
158
|
-
font-family: inherit;
|
|
159
|
-
font-size: inherit;
|
|
160
|
-
position: relative;
|
|
161
|
-
display: flex;
|
|
162
|
-
align-items: center;
|
|
163
|
-
justify-content: center;
|
|
164
|
-
height: 24px;
|
|
165
|
-
border-radius: 4px;
|
|
166
|
-
color: rgb(171, 171, 171);
|
|
167
|
-
background: transparent;
|
|
168
|
-
box-sizing: border-box;
|
|
169
|
-
box-shadow: none;
|
|
170
|
-
align-self: center;
|
|
171
|
-
cursor: pointer;
|
|
172
|
-
}
|
|
173
|
-
|
|
174
|
-
button:hover {
|
|
175
|
-
filter: brightness(1.1);
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
.header-bar {
|
|
179
|
-
display: flex;
|
|
180
|
-
align-items: center;
|
|
181
|
-
justify-content: space-between;
|
|
182
|
-
padding-bottom: var(--padding-small);
|
|
183
|
-
border-bottom: 1px solid var(--border1);
|
|
184
|
-
gap: 4px;
|
|
185
|
-
width: 100%;
|
|
186
|
-
margin-bottom: var(--padding-regular);
|
|
187
|
-
}
|
|
188
|
-
|
|
189
|
-
.prevent-overlay-close {
|
|
190
|
-
cursor: progress;
|
|
191
|
-
}
|
|
192
|
-
</style>
|
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: Props & {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
15
|
-
default: any;
|
|
16
|
-
} ? Props extends Record<string, never> ? any : {
|
|
17
|
-
children?: any;
|
|
18
|
-
} : {});
|
|
19
|
-
declare const CustomModal: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
20
|
-
showModal: boolean;
|
|
21
|
-
disableClose?: boolean;
|
|
22
|
-
showHeader?: boolean;
|
|
23
|
-
padding?: string;
|
|
24
|
-
width?: string;
|
|
25
|
-
height?: string;
|
|
26
|
-
preventOverlayClose?: boolean;
|
|
27
|
-
closeIcon?: boolean;
|
|
28
|
-
loading?: boolean;
|
|
29
|
-
className?: string;
|
|
30
|
-
}, {
|
|
31
|
-
header: {};
|
|
32
|
-
customModalContent: {};
|
|
33
|
-
default: {};
|
|
34
|
-
}>, {
|
|
35
|
-
click: MouseEvent;
|
|
36
|
-
closemodal: CustomEvent<boolean>;
|
|
37
|
-
} & {
|
|
38
|
-
[evt: string]: CustomEvent<any>;
|
|
39
|
-
}, {
|
|
40
|
-
header: {};
|
|
41
|
-
customModalContent: {};
|
|
42
|
-
default: {};
|
|
43
|
-
}, {}, string>;
|
|
44
|
-
type CustomModal = InstanceType<typeof CustomModal>;
|
|
45
|
-
export default CustomModal;
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { BRAND } from '../../utils';
|
|
3
|
-
|
|
4
|
-
import { Tooltip, WarningCircleOutlineIcon } from '..';
|
|
5
|
-
/**
|
|
6
|
-
* Disable the component in edit mode
|
|
7
|
-
*/
|
|
8
|
-
export let disabled = false;
|
|
9
|
-
export let width = '249px';
|
|
10
|
-
export let disabledMessage = `This option is disabled in edit mode. If you want to change it, please generate a new ${BRAND.COMPONENT}.`;
|
|
11
|
-
</script>
|
|
12
|
-
|
|
13
|
-
<div class="wrap">
|
|
14
|
-
{#if disabled}
|
|
15
|
-
<Tooltip
|
|
16
|
-
tooltipIcon={WarningCircleOutlineIcon}
|
|
17
|
-
tooltipIconColor="var(--yellowText)"
|
|
18
|
-
message={disabledMessage}
|
|
19
|
-
{width}
|
|
20
|
-
>
|
|
21
|
-
{#snippet target()}
|
|
22
|
-
<div class="categories-disabled wrapper">
|
|
23
|
-
<slot />
|
|
24
|
-
</div>
|
|
25
|
-
{/snippet}
|
|
26
|
-
</Tooltip>
|
|
27
|
-
{:else}
|
|
28
|
-
<slot />
|
|
29
|
-
{/if}
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<style>
|
|
33
|
-
.wrap :global(.dropdown-list) {
|
|
34
|
-
max-height: 300px !important;
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
.categories-disabled :global(.label-popup .labels span) {
|
|
38
|
-
opacity: 1;
|
|
39
|
-
pointer-events: none;
|
|
40
|
-
}
|
|
41
|
-
.wrap :global(.dropdown-wrapper) {
|
|
42
|
-
width: max-content;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
.wrap > :global(.target:first-child) {
|
|
46
|
-
width: 100%;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
.wrap {
|
|
50
|
-
display: flex;
|
|
51
|
-
align-items: center;
|
|
52
|
-
gap: 4px;
|
|
53
|
-
align-self: stretch;
|
|
54
|
-
justify-content: space-between;
|
|
55
|
-
width: 100%;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
.wrap :global([slot='target']:has(.wrapper)) {
|
|
59
|
-
display: flex;
|
|
60
|
-
width: 100%;
|
|
61
|
-
align-items: center;
|
|
62
|
-
gap: 4px;
|
|
63
|
-
align-self: stretch;
|
|
64
|
-
justify-content: space-between;
|
|
65
|
-
}
|
|
66
|
-
</style>
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: Props & {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
type $$__sveltets_2_PropsWithChildren<Props, Slots> = Props & (Slots extends {
|
|
15
|
-
default: any;
|
|
16
|
-
} ? Props extends Record<string, never> ? any : {
|
|
17
|
-
children?: any;
|
|
18
|
-
} : {});
|
|
19
|
-
declare const DisableInEditMode: $$__sveltets_2_IsomorphicComponent<$$__sveltets_2_PropsWithChildren<{
|
|
20
|
-
/**
|
|
21
|
-
* Disable the component in edit mode
|
|
22
|
-
*/ disabled?: boolean;
|
|
23
|
-
width?: string;
|
|
24
|
-
disabledMessage?: string;
|
|
25
|
-
}, {
|
|
26
|
-
default: {};
|
|
27
|
-
}>, {
|
|
28
|
-
[evt: string]: CustomEvent<any>;
|
|
29
|
-
}, {
|
|
30
|
-
default: {};
|
|
31
|
-
}, {}, string>;
|
|
32
|
-
type DisableInEditMode = InstanceType<typeof DisableInEditMode>;
|
|
33
|
-
export default DisableInEditMode;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
/**
|
|
3
|
-
* Height of the divider
|
|
4
|
-
*/
|
|
5
|
-
export let height: string = '1px';
|
|
6
|
-
/**
|
|
7
|
-
* Width of the divider
|
|
8
|
-
*/
|
|
9
|
-
export let width: string = '100%';
|
|
10
|
-
/**
|
|
11
|
-
* Background color of the divider
|
|
12
|
-
*/
|
|
13
|
-
export let background: string = 'var(--border1)';
|
|
14
|
-
/**
|
|
15
|
-
* Orientation of the divider
|
|
16
|
-
*/
|
|
17
|
-
export let rotate = false;
|
|
18
|
-
</script>
|
|
19
|
-
|
|
20
|
-
<div
|
|
21
|
-
class="divider"
|
|
22
|
-
style="height:{height}; width:{width};
|
|
23
|
-
background: {background};
|
|
24
|
-
{rotate ? 'transform: rotate(0deg)' : ''}"
|
|
25
|
-
></div>
|
|
26
|
-
|
|
27
|
-
<style>
|
|
28
|
-
.divider {
|
|
29
|
-
align-self: stretch;
|
|
30
|
-
}
|
|
31
|
-
</style>
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: Props & {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const Divider: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
-
/**
|
|
16
|
-
* Height of the divider
|
|
17
|
-
*/ height?: string;
|
|
18
|
-
/**
|
|
19
|
-
* Width of the divider
|
|
20
|
-
*/ width?: string;
|
|
21
|
-
/**
|
|
22
|
-
* Background color of the divider
|
|
23
|
-
*/ background?: string;
|
|
24
|
-
/**
|
|
25
|
-
* Orientation of the divider
|
|
26
|
-
*/ rotate?: boolean;
|
|
27
|
-
}, {
|
|
28
|
-
[evt: string]: CustomEvent<any>;
|
|
29
|
-
}, {}, {}, string>;
|
|
30
|
-
type Divider = InstanceType<typeof Divider>;
|
|
31
|
-
export default Divider;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { TriangleDownIcon } from '../icons';
|
|
3
|
-
export let title = 'Header';
|
|
4
|
-
</script>
|
|
5
|
-
|
|
6
|
-
<div class="header">
|
|
7
|
-
<TriangleDownIcon />
|
|
8
|
-
<span class="title">
|
|
9
|
-
{title}
|
|
10
|
-
</span>
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
<style>
|
|
14
|
-
.header {
|
|
15
|
-
display: flex;
|
|
16
|
-
padding: 6px 10px;
|
|
17
|
-
align-items: center;
|
|
18
|
-
gap: 8px;
|
|
19
|
-
border-bottom: 1px solid var(--border1, rgba(255, 255, 255, 0.13));
|
|
20
|
-
background: var(--background1, #1e1e1e);
|
|
21
|
-
}
|
|
22
|
-
.title {
|
|
23
|
-
color: var(--text-text-1, #d9d9d9);
|
|
24
|
-
font-family: Inter;
|
|
25
|
-
font-size: 12px;
|
|
26
|
-
font-style: normal;
|
|
27
|
-
font-weight: 500;
|
|
28
|
-
line-height: 16px;
|
|
29
|
-
}
|
|
30
|
-
</style>
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: Props & {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const Header: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
-
title?: string;
|
|
16
|
-
}, {
|
|
17
|
-
[evt: string]: CustomEvent<any>;
|
|
18
|
-
}, {}, {}, string>;
|
|
19
|
-
type Header = InstanceType<typeof Header>;
|
|
20
|
-
export default Header;
|
|
@@ -1,89 +0,0 @@
|
|
|
1
|
-
<script lang="ts">
|
|
2
|
-
import { FINSWEET_REVERSE_PROXY_URL } from '../../utils';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* The URL of the iframe
|
|
6
|
-
*/
|
|
7
|
-
export let src: string;
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* The ID of the iframe
|
|
11
|
-
*/
|
|
12
|
-
export let id: string;
|
|
13
|
-
|
|
14
|
-
/**
|
|
15
|
-
* The width of the iframe
|
|
16
|
-
*/
|
|
17
|
-
export let width: string = '100%';
|
|
18
|
-
|
|
19
|
-
/**
|
|
20
|
-
* The height of the iframe
|
|
21
|
-
*/
|
|
22
|
-
export let height: string = '100%';
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* The title of the iframe
|
|
26
|
-
*/
|
|
27
|
-
export let title: string = 'Iframe';
|
|
28
|
-
|
|
29
|
-
/**
|
|
30
|
-
* Event handler for successful iframe load
|
|
31
|
-
*/
|
|
32
|
-
export let onLoadSuccess: () => void = () => {};
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Event handler for failed iframe load
|
|
36
|
-
*/
|
|
37
|
-
export let onLoadError: () => void = () => {};
|
|
38
|
-
|
|
39
|
-
let iframeElement: HTMLIFrameElement;
|
|
40
|
-
|
|
41
|
-
/**
|
|
42
|
-
* Handle the iframe load event
|
|
43
|
-
*/
|
|
44
|
-
const handleIframeLoad = () => {
|
|
45
|
-
const iframe = iframeElement;
|
|
46
|
-
|
|
47
|
-
if (iframe?.contentDocument) {
|
|
48
|
-
const iframeTitle = iframe.contentDocument.title;
|
|
49
|
-
const { body } = iframe.contentDocument;
|
|
50
|
-
|
|
51
|
-
if (
|
|
52
|
-
body.childNodes.length === 0 ||
|
|
53
|
-
iframeTitle.indexOf('404') >= 0 ||
|
|
54
|
-
body.outerHTML.includes('<span>404</span>')
|
|
55
|
-
) {
|
|
56
|
-
// Notify parent of the error
|
|
57
|
-
onLoadError();
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
// Notify parent of successful load
|
|
62
|
-
onLoadSuccess();
|
|
63
|
-
|
|
64
|
-
return;
|
|
65
|
-
}
|
|
66
|
-
|
|
67
|
-
// Notify parent of the error
|
|
68
|
-
onLoadError();
|
|
69
|
-
};
|
|
70
|
-
</script>
|
|
71
|
-
|
|
72
|
-
<iframe
|
|
73
|
-
{id}
|
|
74
|
-
bind:this={iframeElement}
|
|
75
|
-
{title}
|
|
76
|
-
src={`${FINSWEET_REVERSE_PROXY_URL}${src}`}
|
|
77
|
-
on:load={handleIframeLoad}
|
|
78
|
-
class="iframe"
|
|
79
|
-
{width}
|
|
80
|
-
{height}
|
|
81
|
-
></iframe>
|
|
82
|
-
|
|
83
|
-
<style>
|
|
84
|
-
.iframe {
|
|
85
|
-
border: none;
|
|
86
|
-
border-radius: 4px;
|
|
87
|
-
background: var(--text2);
|
|
88
|
-
}
|
|
89
|
-
</style>
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
-
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
-
$$bindings?: Bindings;
|
|
4
|
-
} & Exports;
|
|
5
|
-
(internal: unknown, props: Props & {
|
|
6
|
-
$$events?: Events;
|
|
7
|
-
$$slots?: Slots;
|
|
8
|
-
}): Exports & {
|
|
9
|
-
$set?: any;
|
|
10
|
-
$on?: any;
|
|
11
|
-
};
|
|
12
|
-
z_$$bindings?: Bindings;
|
|
13
|
-
}
|
|
14
|
-
declare const Iframe: $$__sveltets_2_IsomorphicComponent<{
|
|
15
|
-
/**
|
|
16
|
-
* The URL of the iframe
|
|
17
|
-
*/ src: string;
|
|
18
|
-
/**
|
|
19
|
-
* The ID of the iframe
|
|
20
|
-
*/ id: string;
|
|
21
|
-
/**
|
|
22
|
-
* The width of the iframe
|
|
23
|
-
*/ width?: string;
|
|
24
|
-
/**
|
|
25
|
-
* The height of the iframe
|
|
26
|
-
*/ height?: string;
|
|
27
|
-
/**
|
|
28
|
-
* The title of the iframe
|
|
29
|
-
*/ title?: string;
|
|
30
|
-
/**
|
|
31
|
-
* Event handler for successful iframe load
|
|
32
|
-
*/ onLoadSuccess?: () => void;
|
|
33
|
-
/**
|
|
34
|
-
* Event handler for failed iframe load
|
|
35
|
-
*/ onLoadError?: () => void;
|
|
36
|
-
}, {
|
|
37
|
-
[evt: string]: CustomEvent<any>;
|
|
38
|
-
}, {}, {}, string>;
|
|
39
|
-
type Iframe = InstanceType<typeof Iframe>;
|
|
40
|
-
export default Iframe;
|