firstly 0.0.13 → 0.0.15

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.
Files changed (109) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/esm/ROUTES.d.ts +2 -0
  3. package/esm/ROUTES.js +1 -0
  4. package/esm/auth/AuthController.d.ts +12 -23
  5. package/esm/auth/AuthController.js +12 -31
  6. package/esm/auth/server/AuthController.server.d.ts +11 -11
  7. package/esm/auth/server/AuthController.server.js +84 -18
  8. package/esm/auth/server/helperFirstly.d.ts +1 -1
  9. package/esm/auth/server/helperFirstly.js +1 -0
  10. package/esm/auth/server/module.d.ts +4 -7
  11. package/esm/auth/server/module.js +1 -1
  12. package/esm/auth/server/providers/github.d.ts +2 -1
  13. package/esm/auth/server/providers/github.js +1 -1
  14. package/esm/auth/static/assets/Page-B1GE_oYi.d.ts +6 -0
  15. package/esm/auth/static/assets/Page-B1GE_oYi.js +1 -0
  16. package/esm/auth/static/assets/Page-CDHFtYuN.d.ts +6 -0
  17. package/esm/auth/static/assets/Page-CDHFtYuN.js +1 -0
  18. package/esm/auth/static/assets/Page-Dh8pvAo6.d.ts +6 -0
  19. package/esm/auth/static/assets/Page-Dh8pvAo6.js +20 -0
  20. package/esm/auth/static/assets/Page-mK42zGEw.css +1 -0
  21. package/esm/auth/static/assets/index-7Nh2ct-y.d.ts +151 -0
  22. package/esm/auth/static/assets/index-7Nh2ct-y.js +42 -0
  23. package/esm/auth/static/index.html +3 -3
  24. package/esm/auth/types.d.ts +26 -3
  25. package/esm/bin/cmd.js +343 -143
  26. package/esm/changeLog/server/index.d.ts +1 -1
  27. package/esm/changeLog/server/index.js +1 -1
  28. package/esm/cron/server/index.d.ts +1 -1
  29. package/esm/cron/server/index.js +1 -1
  30. package/esm/feedback/FeedbackController.js +57 -51
  31. package/esm/feedback/server/index.d.ts +7 -16
  32. package/esm/feedback/server/index.js +5 -6
  33. package/esm/feedback/types.d.ts +14 -0
  34. package/esm/feedback/types.js +4 -0
  35. package/esm/feedback/ui/DialogIssue.svelte +78 -62
  36. package/esm/feedback/ui/DialogIssue.svelte.d.ts +20 -18
  37. package/esm/feedback/ui/DialogIssues.svelte +37 -28
  38. package/esm/feedback/ui/DialogIssues.svelte.d.ts +20 -18
  39. package/esm/feedback/ui/DialogMilestones.svelte +18 -12
  40. package/esm/feedback/ui/DialogMilestones.svelte.d.ts +18 -16
  41. package/esm/feedback/ui/Feedback.svelte +11 -9
  42. package/esm/feedback/ui/Feedback.svelte.d.ts +16 -14
  43. package/esm/mail/server/index.d.ts +9 -2
  44. package/esm/mail/server/index.js +6 -2
  45. package/esm/mail/templates/DefaultMail.svelte +64 -44
  46. package/esm/mail/templates/DefaultMail.svelte.d.ts +28 -26
  47. package/esm/{api → server}/index.d.ts +8 -0
  48. package/esm/storeItem.d.ts +1 -1
  49. package/esm/storeList.d.ts +1 -1
  50. package/esm/sveltekit/server/index.d.ts +1 -10
  51. package/esm/sveltekit/server/index.js +1 -1
  52. package/esm/ui/Button.svelte +79 -56
  53. package/esm/ui/Button.svelte.d.ts +34 -24
  54. package/esm/ui/Clipboardable.svelte +18 -11
  55. package/esm/ui/Clipboardable.svelte.d.ts +34 -23
  56. package/esm/ui/Field.svelte +189 -136
  57. package/esm/ui/Field.svelte.d.ts +13 -6
  58. package/esm/ui/FieldGroup.svelte +74 -53
  59. package/esm/ui/FieldGroup.svelte.d.ts +17 -6
  60. package/esm/ui/Grid.svelte +110 -86
  61. package/esm/ui/Grid.svelte.d.ts +17 -6
  62. package/esm/ui/GridLoading.svelte +10 -5
  63. package/esm/ui/GridLoading.svelte.d.ts +19 -17
  64. package/esm/ui/GridPaginate.svelte +30 -23
  65. package/esm/ui/GridPaginate.svelte.d.ts +21 -19
  66. package/esm/ui/Icon.svelte +67 -32
  67. package/esm/ui/Icon.svelte.d.ts +52 -43
  68. package/esm/ui/Loading.svelte +5 -3
  69. package/esm/ui/Loading.svelte.d.ts +29 -18
  70. package/esm/ui/Tooltip.svelte +22 -19
  71. package/esm/ui/Tooltip.svelte.d.ts +30 -20
  72. package/esm/ui/dialog/DialogForm.svelte +48 -41
  73. package/esm/ui/dialog/DialogForm.svelte.d.ts +18 -16
  74. package/esm/ui/dialog/DialogManagement.svelte.d.ts +22 -21
  75. package/esm/ui/dialog/DialogPrimitive.svelte +32 -26
  76. package/esm/ui/dialog/DialogPrimitive.svelte.d.ts +35 -25
  77. package/esm/ui/dialog/FormEditAction.svelte +20 -12
  78. package/esm/ui/dialog/FormEditAction.svelte.d.ts +13 -6
  79. package/esm/ui/dialog/dialog.d.ts +1 -1
  80. package/esm/ui/internals/FieldContainer.svelte +13 -6
  81. package/esm/ui/internals/FieldContainer.svelte.d.ts +37 -28
  82. package/esm/ui/internals/Input.svelte +110 -76
  83. package/esm/ui/internals/Input.svelte.d.ts +34 -32
  84. package/esm/ui/internals/Textarea.svelte +39 -31
  85. package/esm/ui/internals/Textarea.svelte.d.ts +31 -28
  86. package/esm/ui/internals/select/MultiSelectMelt.svelte +174 -126
  87. package/esm/ui/internals/select/MultiSelectMelt.svelte.d.ts +29 -27
  88. package/esm/ui/internals/select/SelectMelt.svelte +168 -133
  89. package/esm/ui/internals/select/SelectMelt.svelte.d.ts +34 -32
  90. package/esm/ui/internals/select/SelectRadio.svelte +17 -11
  91. package/esm/ui/internals/select/SelectRadio.svelte.d.ts +24 -22
  92. package/esm/ui/link/Link.svelte +11 -6
  93. package/esm/ui/link/Link.svelte.d.ts +31 -22
  94. package/esm/ui/link/LinkPlus.svelte +19 -16
  95. package/esm/ui/link/LinkPlus.svelte.d.ts +20 -18
  96. package/esm/vite/index.d.ts +2 -3
  97. package/esm/vite/index.js +33 -26
  98. package/package.json +14 -14
  99. package/esm/auth/static/assets/Page-BUfjaN-D.d.ts +0 -5
  100. package/esm/auth/static/assets/Page-BUfjaN-D.js +0 -19
  101. package/esm/auth/static/assets/Page-CJ58H1vl.css +0 -1
  102. package/esm/auth/static/assets/Page-CaDAqmBS.d.ts +0 -5
  103. package/esm/auth/static/assets/Page-CaDAqmBS.js +0 -1
  104. package/esm/auth/static/assets/Page-DhdZddzJ.d.ts +0 -5
  105. package/esm/auth/static/assets/Page-DhdZddzJ.js +0 -1
  106. package/esm/auth/static/assets/index-D-Ztdt2o.d.ts +0 -54
  107. package/esm/auth/static/assets/index-D-Ztdt2o.js +0 -2
  108. /package/esm/auth/static/assets/{index-BDy4A_14.css → index-DKWpA6v7.css} +0 -0
  109. /package/esm/{api → server}/index.js +0 -0
@@ -1,79 +1,113 @@
1
- <script>import { createEventDispatcher, tick } from "svelte";
2
- import { tw } from "../../utils/tailwind";
3
- export let value = void 0;
4
- const dispatch = createEventDispatcher();
5
- export let focus = false;
6
- const focusNow = (node) => {
7
- if (focus) {
8
- tick().then(() => {
9
- node.focus();
10
- });
11
- }
12
- };
13
- export let withDedounce = false;
14
- let timer = null;
15
- const debounce = (fn) => {
16
- clearTimeout(timer);
17
- timer = setTimeout(() => {
18
- fn();
19
- }, 444);
20
- };
21
- function dispatchInput(value2) {
22
- if ($$restProps.type === "date") {
23
- if (value2 || value2 === null) {
24
- dispatch("input", { value: transformDate(value2) });
25
- }
26
- } else {
27
- dispatch("input", { value: value2 });
28
- }
29
- }
30
- let className = void 0;
31
- export { className as class };
32
- const handleInput = (e) => {
33
- const target = e.target;
34
- if ($$restProps.type === "number") {
35
- if (e.data === "." || e.data === ",") {
36
- value = target.value.toString().replaceAll(",", ".");
37
- } else if (target.value === "") {
38
- value = null;
39
- } else {
40
- value = target.value.toString().replaceAll(",", ".");
41
- }
42
- } else if ($$restProps.type === "date") {
43
- if (target.value === "") {
44
- value = null;
45
- } else {
46
- value = target.value;
47
- }
48
- } else {
49
- value = target.value;
50
- }
51
- if (withDedounce) {
52
- return debounce(() => {
53
- dispatchInput(value);
54
- });
55
- } else {
56
- dispatchInput(value);
57
- }
58
- };
59
- const transformDate = (input) => {
60
- if (input === null) {
61
- return null;
62
- }
63
- const rawDateSplited = input.split("-");
64
- if (rawDateSplited.length === 3) {
65
- const yearSplited = rawDateSplited[0].split("");
66
- if (yearSplited.length === 4 && yearSplited[0] === "0" && yearSplited[1] === "0" && yearSplited[2] !== "0") {
67
- return `20${yearSplited[2]}${yearSplited[3]}-${rawDateSplited[1]}-${rawDateSplited[2]}`;
68
- }
69
- }
70
- return input;
71
- };
72
- const handleKeyup = (event) => {
73
- if ($$restProps.type === "date") {
74
- value = transformDate(event.target.value);
75
- }
76
- };
1
+ <script lang="ts">
2
+ import { createEventDispatcher, tick } from 'svelte'
3
+ import type { HTMLInputAttributes } from 'svelte/elements'
4
+
5
+ import { tw } from '../../utils/tailwind'
6
+
7
+ export let value: HTMLInputAttributes['value'] = undefined
8
+
9
+ const dispatch = createEventDispatcher()
10
+
11
+ export let focus: boolean = false
12
+ const focusNow = (node: any) => {
13
+ if (focus) {
14
+ tick().then(() => {
15
+ node.focus()
16
+ })
17
+ }
18
+ }
19
+
20
+ // OPTION Dedounce
21
+ export let withDedounce: boolean = false
22
+ let timer: any = null
23
+ const debounce = (fn: () => void) => {
24
+ clearTimeout(timer)
25
+ timer = setTimeout(() => {
26
+ fn()
27
+ }, 444)
28
+ }
29
+ function dispatchInput(value: any) {
30
+ if ($$restProps.type === 'date') {
31
+ if (value || value === null) {
32
+ dispatch('input', { value: transformDate(value) })
33
+ }
34
+ } else {
35
+ dispatch('input', { value })
36
+ }
37
+ }
38
+
39
+ let className: string | undefined | null = undefined
40
+ export { className as class }
41
+
42
+ const handleInput = (e: any) => {
43
+ const target: HTMLInputElement = e.target as HTMLInputElement
44
+
45
+ if ($$restProps.type === 'number') {
46
+ // If we see a `.` or a `,` don't continue and wait for the next input !
47
+ if (e.data === '.' || e.data === ',') {
48
+ // e.preventDefault()
49
+ value = target.value.toString().replaceAll(',', '.')
50
+ } else if (target.value === '') {
51
+ // Could be good one day ?
52
+ // if (target.min) {
53
+ // value = target.min
54
+ // } else {
55
+ // value = null
56
+ // }
57
+ value = null
58
+ } else {
59
+ // This convert well the input into a valid number... But "12,0" will be converted into "12" so we can't write "12,01" for example!
60
+ // value = +target.value
61
+
62
+ // For now, let's always put a "." as a separator.
63
+ value = target.value.toString().replaceAll(',', '.')
64
+ }
65
+ } else if ($$restProps.type === 'date') {
66
+ if (target.value === '') {
67
+ value = null!
68
+ } else {
69
+ value = target.value
70
+ }
71
+ } else {
72
+ value = target.value
73
+ }
74
+
75
+ if (withDedounce) {
76
+ return debounce(() => {
77
+ dispatchInput(value)
78
+ })
79
+ } else {
80
+ dispatchInput(value)
81
+ }
82
+ }
83
+
84
+ const transformDate = (input: string | null) => {
85
+ if (input === null) {
86
+ return null
87
+ }
88
+ const rawDateSplited = input.split('-')
89
+
90
+ if (rawDateSplited.length === 3) {
91
+ const yearSplited = rawDateSplited[0].split('')
92
+ if (
93
+ yearSplited.length === 4 &&
94
+ yearSplited[0] === '0' &&
95
+ yearSplited[1] === '0' &&
96
+ yearSplited[2] !== '0'
97
+ ) {
98
+ return `20${yearSplited[2]}${yearSplited[3]}-${rawDateSplited[1]}-${rawDateSplited[2]}`
99
+ }
100
+ }
101
+
102
+ return input
103
+ }
104
+
105
+ const handleKeyup = (event: KeyboardEvent) => {
106
+ if ($$restProps.type === 'date') {
107
+ // @ts-ignore
108
+ value = transformDate(event.target.value)
109
+ }
110
+ }
77
111
  </script>
78
112
 
79
113
  <input
@@ -1,35 +1,37 @@
1
- import { SvelteComponent } from "svelte";
2
1
  import type { HTMLInputAttributes } from 'svelte/elements';
3
- declare const __propDef: {
4
- props: {
5
- [x: string]: any;
6
- value?: HTMLInputAttributes["value"];
7
- focus?: boolean | undefined;
8
- withDedounce?: boolean | undefined;
9
- class?: string | undefined | null | undefined;
2
+ 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> {
3
+ new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
4
+ $$bindings?: Bindings;
5
+ } & Exports;
6
+ (internal: unknown, props: Props & {
7
+ $$events?: Events;
8
+ $$slots?: Slots;
9
+ }): Exports & {
10
+ $set?: any;
11
+ $on?: any;
10
12
  };
11
- events: {
12
- blur: FocusEvent;
13
- change: Event;
14
- click: MouseEvent;
15
- focus: FocusEvent;
16
- keydown: KeyboardEvent;
17
- keypress: KeyboardEvent;
18
- mouseover: MouseEvent;
19
- mouseenter: MouseEvent;
20
- mouseleave: MouseEvent;
21
- paste: ClipboardEvent;
22
- input: CustomEvent<any>;
23
- } & {
24
- [evt: string]: CustomEvent<any>;
25
- };
26
- slots: {};
27
- exports?: undefined;
28
- bindings?: undefined;
29
- };
30
- export type InputProps = typeof __propDef.props;
31
- export type InputEvents = typeof __propDef.events;
32
- export type InputSlots = typeof __propDef.slots;
33
- export default class Input extends SvelteComponent<InputProps, InputEvents, InputSlots> {
13
+ z_$$bindings?: Bindings;
34
14
  }
35
- export {};
15
+ declare const Input: $$__sveltets_2_IsomorphicComponent<{
16
+ [x: string]: any;
17
+ value?: HTMLInputAttributes["value"];
18
+ focus?: boolean | undefined;
19
+ withDedounce?: boolean | undefined;
20
+ class?: string | undefined | null | undefined;
21
+ }, {
22
+ blur: FocusEvent;
23
+ change: Event;
24
+ click: MouseEvent;
25
+ focus: FocusEvent;
26
+ keydown: KeyboardEvent;
27
+ keypress: KeyboardEvent;
28
+ mouseover: MouseEvent;
29
+ mouseenter: MouseEvent;
30
+ mouseleave: MouseEvent;
31
+ paste: ClipboardEvent;
32
+ input: CustomEvent<any>;
33
+ } & {
34
+ [evt: string]: CustomEvent<any>;
35
+ }, {}, {}, string>;
36
+ type Input = InstanceType<typeof Input>;
37
+ export default Input;
@@ -1,34 +1,42 @@
1
- <script>import { createEventDispatcher, onMount } from "svelte";
2
- import { scrollbar } from "../../theme";
3
- export let name = null;
4
- export let id = "";
5
- export let rows = 4;
6
- export let placeholder = "";
7
- export let focus = false;
8
- export let value = "";
9
- export let readonly = false;
10
- export const error = false;
11
- export let align = `left`;
12
- const _tmp = align;
13
- const dispatch = createEventDispatcher();
14
- let reference;
15
- const focusNow = (node) => {
16
- if (focus) {
17
- node.focus();
18
- }
19
- };
20
- onMount(() => {
21
- if (!reference) {
22
- return;
23
- }
24
- if (!focus) {
25
- return;
26
- }
27
- reference.focus();
28
- });
29
- function dispatchInput(value2) {
30
- dispatch("input", { value: value2 });
31
- }
1
+ <script lang="ts">
2
+ import { createEventDispatcher, onMount } from 'svelte'
3
+
4
+ import { scrollbar } from '../../theme'
5
+
6
+ export let name: string | null = null
7
+ export let id = ''
8
+ export let rows = 4
9
+ export let placeholder = ''
10
+ export let focus = false
11
+ export let value = ''
12
+ export let readonly = false
13
+ export const error = false
14
+ // unused but needed to avoid Field error 👇
15
+ export let align: `left` | `right` = `left`
16
+ const _tmp = align
17
+
18
+ const dispatch = createEventDispatcher()
19
+
20
+ let reference: HTMLTextAreaElement
21
+
22
+ const focusNow = (node: HTMLTextAreaElement) => {
23
+ if (focus) {
24
+ node.focus()
25
+ }
26
+ }
27
+
28
+ onMount(() => {
29
+ if (!reference) {
30
+ return
31
+ }
32
+ if (!focus) {
33
+ return
34
+ }
35
+ reference.focus()
36
+ })
37
+ function dispatchInput(value: any) {
38
+ dispatch('input', { value })
39
+ }
32
40
  </script>
33
41
 
34
42
  {#if readonly}
@@ -1,30 +1,33 @@
1
- import { SvelteComponent } from "svelte";
2
- declare const __propDef: {
3
- props: {
4
- [x: string]: any;
5
- name?: string | null | undefined;
6
- id?: string | undefined;
7
- rows?: number | undefined;
8
- placeholder?: string | undefined;
9
- focus?: boolean | undefined;
10
- value?: string | undefined;
11
- readonly?: boolean | undefined;
12
- error?: false | undefined;
13
- align?: `left` | `right` | undefined;
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;
14
11
  };
15
- events: {
16
- input: CustomEvent<any>;
17
- } & {
18
- [evt: string]: CustomEvent<any>;
19
- };
20
- slots: {};
21
- exports?: undefined;
22
- bindings?: undefined;
23
- };
24
- export type TextareaProps = typeof __propDef.props;
25
- export type TextareaEvents = typeof __propDef.events;
26
- export type TextareaSlots = typeof __propDef.slots;
27
- export default class Textarea extends SvelteComponent<TextareaProps, TextareaEvents, TextareaSlots> {
28
- get error(): false;
12
+ z_$$bindings?: Bindings;
29
13
  }
30
- export {};
14
+ declare const Textarea: $$__sveltets_2_IsomorphicComponent<{
15
+ [x: string]: any;
16
+ name?: string | null | undefined;
17
+ id?: string | undefined;
18
+ rows?: number | undefined;
19
+ placeholder?: string | undefined;
20
+ focus?: boolean | undefined;
21
+ value?: string | undefined;
22
+ readonly?: boolean | undefined;
23
+ error?: false | undefined;
24
+ align?: `left` | `right` | undefined;
25
+ }, {
26
+ input: CustomEvent<any>;
27
+ } & {
28
+ [evt: string]: CustomEvent<any>;
29
+ }, {}, {
30
+ error: false;
31
+ }, string>;
32
+ type Textarea = InstanceType<typeof Textarea>;
33
+ export default Textarea;