@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.
- package/README.md +81 -8
- package/app/404.html +42 -49
- package/app/_app/immutable/assets/0.DUow1OzM.css +1 -0
- package/app/_app/immutable/assets/10.CdYxvH4G.css +1 -0
- package/app/_app/immutable/assets/11.nOT5Z4Fv.css +1 -0
- package/app/_app/immutable/assets/12.F7A7zP4J.css +1 -0
- package/app/_app/immutable/assets/13.JoySu8W5.css +1 -0
- package/app/_app/immutable/assets/14.nsp62-4b.css +1 -0
- package/app/_app/immutable/assets/2.CbPiqdz5.css +1 -0
- package/app/_app/immutable/assets/3.D518dbB5.css +1 -0
- package/app/_app/immutable/assets/4.B3vt1gMJ.css +1 -0
- package/app/_app/immutable/assets/AiSetup.4fXjMpTZ.css +1 -0
- package/app/_app/immutable/assets/AppShell.DOvXbUZo.css +1 -0
- package/app/_app/immutable/assets/ConnectTools.DTleL8YA.css +1 -0
- package/app/_app/immutable/assets/FieldMapForm.C8SZ3t4N.css +1 -0
- package/app/_app/immutable/assets/ModelPage.DbXvPbHE.css +1 -0
- package/app/_app/immutable/assets/SectionActions.BE1CPmxk.css +1 -0
- package/app/_app/immutable/assets/SectionIcons.BGFcFuOf.css +1 -0
- package/app/_app/immutable/assets/SegmentedControl.BkyuoCEJ.css +1 -0
- package/app/_app/immutable/assets/app.eM0k786r.css +1 -0
- package/app/_app/immutable/assets/currency-metadata.DDyu8_ub.css +1 -0
- package/app/_app/immutable/assets/data.bGq43K60.css +1 -0
- package/app/_app/immutable/assets/feedback.xBpOq9ef.css +1 -0
- package/app/_app/immutable/assets/forms.B3_bbIMe.css +1 -0
- package/app/_app/immutable/assets/labels.BiuUjqHs.css +1 -0
- package/app/_app/immutable/assets/percent.DbwvwMhf.css +1 -0
- package/app/_app/immutable/assets/state.CJipYvSU.css +1 -0
- package/app/_app/immutable/assets/webmcp-ui-context.BnR-DUfO.css +1 -0
- package/app/_app/immutable/assets/workspace.B5Xq-5pJ.css +1 -0
- package/app/_app/immutable/chunks/1ElZWh_R.js +10 -0
- package/app/_app/immutable/chunks/B-CpwO-j.js +1 -0
- package/app/_app/immutable/chunks/{BnRri03M.js → B7KB-rhH.js} +1 -1
- package/app/_app/immutable/chunks/BUhghcIm.js +1 -0
- package/app/_app/immutable/chunks/BV3NwM01.js +1 -0
- package/app/_app/immutable/chunks/BZVZZ6VY.js +1 -0
- package/app/_app/immutable/chunks/Ba1g71Sq.js +1 -0
- package/app/_app/immutable/chunks/BeJD7_hy.js +1 -0
- package/app/_app/immutable/chunks/BiO_bqNH.js +2 -0
- package/app/_app/immutable/chunks/{DkR8_Ws6.js → BqBuCJB_.js} +2 -2
- package/app/_app/immutable/chunks/BsJoBmTA.js +1 -0
- package/app/_app/immutable/chunks/Bxbz6_Mb.js +1 -0
- package/app/_app/immutable/chunks/Bz5uCkjV.js +2 -0
- package/app/_app/immutable/chunks/BzMfoxBk.js +1 -0
- package/app/_app/immutable/chunks/CF6zSg_o.js +2 -0
- package/app/_app/immutable/chunks/CFL0B6dk.js +1 -0
- package/app/_app/immutable/chunks/CRu55ZTy.js +4 -0
- package/app/_app/immutable/chunks/{CyUMm_Wp.js → Cv2EcCr0.js} +1 -1
- package/app/_app/immutable/chunks/D-3Ri0zJ.js +1 -0
- package/app/_app/immutable/chunks/{BWPhGFHl.js → D0FW0z6R.js} +1 -1
- package/app/_app/immutable/chunks/D7d5GssF.js +1 -0
- package/app/_app/immutable/chunks/DCsSRJsN.js +1 -0
- package/app/_app/immutable/chunks/DGqV6_5v.js +1 -0
- package/app/_app/immutable/chunks/DNSRTkf6.js +11 -0
- package/app/_app/immutable/chunks/DQNX_XPY.js +1 -0
- package/app/_app/immutable/chunks/DSyIMN4M.js +1 -0
- package/app/_app/immutable/chunks/DUTtmM1Y.js +1 -0
- package/app/_app/immutable/chunks/DYuawOB3.js +980 -0
- package/app/_app/immutable/chunks/DfCLzLZc.js +1 -0
- package/app/_app/immutable/chunks/Dh5fne6n.js +1 -0
- package/app/_app/immutable/chunks/LruoUXGC.js +1 -0
- package/app/_app/immutable/chunks/ZLqixH7j.js +9 -0
- package/app/_app/immutable/chunks/_pYwB_Eb.js +4 -0
- package/app/_app/immutable/chunks/aoU3lIZI.js +1 -0
- package/app/_app/immutable/chunks/c57ZlocB.js +24 -0
- package/app/_app/immutable/chunks/h8ppmjOm.js +1 -0
- package/app/_app/immutable/chunks/jhcy_jeO.js +1 -0
- package/app/_app/immutable/chunks/vNEnXNLV.js +3 -0
- package/app/_app/immutable/chunks/vwntRvfV.js +1 -0
- package/app/_app/immutable/entry/app.D5LoTsNA.js +2 -0
- package/app/_app/immutable/entry/start.Sb_s0NGC.js +1 -0
- package/app/_app/immutable/nodes/0.Cuo9-RQc.js +9 -0
- package/app/_app/immutable/nodes/1.BW8Ar5T3.js +1 -0
- package/app/_app/immutable/nodes/10.CpLYjN7r.js +3 -0
- package/app/_app/immutable/nodes/11.BMPKD4M3.js +1 -0
- package/app/_app/immutable/nodes/12.WYpy0AHE.js +4 -0
- package/app/_app/immutable/nodes/13.BYo05X9B.js +1 -0
- package/app/_app/immutable/nodes/14.DN0MT3KB.js +1 -0
- package/app/_app/immutable/nodes/2.DM6k_pqu.js +24 -0
- package/app/_app/immutable/nodes/3.YgEwJ-vF.js +1 -0
- package/app/_app/immutable/nodes/4.A3Y6Lax0.js +1 -0
- package/app/_app/immutable/nodes/5.D9Vd85hG.js +1 -0
- package/app/_app/immutable/nodes/6.C5c56bSW.js +1 -0
- package/app/_app/immutable/nodes/7.CDBMbYlD.js +1 -0
- package/app/_app/immutable/nodes/8.8olDkDou.js +1 -0
- package/app/_app/immutable/nodes/9.CWgx__8Z.js +1 -0
- package/app/_app/version.json +1 -1
- package/app/advanced-styles/index.html +84 -0
- package/app/ai/index.html +60 -52
- package/app/blueprint/index.html +46 -53
- package/app/cookbook/index.html +46 -53
- package/app/index.html +92 -64
- package/app/m/ads/AdDeliveryTier/index.html +52 -59
- package/app/m/ads/AdEvent/index.html +52 -59
- package/app/m/ads/AdFormat/index.html +52 -59
- package/app/m/ads/AdGroup/index.html +52 -59
- package/app/m/ads/AdVariation/index.html +52 -59
- package/app/m/analytics/AnalyticsDataStream/index.html +52 -59
- package/app/m/analytics/AnalyticsEvent/index.html +52 -59
- package/app/m/analytics/AnalyticsProperty/index.html +52 -59
- package/app/m/analytics/AnalyticsReport/index.html +52 -59
- package/app/m/approvals/ApprovalEvent/index.html +52 -59
- package/app/m/approvals/ApprovalPolicy/index.html +52 -59
- package/app/m/approvals/ApprovalRequest/index.html +52 -59
- package/app/m/assets/Asset/attachments/index.html +91 -0
- package/app/m/assets/Asset/index.html +52 -59
- package/app/m/assets/AssetAssociation/index.html +53 -60
- package/app/m/assets/AssetMetafield/index.html +52 -59
- package/app/m/assets/AssetStatus/index.html +52 -59
- package/app/m/assets/AssetType/index.html +52 -59
- package/app/m/assets/Folder/index.html +52 -59
- package/app/m/chat/AgentSession/index.html +52 -59
- package/app/m/chat/ChatMessage/index.html +53 -60
- package/app/m/chat/ChatParticipant/index.html +53 -60
- package/app/m/chat/ChatReaction/index.html +52 -59
- package/app/m/chat/ChatRoom/index.html +52 -59
- package/app/m/chat/ChatThread/index.html +53 -60
- package/app/m/chat/VoiceGatewayTurn/index.html +52 -59
- package/app/m/chat/VoiceSession/index.html +52 -59
- package/app/m/commerce/Agreement/index.html +52 -59
- package/app/m/commerce/Cart/index.html +52 -59
- package/app/m/commerce/Contract/index.html +52 -59
- package/app/m/commerce/ContractLineItem/index.html +53 -60
- package/app/m/commerce/Customer/index.html +52 -59
- package/app/m/commerce/DocumentTax/index.html +89 -0
- package/app/m/commerce/Estimate/index.html +52 -59
- package/app/m/commerce/Fulfillment/index.html +52 -59
- package/app/m/commerce/FulfillmentLineItem/index.html +53 -60
- package/app/m/commerce/Invoice/index.html +52 -59
- package/app/m/commerce/InvoiceLineItem/index.html +53 -60
- package/app/m/commerce/Lease/index.html +52 -59
- package/app/m/commerce/LicenseSale/index.html +52 -59
- package/app/m/commerce/Order/index.html +52 -59
- package/app/m/commerce/Payment/index.html +52 -59
- package/app/m/commerce/PaymentAllocation/index.html +53 -60
- package/app/m/commerce/PaymentInstrument/index.html +52 -59
- package/app/m/commerce/PaymentIntent/index.html +52 -59
- package/app/m/commerce/Payout/index.html +52 -59
- package/app/m/commerce/ProductionOrder/index.html +52 -59
- package/app/m/commerce/PurchaseContract/index.html +89 -0
- package/app/m/commerce/PurchaseOrder/index.html +52 -59
- package/app/m/commerce/SalesContract/index.html +89 -0
- package/app/m/commerce/SupplierQuote/index.html +89 -0
- package/app/m/commerce/TaxCode/index.html +89 -0
- package/app/m/commerce/TaxComponent/index.html +89 -0
- package/app/m/commerce/TaxSettings/index.html +89 -0
- package/app/m/commerce/TaxSummaryReport/index.html +89 -0
- package/app/m/commerce/Vendor/index.html +52 -59
- package/app/m/commerce/WholesaleOrder/index.html +52 -59
- package/app/m/content/Content/index.html +52 -59
- package/app/m/content/ContentContribution/index.html +52 -59
- package/app/m/content/ContentContributionAttachment/index.html +52 -59
- package/app/m/content/ContentContributionRevision/index.html +52 -59
- package/app/m/content/ContentContributionType/index.html +52 -59
- package/app/m/content/ContentContributor/index.html +52 -59
- package/app/m/content/ContentCorrection/index.html +52 -59
- package/app/m/content/ContentFeedSource/index.html +52 -59
- package/app/m/content/ContentGovernanceAssignment/index.html +52 -59
- package/app/m/content/ContentGovernancePolicy/index.html +52 -59
- package/app/m/content/ContentGovernanceProfile/index.html +52 -59
- package/app/m/content/ContentReference/index.html +52 -59
- package/app/m/content/ContentReview/index.html +52 -59
- package/app/m/content/ContentVersion/index.html +52 -59
- package/app/m/events/Event/index.html +52 -59
- package/app/m/events/EventParticipant/index.html +53 -60
- package/app/m/events/EventSeries/index.html +52 -59
- package/app/m/events/EventType/index.html +52 -59
- package/app/m/expenses/Expense/index.html +89 -0
- package/app/m/facts/Fact/index.html +52 -59
- package/app/m/facts/FactContent/index.html +52 -59
- package/app/m/facts/FactEvidence/index.html +52 -59
- package/app/m/facts/FactSource/index.html +52 -59
- package/app/m/facts/FactSubject/index.html +52 -59
- package/app/m/facts/FactTag/index.html +52 -59
- package/app/m/fields/FieldPolicy/index.html +52 -59
- package/app/m/fields/FieldPolicySuggestion/index.html +52 -59
- package/app/m/fields/FieldUsageCounter/index.html +52 -59
- package/app/m/images/Image/index.html +52 -59
- package/app/m/inventory/InventoryLocation/index.html +52 -59
- package/app/m/inventory/StockLevel/index.html +52 -59
- package/app/m/inventory/StockMovement/index.html +52 -59
- package/app/m/ledgers/Account/index.html +52 -59
- package/app/m/ledgers/Journal/index.html +52 -59
- package/app/m/ledgers/JournalEntry/index.html +53 -60
- package/app/m/manufacturing/Assembly/index.html +52 -59
- package/app/m/manufacturing/BillOfMaterials/index.html +52 -59
- package/app/m/manufacturing/BomLine/index.html +52 -59
- package/app/m/manufacturing/Operation/index.html +52 -59
- package/app/m/manufacturing/ProductionRun/index.html +52 -59
- package/app/m/manufacturing/ProductionRunCompletion/index.html +52 -59
- package/app/m/manufacturing/RoutingStep/index.html +52 -59
- package/app/m/marketing/Campaign/index.html +52 -59
- package/app/m/marketing/CampaignChannel/index.html +52 -59
- package/app/m/marketing/CampaignMetricSnapshot/index.html +52 -59
- package/app/m/messages/Account/index.html +52 -59
- package/app/m/messages/Attachment/index.html +52 -59
- package/app/m/messages/Blacklist/index.html +52 -59
- package/app/m/messages/Email/failed-sends/index.html +54 -59
- package/app/m/messages/Email/index.html +52 -59
- package/app/m/messages/Email/mailbox/index.html +54 -59
- package/app/m/messages/EmailAccount/index.html +52 -59
- package/app/m/messages/EmailAttachment/index.html +89 -0
- package/app/m/messages/EmailFolder/index.html +52 -59
- package/app/m/messages/Message/index.html +52 -59
- package/app/m/messages/MessagingEndpoint/index.html +52 -59
- package/app/m/messages/PersonaMessageRoute/index.html +52 -59
- package/app/m/messages/SlackAccount/index.html +52 -59
- package/app/m/messages/SlackMessage/index.html +52 -59
- package/app/m/messages/TelegramAccount/index.html +52 -59
- package/app/m/messages/Tweet/index.html +52 -59
- package/app/m/messages/TwitterAccount/index.html +52 -59
- package/app/m/messages/Whitelist/index.html +52 -59
- package/app/m/messages/ZulipAccount/index.html +52 -59
- package/app/m/places/Place/index.html +52 -59
- package/app/m/places/PlaceType/index.html +52 -59
- package/app/m/products/Category/index.html +52 -59
- package/app/m/products/Material/index.html +52 -59
- package/app/m/products/Product/index.html +52 -59
- package/app/m/products/Product/ingredients/index.html +54 -59
- package/app/m/products/ProductVariant/index.html +53 -60
- package/app/m/products/Sku/index.html +53 -60
- package/app/m/profiles/ApiKey/index.html +52 -59
- package/app/m/profiles/Bot/index.html +52 -59
- package/app/m/profiles/MagicLinkToken/index.html +52 -59
- package/app/m/profiles/NostrIdentity/index.html +52 -59
- package/app/m/profiles/OidcIdentity/index.html +52 -59
- package/app/m/profiles/Organization/index.html +52 -59
- package/app/m/profiles/Person/index.html +52 -59
- package/app/m/profiles/Profile/index.html +52 -59
- package/app/m/profiles/ProfileMetadata/index.html +52 -59
- package/app/m/profiles/ProfileMetafield/index.html +52 -59
- package/app/m/profiles/ProfileRelationship/index.html +52 -59
- package/app/m/profiles/ProfileRelationshipTerm/index.html +52 -59
- package/app/m/profiles/ProfileRelationshipType/index.html +52 -59
- package/app/m/profiles/ProfileType/index.html +52 -59
- package/app/m/projects/Comment/index.html +53 -60
- package/app/m/projects/Issue/index.html +52 -59
- package/app/m/projects/Label/index.html +52 -59
- package/app/m/projects/Project/index.html +52 -59
- package/app/m/projects/ProjectIntegration/index.html +52 -59
- package/app/m/projects/PullRequest/index.html +52 -59
- package/app/m/projects/Repository/index.html +52 -59
- package/app/m/properties/Property/index.html +52 -59
- package/app/m/properties/Zone/index.html +52 -59
- package/app/m/reports/RuntimeReport/index.html +52 -59
- package/app/m/reports/SmrtPrincipalReportRefreshTask/index.html +52 -59
- package/app/m/reports/SmrtReportLock/index.html +52 -59
- package/app/m/reports/SmrtReportRefreshTask/index.html +52 -59
- package/app/m/reports/SmrtReportRun/index.html +52 -59
- package/app/m/reports/SmrtReportSchedule/index.html +52 -59
- package/app/m/reports/SmrtReportWatermark/index.html +52 -59
- package/app/m/sales/AttributionException/index.html +52 -59
- package/app/m/sales/AttributionPolicy/index.html +52 -59
- package/app/m/sales/Commission/index.html +52 -59
- package/app/m/sales/CommissionAdjustment/index.html +52 -59
- package/app/m/sales/CommissionPayout/index.html +52 -59
- package/app/m/sales/CommissionPlan/index.html +52 -59
- package/app/m/sales/Earner/index.html +52 -59
- package/app/m/sales/EarnerSourceAttribution/index.html +52 -59
- package/app/m/sales/EarningEvent/index.html +52 -59
- package/app/m/sales/ExecutedAgreement/index.html +52 -59
- package/app/m/sales/Lead/index.html +52 -59
- package/app/m/sales/Opportunity/index.html +52 -59
- package/app/m/sales/OpportunityConversion/index.html +52 -59
- package/app/m/sales/PipelineDefinition/index.html +52 -59
- package/app/m/sales/PipelineStage/index.html +53 -60
- package/app/m/sales/Referral/index.html +52 -59
- package/app/m/sales/ReferralAgreement/index.html +52 -59
- package/app/m/sales/ReferralLink/index.html +52 -59
- package/app/m/sales/ReferralProgram/index.html +52 -59
- package/app/m/sales/ReferralTermSnapshot/index.html +52 -59
- package/app/m/sales/ReferralTouch/index.html +52 -59
- package/app/m/sales/Referrer/index.html +52 -59
- package/app/m/sales/SalesActivity/index.html +52 -59
- package/app/m/sales/SalesRepresentative/index.html +52 -59
- package/app/m/sites/Site/index.html +52 -59
- package/app/m/sites/SiteAgentBinding/index.html +52 -59
- package/app/m/social/OAuthState/index.html +52 -59
- package/app/m/social/SocialAccount/index.html +52 -59
- package/app/m/social/SocialPost/index.html +52 -59
- package/app/m/social/SocialPostAnalyticsSnapshot/index.html +52 -59
- package/app/m/subscriptions/BillingAdjustment/index.html +52 -59
- package/app/m/subscriptions/ClientCharge/index.html +52 -59
- package/app/m/subscriptions/CreditGrant/index.html +52 -59
- package/app/m/subscriptions/PricingRule/index.html +52 -59
- package/app/m/subscriptions/RetailCharge/index.html +52 -59
- package/app/m/subscriptions/SpendingPolicy/index.html +52 -59
- package/app/m/subscriptions/SubscriptionPlan/index.html +52 -59
- package/app/m/subscriptions/TenantSubscription/index.html +52 -59
- package/app/m/subscriptions/TenantUsageMetric/index.html +52 -59
- package/app/m/support/ServiceTimeEntry/index.html +52 -59
- package/app/m/support/SupportAiRun/index.html +52 -59
- package/app/m/support/SupportAvailability/index.html +52 -59
- package/app/m/support/SupportCase/index.html +52 -59
- package/app/m/support/SupportCaseEvent/index.html +52 -59
- package/app/m/support/SupportChannelBinding/index.html +52 -59
- package/app/m/support/SupportCharge/index.html +52 -59
- package/app/m/support/SupportCompensation/index.html +52 -59
- package/app/m/support/SupportCompensationPlan/index.html +52 -59
- package/app/m/support/SupportEscalation/index.html +52 -59
- package/app/m/support/SupportInteraction/index.html +52 -59
- package/app/m/support/SupportPlan/index.html +52 -59
- package/app/m/support/SupportPolicy/index.html +52 -59
- package/app/m/support/SupportQualification/index.html +52 -59
- package/app/m/support/SupportServiceTarget/index.html +52 -59
- package/app/m/support/SupportSpecialist/index.html +52 -59
- package/app/m/support/SupportWorkLink/index.html +52 -59
- package/app/m/tags/Tag/index.html +52 -59
- package/app/m/tags/TagAlias/index.html +52 -59
- package/app/m/timesheets/AttendanceBreak/index.html +52 -59
- package/app/m/timesheets/AttendancePunch/index.html +52 -59
- package/app/m/timesheets/AttendanceSegment/index.html +89 -0
- package/app/m/timesheets/ServiceChargeSnapshot/index.html +52 -59
- package/app/m/timesheets/ServiceCompensationSnapshot/index.html +52 -59
- package/app/m/timesheets/ServiceTimeEntry/index.html +52 -59
- package/app/m/users/Group/index.html +52 -59
- package/app/m/users/GroupMember/index.html +52 -59
- package/app/m/users/GroupRole/index.html +52 -59
- package/app/m/users/Membership/index.html +53 -60
- package/app/m/users/MembershipOverride/index.html +52 -59
- package/app/m/users/Permission/index.html +52 -59
- package/app/m/users/Role/index.html +52 -59
- package/app/m/users/RolePermission/index.html +52 -59
- package/app/m/users/Session/index.html +52 -59
- package/app/m/users/Tenant/index.html +52 -59
- package/app/m/users/TenantIntegration/index.html +52 -59
- package/app/m/users/TenantPermissionOverride/index.html +52 -59
- package/app/m/users/User/index.html +52 -59
- package/app/m/video/Character/index.html +52 -59
- package/app/m/video/CharacterAsset/index.html +52 -59
- package/app/m/video/CompositeJob/index.html +52 -59
- package/app/m/video/Performer/index.html +52 -59
- package/app/m/video/PerformerAsset/index.html +52 -59
- package/app/m/video/Scene/index.html +52 -59
- package/app/m/video/SceneAsset/index.html +52 -59
- package/app/m/video/VideoComposition/index.html +52 -59
- package/app/m/video/VideoCompositionAsset/index.html +52 -59
- package/app/m/video/VideoSequence/index.html +52 -59
- package/app/m/video/VideoSequenceAsset/index.html +52 -59
- package/app/m/video/VideoShot/index.html +52 -59
- package/app/m/video/VideoShotAsset/index.html +52 -59
- package/app/m/video/VideoShotCharacter/index.html +52 -59
- package/app/m/video/VideoWorkflow/index.html +52 -59
- package/app/m/voice/VoiceOutput/index.html +52 -59
- package/app/m/voice/VoiceProfile/index.html +52 -59
- package/app/m/voice/VoiceSample/index.html +52 -59
- package/app/packages/ads/index.html +50 -57
- package/app/packages/analytics/index.html +50 -57
- package/app/packages/approvals/index.html +50 -57
- package/app/packages/assets/index.html +50 -57
- package/app/packages/chat/index.html +50 -57
- package/app/packages/comments/index.html +50 -57
- package/app/packages/commerce/index.html +50 -57
- package/app/packages/content/index.html +50 -57
- package/app/packages/events/index.html +50 -57
- package/app/packages/expenses/index.html +50 -57
- package/app/packages/facts/index.html +50 -57
- package/app/packages/fields/index.html +50 -57
- package/app/packages/human-resources/index.html +50 -57
- package/app/packages/images/index.html +50 -57
- package/app/packages/index.html +49 -55
- package/app/packages/ingestion/index.html +85 -0
- package/app/packages/inventory/index.html +50 -57
- package/app/packages/ledgers/index.html +50 -57
- package/app/packages/manufacturing/index.html +50 -57
- package/app/packages/marketing/index.html +50 -57
- package/app/packages/messages/index.html +50 -57
- package/app/packages/places/index.html +50 -57
- package/app/packages/preferences/index.html +50 -57
- package/app/packages/products/index.html +50 -57
- package/app/packages/profiles/index.html +50 -57
- package/app/packages/projects/index.html +50 -57
- package/app/packages/properties/index.html +50 -57
- package/app/packages/reports/index.html +50 -57
- package/app/packages/sales/index.html +50 -57
- package/app/packages/sites/index.html +50 -57
- package/app/packages/social/index.html +50 -57
- package/app/packages/subscriptions/index.html +50 -57
- package/app/packages/support/index.html +50 -57
- package/app/packages/tags/index.html +50 -57
- package/app/packages/timesheets/index.html +50 -57
- package/app/packages/users/index.html +50 -57
- package/app/packages/video/index.html +50 -57
- package/app/packages/voice/index.html +50 -57
- package/app/packages/webhooks/index.html +85 -0
- package/app/recipes/account-access/help/index.html +52 -57
- package/app/recipes/account-access/index.html +57 -59
- package/app/recipes/activity/help/index.html +52 -57
- package/app/recipes/activity/index.html +57 -59
- package/app/recipes/agreements/help/index.html +52 -57
- package/app/recipes/agreements/index.html +57 -59
- package/app/recipes/analytics.reports/help/index.html +52 -57
- package/app/recipes/analytics.reports/index.html +57 -59
- package/app/recipes/assets/help/index.html +52 -57
- package/app/recipes/assets/index.html +57 -59
- package/app/recipes/billing/help/index.html +52 -57
- package/app/recipes/billing/index.html +57 -59
- package/app/recipes/chat.assistant/help/index.html +52 -57
- package/app/recipes/chat.assistant/index.html +57 -59
- package/app/recipes/comments/help/index.html +52 -57
- package/app/recipes/comments/index.html +57 -59
- package/app/recipes/commerce.customers/help/index.html +52 -57
- package/app/recipes/commerce.customers/index.html +57 -59
- package/app/recipes/commerce.estimates/help/index.html +52 -57
- package/app/recipes/commerce.estimates/index.html +57 -59
- package/app/recipes/commerce.purchases/help/index.html +52 -57
- package/app/recipes/commerce.purchases/index.html +57 -59
- package/app/recipes/commerce.sales/help/index.html +52 -57
- package/app/recipes/commerce.sales/index.html +57 -59
- package/app/recipes/commerce.vendors/help/index.html +52 -57
- package/app/recipes/commerce.vendors/index.html +57 -59
- package/app/recipes/commerce.wholesale/help/index.html +52 -57
- package/app/recipes/commerce.wholesale/index.html +57 -59
- package/app/recipes/events.calendar/help/index.html +52 -57
- package/app/recipes/events.calendar/index.html +57 -59
- package/app/recipes/expenses.tracking/help/index.html +88 -0
- package/app/recipes/expenses.tracking/index.html +92 -0
- package/app/recipes/fields.form-customization/help/index.html +52 -57
- package/app/recipes/fields.form-customization/index.html +57 -59
- package/app/recipes/ingestion/help/index.html +88 -0
- package/app/recipes/ingestion/index.html +93 -0
- package/app/recipes/integrations/help/index.html +88 -0
- package/app/recipes/integrations/index.html +92 -0
- package/app/recipes/inventory.stock/help/index.html +52 -57
- package/app/recipes/inventory.stock/index.html +57 -59
- package/app/recipes/ledgers.bookkeeping/help/index.html +52 -57
- package/app/recipes/ledgers.bookkeeping/index.html +57 -59
- package/app/recipes/messages/help/index.html +52 -57
- package/app/recipes/messages/index.html +57 -59
- package/app/recipes/products/help/index.html +52 -57
- package/app/recipes/products/index.html +57 -59
- package/app/recipes/projects.tracker/help/index.html +52 -57
- package/app/recipes/projects.tracker/index.html +57 -59
- package/app/recipes/reports.materialized/help/index.html +52 -57
- package/app/recipes/reports.materialized/index.html +57 -59
- package/app/recipes/reports.runtime/help/index.html +88 -0
- package/app/recipes/reports.runtime/index.html +92 -0
- package/app/recipes/sales.pipeline/help/index.html +52 -57
- package/app/recipes/sales.pipeline/index.html +57 -59
- package/app/recipes/tags.taxonomy/help/index.html +52 -57
- package/app/recipes/tags.taxonomy/index.html +57 -59
- package/app/recipes/team-collaboration/help/index.html +52 -57
- package/app/recipes/team-collaboration/index.html +57 -59
- package/app/recipes/timesheets.time-entries/help/index.html +88 -0
- package/app/recipes/timesheets.time-entries/index.html +92 -0
- package/app/s/custom-accounts/index.html +82 -0
- package/app/s/custom-appointments/index.html +82 -0
- package/app/s/custom-billing/index.html +47 -54
- package/app/s/custom-buying/index.html +47 -54
- package/app/s/custom-checkout/index.html +82 -0
- package/app/s/custom-classes/index.html +47 -54
- package/app/s/custom-clients/index.html +82 -0
- package/app/s/custom-events/index.html +82 -0
- package/app/s/custom-fleet/index.html +82 -0
- package/app/s/custom-giving/index.html +82 -0
- package/app/s/custom-jobs/index.html +47 -54
- package/app/s/custom-kitchen/index.html +47 -54
- package/app/s/custom-material/index.html +47 -54
- package/app/s/custom-meetings/index.html +82 -0
- package/app/s/custom-members/index.html +47 -54
- package/app/s/custom-parts/index.html +47 -54
- package/app/s/custom-rentals/index.html +82 -0
- package/app/s/custom-roastery/index.html +82 -0
- package/app/s/custom-schedule/index.html +47 -54
- package/app/s/custom-shelf/index.html +82 -0
- package/app/s/custom-shop/index.html +47 -54
- package/app/s/custom-wholesale/index.html +47 -54
- package/app/s/custom-work/index.html +82 -0
- package/app/s/custom-yard/index.html +82 -0
- package/app/s/section-access-control/index.html +47 -54
- package/app/s/section-account-security/index.html +47 -54
- package/app/s/section-accounting/index.html +47 -54
- package/app/s/section-activity/index.html +47 -54
- package/app/s/section-agreements/index.html +47 -54
- package/app/s/section-analytics/index.html +47 -54
- package/app/s/section-assets/index.html +47 -54
- package/app/s/section-billing/index.html +47 -54
- package/app/s/section-calendar/index.html +47 -54
- package/app/s/section-catalog/index.html +47 -54
- package/app/s/section-chat.assistant/index.html +47 -54
- package/app/s/section-comments/index.html +47 -54
- package/app/s/section-fields.form-customization/index.html +47 -54
- package/app/s/section-ingestion/index.html +82 -0
- package/app/s/section-integrations/index.html +82 -0
- package/app/s/section-messages/index.html +47 -54
- package/app/s/section-more/index.html +47 -54
- package/app/s/section-operations/index.html +47 -54
- package/app/s/section-projects/index.html +47 -54
- package/app/s/section-purchasing/index.html +47 -54
- package/app/s/section-reports.materialized/index.html +47 -54
- package/app/s/section-reports.runtime/index.html +82 -0
- package/app/s/section-sales/index.html +47 -54
- package/app/s/section-taxonomy/index.html +47 -54
- package/app/s/section-team/index.html +47 -54
- package/app/s/section-work/index.html +82 -0
- package/dist/ai/state.svelte.d.ts +13 -0
- package/dist/ai/state.svelte.js +33 -0
- package/dist/assistant/change.d.ts +14 -3
- package/dist/assistant/change.js +26 -3
- package/dist/assistant/engine.js +5 -1
- package/dist/assistant/prompt.js +7 -3
- package/dist/catalog/catalog.json +11263 -14455
- package/dist/catalog/generate/exclusions.d.ts +2 -0
- package/dist/catalog/generate/exclusions.js +14 -0
- package/dist/catalog/generate/extract.js +28 -7
- package/dist/catalog/types.d.ts +7 -0
- package/dist/components/AdvancedStyles.svelte +138 -0
- package/dist/components/AdvancedStyles.svelte.d.ts +6 -0
- package/dist/components/AiModelsPage.svelte +40 -0
- package/dist/components/AiModelsPage.svelte.d.ts +7 -0
- package/dist/components/AiSetup.svelte +9 -6
- package/dist/components/AiStatusIcons.svelte +8 -5
- package/dist/components/AppSettings.svelte +105 -1
- package/dist/components/BrowserAssistant.svelte +16 -17
- package/dist/components/BrowserAssistant.svelte.d.ts +2 -0
- package/dist/components/ChildRecords.svelte +61 -14
- package/dist/components/ChildRecords.svelte.d.ts +1 -0
- package/dist/components/ConnectTools.svelte +5 -2
- package/dist/components/CookbooksPanel.svelte +56 -33
- package/dist/components/CopyButton.svelte +65 -0
- package/dist/components/CopyButton.svelte.d.ts +24 -0
- package/dist/components/ExportPanel.svelte +292 -57
- package/dist/components/ExportPanel.svelte.d.ts +10 -1
- package/dist/components/FeatureCard.svelte +21 -10
- package/dist/components/FeaturesPanel.svelte +4 -1
- package/dist/components/FieldInput.svelte +6 -3
- package/dist/components/FieldMapForm.svelte +6 -10
- package/dist/components/FieldMapForm.svelte.d.ts +1 -0
- package/dist/components/FormWorkspace.svelte +80 -9
- package/dist/components/FormWorkspace.svelte.d.ts +1 -0
- package/dist/components/HeaderIconLink.svelte +86 -0
- package/dist/components/HeaderIconLink.svelte.d.ts +14 -0
- package/dist/components/HelpView.svelte +3 -0
- package/dist/components/ModelOptions.svelte +13 -2
- package/dist/components/ModelPage.svelte +33 -5
- package/dist/components/ModelPage.svelte.d.ts +4 -0
- package/dist/components/ModelWorkspace.svelte +148 -50
- package/dist/components/ModelWorkspace.svelte.d.ts +4 -0
- package/dist/components/PackagePage.svelte +96 -0
- package/dist/components/PackagePage.svelte.d.ts +9 -0
- package/dist/components/ProductMedia.svelte +95 -0
- package/dist/components/ProductMedia.svelte.d.ts +10 -0
- package/dist/components/RecipeCards.svelte +13 -1
- package/dist/components/RecipeHelp.svelte +3 -0
- package/dist/components/RecipeOptions.svelte +13 -1
- package/dist/components/RecordFeatures.svelte +22 -8
- package/dist/components/RecordView.svelte +354 -0
- package/dist/components/RecordView.svelte.d.ts +14 -0
- package/dist/components/RelationField.svelte +5 -2
- package/dist/components/SectionActions.svelte +8 -5
- package/dist/components/SectionHeading.svelte +63 -0
- package/dist/components/SectionHeading.svelte.d.ts +11 -0
- package/dist/components/SectionIcons.svelte +15 -3
- package/dist/components/SectionOverview.svelte +33 -3
- package/dist/components/SectionOverview.svelte.d.ts +4 -0
- package/dist/components/SectionPage.svelte +25 -165
- package/dist/components/SectionView.svelte +172 -0
- package/dist/components/SectionView.svelte.d.ts +18 -0
- package/dist/components/SettingsPanel.svelte +3 -9
- package/dist/components/SettingsPanel.svelte.d.ts +1 -5
- package/dist/components/ThemeBridge.svelte +80 -4
- package/dist/components/ThemeBridge.svelte.d.ts +5 -1
- package/dist/components/ThemeSection.svelte +208 -117
- package/dist/components/ThemeSection.svelte.d.ts +3 -7
- package/dist/components/VariantGridForm.svelte +9 -13
- package/dist/components/VariantGridForm.svelte.d.ts +1 -0
- package/dist/components/VoiceTyping.svelte +3 -0
- package/dist/cookbook/describe.d.ts +29 -0
- package/dist/cookbook/describe.js +164 -0
- package/dist/cookbook/file.d.ts +6 -0
- package/dist/cookbook/file.js +18 -4
- package/dist/cookbook/prompt.d.ts +49 -0
- package/dist/cookbook/prompt.js +96 -0
- package/dist/cookbook/store.svelte.d.ts +13 -0
- package/dist/cookbook/store.svelte.js +36 -8
- package/dist/core/prompt.js +10 -1
- package/dist/core/reply.d.ts +6 -1
- package/dist/data/children.d.ts +50 -6
- package/dist/data/children.js +146 -16
- package/dist/data/derived.d.ts +37 -29
- package/dist/data/derived.js +49 -30
- package/dist/data/display.d.ts +21 -8
- package/dist/data/display.js +74 -11
- package/dist/data/fakes.d.ts +48 -9
- package/dist/data/fakes.js +146 -22
- package/dist/data/labels.d.ts +7 -2
- package/dist/data/labels.js +12 -2
- package/dist/data/list-sort.d.ts +8 -0
- package/dist/data/list-sort.js +45 -0
- package/dist/data/money.d.ts +225 -0
- package/dist/data/money.js +411 -0
- package/dist/data/packs.d.ts +13 -0
- package/dist/data/packs.js +1224 -0
- package/dist/data/planner-source.js +120 -3
- package/dist/data/source.d.ts +13 -2
- package/dist/data/source.js +274 -40
- package/dist/features/palette.d.ts +2 -0
- package/dist/features/palette.js +1 -1
- package/dist/forms/stock.d.ts +1 -1
- package/dist/forms/stock.js +3 -1
- package/dist/index.d.ts +7 -2
- package/dist/index.js +6 -1
- package/dist/kitchen/LiveKitchenBridge.svelte +73 -0
- package/dist/kitchen/LiveKitchenBridge.svelte.d.ts +8 -0
- package/dist/kitchen/live.d.ts +7 -0
- package/dist/kitchen/live.js +51 -0
- package/dist/library/icons.js +34 -0
- package/dist/library/library.json +1546 -15
- package/dist/library/pending.json +5 -0
- package/dist/library/types.d.ts +4 -0
- package/dist/motion/tokens.d.ts +6 -0
- package/dist/motion/tokens.js +32 -0
- package/dist/motion/view-transition.d.ts +13 -0
- package/dist/motion/view-transition.js +17 -0
- package/dist/overviews/definitions.d.ts +41 -2
- package/dist/overviews/definitions.js +111 -4
- package/dist/overviews/models.d.ts +10 -0
- package/dist/overviews/models.js +19 -0
- package/dist/overviews/registry.d.ts +92 -5
- package/dist/overviews/registry.js +468 -58
- package/dist/overviews/validate.js +2 -2
- package/dist/planner/Planner.svelte +374 -166
- package/dist/planner/PlannerControls.svelte +255 -0
- package/dist/planner/PlannerControls.svelte.d.ts +17 -0
- package/dist/planner/PlannerLifecycle.svelte +73 -0
- package/dist/planner/PlannerLifecycle.svelte.d.ts +9 -0
- package/dist/planner/app.svelte.d.ts +12 -2
- package/dist/planner/app.svelte.js +13 -3
- package/dist/planner/assistant.js +20 -2
- package/dist/planner/commands/adapter.js +9 -2
- package/dist/planner/commands/types.d.ts +1 -1
- package/dist/planner/commands/types.js +1 -0
- package/dist/planner/header-icons.d.ts +12 -0
- package/dist/planner/header-icons.js +12 -0
- package/dist/planner/host/HostPlanner.svelte +70 -0
- package/dist/planner/host/HostPlanner.svelte.d.ts +17 -0
- package/dist/planner/host/session.svelte.d.ts +28 -0
- package/dist/planner/host/session.svelte.js +186 -0
- package/dist/planner/routes.d.ts +49 -0
- package/dist/planner/routes.js +64 -0
- package/dist/planner/shell.d.ts +40 -0
- package/dist/planner/shell.js +56 -0
- package/dist/planner/tab.svelte.d.ts +6 -3
- package/dist/planner/tab.svelte.js +11 -4
- package/dist/planner/title.d.ts +15 -0
- package/dist/planner/title.js +21 -0
- package/dist/planner/title.svelte.d.ts +6 -0
- package/dist/planner/title.svelte.js +11 -0
- package/dist/planner/types.d.ts +39 -7
- package/dist/products/media.d.ts +20 -0
- package/dist/products/media.js +65 -0
- package/dist/recipes/help/descriptions.json +1 -3
- package/dist/recipes/index.d.ts +2 -0
- package/dist/recipes/index.js +6 -0
- package/dist/recipes/plumbing.d.ts +35 -1
- package/dist/recipes/plumbing.js +74 -0
- package/dist/screens/definition.d.ts +35 -0
- package/dist/screens/definition.js +132 -0
- package/dist/screens/relations.d.ts +17 -0
- package/dist/screens/relations.js +98 -0
- package/dist/screens/totals.d.ts +37 -0
- package/dist/screens/totals.js +65 -0
- package/dist/sections/info.d.ts +1 -1
- package/dist/sections/info.js +2 -2
- package/dist/settings/app-settings.d.ts +17 -1
- package/dist/settings/app-settings.js +40 -3
- package/dist/smrt-version.d.ts +2 -0
- package/dist/smrt-version.js +4 -0
- package/dist/styles/planner-forms.css +53 -0
- package/dist/styles/planner-lists.css +43 -0
- package/dist/theme/css-highlight.d.ts +6 -0
- package/dist/theme/css-highlight.js +34 -0
- package/dist/theme/custom-css.svelte.d.ts +34 -0
- package/dist/theme/custom-css.svelte.js +246 -0
- package/dist/theme/runtime.js +25 -5
- package/dist/theme/theme.d.ts +26 -3
- package/dist/theme/theme.js +70 -2
- package/dist/upstream/overlay.d.ts +14 -5
- package/dist/upstream/overlay.js +20 -2
- package/package.json +12 -6
- package/app/_app/immutable/assets/0.B5zXkXe_.css +0 -1
- package/app/_app/immutable/assets/10.hpcnxvK1.css +0 -1
- package/app/_app/immutable/assets/11.D7zoXfVV.css +0 -1
- package/app/_app/immutable/assets/12.CPobm1ED.css +0 -1
- package/app/_app/immutable/assets/2.CyaWdRdI.css +0 -1
- package/app/_app/immutable/assets/3.BlPQOes8.css +0 -1
- package/app/_app/immutable/assets/8.2gQeKBp_.css +0 -1
- package/app/_app/immutable/assets/9.HOPT4xtg.css +0 -1
- package/app/_app/immutable/assets/AiSetup.Cb22AigN.css +0 -1
- package/app/_app/immutable/assets/Button.DkP0qkG9.css +0 -1
- package/app/_app/immutable/assets/ConnectTools.BgIJOOGW.css +0 -1
- package/app/_app/immutable/assets/FieldMapForm.BCU-4pO4.css +0 -1
- package/app/_app/immutable/assets/ModelPage.Dd3LcMta.css +0 -1
- package/app/_app/immutable/assets/SectionActions.CTkVuNMF.css +0 -1
- package/app/_app/immutable/assets/SectionIcons.5Udq9vN-.css +0 -1
- package/app/_app/immutable/assets/SegmentedControl.B8SrQacd.css +0 -1
- package/app/_app/immutable/assets/dist.C5nHBk_O.css +0 -1
- package/app/_app/immutable/assets/feedback.BVKAwFck.css +0 -1
- package/app/_app/immutable/assets/forms.BChZ2RWM.css +0 -1
- package/app/_app/immutable/assets/percent.LH0z-ozZ.css +0 -1
- package/app/_app/immutable/assets/store.CGDwHkkF.css +0 -1
- package/app/_app/immutable/assets/ui.B1A1Zl2p.css +0 -1
- package/app/_app/immutable/assets/workspace.BIMkuZDb.css +0 -1
- package/app/_app/immutable/chunks/1okeBSoq.js +0 -1
- package/app/_app/immutable/chunks/2jFBkS1C.js +0 -1
- package/app/_app/immutable/chunks/6P9zxrzU.js +0 -1
- package/app/_app/immutable/chunks/B32EWqI8.js +0 -9
- package/app/_app/immutable/chunks/B4Kevpe0.js +0 -1
- package/app/_app/immutable/chunks/BKwRT_1p.js +0 -1
- package/app/_app/immutable/chunks/BS4h9ES-.js +0 -1
- package/app/_app/immutable/chunks/CMhpRMKg.js +0 -1
- package/app/_app/immutable/chunks/CPRHZZeW.js +0 -1
- package/app/_app/immutable/chunks/CRQ1Pmzr.js +0 -1
- package/app/_app/immutable/chunks/CWtfVMDz.js +0 -1
- package/app/_app/immutable/chunks/Chyo8rdT.js +0 -3
- package/app/_app/immutable/chunks/Ci0DUht6.js +0 -34
- package/app/_app/immutable/chunks/CmmuWmp6.js +0 -2
- package/app/_app/immutable/chunks/CrFNLK0f.js +0 -1
- package/app/_app/immutable/chunks/CsprTb3f.js +0 -2
- package/app/_app/immutable/chunks/CygC84VT.js +0 -2
- package/app/_app/immutable/chunks/D0VgZnk1.js +0 -1
- package/app/_app/immutable/chunks/DD7gpKb2.js +0 -1
- package/app/_app/immutable/chunks/DNRgqfTx.js +0 -1
- package/app/_app/immutable/chunks/DVRKjN-E.js +0 -1
- package/app/_app/immutable/chunks/D_J_XtJy.js +0 -846
- package/app/_app/immutable/chunks/Dp9GVO-9.js +0 -1
- package/app/_app/immutable/chunks/DqcD-WtP.js +0 -1
- package/app/_app/immutable/chunks/QukgIHDX.js +0 -1
- package/app/_app/immutable/chunks/WxSPP8QW.js +0 -4
- package/app/_app/immutable/chunks/Xp1g1t4n.js +0 -3
- package/app/_app/immutable/chunks/leQCwW2d.js +0 -1
- package/app/_app/immutable/chunks/p6bgzXiY.js +0 -1
- package/app/_app/immutable/entry/app.IZIJXhgq.js +0 -2
- package/app/_app/immutable/entry/start.BuaYHD1N.js +0 -1
- package/app/_app/immutable/nodes/0.m_U8WC7E.js +0 -10
- package/app/_app/immutable/nodes/1.Crw8ULhB.js +0 -1
- package/app/_app/immutable/nodes/10.1nQxyH9H.js +0 -4
- package/app/_app/immutable/nodes/11.Cw0JnQF3.js +0 -1
- package/app/_app/immutable/nodes/12.BIocA1aI.js +0 -1
- package/app/_app/immutable/nodes/2.CR5BwGnt.js +0 -17
- package/app/_app/immutable/nodes/3.1B56hgAG.js +0 -1
- package/app/_app/immutable/nodes/4.SSIC7sUh.js +0 -1
- package/app/_app/immutable/nodes/5.DgdwleDQ.js +0 -1
- package/app/_app/immutable/nodes/6.DmD9rqLU.js +0 -1
- package/app/_app/immutable/nodes/7.DdngsBmo.js +0 -1
- package/app/_app/immutable/nodes/8.D2Mszsua.js +0 -3
- package/app/_app/immutable/nodes/9.CLYsywul.js +0 -1
- package/app/m/content/Contents/index.html +0 -96
- package/app/m/preferences/UiPreferenceRecord/index.html +0 -96
- package/app/m/users/AccessRequest/index.html +0 -96
- package/app/m/users/ResourceGrant/index.html +0 -96
- package/app/m/users/UsersCliAuthRequest/index.html +0 -96
- package/app/m/users/UsersMagicLinkToken/index.html +0 -96
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
2
|
import { FieldLabel } from '@happyvertical/smrt-ui/forms';
|
|
3
3
|
import { tick } from 'svelte';
|
|
4
|
-
import {
|
|
4
|
+
import { getModelByQualifiedName } from '../catalog/index.js';
|
|
5
5
|
import type { CatalogModel } from '../catalog/types.js';
|
|
6
6
|
import {
|
|
7
7
|
blankRecord,
|
|
@@ -28,13 +28,22 @@ import {
|
|
|
28
28
|
pluralize,
|
|
29
29
|
recordCount,
|
|
30
30
|
} from '../data/format.js';
|
|
31
|
-
import { relationLabels, shortId } from '../data/labels.js';
|
|
31
|
+
import { relationLabels, resolveRelated, shortId } from '../data/labels.js';
|
|
32
|
+
import {
|
|
33
|
+
type ListSort,
|
|
34
|
+
nextListSort,
|
|
35
|
+
sortListRows,
|
|
36
|
+
} from '../data/list-sort.js';
|
|
32
37
|
import { focusFirstInvalid } from '../fields/invalid.js';
|
|
33
38
|
import { type ActiveForm, isFieldMap } from '../forms/active.js';
|
|
39
|
+
import { appHref } from '../planner/app.svelte.js';
|
|
34
40
|
import { takeCreate } from '../planner/create.js';
|
|
41
|
+
import { modelPath, recordPath } from '../planner/routes.js';
|
|
35
42
|
import type { ViewField } from '../recipes/policy.js';
|
|
36
43
|
import { inScope, type RowScope } from '../recipes/scope.js';
|
|
37
44
|
import type { FieldMapForm as FieldMapFormShape } from '../recipes/types.js';
|
|
45
|
+
import '../styles/planner-forms.css';
|
|
46
|
+
import '../styles/planner-lists.css';
|
|
38
47
|
import ChildRecords from './ChildRecords.svelte';
|
|
39
48
|
import FieldInput from './FieldInput.svelte';
|
|
40
49
|
import FieldMapForm from './FieldMapForm.svelte';
|
|
@@ -62,6 +71,8 @@ interface ModelWorkspaceProps {
|
|
|
62
71
|
scope?: RowScope;
|
|
63
72
|
/** Values a new row carries so it stays in `scope`. */
|
|
64
73
|
preset?: Record<string, unknown>;
|
|
74
|
+
/** An in-app path as a link; the planner's `appHref` by default. */
|
|
75
|
+
href?: (path: string) => string;
|
|
65
76
|
}
|
|
66
77
|
|
|
67
78
|
let {
|
|
@@ -73,6 +84,7 @@ let {
|
|
|
73
84
|
noun,
|
|
74
85
|
scope,
|
|
75
86
|
preset,
|
|
87
|
+
href = appHref,
|
|
76
88
|
}: ModelWorkspaceProps = $props();
|
|
77
89
|
|
|
78
90
|
const source = useDataSource();
|
|
@@ -102,10 +114,52 @@ const totalFields = $derived(
|
|
|
102
114
|
);
|
|
103
115
|
const newNoun = $derived(noun ?? humanize(model.name).toLowerCase());
|
|
104
116
|
const heading = $derived(title ?? pluralize(humanize(model.name)));
|
|
117
|
+
const packageId = $derived(getModelByQualifiedName(model.id)?.pkg.id ?? '');
|
|
118
|
+
/** A row opens its record page (smrt#3718 record view). */
|
|
119
|
+
const viewHref = (row: ModelRecord) =>
|
|
120
|
+
href(recordPath(packageId, model.name, row.id));
|
|
121
|
+
/**
|
|
122
|
+
* The list narrowed to one record's rows ("View all" on a record page): the
|
|
123
|
+
* reference field the scope filters on, so the heading can say whose rows
|
|
124
|
+
* these are and offer the whole list.
|
|
125
|
+
*/
|
|
126
|
+
const filterField = $derived(
|
|
127
|
+
scope?.equals !== undefined
|
|
128
|
+
? fields.find(
|
|
129
|
+
(f) =>
|
|
130
|
+
f.name === scope.field &&
|
|
131
|
+
(f.type === 'foreignKey' || f.type === 'crossPackageRef') &&
|
|
132
|
+
f.related,
|
|
133
|
+
)
|
|
134
|
+
: undefined,
|
|
135
|
+
);
|
|
136
|
+
let filterLabel = $state('');
|
|
137
|
+
$effect(() => {
|
|
138
|
+
const field = filterField;
|
|
139
|
+
const id = scope?.equals;
|
|
140
|
+
filterLabel = '';
|
|
141
|
+
if (!field?.related || id === undefined) return;
|
|
142
|
+
const target = getModelByQualifiedName(field.related)?.model;
|
|
143
|
+
if (!target) return;
|
|
144
|
+
void resolveRelated(source, target, id).then((found) => {
|
|
145
|
+
if (found && filterField === field) filterLabel = found.label;
|
|
146
|
+
});
|
|
147
|
+
});
|
|
105
148
|
|
|
106
149
|
let rows = $state<ModelRecord[]>([]);
|
|
150
|
+
let sort = $state<ListSort | null>(null);
|
|
107
151
|
/** Labels of the records the rows point at, so a cell shows a name, not an id. */
|
|
108
152
|
let labels = $state(new Map<string, string>());
|
|
153
|
+
const sortedRows = $derived(
|
|
154
|
+
sortListRows(rows, sort, (row, key) => {
|
|
155
|
+
const column = columns.find((item) => item.name === key);
|
|
156
|
+
if (!column) return undefined;
|
|
157
|
+
const value = cellValue(column, row);
|
|
158
|
+
return column.type === 'foreignKey' || column.type === 'crossPackageRef'
|
|
159
|
+
? formatValue(column, value, labels)
|
|
160
|
+
: value;
|
|
161
|
+
}),
|
|
162
|
+
);
|
|
109
163
|
let loaded = $state(false);
|
|
110
164
|
/** `null` closed, `'new'` creating, otherwise the id being edited. */
|
|
111
165
|
let editing = $state<string | 'new' | null>(null);
|
|
@@ -116,7 +170,11 @@ let draft = $state<Record<string, unknown>>({});
|
|
|
116
170
|
let formKey = $state(0);
|
|
117
171
|
/** Required fields the last save found empty, by field name. */
|
|
118
172
|
let errors = $state<Record<string, string>>({});
|
|
173
|
+
/** Why the data source refused the last save or delete (an issued document's lines). */
|
|
174
|
+
let failure = $state('');
|
|
119
175
|
const summary = $derived(errorSummary(fields, errors));
|
|
176
|
+
const reason = (error: unknown) =>
|
|
177
|
+
error instanceof Error ? error.message : String(error);
|
|
120
178
|
/** What names a row to a person: its customer or reference, else a short id. */
|
|
121
179
|
const nameOf = (row: ModelRecord) =>
|
|
122
180
|
recordTitle(model, fields, row, labels) || shortId(row.id);
|
|
@@ -144,11 +202,13 @@ $effect(() => {
|
|
|
144
202
|
// Reload (and close any open form) when the model changes.
|
|
145
203
|
model.id;
|
|
146
204
|
scope;
|
|
205
|
+
sort = null;
|
|
147
206
|
editing = null;
|
|
148
207
|
loaded = false;
|
|
149
208
|
void load().then(() => {
|
|
150
209
|
// A section page's "New ..." arrives with the form already open.
|
|
151
|
-
if (takeCreate(
|
|
210
|
+
if (typeof location !== 'undefined' && takeCreate(location.pathname))
|
|
211
|
+
startCreate(mapForms[0]);
|
|
152
212
|
});
|
|
153
213
|
});
|
|
154
214
|
|
|
@@ -175,18 +235,12 @@ function startCreate(form?: ActiveForm<FieldMapFormShape>) {
|
|
|
175
235
|
formKey++;
|
|
176
236
|
}
|
|
177
237
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
}
|
|
185
|
-
mapForm = undefined;
|
|
186
|
-
draft = { ...row };
|
|
187
|
-
errors = {};
|
|
188
|
-
editing = row.id;
|
|
189
|
-
formKey++;
|
|
238
|
+
/** A click on the row (not on one of its controls) opens the record. */
|
|
239
|
+
function openRow(event: MouseEvent) {
|
|
240
|
+
const target = event.target as HTMLElement | null;
|
|
241
|
+
if (target?.closest('a, button')) return;
|
|
242
|
+
const link = event.currentTarget as HTMLElement;
|
|
243
|
+
link.querySelector<HTMLAnchorElement>('a[data-view]')?.click();
|
|
190
244
|
}
|
|
191
245
|
|
|
192
246
|
async function save(event: SubmitEvent) {
|
|
@@ -202,18 +256,25 @@ async function save(event: SubmitEvent) {
|
|
|
202
256
|
for (const field of fields) {
|
|
203
257
|
if (!calculated.has(field.name)) values[field.name] = draft[field.name];
|
|
204
258
|
}
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
259
|
+
failure = '';
|
|
260
|
+
try {
|
|
261
|
+
if (editing === 'new') {
|
|
262
|
+
const created = await source.create(model, values);
|
|
263
|
+
// A record with line items stays open after its first save, so they
|
|
264
|
+
// can be added to it right away.
|
|
265
|
+
editing = childTables.length ? created.id : null;
|
|
266
|
+
if (editing) {
|
|
267
|
+
draft = { ...created };
|
|
268
|
+
formKey++;
|
|
269
|
+
}
|
|
270
|
+
} else if (editing) {
|
|
271
|
+
await source.update(model, editing, values);
|
|
272
|
+
editing = null;
|
|
213
273
|
}
|
|
214
|
-
}
|
|
215
|
-
|
|
216
|
-
|
|
274
|
+
} catch (error) {
|
|
275
|
+
// The write was undone; the form stays open with the reason.
|
|
276
|
+
failure = reason(error);
|
|
277
|
+
return;
|
|
217
278
|
}
|
|
218
279
|
await load();
|
|
219
280
|
}
|
|
@@ -231,7 +292,13 @@ async function refreshDerived() {
|
|
|
231
292
|
}
|
|
232
293
|
|
|
233
294
|
async function remove(row: ModelRecord) {
|
|
234
|
-
|
|
295
|
+
failure = '';
|
|
296
|
+
try {
|
|
297
|
+
await source.delete(model, row.id);
|
|
298
|
+
} catch (error) {
|
|
299
|
+
failure = reason(error);
|
|
300
|
+
return;
|
|
301
|
+
}
|
|
235
302
|
await load();
|
|
236
303
|
}
|
|
237
304
|
</script>
|
|
@@ -239,6 +306,15 @@ async function remove(row: ModelRecord) {
|
|
|
239
306
|
<section>
|
|
240
307
|
<header>
|
|
241
308
|
<h2>{heading} {#if loaded}<small>{recordCount(rows.length)}</small>{/if}</h2>
|
|
309
|
+
{#if failure}
|
|
310
|
+
<p class="error" role="alert" data-write-error>{failure}</p>
|
|
311
|
+
{/if}
|
|
312
|
+
{#if filterField}
|
|
313
|
+
<p class="filter" data-list-filter>
|
|
314
|
+
{filterField.label}: {filterLabel || shortId(scope?.equals)}
|
|
315
|
+
· <a href={href(modelPath(packageId, model.name))}>Show all</a>
|
|
316
|
+
</p>
|
|
317
|
+
{/if}
|
|
242
318
|
{#if mapForms.length}
|
|
243
319
|
{#each mapForms as active (active.form.id)}
|
|
244
320
|
<button type="button" onclick={() => startCreate(active)}>
|
|
@@ -262,7 +338,7 @@ async function remove(row: ModelRecord) {
|
|
|
262
338
|
oncancel={() => (editing = null)}
|
|
263
339
|
/>
|
|
264
340
|
{:else}
|
|
265
|
-
<form onsubmit={save} novalidate>
|
|
341
|
+
<form class="planner-form" onsubmit={save} novalidate>
|
|
266
342
|
<h3>{editing === 'new' ? `New ${newNoun}` : editTitle || model.name}</h3>
|
|
267
343
|
{#each fields as field (field.name)}
|
|
268
344
|
{#if totalFields.includes(field)}
|
|
@@ -340,30 +416,35 @@ async function remove(row: ModelRecord) {
|
|
|
340
416
|
<p>No records yet. Create one above.</p>
|
|
341
417
|
{:else}
|
|
342
418
|
<div class="scroll">
|
|
343
|
-
<table>
|
|
419
|
+
<table class="planner-list">
|
|
344
420
|
<thead>
|
|
345
421
|
<tr>
|
|
346
422
|
{#each columns as column (column.name)}
|
|
347
|
-
<th
|
|
423
|
+
<th scope="col" aria-sort={sort?.key === column.name ? sort.direction : 'none'}>
|
|
424
|
+
<button type="button" class="sort-button" onclick={() => (sort = nextListSort(sort, column.name))}>
|
|
425
|
+
{column.label}<span class="sort-icon" aria-hidden="true">{sort?.key === column.name ? (sort.direction === 'ascending' ? '↑' : '↓') : '↕'}</span>
|
|
426
|
+
</button>
|
|
427
|
+
</th>
|
|
348
428
|
{/each}
|
|
349
|
-
<th><span class="visually-hidden">Actions</span></th>
|
|
429
|
+
<th scope="col"><span class="visually-hidden">Actions</span></th>
|
|
350
430
|
</tr>
|
|
351
431
|
</thead>
|
|
352
432
|
<tbody>
|
|
353
|
-
{#each
|
|
354
|
-
|
|
433
|
+
{#each sortedRows as row (row.id)}
|
|
434
|
+
<!-- svelte-ignore a11y_no_noninteractive_element_interactions -->
|
|
435
|
+
<tr class="row" onclick={openRow}>
|
|
355
436
|
{#each columns as column (column.name)}
|
|
356
437
|
<td>{formatValue(column, cellValue(column, row), labels)}</td>
|
|
357
438
|
{/each}
|
|
358
439
|
<td class="row-actions">
|
|
359
|
-
<
|
|
360
|
-
type="button"
|
|
440
|
+
<a
|
|
361
441
|
class="secondary"
|
|
362
|
-
|
|
363
|
-
|
|
442
|
+
href={viewHref(row)}
|
|
443
|
+
aria-label={`View ${nameOf(row)}`}
|
|
444
|
+
data-view
|
|
364
445
|
>
|
|
365
|
-
|
|
366
|
-
</
|
|
446
|
+
View
|
|
447
|
+
</a>
|
|
367
448
|
<button
|
|
368
449
|
type="button"
|
|
369
450
|
class="secondary"
|
|
@@ -382,6 +463,8 @@ async function remove(row: ModelRecord) {
|
|
|
382
463
|
</section>
|
|
383
464
|
|
|
384
465
|
<style>
|
|
466
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
467
|
+
@layer smrt.theme {
|
|
385
468
|
section {
|
|
386
469
|
display: grid;
|
|
387
470
|
gap: var(--smrt-spacing-4);
|
|
@@ -389,6 +472,7 @@ async function remove(row: ModelRecord) {
|
|
|
389
472
|
|
|
390
473
|
header {
|
|
391
474
|
display: flex;
|
|
475
|
+
flex-wrap: wrap;
|
|
392
476
|
gap: var(--smrt-spacing-3);
|
|
393
477
|
align-items: center;
|
|
394
478
|
justify-content: space-between;
|
|
@@ -404,14 +488,6 @@ async function remove(row: ModelRecord) {
|
|
|
404
488
|
font-weight: 400;
|
|
405
489
|
}
|
|
406
490
|
|
|
407
|
-
form {
|
|
408
|
-
display: grid;
|
|
409
|
-
gap: var(--smrt-spacing-3);
|
|
410
|
-
padding: var(--smrt-spacing-4);
|
|
411
|
-
border: 1px solid var(--smrt-color-outline-variant);
|
|
412
|
-
border-radius: var(--smrt-radius-large);
|
|
413
|
-
}
|
|
414
|
-
|
|
415
491
|
.actions,
|
|
416
492
|
.row-actions {
|
|
417
493
|
display: flex;
|
|
@@ -449,6 +525,21 @@ async function remove(row: ModelRecord) {
|
|
|
449
525
|
overflow-x: auto;
|
|
450
526
|
}
|
|
451
527
|
|
|
528
|
+
.filter {
|
|
529
|
+
margin: 0;
|
|
530
|
+
flex: 1 1 100%;
|
|
531
|
+
color: var(--smrt-color-on-surface-variant);
|
|
532
|
+
font-size: var(--smrt-typography-body-small-size, 0.8125rem);
|
|
533
|
+
}
|
|
534
|
+
|
|
535
|
+
.row {
|
|
536
|
+
cursor: pointer;
|
|
537
|
+
}
|
|
538
|
+
|
|
539
|
+
.row:hover td {
|
|
540
|
+
background: color-mix(in srgb, currentColor calc(var(--smrt-state-hover) * 100%), transparent);
|
|
541
|
+
}
|
|
542
|
+
|
|
452
543
|
table {
|
|
453
544
|
width: 100%;
|
|
454
545
|
border-collapse: collapse;
|
|
@@ -457,11 +548,12 @@ async function remove(row: ModelRecord) {
|
|
|
457
548
|
th,
|
|
458
549
|
td {
|
|
459
550
|
padding: var(--smrt-spacing-2) var(--smrt-spacing-3);
|
|
460
|
-
border-bottom:
|
|
551
|
+
border-bottom: var(--smrt-hairline);
|
|
461
552
|
text-align: left;
|
|
462
553
|
white-space: nowrap;
|
|
463
554
|
}
|
|
464
555
|
|
|
556
|
+
|
|
465
557
|
button {
|
|
466
558
|
padding: var(--smrt-spacing-2) var(--smrt-spacing-3);
|
|
467
559
|
border: 0;
|
|
@@ -472,10 +564,15 @@ async function remove(row: ModelRecord) {
|
|
|
472
564
|
cursor: pointer;
|
|
473
565
|
}
|
|
474
566
|
|
|
475
|
-
button.secondary
|
|
476
|
-
|
|
567
|
+
button.secondary,
|
|
568
|
+
a.secondary {
|
|
569
|
+
display: inline-block;
|
|
570
|
+
padding: var(--smrt-spacing-2) var(--smrt-spacing-3);
|
|
571
|
+
border: var(--smrt-control-border);
|
|
572
|
+
border-radius: var(--smrt-radius-medium);
|
|
477
573
|
background: transparent;
|
|
478
574
|
color: var(--smrt-color-on-surface);
|
|
575
|
+
text-decoration: none;
|
|
479
576
|
}
|
|
480
577
|
|
|
481
578
|
.visually-hidden {
|
|
@@ -485,4 +582,5 @@ async function remove(row: ModelRecord) {
|
|
|
485
582
|
overflow: hidden;
|
|
486
583
|
clip-path: inset(50%);
|
|
487
584
|
}
|
|
585
|
+
}
|
|
488
586
|
</style>
|
|
@@ -3,6 +3,8 @@ import { type ChildTable } from '../data/columns.ts';
|
|
|
3
3
|
import { type ActiveForm } from '../forms/active.ts';
|
|
4
4
|
import type { ViewField } from '../recipes/policy.ts';
|
|
5
5
|
import { type RowScope } from '../recipes/scope.ts';
|
|
6
|
+
import '../styles/planner-forms.css';
|
|
7
|
+
import '../styles/planner-lists.css';
|
|
6
8
|
interface ModelWorkspaceProps {
|
|
7
9
|
model: CatalogModel;
|
|
8
10
|
/** The fields to show, policy applied; defaults to every editable field. */
|
|
@@ -26,6 +28,8 @@ interface ModelWorkspaceProps {
|
|
|
26
28
|
scope?: RowScope;
|
|
27
29
|
/** Values a new row carries so it stays in `scope`. */
|
|
28
30
|
preset?: Record<string, unknown>;
|
|
31
|
+
/** An in-app path as a link; the planner's `appHref` by default. */
|
|
32
|
+
href?: (path: string) => string;
|
|
29
33
|
}
|
|
30
34
|
declare const ModelWorkspace: import("svelte").Component<ModelWorkspaceProps, {}, "">;
|
|
31
35
|
type ModelWorkspace = ReturnType<typeof ModelWorkspace>;
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
// One package: its models, dependencies and the tools that connect to it.
|
|
3
|
+
// The static app's `/packages/[id]/` route and the mounted `Planner`'s
|
|
4
|
+
// `#/packages/<id>/` both render this, so a feature's package link resolves
|
|
5
|
+
// in either.
|
|
6
|
+
import { exposedModels, getPackage } from '../catalog/index.js';
|
|
7
|
+
import { humanize } from '../data/format.js';
|
|
8
|
+
import { appHref } from '../planner/app.svelte.js';
|
|
9
|
+
import ConnectTools from './ConnectTools.svelte';
|
|
10
|
+
|
|
11
|
+
interface PackagePageProps {
|
|
12
|
+
/** The catalog package id (`commerce`). */
|
|
13
|
+
id: string;
|
|
14
|
+
/** Where "Unknown package" leads back to. */
|
|
15
|
+
backHref?: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
let { id, backHref }: PackagePageProps = $props();
|
|
19
|
+
|
|
20
|
+
const pkg = $derived(getPackage(id));
|
|
21
|
+
</script>
|
|
22
|
+
|
|
23
|
+
{#if pkg}
|
|
24
|
+
<main>
|
|
25
|
+
<header>
|
|
26
|
+
<h1>{humanize(pkg.id)}</h1>
|
|
27
|
+
<p class="meta"><code>{pkg.packageName}@{pkg.version}</code></p>
|
|
28
|
+
<p>{pkg.description}</p>
|
|
29
|
+
{#if pkg.dependencies.length}
|
|
30
|
+
<p class="meta">
|
|
31
|
+
Needs:
|
|
32
|
+
{#each pkg.dependencies as dependency, i (dependency)}
|
|
33
|
+
{#if i > 0},
|
|
34
|
+
{/if}<a href={appHref(`/packages/${dependency}/`)}>{humanize(dependency)}</a>
|
|
35
|
+
{/each}
|
|
36
|
+
</p>
|
|
37
|
+
{/if}
|
|
38
|
+
</header>
|
|
39
|
+
|
|
40
|
+
<section>
|
|
41
|
+
<h2>Models</h2>
|
|
42
|
+
<ul>
|
|
43
|
+
{#each exposedModels(pkg) as model (model.id)}
|
|
44
|
+
<li>
|
|
45
|
+
<a href={appHref(`/m/${pkg.id}/${model.name}/`)}>{model.name}</a>
|
|
46
|
+
<span class="meta">{model.fields.filter((f) => !f.system).length} fields</span>
|
|
47
|
+
</li>
|
|
48
|
+
{/each}
|
|
49
|
+
</ul>
|
|
50
|
+
</section>
|
|
51
|
+
|
|
52
|
+
<ConnectTools models={pkg.models} />
|
|
53
|
+
</main>
|
|
54
|
+
{:else}
|
|
55
|
+
<main>
|
|
56
|
+
<h1>Unknown package</h1>
|
|
57
|
+
<p>No package is called <code>{id}</code>.{#if backHref} <a href={backHref}>Back to the Planner</a>{/if}</p>
|
|
58
|
+
</main>
|
|
59
|
+
{/if}
|
|
60
|
+
|
|
61
|
+
<style>
|
|
62
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
63
|
+
@layer smrt.theme {
|
|
64
|
+
main {
|
|
65
|
+
display: grid;
|
|
66
|
+
gap: var(--smrt-spacing-6);
|
|
67
|
+
width: min(100%, 72rem);
|
|
68
|
+
margin-inline: auto;
|
|
69
|
+
padding: var(--smrt-spacing-6);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
header,
|
|
73
|
+
section {
|
|
74
|
+
display: grid;
|
|
75
|
+
gap: var(--smrt-spacing-2);
|
|
76
|
+
justify-items: start;
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
h1,
|
|
80
|
+
h2,
|
|
81
|
+
p {
|
|
82
|
+
margin: 0;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.meta {
|
|
86
|
+
color: var(--smrt-color-on-surface-variant);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
ul {
|
|
90
|
+
display: grid;
|
|
91
|
+
gap: var(--smrt-spacing-1);
|
|
92
|
+
margin: 0;
|
|
93
|
+
padding-left: var(--smrt-spacing-5);
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
</style>
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
interface PackagePageProps {
|
|
2
|
+
/** The catalog package id (`commerce`). */
|
|
3
|
+
id: string;
|
|
4
|
+
/** Where "Unknown package" leads back to. */
|
|
5
|
+
backHref?: string;
|
|
6
|
+
}
|
|
7
|
+
declare const PackagePage: import("svelte").Component<PackagePageProps, {}, "">;
|
|
8
|
+
type PackagePage = ReturnType<typeof PackagePage>;
|
|
9
|
+
export default PackagePage;
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { AssetGrid } from '@happyvertical/smrt-assets/svelte';
|
|
3
|
+
import { FilePicker } from '@happyvertical/smrt-ui/forms';
|
|
4
|
+
import type { ComponentProps } from 'svelte';
|
|
5
|
+
import type { ModelRecord } from '../data/source.js';
|
|
6
|
+
import { GALLERY_RECIPE, type ProductImage } from '../products/media.js';
|
|
7
|
+
import { recipeState } from '../recipes/state.svelte.js';
|
|
8
|
+
|
|
9
|
+
type GridAsset = ComponentProps<typeof AssetGrid>['assets'][number];
|
|
10
|
+
|
|
11
|
+
interface ProductMediaProps {
|
|
12
|
+
rows: readonly ModelRecord[];
|
|
13
|
+
images: ReadonlyMap<string, readonly ProductImage[]>;
|
|
14
|
+
onselect: (product: ModelRecord, file: File) => void;
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
let { rows, images, onselect }: ProductMediaProps = $props();
|
|
18
|
+
// The gallery is configured in the cookbook: it follows the Asset library recipe.
|
|
19
|
+
const gallery = $derived(recipeState.has(GALLERY_RECIPE));
|
|
20
|
+
let selectedIds = $state(new Set<string>());
|
|
21
|
+
|
|
22
|
+
/** ProductAsset-linked images in the shape the canonical asset grid renders. */
|
|
23
|
+
function gridAssets(list: readonly ProductImage[]): GridAsset[] {
|
|
24
|
+
return list.map(
|
|
25
|
+
(image) =>
|
|
26
|
+
({
|
|
27
|
+
id: image.id,
|
|
28
|
+
name: image.name,
|
|
29
|
+
sourceUri: image.sourceUri,
|
|
30
|
+
mimeType: image.mimeType,
|
|
31
|
+
description: image.description,
|
|
32
|
+
}) as unknown as GridAsset,
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function toggle(asset: GridAsset) {
|
|
37
|
+
const next = new Set(selectedIds);
|
|
38
|
+
if (!next.delete(asset.id)) next.add(asset.id);
|
|
39
|
+
selectedIds = next;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const nameOf = (product: ModelRecord) =>
|
|
43
|
+
String(product.name ?? 'Untitled product');
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<section class="media" aria-label="Product images">
|
|
47
|
+
<div class="heading">
|
|
48
|
+
<h3>Product images</h3>
|
|
49
|
+
<p>Images stay in this browser demo and are linked through ProductAsset.</p>
|
|
50
|
+
{#if !gallery}
|
|
51
|
+
<p>Add the Asset library recipe to show the product gallery.</p>
|
|
52
|
+
{/if}
|
|
53
|
+
</div>
|
|
54
|
+
|
|
55
|
+
<ul class="products">
|
|
56
|
+
{#each rows as product (product.id)}
|
|
57
|
+
{@const productImages = images.get(product.id) ?? []}
|
|
58
|
+
<li>
|
|
59
|
+
<strong>{nameOf(product)}</strong>
|
|
60
|
+
{#if gallery}
|
|
61
|
+
<AssetGrid
|
|
62
|
+
assets={gridAssets(productImages)}
|
|
63
|
+
{selectedIds}
|
|
64
|
+
onSelectionChange={(ids) => (selectedIds = ids)}
|
|
65
|
+
onAssetClick={toggle}
|
|
66
|
+
mode="pick"
|
|
67
|
+
/>
|
|
68
|
+
{:else}
|
|
69
|
+
<span class="count">
|
|
70
|
+
{productImages.length}
|
|
71
|
+
{productImages.length === 1 ? 'image' : 'images'}
|
|
72
|
+
</span>
|
|
73
|
+
{/if}
|
|
74
|
+
<FilePicker
|
|
75
|
+
label={`Add image for ${nameOf(product)}`}
|
|
76
|
+
accept="image/*"
|
|
77
|
+
onchangefiles={(files) => {
|
|
78
|
+
if (files[0]) onselect(product, files[0]);
|
|
79
|
+
}}
|
|
80
|
+
/>
|
|
81
|
+
</li>
|
|
82
|
+
{/each}
|
|
83
|
+
</ul>
|
|
84
|
+
</section>
|
|
85
|
+
|
|
86
|
+
<style>
|
|
87
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
88
|
+
@layer smrt.theme {
|
|
89
|
+
.media, .heading, li { display: grid; gap: var(--smrt-spacing-2); }
|
|
90
|
+
h3, p { margin: 0; }
|
|
91
|
+
p, .count { color: var(--smrt-color-on-surface-variant); }
|
|
92
|
+
.products { display: grid; gap: var(--smrt-spacing-3); margin: 0; padding: 0; list-style: none; }
|
|
93
|
+
li { padding: var(--smrt-spacing-2); border: var(--smrt-hairline); border-radius: var(--smrt-radius-medium); }
|
|
94
|
+
}
|
|
95
|
+
</style>
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { ModelRecord } from '../data/source.ts';
|
|
2
|
+
import { type ProductImage } from '../products/media.ts';
|
|
3
|
+
interface ProductMediaProps {
|
|
4
|
+
rows: readonly ModelRecord[];
|
|
5
|
+
images: ReadonlyMap<string, readonly ProductImage[]>;
|
|
6
|
+
onselect: (product: ModelRecord, file: File) => void;
|
|
7
|
+
}
|
|
8
|
+
declare const ProductMedia: import("svelte").Component<ProductMediaProps, {}, "">;
|
|
9
|
+
type ProductMedia = ReturnType<typeof ProductMedia>;
|
|
10
|
+
export default ProductMedia;
|
|
@@ -101,6 +101,8 @@ const mainOn = (card: PlannerCard) => cardIsOn(card, recipeState.ids);
|
|
|
101
101
|
<p class="notice" role="status" aria-live="polite">{notice}</p>
|
|
102
102
|
|
|
103
103
|
<style>
|
|
104
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
105
|
+
@layer smrt.theme {
|
|
104
106
|
h2,
|
|
105
107
|
p {
|
|
106
108
|
margin: 0;
|
|
@@ -130,7 +132,7 @@ const mainOn = (card: PlannerCard) => cardIsOn(card, recipeState.ids);
|
|
|
130
132
|
align-content: start;
|
|
131
133
|
gap: var(--smrt-spacing-2);
|
|
132
134
|
padding: var(--smrt-spacing-4);
|
|
133
|
-
border:
|
|
135
|
+
border: var(--smrt-hairline);
|
|
134
136
|
border-radius: var(--smrt-radius-large);
|
|
135
137
|
}
|
|
136
138
|
|
|
@@ -142,4 +144,14 @@ const mainOn = (card: PlannerCard) => cardIsOn(card, recipeState.ids);
|
|
|
142
144
|
display: grid;
|
|
143
145
|
gap: var(--smrt-spacing-1);
|
|
144
146
|
}
|
|
147
|
+
|
|
148
|
+
/* Forced colours: a switched-on recipe's border colour is replaced, so it
|
|
149
|
+
gets a Highlight frame. */
|
|
150
|
+
@media (forced-colors: active) {
|
|
151
|
+
.cards li.selected {
|
|
152
|
+
border-color: Highlight;
|
|
153
|
+
outline: 0.125rem solid Highlight;
|
|
154
|
+
}
|
|
155
|
+
}
|
|
156
|
+
}
|
|
145
157
|
</style>
|
|
@@ -38,6 +38,8 @@ const rendered = $derived(
|
|
|
38
38
|
</section>
|
|
39
39
|
|
|
40
40
|
<style>
|
|
41
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
42
|
+
@layer smrt.theme {
|
|
41
43
|
section {
|
|
42
44
|
display: grid;
|
|
43
45
|
gap: var(--smrt-spacing-3);
|
|
@@ -51,4 +53,5 @@ const rendered = $derived(
|
|
|
51
53
|
.meta {
|
|
52
54
|
color: var(--smrt-color-on-surface-variant);
|
|
53
55
|
}
|
|
56
|
+
}
|
|
54
57
|
</style>
|
|
@@ -105,6 +105,8 @@ const requiredHref = (id: string) => {
|
|
|
105
105
|
</section>
|
|
106
106
|
|
|
107
107
|
<style>
|
|
108
|
+
@layer smrt.reset, smrt.structure, smrt.theme;
|
|
109
|
+
@layer smrt.theme {
|
|
108
110
|
.recipe,
|
|
109
111
|
header,
|
|
110
112
|
.adds,
|
|
@@ -148,7 +150,7 @@ const requiredHref = (id: string) => {
|
|
|
148
150
|
}
|
|
149
151
|
|
|
150
152
|
button.secondary {
|
|
151
|
-
border:
|
|
153
|
+
border: var(--smrt-control-border);
|
|
152
154
|
background: transparent;
|
|
153
155
|
color: var(--smrt-color-on-surface);
|
|
154
156
|
}
|
|
@@ -157,4 +159,14 @@ const requiredHref = (id: string) => {
|
|
|
157
159
|
cursor: not-allowed;
|
|
158
160
|
opacity: 0.6;
|
|
159
161
|
}
|
|
162
|
+
|
|
163
|
+
/* Forced colours: a disabled button reads as GrayText, not by opacity. */
|
|
164
|
+
@media (forced-colors: active) {
|
|
165
|
+
button:disabled {
|
|
166
|
+
border-color: GrayText;
|
|
167
|
+
color: GrayText;
|
|
168
|
+
opacity: 1;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
160
172
|
</style>
|