@flowselections/floriday-authenticatie-module 1.0.6 → 1.0.8

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,2 @@
1
+ export declare function FlorydayConnectionPage(): import("react/jsx-runtime").JSX.Element;
2
+ //# sourceMappingURL=FlorydayConnectionPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FlorydayConnectionPage.d.ts","sourceRoot":"","sources":["../../../src/components/floriday/FlorydayConnectionPage.tsx"],"names":[],"mappings":"AAEA,wBAAgB,sBAAsB,4CAYrC"}
@@ -0,0 +1,5 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { FlorydaySettingsCard } from "../settings/FlorydaySettingsCard";
3
+ export function FlorydayConnectionPage() {
4
+ return (_jsxs("main", { className: "p-6 max-w-4xl mx-auto space-y-6", children: [_jsxs("div", { children: [_jsx("h1", { className: "text-2xl font-bold", children: "Floriday koppeling" }), _jsx("p", { className: "text-sm text-muted-foreground mt-1", children: "Verbind je Floriday-account om automatisch gegevens uit te wisselen met het platform." })] }), _jsx(FlorydaySettingsCard, {})] }));
5
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"FlorydaySettingsCard.d.ts","sourceRoot":"","sources":["../../../src/components/settings/FlorydaySettingsCard.tsx"],"names":[],"mappings":"AA4CA,wBAAgB,oBAAoB,4CAiHnC"}
1
+ {"version":3,"file":"FlorydaySettingsCard.d.ts","sourceRoot":"","sources":["../../../src/components/settings/FlorydaySettingsCard.tsx"],"names":[],"mappings":"AA4CA,wBAAgB,oBAAoB,4CAkHnC"}
@@ -20,7 +20,8 @@ export function FlorydaySettingsCard() {
20
20
  queryFn: () => getSettings(),
21
21
  });
22
22
  const activeEnv = settings?.active_environment ?? "staging";
23
- const activeConn = connections.find((c) => c.environment === activeEnv) ?? null;
23
+ const safeConnections = Array.isArray(connections) ? connections : [];
24
+ const activeConn = safeConnections.find((c) => c.environment === activeEnv) ?? null;
24
25
  const envMutation = useMutation({
25
26
  mutationFn: (env) => setEnv({ data: { environment: env } }),
26
27
  onMutate: async (env) => {
@@ -109,7 +110,9 @@ function PublishingSettings({ env, connection, }) {
109
110
  queryFn: () => listWarehouses({ data: { environment: env } }),
110
111
  enabled: Boolean(connection),
111
112
  });
112
- const warehouses = warehousesQuery.data && warehousesQuery.data.ok ? warehousesQuery.data.warehouses : [];
113
+ const warehouses = warehousesQuery.data?.ok && Array.isArray(warehousesQuery.data.warehouses)
114
+ ? warehousesQuery.data.warehouses
115
+ : [];
113
116
  const warehousesError = warehousesQuery.data && !warehousesQuery.data.ok ? warehousesQuery.data.error : null;
114
117
  // Auto-preselect het default-magazijn van Floriday wanneer de gebruiker
115
118
  // nog geen keuze heeft gemaakt.
@@ -1,6 +1,6 @@
1
1
  import type { FlowModule } from "@flowselections/core";
2
2
  export * from './_core-safelist';
3
- export * from './components/TemplatePage';
3
+ export { FlorydayConnectionPage } from './components/floriday/FlorydayConnectionPage';
4
4
  export * from './lib/floriday.functions';
5
5
  export declare const myModule: FlowModule;
6
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,cAAc,kBAAkB,CAAC;AACjC,cAAc,2BAA2B,CAAC;AAC1C,cAAc,0BAA0B,CAAC;AAEzC,eAAO,MAAM,QAAQ,EAAE,UActB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AAGvD,cAAc,kBAAkB,CAAC;AACjC,OAAO,EAAE,sBAAsB,EAAE,MAAM,8CAA8C,CAAC;AACtF,cAAc,0BAA0B,CAAC;AAEzC,eAAO,MAAM,QAAQ,EAAE,UActB,CAAC"}
package/dist-lib/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import { Plug } from "lucide-react";
2
2
  import { FlorydaySettingsCard } from "./components/settings/FlorydaySettingsCard";
3
3
  export * from './_core-safelist';
4
- export * from './components/TemplatePage';
4
+ export { FlorydayConnectionPage } from './components/floriday/FlorydayConnectionPage';
5
5
  export * from './lib/floriday.functions';
6
6
  export const myModule = {
7
7
  id: "floriday_connection",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flowselections/floriday-authenticatie-module",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "sideEffects": false,
5
5
  "type": "module",
6
6
  "main": "./dist-lib/index.js",