@voyantjs/external-refs-ui 0.35.0 → 0.37.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.
@@ -0,0 +1,21 @@
1
+ type KnownEntityType = "person" | "organization" | "supplier" | "booking" | "product";
2
+ export interface EntityRefPickerMessages {
3
+ entityTypeLabel: string;
4
+ entityLabel: string;
5
+ customEntityTypeLabel: string;
6
+ typePlaceholder: string;
7
+ entityPlaceholder: string;
8
+ entityTypeLabels: Record<KnownEntityType, string>;
9
+ }
10
+ export interface EntityRefPickerProps {
11
+ entityType: string;
12
+ entityId: string;
13
+ onChange: (scope: {
14
+ entityType: string;
15
+ entityId: string;
16
+ }) => void;
17
+ messages: EntityRefPickerMessages;
18
+ }
19
+ export declare function EntityRefPicker({ entityType, entityId, onChange, messages, }: EntityRefPickerProps): import("react/jsx-runtime").JSX.Element;
20
+ export {};
21
+ //# sourceMappingURL=entity-ref-picker.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entity-ref-picker.d.ts","sourceRoot":"","sources":["../../src/components/entity-ref-picker.tsx"],"names":[],"mappings":"AAgBA,KAAK,eAAe,GAAG,QAAQ,GAAG,cAAc,GAAG,UAAU,GAAG,SAAS,GAAG,SAAS,CAAA;AAWrF,MAAM,WAAW,uBAAuB;IACtC,eAAe,EAAE,MAAM,CAAA;IACvB,WAAW,EAAE,MAAM,CAAA;IACnB,qBAAqB,EAAE,MAAM,CAAA;IAC7B,eAAe,EAAE,MAAM,CAAA;IACvB,iBAAiB,EAAE,MAAM,CAAA;IACzB,gBAAgB,EAAE,MAAM,CAAC,eAAe,EAAE,MAAM,CAAC,CAAA;CAClD;AAED,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,CAAC,KAAK,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IACnE,QAAQ,EAAE,uBAAuB,CAAA;CAClC;AAMD,wBAAgB,eAAe,CAAC,EAC9B,UAAU,EACV,QAAQ,EACR,QAAQ,EACR,QAAQ,GACT,EAAE,oBAAoB,2CA4EtB"}
@@ -0,0 +1,38 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { BookingCombobox } from "@voyantjs/bookings-ui";
4
+ import { OrganizationCombobox, PersonCombobox } from "@voyantjs/crm-ui";
5
+ import { ProductCombobox } from "@voyantjs/products-ui";
6
+ import { SupplierCombobox } from "@voyantjs/suppliers-ui";
7
+ import { Input, Label, Select, SelectContent, SelectItem, SelectTrigger, SelectValue, } from "@voyantjs/ui/components";
8
+ const KNOWN_ENTITY_TYPES = [
9
+ "person",
10
+ "organization",
11
+ "supplier",
12
+ "booking",
13
+ "product",
14
+ ];
15
+ function isKnownEntityType(value) {
16
+ return KNOWN_ENTITY_TYPES.includes(value);
17
+ }
18
+ export function EntityRefPicker({ entityType, entityId, onChange, messages, }) {
19
+ const selectedType = isKnownEntityType(entityType) ? entityType : "custom";
20
+ const setEntityType = (nextType) => {
21
+ if (nextType === "custom") {
22
+ onChange({ entityType: "", entityId: "" });
23
+ return;
24
+ }
25
+ onChange({ entityType: nextType, entityId: "" });
26
+ };
27
+ const setEntityId = (nextId) => {
28
+ onChange({ entityType, entityId: nextId ?? "" });
29
+ };
30
+ const entityPicker = isKnownEntityType(entityType) ? (entityType === "person" ? (_jsx(PersonCombobox, { value: entityId || null, onChange: setEntityId })) : entityType === "organization" ? (_jsx(OrganizationCombobox, { value: entityId || null, onChange: setEntityId })) : entityType === "supplier" ? (_jsx(SupplierCombobox, { value: entityId || null, onChange: setEntityId })) : entityType === "booking" ? (_jsx(BookingCombobox, { value: entityId || null, onChange: setEntityId })) : (_jsx(ProductCombobox, { value: entityId || null, onChange: setEntityId }))) : (_jsx(Input, { value: entityId, onChange: (event) => onChange({ entityType, entityId: event.target.value }), placeholder: messages.entityPlaceholder }));
31
+ return (_jsxs("div", { className: "grid max-w-2xl grid-cols-1 gap-4 sm:grid-cols-2", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.entityTypeLabel }), _jsxs(Select, { items: [
32
+ ...KNOWN_ENTITY_TYPES.map((type) => ({
33
+ label: messages.entityTypeLabels[type],
34
+ value: type,
35
+ })),
36
+ { label: messages.customEntityTypeLabel, value: "custom" },
37
+ ], value: selectedType, onValueChange: (value) => setEntityType(value ?? "custom"), children: [_jsx(SelectTrigger, { className: "w-full", children: _jsx(SelectValue, { placeholder: messages.typePlaceholder }) }), _jsxs(SelectContent, { children: [KNOWN_ENTITY_TYPES.map((type) => (_jsx(SelectItem, { value: type, children: messages.entityTypeLabels[type] }, type))), _jsx(SelectItem, { value: "custom", children: messages.customEntityTypeLabel })] })] }), selectedType === "custom" ? (_jsx(Input, { value: entityType, onChange: (event) => onChange({ entityType: event.target.value, entityId }), placeholder: messages.typePlaceholder })) : null] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: messages.entityLabel }), entityPicker] })] }));
38
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"external-refs-page.d.ts","sourceRoot":"","sources":["../../src/components/external-refs-page.tsx"],"names":[],"mappings":"AAmBA,MAAM,WAAW,qBAAqB;IACpC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IACzE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,UAAU,EACV,QAAQ,EACR,aAAa,EACb,SAAS,GACV,GAAE,qBAA0B,2CAuD5B;AAED,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,wBAAgB,eAAe,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,oBAAoB,2CAkK7E"}
1
+ {"version":3,"file":"external-refs-page.d.ts","sourceRoot":"","sources":["../../src/components/external-refs-page.tsx"],"names":[],"mappings":"AAoBA,MAAM,WAAW,qBAAqB;IACpC,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,CAAC,KAAK,EAAE;QAAE,UAAU,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;IACzE,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,wBAAgB,gBAAgB,CAAC,EAC/B,UAAU,EACV,QAAQ,EACR,aAAa,EACb,SAAS,GACV,GAAE,qBAA0B,2CAiD5B;AAED,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,MAAM,CAAA;CACjB;AAED,wBAAgB,eAAe,CAAC,EAAE,UAAU,EAAE,QAAQ,EAAE,EAAE,oBAAoB,2CAkK7E"}
@@ -1,12 +1,13 @@
1
1
  "use client";
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { useExternalRefMutation, useExternalRefs, } from "@voyantjs/external-refs-react";
4
- import { Badge, Button, Input, Label } from "@voyantjs/ui/components";
4
+ import { Badge, Button } from "@voyantjs/ui/components";
5
5
  import { DataTable } from "@voyantjs/ui/components/data-table";
6
6
  import { cn } from "@voyantjs/ui/lib/utils";
7
7
  import { ChevronLeft, ChevronRight, Link2, Pencil, Plus, Star, Trash2 } from "lucide-react";
8
8
  import { useMemo, useState } from "react";
9
9
  import { useExternalRefsUiMessagesOrDefault } from "../i18n/index.js";
10
+ import { EntityRefPicker } from "./entity-ref-picker.js";
10
11
  import { ExternalRefDialog } from "./external-ref-dialog.js";
11
12
  const PAGE_SIZE = 25;
12
13
  export function ExternalRefsPage({ entityType, entityId, onScopeChange, className, } = {}) {
@@ -26,7 +27,14 @@ export function ExternalRefsPage({ entityType, entityId, onScopeChange, classNam
26
27
  setInnerEntityId(nextEntityId);
27
28
  onScopeChange?.({ entityType: nextEntityType, entityId: nextEntityId });
28
29
  };
29
- return (_jsxs("div", { "data-slot": "external-refs-page", className: cn("flex flex-col gap-6 p-6", className), children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Link2, { className: "size-5 text-muted-foreground", "aria-hidden": "true" }), _jsx("h1", { className: "text-2xl font-bold tracking-tight", children: pageMessages.title })] }), _jsx("p", { className: "max-w-2xl text-sm text-muted-foreground", children: pageMessages.description }), _jsxs("div", { className: "grid max-w-2xl grid-cols-1 gap-4 sm:grid-cols-2", children: [_jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: pageMessages.fields.entityType }), _jsx(Input, { value: activeEntityType, onChange: (event) => updateScope({ entityType: event.target.value }), placeholder: pageMessages.placeholders.entityType })] }), _jsxs("div", { className: "flex flex-col gap-2", children: [_jsx(Label, { children: pageMessages.fields.entityId }), _jsx(Input, { value: activeEntityId, onChange: (event) => updateScope({ entityId: event.target.value }), placeholder: pageMessages.placeholders.entityId, className: "font-mono text-xs" })] })] }), !scopeReady ? (_jsx("div", { className: "rounded-md border border-dashed p-12 text-center", children: _jsx("p", { className: "text-sm text-muted-foreground", children: pageMessages.emptyScope }) })) : (_jsx(ExternalRefsTab, { entityType: activeEntityType, entityId: activeEntityId }))] }));
30
+ return (_jsxs("div", { "data-slot": "external-refs-page", className: cn("flex flex-col gap-6 p-6", className), children: [_jsxs("div", { className: "flex items-center gap-3", children: [_jsx(Link2, { className: "size-5 text-muted-foreground", "aria-hidden": "true" }), _jsx("h1", { className: "text-2xl font-bold tracking-tight", children: pageMessages.title })] }), _jsx("p", { className: "max-w-2xl text-sm text-muted-foreground", children: pageMessages.description }), _jsx(EntityRefPicker, { entityType: activeEntityType, entityId: activeEntityId, onChange: updateScope, messages: {
31
+ entityTypeLabel: pageMessages.fields.entityType,
32
+ entityLabel: pageMessages.fields.entity,
33
+ customEntityTypeLabel: pageMessages.fields.customEntityType,
34
+ typePlaceholder: pageMessages.placeholders.entityType,
35
+ entityPlaceholder: pageMessages.placeholders.entity,
36
+ entityTypeLabels: pageMessages.entityTypeLabels,
37
+ } }), !scopeReady ? (_jsx("div", { className: "rounded-md border border-dashed p-12 text-center", children: _jsx("p", { className: "text-sm text-muted-foreground", children: pageMessages.emptyScope }) })) : (_jsx(ExternalRefsTab, { entityType: activeEntityType, entityId: activeEntityId }))] }));
30
38
  }
31
39
  export function ExternalRefsTab({ entityType, entityId }) {
32
40
  const messages = useExternalRefsUiMessagesOrDefault();
@@ -1 +1 @@
1
- {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAE3D,eAAO,MAAM,gBAAgB,EAAE,sBAoF9B,CAAA"}
1
+ {"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAE3D,eAAO,MAAM,gBAAgB,EAAE,sBA4F9B,CAAA"}
package/dist/i18n/en.js CHANGED
@@ -11,13 +11,21 @@ export const externalRefsUiEn = {
11
11
  description: "IDs from third-party systems linked to Voyant entities. Enter the entity type and ID below to manage its external references.",
12
12
  fields: {
13
13
  entityType: "Entity type",
14
- entityId: "Entity ID",
14
+ entity: "Entity",
15
+ customEntityType: "Other entity type",
15
16
  },
16
17
  placeholders: {
17
18
  entityType: "person, booking, product...",
18
- entityId: "pers_... / book_... / prod_...",
19
+ entity: "Paste a reference for custom entity types",
19
20
  },
20
- emptyScope: "Enter an entity type and ID above to browse its external references.",
21
+ entityTypeLabels: {
22
+ person: "Person",
23
+ organization: "Organization",
24
+ supplier: "Supplier",
25
+ booking: "Booking",
26
+ product: "Product",
27
+ },
28
+ emptyScope: "Choose an entity above to browse its external references.",
21
29
  },
22
30
  externalRefsTab: {
23
31
  description: "Links between this entity and IDs in external systems.",
@@ -9,12 +9,14 @@ export type ExternalRefsUiMessages = {
9
9
  description: string;
10
10
  fields: {
11
11
  entityType: string;
12
- entityId: string;
12
+ entity: string;
13
+ customEntityType: string;
13
14
  };
14
15
  placeholders: {
15
16
  entityType: string;
16
- entityId: string;
17
+ entity: string;
17
18
  };
19
+ entityTypeLabels: Record<"person" | "organization" | "supplier" | "booking" | "product", string>;
18
20
  emptyScope: string;
19
21
  };
20
22
  externalRefsTab: {
@@ -1 +1 @@
1
- {"version":3,"file":"messages.d.ts","sourceRoot":"","sources":["../../src/i18n/messages.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAA;AAEtE,MAAM,MAAM,iBAAiB,GAAG,iBAAiB,CAAC,QAAQ,CAAC,CAAA;AAE3D,MAAM,MAAM,sBAAsB,GAAG;IACnC,MAAM,EAAE;QACN,eAAe,EAAE,MAAM,CAAC,iBAAiB,EAAE,MAAM,CAAC,CAAA;KACnD,CAAA;IACD,gBAAgB,EAAE;QAChB,KAAK,EAAE,MAAM,CAAA;QACb,WAAW,EAAE,MAAM,CAAA;QACnB,MAAM,EAAE;YACN,UAAU,EAAE,MAAM,CAAA;YAClB,QAAQ,EAAE,MAAM,CAAA;SACjB,CAAA;QACD,YAAY,EAAE;YACZ,UAAU,EAAE,MAAM,CAAA;YAClB,QAAQ,EAAE,MAAM,CAAA;SACjB,CAAA;QACD,UAAU,EAAE,MAAM,CAAA;KACnB,CAAA;IACD,eAAe,EAAE;QACf,WAAW,EAAE,MAAM,CAAA;QACnB,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE;YACL,IAAI,EAAE,MAAM,CAAA;YACZ,OAAO,EAAE,MAAM,CA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1 +1 @@
1
- {"version":3,"file":"ro.d.ts","sourceRoot":"","sources":["../../src/i18n/ro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAE3D,eAAO,MAAM,gBAAgB,EAAE,sBAoF9B,CAAA"}
1
+ {"version":3,"file":"ro.d.ts","sourceRoot":"","sources":["../../src/i18n/ro.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAE3D,eAAO,MAAM,gBAAgB,EAAE,sBA4F9B,CAAA"}
package/dist/i18n/ro.js CHANGED
@@ -11,13 +11,21 @@ export const externalRefsUiRo = {
11
11
  description: "ID-uri din sisteme terte legate de entitati Voyant. Introdu tipul entitatii si ID-ul de mai jos pentru a gestiona referintele externe.",
12
12
  fields: {
13
13
  entityType: "Tip entitate",
14
- entityId: "ID entitate",
14
+ entity: "Entitate",
15
+ customEntityType: "Alt tip de entitate",
15
16
  },
16
17
  placeholders: {
17
18
  entityType: "person, booking, product...",
18
- entityId: "pers_... / book_... / prod_...",
19
+ entity: "Insereaza o referinta pentru tipuri custom",
19
20
  },
20
- emptyScope: "Introdu mai sus tipul entitatii si ID-ul pentru a vedea referintele externe.",
21
+ entityTypeLabels: {
22
+ person: "Persoana",
23
+ organization: "Organizatie",
24
+ supplier: "Furnizor",
25
+ booking: "Rezervare",
26
+ product: "Produs",
27
+ },
28
+ emptyScope: "Alege o entitate mai sus pentru a vedea referintele externe.",
21
29
  },
22
30
  externalRefsTab: {
23
31
  description: "Legaturi intre aceasta entitate si ID-uri din sisteme externe.",
package/dist/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export { EntityRefPicker, type EntityRefPickerProps } from "./components/entity-ref-picker.js";
1
2
  export { ExternalRefDialog, type ExternalRefDialogProps } from "./components/external-ref-dialog.js";
2
3
  export { ExternalRefsPage, type ExternalRefsPageProps, ExternalRefsTab, type ExternalRefsTabProps, } from "./components/external-refs-page.js";
3
4
  export { type ExternalRefStatus, type ExternalRefsUiMessageOverrides, type ExternalRefsUiMessages, ExternalRefsUiMessagesProvider, externalRefsUiEn, externalRefsUiMessageDefinitions, externalRefsUiRo, getExternalRefsUiI18n, resolveExternalRefsUiMessages, useExternalRefsUiI18n, useExternalRefsUiI18nOrDefault, useExternalRefsUiMessages, useExternalRefsUiMessagesOrDefault, } from "./i18n/index.js";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,qCAAqC,CAAA;AACpG,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,eAAe,EACf,KAAK,oBAAoB,GAC1B,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAC3B,8BAA8B,EAC9B,gBAAgB,EAChB,gCAAgC,EAChC,gBAAgB,EAChB,qBAAqB,EACrB,6BAA6B,EAC7B,qBAAqB,EACrB,8BAA8B,EAC9B,yBAAyB,EACzB,kCAAkC,GACnC,MAAM,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,KAAK,oBAAoB,EAAE,MAAM,mCAAmC,CAAA;AAC9F,OAAO,EAAE,iBAAiB,EAAE,KAAK,sBAAsB,EAAE,MAAM,qCAAqC,CAAA;AACpG,OAAO,EACL,gBAAgB,EAChB,KAAK,qBAAqB,EAC1B,eAAe,EACf,KAAK,oBAAoB,GAC1B,MAAM,oCAAoC,CAAA;AAC3C,OAAO,EACL,KAAK,iBAAiB,EACtB,KAAK,8BAA8B,EACnC,KAAK,sBAAsB,EAC3B,8BAA8B,EAC9B,gBAAgB,EAChB,gCAAgC,EAChC,gBAAgB,EAChB,qBAAqB,EACrB,6BAA6B,EAC7B,qBAAqB,EACrB,8BAA8B,EAC9B,yBAAyB,EACzB,kCAAkC,GACnC,MAAM,iBAAiB,CAAA"}
package/dist/index.js CHANGED
@@ -1,3 +1,4 @@
1
+ export { EntityRefPicker } from "./components/entity-ref-picker.js";
1
2
  export { ExternalRefDialog } from "./components/external-ref-dialog.js";
2
3
  export { ExternalRefsPage, ExternalRefsTab, } from "./components/external-refs-page.js";
3
4
  export { ExternalRefsUiMessagesProvider, externalRefsUiEn, externalRefsUiMessageDefinitions, externalRefsUiRo, getExternalRefsUiI18n, resolveExternalRefsUiMessages, useExternalRefsUiI18n, useExternalRefsUiI18nOrDefault, useExternalRefsUiMessages, useExternalRefsUiMessagesOrDefault, } from "./i18n/index.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@voyantjs/external-refs-ui",
3
- "version": "0.35.0",
3
+ "version": "0.37.0",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -46,11 +46,15 @@
46
46
  "react-dom": "^19.0.0",
47
47
  "react-hook-form": "^7.60.0",
48
48
  "zod": "^4.3.6",
49
- "@voyantjs/external-refs-react": "0.35.0",
50
- "@voyantjs/ui": "0.35.0"
49
+ "@voyantjs/bookings-ui": "0.37.0",
50
+ "@voyantjs/crm-ui": "0.37.0",
51
+ "@voyantjs/external-refs-react": "0.37.0",
52
+ "@voyantjs/products-ui": "0.37.0",
53
+ "@voyantjs/suppliers-ui": "0.37.0",
54
+ "@voyantjs/ui": "0.37.0"
51
55
  },
52
56
  "dependencies": {
53
- "@voyantjs/i18n": "0.35.0"
57
+ "@voyantjs/i18n": "0.37.0"
54
58
  },
55
59
  "devDependencies": {
56
60
  "@tanstack/react-query": "^5.96.2",
@@ -64,10 +68,14 @@
64
68
  "typescript": "^6.0.2",
65
69
  "vitest": "^4.1.2",
66
70
  "zod": "^4.3.6",
67
- "@voyantjs/external-refs-react": "0.35.0",
68
- "@voyantjs/i18n": "0.35.0",
71
+ "@voyantjs/bookings-ui": "0.37.0",
72
+ "@voyantjs/crm-ui": "0.37.0",
73
+ "@voyantjs/external-refs-react": "0.37.0",
74
+ "@voyantjs/i18n": "0.37.0",
75
+ "@voyantjs/products-ui": "0.37.0",
76
+ "@voyantjs/suppliers-ui": "0.37.0",
69
77
  "@voyantjs/voyant-typescript-config": "0.1.0",
70
- "@voyantjs/ui": "0.35.0"
78
+ "@voyantjs/ui": "0.37.0"
71
79
  },
72
80
  "files": [
73
81
  "dist",