@wildo-ai/presets-components 1.1.5 → 1.1.6

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
@@ -2,6 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { resourceUIBehavior, resourceUIBehaviorFrom, SummaryFlow, } from '@wildo-ai/saas-frontend-lib';
3
3
  import { DisplayField, DisplayLayout, FormField, FormLayout, Section, SummaryLayout, SummaryTitlePlacement, } from '@wildo-ai/saas-frontend-lib';
4
4
  import { BadgeSemanticVariant, EnumDisplayMode, NumberDisplayMode, SectionMode, } from '@wildo-ai/zod-decorators';
5
+ import { LabellingTypes } from '@wildo-ai/presets-components-models';
5
6
  import { BookOpen, Compass, Trophy } from 'lucide-react';
6
7
  import { CoreResourceType as R, CoreResourceOperation as Op, userGuidanceStateResourceConfiguration_InitializationFactory as userGuidanceStateFactory, organizationGuidanceStateResourceConfiguration_InitializationFactory as orgGuidanceStateFactory, userProgressionStateResourceConfiguration_InitializationFactory as userProgressionStateFactory, organizationProgressionStateResourceConfiguration_InitializationFactory as orgProgressionStateFactory, userLifecycleStateResourceConfiguration_InitializationFactory as userLifecycleStateFactory, organizationLifecycleStateResourceConfiguration_InitializationFactory as orgLifecycleStateFactory, GuidanceStateSchema, ProgressionStateSchema, LifecycleStateSchema, LifecycleStage, } from '@wildo-ai/saas-models';
7
8
  import { notAddressable, apiOnly } from './resource.config.utils.js';
@@ -22,11 +23,15 @@ import { notAddressable, apiOnly } from './resource.config.utils.js';
22
23
  * Layout templates are implemented inline in each resource config, following the billing preset pattern.
23
24
  */
24
25
  const guidanceEmptyState = { primaryAction: false };
25
- function guidanceLabel(kind) {
26
- return ({ currentObject }) => {
27
- const n = currentObject.flows ? Object.keys(currentObject.flows).length : 0;
28
- return n > 0 ? `${kind} · ${n} flow${n === 1 ? '' : 's'}` : kind;
29
- };
26
+ /**
27
+ * The name of a guidance, progression or lifecycle STATE record. Each is a singleton per user or organization with
28
+ * no name of its own, so it is named by its resource's own words — the READ title — never by a value. Its stage is
29
+ * its state (the badge) and its flows are rows. These names used to be English written in code ("User guidance ·
30
+ * 3 flows", with an English plural) or the raw stage value, which no translator could reach. A missing word shows
31
+ * its key.
32
+ */
33
+ function stateRecordName({ t, resourceType }) {
34
+ return t(`${LabellingTypes.RESOURCES}.${resourceType}.operations.read.title`);
30
35
  }
31
36
  function lifecycleStageFields(schemaShape) {
32
37
  return {
@@ -50,7 +55,8 @@ export function buildGuidanceMainPresets() {
50
55
  [R.USER_PROGRESSION_STATE]: resourceUIBehavior(userProgressionStateFactory, ProgressionStateSchema, ({ schema, schemaShape, opsVariantResolver }) => ({
51
56
  icon: Trophy,
52
57
  emptyState: guidanceEmptyState,
53
- getFrontendResourceLabel: ({ currentObject }) => `${currentObject.totalPoints} pts`,
58
+ // Points are a value (a row); "pts" was English written in code. The record is named by its resource.
59
+ getFrontendResourceLabel: stateRecordName,
54
60
  layout: {
55
61
  refs: {
56
62
  sections: ['overview', 'activity', 'milestones'],
@@ -77,7 +83,8 @@ export function buildGuidanceMainPresets() {
77
83
  [R.ORGANIZATION_PROGRESSION_STATE]: resourceUIBehavior(orgProgressionStateFactory, ProgressionStateSchema, ({ schema, schemaShape, opsVariantResolver }) => ({
78
84
  icon: Trophy,
79
85
  emptyState: guidanceEmptyState,
80
- getFrontendResourceLabel: ({ currentObject }) => `${currentObject.totalPoints} pts`,
86
+ // Points are a value (a row); "pts" was English written in code. The record is named by its resource.
87
+ getFrontendResourceLabel: stateRecordName,
81
88
  layout: {
82
89
  refs: {
83
90
  sections: ['overview', 'activity', 'milestones'],
@@ -104,7 +111,7 @@ export function buildGuidanceMainPresets() {
104
111
  [R.ORGANIZATION_LIFECYCLE_STATE]: resourceUIBehavior(orgLifecycleStateFactory, LifecycleStateSchema, ({ schema, schemaShape, opsVariantResolver }) => ({
105
112
  icon: Compass,
106
113
  emptyState: guidanceEmptyState,
107
- getFrontendResourceLabel: ({ currentObject }) => String(currentObject.currentStage),
114
+ getFrontendResourceLabel: stateRecordName,
108
115
  layout: {
109
116
  refs: {
110
117
  sections: ['overview', 'engagement', 'history'],
@@ -128,7 +135,7 @@ export function buildGuidancePlatformPresets() {
128
135
  [R.USER_GUIDANCE_STATE]: resourceUIBehavior(userGuidanceStateFactory, GuidanceStateSchema, ({ schema, schemaShape, opsVariantResolver }) => ({
129
136
  icon: BookOpen,
130
137
  emptyState: guidanceEmptyState,
131
- getFrontendResourceLabel: guidanceLabel('User guidance'),
138
+ getFrontendResourceLabel: stateRecordName,
132
139
  layout: {
133
140
  refs: {
134
141
  sections: ['overview'],
@@ -149,7 +156,7 @@ export function buildGuidancePlatformPresets() {
149
156
  [R.ORGANIZATION_GUIDANCE_STATE]: resourceUIBehavior(orgGuidanceStateFactory, GuidanceStateSchema, ({ schema, schemaShape, opsVariantResolver }) => ({
150
157
  icon: BookOpen,
151
158
  emptyState: guidanceEmptyState,
152
- getFrontendResourceLabel: guidanceLabel('Organization guidance'),
159
+ getFrontendResourceLabel: stateRecordName,
153
160
  layout: {
154
161
  refs: {
155
162
  sections: ['overview'],
@@ -170,7 +177,7 @@ export function buildGuidancePlatformPresets() {
170
177
  [R.USER_LIFECYCLE_STATE]: resourceUIBehavior(userLifecycleStateFactory, LifecycleStateSchema, ({ schema, schemaShape, opsVariantResolver }) => ({
171
178
  icon: Compass,
172
179
  emptyState: guidanceEmptyState,
173
- getFrontendResourceLabel: ({ currentObject }) => String(currentObject.currentStage),
180
+ getFrontendResourceLabel: stateRecordName,
174
181
  layout: {
175
182
  refs: {
176
183
  sections: ['overview', 'engagement', 'history'],
@@ -1 +1 @@
1
- {"version":3,"file":"guidance.resource-presets.js","sourceRoot":"","sources":["../../../../../src/config/resources/guidance.resource-presets.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,kBAAkB,EAClB,sBAAsB,EACtB,WAAW,GACZ,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,YAAY,EACZ,aAAa,EACb,SAAS,EACT,UAAU,EACV,OAAO,EACP,aAAa,EACb,qBAAqB,GACtB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,oBAAoB,EACpB,eAAe,EACf,iBAAiB,EACjB,WAAW,GACZ,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACzD,OAAO,EACL,gBAAgB,IAAI,CAAC,EACrB,qBAAqB,IAAI,EAAE,EAC3B,4DAA4D,IAAI,wBAAwB,EACxF,oEAAoE,IAAI,uBAAuB,EAC/F,+DAA+D,IAAI,2BAA2B,EAC9F,uEAAuE,IAAI,0BAA0B,EACrG,6DAA6D,IAAI,yBAAyB,EAC1F,qEAAqE,IAAI,wBAAwB,EACjG,mBAAmB,EACnB,sBAAsB,EACtB,oBAAoB,EACpB,cAAc,GACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EA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AC,4BAA4B,CAAE,CAAC;AACrH,MAAM,CAAC,MAAM,iDAAiD,GAAG,oBAAoB,CAAC,CAAC,CAAC,4BAA4B,CAAE,CAAC","sourcesContent":["import React from 'react';\nimport type { ResourceUIBehavior } from '@wildo-ai/saas-frontend-lib';\nimport {\n resourceUIBehavior,\n resourceUIBehaviorFrom,\n SummaryFlow,\n} from '@wildo-ai/saas-frontend-lib';\nimport {\n DisplayField,\n DisplayLayout,\n FormField,\n FormLayout,\n Section,\n SummaryLayout,\n SummaryTitlePlacement,\n} from '@wildo-ai/saas-frontend-lib';\nimport {\n BadgeSemanticVariant,\n EnumDisplayMode,\n NumberDisplayMode,\n SectionMode,\n} from '@wildo-ai/zod-decorators';\nimport { BookOpen, Compass, Trophy } from 'lucide-react';\nimport {\n CoreResourceType as R,\n CoreResourceOperation as Op,\n userGuidanceStateResourceConfiguration_InitializationFactory as userGuidanceStateFactory,\n organizationGuidanceStateResourceConfiguration_InitializationFactory as orgGuidanceStateFactory,\n userProgressionStateResourceConfiguration_InitializationFactory as userProgressionStateFactory,\n organizationProgressionStateResourceConfiguration_InitializationFactory as orgProgressionStateFactory,\n userLifecycleStateResourceConfiguration_InitializationFactory as userLifecycleStateFactory,\n organizationLifecycleStateResourceConfiguration_InitializationFactory as orgLifecycleStateFactory,\n GuidanceStateSchema,\n ProgressionStateSchema,\n LifecycleStateSchema,\n LifecycleStage,\n} from '@wildo-ai/saas-models';\nimport { notAddressable, apiOnly } from './resource.config.utils';\n\n/**\n * Guidance & Lifecycle — Resource frontend presets\n *\n * **Main:** USER_PROGRESSION_STATE (read-only achievements / points), ORGANIZATION_PROGRESSION_STATE,\n * ORGANIZATION_LIFECYCLE_STATE — these are consumed by UI surfaces visible to end users or org admins.\n *\n * **Platform:** USER_GUIDANCE_STATE, ORGANIZATION_GUIDANCE_STATE, USER_LIFECYCLE_STATE — system-managed\n * state that drives the guidance engine. End users never view or manage these directly; they are\n * consumed by the companion, internal dashboards, and the guidance rendering pipeline.\n *\n * **Admin:** ORG variants of guidance, progression, and lifecycle — derived from their respective\n * main or platform bases, minus SEARCH.\n *\n * Field UI uses inline enum `values` and `showDescription: true` aligned with billing.\n * Layout templates are implemented inline in each resource config, following the billing preset pattern.\n */\n\nconst guidanceEmptyState = { primaryAction: false as const };\n\nfunction guidanceLabel(kind: string) {\n return ({ currentObject }: { currentObject: { flows?: Record<string, unknown> } }) => {\n const n = currentObject.flows ? Object.keys(currentObject.flows).length : 0;\n return n > 0 ? `${kind} · ${n} flow${n === 1 ? '' : 's'}` : kind;\n };\n}\n\nfunction lifecycleStageFields(schemaShape: (typeof LifecycleStateSchema)['shape']) {\n return {\n currentStage: schemaShape.currentStage.enumUI({\n display: { displayMode: EnumDisplayMode.BADGE, showDescription: true },\n edit: { showDescription: true },\n values: {\n [LifecycleStage.SIGNED_UP]: { color: BadgeSemanticVariant.SECONDARY },\n [LifecycleStage.ACTIVATED]: { color: BadgeSemanticVariant.SUCCESS },\n [LifecycleStage.ENGAGED]: { color: BadgeSemanticVariant.SUCCESS },\n [LifecycleStage.DORMANT]: { color: BadgeSemanticVariant.WARNING },\n [LifecycleStage.REACTIVATED]: { color: BadgeSemanticVariant.INFO },\n [LifecycleStage.CHURNED]: { color: BadgeSemanticVariant.DESTRUCTIVE },\n [LifecycleStage.OFFBOARDED]: { color: BadgeSemanticVariant.DESTRUCTIVE },\n },\n }),\n };\n}\n\nexport function buildGuidanceMainPresets(): Partial<ResourceUIBehavior> {\n return {\n [R.USER_PROGRESSION_STATE]: resourceUIBehavior(userProgressionStateFactory, ProgressionStateSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: Trophy,\n emptyState: guidanceEmptyState,\n getFrontendResourceLabel: ({ currentObject }) => `${currentObject.totalPoints} pts`,\n layout: {\n refs: {\n sections: ['overview', 'activity', 'milestones'],\n },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"totalPoints\" />\n </Section>\n <Section name=\"activity\">\n <DisplayField name=\"categoriesProgress\" />\n <DisplayField name=\"operationCounts\" />\n </Section>\n <Section name=\"milestones\">\n <DisplayField name=\"milestonesAchieved\" />\n </Section>\n </DisplayLayout>\n ),\n summary: () => (\n // TEMPLATE_OWNED with no title, because this card's LABEL is `${totalPoints} pts` — the\n // same value the row renders. Left at AUTO the framework puts the label at the head of\n // the row and the card says it twice: \"1250 pts · Total points: 1250\". The FIELD wins,\n // because it carries its own i18n label and the bare value does not.\n <SummaryLayout flow={SummaryFlow.ROW} titlePlacement={SummaryTitlePlacement.TEMPLATE_OWNED}>\n <DisplayField name=\"totalPoints\" />\n </SummaryLayout>\n ),\n },\n fields: {\n totalPoints: schemaShape.totalPoints.numberUI({\n display: { displayMode: NumberDisplayMode.FORMATTED, showDescription: true },\n edit: { showDescription: true },\n }),\n },\n views: [\n [Op.READ, notAddressable()],\n [Op.SEARCH, notAddressable()],\n ],\n })),\n\n [R.ORGANIZATION_PROGRESSION_STATE]: resourceUIBehavior(orgProgressionStateFactory, ProgressionStateSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: Trophy,\n emptyState: guidanceEmptyState,\n getFrontendResourceLabel: ({ currentObject }) => `${currentObject.totalPoints} pts`,\n layout: {\n refs: {\n sections: ['overview', 'activity', 'milestones'],\n },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"totalPoints\" />\n </Section>\n <Section name=\"activity\">\n <DisplayField name=\"categoriesProgress\" />\n <DisplayField name=\"operationCounts\" />\n </Section>\n <Section name=\"milestones\">\n <DisplayField name=\"milestonesAchieved\" />\n </Section>\n </DisplayLayout>\n ),\n summary: () => (\n // TEMPLATE_OWNED with no title, because this card's LABEL is `${totalPoints} pts` — the\n // same value the row renders. Left at AUTO the framework puts the label at the head of\n // the row and the card says it twice: \"1250 pts · Total points: 1250\". The FIELD wins,\n // because it carries its own i18n label and the bare value does not.\n <SummaryLayout flow={SummaryFlow.ROW} titlePlacement={SummaryTitlePlacement.TEMPLATE_OWNED}>\n <DisplayField name=\"totalPoints\" />\n </SummaryLayout>\n ),\n },\n fields: {\n totalPoints: schemaShape.totalPoints.numberUI({\n display: { displayMode: NumberDisplayMode.FORMATTED, showDescription: true },\n edit: { showDescription: true },\n }),\n },\n views: [\n [Op.READ, notAddressable()],\n [Op.SEARCH, notAddressable()],\n ],\n })),\n\n [R.ORGANIZATION_LIFECYCLE_STATE]: resourceUIBehavior(orgLifecycleStateFactory, LifecycleStateSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: Compass,\n emptyState: guidanceEmptyState,\n getFrontendResourceLabel: ({ currentObject }) => String(currentObject.currentStage),\n layout: {\n refs: {\n sections: ['overview', 'engagement', 'history'],\n },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"currentStage\" />\n <DisplayField name=\"stageEnteredAt\" />\n <DisplayField name=\"lastActiveAt\" />\n </Section>\n <Section name=\"engagement\">\n <DisplayField name=\"stagesVisited\" />\n <DisplayField name=\"activationCriteriaMet\" />\n <DisplayField name=\"engagement\" />\n </Section>\n <Section name=\"history\">\n <DisplayField name=\"stageHistory\" />\n </Section>\n </DisplayLayout>\n ),\n summary: () => (\n // Same as the progression siblings above: the card's LABEL *is* `currentStage`, so at AUTO\n // the stage was printed twice on one line — once bare, once with its field label.\n <SummaryLayout flow={SummaryFlow.ROW} titlePlacement={SummaryTitlePlacement.TEMPLATE_OWNED}>\n <DisplayField name=\"currentStage\" />\n </SummaryLayout>\n ),\n },\n fields: lifecycleStageFields(schemaShape),\n views: [\n [Op.READ, notAddressable()],\n [Op.SEARCH, notAddressable()],\n ],\n })),\n };\n}\n\nexport function buildGuidancePlatformPresets(): Partial<ResourceUIBehavior> {\n return {\n [R.USER_GUIDANCE_STATE]: resourceUIBehavior(userGuidanceStateFactory, GuidanceStateSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: BookOpen,\n emptyState: guidanceEmptyState,\n getFrontendResourceLabel: guidanceLabel('User guidance'),\n layout: {\n refs: {\n sections: ['overview'],\n },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"flows\" />\n </Section>\n </DisplayLayout>\n ),\n summary: () => (\n <SummaryLayout>\n <DisplayField name=\"flows\" />\n </SummaryLayout>\n ),\n edit: () => (\n <FormLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <FormField name=\"flows\" />\n </Section>\n </FormLayout>\n ),\n },\n views: [\n [Op.READ, notAddressable()],\n // Guidance state is authored/tracked by the guidance engine — headless\n // (callable via API, no view: never created from a user-facing form).\n [Op.CREATE, apiOnly()],\n [Op.UPDATE, notAddressable()],\n [Op.SEARCH, notAddressable()],\n ],\n })),\n\n [R.ORGANIZATION_GUIDANCE_STATE]: resourceUIBehavior(orgGuidanceStateFactory, GuidanceStateSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: BookOpen,\n emptyState: guidanceEmptyState,\n getFrontendResourceLabel: guidanceLabel('Organization guidance'),\n layout: {\n refs: {\n sections: ['overview'],\n },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"flows\" />\n </Section>\n </DisplayLayout>\n ),\n summary: () => (\n <SummaryLayout>\n <DisplayField name=\"flows\" />\n </SummaryLayout>\n ),\n edit: () => (\n <FormLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <FormField name=\"flows\" />\n </Section>\n </FormLayout>\n ),\n },\n views: [\n [Op.READ, notAddressable()],\n // Guidance state is authored/tracked by the guidance engine — headless\n // (callable via API, no view: never created from a user-facing form).\n [Op.CREATE, apiOnly()],\n [Op.UPDATE, notAddressable()],\n [Op.SEARCH, notAddressable()],\n ],\n })),\n\n [R.USER_LIFECYCLE_STATE]: resourceUIBehavior(userLifecycleStateFactory, LifecycleStateSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: Compass,\n emptyState: guidanceEmptyState,\n getFrontendResourceLabel: ({ currentObject }) => String(currentObject.currentStage),\n layout: {\n refs: {\n sections: ['overview', 'engagement', 'history'],\n },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"currentStage\" />\n <DisplayField name=\"stageEnteredAt\" />\n <DisplayField name=\"lastActiveAt\" />\n </Section>\n <Section name=\"engagement\">\n <DisplayField name=\"stagesVisited\" />\n <DisplayField name=\"activationCriteriaMet\" />\n <DisplayField name=\"engagement\" />\n </Section>\n <Section name=\"history\">\n <DisplayField name=\"stageHistory\" />\n </Section>\n </DisplayLayout>\n ),\n summary: () => (\n // Same as the progression siblings above: the card's LABEL *is* `currentStage`, so at AUTO\n // the stage was printed twice on one line — once bare, once with its field label.\n <SummaryLayout flow={SummaryFlow.ROW} titlePlacement={SummaryTitlePlacement.TEMPLATE_OWNED}>\n <DisplayField name=\"currentStage\" />\n </SummaryLayout>\n ),\n },\n fields: lifecycleStageFields(schemaShape),\n views: [\n [Op.READ, notAddressable()],\n [Op.SEARCH, notAddressable()],\n ],\n })),\n };\n}\n\nexport function buildGuidanceAdminPresets(\n main: Partial<ResourceUIBehavior>,\n platform: Partial<ResourceUIBehavior>,\n): Partial<ResourceUIBehavior> {\n return {\n [R.ORGANIZATION_GUIDANCE_STATE]: resourceUIBehaviorFrom(\n orgGuidanceStateFactory, platform[R.ORGANIZATION_GUIDANCE_STATE]!, ({ base }) => ({\n icon: base.icon,\n emptyState: base.emptyState,\n getFrontendResourceLabel: base.getFrontendResourceLabel,\n layout: base.layout,\n views: Array.from(base.views.entries()).filter(([op]) => op !== Op.SEARCH),\n }),\n ),\n [R.ORGANIZATION_PROGRESSION_STATE]: resourceUIBehaviorFrom(\n orgProgressionStateFactory, main[R.ORGANIZATION_PROGRESSION_STATE]!, ({ base }) => ({\n icon: base.icon,\n emptyState: base.emptyState,\n getFrontendResourceLabel: base.getFrontendResourceLabel,\n layout: base.layout,\n fields: base.fields,\n views: Array.from(base.views.entries()).filter(([op]) => op !== Op.SEARCH),\n }),\n ),\n [R.ORGANIZATION_LIFECYCLE_STATE]: resourceUIBehaviorFrom(\n orgLifecycleStateFactory, main[R.ORGANIZATION_LIFECYCLE_STATE]!, ({ base }) => ({\n icon: base.icon,\n emptyState: base.emptyState,\n getFrontendResourceLabel: base.getFrontendResourceLabel,\n layout: base.layout,\n fields: base.fields,\n views: Array.from(base.views.entries()).filter(([op]) => op !== Op.SEARCH),\n }),\n ),\n };\n}\n\nexport const guidanceMainPresets = buildGuidanceMainPresets();\nexport const guidancePlatformPresets = buildGuidancePlatformPresets();\nexport const guidanceAdminPresets = buildGuidanceAdminPresets(\n guidanceMainPresets,\n guidancePlatformPresets,\n);\n\nexport const userGuidanceStatePlatformResourceUIBehavior = guidancePlatformPresets[R.USER_GUIDANCE_STATE]!;\nexport const organizationGuidanceStatePlatformResourceUIBehavior = guidancePlatformPresets[R.ORGANIZATION_GUIDANCE_STATE]!;\nexport const organizationGuidanceStateAdminResourceUIBehavior = guidanceAdminPresets[R.ORGANIZATION_GUIDANCE_STATE]!;\nexport const userProgressionStateMainResourceUIBehavior = guidanceMainPresets[R.USER_PROGRESSION_STATE]!;\nexport const organizationProgressionStateMainResourceUIBehavior = guidanceMainPresets[R.ORGANIZATION_PROGRESSION_STATE]!;\nexport const organizationProgressionStateAdminResourceUIBehavior = guidanceAdminPresets[R.ORGANIZATION_PROGRESSION_STATE]!;\nexport const userLifecycleStatePlatformResourceUIBehavior = guidancePlatformPresets[R.USER_LIFECYCLE_STATE]!;\nexport const organizationLifecycleStateMainResourceUIBehavior = guidanceMainPresets[R.ORGANIZATION_LIFECYCLE_STATE]!;\nexport const organizationLifecycleStateAdminResourceUIBehavior = guidanceAdminPresets[R.ORGANIZATION_LIFECYCLE_STATE]!;\n"]}
1
+ {"version":3,"file":"guidance.resource-presets.js","sourceRoot":"","sources":["../../../../../src/config/resources/guidance.resource-presets.tsx"],"names":[],"mappings":";AAEA,OAAO,EACL,k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8B,CAAE,CAAC;AAC3H,MAAM,CAAC,MAAM,4CAA4C,GAAG,uBAAuB,CAAC,CAAC,CAAC,oBAAoB,CAAE,CAAC;AAC7G,MAAM,CAAC,MAAM,gDAAgD,GAAG,mBAAmB,CAAC,CAAC,CAAC,4BAA4B,CAAE,CAAC;AACrH,MAAM,CAAC,MAAM,iDAAiD,GAAG,oBAAoB,CAAC,CAAC,CAAC,4BAA4B,CAAE,CAAC","sourcesContent":["import React from 'react';\nimport type { ResourceUIBehavior } from '@wildo-ai/saas-frontend-lib';\nimport {\n resourceUIBehavior,\n resourceUIBehaviorFrom,\n SummaryFlow,\n} from '@wildo-ai/saas-frontend-lib';\nimport {\n DisplayField,\n DisplayLayout,\n FormField,\n FormLayout,\n Section,\n SummaryLayout,\n SummaryTitlePlacement,\n} from '@wildo-ai/saas-frontend-lib';\nimport {\n BadgeSemanticVariant,\n EnumDisplayMode,\n NumberDisplayMode,\n SectionMode,\n} from '@wildo-ai/zod-decorators';\nimport { LabellingTypes } from '@wildo-ai/presets-components-models';\nimport { BookOpen, Compass, Trophy } from 'lucide-react';\nimport {\n CoreResourceType as R,\n CoreResourceOperation as Op,\n userGuidanceStateResourceConfiguration_InitializationFactory as userGuidanceStateFactory,\n organizationGuidanceStateResourceConfiguration_InitializationFactory as orgGuidanceStateFactory,\n userProgressionStateResourceConfiguration_InitializationFactory as userProgressionStateFactory,\n organizationProgressionStateResourceConfiguration_InitializationFactory as orgProgressionStateFactory,\n userLifecycleStateResourceConfiguration_InitializationFactory as userLifecycleStateFactory,\n organizationLifecycleStateResourceConfiguration_InitializationFactory as orgLifecycleStateFactory,\n GuidanceStateSchema,\n ProgressionStateSchema,\n LifecycleStateSchema,\n LifecycleStage,\n} from '@wildo-ai/saas-models';\nimport { notAddressable, apiOnly } from './resource.config.utils';\n\n/**\n * Guidance & Lifecycle — Resource frontend presets\n *\n * **Main:** USER_PROGRESSION_STATE (read-only achievements / points), ORGANIZATION_PROGRESSION_STATE,\n * ORGANIZATION_LIFECYCLE_STATE — these are consumed by UI surfaces visible to end users or org admins.\n *\n * **Platform:** USER_GUIDANCE_STATE, ORGANIZATION_GUIDANCE_STATE, USER_LIFECYCLE_STATE — system-managed\n * state that drives the guidance engine. End users never view or manage these directly; they are\n * consumed by the companion, internal dashboards, and the guidance rendering pipeline.\n *\n * **Admin:** ORG variants of guidance, progression, and lifecycle — derived from their respective\n * main or platform bases, minus SEARCH.\n *\n * Field UI uses inline enum `values` and `showDescription: true` aligned with billing.\n * Layout templates are implemented inline in each resource config, following the billing preset pattern.\n */\n\nconst guidanceEmptyState = { primaryAction: false as const };\n\n/**\n * The name of a guidance, progression or lifecycle STATE record. Each is a singleton per user or organization with\n * no name of its own, so it is named by its resource's own words — the READ title — never by a value. Its stage is\n * its state (the badge) and its flows are rows. These names used to be English written in code (\"User guidance ·\n * 3 flows\", with an English plural) or the raw stage value, which no translator could reach. A missing word shows\n * its key.\n */\nfunction stateRecordName({ t, resourceType }: { t: (key: string) => string; resourceType: string }): string {\n return t(`${LabellingTypes.RESOURCES}.${resourceType}.operations.read.title`);\n}\n\nfunction lifecycleStageFields(schemaShape: (typeof LifecycleStateSchema)['shape']) {\n return {\n currentStage: schemaShape.currentStage.enumUI({\n display: { displayMode: EnumDisplayMode.BADGE, showDescription: true },\n edit: { showDescription: true },\n values: {\n [LifecycleStage.SIGNED_UP]: { color: BadgeSemanticVariant.SECONDARY },\n [LifecycleStage.ACTIVATED]: { color: BadgeSemanticVariant.SUCCESS },\n [LifecycleStage.ENGAGED]: { color: BadgeSemanticVariant.SUCCESS },\n [LifecycleStage.DORMANT]: { color: BadgeSemanticVariant.WARNING },\n [LifecycleStage.REACTIVATED]: { color: BadgeSemanticVariant.INFO },\n [LifecycleStage.CHURNED]: { color: BadgeSemanticVariant.DESTRUCTIVE },\n [LifecycleStage.OFFBOARDED]: { color: BadgeSemanticVariant.DESTRUCTIVE },\n },\n }),\n };\n}\n\nexport function buildGuidanceMainPresets(): Partial<ResourceUIBehavior> {\n return {\n [R.USER_PROGRESSION_STATE]: resourceUIBehavior(userProgressionStateFactory, ProgressionStateSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: Trophy,\n emptyState: guidanceEmptyState,\n // Points are a value (a row); \"pts\" was English written in code. The record is named by its resource.\n getFrontendResourceLabel: stateRecordName,\n layout: {\n refs: {\n sections: ['overview', 'activity', 'milestones'],\n },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"totalPoints\" />\n </Section>\n <Section name=\"activity\">\n <DisplayField name=\"categoriesProgress\" />\n <DisplayField name=\"operationCounts\" />\n </Section>\n <Section name=\"milestones\">\n <DisplayField name=\"milestonesAchieved\" />\n </Section>\n </DisplayLayout>\n ),\n summary: () => (\n // TEMPLATE_OWNED with no title, because this card's LABEL is `${totalPoints} pts` — the\n // same value the row renders. Left at AUTO the framework puts the label at the head of\n // the row and the card says it twice: \"1250 pts · Total points: 1250\". The FIELD wins,\n // because it carries its own i18n label and the bare value does not.\n <SummaryLayout flow={SummaryFlow.ROW} titlePlacement={SummaryTitlePlacement.TEMPLATE_OWNED}>\n <DisplayField name=\"totalPoints\" />\n </SummaryLayout>\n ),\n },\n fields: {\n totalPoints: schemaShape.totalPoints.numberUI({\n display: { displayMode: NumberDisplayMode.FORMATTED, showDescription: true },\n edit: { showDescription: true },\n }),\n },\n views: [\n [Op.READ, notAddressable()],\n [Op.SEARCH, notAddressable()],\n ],\n })),\n\n [R.ORGANIZATION_PROGRESSION_STATE]: resourceUIBehavior(orgProgressionStateFactory, ProgressionStateSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: Trophy,\n emptyState: guidanceEmptyState,\n // Points are a value (a row); \"pts\" was English written in code. The record is named by its resource.\n getFrontendResourceLabel: stateRecordName,\n layout: {\n refs: {\n sections: ['overview', 'activity', 'milestones'],\n },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"totalPoints\" />\n </Section>\n <Section name=\"activity\">\n <DisplayField name=\"categoriesProgress\" />\n <DisplayField name=\"operationCounts\" />\n </Section>\n <Section name=\"milestones\">\n <DisplayField name=\"milestonesAchieved\" />\n </Section>\n </DisplayLayout>\n ),\n summary: () => (\n // TEMPLATE_OWNED with no title, because this card's LABEL is `${totalPoints} pts` — the\n // same value the row renders. Left at AUTO the framework puts the label at the head of\n // the row and the card says it twice: \"1250 pts · Total points: 1250\". The FIELD wins,\n // because it carries its own i18n label and the bare value does not.\n <SummaryLayout flow={SummaryFlow.ROW} titlePlacement={SummaryTitlePlacement.TEMPLATE_OWNED}>\n <DisplayField name=\"totalPoints\" />\n </SummaryLayout>\n ),\n },\n fields: {\n totalPoints: schemaShape.totalPoints.numberUI({\n display: { displayMode: NumberDisplayMode.FORMATTED, showDescription: true },\n edit: { showDescription: true },\n }),\n },\n views: [\n [Op.READ, notAddressable()],\n [Op.SEARCH, notAddressable()],\n ],\n })),\n\n [R.ORGANIZATION_LIFECYCLE_STATE]: resourceUIBehavior(orgLifecycleStateFactory, LifecycleStateSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: Compass,\n emptyState: guidanceEmptyState,\n getFrontendResourceLabel: stateRecordName,\n layout: {\n refs: {\n sections: ['overview', 'engagement', 'history'],\n },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"currentStage\" />\n <DisplayField name=\"stageEnteredAt\" />\n <DisplayField name=\"lastActiveAt\" />\n </Section>\n <Section name=\"engagement\">\n <DisplayField name=\"stagesVisited\" />\n <DisplayField name=\"activationCriteriaMet\" />\n <DisplayField name=\"engagement\" />\n </Section>\n <Section name=\"history\">\n <DisplayField name=\"stageHistory\" />\n </Section>\n </DisplayLayout>\n ),\n summary: () => (\n // Same as the progression siblings above: the card's LABEL *is* `currentStage`, so at AUTO\n // the stage was printed twice on one line — once bare, once with its field label.\n <SummaryLayout flow={SummaryFlow.ROW} titlePlacement={SummaryTitlePlacement.TEMPLATE_OWNED}>\n <DisplayField name=\"currentStage\" />\n </SummaryLayout>\n ),\n },\n fields: lifecycleStageFields(schemaShape),\n views: [\n [Op.READ, notAddressable()],\n [Op.SEARCH, notAddressable()],\n ],\n })),\n };\n}\n\nexport function buildGuidancePlatformPresets(): Partial<ResourceUIBehavior> {\n return {\n [R.USER_GUIDANCE_STATE]: resourceUIBehavior(userGuidanceStateFactory, GuidanceStateSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: BookOpen,\n emptyState: guidanceEmptyState,\n getFrontendResourceLabel: stateRecordName,\n layout: {\n refs: {\n sections: ['overview'],\n },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"flows\" />\n </Section>\n </DisplayLayout>\n ),\n summary: () => (\n <SummaryLayout>\n <DisplayField name=\"flows\" />\n </SummaryLayout>\n ),\n edit: () => (\n <FormLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <FormField name=\"flows\" />\n </Section>\n </FormLayout>\n ),\n },\n views: [\n [Op.READ, notAddressable()],\n // Guidance state is authored/tracked by the guidance engine — headless\n // (callable via API, no view: never created from a user-facing form).\n [Op.CREATE, apiOnly()],\n [Op.UPDATE, notAddressable()],\n [Op.SEARCH, notAddressable()],\n ],\n })),\n\n [R.ORGANIZATION_GUIDANCE_STATE]: resourceUIBehavior(orgGuidanceStateFactory, GuidanceStateSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: BookOpen,\n emptyState: guidanceEmptyState,\n getFrontendResourceLabel: stateRecordName,\n layout: {\n refs: {\n sections: ['overview'],\n },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"flows\" />\n </Section>\n </DisplayLayout>\n ),\n summary: () => (\n <SummaryLayout>\n <DisplayField name=\"flows\" />\n </SummaryLayout>\n ),\n edit: () => (\n <FormLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <FormField name=\"flows\" />\n </Section>\n </FormLayout>\n ),\n },\n views: [\n [Op.READ, notAddressable()],\n // Guidance state is authored/tracked by the guidance engine — headless\n // (callable via API, no view: never created from a user-facing form).\n [Op.CREATE, apiOnly()],\n [Op.UPDATE, notAddressable()],\n [Op.SEARCH, notAddressable()],\n ],\n })),\n\n [R.USER_LIFECYCLE_STATE]: resourceUIBehavior(userLifecycleStateFactory, LifecycleStateSchema, ({ schema, schemaShape, opsVariantResolver }) => ({\n icon: Compass,\n emptyState: guidanceEmptyState,\n getFrontendResourceLabel: stateRecordName,\n layout: {\n refs: {\n sections: ['overview', 'engagement', 'history'],\n },\n display: () => (\n <DisplayLayout>\n <Section name=\"overview\" appearance={SectionMode.CARD}>\n <DisplayField name=\"currentStage\" />\n <DisplayField name=\"stageEnteredAt\" />\n <DisplayField name=\"lastActiveAt\" />\n </Section>\n <Section name=\"engagement\">\n <DisplayField name=\"stagesVisited\" />\n <DisplayField name=\"activationCriteriaMet\" />\n <DisplayField name=\"engagement\" />\n </Section>\n <Section name=\"history\">\n <DisplayField name=\"stageHistory\" />\n </Section>\n </DisplayLayout>\n ),\n summary: () => (\n // Same as the progression siblings above: the card's LABEL *is* `currentStage`, so at AUTO\n // the stage was printed twice on one line — once bare, once with its field label.\n <SummaryLayout flow={SummaryFlow.ROW} titlePlacement={SummaryTitlePlacement.TEMPLATE_OWNED}>\n <DisplayField name=\"currentStage\" />\n </SummaryLayout>\n ),\n },\n fields: lifecycleStageFields(schemaShape),\n views: [\n [Op.READ, notAddressable()],\n [Op.SEARCH, notAddressable()],\n ],\n })),\n };\n}\n\nexport function buildGuidanceAdminPresets(\n main: Partial<ResourceUIBehavior>,\n platform: Partial<ResourceUIBehavior>,\n): Partial<ResourceUIBehavior> {\n return {\n [R.ORGANIZATION_GUIDANCE_STATE]: resourceUIBehaviorFrom(\n orgGuidanceStateFactory, platform[R.ORGANIZATION_GUIDANCE_STATE]!, ({ base }) => ({\n icon: base.icon,\n emptyState: base.emptyState,\n getFrontendResourceLabel: base.getFrontendResourceLabel,\n layout: base.layout,\n views: Array.from(base.views.entries()).filter(([op]) => op !== Op.SEARCH),\n }),\n ),\n [R.ORGANIZATION_PROGRESSION_STATE]: resourceUIBehaviorFrom(\n orgProgressionStateFactory, main[R.ORGANIZATION_PROGRESSION_STATE]!, ({ base }) => ({\n icon: base.icon,\n emptyState: base.emptyState,\n getFrontendResourceLabel: base.getFrontendResourceLabel,\n layout: base.layout,\n fields: base.fields,\n views: Array.from(base.views.entries()).filter(([op]) => op !== Op.SEARCH),\n }),\n ),\n [R.ORGANIZATION_LIFECYCLE_STATE]: resourceUIBehaviorFrom(\n orgLifecycleStateFactory, main[R.ORGANIZATION_LIFECYCLE_STATE]!, ({ base }) => ({\n icon: base.icon,\n emptyState: base.emptyState,\n getFrontendResourceLabel: base.getFrontendResourceLabel,\n layout: base.layout,\n fields: base.fields,\n views: Array.from(base.views.entries()).filter(([op]) => op !== Op.SEARCH),\n }),\n ),\n };\n}\n\nexport const guidanceMainPresets = buildGuidanceMainPresets();\nexport const guidancePlatformPresets = buildGuidancePlatformPresets();\nexport const guidanceAdminPresets = buildGuidanceAdminPresets(\n guidanceMainPresets,\n guidancePlatformPresets,\n);\n\nexport const userGuidanceStatePlatformResourceUIBehavior = guidancePlatformPresets[R.USER_GUIDANCE_STATE]!;\nexport const organizationGuidanceStatePlatformResourceUIBehavior = guidancePlatformPresets[R.ORGANIZATION_GUIDANCE_STATE]!;\nexport const organizationGuidanceStateAdminResourceUIBehavior = guidanceAdminPresets[R.ORGANIZATION_GUIDANCE_STATE]!;\nexport const userProgressionStateMainResourceUIBehavior = guidanceMainPresets[R.USER_PROGRESSION_STATE]!;\nexport const organizationProgressionStateMainResourceUIBehavior = guidanceMainPresets[R.ORGANIZATION_PROGRESSION_STATE]!;\nexport const organizationProgressionStateAdminResourceUIBehavior = guidanceAdminPresets[R.ORGANIZATION_PROGRESSION_STATE]!;\nexport const userLifecycleStatePlatformResourceUIBehavior = guidancePlatformPresets[R.USER_LIFECYCLE_STATE]!;\nexport const organizationLifecycleStateMainResourceUIBehavior = guidanceMainPresets[R.ORGANIZATION_LIFECYCLE_STATE]!;\nexport const organizationLifecycleStateAdminResourceUIBehavior = guidanceAdminPresets[R.ORGANIZATION_LIFECYCLE_STATE]!;\n"]}
@@ -1,17 +1,4 @@
1
1
  import type { ResourceUIBehavior } from "@wildo-ai/saas-frontend-lib";
2
- /**
3
- * Identity & Users — Resource frontend presets
4
- *
5
- * **Main:** USER_SELF, USER_SELF_PROFILES, USER_SELF_PREFERENCES, USERS (read-only for
6
- * mentions/assignments), ANONYMOUS_USERS, USER_FEATURES. End users use the `_SELF` variants
7
- * for their own profiles/preferences — USER_PROFILES and USER_PREFERENCES are **admin-only**.
8
- *
9
- * **Admin:** USERS (LIST addressable — user management page), USER_PROFILES, USER_PREFERENCES,
10
- * ANONYMOUS_USERS, USER_FEATURES.
11
- *
12
- * Field-level `{primitive}UI` follows the billing convention: inline `values` for enums, and
13
- * `showDescription: true`. Layout templates are implemented inline in each resource config.
14
- */
15
2
  export declare const usersMainResourceUIBehavior: import("@wildo-ai/saas-frontend-lib").ResourceUIBehaviorConfig<any, any, import("zod").ZodAny>;
16
3
  export declare const usersAdminResourceUIBehavior: import("@wildo-ai/saas-frontend-lib").ResourceUIBehaviorConfig<any, any, import("zod").ZodAny>;
17
4
  export declare function buildIdentityMainPresets(): Partial<ResourceUIBehavior>;
@@ -1 +1 @@
1
- {"version":3,"file":"identity.resource-presets.d.ts","sourceRoot":"","sources":["../../../../../src/config/resources/identity.resource-presets.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAuCtE;;;;;;;;;;;;GAYG;AAEH,eAAO,MAAM,2BAA2B,gGAiErC,CAAC;AAEJ,eAAO,MAAM,4BAA4B,gGA+CtC,CAAC;AAEJ,wBAAgB,wBAAwB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CA4WtE;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAuCxG;AAED,eAAO,MAAM,mBAAmB,6BAA6B,CAAC;AAC9D,eAAO,MAAM,oBAAoB,6BAAiD,CAAC;AAGnF,eAAO,MAAM,0BAA0B,gGAAoC,CAAC;AAC5E,eAAO,MAAM,kCAAkC,gGAA6C,CAAC;AAC7F,eAAO,MAAM,qCAAqC,gGAAgD,CAAC;AACnG,eAAO,MAAM,oCAAoC,gGAA0C,CAAC;AAC5F,eAAO,MAAM,qCAAqC,gGAA2C,CAAC;AAC9F,eAAO,MAAM,8BAA8B,gGAAyC,CAAC;AACrF,eAAO,MAAM,iCAAiC,gGAA4C,CAAC;AAC3F,eAAO,MAAM,kCAAkC,gGAAwC,CAAC;AACxF,eAAO,MAAM,mCAAmC,gGAAyC,CAAC"}
1
+ {"version":3,"file":"identity.resource-presets.d.ts","sourceRoot":"","sources":["../../../../../src/config/resources/identity.resource-presets.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AAkEtE,eAAO,MAAM,2BAA2B,gGAiErC,CAAC;AAEJ,eAAO,MAAM,4BAA4B,gGA+CtC,CAAC;AAEJ,wBAAgB,wBAAwB,IAAI,OAAO,CAAC,kBAAkB,CAAC,CAsXtE;AAED,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,OAAO,CAAC,kBAAkB,CAAC,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAwCxG;AAED,eAAO,MAAM,mBAAmB,6BAA6B,CAAC;AAC9D,eAAO,MAAM,oBAAoB,6BAAiD,CAAC;AAGnF,eAAO,MAAM,0BAA0B,gGAAoC,CAAC;AAC5E,eAAO,MAAM,kCAAkC,gGAA6C,CAAC;AAC7F,eAAO,MAAM,qCAAqC,gGAAgD,CAAC;AACnG,eAAO,MAAM,oCAAoC,gGAA0C,CAAC;AAC5F,eAAO,MAAM,qCAAqC,gGAA2C,CAAC;AAC9F,eAAO,MAAM,8BAA8B,gGAAyC,CAAC;AACrF,eAAO,MAAM,iCAAiC,gGAA4C,CAAC;AAC3F,eAAO,MAAM,kCAAkC,gGAAwC,CAAC;AACxF,eAAO,MAAM,mCAAmC,gGAAyC,CAAC"}
@@ -18,6 +18,17 @@ import { addressable, notAddressable, apiOnly } from "./resource.config.utils.js
18
18
  * Field-level `{primitive}UI` follows the billing convention: inline `values` for enums, and
19
19
  * `showDescription: true`. Layout templates are implemented inline in each resource config.
20
20
  */
21
+ /**
22
+ * The name a profile is shown under — its header and its card title, for both the self and the admin
23
+ * variant (they share one layout, so they must share one name).
24
+ *
25
+ * The name a person CHOSE to be shown wins over the one assembled from its legal parts: `displayName`
26
+ * is optional and exists precisely to override "first last". Falling back keeps every profile named,
27
+ * since both halves are required.
28
+ */
29
+ function resolveUserProfileName(profile) {
30
+ return profile.displayName?.trim() || `${profile.firstName} ${profile.lastName}`.trim();
31
+ }
21
32
  export const usersMainResourceUIBehavior = resourceUIBehavior(usersFactory, UserSchema, ({ schemaShape }) => ({
22
33
  icon: StandardIconReference.USERS,
23
34
  layout: {
@@ -109,14 +120,16 @@ export function buildIdentityMainPresets() {
109
120
  })),
110
121
  [R.USER_SELF_PROFILES]: resourceUIBehavior(userSelfProfilesFactory, UserProfileSchema, ({ schema, schemaShape, opsVariantResolver }) => ({
111
122
  icon: StandardIconReference.PROFILE,
112
- getFrontendResourceLabel: ({ currentObject }) => `${currentObject.firstName} ${currentObject.lastName}`.trim(),
123
+ getFrontendResourceLabel: ({ currentObject }) => resolveUserProfileName(currentObject),
113
124
  layout: {
114
125
  // Flat, sectionless profile: a single settings-row list (no cards, no
115
126
  // section headers). The old identity/contact/profile grouping added
116
127
  // visual chrome without semantic value on a short self-profile form.
117
128
  refs: { sections: [] },
118
- // Settings-page chrome (Settings Hub → Profile): label-left / value-right rows.
119
- defaultChromeMode: { display: DisplayChromeMode.SETTINGS_ROW, summary: DisplayChromeMode.INLINE, edit: EditChromeMode.SETTINGS_ROW },
129
+ // Settings-page chrome (Settings Hub → Profile): label-left / value-right rows on read and
130
+ // edit. A card shows bare values — the name is the card's title and the job title needs no
131
+ // "Job title:" in front of it.
132
+ defaultChromeMode: { display: DisplayChromeMode.SETTINGS_ROW, summary: DisplayChromeMode.HIDDEN, edit: EditChromeMode.SETTINGS_ROW },
120
133
  // 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
121
134
  // writable fields are offered in place rather than behind a whole-pane edit mode. The set is
122
135
  // DERIVED (not primary key, not excludeFromUpdate, not hidden, not opted out), so a field
@@ -128,14 +141,21 @@ export function buildIdentityMainPresets() {
128
141
  // on a settings row, which is read one at a time to decide something, it is an answer that
129
142
  // refuses to answer.
130
143
  defaultEmptyValue: 'placeholder',
131
- display: () => (_jsxs(DisplayLayout, { children: [_jsx(DisplayField, { name: "displayName" }), _jsx(DisplayField, { name: "firstName" }), _jsx(DisplayField, { name: "lastName" }), _jsx(DisplayField, { name: "title" }), _jsx(DisplayField, { name: "avatar" }), _jsx(DisplayField, { name: "phoneNumber" }), _jsx(DisplayField, { name: "bio" })] })),
132
- summary: () => (_jsxs(SummaryLayout, { children: [_jsx(SummaryTitle, { name: "displayName" }), _jsxs(SummaryMeta, { children: [_jsx(DisplayField, { name: "firstName" }), _jsx(DisplayField, { name: "lastName" })] })] })),
133
- edit: () => (_jsxs(FormLayout, { children: [_jsx(FormField, { name: "displayName" }), _jsx(FormField, { name: "firstName" }), _jsx(FormField, { name: "lastName" }), _jsx(FormField, { name: "title" }), _jsx(FormField, { name: "avatar" }), _jsx(FormField, { name: "phoneNumber" }), _jsx(FormField, { name: "bio" })] })),
144
+ // Read and edit list the fields in ONE order: the two required name parts first, then the
145
+ // optional name that overrides them, then the rest. The read pane is edited in place, so a
146
+ // different order on the form would move every field the moment the person opened it.
147
+ display: () => (_jsxs(DisplayLayout, { children: [_jsx(DisplayField, { name: "firstName" }), _jsx(DisplayField, { name: "lastName" }), _jsx(DisplayField, { name: "displayName" }), _jsx(DisplayField, { name: "title" }), _jsx(DisplayField, { name: "avatar" }), _jsx(DisplayField, { name: "phoneNumber" }), _jsx(DisplayField, { name: "bio" })] })),
148
+ // A profile card is the person: their resolved name (display name, else first + last) as the
149
+ // title, their job title beneath it. The name parts are NOT repeated as meta rows — they were,
150
+ // as "First name: …" and "Last name: …" under a title already reading the same words.
151
+ summary: () => (_jsxs(SummaryLayout, { children: [_jsx(SummaryTitle, {}), _jsx(SummaryMeta, { children: _jsx(DisplayField, { name: "title" }) })] })),
152
+ edit: () => (_jsxs(FormLayout, { children: [_jsx(FormField, { name: "firstName", autoFocus: true }), _jsx(FormField, { name: "lastName" }), _jsx(FormField, { name: "displayName" }), _jsx(FormField, { name: "title" }), _jsx(FormField, { name: "avatar" }), _jsx(FormField, { name: "phoneNumber" }), _jsx(FormField, { name: "bio" })] })),
134
153
  },
135
154
  fields: {
136
- // Title is optional metadata — hide the row on the READ view until set
137
- // (the edit form still renders it so it can be filled).
138
- title: schemaShape.title.stringUI({ display: { hideWhenEmpty: true } }),
155
+ // Job title is optional. On the settings pane its empty row STAYS ("No value"): the pane is
156
+ // edited in place, and a row hidden while empty is a field nobody can set without opening
157
+ // the whole-pane form. On a card it disappears when unset — a card has no row to fill.
158
+ title: schemaShape.title.stringUI({ summaryOverride: { hideWhenEmpty: true } }),
139
159
  // Avatar renders INLINE as a small CIRCLE on display (opt-in), no caption — the
140
160
  // natural profile-picture look. Bytes are fetched over the authenticated
141
161
  // resource-integrated serve route (authz inherits the profile READ); without the
@@ -151,8 +171,9 @@ export function buildIdentityMainPresets() {
151
171
  // The edit control opts OUT of the layout's SETTINGS_ROW default
152
172
  // (label-left / narrow end column): long-form writing needs the full row
153
173
  // width, so the field authors STACKED — label above, editor spanning.
174
+ // Its empty row stays on the read pane for the same reason as the job title's.
154
175
  bio: schemaShape.bio.stringUI({
155
- display: { displayMode: StringDisplayMode.MARKDOWN, hideWhenEmpty: true },
176
+ display: { displayMode: StringDisplayMode.MARKDOWN },
156
177
  edit: { editMode: StringEditMode.MARKDOWN, chromeMode: EditChromeMode.STACKED },
157
178
  }),
158
179
  },
@@ -172,8 +193,9 @@ export function buildIdentityMainPresets() {
172
193
  // list. `appearance` (UI theme) is intentionally NOT a section here — see
173
194
  // the omission note in the display/edit templates.
174
195
  refs: { sections: ["notifications", "privacy", "regional", "language"] },
175
- // Settings-page chrome (Settings Hub → Preferences): label-left / value-right rows.
176
- defaultChromeMode: { display: DisplayChromeMode.SETTINGS_ROW, summary: DisplayChromeMode.INLINE, edit: EditChromeMode.SETTINGS_ROW },
196
+ // Settings-page chrome (Settings Hub → Preferences): label-left / value-right rows on read and
197
+ // edit, bare values on a card (see the summary template for which values it keeps and why).
198
+ defaultChromeMode: { display: DisplayChromeMode.SETTINGS_ROW, summary: DisplayChromeMode.HIDDEN, edit: EditChromeMode.SETTINGS_ROW },
177
199
  // A person’s own preferences — the canonical settings record. A settings pane is a list of decisions an operator came to TAKE, so its
178
200
  // writable fields are offered in place rather than behind a whole-pane edit mode. The set is
179
201
  // DERIVED (not primary key, not excludeFromUpdate, not hidden, not opted out), so a field
@@ -185,9 +207,18 @@ export function buildIdentityMainPresets() {
185
207
  // on a settings row, which is read one at a time to decide something, it is an answer that
186
208
  // refuses to answer.
187
209
  defaultEmptyValue: 'placeholder',
188
- display: () => (_jsxs(DisplayLayout, { children: [_jsx(Section, { name: "notifications", appearance: SectionMode.CARD, children: _jsxs(ObjectScope, { name: "notifications", children: [_jsx(DisplayField, { name: "email" }), _jsx(DisplayField, { name: "push" }), _jsx(DisplayField, { name: "sms" }), _jsx(DisplayField, { name: "inApp" })] }) }), _jsx(Section, { name: "privacy", appearance: SectionMode.CARD, children: _jsxs(ObjectScope, { name: "privacy", children: [_jsx(DisplayField, { name: "consentedPurposes" }), _jsx(DisplayField, { name: "consentDecidedAt" })] }) }), _jsx(Section, { name: "regional", appearance: SectionMode.CARD, children: _jsxs(ObjectScope, { name: "regional", children: [_jsx(DisplayField, { name: "timezone" }), _jsx(DisplayField, { name: "dateFormat" }), _jsx(DisplayField, { name: "timeFormat" }), _jsx(DisplayField, { name: "locale" })] }) }), _jsx(Section, { name: "language", appearance: SectionMode.CARD, children: _jsxs(ObjectScope, { name: "languagePreferences", children: [_jsx(DisplayField, { name: "primaryLanguage" }), _jsx(DisplayField, { name: "fallbackLanguages" }), _jsx(DisplayField, { name: "autoDetect" }), _jsx(DisplayField, { name: "useOrganizationDefault" })] }) })] })),
189
- summary: () => (_jsxs(SummaryLayout, { flow: SummaryFlow.ROW, children: [_jsx(ObjectScope, { name: "ui", children: _jsx(DisplayField, { name: "theme" }) }), _jsxs(ObjectScope, { name: "regional", children: [_jsx(DisplayField, { name: "timezone" }), _jsx(DisplayField, { name: "locale" })] }), _jsx(ObjectScope, { name: "languagePreferences", children: _jsx(DisplayField, { name: "primaryLanguage" }) })] })),
190
- edit: () => (_jsxs(FormLayout, { children: [_jsx(Section, { name: "notifications", appearance: SectionMode.CARD, children: _jsxs(ObjectScope, { name: "notifications", children: [_jsx(FormField, { name: "email" }), _jsx(FormField, { name: "push" }), _jsx(FormField, { name: "sms" }), _jsx(FormField, { name: "inApp" })] }) }), _jsx(Section, { name: "privacy", appearance: SectionMode.CARD, children: _jsx(ObjectScope, { name: "privacy", children: _jsx(FormField, { name: "consentedPurposes" }) }) }), _jsx(Section, { name: "regional", appearance: SectionMode.CARD, children: _jsxs(ObjectScope, { name: "regional", children: [_jsx(FormField, { name: "timezone" }), _jsx(FormField, { name: "dateFormat" }), _jsx(FormField, { name: "timeFormat" }), _jsx(FormField, { name: "locale" })] }) }), _jsx(Section, { name: "language", appearance: SectionMode.CARD, children: _jsxs(ObjectScope, { name: "languagePreferences", children: [_jsx(FormField, { name: "primaryLanguage" }), _jsx(FormField, { name: "fallbackLanguages" }), _jsx(FormField, { name: "autoDetect" }), _jsx(FormField, { name: "useOrganizationDefault" })] }) })] })),
210
+ // Every card keeps its heading and drops its description, on read AND on edit. The four headings
211
+ // name their contents plainly (Notifications, Privacy, Regional, Language); the descriptions
212
+ // under them ("Choose how you receive notifications") were prompts restating the heading, and
213
+ // this pane is edited in place, so the read view is where they were read on every visit.
214
+ display: () => (_jsxs(DisplayLayout, { children: [_jsx(Section, { name: "notifications", appearance: SectionMode.CARD, hideDescription: true, children: _jsxs(ObjectScope, { name: "notifications", children: [_jsx(DisplayField, { name: "email" }), _jsx(DisplayField, { name: "inApp" })] }) }), _jsx(Section, { name: "privacy", appearance: SectionMode.CARD, hideDescription: true, children: _jsxs(ObjectScope, { name: "privacy", children: [_jsx(DisplayField, { name: "consentedPurposes" }), _jsx(DisplayField, { name: "consentDecidedAt" })] }) }), _jsx(Section, { name: "regional", appearance: SectionMode.CARD, hideDescription: true, children: _jsxs(ObjectScope, { name: "regional", children: [_jsx(DisplayField, { name: "timezone" }), _jsx(DisplayField, { name: "dateFormat" }), _jsx(DisplayField, { name: "timeFormat" }), _jsx(DisplayField, { name: "locale" })] }) }), _jsx(Section, { name: "language", appearance: SectionMode.CARD, hideDescription: true, children: _jsxs(ObjectScope, { name: "languagePreferences", children: [_jsx(DisplayField, { name: "primaryLanguage" }), _jsx(DisplayField, { name: "fallbackLanguages" }), _jsx(DisplayField, { name: "useOrganizationDefault" })] }) })] })),
215
+ // A card carries only values that read unambiguously bare: the time zone ("UTC") and the
216
+ // interface language ("English"). The theme ("System") and the formatting locale were dropped
217
+ // rather than labelled — a bare "System" names nothing, and the locale usually reads as the SAME
218
+ // word as the language beside it ("English · English"). The locale stays on the read pane; the theme
219
+ // is shown and chosen on the Appearance panel that owns it.
220
+ summary: () => (_jsxs(SummaryLayout, { flow: SummaryFlow.ROW, children: [_jsx(ObjectScope, { name: "regional", children: _jsx(DisplayField, { name: "timezone" }) }), _jsx(ObjectScope, { name: "languagePreferences", children: _jsx(DisplayField, { name: "primaryLanguage" }) })] })),
221
+ edit: () => (_jsxs(FormLayout, { children: [_jsx(Section, { name: "notifications", appearance: SectionMode.CARD, hideDescription: true, children: _jsxs(ObjectScope, { name: "notifications", children: [_jsx(FormField, { name: "email" }), _jsx(FormField, { name: "inApp" })] }) }), _jsx(Section, { name: "privacy", appearance: SectionMode.CARD, hideDescription: true, children: _jsx(ObjectScope, { name: "privacy", children: _jsx(FormField, { name: "consentedPurposes" }) }) }), _jsx(Section, { name: "regional", appearance: SectionMode.CARD, hideDescription: true, children: _jsxs(ObjectScope, { name: "regional", children: [_jsx(FormField, { name: "timezone" }), _jsx(FormField, { name: "dateFormat" }), _jsx(FormField, { name: "timeFormat" }), _jsx(FormField, { name: "locale" })] }) }), _jsx(Section, { name: "language", appearance: SectionMode.CARD, hideDescription: true, children: _jsxs(ObjectScope, { name: "languagePreferences", children: [_jsx(FormField, { name: "primaryLanguage" }), _jsx(FormField, { name: "fallbackLanguages" }), _jsx(FormField, { name: "useOrganizationDefault" })] }) })] })),
191
222
  },
192
223
  views: [
193
224
  [Op.READ, notAddressable()],
@@ -229,7 +260,8 @@ export function buildIdentityAdminPresets(main) {
229
260
  })),
230
261
  [R.USER_PROFILES]: resourceUIBehavior(userProfilesFactory, UserProfileSchema, ({ schema, schemaShape, opsVariantResolver }) => ({
231
262
  icon: StandardIconReference.PROFILE,
232
- getFrontendResourceLabel: ({ currentObject }) => `${currentObject.firstName} ${currentObject.lastName}`.trim(),
263
+ // Same name as the self variant: the shared summary's title IS this label, so the two must agree.
264
+ getFrontendResourceLabel: ({ currentObject }) => resolveUserProfileName(currentObject),
233
265
  layout: main[R.USER_SELF_PROFILES]?.layout,
234
266
  views: [
235
267
  [opsVariantResolver(Op.READ, "admin"), notAddressable()],