mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-21 13:39:22 +01:00
Add paths to logics (#6945)
* add typegen with path writing support * toolbar paths * scene paths * all other paths * revert deleted comments * add two missing paths
This commit is contained in:
parent
b11c4421ee
commit
26a3b06445
3
.kearc
3
.kearc
@ -1,6 +1,7 @@
|
||||
{
|
||||
"tsConfigPath": "./tsconfig.json",
|
||||
"rootPath": "./frontend/src",
|
||||
"typesPath": "./frontend/src"
|
||||
"typesPath": "./frontend/src",
|
||||
"writePaths": true
|
||||
}
|
||||
|
||||
|
@ -4,6 +4,7 @@ import { featureFlagLogic } from '../../lib/logic/featureFlagLogic'
|
||||
import { lemonadeLogicType } from './lemonadeLogicType'
|
||||
|
||||
export const lemonadeLogic = kea<lemonadeLogicType>({
|
||||
path: ['layout', 'lemonade', 'lemonadeLogic'],
|
||||
connect: {
|
||||
values: [featureFlagLogic, ['featureFlags']],
|
||||
},
|
||||
|
@ -19,6 +19,7 @@ type WarningType =
|
||||
| null
|
||||
|
||||
export const navigationLogic = kea<navigationLogicType<WarningType>>({
|
||||
path: ['layout', 'navigation', 'navigationLogic'],
|
||||
actions: {
|
||||
setMenuCollapsed: (collapsed: boolean) => ({ collapsed }),
|
||||
collapseMenu: () => {},
|
||||
|
@ -13,6 +13,7 @@ interface AnnotationsLogicProps {
|
||||
}
|
||||
|
||||
export const annotationsLogic = kea<annotationsLogicType<AnnotationsLogicProps>>({
|
||||
path: (key) => ['lib', 'components', 'Annotations', 'annotationsLogic', key],
|
||||
props: {} as AnnotationsLogicProps,
|
||||
key: (props) => (props.pageKey ? `${props.pageKey}_annotations` : 'annotations_default'),
|
||||
connect: {
|
||||
|
@ -10,6 +10,7 @@ import { teamLogic } from 'scenes/teamLogic'
|
||||
const defaultValue = 'https://'
|
||||
|
||||
export const appUrlsLogic = kea<appUrlsLogicType>({
|
||||
path: ['lib', 'components', 'AppEditorLink', 'appUrlsLogic'],
|
||||
connect: {
|
||||
values: [teamLogic, ['currentTeam', 'currentTeamId']],
|
||||
},
|
||||
|
@ -11,6 +11,7 @@ interface IBackTo {
|
||||
}
|
||||
|
||||
const backToLogic = kea<backToLogicType<IBackTo>>({
|
||||
path: ['lib', 'components', 'BackTo'],
|
||||
actions: {
|
||||
setBackTo: (payload) => ({ payload }),
|
||||
},
|
||||
|
@ -9,6 +9,7 @@ function isFunnelVizType(filter: FunnelVizType | ChartDisplayType): filter is Fu
|
||||
}
|
||||
|
||||
export const chartFilterLogic = kea<chartFilterLogicType>({
|
||||
path: ['lib', 'components', 'ChartFilter', 'chartFilterLogic'],
|
||||
actions: () => ({
|
||||
setChartFilter: (filter: ChartDisplayType | FunnelVizType) => ({ filter }),
|
||||
}),
|
||||
|
@ -121,6 +121,7 @@ export const commandPaletteLogic = kea<
|
||||
RegExpCommandPairs
|
||||
>
|
||||
>({
|
||||
path: ['lib', 'components', 'CommandPalette', 'commandPaletteLogic'],
|
||||
connect: {
|
||||
actions: [personalAPIKeysLogic, ['createKey']],
|
||||
values: [teamLogic, ['currentTeam'], userLogic, ['user']],
|
||||
|
@ -5,6 +5,7 @@ import { InsightType, ViewType } from '~/types'
|
||||
import { compareFilterLogicType } from './compareFilterLogicType'
|
||||
|
||||
export const compareFilterLogic = kea<compareFilterLogicType>({
|
||||
path: ['lib', 'components', 'CompareFilter', 'compareFilterLogic'],
|
||||
actions: () => ({
|
||||
setCompare: (compare: boolean) => ({ compare }),
|
||||
setDisabled: (disabled: boolean) => ({ disabled }),
|
||||
|
@ -14,6 +14,7 @@ import clsx from 'clsx'
|
||||
const HELP_UTM_TAGS = '?utm_medium=in-product&utm_campaign=help-button-top'
|
||||
|
||||
export const helpButtonLogic = kea<helpButtonLogicType>({
|
||||
path: ['lib', 'components', 'HelpButton', 'HelpButton'],
|
||||
connect: {
|
||||
actions: [eventUsageLogic, ['reportHelpButtonViewed']],
|
||||
},
|
||||
|
@ -5,6 +5,7 @@ import { intervalFilterLogicType } from './intervalFilterLogicType'
|
||||
import { IntervalKeyType } from 'lib/components/IntervalFilter/intervals'
|
||||
|
||||
export const intervalFilterLogic = kea<intervalFilterLogicType>({
|
||||
path: ['lib', 'components', 'IntervalFilter', 'intervalFilterLogic'],
|
||||
actions: () => ({
|
||||
setIntervalFilter: (filter: IntervalKeyType) => ({ filter }),
|
||||
setDateFrom: (dateFrom: string) => ({ dateFrom }),
|
||||
|
@ -6,6 +6,7 @@ import { personalAPIKeysLogicType } from './personalAPIKeysLogicType'
|
||||
import { copyToClipboard } from 'lib/utils'
|
||||
|
||||
export const personalAPIKeysLogic = kea<personalAPIKeysLogicType>({
|
||||
path: ['lib', 'components', 'PersonalAPIKeys', 'personalAPIKeysLogic'],
|
||||
loaders: ({ values }) => ({
|
||||
keys: [
|
||||
[] as PersonalAPIKeyType[],
|
||||
|
@ -6,6 +6,7 @@ import { taxonomicPropertyFilterLogicType } from './taxonomicPropertyFilterLogic
|
||||
import { cohortsModel } from '~/models/cohortsModel'
|
||||
|
||||
export const taxonomicPropertyFilterLogic = kea<taxonomicPropertyFilterLogicType>({
|
||||
path: (key) => ['lib', 'components', 'PropertyFilters', 'components', 'taxonomicPropertyFilterLogic', key],
|
||||
props: {} as TaxonomicPropertyFilterLogicProps,
|
||||
key: (props) => `${props.pageKey}-${props.filterIndex}`,
|
||||
|
||||
|
@ -8,6 +8,7 @@ import { isValidPropertyFilter, parseProperties } from 'lib/components/PropertyF
|
||||
import { PropertyFilterLogicProps } from 'lib/components/PropertyFilters/types'
|
||||
|
||||
export const propertyFilterLogic = kea<propertyFilterLogicType>({
|
||||
path: (key) => ['lib', 'components', 'PropertyFilters', 'propertyFilterLogic', key],
|
||||
props: {} as PropertyFilterLogicProps,
|
||||
key: (props) => props.pageKey,
|
||||
|
||||
|
@ -2,6 +2,7 @@ import { kea } from 'kea'
|
||||
|
||||
import { propertySelectLogicType } from './propertyNamesSelectLogicType'
|
||||
export const propertySelectLogic = kea<propertySelectLogicType>({
|
||||
path: (key) => ['lib', 'components', 'PropertyNamesSelect', 'propertyNamesSelectLogic', key],
|
||||
props: {
|
||||
propertySelectLogicKey: '' as string,
|
||||
|
||||
|
@ -19,6 +19,7 @@ const filterColumns = (columnFilter: string, columns: string[]): string[] =>
|
||||
: columns
|
||||
|
||||
export const columnConfiguratorLogic = kea<columnConfiguratorLogicType<ColumnConfiguratorLogicProps>>({
|
||||
path: ['lib', 'components', 'ResizableTable', 'columnConfiguratorLogic'],
|
||||
props: { availableColumns: [], selectedColumns: [] } as ColumnConfiguratorLogicProps,
|
||||
actions: {
|
||||
selectColumn: (column: string) => ({ column }),
|
||||
|
@ -4,6 +4,7 @@ import { router } from 'kea-router'
|
||||
import { ColumnChoice } from '~/types'
|
||||
|
||||
export const tableConfigLogic = kea<tableConfigLogicType>({
|
||||
path: ['lib', 'components', 'ResizableTable', 'tableConfigLogic'],
|
||||
actions: {
|
||||
showModal: true,
|
||||
hideModal: false,
|
||||
|
@ -6,6 +6,7 @@ import { eventUsageLogic } from 'lib/utils/eventUsageLogic'
|
||||
import { saveToDashboardModalLogicType } from './saveToDashboardModalLogicType'
|
||||
|
||||
export const saveToDashboardModalLogic = kea<saveToDashboardModalLogicType>({
|
||||
path: (key) => ['lib', 'components', 'SaveToDashboard', 'saveToDashboardModalLogic', key],
|
||||
props: {} as {
|
||||
id?: number
|
||||
fromDashboard?: number
|
||||
|
@ -33,6 +33,7 @@ const apiCache: Record<string, EventDefinitionStorage> = {}
|
||||
const apiCacheTimers: Record<string, number> = {}
|
||||
|
||||
export const infiniteListLogic = kea<infiniteListLogicType>({
|
||||
path: (key) => ['lib', 'components', 'TaxonomicFilter', 'infiniteListLogic', key],
|
||||
props: {} as InfiniteListLogicProps,
|
||||
|
||||
key: (props) => `${props.taxonomicFilterLogicKey}-${props.listGroupType}`,
|
||||
|
@ -18,6 +18,7 @@ import { groupsModel } from '~/models/groupsModel'
|
||||
import { groupPropertiesModel } from '~/models/groupPropertiesModel'
|
||||
|
||||
export const taxonomicFilterLogic = kea<taxonomicFilterLogicType>({
|
||||
path: (key) => ['lib', 'components', 'TaxonomicFilter', 'taxonomicFilterLogic', key],
|
||||
props: {} as TaxonomicFilterLogicProps,
|
||||
key: (props) => `${props.taxonomicFilterLogicKey}`,
|
||||
connect: { values: [teamLogic, ['currentTeamId'], groupsModel, ['groupTypes']] },
|
||||
|
@ -2,6 +2,7 @@ import { kea } from 'kea'
|
||||
|
||||
import { visibilitySensorLogicType } from './visibilitySensorLogicType'
|
||||
export const visibilitySensorLogic = kea<visibilitySensorLogicType>({
|
||||
path: (key) => ['lib', 'components', 'VisibilitySensor', 'visibilitySensorLogic', key],
|
||||
props: {} as {
|
||||
id: string
|
||||
offset?: number
|
||||
|
@ -24,6 +24,7 @@ interface NPSPayload {
|
||||
}
|
||||
|
||||
const npsLogic = kea<npsLogicType<NPSPayload, Step>>({
|
||||
path: ['lib', 'experimental', 'NPSPrompt'],
|
||||
selectors: {
|
||||
featureFlagEnabled: [
|
||||
() => [featureFlagLogic.selectors.featureFlags],
|
||||
|
@ -12,6 +12,7 @@ import { Modal, Input, Form } from 'antd'
|
||||
// actions:
|
||||
// - prompt({ title, placeholder, value, error, success, failure })
|
||||
export const prompt = kea({
|
||||
path: (key) => ['lib', 'logic', 'prompt', key],
|
||||
key: (props) => props.key,
|
||||
|
||||
actions: () => ({
|
||||
|
@ -37,6 +37,7 @@ export const searchItems = (sources: SelectedItem[], search: string): SelectedIt
|
||||
}
|
||||
|
||||
export const selectBoxLogic = kea<selectBoxLogicType>({
|
||||
path: ['lib', 'logic', 'selectBoxLogic'],
|
||||
props: {} as {
|
||||
items: SelectBoxItem[]
|
||||
updateFilter: (type: any, id: string | number, name: string) => void
|
||||
|
@ -146,6 +146,7 @@ function sanitizeFilterParams(filters: Partial<FilterType>): Record<string, any>
|
||||
export const eventUsageLogic = kea<
|
||||
eventUsageLogicType<DashboardEventSource, GraphSeriesAddedSource, RecordingWatchedSource>
|
||||
>({
|
||||
path: ['lib', 'utils', 'eventUsageLogic'],
|
||||
connect: () => [preflightLogic],
|
||||
actions: {
|
||||
reportAnnotationViewed: (annotations: AnnotationType[] | null) => ({ annotations }),
|
||||
|
@ -8,6 +8,7 @@ interface ActionsModelProps {
|
||||
}
|
||||
|
||||
export const actionsModel = kea<actionsModelType<ActionsModelProps>>({
|
||||
path: ['models', 'actionsModel'],
|
||||
props: {} as ActionsModelProps,
|
||||
loaders: ({ props }) => ({
|
||||
actions: {
|
||||
|
@ -8,6 +8,7 @@ import { AnnotationScope, AnnotationType } from '~/types'
|
||||
import { teamLogic } from '../scenes/teamLogic'
|
||||
|
||||
export const annotationsModel = kea<annotationsModelType>({
|
||||
path: ['models', 'annotationsModel'],
|
||||
actions: {
|
||||
createGlobalAnnotation: (content: string, date_marker: string, dashboard_item?: number) => ({
|
||||
content,
|
||||
|
@ -6,6 +6,7 @@ import { CohortType } from '~/types'
|
||||
const POLL_TIMEOUT = 5000
|
||||
|
||||
export const cohortsModel = kea<cohortsModelType>({
|
||||
path: ['models', 'cohortsModel'],
|
||||
actions: () => ({
|
||||
setPollTimeout: (pollTimeout: number | null) => ({ pollTimeout }),
|
||||
updateCohort: (cohort: CohortType) => ({ cohort }),
|
||||
|
@ -11,6 +11,7 @@ import { urls } from 'scenes/urls'
|
||||
import { teamLogic } from '../scenes/teamLogic'
|
||||
|
||||
export const dashboardItemsModel = kea<dashboardItemsModelType>({
|
||||
path: ['models', 'dashboardItemsModel'],
|
||||
actions: () => ({
|
||||
renameDashboardItem: (item: DashboardItemType) => ({ item }),
|
||||
renameDashboardItemSuccess: (item: DashboardItemType) => ({ item }),
|
||||
|
@ -17,6 +17,7 @@ interface EventsGroupedInterface {
|
||||
}
|
||||
|
||||
export const eventDefinitionsModel = kea<eventDefinitionsModelType<EventDefinitionStorage, EventsGroupedInterface>>({
|
||||
path: ['models', 'eventDefinitionsModel'],
|
||||
actions: () => ({
|
||||
updateDescription: (id: string, description: string | null, type: string) => ({ id, description, type }),
|
||||
updateEventDefinition: (eventDefinition: EventDefinition) => ({ eventDefinition }),
|
||||
|
@ -19,6 +19,7 @@ const parseSavedFunnel = (result: Record<string, any>): SavedFunnel => {
|
||||
}
|
||||
|
||||
export const funnelsModel = kea<funnelsModelType>({
|
||||
path: ['models', 'funnelsModel'],
|
||||
loaders: ({ values, actions }) => ({
|
||||
funnels: {
|
||||
__default: [] as SavedFunnel[],
|
||||
|
@ -6,6 +6,7 @@ import { teamLogic } from 'scenes/teamLogic'
|
||||
import { groupsModel } from './groupsModel'
|
||||
|
||||
export const groupPropertiesModel = kea<groupPropertiesModelType>({
|
||||
path: ['models', 'groupPropertiesModel'],
|
||||
connect: {
|
||||
values: [teamLogic, ['currentTeamId'], groupsModel, ['groupsEnabled']],
|
||||
},
|
||||
|
@ -9,6 +9,7 @@ import { TaxonomicFilterGroupType } from 'lib/components/TaxonomicFilter/types'
|
||||
import { preflightLogic } from 'scenes/PreflightCheck/logic'
|
||||
|
||||
export const groupsModel = kea<groupsModelType>({
|
||||
path: ['models', 'groupsModel'],
|
||||
connect: {
|
||||
values: [
|
||||
teamLogic,
|
||||
|
@ -11,6 +11,7 @@ import { modelsType } from './indexType'
|
||||
|
||||
/** "Models" are logics that are persistently mounted (start with app) */
|
||||
export const models = kea<modelsType>({
|
||||
path: ['models', 'index'],
|
||||
connect: [
|
||||
actionsModel,
|
||||
annotationsModel,
|
||||
|
@ -4,6 +4,7 @@ import api from 'lib/api'
|
||||
import { PersonProperty } from '~/types'
|
||||
|
||||
export const personPropertiesModel = kea<personPropertiesModelType>({
|
||||
path: ['models', 'personPropertiesModel'],
|
||||
loaders: {
|
||||
personProperties: [
|
||||
[] as Array<PersonProperty>,
|
||||
|
@ -16,6 +16,7 @@ interface PropertyDefinitionStorage {
|
||||
export const propertyDefinitionsModel = kea<
|
||||
propertyDefinitionsModelType<PropertyDefinitionStorage, PropertySelectOption>
|
||||
>({
|
||||
path: ['models', 'propertyDefinitionsModel'],
|
||||
actions: () => ({
|
||||
updatePropertyDefinition: (property: PropertyDefinition) => ({ property }),
|
||||
}),
|
||||
|
@ -22,6 +22,7 @@ import { SideBar } from '../layout/lemonade/SideBar/SideBar'
|
||||
import { appScenes } from 'scenes/appScenes'
|
||||
|
||||
export const appLogic = kea<appLogicType>({
|
||||
path: ['scenes', 'App'],
|
||||
actions: {
|
||||
enableDelayedSpinner: true,
|
||||
ignoreFeatureFlags: true,
|
||||
|
@ -8,6 +8,7 @@ import { getAppContext } from 'lib/utils/getAppContext'
|
||||
type PreflightMode = 'experimentation' | 'live'
|
||||
|
||||
export const preflightLogic = kea<preflightLogicType<PreflightMode>>({
|
||||
path: ['scenes', 'PreflightCheck', 'preflightLogic'],
|
||||
loaders: {
|
||||
preflight: [
|
||||
null as PreflightStatus | null,
|
||||
|
@ -18,6 +18,7 @@ interface ActionLogicProps {
|
||||
}
|
||||
|
||||
const actionLogic = kea<actionLogicType<ActionLogicProps>>({
|
||||
path: (key) => ['scenes', 'actions', 'actionLogic', key],
|
||||
props: {} as ActionLogicProps,
|
||||
key: (props) => props.id || 'new',
|
||||
actions: () => ({
|
||||
|
@ -17,6 +17,7 @@ export interface ActionEditLogicProps {
|
||||
}
|
||||
|
||||
export const actionEditLogic = kea<actionEditLogicType<ActionEditLogicProps, ActionEditType>>({
|
||||
path: (key) => ['scenes', 'actions', 'actionEditLogic', key],
|
||||
props: {} as ActionEditLogicProps,
|
||||
key: (props) => props.id || 'new',
|
||||
actions: () => ({
|
||||
|
@ -7,6 +7,7 @@ import { AnnotationType } from '~/types'
|
||||
import { teamLogic } from '../teamLogic'
|
||||
|
||||
export const annotationsTableLogic = kea<annotationsTableLogicType>({
|
||||
path: ['scenes', 'annotations', 'logic'],
|
||||
loaders: ({ actions }) => ({
|
||||
annotations: {
|
||||
__default: [],
|
||||
|
@ -22,6 +22,7 @@ interface AcceptInvitePayloadInterface {
|
||||
}
|
||||
|
||||
export const inviteSignupLogic = kea<inviteSignupLogicType<AcceptInvitePayloadInterface, ErrorInterface>>({
|
||||
path: ['scenes', 'authentication', 'inviteSignupLogic'],
|
||||
actions: {
|
||||
setError: (payload: ErrorInterface) => ({ payload }),
|
||||
},
|
||||
|
@ -14,6 +14,7 @@ export function afterLoginRedirect(): string {
|
||||
}
|
||||
|
||||
export const loginLogic = kea<loginLogicType<AuthenticateResponseType>>({
|
||||
path: ['scenes', 'authentication', 'loginLogic'],
|
||||
loaders: {
|
||||
authenticateResponse: [
|
||||
null as AuthenticateResponseType | null,
|
||||
|
@ -20,6 +20,7 @@ interface ValidatedTokenResponseType extends ResponseType {
|
||||
export const passwordResetLogic = kea<
|
||||
passwordResetLogicType<ResetResponseType, ResponseType, ValidatedTokenResponseType>
|
||||
>({
|
||||
path: ['scenes', 'authentication', 'passwordResetLogic'],
|
||||
loaders: ({ values }) => ({
|
||||
resetResponse: [
|
||||
null as ResetResponseType | null,
|
||||
|
@ -11,6 +11,7 @@ interface AccountResponse {
|
||||
}
|
||||
|
||||
export const signupLogic = kea<signupLogicType<AccountResponse>>({
|
||||
path: ['scenes', 'authentication', 'signupLogic'],
|
||||
actions: {
|
||||
setInitialEmail: (email: string) => ({ email }),
|
||||
setFormSubmitted: (submitted: boolean) => ({ submitted }),
|
||||
|
@ -16,6 +16,7 @@ export enum BillingAlertType {
|
||||
}
|
||||
|
||||
export const billingLogic = kea<billingLogicType<BillingAlertType>>({
|
||||
path: ['scenes', 'billing', 'billingLogic'],
|
||||
actions: {
|
||||
registerInstrumentationProps: true,
|
||||
},
|
||||
|
@ -10,6 +10,7 @@ export enum SubscriptionStatus {
|
||||
}
|
||||
|
||||
export const billingSubscribedLogic = kea<billingSubscribedLogicType<SubscriptionStatus>>({
|
||||
path: ['scenes', 'billing', 'billingSubscribedLogic'],
|
||||
connect: {
|
||||
actions: [sceneLogic, ['setScene']],
|
||||
values: [billingLogic, ['billing']],
|
||||
|
@ -35,6 +35,7 @@ const NEW_COHORT: CohortType = {
|
||||
}
|
||||
|
||||
const cohortsUrlLogic = kea<cohortsUrlLogicType>({
|
||||
path: ['scenes', 'cohorts', 'cohortsUrlLogic'],
|
||||
actions: {
|
||||
setOpenCohort: (cohort: CohortType | null) => ({ cohort }),
|
||||
},
|
||||
|
@ -41,6 +41,7 @@ export const cohortLogic = kea<cohortLogicType>({
|
||||
cohort: CohortType
|
||||
},
|
||||
key: (props) => props.cohort.id || 'new',
|
||||
path: (key) => ['scenes', 'cohorts', 'cohortLogic', key],
|
||||
connect: [cohortsModel],
|
||||
|
||||
actions: () => ({
|
||||
|
@ -24,6 +24,7 @@ export interface DashboardLogicProps {
|
||||
export const AUTO_REFRESH_INITIAL_INTERVAL_SECONDS = 300
|
||||
|
||||
export const dashboardLogic = kea<dashboardLogicType<DashboardLogicProps>>({
|
||||
path: (key) => ['scenes', 'dashboard', 'dashboardLogic', key],
|
||||
connect: {
|
||||
values: [teamLogic, ['currentTeamId']],
|
||||
logic: [dashboardsModel, dashboardItemsModel, eventUsageLogic],
|
||||
@ -226,7 +227,14 @@ export const dashboardLogic = kea<dashboardLogicType<DashboardLogicProps>>({
|
||||
setRefreshStatuses: (_, { ids, loading }) =>
|
||||
Object.fromEntries(
|
||||
ids.map((id) => [id, loading ? { loading: true } : { refreshed: true }])
|
||||
) as Record<number, { loading?: boolean; refreshed?: boolean; error?: boolean }>,
|
||||
) as Record<
|
||||
number,
|
||||
{
|
||||
loading?: boolean
|
||||
refreshed?: boolean
|
||||
error?: boolean
|
||||
}
|
||||
>,
|
||||
setRefreshError: (state, { id }) => ({
|
||||
...state,
|
||||
[id]: { error: true },
|
||||
|
@ -7,6 +7,7 @@ import { uniqueBy } from 'lib/utils'
|
||||
import { urls } from 'scenes/urls'
|
||||
|
||||
export const dashboardsLogic = kea<dashboardsLogicType>({
|
||||
path: ['scenes', 'dashboard', 'dashboardsLogic'],
|
||||
actions: {
|
||||
addNewDashboard: true,
|
||||
setNewDashboardDrawer: (shown: boolean) => ({ shown }),
|
||||
|
@ -19,6 +19,7 @@ const tabUrls: Record<EventsTab, string> = {
|
||||
}
|
||||
|
||||
const eventsTabsLogic = kea<eventsTabsLogicType<EventsTab>>({
|
||||
path: ['scenes', 'events', 'eventsTabsLogic'],
|
||||
actions: {
|
||||
setTab: (tab: EventsTab) => ({ tab }),
|
||||
},
|
||||
|
@ -10,6 +10,7 @@ import { propertyDefinitionsModel } from '~/models/propertyDefinitionsModel'
|
||||
import { teamLogic } from '../../teamLogic'
|
||||
|
||||
export const definitionDrawerLogic = kea<definitionDrawerLogicType>({
|
||||
path: ['scenes', 'events', 'definitions', 'definitionDrawerLogic'],
|
||||
actions: () => ({
|
||||
openDrawer: (type: string, id: string) => ({ type, id }),
|
||||
setDrawerType: (type: string) => ({ type }),
|
||||
|
@ -53,6 +53,7 @@ export interface ApiError {
|
||||
}
|
||||
|
||||
export const eventsTableLogic = kea<eventsTableLogicType<ApiError, EventsTableLogicProps, OnFetchEventsSuccess>>({
|
||||
path: (key) => ['scenes', 'events', 'eventsTableLogic', key],
|
||||
props: {} as EventsTableLogicProps,
|
||||
// Set a unique key based on the fixed filters.
|
||||
// This way if we move back/forward between /events and /person/ID, the logic is reloaded.
|
||||
@ -64,7 +65,11 @@ export const eventsTableLogic = kea<eventsTableLogicType<ApiError, EventsTableLo
|
||||
values: [teamLogic, ['currentTeamId']],
|
||||
},
|
||||
actions: {
|
||||
setProperties: (properties: AnyPropertyFilter[] | AnyPropertyFilter): { properties: AnyPropertyFilter[] } => {
|
||||
setProperties: (
|
||||
properties: AnyPropertyFilter[] | AnyPropertyFilter
|
||||
): {
|
||||
properties: AnyPropertyFilter[]
|
||||
} => {
|
||||
// there seem to be multiple representations of "empty" properties
|
||||
// the page does not work with some of those representations
|
||||
// this action normalises them
|
||||
|
@ -38,6 +38,7 @@ const EMPTY_MULTIVARIATE_OPTIONS: MultivariateFlagOptions = {
|
||||
}
|
||||
|
||||
export const featureFlagLogic = kea<featureFlagLogicType>({
|
||||
path: ['scenes', 'feature-flags', 'featureFlagLogic'],
|
||||
connect: {
|
||||
values: [teamLogic, ['currentTeamId']],
|
||||
},
|
||||
|
@ -5,6 +5,7 @@ import { FeatureFlagType } from '~/types'
|
||||
import { teamLogic } from '../teamLogic'
|
||||
|
||||
export const featureFlagsLogic = kea<featureFlagsLogicType>({
|
||||
path: ['scenes', 'feature-flags', 'featureFlagsLogic'],
|
||||
connect: {
|
||||
values: [teamLogic, ['currentTeamId']],
|
||||
},
|
||||
|
@ -8,6 +8,7 @@ import { organizationLogic } from 'scenes/organizationLogic'
|
||||
import { teamLogic } from 'scenes/teamLogic'
|
||||
|
||||
export const ingestionLogic = kea<ingestionLogicType>({
|
||||
path: ['scenes', 'ingestion', 'ingestionLogic'],
|
||||
connect: {
|
||||
actions: [teamLogic, ['updateCurrentTeamSuccess']],
|
||||
},
|
||||
|
@ -45,6 +45,7 @@ export interface EntityFilterProps {
|
||||
export const entityFilterLogic = kea<entityFilterLogicType<BareEntity, EntityFilterProps, LocalFilter>>({
|
||||
props: {} as EntityFilterProps,
|
||||
key: (props) => props.typeKey,
|
||||
path: (key) => ['scenes', 'insights', 'ActionFilter', 'entityFilterLogic', key],
|
||||
connect: {
|
||||
values: [actionsModel, ['actions']],
|
||||
},
|
||||
|
@ -12,6 +12,7 @@ export interface RenameModalProps {
|
||||
export const renameModalLogic = kea<renameModalLogicType<RenameModalProps>>({
|
||||
props: {} as RenameModalProps,
|
||||
key: (props) => props.typeKey,
|
||||
path: (key) => ['scenes', 'insights', 'ActionFilter', 'renameModalLogic', key],
|
||||
connect: {
|
||||
actions: [entityFilterLogic, ['selectFilter']],
|
||||
},
|
||||
|
@ -4,6 +4,7 @@ import { histogramLogicType } from './histogramLogicType'
|
||||
import { FunnelLayout } from 'lib/constants'
|
||||
|
||||
export const histogramLogic = kea<histogramLogicType>({
|
||||
path: ['scenes', 'insights', 'Histogram', 'histogramLogic'],
|
||||
actions: {
|
||||
setConfig: (config: HistogramConfig) => ({ config }),
|
||||
},
|
||||
|
@ -10,6 +10,7 @@ interface UrlParams {
|
||||
}
|
||||
|
||||
export const insightDateFilterLogic = kea<insightDateFilterLogicType>({
|
||||
path: ['scenes', 'insights', 'InsightDateFilter', 'insightDateFilterLogic'],
|
||||
actions: () => ({
|
||||
setDates: (dateFrom: string | Dayjs | undefined, dateTo: string | Dayjs | undefined) => ({
|
||||
dateFrom,
|
||||
|
@ -40,6 +40,7 @@ const updateInsightState = (
|
||||
|
||||
/* insightHistoryLogic - Handles all logic for saved insights and recent history */
|
||||
export const insightHistoryLogic = kea<insightHistoryLogicType>({
|
||||
path: ['scenes', 'insights', 'InsightHistoryPanel', 'insightHistoryLogic'],
|
||||
connect: {
|
||||
values: [teamLogic, ['currentTeamId']],
|
||||
},
|
||||
|
@ -9,6 +9,7 @@ import { router } from 'kea-router'
|
||||
const FUNNEL_COMMAND_SCOPE = 'funnels'
|
||||
|
||||
export const funnelCommandLogic = kea<funnelCommandLogicType>({
|
||||
path: ['scenes', 'insights', 'InsightTabs', 'FunnelTab', 'funnelCommandLogic'],
|
||||
connect: [commandPaletteLogic],
|
||||
events: {
|
||||
afterMount: () => {
|
||||
|
@ -4,6 +4,7 @@ import { insightsTableLogicType } from './insightsTableLogicType'
|
||||
export type CalcColumnState = 'total' | 'average' | 'median'
|
||||
|
||||
export const insightsTableLogic = kea<insightsTableLogicType<CalcColumnState>>({
|
||||
path: ['scenes', 'insights', 'InsightsTable', 'insightsTableLogic'],
|
||||
props: {} as {
|
||||
hasMathUniqueFilter: boolean
|
||||
},
|
||||
|
@ -9,6 +9,7 @@ import { dateMapping } from 'lib/utils'
|
||||
const INSIGHT_COMMAND_SCOPE = 'insights'
|
||||
|
||||
export const insightCommandLogic = kea<insightCommandLogicType>({
|
||||
path: ['scenes', 'insights', 'insightCommandLogic'],
|
||||
connect: [commandPaletteLogic, compareFilterLogic, insightDateFilterLogic],
|
||||
events: () => ({
|
||||
afterMount: () => {
|
||||
|
@ -48,6 +48,7 @@ export const defaultFilterTestAccounts = (): boolean => {
|
||||
export const insightLogic = kea<insightLogicType>({
|
||||
props: {} as InsightLogicProps,
|
||||
key: keyForInsightLogicProps('new'),
|
||||
path: (key) => ['scenes', 'insights', 'insightLogic', key],
|
||||
|
||||
connect: {
|
||||
values: [teamLogic, ['currentTeamId']],
|
||||
|
@ -8,6 +8,7 @@ import { cleanFilters } from 'scenes/insights/utils/cleanFilters'
|
||||
import { insightRouterLogicType } from './insightRouterLogicType'
|
||||
|
||||
export const insightRouterLogic = kea<insightRouterLogicType>({
|
||||
path: ['scenes', 'insights', 'insightRouterLogic'],
|
||||
actions: {
|
||||
loadInsight: (id: string) => ({ id }),
|
||||
setError: true,
|
||||
|
@ -6,6 +6,7 @@ import { APIErrorType, LicenseType } from '~/types'
|
||||
import { preflightLogic } from '../../PreflightCheck/logic'
|
||||
|
||||
export const licenseLogic = kea<licenseLogicType>({
|
||||
path: ['scenes', 'instance', 'Licenses', 'licenseLogic'],
|
||||
connect: {
|
||||
values: [preflightLogic, ['preflight']],
|
||||
},
|
||||
|
@ -7,6 +7,7 @@ interface AccountResponse {
|
||||
}
|
||||
|
||||
export const signupLogic = kea<signupLogicType<AccountResponse>>({
|
||||
path: ['scenes', 'onboarding', 'signupLogic'],
|
||||
loaders: () => ({
|
||||
account: [
|
||||
null as AccountResponse | null,
|
||||
|
@ -8,6 +8,7 @@ import { OrganizationType, TeamType } from '~/types'
|
||||
import { onboardingSetupLogicType } from './onboardingSetupLogicType'
|
||||
|
||||
export const onboardingSetupLogic = kea<onboardingSetupLogicType>({
|
||||
path: ['scenes', 'onboarding', 'onboardingSetupLogic'],
|
||||
actions: {
|
||||
switchToNonDemoProject: (dest) => ({ dest }),
|
||||
setProjectModalShown: (shown) => ({ shown }),
|
||||
|
@ -7,6 +7,7 @@ import { router } from 'kea-router'
|
||||
import { urls } from 'scenes/urls'
|
||||
|
||||
export const personalizationLogic = kea<personalizationLogicType>({
|
||||
path: ['scenes', 'onboarding', 'personalizationLogic'],
|
||||
connect: {
|
||||
actions: [organizationLogic, ['updateOrganizationSuccess', 'loadCurrentOrganizationSuccess']],
|
||||
},
|
||||
|
@ -17,6 +17,7 @@ interface InviteRowState {
|
||||
const EMPTY_INVITE: InviteRowState = { target_email: '', first_name: '', isValid: true }
|
||||
|
||||
export const bulkInviteLogic = kea<bulkInviteLogicType<InviteRowState>>({
|
||||
path: ['scenes', 'organization', 'Settings', 'bulkInviteLogic'],
|
||||
actions: {
|
||||
updateInviteAtIndex: (payload, index: number) => ({ payload, index }),
|
||||
deleteInviteAtIndex: (index: number) => ({ index }),
|
||||
|
@ -9,6 +9,7 @@ import { eventUsageLogic } from 'lib/utils/eventUsageLogic'
|
||||
import { preflightLogic } from 'scenes/PreflightCheck/logic'
|
||||
|
||||
export const invitesLogic = kea<invitesLogicType>({
|
||||
path: ['scenes', 'organization', 'Settings', 'invitesLogic'],
|
||||
loaders: ({ values }) => ({
|
||||
invites: {
|
||||
__default: [] as OrganizationInviteType[],
|
||||
|
@ -11,6 +11,7 @@ import { userLogic } from 'scenes/userLogic'
|
||||
import { membershipLevelToName } from '../../../lib/utils/permissioning'
|
||||
|
||||
export const membersLogic = kea<membersLogicType>({
|
||||
path: ['scenes', 'organization', 'Settings', 'membersLogic'],
|
||||
actions: {
|
||||
changeMemberAccessLevel: (member: OrganizationMemberType, level: OrganizationMembershipLevel) => ({
|
||||
member,
|
||||
|
@ -12,6 +12,7 @@ export type OrganizationUpdatePayload = Partial<
|
||||
>
|
||||
|
||||
export const organizationLogic = kea<organizationLogicType<OrganizationUpdatePayload>>({
|
||||
path: ['scenes', 'organizationLogic'],
|
||||
actions: {
|
||||
deleteOrganization: (organization: OrganizationType) => ({ organization }),
|
||||
deleteOrganizationSuccess: true,
|
||||
|
@ -35,6 +35,7 @@ interface PathNode {
|
||||
}
|
||||
|
||||
export const pathsLogic = kea<pathsLogicType<PathNode>>({
|
||||
path: (key) => ['scenes', 'paths', 'pathsLogic', key],
|
||||
props: {} as InsightLogicProps,
|
||||
key: keyForInsightLogicProps(DEFAULT_PATH_LOGIC_KEY),
|
||||
|
||||
|
@ -21,6 +21,7 @@ type PersonIds = NonNullable<PersonType['id']>[]
|
||||
export const mergeSplitPersonLogic = kea<mergeSplitPersonLogicType<ActivityType, PersonIds, SplitPersonLogicProps>>({
|
||||
props: {} as SplitPersonLogicProps,
|
||||
key: (props) => props.person.id,
|
||||
path: (key) => ['scenes', 'persons', 'mergeSplitPersonLogic', key || 'new'],
|
||||
connect: {
|
||||
actions: [personsLogic, ['setListFilters', 'loadPersons', 'setPerson', 'setSplitMergeModalShown']],
|
||||
values: [personsLogic, ['persons']],
|
||||
|
@ -19,6 +19,7 @@ interface PersonPaginatedResponse {
|
||||
const FILTER_ALLOWLIST: string[] = ['is_identified', 'search', 'cohort']
|
||||
|
||||
export const personsLogic = kea<personsLogicType<PersonPaginatedResponse>>({
|
||||
path: ['scenes', 'persons', 'personsLogic'],
|
||||
connect: {
|
||||
actions: [eventUsageLogic, ['reportPersonDetailViewed']],
|
||||
values: [featureFlagLogic, ['featureFlags'], teamLogic, ['currentTeam']],
|
||||
|
@ -18,6 +18,7 @@ export const interfaceJobsLogic = kea<interfaceJobsLogicType>({
|
||||
key: (props) => {
|
||||
return `${props.pluginId}_${props.jobName}`
|
||||
},
|
||||
path: (key) => ['scenes', 'plugins', 'edit', 'interface-jobs', 'interfaceJobsLogic', key],
|
||||
connect: {
|
||||
actions: [pluginsLogic, ['showPluginLogs']],
|
||||
},
|
||||
|
@ -14,6 +14,7 @@ export const LOGS_PORTION_LIMIT = 50
|
||||
export const pluginLogsLogic = kea<pluginLogsLogicType<PluginLogsProps>>({
|
||||
props: {} as PluginLogsProps,
|
||||
key: ({ pluginConfigId }: PluginLogsProps) => pluginConfigId,
|
||||
path: (key) => ['scenes', 'plugins', 'plugin', 'pluginLogsLogic', key],
|
||||
connect: {
|
||||
values: [teamLogic, ['currentTeamId']],
|
||||
},
|
||||
|
@ -35,6 +35,7 @@ function capturePluginEvent(event: string, plugin: PluginType, type?: PluginInst
|
||||
}
|
||||
|
||||
export const pluginsLogic = kea<pluginsLogicType<PluginForm, PluginSection>>({
|
||||
path: ['scenes', 'plugins', 'pluginsLogic'],
|
||||
actions: {
|
||||
editPlugin: (id: number | null, pluginConfigChanges: Record<string, any> = {}) => ({ id, pluginConfigChanges }),
|
||||
savePluginConfig: (pluginConfigChanges: Record<string, any>) => ({ pluginConfigChanges }),
|
||||
|
@ -21,6 +21,7 @@ import { teamLogic } from '../../teamLogic'
|
||||
export const MINIMUM_IMPLICIT_ACCESS_LEVEL = OrganizationMembershipLevel.Admin
|
||||
|
||||
export const teamMembersLogic = kea<teamMembersLogicType>({
|
||||
path: ['scenes', 'project', 'Settings', 'teamMembersLogic'],
|
||||
actions: {
|
||||
changeUserAccessLevel: (user: UserBasicType, newLevel: TeamMembershipLevel) => ({
|
||||
user,
|
||||
|
@ -10,6 +10,7 @@ function adjustDiscordWebhook(webhookUrl: string): string {
|
||||
}
|
||||
|
||||
export const webhookIntegrationLogic = kea<webhookIntegrationLogicType>({
|
||||
path: ['scenes', 'project', 'Settings', 'webhookIntegrationLogic'],
|
||||
loaders: ({ actions }) => ({
|
||||
testedWebhook: [
|
||||
null as string | null,
|
||||
|
@ -33,6 +33,7 @@ const DEFAULT_RETENTION_LOGIC_KEY = 'default_retention_key'
|
||||
export const retentionTableLogic = kea<retentionTableLogicType>({
|
||||
props: {} as InsightLogicProps,
|
||||
key: keyForInsightLogicProps(DEFAULT_RETENTION_LOGIC_KEY),
|
||||
path: (key) => ['scenes', 'retention', 'retentionTableLogic', key],
|
||||
connect: (props: InsightLogicProps) => ({
|
||||
values: [insightLogic(props), ['filters', 'insight', 'insightLoading'], actionsModel, ['actions']],
|
||||
actions: [insightLogic(props), ['loadResultsSuccess']],
|
||||
|
@ -46,6 +46,7 @@ function cleanFilters(values: Partial<SavedInsightFilters>): SavedInsightFilters
|
||||
}
|
||||
|
||||
export const savedInsightsLogic = kea<savedInsightsLogicType<InsightsResult, SavedInsightFilters>>({
|
||||
path: ['scenes', 'saved-insights', 'savedInsightsLogic'],
|
||||
connect: {
|
||||
values: [teamLogic, ['currentTeamId']],
|
||||
logic: [eventUsageLogic],
|
||||
@ -218,7 +219,16 @@ export const savedInsightsLogic = kea<savedInsightsLogicType<InsightsResult, Sav
|
||||
},
|
||||
}),
|
||||
actionToUrl: ({ values }) => {
|
||||
const changeUrl = (): [string, Record<string, any>, Record<string, any>, { replace: true }] | void => {
|
||||
const changeUrl = ():
|
||||
| [
|
||||
string,
|
||||
Record<string, any>,
|
||||
Record<string, any>,
|
||||
{
|
||||
replace: true
|
||||
}
|
||||
]
|
||||
| void => {
|
||||
const nextValues = cleanFilters(values.filters)
|
||||
const urlValues = cleanFilters(router.values.searchParams)
|
||||
if (!objectsEqual(nextValues, urlValues)) {
|
||||
|
@ -18,6 +18,7 @@ export interface DurationFilterProps {
|
||||
const TIME_MULTIPLIERS = { seconds: 1, minutes: 60, hours: 3600 }
|
||||
|
||||
export const DurationFilterLogic = kea<DurationFilterLogicType<DurationFilterProps, TimeUnit>>({
|
||||
path: (key) => ['scenes', 'session-recordings', 'DurationFilterLogic', key],
|
||||
key: (props) => props.pageKey || 'global',
|
||||
props: {} as DurationFilterProps,
|
||||
actions: {
|
||||
|
@ -21,6 +21,7 @@ import {
|
||||
import dayjs from 'dayjs'
|
||||
|
||||
export const seekbarLogic = kea<seekbarLogicType>({
|
||||
path: ['scenes', 'session-recordings', 'player', 'seekbarLogic'],
|
||||
connect: {
|
||||
values: [
|
||||
sessionRecordingPlayerLogic,
|
||||
|
@ -19,6 +19,7 @@ export function getOffsetTime(zeroOffsetTime: number, meta: playerMetaData): num
|
||||
}
|
||||
|
||||
export const sessionRecordingPlayerLogic = kea<sessionRecordingPlayerLogicType>({
|
||||
path: ['scenes', 'session-recordings', 'player', 'sessionRecordingPlayerLogic'],
|
||||
connect: {
|
||||
logic: [eventUsageLogic],
|
||||
values: [
|
||||
|
@ -23,6 +23,7 @@ export const parseMetadataResponse = (metadata: Record<string, any>): Partial<Se
|
||||
}
|
||||
|
||||
export const sessionRecordingLogic = kea<sessionRecordingLogicType>({
|
||||
path: ['scenes', 'session-recordings', 'sessionRecordingLogic'],
|
||||
connect: {
|
||||
logic: [eventUsageLogic],
|
||||
values: [teamLogic, ['currentTeamId']],
|
||||
|
@ -47,6 +47,7 @@ export const DEFAULT_ENTITY_FILTERS = {
|
||||
}
|
||||
|
||||
export const sessionRecordingsTableLogic = kea<sessionRecordingsTableLogicType<PersonUUID, SessionRecordingId>>({
|
||||
path: (key) => ['scenes', 'session-recordings', 'sessionRecordingsTableLogic', key],
|
||||
key: (props) => props.personUUID || 'global',
|
||||
props: {} as {
|
||||
personUUID?: PersonUUID
|
||||
|
@ -34,6 +34,7 @@ const convertToNewSessionPlayerDataType = (legacyData: LEGACY_SessionPlayerData)
|
||||
}
|
||||
|
||||
export const LEGACY_sessionsPlayLogic = kea<LEGACY_sessionsPlayLogicType>({
|
||||
path: ['scenes', 'sessions', 'LEGACY_sessionsPlayLogic'],
|
||||
connect: {
|
||||
logic: [eventUsageLogic],
|
||||
values: [
|
||||
|
@ -20,6 +20,7 @@ export interface SavedFilter {
|
||||
type FilterPropertyType = SessionsPropertyFilter['type']
|
||||
|
||||
export const sessionsFiltersLogic = kea<sessionsFiltersLogicType<FilterPropertyType, FilterSelector, SavedFilter>>({
|
||||
path: ['scenes', 'sessions', 'filters', 'sessionsFiltersLogic'],
|
||||
actions: () => ({
|
||||
openFilterSelect: (selector: FilterSelector) => ({ selector }),
|
||||
closeFilterSelect: true,
|
||||
|
@ -28,10 +28,11 @@ interface Params {
|
||||
}
|
||||
|
||||
export const sessionsTableLogic = kea<sessionsTableLogicType<SessionRecordingId>>({
|
||||
key: (props) => props.personIds || 'global',
|
||||
props: {} as {
|
||||
personIds?: string[]
|
||||
},
|
||||
key: (props) => props.personIds || 'global',
|
||||
path: (key) => ['scenes', 'sessions', 'sessionsTableLogic', Array.isArray(key) ? key.join(',') : key],
|
||||
connect: {
|
||||
values: [sessionsFiltersLogic, ['filters']],
|
||||
actions: [sessionsFiltersLogic, ['setAllFilters', 'removeFilter']],
|
||||
|
@ -10,6 +10,7 @@ import { organizationLogic } from './organizationLogic'
|
||||
import { getAppContext } from '../lib/utils/getAppContext'
|
||||
|
||||
export const teamLogic = kea<teamLogicType>({
|
||||
path: ['scenes', 'teamLogic'],
|
||||
actions: {
|
||||
deleteTeam: (team: TeamType) => ({ team }),
|
||||
deleteTeamSuccess: true,
|
||||
|
@ -88,6 +88,7 @@ export function parsePeopleParams(peopleParams: PeopleParamType, filters: Partia
|
||||
}
|
||||
|
||||
export const personsModalLogic = kea<personsModalLogicType<PersonModalParams>>({
|
||||
path: ['scenes', 'trends', 'personsModalLogic'],
|
||||
actions: () => ({
|
||||
setSearchTerm: (term: string) => ({ term }),
|
||||
setCohortModalVisible: (visible: boolean) => ({ visible }),
|
||||
|
@ -10,6 +10,7 @@ import { isTrendsInsight, keyForInsightLogicProps } from 'scenes/insights/shared
|
||||
export const trendsLogic = kea<trendsLogicType>({
|
||||
props: {} as InsightLogicProps,
|
||||
key: keyForInsightLogicProps('all_trends'),
|
||||
path: (key) => ['scenes', 'trends', 'trendsLogic', key],
|
||||
|
||||
connect: (props: InsightLogicProps) => ({
|
||||
values: [insightLogic(props), ['filters', 'insight', 'insightLoading']],
|
||||
|
@ -9,6 +9,7 @@ import { getAppContext } from 'lib/utils/getAppContext'
|
||||
import { teamLogic } from './teamLogic'
|
||||
|
||||
export const userLogic = kea<userLogicType>({
|
||||
path: ['scenes', 'userLogic'],
|
||||
connect: {
|
||||
values: [teamLogic, ['currentTeam']],
|
||||
},
|
||||
|
@ -6,6 +6,7 @@ import Fuse from 'fuse.js'
|
||||
import { toolbarFetch } from '~/toolbar/utils'
|
||||
|
||||
export const actionsLogic = kea<actionsLogicType>({
|
||||
path: ['toolbar', 'actions', 'actionsLogic'],
|
||||
actions: {
|
||||
setSearchTerm: (searchTerm: string) => ({ searchTerm }),
|
||||
},
|
||||
|
@ -22,6 +22,7 @@ function newAction(element: HTMLElement | null, dataAttributes: string[] = []):
|
||||
type ActionFormInstance = FormInstance<ActionForm>
|
||||
|
||||
export const actionsTabLogic = kea<actionsTabLogicType<ActionFormInstance>>({
|
||||
path: ['toolbar', 'actions', 'actionsTabLogic'],
|
||||
actions: {
|
||||
setForm: (form: ActionFormInstance) => ({ form }),
|
||||
selectAction: (id: number | null) => ({ id: id || null }),
|
||||
|
@ -16,6 +16,7 @@ type ActionElementMap = Map<HTMLElement, ActionElementWithMetadata[]>
|
||||
type ElementMap = Map<HTMLElement, ElementWithMetadata>
|
||||
|
||||
export const elementsLogic = kea<elementsLogicType<ActionElementMap, ElementMap>>({
|
||||
path: ['toolbar', 'elements', 'elementsLogic'],
|
||||
actions: {
|
||||
enableInspect: true,
|
||||
disableInspect: true,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user