@dyrected/core 2.20.1 → 2.22.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/{app-YGoigpOH.d.cts → app-BBHBP-6V.d.cts} +79 -3
- package/dist/{app-YGoigpOH.d.ts → app-BBHBP-6V.d.ts} +79 -3
- package/dist/index.cjs +43 -5
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +43 -5
- package/dist/server.cjs +43 -5
- package/dist/server.d.cts +2 -2
- package/dist/server.d.ts +2 -2
- package/dist/server.js +43 -5
- package/package.json +1 -1
|
@@ -714,9 +714,48 @@ type MetricColor = 'purple' | 'emerald' | 'amber' | 'rose' | 'blue' | 'indigo' |
|
|
|
714
714
|
* }
|
|
715
715
|
* ```
|
|
716
716
|
*/
|
|
717
|
+
interface ViewMetricGroupByConfig {
|
|
718
|
+
/** Field or relationship name to group by. */
|
|
719
|
+
field: string;
|
|
720
|
+
/** Maximum number of groups to evaluate (defaults to 12). */
|
|
721
|
+
limit?: number;
|
|
722
|
+
/** Optional explicit ordering: `'count'` (descending) or `'asc'` / `'desc'`. */
|
|
723
|
+
orderBy?: 'count' | 'asc' | 'desc';
|
|
724
|
+
/** Optional where filter when discovering groups. */
|
|
725
|
+
where?: Record<string, unknown>;
|
|
726
|
+
/** Time interval bucket when grouping by a date or datetime field: `'day' | 'week' | 'month' | 'quarter' | 'year'`. */
|
|
727
|
+
bucket?: 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
728
|
+
}
|
|
729
|
+
type ViewMetricGroupBy = string | ViewMetricGroupByConfig;
|
|
730
|
+
/**
|
|
731
|
+
* Period-over-period trend delta configuration for KPI metrics.
|
|
732
|
+
*/
|
|
733
|
+
interface ViewMetricTrendConfig {
|
|
734
|
+
/** Date or datetime field used to partition the evaluation period. Defaults to "createdAt". */
|
|
735
|
+
dateField?: string;
|
|
736
|
+
/**
|
|
737
|
+
* Comparison period:
|
|
738
|
+
* - "previous_period": compares the current evaluation window against the immediate preceding window of equal duration
|
|
739
|
+
* - "previous_day": compares against the same interval yesterday
|
|
740
|
+
* - "previous_month": compares against the same interval last month
|
|
741
|
+
* - "previous_week": compares against the same interval last week
|
|
742
|
+
* - "previous_year": compares against the same interval last year
|
|
743
|
+
* Defaults to "previous_period".
|
|
744
|
+
*/
|
|
745
|
+
period?: 'previous_period' | 'previous_day' | 'previous_week' | 'previous_month' | 'previous_year';
|
|
746
|
+
/**
|
|
747
|
+
* By default, positive growth is styled with emerald/up and reduction with rose/down.
|
|
748
|
+
* Set `invertColors: true` for inverted metrics where an increase is undesirable (e.g. churn, bounce rate, error counts).
|
|
749
|
+
*/
|
|
750
|
+
invertColors?: boolean;
|
|
751
|
+
}
|
|
717
752
|
interface ViewSubMetric {
|
|
718
|
-
/** Short label for the sub-metric (e.g. "Pending", "Collected"). */
|
|
753
|
+
/** Short label for the sub-metric (e.g. "Pending", "Collected"). Supports `{{group.label}}` and `{{group.value}}` when `groupBy` is used. */
|
|
719
754
|
label: string;
|
|
755
|
+
/** Filter scope override for this sub-metric: `'view' | 'filtered' | 'collection'`. Defaults to parent metric's scope. */
|
|
756
|
+
scope?: 'view' | 'filtered' | 'collection';
|
|
757
|
+
/** Dynamic breakdown: groups this sub-metric by a field or relationship, expanding into multiple sub-metric rows in the card footer. */
|
|
758
|
+
groupBy?: ViewMetricGroupBy;
|
|
720
759
|
/** Single database aggregate operation. */
|
|
721
760
|
aggregate?: AggregateOperation;
|
|
722
761
|
/** Map of named aggregate operations referenced in `expression` as `aggregates.key`. */
|
|
@@ -725,10 +764,14 @@ interface ViewSubMetric {
|
|
|
725
764
|
transform?: string;
|
|
726
765
|
/** JEXL math formula evaluated over `aggregates` (e.g. `"aggregates.a - aggregates.b"`). */
|
|
727
766
|
expression?: string;
|
|
767
|
+
/** Optional accent color for this sub-metric item and its distribution bar segment. */
|
|
768
|
+
color?: MetricColor;
|
|
728
769
|
/** Display formatter: `'currency' | 'number' | 'percent'`. */
|
|
729
770
|
format?: 'currency' | 'number' | 'percent' | string;
|
|
730
771
|
/** 3-letter currency code (e.g. `"USD"`, `"NGN"`, `"EUR"`) used when `format: "currency"`. */
|
|
731
772
|
currency?: string;
|
|
773
|
+
/** Period-over-period trend delta comparison configuration. */
|
|
774
|
+
trend?: ViewMetricTrendConfig;
|
|
732
775
|
}
|
|
733
776
|
/**
|
|
734
777
|
* Configuration for a KPI summary card rendered at the top of an operational view.
|
|
@@ -747,12 +790,22 @@ interface ViewSubMetric {
|
|
|
747
790
|
* ```
|
|
748
791
|
*/
|
|
749
792
|
interface ViewMetric {
|
|
750
|
-
/** Title displayed on the metric card header. */
|
|
793
|
+
/** Title displayed on the metric card header. Supports `{{group.label}}` and `{{group.value}}` when `groupBy` is used. */
|
|
751
794
|
label: string;
|
|
752
795
|
/** Accent color for the card's visual indicator. */
|
|
753
796
|
color?: MetricColor;
|
|
754
797
|
/** Unit badge shown alongside the numeric value (e.g. `"Guests"`, `"Orders"`, `"Tables"`). */
|
|
755
798
|
unit?: string;
|
|
799
|
+
/**
|
|
800
|
+
* Filter scope for this metric card:
|
|
801
|
+
* - `'view'`: evaluates within the view's base filter (default)
|
|
802
|
+
* - `'filtered'`: live summary reflecting active table/toolbar filters & search
|
|
803
|
+
* - `'collection'`: global collection totals ignoring view filters
|
|
804
|
+
* Defaults to view's `metricsScope` (or `'view'`).
|
|
805
|
+
*/
|
|
806
|
+
scope?: 'view' | 'filtered' | 'collection';
|
|
807
|
+
/** Dynamic breakdown: groups this metric by a field or relationship, expanding into 1 card per group. */
|
|
808
|
+
groupBy?: ViewMetricGroupBy;
|
|
756
809
|
/** Single database aggregate operation (`count`, `distinctCount`, `sum`, `avg`, `min`, `max`). */
|
|
757
810
|
aggregate?: AggregateOperation;
|
|
758
811
|
/** Map of named aggregate operations referenced in `expression` as `aggregates.key`. */
|
|
@@ -765,6 +818,22 @@ interface ViewMetric {
|
|
|
765
818
|
format?: 'currency' | 'number' | 'percent' | string;
|
|
766
819
|
/** 3-letter currency code (e.g. `"USD"`, `"NGN"`, `"EUR"`) used when `format: "currency"`. */
|
|
767
820
|
currency?: string;
|
|
821
|
+
/** Period-over-period trend delta comparison configuration. */
|
|
822
|
+
trend?: ViewMetricTrendConfig;
|
|
823
|
+
/**
|
|
824
|
+
* Responsive column span for this metric card in the metrics grid:
|
|
825
|
+
* - `1`: standard single card width (default)
|
|
826
|
+
* - `2`: spans 2 columns on medium screens and up
|
|
827
|
+
* - `3`: spans 3 columns on large screens and up
|
|
828
|
+
* - `4`: spans 4 columns on extra large screens
|
|
829
|
+
* - `'full'`: spans the full width of the metrics grid
|
|
830
|
+
*/
|
|
831
|
+
span?: 1 | 2 | 3 | 4 | 'full';
|
|
832
|
+
/**
|
|
833
|
+
* Controls the horizontal segmented distribution bar for sub-metrics.
|
|
834
|
+
* Defaults to `true` when 2 or more sub-metrics have numerical values. Set to `false` to disable.
|
|
835
|
+
*/
|
|
836
|
+
showDistribution?: boolean;
|
|
768
837
|
/** Optional secondary breakdown items shown in the card footer. */
|
|
769
838
|
subMetrics?: ViewSubMetric[];
|
|
770
839
|
}
|
|
@@ -868,6 +937,13 @@ interface ViewConfigBase {
|
|
|
868
937
|
actionOrder?: string[];
|
|
869
938
|
/** KPI summary cards rendered in the hero row above the view. */
|
|
870
939
|
metrics?: ViewMetric[];
|
|
940
|
+
/**
|
|
941
|
+
* Default filter scope for all metric cards in this view:
|
|
942
|
+
* - `'view'`: evaluates within the view's base filter (default)
|
|
943
|
+
* - `'filtered'`: live summary reflecting active table/toolbar filters & search
|
|
944
|
+
* - `'collection'`: global collection totals ignoring view filters
|
|
945
|
+
*/
|
|
946
|
+
metricsScope?: 'view' | 'filtered' | 'collection';
|
|
871
947
|
/** Optional real-time counter badge or status indicator displayed on this view in navigation and tabs. */
|
|
872
948
|
badge?: NavBadgeConfig | string;
|
|
873
949
|
/** Custom component slots rendered around this operational view. */
|
|
@@ -4474,4 +4550,4 @@ interface DyrectedContext {
|
|
|
4474
4550
|
*/
|
|
4475
4551
|
declare function createDyrectedApp(rawConfig: DyrectedConfig | any): Promise<Hono<DyrectedContext, hono_types.BlankSchema, "/">>;
|
|
4476
4552
|
|
|
4477
|
-
export { type RelationshipField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailTab as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailTabsOptions as I, type DetailTabs as J, type DetailTextOptions as K, type LifecycleEventName as L, type DetailText as M, type DetailSchema as N, type DyrectedContext as O, type PublicAdminAuthConfig as P, type AIConfig as Q, type AIPIIConfig as R, type IdStrategy as S, type TaskRunResult as T, type CompiledNavTree as U, type CompiledNavItem as V, type WorkflowConfig as W, type UserNavigationPreferences as X, type DefineWorkspaceOptions as Y, type ViewConfig as Z, type DateTimeField as _, type DeclarativeHookExpression as a, type AggregateArgs as a$, type SelectField as a0, type ArrayField as a1, type FieldType as a2, type BooleanField as a3, type AuthConfig as a4, type AccessPolicyResolver as a5, type DateField as a6, type TextField as a7, type EmailField as a8, type IconField as a9, AI_ACTIONS_COLLECTION as aA, AI_AUDIT_COLLECTION as aB, AI_CHUNKS_COLLECTION as aC, AI_MESSAGES_COLLECTION as aD, AI_THREADS_COLLECTION as aE, type AccessConfig as aF, type AccessFunction as aG, type AccessFunctionArgs as aH, type AccessResult as aI, type AccessRule as aJ, type ActionConfig as aK, type ActionConfigBase as aL, type ActionConfigWithHandler as aM, type ActionConfigWithMutation as aN, type ActionContext as aO, type ActionType as aP, type AdminAuthAccessResolution as aQ, type AdminAuthClaimMapping as aR, type AdminAuthMember as aS, type AdminAuthProvider as aT, type AdminAuthProviderMembersConfig as aU, type AdminAuthProvisioningMode as aV, type AdminAuthResolveAccessArgs as aW, type AdminAuthResolvedIdentity as aX, type AdminConfig as aY, type AdminDashboardComponentSlots as aZ, type AdminIconName as a_, type ImageField as aa, type JoinField as ab, type JsonField as ac, type MoneyField as ad, type MultiSelectField as ae, type NumberField as af, type ObjectField as ag, type RadioField as ah, type RichTextField as ai, type RowField as aj, type TextareaField as ak, type TimeField as al, type UrlField as am, type AIAction as an, type AIActionStatus as ao, type AIActionType as ap, type AIAuditActionType as aq, type AIAuditRecord as ar, type AIChunk as as, type AIMessage as at, type AIPIIPattern as au, type AIRateLimitResult as av, type AIRateLimitStore as aw, type AIThread as ax, type AIToolContext as ay, type AIToolDefinition as az, type AuthenticatedUser as b, type DynamicOptionsResolverArgs as b$, type AggregateCastType as b0, type AggregateCollectionResult as b1, type AggregateInput as b2, type AggregateOperation as b3, type AggregateResult as b4, type AppTrashConfig as b5, type BaseAdminAuthProvider as b6, type BaseFieldAdmin as b7, type BlockVariant as b8, type BlocksField as b9, type CollectionRAGConfig as bA, type CollectionSchemaResult as bB, type CollectionSummaryResult as bC, type CollectionViewComponentSlots as bD, type CompiledNavGroup as bE, type CountOperation as bF, type CustomAdminAuthProvider as bG, DEFAULT_USER_NAV_PREFERENCES as bH, type DateFieldAdmin as bI, type DateFormat as bJ, type DefaultValueContext as bK, type DefineActionOptions as bL, type DefineCalendarViewOptions as bM, type DefineCardsViewOptions as bN, type DefineGanttViewOptions as bO, type DefineKanbanViewOptions as bP, type DefineTableViewOptions as bQ, type DefineViewBaseOptions as bR, type DefineViewOptions as bS, type DetailSpan as bT, type DisplayTone as bU, type DisplayVariant as bV, type DistinctCountOperation as bW, type DistinctValuesOperation as bX, type DynamicOptionItem as bY, type DynamicOptionsConfig as bZ, type DynamicOptionsResolver as b_, type BooleanFieldAdmin as ba, type BooleanFormat as bb, CURRENT_NAV_PREFERENCES_VERSION as bc, type CalendarViewConfig as bd, type CardsViewConfig as be, type CharacterLimitFieldAdmin as bf, type CharacterLimitFieldConfig as bg, type CollectionAfterChangeHook as bh, type CollectionAfterDeleteHook as bi, type CollectionAfterReadHook as bj, type CollectionAfterReadHookEntry as bk, type CollectionAfterRestoreHook as bl, type CollectionAfterTransitionHook as bm, type CollectionAfterTrashHook as bn, type CollectionBeforeChangeHook as bo, type CollectionBeforeChangeHookEntry as bp, type CollectionBeforeCommitHook as bq, type CollectionBeforeDeleteHook as br, type CollectionBeforeReadHook as bs, type CollectionBeforeReadHookEntry as bt, type CollectionBeforeRestoreHook as bu, type CollectionBeforeTransitionHook as bv, type CollectionBeforeTrashHook as bw, type CollectionEmailConfig as bx, type CollectionIndex as by, type CollectionListComponentSlots as bz, type WorkflowTransition as c, type PublicAdminAuthProvider as c$, type DyrectedAIContext as c0, type DyrectedLoggerConfig as c1, type DyrectedObservabilityConfig as c2, type EmailFieldAdmin as c3, type EmailTemplateArgs as c4, type EmailTemplateResult as c5, type FieldAdminHooks as c6, type FieldAdminOnChangeHook as c7, type FieldAdminOnChangeHookArgs as c8, type FieldAdminOptionsHook as c9, type ImageTransformOptions as cA, type InferAggregateResult as cB, type JoinFieldAdmin as cC, type JsonFieldAdmin as cD, type JsonFormat as cE, type KanbanViewConfig as cF, LIFECYCLE_EVENT_NAMES as cG, type LifecycleEventHandler as cH, type LinkFormat as cI, type MetricColor as cJ, type MoneyFieldAdmin as cK, type MoneyFieldConfig as cL, type MultiSelectFieldAdmin as cM, type NamedAccessPolicy as cN, type NavBadgeConfig as cO, type NavGroup as cP, type NumberFieldAdmin as cQ, type NumberFormat as cR, type NumberLimitFieldAdmin as cS, type NumberLimitFieldConfig as cT, type NumericOperation as cU, type NumericUpdateOperator as cV, type OIDCAdminAuthProvider as cW, type OptionFormat as cX, type OutboundEmail as cY, type PaginatedResult as cZ, type PinnedNavItemRef as c_, type FieldAdminOptionsHookArgs as ca, type FieldAdminOptionsHookResult as cb, type FieldAfterReadHook as cc, type FieldAfterReadHookArgs as cd, type FieldBase as ce, type FieldBeforeChangeHook as cf, type FieldBeforeChangeHookArgs as cg, type FieldHook as ch, type FieldHooks as ci, type FileData as cj, type GanttViewConfig as ck, type GetDocumentResult as cl, type GlobalAfterChangeHook as cm, type GlobalAfterReadHook as cn, type GlobalAfterReadHookEntry as co, type GlobalBeforeChangeHook as cp, type GlobalBeforeChangeHookEntry as cq, type GlobalBeforeReadHook as cr, type GlobalBeforeReadHookEntry as cs, type GlobalRAGConfig as ct, type GlobalSchemaResult as cu, type GlobalSummaryResult as cv, type HeadingLevel as cw, type HookFunction as cx, type IconFieldAdmin as cy, type ImageService as cz, type LifecycleEvent as d,
|
|
4553
|
+
export { type RelationshipField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailTab as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailTabsOptions as I, type DetailTabs as J, type DetailTextOptions as K, type LifecycleEventName as L, type DetailText as M, type DetailSchema as N, type DyrectedContext as O, type PublicAdminAuthConfig as P, type AIConfig as Q, type AIPIIConfig as R, type IdStrategy as S, type TaskRunResult as T, type CompiledNavTree as U, type CompiledNavItem as V, type WorkflowConfig as W, type UserNavigationPreferences as X, type DefineWorkspaceOptions as Y, type ViewConfig as Z, type DateTimeField as _, type DeclarativeHookExpression as a, type AggregateArgs as a$, type SelectField as a0, type ArrayField as a1, type FieldType as a2, type BooleanField as a3, type AuthConfig as a4, type AccessPolicyResolver as a5, type DateField as a6, type TextField as a7, type EmailField as a8, type IconField as a9, AI_ACTIONS_COLLECTION as aA, AI_AUDIT_COLLECTION as aB, AI_CHUNKS_COLLECTION as aC, AI_MESSAGES_COLLECTION as aD, AI_THREADS_COLLECTION as aE, type AccessConfig as aF, type AccessFunction as aG, type AccessFunctionArgs as aH, type AccessResult as aI, type AccessRule as aJ, type ActionConfig as aK, type ActionConfigBase as aL, type ActionConfigWithHandler as aM, type ActionConfigWithMutation as aN, type ActionContext as aO, type ActionType as aP, type AdminAuthAccessResolution as aQ, type AdminAuthClaimMapping as aR, type AdminAuthMember as aS, type AdminAuthProvider as aT, type AdminAuthProviderMembersConfig as aU, type AdminAuthProvisioningMode as aV, type AdminAuthResolveAccessArgs as aW, type AdminAuthResolvedIdentity as aX, type AdminConfig as aY, type AdminDashboardComponentSlots as aZ, type AdminIconName as a_, type ImageField as aa, type JoinField as ab, type JsonField as ac, type MoneyField as ad, type MultiSelectField as ae, type NumberField as af, type ObjectField as ag, type RadioField as ah, type RichTextField as ai, type RowField as aj, type TextareaField as ak, type TimeField as al, type UrlField as am, type AIAction as an, type AIActionStatus as ao, type AIActionType as ap, type AIAuditActionType as aq, type AIAuditRecord as ar, type AIChunk as as, type AIMessage as at, type AIPIIPattern as au, type AIRateLimitResult as av, type AIRateLimitStore as aw, type AIThread as ax, type AIToolContext as ay, type AIToolDefinition as az, type AuthenticatedUser as b, type DynamicOptionsResolverArgs as b$, type AggregateCastType as b0, type AggregateCollectionResult as b1, type AggregateInput as b2, type AggregateOperation as b3, type AggregateResult as b4, type AppTrashConfig as b5, type BaseAdminAuthProvider as b6, type BaseFieldAdmin as b7, type BlockVariant as b8, type BlocksField as b9, type CollectionRAGConfig as bA, type CollectionSchemaResult as bB, type CollectionSummaryResult as bC, type CollectionViewComponentSlots as bD, type CompiledNavGroup as bE, type CountOperation as bF, type CustomAdminAuthProvider as bG, DEFAULT_USER_NAV_PREFERENCES as bH, type DateFieldAdmin as bI, type DateFormat as bJ, type DefaultValueContext as bK, type DefineActionOptions as bL, type DefineCalendarViewOptions as bM, type DefineCardsViewOptions as bN, type DefineGanttViewOptions as bO, type DefineKanbanViewOptions as bP, type DefineTableViewOptions as bQ, type DefineViewBaseOptions as bR, type DefineViewOptions as bS, type DetailSpan as bT, type DisplayTone as bU, type DisplayVariant as bV, type DistinctCountOperation as bW, type DistinctValuesOperation as bX, type DynamicOptionItem as bY, type DynamicOptionsConfig as bZ, type DynamicOptionsResolver as b_, type BooleanFieldAdmin as ba, type BooleanFormat as bb, CURRENT_NAV_PREFERENCES_VERSION as bc, type CalendarViewConfig as bd, type CardsViewConfig as be, type CharacterLimitFieldAdmin as bf, type CharacterLimitFieldConfig as bg, type CollectionAfterChangeHook as bh, type CollectionAfterDeleteHook as bi, type CollectionAfterReadHook as bj, type CollectionAfterReadHookEntry as bk, type CollectionAfterRestoreHook as bl, type CollectionAfterTransitionHook as bm, type CollectionAfterTrashHook as bn, type CollectionBeforeChangeHook as bo, type CollectionBeforeChangeHookEntry as bp, type CollectionBeforeCommitHook as bq, type CollectionBeforeDeleteHook as br, type CollectionBeforeReadHook as bs, type CollectionBeforeReadHookEntry as bt, type CollectionBeforeRestoreHook as bu, type CollectionBeforeTransitionHook as bv, type CollectionBeforeTrashHook as bw, type CollectionEmailConfig as bx, type CollectionIndex as by, type CollectionListComponentSlots as bz, type WorkflowTransition as c, type PublicAdminAuthProvider as c$, type DyrectedAIContext as c0, type DyrectedLoggerConfig as c1, type DyrectedObservabilityConfig as c2, type EmailFieldAdmin as c3, type EmailTemplateArgs as c4, type EmailTemplateResult as c5, type FieldAdminHooks as c6, type FieldAdminOnChangeHook as c7, type FieldAdminOnChangeHookArgs as c8, type FieldAdminOptionsHook as c9, type ImageTransformOptions as cA, type InferAggregateResult as cB, type JoinFieldAdmin as cC, type JsonFieldAdmin as cD, type JsonFormat as cE, type KanbanViewConfig as cF, LIFECYCLE_EVENT_NAMES as cG, type LifecycleEventHandler as cH, type LinkFormat as cI, type MetricColor as cJ, type MoneyFieldAdmin as cK, type MoneyFieldConfig as cL, type MultiSelectFieldAdmin as cM, type NamedAccessPolicy as cN, type NavBadgeConfig as cO, type NavGroup as cP, type NumberFieldAdmin as cQ, type NumberFormat as cR, type NumberLimitFieldAdmin as cS, type NumberLimitFieldConfig as cT, type NumericOperation as cU, type NumericUpdateOperator as cV, type OIDCAdminAuthProvider as cW, type OptionFormat as cX, type OutboundEmail as cY, type PaginatedResult as cZ, type PinnedNavItemRef as c_, type FieldAdminOptionsHookArgs as ca, type FieldAdminOptionsHookResult as cb, type FieldAfterReadHook as cc, type FieldAfterReadHookArgs as cd, type FieldBase as ce, type FieldBeforeChangeHook as cf, type FieldBeforeChangeHookArgs as cg, type FieldHook as ch, type FieldHooks as ci, type FileData as cj, type GanttViewConfig as ck, type GetDocumentResult as cl, type GlobalAfterChangeHook as cm, type GlobalAfterReadHook as cn, type GlobalAfterReadHookEntry as co, type GlobalBeforeChangeHook as cp, type GlobalBeforeChangeHookEntry as cq, type GlobalBeforeReadHook as cr, type GlobalBeforeReadHookEntry as cs, type GlobalRAGConfig as ct, type GlobalSchemaResult as cu, type GlobalSummaryResult as cv, type HeadingLevel as cw, type HookFunction as cx, type IconFieldAdmin as cy, type ImageService as cz, type LifecycleEvent as d, type ResolvedObservabilityConfig as d$, type QueryCollectionResult as d0, type RAGSearchResult as d1, type RadioFieldAdmin as d2, type RateLimitConfig as d3, type ReadonlyDatabaseAdapter as d4, type RichTextFeature as d5, type RichTextFieldConfig as d6, type SelectFieldAdmin as d7, type SqlWhereResult as d8, type StorageAdapter as d9, type WordLimitFieldAdmin as dA, type WordLimitFieldConfig as dB, type WorkflowMetadata as dC, type WorkflowOnTransitionContext as dD, type WorkflowOnTransitionHook as dE, type WorkflowRole as dF, type WorkflowState as dG, type WorkflowTransitionContext as dH, coerceBooleanWhere as dI, defineAction as dJ, defineCalendarView as dK, defineCardsView as dL, defineGanttView as dM, defineKanbanView as dN, defineTableView as dO, defineView as dP, defineWorkspace as dQ, isAICollection as dR, parseMongoWhere as dS, parseSqlWhere as dT, type CollectionTokenPayload as dU, DEFAULT_INVITE_EXPIRY as dV, DEFAULT_RESET_PASSWORD_EXPIRY as dW, DEFAULT_SESSION_EXPIRY as dX, type DyrectedObservabilityRuntime as dY, type RequestBodyCapture as dZ, type RequestTraceContext as d_, type TableViewConfig as da, type TaskContext as db, type TaskLogger as dc, type TaskRunStatus as dd, type TextFieldAdmin as de, type TextFormat as df, type TextareaFieldAdmin as dg, type TrashConfig as dh, type TrustProxyConfig as di, type TypedField as dj, type UploadConfig as dk, type UrlFieldAdmin as dl, type UrlLinkValue as dm, type ViewActionFeatures as dn, type ViewComponentSlots as dp, type ViewConfigBase as dq, type ViewLayout as dr, type ViewMetric as ds, type ViewMetricGroupBy as dt, type ViewMetricGroupByConfig as du, type ViewMetricTrendConfig as dv, type ViewSubMetric as dw, type WhereClause as dx, type WhereOperator as dy, type WhereOperatorName as dz, type DatabaseAdapter as e, attachRequestMetrics as e0, bindObservabilityRuntime as e1, buildRequestLogger as e2, captureRequestBody as e3, createDyrectedApp as e4, createObservabilityRuntime as e5, createRequestSpan as e6, decodeCollectionToken as e7, endRequestSpan as e8, getConfigLogger as e9, getObservabilityRuntime as ea, getRequestLogger as eb, redactBody as ec, redactHeaders as ed, renderPrometheusMetrics as ee, resolveInviteTokenExpiry as ef, resolveObservabilityConfig as eg, resolveResetPasswordTokenExpiry as eh, resolveSessionTokenExpiry as ei, shouldSampleRequest as ej, signCollectionToken as ek, verifyCollectionToken as el, type BaseDocument as f, type TaskConfig as g, type DetailActionOptions as h, type DetailAction as i, type DetailComputedOptions as j, type ComputedHandler as k, type DetailComputed as l, type DetailCustomOptions as m, type DetailCustom as n, type DetailDividerOptions as o, type DetailDivider as p, type DisplayFieldOptions as q, type DetailField as r, type DetailItem as s, type DetailGridOptions as t, type DetailGrid as u, type DetailRepeatOptions as v, type DetailRepeat as w, type DetailSectionOptions as x, type DetailSection as y, type DetailTabOptions as z };
|
|
@@ -714,9 +714,48 @@ type MetricColor = 'purple' | 'emerald' | 'amber' | 'rose' | 'blue' | 'indigo' |
|
|
|
714
714
|
* }
|
|
715
715
|
* ```
|
|
716
716
|
*/
|
|
717
|
+
interface ViewMetricGroupByConfig {
|
|
718
|
+
/** Field or relationship name to group by. */
|
|
719
|
+
field: string;
|
|
720
|
+
/** Maximum number of groups to evaluate (defaults to 12). */
|
|
721
|
+
limit?: number;
|
|
722
|
+
/** Optional explicit ordering: `'count'` (descending) or `'asc'` / `'desc'`. */
|
|
723
|
+
orderBy?: 'count' | 'asc' | 'desc';
|
|
724
|
+
/** Optional where filter when discovering groups. */
|
|
725
|
+
where?: Record<string, unknown>;
|
|
726
|
+
/** Time interval bucket when grouping by a date or datetime field: `'day' | 'week' | 'month' | 'quarter' | 'year'`. */
|
|
727
|
+
bucket?: 'day' | 'week' | 'month' | 'quarter' | 'year';
|
|
728
|
+
}
|
|
729
|
+
type ViewMetricGroupBy = string | ViewMetricGroupByConfig;
|
|
730
|
+
/**
|
|
731
|
+
* Period-over-period trend delta configuration for KPI metrics.
|
|
732
|
+
*/
|
|
733
|
+
interface ViewMetricTrendConfig {
|
|
734
|
+
/** Date or datetime field used to partition the evaluation period. Defaults to "createdAt". */
|
|
735
|
+
dateField?: string;
|
|
736
|
+
/**
|
|
737
|
+
* Comparison period:
|
|
738
|
+
* - "previous_period": compares the current evaluation window against the immediate preceding window of equal duration
|
|
739
|
+
* - "previous_day": compares against the same interval yesterday
|
|
740
|
+
* - "previous_month": compares against the same interval last month
|
|
741
|
+
* - "previous_week": compares against the same interval last week
|
|
742
|
+
* - "previous_year": compares against the same interval last year
|
|
743
|
+
* Defaults to "previous_period".
|
|
744
|
+
*/
|
|
745
|
+
period?: 'previous_period' | 'previous_day' | 'previous_week' | 'previous_month' | 'previous_year';
|
|
746
|
+
/**
|
|
747
|
+
* By default, positive growth is styled with emerald/up and reduction with rose/down.
|
|
748
|
+
* Set `invertColors: true` for inverted metrics where an increase is undesirable (e.g. churn, bounce rate, error counts).
|
|
749
|
+
*/
|
|
750
|
+
invertColors?: boolean;
|
|
751
|
+
}
|
|
717
752
|
interface ViewSubMetric {
|
|
718
|
-
/** Short label for the sub-metric (e.g. "Pending", "Collected"). */
|
|
753
|
+
/** Short label for the sub-metric (e.g. "Pending", "Collected"). Supports `{{group.label}}` and `{{group.value}}` when `groupBy` is used. */
|
|
719
754
|
label: string;
|
|
755
|
+
/** Filter scope override for this sub-metric: `'view' | 'filtered' | 'collection'`. Defaults to parent metric's scope. */
|
|
756
|
+
scope?: 'view' | 'filtered' | 'collection';
|
|
757
|
+
/** Dynamic breakdown: groups this sub-metric by a field or relationship, expanding into multiple sub-metric rows in the card footer. */
|
|
758
|
+
groupBy?: ViewMetricGroupBy;
|
|
720
759
|
/** Single database aggregate operation. */
|
|
721
760
|
aggregate?: AggregateOperation;
|
|
722
761
|
/** Map of named aggregate operations referenced in `expression` as `aggregates.key`. */
|
|
@@ -725,10 +764,14 @@ interface ViewSubMetric {
|
|
|
725
764
|
transform?: string;
|
|
726
765
|
/** JEXL math formula evaluated over `aggregates` (e.g. `"aggregates.a - aggregates.b"`). */
|
|
727
766
|
expression?: string;
|
|
767
|
+
/** Optional accent color for this sub-metric item and its distribution bar segment. */
|
|
768
|
+
color?: MetricColor;
|
|
728
769
|
/** Display formatter: `'currency' | 'number' | 'percent'`. */
|
|
729
770
|
format?: 'currency' | 'number' | 'percent' | string;
|
|
730
771
|
/** 3-letter currency code (e.g. `"USD"`, `"NGN"`, `"EUR"`) used when `format: "currency"`. */
|
|
731
772
|
currency?: string;
|
|
773
|
+
/** Period-over-period trend delta comparison configuration. */
|
|
774
|
+
trend?: ViewMetricTrendConfig;
|
|
732
775
|
}
|
|
733
776
|
/**
|
|
734
777
|
* Configuration for a KPI summary card rendered at the top of an operational view.
|
|
@@ -747,12 +790,22 @@ interface ViewSubMetric {
|
|
|
747
790
|
* ```
|
|
748
791
|
*/
|
|
749
792
|
interface ViewMetric {
|
|
750
|
-
/** Title displayed on the metric card header. */
|
|
793
|
+
/** Title displayed on the metric card header. Supports `{{group.label}}` and `{{group.value}}` when `groupBy` is used. */
|
|
751
794
|
label: string;
|
|
752
795
|
/** Accent color for the card's visual indicator. */
|
|
753
796
|
color?: MetricColor;
|
|
754
797
|
/** Unit badge shown alongside the numeric value (e.g. `"Guests"`, `"Orders"`, `"Tables"`). */
|
|
755
798
|
unit?: string;
|
|
799
|
+
/**
|
|
800
|
+
* Filter scope for this metric card:
|
|
801
|
+
* - `'view'`: evaluates within the view's base filter (default)
|
|
802
|
+
* - `'filtered'`: live summary reflecting active table/toolbar filters & search
|
|
803
|
+
* - `'collection'`: global collection totals ignoring view filters
|
|
804
|
+
* Defaults to view's `metricsScope` (or `'view'`).
|
|
805
|
+
*/
|
|
806
|
+
scope?: 'view' | 'filtered' | 'collection';
|
|
807
|
+
/** Dynamic breakdown: groups this metric by a field or relationship, expanding into 1 card per group. */
|
|
808
|
+
groupBy?: ViewMetricGroupBy;
|
|
756
809
|
/** Single database aggregate operation (`count`, `distinctCount`, `sum`, `avg`, `min`, `max`). */
|
|
757
810
|
aggregate?: AggregateOperation;
|
|
758
811
|
/** Map of named aggregate operations referenced in `expression` as `aggregates.key`. */
|
|
@@ -765,6 +818,22 @@ interface ViewMetric {
|
|
|
765
818
|
format?: 'currency' | 'number' | 'percent' | string;
|
|
766
819
|
/** 3-letter currency code (e.g. `"USD"`, `"NGN"`, `"EUR"`) used when `format: "currency"`. */
|
|
767
820
|
currency?: string;
|
|
821
|
+
/** Period-over-period trend delta comparison configuration. */
|
|
822
|
+
trend?: ViewMetricTrendConfig;
|
|
823
|
+
/**
|
|
824
|
+
* Responsive column span for this metric card in the metrics grid:
|
|
825
|
+
* - `1`: standard single card width (default)
|
|
826
|
+
* - `2`: spans 2 columns on medium screens and up
|
|
827
|
+
* - `3`: spans 3 columns on large screens and up
|
|
828
|
+
* - `4`: spans 4 columns on extra large screens
|
|
829
|
+
* - `'full'`: spans the full width of the metrics grid
|
|
830
|
+
*/
|
|
831
|
+
span?: 1 | 2 | 3 | 4 | 'full';
|
|
832
|
+
/**
|
|
833
|
+
* Controls the horizontal segmented distribution bar for sub-metrics.
|
|
834
|
+
* Defaults to `true` when 2 or more sub-metrics have numerical values. Set to `false` to disable.
|
|
835
|
+
*/
|
|
836
|
+
showDistribution?: boolean;
|
|
768
837
|
/** Optional secondary breakdown items shown in the card footer. */
|
|
769
838
|
subMetrics?: ViewSubMetric[];
|
|
770
839
|
}
|
|
@@ -868,6 +937,13 @@ interface ViewConfigBase {
|
|
|
868
937
|
actionOrder?: string[];
|
|
869
938
|
/** KPI summary cards rendered in the hero row above the view. */
|
|
870
939
|
metrics?: ViewMetric[];
|
|
940
|
+
/**
|
|
941
|
+
* Default filter scope for all metric cards in this view:
|
|
942
|
+
* - `'view'`: evaluates within the view's base filter (default)
|
|
943
|
+
* - `'filtered'`: live summary reflecting active table/toolbar filters & search
|
|
944
|
+
* - `'collection'`: global collection totals ignoring view filters
|
|
945
|
+
*/
|
|
946
|
+
metricsScope?: 'view' | 'filtered' | 'collection';
|
|
871
947
|
/** Optional real-time counter badge or status indicator displayed on this view in navigation and tabs. */
|
|
872
948
|
badge?: NavBadgeConfig | string;
|
|
873
949
|
/** Custom component slots rendered around this operational view. */
|
|
@@ -4474,4 +4550,4 @@ interface DyrectedContext {
|
|
|
4474
4550
|
*/
|
|
4475
4551
|
declare function createDyrectedApp(rawConfig: DyrectedConfig | any): Promise<Hono<DyrectedContext, hono_types.BlankSchema, "/">>;
|
|
4476
4552
|
|
|
4477
|
-
export { type RelationshipField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailTab as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailTabsOptions as I, type DetailTabs as J, type DetailTextOptions as K, type LifecycleEventName as L, type DetailText as M, type DetailSchema as N, type DyrectedContext as O, type PublicAdminAuthConfig as P, type AIConfig as Q, type AIPIIConfig as R, type IdStrategy as S, type TaskRunResult as T, type CompiledNavTree as U, type CompiledNavItem as V, type WorkflowConfig as W, type UserNavigationPreferences as X, type DefineWorkspaceOptions as Y, type ViewConfig as Z, type DateTimeField as _, type DeclarativeHookExpression as a, type AggregateArgs as a$, type SelectField as a0, type ArrayField as a1, type FieldType as a2, type BooleanField as a3, type AuthConfig as a4, type AccessPolicyResolver as a5, type DateField as a6, type TextField as a7, type EmailField as a8, type IconField as a9, AI_ACTIONS_COLLECTION as aA, AI_AUDIT_COLLECTION as aB, AI_CHUNKS_COLLECTION as aC, AI_MESSAGES_COLLECTION as aD, AI_THREADS_COLLECTION as aE, type AccessConfig as aF, type AccessFunction as aG, type AccessFunctionArgs as aH, type AccessResult as aI, type AccessRule as aJ, type ActionConfig as aK, type ActionConfigBase as aL, type ActionConfigWithHandler as aM, type ActionConfigWithMutation as aN, type ActionContext as aO, type ActionType as aP, type AdminAuthAccessResolution as aQ, type AdminAuthClaimMapping as aR, type AdminAuthMember as aS, type AdminAuthProvider as aT, type AdminAuthProviderMembersConfig as aU, type AdminAuthProvisioningMode as aV, type AdminAuthResolveAccessArgs as aW, type AdminAuthResolvedIdentity as aX, type AdminConfig as aY, type AdminDashboardComponentSlots as aZ, type AdminIconName as a_, type ImageField as aa, type JoinField as ab, type JsonField as ac, type MoneyField as ad, type MultiSelectField as ae, type NumberField as af, type ObjectField as ag, type RadioField as ah, type RichTextField as ai, type RowField as aj, type TextareaField as ak, type TimeField as al, type UrlField as am, type AIAction as an, type AIActionStatus as ao, type AIActionType as ap, type AIAuditActionType as aq, type AIAuditRecord as ar, type AIChunk as as, type AIMessage as at, type AIPIIPattern as au, type AIRateLimitResult as av, type AIRateLimitStore as aw, type AIThread as ax, type AIToolContext as ay, type AIToolDefinition as az, type AuthenticatedUser as b, type DynamicOptionsResolverArgs as b$, type AggregateCastType as b0, type AggregateCollectionResult as b1, type AggregateInput as b2, type AggregateOperation as b3, type AggregateResult as b4, type AppTrashConfig as b5, type BaseAdminAuthProvider as b6, type BaseFieldAdmin as b7, type BlockVariant as b8, type BlocksField as b9, type CollectionRAGConfig as bA, type CollectionSchemaResult as bB, type CollectionSummaryResult as bC, type CollectionViewComponentSlots as bD, type CompiledNavGroup as bE, type CountOperation as bF, type CustomAdminAuthProvider as bG, DEFAULT_USER_NAV_PREFERENCES as bH, type DateFieldAdmin as bI, type DateFormat as bJ, type DefaultValueContext as bK, type DefineActionOptions as bL, type DefineCalendarViewOptions as bM, type DefineCardsViewOptions as bN, type DefineGanttViewOptions as bO, type DefineKanbanViewOptions as bP, type DefineTableViewOptions as bQ, type DefineViewBaseOptions as bR, type DefineViewOptions as bS, type DetailSpan as bT, type DisplayTone as bU, type DisplayVariant as bV, type DistinctCountOperation as bW, type DistinctValuesOperation as bX, type DynamicOptionItem as bY, type DynamicOptionsConfig as bZ, type DynamicOptionsResolver as b_, type BooleanFieldAdmin as ba, type BooleanFormat as bb, CURRENT_NAV_PREFERENCES_VERSION as bc, type CalendarViewConfig as bd, type CardsViewConfig as be, type CharacterLimitFieldAdmin as bf, type CharacterLimitFieldConfig as bg, type CollectionAfterChangeHook as bh, type CollectionAfterDeleteHook as bi, type CollectionAfterReadHook as bj, type CollectionAfterReadHookEntry as bk, type CollectionAfterRestoreHook as bl, type CollectionAfterTransitionHook as bm, type CollectionAfterTrashHook as bn, type CollectionBeforeChangeHook as bo, type CollectionBeforeChangeHookEntry as bp, type CollectionBeforeCommitHook as bq, type CollectionBeforeDeleteHook as br, type CollectionBeforeReadHook as bs, type CollectionBeforeReadHookEntry as bt, type CollectionBeforeRestoreHook as bu, type CollectionBeforeTransitionHook as bv, type CollectionBeforeTrashHook as bw, type CollectionEmailConfig as bx, type CollectionIndex as by, type CollectionListComponentSlots as bz, type WorkflowTransition as c, type PublicAdminAuthProvider as c$, type DyrectedAIContext as c0, type DyrectedLoggerConfig as c1, type DyrectedObservabilityConfig as c2, type EmailFieldAdmin as c3, type EmailTemplateArgs as c4, type EmailTemplateResult as c5, type FieldAdminHooks as c6, type FieldAdminOnChangeHook as c7, type FieldAdminOnChangeHookArgs as c8, type FieldAdminOptionsHook as c9, type ImageTransformOptions as cA, type InferAggregateResult as cB, type JoinFieldAdmin as cC, type JsonFieldAdmin as cD, type JsonFormat as cE, type KanbanViewConfig as cF, LIFECYCLE_EVENT_NAMES as cG, type LifecycleEventHandler as cH, type LinkFormat as cI, type MetricColor as cJ, type MoneyFieldAdmin as cK, type MoneyFieldConfig as cL, type MultiSelectFieldAdmin as cM, type NamedAccessPolicy as cN, type NavBadgeConfig as cO, type NavGroup as cP, type NumberFieldAdmin as cQ, type NumberFormat as cR, type NumberLimitFieldAdmin as cS, type NumberLimitFieldConfig as cT, type NumericOperation as cU, type NumericUpdateOperator as cV, type OIDCAdminAuthProvider as cW, type OptionFormat as cX, type OutboundEmail as cY, type PaginatedResult as cZ, type PinnedNavItemRef as c_, type FieldAdminOptionsHookArgs as ca, type FieldAdminOptionsHookResult as cb, type FieldAfterReadHook as cc, type FieldAfterReadHookArgs as cd, type FieldBase as ce, type FieldBeforeChangeHook as cf, type FieldBeforeChangeHookArgs as cg, type FieldHook as ch, type FieldHooks as ci, type FileData as cj, type GanttViewConfig as ck, type GetDocumentResult as cl, type GlobalAfterChangeHook as cm, type GlobalAfterReadHook as cn, type GlobalAfterReadHookEntry as co, type GlobalBeforeChangeHook as cp, type GlobalBeforeChangeHookEntry as cq, type GlobalBeforeReadHook as cr, type GlobalBeforeReadHookEntry as cs, type GlobalRAGConfig as ct, type GlobalSchemaResult as cu, type GlobalSummaryResult as cv, type HeadingLevel as cw, type HookFunction as cx, type IconFieldAdmin as cy, type ImageService as cz, type LifecycleEvent as d,
|
|
4553
|
+
export { type RelationshipField as $, type AdminAuthConfig as A, type Block as B, type CollectionConfig as C, type DyrectedConfig as D, type DetailTab as E, type Field as F, type GlobalConfig as G, type HookRequestContext as H, type DetailTabsOptions as I, type DetailTabs as J, type DetailTextOptions as K, type LifecycleEventName as L, type DetailText as M, type DetailSchema as N, type DyrectedContext as O, type PublicAdminAuthConfig as P, type AIConfig as Q, type AIPIIConfig as R, type IdStrategy as S, type TaskRunResult as T, type CompiledNavTree as U, type CompiledNavItem as V, type WorkflowConfig as W, type UserNavigationPreferences as X, type DefineWorkspaceOptions as Y, type ViewConfig as Z, type DateTimeField as _, type DeclarativeHookExpression as a, type AggregateArgs as a$, type SelectField as a0, type ArrayField as a1, type FieldType as a2, type BooleanField as a3, type AuthConfig as a4, type AccessPolicyResolver as a5, type DateField as a6, type TextField as a7, type EmailField as a8, type IconField as a9, AI_ACTIONS_COLLECTION as aA, AI_AUDIT_COLLECTION as aB, AI_CHUNKS_COLLECTION as aC, AI_MESSAGES_COLLECTION as aD, AI_THREADS_COLLECTION as aE, type AccessConfig as aF, type AccessFunction as aG, type AccessFunctionArgs as aH, type AccessResult as aI, type AccessRule as aJ, type ActionConfig as aK, type ActionConfigBase as aL, type ActionConfigWithHandler as aM, type ActionConfigWithMutation as aN, type ActionContext as aO, type ActionType as aP, type AdminAuthAccessResolution as aQ, type AdminAuthClaimMapping as aR, type AdminAuthMember as aS, type AdminAuthProvider as aT, type AdminAuthProviderMembersConfig as aU, type AdminAuthProvisioningMode as aV, type AdminAuthResolveAccessArgs as aW, type AdminAuthResolvedIdentity as aX, type AdminConfig as aY, type AdminDashboardComponentSlots as aZ, type AdminIconName as a_, type ImageField as aa, type JoinField as ab, type JsonField as ac, type MoneyField as ad, type MultiSelectField as ae, type NumberField as af, type ObjectField as ag, type RadioField as ah, type RichTextField as ai, type RowField as aj, type TextareaField as ak, type TimeField as al, type UrlField as am, type AIAction as an, type AIActionStatus as ao, type AIActionType as ap, type AIAuditActionType as aq, type AIAuditRecord as ar, type AIChunk as as, type AIMessage as at, type AIPIIPattern as au, type AIRateLimitResult as av, type AIRateLimitStore as aw, type AIThread as ax, type AIToolContext as ay, type AIToolDefinition as az, type AuthenticatedUser as b, type DynamicOptionsResolverArgs as b$, type AggregateCastType as b0, type AggregateCollectionResult as b1, type AggregateInput as b2, type AggregateOperation as b3, type AggregateResult as b4, type AppTrashConfig as b5, type BaseAdminAuthProvider as b6, type BaseFieldAdmin as b7, type BlockVariant as b8, type BlocksField as b9, type CollectionRAGConfig as bA, type CollectionSchemaResult as bB, type CollectionSummaryResult as bC, type CollectionViewComponentSlots as bD, type CompiledNavGroup as bE, type CountOperation as bF, type CustomAdminAuthProvider as bG, DEFAULT_USER_NAV_PREFERENCES as bH, type DateFieldAdmin as bI, type DateFormat as bJ, type DefaultValueContext as bK, type DefineActionOptions as bL, type DefineCalendarViewOptions as bM, type DefineCardsViewOptions as bN, type DefineGanttViewOptions as bO, type DefineKanbanViewOptions as bP, type DefineTableViewOptions as bQ, type DefineViewBaseOptions as bR, type DefineViewOptions as bS, type DetailSpan as bT, type DisplayTone as bU, type DisplayVariant as bV, type DistinctCountOperation as bW, type DistinctValuesOperation as bX, type DynamicOptionItem as bY, type DynamicOptionsConfig as bZ, type DynamicOptionsResolver as b_, type BooleanFieldAdmin as ba, type BooleanFormat as bb, CURRENT_NAV_PREFERENCES_VERSION as bc, type CalendarViewConfig as bd, type CardsViewConfig as be, type CharacterLimitFieldAdmin as bf, type CharacterLimitFieldConfig as bg, type CollectionAfterChangeHook as bh, type CollectionAfterDeleteHook as bi, type CollectionAfterReadHook as bj, type CollectionAfterReadHookEntry as bk, type CollectionAfterRestoreHook as bl, type CollectionAfterTransitionHook as bm, type CollectionAfterTrashHook as bn, type CollectionBeforeChangeHook as bo, type CollectionBeforeChangeHookEntry as bp, type CollectionBeforeCommitHook as bq, type CollectionBeforeDeleteHook as br, type CollectionBeforeReadHook as bs, type CollectionBeforeReadHookEntry as bt, type CollectionBeforeRestoreHook as bu, type CollectionBeforeTransitionHook as bv, type CollectionBeforeTrashHook as bw, type CollectionEmailConfig as bx, type CollectionIndex as by, type CollectionListComponentSlots as bz, type WorkflowTransition as c, type PublicAdminAuthProvider as c$, type DyrectedAIContext as c0, type DyrectedLoggerConfig as c1, type DyrectedObservabilityConfig as c2, type EmailFieldAdmin as c3, type EmailTemplateArgs as c4, type EmailTemplateResult as c5, type FieldAdminHooks as c6, type FieldAdminOnChangeHook as c7, type FieldAdminOnChangeHookArgs as c8, type FieldAdminOptionsHook as c9, type ImageTransformOptions as cA, type InferAggregateResult as cB, type JoinFieldAdmin as cC, type JsonFieldAdmin as cD, type JsonFormat as cE, type KanbanViewConfig as cF, LIFECYCLE_EVENT_NAMES as cG, type LifecycleEventHandler as cH, type LinkFormat as cI, type MetricColor as cJ, type MoneyFieldAdmin as cK, type MoneyFieldConfig as cL, type MultiSelectFieldAdmin as cM, type NamedAccessPolicy as cN, type NavBadgeConfig as cO, type NavGroup as cP, type NumberFieldAdmin as cQ, type NumberFormat as cR, type NumberLimitFieldAdmin as cS, type NumberLimitFieldConfig as cT, type NumericOperation as cU, type NumericUpdateOperator as cV, type OIDCAdminAuthProvider as cW, type OptionFormat as cX, type OutboundEmail as cY, type PaginatedResult as cZ, type PinnedNavItemRef as c_, type FieldAdminOptionsHookArgs as ca, type FieldAdminOptionsHookResult as cb, type FieldAfterReadHook as cc, type FieldAfterReadHookArgs as cd, type FieldBase as ce, type FieldBeforeChangeHook as cf, type FieldBeforeChangeHookArgs as cg, type FieldHook as ch, type FieldHooks as ci, type FileData as cj, type GanttViewConfig as ck, type GetDocumentResult as cl, type GlobalAfterChangeHook as cm, type GlobalAfterReadHook as cn, type GlobalAfterReadHookEntry as co, type GlobalBeforeChangeHook as cp, type GlobalBeforeChangeHookEntry as cq, type GlobalBeforeReadHook as cr, type GlobalBeforeReadHookEntry as cs, type GlobalRAGConfig as ct, type GlobalSchemaResult as cu, type GlobalSummaryResult as cv, type HeadingLevel as cw, type HookFunction as cx, type IconFieldAdmin as cy, type ImageService as cz, type LifecycleEvent as d, type ResolvedObservabilityConfig as d$, type QueryCollectionResult as d0, type RAGSearchResult as d1, type RadioFieldAdmin as d2, type RateLimitConfig as d3, type ReadonlyDatabaseAdapter as d4, type RichTextFeature as d5, type RichTextFieldConfig as d6, type SelectFieldAdmin as d7, type SqlWhereResult as d8, type StorageAdapter as d9, type WordLimitFieldAdmin as dA, type WordLimitFieldConfig as dB, type WorkflowMetadata as dC, type WorkflowOnTransitionContext as dD, type WorkflowOnTransitionHook as dE, type WorkflowRole as dF, type WorkflowState as dG, type WorkflowTransitionContext as dH, coerceBooleanWhere as dI, defineAction as dJ, defineCalendarView as dK, defineCardsView as dL, defineGanttView as dM, defineKanbanView as dN, defineTableView as dO, defineView as dP, defineWorkspace as dQ, isAICollection as dR, parseMongoWhere as dS, parseSqlWhere as dT, type CollectionTokenPayload as dU, DEFAULT_INVITE_EXPIRY as dV, DEFAULT_RESET_PASSWORD_EXPIRY as dW, DEFAULT_SESSION_EXPIRY as dX, type DyrectedObservabilityRuntime as dY, type RequestBodyCapture as dZ, type RequestTraceContext as d_, type TableViewConfig as da, type TaskContext as db, type TaskLogger as dc, type TaskRunStatus as dd, type TextFieldAdmin as de, type TextFormat as df, type TextareaFieldAdmin as dg, type TrashConfig as dh, type TrustProxyConfig as di, type TypedField as dj, type UploadConfig as dk, type UrlFieldAdmin as dl, type UrlLinkValue as dm, type ViewActionFeatures as dn, type ViewComponentSlots as dp, type ViewConfigBase as dq, type ViewLayout as dr, type ViewMetric as ds, type ViewMetricGroupBy as dt, type ViewMetricGroupByConfig as du, type ViewMetricTrendConfig as dv, type ViewSubMetric as dw, type WhereClause as dx, type WhereOperator as dy, type WhereOperatorName as dz, type DatabaseAdapter as e, attachRequestMetrics as e0, bindObservabilityRuntime as e1, buildRequestLogger as e2, captureRequestBody as e3, createDyrectedApp as e4, createObservabilityRuntime as e5, createRequestSpan as e6, decodeCollectionToken as e7, endRequestSpan as e8, getConfigLogger as e9, getObservabilityRuntime as ea, getRequestLogger as eb, redactBody as ec, redactHeaders as ed, renderPrometheusMetrics as ee, resolveInviteTokenExpiry as ef, resolveObservabilityConfig as eg, resolveResetPasswordTokenExpiry as eh, resolveSessionTokenExpiry as ei, shouldSampleRequest as ej, signCollectionToken as ek, verifyCollectionToken as el, type BaseDocument as f, type TaskConfig as g, type DetailActionOptions as h, type DetailAction as i, type DetailComputedOptions as j, type ComputedHandler as k, type DetailComputed as l, type DetailCustomOptions as m, type DetailCustom as n, type DetailDividerOptions as o, type DetailDivider as p, type DisplayFieldOptions as q, type DetailField as r, type DetailItem as s, type DetailGridOptions as t, type DetailGrid as u, type DetailRepeatOptions as v, type DetailRepeat as w, type DetailSectionOptions as x, type DetailSection as y, type DetailTabOptions as z };
|
package/dist/index.cjs
CHANGED
|
@@ -8065,8 +8065,19 @@ function reconcileNavigation(baseTree, prefs, schemas, options) {
|
|
|
8065
8065
|
}
|
|
8066
8066
|
}
|
|
8067
8067
|
for (const itemOpt of effectivePrefs.items || []) {
|
|
8068
|
-
const
|
|
8069
|
-
|
|
8068
|
+
const itemId = itemOpt.slug ? `workspace_${itemOpt.slug}` : itemOpt.collection ? `collection_${itemOpt.collection}` : `custom_${Math.random()}`;
|
|
8069
|
+
let existingItem;
|
|
8070
|
+
let existingParentGroup;
|
|
8071
|
+
for (const g of groupsList) {
|
|
8072
|
+
const found = g.items.find((i) => i.id === itemId || i.slug === itemOpt.slug);
|
|
8073
|
+
if (found) {
|
|
8074
|
+
existingItem = found;
|
|
8075
|
+
existingParentGroup = g;
|
|
8076
|
+
break;
|
|
8077
|
+
}
|
|
8078
|
+
}
|
|
8079
|
+
const targetGroup = typeof itemOpt.group === "object" ? itemOpt.group?.name : itemOpt.group || existingParentGroup?.name || "Custom";
|
|
8080
|
+
const groupKey = targetGroup;
|
|
8070
8081
|
let group = findGroup(groupKey);
|
|
8071
8082
|
if (!group) {
|
|
8072
8083
|
group = {
|
|
@@ -8080,18 +8091,45 @@ function reconcileNavigation(baseTree, prefs, schemas, options) {
|
|
|
8080
8091
|
};
|
|
8081
8092
|
groupsList.push(group);
|
|
8082
8093
|
}
|
|
8083
|
-
const itemId = itemOpt.slug ? `workspace_${itemOpt.slug}` : itemOpt.collection ? `collection_${itemOpt.collection}` : `custom_${Math.random()}`;
|
|
8084
8094
|
for (const otherGroup of groupsList) {
|
|
8085
8095
|
if (otherGroup !== group) {
|
|
8086
8096
|
otherGroup.items = otherGroup.items.filter((i) => i.slug !== itemOpt.slug && i.id !== itemId);
|
|
8087
8097
|
}
|
|
8088
8098
|
}
|
|
8089
8099
|
const existingIndex = group.items.findIndex((i) => i.id === itemId || i.slug === itemOpt.slug);
|
|
8090
|
-
|
|
8100
|
+
if (existingIndex >= 0) {
|
|
8101
|
+
existingItem = group.items[existingIndex];
|
|
8102
|
+
}
|
|
8091
8103
|
const col = schemas?.collections?.find((c) => c.slug === itemOpt.collection);
|
|
8092
8104
|
const colViews = col?.views || [];
|
|
8093
8105
|
const baseViews = existingItem?.views || [];
|
|
8094
|
-
const userViews = itemOpt.views || []
|
|
8106
|
+
const userViews = (itemOpt.views || []).map((uv) => {
|
|
8107
|
+
const bv = baseViews.find((b) => b.slug === uv.slug);
|
|
8108
|
+
if (!bv) return uv;
|
|
8109
|
+
const metricsScope = uv.metricsScope ?? bv.metricsScope;
|
|
8110
|
+
let metrics = uv.metrics;
|
|
8111
|
+
if (Array.isArray(uv.metrics) && Array.isArray(bv.metrics)) {
|
|
8112
|
+
metrics = uv.metrics.map((um) => {
|
|
8113
|
+
const bm = bv.metrics?.find((m) => m.label === um.label);
|
|
8114
|
+
if (!bm) return um;
|
|
8115
|
+
return {
|
|
8116
|
+
...bm,
|
|
8117
|
+
...um,
|
|
8118
|
+
scope: um.scope ?? bm.scope,
|
|
8119
|
+
groupBy: um.groupBy ?? bm.groupBy,
|
|
8120
|
+
subMetrics: um.subMetrics ?? bm.subMetrics
|
|
8121
|
+
};
|
|
8122
|
+
});
|
|
8123
|
+
} else if (!uv.metrics && bv.metrics) {
|
|
8124
|
+
metrics = bv.metrics;
|
|
8125
|
+
}
|
|
8126
|
+
return {
|
|
8127
|
+
...bv,
|
|
8128
|
+
...uv,
|
|
8129
|
+
metricsScope,
|
|
8130
|
+
metrics
|
|
8131
|
+
};
|
|
8132
|
+
});
|
|
8095
8133
|
const userViewSlugs = new Set(userViews.map((v) => v.slug));
|
|
8096
8134
|
let mergedViews = [
|
|
8097
8135
|
...baseViews.filter((v) => !userViewSlugs.has(v.slug)),
|
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as Field, B as Block, C as CollectionConfig, D as DyrectedConfig, A as AdminAuthConfig, P as PublicAdminAuthConfig, G as GlobalConfig, a as DeclarativeHookExpression, W as WorkflowConfig, b as AuthenticatedUser, c as WorkflowTransition, L as LifecycleEventName, d as LifecycleEvent, e as DatabaseAdapter, f as BaseDocument, H as HookRequestContext, T as TaskRunResult, g as TaskConfig, h as DetailActionOptions, i as DetailAction, j as DetailComputedOptions, k as ComputedHandler, l as DetailComputed, m as DetailCustomOptions, n as DetailCustom, o as DetailDividerOptions, p as DetailDivider, q as DisplayFieldOptions, r as DetailField, s as DetailItem, t as DetailGridOptions, u as DetailGrid, v as DetailRepeatOptions, w as DetailRepeat, x as DetailSectionOptions, y as DetailSection, z as DetailTabOptions, E as DetailTab, I as DetailTabsOptions, J as DetailTabs, K as DetailTextOptions, M as DetailText, N as DetailSchema, O as DyrectedContext, Q as AIConfig, R as AIPIIConfig, S as IdStrategy, U as CompiledNavTree, V as CompiledNavItem, X as UserNavigationPreferences, Y as DefineWorkspaceOptions, Z as ViewConfig, _ as DateTimeField, $ as RelationshipField, a0 as SelectField, a1 as ArrayField, a2 as FieldType, a3 as BooleanField, a4 as AuthConfig, a5 as AccessPolicyResolver, a6 as DateField, a7 as TextField, a8 as EmailField, a9 as IconField, aa as ImageField, ab as JoinField, ac as JsonField, ad as MoneyField, ae as MultiSelectField, af as NumberField, ag as ObjectField, ah as RadioField, ai as RichTextField, aj as RowField, ak as TextareaField, al as TimeField, am as UrlField } from './app-
|
|
2
|
-
export { an as AIAction, ao as AIActionStatus, ap as AIActionType, aq as AIAuditActionType, ar as AIAuditRecord, as as AIChunk, at as AIMessage, au as AIPIIPattern, av as AIRateLimitResult, aw as AIRateLimitStore, ax as AIThread, ay as AIToolContext, az as AIToolDefinition, aA as AI_ACTIONS_COLLECTION, aB as AI_AUDIT_COLLECTION, aC as AI_CHUNKS_COLLECTION, aD as AI_MESSAGES_COLLECTION, aE as AI_THREADS_COLLECTION, aF as AccessConfig, aG as AccessFunction, aH as AccessFunctionArgs, aI as AccessResult, aJ as AccessRule, aK as ActionConfig, aL as ActionConfigBase, aM as ActionConfigWithHandler, aN as ActionConfigWithMutation, aO as ActionContext, aP as ActionType, aQ as AdminAuthAccessResolution, aR as AdminAuthClaimMapping, aS as AdminAuthMember, aT as AdminAuthProvider, aU as AdminAuthProviderMembersConfig, aV as AdminAuthProvisioningMode, aW as AdminAuthResolveAccessArgs, aX as AdminAuthResolvedIdentity, aY as AdminConfig, aZ as AdminDashboardComponentSlots, a_ as AdminIconName, a$ as AggregateArgs, b0 as AggregateCastType, b1 as AggregateCollectionResult, b2 as AggregateInput, b3 as AggregateOperation, b4 as AggregateResult, b5 as AppTrashConfig, b6 as BaseAdminAuthProvider, b7 as BaseFieldAdmin, b8 as BlockVariant, b9 as BlocksField, ba as BooleanFieldAdmin, bb as BooleanFormat, bc as CURRENT_NAV_PREFERENCES_VERSION, bd as CalendarViewConfig, be as CardsViewConfig, bf as CharacterLimitFieldAdmin, bg as CharacterLimitFieldConfig, bh as CollectionAfterChangeHook, bi as CollectionAfterDeleteHook, bj as CollectionAfterReadHook, bk as CollectionAfterReadHookEntry, bl as CollectionAfterRestoreHook, bm as CollectionAfterTransitionHook, bn as CollectionAfterTrashHook, bo as CollectionBeforeChangeHook, bp as CollectionBeforeChangeHookEntry, bq as CollectionBeforeCommitHook, br as CollectionBeforeDeleteHook, bs as CollectionBeforeReadHook, bt as CollectionBeforeReadHookEntry, bu as CollectionBeforeRestoreHook, bv as CollectionBeforeTransitionHook, bw as CollectionBeforeTrashHook, bx as CollectionEmailConfig, by as CollectionIndex, bz as CollectionListComponentSlots, bA as CollectionRAGConfig, bB as CollectionSchemaResult, bC as CollectionSummaryResult, bD as CollectionViewComponentSlots, bE as CompiledNavGroup, bF as CountOperation, bG as CustomAdminAuthProvider, bH as DEFAULT_USER_NAV_PREFERENCES, bI as DateFieldAdmin, bJ as DateFormat, bK as DefaultValueContext, bL as DefineActionOptions, bM as DefineCalendarViewOptions, bN as DefineCardsViewOptions, bO as DefineGanttViewOptions, bP as DefineKanbanViewOptions, bQ as DefineTableViewOptions, bR as DefineViewBaseOptions, bS as DefineViewOptions, bT as DetailSpan, bU as DisplayTone, bV as DisplayVariant, bW as DistinctCountOperation, bX as DistinctValuesOperation, bY as DynamicOptionItem, bZ as DynamicOptionsConfig, b_ as DynamicOptionsResolver, b$ as DynamicOptionsResolverArgs, c0 as DyrectedAIContext, c1 as DyrectedLoggerConfig, c2 as DyrectedObservabilityConfig, c3 as EmailFieldAdmin, c4 as EmailTemplateArgs, c5 as EmailTemplateResult, c6 as FieldAdminHooks, c7 as FieldAdminOnChangeHook, c8 as FieldAdminOnChangeHookArgs, c9 as FieldAdminOptionsHook, ca as FieldAdminOptionsHookArgs, cb as FieldAdminOptionsHookResult, cc as FieldAfterReadHook, cd as FieldAfterReadHookArgs, ce as FieldBase, cf as FieldBeforeChangeHook, cg as FieldBeforeChangeHookArgs, ch as FieldHook, ci as FieldHooks, cj as FileData, ck as GanttViewConfig, cl as GetDocumentResult, cm as GlobalAfterChangeHook, cn as GlobalAfterReadHook, co as GlobalAfterReadHookEntry, cp as GlobalBeforeChangeHook, cq as GlobalBeforeChangeHookEntry, cr as GlobalBeforeReadHook, cs as GlobalBeforeReadHookEntry, ct as GlobalRAGConfig, cu as GlobalSchemaResult, cv as GlobalSummaryResult, cw as HeadingLevel, cx as HookFunction, cy as IconFieldAdmin, cz as ImageService, cA as ImageTransformOptions, cB as InferAggregateResult, cC as JoinFieldAdmin, cD as JsonFieldAdmin, cE as JsonFormat, cF as KanbanViewConfig, cG as LIFECYCLE_EVENT_NAMES, cH as LifecycleEventHandler, cI as LinkFormat, cJ as MetricColor, cK as MoneyFieldAdmin, cL as MoneyFieldConfig, cM as MultiSelectFieldAdmin, cN as NamedAccessPolicy, cO as NavBadgeConfig, cP as NavGroup, cQ as NumberFieldAdmin, cR as NumberFormat, cS as NumberLimitFieldAdmin, cT as NumberLimitFieldConfig, cU as NumericOperation, cV as NumericUpdateOperator, cW as OIDCAdminAuthProvider, cX as OptionFormat, cY as OutboundEmail, cZ as PaginatedResult, c_ as PinnedNavItemRef, c$ as PublicAdminAuthProvider, d0 as QueryCollectionResult, d1 as RAGSearchResult, d2 as RadioFieldAdmin, d3 as RateLimitConfig, d4 as ReadonlyDatabaseAdapter, d5 as RichTextFeature, d6 as RichTextFieldConfig, d7 as SelectFieldAdmin, d8 as SqlWhereResult, d9 as StorageAdapter, da as TableViewConfig, db as TaskContext, dc as TaskLogger, dd as TaskRunStatus, de as TextFieldAdmin, df as TextFormat, dg as TextareaFieldAdmin, dh as TrashConfig, di as TrustProxyConfig, dj as TypedField, dk as UploadConfig, dl as UrlFieldAdmin, dm as UrlLinkValue, dn as ViewActionFeatures, dp as ViewComponentSlots, dq as ViewConfigBase, dr as ViewLayout, ds as ViewMetric, dt as
|
|
1
|
+
import { F as Field, B as Block, C as CollectionConfig, D as DyrectedConfig, A as AdminAuthConfig, P as PublicAdminAuthConfig, G as GlobalConfig, a as DeclarativeHookExpression, W as WorkflowConfig, b as AuthenticatedUser, c as WorkflowTransition, L as LifecycleEventName, d as LifecycleEvent, e as DatabaseAdapter, f as BaseDocument, H as HookRequestContext, T as TaskRunResult, g as TaskConfig, h as DetailActionOptions, i as DetailAction, j as DetailComputedOptions, k as ComputedHandler, l as DetailComputed, m as DetailCustomOptions, n as DetailCustom, o as DetailDividerOptions, p as DetailDivider, q as DisplayFieldOptions, r as DetailField, s as DetailItem, t as DetailGridOptions, u as DetailGrid, v as DetailRepeatOptions, w as DetailRepeat, x as DetailSectionOptions, y as DetailSection, z as DetailTabOptions, E as DetailTab, I as DetailTabsOptions, J as DetailTabs, K as DetailTextOptions, M as DetailText, N as DetailSchema, O as DyrectedContext, Q as AIConfig, R as AIPIIConfig, S as IdStrategy, U as CompiledNavTree, V as CompiledNavItem, X as UserNavigationPreferences, Y as DefineWorkspaceOptions, Z as ViewConfig, _ as DateTimeField, $ as RelationshipField, a0 as SelectField, a1 as ArrayField, a2 as FieldType, a3 as BooleanField, a4 as AuthConfig, a5 as AccessPolicyResolver, a6 as DateField, a7 as TextField, a8 as EmailField, a9 as IconField, aa as ImageField, ab as JoinField, ac as JsonField, ad as MoneyField, ae as MultiSelectField, af as NumberField, ag as ObjectField, ah as RadioField, ai as RichTextField, aj as RowField, ak as TextareaField, al as TimeField, am as UrlField } from './app-BBHBP-6V.cjs';
|
|
2
|
+
export { an as AIAction, ao as AIActionStatus, ap as AIActionType, aq as AIAuditActionType, ar as AIAuditRecord, as as AIChunk, at as AIMessage, au as AIPIIPattern, av as AIRateLimitResult, aw as AIRateLimitStore, ax as AIThread, ay as AIToolContext, az as AIToolDefinition, aA as AI_ACTIONS_COLLECTION, aB as AI_AUDIT_COLLECTION, aC as AI_CHUNKS_COLLECTION, aD as AI_MESSAGES_COLLECTION, aE as AI_THREADS_COLLECTION, aF as AccessConfig, aG as AccessFunction, aH as AccessFunctionArgs, aI as AccessResult, aJ as AccessRule, aK as ActionConfig, aL as ActionConfigBase, aM as ActionConfigWithHandler, aN as ActionConfigWithMutation, aO as ActionContext, aP as ActionType, aQ as AdminAuthAccessResolution, aR as AdminAuthClaimMapping, aS as AdminAuthMember, aT as AdminAuthProvider, aU as AdminAuthProviderMembersConfig, aV as AdminAuthProvisioningMode, aW as AdminAuthResolveAccessArgs, aX as AdminAuthResolvedIdentity, aY as AdminConfig, aZ as AdminDashboardComponentSlots, a_ as AdminIconName, a$ as AggregateArgs, b0 as AggregateCastType, b1 as AggregateCollectionResult, b2 as AggregateInput, b3 as AggregateOperation, b4 as AggregateResult, b5 as AppTrashConfig, b6 as BaseAdminAuthProvider, b7 as BaseFieldAdmin, b8 as BlockVariant, b9 as BlocksField, ba as BooleanFieldAdmin, bb as BooleanFormat, bc as CURRENT_NAV_PREFERENCES_VERSION, bd as CalendarViewConfig, be as CardsViewConfig, bf as CharacterLimitFieldAdmin, bg as CharacterLimitFieldConfig, bh as CollectionAfterChangeHook, bi as CollectionAfterDeleteHook, bj as CollectionAfterReadHook, bk as CollectionAfterReadHookEntry, bl as CollectionAfterRestoreHook, bm as CollectionAfterTransitionHook, bn as CollectionAfterTrashHook, bo as CollectionBeforeChangeHook, bp as CollectionBeforeChangeHookEntry, bq as CollectionBeforeCommitHook, br as CollectionBeforeDeleteHook, bs as CollectionBeforeReadHook, bt as CollectionBeforeReadHookEntry, bu as CollectionBeforeRestoreHook, bv as CollectionBeforeTransitionHook, bw as CollectionBeforeTrashHook, bx as CollectionEmailConfig, by as CollectionIndex, bz as CollectionListComponentSlots, bA as CollectionRAGConfig, bB as CollectionSchemaResult, bC as CollectionSummaryResult, bD as CollectionViewComponentSlots, bE as CompiledNavGroup, bF as CountOperation, bG as CustomAdminAuthProvider, bH as DEFAULT_USER_NAV_PREFERENCES, bI as DateFieldAdmin, bJ as DateFormat, bK as DefaultValueContext, bL as DefineActionOptions, bM as DefineCalendarViewOptions, bN as DefineCardsViewOptions, bO as DefineGanttViewOptions, bP as DefineKanbanViewOptions, bQ as DefineTableViewOptions, bR as DefineViewBaseOptions, bS as DefineViewOptions, bT as DetailSpan, bU as DisplayTone, bV as DisplayVariant, bW as DistinctCountOperation, bX as DistinctValuesOperation, bY as DynamicOptionItem, bZ as DynamicOptionsConfig, b_ as DynamicOptionsResolver, b$ as DynamicOptionsResolverArgs, c0 as DyrectedAIContext, c1 as DyrectedLoggerConfig, c2 as DyrectedObservabilityConfig, c3 as EmailFieldAdmin, c4 as EmailTemplateArgs, c5 as EmailTemplateResult, c6 as FieldAdminHooks, c7 as FieldAdminOnChangeHook, c8 as FieldAdminOnChangeHookArgs, c9 as FieldAdminOptionsHook, ca as FieldAdminOptionsHookArgs, cb as FieldAdminOptionsHookResult, cc as FieldAfterReadHook, cd as FieldAfterReadHookArgs, ce as FieldBase, cf as FieldBeforeChangeHook, cg as FieldBeforeChangeHookArgs, ch as FieldHook, ci as FieldHooks, cj as FileData, ck as GanttViewConfig, cl as GetDocumentResult, cm as GlobalAfterChangeHook, cn as GlobalAfterReadHook, co as GlobalAfterReadHookEntry, cp as GlobalBeforeChangeHook, cq as GlobalBeforeChangeHookEntry, cr as GlobalBeforeReadHook, cs as GlobalBeforeReadHookEntry, ct as GlobalRAGConfig, cu as GlobalSchemaResult, cv as GlobalSummaryResult, cw as HeadingLevel, cx as HookFunction, cy as IconFieldAdmin, cz as ImageService, cA as ImageTransformOptions, cB as InferAggregateResult, cC as JoinFieldAdmin, cD as JsonFieldAdmin, cE as JsonFormat, cF as KanbanViewConfig, cG as LIFECYCLE_EVENT_NAMES, cH as LifecycleEventHandler, cI as LinkFormat, cJ as MetricColor, cK as MoneyFieldAdmin, cL as MoneyFieldConfig, cM as MultiSelectFieldAdmin, cN as NamedAccessPolicy, cO as NavBadgeConfig, cP as NavGroup, cQ as NumberFieldAdmin, cR as NumberFormat, cS as NumberLimitFieldAdmin, cT as NumberLimitFieldConfig, cU as NumericOperation, cV as NumericUpdateOperator, cW as OIDCAdminAuthProvider, cX as OptionFormat, cY as OutboundEmail, cZ as PaginatedResult, c_ as PinnedNavItemRef, c$ as PublicAdminAuthProvider, d0 as QueryCollectionResult, d1 as RAGSearchResult, d2 as RadioFieldAdmin, d3 as RateLimitConfig, d4 as ReadonlyDatabaseAdapter, d5 as RichTextFeature, d6 as RichTextFieldConfig, d7 as SelectFieldAdmin, d8 as SqlWhereResult, d9 as StorageAdapter, da as TableViewConfig, db as TaskContext, dc as TaskLogger, dd as TaskRunStatus, de as TextFieldAdmin, df as TextFormat, dg as TextareaFieldAdmin, dh as TrashConfig, di as TrustProxyConfig, dj as TypedField, dk as UploadConfig, dl as UrlFieldAdmin, dm as UrlLinkValue, dn as ViewActionFeatures, dp as ViewComponentSlots, dq as ViewConfigBase, dr as ViewLayout, ds as ViewMetric, dt as ViewMetricGroupBy, du as ViewMetricGroupByConfig, dv as ViewMetricTrendConfig, dw as ViewSubMetric, dx as WhereClause, dy as WhereOperator, dz as WhereOperatorName, dA as WordLimitFieldAdmin, dB as WordLimitFieldConfig, dC as WorkflowMetadata, dD as WorkflowOnTransitionContext, dE as WorkflowOnTransitionHook, dF as WorkflowRole, dG as WorkflowState, dH as WorkflowTransitionContext, dI as coerceBooleanWhere, dJ as defineAction, dK as defineCalendarView, dL as defineCardsView, dM as defineGanttView, dN as defineKanbanView, dO as defineTableView, dP as defineView, dQ as defineWorkspace, dR as isAICollection, dS as parseMongoWhere, dT as parseSqlWhere } from './app-BBHBP-6V.cjs';
|
|
3
3
|
import jexl from 'jexl';
|
|
4
4
|
import { Context } from 'hono';
|
|
5
5
|
export { z } from 'zod';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { F as Field, B as Block, C as CollectionConfig, D as DyrectedConfig, A as AdminAuthConfig, P as PublicAdminAuthConfig, G as GlobalConfig, a as DeclarativeHookExpression, W as WorkflowConfig, b as AuthenticatedUser, c as WorkflowTransition, L as LifecycleEventName, d as LifecycleEvent, e as DatabaseAdapter, f as BaseDocument, H as HookRequestContext, T as TaskRunResult, g as TaskConfig, h as DetailActionOptions, i as DetailAction, j as DetailComputedOptions, k as ComputedHandler, l as DetailComputed, m as DetailCustomOptions, n as DetailCustom, o as DetailDividerOptions, p as DetailDivider, q as DisplayFieldOptions, r as DetailField, s as DetailItem, t as DetailGridOptions, u as DetailGrid, v as DetailRepeatOptions, w as DetailRepeat, x as DetailSectionOptions, y as DetailSection, z as DetailTabOptions, E as DetailTab, I as DetailTabsOptions, J as DetailTabs, K as DetailTextOptions, M as DetailText, N as DetailSchema, O as DyrectedContext, Q as AIConfig, R as AIPIIConfig, S as IdStrategy, U as CompiledNavTree, V as CompiledNavItem, X as UserNavigationPreferences, Y as DefineWorkspaceOptions, Z as ViewConfig, _ as DateTimeField, $ as RelationshipField, a0 as SelectField, a1 as ArrayField, a2 as FieldType, a3 as BooleanField, a4 as AuthConfig, a5 as AccessPolicyResolver, a6 as DateField, a7 as TextField, a8 as EmailField, a9 as IconField, aa as ImageField, ab as JoinField, ac as JsonField, ad as MoneyField, ae as MultiSelectField, af as NumberField, ag as ObjectField, ah as RadioField, ai as RichTextField, aj as RowField, ak as TextareaField, al as TimeField, am as UrlField } from './app-
|
|
2
|
-
export { an as AIAction, ao as AIActionStatus, ap as AIActionType, aq as AIAuditActionType, ar as AIAuditRecord, as as AIChunk, at as AIMessage, au as AIPIIPattern, av as AIRateLimitResult, aw as AIRateLimitStore, ax as AIThread, ay as AIToolContext, az as AIToolDefinition, aA as AI_ACTIONS_COLLECTION, aB as AI_AUDIT_COLLECTION, aC as AI_CHUNKS_COLLECTION, aD as AI_MESSAGES_COLLECTION, aE as AI_THREADS_COLLECTION, aF as AccessConfig, aG as AccessFunction, aH as AccessFunctionArgs, aI as AccessResult, aJ as AccessRule, aK as ActionConfig, aL as ActionConfigBase, aM as ActionConfigWithHandler, aN as ActionConfigWithMutation, aO as ActionContext, aP as ActionType, aQ as AdminAuthAccessResolution, aR as AdminAuthClaimMapping, aS as AdminAuthMember, aT as AdminAuthProvider, aU as AdminAuthProviderMembersConfig, aV as AdminAuthProvisioningMode, aW as AdminAuthResolveAccessArgs, aX as AdminAuthResolvedIdentity, aY as AdminConfig, aZ as AdminDashboardComponentSlots, a_ as AdminIconName, a$ as AggregateArgs, b0 as AggregateCastType, b1 as AggregateCollectionResult, b2 as AggregateInput, b3 as AggregateOperation, b4 as AggregateResult, b5 as AppTrashConfig, b6 as BaseAdminAuthProvider, b7 as BaseFieldAdmin, b8 as BlockVariant, b9 as BlocksField, ba as BooleanFieldAdmin, bb as BooleanFormat, bc as CURRENT_NAV_PREFERENCES_VERSION, bd as CalendarViewConfig, be as CardsViewConfig, bf as CharacterLimitFieldAdmin, bg as CharacterLimitFieldConfig, bh as CollectionAfterChangeHook, bi as CollectionAfterDeleteHook, bj as CollectionAfterReadHook, bk as CollectionAfterReadHookEntry, bl as CollectionAfterRestoreHook, bm as CollectionAfterTransitionHook, bn as CollectionAfterTrashHook, bo as CollectionBeforeChangeHook, bp as CollectionBeforeChangeHookEntry, bq as CollectionBeforeCommitHook, br as CollectionBeforeDeleteHook, bs as CollectionBeforeReadHook, bt as CollectionBeforeReadHookEntry, bu as CollectionBeforeRestoreHook, bv as CollectionBeforeTransitionHook, bw as CollectionBeforeTrashHook, bx as CollectionEmailConfig, by as CollectionIndex, bz as CollectionListComponentSlots, bA as CollectionRAGConfig, bB as CollectionSchemaResult, bC as CollectionSummaryResult, bD as CollectionViewComponentSlots, bE as CompiledNavGroup, bF as CountOperation, bG as CustomAdminAuthProvider, bH as DEFAULT_USER_NAV_PREFERENCES, bI as DateFieldAdmin, bJ as DateFormat, bK as DefaultValueContext, bL as DefineActionOptions, bM as DefineCalendarViewOptions, bN as DefineCardsViewOptions, bO as DefineGanttViewOptions, bP as DefineKanbanViewOptions, bQ as DefineTableViewOptions, bR as DefineViewBaseOptions, bS as DefineViewOptions, bT as DetailSpan, bU as DisplayTone, bV as DisplayVariant, bW as DistinctCountOperation, bX as DistinctValuesOperation, bY as DynamicOptionItem, bZ as DynamicOptionsConfig, b_ as DynamicOptionsResolver, b$ as DynamicOptionsResolverArgs, c0 as DyrectedAIContext, c1 as DyrectedLoggerConfig, c2 as DyrectedObservabilityConfig, c3 as EmailFieldAdmin, c4 as EmailTemplateArgs, c5 as EmailTemplateResult, c6 as FieldAdminHooks, c7 as FieldAdminOnChangeHook, c8 as FieldAdminOnChangeHookArgs, c9 as FieldAdminOptionsHook, ca as FieldAdminOptionsHookArgs, cb as FieldAdminOptionsHookResult, cc as FieldAfterReadHook, cd as FieldAfterReadHookArgs, ce as FieldBase, cf as FieldBeforeChangeHook, cg as FieldBeforeChangeHookArgs, ch as FieldHook, ci as FieldHooks, cj as FileData, ck as GanttViewConfig, cl as GetDocumentResult, cm as GlobalAfterChangeHook, cn as GlobalAfterReadHook, co as GlobalAfterReadHookEntry, cp as GlobalBeforeChangeHook, cq as GlobalBeforeChangeHookEntry, cr as GlobalBeforeReadHook, cs as GlobalBeforeReadHookEntry, ct as GlobalRAGConfig, cu as GlobalSchemaResult, cv as GlobalSummaryResult, cw as HeadingLevel, cx as HookFunction, cy as IconFieldAdmin, cz as ImageService, cA as ImageTransformOptions, cB as InferAggregateResult, cC as JoinFieldAdmin, cD as JsonFieldAdmin, cE as JsonFormat, cF as KanbanViewConfig, cG as LIFECYCLE_EVENT_NAMES, cH as LifecycleEventHandler, cI as LinkFormat, cJ as MetricColor, cK as MoneyFieldAdmin, cL as MoneyFieldConfig, cM as MultiSelectFieldAdmin, cN as NamedAccessPolicy, cO as NavBadgeConfig, cP as NavGroup, cQ as NumberFieldAdmin, cR as NumberFormat, cS as NumberLimitFieldAdmin, cT as NumberLimitFieldConfig, cU as NumericOperation, cV as NumericUpdateOperator, cW as OIDCAdminAuthProvider, cX as OptionFormat, cY as OutboundEmail, cZ as PaginatedResult, c_ as PinnedNavItemRef, c$ as PublicAdminAuthProvider, d0 as QueryCollectionResult, d1 as RAGSearchResult, d2 as RadioFieldAdmin, d3 as RateLimitConfig, d4 as ReadonlyDatabaseAdapter, d5 as RichTextFeature, d6 as RichTextFieldConfig, d7 as SelectFieldAdmin, d8 as SqlWhereResult, d9 as StorageAdapter, da as TableViewConfig, db as TaskContext, dc as TaskLogger, dd as TaskRunStatus, de as TextFieldAdmin, df as TextFormat, dg as TextareaFieldAdmin, dh as TrashConfig, di as TrustProxyConfig, dj as TypedField, dk as UploadConfig, dl as UrlFieldAdmin, dm as UrlLinkValue, dn as ViewActionFeatures, dp as ViewComponentSlots, dq as ViewConfigBase, dr as ViewLayout, ds as ViewMetric, dt as
|
|
1
|
+
import { F as Field, B as Block, C as CollectionConfig, D as DyrectedConfig, A as AdminAuthConfig, P as PublicAdminAuthConfig, G as GlobalConfig, a as DeclarativeHookExpression, W as WorkflowConfig, b as AuthenticatedUser, c as WorkflowTransition, L as LifecycleEventName, d as LifecycleEvent, e as DatabaseAdapter, f as BaseDocument, H as HookRequestContext, T as TaskRunResult, g as TaskConfig, h as DetailActionOptions, i as DetailAction, j as DetailComputedOptions, k as ComputedHandler, l as DetailComputed, m as DetailCustomOptions, n as DetailCustom, o as DetailDividerOptions, p as DetailDivider, q as DisplayFieldOptions, r as DetailField, s as DetailItem, t as DetailGridOptions, u as DetailGrid, v as DetailRepeatOptions, w as DetailRepeat, x as DetailSectionOptions, y as DetailSection, z as DetailTabOptions, E as DetailTab, I as DetailTabsOptions, J as DetailTabs, K as DetailTextOptions, M as DetailText, N as DetailSchema, O as DyrectedContext, Q as AIConfig, R as AIPIIConfig, S as IdStrategy, U as CompiledNavTree, V as CompiledNavItem, X as UserNavigationPreferences, Y as DefineWorkspaceOptions, Z as ViewConfig, _ as DateTimeField, $ as RelationshipField, a0 as SelectField, a1 as ArrayField, a2 as FieldType, a3 as BooleanField, a4 as AuthConfig, a5 as AccessPolicyResolver, a6 as DateField, a7 as TextField, a8 as EmailField, a9 as IconField, aa as ImageField, ab as JoinField, ac as JsonField, ad as MoneyField, ae as MultiSelectField, af as NumberField, ag as ObjectField, ah as RadioField, ai as RichTextField, aj as RowField, ak as TextareaField, al as TimeField, am as UrlField } from './app-BBHBP-6V.js';
|
|
2
|
+
export { an as AIAction, ao as AIActionStatus, ap as AIActionType, aq as AIAuditActionType, ar as AIAuditRecord, as as AIChunk, at as AIMessage, au as AIPIIPattern, av as AIRateLimitResult, aw as AIRateLimitStore, ax as AIThread, ay as AIToolContext, az as AIToolDefinition, aA as AI_ACTIONS_COLLECTION, aB as AI_AUDIT_COLLECTION, aC as AI_CHUNKS_COLLECTION, aD as AI_MESSAGES_COLLECTION, aE as AI_THREADS_COLLECTION, aF as AccessConfig, aG as AccessFunction, aH as AccessFunctionArgs, aI as AccessResult, aJ as AccessRule, aK as ActionConfig, aL as ActionConfigBase, aM as ActionConfigWithHandler, aN as ActionConfigWithMutation, aO as ActionContext, aP as ActionType, aQ as AdminAuthAccessResolution, aR as AdminAuthClaimMapping, aS as AdminAuthMember, aT as AdminAuthProvider, aU as AdminAuthProviderMembersConfig, aV as AdminAuthProvisioningMode, aW as AdminAuthResolveAccessArgs, aX as AdminAuthResolvedIdentity, aY as AdminConfig, aZ as AdminDashboardComponentSlots, a_ as AdminIconName, a$ as AggregateArgs, b0 as AggregateCastType, b1 as AggregateCollectionResult, b2 as AggregateInput, b3 as AggregateOperation, b4 as AggregateResult, b5 as AppTrashConfig, b6 as BaseAdminAuthProvider, b7 as BaseFieldAdmin, b8 as BlockVariant, b9 as BlocksField, ba as BooleanFieldAdmin, bb as BooleanFormat, bc as CURRENT_NAV_PREFERENCES_VERSION, bd as CalendarViewConfig, be as CardsViewConfig, bf as CharacterLimitFieldAdmin, bg as CharacterLimitFieldConfig, bh as CollectionAfterChangeHook, bi as CollectionAfterDeleteHook, bj as CollectionAfterReadHook, bk as CollectionAfterReadHookEntry, bl as CollectionAfterRestoreHook, bm as CollectionAfterTransitionHook, bn as CollectionAfterTrashHook, bo as CollectionBeforeChangeHook, bp as CollectionBeforeChangeHookEntry, bq as CollectionBeforeCommitHook, br as CollectionBeforeDeleteHook, bs as CollectionBeforeReadHook, bt as CollectionBeforeReadHookEntry, bu as CollectionBeforeRestoreHook, bv as CollectionBeforeTransitionHook, bw as CollectionBeforeTrashHook, bx as CollectionEmailConfig, by as CollectionIndex, bz as CollectionListComponentSlots, bA as CollectionRAGConfig, bB as CollectionSchemaResult, bC as CollectionSummaryResult, bD as CollectionViewComponentSlots, bE as CompiledNavGroup, bF as CountOperation, bG as CustomAdminAuthProvider, bH as DEFAULT_USER_NAV_PREFERENCES, bI as DateFieldAdmin, bJ as DateFormat, bK as DefaultValueContext, bL as DefineActionOptions, bM as DefineCalendarViewOptions, bN as DefineCardsViewOptions, bO as DefineGanttViewOptions, bP as DefineKanbanViewOptions, bQ as DefineTableViewOptions, bR as DefineViewBaseOptions, bS as DefineViewOptions, bT as DetailSpan, bU as DisplayTone, bV as DisplayVariant, bW as DistinctCountOperation, bX as DistinctValuesOperation, bY as DynamicOptionItem, bZ as DynamicOptionsConfig, b_ as DynamicOptionsResolver, b$ as DynamicOptionsResolverArgs, c0 as DyrectedAIContext, c1 as DyrectedLoggerConfig, c2 as DyrectedObservabilityConfig, c3 as EmailFieldAdmin, c4 as EmailTemplateArgs, c5 as EmailTemplateResult, c6 as FieldAdminHooks, c7 as FieldAdminOnChangeHook, c8 as FieldAdminOnChangeHookArgs, c9 as FieldAdminOptionsHook, ca as FieldAdminOptionsHookArgs, cb as FieldAdminOptionsHookResult, cc as FieldAfterReadHook, cd as FieldAfterReadHookArgs, ce as FieldBase, cf as FieldBeforeChangeHook, cg as FieldBeforeChangeHookArgs, ch as FieldHook, ci as FieldHooks, cj as FileData, ck as GanttViewConfig, cl as GetDocumentResult, cm as GlobalAfterChangeHook, cn as GlobalAfterReadHook, co as GlobalAfterReadHookEntry, cp as GlobalBeforeChangeHook, cq as GlobalBeforeChangeHookEntry, cr as GlobalBeforeReadHook, cs as GlobalBeforeReadHookEntry, ct as GlobalRAGConfig, cu as GlobalSchemaResult, cv as GlobalSummaryResult, cw as HeadingLevel, cx as HookFunction, cy as IconFieldAdmin, cz as ImageService, cA as ImageTransformOptions, cB as InferAggregateResult, cC as JoinFieldAdmin, cD as JsonFieldAdmin, cE as JsonFormat, cF as KanbanViewConfig, cG as LIFECYCLE_EVENT_NAMES, cH as LifecycleEventHandler, cI as LinkFormat, cJ as MetricColor, cK as MoneyFieldAdmin, cL as MoneyFieldConfig, cM as MultiSelectFieldAdmin, cN as NamedAccessPolicy, cO as NavBadgeConfig, cP as NavGroup, cQ as NumberFieldAdmin, cR as NumberFormat, cS as NumberLimitFieldAdmin, cT as NumberLimitFieldConfig, cU as NumericOperation, cV as NumericUpdateOperator, cW as OIDCAdminAuthProvider, cX as OptionFormat, cY as OutboundEmail, cZ as PaginatedResult, c_ as PinnedNavItemRef, c$ as PublicAdminAuthProvider, d0 as QueryCollectionResult, d1 as RAGSearchResult, d2 as RadioFieldAdmin, d3 as RateLimitConfig, d4 as ReadonlyDatabaseAdapter, d5 as RichTextFeature, d6 as RichTextFieldConfig, d7 as SelectFieldAdmin, d8 as SqlWhereResult, d9 as StorageAdapter, da as TableViewConfig, db as TaskContext, dc as TaskLogger, dd as TaskRunStatus, de as TextFieldAdmin, df as TextFormat, dg as TextareaFieldAdmin, dh as TrashConfig, di as TrustProxyConfig, dj as TypedField, dk as UploadConfig, dl as UrlFieldAdmin, dm as UrlLinkValue, dn as ViewActionFeatures, dp as ViewComponentSlots, dq as ViewConfigBase, dr as ViewLayout, ds as ViewMetric, dt as ViewMetricGroupBy, du as ViewMetricGroupByConfig, dv as ViewMetricTrendConfig, dw as ViewSubMetric, dx as WhereClause, dy as WhereOperator, dz as WhereOperatorName, dA as WordLimitFieldAdmin, dB as WordLimitFieldConfig, dC as WorkflowMetadata, dD as WorkflowOnTransitionContext, dE as WorkflowOnTransitionHook, dF as WorkflowRole, dG as WorkflowState, dH as WorkflowTransitionContext, dI as coerceBooleanWhere, dJ as defineAction, dK as defineCalendarView, dL as defineCardsView, dM as defineGanttView, dN as defineKanbanView, dO as defineTableView, dP as defineView, dQ as defineWorkspace, dR as isAICollection, dS as parseMongoWhere, dT as parseSqlWhere } from './app-BBHBP-6V.js';
|
|
3
3
|
import jexl from 'jexl';
|
|
4
4
|
import { Context } from 'hono';
|
|
5
5
|
export { z } from 'zod';
|
package/dist/index.js
CHANGED
|
@@ -7813,8 +7813,19 @@ function reconcileNavigation(baseTree, prefs, schemas, options) {
|
|
|
7813
7813
|
}
|
|
7814
7814
|
}
|
|
7815
7815
|
for (const itemOpt of effectivePrefs.items || []) {
|
|
7816
|
-
const
|
|
7817
|
-
|
|
7816
|
+
const itemId = itemOpt.slug ? `workspace_${itemOpt.slug}` : itemOpt.collection ? `collection_${itemOpt.collection}` : `custom_${Math.random()}`;
|
|
7817
|
+
let existingItem;
|
|
7818
|
+
let existingParentGroup;
|
|
7819
|
+
for (const g of groupsList) {
|
|
7820
|
+
const found = g.items.find((i) => i.id === itemId || i.slug === itemOpt.slug);
|
|
7821
|
+
if (found) {
|
|
7822
|
+
existingItem = found;
|
|
7823
|
+
existingParentGroup = g;
|
|
7824
|
+
break;
|
|
7825
|
+
}
|
|
7826
|
+
}
|
|
7827
|
+
const targetGroup = typeof itemOpt.group === "object" ? itemOpt.group?.name : itemOpt.group || existingParentGroup?.name || "Custom";
|
|
7828
|
+
const groupKey = targetGroup;
|
|
7818
7829
|
let group = findGroup(groupKey);
|
|
7819
7830
|
if (!group) {
|
|
7820
7831
|
group = {
|
|
@@ -7828,18 +7839,45 @@ function reconcileNavigation(baseTree, prefs, schemas, options) {
|
|
|
7828
7839
|
};
|
|
7829
7840
|
groupsList.push(group);
|
|
7830
7841
|
}
|
|
7831
|
-
const itemId = itemOpt.slug ? `workspace_${itemOpt.slug}` : itemOpt.collection ? `collection_${itemOpt.collection}` : `custom_${Math.random()}`;
|
|
7832
7842
|
for (const otherGroup of groupsList) {
|
|
7833
7843
|
if (otherGroup !== group) {
|
|
7834
7844
|
otherGroup.items = otherGroup.items.filter((i) => i.slug !== itemOpt.slug && i.id !== itemId);
|
|
7835
7845
|
}
|
|
7836
7846
|
}
|
|
7837
7847
|
const existingIndex = group.items.findIndex((i) => i.id === itemId || i.slug === itemOpt.slug);
|
|
7838
|
-
|
|
7848
|
+
if (existingIndex >= 0) {
|
|
7849
|
+
existingItem = group.items[existingIndex];
|
|
7850
|
+
}
|
|
7839
7851
|
const col = schemas?.collections?.find((c) => c.slug === itemOpt.collection);
|
|
7840
7852
|
const colViews = col?.views || [];
|
|
7841
7853
|
const baseViews = existingItem?.views || [];
|
|
7842
|
-
const userViews = itemOpt.views || []
|
|
7854
|
+
const userViews = (itemOpt.views || []).map((uv) => {
|
|
7855
|
+
const bv = baseViews.find((b) => b.slug === uv.slug);
|
|
7856
|
+
if (!bv) return uv;
|
|
7857
|
+
const metricsScope = uv.metricsScope ?? bv.metricsScope;
|
|
7858
|
+
let metrics = uv.metrics;
|
|
7859
|
+
if (Array.isArray(uv.metrics) && Array.isArray(bv.metrics)) {
|
|
7860
|
+
metrics = uv.metrics.map((um) => {
|
|
7861
|
+
const bm = bv.metrics?.find((m) => m.label === um.label);
|
|
7862
|
+
if (!bm) return um;
|
|
7863
|
+
return {
|
|
7864
|
+
...bm,
|
|
7865
|
+
...um,
|
|
7866
|
+
scope: um.scope ?? bm.scope,
|
|
7867
|
+
groupBy: um.groupBy ?? bm.groupBy,
|
|
7868
|
+
subMetrics: um.subMetrics ?? bm.subMetrics
|
|
7869
|
+
};
|
|
7870
|
+
});
|
|
7871
|
+
} else if (!uv.metrics && bv.metrics) {
|
|
7872
|
+
metrics = bv.metrics;
|
|
7873
|
+
}
|
|
7874
|
+
return {
|
|
7875
|
+
...bv,
|
|
7876
|
+
...uv,
|
|
7877
|
+
metricsScope,
|
|
7878
|
+
metrics
|
|
7879
|
+
};
|
|
7880
|
+
});
|
|
7843
7881
|
const userViewSlugs = new Set(userViews.map((v) => v.slug));
|
|
7844
7882
|
let mergedViews = [
|
|
7845
7883
|
...baseViews.filter((v) => !userViewSlugs.has(v.slug)),
|
package/dist/server.cjs
CHANGED
|
@@ -6955,8 +6955,19 @@ function reconcileNavigation(baseTree, prefs, schemas, options) {
|
|
|
6955
6955
|
}
|
|
6956
6956
|
}
|
|
6957
6957
|
for (const itemOpt of effectivePrefs.items || []) {
|
|
6958
|
-
const
|
|
6959
|
-
|
|
6958
|
+
const itemId = itemOpt.slug ? `workspace_${itemOpt.slug}` : itemOpt.collection ? `collection_${itemOpt.collection}` : `custom_${Math.random()}`;
|
|
6959
|
+
let existingItem;
|
|
6960
|
+
let existingParentGroup;
|
|
6961
|
+
for (const g of groupsList) {
|
|
6962
|
+
const found = g.items.find((i) => i.id === itemId || i.slug === itemOpt.slug);
|
|
6963
|
+
if (found) {
|
|
6964
|
+
existingItem = found;
|
|
6965
|
+
existingParentGroup = g;
|
|
6966
|
+
break;
|
|
6967
|
+
}
|
|
6968
|
+
}
|
|
6969
|
+
const targetGroup = typeof itemOpt.group === "object" ? itemOpt.group?.name : itemOpt.group || existingParentGroup?.name || "Custom";
|
|
6970
|
+
const groupKey = targetGroup;
|
|
6960
6971
|
let group = findGroup(groupKey);
|
|
6961
6972
|
if (!group) {
|
|
6962
6973
|
group = {
|
|
@@ -6970,18 +6981,45 @@ function reconcileNavigation(baseTree, prefs, schemas, options) {
|
|
|
6970
6981
|
};
|
|
6971
6982
|
groupsList.push(group);
|
|
6972
6983
|
}
|
|
6973
|
-
const itemId = itemOpt.slug ? `workspace_${itemOpt.slug}` : itemOpt.collection ? `collection_${itemOpt.collection}` : `custom_${Math.random()}`;
|
|
6974
6984
|
for (const otherGroup of groupsList) {
|
|
6975
6985
|
if (otherGroup !== group) {
|
|
6976
6986
|
otherGroup.items = otherGroup.items.filter((i) => i.slug !== itemOpt.slug && i.id !== itemId);
|
|
6977
6987
|
}
|
|
6978
6988
|
}
|
|
6979
6989
|
const existingIndex = group.items.findIndex((i) => i.id === itemId || i.slug === itemOpt.slug);
|
|
6980
|
-
|
|
6990
|
+
if (existingIndex >= 0) {
|
|
6991
|
+
existingItem = group.items[existingIndex];
|
|
6992
|
+
}
|
|
6981
6993
|
const col = schemas?.collections?.find((c) => c.slug === itemOpt.collection);
|
|
6982
6994
|
const colViews = col?.views || [];
|
|
6983
6995
|
const baseViews = existingItem?.views || [];
|
|
6984
|
-
const userViews = itemOpt.views || []
|
|
6996
|
+
const userViews = (itemOpt.views || []).map((uv) => {
|
|
6997
|
+
const bv = baseViews.find((b) => b.slug === uv.slug);
|
|
6998
|
+
if (!bv) return uv;
|
|
6999
|
+
const metricsScope = uv.metricsScope ?? bv.metricsScope;
|
|
7000
|
+
let metrics = uv.metrics;
|
|
7001
|
+
if (Array.isArray(uv.metrics) && Array.isArray(bv.metrics)) {
|
|
7002
|
+
metrics = uv.metrics.map((um) => {
|
|
7003
|
+
const bm = bv.metrics?.find((m) => m.label === um.label);
|
|
7004
|
+
if (!bm) return um;
|
|
7005
|
+
return {
|
|
7006
|
+
...bm,
|
|
7007
|
+
...um,
|
|
7008
|
+
scope: um.scope ?? bm.scope,
|
|
7009
|
+
groupBy: um.groupBy ?? bm.groupBy,
|
|
7010
|
+
subMetrics: um.subMetrics ?? bm.subMetrics
|
|
7011
|
+
};
|
|
7012
|
+
});
|
|
7013
|
+
} else if (!uv.metrics && bv.metrics) {
|
|
7014
|
+
metrics = bv.metrics;
|
|
7015
|
+
}
|
|
7016
|
+
return {
|
|
7017
|
+
...bv,
|
|
7018
|
+
...uv,
|
|
7019
|
+
metricsScope,
|
|
7020
|
+
metrics
|
|
7021
|
+
};
|
|
7022
|
+
});
|
|
6985
7023
|
const userViewSlugs = new Set(userViews.map((v) => v.slug));
|
|
6986
7024
|
let mergedViews = [
|
|
6987
7025
|
...baseViews.filter((v) => !userViewSlugs.has(v.slug)),
|
package/dist/server.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as DyrectedContext, D as DyrectedConfig, C as CollectionConfig, G as GlobalConfig, c4 as EmailTemplateArgs, c5 as EmailTemplateResult, cY as OutboundEmail, e as DatabaseAdapter, b as AuthenticatedUser, c0 as DyrectedAIContext, ax as AIThread, at as AIMessage, d1 as RAGSearchResult, aw as AIRateLimitStore, av as AIRateLimitResult } from './app-
|
|
2
|
-
export {
|
|
1
|
+
import { O as DyrectedContext, D as DyrectedConfig, C as CollectionConfig, G as GlobalConfig, c4 as EmailTemplateArgs, c5 as EmailTemplateResult, cY as OutboundEmail, e as DatabaseAdapter, b as AuthenticatedUser, c0 as DyrectedAIContext, ax as AIThread, at as AIMessage, d1 as RAGSearchResult, aw as AIRateLimitStore, av as AIRateLimitResult } from './app-BBHBP-6V.cjs';
|
|
2
|
+
export { dU as CollectionTokenPayload, dV as DEFAULT_INVITE_EXPIRY, dW as DEFAULT_RESET_PASSWORD_EXPIRY, dX as DEFAULT_SESSION_EXPIRY, dY as DyrectedObservabilityRuntime, dZ as RequestBodyCapture, d_ as RequestTraceContext, d$ as ResolvedObservabilityConfig, e0 as attachRequestMetrics, e1 as bindObservabilityRuntime, e2 as buildRequestLogger, e3 as captureRequestBody, e4 as createDyrectedApp, e5 as createObservabilityRuntime, e6 as createRequestSpan, e7 as decodeCollectionToken, e8 as endRequestSpan, e9 as getConfigLogger, ea as getObservabilityRuntime, eb as getRequestLogger, ec as redactBody, ed as redactHeaders, ee as renderPrometheusMetrics, ef as resolveInviteTokenExpiry, eg as resolveObservabilityConfig, eh as resolveResetPasswordTokenExpiry, ei as resolveSessionTokenExpiry, ej as shouldSampleRequest, ek as signCollectionToken, el as verifyCollectionToken } from './app-BBHBP-6V.cjs';
|
|
3
3
|
import * as hono from 'hono';
|
|
4
4
|
import { Hono, Context, Next } from 'hono';
|
|
5
5
|
import * as hono_utils_http_status from 'hono/utils/http-status';
|
package/dist/server.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as DyrectedContext, D as DyrectedConfig, C as CollectionConfig, G as GlobalConfig, c4 as EmailTemplateArgs, c5 as EmailTemplateResult, cY as OutboundEmail, e as DatabaseAdapter, b as AuthenticatedUser, c0 as DyrectedAIContext, ax as AIThread, at as AIMessage, d1 as RAGSearchResult, aw as AIRateLimitStore, av as AIRateLimitResult } from './app-
|
|
2
|
-
export {
|
|
1
|
+
import { O as DyrectedContext, D as DyrectedConfig, C as CollectionConfig, G as GlobalConfig, c4 as EmailTemplateArgs, c5 as EmailTemplateResult, cY as OutboundEmail, e as DatabaseAdapter, b as AuthenticatedUser, c0 as DyrectedAIContext, ax as AIThread, at as AIMessage, d1 as RAGSearchResult, aw as AIRateLimitStore, av as AIRateLimitResult } from './app-BBHBP-6V.js';
|
|
2
|
+
export { dU as CollectionTokenPayload, dV as DEFAULT_INVITE_EXPIRY, dW as DEFAULT_RESET_PASSWORD_EXPIRY, dX as DEFAULT_SESSION_EXPIRY, dY as DyrectedObservabilityRuntime, dZ as RequestBodyCapture, d_ as RequestTraceContext, d$ as ResolvedObservabilityConfig, e0 as attachRequestMetrics, e1 as bindObservabilityRuntime, e2 as buildRequestLogger, e3 as captureRequestBody, e4 as createDyrectedApp, e5 as createObservabilityRuntime, e6 as createRequestSpan, e7 as decodeCollectionToken, e8 as endRequestSpan, e9 as getConfigLogger, ea as getObservabilityRuntime, eb as getRequestLogger, ec as redactBody, ed as redactHeaders, ee as renderPrometheusMetrics, ef as resolveInviteTokenExpiry, eg as resolveObservabilityConfig, eh as resolveResetPasswordTokenExpiry, ei as resolveSessionTokenExpiry, ej as shouldSampleRequest, ek as signCollectionToken, el as verifyCollectionToken } from './app-BBHBP-6V.js';
|
|
3
3
|
import * as hono from 'hono';
|
|
4
4
|
import { Hono, Context, Next } from 'hono';
|
|
5
5
|
import * as hono_utils_http_status from 'hono/utils/http-status';
|
package/dist/server.js
CHANGED
|
@@ -6885,8 +6885,19 @@ function reconcileNavigation(baseTree, prefs, schemas, options) {
|
|
|
6885
6885
|
}
|
|
6886
6886
|
}
|
|
6887
6887
|
for (const itemOpt of effectivePrefs.items || []) {
|
|
6888
|
-
const
|
|
6889
|
-
|
|
6888
|
+
const itemId = itemOpt.slug ? `workspace_${itemOpt.slug}` : itemOpt.collection ? `collection_${itemOpt.collection}` : `custom_${Math.random()}`;
|
|
6889
|
+
let existingItem;
|
|
6890
|
+
let existingParentGroup;
|
|
6891
|
+
for (const g of groupsList) {
|
|
6892
|
+
const found = g.items.find((i) => i.id === itemId || i.slug === itemOpt.slug);
|
|
6893
|
+
if (found) {
|
|
6894
|
+
existingItem = found;
|
|
6895
|
+
existingParentGroup = g;
|
|
6896
|
+
break;
|
|
6897
|
+
}
|
|
6898
|
+
}
|
|
6899
|
+
const targetGroup = typeof itemOpt.group === "object" ? itemOpt.group?.name : itemOpt.group || existingParentGroup?.name || "Custom";
|
|
6900
|
+
const groupKey = targetGroup;
|
|
6890
6901
|
let group = findGroup(groupKey);
|
|
6891
6902
|
if (!group) {
|
|
6892
6903
|
group = {
|
|
@@ -6900,18 +6911,45 @@ function reconcileNavigation(baseTree, prefs, schemas, options) {
|
|
|
6900
6911
|
};
|
|
6901
6912
|
groupsList.push(group);
|
|
6902
6913
|
}
|
|
6903
|
-
const itemId = itemOpt.slug ? `workspace_${itemOpt.slug}` : itemOpt.collection ? `collection_${itemOpt.collection}` : `custom_${Math.random()}`;
|
|
6904
6914
|
for (const otherGroup of groupsList) {
|
|
6905
6915
|
if (otherGroup !== group) {
|
|
6906
6916
|
otherGroup.items = otherGroup.items.filter((i) => i.slug !== itemOpt.slug && i.id !== itemId);
|
|
6907
6917
|
}
|
|
6908
6918
|
}
|
|
6909
6919
|
const existingIndex = group.items.findIndex((i) => i.id === itemId || i.slug === itemOpt.slug);
|
|
6910
|
-
|
|
6920
|
+
if (existingIndex >= 0) {
|
|
6921
|
+
existingItem = group.items[existingIndex];
|
|
6922
|
+
}
|
|
6911
6923
|
const col = schemas?.collections?.find((c) => c.slug === itemOpt.collection);
|
|
6912
6924
|
const colViews = col?.views || [];
|
|
6913
6925
|
const baseViews = existingItem?.views || [];
|
|
6914
|
-
const userViews = itemOpt.views || []
|
|
6926
|
+
const userViews = (itemOpt.views || []).map((uv) => {
|
|
6927
|
+
const bv = baseViews.find((b) => b.slug === uv.slug);
|
|
6928
|
+
if (!bv) return uv;
|
|
6929
|
+
const metricsScope = uv.metricsScope ?? bv.metricsScope;
|
|
6930
|
+
let metrics = uv.metrics;
|
|
6931
|
+
if (Array.isArray(uv.metrics) && Array.isArray(bv.metrics)) {
|
|
6932
|
+
metrics = uv.metrics.map((um) => {
|
|
6933
|
+
const bm = bv.metrics?.find((m) => m.label === um.label);
|
|
6934
|
+
if (!bm) return um;
|
|
6935
|
+
return {
|
|
6936
|
+
...bm,
|
|
6937
|
+
...um,
|
|
6938
|
+
scope: um.scope ?? bm.scope,
|
|
6939
|
+
groupBy: um.groupBy ?? bm.groupBy,
|
|
6940
|
+
subMetrics: um.subMetrics ?? bm.subMetrics
|
|
6941
|
+
};
|
|
6942
|
+
});
|
|
6943
|
+
} else if (!uv.metrics && bv.metrics) {
|
|
6944
|
+
metrics = bv.metrics;
|
|
6945
|
+
}
|
|
6946
|
+
return {
|
|
6947
|
+
...bv,
|
|
6948
|
+
...uv,
|
|
6949
|
+
metricsScope,
|
|
6950
|
+
metrics
|
|
6951
|
+
};
|
|
6952
|
+
});
|
|
6915
6953
|
const userViewSlugs = new Set(userViews.map((v) => v.slug));
|
|
6916
6954
|
let mergedViews = [
|
|
6917
6955
|
...baseViews.filter((v) => !userViewSlugs.has(v.slug)),
|