firstly 0.2.0 → 0.3.0
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/CHANGELOG.md +23 -0
- package/esm/bin/cmd.js +3 -158
- package/esm/changeLog/index.d.ts +1 -6
- package/esm/feedback/FeedbackController.d.ts +6 -2
- package/esm/feedback/FeedbackController.js +145 -143
- package/esm/feedback/server/index.d.ts +2 -2
- package/esm/feedback/server/index.js +3 -3
- package/esm/feedback/types.d.ts +5 -0
- package/esm/feedback/ui/DialogIssue.svelte +5 -5
- package/esm/feedback/ui/DialogIssues.svelte +5 -5
- package/esm/feedback/ui/DialogMilestones.svelte +1 -1
- package/esm/internals/BaseEnum.d.ts +2 -1
- package/esm/internals/FF_Entity.js +1 -17
- package/esm/internals/FF_Fields.d.ts +4 -3
- package/esm/internals/FF_Fields.js +14 -55
- package/esm/internals/cellsBuildor.d.ts +2 -1
- package/esm/internals/cellsBuildor.js +5 -4
- package/esm/internals/index.d.ts +7 -12
- package/esm/internals/storeItem.d.ts +12 -20
- package/esm/internals/storeItem.js +20 -6
- package/esm/mail/server/index.d.ts +8 -2
- package/esm/mail/server/index.js +35 -7
- package/esm/server/index.d.ts +1 -1
- package/esm/svelte/FF_Cell.svelte +3 -5
- package/esm/svelte/FF_Cell.svelte.d.ts +4 -2
- package/esm/svelte/FF_Form.svelte +4 -5
- package/esm/svelte/FF_Grid.svelte +2 -2
- package/esm/svelte/FF_Layout.svelte +3 -3
- package/esm/svelte/FF_Repo.svelte.d.ts +9 -0
- package/esm/svelte/FF_Repo.svelte.js +39 -0
- package/esm/svelte/class/SP.svelte.js +14 -2
- package/esm/svelte/dialog/DialogManagement.svelte +2 -5
- package/esm/svelte/dialog/DialogPrimitive.svelte +1 -2
- package/esm/svelte/dialog/dialog.js +2 -2
- package/esm/svelte/ff_Config.svelte.js +2 -2
- package/esm/svelte/index.d.ts +2 -7
- package/esm/svelte/index.js +2 -7
- package/esm/ui/Button.svelte +34 -66
- package/esm/ui/Button.svelte.d.ts +9 -35
- package/esm/ui/Clipboardable.svelte +13 -17
- package/esm/ui/Clipboardable.svelte.d.ts +9 -33
- package/esm/ui/Field.svelte +48 -9
- package/esm/ui/FieldGroup.svelte.d.ts +1 -1
- package/esm/ui/Grid.svelte +13 -87
- package/esm/ui/Grid.svelte.d.ts +0 -1
- package/esm/ui/Grid2.svelte +26 -90
- package/esm/ui/Grid2.svelte.d.ts +1 -2
- package/esm/ui/GridPaginate.svelte +1 -1
- package/esm/ui/GridPaginate2.svelte +2 -2
- package/esm/ui/Icon.svelte +2 -18
- package/esm/ui/Icon.svelte.d.ts +0 -2
- package/esm/ui/LibIcon.js +2 -2
- package/esm/ui/Loading.svelte +1 -1
- package/esm/ui/dialog/DialogManagement.svelte +14 -5
- package/esm/ui/dialog/DialogPrimitive.svelte +3 -3
- package/esm/ui/dialog/FormEditAction.svelte +4 -4
- package/esm/ui/dialog/dialog.d.ts +5 -2
- package/esm/ui/dialog/dialog.js +2 -2
- package/esm/ui/index.d.ts +1 -0
- package/esm/ui/index.js +1 -0
- package/esm/ui/internals/FieldContainer.svelte +25 -14
- package/esm/ui/internals/FieldContainer.svelte.d.ts +9 -30
- package/esm/ui/internals/Input.svelte.d.ts +1 -1
- package/esm/ui/internals/Textarea.svelte +2 -5
- package/esm/ui/internals/select/MultiSelectMelt.svelte +10 -8
- package/esm/ui/internals/select/MultiSelectMelt.svelte.d.ts +1 -1
- package/esm/ui/internals/select/Select2.svelte +88 -0
- package/esm/ui/internals/select/Select2.svelte.d.ts +12 -0
- package/esm/ui/internals/select/SelectMelt.svelte +33 -24
- package/esm/ui/internals/select/SelectMelt.svelte.d.ts +1 -1
- package/esm/ui/internals/select/SelectRadio.svelte +2 -2
- package/esm/ui/internals/select/SelectRadio.svelte.d.ts +1 -1
- package/esm/ui/link/Link.svelte +1 -1
- package/esm/ui/link/LinkPlus.svelte +9 -5
- package/esm/ui/link/LinkPlus.svelte.d.ts +5 -19
- package/esm/virtual/Customer.js +1 -2
- package/esm/virtual/UIEntity.js +9 -5
- package/package.json +11 -25
- package/esm/auth/AuthController.d.ts +0 -58
- package/esm/auth/AuthController.js +0 -114
- package/esm/auth/Entities.d.ts +0 -47
- package/esm/auth/Entities.js +0 -182
- package/esm/auth/README.md +0 -3
- package/esm/auth/index.d.ts +0 -5
- package/esm/auth/index.js +0 -5
- package/esm/auth/server/AuthController.server.d.ts +0 -58
- package/esm/auth/server/AuthController.server.js +0 -498
- package/esm/auth/server/handleAuth.d.ts +0 -4
- package/esm/auth/server/handleAuth.js +0 -142
- package/esm/auth/server/handleGuard.d.ts +0 -22
- package/esm/auth/server/handleGuard.js +0 -34
- package/esm/auth/server/helperDb.d.ts +0 -10
- package/esm/auth/server/helperDb.js +0 -56
- package/esm/auth/server/helperFirstly.d.ts +0 -1
- package/esm/auth/server/helperFirstly.js +0 -9
- package/esm/auth/server/helperOslo.d.ts +0 -7
- package/esm/auth/server/helperOslo.js +0 -24
- package/esm/auth/server/helperRemultServer.d.ts +0 -5
- package/esm/auth/server/helperRemultServer.js +0 -44
- package/esm/auth/server/helperRole.d.ts +0 -19
- package/esm/auth/server/helperRole.js +0 -57
- package/esm/auth/server/index.d.ts +0 -8
- package/esm/auth/server/index.js +0 -8
- package/esm/auth/server/module.d.ts +0 -300
- package/esm/auth/server/module.js +0 -230
- package/esm/auth/server/providers/github.d.ts +0 -33
- package/esm/auth/server/providers/github.js +0 -87
- package/esm/auth/server/providers/helperProvider.d.ts +0 -1
- package/esm/auth/server/providers/helperProvider.js +0 -25
- package/esm/auth/static/assets/Page-9Ytj29NS.d.ts +0 -2
- package/esm/auth/static/assets/Page-9Ytj29NS.js +0 -1
- package/esm/auth/static/assets/Page-BHW08QWz.css +0 -1
- package/esm/auth/static/assets/Page-C1pM-UDt.d.ts +0 -2
- package/esm/auth/static/assets/Page-C1pM-UDt.js +0 -20
- package/esm/auth/static/assets/Page-CPz6KCw_.d.ts +0 -2
- package/esm/auth/static/assets/Page-CPz6KCw_.js +0 -1
- package/esm/auth/static/assets/index-AoBb9Ds5.d.ts +0 -232
- package/esm/auth/static/assets/index-AoBb9Ds5.js +0 -2
- package/esm/auth/static/assets/index-DKWpA6v7.css +0 -4
- package/esm/auth/static/favicon.svg +0 -79
- package/esm/auth/static/index.html +0 -13
- package/esm/auth/types.d.ts +0 -73
- package/esm/auth/types.js +0 -1
- package/esm/svelte/FF_Display.svelte +0 -51
- package/esm/svelte/FF_Display.svelte.d.ts +0 -29
- package/esm/svelte/FF_Edit.svelte +0 -104
- package/esm/svelte/FF_Edit.svelte.d.ts +0 -32
- package/esm/svelte/FF_Error.svelte +0 -23
- package/esm/svelte/FF_Error.svelte.d.ts +0 -29
- package/esm/svelte/FF_Field.svelte +0 -62
- package/esm/svelte/FF_Field.svelte.d.ts +0 -29
- package/esm/svelte/FF_Hint.svelte +0 -21
- package/esm/svelte/FF_Hint.svelte.d.ts +0 -29
- package/esm/svelte/FF_Label.svelte +0 -23
- package/esm/svelte/FF_Label.svelte.d.ts +0 -29
package/esm/auth/types.d.ts
DELETED
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
import type { UserInfo } from 'remult';
|
|
2
|
-
export type FirstlyData = {
|
|
3
|
-
module: 'auth';
|
|
4
|
-
debug?: boolean;
|
|
5
|
-
props: FirstlyDataAuth;
|
|
6
|
-
};
|
|
7
|
-
export type FirstlyDataAuth = FirstlyDataAuthUserLand & FirstlyDataAuthModuleLand;
|
|
8
|
-
export type FirstlyDataAuthUserLand = {
|
|
9
|
-
ui?: {
|
|
10
|
-
paths: {
|
|
11
|
-
base: string;
|
|
12
|
-
sign_up: string | false;
|
|
13
|
-
sign_in: string | false;
|
|
14
|
-
forgot_password: string | false;
|
|
15
|
-
reset_password: string | false;
|
|
16
|
-
verify_email: string | false;
|
|
17
|
-
};
|
|
18
|
-
strings: {
|
|
19
|
-
app_name: string;
|
|
20
|
-
email: string;
|
|
21
|
-
email_placeholder: string;
|
|
22
|
-
password: string;
|
|
23
|
-
password_placeholder: string;
|
|
24
|
-
confirm: string;
|
|
25
|
-
reset: string;
|
|
26
|
-
btn_sign_in: string;
|
|
27
|
-
btn_sign_up: string;
|
|
28
|
-
forgot_password: string;
|
|
29
|
-
send_password_reset_instructions: string;
|
|
30
|
-
back_to_sign_in: string;
|
|
31
|
-
};
|
|
32
|
-
images: {
|
|
33
|
-
main: string;
|
|
34
|
-
};
|
|
35
|
-
customHtmlHead: string;
|
|
36
|
-
};
|
|
37
|
-
};
|
|
38
|
-
export type FirstlyDataAuthModuleLand = {
|
|
39
|
-
providers: {
|
|
40
|
-
name: string;
|
|
41
|
-
label: string;
|
|
42
|
-
raw_svg?: string;
|
|
43
|
-
}[];
|
|
44
|
-
};
|
|
45
|
-
export type ProviderConfigured = Record<string, ProviderAuthorizationURLOptions>;
|
|
46
|
-
export type ProviderAuthorizationURLOptions = string[];
|
|
47
|
-
export type AuthResponse = {
|
|
48
|
-
message: string;
|
|
49
|
-
user: UserInfo | undefined;
|
|
50
|
-
};
|
|
51
|
-
export interface AuthServerAbstraction {
|
|
52
|
-
signOut: () => Promise<AuthResponse>;
|
|
53
|
-
signInDemo: (name: string) => Promise<AuthResponse>;
|
|
54
|
-
invite: (email: string) => Promise<AuthResponse>;
|
|
55
|
-
signUpPassword: (email: string, password: string) => Promise<AuthResponse>;
|
|
56
|
-
signInPassword: (email: string, password: string) => Promise<AuthResponse>;
|
|
57
|
-
forgotPassword: (email: string) => Promise<AuthResponse>;
|
|
58
|
-
resetPassword: (token: string, password: string) => Promise<AuthResponse>;
|
|
59
|
-
signInOTP: (email: string) => Promise<AuthResponse>;
|
|
60
|
-
verifyOtp: (email: string, otp: string) => Promise<AuthResponse>;
|
|
61
|
-
signInOAuthGetUrl: (o: {
|
|
62
|
-
provider: keyof ProviderConfigured;
|
|
63
|
-
options?: ProviderConfigured[keyof ProviderConfigured];
|
|
64
|
-
redirect?: string;
|
|
65
|
-
}) => Promise<string>;
|
|
66
|
-
}
|
|
67
|
-
export type OAuth2UserInfo = {
|
|
68
|
-
raw?: any;
|
|
69
|
-
providerUserId: string;
|
|
70
|
-
/** Will take the first option available */
|
|
71
|
-
nameOptions: string[];
|
|
72
|
-
emailOptions: string[];
|
|
73
|
-
};
|
package/esm/auth/types.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
<script lang="ts" generics="valueType = unknown, entityType = unknown">
|
|
2
|
-
import { getClasses, getDynamicCustomField, type DisplayTheme } from './'
|
|
3
|
-
import { isComponentObject, type CustomFieldDefaultProps } from './customField'
|
|
4
|
-
|
|
5
|
-
interface Props extends CustomFieldDefaultProps {
|
|
6
|
-
classes?: DisplayTheme
|
|
7
|
-
}
|
|
8
|
-
|
|
9
|
-
let { field, value, error, classes: localClasses = {} }: Props = $props()
|
|
10
|
-
|
|
11
|
-
// let valueList = getValueList(field) as { id: string; caption: string }[] | undefined
|
|
12
|
-
|
|
13
|
-
let classes = $derived(getClasses('display', localClasses))
|
|
14
|
-
const dynamicCustomField = getDynamicCustomField()?.({ field, value, error, mode: 'display' })
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
{#if field.options.ui?.component?.display}
|
|
18
|
-
{@const customField = field.options.ui?.component?.display}
|
|
19
|
-
{#if isComponentObject(customField)}
|
|
20
|
-
{@const Component = customField.component}
|
|
21
|
-
<Component {field} bind:value {error} {...customField.props} />
|
|
22
|
-
{:else}
|
|
23
|
-
{@const Component = customField}
|
|
24
|
-
<Component {field} bind:value {error} />
|
|
25
|
-
{/if}
|
|
26
|
-
{:else if dynamicCustomField}
|
|
27
|
-
{#if isComponentObject(dynamicCustomField)}
|
|
28
|
-
{@const Component = dynamicCustomField.component}
|
|
29
|
-
<Component {field} bind:value {error} {...dynamicCustomField.props} />
|
|
30
|
-
{:else}
|
|
31
|
-
{@const Component = dynamicCustomField}
|
|
32
|
-
<Component {field} bind:value {error} />
|
|
33
|
-
{/if}
|
|
34
|
-
{:else if field.inputType === 'checkbox'}
|
|
35
|
-
<input
|
|
36
|
-
disabled
|
|
37
|
-
data-ff-display-checkbox
|
|
38
|
-
class={classes?.checkbox}
|
|
39
|
-
type="checkbox"
|
|
40
|
-
checked={value as boolean}
|
|
41
|
-
/>
|
|
42
|
-
{:else}
|
|
43
|
-
{field.displayValue({ [field.key]: value } as Partial<entityType>)}
|
|
44
|
-
{/if}
|
|
45
|
-
|
|
46
|
-
<style>
|
|
47
|
-
[data-ff-display-checkbox] {
|
|
48
|
-
display: block;
|
|
49
|
-
margin: 0 auto;
|
|
50
|
-
}
|
|
51
|
-
</style>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type DisplayTheme } from './';
|
|
2
|
-
import { type CustomFieldDefaultProps } from './customField';
|
|
3
|
-
interface Props extends CustomFieldDefaultProps {
|
|
4
|
-
classes?: DisplayTheme;
|
|
5
|
-
}
|
|
6
|
-
declare function $$render<valueType = unknown, entityType = unknown>(): {
|
|
7
|
-
props: Props;
|
|
8
|
-
exports: {};
|
|
9
|
-
bindings: "";
|
|
10
|
-
slots: {};
|
|
11
|
-
events: {};
|
|
12
|
-
};
|
|
13
|
-
declare class __sveltets_Render<valueType = unknown, entityType = unknown> {
|
|
14
|
-
props(): ReturnType<typeof $$render<valueType, entityType>>['props'];
|
|
15
|
-
events(): ReturnType<typeof $$render<valueType, entityType>>['events'];
|
|
16
|
-
slots(): ReturnType<typeof $$render<valueType, entityType>>['slots'];
|
|
17
|
-
bindings(): "";
|
|
18
|
-
exports(): {};
|
|
19
|
-
}
|
|
20
|
-
interface $$IsomorphicComponent {
|
|
21
|
-
new <valueType = unknown, entityType = unknown>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<valueType, entityType>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<valueType, entityType>['props']>, ReturnType<__sveltets_Render<valueType, entityType>['events']>, ReturnType<__sveltets_Render<valueType, entityType>['slots']>> & {
|
|
22
|
-
$$bindings?: ReturnType<__sveltets_Render<valueType, entityType>['bindings']>;
|
|
23
|
-
} & ReturnType<__sveltets_Render<valueType, entityType>['exports']>;
|
|
24
|
-
<valueType = unknown, entityType = unknown>(internal: unknown, props: ReturnType<__sveltets_Render<valueType, entityType>['props']> & {}): ReturnType<__sveltets_Render<valueType, entityType>['exports']>;
|
|
25
|
-
z_$$bindings?: ReturnType<__sveltets_Render<any, any>['bindings']>;
|
|
26
|
-
}
|
|
27
|
-
declare const FfDisplay: $$IsomorphicComponent;
|
|
28
|
-
type FfDisplay<valueType = unknown, entityType = unknown> = InstanceType<typeof FfDisplay<valueType, entityType>>;
|
|
29
|
-
export default FfDisplay;
|
|
@@ -1,104 +0,0 @@
|
|
|
1
|
-
<script lang="ts" generics="valueType = unknown, entityType = unknown">
|
|
2
|
-
import { getValueList, type FieldMetadata } from 'remult'
|
|
3
|
-
|
|
4
|
-
import { getClasses, getDynamicCustomField } from '.'
|
|
5
|
-
import type { EditTheme } from './'
|
|
6
|
-
import { isComponentObject } from './customField'
|
|
7
|
-
|
|
8
|
-
const default_uid = $props.id()
|
|
9
|
-
|
|
10
|
-
interface Props {
|
|
11
|
-
uid?: string
|
|
12
|
-
field: FieldMetadata<valueType, entityType>
|
|
13
|
-
value: valueType
|
|
14
|
-
error?: string
|
|
15
|
-
classes?: EditTheme
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
let {
|
|
19
|
-
uid = default_uid,
|
|
20
|
-
field,
|
|
21
|
-
value = $bindable(),
|
|
22
|
-
error,
|
|
23
|
-
classes: localClasses = {},
|
|
24
|
-
}: Props = $props()
|
|
25
|
-
|
|
26
|
-
let valueList = getValueList(field) as { id: string; caption: string }[] | undefined
|
|
27
|
-
|
|
28
|
-
let classes = $derived(getClasses('edit', localClasses))
|
|
29
|
-
const dynamicCustomField = getDynamicCustomField()?.({ field, value, error, mode: 'edit' })
|
|
30
|
-
|
|
31
|
-
const fromInput = (val: any) => {
|
|
32
|
-
// console.log(`fromInput`, val)
|
|
33
|
-
const res = field.valueConverter.fromInput(val)
|
|
34
|
-
// if (res && field.inputType === 'datetime-local') {
|
|
35
|
-
// const date = new Date(res)
|
|
36
|
-
// date.setMinutes(date.getMinutes() - date.getTimezoneOffset())
|
|
37
|
-
// return date.toISOString().slice(0, 16)
|
|
38
|
-
// }
|
|
39
|
-
return res
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
const toInput = (val: any) => {
|
|
43
|
-
// console.log(`toInput1`, val)
|
|
44
|
-
const res = field.valueConverter.toInput(val)
|
|
45
|
-
// console.log(`toInput2`, res)
|
|
46
|
-
return res
|
|
47
|
-
}
|
|
48
|
-
</script>
|
|
49
|
-
|
|
50
|
-
{#if field.options.ui?.component?.edit}
|
|
51
|
-
{@const customField = field.options.ui?.component?.edit}
|
|
52
|
-
{#if isComponentObject(customField)}
|
|
53
|
-
{@const Component = customField.component}
|
|
54
|
-
<Component {field} bind:value {error} {...customField.props} />
|
|
55
|
-
{:else}
|
|
56
|
-
{@const Component = customField}
|
|
57
|
-
<Component {field} bind:value {error} />
|
|
58
|
-
{/if}
|
|
59
|
-
{:else if dynamicCustomField}
|
|
60
|
-
{#if isComponentObject(dynamicCustomField)}
|
|
61
|
-
{@const Component = dynamicCustomField.component}
|
|
62
|
-
<Component {field} bind:value {error} {...dynamicCustomField.props} />
|
|
63
|
-
{:else}
|
|
64
|
-
{@const Component = dynamicCustomField}
|
|
65
|
-
<Component {field} bind:value {error} />
|
|
66
|
-
{/if}
|
|
67
|
-
{:else if valueList}
|
|
68
|
-
<select data-ff-edit-select class={classes?.select} id={uid} bind:value>
|
|
69
|
-
{#each valueList as item (item.id)}
|
|
70
|
-
<option value={item}>{item.caption}</option>
|
|
71
|
-
{/each}
|
|
72
|
-
</select>
|
|
73
|
-
{:else if field.inputType === 'checkbox'}
|
|
74
|
-
<div style="display: flex; align-items: center; height: 3rem;">
|
|
75
|
-
<input
|
|
76
|
-
data-ff-edit-checkbox
|
|
77
|
-
class={classes?.checkbox}
|
|
78
|
-
id={uid}
|
|
79
|
-
type="checkbox"
|
|
80
|
-
bind:checked={value as boolean}
|
|
81
|
-
/>
|
|
82
|
-
</div>
|
|
83
|
-
{:else}
|
|
84
|
-
<input
|
|
85
|
-
autocomplete="off"
|
|
86
|
-
data-ff-edit-input
|
|
87
|
-
class={classes?.input}
|
|
88
|
-
id={uid}
|
|
89
|
-
type={field.options.inputType}
|
|
90
|
-
placeholder={field.options.ui?.placeholder}
|
|
91
|
-
bind:value={() => fromInput(value as any), (v) => (value = toInput(v) as valueType)}
|
|
92
|
-
step={field.options.ui?.step}
|
|
93
|
-
/>
|
|
94
|
-
{/if}
|
|
95
|
-
|
|
96
|
-
<style>
|
|
97
|
-
input[data-ff-edit-input] {
|
|
98
|
-
width: 100%;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
select[data-ff-edit-select] {
|
|
102
|
-
width: 100%;
|
|
103
|
-
}
|
|
104
|
-
</style>
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
import { type FieldMetadata } from 'remult';
|
|
2
|
-
import type { EditTheme } from './';
|
|
3
|
-
declare function $$render<valueType = unknown, entityType = unknown>(): {
|
|
4
|
-
props: {
|
|
5
|
-
uid?: string;
|
|
6
|
-
field: FieldMetadata<valueType, entityType>;
|
|
7
|
-
value: valueType;
|
|
8
|
-
error?: string;
|
|
9
|
-
classes?: EditTheme;
|
|
10
|
-
};
|
|
11
|
-
exports: {};
|
|
12
|
-
bindings: "value";
|
|
13
|
-
slots: {};
|
|
14
|
-
events: {};
|
|
15
|
-
};
|
|
16
|
-
declare class __sveltets_Render<valueType = unknown, entityType = unknown> {
|
|
17
|
-
props(): ReturnType<typeof $$render<valueType, entityType>>['props'];
|
|
18
|
-
events(): ReturnType<typeof $$render<valueType, entityType>>['events'];
|
|
19
|
-
slots(): ReturnType<typeof $$render<valueType, entityType>>['slots'];
|
|
20
|
-
bindings(): "value";
|
|
21
|
-
exports(): {};
|
|
22
|
-
}
|
|
23
|
-
interface $$IsomorphicComponent {
|
|
24
|
-
new <valueType = unknown, entityType = unknown>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<valueType, entityType>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<valueType, entityType>['props']>, ReturnType<__sveltets_Render<valueType, entityType>['events']>, ReturnType<__sveltets_Render<valueType, entityType>['slots']>> & {
|
|
25
|
-
$$bindings?: ReturnType<__sveltets_Render<valueType, entityType>['bindings']>;
|
|
26
|
-
} & ReturnType<__sveltets_Render<valueType, entityType>['exports']>;
|
|
27
|
-
<valueType = unknown, entityType = unknown>(internal: unknown, props: ReturnType<__sveltets_Render<valueType, entityType>['props']> & {}): ReturnType<__sveltets_Render<valueType, entityType>['exports']>;
|
|
28
|
-
z_$$bindings?: ReturnType<__sveltets_Render<any, any>['bindings']>;
|
|
29
|
-
}
|
|
30
|
-
declare const FfEdit: $$IsomorphicComponent;
|
|
31
|
-
type FfEdit<valueType = unknown, entityType = unknown> = InstanceType<typeof FfEdit<valueType, entityType>>;
|
|
32
|
-
export default FfEdit;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<script lang="ts" generics="valueType = unknown, entityType = unknown">
|
|
2
|
-
import { getClasses } from '.'
|
|
3
|
-
import type { CustomFieldDefaultProps } from './customField'
|
|
4
|
-
import type { ErrorTheme } from './ff_Config.svelte'
|
|
5
|
-
|
|
6
|
-
const default_uid = $props.id()
|
|
7
|
-
|
|
8
|
-
interface Props extends CustomFieldDefaultProps {
|
|
9
|
-
classes?: ErrorTheme
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
let { uid = default_uid, field, value, error, classes: localClasses = {} }: Props = $props()
|
|
13
|
-
|
|
14
|
-
let classes = $derived(getClasses('error', localClasses))
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
{#if field.options.ui?.component?.error === undefined || field.options.ui?.component?.error === 'show'}
|
|
18
|
-
<div data-ff-field-error class={classes.root}>{@html error}</div>
|
|
19
|
-
{:else if field.options.ui?.component?.error === 'remove'}
|
|
20
|
-
<!-- Nothing -->
|
|
21
|
-
{:else if field.options.ui?.component?.error === 'hide'}
|
|
22
|
-
<span class={classes.root}></span>
|
|
23
|
-
{/if}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { CustomFieldDefaultProps } from './customField';
|
|
2
|
-
import type { ErrorTheme } from './ff_Config.svelte';
|
|
3
|
-
interface Props extends CustomFieldDefaultProps {
|
|
4
|
-
classes?: ErrorTheme;
|
|
5
|
-
}
|
|
6
|
-
declare function $$render<valueType = unknown, entityType = unknown>(): {
|
|
7
|
-
props: Props;
|
|
8
|
-
exports: {};
|
|
9
|
-
bindings: "";
|
|
10
|
-
slots: {};
|
|
11
|
-
events: {};
|
|
12
|
-
};
|
|
13
|
-
declare class __sveltets_Render<valueType = unknown, entityType = unknown> {
|
|
14
|
-
props(): ReturnType<typeof $$render<valueType, entityType>>['props'];
|
|
15
|
-
events(): ReturnType<typeof $$render<valueType, entityType>>['events'];
|
|
16
|
-
slots(): ReturnType<typeof $$render<valueType, entityType>>['slots'];
|
|
17
|
-
bindings(): "";
|
|
18
|
-
exports(): {};
|
|
19
|
-
}
|
|
20
|
-
interface $$IsomorphicComponent {
|
|
21
|
-
new <valueType = unknown, entityType = unknown>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<valueType, entityType>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<valueType, entityType>['props']>, ReturnType<__sveltets_Render<valueType, entityType>['events']>, ReturnType<__sveltets_Render<valueType, entityType>['slots']>> & {
|
|
22
|
-
$$bindings?: ReturnType<__sveltets_Render<valueType, entityType>['bindings']>;
|
|
23
|
-
} & ReturnType<__sveltets_Render<valueType, entityType>['exports']>;
|
|
24
|
-
<valueType = unknown, entityType = unknown>(internal: unknown, props: ReturnType<__sveltets_Render<valueType, entityType>['props']> & {}): ReturnType<__sveltets_Render<valueType, entityType>['exports']>;
|
|
25
|
-
z_$$bindings?: ReturnType<__sveltets_Render<any, any>['bindings']>;
|
|
26
|
-
}
|
|
27
|
-
declare const FfError: $$IsomorphicComponent;
|
|
28
|
-
type FfError<valueType = unknown, entityType = unknown> = InstanceType<typeof FfError<valueType, entityType>>;
|
|
29
|
-
export default FfError;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
<script lang="ts" generics="valueType = unknown, entityType = unknown">
|
|
2
|
-
import { FF_Edit, FF_Error, FF_Hint, FF_Label, getClasses, type FieldTheme } from './'
|
|
3
|
-
import type { CustomFieldDefaultProps } from './customField'
|
|
4
|
-
|
|
5
|
-
const default_uid = $props.id()
|
|
6
|
-
|
|
7
|
-
interface Props extends CustomFieldDefaultProps {
|
|
8
|
-
classes?: FieldTheme
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
let {
|
|
12
|
-
uid = default_uid,
|
|
13
|
-
field,
|
|
14
|
-
value = $bindable(),
|
|
15
|
-
error,
|
|
16
|
-
classes: localClasses = {},
|
|
17
|
-
}: Props = $props()
|
|
18
|
-
|
|
19
|
-
let classes = $derived(getClasses('field', localClasses))
|
|
20
|
-
</script>
|
|
21
|
-
|
|
22
|
-
<div
|
|
23
|
-
data-ff-field
|
|
24
|
-
class={classes.root}
|
|
25
|
-
style:--width={field.options.ui?.width}
|
|
26
|
-
style:--margin-left={field.options.ui?.marginLeft}
|
|
27
|
-
style:--margin-right={field.options.ui?.marginRight}
|
|
28
|
-
style:--width-mobile={field.options.ui?.mobile?.width}
|
|
29
|
-
style:--margin-left-mobile={field.options.ui?.mobile?.marginLeft}
|
|
30
|
-
style:--margin-right-mobile={field.options.ui?.mobile?.marginRight}
|
|
31
|
-
>
|
|
32
|
-
<FF_Label {uid} {field} {error} {value} />
|
|
33
|
-
<FF_Error {uid} {field} {error} {value} />
|
|
34
|
-
<FF_Edit {uid} {field} {error} bind:value />
|
|
35
|
-
<FF_Hint {uid} {field} {error} {value} />
|
|
36
|
-
</div>
|
|
37
|
-
|
|
38
|
-
<style>
|
|
39
|
-
[data-ff-field] {
|
|
40
|
-
display: flex;
|
|
41
|
-
flex-direction: column;
|
|
42
|
-
box-sizing: border-box;
|
|
43
|
-
flex: 1 1 calc(var(--width, 100) * 1%);
|
|
44
|
-
max-width: calc(var(--width, 100) * 1%);
|
|
45
|
-
padding: var(--ff-spacing);
|
|
46
|
-
margin-left: calc(var(--margin-left, 0) * 1%);
|
|
47
|
-
margin-right: calc(var(--margin-right, 0) * 1%);
|
|
48
|
-
|
|
49
|
-
/* For debugging purposes - outline that doesn't affect layout */
|
|
50
|
-
/* outline: 1px solid rgba(255, 0, 0, 0.5);
|
|
51
|
-
outline-offset: -1px; */
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
@media screen and (max-width: 40rem) {
|
|
55
|
-
[data-ff-field] {
|
|
56
|
-
flex: 1 1 calc(var(--width-mobile, 100) * 1%);
|
|
57
|
-
max-width: calc(var(--width-mobile, 100) * 1%);
|
|
58
|
-
margin-left: calc(var(--margin-left-mobile, 0) * 1%);
|
|
59
|
-
margin-right: calc(var(--margin-right-mobile, 0) * 1%);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
</style>
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { type FieldTheme } from './';
|
|
2
|
-
import type { CustomFieldDefaultProps } from './customField';
|
|
3
|
-
interface Props extends CustomFieldDefaultProps {
|
|
4
|
-
classes?: FieldTheme;
|
|
5
|
-
}
|
|
6
|
-
declare function $$render<valueType = unknown, entityType = unknown>(): {
|
|
7
|
-
props: Props;
|
|
8
|
-
exports: {};
|
|
9
|
-
bindings: "value";
|
|
10
|
-
slots: {};
|
|
11
|
-
events: {};
|
|
12
|
-
};
|
|
13
|
-
declare class __sveltets_Render<valueType = unknown, entityType = unknown> {
|
|
14
|
-
props(): ReturnType<typeof $$render<valueType, entityType>>['props'];
|
|
15
|
-
events(): ReturnType<typeof $$render<valueType, entityType>>['events'];
|
|
16
|
-
slots(): ReturnType<typeof $$render<valueType, entityType>>['slots'];
|
|
17
|
-
bindings(): "value";
|
|
18
|
-
exports(): {};
|
|
19
|
-
}
|
|
20
|
-
interface $$IsomorphicComponent {
|
|
21
|
-
new <valueType = unknown, entityType = unknown>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<valueType, entityType>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<valueType, entityType>['props']>, ReturnType<__sveltets_Render<valueType, entityType>['events']>, ReturnType<__sveltets_Render<valueType, entityType>['slots']>> & {
|
|
22
|
-
$$bindings?: ReturnType<__sveltets_Render<valueType, entityType>['bindings']>;
|
|
23
|
-
} & ReturnType<__sveltets_Render<valueType, entityType>['exports']>;
|
|
24
|
-
<valueType = unknown, entityType = unknown>(internal: unknown, props: ReturnType<__sveltets_Render<valueType, entityType>['props']> & {}): ReturnType<__sveltets_Render<valueType, entityType>['exports']>;
|
|
25
|
-
z_$$bindings?: ReturnType<__sveltets_Render<any, any>['bindings']>;
|
|
26
|
-
}
|
|
27
|
-
declare const FfField: $$IsomorphicComponent;
|
|
28
|
-
type FfField<valueType = unknown, entityType = unknown> = InstanceType<typeof FfField<valueType, entityType>>;
|
|
29
|
-
export default FfField;
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
<script lang="ts" generics="valueType = unknown, entityType = unknown">
|
|
2
|
-
import { getClasses } from '.'
|
|
3
|
-
import type { CustomFieldDefaultProps } from './customField'
|
|
4
|
-
import type { HintTheme } from './ff_Config.svelte'
|
|
5
|
-
|
|
6
|
-
interface Props extends CustomFieldDefaultProps {
|
|
7
|
-
classes?: HintTheme
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
let { field, classes: localClasses = {} }: Props = $props()
|
|
11
|
-
|
|
12
|
-
let classes = $derived(getClasses('hint', localClasses))
|
|
13
|
-
</script>
|
|
14
|
-
|
|
15
|
-
{#if field.options.ui?.component?.hint === undefined || field.options.ui?.component?.hint === 'show'}
|
|
16
|
-
<div data-ff-field-hint class={classes.root}>{@html field.options.ui?.hint}</div>
|
|
17
|
-
{:else if field.options.ui?.component?.hint === 'remove'}
|
|
18
|
-
<!-- Nothing -->
|
|
19
|
-
{:else if field.options.ui?.component?.hint === 'hide'}
|
|
20
|
-
<div class={classes.root}></div>
|
|
21
|
-
{/if}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { CustomFieldDefaultProps } from './customField';
|
|
2
|
-
import type { HintTheme } from './ff_Config.svelte';
|
|
3
|
-
interface Props extends CustomFieldDefaultProps {
|
|
4
|
-
classes?: HintTheme;
|
|
5
|
-
}
|
|
6
|
-
declare function $$render<valueType = unknown, entityType = unknown>(): {
|
|
7
|
-
props: Props;
|
|
8
|
-
exports: {};
|
|
9
|
-
bindings: "";
|
|
10
|
-
slots: {};
|
|
11
|
-
events: {};
|
|
12
|
-
};
|
|
13
|
-
declare class __sveltets_Render<valueType = unknown, entityType = unknown> {
|
|
14
|
-
props(): ReturnType<typeof $$render<valueType, entityType>>['props'];
|
|
15
|
-
events(): ReturnType<typeof $$render<valueType, entityType>>['events'];
|
|
16
|
-
slots(): ReturnType<typeof $$render<valueType, entityType>>['slots'];
|
|
17
|
-
bindings(): "";
|
|
18
|
-
exports(): {};
|
|
19
|
-
}
|
|
20
|
-
interface $$IsomorphicComponent {
|
|
21
|
-
new <valueType = unknown, entityType = unknown>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<valueType, entityType>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<valueType, entityType>['props']>, ReturnType<__sveltets_Render<valueType, entityType>['events']>, ReturnType<__sveltets_Render<valueType, entityType>['slots']>> & {
|
|
22
|
-
$$bindings?: ReturnType<__sveltets_Render<valueType, entityType>['bindings']>;
|
|
23
|
-
} & ReturnType<__sveltets_Render<valueType, entityType>['exports']>;
|
|
24
|
-
<valueType = unknown, entityType = unknown>(internal: unknown, props: ReturnType<__sveltets_Render<valueType, entityType>['props']> & {}): ReturnType<__sveltets_Render<valueType, entityType>['exports']>;
|
|
25
|
-
z_$$bindings?: ReturnType<__sveltets_Render<any, any>['bindings']>;
|
|
26
|
-
}
|
|
27
|
-
declare const FfHint: $$IsomorphicComponent;
|
|
28
|
-
type FfHint<valueType = unknown, entityType = unknown> = InstanceType<typeof FfHint<valueType, entityType>>;
|
|
29
|
-
export default FfHint;
|
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
<script lang="ts" generics="valueType = unknown, entityType = unknown">
|
|
2
|
-
import { getClasses } from './'
|
|
3
|
-
import type { CustomFieldDefaultProps } from './customField'
|
|
4
|
-
import type { LabelTheme } from './ff_Config.svelte'
|
|
5
|
-
|
|
6
|
-
const default_uid = $props.id()
|
|
7
|
-
|
|
8
|
-
interface Props extends CustomFieldDefaultProps {
|
|
9
|
-
classes?: LabelTheme
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
let { uid = default_uid, field, classes: localClasses = {} }: Props = $props()
|
|
13
|
-
|
|
14
|
-
let classes = $derived(getClasses('label', localClasses))
|
|
15
|
-
</script>
|
|
16
|
-
|
|
17
|
-
{#if field.options.ui?.component?.label === undefined || field.options.ui?.component?.label === 'show'}
|
|
18
|
-
<label data-ff-field-label for={uid} class={classes.root}>{@html field.caption}</label>
|
|
19
|
-
{:else if field.options.ui?.component?.label === 'remove'}
|
|
20
|
-
<!-- Nothing -->
|
|
21
|
-
{:else if field.options.ui?.component?.label === 'hide'}
|
|
22
|
-
<span class={classes.root}></span>
|
|
23
|
-
{/if}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import type { CustomFieldDefaultProps } from './customField';
|
|
2
|
-
import type { LabelTheme } from './ff_Config.svelte';
|
|
3
|
-
interface Props extends CustomFieldDefaultProps {
|
|
4
|
-
classes?: LabelTheme;
|
|
5
|
-
}
|
|
6
|
-
declare function $$render<valueType = unknown, entityType = unknown>(): {
|
|
7
|
-
props: Props;
|
|
8
|
-
exports: {};
|
|
9
|
-
bindings: "";
|
|
10
|
-
slots: {};
|
|
11
|
-
events: {};
|
|
12
|
-
};
|
|
13
|
-
declare class __sveltets_Render<valueType = unknown, entityType = unknown> {
|
|
14
|
-
props(): ReturnType<typeof $$render<valueType, entityType>>['props'];
|
|
15
|
-
events(): ReturnType<typeof $$render<valueType, entityType>>['events'];
|
|
16
|
-
slots(): ReturnType<typeof $$render<valueType, entityType>>['slots'];
|
|
17
|
-
bindings(): "";
|
|
18
|
-
exports(): {};
|
|
19
|
-
}
|
|
20
|
-
interface $$IsomorphicComponent {
|
|
21
|
-
new <valueType = unknown, entityType = unknown>(options: import('svelte').ComponentConstructorOptions<ReturnType<__sveltets_Render<valueType, entityType>['props']>>): import('svelte').SvelteComponent<ReturnType<__sveltets_Render<valueType, entityType>['props']>, ReturnType<__sveltets_Render<valueType, entityType>['events']>, ReturnType<__sveltets_Render<valueType, entityType>['slots']>> & {
|
|
22
|
-
$$bindings?: ReturnType<__sveltets_Render<valueType, entityType>['bindings']>;
|
|
23
|
-
} & ReturnType<__sveltets_Render<valueType, entityType>['exports']>;
|
|
24
|
-
<valueType = unknown, entityType = unknown>(internal: unknown, props: ReturnType<__sveltets_Render<valueType, entityType>['props']> & {}): ReturnType<__sveltets_Render<valueType, entityType>['exports']>;
|
|
25
|
-
z_$$bindings?: ReturnType<__sveltets_Render<any, any>['bindings']>;
|
|
26
|
-
}
|
|
27
|
-
declare const FfLabel: $$IsomorphicComponent;
|
|
28
|
-
type FfLabel<valueType = unknown, entityType = unknown> = InstanceType<typeof FfLabel<valueType, entityType>>;
|
|
29
|
-
export default FfLabel;
|