feat(editor, core): Integrate PostHog (#3865)

* Integrate PostHog - Part 1: Groundwork (#3753)

* Integrate PostHog - Part 2: Event capture (#3779)

* Integrate PostHog - Part 3: Session recordings (#3789)

* Integrate PostHog - Part 4: Experiments (#3825)

* Finalize PostHog integration (#3866)

* 📦 Update `package-lock.json`

* 🐛 Account for absent PH hooks file

*  Create new env `EXTERNAL_FRONTEND_HOOKS_FILES`

*  Adjust env used for injecting PostHog

* 🐛 Switch to semicolon delimiter

*  Simplify to `externalFrontendHookPath`

* Refactor FE hooks flow (#3884)

* Add env var for session recordings

* inject frontend hooks even when telemetry is off

* allow multiple hooks files

* cr

* 🐛 Handle missing ref errors

* 🔥 Remove outdated `continue`

* 🎨 Change one-liners to blocks

* 📦 Update `package-lock.json`

Co-authored-by: Ahsan Virani <ahsan.virani@gmail.com>
This commit is contained in:
Iván Ovejero
2022-08-19 15:35:39 +02:00
committed by GitHub
parent 2b4f5c6c78
commit 43e054f5ab
37 changed files with 676 additions and 217 deletions

View File

@@ -25,7 +25,7 @@
</div>
</div>
<div v-else class="value clickable" @click="selectItem(item)">
<div class="item-title" :title="item.key">
<div class="item-title" :title="item.key" ref="variableSelectorItem">
{{item.name}}:
<font-awesome-icon icon="dot-circle" title="Select Item" />
</div>
@@ -41,8 +41,10 @@ import {
IVariableSelectorOption,
IVariableItemSelected,
} from '@/Interface';
import { externalHooks } from "@/components/mixins/externalHooks";
import mixins from 'vue-typed-mixins';
export default Vue.extend({
export default mixins(externalHooks).extend({
name: 'VariableSelectorItem',
props: [
'allowParentSelect',
@@ -85,6 +87,14 @@ export default Vue.extend({
extended: false,
};
},
mounted() {
if (this.$refs.variableSelectorItem) {
this.$externalHooks().run(
'variableSelectorItem.mounted',
{ variableSelectorItemRef: this.$refs.variableSelectorItem },
);
}
},
methods: {
optionSelected (command: string, item: IVariableSelectorOption) {
// By default it is raw