From f4d6ed3f8a75cdf2557e7ba5aad99ac280e27b20 Mon Sep 17 00:00:00 2001 From: Henning Perl Date: Thu, 7 Mar 2024 09:32:38 +0100 Subject: [PATCH] fix exports (#185) --- src/markup.ts | 1 + src/react.ts | 1 + src/ui/index.test.ts | 10 ++++++++-- src/ui/index.ts | 4 +--- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/markup.ts b/src/markup.ts index 4ad1cb823..7b5a76003 100644 --- a/src/markup.ts +++ b/src/markup.ts @@ -5,4 +5,5 @@ export * from "./common" export * from "./markup-components" export * from "./react-components/ory/helpers/types" export * from "./theme" +export * from "./ui" export * as locales from "./locales" diff --git a/src/react.ts b/src/react.ts index f5c38c2b2..abb8c39c6 100644 --- a/src/react.ts +++ b/src/react.ts @@ -1,6 +1,7 @@ // Copyright © 2023 Ory Corp // SPDX-License-Identifier: Apache-2.0 +export * from "./ui" export * from "./common" export * from "./react-components" export * from "./react-components/ory/helpers/types" diff --git a/src/ui/index.test.ts b/src/ui/index.test.ts index 1fbc488aa..d6d396cdf 100644 --- a/src/ui/index.test.ts +++ b/src/ui/index.test.ts @@ -2,7 +2,11 @@ // SPDX-License-Identifier: Apache-2.0 import { UiNode } from "@ory/client" -import { filterNodesByGroups, FilterNodesByGroups, getNodeLabel } from "./index" +import { + filterNodesByGroups, + FilterNodesByGroups, + getNodeLabelText, +} from "./index" import nodes from "./fixtures/nodes.json" describe("generic helpers", () => { @@ -313,6 +317,8 @@ describe("generic helpers", () => { }) test("getNodeLabel", () => { - expect((nodes as unknown as UiNode[]).map(getNodeLabel)).toMatchSnapshot() + expect( + (nodes as unknown as UiNode[]).map(getNodeLabelText), + ).toMatchSnapshot() }) }) diff --git a/src/ui/index.ts b/src/ui/index.ts index 971efd71b..c86286df3 100644 --- a/src/ui/index.ts +++ b/src/ui/index.ts @@ -5,10 +5,8 @@ import type { UiNode, UiNodeAnchorAttributes, UiNodeAttributes, - UiNodeGroupEnum, UiNodeImageAttributes, UiNodeInputAttributes, - UiNodeInputAttributesTypeEnum, UiNodeScriptAttributes, UiNodeTextAttributes, } from "@ory/client" @@ -19,7 +17,7 @@ import type { * @param node * @return label */ -export const getNodeLabel = (node: UiNode): string => { +export const getNodeLabelText = (node: UiNode): string => { const attributes = node.attributes if (isUiNodeAnchorAttributes(attributes)) { return attributes.title.text