Skip to content

Commit

Permalink
fix: undefined current_component in browsers not supporting import #60
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben Costa committed Feb 29, 2020
1 parent c10ba13 commit 708abd6
Show file tree
Hide file tree
Showing 72 changed files with 211 additions and 211 deletions.
6 changes: 3 additions & 3 deletions packages/button/Button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -24,15 +24,15 @@

<script>
import {setContext, getContext} from 'svelte';
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from '@smui/common/forwardEvents.js';
import {exclude} from '@smui/common/exclude.js';
import {useActions} from '@smui/common/useActions.js';
import A from '@smui/common/A.svelte';
import Button from '@smui/common/Button.svelte';
import Ripple from '@smui/ripple/bare.js';
const forwardEvents = forwardEventsBuilder(current_component);
const forwardEvents = forwardEventsBuilder(get_current_component());
export let use = [];
let className = '';
Expand All @@ -58,4 +58,4 @@
setContext('SMUI:label:context', 'button');
setContext('SMUI:icon:context', 'button');
</script>
</script>
6 changes: 3 additions & 3 deletions packages/button/Group.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@

<script>
import {setContext, getContext} from 'svelte';
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from '@smui/common/forwardEvents.js';
import {exclude} from '@smui/common/exclude.js';
import {useActions} from '@smui/common/useActions.js';
const forwardEvents = forwardEventsBuilder(current_component);
const forwardEvents = forwardEventsBuilder(get_current_component());
export let use = [];
let className = '';
export {className as class};
export let variant = 'text';
</script>
</script>
6 changes: 3 additions & 3 deletions packages/card/Actions.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@

<script>
import {setContext} from 'svelte';
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from '@smui/common/forwardEvents.js';
import {exclude} from '@smui/common/exclude.js';
import {useActions} from '@smui/common/useActions.js';
const forwardEvents = forwardEventsBuilder(current_component);
const forwardEvents = forwardEventsBuilder(get_current_component());
export let use = [];
let className = '';
Expand All @@ -25,4 +25,4 @@
setContext('SMUI:button:context', 'card:action');
setContext('SMUI:icon-button:context', 'card:action');
</script>
</script>
6 changes: 3 additions & 3 deletions packages/card/Card.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,16 @@
><slot></slot></div>

<script>
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from '@smui/common/forwardEvents.js';
import {exclude} from '@smui/common/exclude.js';
import {useActions} from '@smui/common/useActions.js';
const forwardEvents = forwardEventsBuilder(current_component);
const forwardEvents = forwardEventsBuilder(get_current_component());
export let use = [];
let className = '';
export {className as class};
export let variant = 'raised';
export let padded = false;
</script>
</script>
6 changes: 3 additions & 3 deletions packages/card/Media.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@
><slot></slot></div>

<script>
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from '@smui/common/forwardEvents.js';
import {exclude} from '@smui/common/exclude.js';
import {useActions} from '@smui/common/useActions.js';
const forwardEvents = forwardEventsBuilder(current_component);
const forwardEvents = forwardEventsBuilder(get_current_component());
export let use = [];
let className = '';
export {className as class};
export let aspectRatio = null;
</script>
</script>
6 changes: 3 additions & 3 deletions packages/card/PrimaryAction.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@
><slot></slot></div>

<script>
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from '@smui/common/forwardEvents.js';
import {exclude} from '@smui/common/exclude.js';
import {useActions} from '@smui/common/useActions.js';
import Ripple from '@smui/ripple/bare.js';
const forwardEvents = forwardEventsBuilder(current_component);
const forwardEvents = forwardEventsBuilder(get_current_component());
export let use = [];
let className = '';
Expand All @@ -27,4 +27,4 @@
export let color = null;
export let padded = false;
export let tabindex = '0';
</script>
</script>
6 changes: 3 additions & 3 deletions packages/checkbox/Checkbox.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@
<script>
import {MDCCheckbox} from '@material/checkbox';
import {onMount, onDestroy, getContext} from 'svelte';
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from '@smui/common/forwardEvents.js';
import {exclude} from '@smui/common/exclude.js';
import {prefixFilter} from '@smui/common/prefixFilter.js';
import {useActions} from '@smui/common/useActions.js';
const forwardEvents = forwardEventsBuilder(current_component);
const forwardEvents = forwardEventsBuilder(get_current_component());
let uninitializedValue = () => {};
export let use = [];
Expand Down Expand Up @@ -156,4 +156,4 @@
export function getId() {
return inputProps && inputProps.id;
}
</script>
</script>
6 changes: 3 additions & 3 deletions packages/chips/Chip.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
<script>
import {MDCChip} from '@material/chips';
import {onMount, setContext} from 'svelte';
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from '@smui/common/forwardEvents.js';
import {exclude} from '@smui/common/exclude.js';
import {useActions} from '@smui/common/useActions.js';
const forwardEvents = forwardEventsBuilder(current_component, ['MDCChip:interaction', 'MDCChip:selection', 'MDCChip:removal', 'MDCChip:trailingIconInteraction']);
const forwardEvents = forwardEventsBuilder(get_current_component(), ['MDCChip:interaction', 'MDCChip:selection', 'MDCChip:removal', 'MDCChip:trailingIconInteraction']);
export let use = [];
let className = '';
Expand Down Expand Up @@ -60,4 +60,4 @@
function handleSelection(e) {
selected = e.detail.selected;
}
</script>
</script>
6 changes: 3 additions & 3 deletions packages/chips/Set.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
<script>
import {MDCChipSet} from '@material/chips';
import {onMount, onDestroy, afterUpdate} from 'svelte';
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from '@smui/common/forwardEvents.js';
import {exclude} from '@smui/common/exclude.js';
import {useActions} from '@smui/common/useActions.js';
const forwardEvents = forwardEventsBuilder(current_component);
const forwardEvents = forwardEventsBuilder(get_current_component());
export let use = [];
let className = '';
Expand Down Expand Up @@ -147,4 +147,4 @@
chips.splice(i, 1);
chips = chips;
}
</script>
</script>
6 changes: 3 additions & 3 deletions packages/common/A.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,13 @@
><slot></slot></a>

<script>
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from './forwardEvents.js';
import {exclude} from './exclude.js';
import {useActions} from './useActions.js';
const forwardEvents = forwardEventsBuilder(current_component);
const forwardEvents = forwardEventsBuilder(get_current_component());
export let use = [];
export let href = 'javascript:void(0);';
</script>
</script>
6 changes: 3 additions & 3 deletions packages/common/Aside.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
><slot></slot></aside>

<script>
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from './forwardEvents.js';
import {exclude} from './exclude.js';
import {useActions} from './useActions.js';
const forwardEvents = forwardEventsBuilder(current_component);
const forwardEvents = forwardEventsBuilder(get_current_component());
export let use = [];
</script>
</script>
6 changes: 3 additions & 3 deletions packages/common/Button.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
><slot></slot></button>

<script>
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from './forwardEvents.js';
import {exclude} from './exclude.js';
import {useActions} from './useActions.js';
const forwardEvents = forwardEventsBuilder(current_component);
const forwardEvents = forwardEventsBuilder(get_current_component());
export let use = [];
</script>
</script>
6 changes: 3 additions & 3 deletions packages/common/ClassAdder.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

<script>
import {setContext} from 'svelte';
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from './forwardEvents.js';
import {exclude} from './exclude.js';
import {useActions} from './useActions.js';
Expand All @@ -30,11 +30,11 @@
const smuiClass = internals.class;
const contexts = internals.contexts;
const forwardEvents = forwardEventsBuilder(current_component, smuiForwardEvents);
const forwardEvents = forwardEventsBuilder(get_current_component(), smuiForwardEvents);
for (let context in contexts) {
if (contexts.hasOwnProperty(context)) {
setContext(context, contexts[context]);
}
}
</script>
</script>
6 changes: 3 additions & 3 deletions packages/common/Div.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
><slot></slot></div>

<script>
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from './forwardEvents.js';
import {exclude} from './exclude.js';
import {useActions} from './useActions.js';
const forwardEvents = forwardEventsBuilder(current_component);
const forwardEvents = forwardEventsBuilder(get_current_component());
export let use = [];
</script>
</script>
6 changes: 3 additions & 3 deletions packages/common/Footer.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
><slot></slot></footer>

<script>
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from './forwardEvents.js';
import {exclude} from './exclude.js';
import {useActions} from './useActions.js';
const forwardEvents = forwardEventsBuilder(current_component);
const forwardEvents = forwardEventsBuilder(get_current_component());
export let use = [];
</script>
</script>
6 changes: 3 additions & 3 deletions packages/common/H1.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
><slot></slot></h1>

<script>
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from './forwardEvents.js';
import {exclude} from './exclude.js';
import {useActions} from './useActions.js';
const forwardEvents = forwardEventsBuilder(current_component);
const forwardEvents = forwardEventsBuilder(get_current_component());
export let use = [];
</script>
</script>
6 changes: 3 additions & 3 deletions packages/common/H2.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
><slot></slot></h2>

<script>
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from './forwardEvents.js';
import {exclude} from './exclude.js';
import {useActions} from './useActions.js';
const forwardEvents = forwardEventsBuilder(current_component);
const forwardEvents = forwardEventsBuilder(get_current_component());
export let use = [];
</script>
</script>
6 changes: 3 additions & 3 deletions packages/common/H3.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
><slot></slot></h3>

<script>
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from './forwardEvents.js';
import {exclude} from './exclude.js';
import {useActions} from './useActions.js';
const forwardEvents = forwardEventsBuilder(current_component);
const forwardEvents = forwardEventsBuilder(get_current_component());
export let use = [];
</script>
</script>
6 changes: 3 additions & 3 deletions packages/common/H4.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
><slot></slot></h4>

<script>
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from './forwardEvents.js';
import {exclude} from './exclude.js';
import {useActions} from './useActions.js';
const forwardEvents = forwardEventsBuilder(current_component);
const forwardEvents = forwardEventsBuilder(get_current_component());
export let use = [];
</script>
</script>
6 changes: 3 additions & 3 deletions packages/common/H5.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
><slot></slot></h5>

<script>
import {current_component} from 'svelte/internal';
import {get_current_component} from 'svelte/internal';
import {forwardEventsBuilder} from './forwardEvents.js';
import {exclude} from './exclude.js';
import {useActions} from './useActions.js';
const forwardEvents = forwardEventsBuilder(current_component);
const forwardEvents = forwardEventsBuilder(get_current_component());
export let use = [];
</script>
</script>
Loading

0 comments on commit 708abd6

Please sign in to comment.