Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
index: VueTypes.number,
datakey: VueTypes.string.isRequired,
maxValue: VueTypes.number.def(100),
trigger: VueTypes.oneOf(['hover', 'click', 'manual']).def('hover'),
startAngle: VueTypes.number.def(180),
endAngle: VueTypes.number.def(0),
radius: VueTypes.oneOfType([
VueTypes.number,
VueTypes.arrayOf(VueTypes.number).def([85, 100]),
]).def([85, 100]),
// Styles
borderRadius: VueTypes.oneOfType([VueTypes.number, VueTypes.string]).def(0),
color: VueTypes.string,
styles: VueTypes.object,
// Animation
animation: VueTypes.bool.def(true),
animationDuration: VueTypes.number.def(2.5),
},
computed: {
// Active elem
active () {
return this.Chart.activeElements.includes(this.index)
},
// Radius
curRadius () {
const innerRadius = Array.isArray(this.radius) ? this.radius[0] : 0
const outerRadius = Array.isArray(this.radius) ? this.radius[1] : 100
return { innerRadius, outerRadius }
},
// Slots
slots () {
import { isDemo } from 'utils/demoUtils';
import { serializeUrlParams } from 'utils/urlUtils';
import SongPopover from 'components/media/SongPopover';
import PlayingIndicator from 'components/PlayingIndicator';
import LeafPlayerPropTypes from 'data/propTypes/LeafPlayerPropTypes';
export default {
name: 'ComponentSongListEntry',
props: {
// Show track number from song tags
showTrackNumber: VueTypes.bool.isRequired,
// Show 1 based song index
showIndex: VueTypes.bool.isRequired,
showArtist: VueTypes.bool.isRequired,
showAlbum: VueTypes.bool.isRequired,
showDuration: VueTypes.bool.isRequired,
showOptions: VueTypes.bool.isRequired,
isPlaying: VueTypes.bool.isRequired,
song: LeafPlayerPropTypes.song.isRequired,
isSortable: VueTypes.bool.def(false),
isDragging: VueTypes.bool.isRequired,
isOver: VueTypes.bool.isRequired,
index: VueTypes.number.isRequired,
allowSongSorting: VueTypes.bool.isRequired,
// Callback when a song list entry is dropped on another
onSongDropped: VueTypes.func.isRequired,
// Callback for when the play/pause button is clicked
onPlayPauseClicked: VueTypes.func.isRequired,
* @see https://developers.facebook.com/docs/accountkit/webjs
* to know how to use this
*/
export default {
name: 'AccountKit',
props: {
appId: VueTypes.string.isRequired,
debug: VueTypes.bool.def(true),
version: VueTypes.string.isRequired,
state: VueTypes.string.isRequired,
fbAppEventsEnabled: VueTypes.bool.def(false),
/** callback to login function */
loginType: VueTypes.oneOf(['PHONE', 'EMAIL']).def('PHONE'),
/** @see https://developers.facebook.com/docs/accountkit/languages */
language: VueTypes.string.def('en_US'),
autoInit: VueTypes.bool.def(true)
},
mounted () {
if (!window.AccountKit && this.autoInit) {
this.initAccountKit()
}
},
methods: {
initAccountKit () {
const tag = document.createElement('script')
tag.setAttribute(
'src',
`https://sdk.accountkit.com/${this.language}/sdk.js`
)
tag.setAttribute('id', 'account-kit')
tag.setAttribute('type', 'text/javascript')
updateQuery,
setQueryOptions,
setQueryListener,
} = Actions;
const { pushToAndClause, parseHits, isEqual, getCompositeAggsQuery, getOptionsFromQuery } = helper;
const ReactiveComponent = {
name: 'ReactiveComponent',
props: {
componentId: types.stringRequired,
aggregationField: types.string,
size: VueTypes.number.def(20),
defaultQuery: types.func,
customQuery: types.func,
filterLabel: types.string,
react: types.react,
showFilter: VueTypes.bool.def(true),
URLParams: VueTypes.bool.def(false),
},
created() {
const props = this.$props;
this.internalComponent = null;
this.$defaultQuery = null;
const onQueryChange = (...args) => {
this.$emit('queryChange', ...args);
};
this.setQueryListener(props.componentId, onQueryChange, e => {
this.$emit('error', e);
});
const { customQuery, componentId, filterLabel, showFilter, URLParams } = props;
if (customQuery) {
innerClass: types.style,
innerRef: types.func,
render: types.func,
parseSuggestion: types.func,
renderNoSuggestion: types.title,
renderError: types.title,
placeholder: VueTypes.string.def('Search'),
queryFormat: VueTypes.oneOf(['and', 'or']).def('or'),
react: types.react,
showClear: VueTypes.bool.def(true),
showFilter: VueTypes.bool.def(true),
showIcon: VueTypes.bool.def(true),
title: types.title,
theme: types.style,
URLParams: VueTypes.bool.def(false),
strictSelection: VueTypes.bool.def(false),
nestedField: types.string,
},
beforeMount() {
this.addComponent(this.$props.componentId, 'DATASEARCH');
this.addComponent(this.internalComponent);
if (this.$props.highlight) {
const queryOptions = DataSearch.highlightQuery(this.$props) || {};
this.queryOptions = { ...queryOptions, ...this.getBasicQueryOptions() };
this.setQueryOptions(this.$props.componentId, this.queryOptions);
} else {
this.queryOptions = this.getBasicQueryOptions();
this.setQueryOptions(this.$props.componentId, this.queryOptions);
}
this.setReact(this.$props);
import getTheme from '../../styles/theme';
const ReactiveBase = {
name: 'ReactiveBase',
data() {
this.state = {
key: '__REACTIVE_BASE__',
};
return this.state;
},
created() {
this.setStore(this.$props);
},
props: {
app: types.stringRequired,
analytics: VueTypes.bool.def(false),
analyticsConfig: types.analyticsConfig,
credentials: types.string,
headers: types.headers,
queryParams: types.string,
theme: VueTypes.object.def({}),
themePreset: VueTypes.string.def('light'),
type: types.string,
url: types.string,
mapKey: types.string,
className: types.string,
initialState: VueTypes.object.def({}),
transformRequest: types.func,
transformResponse: types.func,
as: VueTypes.string.def('div'),
},
provide() {
dataField: types.stringRequired,
defaultValue: types.string,
value: types.value,
defaultQuery: types.func,
filterLabel: types.string,
innerClass: types.style,
placeholder: VueTypes.string.def('Search'),
react: types.react,
render: types.func,
renderItem: types.func,
transformData: types.func,
selectAllLabel: types.string,
showCount: VueTypes.bool.def(true),
showFilter: VueTypes.bool.def(true),
showRadio: VueTypes.bool.def(true),
showSearch: VueTypes.bool.def(true),
size: VueTypes.number.def(100),
sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
title: types.title,
URLParams: VueTypes.bool.def(false),
showMissing: VueTypes.bool.def(false),
missingLabel: VueTypes.string.def('N/A'),
nestedField: types.string,
},
data() {
const props = this.$props;
this.__state = {
currentValue: '',
modifiedOptions:
props.options && props.options[props.dataField]
? props.options[props.dataField].buckets
: [],
className: types.string.def(''),
componentId: types.stringRequired,
customQuery: types.func,
dataField: types.stringRequired,
defaultValue: types.string,
value: types.value,
defaultQuery: types.func,
filterLabel: types.string,
innerClass: types.style,
placeholder: VueTypes.string.def('Search'),
react: types.react,
render: types.func,
renderItem: types.func,
transformData: types.func,
selectAllLabel: types.string,
showCount: VueTypes.bool.def(true),
showFilter: VueTypes.bool.def(true),
showRadio: VueTypes.bool.def(true),
showSearch: VueTypes.bool.def(true),
size: VueTypes.number.def(100),
sortBy: VueTypes.oneOf(['asc', 'desc', 'count']).def('count'),
title: types.title,
URLParams: VueTypes.bool.def(false),
showMissing: VueTypes.bool.def(false),
missingLabel: VueTypes.string.def('N/A'),
nestedField: types.string,
},
data() {
const props = this.$props;
this.__state = {
currentValue: '',
modifiedOptions:
className: VueTypes.string.def(''),
range: VueTypes.shape({
start: VueTypes.integer.def(0),
end: VueTypes.integer.def(10),
}),
rangeLabels: types.rangeLabels,
componentId: types.stringRequired,
customQuery: types.func,
data: types.data,
dataField: types.stringRequired,
defaultValue: types.range,
value: types.range,
filterLabel: types.string,
innerClass: types.style,
react: types.react,
showFilter: VueTypes.bool.def(true),
showCheckbox: VueTypes.bool.def(true),
title: types.title,
URLParams: VueTypes.bool.def(false),
sliderOptions: VueTypes.object.def({}),
nestedField: types.string,
},
methods: {
setReact(props) {
if (props.react) {
this.watchComponent(props.componentId, props.react);
}
},
handleSlider(values) {
const { value } = this.$props;