@stamprally/admin-ui 0.8.0 → 0.10.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/dist/index.cjs +344 -1302
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +13 -0
- package/dist/index.d.cts +30 -72
- package/dist/index.d.ts +30 -72
- package/dist/index.js +346 -1299
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,81 +1,39 @@
|
|
|
1
|
-
import
|
|
2
|
-
import {
|
|
3
|
-
export { LocaleDictionary } from '@stamprally/core';
|
|
1
|
+
import { SupportedLocale, AdminRallyConfig, LocaleDictionary, CheckInCondition, SpotItem } from '@stamprally/core';
|
|
2
|
+
import { ReactElement } from 'react';
|
|
4
3
|
|
|
5
|
-
interface AdminRallyEditorProps<TLocale extends string =
|
|
4
|
+
interface AdminRallyEditorProps<TLocale extends string = SupportedLocale, TMeta extends Record<string, unknown> = Record<string, unknown>> {
|
|
6
5
|
readonly config: AdminRallyConfig<TLocale, TMeta>;
|
|
7
|
-
readonly locale?: TLocale;
|
|
8
6
|
readonly onChange: (config: AdminRallyConfig<TLocale, TMeta>) => void;
|
|
9
|
-
|
|
10
|
-
/** Universal-model GUI editor. JSON import/export remains available as a separate component. */
|
|
11
|
-
declare function AdminRallyEditor<TLocale extends string = string, TMeta extends Record<string, unknown> = Record<string, unknown>>({ config, locale, onChange }: AdminRallyEditorProps<TLocale, TMeta>): react.JSX.Element;
|
|
12
|
-
interface GeneralSettingsFormProps<TLocale extends string = SupportedLocale> {
|
|
13
|
-
readonly config: RallyConfig<TLocale>;
|
|
14
|
-
readonly locale?: TLocale;
|
|
15
|
-
readonly dictionary?: LocaleDictionary<TLocale>;
|
|
16
|
-
readonly onChange: (config: RallyConfig<TLocale>) => void;
|
|
17
|
-
}
|
|
18
|
-
declare function GeneralSettingsForm<TLocale extends string = SupportedLocale>({ config, locale, onChange, }: GeneralSettingsFormProps<TLocale>): react.JSX.Element;
|
|
19
|
-
interface ConditionEditorProps {
|
|
20
|
-
readonly condition: StampCondition;
|
|
21
|
-
readonly onChange: (condition: StampCondition) => void;
|
|
22
|
-
readonly locale?: SupportedLocale | (string & {});
|
|
23
|
-
}
|
|
24
|
-
declare function ConditionEditor({ condition, onChange }: ConditionEditorProps): react.JSX.Element;
|
|
25
|
-
interface SpotItemFormProps<TLocale extends string = SupportedLocale> {
|
|
26
|
-
readonly spot: SpotItem<TLocale>;
|
|
27
|
-
readonly index?: number;
|
|
28
|
-
readonly locale?: TLocale;
|
|
7
|
+
readonly locale?: string;
|
|
29
8
|
readonly dictionary?: LocaleDictionary<TLocale>;
|
|
30
|
-
readonly onChange: (spot: SpotItem<TLocale>) => void;
|
|
31
|
-
readonly onDelete?: () => void;
|
|
32
9
|
}
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
readonly spots: ReadonlyArray<SpotItem<TLocale>>;
|
|
36
|
-
readonly locale?: TLocale;
|
|
10
|
+
type DictionaryProps<TLocale extends string> = {
|
|
11
|
+
readonly locale?: NoInfer<TLocale>;
|
|
37
12
|
readonly dictionary?: LocaleDictionary<TLocale>;
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
readonly
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
readonly
|
|
56
|
-
readonly locale?: SupportedLocale | (string & {});
|
|
57
|
-
readonly onChange: (theme: SheetTheme) => void;
|
|
58
|
-
}
|
|
59
|
-
declare function ThemeEditor({ theme, locale, onChange, }: ThemeEditorProps): react.JSX.Element;
|
|
60
|
-
interface QrExportModalProps<TLocale extends string = SupportedLocale> {
|
|
61
|
-
readonly open: boolean;
|
|
62
|
-
readonly config: RallyConfig<TLocale>;
|
|
63
|
-
readonly locale?: TLocale;
|
|
64
|
-
readonly onClose: () => void;
|
|
65
|
-
}
|
|
66
|
-
declare function QrExportModal<TLocale extends string = SupportedLocale>({ open, config, locale, onClose, }: QrExportModalProps<TLocale>): react.JSX.Element | null;
|
|
67
|
-
interface JsonConfigIOProps<TLocale extends string = SupportedLocale> {
|
|
68
|
-
readonly config: RallyConfig<TLocale>;
|
|
69
|
-
readonly onImport: (config: RallyConfig<TLocale>) => void;
|
|
70
|
-
readonly locale?: TLocale;
|
|
13
|
+
};
|
|
14
|
+
interface ConditionEditorProps<TLocale extends string = SupportedLocale> extends DictionaryProps<TLocale> {
|
|
15
|
+
readonly condition: CheckInCondition;
|
|
16
|
+
readonly onChange: (condition: CheckInCondition) => void;
|
|
17
|
+
readonly onRemove?: () => void;
|
|
18
|
+
}
|
|
19
|
+
declare function ConditionEditor<TLocale extends string = SupportedLocale>({ condition, onChange, onRemove, locale, dictionary, }: ConditionEditorProps<TLocale>): ReactElement;
|
|
20
|
+
interface SpotItemFormProps<TLocale extends string = SupportedLocale, TMeta extends Record<string, unknown> = Record<string, unknown>> extends DictionaryProps<TLocale> {
|
|
21
|
+
readonly spot: SpotItem<TLocale, TMeta>;
|
|
22
|
+
readonly onChange: (spot: SpotItem<TLocale, TMeta>) => void;
|
|
23
|
+
readonly onRemove?: () => void;
|
|
24
|
+
}
|
|
25
|
+
declare function SpotItemForm<TLocale extends string = SupportedLocale, TMeta extends Record<string, unknown> = Record<string, unknown>>({ spot, onChange, onRemove, locale, dictionary, }: SpotItemFormProps<TLocale, TMeta>): ReactElement;
|
|
26
|
+
declare function AdminRallyEditor<TLocale extends string = SupportedLocale, TMeta extends Record<string, unknown> = Record<string, unknown>>({ config, onChange, locale, dictionary }: AdminRallyEditorProps<TLocale, TMeta>): ReactElement;
|
|
27
|
+
declare const RallyEditor: typeof AdminRallyEditor;
|
|
28
|
+
interface GeneralSettingsFormProps<TLocale extends string = SupportedLocale, TMeta extends Record<string, unknown> = Record<string, unknown>> extends DictionaryProps<TLocale> {
|
|
29
|
+
readonly config: AdminRallyConfig<TLocale, TMeta>;
|
|
30
|
+
readonly onChange: (config: AdminRallyConfig<TLocale, TMeta>) => void;
|
|
71
31
|
}
|
|
72
|
-
declare function
|
|
73
|
-
interface
|
|
74
|
-
readonly config:
|
|
75
|
-
readonly
|
|
76
|
-
readonly dictionary?: LocaleDictionary<TLocale>;
|
|
77
|
-
readonly onChange: (config: RallyConfig<TLocale>) => void;
|
|
32
|
+
declare function GeneralSettingsForm<TLocale extends string = SupportedLocale, TMeta extends Record<string, unknown> = Record<string, unknown>>({ config, onChange, locale, dictionary, }: GeneralSettingsFormProps<TLocale, TMeta>): ReactElement;
|
|
33
|
+
interface JsonConfigIOProps<TLocale extends string = SupportedLocale, TMeta extends Record<string, unknown> = Record<string, unknown>> extends DictionaryProps<TLocale> {
|
|
34
|
+
readonly config: AdminRallyConfig<TLocale, TMeta>;
|
|
35
|
+
readonly onImport: (config: AdminRallyConfig<TLocale, TMeta>) => void;
|
|
78
36
|
}
|
|
79
|
-
declare function
|
|
37
|
+
declare function JsonConfigIO<TLocale extends string = SupportedLocale, TMeta extends Record<string, unknown> = Record<string, unknown>>({ config, onImport, locale, dictionary }: JsonConfigIOProps<TLocale, TMeta>): ReactElement;
|
|
80
38
|
|
|
81
|
-
export { AdminRallyEditor, type AdminRallyEditorProps, ConditionEditor, type ConditionEditorProps, GeneralSettingsForm, type GeneralSettingsFormProps, JsonConfigIO, type JsonConfigIOProps,
|
|
39
|
+
export { AdminRallyEditor, type AdminRallyEditorProps, ConditionEditor, type ConditionEditorProps, GeneralSettingsForm, type GeneralSettingsFormProps, JsonConfigIO, type JsonConfigIOProps, RallyEditor, SpotItemForm, type SpotItemFormProps };
|