@voyantjs/sellability-ui 0.16.0 → 0.18.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.
@@ -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 = "Select product option…", disabled, }) {
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
- ? "Loading…"
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
- ? "No product options found."
45
- : "Select a product first." }), _jsx(ComboboxList, { children: _jsx(ComboboxCollection, { children: (id) => {
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"}
@@ -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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AAE;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,EA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+ "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
+ }