@fayz-ai/admin 0.33.1 → 0.36.0
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/dist/ScheduleEditor-VJYYNGSV.js +7 -0
- package/dist/{ScheduleEditor-AWG3QNDS.js.map → ScheduleEditor-VJYYNGSV.js.map} +1 -1
- package/dist/{SubscriptionPage-WQBBD35Q.js → SubscriptionPage-2WK57426.js} +3 -3
- package/dist/{SubscriptionPage-WQBBD35Q.js.map → SubscriptionPage-2WK57426.js.map} +1 -1
- package/dist/{chunk-VUWBGUIH.js → chunk-HZGF5N3A.js} +86 -84
- package/dist/chunk-HZGF5N3A.js.map +1 -0
- package/dist/{chunk-WML2RLDF.js → chunk-QLRZUU4V.js} +3 -3
- package/dist/{chunk-WML2RLDF.js.map → chunk-QLRZUU4V.js.map} +1 -1
- package/dist/components/settings/LocationsCrudPage.d.ts.map +1 -1
- package/dist/components/settings/ModuleCard.d.ts +8 -1
- package/dist/components/settings/ModuleCard.d.ts.map +1 -1
- package/dist/components/settings/ModulesPreview.d.ts +30 -0
- package/dist/components/settings/ModulesPreview.d.ts.map +1 -0
- package/dist/components/settings/ModulesSettings.d.ts.map +1 -1
- package/dist/components/settings/module-catalog.d.ts +19 -0
- package/dist/components/settings/module-catalog.d.ts.map +1 -1
- package/dist/components/shared/PersonLink.d.ts +3 -1
- package/dist/components/shared/PersonLink.d.ts.map +1 -1
- package/dist/crud/CrudDetailPage.d.ts +9 -1
- package/dist/crud/CrudDetailPage.d.ts.map +1 -1
- package/dist/crud/CrudFormPage.d.ts +16 -2
- package/dist/crud/CrudFormPage.d.ts.map +1 -1
- package/dist/crud/CrudListView.d.ts.map +1 -1
- package/dist/crud/CrudPage.d.ts.map +1 -1
- package/dist/crud/RelatedListTab.d.ts +24 -2
- package/dist/crud/RelatedListTab.d.ts.map +1 -1
- package/dist/crud/RelatedSection.d.ts +16 -0
- package/dist/crud/RelatedSection.d.ts.map +1 -1
- package/dist/crud/archetype-lookup.d.ts +34 -0
- package/dist/crud/archetype-lookup.d.ts.map +1 -1
- package/dist/crud/archetypes/AddressesTab.d.ts.map +1 -1
- package/dist/crud/archetypes/KanbanBoard.d.ts.map +1 -1
- package/dist/crud/archetypes/OrderFormView.d.ts +17 -2
- package/dist/crud/archetypes/OrderFormView.d.ts.map +1 -1
- package/dist/crud/archetypes/ScheduleGridPanel.d.ts.map +1 -1
- package/dist/crud/relation-field.d.ts +2 -0
- package/dist/crud/relation-field.d.ts.map +1 -1
- package/dist/index.d.ts +5 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1945 -886
- package/dist/index.js.map +1 -1
- package/dist/lib/ai-task.d.ts +36 -0
- package/dist/lib/ai-task.d.ts.map +1 -0
- package/dist/lib/document-openers.d.ts +46 -0
- package/dist/lib/document-openers.d.ts.map +1 -0
- package/dist/units/UnitDetailTabs.d.ts +17 -0
- package/dist/units/UnitDetailTabs.d.ts.map +1 -0
- package/dist/units/UnitSuggestField.d.ts +7 -0
- package/dist/units/UnitSuggestField.d.ts.map +1 -0
- package/dist/units/index.d.ts +1 -0
- package/dist/units/index.d.ts.map +1 -1
- package/package.json +7 -7
- package/dist/ScheduleEditor-AWG3QNDS.js +0 -7
- package/dist/chunk-VUWBGUIH.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/components/billing/plan-feature.tsx","../src/access/limits-registry.ts","../src/access/upgrade-modal-store.ts","../src/access/context.tsx","../src/access/headless.ts","../src/access/module-nav.ts","../src/components/billing/access-contract.ts","../src/components/billing/SubscriptionPage.tsx"],"names":["jsx","useAuthStore","resolveAccess","countByTenant","React2","React3","jsxs","Sparkles","Check"],"mappings":";;;;;;;;;;;;;;;AAQO,SAAS,iBAAiB,OAAA,EAA0D;AACzF,EAAA,OAAO,QAAQ,UAAA,CAAW,GAAG,IACzB,EAAE,KAAA,EAAO,QAAQ,KAAA,CAAM,CAAC,EAAE,IAAA,EAAK,EAAG,aAAa,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,CAAG,2BAAA,EAA6B,aAAa,CAAA;AAAA,QAC3D,WAAA,EAAa,EAAA,CAAG,eAAA,EAAiB,QAAQ,CAAA;AAAA,QACzC,OAAA,EAAS;AAAA;AAAA;AACX,GAAA,EACF,CAAA;AAEJ","file":"chunk-WML2RLDF.js","sourcesContent":["import * as React from 'react'\nimport { Check, Sparkles } from 'lucide-react'\nimport { cn } from '../../lib/cn'\n\n// A plan feature string prefixed with `*` renders highlighted (Sparkles +\n// primary, medium weight) — the config-side seam for \"hero\" features like the\n// AI assistant. Shared by UpgradePrompt, PlanSelector and SubscriptionPage.\n\nexport function parsePlanFeature(feature: string): { label: string; highlighted: boolean } {\n return feature.startsWith('*')\n ? { label: feature.slice(1).trim(), highlighted: true }\n : { label: feature, highlighted: false }\n}\n\nexport function PlanFeatureItem({ feature, className, iconClassName }: {\n feature: string\n className?: string\n iconClassName?: string\n}) {\n const { label, highlighted } = parsePlanFeature(feature)\n return (\n <li className={cn('flex items-start gap-2', className, highlighted && 'font-medium text-primary')}>\n {highlighted ? (\n <Sparkles className={cn('mt-0.5 shrink-0 text-primary', iconClassName)} aria-hidden=\"true\" />\n ) : (\n <Check className={cn('mt-0.5 shrink-0 text-primary', iconClassName)} aria-hidden=\"true\" />\n )}\n <span>{label}</span>\n </li>\n )\n}\n","import type { LimitDeclaration, RegisteredEntity } from '@fayz-ai/core'\nimport { invalidateCount } from '@fayz-ai/core'\n\n/**\n * Module-level registry bridging React (the provider that knows the declarations)\n * and the plain `invalidateLimit(key)` function that create handlers call outside\n * any component. The AccessProvider publishes the merged declarations here on\n * mount; `useLimit`/`useLimitGuard` and `invalidateLimit` read from it.\n */\n\n/**\n * Shell built-in limit declarations. Unlike plugin/app limits (contributed via\n * `PluginManifest.declaredLimits` / `billing.limitDeclarations`), these count\n * core tenant tables that have no owning plugin: seats and units. Merged as the\n * LOWEST-priority layer by the AccessProvider, so a plugin or app may still\n * override a key (e.g. add a `kindFilter`).\n *\n * Counted through the public `v_*` bridges, not the base tables: the spine\n * moved memberships and units into schema `app`, which PostgREST cannot reach.\n */\nexport const CORE_LIMIT_DECLARATIONS: LimitDeclaration[] = [\n { key: 'users', label: 'Users', table: 'v_team_members' },\n { key: 'locations', label: 'Locations', table: 'v_units' },\n]\n\n/**\n * Entity-derived layer of the limit merge: any registered CRUD entity carrying\n * `limitKey` yields a declaration for free from its own data mapping (table +\n * archetype kind) — a cap without a countable binding is a dead cap. Shared by\n * the AccessProvider (live registry) and the manifest derivation (agent\n * contract), so both resolve the identical layer.\n */\nexport function entityDerivedLimitDeclarations(entities: RegisteredEntity[]): LimitDeclaration[] {\n const out: LimitDeclaration[] = []\n for (const e of entities) {\n const def = e.entityDef\n if (def?.limitKey && def.data?.table) {\n out.push({\n key: def.limitKey,\n label: e.labelPlural,\n table: def.data.table,\n kindFilter: def.data.archetypeKind,\n })\n }\n }\n return out\n}\n\nlet registry = new Map<string, LimitDeclaration>()\n\n/** Called by AccessProvider whenever the merged limit declarations change. */\nexport function setLimitRegistry(declarations: LimitDeclaration[]): void {\n const next = new Map<string, LimitDeclaration>()\n for (const decl of declarations) next.set(decl.key, decl)\n registry = next\n}\n\nexport function getLimitDeclaration(key: string): LimitDeclaration | undefined {\n return registry.get(key)\n}\n\n// --- Invalidation pub/sub -------------------------------------------------\n// useLimit subscribes per key; invalidateLimit(key) drops the cached count for\n// the declaration's table and notifies subscribers to re-fetch.\n\nconst listeners = new Map<string, Set<() => void>>()\n\nexport function subscribeLimit(key: string, cb: () => void): () => void {\n let set = listeners.get(key)\n if (!set) {\n set = new Set()\n listeners.set(key, set)\n }\n set.add(cb)\n return () => {\n set?.delete(cb)\n if (set && set.size === 0) listeners.delete(key)\n }\n}\n\n/**\n * Invalidate a limit after a create/delete so its next read is fresh, then wake\n * any mounted `useLimit(key)`. Safe to call from plain handlers (no React).\n */\nexport function invalidateLimit(key: string): void {\n const decl = registry.get(key)\n if (decl) invalidateCount(decl.table)\n listeners.get(key)?.forEach((cb) => cb())\n}\n","import { create } from 'zustand'\n\n/**\n * Payload describing WHY the upgrade modal opened, so the visual component (owned\n * by the shell/gates layer) can tailor its copy — a hit quantity cap\n * (`limitKey`) or a plan-gated feature (`feature`).\n */\nexport interface UpgradeModalPayload {\n limitKey?: string\n feature?: string\n}\n\nexport interface UpgradeModalStore {\n /** The active payload, or null when closed. */\n current: UpgradeModalPayload | null\n open(payload: UpgradeModalPayload): void\n close(): void\n}\n\n/**\n * Global, lightweight store for the single app-wide UpgradeModal. `useLimitGuard`\n * and imperative create handlers call `open(...)` when a limit blocks; the visual\n * modal (rendered once near the shell root by the gates layer) subscribes to\n * `current`. Kept as a zustand singleton so store + component share one instance.\n */\nexport const useUpgradeModalStore = create<UpgradeModalStore>((set) => ({\n current: null,\n open: (payload) => set({ current: payload }),\n close: () => set({ current: null }),\n}))\n","import * as React from 'react'\nimport type { LimitDeclaration, PermissionAction, Plan } from '@fayz-ai/core'\nimport { countByTenant, usePluginRuntimeOptional, getAllEntities } from '@fayz-ai/core'\nimport { useAuthStore } from '@fayz-ai/auth'\nimport { useOrganizationStore } from '../org/store'\nimport { usePermissionsStore } from '../permissions/store'\nimport { useBillingStore } from '../billing/store'\nimport { effectivePlan, useTrial } from '../billing/trial'\nimport { mergeLimitDeclarations } from '@fayz-ai/core/access'\nimport { resolveAccess, isEntitledByPlan, resolveLimit } from './resolver'\nimport { entityDerivedLimitDeclarations } from './limits-registry'\nimport { setLimitRegistry, getLimitDeclaration, subscribeLimit, CORE_LIMIT_DECLARATIONS } from './limits-registry'\nimport { useUpgradeModalStore } from './upgrade-modal-store'\nimport type { AccessApi, AccessDecision, AccessSession, LimitState } from './types'\n\n// ---------------------------------------------------------------------------\n// Context\n// ---------------------------------------------------------------------------\n\ninterface AccessContextValue extends AccessApi {\n session: AccessSession\n}\n\nconst AccessContext = React.createContext<AccessContextValue | null>(null)\n\n// ---------------------------------------------------------------------------\n// Provider\n// ---------------------------------------------------------------------------\n\nexport interface AccessProviderProps {\n children: React.ReactNode\n /**\n * App-level limit declarations layered ON TOP of the plugins' `declaredLimits`\n * (app wins on key collision). Sourced from `config.billing.limitDeclarations`.\n */\n limitDeclarations?: LimitDeclaration[]\n /** Plan the tenant is entitled to while its trial runs. See billing/trial.ts. */\n trialPlanId?: string\n}\n\n/**\n * Assembles the reactive {@link AccessSession} from the singleton stores and\n * exposes the composed access API (role × plan). Thin by design — mounts just\n * inside PermissionsProvider so it can reuse the live permission profile and the\n * plugin runtime. Also publishes the merged limit declarations to the module\n * registry so `invalidateLimit` works from non-React create handlers.\n */\nexport function AccessProvider({ children, limitDeclarations, trialPlanId }: AccessProviderProps) {\n const user = useAuthStore((s) => s.user)\n const org = useOrganizationStore((s) => s.currentOrg)\n const profile = usePermissionsStore((s) => s.currentProfile)\n const plans = useBillingStore((s) => s.plans)\n\n const runtime = usePluginRuntimeOptional()\n const pluginLimits = runtime?.pluginLimits\n\n // Merge limit declarations by priority (later wins by key): shell built-ins\n // (users/locations) < entity-derived < plugin `declaredLimits` < app\n // overrides. Then publish to the module registry consumed by\n // invalidateLimit / the limit hooks.\n //\n // Entity-derived: any registered CRUD entity carrying `limitKey` yields a\n // declaration for free from its own data mapping (table + archetype kind) —\n // this is what makes an app's `EntityDef.limitKey: 'clients'` enforceable\n // with ZERO extra wiring (a cap without a countable binding is a dead cap).\n React.useEffect(() => {\n setLimitRegistry(\n mergeLimitDeclarations(\n CORE_LIMIT_DECLARATIONS,\n entityDerivedLimitDeclarations(getAllEntities()),\n pluginLimits,\n limitDeclarations,\n ),\n )\n }, [pluginLimits, limitDeclarations])\n\n // The trial is resolved HERE and nowhere else: it changes which plan's\n // entitlements apply, and every gate in the product already reads that. A\n // per-feature \"…or on trial\" check would have to be repeated in the nav, the\n // gates, the caps and the assistant, and one of them would be forgotten.\n const trial = useTrial()\n const plan: Plan | null = React.useMemo(\n () => effectivePlan(org, plans, trial, trialPlanId),\n [plans, org?.plan, trial.status, trialPlanId],\n )\n\n const session: AccessSession = React.useMemo(\n () => ({ user, org, profile, plan }),\n [user, org, profile, plan],\n )\n\n const value = React.useMemo<AccessContextValue>(\n () => ({\n session,\n can: (feature, action) => resolveAccess(session, feature, action),\n entitled: (feature) => isEntitledByPlan(session.plan, feature),\n }),\n [session],\n )\n\n return <AccessContext.Provider value={value}>{children}</AccessContext.Provider>\n}\nAccessProvider.displayName = 'AccessProvider'\n\n// ---------------------------------------------------------------------------\n// Hooks\n// ---------------------------------------------------------------------------\n\nconst ALLOW_ALL: AccessApi = {\n can: () => ({ allowed: true }),\n entitled: () => true,\n}\n\n/**\n * The composed access API. Throws outside <AccessProvider> — use\n * {@link useAccessOptional} for SDK components that must degrade gracefully.\n */\nexport function useAccess(): AccessApi {\n const ctx = React.useContext(AccessContext)\n if (!ctx) throw new Error('useAccess must be used inside <AccessProvider>')\n return { can: ctx.can, entitled: ctx.entitled }\n}\n\n/**\n * Like {@link useAccess} but degrades to allow-all when no provider is mounted,\n * so components stay usable under a bare host shell (gating is an enhancement).\n */\nexport function useAccessOptional(): AccessApi {\n const ctx = React.useContext(AccessContext)\n return ctx ? { can: ctx.can, entitled: ctx.entitled } : ALLOW_ALL\n}\n\n/** Internal: the live session (for hooks that need tenant/plan directly). */\nfunction useAccessSession(): AccessSession | null {\n return React.useContext(AccessContext)?.session ?? null\n}\n\n// ---------------------------------------------------------------------------\n// Limits\n// ---------------------------------------------------------------------------\n\nfunction resolveCap(plan: Plan | null, key: string): number | undefined {\n return plan?.entitlements?.limits?.[key]\n}\n\n/**\n * Live usage of a quantity limit for the active tenant. Resolves the limit's\n * declaration (plugin manifest or app override) → a tenant-scoped `count(*)`,\n * capped by the current plan. No declaration or no cap (or `-1`) ⇒ unlimited.\n * Re-fetches when the tenant, plan cap, or an `invalidateLimit(key)` fires.\n */\nexport function useLimit(key: string): LimitState {\n const session = useAccessSession()\n const tenantId = session?.org?.id\n const cap = resolveCap(session?.plan ?? null, key)\n const declaration = getLimitDeclaration(key)\n\n const unlimited = !declaration || cap === undefined || cap === -1\n\n const [used, setUsed] = React.useState(0)\n const [loading, setLoading] = React.useState(!unlimited)\n const [version, setVersion] = React.useState(0)\n\n const refresh = React.useCallback(() => setVersion((v) => v + 1), [])\n\n // Wake on external invalidation (a create/delete elsewhere).\n React.useEffect(() => subscribeLimit(key, refresh), [key, refresh])\n\n React.useEffect(() => {\n if (unlimited || !declaration || !tenantId) {\n setUsed(0)\n setLoading(false)\n return\n }\n let active = true\n setLoading(true)\n countByTenant(declaration.table, {\n kind: declaration.kindFilter,\n period: declaration.period,\n tenantId,\n fresh: version > 0,\n })\n .then((n) => {\n if (active) {\n setUsed(n)\n setLoading(false)\n }\n })\n .catch(() => {\n if (active) setLoading(false)\n })\n return () => {\n active = false\n }\n }, [unlimited, declaration, tenantId, version])\n\n const bounds = resolveLimit({ cap, hasDeclaration: Boolean(declaration), used })\n\n return { key, ...bounds, loading, refresh }\n}\n\n/**\n * Imperative guard for create handlers: `await guard(n)` returns `'ok'` when\n * adding `n` more rows stays within the cap, or `'blocked'` (and opens the global\n * UpgradeModal) when it would exceed it. Always checks a FRESH count so it never\n * relies on stale hook state.\n */\nexport function useLimitGuard(key: string): (n?: number) => Promise<'ok' | 'blocked'> {\n const session = useAccessSession()\n const tenantId = session?.org?.id\n const plan = session?.plan ?? null\n const openModal = useUpgradeModalStore((s) => s.open)\n\n return React.useCallback(\n async (n = 1) => {\n const cap = resolveCap(plan, key)\n const declaration = getLimitDeclaration(key)\n // Unlimited / no declaration / no tenant ⇒ never block.\n if (!declaration || cap === undefined || cap === -1 || !tenantId) return 'ok'\n\n const used = await countByTenant(declaration.table, {\n kind: declaration.kindFilter,\n period: declaration.period,\n tenantId,\n fresh: true,\n })\n\n if (used + n > cap) {\n openModal({ limitKey: key })\n return 'blocked'\n }\n return 'ok'\n },\n [key, plan, tenantId, openModal],\n )\n}\n","import type { PermissionAction, Plan } from '@fayz-ai/core'\nimport { countByTenant } from '@fayz-ai/core'\nimport { resolveAccess, agentDenial, type AgentGuardResult } from '@fayz-ai/core/access'\nimport { useAuthStore } from '@fayz-ai/auth'\nimport { useOrganizationStore } from '../org/store'\nimport { usePermissionsStore } from '../permissions/store'\nimport { useBillingStore } from '../billing/store'\nimport { getLimitDeclaration } from './limits-registry'\nimport type { AccessSession } from './types'\n\n// ---------------------------------------------------------------------------\n// Headless access — the imperative counterpart of useAccess()/useLimitGuard()\n// for runtimes without React: the agent's client-plane tool executor, command\n// handlers, background sync. Reads the SAME singleton stores the providers\n// hydrate, and decides with the SAME engine (@fayz-ai/core/access), so a\n// decision here never diverges from what the UI shows.\n//\n// Denials come back as the structured AgentDenial (never a silent failure) so\n// an agent can explain the denial and offer the upgrade conversationally.\n// ---------------------------------------------------------------------------\n\n/**\n * Snapshot of the live session assembled from the singleton stores — the same\n * assembly AccessProvider does reactively. Values are as-hydrated: before\n * AuthProvider/OrgProvider finish, fields are null, and an unresolved profile\n * DENIES — same semantics as the providers.\n */\nexport function getAccessSnapshot(): AccessSession {\n const user = useAuthStore.getState().user\n const org = useOrganizationStore.getState().currentOrg\n const profile = usePermissionsStore.getState().currentProfile\n const plans = useBillingStore.getState().plans\n const plan: Plan | null = org?.plan ? plans.find((p) => p.id === org.plan) ?? null : null\n return { user, org, profile, plan }\n}\n\n/** Imperative role × plan check over the live snapshot. */\nexport function checkAccess(feature: string, action?: PermissionAction): AgentGuardResult {\n const session = getAccessSnapshot()\n const decision = resolveAccess(session, feature, action)\n if (decision.allowed) return { allowed: true }\n return agentDenial(decision.reason ?? 'role')\n}\n\n/**\n * Imperative plan-limit guard: would adding `n` rows exceed the cap for\n * `key`? Counts FRESH (never trusts stale hook state), mirrors useLimitGuard.\n * No declaration / no cap / `-1` / no tenant ⇒ allowed. Does NOT open the\n * UpgradeModal — the caller decides how to surface the denial (an agent turns\n * it into a conversational upgrade prompt).\n */\nexport async function guardLimit(key: string, n = 1): Promise<AgentGuardResult> {\n const session = getAccessSnapshot()\n const tenantId = session.org?.id\n const cap = session.plan?.entitlements?.limits?.[key]\n const declaration = getLimitDeclaration(key)\n\n if (!declaration || cap === undefined || cap === -1 || !tenantId) return { allowed: true }\n\n const used = await countByTenant(declaration.table, {\n kind: declaration.kindFilter,\n period: declaration.period,\n tenantId,\n fresh: true,\n })\n\n if (used + n > cap) {\n return agentDenial('limit', { key, max: cap, used })\n }\n return { allowed: true }\n}\n","import * as React from 'react'\nimport type { ModuleNavItem } from '@fayz-ai/ui'\nimport { usePermissionsStore } from '../permissions/store'\nimport { useAccessOptional } from './context'\nimport type { AccessApi } from './types'\n\n// ---------------------------------------------------------------------------\n// useModuleNavAccess — the LINK-side counterpart of EntitlementGate for a\n// plugin's INTERNAL navigation (ModulePage sub-nav). Mirrors the top-level\n// Sidebar/AdminShell rule so a premium sub-module link reads identically:\n//\n// • role denies (can(feature,'read').reason === 'role') → REMOVE the link\n// • plan denies (entitled(feature) === false) → keep, premium:true\n// (the click still navigates; the gated CONTENT shows the\n// UpgradePrompt via EntitlementGate)\n// • otherwise → keep as-is\n//\n// A feature id ABSENT from the RBAC catalog is treated as \"default allow\": the\n// role axis is skipped entirely for it (an undeclared feature can't be a role\n// denial), so apps that wire the plugin without declaring the sub-feature don't\n// lose the link. The plan axis is naturally safe already — `entitled` returns\n// true for any feature a plan never disables.\n//\n// Recursive over `children`. Degrades to allow-all when no <AccessProvider> is\n// mounted (bare host shell), exactly like `useAccessOptional`.\n// ---------------------------------------------------------------------------\n\n/**\n * Pure decoration used by {@link useModuleNavAccess}. Kept store-free so it is\n * directly unit-testable: pass the composed {@link AccessApi} and the set of\n * feature ids known to the RBAC catalog.\n */\nexport function applyNavAccess(\n items: ModuleNavItem[],\n access: AccessApi,\n knownFeatures: Set<string>,\n): ModuleNavItem[] {\n const decorate = (item: ModuleNavItem): ModuleNavItem | null => {\n const children = item.children\n ? item.children\n .map(decorate)\n .filter((c): c is ModuleNavItem => c !== null)\n : undefined\n\n if (!item.feature) {\n return children ? { ...item, children } : item\n }\n\n // Role axis — only meaningful for a feature the RBAC catalog actually\n // declares. An undeclared feature defaults to allow (never removed).\n if (knownFeatures.has(item.feature)) {\n const decision = access.can(item.feature, 'read')\n if (!decision.allowed && decision.reason === 'role') return null\n }\n\n // Plan axis — `entitled` is `false` only on an explicit plan denial; absent\n // features stay entitled, so no Crown appears for them.\n const premium = access.entitled(item.feature) === false\n\n return children ? { ...item, premium, children } : { ...item, premium }\n }\n\n return items.map(decorate).filter((i): i is ModuleNavItem => i !== null)\n}\n\n/**\n * Resolve a plugin's internal nav against role × plan: hides role-denied links,\n * badges plan-denied ones with a Crown (`premium`), and passes everything else\n * through unchanged. Recursive over children.\n */\nexport function useModuleNavAccess(items: ModuleNavItem[]): ModuleNavItem[] {\n const access = useAccessOptional()\n const features = usePermissionsStore((s) => s.features)\n const knownFeatures = React.useMemo(\n () => new Set(features.map((f) => f.id)),\n [features],\n )\n return React.useMemo(\n () => applyNavAccess(items, access, knownFeatures),\n [items, access, knownFeatures],\n )\n}\n","// ---------------------------------------------------------------------------\n// access-contract — the single import seam the billing UI uses for the\n// entitlements engine (UpgradePrompt, UpgradeModal, EntitlementGate, LimitGate,\n// SoftLimitWidget, the AdminShell route guard / nav badge, SubscriptionPage\n// matrix). Re-exports the core access engine (packages/saas/src/access) so the\n// billing layer has ONE stable path and the wiring (AccessProvider) stays in the\n// núcleo. `getPlanEntitlements` is a thin local reader — core's Plan carries the\n// entitlements, so this just narrows the access.\n//\n// (History: this file shipped as a temporary stub while the access engine landed\n// in parallel; now repointed to the real module. The public names/types below\n// match the fixed contract, so no billing-wave consumer changed.)\n// ---------------------------------------------------------------------------\nimport type { Plan, PlanEntitlements } from '@fayz-ai/core'\n\nexport {\n useAccessOptional,\n useLimit,\n useLimitGuard,\n invalidateLimit,\n useUpgradeModalStore,\n} from '../../access'\n\nexport type { AccessApi, AccessDecision } from '../../access'\n// The billing layer refers to the limit shape as `LimitInfo`; the engine calls\n// it `LimitState`. Same structure — alias to keep call sites stable.\nexport type { LimitState as LimitInfo } from '../../access'\nexport type { PlanEntitlements } from '@fayz-ai/core'\n\n/** Narrow a plan to its entitlements (undefined when the plan declares none). */\nexport function getPlanEntitlements(plan: Plan | undefined | null): PlanEntitlements | undefined {\n return plan?.entitlements\n}\n\n/**\n * Clean a feature's raw permission label into a display name for the upgrade\n * surfaces. Feature labels in an app's permissions config carry an access-scope\n * suffix — e.g. \"Marketing (acesso)\" / \"Reports (access)\" — which reads as noise\n * when interpolated into a headline (\"Unlock Marketing (acesso)\"). Strip a single\n * trailing parenthetical group and collapse surrounding whitespace. Shared by\n * UpgradePrompt AND UpgradeModal so the two surfaces stay in lockstep.\n */\nexport function featureDisplayName(label: string | null | undefined): string {\n if (!label) return ''\n return label.replace(/\\s*\\([^)]*\\)\\s*$/, '').trim() || label.trim()\n}\n\n/**\n * Which ISO-4217 code to price a plan in. `Plan.currency` is the source of\n * truth, but apps DO ship billing configs that omit it — and silently printing\n * \"$79\" to a tenant billed in reais is worse than any other failure mode here.\n * So the fallback follows the ACTIVE LOCALE's region rather than a hardcoded\n * 'USD'; only a locale we can't place at all lands on USD.\n */\nconst CURRENCY_BY_REGION: Record<string, string> = {\n BR: 'BRL', PT: 'EUR', ES: 'EUR', FR: 'EUR', DE: 'EUR', IT: 'EUR', NL: 'EUR', IE: 'EUR',\n GB: 'GBP', US: 'USD', CA: 'CAD', AU: 'AUD', MX: 'MXN', AR: 'ARS', CL: 'CLP', CO: 'COP',\n}\n\nexport function resolvePlanCurrency(planCurrency: string | undefined, locale: string | undefined): string {\n if (planCurrency) return planCurrency\n const region = locale?.split(/[-_]/)[1]?.toUpperCase()\n return (region && CURRENCY_BY_REGION[region]) || 'USD'\n}\n","import * as React from 'react'\nimport { Crown, Check, Minus, Sparkles } from 'lucide-react'\nimport { PlanFeatureItem, parsePlanFeature } from './plan-feature'\nimport { Button, Badge, Card, CardContent, CardHeader, ConfirmDialog, toast } from '@fayz-ai/ui'\nimport type { Plan } from '@fayz-ai/core'\nimport { cn } from '../../lib/cn'\nimport { useTranslation } from '../../hooks/useTranslation'\nimport { useBillingStore } from '../../stores/billing.store'\nimport { resolvePlanBadge } from '../../billing/plan-badge'\nimport { useTenantOptional, useOrgAdapterOptional } from '../../org/context'\nimport { useOrganizationStore } from '../../org/store'\nimport { usePermissionsStore } from '../../permissions'\nimport { getPlanEntitlements } from './access-contract'\n\n// ---------------------------------------------------------------------------\n// SubscriptionPage — the shell's self-serve subscription surface. Present as the\n// /settings/subscription tab whenever `config.billing` is configured. Reads the\n// plans seeded into the billing store from config, resolves the current plan\n// from `currentOrg.plan`, and changes plan via the checkout seam (Stripe/Pix) or,\n// when no seam is configured, an optimistic `adapter.updateOrg(orgId, { plan })`.\n// ---------------------------------------------------------------------------\n\nfunction formatPrice(plan: Plan, tr: (k: string, f: string) => string): string {\n if (plan.price <= 0) return tr('billing.free', 'Free')\n try {\n const isInteger = Number.isInteger(plan.price)\n return new Intl.NumberFormat(undefined, {\n style: 'currency',\n currency: plan.currency || 'USD',\n minimumFractionDigits: isInteger ? 0 : 2,\n }).format(plan.price)\n } catch {\n return `${plan.currency || ''} ${plan.price}`.trim()\n }\n}\n\nfunction intervalSuffix(plan: Plan, tr: (k: string, f: string) => string): string {\n if (plan.price <= 0) return ''\n return plan.interval === 'year'\n ? tr('billing.perYear', '/yr')\n : tr('billing.perMonth', '/mo')\n}\n\nexport function SubscriptionPage({ className }: { className?: string }) {\n const { t } = useTranslation()\n const tr = (key: string, fallback: string) => {\n const v = t(key)\n return !v || v === key ? fallback : v\n }\n\n const plans = useBillingStore((s) => s.plans)\n const checkout = useBillingStore((s) => s.checkout)\n const tenant = useTenantOptional()\n const adapter = useOrgAdapterOptional()\n const setCurrentOrg = useOrganizationStore((s) => s.setCurrentOrg)\n const currentOrg = useOrganizationStore((s) => s.currentOrg)\n\n const currentPlanId = currentOrg?.plan || 'free'\n const currentBadge = resolvePlanBadge(currentPlanId, plans)\n const currentPlan = plans.find((p) => p.id === currentPlanId)\n\n const [pending, setPending] = React.useState<Plan | null>(null)\n const [busy, setBusy] = React.useState(false)\n\n // Feature matrix — union of every plan's features, order-preserved.\n const allFeatures = React.useMemo(() => {\n const seen = new Set<string>()\n const out: string[] = []\n for (const plan of plans) {\n for (const f of plan.features) {\n if (!seen.has(f)) {\n seen.add(f)\n out.push(f)\n }\n }\n }\n return out\n }, [plans])\n\n // Real entitlements matrix — derived from plan.entitlements when any plan\n // declares them. Feature rows show ✓/— per plan; limit rows show \"Up to N\" /\n // \"Unlimited\". Falls back to the marketing-bullet matrix (allFeatures) below\n // when no plan carries entitlements.\n const featureCatalog = usePermissionsStore((s) => s.features)\n const entitlementsMatrix = React.useMemo(() => {\n const hasAny = plans.some((p) => getPlanEntitlements(p))\n if (!hasAny) return null\n\n const featureIds: string[] = []\n const featureSeen = new Set<string>()\n const limitKeys: string[] = []\n const limitSeen = new Set<string>()\n for (const plan of plans) {\n const ent = getPlanEntitlements(plan)\n for (const id of Object.keys(ent?.features ?? {})) {\n if (!featureSeen.has(id)) { featureSeen.add(id); featureIds.push(id) }\n }\n for (const key of Object.keys(ent?.limits ?? {})) {\n if (!limitSeen.has(key)) { limitSeen.add(key); limitKeys.push(key) }\n }\n }\n if (featureIds.length === 0 && limitKeys.length === 0) return null\n\n const labelForFeature = (id: string) => featureCatalog.find((f) => f.id === id)?.label ?? id\n const labelForLimit = (key: string) => {\n const v = t(`limit.label.${key}`)\n return !v || v === `limit.label.${key}` ? key : v\n }\n return { featureIds, limitKeys, labelForFeature, labelForLimit }\n }, [plans, featureCatalog, t])\n\n async function applyChange(plan: Plan) {\n setBusy(true)\n try {\n // Seam: a configured gateway (Stripe/Pix) owns the transition; the webhook\n // is the source of truth for the persisted plan, so we don't mutate here.\n if (checkout) {\n await checkout(plan.id)\n setPending(null)\n return\n }\n // No gateway: optimistic org update. Persist + swap the store so the plan\n // badge and CTAs re-render immediately.\n if (adapter && currentOrg) {\n const updated = await adapter.updateOrg(currentOrg.id, { plan: plan.id })\n setCurrentOrg(updated)\n } else if (currentOrg) {\n setCurrentOrg({ ...currentOrg, plan: plan.id })\n }\n toast.success(\n tr('billing.planChanged', 'Plan updated').replace('{{plan}}', plan.name),\n )\n setPending(null)\n } catch {\n toast.error(tr('billing.planChangeFailed', \"Couldn't change your plan. Please try again.\"))\n } finally {\n setBusy(false)\n }\n }\n\n if (plans.length === 0) {\n return (\n <div className={className ?? 'mx-auto max-w-5xl'}>\n <p className=\"text-sm text-muted-foreground\">\n {tr('billing.noPlans', 'No plans are configured.')}\n </p>\n </div>\n )\n }\n\n return (\n <div className={className ?? 'mx-auto max-w-5xl space-y-8'}>\n {/* Sem título nem descrição: a barra já escreve \"Assinatura\", e a frase\n embaixo custava uma linha para repetir o que os planos mostram. */}\n\n {/* Current plan highlight */}\n <Card\n className={cn(\n 'relative overflow-hidden',\n currentBadge.paid && 'border-amber-400/60 bg-gradient-to-br from-amber-50/60 to-transparent dark:from-amber-950/20',\n )}\n >\n <CardContent className=\"flex flex-wrap items-center justify-between gap-4 p-6\">\n <div className=\"flex items-center gap-4\">\n <div\n className={cn(\n 'flex h-12 w-12 shrink-0 items-center justify-center rounded-xl',\n currentBadge.paid ? 'bg-amber-400/20 text-amber-600 dark:text-amber-400' : 'bg-muted text-muted-foreground',\n )}\n >\n {currentBadge.paid ? <Crown className=\"h-6 w-6\" /> : <Sparkles className=\"h-6 w-6\" />}\n </div>\n <div>\n <p className=\"text-xs font-medium uppercase tracking-wide text-muted-foreground\">\n {tr('billing.currentPlan', 'Current Plan')}\n </p>\n <div className=\"flex items-center gap-2\">\n <span className=\"text-xl font-bold\">{currentBadge.label}</span>\n {currentBadge.paid && (\n // Paid marker only — a literal \"Pro\" here was misleading next\n // to non-Pro paid tiers (\"Starter / Pro\", QA finding).\n <Badge\n aria-label={tr('billing.paidPlan', 'Paid plan')}\n className=\"border-amber-400/40 bg-amber-400/15 text-amber-700 dark:text-amber-300\"\n >\n <Crown className=\"h-3 w-3\" />\n </Badge>\n )}\n </div>\n </div>\n </div>\n {currentPlan && (\n <div className=\"text-right\">\n <span className=\"text-2xl font-bold\">{formatPrice(currentPlan, tr)}</span>\n <span className=\"text-sm text-muted-foreground\">{intervalSuffix(currentPlan, tr)}</span>\n </div>\n )}\n </CardContent>\n </Card>\n\n {/* Plan cards */}\n <div className=\"grid gap-6 md:grid-cols-2 lg:grid-cols-3\">\n {plans.map((plan) => {\n const isCurrent = plan.id === currentPlanId\n const paid = plan.price > 0\n return (\n <Card\n key={plan.id}\n className={cn(\n 'relative flex flex-col',\n plan.highlighted && 'border-primary shadow-md',\n isCurrent && 'ring-2 ring-primary/40',\n )}\n >\n {plan.highlighted && (\n <div className=\"absolute -top-3 left-1/2 -translate-x-1/2\">\n <Badge>\n <Crown className=\"mr-1 h-3 w-3\" />\n {tr('billing.mostPopular', 'Most Popular')}\n </Badge>\n </div>\n )}\n <CardHeader className=\"pb-0\">\n <div className=\"flex items-center gap-2\">\n <h3 className=\"text-xl font-semibold\">{plan.name}</h3>\n {paid && <Crown className=\"h-4 w-4 text-amber-500\" />}\n </div>\n {plan.description && (\n <p className=\"text-sm text-muted-foreground\">{plan.description}</p>\n )}\n </CardHeader>\n <CardContent className=\"flex flex-1 flex-col pt-4\">\n <div className=\"mb-6\">\n <span className=\"text-4xl font-bold\">{formatPrice(plan, tr)}</span>\n <span className=\"text-muted-foreground\">{intervalSuffix(plan, tr)}</span>\n </div>\n <ul className=\"mb-6 flex-1 space-y-3\">\n {plan.features.map((feature) => (\n <PlanFeatureItem key={feature} feature={feature} className=\"text-sm\" iconClassName=\"h-4 w-4\" />\n ))}\n </ul>\n {isCurrent ? (\n <Button variant=\"outline\" className=\"w-full\" disabled>\n {tr('billing.currentPlan', 'Current Plan')}\n </Button>\n ) : (\n <Button\n className=\"w-full\"\n variant={plan.highlighted ? 'default' : 'outline'}\n onClick={() => setPending(plan)}\n >\n {tr('billing.changeToPlan', 'Switch to this plan')}\n </Button>\n )}\n </CardContent>\n </Card>\n )\n })}\n </div>\n\n {/* Feature matrix */}\n {(entitlementsMatrix || allFeatures.length > 0) && (\n <div className=\"space-y-3\">\n <h2 className=\"text-lg font-semibold\">\n {tr('billing.featureMatrix', 'Feature comparison')}\n </h2>\n <div className=\"overflow-x-auto rounded-lg border\">\n <table className=\"w-full border-collapse text-sm\">\n <thead>\n <tr className=\"border-b bg-muted/40\">\n <th className=\"px-4 py-3 text-left font-medium\">\n {tr('billing.features', 'Features')}\n </th>\n {plans.map((plan) => (\n <th key={plan.id} className=\"px-4 py-3 text-center font-medium\">\n <span className=\"inline-flex items-center gap-1\">\n {plan.price > 0 && <Crown className=\"h-3.5 w-3.5 text-amber-500\" />}\n {plan.name}\n </span>\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {entitlementsMatrix ? (\n <>\n {entitlementsMatrix.featureIds.map((id, i) => (\n <tr key={`f:${id}`} className={cn(i % 2 === 1 && 'bg-muted/20')}>\n <td className=\"px-4 py-2.5 text-left\">{entitlementsMatrix.labelForFeature(id)}</td>\n {plans.map((plan) => {\n const entitled = getPlanEntitlements(plan)?.features?.[id] !== false\n return (\n <td key={plan.id} className=\"px-4 py-2.5 text-center\">\n {entitled ? (\n <Check className=\"mx-auto h-4 w-4 text-primary\" />\n ) : (\n <Minus className=\"mx-auto h-4 w-4 text-muted-foreground/40\" />\n )}\n </td>\n )\n })}\n </tr>\n ))}\n {entitlementsMatrix.limitKeys.map((key, i) => (\n <tr key={`l:${key}`} className={cn((entitlementsMatrix.featureIds.length + i) % 2 === 1 && 'bg-muted/20')}>\n <td className=\"px-4 py-2.5 text-left\">{entitlementsMatrix.labelForLimit(key)}</td>\n {plans.map((plan) => {\n const cap = getPlanEntitlements(plan)?.limits?.[key]\n const cell =\n cap === undefined\n ? '—'\n : cap < 0\n ? tr('billing.unlimited', 'Unlimited')\n : tr('billing.upTo', 'Up to {count}').replace('{count}', String(cap)).replace('{{count}}', String(cap))\n return (\n <td key={plan.id} className=\"px-4 py-2.5 text-center text-muted-foreground\">\n {cell}\n </td>\n )\n })}\n </tr>\n ))}\n </>\n ) : (\n allFeatures.map((feature, i) => (\n <tr key={feature} className={cn(i % 2 === 1 && 'bg-muted/20')}>\n <td className=\"px-4 py-2.5 text-left\">{parsePlanFeature(feature).label}</td>\n {plans.map((plan) => (\n <td key={plan.id} className=\"px-4 py-2.5 text-center\">\n {plan.features.includes(feature) ? (\n <Check className=\"mx-auto h-4 w-4 text-primary\" />\n ) : (\n <Minus className=\"mx-auto h-4 w-4 text-muted-foreground/40\" />\n )}\n </td>\n ))}\n </tr>\n ))\n )}\n </tbody>\n </table>\n </div>\n </div>\n )}\n\n {/* Change-plan confirm */}\n <ConfirmDialog\n open={pending !== null}\n onConfirm={() => pending && void applyChange(pending)}\n onCancel={() => setPending(null)}\n title={tr('billing.changePlanConfirmTitle', 'Change plan?')}\n description={\n pending\n ? tr('billing.changePlanConfirmBody', \"You're switching to the {{plan}} plan.\").replace('{{plan}}', pending.name)\n : undefined\n }\n confirmLabel={tr('billing.changePlanConfirm', 'Switch plan')}\n cancelLabel={tr('common.cancel', 'Cancel')}\n loading={busy}\n />\n </div>\n )\n}\n"]}
|
|
1
|
+
{"version":3,"sources":["../src/components/billing/plan-feature.tsx","../src/access/limits-registry.ts","../src/access/upgrade-modal-store.ts","../src/access/context.tsx","../src/access/headless.ts","../src/access/module-nav.ts","../src/components/billing/access-contract.ts","../src/components/billing/SubscriptionPage.tsx"],"names":["jsx","useAuthStore","resolveAccess","countByTenant","React2","React3","jsxs","Sparkles","Check"],"mappings":";;;;;;;;;;;;;;;AAQO,SAAS,iBAAiB,OAAA,EAA0D;AACzF,EAAA,OAAO,QAAQ,UAAA,CAAW,GAAG,IACzB,EAAE,KAAA,EAAO,QAAQ,KAAA,CAAM,CAAC,EAAE,IAAA,EAAK,EAAG,aAAa,IAAA,EAAK,GACpD,EAAE,KAAA,EAAO,OAAA,EAAS,aAAa,KAAA,EAAM;AAC3C;AAEO,SAAS,eAAA,CAAgB,EAAE,OAAA,EAAS,SAAA,EAAW,eAAc,EAIjE;AACD,EAAA,MAAM,EAAE,KAAA,EAAO,WAAA,EAAY,GAAI,iBAAiB,OAAO,CAAA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Sparkles } from 'lucide-react'\nimport { cn } from '../../lib/cn'\n\n// A plan feature string prefixed with `*` renders highlighted (Sparkles +\n// primary, medium weight) — the config-side seam for \"hero\" features like the\n// AI assistant. Shared by UpgradePrompt, PlanSelector and SubscriptionPage.\n\nexport function parsePlanFeature(feature: string): { label: string; highlighted: boolean } {\n return feature.startsWith('*')\n ? { label: feature.slice(1).trim(), highlighted: true }\n : { label: feature, highlighted: false }\n}\n\nexport function PlanFeatureItem({ feature, className, iconClassName }: {\n feature: string\n className?: string\n iconClassName?: string\n}) {\n const { label, highlighted } = parsePlanFeature(feature)\n return (\n <li className={cn('flex items-start gap-2', className, highlighted && 'font-medium text-primary')}>\n {highlighted ? (\n <Sparkles className={cn('mt-0.5 shrink-0 text-primary', iconClassName)} aria-hidden=\"true\" />\n ) : (\n <Check className={cn('mt-0.5 shrink-0 text-primary', iconClassName)} aria-hidden=\"true\" />\n )}\n <span>{label}</span>\n </li>\n )\n}\n","import type { LimitDeclaration, RegisteredEntity } from '@fayz-ai/core'\nimport { invalidateCount } from '@fayz-ai/core'\n\n/**\n * Module-level registry bridging React (the provider that knows the declarations)\n * and the plain `invalidateLimit(key)` function that create handlers call outside\n * any component. The AccessProvider publishes the merged declarations here on\n * mount; `useLimit`/`useLimitGuard` and `invalidateLimit` read from it.\n */\n\n/**\n * Shell built-in limit declarations. Unlike plugin/app limits (contributed via\n * `PluginManifest.declaredLimits` / `billing.limitDeclarations`), these count\n * core tenant tables that have no owning plugin: seats and units. Merged as the\n * LOWEST-priority layer by the AccessProvider, so a plugin or app may still\n * override a key (e.g. add a `kindFilter`).\n *\n * Counted through the public `v_*` bridges, not the base tables: the spine\n * moved memberships and units into schema `app`, which PostgREST cannot reach.\n */\nexport const CORE_LIMIT_DECLARATIONS: LimitDeclaration[] = [\n { key: 'users', label: 'Users', table: 'v_team_members' },\n { key: 'locations', label: 'Companies', table: 'v_units' },\n]\n\n/**\n * Entity-derived layer of the limit merge: any registered CRUD entity carrying\n * `limitKey` yields a declaration for free from its own data mapping (table +\n * archetype kind) — a cap without a countable binding is a dead cap. Shared by\n * the AccessProvider (live registry) and the manifest derivation (agent\n * contract), so both resolve the identical layer.\n */\nexport function entityDerivedLimitDeclarations(entities: RegisteredEntity[]): LimitDeclaration[] {\n const out: LimitDeclaration[] = []\n for (const e of entities) {\n const def = e.entityDef\n if (def?.limitKey && def.data?.table) {\n out.push({\n key: def.limitKey,\n label: e.labelPlural,\n table: def.data.table,\n kindFilter: def.data.archetypeKind,\n })\n }\n }\n return out\n}\n\nlet registry = new Map<string, LimitDeclaration>()\n\n/** Called by AccessProvider whenever the merged limit declarations change. */\nexport function setLimitRegistry(declarations: LimitDeclaration[]): void {\n const next = new Map<string, LimitDeclaration>()\n for (const decl of declarations) next.set(decl.key, decl)\n registry = next\n}\n\nexport function getLimitDeclaration(key: string): LimitDeclaration | undefined {\n return registry.get(key)\n}\n\n// --- Invalidation pub/sub -------------------------------------------------\n// useLimit subscribes per key; invalidateLimit(key) drops the cached count for\n// the declaration's table and notifies subscribers to re-fetch.\n\nconst listeners = new Map<string, Set<() => void>>()\n\nexport function subscribeLimit(key: string, cb: () => void): () => void {\n let set = listeners.get(key)\n if (!set) {\n set = new Set()\n listeners.set(key, set)\n }\n set.add(cb)\n return () => {\n set?.delete(cb)\n if (set && set.size === 0) listeners.delete(key)\n }\n}\n\n/**\n * Invalidate a limit after a create/delete so its next read is fresh, then wake\n * any mounted `useLimit(key)`. Safe to call from plain handlers (no React).\n */\nexport function invalidateLimit(key: string): void {\n const decl = registry.get(key)\n if (decl) invalidateCount(decl.table)\n listeners.get(key)?.forEach((cb) => cb())\n}\n","import { create } from 'zustand'\n\n/**\n * Payload describing WHY the upgrade modal opened, so the visual component (owned\n * by the shell/gates layer) can tailor its copy — a hit quantity cap\n * (`limitKey`) or a plan-gated feature (`feature`).\n */\nexport interface UpgradeModalPayload {\n limitKey?: string\n feature?: string\n}\n\nexport interface UpgradeModalStore {\n /** The active payload, or null when closed. */\n current: UpgradeModalPayload | null\n open(payload: UpgradeModalPayload): void\n close(): void\n}\n\n/**\n * Global, lightweight store for the single app-wide UpgradeModal. `useLimitGuard`\n * and imperative create handlers call `open(...)` when a limit blocks; the visual\n * modal (rendered once near the shell root by the gates layer) subscribes to\n * `current`. Kept as a zustand singleton so store + component share one instance.\n */\nexport const useUpgradeModalStore = create<UpgradeModalStore>((set) => ({\n current: null,\n open: (payload) => set({ current: payload }),\n close: () => set({ current: null }),\n}))\n","import * as React from 'react'\nimport type { LimitDeclaration, PermissionAction, Plan } from '@fayz-ai/core'\nimport { countByTenant, usePluginRuntimeOptional, getAllEntities } from '@fayz-ai/core'\nimport { useAuthStore } from '@fayz-ai/auth'\nimport { useOrganizationStore } from '../org/store'\nimport { usePermissionsStore } from '../permissions/store'\nimport { useBillingStore } from '../billing/store'\nimport { effectivePlan, useTrial } from '../billing/trial'\nimport { mergeLimitDeclarations } from '@fayz-ai/core/access'\nimport { resolveAccess, isEntitledByPlan, resolveLimit } from './resolver'\nimport { entityDerivedLimitDeclarations } from './limits-registry'\nimport { setLimitRegistry, getLimitDeclaration, subscribeLimit, CORE_LIMIT_DECLARATIONS } from './limits-registry'\nimport { useUpgradeModalStore } from './upgrade-modal-store'\nimport type { AccessApi, AccessDecision, AccessSession, LimitState } from './types'\n\n// ---------------------------------------------------------------------------\n// Context\n// ---------------------------------------------------------------------------\n\ninterface AccessContextValue extends AccessApi {\n session: AccessSession\n}\n\nconst AccessContext = React.createContext<AccessContextValue | null>(null)\n\n// ---------------------------------------------------------------------------\n// Provider\n// ---------------------------------------------------------------------------\n\nexport interface AccessProviderProps {\n children: React.ReactNode\n /**\n * App-level limit declarations layered ON TOP of the plugins' `declaredLimits`\n * (app wins on key collision). Sourced from `config.billing.limitDeclarations`.\n */\n limitDeclarations?: LimitDeclaration[]\n /** Plan the tenant is entitled to while its trial runs. See billing/trial.ts. */\n trialPlanId?: string\n}\n\n/**\n * Assembles the reactive {@link AccessSession} from the singleton stores and\n * exposes the composed access API (role × plan). Thin by design — mounts just\n * inside PermissionsProvider so it can reuse the live permission profile and the\n * plugin runtime. Also publishes the merged limit declarations to the module\n * registry so `invalidateLimit` works from non-React create handlers.\n */\nexport function AccessProvider({ children, limitDeclarations, trialPlanId }: AccessProviderProps) {\n const user = useAuthStore((s) => s.user)\n const org = useOrganizationStore((s) => s.currentOrg)\n const profile = usePermissionsStore((s) => s.currentProfile)\n const plans = useBillingStore((s) => s.plans)\n\n const runtime = usePluginRuntimeOptional()\n const pluginLimits = runtime?.pluginLimits\n\n // Merge limit declarations by priority (later wins by key): shell built-ins\n // (users/locations) < entity-derived < plugin `declaredLimits` < app\n // overrides. Then publish to the module registry consumed by\n // invalidateLimit / the limit hooks.\n //\n // Entity-derived: any registered CRUD entity carrying `limitKey` yields a\n // declaration for free from its own data mapping (table + archetype kind) —\n // this is what makes an app's `EntityDef.limitKey: 'clients'` enforceable\n // with ZERO extra wiring (a cap without a countable binding is a dead cap).\n React.useEffect(() => {\n setLimitRegistry(\n mergeLimitDeclarations(\n CORE_LIMIT_DECLARATIONS,\n entityDerivedLimitDeclarations(getAllEntities()),\n pluginLimits,\n limitDeclarations,\n ),\n )\n }, [pluginLimits, limitDeclarations])\n\n // The trial is resolved HERE and nowhere else: it changes which plan's\n // entitlements apply, and every gate in the product already reads that. A\n // per-feature \"…or on trial\" check would have to be repeated in the nav, the\n // gates, the caps and the assistant, and one of them would be forgotten.\n const trial = useTrial()\n const plan: Plan | null = React.useMemo(\n () => effectivePlan(org, plans, trial, trialPlanId),\n [plans, org?.plan, trial.status, trialPlanId],\n )\n\n const session: AccessSession = React.useMemo(\n () => ({ user, org, profile, plan }),\n [user, org, profile, plan],\n )\n\n const value = React.useMemo<AccessContextValue>(\n () => ({\n session,\n can: (feature, action) => resolveAccess(session, feature, action),\n entitled: (feature) => isEntitledByPlan(session.plan, feature),\n }),\n [session],\n )\n\n return <AccessContext.Provider value={value}>{children}</AccessContext.Provider>\n}\nAccessProvider.displayName = 'AccessProvider'\n\n// ---------------------------------------------------------------------------\n// Hooks\n// ---------------------------------------------------------------------------\n\nconst ALLOW_ALL: AccessApi = {\n can: () => ({ allowed: true }),\n entitled: () => true,\n}\n\n/**\n * The composed access API. Throws outside <AccessProvider> — use\n * {@link useAccessOptional} for SDK components that must degrade gracefully.\n */\nexport function useAccess(): AccessApi {\n const ctx = React.useContext(AccessContext)\n if (!ctx) throw new Error('useAccess must be used inside <AccessProvider>')\n return { can: ctx.can, entitled: ctx.entitled }\n}\n\n/**\n * Like {@link useAccess} but degrades to allow-all when no provider is mounted,\n * so components stay usable under a bare host shell (gating is an enhancement).\n */\nexport function useAccessOptional(): AccessApi {\n const ctx = React.useContext(AccessContext)\n return ctx ? { can: ctx.can, entitled: ctx.entitled } : ALLOW_ALL\n}\n\n/** Internal: the live session (for hooks that need tenant/plan directly). */\nfunction useAccessSession(): AccessSession | null {\n return React.useContext(AccessContext)?.session ?? null\n}\n\n// ---------------------------------------------------------------------------\n// Limits\n// ---------------------------------------------------------------------------\n\nfunction resolveCap(plan: Plan | null, key: string): number | undefined {\n return plan?.entitlements?.limits?.[key]\n}\n\n/**\n * Live usage of a quantity limit for the active tenant. Resolves the limit's\n * declaration (plugin manifest or app override) → a tenant-scoped `count(*)`,\n * capped by the current plan. No declaration or no cap (or `-1`) ⇒ unlimited.\n * Re-fetches when the tenant, plan cap, or an `invalidateLimit(key)` fires.\n */\nexport function useLimit(key: string): LimitState {\n const session = useAccessSession()\n const tenantId = session?.org?.id\n const cap = resolveCap(session?.plan ?? null, key)\n const declaration = getLimitDeclaration(key)\n\n const unlimited = !declaration || cap === undefined || cap === -1\n\n const [used, setUsed] = React.useState(0)\n const [loading, setLoading] = React.useState(!unlimited)\n const [version, setVersion] = React.useState(0)\n\n const refresh = React.useCallback(() => setVersion((v) => v + 1), [])\n\n // Wake on external invalidation (a create/delete elsewhere).\n React.useEffect(() => subscribeLimit(key, refresh), [key, refresh])\n\n React.useEffect(() => {\n if (unlimited || !declaration || !tenantId) {\n setUsed(0)\n setLoading(false)\n return\n }\n let active = true\n setLoading(true)\n countByTenant(declaration.table, {\n kind: declaration.kindFilter,\n period: declaration.period,\n tenantId,\n fresh: version > 0,\n })\n .then((n) => {\n if (active) {\n setUsed(n)\n setLoading(false)\n }\n })\n .catch(() => {\n if (active) setLoading(false)\n })\n return () => {\n active = false\n }\n }, [unlimited, declaration, tenantId, version])\n\n const bounds = resolveLimit({ cap, hasDeclaration: Boolean(declaration), used })\n\n return { key, ...bounds, loading, refresh }\n}\n\n/**\n * Imperative guard for create handlers: `await guard(n)` returns `'ok'` when\n * adding `n` more rows stays within the cap, or `'blocked'` (and opens the global\n * UpgradeModal) when it would exceed it. Always checks a FRESH count so it never\n * relies on stale hook state.\n */\nexport function useLimitGuard(key: string): (n?: number) => Promise<'ok' | 'blocked'> {\n const session = useAccessSession()\n const tenantId = session?.org?.id\n const plan = session?.plan ?? null\n const openModal = useUpgradeModalStore((s) => s.open)\n\n return React.useCallback(\n async (n = 1) => {\n const cap = resolveCap(plan, key)\n const declaration = getLimitDeclaration(key)\n // Unlimited / no declaration / no tenant ⇒ never block.\n if (!declaration || cap === undefined || cap === -1 || !tenantId) return 'ok'\n\n const used = await countByTenant(declaration.table, {\n kind: declaration.kindFilter,\n period: declaration.period,\n tenantId,\n fresh: true,\n })\n\n if (used + n > cap) {\n openModal({ limitKey: key })\n return 'blocked'\n }\n return 'ok'\n },\n [key, plan, tenantId, openModal],\n )\n}\n","import type { PermissionAction, Plan } from '@fayz-ai/core'\nimport { countByTenant } from '@fayz-ai/core'\nimport { resolveAccess, agentDenial, type AgentGuardResult } from '@fayz-ai/core/access'\nimport { useAuthStore } from '@fayz-ai/auth'\nimport { useOrganizationStore } from '../org/store'\nimport { usePermissionsStore } from '../permissions/store'\nimport { useBillingStore } from '../billing/store'\nimport { getLimitDeclaration } from './limits-registry'\nimport type { AccessSession } from './types'\n\n// ---------------------------------------------------------------------------\n// Headless access — the imperative counterpart of useAccess()/useLimitGuard()\n// for runtimes without React: the agent's client-plane tool executor, command\n// handlers, background sync. Reads the SAME singleton stores the providers\n// hydrate, and decides with the SAME engine (@fayz-ai/core/access), so a\n// decision here never diverges from what the UI shows.\n//\n// Denials come back as the structured AgentDenial (never a silent failure) so\n// an agent can explain the denial and offer the upgrade conversationally.\n// ---------------------------------------------------------------------------\n\n/**\n * Snapshot of the live session assembled from the singleton stores — the same\n * assembly AccessProvider does reactively. Values are as-hydrated: before\n * AuthProvider/OrgProvider finish, fields are null, and an unresolved profile\n * DENIES — same semantics as the providers.\n */\nexport function getAccessSnapshot(): AccessSession {\n const user = useAuthStore.getState().user\n const org = useOrganizationStore.getState().currentOrg\n const profile = usePermissionsStore.getState().currentProfile\n const plans = useBillingStore.getState().plans\n const plan: Plan | null = org?.plan ? plans.find((p) => p.id === org.plan) ?? null : null\n return { user, org, profile, plan }\n}\n\n/** Imperative role × plan check over the live snapshot. */\nexport function checkAccess(feature: string, action?: PermissionAction): AgentGuardResult {\n const session = getAccessSnapshot()\n const decision = resolveAccess(session, feature, action)\n if (decision.allowed) return { allowed: true }\n return agentDenial(decision.reason ?? 'role')\n}\n\n/**\n * Imperative plan-limit guard: would adding `n` rows exceed the cap for\n * `key`? Counts FRESH (never trusts stale hook state), mirrors useLimitGuard.\n * No declaration / no cap / `-1` / no tenant ⇒ allowed. Does NOT open the\n * UpgradeModal — the caller decides how to surface the denial (an agent turns\n * it into a conversational upgrade prompt).\n */\nexport async function guardLimit(key: string, n = 1): Promise<AgentGuardResult> {\n const session = getAccessSnapshot()\n const tenantId = session.org?.id\n const cap = session.plan?.entitlements?.limits?.[key]\n const declaration = getLimitDeclaration(key)\n\n if (!declaration || cap === undefined || cap === -1 || !tenantId) return { allowed: true }\n\n const used = await countByTenant(declaration.table, {\n kind: declaration.kindFilter,\n period: declaration.period,\n tenantId,\n fresh: true,\n })\n\n if (used + n > cap) {\n return agentDenial('limit', { key, max: cap, used })\n }\n return { allowed: true }\n}\n","import * as React from 'react'\nimport type { ModuleNavItem } from '@fayz-ai/ui'\nimport { usePermissionsStore } from '../permissions/store'\nimport { useAccessOptional } from './context'\nimport type { AccessApi } from './types'\n\n// ---------------------------------------------------------------------------\n// useModuleNavAccess — the LINK-side counterpart of EntitlementGate for a\n// plugin's INTERNAL navigation (ModulePage sub-nav). Mirrors the top-level\n// Sidebar/AdminShell rule so a premium sub-module link reads identically:\n//\n// • role denies (can(feature,'read').reason === 'role') → REMOVE the link\n// • plan denies (entitled(feature) === false) → keep, premium:true\n// (the click still navigates; the gated CONTENT shows the\n// UpgradePrompt via EntitlementGate)\n// • otherwise → keep as-is\n//\n// A feature id ABSENT from the RBAC catalog is treated as \"default allow\": the\n// role axis is skipped entirely for it (an undeclared feature can't be a role\n// denial), so apps that wire the plugin without declaring the sub-feature don't\n// lose the link. The plan axis is naturally safe already — `entitled` returns\n// true for any feature a plan never disables.\n//\n// Recursive over `children`. Degrades to allow-all when no <AccessProvider> is\n// mounted (bare host shell), exactly like `useAccessOptional`.\n// ---------------------------------------------------------------------------\n\n/**\n * Pure decoration used by {@link useModuleNavAccess}. Kept store-free so it is\n * directly unit-testable: pass the composed {@link AccessApi} and the set of\n * feature ids known to the RBAC catalog.\n */\nexport function applyNavAccess(\n items: ModuleNavItem[],\n access: AccessApi,\n knownFeatures: Set<string>,\n): ModuleNavItem[] {\n const decorate = (item: ModuleNavItem): ModuleNavItem | null => {\n const children = item.children\n ? item.children\n .map(decorate)\n .filter((c): c is ModuleNavItem => c !== null)\n : undefined\n\n if (!item.feature) {\n return children ? { ...item, children } : item\n }\n\n // Role axis — only meaningful for a feature the RBAC catalog actually\n // declares. An undeclared feature defaults to allow (never removed).\n if (knownFeatures.has(item.feature)) {\n const decision = access.can(item.feature, 'read')\n if (!decision.allowed && decision.reason === 'role') return null\n }\n\n // Plan axis — `entitled` is `false` only on an explicit plan denial; absent\n // features stay entitled, so no Crown appears for them.\n const premium = access.entitled(item.feature) === false\n\n return children ? { ...item, premium, children } : { ...item, premium }\n }\n\n return items.map(decorate).filter((i): i is ModuleNavItem => i !== null)\n}\n\n/**\n * Resolve a plugin's internal nav against role × plan: hides role-denied links,\n * badges plan-denied ones with a Crown (`premium`), and passes everything else\n * through unchanged. Recursive over children.\n */\nexport function useModuleNavAccess(items: ModuleNavItem[]): ModuleNavItem[] {\n const access = useAccessOptional()\n const features = usePermissionsStore((s) => s.features)\n const knownFeatures = React.useMemo(\n () => new Set(features.map((f) => f.id)),\n [features],\n )\n return React.useMemo(\n () => applyNavAccess(items, access, knownFeatures),\n [items, access, knownFeatures],\n )\n}\n","// ---------------------------------------------------------------------------\n// access-contract — the single import seam the billing UI uses for the\n// entitlements engine (UpgradePrompt, UpgradeModal, EntitlementGate, LimitGate,\n// SoftLimitWidget, the AdminShell route guard / nav badge, SubscriptionPage\n// matrix). Re-exports the core access engine (packages/saas/src/access) so the\n// billing layer has ONE stable path and the wiring (AccessProvider) stays in the\n// núcleo. `getPlanEntitlements` is a thin local reader — core's Plan carries the\n// entitlements, so this just narrows the access.\n//\n// (History: this file shipped as a temporary stub while the access engine landed\n// in parallel; now repointed to the real module. The public names/types below\n// match the fixed contract, so no billing-wave consumer changed.)\n// ---------------------------------------------------------------------------\nimport type { Plan, PlanEntitlements } from '@fayz-ai/core'\n\nexport {\n useAccessOptional,\n useLimit,\n useLimitGuard,\n invalidateLimit,\n useUpgradeModalStore,\n} from '../../access'\n\nexport type { AccessApi, AccessDecision } from '../../access'\n// The billing layer refers to the limit shape as `LimitInfo`; the engine calls\n// it `LimitState`. Same structure — alias to keep call sites stable.\nexport type { LimitState as LimitInfo } from '../../access'\nexport type { PlanEntitlements } from '@fayz-ai/core'\n\n/** Narrow a plan to its entitlements (undefined when the plan declares none). */\nexport function getPlanEntitlements(plan: Plan | undefined | null): PlanEntitlements | undefined {\n return plan?.entitlements\n}\n\n/**\n * Clean a feature's raw permission label into a display name for the upgrade\n * surfaces. Feature labels in an app's permissions config carry an access-scope\n * suffix — e.g. \"Marketing (acesso)\" / \"Reports (access)\" — which reads as noise\n * when interpolated into a headline (\"Unlock Marketing (acesso)\"). Strip a single\n * trailing parenthetical group and collapse surrounding whitespace. Shared by\n * UpgradePrompt AND UpgradeModal so the two surfaces stay in lockstep.\n */\nexport function featureDisplayName(label: string | null | undefined): string {\n if (!label) return ''\n return label.replace(/\\s*\\([^)]*\\)\\s*$/, '').trim() || label.trim()\n}\n\n/**\n * Which ISO-4217 code to price a plan in. `Plan.currency` is the source of\n * truth, but apps DO ship billing configs that omit it — and silently printing\n * \"$79\" to a tenant billed in reais is worse than any other failure mode here.\n * So the fallback follows the ACTIVE LOCALE's region rather than a hardcoded\n * 'USD'; only a locale we can't place at all lands on USD.\n */\nconst CURRENCY_BY_REGION: Record<string, string> = {\n BR: 'BRL', PT: 'EUR', ES: 'EUR', FR: 'EUR', DE: 'EUR', IT: 'EUR', NL: 'EUR', IE: 'EUR',\n GB: 'GBP', US: 'USD', CA: 'CAD', AU: 'AUD', MX: 'MXN', AR: 'ARS', CL: 'CLP', CO: 'COP',\n}\n\nexport function resolvePlanCurrency(planCurrency: string | undefined, locale: string | undefined): string {\n if (planCurrency) return planCurrency\n const region = locale?.split(/[-_]/)[1]?.toUpperCase()\n return (region && CURRENCY_BY_REGION[region]) || 'USD'\n}\n","import * as React from 'react'\nimport { Crown, Check, Minus, Sparkles } from 'lucide-react'\nimport { PlanFeatureItem, parsePlanFeature } from './plan-feature'\nimport { Button, Badge, Card, CardContent, CardHeader, ConfirmDialog, toast } from '@fayz-ai/ui'\nimport type { Plan } from '@fayz-ai/core'\nimport { cn } from '../../lib/cn'\nimport { useTranslation } from '../../hooks/useTranslation'\nimport { useBillingStore } from '../../stores/billing.store'\nimport { resolvePlanBadge } from '../../billing/plan-badge'\nimport { useTenantOptional, useOrgAdapterOptional } from '../../org/context'\nimport { useOrganizationStore } from '../../org/store'\nimport { usePermissionsStore } from '../../permissions'\nimport { getPlanEntitlements } from './access-contract'\n\n// ---------------------------------------------------------------------------\n// SubscriptionPage — the shell's self-serve subscription surface. Present as the\n// /settings/subscription tab whenever `config.billing` is configured. Reads the\n// plans seeded into the billing store from config, resolves the current plan\n// from `currentOrg.plan`, and changes plan via the checkout seam (Stripe/Pix) or,\n// when no seam is configured, an optimistic `adapter.updateOrg(orgId, { plan })`.\n// ---------------------------------------------------------------------------\n\nfunction formatPrice(plan: Plan, tr: (k: string, f: string) => string): string {\n if (plan.price <= 0) return tr('billing.free', 'Free')\n try {\n const isInteger = Number.isInteger(plan.price)\n return new Intl.NumberFormat(undefined, {\n style: 'currency',\n currency: plan.currency || 'USD',\n minimumFractionDigits: isInteger ? 0 : 2,\n }).format(plan.price)\n } catch {\n return `${plan.currency || ''} ${plan.price}`.trim()\n }\n}\n\nfunction intervalSuffix(plan: Plan, tr: (k: string, f: string) => string): string {\n if (plan.price <= 0) return ''\n return plan.interval === 'year'\n ? tr('billing.perYear', '/yr')\n : tr('billing.perMonth', '/mo')\n}\n\nexport function SubscriptionPage({ className }: { className?: string }) {\n const { t } = useTranslation()\n const tr = (key: string, fallback: string) => {\n const v = t(key)\n return !v || v === key ? fallback : v\n }\n\n const plans = useBillingStore((s) => s.plans)\n const checkout = useBillingStore((s) => s.checkout)\n const tenant = useTenantOptional()\n const adapter = useOrgAdapterOptional()\n const setCurrentOrg = useOrganizationStore((s) => s.setCurrentOrg)\n const currentOrg = useOrganizationStore((s) => s.currentOrg)\n\n const currentPlanId = currentOrg?.plan || 'free'\n const currentBadge = resolvePlanBadge(currentPlanId, plans)\n const currentPlan = plans.find((p) => p.id === currentPlanId)\n\n const [pending, setPending] = React.useState<Plan | null>(null)\n const [busy, setBusy] = React.useState(false)\n\n // Feature matrix — union of every plan's features, order-preserved.\n const allFeatures = React.useMemo(() => {\n const seen = new Set<string>()\n const out: string[] = []\n for (const plan of plans) {\n for (const f of plan.features) {\n if (!seen.has(f)) {\n seen.add(f)\n out.push(f)\n }\n }\n }\n return out\n }, [plans])\n\n // Real entitlements matrix — derived from plan.entitlements when any plan\n // declares them. Feature rows show ✓/— per plan; limit rows show \"Up to N\" /\n // \"Unlimited\". Falls back to the marketing-bullet matrix (allFeatures) below\n // when no plan carries entitlements.\n const featureCatalog = usePermissionsStore((s) => s.features)\n const entitlementsMatrix = React.useMemo(() => {\n const hasAny = plans.some((p) => getPlanEntitlements(p))\n if (!hasAny) return null\n\n const featureIds: string[] = []\n const featureSeen = new Set<string>()\n const limitKeys: string[] = []\n const limitSeen = new Set<string>()\n for (const plan of plans) {\n const ent = getPlanEntitlements(plan)\n for (const id of Object.keys(ent?.features ?? {})) {\n if (!featureSeen.has(id)) { featureSeen.add(id); featureIds.push(id) }\n }\n for (const key of Object.keys(ent?.limits ?? {})) {\n if (!limitSeen.has(key)) { limitSeen.add(key); limitKeys.push(key) }\n }\n }\n if (featureIds.length === 0 && limitKeys.length === 0) return null\n\n const labelForFeature = (id: string) => featureCatalog.find((f) => f.id === id)?.label ?? id\n const labelForLimit = (key: string) => {\n const v = t(`limit.label.${key}`)\n return !v || v === `limit.label.${key}` ? key : v\n }\n return { featureIds, limitKeys, labelForFeature, labelForLimit }\n }, [plans, featureCatalog, t])\n\n async function applyChange(plan: Plan) {\n setBusy(true)\n try {\n // Seam: a configured gateway (Stripe/Pix) owns the transition; the webhook\n // is the source of truth for the persisted plan, so we don't mutate here.\n if (checkout) {\n await checkout(plan.id)\n setPending(null)\n return\n }\n // No gateway: optimistic org update. Persist + swap the store so the plan\n // badge and CTAs re-render immediately.\n if (adapter && currentOrg) {\n const updated = await adapter.updateOrg(currentOrg.id, { plan: plan.id })\n setCurrentOrg(updated)\n } else if (currentOrg) {\n setCurrentOrg({ ...currentOrg, plan: plan.id })\n }\n toast.success(\n tr('billing.planChanged', 'Plan updated').replace('{{plan}}', plan.name),\n )\n setPending(null)\n } catch {\n toast.error(tr('billing.planChangeFailed', \"Couldn't change your plan. Please try again.\"))\n } finally {\n setBusy(false)\n }\n }\n\n if (plans.length === 0) {\n return (\n <div className={className ?? 'mx-auto max-w-5xl'}>\n <p className=\"text-sm text-muted-foreground\">\n {tr('billing.noPlans', 'No plans are configured.')}\n </p>\n </div>\n )\n }\n\n return (\n <div className={className ?? 'mx-auto max-w-5xl space-y-8'}>\n {/* Sem título nem descrição: a barra já escreve \"Assinatura\", e a frase\n embaixo custava uma linha para repetir o que os planos mostram. */}\n\n {/* Current plan highlight */}\n <Card\n className={cn(\n 'relative overflow-hidden',\n currentBadge.paid && 'border-amber-400/60 bg-gradient-to-br from-amber-50/60 to-transparent dark:from-amber-950/20',\n )}\n >\n <CardContent className=\"flex flex-wrap items-center justify-between gap-4 p-6\">\n <div className=\"flex items-center gap-4\">\n <div\n className={cn(\n 'flex h-12 w-12 shrink-0 items-center justify-center rounded-xl',\n currentBadge.paid ? 'bg-amber-400/20 text-amber-600 dark:text-amber-400' : 'bg-muted text-muted-foreground',\n )}\n >\n {currentBadge.paid ? <Crown className=\"h-6 w-6\" /> : <Sparkles className=\"h-6 w-6\" />}\n </div>\n <div>\n <p className=\"text-xs font-medium uppercase tracking-wide text-muted-foreground\">\n {tr('billing.currentPlan', 'Current Plan')}\n </p>\n <div className=\"flex items-center gap-2\">\n <span className=\"text-xl font-bold\">{currentBadge.label}</span>\n {currentBadge.paid && (\n // Paid marker only — a literal \"Pro\" here was misleading next\n // to non-Pro paid tiers (\"Starter / Pro\", QA finding).\n <Badge\n aria-label={tr('billing.paidPlan', 'Paid plan')}\n className=\"border-amber-400/40 bg-amber-400/15 text-amber-700 dark:text-amber-300\"\n >\n <Crown className=\"h-3 w-3\" />\n </Badge>\n )}\n </div>\n </div>\n </div>\n {currentPlan && (\n <div className=\"text-right\">\n <span className=\"text-2xl font-bold\">{formatPrice(currentPlan, tr)}</span>\n <span className=\"text-sm text-muted-foreground\">{intervalSuffix(currentPlan, tr)}</span>\n </div>\n )}\n </CardContent>\n </Card>\n\n {/* Plan cards */}\n <div className=\"grid gap-6 md:grid-cols-2 lg:grid-cols-3\">\n {plans.map((plan) => {\n const isCurrent = plan.id === currentPlanId\n const paid = plan.price > 0\n return (\n <Card\n key={plan.id}\n className={cn(\n 'relative flex flex-col',\n plan.highlighted && 'border-primary shadow-md',\n isCurrent && 'ring-2 ring-primary/40',\n )}\n >\n {plan.highlighted && (\n <div className=\"absolute -top-3 left-1/2 -translate-x-1/2\">\n <Badge>\n <Crown className=\"mr-1 h-3 w-3\" />\n {tr('billing.mostPopular', 'Most Popular')}\n </Badge>\n </div>\n )}\n <CardHeader className=\"pb-0\">\n <div className=\"flex items-center gap-2\">\n <h3 className=\"text-xl font-semibold\">{plan.name}</h3>\n {paid && <Crown className=\"h-4 w-4 text-amber-500\" />}\n </div>\n {plan.description && (\n <p className=\"text-sm text-muted-foreground\">{plan.description}</p>\n )}\n </CardHeader>\n <CardContent className=\"flex flex-1 flex-col pt-4\">\n <div className=\"mb-6\">\n <span className=\"text-4xl font-bold\">{formatPrice(plan, tr)}</span>\n <span className=\"text-muted-foreground\">{intervalSuffix(plan, tr)}</span>\n </div>\n <ul className=\"mb-6 flex-1 space-y-3\">\n {plan.features.map((feature) => (\n <PlanFeatureItem key={feature} feature={feature} className=\"text-sm\" iconClassName=\"h-4 w-4\" />\n ))}\n </ul>\n {isCurrent ? (\n <Button variant=\"outline\" className=\"w-full\" disabled>\n {tr('billing.currentPlan', 'Current Plan')}\n </Button>\n ) : (\n <Button\n className=\"w-full\"\n variant={plan.highlighted ? 'default' : 'outline'}\n onClick={() => setPending(plan)}\n >\n {tr('billing.changeToPlan', 'Switch to this plan')}\n </Button>\n )}\n </CardContent>\n </Card>\n )\n })}\n </div>\n\n {/* Feature matrix */}\n {(entitlementsMatrix || allFeatures.length > 0) && (\n <div className=\"space-y-3\">\n <h2 className=\"text-lg font-semibold\">\n {tr('billing.featureMatrix', 'Feature comparison')}\n </h2>\n <div className=\"overflow-x-auto rounded-lg border\">\n <table className=\"w-full border-collapse text-sm\">\n <thead>\n <tr className=\"border-b bg-muted/40\">\n <th className=\"px-4 py-3 text-left font-medium\">\n {tr('billing.features', 'Features')}\n </th>\n {plans.map((plan) => (\n <th key={plan.id} className=\"px-4 py-3 text-center font-medium\">\n <span className=\"inline-flex items-center gap-1\">\n {plan.price > 0 && <Crown className=\"h-3.5 w-3.5 text-amber-500\" />}\n {plan.name}\n </span>\n </th>\n ))}\n </tr>\n </thead>\n <tbody>\n {entitlementsMatrix ? (\n <>\n {entitlementsMatrix.featureIds.map((id, i) => (\n <tr key={`f:${id}`} className={cn(i % 2 === 1 && 'bg-muted/20')}>\n <td className=\"px-4 py-2.5 text-left\">{entitlementsMatrix.labelForFeature(id)}</td>\n {plans.map((plan) => {\n const entitled = getPlanEntitlements(plan)?.features?.[id] !== false\n return (\n <td key={plan.id} className=\"px-4 py-2.5 text-center\">\n {entitled ? (\n <Check className=\"mx-auto h-4 w-4 text-primary\" />\n ) : (\n <Minus className=\"mx-auto h-4 w-4 text-muted-foreground/40\" />\n )}\n </td>\n )\n })}\n </tr>\n ))}\n {entitlementsMatrix.limitKeys.map((key, i) => (\n <tr key={`l:${key}`} className={cn((entitlementsMatrix.featureIds.length + i) % 2 === 1 && 'bg-muted/20')}>\n <td className=\"px-4 py-2.5 text-left\">{entitlementsMatrix.labelForLimit(key)}</td>\n {plans.map((plan) => {\n const cap = getPlanEntitlements(plan)?.limits?.[key]\n const cell =\n cap === undefined\n ? '—'\n : cap < 0\n ? tr('billing.unlimited', 'Unlimited')\n : tr('billing.upTo', 'Up to {count}').replace('{count}', String(cap)).replace('{{count}}', String(cap))\n return (\n <td key={plan.id} className=\"px-4 py-2.5 text-center text-muted-foreground\">\n {cell}\n </td>\n )\n })}\n </tr>\n ))}\n </>\n ) : (\n allFeatures.map((feature, i) => (\n <tr key={feature} className={cn(i % 2 === 1 && 'bg-muted/20')}>\n <td className=\"px-4 py-2.5 text-left\">{parsePlanFeature(feature).label}</td>\n {plans.map((plan) => (\n <td key={plan.id} className=\"px-4 py-2.5 text-center\">\n {plan.features.includes(feature) ? (\n <Check className=\"mx-auto h-4 w-4 text-primary\" />\n ) : (\n <Minus className=\"mx-auto h-4 w-4 text-muted-foreground/40\" />\n )}\n </td>\n ))}\n </tr>\n ))\n )}\n </tbody>\n </table>\n </div>\n </div>\n )}\n\n {/* Change-plan confirm */}\n <ConfirmDialog\n open={pending !== null}\n onConfirm={() => pending && void applyChange(pending)}\n onCancel={() => setPending(null)}\n title={tr('billing.changePlanConfirmTitle', 'Change plan?')}\n description={\n pending\n ? tr('billing.changePlanConfirmBody', \"You're switching to the {{plan}} plan.\").replace('{{plan}}', pending.name)\n : undefined\n }\n confirmLabel={tr('billing.changePlanConfirm', 'Switch plan')}\n cancelLabel={tr('common.cancel', 'Cancel')}\n loading={busy}\n />\n </div>\n )\n}\n"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"LocationsCrudPage.d.ts","sourceRoot":"","sources":["../../../src/components/settings/LocationsCrudPage.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;
|
|
1
|
+
{"version":3,"file":"LocationsCrudPage.d.ts","sourceRoot":"","sources":["../../../src/components/settings/LocationsCrudPage.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AA+C9C,eAAO,MAAM,iBAAiB,EAAE,SA0J/B,CAAA;AASD,eAAO,MAAM,iBAAiB;;CAAoC,CAEjE"}
|
|
@@ -16,11 +16,18 @@ export interface ModuleRow {
|
|
|
16
16
|
/** Outros módulos ligados que dependem deste. */
|
|
17
17
|
neededBy: string[];
|
|
18
18
|
permitted: boolean;
|
|
19
|
+
addons: Array<{
|
|
20
|
+
plugin: ResolvedPluginManifest;
|
|
21
|
+
screens: string[];
|
|
22
|
+
permitted: boolean;
|
|
23
|
+
}>;
|
|
19
24
|
}
|
|
20
25
|
export declare function buildRows(plugins: ResolvedPluginManifest[], hidden: Set<string>, permits?: (plugin: string, facet?: string) => boolean): ModuleRow[];
|
|
21
|
-
export declare function ModuleCard({ row, onToggle, busy }: {
|
|
26
|
+
export declare function ModuleCard({ row, onToggle, busy, appLabel, }: {
|
|
22
27
|
row: ModuleRow;
|
|
23
28
|
onToggle: ModuleToggle;
|
|
24
29
|
busy?: boolean;
|
|
30
|
+
/** "Estende: ChefControl, FullControl" ou "Todos os negócios" — ver `pluginAppNames`/`isCrossCutting`. */
|
|
31
|
+
appLabel?: string;
|
|
25
32
|
}): React.JSX.Element;
|
|
26
33
|
//# sourceMappingURL=ModuleCard.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModuleCard.d.ts","sourceRoot":"","sources":["../../../src/components/settings/ModuleCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAG3D;;;;;;GAMG;AAEH,4EAA4E;AAC5E,MAAM,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,UAAU,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;AAE3G,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,sBAAsB,CAAA;IAC9B,2EAA2E;IAC3E,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,iDAAiD;IACjD,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,SAAS,EAAE,OAAO,CAAA;
|
|
1
|
+
{"version":3,"file":"ModuleCard.d.ts","sourceRoot":"","sources":["../../../src/components/settings/ModuleCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAG9B,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAA;AAG3D;;;;;;GAMG;AAEH,4EAA4E;AAC5E,MAAM,MAAM,YAAY,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,GAAG,UAAU,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAA;AAE3G,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,sBAAsB,CAAA;IAC9B,2EAA2E;IAC3E,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,iDAAiD;IACjD,QAAQ,EAAE,MAAM,EAAE,CAAA;IAClB,SAAS,EAAE,OAAO,CAAA;IAClB,MAAM,EAAE,KAAK,CAAC;QACZ,MAAM,EAAE,sBAAsB,CAAA;QAC9B,OAAO,EAAE,MAAM,EAAE,CAAA;QACjB,SAAS,EAAE,OAAO,CAAA;KACnB,CAAC,CAAA;CACH;AAQD,wBAAgB,SAAS,CACvB,OAAO,EAAE,sBAAsB,EAAE,EACjC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,EACnB,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,OAAO,GACpD,SAAS,EAAE,CAwBb;AAED,wBAAgB,UAAU,CAAC,EACzB,GAAG,EACH,QAAQ,EACR,IAAI,EACJ,QAAQ,GACT,EAAE;IACD,GAAG,EAAE,SAAS,CAAA;IACd,QAAQ,EAAE,YAAY,CAAA;IACtB,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,0GAA0G;IAC1G,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB,qBA8HA"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* O montador do sistema — a mesma pergunta que `BrandPreview` responde para
|
|
4
|
+
* cor ("como fica?"), aqui para módulo ("o que aparece no menu?").
|
|
5
|
+
*
|
|
6
|
+
* Ao contrário de `BrandPreview` (barras falsas, de propósito — ver o
|
|
7
|
+
* comentário em BrandingSettings.tsx), este lê o menu de VERDADE:
|
|
8
|
+
* `usePluginRuntime().navigation` é o mesmo dado que o `AdminShell` desenha, e
|
|
9
|
+
* `applyRailPreset` é a mesma função que agrupa por rubrica de ofício. Ele
|
|
10
|
+
* reage sozinho a cada `tenant_plugin_set` — sem estado de rascunho — porque o
|
|
11
|
+
* RPC de Módulos já é rápido e o Switch já fica `disabled` durante o round
|
|
12
|
+
* trip; um preview otimista poderia mostrar uma linha que o servidor recusa
|
|
13
|
+
* (plano, dependência) e depois ter que desmentir a si mesmo.
|
|
14
|
+
*
|
|
15
|
+
* As cores vêm das mesmas variáveis do rail de verdade (`bg-sidebar`,
|
|
16
|
+
* `text-sidebar-foreground`, `sidebar-accent`…) — a mesma marca que
|
|
17
|
+
* `/branding` já pinta no shell, não um cartão cinza de configurações. Uma
|
|
18
|
+
* conta com cor própria vê a cor própria aqui.
|
|
19
|
+
*
|
|
20
|
+
* Não reaninha por prefixo de rota como o `AdminShell` faz (essa lógica é
|
|
21
|
+
* privada dele, ligada a `pages`/`navContributions` de cada aplicativo) — uma
|
|
22
|
+
* rubrica do preset (`rail: [{label, under}]`) ainda agrupa certo, porque
|
|
23
|
+
* `applyRailPreset` funciona em cima de uma lista achatada. O que se perde é
|
|
24
|
+
* só o agrupamento AUTOMÁTICO por sub-rota sem rubrica declarada (ex.:
|
|
25
|
+
* `/agenda/confirmations` aparece como linha própria, não como filha
|
|
26
|
+
* recolhida de "Agenda") — que é exatamente a mudança que este preview existe
|
|
27
|
+
* para mostrar quando alguém liga a facet de Confirmações.
|
|
28
|
+
*/
|
|
29
|
+
export declare function ModulesPreview(): React.JSX.Element;
|
|
30
|
+
//# sourceMappingURL=ModulesPreview.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ModulesPreview.d.ts","sourceRoot":"","sources":["../../../src/components/settings/ModulesPreview.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAS9B;;;;;;;;;;;;;;;;;;;;;;;;;;GA0BG;AACH,wBAAgB,cAAc,sBAyB7B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ModulesSettings.d.ts","sourceRoot":"","sources":["../../../src/components/settings/ModulesSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAA;AACvF,OAAO,
|
|
1
|
+
{"version":3,"file":"ModulesSettings.d.ts","sourceRoot":"","sources":["../../../src/components/settings/ModulesSettings.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAM9B,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAA;AACvF,OAAO,EAAgC,KAAK,UAAU,EAAE,MAAM,kBAAkB,CAAA;AAGhF;;;;;;;;;;;;;;;;;;;;;;;;;GAyBG;AAEH,MAAM,WAAW,oBAAoB;IACnC,8EAA8E;IAC9E,MAAM,CAAC,EAAE,MAAM,EAAE,CAAA;IACjB,4EAA4E;IAC5E,QAAQ,EAAE,YAAY,CAAA;IACtB,8DAA8D;IAC9D,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,OAAO,CAAA;IACrD,IAAI,CAAC,EAAE,OAAO,CAAA;IACd;;;OAGG;IACH,OAAO,CAAC,EAAE,UAAU,EAAE,CAAA;CACvB;AAED,OAAO,EAAE,SAAS,EAAE,CAAA;AACpB,YAAY,EAAE,SAAS,EAAE,YAAY,EAAE,CAAA;AACvC,OAAO,EAAE,UAAU,EAAE,CAAA;AAErB,wBAAgB,eAAe,CAAC,EAAE,MAAW,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,OAAY,EAAE,EAAE,oBAAoB,qBAgF3G"}
|
|
@@ -58,6 +58,25 @@ export declare function verticalLabel(verticalId: string): string;
|
|
|
58
58
|
* que é o que um menu precisa ser.
|
|
59
59
|
*/
|
|
60
60
|
export declare function pluginVerticalIndex(catalog: CatalogApp[]): Map<string, string | null>;
|
|
61
|
+
/**
|
|
62
|
+
* Em quais APPS (não ofícios) este módulo aparece — "Estende: ChefControl,
|
|
63
|
+
* FullControl" no card, em vez do rótulo de ofício que `pluginVerticalIndex`
|
|
64
|
+
* já usa para agrupar o catálogo. Duas perguntas diferentes: aquela agrupa a
|
|
65
|
+
* MARKETPLACE por ramo; esta responde, para UM módulo já ligado, quem o
|
|
66
|
+
* hospeda de verdade — e um módulo pode estar em mais de um app.
|
|
67
|
+
*/
|
|
68
|
+
export declare function pluginAppNames(catalog: CatalogApp[], pluginId: string): string[];
|
|
69
|
+
/**
|
|
70
|
+
* Mesmo corte de `pluginVerticalIndex` — maioria estrita dos ofícios —,
|
|
71
|
+
* isolado para responder uma pergunta binária por módulo: este é módulo de
|
|
72
|
+
* TODO negócio (Financeiro, CRM) ou de um ramo em particular (Cozinha)?
|
|
73
|
+
*/
|
|
74
|
+
export declare function isCrossCutting(catalog: CatalogApp[], pluginId: string): boolean;
|
|
75
|
+
/**
|
|
76
|
+
* O texto do badge "Estende: …" no card — ou nada, quando o catálogo não
|
|
77
|
+
* chegou (pool sem `app_catalog()`) ou nenhum app declara o módulo ainda.
|
|
78
|
+
*/
|
|
79
|
+
export declare function appLabelFor(catalog: CatalogApp[], pluginId: string): string | undefined;
|
|
61
80
|
export declare function buildCategories(catalog: CatalogApp[], rows: ModuleRow[]): ModuleCategory[];
|
|
62
81
|
/**
|
|
63
82
|
* Lê `app_catalog()` uma vez por conta.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"module-catalog.d.ts","sourceRoot":"","sources":["../../../src/components/settings/module-catalog.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAE7C;;;;;;;GAOG;AACH,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,GAAG,IAAI,CAAA;IAC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V,KAAK,EAAE,MAAM,CAAA;IACb,0EAA0E;IAC1E,IAAI,EAAE,OAAO,CAAA;IACb,IAAI,EAAE,SAAS,EAAE,CAAA;CAClB;AAED,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM,CAExD;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,UAAU,EAAE,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC,CAyBrF;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,EAAE,CAEhF;AAED;;;;GAIG;AACH,wBAAgB,cAAc,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,OAAO,CAW/E;AAED;;;GAGG;AACH,wBAAgB,WAAW,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAKvF;AAED,wBAAgB,eAAe,CAAC,OAAO,EAAE,UAAU,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,GAAG,cAAc,EAAE,CAiD1F;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,IAAI,UAAU,EAAE,CAkB/C"}
|
|
@@ -22,6 +22,8 @@ interface PersonLinkProps {
|
|
|
22
22
|
kind?: string;
|
|
23
23
|
/** Display name (shown as the clickable text) */
|
|
24
24
|
name: string;
|
|
25
|
+
/** Photo the caller already has; otherwise the card uses the fetched `avatar_url`. */
|
|
26
|
+
avatarUrl?: string | null;
|
|
25
27
|
/** Optional href to navigate to the person's profile */
|
|
26
28
|
profileHref?: string;
|
|
27
29
|
/** Optional tab to open on the detail page (e.g. "schedule") */
|
|
@@ -31,6 +33,6 @@ interface PersonLinkProps {
|
|
|
31
33
|
/** Additional className for the trigger */
|
|
32
34
|
className?: string;
|
|
33
35
|
}
|
|
34
|
-
export declare function PersonLink({ personId, name, lookup, kind, profileHref, tab, size, className }: PersonLinkProps): React.JSX.Element;
|
|
36
|
+
export declare function PersonLink({ personId, name, avatarUrl, lookup, kind, profileHref, tab, size, className }: PersonLinkProps): React.JSX.Element;
|
|
35
37
|
export {};
|
|
36
38
|
//# sourceMappingURL=PersonLink.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PersonLink.d.ts","sourceRoot":"","sources":["../../../src/components/shared/PersonLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAA;AAI5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAWrE,UAAU,eAAe;IACvB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE;QAAE,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAA;KAAE,CAAA;IACxE;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAA;IACZ,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gEAAgE;IAChE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,mBAAmB;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;IACvB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAYD,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,IAAgB,EAAE,SAAS,EAAE,EAAE,eAAe,
|
|
1
|
+
{"version":3,"file":"PersonLink.d.ts","sourceRoot":"","sources":["../../../src/components/shared/PersonLink.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAwC,MAAM,OAAO,CAAA;AAI5D,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAA;AAWrE,UAAU,eAAe;IACvB,kDAAkD;IAClD,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB;;;;;;OAMG;IACH,MAAM,CAAC,EAAE;QAAE,OAAO,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAA;KAAE,CAAA;IACxE;;;;;OAKG;IACH,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,iDAAiD;IACjD,IAAI,EAAE,MAAM,CAAA;IACZ,sFAAsF;IACtF,SAAS,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,wDAAwD;IACxD,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,gEAAgE;IAChE,GAAG,CAAC,EAAE,MAAM,CAAA;IACZ,mBAAmB;IACnB,IAAI,CAAC,EAAE,IAAI,GAAG,SAAS,CAAA;IACvB,2CAA2C;IAC3C,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAYD,wBAAgB,UAAU,CAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,IAAI,EAAE,WAAW,EAAE,GAAG,EAAE,IAAgB,EAAE,SAAS,EAAE,EAAE,eAAe,qBAmOrI"}
|
|
@@ -26,6 +26,14 @@ interface CrudDetailPageProps {
|
|
|
26
26
|
/** Saves ONE field. Absent means read-only — the same signal that already
|
|
27
27
|
* decides the Edit button. */
|
|
28
28
|
onFieldSave?: (key: string, value: unknown) => Promise<void> | void;
|
|
29
|
+
/** Grava TODOS os campos encostados de uma vez.
|
|
30
|
+
*
|
|
31
|
+
* A ficha junta as alterações inline num rascunho e salva pela ilha da
|
|
32
|
+
* shell, então o caminho natural é uma escrita só: três campos corrigidos
|
|
33
|
+
* são um update, uma linha de auditoria e um aviso — não três. Quem não
|
|
34
|
+
* passa isto continua funcionando: a ficha cai em `onFieldSave` campo a
|
|
35
|
+
* campo. */
|
|
36
|
+
onFieldsSave?: (values: Record<string, unknown>) => Promise<void> | void;
|
|
29
37
|
/** Extra badges beside the name — facts ABOUT the record that do not live on
|
|
30
38
|
* it. The org role is the case that forced this: it belongs to the
|
|
31
39
|
* membership, not to the person, so there is no field to render it from and
|
|
@@ -73,6 +81,6 @@ export declare function filterRuntimeTabs(tabs: DetailTab[], ctx: {
|
|
|
73
81
|
}): DetailTab[];
|
|
74
82
|
/** @internal exportado para teste — resolve `DetailTab.icon` contra o lucide. */
|
|
75
83
|
export declare function resolveTabIcon(name: string): LucideIcon | null;
|
|
76
|
-
export declare function CrudDetailPage({ entityDef, item, namePlural, basePath, initialTab, tabPath, onBack, onEdit, onDelete, feature, embedded, onFieldSave, badges, onImageChange, extraActions, }: CrudDetailPageProps): React.JSX.Element;
|
|
84
|
+
export declare function CrudDetailPage({ entityDef, item, namePlural, basePath, initialTab, tabPath, onBack, onEdit, onDelete, feature, embedded, onFieldSave, onFieldsSave, badges, onImageChange, extraActions, }: CrudDetailPageProps): React.JSX.Element;
|
|
77
85
|
export {};
|
|
78
86
|
//# sourceMappingURL=CrudDetailPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudDetailPage.d.ts","sourceRoot":"","sources":["../../src/crud/CrudDetailPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2C,MAAM,OAAO,CAAA;AAG/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAoB9C,OAAO,EAAe,KAAK,UAAU,EAAE,MAAM,wBAAwB,CAAA;AAoBrE,OAAO,KAAK,EAAgB,SAAS,EAAE,QAAQ,EAAc,UAAU,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAEzG,UAAU,mBAAmB;IAC3B,SAAS,EAAE,SAAS,CAAA;IACpB,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CA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B,GAAG,EAAE;IAAE,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC;IAAC,QAAQ,EAAE,OAAO,CAAA;CAAE,GAC/D,SAAS,EAAE,CAKb;AAmCD,iFAAiF;AACjF,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,UAAU,GAAG,IAAI,CAK9D;AAiBD,wBAAgB,cAAc,CAAC,EAC7B,SAAS,EACT,IAAI,EACJ,UAAU,EACV,QAAQ,EACR,UAAU,EACV,OAAO,EACP,MAAM,EACN,MAAM,EACN,QAAQ,EACR,OAAO,EACP,QAAQ,EACR,WAAW,EACX,YAAY,EACZ,MAAM,EACN,aAAa,EACb,YAAY,GACb,EAAE,mBAAmB,qBAkiBrB"}
|
|
@@ -4,7 +4,21 @@ interface CrudFormPageProps {
|
|
|
4
4
|
entityDef: EntityDef;
|
|
5
5
|
mode: 'create' | 'edit';
|
|
6
6
|
initialData?: Record<string, any>;
|
|
7
|
-
|
|
7
|
+
/** Devolver o registro criado é o que permite gravar os filhos que a tela
|
|
8
|
+
* juntou antes de ele existir (ver `relatedSections` na criação). */
|
|
9
|
+
onSubmit: (data: Record<string, any>) => void | Promise<void | {
|
|
10
|
+
id?: string;
|
|
11
|
+
} | null>;
|
|
12
|
+
/**
|
|
13
|
+
* DEPOIS de tudo gravado — inclusive os filhos que esperavam o dono.
|
|
14
|
+
*
|
|
15
|
+
* A navegação morava dentro do `onSubmit` e saía antes deles: a tela ia para
|
|
16
|
+
* a ficha, a seção desmontava, e as linhas que a pessoa tinha montado no
|
|
17
|
+
* formulário sumiam sem erro nenhum. Quem navega é este, no fim da fila.
|
|
18
|
+
*/
|
|
19
|
+
onSaved?: (created: {
|
|
20
|
+
id?: string;
|
|
21
|
+
} | null | void) => void;
|
|
8
22
|
onCancel: () => void;
|
|
9
23
|
namePlural: string;
|
|
10
24
|
/** Embedded mode — no breadcrumb, compact layout. For use inside modals/panels. */
|
|
@@ -69,6 +83,6 @@ export declare function FormFieldItem({ field, value, onChange, allValues, inval
|
|
|
69
83
|
allValues?: Record<string, any>;
|
|
70
84
|
invalid?: boolean;
|
|
71
85
|
}): React.JSX.Element | null;
|
|
72
|
-
export declare function CrudFormPage(
|
|
86
|
+
export declare function CrudFormPage(props: CrudFormPageProps): React.JSX.Element;
|
|
73
87
|
export {};
|
|
74
88
|
//# sourceMappingURL=CrudFormPage.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudFormPage.d.ts","sourceRoot":"","sources":["../../src/crud/CrudFormPage.tsx"],"names":[],"mappings":"AAEA,OAAO,
|
|
1
|
+
{"version":3,"file":"CrudFormPage.d.ts","sourceRoot":"","sources":["../../src/crud/CrudFormPage.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA0C,MAAM,OAAO,CAAA;AAyB9D,OAAO,KAAK,EAAE,QAAQ,EAAc,SAAS,EAAE,MAAM,eAAe,CAAA;AA2CpE,UAAU,iBAAiB;IACzB,SAAS,EAAE,SAAS,CAAA;IACpB,IAAI,EAAE,QAAQ,GAAG,MAAM,CAAA;IACvB,WAAW,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAA;IACjC;0EACsE;IACtE,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,GAAG;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,CAAC,CAAA;IACtF;;;;;;OAMG;IACH,OAAO,CAAC,EAAE,CAAC,OAAO,EAAE;QAAE,EAAE,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,IAAI,GAAG,IAAI,KAAK,IAAI,CAAA;IAC1D,QAAQ,EAAE,MAAM,IAAI,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,mFAAmF;IACnF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB;iFAC6E;IAC7E,cAAc,CAA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,QAAQ,EACR,YAAY,EACZ,OAAO,EACP,YAAY,EACZ,aAAa,EACb,KAAK,EACL,SAAS,EACT,gBAAgB,EAChB,MAAM,EACN,WAAW,EACX,SAAS,EACT,MAAM,EACN,OAAO,EACP,KAAK,GACN,EAAE,iBAAiB,CAAC,CAAC,CAAC,qBA6jBtB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"CrudPage.d.ts","sourceRoot":"","sources":["../../src/crud/CrudPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAUhF,OAAO,EAAgB,KAAK,YAAY,EAAkB,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEjG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;
|
|
1
|
+
{"version":3,"file":"CrudPage.d.ts","sourceRoot":"","sources":["../../src/crud/CrudPage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAUhF,OAAO,EAAgB,KAAK,YAAY,EAAkB,KAAK,UAAU,EAAE,MAAM,gBAAgB,CAAA;AAEjG,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAkB/C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,eAAe,CAAA;AAC9C,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,2BAA2B,CAAA;AAG1D,KAAK,WAAW,GAAG,OAAO,GAAG,OAAO,CAAA;AAYpC,UAAU,aAAa,CAAC,CAAC,SAAS;IAAE,EAAE,EAAE,MAAM,CAAA;CAAE;IAC9C,SAAS,EAAE,SAAS,CAAC,CAAC,CAAC,CAAA;IACvB,QAAQ,EAAE,MAAM,SAAS,CAAC,CAAC,CAAC,CAAA;IAC5B,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,WAAW,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,OAAO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