grav-svelte 0.0.80 → 0.0.82
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/CRUD/cells/BoolCell.svelte +4 -4
- package/dist/CRUD/cells/ConditionalCell.svelte +6 -10
- package/dist/CRUD/cells/DateCell.svelte +2 -2
- package/dist/CRUD/cells/DualTextButtonCell.svelte +8 -2
- package/dist/CRUD/cells/DynamicButtonCell.svelte +2 -2
- package/dist/CRUD/cells/MultiTextButtonCell.svelte +4 -1
- package/dist/CRUD/cells/TextCell.svelte +2 -4
- package/dist/CRUD/styles/CrudTable.css +2 -0
- package/package.json +1 -1
|
@@ -7,19 +7,19 @@
|
|
|
7
7
|
|
|
8
8
|
{#if item[header.campo] == true}
|
|
9
9
|
<div
|
|
10
|
-
class="cell-content {
|
|
10
|
+
class="cell-content {header.biBold
|
|
11
11
|
? 'bold'
|
|
12
12
|
: ''}"
|
|
13
|
-
style="text-align: {header.align ?? 'left'}"
|
|
13
|
+
style="text-align: {header.align ?? 'left'}; {header.colorCampo && item[header.colorCampo] ? `background-color: ${item[header.colorCampo]}; color: white;` : ''}"
|
|
14
14
|
>
|
|
15
15
|
<i class="fas fa-check"></i>
|
|
16
16
|
</div>
|
|
17
17
|
{:else}
|
|
18
18
|
<div
|
|
19
|
-
class="cell-content {
|
|
19
|
+
class="cell-content {header.biBold
|
|
20
20
|
? 'bold'
|
|
21
21
|
: ''}"
|
|
22
|
-
style="text-align: {header.align ?? 'left'}"
|
|
22
|
+
style="text-align: {header.align ?? 'left'}; {header.colorCampo && item[header.colorCampo] ? `background-color: ${item[header.colorCampo]}; color: white;` : ''}"
|
|
23
23
|
>
|
|
24
24
|
<i class="fas fa-minus"></i>
|
|
25
25
|
</div>
|
|
@@ -11,10 +11,8 @@
|
|
|
11
11
|
|
|
12
12
|
{#if config?.tipo === "Text"}
|
|
13
13
|
<p
|
|
14
|
-
class="cell-content {
|
|
15
|
-
|
|
16
|
-
: ''} {header.biBold ? 'bold' : ''}"
|
|
17
|
-
style="text-align: {header.align ?? 'left'}"
|
|
14
|
+
class="cell-content {header.biBold ? 'bold' : ''}"
|
|
15
|
+
style="text-align: {header.align ?? 'left'}; {config.colorField && item[config.colorField] ? `background-color: ${item[config.colorField]}; color: white;` : ''}"
|
|
18
16
|
>
|
|
19
17
|
{config.textField ? item[config.textField] ?? "" : ""}
|
|
20
18
|
</p>
|
|
@@ -30,18 +28,16 @@
|
|
|
30
28
|
>
|
|
31
29
|
{#if config.textField1 && item[config.textField1]}
|
|
32
30
|
<div
|
|
33
|
-
class="dual-text-1
|
|
34
|
-
|
|
35
|
-
: ''}"
|
|
31
|
+
class="dual-text-1"
|
|
32
|
+
style="{config.colorField1 && item[config.colorField1] ? `background-color: ${item[config.colorField1]}; color: white;` : ''}"
|
|
36
33
|
>
|
|
37
34
|
{item[config.textField1]}
|
|
38
35
|
</div>
|
|
39
36
|
{/if}
|
|
40
37
|
{#if config.textField2 && item[config.textField2]}
|
|
41
38
|
<div
|
|
42
|
-
class="dual-text-2
|
|
43
|
-
|
|
44
|
-
: ''}"
|
|
39
|
+
class="dual-text-2"
|
|
40
|
+
style="{config.colorField2 && item[config.colorField2] ? `background-color: ${item[config.colorField2]}; color: white;` : ''}"
|
|
45
41
|
>
|
|
46
42
|
{item[config.textField2]}
|
|
47
43
|
</div>
|
|
@@ -7,10 +7,10 @@
|
|
|
7
7
|
</script>
|
|
8
8
|
|
|
9
9
|
<p
|
|
10
|
-
class="cell-content {
|
|
10
|
+
class="cell-content {header.biBold
|
|
11
11
|
? 'bold'
|
|
12
12
|
: ''}"
|
|
13
|
-
style="text-align: {header.align ?? 'left'}"
|
|
13
|
+
style="text-align: {header.align ?? 'left'}; {header.colorCampo && item[header.colorCampo] ? `background-color: ${item[header.colorCampo]}; color: white;` : ''}"
|
|
14
14
|
>
|
|
15
15
|
{#if isDatetime}
|
|
16
16
|
{item[header.campo]?.replace("T", ":") ?? ":"}
|
|
@@ -24,12 +24,18 @@
|
|
|
24
24
|
}}
|
|
25
25
|
>
|
|
26
26
|
{#if hasText1}
|
|
27
|
-
<div
|
|
27
|
+
<div
|
|
28
|
+
class="dual-text-1 {isSingleState ? 'rounded-bottom' : ''}"
|
|
29
|
+
style="{header.colorField1 && item[header.colorField1] ? `background-color: ${item[header.colorField1]}; color: white;` : ''}"
|
|
30
|
+
>
|
|
28
31
|
{item[header.textField1]}
|
|
29
32
|
</div>
|
|
30
33
|
{/if}
|
|
31
34
|
{#if hasText2}
|
|
32
|
-
<div
|
|
35
|
+
<div
|
|
36
|
+
class="dual-text-2 {isSingleState ? 'rounded-bottom' : ''}"
|
|
37
|
+
style="{header.colorField2 && item[header.colorField2] ? `background-color: ${item[header.colorField2]}; color: white;` : ''}"
|
|
38
|
+
>
|
|
33
39
|
{item[header.textField2]}
|
|
34
40
|
</div>
|
|
35
41
|
{/if}
|
|
@@ -12,8 +12,8 @@
|
|
|
12
12
|
<div style="display: inline-flex; {alignStyle}">
|
|
13
13
|
<button
|
|
14
14
|
type="button"
|
|
15
|
-
class="
|
|
16
|
-
style="{header.styleField ? (item[header.styleField] ?? '') : ''}"
|
|
15
|
+
class="dynamic-button"
|
|
16
|
+
style="{header.colorField && item[header.colorField] ? `background-color: ${item[header.colorField]}; color: white;` : ''} {header.styleField ? (item[header.styleField] ?? '') : ''}"
|
|
17
17
|
on:click={() => {
|
|
18
18
|
if (header.onButtonClick) {
|
|
19
19
|
header.onButtonClick(item[idField], item);
|
|
@@ -19,7 +19,10 @@
|
|
|
19
19
|
}}
|
|
20
20
|
>
|
|
21
21
|
{#each items as multiItem}
|
|
22
|
-
<div
|
|
22
|
+
<div
|
|
23
|
+
class="multi-text-item"
|
|
24
|
+
style="{multiItem.color ? `background-color: ${multiItem.color}; color: white;` : ''}"
|
|
25
|
+
>
|
|
23
26
|
{multiItem.text ?? ""}
|
|
24
27
|
</div>
|
|
25
28
|
{/each}
|
|
@@ -6,10 +6,8 @@
|
|
|
6
6
|
</script>
|
|
7
7
|
|
|
8
8
|
<p
|
|
9
|
-
class="cell-content {
|
|
10
|
-
|
|
11
|
-
: ''}"
|
|
12
|
-
style="text-align: {header.align ?? 'left'}"
|
|
9
|
+
class="cell-content {header.biBold ? 'bold' : ''}"
|
|
10
|
+
style="text-align: {header.align ?? 'left'}; {header.colorCampo && item[header.colorCampo] ? `background-color: ${item[header.colorCampo]}; color: white;` : ''}"
|
|
13
11
|
>
|
|
14
12
|
{item[header.campo] ?? ""}
|
|
15
13
|
</p>
|