@burdenoff/microfe-proserviceworld 2026.706.3 → 2026.709.2

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.
Files changed (119) hide show
  1. package/dist/dev/main.d.ts +2 -0
  2. package/dist/dev/main.d.ts.map +1 -0
  3. package/dist/generated/global-operations.d.ts +2 -0
  4. package/dist/generated/global-operations.d.ts.map +1 -0
  5. package/dist/generated/global-types.d.ts +18199 -0
  6. package/dist/generated/global-types.d.ts.map +1 -0
  7. package/dist/generated/wspace-operations.d.ts +2 -0
  8. package/dist/generated/wspace-operations.d.ts.map +1 -0
  9. package/dist/generated/wspace-types.d.ts +43046 -0
  10. package/dist/generated/wspace-types.d.ts.map +1 -0
  11. package/dist/index.d.ts +2 -0
  12. package/dist/index.d.ts.map +1 -0
  13. package/dist/index.js +3 -1
  14. package/dist/proserviceworld/ProServiceWorldRoot.d.ts +5 -0
  15. package/dist/proserviceworld/ProServiceWorldRoot.d.ts.map +1 -0
  16. package/dist/proserviceworld/ProServiceWorldRoutes.d.ts +2 -0
  17. package/dist/proserviceworld/ProServiceWorldRoutes.d.ts.map +1 -0
  18. package/dist/proserviceworld/ProServiceWorldRoutes.js +95 -42
  19. package/dist/proserviceworld/ProServiceWorldRoutes.js.map +1 -1
  20. package/dist/proserviceworld/components/DiscussionThread.d.ts +12 -0
  21. package/dist/proserviceworld/components/DiscussionThread.d.ts.map +1 -0
  22. package/dist/proserviceworld/components/FeatureFlaggedPage.d.ts +8 -0
  23. package/dist/proserviceworld/components/FeatureFlaggedPage.d.ts.map +1 -0
  24. package/dist/proserviceworld/components/FeatureFlaggedPage.js +17 -0
  25. package/dist/proserviceworld/components/FeatureFlaggedPage.js.map +1 -0
  26. package/dist/proserviceworld/components/LoadMore.d.ts +12 -0
  27. package/dist/proserviceworld/components/LoadMore.d.ts.map +1 -0
  28. package/dist/proserviceworld/components/LoadMore.js +30 -0
  29. package/dist/proserviceworld/components/LoadMore.js.map +1 -0
  30. package/dist/proserviceworld/components/TagPicker.d.ts +11 -0
  31. package/dist/proserviceworld/components/TagPicker.d.ts.map +1 -0
  32. package/dist/proserviceworld/components/TagPicker.js +31 -0
  33. package/dist/proserviceworld/components/TagPicker.js.map +1 -0
  34. package/dist/proserviceworld/components/ui.d.ts +82 -0
  35. package/dist/proserviceworld/components/ui.d.ts.map +1 -0
  36. package/dist/proserviceworld/hooks/useAnalytics.d.ts +18 -0
  37. package/dist/proserviceworld/hooks/useAnalytics.d.ts.map +1 -0
  38. package/dist/proserviceworld/hooks/useAnalytics.js +21 -0
  39. package/dist/proserviceworld/hooks/useAnalytics.js.map +1 -0
  40. package/dist/proserviceworld/hooks/useEntityComments.d.ts +27 -0
  41. package/dist/proserviceworld/hooks/useEntityComments.d.ts.map +1 -0
  42. package/dist/proserviceworld/hooks/useFiles.d.ts +23 -0
  43. package/dist/proserviceworld/hooks/useFiles.d.ts.map +1 -0
  44. package/dist/proserviceworld/hooks/usePageViewAnalytics.d.ts +10 -0
  45. package/dist/proserviceworld/hooks/usePageViewAnalytics.d.ts.map +1 -0
  46. package/dist/proserviceworld/hooks/usePageViewAnalytics.js +24 -0
  47. package/dist/proserviceworld/hooks/usePageViewAnalytics.js.map +1 -0
  48. package/dist/proserviceworld/hooks/useProServiceWorldApi.d.ts +351 -0
  49. package/dist/proserviceworld/hooks/useProServiceWorldApi.d.ts.map +1 -0
  50. package/dist/proserviceworld/hooks/useProServiceWorldApi.js +47 -27
  51. package/dist/proserviceworld/hooks/useProServiceWorldApi.js.map +1 -1
  52. package/dist/proserviceworld/i18n/index.d.ts +13 -0
  53. package/dist/proserviceworld/i18n/index.d.ts.map +1 -0
  54. package/dist/proserviceworld/i18n/index.js +171 -0
  55. package/dist/proserviceworld/i18n/index.js.map +1 -0
  56. package/dist/proserviceworld/index.d.ts +6 -0
  57. package/dist/proserviceworld/index.d.ts.map +1 -0
  58. package/dist/proserviceworld/index.js +2 -0
  59. package/dist/proserviceworld/pages/AnalyticsPage.d.ts +4 -0
  60. package/dist/proserviceworld/pages/AnalyticsPage.d.ts.map +1 -0
  61. package/dist/proserviceworld/pages/ClientDetailPage.d.ts +4 -0
  62. package/dist/proserviceworld/pages/ClientDetailPage.d.ts.map +1 -0
  63. package/dist/proserviceworld/pages/ClientsPage.d.ts +9 -0
  64. package/dist/proserviceworld/pages/ClientsPage.d.ts.map +1 -0
  65. package/dist/proserviceworld/pages/ClientsPage.js +218 -155
  66. package/dist/proserviceworld/pages/ClientsPage.js.map +1 -1
  67. package/dist/proserviceworld/pages/CompliancePage.d.ts +4 -0
  68. package/dist/proserviceworld/pages/CompliancePage.d.ts.map +1 -0
  69. package/dist/proserviceworld/pages/ConflictsPage.d.ts +4 -0
  70. package/dist/proserviceworld/pages/ConflictsPage.d.ts.map +1 -0
  71. package/dist/proserviceworld/pages/DashboardPage.d.ts +4 -0
  72. package/dist/proserviceworld/pages/DashboardPage.d.ts.map +1 -0
  73. package/dist/proserviceworld/pages/DocumentsPage.d.ts +4 -0
  74. package/dist/proserviceworld/pages/DocumentsPage.d.ts.map +1 -0
  75. package/dist/proserviceworld/pages/EngagementDetailPage.d.ts +4 -0
  76. package/dist/proserviceworld/pages/EngagementDetailPage.d.ts.map +1 -0
  77. package/dist/proserviceworld/pages/EngagementDetailPage.js +162 -156
  78. package/dist/proserviceworld/pages/EngagementDetailPage.js.map +1 -1
  79. package/dist/proserviceworld/pages/EngagementsPage.d.ts +4 -0
  80. package/dist/proserviceworld/pages/EngagementsPage.d.ts.map +1 -0
  81. package/dist/proserviceworld/pages/EngagementsPage.js +201 -140
  82. package/dist/proserviceworld/pages/EngagementsPage.js.map +1 -1
  83. package/dist/proserviceworld/pages/InvoicesPage.d.ts +4 -0
  84. package/dist/proserviceworld/pages/InvoicesPage.d.ts.map +1 -0
  85. package/dist/proserviceworld/pages/MattersPage.d.ts +4 -0
  86. package/dist/proserviceworld/pages/MattersPage.d.ts.map +1 -0
  87. package/dist/proserviceworld/pages/MattersPage.js +212 -158
  88. package/dist/proserviceworld/pages/MattersPage.js.map +1 -1
  89. package/dist/proserviceworld/pages/PracticeAreasPage.d.ts +4 -0
  90. package/dist/proserviceworld/pages/PracticeAreasPage.d.ts.map +1 -0
  91. package/dist/proserviceworld/pages/TimePage.d.ts +4 -0
  92. package/dist/proserviceworld/pages/TimePage.d.ts.map +1 -0
  93. package/dist/proserviceworld/providers/ProServiceWorldProvider.d.ts +6 -0
  94. package/dist/proserviceworld/providers/ProServiceWorldProvider.d.ts.map +1 -0
  95. package/dist/proserviceworld/services/assistantApi.d.ts +74 -0
  96. package/dist/proserviceworld/services/assistantApi.d.ts.map +1 -0
  97. package/dist/proserviceworld/services/assistantApi.js +203 -0
  98. package/dist/proserviceworld/services/assistantApi.js.map +1 -0
  99. package/dist/proserviceworld/services/createSandboxAssistantTransport.d.ts +28 -0
  100. package/dist/proserviceworld/services/createSandboxAssistantTransport.d.ts.map +1 -0
  101. package/dist/proserviceworld/services/createSandboxAssistantTransport.js +120 -0
  102. package/dist/proserviceworld/services/createSandboxAssistantTransport.js.map +1 -0
  103. package/dist/proserviceworld/types/index.d.ts +57 -0
  104. package/dist/proserviceworld/types/index.d.ts.map +1 -0
  105. package/dist/proserviceworld/utils/cn.d.ts +4 -0
  106. package/dist/proserviceworld/utils/cn.d.ts.map +1 -0
  107. package/dist/proserviceworld/utils/native.d.ts +23 -0
  108. package/dist/proserviceworld/utils/native.d.ts.map +1 -0
  109. package/dist/proserviceworld/utils/native.js +14 -0
  110. package/dist/proserviceworld/utils/native.js.map +1 -0
  111. package/dist/proserviceworld/utils/nav.d.ts +6 -0
  112. package/dist/proserviceworld/utils/nav.d.ts.map +1 -0
  113. package/dist/proserviceworld/utils/navigation.d.ts +2 -0
  114. package/dist/proserviceworld/utils/navigation.d.ts.map +1 -0
  115. package/dist/proserviceworld/utils/pageContext.d.ts +12 -0
  116. package/dist/proserviceworld/utils/pageContext.d.ts.map +1 -0
  117. package/dist/proserviceworld/utils/pageContext.js +74 -0
  118. package/dist/proserviceworld/utils/pageContext.js.map +1 -0
  119. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../../src/proserviceworld/i18n/index.ts"],"sourcesContent":["/**\n * ProServiceWorld MFE local i18n.\n *\n * The host app shell owns the global I18nProvider and product translations.\n * This lightweight module provides fallback translations for MFE-owned UI\n * strings (page titles, empty states, form labels) so the MFE can be mounted\n * standalone (dev harness, tests) and still render in all supported locales.\n * When running inside the shell, the shell's `useI18n` translations take\n * precedence via the `t` helper below.\n */\n\nexport type SupportedLocale = 'en' | 'es' | 'hi' | 'ta' | 'zh' | 'ar';\n\nconst translations: Record<SupportedLocale, Record<string, string>> = {\n en: {\n 'psw.clients.title': 'Clients',\n 'psw.clients.subtitle': 'Every person or organization your firm serves.',\n 'psw.clients.emptyTitle': 'No clients yet',\n 'psw.clients.emptyDescription':\n 'Add your first client to start scoping engagements and matters.',\n 'psw.clients.new': 'New client',\n 'psw.clients.searchPlaceholder': 'Search clients…',\n 'psw.clients.allStatuses': 'All statuses',\n 'psw.common.loading': 'Loading…',\n 'psw.common.retry': 'Retry',\n 'psw.common.cancel': 'Cancel',\n 'psw.common.save': 'Save',\n 'psw.common.create': 'Create',\n 'psw.common.edit': 'Edit',\n 'psw.common.archive': 'Archive',\n 'psw.common.actions': 'Actions',\n 'psw.common.name': 'Name',\n 'psw.common.status': 'Status',\n 'psw.common.type': 'Type',\n 'psw.common.added': 'Added',\n 'psw.common.loadMore': 'Load more',\n 'psw.common.showing': 'Showing',\n 'psw.common.of': 'of',\n 'psw.tags.title': 'Tags',\n 'psw.tags.add': 'Add tag',\n },\n es: {\n 'psw.clients.title': 'Clientes',\n 'psw.clients.subtitle': 'Toda persona u organización que atiende su firma.',\n 'psw.clients.emptyTitle': 'Aún no hay clientes',\n 'psw.clients.emptyDescription':\n 'Agregue su primer cliente para comenzar a definir compromisos y asuntos.',\n 'psw.clients.new': 'Nuevo cliente',\n 'psw.clients.searchPlaceholder': 'Buscar clientes…',\n 'psw.clients.allStatuses': 'Todos los estados',\n 'psw.common.loading': 'Cargando…',\n 'psw.common.retry': 'Reintentar',\n 'psw.common.cancel': 'Cancelar',\n 'psw.common.save': 'Guardar',\n 'psw.common.create': 'Crear',\n 'psw.common.edit': 'Editar',\n 'psw.common.archive': 'Archivar',\n 'psw.common.actions': 'Acciones',\n 'psw.common.name': 'Nombre',\n 'psw.common.status': 'Estado',\n 'psw.common.type': 'Tipo',\n 'psw.common.added': 'Añadido',\n 'psw.common.loadMore': 'Cargar más',\n 'psw.common.showing': 'Mostrando',\n 'psw.common.of': 'de',\n 'psw.tags.title': 'Etiquetas',\n 'psw.tags.add': 'Agregar etiqueta',\n },\n hi: {\n 'psw.clients.title': 'ग्राहक',\n 'psw.clients.subtitle': 'हर व्यक्ति या संगठन जिसे आपकी फर्म सेवा देती है।',\n 'psw.clients.emptyTitle': 'अभी तक कोई ग्राहक नहीं',\n 'psw.clients.emptyDescription':\n 'समझौते और मामलों का दायरा तय करना शुरू करने के लिए अपना पहला ग्राहक जोड़ें।',\n 'psw.clients.new': 'नया ग्राहक',\n 'psw.clients.searchPlaceholder': 'ग्राहक खोजें…',\n 'psw.clients.allStatuses': 'सभी स्थिति',\n 'psw.common.loading': 'लोड हो रहा है…',\n 'psw.common.retry': 'पुनः प्रयास करें',\n 'psw.common.cancel': 'रद्द करें',\n 'psw.common.save': 'सहेजें',\n 'psw.common.create': 'बनाएं',\n 'psw.common.edit': 'संपादित करें',\n 'psw.common.archive': 'संग्रहीत करें',\n 'psw.common.actions': 'कार्रवाइयाँ',\n 'psw.common.name': 'नाम',\n 'psw.common.status': 'स्थिति',\n 'psw.common.type': 'प्रकार',\n 'psw.common.added': 'जोड़ा गया',\n 'psw.common.loadMore': 'और लोड करें',\n 'psw.common.showing': 'दिखा रहा है',\n 'psw.common.of': 'में से',\n 'psw.tags.title': 'टैग',\n 'psw.tags.add': 'टैग जोड़ें',\n },\n ta: {\n 'psw.clients.title': 'வாடிக்கையாளர்கள்',\n 'psw.clients.subtitle': 'உங்கள் நிறுவனம் சேவை செய்யும் ஒவ்வொரு நபரும் அல்லது நிறுவனமும்.',\n 'psw.clients.emptyTitle': 'இன்னும் வாடிக்கையாளர்கள் இல்லை',\n 'psw.clients.emptyDescription':\n 'உறுதிமொழிகள் மற்றும் விவகாரங்களை வரையறுக்க முதல் வாடிக்கையாளரைச் சேர்க்கவும்.',\n 'psw.clients.new': 'புதிய வாடிக்கையாளர்',\n 'psw.clients.searchPlaceholder': 'வாடிக்கையாளர்களைத் தேடு…',\n 'psw.clients.allStatuses': 'அனைத்து நிலைகள்',\n 'psw.common.loading': 'ஏற்றுகிறது…',\n 'psw.common.retry': 'மீண்டும் முயற்சி',\n 'psw.common.cancel': 'ரத்து',\n 'psw.common.save': 'சேமி',\n 'psw.common.create': 'உருவாக்கு',\n 'psw.common.edit': 'திருத்து',\n 'psw.common.archive': 'காப்பகம்',\n 'psw.common.actions': 'செயல்கள்',\n 'psw.common.name': 'பெயர்',\n 'psw.common.status': 'நிலை',\n 'psw.common.type': 'வகை',\n 'psw.common.added': 'சேர்க்கப்பட்டது',\n 'psw.common.loadMore': 'மேலும் ஏற்று',\n 'psw.common.showing': 'காட்டுகிறது',\n 'psw.common.of': 'இல்',\n 'psw.tags.title': 'குறிச்சொற்கள்',\n 'psw.tags.add': 'குறிச்சொல் சேர்',\n },\n zh: {\n 'psw.clients.title': '客户',\n 'psw.clients.subtitle': '贵公司服务的每一个人或组织。',\n 'psw.clients.emptyTitle': '暂无客户',\n 'psw.clients.emptyDescription': '添加您的第一个客户,开始确定业务和事项范围。',\n 'psw.clients.new': '新建客户',\n 'psw.clients.searchPlaceholder': '搜索客户…',\n 'psw.clients.allStatuses': '全部状态',\n 'psw.common.loading': '加载中…',\n 'psw.common.retry': '重试',\n 'psw.common.cancel': '取消',\n 'psw.common.save': '保存',\n 'psw.common.create': '创建',\n 'psw.common.edit': '编辑',\n 'psw.common.archive': '归档',\n 'psw.common.actions': '操作',\n 'psw.common.name': '名称',\n 'psw.common.status': '状态',\n 'psw.common.type': '类型',\n 'psw.common.added': '添加时间',\n 'psw.common.loadMore': '加载更多',\n 'psw.common.showing': '显示',\n 'psw.common.of': '共',\n 'psw.tags.title': '标签',\n 'psw.tags.add': '添加标签',\n },\n ar: {\n 'psw.clients.title': 'العملاء',\n 'psw.clients.subtitle': 'كل شخص أو مؤسسة تخدمها شركتك.',\n 'psw.clients.emptyTitle': 'لا يوجد عملاء بعد',\n 'psw.clients.emptyDescription': 'أضف عميلك الأول لبدء تحديد نطاق الالتزامات والقضايا.',\n 'psw.clients.new': 'عميل جديد',\n 'psw.clients.searchPlaceholder': 'البحث في العملاء…',\n 'psw.clients.allStatuses': 'جميع الحالات',\n 'psw.common.loading': 'جارٍ التحميل…',\n 'psw.common.retry': 'إعادة المحاولة',\n 'psw.common.cancel': 'إلغاء',\n 'psw.common.save': 'حفظ',\n 'psw.common.create': 'إنشاء',\n 'psw.common.edit': 'تعديل',\n 'psw.common.archive': 'أرشفة',\n 'psw.common.actions': 'إجراءات',\n 'psw.common.name': 'الاسم',\n 'psw.common.status': 'الحالة',\n 'psw.common.type': 'النوع',\n 'psw.common.added': 'تاريخ الإضافة',\n 'psw.common.loadMore': 'تحميل المزيد',\n 'psw.common.showing': 'عرض',\n 'psw.common.of': 'من',\n 'psw.tags.title': 'الوسوم',\n 'psw.tags.add': 'إضافة وسم',\n },\n};\n\nfunction detectLocale(): SupportedLocale {\n if (typeof navigator === 'undefined') return 'en';\n const code = (navigator.language ?? 'en').split('-')[0].toLowerCase();\n if (code in translations) return code as SupportedLocale;\n return 'en';\n}\n\nexport function t(key: string, fallback?: string, locale?: SupportedLocale): string {\n const loc = locale ?? detectLocale();\n return translations[loc]?.[key] ?? translations.en[key] ?? fallback ?? key;\n}\n"],"mappings":"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"}
@@ -0,0 +1,6 @@
1
+ export { ProServiceWorldRoot } from './ProServiceWorldRoot';
2
+ export type { ProServiceWorldRootProps, NavItem, FooterItem } from './types';
3
+ export { useProServiceWorld } from './providers/ProServiceWorldProvider';
4
+ export { useSandboxAssistantTransport } from './services/createSandboxAssistantTransport';
5
+ export { t } from './i18n';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/proserviceworld/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,YAAY,EAAE,wBAAwB,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC7E,OAAO,EAAE,kBAAkB,EAAE,MAAM,qCAAqC,CAAC;AACzE,OAAO,EAAE,4BAA4B,EAAE,MAAM,4CAA4C,CAAC;AAC1F,OAAO,EAAE,CAAC,EAAE,MAAM,QAAQ,CAAC"}
@@ -1,2 +1,4 @@
1
1
  import "./providers/ProServiceWorldProvider.js";
2
2
  import "./ProServiceWorldRoot.js";
3
+ import "./services/createSandboxAssistantTransport.js";
4
+ import "./i18n/index.js";
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+
3
+ export declare const AnalyticsPage: FC;
4
+ //# sourceMappingURL=AnalyticsPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AnalyticsPage.d.ts","sourceRoot":"","sources":["../../../src/proserviceworld/pages/AnalyticsPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAehC,eAAO,MAAM,aAAa,EAAE,EA6G3B,CAAC"}
@@ -0,0 +1,4 @@
1
+ import { FC } from 'react';
2
+
3
+ export declare const ClientDetailPage: FC;
4
+ //# sourceMappingURL=ClientDetailPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientDetailPage.d.ts","sourceRoot":"","sources":["../../../src/proserviceworld/pages/ClientDetailPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AAsDhC,eAAO,MAAM,gBAAgB,EAAE,EA2P9B,CAAC"}
@@ -0,0 +1,9 @@
1
+ import { FC } from 'react';
2
+
3
+ /** Tinted initials avatar (semantic tokens only). */
4
+ export declare const Avatar: FC<{
5
+ name: string;
6
+ className?: string;
7
+ }>;
8
+ export declare const ClientsPage: FC;
9
+ //# sourceMappingURL=ClientsPage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClientsPage.d.ts","sourceRoot":"","sources":["../../../src/proserviceworld/pages/ClientsPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,EAAE,MAAM,OAAO,CAAC;AA2DhC,qDAAqD;AACrD,eAAO,MAAM,MAAM,EAAE,EAAE,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,SAAS,CAAC,EAAE,MAAM,CAAA;CAAE,CAU3D,CAAC;AAyBF,eAAO,MAAM,WAAW,EAAE,EAwNzB,CAAC"}
@@ -2,21 +2,26 @@ import { useArchiveClient as e, useClients as t, useCreateClient as n, useUpdate
2
2
  import { useNav as i } from "../utils/nav.js";
3
3
  import { cn as a } from "../utils/cn.js";
4
4
  import { Banner as o, Empty as s, ErrorState as c, Field as l, LoadingBlock as u, Modal as d, NativeSelect as f, PageHeader as p, SectionCard as m, StatusPill as h, TableWrap as g, Td as _, TextArea as v, TextInput as y, Th as b, enumOptions as x, fmtDate as S } from "../components/ui.js";
5
- import { useMemo as C, useState as w } from "react";
6
- import { Archive as T, Building2 as E, ChevronRight as D, Pencil as O, Plus as k, Search as A, User as j, Users as M } from "lucide-react";
7
- import { Fragment as N, jsx as P, jsxs as F } from "react/jsx-runtime";
8
- import { Button as I } from "@burdenoff/fe-libs/ui";
5
+ import { t as C } from "../i18n/index.js";
6
+ import { useAnalytics as w } from "../hooks/useAnalytics.js";
7
+ import { impactFeedback as T } from "../utils/native.js";
8
+ import { TagPicker as E } from "../components/TagPicker.js";
9
+ import { LoadMore as D } from "../components/LoadMore.js";
10
+ import { useMemo as O, useState as k } from "react";
11
+ import { Archive as A, Building2 as ee, ChevronRight as te, Pencil as ne, Plus as j, Search as M, User as N, Users as P } from "lucide-react";
12
+ import { Fragment as F, jsx as I, jsxs as L } from "react/jsx-runtime";
13
+ import { Button as R } from "@burdenoff/fe-libs/ui";
9
14
  //#region src/proserviceworld/pages/ClientsPage.tsx
10
- var L = ["ORGANIZATION", "INDIVIDUAL"], R = [
15
+ var z = ["ORGANIZATION", "INDIVIDUAL"], B = [
11
16
  "PROSPECT",
12
17
  "ACTIVE",
13
18
  "INACTIVE",
14
19
  "ARCHIVED"
15
- ], z = (e) => e.split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0]?.toUpperCase() ?? "").join("") || "?", B = ({ name: e, className: t }) => /* @__PURE__ */ P("span", {
20
+ ], V = (e) => e.split(/\s+/).filter(Boolean).slice(0, 2).map((e) => e[0]?.toUpperCase() ?? "").join("") || "?", H = ({ name: e, className: t }) => /* @__PURE__ */ I("span", {
16
21
  className: a("flex h-9 w-9 shrink-0 items-center justify-center rounded-full bg-accent/10 text-xs font-semibold text-accent ring-1 ring-inset ring-accent/15", t),
17
22
  "aria-hidden": !0,
18
- children: z(e)
19
- }), V = {
23
+ children: V(e)
24
+ }), U = {
20
25
  name: "",
21
26
  type: "ORGANIZATION",
22
27
  status: "PROSPECT",
@@ -25,116 +30,163 @@ var L = ["ORGANIZATION", "INDIVIDUAL"], R = [
25
30
  contactEmail: "",
26
31
  contactPhone: "",
27
32
  notes: ""
28
- }, H = () => {
29
- let e = i(), [n, r] = w(""), [a, l] = w(""), [d, v] = w(null), [C, T] = w(!1), [N, L] = w(null), { data: z, isLoading: V, error: H, refetch: G } = t({
30
- search: n.trim() || void 0,
31
- status: a || void 0
32
- });
33
- return /* @__PURE__ */ F("div", {
33
+ }, W = 25, G = () => {
34
+ let e = i(), { emitIntent: n, emitFact: a } = w(), [l, d] = k(""), [v, A] = k(""), [F, z] = k(null), [V, U] = k(!1), [G, q] = k(null), [ie, J] = k({
35
+ limit: W,
36
+ offset: 0
37
+ }), { data: Y, isLoading: X, error: Z, refetch: Q } = t({
38
+ search: l.trim() || void 0,
39
+ status: v || void 0,
40
+ pagination: ie
41
+ }), ae = r(), $ = O(() => Y?.items ?? [], [Y]);
42
+ return /* @__PURE__ */ L("div", {
34
43
  className: "space-y-6",
35
44
  children: [
36
- /* @__PURE__ */ P(p, {
37
- title: "Clients",
38
- subtitle: "Every person or organization your firm serves — the record engagements, matters, documents and invoices hang off.",
39
- icon: /* @__PURE__ */ P(M, { className: "h-6 w-6" }),
40
- actions: /* @__PURE__ */ F(I, {
41
- onClick: () => T(!0),
42
- children: [/* @__PURE__ */ P(k, { className: "mr-1.5 h-4 w-4" }), " New client"]
45
+ /* @__PURE__ */ I(p, {
46
+ title: C("psw.clients.title"),
47
+ subtitle: C("psw.clients.subtitle"),
48
+ icon: /* @__PURE__ */ I(P, { className: "h-6 w-6" }),
49
+ actions: /* @__PURE__ */ L(R, {
50
+ onClick: () => {
51
+ T("light"), n("psw.client.create_clicked"), U(!0);
52
+ },
53
+ children: [
54
+ /* @__PURE__ */ I(j, { className: "mr-1.5 h-4 w-4" }),
55
+ " ",
56
+ C("psw.clients.new")
57
+ ]
43
58
  })
44
59
  }),
45
- N && /* @__PURE__ */ P(o, {
46
- tone: N.tone,
47
- onClose: () => L(null),
48
- children: N.text
60
+ G && /* @__PURE__ */ I(o, {
61
+ tone: G.tone,
62
+ onClose: () => q(null),
63
+ children: G.text
49
64
  }),
50
- /* @__PURE__ */ F("div", {
65
+ /* @__PURE__ */ L("div", {
51
66
  className: "flex flex-col gap-2 sm:flex-row sm:items-center",
52
- children: [/* @__PURE__ */ F("div", {
67
+ children: [/* @__PURE__ */ L("div", {
53
68
  className: "relative flex-1",
54
- children: [/* @__PURE__ */ P(A, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-tertiary" }), /* @__PURE__ */ P(y, {
55
- placeholder: "Search clients…",
56
- value: n,
57
- onChange: (e) => r(e.target.value),
69
+ children: [/* @__PURE__ */ I(M, { className: "pointer-events-none absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2 text-text-tertiary" }), /* @__PURE__ */ I(y, {
70
+ placeholder: C("psw.clients.searchPlaceholder"),
71
+ value: l,
72
+ onChange: (e) => {
73
+ d(e.target.value), J({
74
+ limit: W,
75
+ offset: 0
76
+ });
77
+ },
78
+ onKeyDown: (e) => {
79
+ e.key === "Enter" && l.trim() && a("psw.search.performed", {
80
+ entityType: "client",
81
+ queryLength: l.trim().length
82
+ });
83
+ },
58
84
  className: "pl-9"
59
85
  })]
60
- }), /* @__PURE__ */ F(f, {
61
- value: a,
62
- onChange: (e) => l(e.target.value),
86
+ }), /* @__PURE__ */ L(f, {
87
+ value: v,
88
+ onChange: (e) => {
89
+ A(e.target.value), J({
90
+ limit: W,
91
+ offset: 0
92
+ });
93
+ },
63
94
  className: "sm:w-48",
64
- children: [/* @__PURE__ */ P("option", {
95
+ children: [/* @__PURE__ */ I("option", {
65
96
  value: "",
66
- children: "All statuses"
67
- }), x(R)]
97
+ children: C("psw.clients.allStatuses")
98
+ }), x(B)]
68
99
  })]
69
100
  }),
70
- V ? /* @__PURE__ */ P(u, {}) : H ? /* @__PURE__ */ P(c, {
71
- error: H,
72
- onRetry: () => void G()
73
- }) : !z || z.items.length === 0 ? /* @__PURE__ */ P(s, {
74
- title: "No clients yet",
75
- description: "Add your first client to start scoping engagements and matters.",
76
- icon: /* @__PURE__ */ P(M, { className: "h-8 w-8" }),
77
- action: /* @__PURE__ */ F(I, {
78
- onClick: () => T(!0),
79
- children: [/* @__PURE__ */ P(k, { className: "mr-1.5 h-4 w-4" }), " New client"]
101
+ X ? /* @__PURE__ */ I(u, {}) : Z ? /* @__PURE__ */ I(c, {
102
+ error: Z,
103
+ onRetry: () => void Q()
104
+ }) : !Y || Y.items.length === 0 ? /* @__PURE__ */ I(s, {
105
+ title: C("psw.clients.emptyTitle"),
106
+ description: C("psw.clients.emptyDescription"),
107
+ icon: /* @__PURE__ */ I(P, { className: "h-8 w-8" }),
108
+ action: /* @__PURE__ */ L(R, {
109
+ onClick: () => U(!0),
110
+ children: [
111
+ /* @__PURE__ */ I(j, { className: "mr-1.5 h-4 w-4" }),
112
+ " ",
113
+ C("psw.clients.new")
114
+ ]
80
115
  })
81
- }) : /* @__PURE__ */ P(m, {
82
- title: `${z.totalCount} client${z.totalCount === 1 ? "" : "s"}`,
83
- children: /* @__PURE__ */ F(g, { children: [/* @__PURE__ */ P("thead", { children: /* @__PURE__ */ F("tr", { children: [
84
- /* @__PURE__ */ P(b, { children: "Name" }),
85
- /* @__PURE__ */ P(b, { children: "Type" }),
86
- /* @__PURE__ */ P(b, { children: "Industry" }),
87
- /* @__PURE__ */ P(b, { children: "Status" }),
88
- /* @__PURE__ */ P(b, { children: "Added" }),
89
- /* @__PURE__ */ P(b, {
116
+ }) : /* @__PURE__ */ L(m, {
117
+ title: `${Y.totalCount} client${Y.totalCount === 1 ? "" : "s"}`,
118
+ children: [/* @__PURE__ */ L(g, { children: [/* @__PURE__ */ I("thead", { children: /* @__PURE__ */ L("tr", { children: [
119
+ /* @__PURE__ */ I(b, { children: C("psw.common.name") }),
120
+ /* @__PURE__ */ I(b, { children: C("psw.common.type") }),
121
+ /* @__PURE__ */ I(b, { children: "Industry" }),
122
+ /* @__PURE__ */ I(b, { children: C("psw.common.status") }),
123
+ /* @__PURE__ */ I(b, { children: C("psw.common.added") }),
124
+ /* @__PURE__ */ I(b, { children: "Tags" }),
125
+ /* @__PURE__ */ I(b, {
90
126
  className: "text-right",
91
- children: "Actions"
127
+ children: C("psw.common.actions")
92
128
  })
93
- ] }) }), /* @__PURE__ */ P("tbody", { children: z.items.map((t) => /* @__PURE__ */ F("tr", {
129
+ ] }) }), /* @__PURE__ */ I("tbody", { children: Y.items.map((t) => /* @__PURE__ */ L("tr", {
94
130
  className: "group cursor-pointer transition-colors hover:bg-bg-sunken/60",
95
131
  onClick: () => e(`clients/${t.id}`),
96
132
  children: [
97
- /* @__PURE__ */ P(_, { children: /* @__PURE__ */ F("div", {
133
+ /* @__PURE__ */ I(_, { children: /* @__PURE__ */ L("div", {
98
134
  className: "flex items-center gap-3",
99
- children: [/* @__PURE__ */ P(B, { name: t.name }), /* @__PURE__ */ F("div", {
135
+ children: [/* @__PURE__ */ I(H, { name: t.name }), /* @__PURE__ */ L("div", {
100
136
  className: "min-w-0",
101
- children: [/* @__PURE__ */ F("div", {
137
+ children: [/* @__PURE__ */ L("div", {
102
138
  className: "flex items-center gap-1 font-medium text-text-primary transition-colors group-hover:text-accent",
103
- children: [/* @__PURE__ */ P("span", {
139
+ children: [/* @__PURE__ */ I("span", {
104
140
  className: "truncate",
105
141
  children: t.name
106
- }), /* @__PURE__ */ P(D, { className: "h-3.5 w-3.5 shrink-0 text-text-tertiary opacity-0 transition-opacity group-hover:opacity-100" })]
107
- }), t.contactName ? /* @__PURE__ */ P("div", {
142
+ }), /* @__PURE__ */ I(te, { className: "h-3.5 w-3.5 shrink-0 text-text-tertiary opacity-0 transition-opacity group-hover:opacity-100" })]
143
+ }), t.contactName ? /* @__PURE__ */ I("div", {
108
144
  className: "truncate text-xs text-text-tertiary",
109
145
  children: t.contactName
110
146
  }) : null]
111
147
  })]
112
148
  }) }),
113
- /* @__PURE__ */ P(_, { children: /* @__PURE__ */ F("span", {
149
+ /* @__PURE__ */ I(_, { children: /* @__PURE__ */ L("span", {
114
150
  className: "inline-flex items-center gap-1.5 text-text-secondary",
115
- children: [t.type === "ORGANIZATION" ? /* @__PURE__ */ P(E, { className: "h-3.5 w-3.5 text-text-tertiary" }) : /* @__PURE__ */ P(j, { className: "h-3.5 w-3.5 text-text-tertiary" }), t.type === "ORGANIZATION" ? "Organization" : "Individual"]
151
+ children: [t.type === "ORGANIZATION" ? /* @__PURE__ */ I(ee, { className: "h-3.5 w-3.5 text-text-tertiary" }) : /* @__PURE__ */ I(N, { className: "h-3.5 w-3.5 text-text-tertiary" }), t.type === "ORGANIZATION" ? "Organization" : "Individual"]
116
152
  }) }),
117
- /* @__PURE__ */ P(_, { children: t.industry || "—" }),
118
- /* @__PURE__ */ P(_, { children: /* @__PURE__ */ P(h, { status: t.status }) }),
119
- /* @__PURE__ */ P(_, {
153
+ /* @__PURE__ */ I(_, { children: t.industry || "—" }),
154
+ /* @__PURE__ */ I(_, { children: /* @__PURE__ */ I(h, { status: t.status }) }),
155
+ /* @__PURE__ */ I(_, {
120
156
  className: "whitespace-nowrap",
121
157
  children: S(t.createdAt)
122
158
  }),
123
- /* @__PURE__ */ P(_, {
159
+ /* @__PURE__ */ I(_, { children: /* @__PURE__ */ I("div", {
160
+ onClick: (e) => e.stopPropagation(),
161
+ role: "presentation",
162
+ children: /* @__PURE__ */ I(E, {
163
+ entityType: "PswClient",
164
+ entityId: t.id,
165
+ tags: t.tags ?? [],
166
+ onChange: async (e) => {
167
+ await ae.mutateAsync({
168
+ id: t.id,
169
+ input: { tags: e }
170
+ }), Q();
171
+ },
172
+ maxTags: 5
173
+ })
174
+ }) }),
175
+ /* @__PURE__ */ I(_, {
124
176
  className: "text-right",
125
- children: /* @__PURE__ */ F("div", {
177
+ children: /* @__PURE__ */ L("div", {
126
178
  className: "flex justify-end gap-1",
127
179
  onClick: (e) => e.stopPropagation(),
128
180
  role: "presentation",
129
- children: [/* @__PURE__ */ P(I, {
181
+ children: [/* @__PURE__ */ I(R, {
130
182
  variant: "ghost",
131
183
  size: "sm",
132
- onClick: () => v(t),
184
+ onClick: () => z(t),
133
185
  "aria-label": "Edit",
134
- children: /* @__PURE__ */ P(O, { className: "h-4 w-4" })
135
- }), t.status !== "ARCHIVED" && /* @__PURE__ */ P(U, {
186
+ children: /* @__PURE__ */ I(ne, { className: "h-4 w-4" })
187
+ }), t.status !== "ARCHIVED" && /* @__PURE__ */ I(re, {
136
188
  id: t.id,
137
- onDone: (e) => L(e ? {
189
+ onDone: (e) => q(e ? {
138
190
  tone: "success",
139
191
  text: `${t.name} archived.`
140
192
  } : {
@@ -145,42 +197,53 @@ var L = ["ORGANIZATION", "INDIVIDUAL"], R = [
145
197
  })
146
198
  })
147
199
  ]
148
- }, t.id)) })] })
200
+ }, t.id)) })] }), /* @__PURE__ */ I(D, {
201
+ hasMore: Y?.pageInfo?.hasMore ?? !1,
202
+ loading: X,
203
+ loadedCount: $.length,
204
+ totalCount: Y?.totalCount ?? $.length,
205
+ onLoadMore: () => J((e) => ({
206
+ limit: W,
207
+ offset: e.offset + W
208
+ }))
209
+ })]
149
210
  }),
150
- C && /* @__PURE__ */ P(W, {
151
- onClose: () => T(!1),
152
- onSaved: (e) => L({
211
+ V && /* @__PURE__ */ I(K, {
212
+ onClose: () => U(!1),
213
+ onSaved: (e) => q({
153
214
  tone: "success",
154
215
  text: `${e} created.`
155
216
  })
156
217
  }),
157
- d && /* @__PURE__ */ P(W, {
158
- client: d,
159
- onClose: () => v(null),
160
- onSaved: (e) => L({
218
+ F && /* @__PURE__ */ I(K, {
219
+ client: F,
220
+ onClose: () => z(null),
221
+ onSaved: (e) => q({
161
222
  tone: "success",
162
223
  text: `${e} updated.`
163
224
  })
164
225
  })
165
226
  ]
166
227
  });
167
- }, U = ({ id: t, onDone: n }) => {
168
- let r = e();
169
- return /* @__PURE__ */ P(I, {
228
+ }, re = ({ id: t, onDone: n }) => {
229
+ let r = e(), { emitFact: i } = w();
230
+ return /* @__PURE__ */ I(R, {
170
231
  variant: "ghost",
171
232
  size: "sm",
172
233
  "aria-label": "Archive",
173
234
  disabled: r.isPending,
174
235
  onClick: () => {
175
236
  window.confirm("Archive this client? Their engagements and matters remain.") && r.mutate(t, {
176
- onSuccess: (e) => n(!!e),
237
+ onSuccess: (e) => {
238
+ i("psw.client.archived", { clientId: t }), n(!!e);
239
+ },
177
240
  onError: () => n(!1)
178
241
  });
179
242
  },
180
- children: /* @__PURE__ */ P(T, { className: "h-4 w-4" })
243
+ children: /* @__PURE__ */ I(A, { className: "h-4 w-4" })
181
244
  });
182
- }, W = ({ client: e, onClose: t, onSaved: i }) => {
183
- let a = n(), s = r(), [c, u] = w(e ? {
245
+ }, K = ({ client: e, onClose: t, onSaved: i }) => {
246
+ let a = n(), s = r(), { emitFact: c } = w(), [u, p] = k(e ? {
184
247
  name: e.name,
185
248
  type: e.type,
186
249
  status: e.status,
@@ -189,121 +252,121 @@ var L = ["ORGANIZATION", "INDIVIDUAL"], R = [
189
252
  contactEmail: e.contactEmail ?? "",
190
253
  contactPhone: e.contactPhone ?? "",
191
254
  notes: e.notes ?? ""
192
- } : V), [p, m] = w(null), h = (e) => (t) => u((n) => ({
255
+ } : U), [m, h] = k(null), g = (e) => (t) => p((n) => ({
193
256
  ...n,
194
257
  [e]: t.target.value
195
- })), g = a.isPending || s.isPending, _ = C(() => ({
196
- name: c.name.trim(),
197
- type: c.type,
198
- status: c.status,
199
- industry: c.industry.trim() || null,
200
- contactName: c.contactName.trim() || null,
201
- contactEmail: c.contactEmail.trim() || null,
202
- contactPhone: c.contactPhone.trim() || null,
203
- notes: c.notes.trim() || null
204
- }), [c]);
205
- return /* @__PURE__ */ P(d, {
258
+ })), _ = a.isPending || s.isPending, b = O(() => ({
259
+ name: u.name.trim(),
260
+ type: u.type,
261
+ status: u.status,
262
+ industry: u.industry.trim() || null,
263
+ contactName: u.contactName.trim() || null,
264
+ contactEmail: u.contactEmail.trim() || null,
265
+ contactPhone: u.contactPhone.trim() || null,
266
+ notes: u.notes.trim() || null
267
+ }), [u]);
268
+ return /* @__PURE__ */ I(d, {
206
269
  open: !0,
207
270
  onClose: t,
208
271
  title: e ? "Edit client" : "New client",
209
- footer: /* @__PURE__ */ F(N, { children: [/* @__PURE__ */ P(I, {
272
+ footer: /* @__PURE__ */ L(F, { children: [/* @__PURE__ */ I(R, {
210
273
  variant: "outline",
211
274
  onClick: t,
212
- disabled: g,
275
+ disabled: _,
213
276
  children: "Cancel"
214
- }), /* @__PURE__ */ P(I, {
277
+ }), /* @__PURE__ */ I(R, {
215
278
  onClick: () => {
216
- if (m(null), !_.name) return m("Client name is required.");
217
- let n = (e) => m(e instanceof Error ? e.message : "Save failed.");
279
+ if (h(null), !b.name) return h("Client name is required.");
280
+ let n = (e) => h(e instanceof Error ? e.message : "Save failed.");
218
281
  e ? s.mutate({
219
282
  id: e.id,
220
- input: _
283
+ input: b
221
284
  }, {
222
285
  onSuccess: () => {
223
- i(_.name), t();
286
+ c("psw.client.updated", { clientId: e.id }), i(b.name), t();
224
287
  },
225
288
  onError: n
226
- }) : a.mutate(_, {
227
- onSuccess: () => {
228
- i(_.name), t();
289
+ }) : a.mutate(b, {
290
+ onSuccess: (e) => {
291
+ c("psw.client.created", { clientId: e.pswCreateClient.id }), i(b.name), t();
229
292
  },
230
293
  onError: n
231
294
  });
232
295
  },
233
- disabled: g,
234
- children: g ? "Saving…" : e ? "Save changes" : "Create client"
296
+ disabled: _,
297
+ children: _ ? "Saving…" : e ? "Save changes" : "Create client"
235
298
  })] }),
236
- children: /* @__PURE__ */ F("div", {
299
+ children: /* @__PURE__ */ L("div", {
237
300
  className: "space-y-3",
238
301
  children: [
239
- p && /* @__PURE__ */ P(o, {
302
+ m && /* @__PURE__ */ I(o, {
240
303
  tone: "danger",
241
- children: p
304
+ children: m
242
305
  }),
243
- /* @__PURE__ */ P(l, {
306
+ /* @__PURE__ */ I(l, {
244
307
  label: "Name",
245
308
  required: !0,
246
- children: /* @__PURE__ */ P(y, {
247
- value: c.name,
248
- onChange: h("name"),
309
+ children: /* @__PURE__ */ I(y, {
310
+ value: u.name,
311
+ onChange: g("name"),
249
312
  placeholder: "Acme Holdings Ltd."
250
313
  })
251
314
  }),
252
- /* @__PURE__ */ F("div", {
315
+ /* @__PURE__ */ L("div", {
253
316
  className: "grid grid-cols-2 gap-3",
254
- children: [/* @__PURE__ */ P(l, {
317
+ children: [/* @__PURE__ */ I(l, {
255
318
  label: "Type",
256
- children: /* @__PURE__ */ P(f, {
257
- value: c.type,
258
- onChange: h("type"),
259
- children: x(L)
319
+ children: /* @__PURE__ */ I(f, {
320
+ value: u.type,
321
+ onChange: g("type"),
322
+ children: x(z)
260
323
  })
261
- }), /* @__PURE__ */ P(l, {
324
+ }), /* @__PURE__ */ I(l, {
262
325
  label: "Status",
263
- children: /* @__PURE__ */ P(f, {
264
- value: c.status,
265
- onChange: h("status"),
266
- children: x(R)
326
+ children: /* @__PURE__ */ I(f, {
327
+ value: u.status,
328
+ onChange: g("status"),
329
+ children: x(B)
267
330
  })
268
331
  })]
269
332
  }),
270
- /* @__PURE__ */ P(l, {
333
+ /* @__PURE__ */ I(l, {
271
334
  label: "Industry",
272
- children: /* @__PURE__ */ P(y, {
273
- value: c.industry,
274
- onChange: h("industry"),
335
+ children: /* @__PURE__ */ I(y, {
336
+ value: u.industry,
337
+ onChange: g("industry"),
275
338
  placeholder: "Financial services"
276
339
  })
277
340
  }),
278
- /* @__PURE__ */ F("div", {
341
+ /* @__PURE__ */ L("div", {
279
342
  className: "grid grid-cols-1 gap-3 sm:grid-cols-2",
280
- children: [/* @__PURE__ */ P(l, {
343
+ children: [/* @__PURE__ */ I(l, {
281
344
  label: "Contact name",
282
- children: /* @__PURE__ */ P(y, {
283
- value: c.contactName,
284
- onChange: h("contactName")
345
+ children: /* @__PURE__ */ I(y, {
346
+ value: u.contactName,
347
+ onChange: g("contactName")
285
348
  })
286
- }), /* @__PURE__ */ P(l, {
349
+ }), /* @__PURE__ */ I(l, {
287
350
  label: "Contact email",
288
- children: /* @__PURE__ */ P(y, {
351
+ children: /* @__PURE__ */ I(y, {
289
352
  type: "email",
290
- value: c.contactEmail,
291
- onChange: h("contactEmail")
353
+ value: u.contactEmail,
354
+ onChange: g("contactEmail")
292
355
  })
293
356
  })]
294
357
  }),
295
- /* @__PURE__ */ P(l, {
358
+ /* @__PURE__ */ I(l, {
296
359
  label: "Contact phone",
297
- children: /* @__PURE__ */ P(y, {
298
- value: c.contactPhone,
299
- onChange: h("contactPhone")
360
+ children: /* @__PURE__ */ I(y, {
361
+ value: u.contactPhone,
362
+ onChange: g("contactPhone")
300
363
  })
301
364
  }),
302
- /* @__PURE__ */ P(l, {
365
+ /* @__PURE__ */ I(l, {
303
366
  label: "Notes",
304
- children: /* @__PURE__ */ P(v, {
305
- value: c.notes,
306
- onChange: h("notes")
367
+ children: /* @__PURE__ */ I(v, {
368
+ value: u.notes,
369
+ onChange: g("notes")
307
370
  })
308
371
  })
309
372
  ]
@@ -311,6 +374,6 @@ var L = ["ORGANIZATION", "INDIVIDUAL"], R = [
311
374
  });
312
375
  };
313
376
  //#endregion
314
- export { H as ClientsPage };
377
+ export { G as ClientsPage };
315
378
 
316
379
  //# sourceMappingURL=ClientsPage.js.map