y200subcontrols 0.0.395 → 0.0.397
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/CodePresenter.svelte +6 -18
- package/dist/components/CodePresenter.svelte.d.ts +2 -1
- package/dist/components/DataTablePaginator.svelte +2 -3
- package/dist/components/DatePresenter.svelte +3 -1
- package/dist/components/DatePresenter.svelte.d.ts +2 -0
- package/dist/components/Divider.svelte +8 -0
- package/dist/components/Divider.svelte.d.ts +18 -0
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<script>export let code;
|
|
2
|
-
export let
|
|
2
|
+
export let readonly = false;
|
|
3
3
|
export let formatCode = void 0;
|
|
4
4
|
export const buttonStyle = `px-3 py-1 text-sm bg-slate-500 hover:bg-slate-600
|
|
5
5
|
first-of-type:rounded-bl-md
|
|
@@ -48,7 +48,7 @@ async function pasteCode(event) {
|
|
|
48
48
|
</script>
|
|
49
49
|
|
|
50
50
|
<div>
|
|
51
|
-
<h3 class="text-slate-700 px-2 text-xl">
|
|
51
|
+
<h3 class="text-slate-700 px-2 text-xl">
|
|
52
52
|
<span>
|
|
53
53
|
<slot name="title">Code Presenter</slot>
|
|
54
54
|
</span>
|
|
@@ -97,7 +97,7 @@ async function pasteCode(event) {
|
|
|
97
97
|
|
|
98
98
|
<span class="pointer-events-none"> Copy </span>
|
|
99
99
|
</button>
|
|
100
|
-
{#if
|
|
100
|
+
{#if !readonly}
|
|
101
101
|
<button type="button" class={buttonStyle} on:click={pasteCode}>
|
|
102
102
|
<svg
|
|
103
103
|
class="w-5 h-5 pointer-events-none inline-block"
|
|
@@ -118,27 +118,15 @@ async function pasteCode(event) {
|
|
|
118
118
|
</svg>
|
|
119
119
|
|
|
120
120
|
<span> Paste </span>
|
|
121
|
-
</button>
|
|
122
|
-
<!-- {:else} -->
|
|
123
|
-
<!-- <button
|
|
124
|
-
disabled={isBusy}
|
|
125
|
-
type="button"
|
|
126
|
-
class="px-3 py-1 text-sm bg-slate-500 hover:bg-slate-600 rounded-tr-md
|
|
127
|
-
disabled:bg-slate-300
|
|
128
|
-
text-slate-50 space-x-2 transition-all ease-in-out duration-150 w-32"
|
|
129
|
-
on:click={refreshPayload}
|
|
130
|
-
>
|
|
131
|
-
<i class="bi bi-arrow-clockwise"></i>
|
|
132
|
-
|
|
133
|
-
<span> Refresh Json </span>
|
|
134
|
-
</button> -->
|
|
121
|
+
</button>
|
|
135
122
|
{/if}
|
|
123
|
+
<slot name="buttons"></slot>
|
|
136
124
|
</div>
|
|
137
125
|
</div>
|
|
138
126
|
<div class=" grid">
|
|
139
127
|
<textarea
|
|
140
128
|
bind:value={code}
|
|
141
|
-
readonly
|
|
129
|
+
{readonly}
|
|
142
130
|
{rows}
|
|
143
131
|
class=" p-2 py-4 md:px-4 pt-10 border border-slate-500 focus:ring focus:ring-blue-500/60 bg-stone-700 rounded-md text-yellow-100"
|
|
144
132
|
/>
|
|
@@ -2,7 +2,7 @@ import { SvelteComponent } from "svelte";
|
|
|
2
2
|
declare const __propDef: {
|
|
3
3
|
props: {
|
|
4
4
|
code: string;
|
|
5
|
-
|
|
5
|
+
readonly?: boolean;
|
|
6
6
|
formatCode?: (() => void) | undefined;
|
|
7
7
|
buttonStyle?: "px-3 py-1 text-sm bg-slate-500 hover:bg-slate-600\n first-of-type:rounded-bl-md \n text-slate-50 space-x-1 transition-all ease-in-out duration-150 w-32 \n border-r border-r-slate-600 last-of-type:border-r-0 last-of-type:rounded-br-md\n flex items-center justify-center space-x-1\n ";
|
|
8
8
|
minRows?: number;
|
|
@@ -12,6 +12,7 @@ declare const __propDef: {
|
|
|
12
12
|
};
|
|
13
13
|
slots: {
|
|
14
14
|
title: {};
|
|
15
|
+
buttons: {};
|
|
15
16
|
};
|
|
16
17
|
exports?: {} | undefined;
|
|
17
18
|
bindings?: string | undefined;
|
|
@@ -77,8 +77,8 @@ function handlePageChanged() {
|
|
|
77
77
|
on:click={() => handlePageIndexChanged(-1)}
|
|
78
78
|
type="button"
|
|
79
79
|
class="px-3 py-2 border border-teal-600 rounded text-teal-600 hover:bg-teal-600/10 active:bg-teal-600 active:text-teal-50
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
outline-none focus:outline-none
|
|
81
|
+
transition-all ease-in-out duration-300"
|
|
82
82
|
>
|
|
83
83
|
<svg
|
|
84
84
|
xmlns="http://www.w3.org/2000/svg"
|
|
@@ -93,7 +93,6 @@ function handlePageChanged() {
|
|
|
93
93
|
/>
|
|
94
94
|
</svg>
|
|
95
95
|
</button>
|
|
96
|
-
|
|
97
96
|
<button
|
|
98
97
|
on:click={() => handlePageIndexChanged(1)}
|
|
99
98
|
type="button"
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
<script>import { formatDateTime } from "../date-utils.js";
|
|
2
2
|
export let date;
|
|
3
3
|
export let showTimeStamp = true;
|
|
4
|
+
export let timeStyle = "short";
|
|
5
|
+
export let dateStyle = "short";
|
|
4
6
|
let dateFormatted = "";
|
|
5
7
|
$: {
|
|
6
8
|
if (typeof date === "string") {
|
|
7
9
|
date = new Date(date);
|
|
8
10
|
}
|
|
9
|
-
dateFormatted = formatDateTime(date, showTimeStamp);
|
|
11
|
+
dateFormatted = formatDateTime(date, showTimeStamp, timeStyle, dateStyle);
|
|
10
12
|
}
|
|
11
13
|
</script>
|
|
12
14
|
|
|
@@ -3,6 +3,8 @@ declare const __propDef: {
|
|
|
3
3
|
props: {
|
|
4
4
|
date: Date | string;
|
|
5
5
|
showTimeStamp?: boolean;
|
|
6
|
+
timeStyle?: "full" | "long" | "medium" | "short" | undefined;
|
|
7
|
+
dateStyle?: "full" | "long" | "medium" | "short" | undefined;
|
|
6
8
|
};
|
|
7
9
|
events: {
|
|
8
10
|
[evt: string]: CustomEvent<any>;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SvelteComponent } from "svelte";
|
|
2
|
+
declare const __propDef: {
|
|
3
|
+
props: {
|
|
4
|
+
direction?: "horizontal" | "vertical";
|
|
5
|
+
};
|
|
6
|
+
events: {
|
|
7
|
+
[evt: string]: CustomEvent<any>;
|
|
8
|
+
};
|
|
9
|
+
slots: {};
|
|
10
|
+
exports?: {} | undefined;
|
|
11
|
+
bindings?: string | undefined;
|
|
12
|
+
};
|
|
13
|
+
export type DividerProps = typeof __propDef.props;
|
|
14
|
+
export type DividerEvents = typeof __propDef.events;
|
|
15
|
+
export type DividerSlots = typeof __propDef.slots;
|
|
16
|
+
export default class Divider extends SvelteComponent<DividerProps, DividerEvents, DividerSlots> {
|
|
17
|
+
}
|
|
18
|
+
export {};
|