@wildo-ai/presets-components 1.1.5 → 1.1.7

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 (189) hide show
  1. package/dist/esm/.native.tsbuildinfo +1 -0
  2. package/dist/esm/components/actions/action-bar.d.ts.map +1 -1
  3. package/dist/esm/components/actions/action-bar.js +5 -2
  4. package/dist/esm/components/actions/action-bar.js.map +1 -1
  5. package/dist/esm/components/ai-elements/chat/suggestion.d.ts.map +1 -1
  6. package/dist/esm/components/ai-elements/chat/suggestion.js +8 -1
  7. package/dist/esm/components/ai-elements/chat/suggestion.js.map +1 -1
  8. package/dist/esm/components/ai-elements/decision/approval.d.ts +108 -13
  9. package/dist/esm/components/ai-elements/decision/approval.d.ts.map +1 -1
  10. package/dist/esm/components/ai-elements/decision/approval.js +60 -10
  11. package/dist/esm/components/ai-elements/decision/approval.js.map +1 -1
  12. package/dist/esm/components/ai-elements/graph/graph-runtime.d.ts +3 -1
  13. package/dist/esm/components/ai-elements/graph/graph-runtime.d.ts.map +1 -1
  14. package/dist/esm/components/ai-elements/graph/graph-runtime.js +3 -1
  15. package/dist/esm/components/ai-elements/graph/graph-runtime.js.map +1 -1
  16. package/dist/esm/components/app/app-layout-main-container.d.ts +9 -0
  17. package/dist/esm/components/app/app-layout-main-container.d.ts.map +1 -1
  18. package/dist/esm/components/app/app-layout-main-container.js +17 -23
  19. package/dist/esm/components/app/app-layout-main-container.js.map +1 -1
  20. package/dist/esm/components/app/app-layout-main-container.labels.d.ts.map +1 -1
  21. package/dist/esm/components/app/app-layout-main-container.labels.js +27 -0
  22. package/dist/esm/components/app/app-layout-main-container.labels.js.map +1 -1
  23. package/dist/esm/components/billing/billing-plan-change-preview.d.ts.map +1 -1
  24. package/dist/esm/components/billing/billing-plan-change-preview.js +5 -2
  25. package/dist/esm/components/billing/billing-plan-change-preview.js.map +1 -1
  26. package/dist/esm/components/billing/billing-plan-change-preview.labels.d.ts.map +1 -1
  27. package/dist/esm/components/billing/billing-plan-change-preview.labels.js +3 -0
  28. package/dist/esm/components/billing/billing-plan-change-preview.labels.js.map +1 -1
  29. package/dist/esm/components/billing/billing-pricing-table.d.ts +1 -1
  30. package/dist/esm/components/billing/billing-pricing-table.d.ts.map +1 -1
  31. package/dist/esm/components/billing/billing-pricing-table.js +8 -4
  32. package/dist/esm/components/billing/billing-pricing-table.js.map +1 -1
  33. package/dist/esm/components/billing/billing-pricing-table.labels.d.ts.map +1 -1
  34. package/dist/esm/components/billing/billing-pricing-table.labels.js +7 -1
  35. package/dist/esm/components/billing/billing-pricing-table.labels.js.map +1 -1
  36. package/dist/esm/components/billing/billing-usage-dashboard.d.ts.map +1 -1
  37. package/dist/esm/components/billing/billing-usage-dashboard.js +6 -3
  38. package/dist/esm/components/billing/billing-usage-dashboard.js.map +1 -1
  39. package/dist/esm/components/billing/billing-usage-dashboard.labels.d.ts.map +1 -1
  40. package/dist/esm/components/billing/billing-usage-dashboard.labels.js +2 -1
  41. package/dist/esm/components/billing/billing-usage-dashboard.labels.js.map +1 -1
  42. package/dist/esm/components/data-display/formatters/display-field-enum.d.ts.map +1 -1
  43. package/dist/esm/components/data-display/formatters/display-field-enum.js +18 -4
  44. package/dist/esm/components/data-display/formatters/display-field-enum.js.map +1 -1
  45. package/dist/esm/components/data-display/formatters/display-field-file.d.ts.map +1 -1
  46. package/dist/esm/components/data-display/formatters/display-field-file.js +13 -14
  47. package/dist/esm/components/data-display/formatters/display-field-file.js.map +1 -1
  48. package/dist/esm/components/data-display/formatters/display-field-file.labels.d.ts.map +1 -1
  49. package/dist/esm/components/data-display/formatters/display-field-file.labels.js +1 -0
  50. package/dist/esm/components/data-display/formatters/display-field-file.labels.js.map +1 -1
  51. package/dist/esm/components/data-display/formatters/display-field-number.d.ts.map +1 -1
  52. package/dist/esm/components/data-display/formatters/display-field-number.js +6 -1
  53. package/dist/esm/components/data-display/formatters/display-field-number.js.map +1 -1
  54. package/dist/esm/components/data-display/formatters/display-field-number.labels.d.ts.map +1 -1
  55. package/dist/esm/components/data-display/formatters/display-field-number.labels.js +5 -2
  56. package/dist/esm/components/data-display/formatters/display-field-number.labels.js.map +1 -1
  57. package/dist/esm/components/data-display/formatters/display-field-string.d.ts +1 -1
  58. package/dist/esm/components/data-display/formatters/display-field-string.d.ts.map +1 -1
  59. package/dist/esm/components/data-display/formatters/display-field-string.js +51 -12
  60. package/dist/esm/components/data-display/formatters/display-field-string.js.map +1 -1
  61. package/dist/esm/components/data-display/untrusted-html-content.d.ts +55 -0
  62. package/dist/esm/components/data-display/untrusted-html-content.d.ts.map +1 -0
  63. package/dist/esm/components/data-display/untrusted-html-content.js +67 -0
  64. package/dist/esm/components/data-display/untrusted-html-content.js.map +1 -0
  65. package/dist/esm/components/form/chromes/form-primitive.labels.d.ts.map +1 -1
  66. package/dist/esm/components/form/chromes/form-primitive.labels.js +9 -0
  67. package/dist/esm/components/form/chromes/form-primitive.labels.js.map +1 -1
  68. package/dist/esm/components/form/combobox.d.ts.map +1 -1
  69. package/dist/esm/components/form/combobox.js +10 -10
  70. package/dist/esm/components/form/combobox.js.map +1 -1
  71. package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.adapter.d.ts +42 -0
  72. package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.adapter.d.ts.map +1 -0
  73. package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.adapter.js +120 -0
  74. package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.adapter.js.map +1 -0
  75. package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.d.ts +16 -0
  76. package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.d.ts.map +1 -0
  77. package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.js +8 -0
  78. package/dist/esm/components/form/controls/address/providers/google-places-address-lookup.js.map +1 -0
  79. package/dist/esm/components/navigation/app-level/activity-bar.d.ts.map +1 -1
  80. package/dist/esm/components/navigation/app-level/activity-bar.js +2 -2
  81. package/dist/esm/components/navigation/app-level/activity-bar.js.map +1 -1
  82. package/dist/esm/components/navigation/app-level/menu-user-org.d.ts.map +1 -1
  83. package/dist/esm/components/navigation/app-level/menu-user-org.js +10 -4
  84. package/dist/esm/components/navigation/app-level/menu-user-org.js.map +1 -1
  85. package/dist/esm/components/navigation/app-level/menu-user-org.labels.d.ts.map +1 -1
  86. package/dist/esm/components/navigation/app-level/menu-user-org.labels.js +7 -0
  87. package/dist/esm/components/navigation/app-level/menu-user-org.labels.js.map +1 -1
  88. package/dist/esm/components/navigation/app-level/menubar.d.ts.map +1 -1
  89. package/dist/esm/components/navigation/app-level/menubar.js +6 -6
  90. package/dist/esm/components/navigation/app-level/menubar.js.map +1 -1
  91. package/dist/esm/components/navigation/app-level/navigation-back.d.ts.map +1 -1
  92. package/dist/esm/components/navigation/app-level/navigation-back.js +27 -9
  93. package/dist/esm/components/navigation/app-level/navigation-back.js.map +1 -1
  94. package/dist/esm/components/navigation/app-level/sidebar.js +3 -3
  95. package/dist/esm/components/navigation/app-level/sidebar.js.map +1 -1
  96. package/dist/esm/components/navigation/app-level/status-bar.js +2 -2
  97. package/dist/esm/components/navigation/app-level/status-bar.js.map +1 -1
  98. package/dist/esm/components/navigation/app-level/toolbar.d.ts.map +1 -1
  99. package/dist/esm/components/navigation/app-level/toolbar.js +2 -2
  100. package/dist/esm/components/navigation/app-level/toolbar.js.map +1 -1
  101. package/dist/esm/components/navigation/app-level/utility-panel.js +2 -2
  102. package/dist/esm/components/navigation/app-level/utility-panel.js.map +1 -1
  103. package/dist/esm/components/navigation/breadcrumb.js +1 -1
  104. package/dist/esm/components/navigation/breadcrumb.js.map +1 -1
  105. package/dist/esm/components/sections/stepper.d.ts.map +1 -1
  106. package/dist/esm/components/sections/stepper.js +5 -3
  107. package/dist/esm/components/sections/stepper.js.map +1 -1
  108. package/dist/esm/config/preset-navigation.d.ts.map +1 -1
  109. package/dist/esm/config/preset-navigation.js +23 -2
  110. package/dist/esm/config/preset-navigation.js.map +1 -1
  111. package/dist/esm/config/resources/agent-work.resource-presets.d.ts +4 -0
  112. package/dist/esm/config/resources/agent-work.resource-presets.d.ts.map +1 -0
  113. package/dist/esm/config/resources/agent-work.resource-presets.js +115 -0
  114. package/dist/esm/config/resources/agent-work.resource-presets.js.map +1 -0
  115. package/dist/esm/config/resources/api-key-rotation-window.d.ts +22 -0
  116. package/dist/esm/config/resources/api-key-rotation-window.d.ts.map +1 -0
  117. package/dist/esm/config/resources/api-key-rotation-window.js +45 -0
  118. package/dist/esm/config/resources/api-key-rotation-window.js.map +1 -0
  119. package/dist/esm/config/resources/application.resource-presets.d.ts.map +1 -1
  120. package/dist/esm/config/resources/application.resource-presets.js +147 -61
  121. package/dist/esm/config/resources/application.resource-presets.js.map +1 -1
  122. package/dist/esm/config/resources/billing.resource-presets.d.ts +4 -3
  123. package/dist/esm/config/resources/billing.resource-presets.d.ts.map +1 -1
  124. package/dist/esm/config/resources/billing.resource-presets.js +240 -111
  125. package/dist/esm/config/resources/billing.resource-presets.js.map +1 -1
  126. package/dist/esm/config/resources/conversation-threads.resource-presets.d.ts +4 -0
  127. package/dist/esm/config/resources/conversation-threads.resource-presets.d.ts.map +1 -0
  128. package/dist/esm/config/resources/conversation-threads.resource-presets.js +105 -0
  129. package/dist/esm/config/resources/conversation-threads.resource-presets.js.map +1 -0
  130. package/dist/esm/config/resources/guidance.resource-presets.d.ts.map +1 -1
  131. package/dist/esm/config/resources/guidance.resource-presets.js +18 -11
  132. package/dist/esm/config/resources/guidance.resource-presets.js.map +1 -1
  133. package/dist/esm/config/resources/identity.resource-presets.d.ts +0 -13
  134. package/dist/esm/config/resources/identity.resource-presets.d.ts.map +1 -1
  135. package/dist/esm/config/resources/identity.resource-presets.js +48 -16
  136. package/dist/esm/config/resources/identity.resource-presets.js.map +1 -1
  137. package/dist/esm/config/resources/inbound-deliveries.resource-presets.d.ts +6 -0
  138. package/dist/esm/config/resources/inbound-deliveries.resource-presets.d.ts.map +1 -0
  139. package/dist/esm/config/resources/inbound-deliveries.resource-presets.js +112 -0
  140. package/dist/esm/config/resources/inbound-deliveries.resource-presets.js.map +1 -0
  141. package/dist/esm/config/resources/inbound-email.resource-presets.d.ts +4 -0
  142. package/dist/esm/config/resources/inbound-email.resource-presets.d.ts.map +1 -0
  143. package/dist/esm/config/resources/inbound-email.resource-presets.js +182 -0
  144. package/dist/esm/config/resources/inbound-email.resource-presets.js.map +1 -0
  145. package/dist/esm/config/resources/index.d.ts.map +1 -1
  146. package/dist/esm/config/resources/index.js +9 -2
  147. package/dist/esm/config/resources/index.js.map +1 -1
  148. package/dist/esm/config/resources/legal-holds.resource-presets.d.ts +4 -0
  149. package/dist/esm/config/resources/legal-holds.resource-presets.d.ts.map +1 -0
  150. package/dist/esm/config/resources/legal-holds.resource-presets.js +76 -0
  151. package/dist/esm/config/resources/legal-holds.resource-presets.js.map +1 -0
  152. package/dist/esm/config/resources/organizations.resource-presets.d.ts.map +1 -1
  153. package/dist/esm/config/resources/organizations.resource-presets.js +139 -36
  154. package/dist/esm/config/resources/organizations.resource-presets.js.map +1 -1
  155. package/dist/esm/config/resources/resource.config.utils.d.ts +20 -0
  156. package/dist/esm/config/resources/resource.config.utils.d.ts.map +1 -1
  157. package/dist/esm/config/resources/resource.config.utils.js +20 -0
  158. package/dist/esm/config/resources/resource.config.utils.js.map +1 -1
  159. package/dist/esm/config/resources/retention-enforcement.resource-presets.d.ts +5 -0
  160. package/dist/esm/config/resources/retention-enforcement.resource-presets.d.ts.map +1 -0
  161. package/dist/esm/config/resources/retention-enforcement.resource-presets.js +74 -0
  162. package/dist/esm/config/resources/retention-enforcement.resource-presets.js.map +1 -0
  163. package/dist/esm/config/resources/security.resource-presets.d.ts +3 -1
  164. package/dist/esm/config/resources/security.resource-presets.d.ts.map +1 -1
  165. package/dist/esm/config/resources/security.resource-presets.js +563 -133
  166. package/dist/esm/config/resources/security.resource-presets.js.map +1 -1
  167. package/dist/esm/config/resources/service-providers.resource-presets.d.ts +4 -0
  168. package/dist/esm/config/resources/service-providers.resource-presets.d.ts.map +1 -0
  169. package/dist/esm/config/resources/service-providers.resource-presets.js +321 -0
  170. package/dist/esm/config/resources/service-providers.resource-presets.js.map +1 -0
  171. package/dist/esm/config/resources/webhooks.resource-presets.d.ts +4 -3
  172. package/dist/esm/config/resources/webhooks.resource-presets.d.ts.map +1 -1
  173. package/dist/esm/config/resources/webhooks.resource-presets.js +76 -25
  174. package/dist/esm/config/resources/webhooks.resource-presets.js.map +1 -1
  175. package/dist/esm/index.d.ts +1 -0
  176. package/dist/esm/index.d.ts.map +1 -1
  177. package/dist/esm/index.js +1 -0
  178. package/dist/esm/index.js.map +1 -1
  179. package/dist/esm/registration/register-common-enums.d.ts.map +1 -1
  180. package/dist/esm/registration/register-common-enums.js +15 -0
  181. package/dist/esm/registration/register-common-enums.js.map +1 -1
  182. package/dist/esm/registration/register-provider-components.d.ts.map +1 -1
  183. package/dist/esm/registration/register-provider-components.js +6 -0
  184. package/dist/esm/registration/register-provider-components.js.map +1 -1
  185. package/dist/esm/themes/dense.theme.d.ts.map +1 -1
  186. package/dist/esm/themes/dense.theme.js +22 -2
  187. package/dist/esm/themes/dense.theme.js.map +1 -1
  188. package/dist/tsconfig.build.tsbuildinfo +1 -1
  189. package/package.json +8 -6
@@ -1 +1 @@
1
- {"version":3,"file":"identity.resource-presets.js","sourceRoot":"","sources":["../../../../../src/config/resources/identity.resource-presets.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AACnK,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,uBAAuB,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AACvM,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,WAAW,EAC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,MAAM,oCAAoC,GAAG,mBAAmB,CAAC,CAAC,CAAC,eAAe,CAAE,CAAC;AAC5F,MAAM,CAAC,MAAM,qCAAqC,GAAG,oBAAoB,CAAC,CAAC,CAAC,eAAe,CAAE,CAAC;AAC9F,MAAM,CAAC,MAAM,8BAA8B,GAAG,oBAAoB,CAAC,CAAC,CAAC,aAAa,CAAE,CAAC;AACrF,MAAM,CAAC,MAAM,iCAAiC,GAAG,oBAAoB,CAAC,CAAC,CAAC,gBAAgB,CAAE,CAAC;AAC3F,MAAM,CAAC,MAAM,kCAAkC,GAAG,mBAAmB,CAAC,CAAC,CAAC,aAAa,CAAE,CAAC;AACxF,MAAM,CAAC,MAAM,mCAAmC,GAAG,oBAAoB,CAAC,CAAC,CAAC,aAAa,CAAE,CAAC","sourcesContent":["import React from \"react\";\nimport type { ResourceUIBehavior } from \"@wildo-ai/saas-frontend-lib\";\nimport { resourceUIBehavior, resourceUIBehaviorFrom, StandardIconReference, ActionVisibility, ResourceLayoutInlineEditDefault } from \"@wildo-ai/saas-frontend-lib\";\nimport { DisplayField, DisplayLayout, FormField, FormLayout, ObjectScope, RelatedResourceSections, Section, SummaryLayout, SummaryFlow, SummaryMeta, SummaryTitle } from \"@wildo-ai/saas-frontend-lib\";\nimport {\n BadgeSemanticVariant,\n DisplayChromeMode,\n EditChromeMode,\n EnumDisplayMode,\n SectionMode,\n StringDisplayMode,\n StringEditMode,\n FileDisplayPresentation,\n FileMediaShape,\n FileMediaSize,\n} from \"@wildo-ai/zod-decorators\";\nimport {\n CoreResourceType as R,\n CoreResourceOperation as Op,\n UserStatus,\n UserSelf_Operations,\n UserSelfPreferences_Operations,\n Users_Operations,\n userSelfResourceConfiguration_InitializationFactory as userSelfFactory,\n userSelfProfilesResourceConfiguration_InitializationFactory as userSelfProfilesFactory,\n userSelfPreferencesResourceConfiguration_InitializationFactory as userSelfPreferencesFactory,\n usersResourceConfiguration_InitializationFactory as usersFactory,\n anonymousUsersResourceConfiguration_InitializationFactory as anonymousUsersFactory,\n userProfilesResourceConfiguration_InitializationFactory as userProfilesFactory,\n userPreferencesResourceConfiguration_InitializationFactory as userPreferencesFactory,\n userFeaturesResourceConfiguration_InitializationFactory as userFeaturesFactory,\n UserSchema,\n UserProfileSchema,\n UserPreferencesSchema,\n AnonymousUserSchema,\n ScopeFeaturesWithOverridesSchema,\n} from \"@wildo-ai/saas-models\";\nimport { Ban, KeyRound, Power, PowerOff, RotateCcw, ShieldMinus, ShieldPlus, UserCheck } from \"lucide-react\";\nimport { addressable, notAddressable, apiOnly } from \"./resource.config.utils\";\n\n/**\n * Identity & Users — Resource frontend presets\n *\n * **Main:** USER_SELF, USER_SELF_PROFILES, USER_SELF_PREFERENCES, USERS (read-only for\n * mentions/assignments), ANONYMOUS_USERS, USER_FEATURES. End users use the `_SELF` variants\n * for their own profiles/preferences — USER_PROFILES and USER_PREFERENCES are **admin-only**.\n *\n * **Admin:** USERS (LIST addressable — user management page), USER_PROFILES, USER_PREFERENCES,\n * ANONYMOUS_USERS, USER_FEATURES.\n *\n * Field-level `{primitive}UI` follows the billing convention: inline `values` for enums, and\n * `showDescription: true`. Layout templates are implemented inline in each resource config.\n */\n\nexport const usersMainResourceUIBehavior = resourceUIBehavior(usersFactory, UserSchema, ({ schemaShape }) => ({\n icon: StandardIconReference.USERS,\n layout: {\n refs: { sections: [\"overview\", \"access\", \"lifecycle\"] },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"email\" />\n <DisplayField name=\"status\" />\n </Section>\n <Section name=\"access\">\n <DisplayField name=\"appRoles\" />\n <DisplayField name=\"userTypes\" />\n </Section>\n <Section name=\"lifecycle\">\n <DisplayField name=\"createdAt\" />\n <DisplayField name=\"updatedAt\" />\n </Section>\n {/*\n Composes NO children. A user's owned children here are membership rows,\n invoice/usage records and the guidance / progression / lifecycle state\n machinery — none of which belongs on the user's own record. The ADMIN\n variant extends this display and names the two it does show.\n */}\n <RelatedResourceSections config={{ mode: SectionMode.INLINE }} targets={[]} />\n </DisplayLayout>\n ),\n summary: () => (\n <SummaryLayout>\n <SummaryTitle name=\"email\" />\n <SummaryMeta>\n <DisplayField name=\"status\" />\n <DisplayField name=\"createdAt\" />\n </SummaryMeta>\n </SummaryLayout>\n ),\n edit: () => (\n <FormLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <FormField name=\"email\" />\n <FormField name=\"status\" />\n </Section>\n <Section name=\"access\">\n <FormField name=\"appRoles\" />\n <FormField name=\"userTypes\" />\n </Section>\n </FormLayout>\n ),\n },\n fields: {\n status: schemaShape.status.enumUI({\n display: { displayMode: EnumDisplayMode.BADGE, showDescription: true },\n edit: { showDescription: true },\n values: {\n [UserStatus.ACTIVE]: { color: BadgeSemanticVariant.SUCCESS },\n [UserStatus.INACTIVE]: { color: BadgeSemanticVariant.SECONDARY },\n [UserStatus.SUSPENDED]: { color: BadgeSemanticVariant.DESTRUCTIVE },\n [UserStatus.PENDING_VERIFICATION]: { color: BadgeSemanticVariant.WARNING },\n [UserStatus.PENDING_INVITATION]: { color: BadgeSemanticVariant.INFO },\n [UserStatus.DELETED]: { color: BadgeSemanticVariant.DESTRUCTIVE },\n },\n }),\n },\n getFrontendResourceLabel: ({ currentObject }) => currentObject.email,\n views: [[Op.READ, notAddressable()]],\n}));\n\nexport const usersAdminResourceUIBehavior = resourceUIBehaviorFrom(usersFactory, usersMainResourceUIBehavior, ({ base, opsVariantResolver }) => ({\n icon: base.icon,\n getFrontendResourceLabel: base.getFrontendResourceLabel,\n // Extends the shared base display: both variants use one layout object but\n // compose different children — the base none, this one the profile and\n // preference records an operator manages. Both are 1:1, so they render through\n // READ rather than a collection LIST.\n layout: {\n ...base.layout,\n display: () => {\n const BaseDisplay = base.layout!.display!;\n return (\n <>\n <BaseDisplay />\n <RelatedResourceSections\n config={{ mode: SectionMode.INLINE }}\n targets={[\n { resourceType: R.USER_PROFILES, operationLike: Op.READ },\n { resourceType: R.USER_PREFERENCES, operationLike: Op.READ },\n ]}\n />\n </>\n );\n },\n },\n fields: base.fields,\n views: [\n [opsVariantResolver(Op.READ, \"admin\"), notAddressable()],\n [opsVariantResolver(Op.LIST, \"admin\"), addressable()],\n [opsVariantResolver(Op.SEARCH, \"admin\"), notAddressable()],\n // CREATE has a form view but its action is suppressed here: users self-signup\n // or are invited — admin direct-create is a high-risk path, not a list action.\n [Op.CREATE, notAddressable({ actionVisibility: ActionVisibility.HIDDEN })],\n [Op.UPDATE, notAddressable()],\n [Op.DELETE, notAddressable()],\n [Users_Operations.ASSIGN_ROLES, notAddressable({ iconOverride: ShieldPlus })],\n [Users_Operations.REVOKE_ROLES, notAddressable({ iconOverride: ShieldMinus })],\n [Users_Operations.SUSPEND_USER, notAddressable({ iconOverride: Ban })],\n [Users_Operations.UNSUSPEND_USER, notAddressable({ iconOverride: UserCheck })],\n // The only door back from a SELF-deactivated account (#430). Surfaced beside `unsuspend_user`\n // because the two are the same shape of administrative reinstatement over disjoint source\n // states; the resource specification documents it in its frontend views, and the merged frontend\n // configuration is what that documentation is validated against at spec load — omitting it here\n // is an ESM-import throw that crash-loops every companion.\n [Users_Operations.REACTIVATE_USER, notAddressable({ iconOverride: RotateCcw })],\n [Users_Operations.FORCE_PASSWORD_RESET, notAddressable({ iconOverride: KeyRound })],\n ],\n}));\n\nexport function buildIdentityMainPresets(): Partial<ResourceUIBehavior> {\n return {\n [R.USER_SELF]: resourceUIBehavior(userSelfFactory, UserSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: StandardIconReference.USER,\n getFrontendResourceLabel: ({ currentObject }) => currentObject.email,\n layout: {\n refs: { sections: [\"overview\", \"access\", \"lifecycle\"] },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"email\" />\n <DisplayField name=\"status\" />\n </Section>\n <Section name=\"access\">\n <DisplayField name=\"appRoles\" />\n <DisplayField name=\"userTypes\" />\n </Section>\n <Section name=\"lifecycle\">\n <DisplayField name=\"createdAt\" />\n <DisplayField name=\"updatedAt\" />\n </Section>\n {/*\n A user's own record shows the organizations they belong to. Their\n self profile and preference rows are NOT composed here: both have\n dedicated settings surfaces, and repeating them would show the same\n record twice under one page.\n */}\n <RelatedResourceSections\n config={{ mode: SectionMode.TABS }}\n targets={[R.ORGANIZATION_MEMBERS]}\n />\n </DisplayLayout>\n ),\n summary: () => (\n <SummaryLayout>\n <SummaryTitle name=\"email\" />\n <SummaryMeta>\n <DisplayField name=\"status\" />\n <DisplayField name=\"createdAt\" />\n </SummaryMeta>\n </SummaryLayout>\n ),\n edit: () => (\n <FormLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <FormField name=\"email\" />\n <FormField name=\"status\" />\n </Section>\n <Section name=\"access\">\n <FormField name=\"appRoles\" />\n <FormField name=\"userTypes\" />\n </Section>\n </FormLayout>\n ),\n },\n views: [\n [Op.READ, notAddressable()],\n [Op.UPDATE, notAddressable()],\n // Profile / preferences edits ride the dedicated `USER_SELF_PROFILES` /\n // `USER_SELF_PREFERENCES` child resources declared below — the `UPDATE_PROFILE` /\n // `UPDATE_PREFERENCES` verbs were removed on 2026-08-01 (they declared another\n // resource's schema, so they answered 200 having persisted nothing).\n // No self-delete action: `DELETE_ACCOUNT` was removed on 2026-08-01 — data-subject erasure\n // is a system-level API with no route. See the `UserSelf_Operations` enum comment.\n [UserSelf_Operations.DEACTIVATE_ACCOUNT, notAddressable({ iconOverride: PowerOff })],\n [UserSelf_Operations.REACTIVATE_ACCOUNT, notAddressable({ iconOverride: Power })],\n ],\n })),\n\n [R.USER_SELF_PROFILES]: resourceUIBehavior(userSelfProfilesFactory, UserProfileSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: StandardIconReference.PROFILE,\n getFrontendResourceLabel: ({ currentObject }) => `${currentObject.firstName} ${currentObject.lastName}`.trim(),\n layout: {\n // Flat, sectionless profile: a single settings-row list (no cards, no\n // section headers). The old identity/contact/profile grouping added\n // visual chrome without semantic value on a short self-profile form.\n refs: { sections: [] },\n // Settings-page chrome (Settings Hub → Profile): label-left / value-right rows.\n defaultChromeMode: { display: DisplayChromeMode.SETTINGS_ROW, summary: DisplayChromeMode.INLINE, edit: EditChromeMode.SETTINGS_ROW },\n // A person’s own profile — their name, photo and contact details. A settings pane is a list of decisions an operator came to TAKE, so its\n // writable fields are offered in place rather than behind a whole-pane edit mode. The set is\n // DERIVED (not primary key, not excludeFromUpdate, not hidden, not opted out), so a field\n // added to this schema tomorrow is covered without anyone remembering to decorate it.\n defaultInlineEdit: ResourceLayoutInlineEditDefault.WRITABLE_FIELDS,\n // And its empty rows say WHICH emptiness they are — \"None yet\" for a list with no members,\n // \"Not available\" for a computed value, \"No value\" for a field awaiting input — instead of one\n // em dash standing for all three. The surface policy's dash is right where a reader is scanning;\n // on a settings row, which is read one at a time to decide something, it is an answer that\n // refuses to answer.\n defaultEmptyValue: 'placeholder',\n display: () => (\n <DisplayLayout>\n <DisplayField name=\"displayName\" />\n <DisplayField name=\"firstName\" />\n <DisplayField name=\"lastName\" />\n <DisplayField name=\"title\" />\n <DisplayField name=\"avatar\" />\n <DisplayField name=\"phoneNumber\" />\n <DisplayField name=\"bio\" />\n </DisplayLayout>\n ),\n summary: () => (\n <SummaryLayout>\n <SummaryTitle name=\"displayName\" />\n <SummaryMeta>\n <DisplayField name=\"firstName\" />\n <DisplayField name=\"lastName\" />\n </SummaryMeta>\n </SummaryLayout>\n ),\n edit: () => (\n <FormLayout>\n <FormField name=\"displayName\" />\n <FormField name=\"firstName\" />\n <FormField name=\"lastName\" />\n <FormField name=\"title\" />\n <FormField name=\"avatar\" />\n <FormField name=\"phoneNumber\" />\n <FormField name=\"bio\" />\n </FormLayout>\n ),\n },\n fields: {\n // Title is optional metadata — hide the row on the READ view until set\n // (the edit form still renders it so it can be filled).\n title: schemaShape.title.stringUI({ display: { hideWhenEmpty: true } }),\n // Avatar renders INLINE as a small CIRCLE on display (opt-in), no caption — the\n // natural profile-picture look. Bytes are fetched over the authenticated\n // resource-integrated serve route (authz inherits the profile READ); without the\n // opt-in a file field shows the neutral file card.\n avatar: schemaShape.avatar.fileUI({\n display: {\n presentation: FileDisplayPresentation.THUMBNAIL,\n preview: { shape: FileMediaShape.CIRCLE, size: FileMediaSize.MD, showCaption: false },\n },\n }),\n // Bio is long-form prose: rich markdown on display, a markdown SOURCE\n // editor (syntax-tinted, CodeMirror-backed, lazy-loaded) on edit.\n // The edit control opts OUT of the layout's SETTINGS_ROW default\n // (label-left / narrow end column): long-form writing needs the full row\n // width, so the field authors STACKED — label above, editor spanning.\n bio: schemaShape.bio.stringUI({\n display: { displayMode: StringDisplayMode.MARKDOWN, hideWhenEmpty: true },\n edit: { editMode: StringEditMode.MARKDOWN, chromeMode: EditChromeMode.STACKED },\n }),\n },\n views: [\n [Op.READ, notAddressable()],\n // Self-profile is auto-created on signup — headless (callable via API, no view).\n [Op.CREATE, apiOnly()],\n [Op.UPDATE, notAddressable()],\n ],\n })),\n\n [R.USER_SELF_PREFERENCES]: resourceUIBehavior(userSelfPreferencesFactory, UserPreferencesSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: StandardIconReference.SETTINGS,\n layout: {\n // Settings-page sections — each preference GROUP is its own CARD so the\n // Settings Hub → Preferences page reads as distinct titled blocks\n // (Notifications / Privacy / Regional / Language) rather than one flat\n // list. `appearance` (UI theme) is intentionally NOT a section here — see\n // the omission note in the display/edit templates.\n refs: { sections: [\"notifications\", \"privacy\", \"regional\", \"language\"] },\n // Settings-page chrome (Settings Hub → Preferences): label-left / value-right rows.\n defaultChromeMode: { display: DisplayChromeMode.SETTINGS_ROW, summary: DisplayChromeMode.INLINE, edit: EditChromeMode.SETTINGS_ROW },\n // A person’s own preferences — the canonical settings record. A settings pane is a list of decisions an operator came to TAKE, so its\n // writable fields are offered in place rather than behind a whole-pane edit mode. The set is\n // DERIVED (not primary key, not excludeFromUpdate, not hidden, not opted out), so a field\n // added to this schema tomorrow is covered without anyone remembering to decorate it.\n defaultInlineEdit: ResourceLayoutInlineEditDefault.WRITABLE_FIELDS,\n // And its empty rows say WHICH emptiness they are — \"None yet\" for a list with no members,\n // \"Not available\" for a computed value, \"No value\" for a field awaiting input — instead of one\n // em dash standing for all three. The surface policy's dash is right where a reader is scanning;\n // on a settings row, which is read one at a time to decide something, it is an answer that\n // refuses to answer.\n defaultEmptyValue: 'placeholder',\n display: () => (\n <DisplayLayout>\n <Section name=\"notifications\" appearance={SectionMode.CARD}>\n <ObjectScope name=\"notifications\">\n <DisplayField name=\"email\" />\n <DisplayField name=\"push\" />\n <DisplayField name=\"sms\" />\n <DisplayField name=\"inApp\" />\n </ObjectScope>\n </Section>\n {/*\n Privacy contains only the user-facing preference decisions below. Governed\n notice, contract and consent interactions are exact-release records in a separate\n runtime boundary and must never be rendered or edited as preference members.\n */}\n <Section name=\"privacy\" appearance={SectionMode.CARD}>\n <ObjectScope name=\"privacy\">\n <DisplayField name=\"consentedPurposes\" />\n <DisplayField name=\"consentDecidedAt\" />\n </ObjectScope>\n </Section>\n {/*\n UI theme is intentionally OMITTED from this preferences page. The\n dedicated \"Appearance\" Settings-Hub panel (AppPage_AppearanceSettings)\n owns theme selection — surfacing `ui.theme` here too duplicated the\n same control on two surfaces. The `ui` field remains in the schema and\n the summary projection as the persisted value; only the editable\n duplicate on this page is removed. (If theme should instead be owned\n here and the Appearance panel retired, flip this and remove that panel.)\n */}\n <Section name=\"regional\" appearance={SectionMode.CARD}>\n <ObjectScope name=\"regional\">\n <DisplayField name=\"timezone\" />\n <DisplayField name=\"dateFormat\" />\n <DisplayField name=\"timeFormat\" />\n <DisplayField name=\"locale\" />\n </ObjectScope>\n </Section>\n <Section name=\"language\" appearance={SectionMode.CARD}>\n <ObjectScope name=\"languagePreferences\">\n <DisplayField name=\"primaryLanguage\" />\n <DisplayField name=\"fallbackLanguages\" />\n <DisplayField name=\"autoDetect\" />\n <DisplayField name=\"useOrganizationDefault\" />\n </ObjectScope>\n </Section>\n </DisplayLayout>\n ),\n summary: () => (\n <SummaryLayout flow={SummaryFlow.ROW}>\n <ObjectScope name=\"ui\">\n <DisplayField name=\"theme\" />\n </ObjectScope>\n <ObjectScope name=\"regional\">\n <DisplayField name=\"timezone\" />\n <DisplayField name=\"locale\" />\n </ObjectScope>\n <ObjectScope name=\"languagePreferences\">\n <DisplayField name=\"primaryLanguage\" />\n </ObjectScope>\n </SummaryLayout>\n ),\n edit: () => (\n <FormLayout>\n <Section name=\"notifications\" appearance={SectionMode.CARD}>\n <ObjectScope name=\"notifications\">\n <FormField name=\"email\" />\n <FormField name=\"push\" />\n <FormField name=\"sms\" />\n <FormField name=\"inApp\" />\n </ObjectScope>\n </Section>\n {/* Privacy: edit only the consent SETTINGS — see the display layout note above. */}\n <Section name=\"privacy\" appearance={SectionMode.CARD}>\n <ObjectScope name=\"privacy\">\n {/*\n `consentDecidedAt` is NOT editable here: it records WHEN the person decided, and the\n consent gate and prompt stamp it. A form field would let anyone type a decision instant.\n */}\n <FormField name=\"consentedPurposes\" />\n </ObjectScope>\n </Section>\n {/* UI theme intentionally OMITTED — owned by the Appearance Settings-Hub\n panel; see the display-template omission note above. */}\n <Section name=\"regional\" appearance={SectionMode.CARD}>\n <ObjectScope name=\"regional\">\n <FormField name=\"timezone\" />\n <FormField name=\"dateFormat\" />\n <FormField name=\"timeFormat\" />\n <FormField name=\"locale\" />\n </ObjectScope>\n </Section>\n <Section name=\"language\" appearance={SectionMode.CARD}>\n <ObjectScope name=\"languagePreferences\">\n <FormField name=\"primaryLanguage\" />\n <FormField name=\"fallbackLanguages\" />\n <FormField name=\"autoDetect\" />\n <FormField name=\"useOrganizationDefault\" />\n </ObjectScope>\n </Section>\n </FormLayout>\n ),\n },\n views: [\n [Op.READ, notAddressable()],\n [Op.UPDATE, notAddressable()],\n [UserSelfPreferences_Operations.RESET_TO_DEFAULTS, notAddressable({ iconOverride: RotateCcw })],\n ],\n })),\n\n [R.USERS]: usersMainResourceUIBehavior,\n\n [R.ANONYMOUS_USERS]: resourceUIBehavior(anonymousUsersFactory, AnonymousUserSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: StandardIconReference.USER,\n layout: {\n refs: { sections: [\"overview\", \"privacy\", \"context\"] },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"transpositionStatus\" />\n <DisplayField name=\"convertedToUserId\" />\n <DisplayField name=\"createdAt\" />\n </Section>\n <Section name=\"privacy\">\n <DisplayField name=\"privacy\" />\n </Section>\n <Section name=\"context\">\n <DisplayField name=\"userAgent\" />\n <DisplayField name=\"ipHash\" />\n </Section>\n </DisplayLayout>\n ),\n summary: () => (\n <SummaryLayout flow={SummaryFlow.ROW}>\n <DisplayField name=\"transpositionStatus\" />\n <DisplayField name=\"createdAt\" />\n </SummaryLayout>\n ),\n },\n views: [[Op.READ, notAddressable()]],\n })),\n\n [R.USER_FEATURES]: resourceUIBehavior(userFeaturesFactory, ScopeFeaturesWithOverridesSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n layout: {\n refs: { sections: [\"overview\", \"overrides\"] },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"features\" />\n <DisplayField name=\"limits\" />\n </Section>\n <Section name=\"overrides\">\n <ObjectScope name=\"manualOverrides\">\n <DisplayField name=\"addedFeatures\" />\n <DisplayField name=\"removedFeatures\" />\n <DisplayField name=\"limitOverrides\" />\n </ObjectScope>\n </Section>\n </DisplayLayout>\n ),\n summary: () => (\n <SummaryLayout>\n <DisplayField name=\"features\" />\n <DisplayField name=\"limits\" />\n </SummaryLayout>\n ),\n edit: () => (\n <FormLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <FormField name=\"features\" />\n <FormField name=\"limits\" />\n </Section>\n <Section name=\"overrides\">\n <ObjectScope name=\"manualOverrides\">\n <FormField name=\"addedFeatures\" />\n <FormField name=\"removedFeatures\" />\n <FormField name=\"limitOverrides\" />\n </ObjectScope>\n </Section>\n </FormLayout>\n ),\n },\n views: [\n [Op.READ, notAddressable()],\n [Op.SEARCH, notAddressable()],\n ],\n })),\n };\n}\n\nexport function buildIdentityAdminPresets(main: Partial<ResourceUIBehavior>): Partial<ResourceUIBehavior> {\n return {\n [R.USERS]: usersAdminResourceUIBehavior,\n\n [R.ANONYMOUS_USERS]: resourceUIBehaviorFrom(anonymousUsersFactory, main[R.ANONYMOUS_USERS]!, ({ base }) => ({\n icon: base.icon,\n layout: base.layout,\n views: [[Op.LIST, notAddressable()]],\n })),\n\n [R.USER_PROFILES]: resourceUIBehavior(userProfilesFactory, UserProfileSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: StandardIconReference.PROFILE,\n getFrontendResourceLabel: ({ currentObject }) => `${currentObject.firstName} ${currentObject.lastName}`.trim(),\n layout: main[R.USER_SELF_PROFILES]?.layout,\n views: [\n [opsVariantResolver(Op.READ, \"admin\"), notAddressable()],\n [opsVariantResolver(Op.SEARCH, \"admin\"), notAddressable()],\n // Profiles are created programmatically alongside the user — headless (API-only).\n [opsVariantResolver(Op.CREATE, \"admin\"), apiOnly()],\n [opsVariantResolver(Op.UPDATE, \"admin\"), notAddressable()],\n [opsVariantResolver(Op.DELETE, \"admin\"), notAddressable()],\n ],\n })),\n\n [R.USER_PREFERENCES]: resourceUIBehavior(userPreferencesFactory, UserPreferencesSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: StandardIconReference.SETTINGS,\n layout: main[R.USER_SELF_PREFERENCES]?.layout,\n views: [\n [opsVariantResolver(Op.READ, \"admin\"), notAddressable()],\n [opsVariantResolver(Op.UPDATE, \"admin\"), notAddressable()],\n ],\n })),\n\n [R.USER_FEATURES]: resourceUIBehaviorFrom(userFeaturesFactory, main[R.USER_FEATURES]!, ({ base }) => ({\n icon: base.icon,\n layout: base.layout,\n views: [[Op.UPDATE, notAddressable()]],\n })),\n };\n}\n\nexport const identityMainPresets = buildIdentityMainPresets();\nexport const identityAdminPresets = buildIdentityAdminPresets(identityMainPresets);\n\n// Named re-exports for `*.resource.specification.ts` (mergeResourceFrontendConfigurations + `codeHandling.frontendConfigurationSources`).\nexport const userSelfResourceUIBehavior = identityMainPresets[R.USER_SELF]!;\nexport const userSelfProfilesResourceUIBehavior = identityMainPresets[R.USER_SELF_PROFILES]!;\nexport const userSelfPreferencesResourceUIBehavior = identityMainPresets[R.USER_SELF_PREFERENCES]!;\nexport const anonymousUsersMainResourceUIBehavior = identityMainPresets[R.ANONYMOUS_USERS]!;\nexport const anonymousUsersAdminResourceUIBehavior = identityAdminPresets[R.ANONYMOUS_USERS]!;\nexport const userProfilesResourceUIBehavior = identityAdminPresets[R.USER_PROFILES]!;\nexport const userPreferencesResourceUIBehavior = identityAdminPresets[R.USER_PREFERENCES]!;\nexport const userFeaturesMainResourceUIBehavior = identityMainPresets[R.USER_FEATURES]!;\nexport const userFeaturesAdminResourceUIBehavior = identityAdminPresets[R.USER_FEATURES]!;\n"]}
1
+ {"version":3,"file":"identity.resource-presets.js","sourceRoot":"","sources":["../../../../../src/config/resources/identity.resource-presets.tsx"],"names":[],"mappings":";AAEA,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,+BAA+B,EAAE,MAAM,6BAA6B,CAAC;AACnK,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,SAAS,EAAE,UAAU,EAAE,WAAW,EAAE,uBAAuB,EAAE,OAAO,EAAE,aAAa,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAC;AACvM,OAAO,EACL,oBAAoB,EACpB,iBAAiB,EACjB,cAAc,EACd,eAAe,EACf,WAAW,EACX,iBAAiB,EACjB,cAAc,EACd,uBAAuB,EACvB,cAAc,EACd,aAAa,GACd,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,gBAAgB,IAAI,CAAC,EACrB,qBAAqB,IAAI,EAAE,EAC3B,UAAU,EACV,mBAAmB,EACnB,8BAA8B,EAC9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M,CAAC,MAAM,8BAA8B,GAAG,oBAAoB,CAAC,CAAC,CAAC,aAAa,CAAE,CAAC;AACrF,MAAM,CAAC,MAAM,iCAAiC,GAAG,oBAAoB,CAAC,CAAC,CAAC,gBAAgB,CAAE,CAAC;AAC3F,MAAM,CAAC,MAAM,kCAAkC,GAAG,mBAAmB,CAAC,CAAC,CAAC,aAAa,CAAE,CAAC;AACxF,MAAM,CAAC,MAAM,mCAAmC,GAAG,oBAAoB,CAAC,CAAC,CAAC,aAAa,CAAE,CAAC","sourcesContent":["import React from \"react\";\nimport type { ResourceUIBehavior } from \"@wildo-ai/saas-frontend-lib\";\nimport { resourceUIBehavior, resourceUIBehaviorFrom, StandardIconReference, ActionVisibility, ResourceLayoutInlineEditDefault } from \"@wildo-ai/saas-frontend-lib\";\nimport { DisplayField, DisplayLayout, FormField, FormLayout, ObjectScope, RelatedResourceSections, Section, SummaryLayout, SummaryFlow, SummaryMeta, SummaryTitle } from \"@wildo-ai/saas-frontend-lib\";\nimport {\n BadgeSemanticVariant,\n DisplayChromeMode,\n EditChromeMode,\n EnumDisplayMode,\n SectionMode,\n StringDisplayMode,\n StringEditMode,\n FileDisplayPresentation,\n FileMediaShape,\n FileMediaSize,\n} from \"@wildo-ai/zod-decorators\";\nimport {\n CoreResourceType as R,\n CoreResourceOperation as Op,\n UserStatus,\n UserSelf_Operations,\n UserSelfPreferences_Operations,\n Users_Operations,\n userSelfResourceConfiguration_InitializationFactory as userSelfFactory,\n userSelfProfilesResourceConfiguration_InitializationFactory as userSelfProfilesFactory,\n userSelfPreferencesResourceConfiguration_InitializationFactory as userSelfPreferencesFactory,\n usersResourceConfiguration_InitializationFactory as usersFactory,\n anonymousUsersResourceConfiguration_InitializationFactory as anonymousUsersFactory,\n userProfilesResourceConfiguration_InitializationFactory as userProfilesFactory,\n userPreferencesResourceConfiguration_InitializationFactory as userPreferencesFactory,\n userFeaturesResourceConfiguration_InitializationFactory as userFeaturesFactory,\n UserSchema,\n UserProfileSchema,\n UserPreferencesSchema,\n AnonymousUserSchema,\n ScopeFeaturesWithOverridesSchema,\n} from \"@wildo-ai/saas-models\";\nimport type { UserProfile } from \"@wildo-ai/saas-models\";\nimport { Ban, KeyRound, Power, PowerOff, RotateCcw, ShieldMinus, ShieldPlus, UserCheck } from \"lucide-react\";\nimport { addressable, notAddressable, apiOnly } from \"./resource.config.utils\";\n\n/**\n * Identity & Users — Resource frontend presets\n *\n * **Main:** USER_SELF, USER_SELF_PROFILES, USER_SELF_PREFERENCES, USERS (read-only for\n * mentions/assignments), ANONYMOUS_USERS, USER_FEATURES. End users use the `_SELF` variants\n * for their own profiles/preferences — USER_PROFILES and USER_PREFERENCES are **admin-only**.\n *\n * **Admin:** USERS (LIST addressable — user management page), USER_PROFILES, USER_PREFERENCES,\n * ANONYMOUS_USERS, USER_FEATURES.\n *\n * Field-level `{primitive}UI` follows the billing convention: inline `values` for enums, and\n * `showDescription: true`. Layout templates are implemented inline in each resource config.\n */\n\n/**\n * The name a profile is shown under — its header and its card title, for both the self and the admin\n * variant (they share one layout, so they must share one name).\n *\n * The name a person CHOSE to be shown wins over the one assembled from its legal parts: `displayName`\n * is optional and exists precisely to override \"first last\". Falling back keeps every profile named,\n * since both halves are required.\n */\nfunction resolveUserProfileName(profile: Pick<UserProfile, 'firstName' | 'lastName' | 'displayName'>): string {\n return profile.displayName?.trim() || `${profile.firstName} ${profile.lastName}`.trim();\n}\n\nexport const usersMainResourceUIBehavior = resourceUIBehavior(usersFactory, UserSchema, ({ schemaShape }) => ({\n icon: StandardIconReference.USERS,\n layout: {\n refs: { sections: [\"overview\", \"access\", \"lifecycle\"] },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"email\" />\n <DisplayField name=\"status\" />\n </Section>\n <Section name=\"access\">\n <DisplayField name=\"appRoles\" />\n <DisplayField name=\"userTypes\" />\n </Section>\n <Section name=\"lifecycle\">\n <DisplayField name=\"createdAt\" />\n <DisplayField name=\"updatedAt\" />\n </Section>\n {/*\n Composes NO children. A user's owned children here are membership rows,\n invoice/usage records and the guidance / progression / lifecycle state\n machinery — none of which belongs on the user's own record. The ADMIN\n variant extends this display and names the two it does show.\n */}\n <RelatedResourceSections config={{ mode: SectionMode.INLINE }} targets={[]} />\n </DisplayLayout>\n ),\n summary: () => (\n <SummaryLayout>\n <SummaryTitle name=\"email\" />\n <SummaryMeta>\n <DisplayField name=\"status\" />\n <DisplayField name=\"createdAt\" />\n </SummaryMeta>\n </SummaryLayout>\n ),\n edit: () => (\n <FormLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <FormField name=\"email\" />\n <FormField name=\"status\" />\n </Section>\n <Section name=\"access\">\n <FormField name=\"appRoles\" />\n <FormField name=\"userTypes\" />\n </Section>\n </FormLayout>\n ),\n },\n fields: {\n status: schemaShape.status.enumUI({\n display: { displayMode: EnumDisplayMode.BADGE, showDescription: true },\n edit: { showDescription: true },\n values: {\n [UserStatus.ACTIVE]: { color: BadgeSemanticVariant.SUCCESS },\n [UserStatus.INACTIVE]: { color: BadgeSemanticVariant.SECONDARY },\n [UserStatus.SUSPENDED]: { color: BadgeSemanticVariant.DESTRUCTIVE },\n [UserStatus.PENDING_VERIFICATION]: { color: BadgeSemanticVariant.WARNING },\n [UserStatus.PENDING_INVITATION]: { color: BadgeSemanticVariant.INFO },\n [UserStatus.DELETED]: { color: BadgeSemanticVariant.DESTRUCTIVE },\n },\n }),\n },\n getFrontendResourceLabel: ({ currentObject }) => currentObject.email,\n views: [[Op.READ, notAddressable()]],\n}));\n\nexport const usersAdminResourceUIBehavior = resourceUIBehaviorFrom(usersFactory, usersMainResourceUIBehavior, ({ base, opsVariantResolver }) => ({\n icon: base.icon,\n getFrontendResourceLabel: base.getFrontendResourceLabel,\n // Extends the shared base display: both variants use one layout object but\n // compose different children — the base none, this one the profile and\n // preference records an operator manages. Both are 1:1, so they render through\n // READ rather than a collection LIST.\n layout: {\n ...base.layout,\n display: () => {\n const BaseDisplay = base.layout!.display!;\n return (\n <>\n <BaseDisplay />\n <RelatedResourceSections\n config={{ mode: SectionMode.INLINE }}\n targets={[\n { resourceType: R.USER_PROFILES, operationLike: Op.READ },\n { resourceType: R.USER_PREFERENCES, operationLike: Op.READ },\n ]}\n />\n </>\n );\n },\n },\n fields: base.fields,\n views: [\n [opsVariantResolver(Op.READ, \"admin\"), notAddressable()],\n [opsVariantResolver(Op.LIST, \"admin\"), addressable()],\n [opsVariantResolver(Op.SEARCH, \"admin\"), notAddressable()],\n // CREATE has a form view but its action is suppressed here: users self-signup\n // or are invited — admin direct-create is a high-risk path, not a list action.\n [Op.CREATE, notAddressable({ actionVisibility: ActionVisibility.HIDDEN })],\n [Op.UPDATE, notAddressable()],\n [Op.DELETE, notAddressable()],\n [Users_Operations.ASSIGN_ROLES, notAddressable({ iconOverride: ShieldPlus })],\n [Users_Operations.REVOKE_ROLES, notAddressable({ iconOverride: ShieldMinus })],\n [Users_Operations.SUSPEND_USER, notAddressable({ iconOverride: Ban })],\n [Users_Operations.UNSUSPEND_USER, notAddressable({ iconOverride: UserCheck })],\n // The only door back from a SELF-deactivated account (#430). Surfaced beside `unsuspend_user`\n // because the two are the same shape of administrative reinstatement over disjoint source\n // states; the resource specification documents it in its frontend views, and the merged frontend\n // configuration is what that documentation is validated against at spec load — omitting it here\n // is an ESM-import throw that crash-loops every companion.\n [Users_Operations.REACTIVATE_USER, notAddressable({ iconOverride: RotateCcw })],\n [Users_Operations.FORCE_PASSWORD_RESET, notAddressable({ iconOverride: KeyRound })],\n ],\n}));\n\nexport function buildIdentityMainPresets(): Partial<ResourceUIBehavior> {\n return {\n [R.USER_SELF]: resourceUIBehavior(userSelfFactory, UserSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: StandardIconReference.USER,\n getFrontendResourceLabel: ({ currentObject }) => currentObject.email,\n layout: {\n refs: { sections: [\"overview\", \"access\", \"lifecycle\"] },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"email\" />\n <DisplayField name=\"status\" />\n </Section>\n <Section name=\"access\">\n <DisplayField name=\"appRoles\" />\n <DisplayField name=\"userTypes\" />\n </Section>\n <Section name=\"lifecycle\">\n <DisplayField name=\"createdAt\" />\n <DisplayField name=\"updatedAt\" />\n </Section>\n {/*\n A user's own record shows the organizations they belong to. Their\n self profile and preference rows are NOT composed here: both have\n dedicated settings surfaces, and repeating them would show the same\n record twice under one page.\n */}\n <RelatedResourceSections\n config={{ mode: SectionMode.TABS }}\n targets={[R.ORGANIZATION_MEMBERS]}\n />\n </DisplayLayout>\n ),\n summary: () => (\n <SummaryLayout>\n <SummaryTitle name=\"email\" />\n <SummaryMeta>\n <DisplayField name=\"status\" />\n <DisplayField name=\"createdAt\" />\n </SummaryMeta>\n </SummaryLayout>\n ),\n edit: () => (\n <FormLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <FormField name=\"email\" />\n <FormField name=\"status\" />\n </Section>\n <Section name=\"access\">\n <FormField name=\"appRoles\" />\n <FormField name=\"userTypes\" />\n </Section>\n </FormLayout>\n ),\n },\n views: [\n [Op.READ, notAddressable()],\n [Op.UPDATE, notAddressable()],\n // Profile / preferences edits ride the dedicated `USER_SELF_PROFILES` /\n // `USER_SELF_PREFERENCES` child resources declared below — the `UPDATE_PROFILE` /\n // `UPDATE_PREFERENCES` verbs were removed on 2026-08-01 (they declared another\n // resource's schema, so they answered 200 having persisted nothing).\n // No self-delete action: `DELETE_ACCOUNT` was removed on 2026-08-01 — data-subject erasure\n // is a system-level API with no route. See the `UserSelf_Operations` enum comment.\n [UserSelf_Operations.DEACTIVATE_ACCOUNT, notAddressable({ iconOverride: PowerOff })],\n [UserSelf_Operations.REACTIVATE_ACCOUNT, notAddressable({ iconOverride: Power })],\n ],\n })),\n\n [R.USER_SELF_PROFILES]: resourceUIBehavior(userSelfProfilesFactory, UserProfileSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: StandardIconReference.PROFILE,\n getFrontendResourceLabel: ({ currentObject }) => resolveUserProfileName(currentObject),\n layout: {\n // Flat, sectionless profile: a single settings-row list (no cards, no\n // section headers). The old identity/contact/profile grouping added\n // visual chrome without semantic value on a short self-profile form.\n refs: { sections: [] },\n // Settings-page chrome (Settings Hub → Profile): label-left / value-right rows on read and\n // edit. A card shows bare values — the name is the card's title and the job title needs no\n // \"Job title:\" in front of it.\n defaultChromeMode: { display: DisplayChromeMode.SETTINGS_ROW, summary: DisplayChromeMode.HIDDEN, edit: EditChromeMode.SETTINGS_ROW },\n // A person’s own profile — their name, photo and contact details. A settings pane is a list of decisions an operator came to TAKE, so its\n // writable fields are offered in place rather than behind a whole-pane edit mode. The set is\n // DERIVED (not primary key, not excludeFromUpdate, not hidden, not opted out), so a field\n // added to this schema tomorrow is covered without anyone remembering to decorate it.\n defaultInlineEdit: ResourceLayoutInlineEditDefault.WRITABLE_FIELDS,\n // And its empty rows say WHICH emptiness they are — \"None yet\" for a list with no members,\n // \"Not available\" for a computed value, \"No value\" for a field awaiting input — instead of one\n // em dash standing for all three. The surface policy's dash is right where a reader is scanning;\n // on a settings row, which is read one at a time to decide something, it is an answer that\n // refuses to answer.\n defaultEmptyValue: 'placeholder',\n // Read and edit list the fields in ONE order: the two required name parts first, then the\n // optional name that overrides them, then the rest. The read pane is edited in place, so a\n // different order on the form would move every field the moment the person opened it.\n display: () => (\n <DisplayLayout>\n <DisplayField name=\"firstName\" />\n <DisplayField name=\"lastName\" />\n <DisplayField name=\"displayName\" />\n <DisplayField name=\"title\" />\n <DisplayField name=\"avatar\" />\n <DisplayField name=\"phoneNumber\" />\n <DisplayField name=\"bio\" />\n </DisplayLayout>\n ),\n // A profile card is the person: their resolved name (display name, else first + last) as the\n // title, their job title beneath it. The name parts are NOT repeated as meta rows — they were,\n // as \"First name: …\" and \"Last name: …\" under a title already reading the same words.\n summary: () => (\n <SummaryLayout>\n <SummaryTitle />\n <SummaryMeta>\n <DisplayField name=\"title\" />\n </SummaryMeta>\n </SummaryLayout>\n ),\n edit: () => (\n <FormLayout>\n {/* The cursor lands in the first required field — opening this form is almost always to fix a name. */}\n <FormField name=\"firstName\" autoFocus />\n <FormField name=\"lastName\" />\n <FormField name=\"displayName\" />\n <FormField name=\"title\" />\n <FormField name=\"avatar\" />\n <FormField name=\"phoneNumber\" />\n <FormField name=\"bio\" />\n </FormLayout>\n ),\n },\n fields: {\n // Job title is optional. On the settings pane its empty row STAYS (\"No value\"): the pane is\n // edited in place, and a row hidden while empty is a field nobody can set without opening\n // the whole-pane form. On a card it disappears when unset — a card has no row to fill.\n title: schemaShape.title.stringUI({ summaryOverride: { hideWhenEmpty: true } }),\n // Avatar renders INLINE as a small CIRCLE on display (opt-in), no caption — the\n // natural profile-picture look. Bytes are fetched over the authenticated\n // resource-integrated serve route (authz inherits the profile READ); without the\n // opt-in a file field shows the neutral file card.\n avatar: schemaShape.avatar.fileUI({\n display: {\n presentation: FileDisplayPresentation.THUMBNAIL,\n preview: { shape: FileMediaShape.CIRCLE, size: FileMediaSize.MD, showCaption: false },\n },\n }),\n // Bio is long-form prose: rich markdown on display, a markdown SOURCE\n // editor (syntax-tinted, CodeMirror-backed, lazy-loaded) on edit.\n // The edit control opts OUT of the layout's SETTINGS_ROW default\n // (label-left / narrow end column): long-form writing needs the full row\n // width, so the field authors STACKED — label above, editor spanning.\n // Its empty row stays on the read pane for the same reason as the job title's.\n bio: schemaShape.bio.stringUI({\n display: { displayMode: StringDisplayMode.MARKDOWN },\n edit: { editMode: StringEditMode.MARKDOWN, chromeMode: EditChromeMode.STACKED },\n }),\n },\n views: [\n [Op.READ, notAddressable()],\n // Self-profile is auto-created on signup — headless (callable via API, no view).\n [Op.CREATE, apiOnly()],\n [Op.UPDATE, notAddressable()],\n ],\n })),\n\n [R.USER_SELF_PREFERENCES]: resourceUIBehavior(userSelfPreferencesFactory, UserPreferencesSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: StandardIconReference.SETTINGS,\n layout: {\n // Settings-page sections — each preference GROUP is its own CARD so the\n // Settings Hub → Preferences page reads as distinct titled blocks\n // (Notifications / Privacy / Regional / Language) rather than one flat\n // list. `appearance` (UI theme) is intentionally NOT a section here — see\n // the omission note in the display/edit templates.\n refs: { sections: [\"notifications\", \"privacy\", \"regional\", \"language\"] },\n // Settings-page chrome (Settings Hub → Preferences): label-left / value-right rows on read and\n // edit, bare values on a card (see the summary template for which values it keeps and why).\n defaultChromeMode: { display: DisplayChromeMode.SETTINGS_ROW, summary: DisplayChromeMode.HIDDEN, edit: EditChromeMode.SETTINGS_ROW },\n // A person’s own preferences — the canonical settings record. A settings pane is a list of decisions an operator came to TAKE, so its\n // writable fields are offered in place rather than behind a whole-pane edit mode. The set is\n // DERIVED (not primary key, not excludeFromUpdate, not hidden, not opted out), so a field\n // added to this schema tomorrow is covered without anyone remembering to decorate it.\n defaultInlineEdit: ResourceLayoutInlineEditDefault.WRITABLE_FIELDS,\n // And its empty rows say WHICH emptiness they are — \"None yet\" for a list with no members,\n // \"Not available\" for a computed value, \"No value\" for a field awaiting input — instead of one\n // em dash standing for all three. The surface policy's dash is right where a reader is scanning;\n // on a settings row, which is read one at a time to decide something, it is an answer that\n // refuses to answer.\n defaultEmptyValue: 'placeholder',\n // Every card keeps its heading and drops its description, on read AND on edit. The four headings\n // name their contents plainly (Notifications, Privacy, Regional, Language); the descriptions\n // under them (\"Choose how you receive notifications\") were prompts restating the heading, and\n // this pane is edited in place, so the read view is where they were read on every visit.\n display: () => (\n <DisplayLayout>\n <Section name=\"notifications\" appearance={SectionMode.CARD} hideDescription>\n <ObjectScope name=\"notifications\">\n <DisplayField name=\"email\" />\n <DisplayField name=\"inApp\" />\n </ObjectScope>\n </Section>\n {/*\n Privacy contains only the user-facing preference decisions below. Governed\n notice, contract and consent interactions are exact-release records in a separate\n runtime boundary and must never be rendered or edited as preference members.\n */}\n <Section name=\"privacy\" appearance={SectionMode.CARD} hideDescription>\n <ObjectScope name=\"privacy\">\n <DisplayField name=\"consentedPurposes\" />\n <DisplayField name=\"consentDecidedAt\" />\n </ObjectScope>\n </Section>\n {/*\n UI theme is intentionally OMITTED from this preferences page. The\n dedicated \"Appearance\" Settings-Hub panel (AppPage_AppearanceSettings)\n owns theme selection — surfacing `ui.theme` here too duplicated the\n same control on two surfaces. The `ui` field remains in the schema and\n the summary projection as the persisted value; only the editable\n duplicate on this page is removed. (If theme should instead be owned\n here and the Appearance panel retired, flip this and remove that panel.)\n */}\n <Section name=\"regional\" appearance={SectionMode.CARD} hideDescription>\n <ObjectScope name=\"regional\">\n <DisplayField name=\"timezone\" />\n <DisplayField name=\"dateFormat\" />\n <DisplayField name=\"timeFormat\" />\n <DisplayField name=\"locale\" />\n </ObjectScope>\n </Section>\n <Section name=\"language\" appearance={SectionMode.CARD} hideDescription>\n <ObjectScope name=\"languagePreferences\">\n <DisplayField name=\"primaryLanguage\" />\n <DisplayField name=\"fallbackLanguages\" />\n <DisplayField name=\"useOrganizationDefault\" />\n </ObjectScope>\n </Section>\n </DisplayLayout>\n ),\n // A card carries only values that read unambiguously bare: the time zone (\"UTC\") and the\n // interface language (\"English\"). The theme (\"System\") and the formatting locale were dropped\n // rather than labelled — a bare \"System\" names nothing, and the locale usually reads as the SAME\n // word as the language beside it (\"English · English\"). The locale stays on the read pane; the theme\n // is shown and chosen on the Appearance panel that owns it.\n summary: () => (\n <SummaryLayout flow={SummaryFlow.ROW}>\n <ObjectScope name=\"regional\">\n <DisplayField name=\"timezone\" />\n </ObjectScope>\n <ObjectScope name=\"languagePreferences\">\n <DisplayField name=\"primaryLanguage\" />\n </ObjectScope>\n </SummaryLayout>\n ),\n edit: () => (\n <FormLayout>\n <Section name=\"notifications\" appearance={SectionMode.CARD} hideDescription>\n <ObjectScope name=\"notifications\">\n <FormField name=\"email\" />\n <FormField name=\"inApp\" />\n </ObjectScope>\n </Section>\n {/* Privacy: edit only the consent SETTINGS — see the display layout note above. */}\n <Section name=\"privacy\" appearance={SectionMode.CARD} hideDescription>\n <ObjectScope name=\"privacy\">\n {/*\n `consentDecidedAt` is NOT editable here: it records WHEN the person decided, and the\n consent gate and prompt stamp it. A form field would let anyone type a decision instant.\n */}\n <FormField name=\"consentedPurposes\" />\n </ObjectScope>\n </Section>\n {/* UI theme intentionally OMITTED — owned by the Appearance Settings-Hub\n panel; see the display-template omission note above. */}\n <Section name=\"regional\" appearance={SectionMode.CARD} hideDescription>\n <ObjectScope name=\"regional\">\n <FormField name=\"timezone\" />\n <FormField name=\"dateFormat\" />\n <FormField name=\"timeFormat\" />\n <FormField name=\"locale\" />\n </ObjectScope>\n </Section>\n <Section name=\"language\" appearance={SectionMode.CARD} hideDescription>\n <ObjectScope name=\"languagePreferences\">\n <FormField name=\"primaryLanguage\" />\n <FormField name=\"fallbackLanguages\" />\n <FormField name=\"useOrganizationDefault\" />\n </ObjectScope>\n </Section>\n </FormLayout>\n ),\n },\n views: [\n [Op.READ, notAddressable()],\n [Op.UPDATE, notAddressable()],\n [UserSelfPreferences_Operations.RESET_TO_DEFAULTS, notAddressable({ iconOverride: RotateCcw })],\n ],\n })),\n\n [R.USERS]: usersMainResourceUIBehavior,\n\n [R.ANONYMOUS_USERS]: resourceUIBehavior(anonymousUsersFactory, AnonymousUserSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: StandardIconReference.USER,\n layout: {\n refs: { sections: [\"overview\", \"privacy\", \"context\"] },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"transpositionStatus\" />\n <DisplayField name=\"convertedToUserId\" />\n <DisplayField name=\"createdAt\" />\n </Section>\n <Section name=\"privacy\">\n <DisplayField name=\"privacy\" />\n </Section>\n <Section name=\"context\">\n <DisplayField name=\"userAgent\" />\n <DisplayField name=\"ipHash\" />\n </Section>\n </DisplayLayout>\n ),\n summary: () => (\n <SummaryLayout flow={SummaryFlow.ROW}>\n <DisplayField name=\"transpositionStatus\" />\n <DisplayField name=\"createdAt\" />\n </SummaryLayout>\n ),\n },\n views: [[Op.READ, notAddressable()]],\n })),\n\n [R.USER_FEATURES]: resourceUIBehavior(userFeaturesFactory, ScopeFeaturesWithOverridesSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n layout: {\n refs: { sections: [\"overview\", \"overrides\"] },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"features\" />\n <DisplayField name=\"limits\" />\n </Section>\n <Section name=\"overrides\">\n <ObjectScope name=\"manualOverrides\">\n <DisplayField name=\"addedFeatures\" />\n <DisplayField name=\"removedFeatures\" />\n <DisplayField name=\"limitOverrides\" />\n </ObjectScope>\n </Section>\n </DisplayLayout>\n ),\n summary: () => (\n <SummaryLayout>\n <DisplayField name=\"features\" />\n <DisplayField name=\"limits\" />\n </SummaryLayout>\n ),\n edit: () => (\n <FormLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <FormField name=\"features\" />\n <FormField name=\"limits\" />\n </Section>\n <Section name=\"overrides\">\n <ObjectScope name=\"manualOverrides\">\n <FormField name=\"addedFeatures\" />\n <FormField name=\"removedFeatures\" />\n <FormField name=\"limitOverrides\" />\n </ObjectScope>\n </Section>\n </FormLayout>\n ),\n },\n views: [\n [Op.READ, notAddressable()],\n [Op.SEARCH, notAddressable()],\n ],\n })),\n };\n}\n\nexport function buildIdentityAdminPresets(main: Partial<ResourceUIBehavior>): Partial<ResourceUIBehavior> {\n return {\n [R.USERS]: usersAdminResourceUIBehavior,\n\n [R.ANONYMOUS_USERS]: resourceUIBehaviorFrom(anonymousUsersFactory, main[R.ANONYMOUS_USERS]!, ({ base }) => ({\n icon: base.icon,\n layout: base.layout,\n views: [[Op.LIST, notAddressable()]],\n })),\n\n [R.USER_PROFILES]: resourceUIBehavior(userProfilesFactory, UserProfileSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: StandardIconReference.PROFILE,\n // Same name as the self variant: the shared summary's title IS this label, so the two must agree.\n getFrontendResourceLabel: ({ currentObject }) => resolveUserProfileName(currentObject),\n layout: main[R.USER_SELF_PROFILES]?.layout,\n views: [\n [opsVariantResolver(Op.READ, \"admin\"), notAddressable()],\n [opsVariantResolver(Op.SEARCH, \"admin\"), notAddressable()],\n // Profiles are created programmatically alongside the user — headless (API-only).\n [opsVariantResolver(Op.CREATE, \"admin\"), apiOnly()],\n [opsVariantResolver(Op.UPDATE, \"admin\"), notAddressable()],\n [opsVariantResolver(Op.DELETE, \"admin\"), notAddressable()],\n ],\n })),\n\n [R.USER_PREFERENCES]: resourceUIBehavior(userPreferencesFactory, UserPreferencesSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: StandardIconReference.SETTINGS,\n layout: main[R.USER_SELF_PREFERENCES]?.layout,\n views: [\n [opsVariantResolver(Op.READ, \"admin\"), notAddressable()],\n [opsVariantResolver(Op.UPDATE, \"admin\"), notAddressable()],\n ],\n })),\n\n [R.USER_FEATURES]: resourceUIBehaviorFrom(userFeaturesFactory, main[R.USER_FEATURES]!, ({ base }) => ({\n icon: base.icon,\n layout: base.layout,\n views: [[Op.UPDATE, notAddressable()]],\n })),\n };\n}\n\nexport const identityMainPresets = buildIdentityMainPresets();\nexport const identityAdminPresets = buildIdentityAdminPresets(identityMainPresets);\n\n// Named re-exports for `*.resource.specification.ts` (mergeResourceFrontendConfigurations + `codeHandling.frontendConfigurationSources`).\nexport const userSelfResourceUIBehavior = identityMainPresets[R.USER_SELF]!;\nexport const userSelfProfilesResourceUIBehavior = identityMainPresets[R.USER_SELF_PROFILES]!;\nexport const userSelfPreferencesResourceUIBehavior = identityMainPresets[R.USER_SELF_PREFERENCES]!;\nexport const anonymousUsersMainResourceUIBehavior = identityMainPresets[R.ANONYMOUS_USERS]!;\nexport const anonymousUsersAdminResourceUIBehavior = identityAdminPresets[R.ANONYMOUS_USERS]!;\nexport const userProfilesResourceUIBehavior = identityAdminPresets[R.USER_PROFILES]!;\nexport const userPreferencesResourceUIBehavior = identityAdminPresets[R.USER_PREFERENCES]!;\nexport const userFeaturesMainResourceUIBehavior = identityMainPresets[R.USER_FEATURES]!;\nexport const userFeaturesAdminResourceUIBehavior = identityAdminPresets[R.USER_FEATURES]!;\n"]}
@@ -0,0 +1,6 @@
1
+ import type { ResourceUIBehavior } from '@wildo-ai/saas-frontend-lib';
2
+ export declare function buildInboundDeliveriesMainPresets(): Partial<ResourceUIBehavior>;
3
+ export declare function buildInboundDeliveriesAdminPresets(main: Partial<ResourceUIBehavior>): Partial<ResourceUIBehavior>;
4
+ export declare const inboundDeliveriesMainPresets: Partial<ResourceUIBehavior>;
5
+ export declare const inboundDeliveriesAdminPresets: Partial<ResourceUIBehavior>;
6
+ //# sourceMappingURL=inbound-deliveries.resource-presets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inbound-deliveries.resource-presets.d.ts","sourceRoot":"","sources":["../../../../../src/config/resources/inbound-deliveries.resource-presets.tsx"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAoFtE,wBAAgB,iCAAiC,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAyD/E;AAED,wBAAgB,kCAAkC,CAAC,IAAI,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC,CA2BjH;AAED,eAAO,MAAM,4BAA4B,6BAAsC,CAAC;AAChF,eAAO,MAAM,6BAA6B,6BAAmE,CAAC"}
@@ -0,0 +1,112 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { DisplayField, DisplayLayout, ResourceHeaderTitle, SummaryLayout, SummaryMeta, polymorphicResourceUIBehavior, polymorphicResourceUIBehaviorFrom, } from '@wildo-ai/saas-frontend-lib';
3
+ import { BadgeSemanticVariant, DisplayChromeMode, EditChromeMode, EnumDisplayMode } from '@wildo-ai/zod-decorators';
4
+ import { Inbox, RotateCw } from 'lucide-react';
5
+ import { CoreResourceType as R, CoreResourceOperation as Op, InboundDelivery_Operations, InboundDeliveryBaseSchema, InboundDeliveryStatus, inboundDeliveryPolymorphicFactories, } from '@wildo-ai/saas-models';
6
+ import { addressable, notAddressable } from './resource.config.utils.js';
7
+ const VARIANTS = [
8
+ { parentResourceType: R.ORGANIZATIONS, resourceType: R.ORGANIZATION_INBOUND_DELIVERIES },
9
+ { parentResourceType: R.APPLICATION, resourceType: R.APPLICATION_INBOUND_DELIVERIES },
10
+ ];
11
+ const LIST_DISPLAY = {
12
+ collectionDisplayConfig: {
13
+ quickFilterField: 'status',
14
+ temporalGroupField: 'receivedAt',
15
+ },
16
+ };
17
+ /*
18
+ * One stored delivery, read once. The header is its NAME — the handler and the source it came from — with its status
19
+ * beside it, so none of the three is a row below. The rest is one flat list in the order an operator asks it: which
20
+ * message this is (the duplicate-check key, the provider's own id), when it arrived and was signed, how many attempts
21
+ * and what they did, when the next one runs, what replays were made and why, and what the sending system actually
22
+ * sent. Every row that is empty for most deliveries hides. The lease and retry-budget bookkeeping
23
+ * (`leaseExpiresAt`, `budgetStartedAt`, `budgetBaseAttemptCount`) is the worker's, not the reader's, and is not laid
24
+ * out; `createdAt` is `receivedAt` again.
25
+ */
26
+ function InboundDeliveryDisplayTemplate() {
27
+ return (_jsxs(DisplayLayout, { children: [_jsx(DisplayField, { name: "sourceKind" }), _jsx(DisplayField, { name: "dedupKey" }), _jsx(DisplayField, { name: "providerDeliveryId" }), _jsx(DisplayField, { name: "orderingKey" }), _jsx(DisplayField, { name: "receivedAt" }), _jsx(DisplayField, { name: "signedAt" }), _jsx(DisplayField, { name: "resolvedScope" }), _jsx(DisplayField, { name: "attemptCount" }), _jsx(DisplayField, { name: "nextAttemptAt" }), _jsx(DisplayField, { name: "terminalAt" }), _jsx(DisplayField, { name: "attempts" }), _jsx(DisplayField, { name: "replays" }), _jsx(DisplayField, { name: "headers" }), _jsx(DisplayField, { name: "rawBody" })] }));
28
+ }
29
+ /*
30
+ * A card in a list grouped by the DAY it was received: the handler and source (the title), the status badge, then the
31
+ * duplicate-check key and the attempt count, both labelled. Without the key three deliveries of one handler read as
32
+ * one card three times; a bare hash and a bare number say nothing about what they are.
33
+ */
34
+ function InboundDeliverySummaryTemplate() {
35
+ return (_jsx(SummaryLayout, { children: _jsxs(SummaryMeta, { children: [_jsx(DisplayField, { name: "status" }), _jsx(DisplayField, { name: "dedupKey" }), _jsx(DisplayField, { name: "attemptCount" })] }) }));
36
+ }
37
+ const hideWhenEmpty = { display: { hideWhenEmpty: true } };
38
+ const labelledOnCard = { summaryOverride: { chromeMode: DisplayChromeMode.INLINE } };
39
+ export function buildInboundDeliveriesMainPresets() {
40
+ return polymorphicResourceUIBehavior({ variants: VARIANTS }, inboundDeliveryPolymorphicFactories[R.ORGANIZATION_INBOUND_DELIVERIES], InboundDeliveryBaseSchema, ({ schema }) => ({
41
+ icon: Inbox,
42
+ layout: {
43
+ // Settings rows on the read page, bare values on a card. There is no form: the pipeline writes every row.
44
+ defaultChromeMode: { display: DisplayChromeMode.SETTINGS_ROW, summary: DisplayChromeMode.HIDDEN, edit: EditChromeMode.SETTINGS_ROW },
45
+ // The identity line: the handler and source (the title) and the delivery's status beside it.
46
+ header: () => (_jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-field", children: [_jsx(ResourceHeaderTitle, {}), _jsx(DisplayField, { name: "status", hideLabel: true, hideDescription: true, className: "w-auto" })] })),
47
+ display: InboundDeliveryDisplayTemplate,
48
+ summary: InboundDeliverySummaryTemplate,
49
+ },
50
+ fields: {
51
+ // The badge's colour carries the state. Its description is not shown under it: on a list it read once per row.
52
+ status: schema.shape.status.enumUI({
53
+ display: { displayMode: EnumDisplayMode.BADGE },
54
+ values: {
55
+ [InboundDeliveryStatus.RECEIVED]: { color: BadgeSemanticVariant.SECONDARY },
56
+ [InboundDeliveryStatus.PROCESSING]: { color: BadgeSemanticVariant.INFO },
57
+ [InboundDeliveryStatus.RETRY_SCHEDULED]: { color: BadgeSemanticVariant.WARNING },
58
+ [InboundDeliveryStatus.PROCESSED]: { color: BadgeSemanticVariant.SUCCESS },
59
+ [InboundDeliveryStatus.DEAD]: { color: BadgeSemanticVariant.DESTRUCTIVE },
60
+ [InboundDeliveryStatus.UNROUTABLE]: { color: BadgeSemanticVariant.SECONDARY },
61
+ },
62
+ }),
63
+ dedupKey: InboundDeliveryBaseSchema.shape.dedupKey.stringUI(labelledOnCard),
64
+ attemptCount: InboundDeliveryBaseSchema.shape.attemptCount.numberUI(labelledOnCard),
65
+ // Each is present only for some schemes, some handlers, or some states.
66
+ providerDeliveryId: InboundDeliveryBaseSchema.shape.providerDeliveryId.stringUI(hideWhenEmpty),
67
+ orderingKey: InboundDeliveryBaseSchema.shape.orderingKey.stringUI(hideWhenEmpty),
68
+ signedAt: InboundDeliveryBaseSchema.shape.signedAt.dateUI(hideWhenEmpty),
69
+ nextAttemptAt: InboundDeliveryBaseSchema.shape.nextAttemptAt.dateUI(hideWhenEmpty),
70
+ terminalAt: InboundDeliveryBaseSchema.shape.terminalAt.dateUI(hideWhenEmpty),
71
+ attempts: InboundDeliveryBaseSchema.shape.attempts.arrayUI(hideWhenEmpty),
72
+ replays: InboundDeliveryBaseSchema.shape.replays.arrayUI(hideWhenEmpty),
73
+ },
74
+ getFrontendResourceLabel: ({ currentObject }) => `${currentObject.handlerRef} · ${currentObject.sourceKey}`,
75
+ views: [
76
+ [Op.LIST, addressable(LIST_DISPLAY)],
77
+ // Row click → the delivery in the companion drawer: scope, attempts, replays, the stored body.
78
+ [Op.READ, notAddressable()],
79
+ // Per-row, with its justification form: a replay re-runs application code on stored input.
80
+ [InboundDelivery_Operations.REPLAY, notAddressable({ iconOverride: RotateCw })],
81
+ ],
82
+ variantOverrides: {
83
+ [R.APPLICATION]: { views: [] },
84
+ },
85
+ }));
86
+ }
87
+ export function buildInboundDeliveriesAdminPresets(main) {
88
+ // The admin application makes the APP variant addressable and embeds the ORG variant, like every
89
+ // other polymorphic operator surface.
90
+ return polymorphicResourceUIBehaviorFrom({ variants: VARIANTS }, inboundDeliveryPolymorphicFactories[R.ORGANIZATION_INBOUND_DELIVERIES], main, ({ base }) => ({
91
+ icon: base.icon,
92
+ layout: base.layout,
93
+ fields: base.fields,
94
+ getFrontendResourceLabel: base.getFrontendResourceLabel,
95
+ views: [
96
+ [Op.LIST, addressable(LIST_DISPLAY)],
97
+ [Op.READ, notAddressable()],
98
+ [InboundDelivery_Operations.REPLAY, notAddressable({ iconOverride: RotateCw })],
99
+ ],
100
+ variantOverrides: {
101
+ [R.ORGANIZATIONS]: {
102
+ views: [
103
+ [Op.READ, notAddressable()],
104
+ [Op.LIST, notAddressable(LIST_DISPLAY)],
105
+ ],
106
+ },
107
+ },
108
+ }));
109
+ }
110
+ export const inboundDeliveriesMainPresets = buildInboundDeliveriesMainPresets();
111
+ export const inboundDeliveriesAdminPresets = buildInboundDeliveriesAdminPresets(inboundDeliveriesMainPresets);
112
+ //# sourceMappingURL=inbound-deliveries.resource-presets.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inbound-deliveries.resource-presets.js","sourceRoot":"","sources":["../../../../../src/config/resources/inbound-deliveries.resource-presets.tsx"],"names":[],"mappings":";AAcA,OAAO,EACL,YAAY,EACZ,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,WAAW,EACX,6BAA6B,EAC7B,iCAAiC,GAClC,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,iBAAiB,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AACpH,OAAO,EAAE,KAAK,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EACL,gBAAgB,IAAI,CAAC,EACrB,qBAAqB,IAAI,EAAE,EAC3B,0BAA0B,EAC1B,yBAAyB,EACzB,qBAAqB,EACrB,mCAAmC,GACpC,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEtE,MAAM,QAAQ,GAAG;IACf,EAAE,kBAAkB,EAAE,CAAC,CA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I,EAAE,cAAc,EAAE,CAAC;oBAC3B,CAAC,EAAE,CAAC,IAAI,EAAE,cAAc,CAAC,YAAY,CAAC,CAAC;iBACxC;aACF;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC;AAED,MAAM,CAAC,MAAM,4BAA4B,GAAG,iCAAiC,EAAE,CAAC;AAChF,MAAM,CAAC,MAAM,6BAA6B,GAAG,kCAAkC,CAAC,4BAA4B,CAAC,CAAC","sourcesContent":["/**\n * Inbound deliveries (#1596) — the operator's log of every verified message another system sent the\n * application, with REPLAY for a dead one.\n *\n * No sections, like the outbound delivery log: a status quick-filter tab strip and day-bucket headings\n * on LIST, the row detail in the companion drawer as one flat list of facts under a header that carries\n * the status, and REPLAY as a per-row action. REPLAY keeps its form, because its one input — the\n * justification — is real operator input the audit trail records.\n *\n * Surfaced in the Settings Hub by the `inbound-deliveries` (organization) and\n * `application-inbound-deliveries` (administration) destinations.\n */\nimport React from 'react';\nimport type { ResourceUIBehavior } from '@wildo-ai/saas-frontend-lib';\nimport {\n DisplayField,\n DisplayLayout,\n ResourceHeaderTitle,\n SummaryLayout,\n SummaryMeta,\n polymorphicResourceUIBehavior,\n polymorphicResourceUIBehaviorFrom,\n} from '@wildo-ai/saas-frontend-lib';\nimport { BadgeSemanticVariant, DisplayChromeMode, EditChromeMode, EnumDisplayMode } from '@wildo-ai/zod-decorators';\nimport { Inbox, RotateCw } from 'lucide-react';\nimport {\n CoreResourceType as R,\n CoreResourceOperation as Op,\n InboundDelivery_Operations,\n InboundDeliveryBaseSchema,\n InboundDeliveryStatus,\n inboundDeliveryPolymorphicFactories,\n} from '@wildo-ai/saas-models';\nimport { addressable, notAddressable } from './resource.config.utils';\n\nconst VARIANTS = [\n { parentResourceType: R.ORGANIZATIONS, resourceType: R.ORGANIZATION_INBOUND_DELIVERIES },\n { parentResourceType: R.APPLICATION, resourceType: R.APPLICATION_INBOUND_DELIVERIES },\n];\n\nconst LIST_DISPLAY = {\n collectionDisplayConfig: {\n quickFilterField: 'status',\n temporalGroupField: 'receivedAt',\n },\n} as const;\n\n/*\n * One stored delivery, read once. The header is its NAME — the handler and the source it came from — with its status\n * beside it, so none of the three is a row below. The rest is one flat list in the order an operator asks it: which\n * message this is (the duplicate-check key, the provider's own id), when it arrived and was signed, how many attempts\n * and what they did, when the next one runs, what replays were made and why, and what the sending system actually\n * sent. Every row that is empty for most deliveries hides. The lease and retry-budget bookkeeping\n * (`leaseExpiresAt`, `budgetStartedAt`, `budgetBaseAttemptCount`) is the worker's, not the reader's, and is not laid\n * out; `createdAt` is `receivedAt` again.\n */\nfunction InboundDeliveryDisplayTemplate(): React.JSX.Element {\n return (\n <DisplayLayout>\n <DisplayField name=\"sourceKind\" />\n <DisplayField name=\"dedupKey\" />\n <DisplayField name=\"providerDeliveryId\" />\n <DisplayField name=\"orderingKey\" />\n <DisplayField name=\"receivedAt\" />\n <DisplayField name=\"signedAt\" />\n <DisplayField name=\"resolvedScope\" />\n <DisplayField name=\"attemptCount\" />\n <DisplayField name=\"nextAttemptAt\" />\n <DisplayField name=\"terminalAt\" />\n <DisplayField name=\"attempts\" />\n <DisplayField name=\"replays\" />\n <DisplayField name=\"headers\" />\n <DisplayField name=\"rawBody\" />\n </DisplayLayout>\n );\n}\n\n/*\n * A card in a list grouped by the DAY it was received: the handler and source (the title), the status badge, then the\n * duplicate-check key and the attempt count, both labelled. Without the key three deliveries of one handler read as\n * one card three times; a bare hash and a bare number say nothing about what they are.\n */\nfunction InboundDeliverySummaryTemplate(): React.JSX.Element {\n return (\n <SummaryLayout>\n <SummaryMeta>\n <DisplayField name=\"status\" />\n <DisplayField name=\"dedupKey\" />\n <DisplayField name=\"attemptCount\" />\n </SummaryMeta>\n </SummaryLayout>\n );\n}\n\nconst hideWhenEmpty = { display: { hideWhenEmpty: true } } as const;\nconst labelledOnCard = { summaryOverride: { chromeMode: DisplayChromeMode.INLINE } } as const;\n\nexport function buildInboundDeliveriesMainPresets(): Partial<ResourceUIBehavior> {\n return polymorphicResourceUIBehavior(\n { variants: VARIANTS },\n inboundDeliveryPolymorphicFactories[R.ORGANIZATION_INBOUND_DELIVERIES],\n InboundDeliveryBaseSchema,\n ({ schema }) => ({\n icon: Inbox,\n layout: {\n // Settings rows on the read page, bare values on a card. There is no form: the pipeline writes every row.\n defaultChromeMode: { display: DisplayChromeMode.SETTINGS_ROW, summary: DisplayChromeMode.HIDDEN, edit: EditChromeMode.SETTINGS_ROW },\n // The identity line: the handler and source (the title) and the delivery's status beside it.\n header: () => (\n <div className=\"flex min-w-0 flex-wrap items-center gap-field\">\n <ResourceHeaderTitle />\n <DisplayField name=\"status\" hideLabel hideDescription className=\"w-auto\" />\n </div>\n ),\n display: InboundDeliveryDisplayTemplate,\n summary: InboundDeliverySummaryTemplate,\n },\n fields: {\n // The badge's colour carries the state. Its description is not shown under it: on a list it read once per row.\n status: schema.shape.status.enumUI({\n display: { displayMode: EnumDisplayMode.BADGE },\n values: {\n [InboundDeliveryStatus.RECEIVED]: { color: BadgeSemanticVariant.SECONDARY },\n [InboundDeliveryStatus.PROCESSING]: { color: BadgeSemanticVariant.INFO },\n [InboundDeliveryStatus.RETRY_SCHEDULED]: { color: BadgeSemanticVariant.WARNING },\n [InboundDeliveryStatus.PROCESSED]: { color: BadgeSemanticVariant.SUCCESS },\n [InboundDeliveryStatus.DEAD]: { color: BadgeSemanticVariant.DESTRUCTIVE },\n [InboundDeliveryStatus.UNROUTABLE]: { color: BadgeSemanticVariant.SECONDARY },\n },\n }),\n dedupKey: InboundDeliveryBaseSchema.shape.dedupKey.stringUI(labelledOnCard),\n attemptCount: InboundDeliveryBaseSchema.shape.attemptCount.numberUI(labelledOnCard),\n // Each is present only for some schemes, some handlers, or some states.\n providerDeliveryId: InboundDeliveryBaseSchema.shape.providerDeliveryId.stringUI(hideWhenEmpty),\n orderingKey: InboundDeliveryBaseSchema.shape.orderingKey.stringUI(hideWhenEmpty),\n signedAt: InboundDeliveryBaseSchema.shape.signedAt.dateUI(hideWhenEmpty),\n nextAttemptAt: InboundDeliveryBaseSchema.shape.nextAttemptAt.dateUI(hideWhenEmpty),\n terminalAt: InboundDeliveryBaseSchema.shape.terminalAt.dateUI(hideWhenEmpty),\n attempts: InboundDeliveryBaseSchema.shape.attempts.arrayUI(hideWhenEmpty),\n replays: InboundDeliveryBaseSchema.shape.replays.arrayUI(hideWhenEmpty),\n },\n getFrontendResourceLabel: ({ currentObject }) => `${currentObject.handlerRef} · ${currentObject.sourceKey}`,\n views: [\n [Op.LIST, addressable(LIST_DISPLAY)],\n // Row click → the delivery in the companion drawer: scope, attempts, replays, the stored body.\n [Op.READ, notAddressable()],\n // Per-row, with its justification form: a replay re-runs application code on stored input.\n [InboundDelivery_Operations.REPLAY, notAddressable({ iconOverride: RotateCw })],\n ],\n variantOverrides: {\n [R.APPLICATION]: { views: [] },\n },\n }),\n );\n}\n\nexport function buildInboundDeliveriesAdminPresets(main: Partial<ResourceUIBehavior>): Partial<ResourceUIBehavior> {\n // The admin application makes the APP variant addressable and embeds the ORG variant, like every\n // other polymorphic operator surface.\n return polymorphicResourceUIBehaviorFrom(\n { variants: VARIANTS },\n inboundDeliveryPolymorphicFactories[R.ORGANIZATION_INBOUND_DELIVERIES],\n main,\n ({ base }) => ({\n icon: base.icon,\n layout: base.layout,\n fields: base.fields,\n getFrontendResourceLabel: base.getFrontendResourceLabel,\n views: [\n [Op.LIST, addressable(LIST_DISPLAY)],\n [Op.READ, notAddressable()],\n [InboundDelivery_Operations.REPLAY, notAddressable({ iconOverride: RotateCw })],\n ],\n variantOverrides: {\n [R.ORGANIZATIONS]: {\n views: [\n [Op.READ, notAddressable()],\n [Op.LIST, notAddressable(LIST_DISPLAY)],\n ],\n },\n },\n }),\n );\n}\n\nexport const inboundDeliveriesMainPresets = buildInboundDeliveriesMainPresets();\nexport const inboundDeliveriesAdminPresets = buildInboundDeliveriesAdminPresets(inboundDeliveriesMainPresets);\n"]}
@@ -0,0 +1,4 @@
1
+ import type { ResourceUIBehavior } from '@wildo-ai/saas-frontend-lib';
2
+ export declare function buildInboundEmailMainPresets(): Partial<ResourceUIBehavior>;
3
+ export declare const inboundEmailMainPresets: Partial<ResourceUIBehavior>;
4
+ //# sourceMappingURL=inbound-email.resource-presets.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"inbound-email.resource-presets.d.ts","sourceRoot":"","sources":["../../../../../src/config/resources/inbound-email.resource-presets.tsx"],"names":[],"mappings":"AAsBA,OAAO,KAAK,EAAmC,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAwKvG,wBAAgB,4BAA4B,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAyH1E;AAED,eAAO,MAAM,uBAAuB,6BAAiC,CAAC"}
@@ -0,0 +1,182 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ActionVisibility, DisplayField, DisplayLayout, ResourceHeaderTitle, SummaryLayout, SummaryMeta, resourceUIBehavior, } from '@wildo-ai/saas-frontend-lib';
3
+ import { ArrayObjectItemLayout, BadgeSemanticVariant, DisplayChromeMode, EditChromeMode, EnumDisplayMode, ShowWhenOperator, StringDisplayMode, } from '@wildo-ai/zod-decorators';
4
+ import { AtSign, Globe, Inbox, MailPlus, RefreshCw, SearchCheck, Trash2 } from 'lucide-react';
5
+ import { ClientMailboxSchema, CoreResourceOperation as Op, CoreResourceType as R, InboundEmailSchema, InboundEmailStatus, InboundSenderAssurance, OrganizationEmailDomainSchema, OrganizationEmailDomainStatus, OrganizationEmailDomains_Operations, clientMailboxesResourceConfiguration_InitializationFactory as clientMailboxesFactory, inboundEmailsResourceConfiguration_InitializationFactory as inboundEmailsFactory, organizationEmailDomainsResourceConfiguration_InitializationFactory as emailDomainsFactory, } from '@wildo-ai/saas-models';
6
+ import { addressable, notAddressable } from './resource.config.utils.js';
7
+ const CHROME = {
8
+ display: DisplayChromeMode.SETTINGS_ROW,
9
+ summary: DisplayChromeMode.HIDDEN,
10
+ edit: EditChromeMode.SETTINGS_ROW,
11
+ };
12
+ const hideWhenEmpty = { display: { hideWhenEmpty: true } };
13
+ const labelledOnCard = { summaryOverride: { chromeMode: DisplayChromeMode.INLINE } };
14
+ const machineIdentifier = { display: { displayMode: StringDisplayMode.IDENTIFIER, hideWhenEmpty: true } };
15
+ /** A verb on one row, shown only where its `enabledCondition` admits it. */
16
+ const rowAction = (iconOverride) => notAddressable({ iconOverride, actionVisibility: ActionVisibility.WHEN_AVAILABLE });
17
+ /** The record's name (the title) with its status beside it. Shared by the domain and the message. */
18
+ function StatusHeader() {
19
+ return (_jsxs("div", { className: "flex min-w-0 flex-wrap items-center gap-field", children: [_jsx(ResourceHeaderTitle, {}), _jsx(DisplayField, { name: "status", hideLabel: true, hideDescription: true, className: "w-auto" })] }));
20
+ }
21
+ // ── organizationEmailDomains ────────────────────────────────────────────────────────────────────
22
+ /*
23
+ * What the domain is for, then what the administrator must publish: the name the ownership TXT record goes on (its
24
+ * value was shown once, by `claim`), and the records the provider reported once ownership was proven. Then who holds
25
+ * it and when it was last found verified. `nonceHash` is not laid out: a hash of the value helps nobody publish it.
26
+ */
27
+ function EmailDomainDisplayTemplate() {
28
+ return (_jsxs(DisplayLayout, { children: [_jsx(DisplayField, { name: "capabilities" }), _jsx(DisplayField, { name: "ownershipChallenge.txtName" }), _jsx(DisplayField, { name: "dnsRecords" }), _jsx(DisplayField, { name: "providerRef" }), _jsx(DisplayField, { name: "ownershipVerifiedAt" }), _jsx(DisplayField, { name: "lastVerifiedAt" }), _jsx(DisplayField, { name: "createdAt" })] }));
29
+ }
30
+ /* A domain card: the domain (the title), its status, and when it was last found verified. */
31
+ function EmailDomainSummaryTemplate() {
32
+ return (_jsx(SummaryLayout, { children: _jsxs(SummaryMeta, { children: [_jsx(DisplayField, { name: "status" }), _jsx(DisplayField, { name: "lastVerifiedAt" })] }) }));
33
+ }
34
+ // ── clientMailboxes ─────────────────────────────────────────────────────────────────────────────
35
+ /* The address (the title), then the client it routes to, the domain it is on and the relationship that authorizes it. */
36
+ function ClientMailboxDisplayTemplate() {
37
+ return (_jsxs(DisplayLayout, { children: [_jsx(DisplayField, { name: "clientOrganizationId" }), _jsx(DisplayField, { name: "emailDomainId" }), _jsx(DisplayField, { name: "serviceProviderRelationshipId" }), _jsx(DisplayField, { name: "createdAt" })] }));
38
+ }
39
+ function ClientMailboxSummaryTemplate() {
40
+ return (_jsx(SummaryLayout, { children: _jsx(SummaryMeta, { children: _jsx(DisplayField, { name: "createdAt" }) }) }));
41
+ }
42
+ // ── inboundEmails ───────────────────────────────────────────────────────────────────────────────
43
+ /*
44
+ * One message, read in the order a reader asks it: who sent it and how well the sender is known (the channel's
45
+ * derived assurance, then the provider's SPF / DKIM / DMARC results it rests on), who else it went to and which of
46
+ * this organization's addresses received it, when; then what it says; then its files — the attachments that were
47
+ * stored, and the ones withheld with the reason. A message rejected over a limit names the limit.
48
+ *
49
+ * The HTML body renders through `StringDisplayMode.UNTRUSTED_HTML`: a sandboxed frame that runs nothing and fetches
50
+ * nothing, as a mail client renders received mail (a remote image would be a read receipt carrying the reader's
51
+ * address). It is the reading surface whenever the message has an HTML part; the plain-text part shows only when it
52
+ * does not (#1912).
53
+ */
54
+ function InboundEmailDisplayTemplate() {
55
+ return (_jsxs(DisplayLayout, { children: [_jsx(DisplayField, { name: "fromAddress" }), _jsx(DisplayField, { name: "fromName" }), _jsx(DisplayField, { name: "senderAssurance" }), _jsx(DisplayField, { name: "authentication" }), _jsx(DisplayField, { name: "to" }), _jsx(DisplayField, { name: "cc" }), _jsx(DisplayField, { name: "replyTo" }), _jsx(DisplayField, { name: "receivedFor" }), _jsx(DisplayField, { name: "routeKind" }), _jsx(DisplayField, { name: "receivedAt" }), _jsx(DisplayField, { name: "textBody" }), _jsx(DisplayField, { name: "htmlBody" }), _jsx(DisplayField, { name: "textTruncated" }), _jsx(DisplayField, { name: "attachmentFiles" }), _jsx(DisplayField, { name: "withheldAttachments" }), _jsx(DisplayField, { name: "rawMimeFile" }), _jsx(DisplayField, { name: "limitExceeded" })] }));
56
+ }
57
+ /* A message card in a list grouped by the day it was received: the subject (the title), its status, the sender, the route. */
58
+ function InboundEmailSummaryTemplate() {
59
+ return (_jsx(SummaryLayout, { children: _jsxs(SummaryMeta, { children: [_jsx(DisplayField, { name: "status" }), _jsx(DisplayField, { name: "fromAddress" }), _jsx(DisplayField, { name: "routeKind" }), _jsx(DisplayField, { name: "receivedAt" })] }) }));
60
+ }
61
+ export function buildInboundEmailMainPresets() {
62
+ return {
63
+ [R.ORGANIZATION_EMAIL_DOMAINS]: resourceUIBehavior(emailDomainsFactory, OrganizationEmailDomainSchema, ({ schemaShape }) => ({
64
+ icon: Globe,
65
+ getFrontendResourceLabel: ({ currentObject }) => currentObject.domain,
66
+ layout: {
67
+ defaultChromeMode: CHROME,
68
+ header: StatusHeader,
69
+ display: EmailDomainDisplayTemplate,
70
+ summary: EmailDomainSummaryTemplate,
71
+ },
72
+ fields: {
73
+ status: schemaShape.status.enumUI({
74
+ display: { displayMode: EnumDisplayMode.BADGE, showDescription: false },
75
+ values: {
76
+ [OrganizationEmailDomainStatus.OWNERSHIP_PENDING]: { color: BadgeSemanticVariant.WARNING },
77
+ [OrganizationEmailDomainStatus.PROVIDER_PENDING]: { color: BadgeSemanticVariant.INFO },
78
+ [OrganizationEmailDomainStatus.VERIFIED]: { color: BadgeSemanticVariant.SUCCESS },
79
+ [OrganizationEmailDomainStatus.FAILED]: { color: BadgeSemanticVariant.DESTRUCTIVE },
80
+ // Mail stops routing and sending on a suspended domain until its records are found again.
81
+ [OrganizationEmailDomainStatus.SUSPENDED]: { color: BadgeSemanticVariant.DESTRUCTIVE },
82
+ },
83
+ }),
84
+ // Each DNS record is a small fixed tuple (purpose, type, name, value, priority, status): one row apiece.
85
+ dnsRecords: schemaShape.dnsRecords.arrayUI({ display: { hideWhenEmpty: true }, objectItemLayout: ArrayObjectItemLayout.ROW }),
86
+ providerRef: schemaShape.providerRef.stringUI(machineIdentifier),
87
+ ownershipVerifiedAt: schemaShape.ownershipVerifiedAt.dateUI(hideWhenEmpty),
88
+ lastVerifiedAt: schemaShape.lastVerifiedAt.dateUI({ display: { hideWhenEmpty: true }, ...labelledOnCard }),
89
+ },
90
+ views: [
91
+ [Op.LIST, addressable({ collectionDisplayConfig: { quickFilterField: 'status' } })],
92
+ // Row click → the domain in the companion drawer: the TXT name and the provider's records to publish.
93
+ [Op.READ, notAddressable()],
94
+ // From the collection toolbar; answers the TXT record to publish, revealed once.
95
+ [OrganizationEmailDomains_Operations.CLAIM, notAddressable({ iconOverride: Globe })],
96
+ // Only while OWNERSHIP_PENDING.
97
+ [OrganizationEmailDomains_Operations.VERIFY_OWNERSHIP, rowAction(SearchCheck)],
98
+ // Once ownership is proven; the provider verifies asynchronously, so it may be asked again.
99
+ [OrganizationEmailDomains_Operations.VERIFY, rowAction(RefreshCw)],
100
+ [OrganizationEmailDomains_Operations.REMOVE, rowAction(Trash2)],
101
+ ],
102
+ })),
103
+ [R.CLIENT_MAILBOXES]: resourceUIBehavior(clientMailboxesFactory, ClientMailboxSchema, ({ schemaShape }) => ({
104
+ icon: AtSign,
105
+ getFrontendResourceLabel: ({ currentObject }) => currentObject.address,
106
+ layout: {
107
+ defaultChromeMode: CHROME,
108
+ display: ClientMailboxDisplayTemplate,
109
+ summary: ClientMailboxSummaryTemplate,
110
+ },
111
+ fields: {
112
+ // The firm owns the mailbox and its domain; the client and the relationship row are another organization's
113
+ // records, which there is no label to resolve to from here.
114
+ emailDomainId: schemaShape.emailDomainId.stringUI(machineIdentifier),
115
+ serviceProviderRelationshipId: schemaShape.serviceProviderRelationshipId.stringUI(machineIdentifier),
116
+ clientOrganizationId: schemaShape.clientOrganizationId.stringUI(machineIdentifier),
117
+ createdAt: schemaShape.createdAt.dateUI(labelledOnCard),
118
+ },
119
+ views: [
120
+ [Op.LIST, addressable()],
121
+ [Op.READ, notAddressable()],
122
+ // From the collection toolbar, with its three-field form.
123
+ [Op.CREATE, notAddressable({ iconOverride: MailPlus })],
124
+ [Op.DELETE, rowAction(Trash2)],
125
+ ],
126
+ })),
127
+ [R.INBOUND_EMAILS]: resourceUIBehavior(inboundEmailsFactory, InboundEmailSchema, ({ schemaShape }) => ({
128
+ icon: Inbox,
129
+ // Named by its subject, in the sender's words; a message with none is named by who sent it.
130
+ getFrontendResourceLabel: ({ currentObject }) => currentObject.subject || currentObject.fromAddress,
131
+ layout: {
132
+ defaultChromeMode: CHROME,
133
+ header: StatusHeader,
134
+ display: InboundEmailDisplayTemplate,
135
+ summary: InboundEmailSummaryTemplate,
136
+ },
137
+ fields: {
138
+ status: schemaShape.status.enumUI({
139
+ display: { displayMode: EnumDisplayMode.BADGE, showDescription: false },
140
+ values: {
141
+ [InboundEmailStatus.AWAITING_ATTACHMENT_SCAN]: { color: BadgeSemanticVariant.INFO },
142
+ [InboundEmailStatus.DISPATCHED]: { color: BadgeSemanticVariant.SUCCESS },
143
+ [InboundEmailStatus.STORED_BELOW_MINIMUM]: { color: BadgeSemanticVariant.WARNING },
144
+ [InboundEmailStatus.REJECTED_LIMIT]: { color: BadgeSemanticVariant.DESTRUCTIVE },
145
+ },
146
+ }),
147
+ senderAssurance: schemaShape.senderAssurance.enumUI({
148
+ display: { displayMode: EnumDisplayMode.BADGE, hideWhenEmpty: true },
149
+ values: {
150
+ [InboundSenderAssurance.UNVERIFIED]: { color: BadgeSemanticVariant.WARNING },
151
+ [InboundSenderAssurance.SOURCE_SIGNED]: { color: BadgeSemanticVariant.INFO },
152
+ [InboundSenderAssurance.DOMAIN_ALIGNED]: { color: BadgeSemanticVariant.INFO },
153
+ [InboundSenderAssurance.KNOWN_CONTACT]: { color: BadgeSemanticVariant.SUCCESS },
154
+ [InboundSenderAssurance.THREAD_TOKEN_BOUND]: { color: BadgeSemanticVariant.SUCCESS },
155
+ },
156
+ }),
157
+ routeKind: schemaShape.routeKind.enumUI({ display: { displayMode: EnumDisplayMode.TEXT }, ...labelledOnCard }),
158
+ limitExceeded: schemaShape.limitExceeded.enumUI({ display: { displayMode: EnumDisplayMode.TEXT, hideWhenEmpty: true } }),
159
+ fromName: schemaShape.fromName.stringUI(hideWhenEmpty),
160
+ replyTo: schemaShape.replyTo.stringUI(hideWhenEmpty),
161
+ to: schemaShape.to.arrayUI({ display: { hideWhenEmpty: true }, objectItemLayout: ArrayObjectItemLayout.ROW }),
162
+ cc: schemaShape.cc.arrayUI({ display: { hideWhenEmpty: true }, objectItemLayout: ArrayObjectItemLayout.ROW }),
163
+ // The text part is the reading surface only for a message that has no HTML part.
164
+ textBody: schemaShape.textBody
165
+ .stringUI({ display: { displayMode: StringDisplayMode.MULTILINE, hideWhenEmpty: true } })
166
+ .showWhen({ conditions: { field: 'htmlBody', operator: ShowWhenOperator.NOT_EXISTS } }),
167
+ // A stranger's HTML, rendered as a mail client renders it: sandboxed, nothing runs, nothing remote loads (#1912).
168
+ htmlBody: schemaShape.htmlBody.stringUI({ display: { displayMode: StringDisplayMode.UNTRUSTED_HTML, hideWhenEmpty: true } }),
169
+ attachments: schemaShape.attachments.arrayUI({ display: { hideWhenEmpty: true }, objectItemLayout: ArrayObjectItemLayout.ROW }),
170
+ withheldAttachments: schemaShape.withheldAttachments.arrayUI({ display: { hideWhenEmpty: true }, objectItemLayout: ArrayObjectItemLayout.ROW }),
171
+ },
172
+ views: [
173
+ // Newest first, grouped by the day received; the status tabs separate what was dispatched from what was not.
174
+ [Op.LIST, addressable({ collectionDisplayConfig: { quickFilterField: 'status', temporalGroupField: 'receivedAt' } })],
175
+ // Row click → the message in the companion drawer.
176
+ [Op.READ, notAddressable()],
177
+ ],
178
+ })),
179
+ };
180
+ }
181
+ export const inboundEmailMainPresets = buildInboundEmailMainPresets();
182
+ //# sourceMappingURL=inbound-email.resource-presets.js.map