@happyvertical/smrt-planner 0.0.2 → 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (752) hide show
  1. package/README.md +81 -8
  2. package/app/404.html +42 -49
  3. package/app/_app/immutable/assets/0.DUow1OzM.css +1 -0
  4. package/app/_app/immutable/assets/10.CdYxvH4G.css +1 -0
  5. package/app/_app/immutable/assets/11.nOT5Z4Fv.css +1 -0
  6. package/app/_app/immutable/assets/12.F7A7zP4J.css +1 -0
  7. package/app/_app/immutable/assets/13.JoySu8W5.css +1 -0
  8. package/app/_app/immutable/assets/14.nsp62-4b.css +1 -0
  9. package/app/_app/immutable/assets/2.CbPiqdz5.css +1 -0
  10. package/app/_app/immutable/assets/3.D518dbB5.css +1 -0
  11. package/app/_app/immutable/assets/4.B3vt1gMJ.css +1 -0
  12. package/app/_app/immutable/assets/AiSetup.4fXjMpTZ.css +1 -0
  13. package/app/_app/immutable/assets/AppShell.DOvXbUZo.css +1 -0
  14. package/app/_app/immutable/assets/ConnectTools.DTleL8YA.css +1 -0
  15. package/app/_app/immutable/assets/FieldMapForm.C8SZ3t4N.css +1 -0
  16. package/app/_app/immutable/assets/ModelPage.DbXvPbHE.css +1 -0
  17. package/app/_app/immutable/assets/SectionActions.BE1CPmxk.css +1 -0
  18. package/app/_app/immutable/assets/SectionIcons.BGFcFuOf.css +1 -0
  19. package/app/_app/immutable/assets/SegmentedControl.BkyuoCEJ.css +1 -0
  20. package/app/_app/immutable/assets/app.eM0k786r.css +1 -0
  21. package/app/_app/immutable/assets/currency-metadata.DDyu8_ub.css +1 -0
  22. package/app/_app/immutable/assets/data.bGq43K60.css +1 -0
  23. package/app/_app/immutable/assets/feedback.xBpOq9ef.css +1 -0
  24. package/app/_app/immutable/assets/forms.B3_bbIMe.css +1 -0
  25. package/app/_app/immutable/assets/labels.BiuUjqHs.css +1 -0
  26. package/app/_app/immutable/assets/percent.DbwvwMhf.css +1 -0
  27. package/app/_app/immutable/assets/state.CJipYvSU.css +1 -0
  28. package/app/_app/immutable/assets/webmcp-ui-context.BnR-DUfO.css +1 -0
  29. package/app/_app/immutable/assets/workspace.B5Xq-5pJ.css +1 -0
  30. package/app/_app/immutable/chunks/1ElZWh_R.js +10 -0
  31. package/app/_app/immutable/chunks/B-CpwO-j.js +1 -0
  32. package/app/_app/immutable/chunks/{BnRri03M.js → B7KB-rhH.js} +1 -1
  33. package/app/_app/immutable/chunks/BUhghcIm.js +1 -0
  34. package/app/_app/immutable/chunks/BV3NwM01.js +1 -0
  35. package/app/_app/immutable/chunks/BZVZZ6VY.js +1 -0
  36. package/app/_app/immutable/chunks/Ba1g71Sq.js +1 -0
  37. package/app/_app/immutable/chunks/BeJD7_hy.js +1 -0
  38. package/app/_app/immutable/chunks/BiO_bqNH.js +2 -0
  39. package/app/_app/immutable/chunks/{DkR8_Ws6.js → BqBuCJB_.js} +2 -2
  40. package/app/_app/immutable/chunks/BsJoBmTA.js +1 -0
  41. package/app/_app/immutable/chunks/Bxbz6_Mb.js +1 -0
  42. package/app/_app/immutable/chunks/Bz5uCkjV.js +2 -0
  43. package/app/_app/immutable/chunks/BzMfoxBk.js +1 -0
  44. package/app/_app/immutable/chunks/CF6zSg_o.js +2 -0
  45. package/app/_app/immutable/chunks/CFL0B6dk.js +1 -0
  46. package/app/_app/immutable/chunks/CRu55ZTy.js +4 -0
  47. package/app/_app/immutable/chunks/{CyUMm_Wp.js → Cv2EcCr0.js} +1 -1
  48. package/app/_app/immutable/chunks/D-3Ri0zJ.js +1 -0
  49. package/app/_app/immutable/chunks/{BWPhGFHl.js → D0FW0z6R.js} +1 -1
  50. package/app/_app/immutable/chunks/D7d5GssF.js +1 -0
  51. package/app/_app/immutable/chunks/DCsSRJsN.js +1 -0
  52. package/app/_app/immutable/chunks/DGqV6_5v.js +1 -0
  53. package/app/_app/immutable/chunks/DNSRTkf6.js +11 -0
  54. package/app/_app/immutable/chunks/DQNX_XPY.js +1 -0
  55. package/app/_app/immutable/chunks/DSyIMN4M.js +1 -0
  56. package/app/_app/immutable/chunks/DUTtmM1Y.js +1 -0
  57. package/app/_app/immutable/chunks/DYuawOB3.js +980 -0
  58. package/app/_app/immutable/chunks/DfCLzLZc.js +1 -0
  59. package/app/_app/immutable/chunks/Dh5fne6n.js +1 -0
  60. package/app/_app/immutable/chunks/LruoUXGC.js +1 -0
  61. package/app/_app/immutable/chunks/ZLqixH7j.js +9 -0
  62. package/app/_app/immutable/chunks/_pYwB_Eb.js +4 -0
  63. package/app/_app/immutable/chunks/aoU3lIZI.js +1 -0
  64. package/app/_app/immutable/chunks/c57ZlocB.js +24 -0
  65. package/app/_app/immutable/chunks/h8ppmjOm.js +1 -0
  66. package/app/_app/immutable/chunks/jhcy_jeO.js +1 -0
  67. package/app/_app/immutable/chunks/vNEnXNLV.js +3 -0
  68. package/app/_app/immutable/chunks/vwntRvfV.js +1 -0
  69. package/app/_app/immutable/entry/app.D5LoTsNA.js +2 -0
  70. package/app/_app/immutable/entry/start.Sb_s0NGC.js +1 -0
  71. package/app/_app/immutable/nodes/0.Cuo9-RQc.js +9 -0
  72. package/app/_app/immutable/nodes/1.BW8Ar5T3.js +1 -0
  73. package/app/_app/immutable/nodes/10.CpLYjN7r.js +3 -0
  74. package/app/_app/immutable/nodes/11.BMPKD4M3.js +1 -0
  75. package/app/_app/immutable/nodes/12.WYpy0AHE.js +4 -0
  76. package/app/_app/immutable/nodes/13.BYo05X9B.js +1 -0
  77. package/app/_app/immutable/nodes/14.DN0MT3KB.js +1 -0
  78. package/app/_app/immutable/nodes/2.DM6k_pqu.js +24 -0
  79. package/app/_app/immutable/nodes/3.YgEwJ-vF.js +1 -0
  80. package/app/_app/immutable/nodes/4.A3Y6Lax0.js +1 -0
  81. package/app/_app/immutable/nodes/5.D9Vd85hG.js +1 -0
  82. package/app/_app/immutable/nodes/6.C5c56bSW.js +1 -0
  83. package/app/_app/immutable/nodes/7.CDBMbYlD.js +1 -0
  84. package/app/_app/immutable/nodes/8.8olDkDou.js +1 -0
  85. package/app/_app/immutable/nodes/9.CWgx__8Z.js +1 -0
  86. package/app/_app/version.json +1 -1
  87. package/app/advanced-styles/index.html +84 -0
  88. package/app/ai/index.html +60 -52
  89. package/app/blueprint/index.html +46 -53
  90. package/app/cookbook/index.html +46 -53
  91. package/app/index.html +92 -64
  92. package/app/m/ads/AdDeliveryTier/index.html +52 -59
  93. package/app/m/ads/AdEvent/index.html +52 -59
  94. package/app/m/ads/AdFormat/index.html +52 -59
  95. package/app/m/ads/AdGroup/index.html +52 -59
  96. package/app/m/ads/AdVariation/index.html +52 -59
  97. package/app/m/analytics/AnalyticsDataStream/index.html +52 -59
  98. package/app/m/analytics/AnalyticsEvent/index.html +52 -59
  99. package/app/m/analytics/AnalyticsProperty/index.html +52 -59
  100. package/app/m/analytics/AnalyticsReport/index.html +52 -59
  101. package/app/m/approvals/ApprovalEvent/index.html +52 -59
  102. package/app/m/approvals/ApprovalPolicy/index.html +52 -59
  103. package/app/m/approvals/ApprovalRequest/index.html +52 -59
  104. package/app/m/assets/Asset/attachments/index.html +91 -0
  105. package/app/m/assets/Asset/index.html +52 -59
  106. package/app/m/assets/AssetAssociation/index.html +53 -60
  107. package/app/m/assets/AssetMetafield/index.html +52 -59
  108. package/app/m/assets/AssetStatus/index.html +52 -59
  109. package/app/m/assets/AssetType/index.html +52 -59
  110. package/app/m/assets/Folder/index.html +52 -59
  111. package/app/m/chat/AgentSession/index.html +52 -59
  112. package/app/m/chat/ChatMessage/index.html +53 -60
  113. package/app/m/chat/ChatParticipant/index.html +53 -60
  114. package/app/m/chat/ChatReaction/index.html +52 -59
  115. package/app/m/chat/ChatRoom/index.html +52 -59
  116. package/app/m/chat/ChatThread/index.html +53 -60
  117. package/app/m/chat/VoiceGatewayTurn/index.html +52 -59
  118. package/app/m/chat/VoiceSession/index.html +52 -59
  119. package/app/m/commerce/Agreement/index.html +52 -59
  120. package/app/m/commerce/Cart/index.html +52 -59
  121. package/app/m/commerce/Contract/index.html +52 -59
  122. package/app/m/commerce/ContractLineItem/index.html +53 -60
  123. package/app/m/commerce/Customer/index.html +52 -59
  124. package/app/m/commerce/DocumentTax/index.html +89 -0
  125. package/app/m/commerce/Estimate/index.html +52 -59
  126. package/app/m/commerce/Fulfillment/index.html +52 -59
  127. package/app/m/commerce/FulfillmentLineItem/index.html +53 -60
  128. package/app/m/commerce/Invoice/index.html +52 -59
  129. package/app/m/commerce/InvoiceLineItem/index.html +53 -60
  130. package/app/m/commerce/Lease/index.html +52 -59
  131. package/app/m/commerce/LicenseSale/index.html +52 -59
  132. package/app/m/commerce/Order/index.html +52 -59
  133. package/app/m/commerce/Payment/index.html +52 -59
  134. package/app/m/commerce/PaymentAllocation/index.html +53 -60
  135. package/app/m/commerce/PaymentInstrument/index.html +52 -59
  136. package/app/m/commerce/PaymentIntent/index.html +52 -59
  137. package/app/m/commerce/Payout/index.html +52 -59
  138. package/app/m/commerce/ProductionOrder/index.html +52 -59
  139. package/app/m/commerce/PurchaseContract/index.html +89 -0
  140. package/app/m/commerce/PurchaseOrder/index.html +52 -59
  141. package/app/m/commerce/SalesContract/index.html +89 -0
  142. package/app/m/commerce/SupplierQuote/index.html +89 -0
  143. package/app/m/commerce/TaxCode/index.html +89 -0
  144. package/app/m/commerce/TaxComponent/index.html +89 -0
  145. package/app/m/commerce/TaxSettings/index.html +89 -0
  146. package/app/m/commerce/TaxSummaryReport/index.html +89 -0
  147. package/app/m/commerce/Vendor/index.html +52 -59
  148. package/app/m/commerce/WholesaleOrder/index.html +52 -59
  149. package/app/m/content/Content/index.html +52 -59
  150. package/app/m/content/ContentContribution/index.html +52 -59
  151. package/app/m/content/ContentContributionAttachment/index.html +52 -59
  152. package/app/m/content/ContentContributionRevision/index.html +52 -59
  153. package/app/m/content/ContentContributionType/index.html +52 -59
  154. package/app/m/content/ContentContributor/index.html +52 -59
  155. package/app/m/content/ContentCorrection/index.html +52 -59
  156. package/app/m/content/ContentFeedSource/index.html +52 -59
  157. package/app/m/content/ContentGovernanceAssignment/index.html +52 -59
  158. package/app/m/content/ContentGovernancePolicy/index.html +52 -59
  159. package/app/m/content/ContentGovernanceProfile/index.html +52 -59
  160. package/app/m/content/ContentReference/index.html +52 -59
  161. package/app/m/content/ContentReview/index.html +52 -59
  162. package/app/m/content/ContentVersion/index.html +52 -59
  163. package/app/m/events/Event/index.html +52 -59
  164. package/app/m/events/EventParticipant/index.html +53 -60
  165. package/app/m/events/EventSeries/index.html +52 -59
  166. package/app/m/events/EventType/index.html +52 -59
  167. package/app/m/expenses/Expense/index.html +89 -0
  168. package/app/m/facts/Fact/index.html +52 -59
  169. package/app/m/facts/FactContent/index.html +52 -59
  170. package/app/m/facts/FactEvidence/index.html +52 -59
  171. package/app/m/facts/FactSource/index.html +52 -59
  172. package/app/m/facts/FactSubject/index.html +52 -59
  173. package/app/m/facts/FactTag/index.html +52 -59
  174. package/app/m/fields/FieldPolicy/index.html +52 -59
  175. package/app/m/fields/FieldPolicySuggestion/index.html +52 -59
  176. package/app/m/fields/FieldUsageCounter/index.html +52 -59
  177. package/app/m/images/Image/index.html +52 -59
  178. package/app/m/inventory/InventoryLocation/index.html +52 -59
  179. package/app/m/inventory/StockLevel/index.html +52 -59
  180. package/app/m/inventory/StockMovement/index.html +52 -59
  181. package/app/m/ledgers/Account/index.html +52 -59
  182. package/app/m/ledgers/Journal/index.html +52 -59
  183. package/app/m/ledgers/JournalEntry/index.html +53 -60
  184. package/app/m/manufacturing/Assembly/index.html +52 -59
  185. package/app/m/manufacturing/BillOfMaterials/index.html +52 -59
  186. package/app/m/manufacturing/BomLine/index.html +52 -59
  187. package/app/m/manufacturing/Operation/index.html +52 -59
  188. package/app/m/manufacturing/ProductionRun/index.html +52 -59
  189. package/app/m/manufacturing/ProductionRunCompletion/index.html +52 -59
  190. package/app/m/manufacturing/RoutingStep/index.html +52 -59
  191. package/app/m/marketing/Campaign/index.html +52 -59
  192. package/app/m/marketing/CampaignChannel/index.html +52 -59
  193. package/app/m/marketing/CampaignMetricSnapshot/index.html +52 -59
  194. package/app/m/messages/Account/index.html +52 -59
  195. package/app/m/messages/Attachment/index.html +52 -59
  196. package/app/m/messages/Blacklist/index.html +52 -59
  197. package/app/m/messages/Email/failed-sends/index.html +54 -59
  198. package/app/m/messages/Email/index.html +52 -59
  199. package/app/m/messages/Email/mailbox/index.html +54 -59
  200. package/app/m/messages/EmailAccount/index.html +52 -59
  201. package/app/m/messages/EmailAttachment/index.html +89 -0
  202. package/app/m/messages/EmailFolder/index.html +52 -59
  203. package/app/m/messages/Message/index.html +52 -59
  204. package/app/m/messages/MessagingEndpoint/index.html +52 -59
  205. package/app/m/messages/PersonaMessageRoute/index.html +52 -59
  206. package/app/m/messages/SlackAccount/index.html +52 -59
  207. package/app/m/messages/SlackMessage/index.html +52 -59
  208. package/app/m/messages/TelegramAccount/index.html +52 -59
  209. package/app/m/messages/Tweet/index.html +52 -59
  210. package/app/m/messages/TwitterAccount/index.html +52 -59
  211. package/app/m/messages/Whitelist/index.html +52 -59
  212. package/app/m/messages/ZulipAccount/index.html +52 -59
  213. package/app/m/places/Place/index.html +52 -59
  214. package/app/m/places/PlaceType/index.html +52 -59
  215. package/app/m/products/Category/index.html +52 -59
  216. package/app/m/products/Material/index.html +52 -59
  217. package/app/m/products/Product/index.html +52 -59
  218. package/app/m/products/Product/ingredients/index.html +54 -59
  219. package/app/m/products/ProductVariant/index.html +53 -60
  220. package/app/m/products/Sku/index.html +53 -60
  221. package/app/m/profiles/ApiKey/index.html +52 -59
  222. package/app/m/profiles/Bot/index.html +52 -59
  223. package/app/m/profiles/MagicLinkToken/index.html +52 -59
  224. package/app/m/profiles/NostrIdentity/index.html +52 -59
  225. package/app/m/profiles/OidcIdentity/index.html +52 -59
  226. package/app/m/profiles/Organization/index.html +52 -59
  227. package/app/m/profiles/Person/index.html +52 -59
  228. package/app/m/profiles/Profile/index.html +52 -59
  229. package/app/m/profiles/ProfileMetadata/index.html +52 -59
  230. package/app/m/profiles/ProfileMetafield/index.html +52 -59
  231. package/app/m/profiles/ProfileRelationship/index.html +52 -59
  232. package/app/m/profiles/ProfileRelationshipTerm/index.html +52 -59
  233. package/app/m/profiles/ProfileRelationshipType/index.html +52 -59
  234. package/app/m/profiles/ProfileType/index.html +52 -59
  235. package/app/m/projects/Comment/index.html +53 -60
  236. package/app/m/projects/Issue/index.html +52 -59
  237. package/app/m/projects/Label/index.html +52 -59
  238. package/app/m/projects/Project/index.html +52 -59
  239. package/app/m/projects/ProjectIntegration/index.html +52 -59
  240. package/app/m/projects/PullRequest/index.html +52 -59
  241. package/app/m/projects/Repository/index.html +52 -59
  242. package/app/m/properties/Property/index.html +52 -59
  243. package/app/m/properties/Zone/index.html +52 -59
  244. package/app/m/reports/RuntimeReport/index.html +52 -59
  245. package/app/m/reports/SmrtPrincipalReportRefreshTask/index.html +52 -59
  246. package/app/m/reports/SmrtReportLock/index.html +52 -59
  247. package/app/m/reports/SmrtReportRefreshTask/index.html +52 -59
  248. package/app/m/reports/SmrtReportRun/index.html +52 -59
  249. package/app/m/reports/SmrtReportSchedule/index.html +52 -59
  250. package/app/m/reports/SmrtReportWatermark/index.html +52 -59
  251. package/app/m/sales/AttributionException/index.html +52 -59
  252. package/app/m/sales/AttributionPolicy/index.html +52 -59
  253. package/app/m/sales/Commission/index.html +52 -59
  254. package/app/m/sales/CommissionAdjustment/index.html +52 -59
  255. package/app/m/sales/CommissionPayout/index.html +52 -59
  256. package/app/m/sales/CommissionPlan/index.html +52 -59
  257. package/app/m/sales/Earner/index.html +52 -59
  258. package/app/m/sales/EarnerSourceAttribution/index.html +52 -59
  259. package/app/m/sales/EarningEvent/index.html +52 -59
  260. package/app/m/sales/ExecutedAgreement/index.html +52 -59
  261. package/app/m/sales/Lead/index.html +52 -59
  262. package/app/m/sales/Opportunity/index.html +52 -59
  263. package/app/m/sales/OpportunityConversion/index.html +52 -59
  264. package/app/m/sales/PipelineDefinition/index.html +52 -59
  265. package/app/m/sales/PipelineStage/index.html +53 -60
  266. package/app/m/sales/Referral/index.html +52 -59
  267. package/app/m/sales/ReferralAgreement/index.html +52 -59
  268. package/app/m/sales/ReferralLink/index.html +52 -59
  269. package/app/m/sales/ReferralProgram/index.html +52 -59
  270. package/app/m/sales/ReferralTermSnapshot/index.html +52 -59
  271. package/app/m/sales/ReferralTouch/index.html +52 -59
  272. package/app/m/sales/Referrer/index.html +52 -59
  273. package/app/m/sales/SalesActivity/index.html +52 -59
  274. package/app/m/sales/SalesRepresentative/index.html +52 -59
  275. package/app/m/sites/Site/index.html +52 -59
  276. package/app/m/sites/SiteAgentBinding/index.html +52 -59
  277. package/app/m/social/OAuthState/index.html +52 -59
  278. package/app/m/social/SocialAccount/index.html +52 -59
  279. package/app/m/social/SocialPost/index.html +52 -59
  280. package/app/m/social/SocialPostAnalyticsSnapshot/index.html +52 -59
  281. package/app/m/subscriptions/BillingAdjustment/index.html +52 -59
  282. package/app/m/subscriptions/ClientCharge/index.html +52 -59
  283. package/app/m/subscriptions/CreditGrant/index.html +52 -59
  284. package/app/m/subscriptions/PricingRule/index.html +52 -59
  285. package/app/m/subscriptions/RetailCharge/index.html +52 -59
  286. package/app/m/subscriptions/SpendingPolicy/index.html +52 -59
  287. package/app/m/subscriptions/SubscriptionPlan/index.html +52 -59
  288. package/app/m/subscriptions/TenantSubscription/index.html +52 -59
  289. package/app/m/subscriptions/TenantUsageMetric/index.html +52 -59
  290. package/app/m/support/ServiceTimeEntry/index.html +52 -59
  291. package/app/m/support/SupportAiRun/index.html +52 -59
  292. package/app/m/support/SupportAvailability/index.html +52 -59
  293. package/app/m/support/SupportCase/index.html +52 -59
  294. package/app/m/support/SupportCaseEvent/index.html +52 -59
  295. package/app/m/support/SupportChannelBinding/index.html +52 -59
  296. package/app/m/support/SupportCharge/index.html +52 -59
  297. package/app/m/support/SupportCompensation/index.html +52 -59
  298. package/app/m/support/SupportCompensationPlan/index.html +52 -59
  299. package/app/m/support/SupportEscalation/index.html +52 -59
  300. package/app/m/support/SupportInteraction/index.html +52 -59
  301. package/app/m/support/SupportPlan/index.html +52 -59
  302. package/app/m/support/SupportPolicy/index.html +52 -59
  303. package/app/m/support/SupportQualification/index.html +52 -59
  304. package/app/m/support/SupportServiceTarget/index.html +52 -59
  305. package/app/m/support/SupportSpecialist/index.html +52 -59
  306. package/app/m/support/SupportWorkLink/index.html +52 -59
  307. package/app/m/tags/Tag/index.html +52 -59
  308. package/app/m/tags/TagAlias/index.html +52 -59
  309. package/app/m/timesheets/AttendanceBreak/index.html +52 -59
  310. package/app/m/timesheets/AttendancePunch/index.html +52 -59
  311. package/app/m/timesheets/AttendanceSegment/index.html +89 -0
  312. package/app/m/timesheets/ServiceChargeSnapshot/index.html +52 -59
  313. package/app/m/timesheets/ServiceCompensationSnapshot/index.html +52 -59
  314. package/app/m/timesheets/ServiceTimeEntry/index.html +52 -59
  315. package/app/m/users/Group/index.html +52 -59
  316. package/app/m/users/GroupMember/index.html +52 -59
  317. package/app/m/users/GroupRole/index.html +52 -59
  318. package/app/m/users/Membership/index.html +53 -60
  319. package/app/m/users/MembershipOverride/index.html +52 -59
  320. package/app/m/users/Permission/index.html +52 -59
  321. package/app/m/users/Role/index.html +52 -59
  322. package/app/m/users/RolePermission/index.html +52 -59
  323. package/app/m/users/Session/index.html +52 -59
  324. package/app/m/users/Tenant/index.html +52 -59
  325. package/app/m/users/TenantIntegration/index.html +52 -59
  326. package/app/m/users/TenantPermissionOverride/index.html +52 -59
  327. package/app/m/users/User/index.html +52 -59
  328. package/app/m/video/Character/index.html +52 -59
  329. package/app/m/video/CharacterAsset/index.html +52 -59
  330. package/app/m/video/CompositeJob/index.html +52 -59
  331. package/app/m/video/Performer/index.html +52 -59
  332. package/app/m/video/PerformerAsset/index.html +52 -59
  333. package/app/m/video/Scene/index.html +52 -59
  334. package/app/m/video/SceneAsset/index.html +52 -59
  335. package/app/m/video/VideoComposition/index.html +52 -59
  336. package/app/m/video/VideoCompositionAsset/index.html +52 -59
  337. package/app/m/video/VideoSequence/index.html +52 -59
  338. package/app/m/video/VideoSequenceAsset/index.html +52 -59
  339. package/app/m/video/VideoShot/index.html +52 -59
  340. package/app/m/video/VideoShotAsset/index.html +52 -59
  341. package/app/m/video/VideoShotCharacter/index.html +52 -59
  342. package/app/m/video/VideoWorkflow/index.html +52 -59
  343. package/app/m/voice/VoiceOutput/index.html +52 -59
  344. package/app/m/voice/VoiceProfile/index.html +52 -59
  345. package/app/m/voice/VoiceSample/index.html +52 -59
  346. package/app/packages/ads/index.html +50 -57
  347. package/app/packages/analytics/index.html +50 -57
  348. package/app/packages/approvals/index.html +50 -57
  349. package/app/packages/assets/index.html +50 -57
  350. package/app/packages/chat/index.html +50 -57
  351. package/app/packages/comments/index.html +50 -57
  352. package/app/packages/commerce/index.html +50 -57
  353. package/app/packages/content/index.html +50 -57
  354. package/app/packages/events/index.html +50 -57
  355. package/app/packages/expenses/index.html +50 -57
  356. package/app/packages/facts/index.html +50 -57
  357. package/app/packages/fields/index.html +50 -57
  358. package/app/packages/human-resources/index.html +50 -57
  359. package/app/packages/images/index.html +50 -57
  360. package/app/packages/index.html +49 -55
  361. package/app/packages/ingestion/index.html +85 -0
  362. package/app/packages/inventory/index.html +50 -57
  363. package/app/packages/ledgers/index.html +50 -57
  364. package/app/packages/manufacturing/index.html +50 -57
  365. package/app/packages/marketing/index.html +50 -57
  366. package/app/packages/messages/index.html +50 -57
  367. package/app/packages/places/index.html +50 -57
  368. package/app/packages/preferences/index.html +50 -57
  369. package/app/packages/products/index.html +50 -57
  370. package/app/packages/profiles/index.html +50 -57
  371. package/app/packages/projects/index.html +50 -57
  372. package/app/packages/properties/index.html +50 -57
  373. package/app/packages/reports/index.html +50 -57
  374. package/app/packages/sales/index.html +50 -57
  375. package/app/packages/sites/index.html +50 -57
  376. package/app/packages/social/index.html +50 -57
  377. package/app/packages/subscriptions/index.html +50 -57
  378. package/app/packages/support/index.html +50 -57
  379. package/app/packages/tags/index.html +50 -57
  380. package/app/packages/timesheets/index.html +50 -57
  381. package/app/packages/users/index.html +50 -57
  382. package/app/packages/video/index.html +50 -57
  383. package/app/packages/voice/index.html +50 -57
  384. package/app/packages/webhooks/index.html +85 -0
  385. package/app/recipes/account-access/help/index.html +52 -57
  386. package/app/recipes/account-access/index.html +57 -59
  387. package/app/recipes/activity/help/index.html +52 -57
  388. package/app/recipes/activity/index.html +57 -59
  389. package/app/recipes/agreements/help/index.html +52 -57
  390. package/app/recipes/agreements/index.html +57 -59
  391. package/app/recipes/analytics.reports/help/index.html +52 -57
  392. package/app/recipes/analytics.reports/index.html +57 -59
  393. package/app/recipes/assets/help/index.html +52 -57
  394. package/app/recipes/assets/index.html +57 -59
  395. package/app/recipes/billing/help/index.html +52 -57
  396. package/app/recipes/billing/index.html +57 -59
  397. package/app/recipes/chat.assistant/help/index.html +52 -57
  398. package/app/recipes/chat.assistant/index.html +57 -59
  399. package/app/recipes/comments/help/index.html +52 -57
  400. package/app/recipes/comments/index.html +57 -59
  401. package/app/recipes/commerce.customers/help/index.html +52 -57
  402. package/app/recipes/commerce.customers/index.html +57 -59
  403. package/app/recipes/commerce.estimates/help/index.html +52 -57
  404. package/app/recipes/commerce.estimates/index.html +57 -59
  405. package/app/recipes/commerce.purchases/help/index.html +52 -57
  406. package/app/recipes/commerce.purchases/index.html +57 -59
  407. package/app/recipes/commerce.sales/help/index.html +52 -57
  408. package/app/recipes/commerce.sales/index.html +57 -59
  409. package/app/recipes/commerce.vendors/help/index.html +52 -57
  410. package/app/recipes/commerce.vendors/index.html +57 -59
  411. package/app/recipes/commerce.wholesale/help/index.html +52 -57
  412. package/app/recipes/commerce.wholesale/index.html +57 -59
  413. package/app/recipes/events.calendar/help/index.html +52 -57
  414. package/app/recipes/events.calendar/index.html +57 -59
  415. package/app/recipes/expenses.tracking/help/index.html +88 -0
  416. package/app/recipes/expenses.tracking/index.html +92 -0
  417. package/app/recipes/fields.form-customization/help/index.html +52 -57
  418. package/app/recipes/fields.form-customization/index.html +57 -59
  419. package/app/recipes/ingestion/help/index.html +88 -0
  420. package/app/recipes/ingestion/index.html +93 -0
  421. package/app/recipes/integrations/help/index.html +88 -0
  422. package/app/recipes/integrations/index.html +92 -0
  423. package/app/recipes/inventory.stock/help/index.html +52 -57
  424. package/app/recipes/inventory.stock/index.html +57 -59
  425. package/app/recipes/ledgers.bookkeeping/help/index.html +52 -57
  426. package/app/recipes/ledgers.bookkeeping/index.html +57 -59
  427. package/app/recipes/messages/help/index.html +52 -57
  428. package/app/recipes/messages/index.html +57 -59
  429. package/app/recipes/products/help/index.html +52 -57
  430. package/app/recipes/products/index.html +57 -59
  431. package/app/recipes/projects.tracker/help/index.html +52 -57
  432. package/app/recipes/projects.tracker/index.html +57 -59
  433. package/app/recipes/reports.materialized/help/index.html +52 -57
  434. package/app/recipes/reports.materialized/index.html +57 -59
  435. package/app/recipes/reports.runtime/help/index.html +88 -0
  436. package/app/recipes/reports.runtime/index.html +92 -0
  437. package/app/recipes/sales.pipeline/help/index.html +52 -57
  438. package/app/recipes/sales.pipeline/index.html +57 -59
  439. package/app/recipes/tags.taxonomy/help/index.html +52 -57
  440. package/app/recipes/tags.taxonomy/index.html +57 -59
  441. package/app/recipes/team-collaboration/help/index.html +52 -57
  442. package/app/recipes/team-collaboration/index.html +57 -59
  443. package/app/recipes/timesheets.time-entries/help/index.html +88 -0
  444. package/app/recipes/timesheets.time-entries/index.html +92 -0
  445. package/app/s/custom-accounts/index.html +82 -0
  446. package/app/s/custom-appointments/index.html +82 -0
  447. package/app/s/custom-billing/index.html +47 -54
  448. package/app/s/custom-buying/index.html +47 -54
  449. package/app/s/custom-checkout/index.html +82 -0
  450. package/app/s/custom-classes/index.html +47 -54
  451. package/app/s/custom-clients/index.html +82 -0
  452. package/app/s/custom-events/index.html +82 -0
  453. package/app/s/custom-fleet/index.html +82 -0
  454. package/app/s/custom-giving/index.html +82 -0
  455. package/app/s/custom-jobs/index.html +47 -54
  456. package/app/s/custom-kitchen/index.html +47 -54
  457. package/app/s/custom-material/index.html +47 -54
  458. package/app/s/custom-meetings/index.html +82 -0
  459. package/app/s/custom-members/index.html +47 -54
  460. package/app/s/custom-parts/index.html +47 -54
  461. package/app/s/custom-rentals/index.html +82 -0
  462. package/app/s/custom-roastery/index.html +82 -0
  463. package/app/s/custom-schedule/index.html +47 -54
  464. package/app/s/custom-shelf/index.html +82 -0
  465. package/app/s/custom-shop/index.html +47 -54
  466. package/app/s/custom-wholesale/index.html +47 -54
  467. package/app/s/custom-work/index.html +82 -0
  468. package/app/s/custom-yard/index.html +82 -0
  469. package/app/s/section-access-control/index.html +47 -54
  470. package/app/s/section-account-security/index.html +47 -54
  471. package/app/s/section-accounting/index.html +47 -54
  472. package/app/s/section-activity/index.html +47 -54
  473. package/app/s/section-agreements/index.html +47 -54
  474. package/app/s/section-analytics/index.html +47 -54
  475. package/app/s/section-assets/index.html +47 -54
  476. package/app/s/section-billing/index.html +47 -54
  477. package/app/s/section-calendar/index.html +47 -54
  478. package/app/s/section-catalog/index.html +47 -54
  479. package/app/s/section-chat.assistant/index.html +47 -54
  480. package/app/s/section-comments/index.html +47 -54
  481. package/app/s/section-fields.form-customization/index.html +47 -54
  482. package/app/s/section-ingestion/index.html +82 -0
  483. package/app/s/section-integrations/index.html +82 -0
  484. package/app/s/section-messages/index.html +47 -54
  485. package/app/s/section-more/index.html +47 -54
  486. package/app/s/section-operations/index.html +47 -54
  487. package/app/s/section-projects/index.html +47 -54
  488. package/app/s/section-purchasing/index.html +47 -54
  489. package/app/s/section-reports.materialized/index.html +47 -54
  490. package/app/s/section-reports.runtime/index.html +82 -0
  491. package/app/s/section-sales/index.html +47 -54
  492. package/app/s/section-taxonomy/index.html +47 -54
  493. package/app/s/section-team/index.html +47 -54
  494. package/app/s/section-work/index.html +82 -0
  495. package/dist/ai/state.svelte.d.ts +13 -0
  496. package/dist/ai/state.svelte.js +33 -0
  497. package/dist/assistant/change.d.ts +14 -3
  498. package/dist/assistant/change.js +26 -3
  499. package/dist/assistant/engine.js +5 -1
  500. package/dist/assistant/prompt.js +7 -3
  501. package/dist/catalog/catalog.json +11263 -14455
  502. package/dist/catalog/generate/exclusions.d.ts +2 -0
  503. package/dist/catalog/generate/exclusions.js +14 -0
  504. package/dist/catalog/generate/extract.js +28 -7
  505. package/dist/catalog/types.d.ts +7 -0
  506. package/dist/components/AdvancedStyles.svelte +138 -0
  507. package/dist/components/AdvancedStyles.svelte.d.ts +6 -0
  508. package/dist/components/AiModelsPage.svelte +40 -0
  509. package/dist/components/AiModelsPage.svelte.d.ts +7 -0
  510. package/dist/components/AiSetup.svelte +9 -6
  511. package/dist/components/AiStatusIcons.svelte +8 -5
  512. package/dist/components/AppSettings.svelte +105 -1
  513. package/dist/components/BrowserAssistant.svelte +16 -17
  514. package/dist/components/BrowserAssistant.svelte.d.ts +2 -0
  515. package/dist/components/ChildRecords.svelte +61 -14
  516. package/dist/components/ChildRecords.svelte.d.ts +1 -0
  517. package/dist/components/ConnectTools.svelte +5 -2
  518. package/dist/components/CookbooksPanel.svelte +56 -33
  519. package/dist/components/CopyButton.svelte +65 -0
  520. package/dist/components/CopyButton.svelte.d.ts +24 -0
  521. package/dist/components/ExportPanel.svelte +292 -57
  522. package/dist/components/ExportPanel.svelte.d.ts +10 -1
  523. package/dist/components/FeatureCard.svelte +21 -10
  524. package/dist/components/FeaturesPanel.svelte +4 -1
  525. package/dist/components/FieldInput.svelte +6 -3
  526. package/dist/components/FieldMapForm.svelte +6 -10
  527. package/dist/components/FieldMapForm.svelte.d.ts +1 -0
  528. package/dist/components/FormWorkspace.svelte +80 -9
  529. package/dist/components/FormWorkspace.svelte.d.ts +1 -0
  530. package/dist/components/HeaderIconLink.svelte +86 -0
  531. package/dist/components/HeaderIconLink.svelte.d.ts +14 -0
  532. package/dist/components/HelpView.svelte +3 -0
  533. package/dist/components/ModelOptions.svelte +13 -2
  534. package/dist/components/ModelPage.svelte +33 -5
  535. package/dist/components/ModelPage.svelte.d.ts +4 -0
  536. package/dist/components/ModelWorkspace.svelte +148 -50
  537. package/dist/components/ModelWorkspace.svelte.d.ts +4 -0
  538. package/dist/components/PackagePage.svelte +96 -0
  539. package/dist/components/PackagePage.svelte.d.ts +9 -0
  540. package/dist/components/ProductMedia.svelte +95 -0
  541. package/dist/components/ProductMedia.svelte.d.ts +10 -0
  542. package/dist/components/RecipeCards.svelte +13 -1
  543. package/dist/components/RecipeHelp.svelte +3 -0
  544. package/dist/components/RecipeOptions.svelte +13 -1
  545. package/dist/components/RecordFeatures.svelte +22 -8
  546. package/dist/components/RecordView.svelte +354 -0
  547. package/dist/components/RecordView.svelte.d.ts +14 -0
  548. package/dist/components/RelationField.svelte +5 -2
  549. package/dist/components/SectionActions.svelte +8 -5
  550. package/dist/components/SectionHeading.svelte +63 -0
  551. package/dist/components/SectionHeading.svelte.d.ts +11 -0
  552. package/dist/components/SectionIcons.svelte +15 -3
  553. package/dist/components/SectionOverview.svelte +33 -3
  554. package/dist/components/SectionOverview.svelte.d.ts +4 -0
  555. package/dist/components/SectionPage.svelte +25 -165
  556. package/dist/components/SectionView.svelte +172 -0
  557. package/dist/components/SectionView.svelte.d.ts +18 -0
  558. package/dist/components/SettingsPanel.svelte +3 -9
  559. package/dist/components/SettingsPanel.svelte.d.ts +1 -5
  560. package/dist/components/ThemeBridge.svelte +80 -4
  561. package/dist/components/ThemeBridge.svelte.d.ts +5 -1
  562. package/dist/components/ThemeSection.svelte +208 -117
  563. package/dist/components/ThemeSection.svelte.d.ts +3 -7
  564. package/dist/components/VariantGridForm.svelte +9 -13
  565. package/dist/components/VariantGridForm.svelte.d.ts +1 -0
  566. package/dist/components/VoiceTyping.svelte +3 -0
  567. package/dist/cookbook/describe.d.ts +29 -0
  568. package/dist/cookbook/describe.js +164 -0
  569. package/dist/cookbook/file.d.ts +6 -0
  570. package/dist/cookbook/file.js +18 -4
  571. package/dist/cookbook/prompt.d.ts +49 -0
  572. package/dist/cookbook/prompt.js +96 -0
  573. package/dist/cookbook/store.svelte.d.ts +13 -0
  574. package/dist/cookbook/store.svelte.js +36 -8
  575. package/dist/core/prompt.js +10 -1
  576. package/dist/core/reply.d.ts +6 -1
  577. package/dist/data/children.d.ts +50 -6
  578. package/dist/data/children.js +146 -16
  579. package/dist/data/derived.d.ts +37 -29
  580. package/dist/data/derived.js +49 -30
  581. package/dist/data/display.d.ts +21 -8
  582. package/dist/data/display.js +74 -11
  583. package/dist/data/fakes.d.ts +48 -9
  584. package/dist/data/fakes.js +146 -22
  585. package/dist/data/labels.d.ts +7 -2
  586. package/dist/data/labels.js +12 -2
  587. package/dist/data/list-sort.d.ts +8 -0
  588. package/dist/data/list-sort.js +45 -0
  589. package/dist/data/money.d.ts +225 -0
  590. package/dist/data/money.js +411 -0
  591. package/dist/data/packs.d.ts +13 -0
  592. package/dist/data/packs.js +1224 -0
  593. package/dist/data/planner-source.js +120 -3
  594. package/dist/data/source.d.ts +13 -2
  595. package/dist/data/source.js +274 -40
  596. package/dist/features/palette.d.ts +2 -0
  597. package/dist/features/palette.js +1 -1
  598. package/dist/forms/stock.d.ts +1 -1
  599. package/dist/forms/stock.js +3 -1
  600. package/dist/index.d.ts +7 -2
  601. package/dist/index.js +6 -1
  602. package/dist/kitchen/LiveKitchenBridge.svelte +73 -0
  603. package/dist/kitchen/LiveKitchenBridge.svelte.d.ts +8 -0
  604. package/dist/kitchen/live.d.ts +7 -0
  605. package/dist/kitchen/live.js +51 -0
  606. package/dist/library/icons.js +34 -0
  607. package/dist/library/library.json +1546 -15
  608. package/dist/library/pending.json +5 -0
  609. package/dist/library/types.d.ts +4 -0
  610. package/dist/motion/tokens.d.ts +6 -0
  611. package/dist/motion/tokens.js +32 -0
  612. package/dist/motion/view-transition.d.ts +13 -0
  613. package/dist/motion/view-transition.js +17 -0
  614. package/dist/overviews/definitions.d.ts +41 -2
  615. package/dist/overviews/definitions.js +111 -4
  616. package/dist/overviews/models.d.ts +10 -0
  617. package/dist/overviews/models.js +19 -0
  618. package/dist/overviews/registry.d.ts +92 -5
  619. package/dist/overviews/registry.js +468 -58
  620. package/dist/overviews/validate.js +2 -2
  621. package/dist/planner/Planner.svelte +374 -166
  622. package/dist/planner/PlannerControls.svelte +255 -0
  623. package/dist/planner/PlannerControls.svelte.d.ts +17 -0
  624. package/dist/planner/PlannerLifecycle.svelte +73 -0
  625. package/dist/planner/PlannerLifecycle.svelte.d.ts +9 -0
  626. package/dist/planner/app.svelte.d.ts +12 -2
  627. package/dist/planner/app.svelte.js +13 -3
  628. package/dist/planner/assistant.js +20 -2
  629. package/dist/planner/commands/adapter.js +9 -2
  630. package/dist/planner/commands/types.d.ts +1 -1
  631. package/dist/planner/commands/types.js +1 -0
  632. package/dist/planner/header-icons.d.ts +12 -0
  633. package/dist/planner/header-icons.js +12 -0
  634. package/dist/planner/host/HostPlanner.svelte +70 -0
  635. package/dist/planner/host/HostPlanner.svelte.d.ts +17 -0
  636. package/dist/planner/host/session.svelte.d.ts +28 -0
  637. package/dist/planner/host/session.svelte.js +186 -0
  638. package/dist/planner/routes.d.ts +49 -0
  639. package/dist/planner/routes.js +64 -0
  640. package/dist/planner/shell.d.ts +40 -0
  641. package/dist/planner/shell.js +56 -0
  642. package/dist/planner/tab.svelte.d.ts +6 -3
  643. package/dist/planner/tab.svelte.js +11 -4
  644. package/dist/planner/title.d.ts +15 -0
  645. package/dist/planner/title.js +21 -0
  646. package/dist/planner/title.svelte.d.ts +6 -0
  647. package/dist/planner/title.svelte.js +11 -0
  648. package/dist/planner/types.d.ts +39 -7
  649. package/dist/products/media.d.ts +20 -0
  650. package/dist/products/media.js +65 -0
  651. package/dist/recipes/help/descriptions.json +1 -3
  652. package/dist/recipes/index.d.ts +2 -0
  653. package/dist/recipes/index.js +6 -0
  654. package/dist/recipes/plumbing.d.ts +35 -1
  655. package/dist/recipes/plumbing.js +74 -0
  656. package/dist/screens/definition.d.ts +35 -0
  657. package/dist/screens/definition.js +132 -0
  658. package/dist/screens/relations.d.ts +17 -0
  659. package/dist/screens/relations.js +98 -0
  660. package/dist/screens/totals.d.ts +37 -0
  661. package/dist/screens/totals.js +65 -0
  662. package/dist/sections/info.d.ts +1 -1
  663. package/dist/sections/info.js +2 -2
  664. package/dist/settings/app-settings.d.ts +17 -1
  665. package/dist/settings/app-settings.js +40 -3
  666. package/dist/smrt-version.d.ts +2 -0
  667. package/dist/smrt-version.js +4 -0
  668. package/dist/styles/planner-forms.css +53 -0
  669. package/dist/styles/planner-lists.css +43 -0
  670. package/dist/theme/css-highlight.d.ts +6 -0
  671. package/dist/theme/css-highlight.js +34 -0
  672. package/dist/theme/custom-css.svelte.d.ts +34 -0
  673. package/dist/theme/custom-css.svelte.js +246 -0
  674. package/dist/theme/runtime.js +25 -5
  675. package/dist/theme/theme.d.ts +26 -3
  676. package/dist/theme/theme.js +70 -2
  677. package/dist/upstream/overlay.d.ts +14 -5
  678. package/dist/upstream/overlay.js +20 -2
  679. package/package.json +12 -6
  680. package/app/_app/immutable/assets/0.B5zXkXe_.css +0 -1
  681. package/app/_app/immutable/assets/10.hpcnxvK1.css +0 -1
  682. package/app/_app/immutable/assets/11.D7zoXfVV.css +0 -1
  683. package/app/_app/immutable/assets/12.CPobm1ED.css +0 -1
  684. package/app/_app/immutable/assets/2.CyaWdRdI.css +0 -1
  685. package/app/_app/immutable/assets/3.BlPQOes8.css +0 -1
  686. package/app/_app/immutable/assets/8.2gQeKBp_.css +0 -1
  687. package/app/_app/immutable/assets/9.HOPT4xtg.css +0 -1
  688. package/app/_app/immutable/assets/AiSetup.Cb22AigN.css +0 -1
  689. package/app/_app/immutable/assets/Button.DkP0qkG9.css +0 -1
  690. package/app/_app/immutable/assets/ConnectTools.BgIJOOGW.css +0 -1
  691. package/app/_app/immutable/assets/FieldMapForm.BCU-4pO4.css +0 -1
  692. package/app/_app/immutable/assets/ModelPage.Dd3LcMta.css +0 -1
  693. package/app/_app/immutable/assets/SectionActions.CTkVuNMF.css +0 -1
  694. package/app/_app/immutable/assets/SectionIcons.5Udq9vN-.css +0 -1
  695. package/app/_app/immutable/assets/SegmentedControl.B8SrQacd.css +0 -1
  696. package/app/_app/immutable/assets/dist.C5nHBk_O.css +0 -1
  697. package/app/_app/immutable/assets/feedback.BVKAwFck.css +0 -1
  698. package/app/_app/immutable/assets/forms.BChZ2RWM.css +0 -1
  699. package/app/_app/immutable/assets/percent.LH0z-ozZ.css +0 -1
  700. package/app/_app/immutable/assets/store.CGDwHkkF.css +0 -1
  701. package/app/_app/immutable/assets/ui.B1A1Zl2p.css +0 -1
  702. package/app/_app/immutable/assets/workspace.BIMkuZDb.css +0 -1
  703. package/app/_app/immutable/chunks/1okeBSoq.js +0 -1
  704. package/app/_app/immutable/chunks/2jFBkS1C.js +0 -1
  705. package/app/_app/immutable/chunks/6P9zxrzU.js +0 -1
  706. package/app/_app/immutable/chunks/B32EWqI8.js +0 -9
  707. package/app/_app/immutable/chunks/B4Kevpe0.js +0 -1
  708. package/app/_app/immutable/chunks/BKwRT_1p.js +0 -1
  709. package/app/_app/immutable/chunks/BS4h9ES-.js +0 -1
  710. package/app/_app/immutable/chunks/CMhpRMKg.js +0 -1
  711. package/app/_app/immutable/chunks/CPRHZZeW.js +0 -1
  712. package/app/_app/immutable/chunks/CRQ1Pmzr.js +0 -1
  713. package/app/_app/immutable/chunks/CWtfVMDz.js +0 -1
  714. package/app/_app/immutable/chunks/Chyo8rdT.js +0 -3
  715. package/app/_app/immutable/chunks/Ci0DUht6.js +0 -34
  716. package/app/_app/immutable/chunks/CmmuWmp6.js +0 -2
  717. package/app/_app/immutable/chunks/CrFNLK0f.js +0 -1
  718. package/app/_app/immutable/chunks/CsprTb3f.js +0 -2
  719. package/app/_app/immutable/chunks/CygC84VT.js +0 -2
  720. package/app/_app/immutable/chunks/D0VgZnk1.js +0 -1
  721. package/app/_app/immutable/chunks/DD7gpKb2.js +0 -1
  722. package/app/_app/immutable/chunks/DNRgqfTx.js +0 -1
  723. package/app/_app/immutable/chunks/DVRKjN-E.js +0 -1
  724. package/app/_app/immutable/chunks/D_J_XtJy.js +0 -846
  725. package/app/_app/immutable/chunks/Dp9GVO-9.js +0 -1
  726. package/app/_app/immutable/chunks/DqcD-WtP.js +0 -1
  727. package/app/_app/immutable/chunks/QukgIHDX.js +0 -1
  728. package/app/_app/immutable/chunks/WxSPP8QW.js +0 -4
  729. package/app/_app/immutable/chunks/Xp1g1t4n.js +0 -3
  730. package/app/_app/immutable/chunks/leQCwW2d.js +0 -1
  731. package/app/_app/immutable/chunks/p6bgzXiY.js +0 -1
  732. package/app/_app/immutable/entry/app.IZIJXhgq.js +0 -2
  733. package/app/_app/immutable/entry/start.BuaYHD1N.js +0 -1
  734. package/app/_app/immutable/nodes/0.m_U8WC7E.js +0 -10
  735. package/app/_app/immutable/nodes/1.Crw8ULhB.js +0 -1
  736. package/app/_app/immutable/nodes/10.1nQxyH9H.js +0 -4
  737. package/app/_app/immutable/nodes/11.Cw0JnQF3.js +0 -1
  738. package/app/_app/immutable/nodes/12.BIocA1aI.js +0 -1
  739. package/app/_app/immutable/nodes/2.CR5BwGnt.js +0 -17
  740. package/app/_app/immutable/nodes/3.1B56hgAG.js +0 -1
  741. package/app/_app/immutable/nodes/4.SSIC7sUh.js +0 -1
  742. package/app/_app/immutable/nodes/5.DgdwleDQ.js +0 -1
  743. package/app/_app/immutable/nodes/6.DmD9rqLU.js +0 -1
  744. package/app/_app/immutable/nodes/7.DdngsBmo.js +0 -1
  745. package/app/_app/immutable/nodes/8.D2Mszsua.js +0 -3
  746. package/app/_app/immutable/nodes/9.CLYsywul.js +0 -1
  747. package/app/m/content/Contents/index.html +0 -96
  748. package/app/m/preferences/UiPreferenceRecord/index.html +0 -96
  749. package/app/m/users/AccessRequest/index.html +0 -96
  750. package/app/m/users/ResourceGrant/index.html +0 -96
  751. package/app/m/users/UsersCliAuthRequest/index.html +0 -96
  752. package/app/m/users/UsersMagicLinkToken/index.html +0 -96
@@ -156,7 +156,6 @@
156
156
  },
157
157
  "@happyvertical/smrt-commerce:Contract": {
158
158
  "status": "Where the contract stands, for example draft, sent, accepted or completed.",
159
- "customerId": "The customer this contract is for.",
160
159
  "subtotal": "The contract amount before tax.",
161
160
  "taxAmount": "The tax charged on the contract.",
162
161
  "totalAmount": "What the customer pays in all, tax included.",
@@ -168,8 +167,7 @@
168
167
  "notes": "Anything worth remembering about this contract.",
169
168
  "terms": "The conditions agreed with the customer, such as deposits, delivery or payment conditions.",
170
169
  "channelId": "Where the contract came from, for example your shop or a marketplace.",
171
- "contractType": "The kind of contract: order, estimate, lease, agreement and so on.",
172
- "vendorId": "The vendor on the other side, for contracts you buy."
170
+ "contractType": "The kind of contract: order, estimate, lease, agreement and so on."
173
171
  },
174
172
  "@happyvertical/smrt-commerce:ContractLineItem": {
175
173
  "contractId": "The order, quote or agreement this line belongs to.",
@@ -41,6 +41,8 @@ export interface RecipeNavTarget {
41
41
  }
42
42
  /** A recipe's `nav` entries resolved to catalog models; unknown ones are dropped. */
43
43
  export declare function recipeNav(recipe: Recipe): RecipeNavTarget[];
44
+ /** Is `key` a keyed nav entry of the model (`/m/<pkg>/<Model>/<key>/`) in any recipe? */
45
+ export declare function hasNavKey(packageId: string, modelName: string, key: string): boolean;
44
46
  /**
45
47
  * In-app path of a nav entry, without the app query: `/m/<pkg>/<Model>/`, and
46
48
  * `/m/<pkg>/<Model>/<key>/` for a keyed entry (the same model shown twice).
@@ -49,6 +49,12 @@ export function recipeNav(recipe) {
49
49
  : [];
50
50
  });
51
51
  }
52
+ /** Is `key` a keyed nav entry of the model (`/m/<pkg>/<Model>/<key>/`) in any recipe? */
53
+ export function hasNavKey(packageId, modelName, key) {
54
+ return recipes.some((recipe) => recipeNav(recipe).some((entry) => entry.key === key &&
55
+ entry.packageId === packageId &&
56
+ entry.model.name === modelName));
57
+ }
52
58
  /**
53
59
  * In-app path of a nav entry, without the app query: `/m/<pkg>/<Model>/`, and
54
60
  * `/m/<pkg>/<Model>/<key>/` for a keyed entry (the same model shown twice).
@@ -18,6 +18,13 @@ import type { Catalog, CatalogModel } from '../catalog/types.ts';
18
18
  * 4. Tiny lookup list: a name ending `Status` or `Type` with at most three
19
19
  * non-system fields (`AssetStatus`, `PlaceType`, `ProfileType`). Richer
20
20
  * types such as `ContentContributionType` stay features.
21
+ * 5. Named in {@link PLUMBING_MODELS}: rows the catalog's shape cannot tell
22
+ * apart from features. smrt-commerce's money model (smrt#3988) is the
23
+ * case: `TaxCode` is a feature (the codes people choose on a line), but
24
+ * its `TaxComponent` rates belong to codes, `TaxSettings` is the tenant's
25
+ * one settings row (the Settings tab edits its portable part),
26
+ * `DocumentTax` is a document's derived tax snapshot and
27
+ * `TaxSummaryReport` a materialized report a server host refreshes.
21
28
  */
22
29
  export declare const JUNCTION_BASES: readonly string[];
23
30
  export declare const CHILD_SUFFIXES: readonly string[];
@@ -25,7 +32,11 @@ export declare const LOOKUP_SUFFIXES: readonly string[];
25
32
  export declare const LOOKUP_MAX_FIELDS = 3;
26
33
  export declare const LINK_MIN_REFS = 2;
27
34
  export declare const LINK_MAX_OTHER_FIELDS = 1;
28
- type ModelShape = Pick<CatalogModel, 'name' | 'fields' | 'extends'>;
35
+ /** Plumbing by name (rule 5), by qualified model id, with its reason. */
36
+ export declare const PLUMBING_MODELS: Readonly<Record<string, string>>;
37
+ type ModelShape = Pick<CatalogModel, 'name' | 'fields' | 'extends'> & {
38
+ id?: string;
39
+ };
29
40
  /** The reason a model is plumbing, or null when it is a feature. */
30
41
  export declare function plumbingReason(model: ModelShape): string | null;
31
42
  export declare function isPlumbing(model: ModelShape): boolean;
@@ -58,6 +69,21 @@ export interface ChildLink {
58
69
  * in no recipe (a Feature) falls back to {@link childModels}.
59
70
  */
60
71
  export declare function childLinks(catalog: Catalog, recipes: readonly RecipeScope[], modelId: string): ChildLink[];
72
+ /**
73
+ * Every model whose rows point at the model (or at a class it extends), one
74
+ * link per reference field, plumbing or not: `Customer` <- `Order.customerId`,
75
+ * `Quote.customerId`, `Invoice.customerId`; `InventoryLocation` <-
76
+ * `StockTransfer.fromLocationId` and `.toLocationId`. {@link childLinks} is
77
+ * the subset that lives inside the record (line items); this is what a
78
+ * record's view page lists as its related records. Catalog order.
79
+ */
80
+ export declare function reverseLinks(catalog: Catalog, modelId: string): ChildLink[];
81
+ /**
82
+ * The records a model's own reference fields point at (`Order.customerId` ->
83
+ * `Customer`), one per field whose target the catalog knows; the way up from
84
+ * a record's view page.
85
+ */
86
+ export declare function forwardLinks(catalog: Catalog, modelId: string): ChildLink[];
61
87
  /** Does any recipe give the model a menu entry of its own? */
62
88
  export declare function hasNavPage(recipes: readonly RecipeScope[], modelId: string): boolean;
63
89
  /**
@@ -67,4 +93,12 @@ export declare function hasNavPage(recipes: readonly RecipeScope[], modelId: str
67
93
  export declare function childTitle(childName: string, parentNames: readonly string[]): string;
68
94
  /** Names of the model and its STI ancestors, for {@link childTitle}. */
69
95
  export declare function lineageNames(catalog: Catalog, modelId: string): string[];
96
+ /**
97
+ * The priced child records that make up a model's own record (its line
98
+ * items): the {@link childModels} whose name starts with the model's or an
99
+ * STI ancestor's (`ContractLineItem` under every Contract, `InvoiceLineItem`
100
+ * under Invoice), so a Product, which line items also point at, has none.
101
+ * `isLine` says what a line is (the planner's `isLineModel`).
102
+ */
103
+ export declare function itemModels(catalog: Catalog, modelId: string, isLine: (model: CatalogModel) => boolean): CatalogModel[];
70
104
  export {};
@@ -17,6 +17,13 @@
17
17
  * 4. Tiny lookup list: a name ending `Status` or `Type` with at most three
18
18
  * non-system fields (`AssetStatus`, `PlaceType`, `ProfileType`). Richer
19
19
  * types such as `ContentContributionType` stay features.
20
+ * 5. Named in {@link PLUMBING_MODELS}: rows the catalog's shape cannot tell
21
+ * apart from features. smrt-commerce's money model (smrt#3988) is the
22
+ * case: `TaxCode` is a feature (the codes people choose on a line), but
23
+ * its `TaxComponent` rates belong to codes, `TaxSettings` is the tenant's
24
+ * one settings row (the Settings tab edits its portable part),
25
+ * `DocumentTax` is a document's derived tax snapshot and
26
+ * `TaxSummaryReport` a materialized report a server host refreshes.
20
27
  */
21
28
  export const JUNCTION_BASES = [
22
29
  'SmrtJunction',
@@ -40,9 +47,19 @@ export const LOOKUP_SUFFIXES = ['Status', 'Type'];
40
47
  export const LOOKUP_MAX_FIELDS = 3;
41
48
  export const LINK_MIN_REFS = 2;
42
49
  export const LINK_MAX_OTHER_FIELDS = 1;
50
+ /** Plumbing by name (rule 5), by qualified model id, with its reason. */
51
+ export const PLUMBING_MODELS = {
52
+ '@happyvertical/smrt-commerce:TaxComponent': 'lookup',
53
+ '@happyvertical/smrt-commerce:TaxSettings': 'settings',
54
+ '@happyvertical/smrt-commerce:DocumentTax': 'snapshot',
55
+ '@happyvertical/smrt-commerce:TaxSummaryReport': 'report',
56
+ };
43
57
  const REF_TYPES = new Set(['foreignKey', 'crossPackageRef']);
44
58
  /** The reason a model is plumbing, or null when it is a feature. */
45
59
  export function plumbingReason(model) {
60
+ const named = model.id ? PLUMBING_MODELS[model.id] : undefined;
61
+ if (named)
62
+ return named;
46
63
  const base = model.extends?.split(':').pop();
47
64
  if (base && JUNCTION_BASES.includes(base))
48
65
  return 'junction';
@@ -150,6 +167,52 @@ export function childLinks(catalog, recipes, modelId) {
150
167
  }
151
168
  return [...found.values()];
152
169
  }
170
+ /**
171
+ * Every model whose rows point at the model (or at a class it extends), one
172
+ * link per reference field, plumbing or not: `Customer` <- `Order.customerId`,
173
+ * `Quote.customerId`, `Invoice.customerId`; `InventoryLocation` <-
174
+ * `StockTransfer.fromLocationId` and `.toLocationId`. {@link childLinks} is
175
+ * the subset that lives inside the record (line items); this is what a
176
+ * record's view page lists as its related records. Catalog order.
177
+ */
178
+ export function reverseLinks(catalog, modelId) {
179
+ const all = catalog.packages.flatMap((p) => p.models);
180
+ const byId = new Map(all.map((m) => [m.id, m]));
181
+ const parents = new Set(lineage(byId, modelId));
182
+ if (!parents.size)
183
+ return [];
184
+ const found = [];
185
+ for (const candidate of all) {
186
+ if (parents.has(candidate.id))
187
+ continue;
188
+ for (const field of candidate.fields) {
189
+ if (REF_TYPES.has(field.type) &&
190
+ field.related &&
191
+ parents.has(qualify(field.related, candidate.id))) {
192
+ found.push({ model: candidate, fk: field.name });
193
+ }
194
+ }
195
+ }
196
+ return found;
197
+ }
198
+ /**
199
+ * The records a model's own reference fields point at (`Order.customerId` ->
200
+ * `Customer`), one per field whose target the catalog knows; the way up from
201
+ * a record's view page.
202
+ */
203
+ export function forwardLinks(catalog, modelId) {
204
+ const all = catalog.packages.flatMap((p) => p.models);
205
+ const byId = new Map(all.map((m) => [m.id, m]));
206
+ const model = byId.get(modelId);
207
+ if (!model)
208
+ return [];
209
+ return model.fields.flatMap((field) => {
210
+ if (!REF_TYPES.has(field.type) || !field.related)
211
+ return [];
212
+ const target = byId.get(qualify(field.related, model.id));
213
+ return target ? [{ model: target, fk: field.name }] : [];
214
+ });
215
+ }
153
216
  /** Does any recipe give the model a menu entry of its own? */
154
217
  export function hasNavPage(recipes, modelId) {
155
218
  return recipes.some((r) => r.nav.some((e) => e.model === modelId));
@@ -183,3 +246,14 @@ export function lineageNames(catalog, modelId) {
183
246
  return m ? [m.name] : [];
184
247
  });
185
248
  }
249
+ /**
250
+ * The priced child records that make up a model's own record (its line
251
+ * items): the {@link childModels} whose name starts with the model's or an
252
+ * STI ancestor's (`ContractLineItem` under every Contract, `InvoiceLineItem`
253
+ * under Invoice), so a Product, which line items also point at, has none.
254
+ * `isLine` says what a line is (the planner's `isLineModel`).
255
+ */
256
+ export function itemModels(catalog, modelId, isLine) {
257
+ const names = lineageNames(catalog, modelId);
258
+ return childModels(catalog, modelId).filter((child) => isLine(child) && names.some((name) => child.name.startsWith(name)));
259
+ }
@@ -0,0 +1,35 @@
1
+ /**
2
+ * The planner's catalog models as the generated record screens take them
3
+ * (`@happyvertical/smrt-svelte/screens`, smrt#3718): a
4
+ * `ScreenCollectionDefinition` is the browser-safe collection definition a
5
+ * SMRT build emits, and the planner has the same facts in `catalog.json`. The
6
+ * applied recipe options (which fields a view shows, their labels and help)
7
+ * travel as the `ScreenPolicy`, so a field renders only when the policy lists
8
+ * it, as on a generated screen.
9
+ *
10
+ * The facts the catalog has beyond a generated definition travel as the
11
+ * field roles' hints: `enum` (a status select, a badge), `format` (`money`
12
+ * by the planner's `isMoneyField`, `date` for business dates), `display`
13
+ * (the field a record is named by) and `role: 'items'` on the relationship
14
+ * edges of line items, so the record page shows them as its line-items table.
15
+ */
16
+ import type { ScreenCollectionDefinition, ScreenPolicy } from '@happyvertical/smrt-svelte/screens';
17
+ import type { CatalogModel } from '../catalog/types.ts';
18
+ import type { ViewField } from '../recipes/policy.ts';
19
+ /**
20
+ * The field a record of the model is named by (see `recordName`), when it
21
+ * has a name of its own: the framework's `title` role. A document (an order)
22
+ * has none; the field roles find its identifier and the header leads with it.
23
+ */
24
+ export declare function displayFieldOf(model: CatalogModel): string | undefined;
25
+ /**
26
+ * The model's own fields (and reference edges) as a screen collection
27
+ * definition, keyed by its collection name like a generated one.
28
+ */
29
+ export declare function screenDefinition(model: CatalogModel): ScreenCollectionDefinition;
30
+ /**
31
+ * The fields a view shows, with the recipe options' labels and help, as the
32
+ * screens' resolved policy: everything listed is `basic`, in list order, and
33
+ * a field the applied options hide is simply not in it.
34
+ */
35
+ export declare function screenPolicy(model: CatalogModel, fields: readonly ViewField[]): ScreenPolicy;
@@ -0,0 +1,132 @@
1
+ import { catalog, getModelByQualifiedName } from "../catalog/index.js";
2
+ import { isLineModel } from "../data/derived.js";
3
+ import { labelFields } from "../data/display.js";
4
+ import { isMoneyField } from "../data/fakes.js";
5
+ import { itemModels } from "../recipes/plumbing.js";
6
+ const FIELD_TYPES = [
7
+ 'text',
8
+ 'integer',
9
+ 'decimal',
10
+ 'boolean',
11
+ 'datetime',
12
+ 'json',
13
+ 'foreignKey',
14
+ 'crossPackageRef',
15
+ ];
16
+ function fieldType(type) {
17
+ return FIELD_TYPES.includes(type)
18
+ ? type
19
+ : 'text';
20
+ }
21
+ /**
22
+ * A business date is a day, not a moment: `issueDate`, `dueDate`,
23
+ * `periodStart`. A model that books a time of day (`allDay`: events) keeps
24
+ * its dates as datetimes, as do `...At` timestamps.
25
+ */
26
+ const DATE_NAME = /(Date|^date|period(Start|End))$/;
27
+ function dateFormat(model, field) {
28
+ return field.type === 'datetime' &&
29
+ !field.system &&
30
+ DATE_NAME.test(field.name) &&
31
+ !model.fields.some((f) => f.name === 'allDay')
32
+ ? 'date'
33
+ : undefined;
34
+ }
35
+ /**
36
+ * The field a record of the model is named by (see `recordName`), when it
37
+ * has a name of its own: the framework's `title` role. A document (an order)
38
+ * has none; the field roles find its identifier and the header leads with it.
39
+ */
40
+ export function displayFieldOf(model) {
41
+ return labelFields(model)[0];
42
+ }
43
+ function fieldDefinition(model, field) {
44
+ const ui = field.ui ? { ...field.ui } : undefined;
45
+ const format = isMoneyField(field) ? 'money' : dateFormat(model, field);
46
+ return {
47
+ type: fieldType(field.type),
48
+ required: field.required,
49
+ nullable: !field.required,
50
+ ...(field.default !== undefined ? { default: field.default } : {}),
51
+ ...(field.description ? { description: field.description } : {}),
52
+ ...(ui ? { ui } : {}),
53
+ ...(field.enum?.length ? { enum: [...field.enum] } : {}),
54
+ ...(format ? { format } : {}),
55
+ ...(displayFieldOf(model) === field.name ? { display: true } : {}),
56
+ };
57
+ }
58
+ /** A field's `related` as a qualified name, given the model it is declared on. */
59
+ function qualify(related, ownerId) {
60
+ return related.includes(':')
61
+ ? related
62
+ : `${ownerId.slice(0, ownerId.lastIndexOf(':'))}:${related}`;
63
+ }
64
+ /**
65
+ * Does `model` hold the line items of what `field` points at? A priced child
66
+ * record (`ContractLineItem`, `InvoiceLineItem`: quantity, unit price,
67
+ * amount) named after its target (`itemModels`): a line's `contractId` is
68
+ * its document, its `productId` only what it sells.
69
+ */
70
+ function isItemsEdge(model, field) {
71
+ if (!field.related)
72
+ return false;
73
+ const target = qualify(field.related, model.id);
74
+ return itemModels(catalog, target, isLineModel).some((child) => child.id === model.id);
75
+ }
76
+ /** The model's reference fields as the definition's relationship edges. */
77
+ function relationships(model) {
78
+ return model.fields.flatMap((field) => {
79
+ if ((field.type !== 'foreignKey' && field.type !== 'crossPackageRef') ||
80
+ !field.related) {
81
+ return [];
82
+ }
83
+ const target = getModelByQualifiedName(qualify(field.related, model.id));
84
+ return target
85
+ ? [
86
+ {
87
+ field: field.name,
88
+ kind: field.type === 'crossPackageRef'
89
+ ? 'crossPackageRef'
90
+ : 'foreignKey',
91
+ relatedCollection: target.model.collection,
92
+ ...(isItemsEdge(model, field) ? { role: 'items' } : {}),
93
+ },
94
+ ]
95
+ : [];
96
+ });
97
+ }
98
+ /**
99
+ * The model's own fields (and reference edges) as a screen collection
100
+ * definition, keyed by its collection name like a generated one.
101
+ */
102
+ export function screenDefinition(model) {
103
+ const edges = relationships(model);
104
+ return {
105
+ name: model.collection,
106
+ objectRef: model.id,
107
+ className: model.name,
108
+ idField: 'id',
109
+ fields: Object.fromEntries(model.fields.map((field) => [field.name, fieldDefinition(model, field)])),
110
+ ...(edges.length ? { relationships: edges } : {}),
111
+ };
112
+ }
113
+ /**
114
+ * The fields a view shows, with the recipe options' labels and help, as the
115
+ * screens' resolved policy: everything listed is `basic`, in list order, and
116
+ * a field the applied options hide is simply not in it.
117
+ */
118
+ export function screenPolicy(model, fields) {
119
+ return {
120
+ objectRef: model.id,
121
+ fields: Object.fromEntries(fields.map((field, order) => [
122
+ field.name,
123
+ {
124
+ visibility: 'basic',
125
+ label: field.label,
126
+ help: field.help ?? null,
127
+ order,
128
+ required: field.required,
129
+ },
130
+ ])),
131
+ };
132
+ }
@@ -0,0 +1,17 @@
1
+ import { type ScreenRelation } from '@happyvertical/smrt-svelte/screens';
2
+ import type { Catalog, CatalogModel } from '../catalog/types.ts';
3
+ import type { Recipe } from '../recipes/types.ts';
4
+ export type { ScreenRelation };
5
+ /** The models the visitor's app has: the added recipes' and the features. */
6
+ export declare function appModels(added: readonly Recipe[], features: readonly string[]): Set<string>;
7
+ /** "Customer" for `customerId`, "From location" for `fromLocationId`. */
8
+ export declare function referenceLabel(field: string): string;
9
+ /**
10
+ * The record screen's relations for `modelId`, children first (catalog
11
+ * order, confined to `inApp`), then references (every catalog target). A
12
+ * child pointing at the model through several fields gets one relation per
13
+ * field, told apart by the field's name.
14
+ */
15
+ export declare function screenRelations(catalog: Catalog, modelId: string, inApp: ReadonlySet<string>): ScreenRelation[];
16
+ /** The catalog model a relation names, when the catalog has it. */
17
+ export declare function relationModel(catalog: Catalog, relation: ScreenRelation): CatalogModel | undefined;
@@ -0,0 +1,98 @@
1
+ /**
2
+ * What a record's view page relates it to, from the catalog's foreign keys
3
+ * (smrt#3718 record view): `children` are the models whose rows point at the
4
+ * record (a customer's orders, quotes and invoices), `items` the priced
5
+ * child records that make up the record itself (an order's line items, from
6
+ * the plumbing rules' `childModels`), `reference` the records the record
7
+ * itself points at (an order's customer).
8
+ * Children count only from models in the visitor's app (an added recipe's
9
+ * models and the added features); references list every target the catalog
10
+ * has, so a field pointing outside the app (a customer's Profile) still
11
+ * shows its record's name. Whether a reference links is the view's call
12
+ * (`RecordView` links only targets in the app). Generic for every model;
13
+ * nothing here names one.
14
+ *
15
+ * The planner derives these from the catalog rather than through the
16
+ * framework's `deriveScreenRelations`, which reads a definition's
17
+ * `relationships` by collection name: the catalog also knows a model's STI
18
+ * parent (`Order` extends `Contract`), so an order's line items
19
+ * (`ContractLineItem.contractId`) are its children too, as `childLinks`
20
+ * already treats them. The shape is the framework's `ScreenRelation`.
21
+ */
22
+ import { lineItemColumns, relatedColumns, } from '@happyvertical/smrt-svelte/overview';
23
+ import { deriveFieldRoles, } from '@happyvertical/smrt-svelte/screens';
24
+ import { isLineModel } from "../data/derived.js";
25
+ import { humanize } from "../data/format.js";
26
+ import { childTitle, forwardLinks, itemModels, lineageNames, reverseLinks, } from "../recipes/plumbing.js";
27
+ import { screenDefinition } from "./definition.js";
28
+ /** The models the visitor's app has: the added recipes' and the features. */
29
+ export function appModels(added, features) {
30
+ const ids = new Set(features);
31
+ for (const recipe of added)
32
+ for (const id of recipe.models)
33
+ ids.add(id);
34
+ return ids;
35
+ }
36
+ /** "Customer" for `customerId`, "From location" for `fromLocationId`. */
37
+ export function referenceLabel(field) {
38
+ return humanize(field.replace(/_?id$/i, '') || field);
39
+ }
40
+ /**
41
+ * The record screen's relations for `modelId`, children first (catalog
42
+ * order, confined to `inApp`), then references (every catalog target). A
43
+ * child pointing at the model through several fields gets one relation per
44
+ * field, told apart by the field's name.
45
+ */
46
+ export function screenRelations(catalog, modelId, inApp) {
47
+ const parents = lineageNames(catalog, modelId);
48
+ const children = reverseLinks(catalog, modelId).filter((link) => link.model.exposed && inApp.has(link.model.id));
49
+ // Line items live inside the record: its line-items table, not a tab.
50
+ const items = new Set(itemModels(catalog, modelId, isLineModel).map((m) => m.id));
51
+ const perModel = new Map();
52
+ for (const link of children) {
53
+ perModel.set(link.model.id, (perModel.get(link.model.id) ?? 0) + 1);
54
+ }
55
+ const relations = children.map((link) => {
56
+ const kind = items.has(link.model.id) ? 'items' : 'children';
57
+ // The table columns by role, as the framework's `deriveScreenRelations`
58
+ // attaches them: a line-items table, or a related-records tab.
59
+ const definition = screenDefinition(link.model);
60
+ const roles = deriveFieldRoles(definition);
61
+ const exclude = [link.fk];
62
+ return {
63
+ model: link.model.id,
64
+ field: link.fk,
65
+ label: (perModel.get(link.model.id) ?? 0) > 1
66
+ ? `${childTitle(link.model.name, parents)} (${referenceLabel(link.fk).toLowerCase()})`
67
+ : childTitle(link.model.name, parents),
68
+ kind,
69
+ columns: kind === 'items'
70
+ ? lineItemColumns(definition, roles, { exclude })
71
+ : // Identifier, status, date, party and the amount: the framework's
72
+ // default four would drop the amount for a second party.
73
+ relatedColumns(definition, roles, { exclude, max: 5 }),
74
+ // Lines keep the order they were entered in.
75
+ ...(kind === 'items' && 'sortOrder' in definition.fields
76
+ ? { sort: 'sortOrder' }
77
+ : {}),
78
+ };
79
+ });
80
+ for (const link of forwardLinks(catalog, modelId)) {
81
+ relations.push({
82
+ model: link.model.id,
83
+ field: link.fk,
84
+ label: referenceLabel(link.fk),
85
+ kind: 'reference',
86
+ });
87
+ }
88
+ return relations;
89
+ }
90
+ /** The catalog model a relation names, when the catalog has it. */
91
+ export function relationModel(catalog, relation) {
92
+ for (const pkg of catalog.packages) {
93
+ const model = pkg.models.find((m) => m.id === relation.model);
94
+ if (model)
95
+ return model;
96
+ }
97
+ return undefined;
98
+ }
@@ -0,0 +1,37 @@
1
+ /**
2
+ * A document's totals for the record page's `line-items` widget, on
3
+ * smrt-commerce's money model.
4
+ *
5
+ * - An issued document (it has left `draft`) is frozen: `storedDocumentTotals`
6
+ * hands the widget its stored figures as smrt-svelte's
7
+ * `StoredLineItemsTotals` (subtotal, the informational discount, tax,
8
+ * total, pricing mode, rounding scope and one row per tax component, e.g.
9
+ * GST and PST apart), which it shows without recalculating.
10
+ * - A draft computes live: `documentTotals` is the record's own subtotal /
11
+ * tax / total by the framework's field roles, which the widget compares with
12
+ * its lines and flags when they disagree.
13
+ */
14
+ import type { LineItemsTotals } from '@happyvertical/smrt-svelte/overview';
15
+ import { type RecordScreenProps } from '@happyvertical/smrt-svelte/screens';
16
+ import type { CatalogModel } from '../catalog/types.ts';
17
+ type Row = Readonly<Record<string, unknown>>;
18
+ /**
19
+ * smrt-svelte's `StoredLineItemsTotals`, which its entry points do not export
20
+ * by name (smrt#4023); it is what `RecordScreen.lineItemStoredTotals` returns.
21
+ */
22
+ export type StoredLineItemsTotals = NonNullable<ReturnType<NonNullable<RecordScreenProps['lineItemStoredTotals']>>>;
23
+ /**
24
+ * The live totals of a draft by role (plus its `lineAmountType`); `undefined`
25
+ * when it has none of them. The informational `discountTotal` is passed like
26
+ * the rest: the widget shows it as included and never subtracts it (smrt#4014).
27
+ */
28
+ export declare function documentTotals(model: CatalogModel, record: Row): LineItemsTotals | undefined;
29
+ /** Has the document left `draft`, freezing its money? */
30
+ export declare function isIssued(model: CatalogModel, record: Row): boolean;
31
+ /**
32
+ * An issued document's frozen money as the widget's stored totals: its own
33
+ * header figures and its lines' stored tax snapshots summed per component.
34
+ * `undefined` for a draft or a model without the money model's header.
35
+ */
36
+ export declare function storedDocumentTotals(model: CatalogModel, record: Row, lines: readonly Row[]): StoredLineItemsTotals | undefined;
37
+ export {};
@@ -0,0 +1,65 @@
1
+ import { deriveFieldRoles, recordTotals, } from '@happyvertical/smrt-svelte/screens';
2
+ import { documentLineAmountType, documentRoundingScope, } from "../data/derived.js";
3
+ import { storedTaxRows } from "../data/money.js";
4
+ import { screenDefinition } from "./definition.js";
5
+ const minor = (value) => typeof value === 'number' && Number.isSafeInteger(value) ? value : null;
6
+ const hasField = (model, name) => model.fields.some((f) => f.name === name);
7
+ /**
8
+ * The live totals of a draft by role (plus its `lineAmountType`); `undefined`
9
+ * when it has none of them. The informational `discountTotal` is passed like
10
+ * the rest: the widget shows it as included and never subtracts it (smrt#4014).
11
+ */
12
+ export function documentTotals(model, record) {
13
+ const roles = deriveFieldRoles(screenDefinition(model));
14
+ const totals = recordTotals(record, roles);
15
+ return Object.values(totals).some((v) => minor(v) !== null)
16
+ ? totals
17
+ : undefined;
18
+ }
19
+ /** Has the document left `draft`, freezing its money? */
20
+ export function isIssued(model, record) {
21
+ const status = model.fields.find((f) => f.name === 'status');
22
+ return (Boolean(status?.enum?.includes('draft')) &&
23
+ typeof record.status === 'string' &&
24
+ record.status !== '' &&
25
+ record.status !== 'draft');
26
+ }
27
+ /**
28
+ * An issued document's frozen money as the widget's stored totals: its own
29
+ * header figures and its lines' stored tax snapshots summed per component.
30
+ * `undefined` for a draft or a model without the money model's header.
31
+ */
32
+ export function storedDocumentTotals(model, record, lines) {
33
+ if (!isIssued(model, record))
34
+ return undefined;
35
+ if (!['subtotal', 'taxAmount', 'totalAmount', 'discountTotal'].every((n) => hasField(model, n))) {
36
+ return undefined;
37
+ }
38
+ const subtotal = minor(record.subtotal);
39
+ const tax = minor(record.taxAmount);
40
+ const total = minor(record.totalAmount);
41
+ const discount = minor(record.discountTotal) ?? 0;
42
+ if (subtotal === null || tax === null || total === null)
43
+ return undefined;
44
+ const lineAmountType = documentLineAmountType(record, 'exclusive');
45
+ return {
46
+ subtotal,
47
+ discount,
48
+ tax,
49
+ total,
50
+ lineAmountType,
51
+ roundingScope: documentRoundingScope(record, 'line'),
52
+ showNetSubtotal: lineAmountType === 'inclusive',
53
+ taxes: storedTaxRows(lines, lineAmountType).flatMap((row) => row.taxComponentId
54
+ ? [
55
+ {
56
+ taxComponentId: row.taxComponentId,
57
+ name: row.name,
58
+ percent: row.percent,
59
+ taxable: row.taxable,
60
+ tax: row.tax,
61
+ },
62
+ ]
63
+ : []),
64
+ };
65
+ }
@@ -13,4 +13,4 @@ export interface SectionInfo {
13
13
  */
14
14
  export declare function sectionInfo(id: string): SectionInfo;
15
15
  /** The title of a section page: its label once the layout has resolved, never the raw id. */
16
- export declare function sectionTitle(heading: string | null | undefined): string;
16
+ export declare function sectionTitle(heading: string | null | undefined, fallback?: string): string;
@@ -34,6 +34,6 @@ export function sectionInfo(id) {
34
34
  return description ? { description } : {};
35
35
  }
36
36
  /** The title of a section page: its label once the layout has resolved, never the raw id. */
37
- export function sectionTitle(heading) {
38
- return heading?.trim() || 'Planner';
37
+ export function sectionTitle(heading, fallback = 'Planner') {
38
+ return heading?.trim() || fallback;
39
39
  }
@@ -14,9 +14,25 @@ export interface AppSettings {
14
14
  taxRate: number;
15
15
  /** Default payment terms; empty means unset. */
16
16
  paymentTerms: string;
17
+ /**
18
+ * New documents' prices include tax (`lineAmountType: 'inclusive'`: a
19
+ * line's amount is the gross and tax is backed out of it); otherwise
20
+ * prices exclude tax (`'exclusive'`: a line's amount is its net).
21
+ */
22
+ pricesIncludeTax: boolean;
23
+ /** Whether tax rounds per line or once per document (`taxRoundingScope`). */
24
+ taxRounding: TaxRounding;
17
25
  }
26
+ export type TaxRounding = 'line' | 'document';
27
+ export declare const TAX_ROUNDINGS: readonly TaxRounding[];
18
28
  export declare const DEFAULT_SETTINGS: Readonly<AppSettings>;
19
- /** Which model fields each setting is the default of (the single source). */
29
+ /**
30
+ * Which model fields each setting is the default of (the single source). The
31
+ * money settings name the same fields as smrt-core's
32
+ * `COMMERCE_SETTING_TARGETS`: `pricesIncludeTax` is Invoice and Contract
33
+ * `lineAmountType` (`'inclusive'` / `'exclusive'`), `taxRounding` their
34
+ * `taxRoundingScope`.
35
+ */
20
36
  export declare const SETTING_TARGETS: Readonly<Record<keyof AppSettings, readonly {
21
37
  model: string;
22
38
  field: string;