@fayz-ai/plugin-financial 0.30.0 → 0.30.1

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.
@@ -1 +1 @@
1
- {"version":3,"file":"OpenFinancePanel.d.ts","sourceRoot":"","sources":["../../src/components/OpenFinancePanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA0BzB,KAAK,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAAA;AAYlF,oFAAoF;AACpF,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,GAAG,MAAM,CAMpE;AAED,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,qBAqS3D"}
1
+ {"version":3,"file":"OpenFinancePanel.d.ts","sourceRoot":"","sources":["../../src/components/OpenFinancePanel.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAA;AA0BzB,KAAK,SAAS,GAAG,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,MAAM,CAAA;AAalF,oFAAoF;AACpF,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,CAAC,EAAE,SAAS,GAAG,MAAM,CAMpE;AAED,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,OAAO,CAAA;CAAE,qBAsS3D"}
package/dist/index.js CHANGED
@@ -7,7 +7,7 @@ import { FinancialContextProvider, useFinancialProvider, formatCurrency as forma
7
7
  import * as React3 from 'react';
8
8
  import React3__default, { useEffect } from 'react';
9
9
  import { Landmark, Loader2, CheckCircle2, Unplug, ExternalLink, CircleDollarSign, FileText, Wallet, ArrowUpRight, ArrowDownRight, AlertTriangle, EyeOff, Eye, CreditCard } from 'lucide-react';
10
- import { registerTranslations, tl, recordRailFields, RECORD_GROUP, activeFacet, lazyComponent, createConnectionStore, connectionSettings, connectionStatus, settingsStatus, connectionRuns, useTranslation, formatCurrency, resolveDataProvider, getSupabaseClientOptional, getActiveTenantId, getActiveUnitId, emitDataChanged, registerMessageDefaults, countByTenant, onAppPathChange, resolveCurrency } from '@fayz-ai/core';
10
+ import { registerTranslations, tl, recordRailFields, RECORD_GROUP, activeFacet, lazyComponent, createConnectionStore, connectionSettings, connectionStatus, settingsStatus, connectionRuns, useTranslation, formatCurrency, formatDate, formatDateTime, resolveDataProvider, getSupabaseClientOptional, getActiveTenantId, getActiveUnitId, emitDataChanged, registerMessageDefaults, countByTenant, onAppPathChange, resolveCurrency } from '@fayz-ai/core';
11
11
  import { Card, CardHeader, CardTitle, CardDescription, CardContent, Button, Input, ConfirmDialog, Badge, ModalTask, toast, SegmentedControl, TreeManager, Select, SelectTrigger, SelectValue, SelectContent, SelectItem, SearchSelect, defineKpiWidget, defineChartWidget, defineCustomWidget, defineTableWidget, Modal, ModalContent, ModalHeader, ModalTitle, ModalDescription, ModalBody, KpiCard, ChartWidget, TableWidget, useDashboardNavigate, GoldCard } from '@fayz-ai/ui';
12
12
  import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
13
13
  import { createSafeFinancialProvider, createFinancialStore } from '@fayz-ai/financial/store';
@@ -3733,8 +3733,8 @@ var TONE = {
3733
3733
  warning: "text-amber-600 dark:text-amber-500",
3734
3734
  error: "text-destructive"
3735
3735
  };
3736
- var when = (iso2) => iso2 ? new Date(iso2).toLocaleString(void 0, { dateStyle: "short", timeStyle: "short" }) : null;
3737
- var day = (iso2) => iso2 ? new Date(iso2).toLocaleDateString() : null;
3736
+ var when = (iso2) => iso2 ? formatDateTime(iso2) : null;
3737
+ var day = (iso2) => iso2 ? formatDate(iso2) : null;
3738
3738
  function refusalSentence(error, t) {
3739
3739
  if (error instanceof ConnectionError && error.code === "rate_limited" && error.details.retryAt) {
3740
3740
  const at = when(error.details.retryAt);
@@ -3895,7 +3895,7 @@ function OpenFinancePanel({ item }) {
3895
3895
  panel.note && /* @__PURE__ */ jsx("p", { className: "text-sm text-muted-foreground", children: t(panel.note) })
3896
3896
  ] }),
3897
3897
  view.state === "active" && /* @__PURE__ */ jsxs("dl", { className: "grid grid-cols-1 gap-x-6 gap-y-2 text-sm sm:grid-cols-2", children: [
3898
- view.since && /* @__PURE__ */ jsx(Detail, { label: t("financial.openFinance.since"), value: day(view.since) }),
3898
+ view.since && !view.adopted && /* @__PURE__ */ jsx(Detail, { label: t("financial.openFinance.since"), value: day(view.since) }),
3899
3899
  /* @__PURE__ */ jsx(
3900
3900
  Detail,
3901
3901
  {