@ai-matrx/associations 0.14.81 → 0.14.83

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,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ComponentType, ReactNode } from 'react';
3
- import { j as AssociationsNotifier, W as WindowShellPort, k as CapturePort, P as PickerOverrideMap, E as EntityDoorsPort, l as AuthorDisplayPort, m as AssociationsStore, n as CategoryMutationResult, o as CategoryDimension, p as PlatformCategory, q as CategoriesEntry, r as EntityTypeToken, s as UniversalCandidate, t as CandidateRecord, u as PlatformComment, v as CommentsEntry, w as CommentAnchor, x as CommentMutationResult, e as AssociationPickerProps, y as EntityDoorProps, z as EntityRefProps, B as ContentRole } from '../CommentThread-RI-iPDmV.cjs';
4
- export { D as AssociationCaptureToolbar, A as AssociationCaptureToolbarProps, F as AssociationCard, G as AssociationCardGrid, b as AssociationCardGridProps, H as AssociationCardLook, a as AssociationCardProps, I as AssociationEntitySelect, J as AssociationEntitySelectAdapter, K as AssociationEntitySelectItem, c as AssociationEntitySelectProps, L as AssociationList, d as AssociationListProps, M as AssociationWindow, f as AssociationWindowProps, N as AssociationWriteResult, O as AttachedItemsSheet, g as AttachedItemsSheetProps, Q as CaptureAttach, R as CaptureAttachResult, S as CaptureToolbarAction, T as CategorySelect, C as CategorySelectProps, V as CategoryTagPicker, h as CategoryTagPickerProps, X as CommentComposer, Y as CommentComposerProps, Z as CommentThread, i as CommentThreadProps, _ as ContainerLink, $ as ContainerResourceRow, a0 as ContainerResourcesAdapter, a1 as DefaultEntityIcon, a2 as PostedComment, a3 as PrimaryContainerEntity, a4 as PrimaryEntity, a5 as PrimaryEntityProvider, a6 as PrimaryFiledEntity, a7 as TagPickerIcon, a8 as UniversalAssociationPicker, U as UniversalAssociationPickerProps, a9 as UseAssociationEntitySelectAdapterArgs, aa as UseAssociationsArgs, ab as UseAssociationsReturn, ac as UseContainerLinksArgs, ad as UseContainerLinksReturn, ae as attachedKey, af as buildCommentTree, ag as containerLinksArgs, ah as linkDirection, ai as useAssociationEntitySelectAdapter, aj as useAssociations, ak as useContainerLinks, al as useContainerLinksAdapter, am as useEntityRelationships, an as usePrimaryEntity } from '../CommentThread-RI-iPDmV.cjs';
3
+ import { j as AssociationsNotifier, W as WindowShellPort, k as CapturePort, P as PickerOverrideMap, E as EntityDoorsPort, l as AuthorDisplayPort, m as AssociationsStore, n as CategoryMutationResult, o as CategoryDimension, p as PlatformCategory, q as CategoriesEntry, r as EntityTypeToken, s as UniversalCandidate, t as CandidateRecord, u as PlatformComment, v as CommentsEntry, w as CommentAnchor, x as CommentMutationResult, e as AssociationPickerProps, y as EntityDoorProps, z as EntityRefProps, B as ContentRole } from '../CommentThread-C4Wowvph.cjs';
4
+ export { D as AssociationCaptureToolbar, A as AssociationCaptureToolbarProps, F as AssociationCard, G as AssociationCardGrid, b as AssociationCardGridProps, H as AssociationCardLook, a as AssociationCardProps, I as AssociationEntitySelect, J as AssociationEntitySelectAdapter, K as AssociationEntitySelectItem, c as AssociationEntitySelectProps, L as AssociationList, d as AssociationListProps, M as AssociationWindow, f as AssociationWindowProps, N as AssociationWriteResult, O as AttachedItemsSheet, g as AttachedItemsSheetProps, Q as CaptureAttach, R as CaptureAttachResult, S as CaptureToolbarAction, T as CategorySelect, C as CategorySelectProps, V as CategoryTagPicker, h as CategoryTagPickerProps, X as CommentComposer, Y as CommentComposerProps, Z as CommentThread, i as CommentThreadProps, _ as ContainerLink, $ as ContainerResourceRow, a0 as ContainerResourcesAdapter, a1 as DefaultEntityIcon, a2 as PostedComment, a3 as PrimaryContainerEntity, a4 as PrimaryEntity, a5 as PrimaryEntityProvider, a6 as PrimaryFiledEntity, a7 as TagPickerIcon, a8 as UniversalAssociationPicker, U as UniversalAssociationPickerProps, a9 as UseAssociationEntitySelectAdapterArgs, aa as UseAssociationsArgs, ab as UseAssociationsReturn, ac as UseContainerLinksArgs, ad as UseContainerLinksReturn, ae as attachedKey, af as buildCommentTree, ag as containerLinksArgs, ah as linkDirection, ai as useAssociationEntitySelectAdapter, aj as useAssociations, ak as useContainerLinks, al as useContainerLinksAdapter, am as useEntityRelationships, an as usePrimaryEntity } from '../CommentThread-C4Wowvph.cjs';
5
5
  import '@ai-matrx/data/db';
6
6
 
7
7
  interface AssociationsUiPorts {
@@ -1,7 +1,7 @@
1
1
  import * as react from 'react';
2
2
  import { ComponentType, ReactNode } from 'react';
3
- import { j as AssociationsNotifier, W as WindowShellPort, k as CapturePort, P as PickerOverrideMap, E as EntityDoorsPort, l as AuthorDisplayPort, m as AssociationsStore, n as CategoryMutationResult, o as CategoryDimension, p as PlatformCategory, q as CategoriesEntry, r as EntityTypeToken, s as UniversalCandidate, t as CandidateRecord, u as PlatformComment, v as CommentsEntry, w as CommentAnchor, x as CommentMutationResult, e as AssociationPickerProps, y as EntityDoorProps, z as EntityRefProps, B as ContentRole } from '../CommentThread-RI-iPDmV.js';
4
- export { D as AssociationCaptureToolbar, A as AssociationCaptureToolbarProps, F as AssociationCard, G as AssociationCardGrid, b as AssociationCardGridProps, H as AssociationCardLook, a as AssociationCardProps, I as AssociationEntitySelect, J as AssociationEntitySelectAdapter, K as AssociationEntitySelectItem, c as AssociationEntitySelectProps, L as AssociationList, d as AssociationListProps, M as AssociationWindow, f as AssociationWindowProps, N as AssociationWriteResult, O as AttachedItemsSheet, g as AttachedItemsSheetProps, Q as CaptureAttach, R as CaptureAttachResult, S as CaptureToolbarAction, T as CategorySelect, C as CategorySelectProps, V as CategoryTagPicker, h as CategoryTagPickerProps, X as CommentComposer, Y as CommentComposerProps, Z as CommentThread, i as CommentThreadProps, _ as ContainerLink, $ as ContainerResourceRow, a0 as ContainerResourcesAdapter, a1 as DefaultEntityIcon, a2 as PostedComment, a3 as PrimaryContainerEntity, a4 as PrimaryEntity, a5 as PrimaryEntityProvider, a6 as PrimaryFiledEntity, a7 as TagPickerIcon, a8 as UniversalAssociationPicker, U as UniversalAssociationPickerProps, a9 as UseAssociationEntitySelectAdapterArgs, aa as UseAssociationsArgs, ab as UseAssociationsReturn, ac as UseContainerLinksArgs, ad as UseContainerLinksReturn, ae as attachedKey, af as buildCommentTree, ag as containerLinksArgs, ah as linkDirection, ai as useAssociationEntitySelectAdapter, aj as useAssociations, ak as useContainerLinks, al as useContainerLinksAdapter, am as useEntityRelationships, an as usePrimaryEntity } from '../CommentThread-RI-iPDmV.js';
3
+ import { j as AssociationsNotifier, W as WindowShellPort, k as CapturePort, P as PickerOverrideMap, E as EntityDoorsPort, l as AuthorDisplayPort, m as AssociationsStore, n as CategoryMutationResult, o as CategoryDimension, p as PlatformCategory, q as CategoriesEntry, r as EntityTypeToken, s as UniversalCandidate, t as CandidateRecord, u as PlatformComment, v as CommentsEntry, w as CommentAnchor, x as CommentMutationResult, e as AssociationPickerProps, y as EntityDoorProps, z as EntityRefProps, B as ContentRole } from '../CommentThread-C4Wowvph.js';
4
+ export { D as AssociationCaptureToolbar, A as AssociationCaptureToolbarProps, F as AssociationCard, G as AssociationCardGrid, b as AssociationCardGridProps, H as AssociationCardLook, a as AssociationCardProps, I as AssociationEntitySelect, J as AssociationEntitySelectAdapter, K as AssociationEntitySelectItem, c as AssociationEntitySelectProps, L as AssociationList, d as AssociationListProps, M as AssociationWindow, f as AssociationWindowProps, N as AssociationWriteResult, O as AttachedItemsSheet, g as AttachedItemsSheetProps, Q as CaptureAttach, R as CaptureAttachResult, S as CaptureToolbarAction, T as CategorySelect, C as CategorySelectProps, V as CategoryTagPicker, h as CategoryTagPickerProps, X as CommentComposer, Y as CommentComposerProps, Z as CommentThread, i as CommentThreadProps, _ as ContainerLink, $ as ContainerResourceRow, a0 as ContainerResourcesAdapter, a1 as DefaultEntityIcon, a2 as PostedComment, a3 as PrimaryContainerEntity, a4 as PrimaryEntity, a5 as PrimaryEntityProvider, a6 as PrimaryFiledEntity, a7 as TagPickerIcon, a8 as UniversalAssociationPicker, U as UniversalAssociationPickerProps, a9 as UseAssociationEntitySelectAdapterArgs, aa as UseAssociationsArgs, ab as UseAssociationsReturn, ac as UseContainerLinksArgs, ad as UseContainerLinksReturn, ae as attachedKey, af as buildCommentTree, ag as containerLinksArgs, ah as linkDirection, ai as useAssociationEntitySelectAdapter, aj as useAssociations, ak as useContainerLinks, al as useContainerLinksAdapter, am as useEntityRelationships, an as usePrimaryEntity } from '../CommentThread-C4Wowvph.js';
5
5
  import '@ai-matrx/data/db';
6
6
 
7
7
  interface AssociationsUiPorts {
@@ -1710,6 +1710,7 @@ var ASSOCIATION_PAIRS = /* @__PURE__ */ new Set([
1710
1710
  "record>hr_legal_hold",
1711
1711
  "record>hr_location",
1712
1712
  "record>hr_pay_group",
1713
+ "record>hr_pay_period",
1713
1714
  "record>hr_posting",
1714
1715
  "record>hr_record_class",
1715
1716
  "record>hr_requisition",
@@ -6218,7 +6219,11 @@ function CommentBody({ body, className }) {
6218
6219
  import { formatRelativeTime } from "@ai-matrx/kit/format";
6219
6220
  import { Fragment as Fragment6, jsx as jsx20, jsxs as jsxs16 } from "react/jsx-runtime";
6220
6221
  var AUTHOR_DOOR_TOKEN = "user";
6222
+ var SYSTEM_AUTHOR_NAME = "AI Matrx";
6221
6223
  function resolveAuthor(comment, authorDisplay) {
6224
+ if (comment.authorSystem) {
6225
+ return { name: SYSTEM_AUTHOR_NAME, avatarUrl: null, userId: null, isAgent: false, isSystem: true };
6226
+ }
6222
6227
  if (comment.authorAgent) {
6223
6228
  return {
6224
6229
  name: comment.authorAgent.name ?? "Agent",
@@ -6368,7 +6373,7 @@ function CommentItem({
6368
6373
  const [deleting, setDeleting] = useState16(false);
6369
6374
  const author = resolveAuthor(comment, authorDisplay);
6370
6375
  const isOwn = thread.currentUserId !== null && comment.createdBy === thread.currentUserId;
6371
- const canEdit = isOwn && !author.isAgent;
6376
+ const canEdit = isOwn && !author.isAgent && !author.isSystem;
6372
6377
  const partLabel = partLabelOf(comment);
6373
6378
  const edited = comment.updatedAt !== comment.createdAt;
6374
6379
  const replies = childrenOf.get(comment.id) ?? [];