Skip to content

Commit

Permalink
Remove instances of SignalType
Browse files Browse the repository at this point in the history
  • Loading branch information
c12i committed Nov 19, 2024
1 parent 32b26a6 commit de7bac4
Show file tree
Hide file tree
Showing 9 changed files with 9 additions and 22 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { LitElement, html } from 'lit';
import { state, customElement, property } from 'lit/decorators.js';
import { InstalledCell, Record, Link, AppClient, EntryHash, ActionHash, AgentPubKey, SignalType } from '@holochain/client';
import { InstalledCell, Record, Link, AppClient, EntryHash, ActionHash, AgentPubKey } from '@holochain/client';
import { consume } from '@lit-labs/context';
import { Task } from '@lit-labs/task';

Expand Down Expand Up @@ -35,14 +35,6 @@ export class {{pascal_case (plural ../entry_type.name)}}For{{pascal_case linked_
if (!this.{{camel_case linked_from.singular_arg}}) {
throw new Error(`The {{camel_case linked_from.singular_arg}} property is required for the {{kebab_case (plural ../entry_type.name)}}-for-{{kebab_case linked_from.name}} element`);
}

this.client?.on('signal', signal => {
if (!(SignalType.App in signal)) return;
if (signal.App.zome_name !== '{{../coordinator_zome_manifest.name}}') return;
const payload = signal.App.payload as {{pascal_case ../coordinator_zome_manifest.name}}Signal;
if (!(payload.type === 'EntryCreated' && payload.app_entry.type === '{{pascal_case ../entry_type.name}}')) return;
this._fetch{{pascal_case (plural ../entry_type.name)}}.run();
})
}

renderList(hashes: Array<ActionHash>) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import type {
NewEntryAction,
HolochainError,
} from '@holochain/client';
import { SignalType } from '@holochain/client'
import { clientContext } from '../../contexts';
import {{pascal_case referenceable.name}}Detail from './{{pascal_case referenceable.name}}Detail.svelte';
import type { {{pascal_case coordinator_zome_manifest.name}}Signal } from './types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ import type {
AgentPubKey,
NewEntryAction,
HolochainError,
SignalType,
} from '@holochain/client';
import { SignalType } from '@holochain/client';
import { clientContext } from '../../contexts';
import type { {{pascal_case ../entry_type.name}}, {{pascal_case ../coordinator_zome_manifest.name}}Signal } from './types';
import {{pascal_case ../entry_type.name}}Detail from './{{pascal_case ../entry_type.name}}Detail.svelte';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import type {
NewEntryAction,
HolochainError,
} from '@holochain/client';
import { SignalType } from '@holochain/client';
import { clientContext } from '../../contexts';
import {{pascal_case from_referenceable.name}}Detail from './{{pascal_case from_referenceable.name}}Detail.svelte';
import type { {{pascal_case coordinator_zome_manifest.name}}Signal } from './types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import type {
NewEntryAction,
HolochainError,
} from '@holochain/client';
import { SignalType } from '@holochain/client';
import { clientContext } from '../../contexts';
import {{pascal_case to_referenceable.name}}Detail from './{{pascal_case to_referenceable.name}}Detail.svelte';
import type { {{pascal_case coordinator_zome_manifest.name}}Signal } from './types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<script lang="ts">
import { inject, toRaw, ComputedRef } from 'vue';
import { decode } from '@msgpack/msgpack';
import { AppClient, NewEntryAction, Link, Record, AgentPubKey, EntryHash, ActionHash, HolochainError, SignalType } from '@holochain/client';
import { AppClient, NewEntryAction, Link, Record, AgentPubKey, EntryHash, ActionHash, HolochainError } from '@holochain/client';
import {{pascal_case referenceable.name}}Detail from './{{pascal_case referenceable.name}}Detail.vue';
import { {{pascal_case coordinator_zome_manifest.name}}Signal } from './types';
Expand Down Expand Up @@ -84,4 +84,4 @@ export default {
return { client };
},
};
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<script lang="ts">
import { inject, ComputedRef, toRaw } from 'vue';
import { decode } from '@msgpack/msgpack';
import { AppClient, Link, Record, ActionHash, AgentPubKey, HolochainError, SignalType } from '@holochain/client';
import { AppClient, Link, Record, ActionHash, AgentPubKey, HolochainError } from '@holochain/client';
import {{pascal_case ../entry_type.name}}Detail from './{{pascal_case ../entry_type.name}}Detail.vue';
import { {{pascal_case ../coordinator_zome_manifest.name}}Signal } from './types';
Expand Down Expand Up @@ -74,4 +74,4 @@ export default {
return { client };
},
};
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<script lang="ts">
import { toRaw, inject, ComputedRef } from 'vue';
import { decode } from '@msgpack/msgpack';
import { Link, AppClient, Record, AgentPubKey, EntryHash, ActionHash, NewEntryAction, HolochainError, SignalType } from '@holochain/client';
import { Link, AppClient, Record, AgentPubKey, EntryHash, ActionHash, NewEntryAction, HolochainError } from '@holochain/client';
import {{pascal_case from_referenceable.name}}Detail from './{{pascal_case from_referenceable.name}}Detail.vue';
import { {{pascal_case coordinator_zome_manifest.name}}Signal } from './types';
Expand Down Expand Up @@ -72,4 +72,4 @@ export default {
return { client };
},
};
</script>
</script>
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
<script lang="ts">
import { toRaw, inject, ComputedRef } from 'vue';
import { decode } from '@msgpack/msgpack';
import { AppClient, Record, Link, AgentPubKey, EntryHash, ActionHash, NewEntryAction, HolochainError, SignalType } from '@holochain/client';
import { AppClient, Record, Link, AgentPubKey, EntryHash, ActionHash, NewEntryAction, HolochainError } from '@holochain/client';
import {{pascal_case to_referenceable.name}}Detail from './{{pascal_case to_referenceable.name}}Detail.vue';
import { {{pascal_case coordinator_zome_manifest.name}}Signal } from './types';
Expand Down Expand Up @@ -73,4 +73,4 @@ export default {
return { client };
},
};
</script>
</script>

0 comments on commit de7bac4

Please sign in to comment.