@gandalan/weblibs 0.0.24 → 0.0.27
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/components/Datepicker.svelte +3 -12
- package/components/Inputbox.svelte +1 -10
- package/declarations.d.ts +3 -0
- package/index.js +2 -1
- package/jsconfig.json +20 -0
- package/package.json +8 -2
|
@@ -8,11 +8,9 @@
|
|
|
8
8
|
const backgroundFalschesDatum = "#FF0000";
|
|
9
9
|
|
|
10
10
|
let monate = ["Januar", "Februar", "März", "April", "Mai", "Juni", "Juli", "August", "September", "Oktober", "November", "Dezember"];
|
|
11
|
-
let montateKurz = ["Jan", "Feb", "Mär", "Apr", "Mai", "Jun", "Jul", "Aug", "Sep", "Nov", "Dez"];
|
|
12
|
-
let tage = ["Montag", "Dienstag", "Mittwoch", "Donnerstag", "Freitag", "Samstag", "Sontag"];
|
|
13
11
|
let tageKurz = ["Mo", "Di", "Mi", "Do", "Fr", "Sa", "So"];
|
|
14
12
|
|
|
15
|
-
let
|
|
13
|
+
let buttonStyle, divStyle, inputStyle;
|
|
16
14
|
let background = backgroundNormal;
|
|
17
15
|
let buttonHeight = Height - 6;
|
|
18
16
|
let buttonImageHeight = Height - 10;
|
|
@@ -23,7 +21,6 @@
|
|
|
23
21
|
|
|
24
22
|
let allowedNumbers = ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0"];
|
|
25
23
|
let allowedTage = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
26
|
-
let allowedTageSchaltjahr = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
27
24
|
let allowedSonderzeichen = ".";
|
|
28
25
|
let allowedFunctionalKeys = ["ArrowLeft", "ArrowRight", "Backspace", "Delete"];
|
|
29
26
|
let currentJahr = new Date().getFullYear();
|
|
@@ -49,7 +46,6 @@
|
|
|
49
46
|
let inhalt = Value.split(allowedSonderzeichen);
|
|
50
47
|
let localTag = inhalt[0];
|
|
51
48
|
let localMonat = inhalt[1];
|
|
52
|
-
let localJahr = inhalt[2];
|
|
53
49
|
|
|
54
50
|
if(inhalt.length == 1 && Value.length == 2)
|
|
55
51
|
{
|
|
@@ -105,7 +101,6 @@
|
|
|
105
101
|
let tageImMonat = new Date(currentJahr, monatIndex, 0).getDate();
|
|
106
102
|
let localTagIndex = 0;
|
|
107
103
|
let woche = [];
|
|
108
|
-
let tagesWochenCounter = 0;
|
|
109
104
|
|
|
110
105
|
for(let counter = 0; counter < tageImMonat; counter++)
|
|
111
106
|
{
|
|
@@ -121,18 +116,15 @@
|
|
|
121
116
|
}
|
|
122
117
|
woche = [...woche, counter+1];
|
|
123
118
|
|
|
124
|
-
tagesWochenCounter++;
|
|
125
119
|
if(woche.length >= 7)
|
|
126
120
|
{
|
|
127
121
|
wochenImMonat = [...wochenImMonat, woche]
|
|
128
122
|
woche = [];
|
|
129
|
-
tagesWochenCounter = 0;
|
|
130
123
|
}
|
|
131
124
|
if(counter == tageImMonat-1)
|
|
132
125
|
{
|
|
133
126
|
wochenImMonat = [...wochenImMonat, woche]
|
|
134
127
|
woche = [];
|
|
135
|
-
tagesWochenCounter = 0;
|
|
136
128
|
}
|
|
137
129
|
}
|
|
138
130
|
}
|
|
@@ -174,7 +166,6 @@
|
|
|
174
166
|
{
|
|
175
167
|
if(allowedNumbers.includes(e.key) == true)
|
|
176
168
|
{
|
|
177
|
-
let inhalt = Value.split(allowedSonderzeichen);
|
|
178
169
|
if(Value.length >= 10)
|
|
179
170
|
{
|
|
180
171
|
ignoreInput(e);
|
|
@@ -224,7 +215,7 @@
|
|
|
224
215
|
</script>
|
|
225
216
|
|
|
226
217
|
<div style={divStyle}>
|
|
227
|
-
<input
|
|
218
|
+
<input type="text" style={inputStyle} placeholder={Placeholder} bind:value={Value} on:keydown={thisKeyDown}>
|
|
228
219
|
<button style={buttonStyle} on:click={() => datePickerHidden = !datePickerHidden}>
|
|
229
220
|
<img src="calendar.png" alt="" height={buttonImageHeight}>
|
|
230
221
|
<!-- [...] -->
|
|
@@ -255,7 +246,7 @@
|
|
|
255
246
|
<tr>
|
|
256
247
|
{#each woche as tageInWoche}
|
|
257
248
|
<td>
|
|
258
|
-
<button class="buttonTag" on:mouseover={() => setPlaceholder(tageInWoche)} on:click={() => setValue(tageInWoche)}>
|
|
249
|
+
<button class="buttonTag" on:mouseover={() => setPlaceholder(tageInWoche)} on:focus={() => setPlaceholder(tageInWoche)} on:click={() => setValue(tageInWoche)}>
|
|
259
250
|
{tageInWoche}
|
|
260
251
|
</button>
|
|
261
252
|
</td>
|
|
@@ -16,7 +16,6 @@
|
|
|
16
16
|
let errorMessage = "";
|
|
17
17
|
let style = "height: " + Height + "px; width: " + Width + "px;";
|
|
18
18
|
let styleError = "width: " + Width + "px;";
|
|
19
|
-
let tausenderTrenner = ".";
|
|
20
19
|
|
|
21
20
|
let allowedNumbers = ["0", "1", "2", "3", "4", "5", "6", "7", "8,", "9"];
|
|
22
21
|
let allowedDecimalTrenner = [",", "."];
|
|
@@ -203,7 +202,7 @@
|
|
|
203
202
|
}
|
|
204
203
|
return isBetween;
|
|
205
204
|
}
|
|
206
|
-
function thisKeyUp(
|
|
205
|
+
function thisKeyUp()
|
|
207
206
|
{
|
|
208
207
|
setFieldStyle();
|
|
209
208
|
}
|
|
@@ -220,14 +219,6 @@
|
|
|
220
219
|
}
|
|
221
220
|
}
|
|
222
221
|
|
|
223
|
-
$:if(DecimalTrenner)
|
|
224
|
-
{
|
|
225
|
-
// Dezimaltrenner und Tausendertrenner müssen für das US-Amerikanische Format getauscht werden
|
|
226
|
-
if(DecimalTrenner == allowedDecimalTrenner[1])
|
|
227
|
-
{
|
|
228
|
-
tausenderTrenner = allowedDecimalTrenner[0];
|
|
229
|
-
}
|
|
230
|
-
}
|
|
231
222
|
$:if(Type)
|
|
232
223
|
{
|
|
233
224
|
Type = Type.toLocaleLowerCase();
|
package/index.js
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
import AddButton from './components/AddButton.svelte';
|
|
2
2
|
import DataGrid from './components/DataGrid.svelte';
|
|
3
3
|
import Dialog from './components/Dialog.svelte';
|
|
4
|
+
import GanTable from './components/GanTable.svelte';
|
|
4
5
|
import Datepicker from './components/Datepicker.svelte';
|
|
5
6
|
import Inputbox from './components/Inputbox.svelte';
|
|
6
7
|
import RemoveButton from './components/RemoveButton.svelte';
|
|
7
8
|
import SaveButton from './components/SaveButton.svelte';
|
|
8
9
|
|
|
9
10
|
export {
|
|
10
|
-
DataGrid, Datepicker, Inputbox, Dialog,
|
|
11
|
+
DataGrid, Datepicker, Inputbox, Dialog, GanTable,
|
|
11
12
|
AddButton, RemoveButton, SaveButton
|
|
12
13
|
}
|
|
13
14
|
|
package/jsconfig.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"compilerOptions": {
|
|
3
|
+
"allowJs": true,
|
|
4
|
+
/**
|
|
5
|
+
* Typecheck JS in `.svelte` and `.js` files by default.
|
|
6
|
+
* Disable this if you'd like to use dynamic types.
|
|
7
|
+
*/
|
|
8
|
+
"checkJs": false, // Default: true
|
|
9
|
+
"esModuleInterop": true,
|
|
10
|
+
"forceConsistentCasingInFileNames": true,
|
|
11
|
+
"resolveJsonModule": true,
|
|
12
|
+
"skipLibCheck": true,
|
|
13
|
+
/**
|
|
14
|
+
* To have warnings / errors of the Svelte compiler at the
|
|
15
|
+
* correct position, enable source maps by default.
|
|
16
|
+
*/
|
|
17
|
+
"sourceMap": true,
|
|
18
|
+
"strict": true
|
|
19
|
+
}
|
|
20
|
+
}
|
package/package.json
CHANGED
|
@@ -1,13 +1,19 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gandalan/weblibs",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.27",
|
|
4
4
|
"description": "WebLibs for Gandalan JS/TS/Svelte projects",
|
|
5
5
|
"author": "Philipp Reif",
|
|
6
6
|
"license": "ISC",
|
|
7
|
-
"main": "index
|
|
7
|
+
"main": "index",
|
|
8
|
+
"typings": "index",
|
|
9
|
+
"scripts": {
|
|
10
|
+
"check": "svelte-check",
|
|
11
|
+
"check:watch": "svelte-check --watch"
|
|
12
|
+
},
|
|
8
13
|
"devDependencies": {
|
|
9
14
|
"chota": "^0.8.0",
|
|
10
15
|
"svelte": "^3.49.0",
|
|
16
|
+
"svelte-check": "^2.8.0",
|
|
11
17
|
"svelte-chota": "^1.8.6"
|
|
12
18
|
},
|
|
13
19
|
"dependencies": {
|