@keycloakify/svelte 0.1.10 → 0.1.12
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/keycloakify-svelte/login/components/InputFieldByType.svelte +2 -1
- package/keycloakify-svelte/login/components/InputFieldByType.svelte.d.ts +2 -1
- package/keycloakify-svelte/login/components/InputFieldByTypeProps.d.ts +1 -2
- package/keycloakify-svelte/login/components/InputTag.svelte +2 -1
- package/keycloakify-svelte/login/components/InputTag.svelte.d.ts +2 -1
- package/keycloakify-svelte/login/components/InputTagSelects.svelte +2 -1
- package/keycloakify-svelte/login/components/InputTagSelects.svelte.d.ts +2 -1
- package/keycloakify-svelte/login/components/SelectTag.svelte +3 -1
- package/keycloakify-svelte/login/components/SelectTag.svelte.d.ts +2 -1
- package/keycloakify-svelte/login/components/TextareaTag.svelte +4 -2
- package/keycloakify-svelte/login/components/TextareaTag.svelte.d.ts +2 -1
- package/package.json +1 -1
- package/src/login/components/InputFieldByType.svelte +2 -1
- package/src/login/components/InputFieldByTypeProps.ts +1 -2
- package/src/login/components/InputTag.svelte +2 -1
- package/src/login/components/InputTagSelects.svelte +2 -1
- package/src/login/components/SelectTag.svelte +3 -1
- package/src/login/components/TextareaTag.svelte +4 -2
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
import PasswordWrapper from './PasswordWrapper.svelte';
|
|
6
6
|
import SelectTag from './SelectTag.svelte';
|
|
7
7
|
import TextareaTag from './TextareaTag.svelte';
|
|
8
|
+
import type { I18n } from '../i18n';
|
|
8
9
|
|
|
9
|
-
let { displayableErrors, ...props }: InputFieldByTypeProps = $props();
|
|
10
|
+
let { displayableErrors, ...props }: InputFieldByTypeProps<I18n> = $props();
|
|
10
11
|
const { attribute, valueOrValues } = props;
|
|
11
12
|
const inputType = attribute.annotations.inputType ?? '';
|
|
12
13
|
</script>
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { InputFieldByTypeProps } from './InputFieldByTypeProps';
|
|
2
|
-
|
|
2
|
+
import type { I18n } from '../i18n';
|
|
3
|
+
declare const InputFieldByType: import("svelte").Component<InputFieldByTypeProps<I18n>, {}, "">;
|
|
3
4
|
type InputFieldByType = ReturnType<typeof InputFieldByType>;
|
|
4
5
|
export default InputFieldByType;
|
|
@@ -2,9 +2,8 @@ import type { FormAction, FormFieldError } from '../lib/useUserProfileForm';
|
|
|
2
2
|
import type { Attribute } from 'keycloakify/login/KcContext';
|
|
3
3
|
import type { KcClsx } from 'keycloakify/login/lib/kcClsx';
|
|
4
4
|
import type { EventDispatcher } from 'svelte';
|
|
5
|
-
import type { I18n } from '../i18n';
|
|
6
5
|
import type { Readable } from 'svelte/store';
|
|
7
|
-
export type InputFieldByTypeProps = {
|
|
6
|
+
export type InputFieldByTypeProps<I18n> = {
|
|
8
7
|
attribute: Attribute;
|
|
9
8
|
valueOrValues: string | string[];
|
|
10
9
|
displayableErrors: FormFieldError[];
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
import FieldErrors from './FieldErrors.svelte';
|
|
4
4
|
import type { InputFieldByTypeProps } from './InputFieldByTypeProps';
|
|
5
5
|
import { assert } from 'keycloakify/tools/assert';
|
|
6
|
+
import type { I18n } from '../i18n';
|
|
6
7
|
|
|
7
|
-
type InputTagProps = InputFieldByTypeProps & { fieldIndex?: number };
|
|
8
|
+
type InputTagProps = InputFieldByTypeProps<I18n> & { fieldIndex?: number };
|
|
8
9
|
let {
|
|
9
10
|
attribute,
|
|
10
11
|
fieldIndex,
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { InputFieldByTypeProps } from './InputFieldByTypeProps';
|
|
2
|
-
type
|
|
2
|
+
import type { I18n } from '../i18n';
|
|
3
|
+
type InputTagProps = InputFieldByTypeProps<I18n> & {
|
|
3
4
|
fieldIndex?: number;
|
|
4
5
|
};
|
|
5
6
|
declare const InputTag: import("svelte").Component<InputTagProps, {}, "displayableErrors">;
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
import type { InputFieldByTypeProps } from './InputFieldByTypeProps';
|
|
3
3
|
import { inputLabel } from './inputLabel';
|
|
4
4
|
import { assert } from 'keycloakify/tools/assert';
|
|
5
|
+
import type { I18n } from '../i18n';
|
|
5
6
|
|
|
6
|
-
const { attribute, dispatchFormAction, kcClsx, i18n, valueOrValues, displayableErrors }: InputFieldByTypeProps =
|
|
7
|
+
const { attribute, dispatchFormAction, kcClsx, i18n, valueOrValues, displayableErrors }: InputFieldByTypeProps<I18n> =
|
|
7
8
|
$props();
|
|
8
9
|
|
|
9
10
|
const { classDiv, classInput, classLabel, inputType } = (() => {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { InputFieldByTypeProps } from './InputFieldByTypeProps';
|
|
2
|
-
|
|
2
|
+
import type { I18n } from '../i18n';
|
|
3
|
+
declare const InputTagSelects: import("svelte").Component<InputFieldByTypeProps<I18n>, {}, "">;
|
|
3
4
|
type InputTagSelects = ReturnType<typeof InputTagSelects>;
|
|
4
5
|
export default InputTagSelects;
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
import type { InputFieldByTypeProps } from './InputFieldByTypeProps';
|
|
3
3
|
import { inputLabel } from './inputLabel';
|
|
4
4
|
import { assert } from 'keycloakify/tools/assert';
|
|
5
|
-
|
|
5
|
+
import type { I18n } from '../i18n';
|
|
6
|
+
|
|
7
|
+
const { attribute, dispatchFormAction, kcClsx, displayableErrors, i18n, valueOrValues }: InputFieldByTypeProps<I18n> =
|
|
6
8
|
$props();
|
|
7
9
|
|
|
8
10
|
const isMultiple = attribute.annotations.inputType === 'multiselect';
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { InputFieldByTypeProps } from './InputFieldByTypeProps';
|
|
2
|
-
|
|
2
|
+
import type { I18n } from '../i18n';
|
|
3
|
+
declare const SelectTag: import("svelte").Component<InputFieldByTypeProps<I18n>, {}, "">;
|
|
3
4
|
type SelectTag = ReturnType<typeof SelectTag>;
|
|
4
5
|
export default SelectTag;
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { assert } from 'keycloakify/tools/assert';
|
|
3
2
|
import type { InputFieldByTypeProps } from './InputFieldByTypeProps';
|
|
3
|
+
import { assert } from 'keycloakify/tools/assert';
|
|
4
|
+
import type { I18n } from '../i18n';
|
|
4
5
|
|
|
5
|
-
const { attribute, dispatchFormAction, kcClsx, displayableErrors, valueOrValues }: InputFieldByTypeProps =
|
|
6
|
+
const { attribute, dispatchFormAction, kcClsx, displayableErrors, valueOrValues }: InputFieldByTypeProps<I18n> =
|
|
7
|
+
$props();
|
|
6
8
|
|
|
7
9
|
assert(typeof valueOrValues === 'string');
|
|
8
10
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import type { InputFieldByTypeProps } from './InputFieldByTypeProps';
|
|
2
|
-
|
|
2
|
+
import type { I18n } from '../i18n';
|
|
3
|
+
declare const TextareaTag: import("svelte").Component<InputFieldByTypeProps<I18n>, {}, "">;
|
|
3
4
|
type TextareaTag = ReturnType<typeof TextareaTag>;
|
|
4
5
|
export default TextareaTag;
|
package/package.json
CHANGED
|
@@ -5,8 +5,9 @@
|
|
|
5
5
|
import PasswordWrapper from '@keycloakify/svelte/login/components/PasswordWrapper.svelte';
|
|
6
6
|
import SelectTag from '@keycloakify/svelte/login/components/SelectTag.svelte';
|
|
7
7
|
import TextareaTag from '@keycloakify/svelte/login/components/TextareaTag.svelte';
|
|
8
|
+
import type { I18n } from '../i18n';
|
|
8
9
|
|
|
9
|
-
let { displayableErrors, ...props }: InputFieldByTypeProps = $props();
|
|
10
|
+
let { displayableErrors, ...props }: InputFieldByTypeProps<I18n> = $props();
|
|
10
11
|
const { attribute, valueOrValues } = props;
|
|
11
12
|
const inputType = attribute.annotations.inputType ?? '';
|
|
12
13
|
</script>
|
|
@@ -2,10 +2,9 @@ import type { FormAction, FormFieldError } from '@keycloakify/svelte/login/lib/u
|
|
|
2
2
|
import type { Attribute } from 'keycloakify/login/KcContext';
|
|
3
3
|
import type { KcClsx } from 'keycloakify/login/lib/kcClsx';
|
|
4
4
|
import type { EventDispatcher } from 'svelte';
|
|
5
|
-
import type { I18n } from '../i18n';
|
|
6
5
|
import type { Readable } from 'svelte/store';
|
|
7
6
|
|
|
8
|
-
export type InputFieldByTypeProps = {
|
|
7
|
+
export type InputFieldByTypeProps<I18n> = {
|
|
9
8
|
attribute: Attribute;
|
|
10
9
|
valueOrValues: string | string[];
|
|
11
10
|
displayableErrors: FormFieldError[];
|
|
@@ -3,8 +3,9 @@
|
|
|
3
3
|
import FieldErrors from '@keycloakify/svelte/login/components/FieldErrors.svelte';
|
|
4
4
|
import type { InputFieldByTypeProps } from '@keycloakify/svelte/login/components/InputFieldByTypeProps';
|
|
5
5
|
import { assert } from 'keycloakify/tools/assert';
|
|
6
|
+
import type { I18n } from '../i18n';
|
|
6
7
|
|
|
7
|
-
type InputTagProps = InputFieldByTypeProps & { fieldIndex?: number };
|
|
8
|
+
type InputTagProps = InputFieldByTypeProps<I18n> & { fieldIndex?: number };
|
|
8
9
|
let {
|
|
9
10
|
attribute,
|
|
10
11
|
fieldIndex,
|
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
import type { InputFieldByTypeProps } from '@keycloakify/svelte/login/components/InputFieldByTypeProps';
|
|
3
3
|
import { inputLabel } from '@keycloakify/svelte/login/components/inputLabel';
|
|
4
4
|
import { assert } from 'keycloakify/tools/assert';
|
|
5
|
+
import type { I18n } from '../i18n';
|
|
5
6
|
|
|
6
|
-
const { attribute, dispatchFormAction, kcClsx, i18n, valueOrValues, displayableErrors }: InputFieldByTypeProps =
|
|
7
|
+
const { attribute, dispatchFormAction, kcClsx, i18n, valueOrValues, displayableErrors }: InputFieldByTypeProps<I18n> =
|
|
7
8
|
$props();
|
|
8
9
|
|
|
9
10
|
const { classDiv, classInput, classLabel, inputType } = (() => {
|
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
import type { InputFieldByTypeProps } from '@keycloakify/svelte/login/components/InputFieldByTypeProps';
|
|
3
3
|
import { inputLabel } from '@keycloakify/svelte/login/components/inputLabel';
|
|
4
4
|
import { assert } from 'keycloakify/tools/assert';
|
|
5
|
-
|
|
5
|
+
import type { I18n } from '../i18n';
|
|
6
|
+
|
|
7
|
+
const { attribute, dispatchFormAction, kcClsx, displayableErrors, i18n, valueOrValues }: InputFieldByTypeProps<I18n> =
|
|
6
8
|
$props();
|
|
7
9
|
|
|
8
10
|
const isMultiple = attribute.annotations.inputType === 'multiselect';
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
import { assert } from 'keycloakify/tools/assert';
|
|
3
2
|
import type { InputFieldByTypeProps } from '@keycloakify/svelte/login/components/InputFieldByTypeProps';
|
|
3
|
+
import { assert } from 'keycloakify/tools/assert';
|
|
4
|
+
import type { I18n } from '../i18n';
|
|
4
5
|
|
|
5
|
-
const { attribute, dispatchFormAction, kcClsx, displayableErrors, valueOrValues }: InputFieldByTypeProps =
|
|
6
|
+
const { attribute, dispatchFormAction, kcClsx, displayableErrors, valueOrValues }: InputFieldByTypeProps<I18n> =
|
|
7
|
+
$props();
|
|
6
8
|
|
|
7
9
|
assert(typeof valueOrValues === 'string');
|
|
8
10
|
|