intelliwaketssveltekitv25 0.1.97 → 0.1.99
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/Definitions.d.ts
CHANGED
|
@@ -145,17 +145,18 @@ export declare const ShowActivityOverlay: Pick<Writable<number>, "subscribe"> &
|
|
|
145
145
|
hide: () => void;
|
|
146
146
|
reset: () => void;
|
|
147
147
|
};
|
|
148
|
-
export interface IMessageBoxStore {
|
|
148
|
+
export interface IMessageBoxStore<COLOR = string> {
|
|
149
149
|
message: string | null;
|
|
150
150
|
messageBody?: string | null;
|
|
151
|
-
color?:
|
|
151
|
+
color?: COLOR;
|
|
152
152
|
dismissAt?: TDateAny | null;
|
|
153
153
|
}
|
|
154
|
-
export
|
|
155
|
-
show: (message: string | IMessageBoxStore) => void;
|
|
154
|
+
export type TStoreMessageBox<COLOR = string> = Pick<Writable<IMessageBoxStore<COLOR>[]>, 'subscribe'> & {
|
|
155
|
+
show: (message: string | IMessageBoxStore, color?: COLOR) => void;
|
|
156
156
|
hide: (message: (string | null) | (string | null)[]) => void;
|
|
157
157
|
reset: () => void;
|
|
158
158
|
};
|
|
159
|
+
export declare const ShowMessageBox: TStoreMessageBox<string>;
|
|
159
160
|
export type TChatBubblePosition = 'Right' | 'Left' | 'Top' | 'Bottom';
|
|
160
161
|
export type TDropDownControlPosition = 'Right' | 'Left' | 'Center' | 'CenterForce' | null;
|
|
161
162
|
export type TDropDownControlDrop = 'Up' | 'Down' | null;
|
package/dist/Definitions.js
CHANGED
|
@@ -38,7 +38,7 @@ const storeMessageBox = () => {
|
|
|
38
38
|
const { subscribe, set, update } = writable([]);
|
|
39
39
|
return {
|
|
40
40
|
subscribe,
|
|
41
|
-
show: (message) => update((prevState) => [
|
|
41
|
+
show: (message, color) => update((prevState) => [
|
|
42
42
|
...prevState.filter((pS) => pS.message !== (typeof message === 'object' ? message.message : message)),
|
|
43
43
|
typeof message === 'object'
|
|
44
44
|
? {
|
|
@@ -47,7 +47,7 @@ const storeMessageBox = () => {
|
|
|
47
47
|
? DateParseTS('now', { seconds: 3 })
|
|
48
48
|
: message.dismissAt
|
|
49
49
|
}
|
|
50
|
-
: { message
|
|
50
|
+
: { message, color, dismissAt: DateParseTS('now', { seconds: 3 }) }
|
|
51
51
|
]),
|
|
52
52
|
hide: (message) => update((prevState) => prevState.filter((pS) => !ToArray(message).includes(pS.message))),
|
|
53
53
|
reset: () => set([])
|
package/dist/MessageBoxes.svelte
CHANGED
|
@@ -19,14 +19,15 @@
|
|
|
19
19
|
</script>
|
|
20
20
|
|
|
21
21
|
{#each $ShowMessageBox as messageBox (messageBox.message)}
|
|
22
|
-
<div class='w-fit max-w-[80vw] mx-auto mb-6 p-0 bg-blue-100 text-black shadow-xl rounded-lg overflow-hidden [&_*]:cursor-pointer pointer-events-auto print:hidden grid grid-cols-[2em_1fr_2em]'
|
|
22
|
+
<div class='messageBox w-fit max-w-[80vw] mx-auto mb-6 p-0 bg-blue-100 text-black shadow-xl rounded-lg overflow-hidden [&_*]:cursor-pointer pointer-events-auto print:hidden grid grid-cols-[2em_1fr_2em]'
|
|
23
23
|
in:fly='{{ y: 200, duration: 200 }}'
|
|
24
24
|
out:fade='{{ duration: 200 }}'
|
|
25
25
|
role='button'
|
|
26
|
+
data-color={messageBox.color}
|
|
26
27
|
tabindex={-1}
|
|
27
28
|
onclick={() => hideMessageBox(messageBox)}
|
|
28
29
|
onkeydown={() => hideMessageBox(messageBox)}>
|
|
29
|
-
<div class='bg-blue-300 text-blue-600 flex justify-center items-center'>
|
|
30
|
+
<div class='messageBoxIcon bg-blue-300 text-blue-600 flex justify-center items-center'>
|
|
30
31
|
<svg xmlns='http://www.w3.org/2000/svg'
|
|
31
32
|
class='inline-block'
|
|
32
33
|
height='16'
|
|
@@ -35,10 +36,10 @@
|
|
|
35
36
|
<path d='M256 512A256 256 0 1 0 256 0a256 256 0 1 0 0 512zM216 336h24V272H216c-13.3 0-24-10.7-24-24s10.7-24 24-24h48c13.3 0 24 10.7 24 24v88h8c13.3 0 24 10.7 24 24s-10.7 24-24 24H216c-13.3 0-24-10.7-24-24s10.7-24 24-24zm40-208a32 32 0 1 1 0 64 32 32 0 1 1 0-64z'/>
|
|
36
37
|
</svg>
|
|
37
38
|
</div>
|
|
38
|
-
<div class='py-1 px-2'>
|
|
39
|
+
<div class='messageBoxMessage py-1 px-2'>
|
|
39
40
|
{messageBox.message}
|
|
40
41
|
</div>
|
|
41
|
-
<div class='text-center pt-1'>
|
|
42
|
+
<div class='messageBoxClose text-center pt-1'>
|
|
42
43
|
<svg xmlns='http://www.w3.org/2000/svg'
|
|
43
44
|
class='inline-block'
|
|
44
45
|
height='16'
|
package/dist/Modal.svelte
CHANGED
|
@@ -34,6 +34,7 @@
|
|
|
34
34
|
marginForStickyHeader = false,
|
|
35
35
|
okButtonWrap = false,
|
|
36
36
|
class: clazz = '',
|
|
37
|
+
color,
|
|
37
38
|
classHeader = '',
|
|
38
39
|
classButton = '',
|
|
39
40
|
borderFooter = true,
|
|
@@ -68,6 +69,7 @@
|
|
|
68
69
|
marginForStickyHeader?: boolean
|
|
69
70
|
okButtonWrap?: boolean
|
|
70
71
|
class?: string
|
|
72
|
+
color?: string
|
|
71
73
|
classHeader?: string
|
|
72
74
|
classButton?: string
|
|
73
75
|
borderFooter?: boolean
|
|
@@ -206,6 +208,7 @@
|
|
|
206
208
|
onkeydown={keyDown}
|
|
207
209
|
style:max-width={width}
|
|
208
210
|
bind:this={dialogElement}
|
|
211
|
+
data-color={color}
|
|
209
212
|
onclick={(e) => {
|
|
210
213
|
if (!isDialogMouseDown) cancelAction(e)
|
|
211
214
|
}}
|
|
@@ -220,7 +223,7 @@
|
|
|
220
223
|
role="button"
|
|
221
224
|
tabindex={-1}>
|
|
222
225
|
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
|
223
|
-
<h4 class='bg-primary-main dark:bg-primary-face text-white py-2 px-4 select-none mb-0 {classHeader}'
|
|
226
|
+
<h4 class='dialogHeader bg-primary-main dark:bg-primary-face text-white py-2 px-4 select-none mb-0 {classHeader}'
|
|
224
227
|
class:cursor-grab={isMouseDown}
|
|
225
228
|
onmousedown={doMouseDown}>
|
|
226
229
|
{#if header}
|
|
@@ -240,7 +243,7 @@
|
|
|
240
243
|
</div>
|
|
241
244
|
{/if}
|
|
242
245
|
</h4>
|
|
243
|
-
<fieldset class='px-4 pb-6'
|
|
246
|
+
<fieldset class='px-4 pb-6 dialogBody'
|
|
244
247
|
disabled={disable}
|
|
245
248
|
class:pt-3={!marginForStickyHeader}
|
|
246
249
|
class:mt-3={marginForStickyHeader}
|
|
@@ -253,13 +256,13 @@
|
|
|
253
256
|
</fieldset>
|
|
254
257
|
{#if !!cancelButton || !!okButton}
|
|
255
258
|
<fieldset
|
|
256
|
-
class='grid grid-cols-[min-content_auto_auto_min-content] border-t-slate-200 dark:border-t-slate-700 px-4 py-2'
|
|
259
|
+
class='dialogButtons grid grid-cols-[min-content_auto_auto_min-content] border-t-slate-200 dark:border-t-slate-700 px-4 py-2'
|
|
257
260
|
class:border-t={borderFooter}
|
|
258
261
|
disabled={disable}>
|
|
259
262
|
<div class='pr-2'>
|
|
260
263
|
{#if !!cancelButton}
|
|
261
264
|
<button type='button'
|
|
262
|
-
class='btnClean bg-transparent hover:bg-transparent shadow-none text-slate-500 hover:text-slate-700 dark:text-slate-300 pl-0 pt-1'
|
|
265
|
+
class='dialogButtonCancel btnClean bg-transparent hover:bg-transparent shadow-none text-slate-500 hover:text-slate-700 dark:text-slate-300 pl-0 pt-1'
|
|
263
266
|
class:whitespace-nowrap={!okButtonWrap}
|
|
264
267
|
onclick={cancelAction}>
|
|
265
268
|
{cancelButton}
|
|
@@ -275,7 +278,7 @@
|
|
|
275
278
|
<div class='text-right pl-2'>
|
|
276
279
|
{#if !!okButton}
|
|
277
280
|
<button type={okType}
|
|
278
|
-
class='shadow-none {classButton}'
|
|
281
|
+
class='dialogButtonOK shadow-none okButton {classButton}'
|
|
279
282
|
class:whitespace-nowrap={!okButtonWrap}
|
|
280
283
|
bind:this={okButtonElement}
|
|
281
284
|
onclick={okAction}
|
package/dist/Modal.svelte.d.ts
CHANGED