@voyantjs/sellability-ui 0.16.0 → 0.17.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/README.md +14 -0
- package/dist/components/channel-combobox.d.ts +1 -1
- package/dist/components/channel-combobox.d.ts.map +1 -1
- package/dist/components/channel-combobox.js +10 -3
- package/dist/components/market-combobox.d.ts +1 -1
- package/dist/components/market-combobox.d.ts.map +1 -1
- package/dist/components/market-combobox.js +6 -2
- package/dist/components/policy-dialog.d.ts.map +1 -1
- package/dist/components/policy-dialog.js +40 -27
- package/dist/components/product-combobox.d.ts +1 -1
- package/dist/components/product-combobox.d.ts.map +1 -1
- package/dist/components/product-combobox.js +7 -3
- package/dist/components/product-option-combobox.d.ts.map +1 -1
- package/dist/components/product-option-combobox.js +7 -5
- package/dist/i18n/en.d.ts +102 -0
- package/dist/i18n/en.d.ts.map +1 -0
- package/dist/i18n/en.js +101 -0
- package/dist/i18n/index.d.ts +5 -0
- package/dist/i18n/index.d.ts.map +1 -0
- package/dist/i18n/index.js +3 -0
- package/dist/i18n/messages.d.ts +71 -0
- package/dist/i18n/messages.d.ts.map +1 -0
- package/dist/i18n/messages.js +1 -0
- package/dist/i18n/provider.d.ts +226 -0
- package/dist/i18n/provider.d.ts.map +1 -0
- package/dist/i18n/provider.js +44 -0
- package/dist/i18n/ro.d.ts +102 -0
- package/dist/i18n/ro.d.ts.map +1 -0
- package/dist/i18n/ro.js +101 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/package.json +29 -13
package/README.md
CHANGED
|
@@ -11,3 +11,17 @@ pnpm add @voyantjs/sellability-ui @voyantjs/sellability-react @voyantjs/ui @tans
|
|
|
11
11
|
`@voyantjs/ui` provides the design-system primitives. `@voyantjs/sellability-react` provides the data-layer hooks. Both are required peers.
|
|
12
12
|
|
|
13
13
|
All components accept a `className` prop and merge it with `cn()`. Wrap or compose to extend; use the registry copy-paste path (`npx shadcn add @voyant/...`) for components you want to fork outright.
|
|
14
|
+
|
|
15
|
+
## I18n
|
|
16
|
+
|
|
17
|
+
Components render English by default. To localize them, wrap your UI in
|
|
18
|
+
`SellabilityUiMessagesProvider` and import only the locales your app supports.
|
|
19
|
+
|
|
20
|
+
```tsx
|
|
21
|
+
import { SellabilityUiMessagesProvider } from "@voyantjs/sellability-ui"
|
|
22
|
+
import { sellabilityUiEn } from "@voyantjs/sellability-ui/i18n/en"
|
|
23
|
+
import { sellabilityUiRo } from "@voyantjs/sellability-ui/i18n/ro"
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
English-only apps should import only `./i18n/en`. Bilingual apps can import
|
|
27
|
+
`./i18n/en` and `./i18n/ro`.
|
|
@@ -4,6 +4,6 @@ type Props = {
|
|
|
4
4
|
placeholder?: string;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
};
|
|
7
|
-
export declare function ChannelCombobox({ value, onChange, placeholder, disabled
|
|
7
|
+
export declare function ChannelCombobox({ value, onChange, placeholder, disabled }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=channel-combobox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"channel-combobox.d.ts","sourceRoot":"","sources":["../../src/components/channel-combobox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"channel-combobox.d.ts","sourceRoot":"","sources":["../../src/components/channel-combobox.tsx"],"names":[],"mappings":"AAcA,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACxC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAID,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,KAAK,2CAiFhF"}
|
|
@@ -2,8 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useChannel, useChannels } from "@voyantjs/distribution-react";
|
|
3
3
|
import { Combobox, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList, } from "@voyantjs/ui/components/combobox";
|
|
4
4
|
import * as React from "react";
|
|
5
|
+
import { useSellabilityUiMessagesOrDefault } from "../i18n";
|
|
5
6
|
const PAGE_SIZE = 100;
|
|
6
|
-
export function ChannelCombobox({ value, onChange, placeholder
|
|
7
|
+
export function ChannelCombobox({ value, onChange, placeholder, disabled }) {
|
|
8
|
+
const messages = useSellabilityUiMessagesOrDefault();
|
|
7
9
|
const [search, setSearch] = React.useState("");
|
|
8
10
|
const listQuery = useChannels({ limit: PAGE_SIZE });
|
|
9
11
|
const selectedQuery = useChannel(value ?? undefined, { enabled: !!value });
|
|
@@ -37,10 +39,15 @@ export function ChannelCombobox({ value, onChange, placeholder = "Select channel
|
|
|
37
39
|
const id = next ?? null;
|
|
38
40
|
onChange(id);
|
|
39
41
|
setInputValue(id ? (itemMap.get(id)?.name ?? "") : "");
|
|
40
|
-
}, children: [_jsx(ComboboxInput, { placeholder: placeholder, showClear: !!value }), _jsxs(ComboboxContent, { children: [_jsx(ComboboxEmpty, { children: listQuery.isPending || selectedQuery.isPending
|
|
42
|
+
}, children: [_jsx(ComboboxInput, { placeholder: placeholder ?? messages.channelCombobox.placeholder, showClear: !!value }), _jsxs(ComboboxContent, { children: [_jsx(ComboboxEmpty, { children: listQuery.isPending || selectedQuery.isPending
|
|
43
|
+
? messages.common.loading
|
|
44
|
+
: messages.channelCombobox.empty }), _jsx(ComboboxList, { children: _jsx(ComboboxCollection, { children: (id) => {
|
|
41
45
|
const item = itemMap.get(id);
|
|
42
46
|
if (!item)
|
|
43
47
|
return null;
|
|
44
|
-
return (_jsx(ComboboxItem, { value: item.id, children: _jsxs("div", { className: "flex min-w-0 flex-col", children: [_jsx("span", { className: "truncate font-medium", children: item.name }), _jsx("span", { className: "truncate text-xs text-muted-foreground", children: [
|
|
48
|
+
return (_jsx(ComboboxItem, { value: item.id, children: _jsxs("div", { className: "flex min-w-0 flex-col", children: [_jsx("span", { className: "truncate font-medium", children: item.name }), _jsx("span", { className: "truncate text-xs text-muted-foreground", children: [
|
|
49
|
+
messages.common.channelKindLabels[item.kind],
|
|
50
|
+
messages.common.channelStatusLabels[item.status],
|
|
51
|
+
].join(" · ") })] }) }, item.id));
|
|
45
52
|
} }) })] })] }));
|
|
46
53
|
}
|
|
@@ -4,6 +4,6 @@ type Props = {
|
|
|
4
4
|
placeholder?: string;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
};
|
|
7
|
-
export declare function MarketCombobox({ value, onChange, placeholder, disabled
|
|
7
|
+
export declare function MarketCombobox({ value, onChange, placeholder, disabled }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=market-combobox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"market-combobox.d.ts","sourceRoot":"","sources":["../../src/components/market-combobox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"market-combobox.d.ts","sourceRoot":"","sources":["../../src/components/market-combobox.tsx"],"names":[],"mappings":"AAcA,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACxC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAID,wBAAgB,cAAc,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,KAAK,2CAwE/E"}
|
|
@@ -2,8 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useMarket, useMarkets } from "@voyantjs/markets-react";
|
|
3
3
|
import { Combobox, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList, } from "@voyantjs/ui/components/combobox";
|
|
4
4
|
import * as React from "react";
|
|
5
|
+
import { useSellabilityUiMessagesOrDefault } from "../i18n";
|
|
5
6
|
const PAGE_SIZE = 25;
|
|
6
|
-
export function MarketCombobox({ value, onChange, placeholder
|
|
7
|
+
export function MarketCombobox({ value, onChange, placeholder, disabled }) {
|
|
8
|
+
const messages = useSellabilityUiMessagesOrDefault();
|
|
7
9
|
const [search, setSearch] = React.useState("");
|
|
8
10
|
const listQuery = useMarkets({ search: search || undefined, limit: PAGE_SIZE });
|
|
9
11
|
const selectedQuery = useMarket(value ?? undefined, { enabled: !!value });
|
|
@@ -32,7 +34,9 @@ export function MarketCombobox({ value, onChange, placeholder = "Search markets
|
|
|
32
34
|
const id = next ?? null;
|
|
33
35
|
onChange(id);
|
|
34
36
|
setInputValue(id ? (itemMap.get(id)?.name ?? "") : "");
|
|
35
|
-
}, children: [_jsx(ComboboxInput, { placeholder: placeholder, showClear: !!value }), _jsxs(ComboboxContent, { children: [_jsx(ComboboxEmpty, { children: listQuery.isPending || selectedQuery.isPending
|
|
37
|
+
}, children: [_jsx(ComboboxInput, { placeholder: placeholder ?? messages.marketCombobox.placeholder, showClear: !!value }), _jsxs(ComboboxContent, { children: [_jsx(ComboboxEmpty, { children: listQuery.isPending || selectedQuery.isPending
|
|
38
|
+
? messages.common.loading
|
|
39
|
+
: messages.marketCombobox.empty }), _jsx(ComboboxList, { children: _jsx(ComboboxCollection, { children: (id) => {
|
|
36
40
|
const item = itemMap.get(id);
|
|
37
41
|
if (!item)
|
|
38
42
|
return null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"policy-dialog.d.ts","sourceRoot":"","sources":["../../src/components/policy-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,6BAA6B,CAAA;
|
|
1
|
+
{"version":3,"file":"policy-dialog.d.ts","sourceRoot":"","sources":["../../src/components/policy-dialog.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,uBAAuB,EAE7B,MAAM,6BAA6B,CAAA;AAgFpC,KAAK,KAAK,GAAG;IACX,IAAI,EAAE,OAAO,CAAA;IACb,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAA;IACrC,MAAM,CAAC,EAAE,uBAAuB,CAAA;IAChC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,uBAAuB,KAAK,IAAI,CAAA;CACtD,CAAA;AAED,wBAAgB,YAAY,CAAC,EAAE,IAAI,EAAE,YAAY,EAAE,MAAM,EAAE,SAAS,EAAE,EAAE,KAAK,2CAgR5E"}
|
|
@@ -6,6 +6,7 @@ import { Loader2 } from "lucide-react";
|
|
|
6
6
|
import { useEffect } from "react";
|
|
7
7
|
import { useForm } from "react-hook-form";
|
|
8
8
|
import { z } from "zod/v4";
|
|
9
|
+
import { useSellabilityUiMessagesOrDefault } from "../i18n";
|
|
9
10
|
import { ChannelCombobox } from "./channel-combobox";
|
|
10
11
|
import { MarketCombobox } from "./market-combobox";
|
|
11
12
|
import { ProductCombobox } from "./product-combobox";
|
|
@@ -21,34 +22,38 @@ const POLICY_TYPES = [
|
|
|
21
22
|
"currency",
|
|
22
23
|
"custom",
|
|
23
24
|
];
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
25
|
+
function createFormSchema(messages) {
|
|
26
|
+
const jsonStringSchema = z.string().refine((value) => {
|
|
27
|
+
if (!value || value.trim() === "")
|
|
28
|
+
return true;
|
|
29
|
+
try {
|
|
30
|
+
const parsed = JSON.parse(value);
|
|
31
|
+
return typeof parsed === "object" && parsed !== null && !Array.isArray(parsed);
|
|
32
|
+
}
|
|
33
|
+
catch {
|
|
34
|
+
return false;
|
|
35
|
+
}
|
|
36
|
+
}, { message: messages.policyDialog.validation.jsonObject });
|
|
37
|
+
return z.object({
|
|
38
|
+
name: z.string().min(1, messages.policyDialog.validation.nameRequired).max(255),
|
|
39
|
+
scope: z.enum(POLICY_SCOPES),
|
|
40
|
+
policyType: z.enum(POLICY_TYPES),
|
|
41
|
+
productId: z.string().optional().nullable(),
|
|
42
|
+
optionId: z.string().optional().nullable(),
|
|
43
|
+
marketId: z.string().optional().nullable(),
|
|
44
|
+
channelId: z.string().optional().nullable(),
|
|
45
|
+
priority: z.coerce.number().int(),
|
|
46
|
+
active: z.boolean(),
|
|
47
|
+
conditionsJson: jsonStringSchema,
|
|
48
|
+
effectsJson: jsonStringSchema,
|
|
49
|
+
notes: z.string().optional().nullable(),
|
|
50
|
+
});
|
|
51
|
+
}
|
|
49
52
|
export function PolicyDialog({ open, onOpenChange, policy, onSuccess }) {
|
|
50
53
|
const isEditing = !!policy;
|
|
51
54
|
const { create, update } = useSellabilityPolicyMutation();
|
|
55
|
+
const messages = useSellabilityUiMessagesOrDefault();
|
|
56
|
+
const formSchema = createFormSchema(messages);
|
|
52
57
|
const form = useForm({
|
|
53
58
|
resolver: zodResolver(formSchema),
|
|
54
59
|
defaultValues: {
|
|
@@ -128,8 +133,16 @@ export function PolicyDialog({ open, onOpenChange, policy, onSuccess }) {
|
|
|
128
133
|
onSuccess?.(saved);
|
|
129
134
|
onOpenChange(false);
|
|
130
135
|
};
|
|
131
|
-
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { size: "lg", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: isEditing ?
|
|
136
|
+
return (_jsx(Dialog, { open: open, onOpenChange: onOpenChange, children: _jsxs(DialogContent, { size: "lg", children: [_jsx(DialogHeader, { children: _jsx(DialogTitle, { children: isEditing ? messages.policyDialog.titles.edit : messages.policyDialog.titles.create }) }), _jsxs("form", { onSubmit: form.handleSubmit(onSubmit), children: [_jsxs(DialogBody, { className: "grid gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.policyDialog.fields.name }), _jsx(Input, { ...form.register("name"), placeholder: messages.policyDialog.placeholders.name }), form.formState.errors.name ? (_jsx("p", { className: "text-xs text-destructive", children: form.formState.errors.name.message })) : null] }), _jsxs("div", { className: "grid grid-cols-3 gap-3", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.policyDialog.fields.scope }), _jsxs(Select, { items: POLICY_SCOPES.map((value) => ({
|
|
137
|
+
label: messages.common.policyScopeLabels[value],
|
|
138
|
+
value,
|
|
139
|
+
})), value: form.watch("scope"), onValueChange: (value) => form.setValue("scope", value), children: [_jsx(SelectTrigger, { className: "w-full", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: POLICY_SCOPES.map((value) => (_jsx(SelectItem, { value: value, children: messages.common.policyScopeLabels[value] }, value))) })] })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.policyDialog.fields.type }), _jsxs(Select, { items: POLICY_TYPES.map((value) => ({
|
|
140
|
+
label: messages.common.policyTypeLabels[value],
|
|
141
|
+
value,
|
|
142
|
+
})), value: form.watch("policyType"), onValueChange: (value) => form.setValue("policyType", value), children: [_jsx(SelectTrigger, { className: "w-full", children: _jsx(SelectValue, {}) }), _jsx(SelectContent, { children: POLICY_TYPES.map((value) => (_jsx(SelectItem, { value: value, children: messages.common.policyTypeLabels[value] }, value))) })] })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.policyDialog.fields.priority }), _jsx(Input, { ...form.register("priority"), type: "number" })] })] }), scope === "product" ? (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.policyDialog.fields.product }), _jsx(ProductCombobox, { value: form.watch("productId") ?? null, onChange: (value) => form.setValue("productId", value) })] })) : null, scope === "option" ? (_jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.policyDialog.fields.product }), _jsx(ProductCombobox, { value: form.watch("productId") ?? null, onChange: (value) => {
|
|
132
143
|
form.setValue("productId", value);
|
|
133
144
|
form.setValue("optionId", null);
|
|
134
|
-
} })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children:
|
|
145
|
+
} })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.policyDialog.fields.option }), _jsx(ProductOptionCombobox, { productId: form.watch("productId"), value: form.watch("optionId") ?? null, onChange: (value) => form.setValue("optionId", value) })] })] })) : null, scope === "market" ? (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.policyDialog.fields.market }), _jsx(MarketCombobox, { value: form.watch("marketId") ?? null, onChange: (value) => form.setValue("marketId", value) })] })) : null, scope === "channel" ? (_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.policyDialog.fields.channel }), _jsx(ChannelCombobox, { value: form.watch("channelId") ?? null, onChange: (value) => form.setValue("channelId", value) })] })) : null, _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.policyDialog.fields.conditionsJson }), _jsx(Textarea, { ...form.register("conditionsJson"), rows: 6, className: "font-mono text-xs" }), form.formState.errors.conditionsJson ? (_jsx("p", { className: "text-xs text-destructive", children: form.formState.errors.conditionsJson.message })) : null] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.policyDialog.fields.effectsJson }), _jsx(Textarea, { ...form.register("effectsJson"), rows: 6, className: "font-mono text-xs" }), form.formState.errors.effectsJson ? (_jsx("p", { className: "text-xs text-destructive", children: form.formState.errors.effectsJson.message })) : null] })] }), _jsxs("div", { className: "flex items-center gap-2", children: [_jsx(Switch, { checked: form.watch("active"), onCheckedChange: (value) => form.setValue("active", value) }), _jsx(Label, { children: messages.policyDialog.fields.active })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.policyDialog.fields.notes }), _jsx(Textarea, { ...form.register("notes") })] })] }), _jsxs(DialogFooter, { children: [_jsx(Button, { type: "button", variant: "ghost", onClick: () => onOpenChange(false), children: messages.common.cancel }), _jsxs(Button, { type: "submit", disabled: isSubmitting, children: [isSubmitting ? _jsx(Loader2, { className: "mr-2 h-4 w-4 animate-spin" }) : null, isEditing
|
|
146
|
+
? messages.policyDialog.actions.save
|
|
147
|
+
: messages.policyDialog.actions.create] })] })] })] }) }));
|
|
135
148
|
}
|
|
@@ -4,6 +4,6 @@ type Props = {
|
|
|
4
4
|
placeholder?: string;
|
|
5
5
|
disabled?: boolean;
|
|
6
6
|
};
|
|
7
|
-
export declare function ProductCombobox({ value, onChange, placeholder, disabled
|
|
7
|
+
export declare function ProductCombobox({ value, onChange, placeholder, disabled }: Props): import("react/jsx-runtime").JSX.Element;
|
|
8
8
|
export {};
|
|
9
9
|
//# sourceMappingURL=product-combobox.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-combobox.d.ts","sourceRoot":"","sources":["../../src/components/product-combobox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"product-combobox.d.ts","sourceRoot":"","sources":["../../src/components/product-combobox.tsx"],"names":[],"mappings":"AAcA,KAAK,KAAK,GAAG;IACX,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACxC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAID,wBAAgB,eAAe,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,WAAW,EAAE,QAAQ,EAAE,EAAE,KAAK,2CAyEhF"}
|
|
@@ -2,8 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useProduct, useProducts } from "@voyantjs/products-react";
|
|
3
3
|
import { Combobox, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList, } from "@voyantjs/ui/components/combobox";
|
|
4
4
|
import * as React from "react";
|
|
5
|
+
import { useSellabilityUiMessagesOrDefault } from "../i18n";
|
|
5
6
|
const PAGE_SIZE = 25;
|
|
6
|
-
export function ProductCombobox({ value, onChange, placeholder
|
|
7
|
+
export function ProductCombobox({ value, onChange, placeholder, disabled }) {
|
|
8
|
+
const messages = useSellabilityUiMessagesOrDefault();
|
|
7
9
|
const [search, setSearch] = React.useState("");
|
|
8
10
|
const listQuery = useProducts({ search: search || undefined, limit: PAGE_SIZE });
|
|
9
11
|
const selectedQuery = useProduct(value ?? undefined, { enabled: !!value });
|
|
@@ -32,10 +34,12 @@ export function ProductCombobox({ value, onChange, placeholder = "Search product
|
|
|
32
34
|
const id = next ?? null;
|
|
33
35
|
onChange(id);
|
|
34
36
|
setInputValue(id ? (itemMap.get(id)?.name ?? "") : "");
|
|
35
|
-
}, children: [_jsx(ComboboxInput, { placeholder: placeholder, showClear: !!value }), _jsxs(ComboboxContent, { children: [_jsx(ComboboxEmpty, { children: listQuery.isPending || selectedQuery.isPending
|
|
37
|
+
}, children: [_jsx(ComboboxInput, { placeholder: placeholder ?? messages.productCombobox.placeholder, showClear: !!value }), _jsxs(ComboboxContent, { children: [_jsx(ComboboxEmpty, { children: listQuery.isPending || selectedQuery.isPending
|
|
38
|
+
? messages.common.loading
|
|
39
|
+
: messages.productCombobox.empty }), _jsx(ComboboxList, { children: _jsx(ComboboxCollection, { children: (id) => {
|
|
36
40
|
const item = itemMap.get(id);
|
|
37
41
|
if (!item)
|
|
38
42
|
return null;
|
|
39
|
-
return (_jsx(ComboboxItem, { value: item.id, children: _jsxs("div", { className: "flex min-w-0 flex-col", children: [_jsx("span", { className: "truncate font-medium", children: item.name }), _jsxs("span", { className: "truncate text-xs text-muted-foreground", children: [item.status, " \u00B7 ", item.bookingMode] })] }) }, item.id));
|
|
43
|
+
return (_jsx(ComboboxItem, { value: item.id, children: _jsxs("div", { className: "flex min-w-0 flex-col", children: [_jsx("span", { className: "truncate font-medium", children: item.name }), _jsxs("span", { className: "truncate text-xs text-muted-foreground", children: [messages.common.productStatusLabels[item.status], " \u00B7", " ", messages.common.productBookingModeLabels[item.bookingMode]] })] }) }, item.id));
|
|
40
44
|
} }) })] })] }));
|
|
41
45
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"product-option-combobox.d.ts","sourceRoot":"","sources":["../../src/components/product-option-combobox.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"product-option-combobox.d.ts","sourceRoot":"","sources":["../../src/components/product-option-combobox.tsx"],"names":[],"mappings":"AAkBA,KAAK,KAAK,GAAG;IACX,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,KAAK,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IAChC,QAAQ,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,KAAK,IAAI,CAAA;IACxC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB,CAAA;AAID,wBAAgB,qBAAqB,CAAC,EACpC,SAAS,EACT,KAAK,EACL,QAAQ,EACR,WAAW,EACX,QAAQ,GACT,EAAE,KAAK,2CAgFP"}
|
|
@@ -2,8 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useProductOption, useProductOptions, } from "@voyantjs/products-react";
|
|
3
3
|
import { Combobox, ComboboxCollection, ComboboxContent, ComboboxEmpty, ComboboxInput, ComboboxItem, ComboboxList, } from "@voyantjs/ui/components/combobox";
|
|
4
4
|
import * as React from "react";
|
|
5
|
+
import { useSellabilityUiMessagesOrDefault } from "../i18n";
|
|
5
6
|
const PAGE_SIZE = 100;
|
|
6
|
-
export function ProductOptionCombobox({ productId, value, onChange, placeholder
|
|
7
|
+
export function ProductOptionCombobox({ productId, value, onChange, placeholder, disabled, }) {
|
|
8
|
+
const messages = useSellabilityUiMessagesOrDefault();
|
|
7
9
|
const [search, setSearch] = React.useState("");
|
|
8
10
|
const listQuery = useProductOptions({
|
|
9
11
|
productId: productId || undefined,
|
|
@@ -38,11 +40,11 @@ export function ProductOptionCombobox({ productId, value, onChange, placeholder
|
|
|
38
40
|
const id = next ?? null;
|
|
39
41
|
onChange(id);
|
|
40
42
|
setInputValue(id ? (itemMap.get(id)?.name ?? "") : "");
|
|
41
|
-
}, children: [_jsx(ComboboxInput, { placeholder: placeholder, showClear: !!value }), _jsxs(ComboboxContent, { children: [_jsx(ComboboxEmpty, { children: listQuery.isPending || selectedQuery.isPending
|
|
42
|
-
?
|
|
43
|
+
}, children: [_jsx(ComboboxInput, { placeholder: placeholder ?? messages.productOptionCombobox.placeholder, showClear: !!value }), _jsxs(ComboboxContent, { children: [_jsx(ComboboxEmpty, { children: listQuery.isPending || selectedQuery.isPending
|
|
44
|
+
? messages.common.loading
|
|
43
45
|
: productId
|
|
44
|
-
?
|
|
45
|
-
:
|
|
46
|
+
? messages.productOptionCombobox.empty
|
|
47
|
+
: messages.productOptionCombobox.selectProductFirst }), _jsx(ComboboxList, { children: _jsx(ComboboxCollection, { children: (id) => {
|
|
46
48
|
const item = itemMap.get(id);
|
|
47
49
|
if (!item)
|
|
48
50
|
return null;
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
export declare const sellabilityUiEn: {
|
|
2
|
+
common: {
|
|
3
|
+
loading: string;
|
|
4
|
+
cancel: string;
|
|
5
|
+
active: string;
|
|
6
|
+
channelKindLabels: {
|
|
7
|
+
direct: string;
|
|
8
|
+
affiliate: string;
|
|
9
|
+
ota: string;
|
|
10
|
+
reseller: string;
|
|
11
|
+
marketplace: string;
|
|
12
|
+
api_partner: string;
|
|
13
|
+
connect: string;
|
|
14
|
+
};
|
|
15
|
+
channelStatusLabels: {
|
|
16
|
+
active: string;
|
|
17
|
+
inactive: string;
|
|
18
|
+
pending: string;
|
|
19
|
+
archived: string;
|
|
20
|
+
};
|
|
21
|
+
productStatusLabels: {
|
|
22
|
+
draft: string;
|
|
23
|
+
active: string;
|
|
24
|
+
archived: string;
|
|
25
|
+
};
|
|
26
|
+
productBookingModeLabels: {
|
|
27
|
+
date: string;
|
|
28
|
+
date_time: string;
|
|
29
|
+
open: string;
|
|
30
|
+
stay: string;
|
|
31
|
+
transfer: string;
|
|
32
|
+
itinerary: string;
|
|
33
|
+
other: string;
|
|
34
|
+
};
|
|
35
|
+
policyScopeLabels: {
|
|
36
|
+
global: string;
|
|
37
|
+
product: string;
|
|
38
|
+
option: string;
|
|
39
|
+
market: string;
|
|
40
|
+
channel: string;
|
|
41
|
+
};
|
|
42
|
+
policyTypeLabels: {
|
|
43
|
+
capability: string;
|
|
44
|
+
occupancy: string;
|
|
45
|
+
pickup: string;
|
|
46
|
+
question: string;
|
|
47
|
+
allotment: string;
|
|
48
|
+
availability_window: string;
|
|
49
|
+
currency: string;
|
|
50
|
+
custom: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
channelCombobox: {
|
|
54
|
+
placeholder: string;
|
|
55
|
+
empty: string;
|
|
56
|
+
};
|
|
57
|
+
marketCombobox: {
|
|
58
|
+
placeholder: string;
|
|
59
|
+
empty: string;
|
|
60
|
+
};
|
|
61
|
+
productCombobox: {
|
|
62
|
+
placeholder: string;
|
|
63
|
+
empty: string;
|
|
64
|
+
};
|
|
65
|
+
productOptionCombobox: {
|
|
66
|
+
placeholder: string;
|
|
67
|
+
empty: string;
|
|
68
|
+
selectProductFirst: string;
|
|
69
|
+
};
|
|
70
|
+
policyDialog: {
|
|
71
|
+
titles: {
|
|
72
|
+
create: string;
|
|
73
|
+
edit: string;
|
|
74
|
+
};
|
|
75
|
+
fields: {
|
|
76
|
+
name: string;
|
|
77
|
+
scope: string;
|
|
78
|
+
type: string;
|
|
79
|
+
priority: string;
|
|
80
|
+
product: string;
|
|
81
|
+
option: string;
|
|
82
|
+
market: string;
|
|
83
|
+
channel: string;
|
|
84
|
+
conditionsJson: string;
|
|
85
|
+
effectsJson: string;
|
|
86
|
+
notes: string;
|
|
87
|
+
active: string;
|
|
88
|
+
};
|
|
89
|
+
placeholders: {
|
|
90
|
+
name: string;
|
|
91
|
+
};
|
|
92
|
+
actions: {
|
|
93
|
+
create: string;
|
|
94
|
+
save: string;
|
|
95
|
+
};
|
|
96
|
+
validation: {
|
|
97
|
+
nameRequired: string;
|
|
98
|
+
jsonObject: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=en.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGK,CAAA"}
|
package/dist/i18n/en.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
export const sellabilityUiEn = {
|
|
2
|
+
common: {
|
|
3
|
+
loading: "Loading...",
|
|
4
|
+
cancel: "Cancel",
|
|
5
|
+
active: "Active",
|
|
6
|
+
channelKindLabels: {
|
|
7
|
+
direct: "Direct",
|
|
8
|
+
affiliate: "Affiliate",
|
|
9
|
+
ota: "OTA",
|
|
10
|
+
reseller: "Reseller",
|
|
11
|
+
marketplace: "Marketplace",
|
|
12
|
+
api_partner: "API Partner",
|
|
13
|
+
connect: "Connect",
|
|
14
|
+
},
|
|
15
|
+
channelStatusLabels: {
|
|
16
|
+
active: "Active",
|
|
17
|
+
inactive: "Inactive",
|
|
18
|
+
pending: "Pending",
|
|
19
|
+
archived: "Archived",
|
|
20
|
+
},
|
|
21
|
+
productStatusLabels: {
|
|
22
|
+
draft: "Draft",
|
|
23
|
+
active: "Active",
|
|
24
|
+
archived: "Archived",
|
|
25
|
+
},
|
|
26
|
+
productBookingModeLabels: {
|
|
27
|
+
date: "Date",
|
|
28
|
+
date_time: "Date and time",
|
|
29
|
+
open: "Open",
|
|
30
|
+
stay: "Stay",
|
|
31
|
+
transfer: "Transfer",
|
|
32
|
+
itinerary: "Itinerary",
|
|
33
|
+
other: "Other",
|
|
34
|
+
},
|
|
35
|
+
policyScopeLabels: {
|
|
36
|
+
global: "Global",
|
|
37
|
+
product: "Product",
|
|
38
|
+
option: "Option",
|
|
39
|
+
market: "Market",
|
|
40
|
+
channel: "Channel",
|
|
41
|
+
},
|
|
42
|
+
policyTypeLabels: {
|
|
43
|
+
capability: "Capability",
|
|
44
|
+
occupancy: "Occupancy",
|
|
45
|
+
pickup: "Pickup",
|
|
46
|
+
question: "Question",
|
|
47
|
+
allotment: "Allotment",
|
|
48
|
+
availability_window: "Availability window",
|
|
49
|
+
currency: "Currency",
|
|
50
|
+
custom: "Custom",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
channelCombobox: {
|
|
54
|
+
placeholder: "Select channel...",
|
|
55
|
+
empty: "No channels found.",
|
|
56
|
+
},
|
|
57
|
+
marketCombobox: {
|
|
58
|
+
placeholder: "Search markets...",
|
|
59
|
+
empty: "No markets found.",
|
|
60
|
+
},
|
|
61
|
+
productCombobox: {
|
|
62
|
+
placeholder: "Search products...",
|
|
63
|
+
empty: "No products found.",
|
|
64
|
+
},
|
|
65
|
+
productOptionCombobox: {
|
|
66
|
+
placeholder: "Select product option...",
|
|
67
|
+
empty: "No product options found.",
|
|
68
|
+
selectProductFirst: "Select a product first.",
|
|
69
|
+
},
|
|
70
|
+
policyDialog: {
|
|
71
|
+
titles: {
|
|
72
|
+
create: "Add Policy",
|
|
73
|
+
edit: "Edit Policy",
|
|
74
|
+
},
|
|
75
|
+
fields: {
|
|
76
|
+
name: "Name",
|
|
77
|
+
scope: "Scope",
|
|
78
|
+
type: "Type",
|
|
79
|
+
priority: "Priority",
|
|
80
|
+
product: "Product",
|
|
81
|
+
option: "Option",
|
|
82
|
+
market: "Market",
|
|
83
|
+
channel: "Channel",
|
|
84
|
+
conditionsJson: "Conditions (JSON)",
|
|
85
|
+
effectsJson: "Effects (JSON)",
|
|
86
|
+
notes: "Notes",
|
|
87
|
+
active: "Active",
|
|
88
|
+
},
|
|
89
|
+
placeholders: {
|
|
90
|
+
name: "Block bookings without capability",
|
|
91
|
+
},
|
|
92
|
+
actions: {
|
|
93
|
+
create: "Add Policy",
|
|
94
|
+
save: "Save Changes",
|
|
95
|
+
},
|
|
96
|
+
validation: {
|
|
97
|
+
nameRequired: "Name is required",
|
|
98
|
+
jsonObject: "Must be a JSON object",
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { sellabilityUiEn } from "./en";
|
|
2
|
+
export type { ChannelKind, ChannelStatus, PolicyScope, PolicyType, ProductBookingMode, ProductStatus, SellabilityUiMessages, } from "./messages";
|
|
3
|
+
export { getSellabilityUiI18n, resolveSellabilityUiMessages, type SellabilityUiMessageOverrides, SellabilityUiMessagesProvider, sellabilityUiMessageDefinitions, useSellabilityUiI18n, useSellabilityUiI18nOrDefault, useSellabilityUiMessages, useSellabilityUiMessagesOrDefault, } from "./provider";
|
|
4
|
+
export { sellabilityUiRo } from "./ro";
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/i18n/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAA;AACtC,YAAY,EACV,WAAW,EACX,aAAa,EACb,WAAW,EACX,UAAU,EACV,kBAAkB,EAClB,aAAa,EACb,qBAAqB,GACtB,MAAM,YAAY,CAAA;AACnB,OAAO,EACL,oBAAoB,EACpB,4BAA4B,EAC5B,KAAK,6BAA6B,EAClC,6BAA6B,EAC7B,+BAA+B,EAC/B,oBAAoB,EACpB,6BAA6B,EAC7B,wBAAwB,EACxB,iCAAiC,GAClC,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,eAAe,EAAE,MAAM,MAAM,CAAA"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export { sellabilityUiEn } from "./en";
|
|
2
|
+
export { getSellabilityUiI18n, resolveSellabilityUiMessages, SellabilityUiMessagesProvider, sellabilityUiMessageDefinitions, useSellabilityUiI18n, useSellabilityUiI18nOrDefault, useSellabilityUiMessages, useSellabilityUiMessagesOrDefault, } from "./provider";
|
|
3
|
+
export { sellabilityUiRo } from "./ro";
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import type { ChannelDetail } from "@voyantjs/distribution-react";
|
|
2
|
+
import type { ProductRecord } from "@voyantjs/products-react";
|
|
3
|
+
import type { SellabilityPolicyRecord } from "@voyantjs/sellability-react";
|
|
4
|
+
export type ChannelKind = ChannelDetail["kind"];
|
|
5
|
+
export type ChannelStatus = ChannelDetail["status"];
|
|
6
|
+
export type ProductStatus = ProductRecord["status"];
|
|
7
|
+
export type ProductBookingMode = ProductRecord["bookingMode"];
|
|
8
|
+
export type PolicyScope = SellabilityPolicyRecord["scope"];
|
|
9
|
+
export type PolicyType = SellabilityPolicyRecord["policyType"];
|
|
10
|
+
export type SellabilityUiMessages = {
|
|
11
|
+
common: {
|
|
12
|
+
loading: string;
|
|
13
|
+
cancel: string;
|
|
14
|
+
active: string;
|
|
15
|
+
channelKindLabels: Record<ChannelKind, string>;
|
|
16
|
+
channelStatusLabels: Record<ChannelStatus, string>;
|
|
17
|
+
productStatusLabels: Record<ProductStatus, string>;
|
|
18
|
+
productBookingModeLabels: Record<ProductBookingMode, string>;
|
|
19
|
+
policyScopeLabels: Record<PolicyScope, string>;
|
|
20
|
+
policyTypeLabels: Record<PolicyType, string>;
|
|
21
|
+
};
|
|
22
|
+
channelCombobox: {
|
|
23
|
+
placeholder: string;
|
|
24
|
+
empty: string;
|
|
25
|
+
};
|
|
26
|
+
marketCombobox: {
|
|
27
|
+
placeholder: string;
|
|
28
|
+
empty: string;
|
|
29
|
+
};
|
|
30
|
+
productCombobox: {
|
|
31
|
+
placeholder: string;
|
|
32
|
+
empty: string;
|
|
33
|
+
};
|
|
34
|
+
productOptionCombobox: {
|
|
35
|
+
placeholder: string;
|
|
36
|
+
empty: string;
|
|
37
|
+
selectProductFirst: string;
|
|
38
|
+
};
|
|
39
|
+
policyDialog: {
|
|
40
|
+
titles: {
|
|
41
|
+
create: string;
|
|
42
|
+
edit: string;
|
|
43
|
+
};
|
|
44
|
+
fields: {
|
|
45
|
+
name: string;
|
|
46
|
+
scope: string;
|
|
47
|
+
type: string;
|
|
48
|
+
priority: string;
|
|
49
|
+
product: string;
|
|
50
|
+
option: string;
|
|
51
|
+
market: string;
|
|
52
|
+
channel: string;
|
|
53
|
+
conditionsJson: string;
|
|
54
|
+
effectsJson: string;
|
|
55
|
+
notes: string;
|
|
56
|
+
active: string;
|
|
57
|
+
};
|
|
58
|
+
placeholders: {
|
|
59
|
+
name: string;
|
|
60
|
+
};
|
|
61
|
+
actions: {
|
|
62
|
+
create: string;
|
|
63
|
+
save: string;
|
|
64
|
+
};
|
|
65
|
+
validation: {
|
|
66
|
+
nameRequired: string;
|
|
67
|
+
jsonObject: string;
|
|
68
|
+
};
|
|
69
|
+
};
|
|
70
|
+
};
|
|
71
|
+
//# sourceMappingURL=messages.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/i18n/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAA;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,0BAA0B,CAAA;AAC7D,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,6BAA6B,CAAA;AAE1E,MAAM,MAAM,WAAW,GAAG,aAAa,CAAC,MAAM,CAAC,CAAA;AAC/C,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAA;AACnD,MAAM,MAAM,aAAa,GAAG,aAAa,CAAC,QAAQ,CAAC,CAAA;AACnD,MAAM,MAAM,kBAAkB,GAAG,aAAa,CAAC,aAAa,CAAC,CAAA;AAC7D,MAAM,MAAM,WAAW,GAAG,uBAAuB,CAAC,OAAO,CAAC,CAAA;AAC1D,MAAM,MAAM,UAAU,GAAG,uBAAuB,CAAC,YAAY,CAAC,CAAA;AAE9D,MAAM,MAAM,qBAAqB,GAAG;IAClC,MAAM,EAAE;QACN,OAAO,EAAE,MAAM,CAAA;QACf,MAAM,EAAE,MAAM,CAAA;QACd,MAAM,EAAE,MAAM,CAAA;QACd,iBAAiB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAA;QAC9C,mBAAmB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAA;QAClD,mBAAmB,EAAE,MAAM,CAAC,aAAa,EAAE,MAAM,CAAC,CAAA;QAClD,wBAAwB,EAAE,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAA;QAC5D,iBAAiB,EAAE,MAAM,CAAC,WAAW,EAAE,MAAM,CAAC,CAAA;QAC9C,gBAAgB,EAAE,MAAM,CAAC,UAAU,EAAE,MAAM,CAAC,CAAA;KAC7C,CAAA;IACD,eAAe,EAAE;QACf,WAAW,EAAE,MAAM,CAAA;QACnB,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;IACD,cAAc,EAAE;QACd,WAAW,EAAE,MAAM,CAAA;QACnB,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;IACD,eAAe,EAAE;QACf,WAAW,EAAE,MAAM,CAAA;QACnB,KAAK,EAAE,MAAM,CAAA;KACd,CAAA;IACD,qBAAqB,EAAE;QACrB,WAAW,EAAE,MAAM,CAAA;QACnB,KAAK,EAAE,MAAM,CAAA;QACb,kBAAkB,EAAE,MAAM,CAAA;KAC3B,CAAA;IACD,YAAY,EAAE;QACZ,MAAM,EAAE;YACN,MAAM,EAAE,MAAM,CAAA;YACd,IAAI,EAAE,MAAM,CAAA;SACb,CAAA;QACD,MAAM,EAAE;YACN,IAAI,EAAE,MAAM,CAAA;YACZ,KAAK,EAAE,MAAM,CAAA;YACb,IAAI,EAAE,MAAM,CAAA;YACZ,QAAQ,EAAE,MAAM,CAAA;YAChB,OAAO,EAAE,MAAM,CAAA;YACf,MAAM,EAAE,MAAM,CAAA;YACd,MAAM,EAAE,MAAM,CAAA;YACd,OAAO,EAAE,MAAM,CAAA;YACf,cAAc,EAAE,MAAM,CAAA;YACtB,WAAW,EAAE,MAAM,CAAA;YACnB,KAAK,EAAE,MAAM,CAAA;YACb,MAAM,EAAE,MAAM,CAAA;SACf,CAAA;QACD,YAAY,EAAE;YACZ,IAAI,EAAE,MAAM,CAAA;SACb,CAAA;QACD,OAAO,EAAE;YACP,MAAM,EAAE,MAAM,CAAA;YACd,IAAI,EAAE,MAAM,CAAA;SACb,CAAA;QACD,UAAU,EAAE;YACV,YAAY,EAAE,MAAM,CAAA;YACpB,UAAU,EAAE,MAAM,CAAA;SACnB,CAAA;KACF,CAAA;CACF,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,226 @@
|
|
|
1
|
+
import { type LocaleMessageOverrides, type PackageI18nValue } from "@voyantjs/i18n";
|
|
2
|
+
import type { ReactNode } from "react";
|
|
3
|
+
import type { SellabilityUiMessages } from "./messages";
|
|
4
|
+
export declare const sellabilityUiMessageDefinitions: {
|
|
5
|
+
en: {
|
|
6
|
+
common: {
|
|
7
|
+
loading: string;
|
|
8
|
+
cancel: string;
|
|
9
|
+
active: string;
|
|
10
|
+
channelKindLabels: {
|
|
11
|
+
direct: string;
|
|
12
|
+
affiliate: string;
|
|
13
|
+
ota: string;
|
|
14
|
+
reseller: string;
|
|
15
|
+
marketplace: string;
|
|
16
|
+
api_partner: string;
|
|
17
|
+
connect: string;
|
|
18
|
+
};
|
|
19
|
+
channelStatusLabels: {
|
|
20
|
+
active: string;
|
|
21
|
+
inactive: string;
|
|
22
|
+
pending: string;
|
|
23
|
+
archived: string;
|
|
24
|
+
};
|
|
25
|
+
productStatusLabels: {
|
|
26
|
+
draft: string;
|
|
27
|
+
active: string;
|
|
28
|
+
archived: string;
|
|
29
|
+
};
|
|
30
|
+
productBookingModeLabels: {
|
|
31
|
+
date: string;
|
|
32
|
+
date_time: string;
|
|
33
|
+
open: string;
|
|
34
|
+
stay: string;
|
|
35
|
+
transfer: string;
|
|
36
|
+
itinerary: string;
|
|
37
|
+
other: string;
|
|
38
|
+
};
|
|
39
|
+
policyScopeLabels: {
|
|
40
|
+
global: string;
|
|
41
|
+
product: string;
|
|
42
|
+
option: string;
|
|
43
|
+
market: string;
|
|
44
|
+
channel: string;
|
|
45
|
+
};
|
|
46
|
+
policyTypeLabels: {
|
|
47
|
+
capability: string;
|
|
48
|
+
occupancy: string;
|
|
49
|
+
pickup: string;
|
|
50
|
+
question: string;
|
|
51
|
+
allotment: string;
|
|
52
|
+
availability_window: string;
|
|
53
|
+
currency: string;
|
|
54
|
+
custom: string;
|
|
55
|
+
};
|
|
56
|
+
};
|
|
57
|
+
channelCombobox: {
|
|
58
|
+
placeholder: string;
|
|
59
|
+
empty: string;
|
|
60
|
+
};
|
|
61
|
+
marketCombobox: {
|
|
62
|
+
placeholder: string;
|
|
63
|
+
empty: string;
|
|
64
|
+
};
|
|
65
|
+
productCombobox: {
|
|
66
|
+
placeholder: string;
|
|
67
|
+
empty: string;
|
|
68
|
+
};
|
|
69
|
+
productOptionCombobox: {
|
|
70
|
+
placeholder: string;
|
|
71
|
+
empty: string;
|
|
72
|
+
selectProductFirst: string;
|
|
73
|
+
};
|
|
74
|
+
policyDialog: {
|
|
75
|
+
titles: {
|
|
76
|
+
create: string;
|
|
77
|
+
edit: string;
|
|
78
|
+
};
|
|
79
|
+
fields: {
|
|
80
|
+
name: string;
|
|
81
|
+
scope: string;
|
|
82
|
+
type: string;
|
|
83
|
+
priority: string;
|
|
84
|
+
product: string;
|
|
85
|
+
option: string;
|
|
86
|
+
market: string;
|
|
87
|
+
channel: string;
|
|
88
|
+
conditionsJson: string;
|
|
89
|
+
effectsJson: string;
|
|
90
|
+
notes: string;
|
|
91
|
+
active: string;
|
|
92
|
+
};
|
|
93
|
+
placeholders: {
|
|
94
|
+
name: string;
|
|
95
|
+
};
|
|
96
|
+
actions: {
|
|
97
|
+
create: string;
|
|
98
|
+
save: string;
|
|
99
|
+
};
|
|
100
|
+
validation: {
|
|
101
|
+
nameRequired: string;
|
|
102
|
+
jsonObject: string;
|
|
103
|
+
};
|
|
104
|
+
};
|
|
105
|
+
};
|
|
106
|
+
ro: {
|
|
107
|
+
common: {
|
|
108
|
+
loading: string;
|
|
109
|
+
cancel: string;
|
|
110
|
+
active: string;
|
|
111
|
+
channelKindLabels: {
|
|
112
|
+
direct: string;
|
|
113
|
+
affiliate: string;
|
|
114
|
+
ota: string;
|
|
115
|
+
reseller: string;
|
|
116
|
+
marketplace: string;
|
|
117
|
+
api_partner: string;
|
|
118
|
+
connect: string;
|
|
119
|
+
};
|
|
120
|
+
channelStatusLabels: {
|
|
121
|
+
active: string;
|
|
122
|
+
inactive: string;
|
|
123
|
+
pending: string;
|
|
124
|
+
archived: string;
|
|
125
|
+
};
|
|
126
|
+
productStatusLabels: {
|
|
127
|
+
draft: string;
|
|
128
|
+
active: string;
|
|
129
|
+
archived: string;
|
|
130
|
+
};
|
|
131
|
+
productBookingModeLabels: {
|
|
132
|
+
date: string;
|
|
133
|
+
date_time: string;
|
|
134
|
+
open: string;
|
|
135
|
+
stay: string;
|
|
136
|
+
transfer: string;
|
|
137
|
+
itinerary: string;
|
|
138
|
+
other: string;
|
|
139
|
+
};
|
|
140
|
+
policyScopeLabels: {
|
|
141
|
+
global: string;
|
|
142
|
+
product: string;
|
|
143
|
+
option: string;
|
|
144
|
+
market: string;
|
|
145
|
+
channel: string;
|
|
146
|
+
};
|
|
147
|
+
policyTypeLabels: {
|
|
148
|
+
capability: string;
|
|
149
|
+
occupancy: string;
|
|
150
|
+
pickup: string;
|
|
151
|
+
question: string;
|
|
152
|
+
allotment: string;
|
|
153
|
+
availability_window: string;
|
|
154
|
+
currency: string;
|
|
155
|
+
custom: string;
|
|
156
|
+
};
|
|
157
|
+
};
|
|
158
|
+
channelCombobox: {
|
|
159
|
+
placeholder: string;
|
|
160
|
+
empty: string;
|
|
161
|
+
};
|
|
162
|
+
marketCombobox: {
|
|
163
|
+
placeholder: string;
|
|
164
|
+
empty: string;
|
|
165
|
+
};
|
|
166
|
+
productCombobox: {
|
|
167
|
+
placeholder: string;
|
|
168
|
+
empty: string;
|
|
169
|
+
};
|
|
170
|
+
productOptionCombobox: {
|
|
171
|
+
placeholder: string;
|
|
172
|
+
empty: string;
|
|
173
|
+
selectProductFirst: string;
|
|
174
|
+
};
|
|
175
|
+
policyDialog: {
|
|
176
|
+
titles: {
|
|
177
|
+
create: string;
|
|
178
|
+
edit: string;
|
|
179
|
+
};
|
|
180
|
+
fields: {
|
|
181
|
+
name: string;
|
|
182
|
+
scope: string;
|
|
183
|
+
type: string;
|
|
184
|
+
priority: string;
|
|
185
|
+
product: string;
|
|
186
|
+
option: string;
|
|
187
|
+
market: string;
|
|
188
|
+
channel: string;
|
|
189
|
+
conditionsJson: string;
|
|
190
|
+
effectsJson: string;
|
|
191
|
+
notes: string;
|
|
192
|
+
active: string;
|
|
193
|
+
};
|
|
194
|
+
placeholders: {
|
|
195
|
+
name: string;
|
|
196
|
+
};
|
|
197
|
+
actions: {
|
|
198
|
+
create: string;
|
|
199
|
+
save: string;
|
|
200
|
+
};
|
|
201
|
+
validation: {
|
|
202
|
+
nameRequired: string;
|
|
203
|
+
jsonObject: string;
|
|
204
|
+
};
|
|
205
|
+
};
|
|
206
|
+
};
|
|
207
|
+
};
|
|
208
|
+
export type SellabilityUiMessageOverrides = LocaleMessageOverrides<SellabilityUiMessages>;
|
|
209
|
+
export declare function resolveSellabilityUiMessages({ locale, overrides, }: {
|
|
210
|
+
locale: string | null | undefined;
|
|
211
|
+
overrides?: SellabilityUiMessageOverrides | null;
|
|
212
|
+
}): SellabilityUiMessages;
|
|
213
|
+
export declare function getSellabilityUiI18n({ locale, overrides, }: {
|
|
214
|
+
locale?: string | null | undefined;
|
|
215
|
+
overrides?: SellabilityUiMessageOverrides | null;
|
|
216
|
+
}): PackageI18nValue<SellabilityUiMessages>;
|
|
217
|
+
export declare function SellabilityUiMessagesProvider({ children, locale, overrides, }: {
|
|
218
|
+
children: ReactNode;
|
|
219
|
+
locale: string | null | undefined;
|
|
220
|
+
overrides?: SellabilityUiMessageOverrides | null;
|
|
221
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
222
|
+
export declare const useSellabilityUiI18n: () => PackageI18nValue<SellabilityUiMessages>;
|
|
223
|
+
export declare const useSellabilityUiMessages: () => SellabilityUiMessages;
|
|
224
|
+
export declare function useSellabilityUiI18nOrDefault(): PackageI18nValue<SellabilityUiMessages>;
|
|
225
|
+
export declare function useSellabilityUiMessagesOrDefault(): SellabilityUiMessages;
|
|
226
|
+
//# sourceMappingURL=provider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"provider.d.ts","sourceRoot":"","sources":["../../src/i18n/provider.tsx"],"names":[],"mappings":"AAEA,OAAO,EAIL,KAAK,sBAAsB,EAC3B,KAAK,gBAAgB,EAEtB,MAAM,gBAAgB,CAAA;AACvB,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAA;AAGtC,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAKvD,eAAO,MAAM,+BAA+B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAGe,CAAA;AAE3D,MAAM,MAAM,6BAA6B,GAAG,sBAAsB,CAAC,qBAAqB,CAAC,CAAA;AAUzF,wBAAgB,4BAA4B,CAAC,EAC3C,MAAM,EACN,SAAS,GACV,EAAE;IACD,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACjC,SAAS,CAAC,EAAE,6BAA6B,GAAG,IAAI,CAAA;CACjD,yBAOA;AAED,wBAAgB,oBAAoB,CAAC,EACnC,MAAM,EACN,SAAS,GACV,EAAE;IACD,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IAClC,SAAS,CAAC,EAAE,6BAA6B,GAAG,IAAI,CAAA;CACjD,GAAG,gBAAgB,CAAC,qBAAqB,CAAC,CAS1C;AAED,wBAAgB,6BAA6B,CAAC,EAC5C,QAAQ,EACR,MAAM,EACN,SAAS,GACV,EAAE;IACD,QAAQ,EAAE,SAAS,CAAA;IACnB,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAA;IACjC,SAAS,CAAC,EAAE,6BAA6B,GAAG,IAAI,CAAA;CACjD,2CAWA;AAED,eAAO,MAAM,oBAAoB,+CAA+B,CAAA;AAChE,eAAO,MAAM,wBAAwB,6BAAmC,CAAA;AAExE,wBAAgB,6BAA6B,4CAE5C;AAED,wBAAgB,iCAAiC,0BAEhD"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { createLocaleFormatters, createPackageMessagesContext, resolvePackageMessages, } from "@voyantjs/i18n";
|
|
4
|
+
import { sellabilityUiEn } from "./en";
|
|
5
|
+
import { sellabilityUiRo } from "./ro";
|
|
6
|
+
const fallbackLocale = "en";
|
|
7
|
+
export const sellabilityUiMessageDefinitions = {
|
|
8
|
+
en: sellabilityUiEn,
|
|
9
|
+
ro: sellabilityUiRo,
|
|
10
|
+
};
|
|
11
|
+
const sellabilityUiContext = createPackageMessagesContext("SellabilityUiMessages");
|
|
12
|
+
const defaultSellabilityUiI18n = {
|
|
13
|
+
messages: sellabilityUiEn,
|
|
14
|
+
...createLocaleFormatters(fallbackLocale),
|
|
15
|
+
};
|
|
16
|
+
export function resolveSellabilityUiMessages({ locale, overrides, }) {
|
|
17
|
+
return resolvePackageMessages({
|
|
18
|
+
definitions: sellabilityUiMessageDefinitions,
|
|
19
|
+
fallbackLocale,
|
|
20
|
+
locale,
|
|
21
|
+
overrides,
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
export function getSellabilityUiI18n({ locale, overrides, }) {
|
|
25
|
+
const resolvedLocale = locale ?? fallbackLocale;
|
|
26
|
+
return {
|
|
27
|
+
messages: resolveSellabilityUiMessages({
|
|
28
|
+
locale: resolvedLocale,
|
|
29
|
+
overrides,
|
|
30
|
+
}),
|
|
31
|
+
...createLocaleFormatters(resolvedLocale),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function SellabilityUiMessagesProvider({ children, locale, overrides, }) {
|
|
35
|
+
return (_jsx(sellabilityUiContext.ResolvedMessagesProvider, { definitions: sellabilityUiMessageDefinitions, fallbackLocale: fallbackLocale, locale: locale, overrides: overrides, children: children }));
|
|
36
|
+
}
|
|
37
|
+
export const useSellabilityUiI18n = sellabilityUiContext.useI18n;
|
|
38
|
+
export const useSellabilityUiMessages = sellabilityUiContext.useMessages;
|
|
39
|
+
export function useSellabilityUiI18nOrDefault() {
|
|
40
|
+
return sellabilityUiContext.useOptionalI18n() ?? defaultSellabilityUiI18n;
|
|
41
|
+
}
|
|
42
|
+
export function useSellabilityUiMessagesOrDefault() {
|
|
43
|
+
return useSellabilityUiI18nOrDefault().messages;
|
|
44
|
+
}
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
export declare const sellabilityUiRo: {
|
|
2
|
+
common: {
|
|
3
|
+
loading: string;
|
|
4
|
+
cancel: string;
|
|
5
|
+
active: string;
|
|
6
|
+
channelKindLabels: {
|
|
7
|
+
direct: string;
|
|
8
|
+
affiliate: string;
|
|
9
|
+
ota: string;
|
|
10
|
+
reseller: string;
|
|
11
|
+
marketplace: string;
|
|
12
|
+
api_partner: string;
|
|
13
|
+
connect: string;
|
|
14
|
+
};
|
|
15
|
+
channelStatusLabels: {
|
|
16
|
+
active: string;
|
|
17
|
+
inactive: string;
|
|
18
|
+
pending: string;
|
|
19
|
+
archived: string;
|
|
20
|
+
};
|
|
21
|
+
productStatusLabels: {
|
|
22
|
+
draft: string;
|
|
23
|
+
active: string;
|
|
24
|
+
archived: string;
|
|
25
|
+
};
|
|
26
|
+
productBookingModeLabels: {
|
|
27
|
+
date: string;
|
|
28
|
+
date_time: string;
|
|
29
|
+
open: string;
|
|
30
|
+
stay: string;
|
|
31
|
+
transfer: string;
|
|
32
|
+
itinerary: string;
|
|
33
|
+
other: string;
|
|
34
|
+
};
|
|
35
|
+
policyScopeLabels: {
|
|
36
|
+
global: string;
|
|
37
|
+
product: string;
|
|
38
|
+
option: string;
|
|
39
|
+
market: string;
|
|
40
|
+
channel: string;
|
|
41
|
+
};
|
|
42
|
+
policyTypeLabels: {
|
|
43
|
+
capability: string;
|
|
44
|
+
occupancy: string;
|
|
45
|
+
pickup: string;
|
|
46
|
+
question: string;
|
|
47
|
+
allotment: string;
|
|
48
|
+
availability_window: string;
|
|
49
|
+
currency: string;
|
|
50
|
+
custom: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
channelCombobox: {
|
|
54
|
+
placeholder: string;
|
|
55
|
+
empty: string;
|
|
56
|
+
};
|
|
57
|
+
marketCombobox: {
|
|
58
|
+
placeholder: string;
|
|
59
|
+
empty: string;
|
|
60
|
+
};
|
|
61
|
+
productCombobox: {
|
|
62
|
+
placeholder: string;
|
|
63
|
+
empty: string;
|
|
64
|
+
};
|
|
65
|
+
productOptionCombobox: {
|
|
66
|
+
placeholder: string;
|
|
67
|
+
empty: string;
|
|
68
|
+
selectProductFirst: string;
|
|
69
|
+
};
|
|
70
|
+
policyDialog: {
|
|
71
|
+
titles: {
|
|
72
|
+
create: string;
|
|
73
|
+
edit: string;
|
|
74
|
+
};
|
|
75
|
+
fields: {
|
|
76
|
+
name: string;
|
|
77
|
+
scope: string;
|
|
78
|
+
type: string;
|
|
79
|
+
priority: string;
|
|
80
|
+
product: string;
|
|
81
|
+
option: string;
|
|
82
|
+
market: string;
|
|
83
|
+
channel: string;
|
|
84
|
+
conditionsJson: string;
|
|
85
|
+
effectsJson: string;
|
|
86
|
+
notes: string;
|
|
87
|
+
active: string;
|
|
88
|
+
};
|
|
89
|
+
placeholders: {
|
|
90
|
+
name: string;
|
|
91
|
+
};
|
|
92
|
+
actions: {
|
|
93
|
+
create: string;
|
|
94
|
+
save: string;
|
|
95
|
+
};
|
|
96
|
+
validation: {
|
|
97
|
+
nameRequired: string;
|
|
98
|
+
jsonObject: string;
|
|
99
|
+
};
|
|
100
|
+
};
|
|
101
|
+
};
|
|
102
|
+
//# sourceMappingURL=ro.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ro.d.ts","sourceRoot":"","sources":["../../src/i18n/ro.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoGK,CAAA"}
|
package/dist/i18n/ro.js
ADDED
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
export const sellabilityUiRo = {
|
|
2
|
+
common: {
|
|
3
|
+
loading: "Se incarca...",
|
|
4
|
+
cancel: "Anuleaza",
|
|
5
|
+
active: "Activ",
|
|
6
|
+
channelKindLabels: {
|
|
7
|
+
direct: "Direct",
|
|
8
|
+
affiliate: "Afiliat",
|
|
9
|
+
ota: "OTA",
|
|
10
|
+
reseller: "Revanzator",
|
|
11
|
+
marketplace: "Marketplace",
|
|
12
|
+
api_partner: "Partener API",
|
|
13
|
+
connect: "Connect",
|
|
14
|
+
},
|
|
15
|
+
channelStatusLabels: {
|
|
16
|
+
active: "Activ",
|
|
17
|
+
inactive: "Inactiv",
|
|
18
|
+
pending: "In asteptare",
|
|
19
|
+
archived: "Arhivat",
|
|
20
|
+
},
|
|
21
|
+
productStatusLabels: {
|
|
22
|
+
draft: "Ciorna",
|
|
23
|
+
active: "Activ",
|
|
24
|
+
archived: "Arhivat",
|
|
25
|
+
},
|
|
26
|
+
productBookingModeLabels: {
|
|
27
|
+
date: "Data",
|
|
28
|
+
date_time: "Data si ora",
|
|
29
|
+
open: "Deschis",
|
|
30
|
+
stay: "Sejur",
|
|
31
|
+
transfer: "Transfer",
|
|
32
|
+
itinerary: "Itinerar",
|
|
33
|
+
other: "Altul",
|
|
34
|
+
},
|
|
35
|
+
policyScopeLabels: {
|
|
36
|
+
global: "Global",
|
|
37
|
+
product: "Produs",
|
|
38
|
+
option: "Optiune",
|
|
39
|
+
market: "Piata",
|
|
40
|
+
channel: "Canal",
|
|
41
|
+
},
|
|
42
|
+
policyTypeLabels: {
|
|
43
|
+
capability: "Capabilitate",
|
|
44
|
+
occupancy: "Ocupare",
|
|
45
|
+
pickup: "Preluare",
|
|
46
|
+
question: "Intrebare",
|
|
47
|
+
allotment: "Alocare",
|
|
48
|
+
availability_window: "Fereastra de disponibilitate",
|
|
49
|
+
currency: "Moneda",
|
|
50
|
+
custom: "Personalizat",
|
|
51
|
+
},
|
|
52
|
+
},
|
|
53
|
+
channelCombobox: {
|
|
54
|
+
placeholder: "Selecteaza canal...",
|
|
55
|
+
empty: "Nu s-au gasit canale.",
|
|
56
|
+
},
|
|
57
|
+
marketCombobox: {
|
|
58
|
+
placeholder: "Cauta piete...",
|
|
59
|
+
empty: "Nu s-au gasit piete.",
|
|
60
|
+
},
|
|
61
|
+
productCombobox: {
|
|
62
|
+
placeholder: "Cauta produse...",
|
|
63
|
+
empty: "Nu s-au gasit produse.",
|
|
64
|
+
},
|
|
65
|
+
productOptionCombobox: {
|
|
66
|
+
placeholder: "Selecteaza optiunea produsului...",
|
|
67
|
+
empty: "Nu s-au gasit optiuni de produs.",
|
|
68
|
+
selectProductFirst: "Selecteaza mai intai un produs.",
|
|
69
|
+
},
|
|
70
|
+
policyDialog: {
|
|
71
|
+
titles: {
|
|
72
|
+
create: "Adauga Politica",
|
|
73
|
+
edit: "Editeaza Politica",
|
|
74
|
+
},
|
|
75
|
+
fields: {
|
|
76
|
+
name: "Nume",
|
|
77
|
+
scope: "Domeniu",
|
|
78
|
+
type: "Tip",
|
|
79
|
+
priority: "Prioritate",
|
|
80
|
+
product: "Produs",
|
|
81
|
+
option: "Optiune",
|
|
82
|
+
market: "Piata",
|
|
83
|
+
channel: "Canal",
|
|
84
|
+
conditionsJson: "Conditii (JSON)",
|
|
85
|
+
effectsJson: "Efecte (JSON)",
|
|
86
|
+
notes: "Note",
|
|
87
|
+
active: "Activ",
|
|
88
|
+
},
|
|
89
|
+
placeholders: {
|
|
90
|
+
name: "Blocheaza rezervarile fara capabilitate",
|
|
91
|
+
},
|
|
92
|
+
actions: {
|
|
93
|
+
create: "Adauga Politica",
|
|
94
|
+
save: "Salveaza Modificarile",
|
|
95
|
+
},
|
|
96
|
+
validation: {
|
|
97
|
+
nameRequired: "Numele este obligatoriu",
|
|
98
|
+
jsonObject: "Trebuie sa fie un obiect JSON",
|
|
99
|
+
},
|
|
100
|
+
},
|
|
101
|
+
};
|
package/dist/index.d.ts
CHANGED
|
@@ -3,4 +3,5 @@ export { MarketCombobox } from "./components/market-combobox";
|
|
|
3
3
|
export { PolicyDialog } from "./components/policy-dialog";
|
|
4
4
|
export { ProductCombobox } from "./components/product-combobox";
|
|
5
5
|
export { ProductOptionCombobox } from "./components/product-option-combobox";
|
|
6
|
+
export { getSellabilityUiI18n, resolveSellabilityUiMessages, type SellabilityUiMessageOverrides, type SellabilityUiMessages, SellabilityUiMessagesProvider, sellabilityUiEn, sellabilityUiMessageDefinitions, sellabilityUiRo, useSellabilityUiI18n, useSellabilityUiI18nOrDefault, useSellabilityUiMessages, useSellabilityUiMessagesOrDefault, } from "./i18n";
|
|
6
7
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAA;AAC7D,OAAO,EAAE,YAAY,EAAE,MAAM,4BAA4B,CAAA;AACzD,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAA;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,sCAAsC,CAAA;AAC5E,OAAO,EACL,oBAAoB,EACpB,4BAA4B,EAC5B,KAAK,6BAA6B,EAClC,KAAK,qBAAqB,EAC1B,6BAA6B,EAC7B,eAAe,EACf,+BAA+B,EAC/B,eAAe,EACf,oBAAoB,EACpB,6BAA6B,EAC7B,wBAAwB,EACxB,iCAAiC,GAClC,MAAM,QAAQ,CAAA"}
|
package/dist/index.js
CHANGED
|
@@ -3,3 +3,4 @@ export { MarketCombobox } from "./components/market-combobox";
|
|
|
3
3
|
export { PolicyDialog } from "./components/policy-dialog";
|
|
4
4
|
export { ProductCombobox } from "./components/product-combobox";
|
|
5
5
|
export { ProductOptionCombobox } from "./components/product-option-combobox";
|
|
6
|
+
export { getSellabilityUiI18n, resolveSellabilityUiMessages, SellabilityUiMessagesProvider, sellabilityUiEn, sellabilityUiMessageDefinitions, sellabilityUiRo, useSellabilityUiI18n, useSellabilityUiI18nOrDefault, useSellabilityUiMessages, useSellabilityUiMessagesOrDefault, } from "./i18n";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voyantjs/sellability-ui",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"license": "FSL-1.1-Apache-2.0",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -14,6 +14,18 @@
|
|
|
14
14
|
"types": "./dist/index.d.ts",
|
|
15
15
|
"import": "./dist/index.js"
|
|
16
16
|
},
|
|
17
|
+
"./i18n": {
|
|
18
|
+
"types": "./dist/i18n/index.d.ts",
|
|
19
|
+
"import": "./dist/i18n/index.js"
|
|
20
|
+
},
|
|
21
|
+
"./i18n/en": {
|
|
22
|
+
"types": "./dist/i18n/en.d.ts",
|
|
23
|
+
"import": "./dist/i18n/en.js"
|
|
24
|
+
},
|
|
25
|
+
"./i18n/ro": {
|
|
26
|
+
"types": "./dist/i18n/ro.d.ts",
|
|
27
|
+
"import": "./dist/i18n/ro.js"
|
|
28
|
+
},
|
|
17
29
|
"./components/*": {
|
|
18
30
|
"types": "./dist/components/*.d.ts",
|
|
19
31
|
"import": "./dist/components/*.js"
|
|
@@ -25,12 +37,15 @@
|
|
|
25
37
|
"react": "^19.0.0",
|
|
26
38
|
"react-dom": "^19.0.0",
|
|
27
39
|
"react-hook-form": "^7.60.0",
|
|
28
|
-
"zod": "^3.
|
|
29
|
-
"@voyantjs/distribution-react": "0.
|
|
30
|
-
"@voyantjs/markets-react": "0.
|
|
31
|
-
"@voyantjs/products-react": "0.
|
|
32
|
-
"@voyantjs/sellability-react": "0.
|
|
33
|
-
"@voyantjs/ui": "0.
|
|
40
|
+
"zod": "^4.3.6",
|
|
41
|
+
"@voyantjs/distribution-react": "0.17.0",
|
|
42
|
+
"@voyantjs/markets-react": "0.17.0",
|
|
43
|
+
"@voyantjs/products-react": "0.17.0",
|
|
44
|
+
"@voyantjs/sellability-react": "0.17.0",
|
|
45
|
+
"@voyantjs/ui": "0.17.0"
|
|
46
|
+
},
|
|
47
|
+
"dependencies": {
|
|
48
|
+
"@voyantjs/i18n": "0.17.0"
|
|
34
49
|
},
|
|
35
50
|
"devDependencies": {
|
|
36
51
|
"@tanstack/react-query": "^5.96.2",
|
|
@@ -43,13 +58,14 @@
|
|
|
43
58
|
"react-hook-form": "^7.60.0",
|
|
44
59
|
"typescript": "^6.0.2",
|
|
45
60
|
"vitest": "^4.1.2",
|
|
46
|
-
"zod": "^3.
|
|
47
|
-
"@voyantjs/distribution-react": "0.
|
|
48
|
-
"@voyantjs/
|
|
49
|
-
"@voyantjs/
|
|
50
|
-
"@voyantjs/
|
|
61
|
+
"zod": "^4.3.6",
|
|
62
|
+
"@voyantjs/distribution-react": "0.17.0",
|
|
63
|
+
"@voyantjs/i18n": "0.17.0",
|
|
64
|
+
"@voyantjs/markets-react": "0.17.0",
|
|
65
|
+
"@voyantjs/products-react": "0.17.0",
|
|
66
|
+
"@voyantjs/sellability-react": "0.17.0",
|
|
51
67
|
"@voyantjs/voyant-typescript-config": "0.1.0",
|
|
52
|
-
"@voyantjs/ui": "0.
|
|
68
|
+
"@voyantjs/ui": "0.17.0"
|
|
53
69
|
},
|
|
54
70
|
"files": [
|
|
55
71
|
"dist"
|