Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
CartesianGrid,
XAxis,
YAxis,
Legend,
Tooltip,
} from 'recharts';
const StyledLineChart = createComponent(
() => ({
'& svg': {},
}),
LineChart,
p => Object.keys(p)
);
export const queryTemplate = graphql(
gql`
query analyticsPageviews {
item: analyticsPageviews(
start: "180daysAgo"
end: "today"
time: MONTH
sort: DATE
) {
id
pageviews
sessions
rows {
id
pageTitle
pageviews
sessions
import { graphql, gql } from 'olymp-utils';
export const queryTemplate = graphql(
gql`
query template($id: String) {
item: template(id: $id) {
id name text
}
}
`,
{
options: ({ id }) => ({ variables: { id } }),
props: ({ ownProps, data }) => ({
...ownProps,
data,
item: data.item || {},
}),
}
);
CartesianGrid,
XAxis,
YAxis,
Legend,
Tooltip,
} from 'recharts';
const StyledLineChart = createComponent(
() => ({
'& svg': {},
}),
LineChart,
p => Object.keys(p)
);
export const queryTemplate = graphql(
gql`
query analyticsPageviews {
item: analyticsPageviews(
start: "180daysAgo"
end: "today"
time: MONTH
sort: DATE
) {
id
pageviews
sessions
rows {
id
pageTitle
pageviews
sessions
import { graphql, gql } from 'olymp-utils';
export const queryTemplate = graphql(
gql`
query template($id: String) {
item: template(id: $id) {
id name text
}
}
`,
{
options: ({ id }) => ({ variables: { id } }),
props: ({ ownProps, data }) => ({
...ownProps,
data,
item: data.item || {},
}),
}
);
mutation reorderPage($id: String, $sorting: [String]) {
item: page(id: $id, input: { sorting: $sorting }) {
id
sorting
}
}
`,
{
props: ({ ownProps, mutate }) => ({
...ownProps,
reorder: mutate,
}),
}
);
export const movePage = graphql(
gql`
mutation movePage($id: String, $parentId: String, $sorting: [String]) {
item: page(id: $parentId, input: { sorting: $sorting }) {
id
sorting
}
item2: page(id: $id, input: { parentId: $parentId }) {
id
parentId
}
}
`,
{
props: ({ ownProps, mutate }) => ({
...ownProps,
move: mutate,
.catch(onError);
});
}; };
export default graphql((_a = ["\n mutation page($id: String, $input: PageInput) {\n item: page(id: $id, input: $input) {\n id\n slug\n order\n name\n type\n binding {\n id\n type\n query\n fields\n }\n aliasId\n href\n sorting\n parentId\n blocks\n state\n }\n }\n "], _a.raw = ["\n mutation page($id: String, $input: PageInput) {\n item: page(id: $id, input: $input) {\n id\n slug\n order\n name\n type\n binding {\n id\n type\n query\n fields\n }\n aliasId\n href\n sorting\n parentId\n blocks\n state\n }\n }\n "], gql(_a)), {
props: function (_a) {
var ownProps = _a.ownProps, mutate = _a.mutate;
return (__assign({}, ownProps, { save: ok(ownProps, mutate), mutate: mutate }));
},
});
export var reorderPage = graphql((_b = ["\n mutation reorderPage($id: String, $sorting: [String]) {\n item: page(id: $id, input: { sorting: $sorting }) {\n id\n sorting\n }\n }\n "], _b.raw = ["\n mutation reorderPage($id: String, $sorting: [String]) {\n item: page(id: $id, input: { sorting: $sorting }) {\n id\n sorting\n }\n }\n "], gql(_b)), {
props: function (_a) {
var ownProps = _a.ownProps, mutate = _a.mutate;
return (__assign({}, ownProps, { reorder: mutate }));
},
});
export var movePage = graphql((_c = ["\n mutation movePage($id: String, $parentId: String, $sorting: [String]) {\n item: page(id: $parentId, input: { sorting: $sorting }) {\n id\n sorting\n }\n item2: page(id: $id, input: { parentId: $parentId }) {\n id\n parentId\n }\n }\n "], _c.raw = ["\n mutation movePage($id: String, $parentId: String, $sorting: [String]) {\n item: page(id: $parentId, input: { sorting: $sorting }) {\n id\n sorting\n }\n item2: page(id: $id, input: { parentId: $parentId }) {\n id\n parentId\n }\n }\n "], gql(_c)), {
props: function (_a) {
var ownProps = _a.ownProps, mutate = _a.mutate;
return (__assign({}, ownProps, { move: mutate }));
},
});
var _a, _b, _c;
//# sourceMappingURL=mutation.js.map
data.item.children &&
data.item.children.map(this.renderNode)}
);
}
return null;
}
}
export const TreeItem = graphql(query, {
options: ({ id }) => ({
variables: { id },
}),
})(TreeCore);
const Tree = graphql(query, {
options: ({ type }) => ({
variables: {
id: type,
},
}),
})(TreeCore);
export default Tree;
binding {
id
type
query
fields
}
parentId
sorting
aliasId
href
blocks
state
}
}
`;
export default graphql(queryOne, {
options: ({ id, pageId, query }) => ({
variables: { id: pageId || getId(id, query) },
fetchPolicy: isNew({ query }) ? 'cache-only' : undefined,
}),
props: ({ ownProps, data }) => ({
...ownProps,
item: (isNew(ownProps) ? {} : data.item) || {},
data,
}),
});
export const prefetchPage = (client, id) =>
client.query({
query: queryOne,
variables: { id },
});
binding {
id
type
query
fields
}
parentId
sorting
aliasId
href
blocks
state
}
}
`;
export default graphql(queryOne, {
options: ({ id, pageId, query }) => ({
variables: { id: pageId || getId(id, query) },
fetchPolicy: isNew({ query }) ? 'cache-only' : undefined,
}),
props: ({ ownProps, data }) => ({
...ownProps,
item: (isNew(ownProps) ? {} : data.item) || {},
data,
}),
});
export const prefetchPage = (client, id) =>
client.query({
query: queryOne,
variables: { id },
});
accent={org.color}
title={name}
subtitle={`${art} vom ${moment(date).format('DD.MM.YYYY')}`}
>
<img width="{100}" value="{image}">
<content>
<p>
{description}
</p>
{slug && Weiterlesen...}
</content>
);
};
@graphql(
gql`
query newsList {
news: newsList(
sort: { date: DESC }
query: { state: { eq: PUBLISHED } }
) {
id
date
art
name
description
text
slug
image {
id
width