From 1d4650340401ed41f52f918cc3690da61d7a34ec Mon Sep 17 00:00:00 2001 From: "Yassine, LASRI" Date: Wed, 2 Jun 2021 17:11:47 +0100 Subject: [PATCH] update code to support Kibana v7.12.0 --- build/kibana/kibana_cohort/README.md | 165 - build/kibana/kibana_cohort/config.ts | 26 - build/kibana/kibana_cohort/kibana.json | 8 - build/kibana/kibana_cohort/package.json | 37 - .../public/cohort_vis_options.tsx | 81 - .../kibana_cohort/public/cohort_vis_type.tsx | 116 - .../components/cohort_visualization.tsx | 140 - .../public/components/lib/tools.ts | 188 - .../public/components/pivot_chart.tsx | 53 - .../public/components/pivot_grid.tsx | 137 - .../public/components/pivot_table.tsx | 92 - build/kibana/kibana_cohort/public/index.ts | 25 - build/kibana/kibana_cohort/public/plugin.ts | 66 - build/kibana/kibana_cohort/public/services.ts | 25 - build/kibana/kibana_cohort/public/types.ts | 36 - build/kibana/kibana_cohort/server/index.ts | 34 - .../kibana_cohort/target/public/0.plugin.js | 637 - .../target/public/0.plugin.js.map | 1 - .../target/public/kibanaCohort.plugin.js | 62258 ---------------- .../target/public/kibanaCohort.plugin.js.map | 1 - build/kibana/kibana_cohort/tsconfig.json | 17 - build/kibana/kibana_cohort/yarn.lock | 3172 - default_package.json | 13 + kibana.json | 11 +- package.json | 20 +- public/cohort_vis_function.ts | 93 + public/cohort_vis_options.tsx | 6 +- public/cohort_vis_renderer.tsx | 29 + public/cohort_vis_type.tsx | 43 +- public/components/cohort_viz_comp.tsx | 75 + public/components/lib/tools.ts | 12 +- public/components/pivot_chart.tsx | 9 +- public/components/pivot_grid.tsx | 2 +- public/components/pivot_table.tsx | 4 - public/index.ts | 41 +- public/plugin.ts | 90 +- public/to_ast.ts | 77 + public/types.ts | 13 +- releases/kibana_cohort_7.12.0_0.0.1.zip | Bin 0 -> 2682002 bytes server/index.ts | 34 - target/public/.kbn-optimizer-cache | 385 - target/public/0.plugin.js | 637 - target/public/0.plugin.js.map | 1 - target/public/kibanaCohort.plugin.js | 62258 ---------------- target/public/kibanaCohort.plugin.js.map | 1 - tsconfig.json | 18 +- yarn.lock | 3172 - 47 files changed, 414 insertions(+), 133945 deletions(-) delete mode 100644 build/kibana/kibana_cohort/README.md delete mode 100644 build/kibana/kibana_cohort/config.ts delete mode 100644 build/kibana/kibana_cohort/kibana.json delete mode 100644 build/kibana/kibana_cohort/package.json delete mode 100644 build/kibana/kibana_cohort/public/cohort_vis_options.tsx delete mode 100644 build/kibana/kibana_cohort/public/cohort_vis_type.tsx delete mode 100644 build/kibana/kibana_cohort/public/components/cohort_visualization.tsx delete mode 100644 build/kibana/kibana_cohort/public/components/lib/tools.ts delete mode 100644 build/kibana/kibana_cohort/public/components/pivot_chart.tsx delete mode 100644 build/kibana/kibana_cohort/public/components/pivot_grid.tsx delete mode 100644 build/kibana/kibana_cohort/public/components/pivot_table.tsx delete mode 100644 build/kibana/kibana_cohort/public/index.ts delete mode 100644 build/kibana/kibana_cohort/public/plugin.ts delete mode 100644 build/kibana/kibana_cohort/public/services.ts delete mode 100644 build/kibana/kibana_cohort/public/types.ts delete mode 100644 build/kibana/kibana_cohort/server/index.ts delete mode 100644 build/kibana/kibana_cohort/target/public/0.plugin.js delete mode 100644 build/kibana/kibana_cohort/target/public/0.plugin.js.map delete mode 100644 build/kibana/kibana_cohort/target/public/kibanaCohort.plugin.js delete mode 100644 build/kibana/kibana_cohort/target/public/kibanaCohort.plugin.js.map delete mode 100644 build/kibana/kibana_cohort/tsconfig.json delete mode 100644 build/kibana/kibana_cohort/yarn.lock create mode 100644 default_package.json create mode 100644 public/cohort_vis_function.ts create mode 100644 public/cohort_vis_renderer.tsx create mode 100644 public/components/cohort_viz_comp.tsx create mode 100644 public/to_ast.ts create mode 100644 releases/kibana_cohort_7.12.0_0.0.1.zip delete mode 100644 server/index.ts delete mode 100644 target/public/.kbn-optimizer-cache delete mode 100644 target/public/0.plugin.js delete mode 100644 target/public/0.plugin.js.map delete mode 100644 target/public/kibanaCohort.plugin.js delete mode 100644 target/public/kibanaCohort.plugin.js.map delete mode 100644 yarn.lock diff --git a/build/kibana/kibana_cohort/README.md b/build/kibana/kibana_cohort/README.md deleted file mode 100644 index a004406..0000000 --- a/build/kibana/kibana_cohort/README.md +++ /dev/null @@ -1,165 +0,0 @@ -# Cohort Analysis - -This part was found [here](https://www.kdnuggets.com/2016/05/clevertap-use-cohort-analysis-improve-customer-retention.html) - -Long-term success for app developers does not mean only getting someone to download their app, but also getting them to make repeat visits. To get to the must-have value proposition of your app product, you need to go beyond vanity metrics – like download counts and even daily active users (DAU) / monthly active users (MAU) – that only measure growth and retention superficially. You need to dig deeper into your app using a method –Cohort Analysis. - -## What is Cohort Analysis - -Cohort analysis is a subset of behavioral analytics that takes the data from a given eCommerce platform, web application, or online game and rather than looking at all users as one unit, it breaks them into related groups for analysis. These related groups, or cohorts, usually share common characteristics or experiences within a defined time-span. - -Cohort analysis is a tool to measure user engagement over time. It helps to know whether user engagement is actually getting better over time or is only appearing to improve because of growth. - -Cohort analysis proves to be valuable because it helps to separate growth metrics from engagement metrics as growth can easily mask engagement problems. In reality, the lack of activity of the old users is being hidden by the impressive growth numbers of new users, which results in concealing the lack of engagement from a small number of people. - -Let’s understand using cohort analysis with an example – daily cohort of users who have launched an app first time and revisited the app in the next 10 days. - - - -From the above retention table – Triangular chart, we can infer the following - -- 1358 users launched an app on Jan 26. Day 1 retention was 31.1%, day 7 retention was 12.9%, and day 9 retention was 11.3%. So on the 7th day after using the app, 1 in 8 users who launched an app on Jan 26 were still active users on the app. - -- Out of all of the new users during this time range (13,487 users), 27% users are retained on day 1, 12.5% on day 7, and 12.1% on day 10. - -Furthermore, two main benefits of reading the above cohort table, are: - -- Product lifetime (as depicted vertically down in the table) – comparing different cohorts at the same stage in their life cycle – we can see what % of people in a cohort are coming back to app after 3 days and so on. The early lifetime months can be linked to the quality of your onboarding experience and the performance of customer success team, and - -- User lifetime (as depicted horizontally to the right of the table) – seeing the long term relationship with people in any cohort – to ascertain how long people are coming back and how strong or how valuable that cohort is. This can be presumably linked to something like the quality of the product, operations, and customer support. - -Whatever the evaluation key metrics you define for the business, cohort analysis lets you view how the metrics develop over the customer lifetime as well as over the product lifetime. - -## How to Improve Your Retention Cohort - -Cohort analysis involves looking at the groups of people, over time, and observing how their behavior changes. For instance, if we send out an email notification to 100 people, some may buy the product on day 1, less on day 2, even fewer on day 3, and so on. But, if we send another email to 100 people, after few weeks, they’ll be buying the product on their “day 0”while the first sent email might show its prevalent lag effect on the buying decision. - -In order to track how users behave over time or how the same behavior differs for different cohorts, cohort analysis helps to compare these people by the way / time they were acquired or by the retention of those users over time. - -But, how to break the group of users into cohorts for cohort analysis – can be done in two ways: - -- `Acquisition Cohorts` : divide users by when they signed up first for your product. For your app users, you might break down your cohorts by the day, the week or the month they launched an app, and thereby track daily, weekly or monthly cohorts. -In this case, by measuring the retention of these cohorts, you can determine how long people continue to use your app from their start point. - -- `Behavioral Cohorts` : divide users by the behaviors they have (or haven’t) taken in your app within a given time period. These could be any number of discrete actions that a user can perform – App Install, App Launch, App Uninstall, Transaction or Charged, or any combination of these actions / events. - -In this case, a cohort can be a group of users who did certain actions within a specified timeframe – say, within first 3 days of app use. You can then monitor how long different cohorts stay active in your app after they perform certain actions. - -Let’s see how you can use both acquisition and behavioral cohorts to determine exactly what your users are doing and when they’re doing it. - -> Acquisition Cohorts – Finding Problem Moments in Your App - -Revisiting the above daily cohort – which is an acquisition cohort. - - - -One way to visualize this information is to chart out a retention curve, showing the retention of these cohorts over time. The chart makes incredibly easy to infer when users are leaving your product. - -This retention curve immediately reflects an important insight – about 75% of the users stop using the app after the 1st day. After that initial large drop, a second brisk drop occurs after 5th day – to under 12%, before the curve starts to level off after 7th day, leaving about 11% of original users still active in the app at day 10. - -The above retention curve indicates that users are not getting quickly to the core value of the app, resulting in drop-offs. Hence, it’s evident to improve the on-boarding experience to get the user to the core value as quickly as possible, thereby boosting the retention. - -Thus, acquisition cohorts are great for identifying trends and the point when people are churning, but it’s hard to make actionable insights like – to understand why they are leaving – which requires the use of another type of cohorts, behavioral cohorts - -> Behavioral Cohorts – Discover Which Behaviors Drive Retention - -A simple example of behavioral cohort can be – all users who read reviews prior to purchasing a product. This can answer interesting questions, like, - -Are the users who read reviews have a higher conversion rate than those users who don’t read reviews, or -Are the users more engaged – longer sessions, more time in app, fewer drop-offs -An app user, after an app install and / or launch, makes hundreds of decisions and exhibit countless little behaviors that lead towards their decision to stay or go. These behaviors could be anything, like, using core feature Y but not using core feature Z, engaging only with notifications of type X, and so on. - -Let’s test user’s behavior by comparing retention between below cohorts: - - - - -Both user segments had the intention to transact on your app. But one user segment chose to proceed with the checkout, the other choose to abandon your app. What you can do to reduce the shopping cart abandonment? - -Cohort analysis can get answers to the questions like: - -- When is the best time to re-engage with your users? When is the best time for remarketing? - -- What is the rate of acquisition of new users to maintain (if not increase) your app conversion rate? - -From the above retention tables, you can conclude that majority of the users who had abandoned the shopping cart did not engage with the app again, not even 1 day after the acquisition date. So, you have less than 24 hours to re-target them with the new offer and increase the chances of getting revenue. - -From this data, you can develop a systematic, quantitative approach to know how users can fall in love with your app – and then make it happen again and again. Also, you can make strategies to increase your retention after ascertaining what works and what doesn’t. - -Conclusion - -The power of cohort analysis lies in the fact that, it enables not only to view which customers leave and when they leave, but also to understand why the customers leave your app – so that you can fix it. That’s how one can identify how well the users are being retained and also determine the primary factors driving the growth, engagement and revenue for the app. - -# Kibana Plugin - Cohort Analysis - -This project is a simple tutorial for Kibana new comers trying to develop their own vizualisation plugin. The actual usecase of this plugin is to create a custom cohort visualization based on React and Elastic EUI. - -As plugin architecture is being under heavy redesign in 7.x and documentation is rather obscure, I did my best to create something simple that works. The code is also basic, I am JS & React beginner. - -This repository is for Kibana v7.8.x plugin New Platform (NP) - -This plugin is adapted from the [elo7 plugin](https://github.com/elo7/cohort) - -## Sample Screenshots - -Few screen shots which makes it very easy to understand. - - -This is an example of Cohort analysis using Elastic EUI Table - - - - -This is an example of Cohort analysis using Elastic EUI Charts - - -This is an example of Cohort analysis Visualization inside a dashboard. - - -## Usage - - The **total** metric is the value that determine y-axis. Can be either a count or a sum. It also possible to use the percentual as y value just marking the option `Show percetual values`. - - - - -The **cohort date** bucket is the date used to draw the chart lines. Each bucket is a line in this chart. It should be a date histogram. - - - -The **cohort period** bucket is the "cohort" itself that determine the x-axis. It should be a numeric histogram. - - - -## Installing the plugin - -The plugin can then be installed like this - -``` -kibana-plugin install https://github.com/synapticielfactory/kibana_cohort/releases/download/v7.8.0/kibana_cohort_7.8.0_0.0.1.zip -``` - -## Install on Windows - -```` -kibana-plugin.bat install https://github.com/synapticielfactory/kibana_cohort/releases/download/v7.8.0/kibana_cohort_7.8.0_0.0.1.zip -Attempting to transfer from https://github.com/synapticielfactory/kibana_cohort/releases/download/v7.8.0/kibana_cohort_7.8.0_0.0.1.zip -Transferring 815445 bytes.................... -Transfer complete -Retrieving metadata from plugin archive -Extracting plugin archive -Extraction complete -Plugin installation complete -```` - -## Remove on Windows - -```` -kibana-plugin.bat list -kibana_cohort@0.0.1 - -kibana-plugin.bat remove kibana_cohort -Removing kibana_cohort... -Plugin removal complete - -```` \ No newline at end of file diff --git a/build/kibana/kibana_cohort/config.ts b/build/kibana/kibana_cohort/config.ts deleted file mode 100644 index 6749bd8..0000000 --- a/build/kibana/kibana_cohort/config.ts +++ /dev/null @@ -1,26 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { schema, TypeOf } from '@kbn/config-schema'; - -export const configSchema = schema.object({ - enabled: schema.boolean({ defaultValue: true }), -}); - -export type ConfigSchema = TypeOf; diff --git a/build/kibana/kibana_cohort/kibana.json b/build/kibana/kibana_cohort/kibana.json deleted file mode 100644 index 9bd0c79..0000000 --- a/build/kibana/kibana_cohort/kibana.json +++ /dev/null @@ -1,8 +0,0 @@ -{ - "id": "kibanaCohort", - "version": "0.0.1", - "kibanaVersion": "kibana", - "ui": true, - "server": true, - "requiredPlugins": ["expressions", "visualizations", "data", "charts", "kibanaUtils", "kibanaReact"] -} diff --git a/build/kibana/kibana_cohort/package.json b/build/kibana/kibana_cohort/package.json deleted file mode 100644 index 1267a9e..0000000 --- a/build/kibana/kibana_cohort/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "kibana_cohort", - "version": "0.0.1", - "description": "Cohort Analysis", - "private": true, - "author": "Yassine LASRI ", - "license": "MIT", - "contributors": [], - "kibana": { - "version": "7.9.0", - "templateVersion": "1.0.0" - }, - "repository": { - "type": "git", - "url": "https://github.com/synapticielfactory/kibana_cohort.git" - }, - "keywords": [ - "cohort", - "kibana", - "plugin", - "visualization", - "churn", - "retention" - ], - "homepage": "https://github.com/synapticielfactory/kibana_cohort", - "bugs": { - "url": "https://github.com/synapticielfactory/kibana_cohort/issues" - }, - "build": { - "git": { - "count": "6", - "sha": "c61ba8d", - "date": "Sat, 22 Aug 2020 20:24:29 +0100" - }, - "date": "Sat Aug 22 2020 20:47:09 GMT+0100 (GMT+01:00)" - } -} \ No newline at end of file diff --git a/build/kibana/kibana_cohort/public/cohort_vis_options.tsx b/build/kibana/kibana_cohort/public/cohort_vis_options.tsx deleted file mode 100644 index f80fe03..0000000 --- a/build/kibana/kibana_cohort/public/cohort_vis_options.tsx +++ /dev/null @@ -1,81 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React, { useCallback, Fragment } from 'react'; -import { EuiCheckbox, EuiFlexItem, EuiIconTip, EuiFlexGroup } from '@elastic/eui'; -import { VisOptionsProps } from '../../../src/plugins/vis_default_editor/public'; -import { CohortVisParams } from './types'; - -function CohortOptionsParams({ stateParams, setValue }: VisOptionsProps) { - const onChangePercentual = useCallback( - (value: CohortVisParams['percentual']) => setValue('percentual', value), - [setValue] - ); - - const onChangeInverse = useCallback( - (value: CohortVisParams['inverse']) => setValue('inverse', value), - [setValue] - ); - - const onChangeCumulative = useCallback( - (value: CohortVisParams['cumulative']) => setValue('cumulative', value), - [setValue] - ); - - const onChangeTable = useCallback((value: CohortVisParams['table']) => setValue('table', value), [ - setValue, - ]); - return ( - - - - onChangePercentual(Boolean(checked))} - /> - - - - - - onChangeInverse(Boolean(checked))} - /> - onChangeCumulative(Boolean(checked))} - /> - onChangeTable(Boolean(checked))} - /> - - ); -} - -export { CohortOptionsParams }; diff --git a/build/kibana/kibana_cohort/public/cohort_vis_type.tsx b/build/kibana/kibana_cohort/public/cohort_vis_type.tsx deleted file mode 100644 index 5bb1a8f..0000000 --- a/build/kibana/kibana_cohort/public/cohort_vis_type.tsx +++ /dev/null @@ -1,116 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; -import { KibanaContextProvider } from '../../../src/plugins/kibana_react/public'; -import { CohortVisComponentWraper } from './components/cohort_visualization'; -import { CohortOptionsParams } from './cohort_vis_options'; -import { Schemas } from '../../../src/plugins/vis_default_editor/public'; -import { AggGroupNames } from '../../../src/plugins/data/public'; -import { CohortPluginSetupDependencies } from './plugin'; -import { CohortVisComponentProp } from './types'; - -export function getCohortVisDefinition(deps: CohortPluginSetupDependencies) { - return { - name: 'cohort', - title: 'Cohort', - icon: 'stats', - description: - 'Cohort analysis is a subset of behavioral analytics that takes the data from a given eCommerce platform, web application, or online game and rather than looking at all users as one unit, it breaks them into related groups for analysis. These related groups, or cohorts, usually share common characteristics or experiences within a defined time-span', - options: { - hierarchicalData: true, - showFilterBar: true, - showIndexSelection: true, - showQueryBar: true, - showTimePicker: true, - }, - visConfig: { - defaults: { - percentual: true, // Show percentual values - inverse: false, // Show inverse values - cumulative: false, // Show cumulative values - table: true, // Show values as table - mapColors: 'heatmap', // Show heatmap colors - }, - // Main component controller to render the Viz - component: (props: CohortVisComponentProp) => ( - - - - ), - }, - editorConfig: { - optionsTemplate: CohortOptionsParams, - // Data Schema for Metrics & Buckets - schemas: new Schemas([ - { - group: AggGroupNames.Metrics, - name: 'metric', - title: 'Metrics', - max: 1, // Remove this if you require more metrics - min: 1, - aggFilter: ['count', 'sum', 'avg', 'cardinality'], - defaults: [{ type: 'count', schema: 'metric' }], - }, - { - group: AggGroupNames.Buckets, - name: 'cohort_date', - title: 'Cohort Date', - min: 1, - max: 1, - aggFilter: ['date_histogram', 'terms'], - defaults: [ - { - type: 'date_histogram', - schema: 'cohort_date', - params: { - interval: 'M', - orderBy: '_term', - }, - }, - ], - }, - { - group: AggGroupNames.Buckets, - name: 'cohort_period', - title: 'Cohort Period', - min: 1, - max: 1, - aggFilter: ['histogram'], - defaults: [ - { - type: 'histogram', - schema: 'cohort_period', - params: { - interval: 30, - }, - }, - ], - }, - ]), - }, - // stage: 'experimental', - requestHandler: 'courier', - responseHandler: 'none', - hierarchicalData: true, - enableAutoApply: true, - feedbackMessage: - 'Have feedback ? Please create an issue in GitHub.', - }; -} diff --git a/build/kibana/kibana_cohort/public/components/cohort_visualization.tsx b/build/kibana/kibana_cohort/public/components/cohort_visualization.tsx deleted file mode 100644 index ddb2347..0000000 --- a/build/kibana/kibana_cohort/public/components/cohort_visualization.tsx +++ /dev/null @@ -1,140 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; -import { EuiPanel } from '@elastic/eui'; -import { useKibana } from '../../../../src/plugins/kibana_react/public'; -import { processData, getDateHistogram, pivotData, getFormatTypes } from './lib/tools'; -import { CohortPivotTable } from './pivot_table'; -import { CohortPivotChart } from './pivot_chart'; -import { CohortVisComponentProp } from '../types'; -import { CohortPluginSetupDependencies } from '../plugin'; - -/** - * The CohortVisComponent renders the form. - */ -class CohortVisComponent extends React.Component { - /** - * Will be called after the first render when the component is present in the DOM. - * We call renderComplete here, to signal, that we are done with rendering. - */ - componentDidMount() { - this.props.renderComplete(); - } - - /** - * Will be called after the component has been updated and the changes has been - * flushed into the DOM. - * - * We will use this to signal that we are done rendering by calling the - * renderComplete property. - */ - componentDidUpdate() { - this.props.renderComplete(); - } - - constructor(props: CohortVisComponentProp) { - super(props); - // console.log(props); - // Check https://kobelb.github.io/kibana-rbac-docs/development-visualize-index.html - } - - /** - * Render the actual HTML. - */ - render() { - const { visData, visParams, vis, config, services }: any = this.props; - const { table, percentual, inverse, cumulative }: any = visParams; - const dateHistogram = getDateHistogram(visData); - const formatTimeFn = getFormatTypes(dateHistogram); - const dataRaw = processData(visData, dateHistogram, formatTimeFn); - const dataRows = dataRaw.map((item: any) => ({ - date: item.date, - period: item.period, - total: item.total, - cumulativeValue: item.cumulativeValue, - value: percentual - ? Math.round((item.value / item.total) * 100) - : cumulative - ? item.cumulativeValue - : inverse - ? Math.round(100 - (item.value / item.total) * 100) - : item.value, - })); - const dataPivoted = pivotData(dataRows, dateHistogram, formatTimeFn); - - // @ts-ignore - if (table) { - return ( - - - - ); - } else { - return ( - - - - ); - } - } -} - -/** - * This is a wrapper component, that is actually used as the visualization. - * The sole purpose of this component is to extract all required parameters from - * the properties and pass them down as separate properties to the actual component. - * That way the actual (CohortVisComponent) will properly trigger it's prop update - * callback (componentWillReceiveProps) if one of these params change. It wouldn't - * trigger otherwise (e.g. it doesn't for this wrapper), since it only triggers - * if the reference to the prop changes (in this case the reference to vis). - * - * The way React works, this wrapper nearly brings no overhead, but allows us - * to use proper lifecycle methods in the actual component. - */ - -export function CohortVisComponentWraper(props: CohortVisComponentProp) { - const kibana = useKibana(); - return ( - - ); -} diff --git a/build/kibana/kibana_cohort/public/components/lib/tools.ts b/build/kibana/kibana_cohort/public/components/lib/tools.ts deleted file mode 100644 index 7b1194c..0000000 --- a/build/kibana/kibana_cohort/public/components/lib/tools.ts +++ /dev/null @@ -1,188 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import d3 from 'd3'; - -const formatTypes: any = { - undefined: (d: any) => d, - custom: d3.time.format('%Y-%m-%d %H:%M:%S'), - auto: d3.time.format('%Y-%m-%d %H:%M:%S'), - ms: d3.time.format('%Y-%m-%d %H:%M:%S,%L'), - s: d3.time.format('%Y-%m-%d %H:%M:%S'), - m: d3.time.format('%Y-%m-%d %H:%M'), - h: d3.time.format('%Y-%m-%d %H:%M'), - d: d3.time.format('%Y-%m-%d'), - w: d3.time.format('%Y-%m-%d'), - M: d3.time.format('%Y-%m'), - y: d3.time.format('%Y'), -}; - -/** - * @param {string} dateHistogram - * @returns {function} - */ -export const getFormatTypes = (dateHistogram: any) => formatTypes[dateHistogram]; - -/** - * @param {*} x - * @returns {number} - */ -const parseNumber = (x: any) => { - if (typeof x === 'number' && !isNaN(x)) return x; - const n = parseFloat(x); - return isNaN(n) ? 0 : n; -}; - -/** - * @param visData - * @returns {string|undefined} - */ -export function getDateHistogram(visData: any) { - const schema = visData.columns.find((column: any) => column.meta.type === 'date_histogram'); - if (schema) { - return schema.meta.aggConfigParams.interval; - } -} - -/** - * - * @param {object} esData - * @param {string|undefined} dateHistogram - * @param {function} formatTime - * @returns {array} - */ -export function processData(esData: any, dateHistogram: any, formatTime: any) { - if (!(Array.isArray(esData.rows) && esData.rows.length)) { - return []; - } - - const data = esData.rows.map((row: any) => { - return { - date: dateHistogram ? formatTime(new Date(row['col-0-2'])) : row['col-0-2'], - period: parseNumber(row['col-2-3']), - total: parseNumber(row['col-1-1']), - value: parseNumber(row['col-3-1']), - }; - }); - - const cumulativeData: any = {}; - return data.map((d: any) => { - const lastValue = cumulativeData[d.date] || 0; - d.cumulativeValue = lastValue + d.value; - cumulativeData[d.date] = d.cumulativeValue; - return d; - }); -} - -// https://stackoverflow.com/questions/19757638/how-to-pivot-a-table-with-d3-js - -/** - * - * @param {object} data - * @param {string|undefined} dateHistogram - * @param {function} formatTime - * @returns {array} - */ -export function pivotData(data: any, dateHistogram: any, formatTime: any) { - const nester = d3 - .nest() - .key(function (d: any) { - return d.date; - }) - .key(function (d: any) { - return d.total; - }) - .rollup(function (values) { - const sortedValues = values.sort(function (x: any, y: any) { - return x.period < y.period ? -1 : x.period > y.period ? 1 : 0; - }); - const mkKey = function (c: any, v: any) { - return { - name: c, - ...v, - }; - }; - - const pivotedX = sortedValues.map(function (d: any) { - return mkKey(d.period, { - value: d.value, - total: d.total, - cumulativeValue: d.cumulativeValue, - }); - }); - - return Array.prototype.concat.apply([], [pivotedX]); - }); - - const nestedData = nester.entries(data); - const pivotedData: any = []; - - nestedData.forEach(function (kv1: any) { - const a = kv1.key; - kv1.values.forEach(function (kv2: any) { - const b = kv2.key; - const obj: any = { - date: dateHistogram ? formatTime(new Date(Date.parse(a))) : a, - Metric: b, - }; - - kv2.values.forEach(function (d: any) { - obj[d.name] = d.value; - // obj[d.name] = { value: d.value, total: d.total, cumulativeValue: d.cumulativeValue }; - }); - pivotedData.push(obj); - }); - }); - return pivotedData; -} - -/** - * @param {number} value - * @param {any} item - * @param {boolean} percentual - * @param {boolean} inverse - * @returns {string} color - */ -export function perc2color(value: number, item: any, percentual: boolean, inverse: boolean) { - if (!value) { - return ''; - } - if (parseNumber(value) === parseNumber(item.Metric)) { - return '#D36086'; - } else { - if (percentual || inverse) { - if (value >= 75) { - // 75% to 100% - return '#6DCCB1'; - } else if (value >= 50 && value < 75) { - // 50% to 75% - return '#79AAD9'; - } else if (value >= 25 && value < 50) { - // 25% to 50% - return '#F5A35C'; - } else { - // 0% to 25% - return '#E7664C'; - } - } else { - // Values are not in % - return ''; - } - } -} diff --git a/build/kibana/kibana_cohort/public/components/pivot_chart.tsx b/build/kibana/kibana_cohort/public/components/pivot_chart.tsx deleted file mode 100644 index 9e89c3d..0000000 --- a/build/kibana/kibana_cohort/public/components/pivot_chart.tsx +++ /dev/null @@ -1,53 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; -import { Chart, Settings, Axis, LineSeries } from '@elastic/charts'; - -export const CohortPivotChart = (props: any) => { - const { data, services } = props.deps; - - return ( - - - - - - - ); -}; diff --git a/build/kibana/kibana_cohort/public/components/pivot_grid.tsx b/build/kibana/kibana_cohort/public/components/pivot_grid.tsx deleted file mode 100644 index 7cbda75..0000000 --- a/build/kibana/kibana_cohort/public/components/pivot_grid.tsx +++ /dev/null @@ -1,137 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React, { useCallback, useState, useMemo, useEffect } from 'react'; -import { EuiDataGrid } from '@elastic/eui'; -import _ from 'lodash'; - -export const CohortPivotGrid = (props: any) => { - const { data } = props.deps; - - const columns: any = [ - { - id: 'date', - displayAsText: 'Group', - defaultSortDirection: 'asc', - }, - ]; - - const keys = data.reduce(function (arr: any, o: any) { - return Object.keys(o).reduce(function (a, k) { - if (a.indexOf(k) === -1) a.push(k); - return a; - }, arr); - }, []); - - const i: any = _.uniq(keys.filter((item: any) => item !== 'date' && item !== 'Metric')).sort(); - i.unshift('Metric'); - i.forEach((e: any) => { - columns.push({ - id: e, - }); - }); - - // ** Pagination config - const [pagination, setPagination] = useState({ pageIndex: 0, pageSize: 10 }); - const onChangeItemsPerPage = useCallback( - // eslint-disable-next-line no-shadow - (pageSize) => setPagination((pagination) => ({ ...pagination, pageSize, pageIndex: 0 })), - [setPagination] - ); - const onChangePage = useCallback( - // eslint-disable-next-line no-shadow - (pageIndex) => setPagination((pagination) => ({ ...pagination, pageIndex })), - [setPagination] - ); - - // ** Sorting config - const [sortingColumns, setSortingColumns] = useState([]); - const onSort = useCallback( - // eslint-disable-next-line no-shadow - (sortingColumns) => { - setSortingColumns(sortingColumns); - }, - [setSortingColumns] - ); - - // Column visibility - const [visibleColumns, setVisibleColumns] = useState(() => columns.map(({ id }: any) => id)); - // initialize to the full set of columns - - const renderCellValue = useMemo(() => { - return ({ rowIndex, columnId, setCellProps }: any) => { - // eslint-disable-next-line react-hooks/rules-of-hooks - useEffect(() => { - if (columnId === 'value' || columnId === 'total' || columnId === 'cumulativeValue') { - if (data.hasOwnProperty(rowIndex)) { - const row = data[rowIndex][columnId]; - if (row) { - const numeric = parseFloat(row.match(/\d+\.\d+/)[0]); - setCellProps({ - style: { - backgroundColor: `rgba(0, 255, 0, ${numeric * 0.02})`, - }, - }); - } - } - } - }, [rowIndex, columnId, setCellProps]); - - return data.hasOwnProperty(rowIndex) && data[rowIndex][columnId] - ? data[rowIndex][columnId] - : null; - }; - }, [data]); - - return ( - data[rowIndex][columnId]} - renderCellValue={renderCellValue} - inMemory={{ level: 'sorting' }} - sorting={{ columns: sortingColumns, onSort }} - pagination={{ - ...pagination, - pageSizeOptions: [5, 10, 15, 20, 25, 50], - onChangeItemsPerPage, - onChangePage, - }} - // Optional. Allows you to configure what features the toolbar shows. - // The prop also accepts a boolean if you want to toggle the entire toolbar on/off. - toolbarVisibility={{ - showColumnSelector: true, - showStyleSelector: true, - showSortSelector: true, - showFullScreenSelector: false, - }} - // Optional. Change the initial style of the grid. - gridStyle={{ - border: 'all', - fontSize: 's', - cellPadding: 's', - stripes: true, - rowHover: 'highlight', - header: 'underline', - }} - /> - ); -}; diff --git a/build/kibana/kibana_cohort/public/components/pivot_table.tsx b/build/kibana/kibana_cohort/public/components/pivot_table.tsx deleted file mode 100644 index dcb2105..0000000 --- a/build/kibana/kibana_cohort/public/components/pivot_table.tsx +++ /dev/null @@ -1,92 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import React from 'react'; -import _ from 'lodash'; -import { EuiInMemoryTable, EuiLink, EuiCode } from '@elastic/eui'; -import { perc2color } from './lib/tools'; - -export const CohortPivotTable = (props: any) => { - const { data, percentual, inverse } = props.deps; - const columns: any = [ - { - field: 'date', - name: 'Cohort', - sortable: true, - width: '10%', - }, - ]; - - const keys = data.reduce(function (arr: any, o: any) { - return Object.keys(o).reduce(function (a, k) { - if (a.indexOf(k) === -1) a.push(k); - return a; - }, arr); - }, []); - const i: any = _.uniq(keys.filter((item: any) => item !== 'date' && item !== 'Metric')).sort( - function (a: any, b: any) { - return a - b; - } - ); - - i.unshift('Metric'); - - i.forEach((e: any) => { - columns.push({ - field: e, - name: e, - sortable: true, - render: (value: any, item: any) => { - return ( -
- {value ? value : null} -
- ); - }, - }); - }); - - const sorting: any = { - sort: { - field: 'date', - direction: 'asc', - }, - }; - - return ( - - ); -}; diff --git a/build/kibana/kibana_cohort/public/index.ts b/build/kibana/kibana_cohort/public/index.ts deleted file mode 100644 index 951d280..0000000 --- a/build/kibana/kibana_cohort/public/index.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { PluginInitializerContext } from '../../../src/core/public'; -import { CohortVisPlugin as Plugin } from './plugin'; - -export function plugin(initializerContext: PluginInitializerContext) { - return new Plugin(initializerContext); -} diff --git a/build/kibana/kibana_cohort/public/plugin.ts b/build/kibana/kibana_cohort/public/plugin.ts deleted file mode 100644 index 2e0cd87..0000000 --- a/build/kibana/kibana_cohort/public/plugin.ts +++ /dev/null @@ -1,66 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { PluginInitializerContext, CoreSetup, CoreStart, Plugin } from '../../../src/core/public'; -import { DataPublicPluginSetup, DataPublicPluginStart } from '../../../src/plugins/data/public'; -import { Plugin as ExpressionsPublicPlugin } from '../../../src/plugins/expressions/public'; -import { VisualizationsSetup } from '../../../src/plugins/visualizations/public'; -import { ConfigSchema } from '../config'; -import { getCohortVisDefinition } from './cohort_vis_type'; -import { setFormatService } from './services'; -import { ChartsPluginSetup } from '../../../src/plugins/charts/public'; - -/** @internal */ -export interface CohortVisPluginStartDependencies { - data: DataPublicPluginStart; -} - -/** @internal */ -export interface CohortPluginSetupDependencies { - expressions: ReturnType; - visualizations: VisualizationsSetup; - data: DataPublicPluginSetup; - charts: ChartsPluginSetup; -} - -/** @internal */ -export class CohortVisPlugin implements Plugin { - initializerContext: PluginInitializerContext; - - constructor(initializerContext: PluginInitializerContext) { - this.initializerContext = initializerContext; - } - - public setup( - coreSetup: CoreSetup, - { expressions, visualizations, data, charts }: CohortPluginSetupDependencies - ) { - const deps: CohortPluginSetupDependencies = { - expressions, - visualizations, - data, - charts, - }; - // React Visualization Type - visualizations.createReactVisualization(getCohortVisDefinition(deps)); - } - public start(core: CoreStart, { data }: CohortVisPluginStartDependencies) { - setFormatService(data.fieldFormats); - } -} diff --git a/build/kibana/kibana_cohort/public/services.ts b/build/kibana/kibana_cohort/public/services.ts deleted file mode 100644 index 563ec3f..0000000 --- a/build/kibana/kibana_cohort/public/services.ts +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { createGetterSetter } from '../../../src/plugins/kibana_utils/common'; -import { DataPublicPluginStart } from '../../../src/plugins/data/public'; - -export const [getFormatService, setFormatService] = createGetterSetter< - DataPublicPluginStart['fieldFormats'] ->('metric data.fieldFormats'); diff --git a/build/kibana/kibana_cohort/public/types.ts b/build/kibana/kibana_cohort/public/types.ts deleted file mode 100644 index ac66ce4..0000000 --- a/build/kibana/kibana_cohort/public/types.ts +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ -import { ExprVis, VisParams } from '../../../src/plugins/visualizations/public'; - -export interface CohortVisParams { - percentual: boolean; // Show percentual values - inverse: boolean; // Show inverse values - cumulative: boolean; // Show cumulative values - table: boolean; // Show values as table - mapColors: any; // Show heatmap colors -} - -export interface CohortVisComponentProp extends CohortVisParams { - renderComplete: () => {}; - config: any; - vis: ExprVis; - visData: any; - visParams: VisParams; - services: any; -} diff --git a/build/kibana/kibana_cohort/server/index.ts b/build/kibana/kibana_cohort/server/index.ts deleted file mode 100644 index 19fe472..0000000 --- a/build/kibana/kibana_cohort/server/index.ts +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Licensed to Elasticsearch B.V. under one or more contributor - * license agreements. See the NOTICE file distributed with - * this work for additional information regarding copyright - * ownership. Elasticsearch B.V. licenses this file to you under - * the Apache License, Version 2.0 (the "License"); you may - * not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, - * software distributed under the License is distributed on an - * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY - * KIND, either express or implied. See the License for the - * specific language governing permissions and limitations - * under the License. - */ - -import { PluginConfigDescriptor } from 'kibana/server'; - -import { configSchema, ConfigSchema } from '../config'; - -export const config: PluginConfigDescriptor = { - schema: configSchema, - deprecations: ({ renameFromRoot }) => [ - renameFromRoot('cohort_vis.enabled', 'vis_type_cohort.enabled'), - ], -}; - -export const plugin = () => ({ - setup() {}, - start() {}, -}); diff --git a/build/kibana/kibana_cohort/target/public/0.plugin.js b/build/kibana/kibana_cohort/target/public/0.plugin.js deleted file mode 100644 index 5b1ea22..0000000 --- a/build/kibana/kibana_cohort/target/public/0.plugin.js +++ /dev/null @@ -1,637 +0,0 @@ -(window["kibanaCohort_bundle_jsonpfunction"] = window["kibanaCohort_bundle_jsonpfunction"] || []).push([[0],{ - -/***/ "../../node_modules/css-loader/dist/cjs.js?!../../node_modules/postcss-loader/src/index.js?!../../node_modules/resolve-url-loader/index.js?!../../node_modules/sass-loader/dist/cjs.js?!../../src/plugins/vis_default_editor/public/index.scss?v7dark": -/*!**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** c:/es/labs/kibana/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-0-1!c:/es/labs/kibana/node_modules/postcss-loader/src??ref--6-oneOf-0-2!c:/es/labs/kibana/node_modules/resolve-url-loader??ref--6-oneOf-0-3!c:/es/labs/kibana/node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-0-4!c:/es/labs/kibana/src/plugins/vis_default_editor/public/index.scss?v7dark ***! - \**************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// Imports -var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "../../node_modules/css-loader/dist/runtime/api.js"); -exports = ___CSS_LOADER_API_IMPORT___(true); -// Module -exports.push([module.i, ".visEditor--default {\n flex: 1 1 auto;\n display: flex; }\n @media only screen and (max-width: 574px) {\n .visEditor--default {\n flex-direction: column; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor--default {\n flex-direction: column; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor--default {\n flex-direction: column; } }\n\n/**\r\n * Collapsible sidebar container\r\n */\n.visEditor__collapsibleSidebar {\n background: #25262E;\n min-width: 350px;\n max-width: 100%;\n position: relative;\n flex-shrink: 0; }\n @media only screen and (max-width: 574px) {\n .visEditor__collapsibleSidebar {\n width: 100% !important; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor__collapsibleSidebar {\n width: 100% !important; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor__collapsibleSidebar {\n width: 100% !important; } }\n @media only screen and (min-width: 992px) and (max-width: 1199px) {\n .visEditor__collapsibleSidebar {\n max-width: 75%; } }\n @media only screen and (min-width: 1200px) {\n .visEditor__collapsibleSidebar {\n max-width: 75%; } }\n\n.visEditor__collapsibleSidebar-isClosed {\n min-width: 0;\n width: 32px !important; }\n .visEditor__collapsibleSidebar-isClosed .visEditorSidebar {\n display: none; }\n @media only screen and (max-width: 574px) {\n .visEditor__collapsibleSidebar-isClosed {\n height: 40px;\n width: 100% !important; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor__collapsibleSidebar-isClosed {\n height: 40px;\n width: 100% !important; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor__collapsibleSidebar-isClosed {\n height: 40px;\n width: 100% !important; } }\n\n.visEditor__collapsibleSidebarButton {\n position: absolute;\n right: 4px;\n top: 8px; }\n\n/**\r\n * Resizer\r\n */\n.visEditor__resizer {\n position: relative;\n display: flex;\n flex: 0 0 12px;\n background-color: #1a1b20;\n align-items: center;\n justify-content: center;\n margin: 0;\n -webkit-user-select: none;\n user-select: none;\n width: 12px; }\n .visEditor__resizer:hover {\n background-color: #0b4462; }\n .visEditor__resizer:focus, .visEditor__resizer.active {\n background-color: #1BA9F5;\n color: #1D1E24; }\n .visEditor__resizer::after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n cursor: ew-resize; }\n @media only screen and (max-width: 574px) {\n .visEditor__resizer {\n display: none; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor__resizer {\n display: none; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor__resizer {\n display: none; } }\n\n.visEditor__resizer-isHidden {\n display: none; }\n\n/**\r\n * Canvas area\r\n */\n.visEditor__visualization {\n display: flex;\n flex: 1 1 auto;\n overflow: hidden; }\n @media only screen and (max-width: 574px) {\n .visEditor__visualization {\n width: 100% !important; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor__visualization {\n width: 100% !important; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor__visualization {\n width: 100% !important; } }\n\n.visEditor__canvas {\n background-color: #1D1E24;\n display: flex;\n flex-direction: row;\n overflow: auto;\n flex-shrink: 1;\n flex-basis: 100%; }\n .visEditor__canvas.embedded {\n flex-shrink: 1;\n flex-basis: 100%; }\n .visEditor__canvas .visualize {\n display: flex;\n flex-direction: column;\n flex: 1 1 100%; }\n .visEditor__canvas .visChart {\n position: relative; }\n\n.visEditorSidebar {\n min-width: 350px; }\n .visEditorSidebar > .visEditorSidebar__formWrapper {\n flex-basis: auto; }\n\n.visEditorSidebar__form {\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n max-width: 100%; }\n .visEditorSidebar__form > * {\n flex-shrink: 0; }\n\n.visEditorSidebar__config {\n padding: 8px; }\n .visEditorSidebar__config > * {\n flex-grow: 0; }\n @media only screen and (min-width: 992px) and (max-width: 1199px) {\n .visEditorSidebar__config {\n flex: 1 1 1px;\n display: flex;\n flex-direction: column;\n scrollbar-width: thin;\n overflow: auto; }\n .visEditorSidebar__config > * {\n flex-shrink: 0; }\n .visEditorSidebar__config::-webkit-scrollbar {\n width: 16px;\n height: 16px; }\n .visEditorSidebar__config::-webkit-scrollbar-thumb {\n background-color: rgba(152, 162, 179, 0.5);\n border: 6px solid transparent;\n background-clip: content-box; }\n .visEditorSidebar__config::-webkit-scrollbar-corner, .visEditorSidebar__config::-webkit-scrollbar-track {\n background-color: transparent; } }\n @media only screen and (min-width: 1200px) {\n .visEditorSidebar__config {\n flex: 1 1 1px;\n display: flex;\n flex-direction: column;\n scrollbar-width: thin;\n overflow: auto; }\n .visEditorSidebar__config > * {\n flex-shrink: 0; }\n .visEditorSidebar__config::-webkit-scrollbar {\n width: 16px;\n height: 16px; }\n .visEditorSidebar__config::-webkit-scrollbar-thumb {\n background-color: rgba(152, 162, 179, 0.5);\n border: 6px solid transparent;\n background-clip: content-box; }\n .visEditorSidebar__config::-webkit-scrollbar-corner, .visEditorSidebar__config::-webkit-scrollbar-track {\n background-color: transparent; } }\n\n.visEditorSidebar__config-isHidden {\n display: none; }\n\n.visEditorSidebar__titleContainer {\n padding: 8px 32px 8px 8px; }\n\n.visEditorSidebar__indexPatternPlaceholder {\n min-height: 40px;\n border-bottom: 1px solid #343741; }\n\n.visEditorSidebar__nav,\n.visEditorSidebar__linkedSearch {\n flex-grow: 0; }\n\n.visEditorSidebar__section {\n background-color: #1D1E24;\n padding: 8px;\n border-radius: 4px; }\n .visEditorSidebar__section + .visEditorSidebar__section {\n margin-top: 8px; }\n\n.visEditorSidebar__collapsible {\n background-color: #25262E; }\n\n.visEditorSidebar__collapsible--marginBottom {\n margin-bottom: 12px; }\n\n.visEditorSidebar__formRow {\n display: flex;\n align-items: center;\n margin-top: 12px; }\n\n.visEditorSidebar__formLabel {\n display: flex;\n align-items: center;\n flex: 1 1 40%;\n padding-right: 4px; }\n\n.visEditorSidebar__formControl {\n display: flex;\n align-items: center;\n flex: 1 1 60%; }\n\n.visEditorSidebar__aggGroupAccordionButtonContent {\n font-size: 14px; }\n .visEditorSidebar__aggGroupAccordionButtonContent span {\n color: #98A2B3; }\n\n.visEditorSidebar__controls {\n border-top: 1px solid #343741;\n padding: 8px;\n display: flex;\n justify-content: flex-end;\n align-items: center; }\n .visEditorSidebar__controls .visEditorSidebar__autoApplyButton {\n margin-left: 12px; }\n\n.visEditorAgg__subAgg {\n border: 2px solid #343741;\n border-radius: 4px;\n background-color: transparent;\n padding: 8px; }\n\n.visEditorAgg__subAgg + .visEditorAggParam__string {\n margin-top: 16px; }\n\n.visEditorAggParam--half {\n margin: 16px 0;\n display: inline-block;\n width: calc(50% - 4px); }\n\n.visEditorAggParam--half-size {\n margin-left: 8px; }\n", "",{"version":3,"sources":["index.scss"],"names":[],"mappings":"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","file":"index.scss?v7dark","sourcesContent":[".visEditor--default {\n flex: 1 1 auto;\n display: flex; }\n @media only screen and (max-width: 574px) {\n .visEditor--default {\n flex-direction: column; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor--default {\n flex-direction: column; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor--default {\n flex-direction: column; } }\n\n/**\r\n * Collapsible sidebar container\r\n */\n.visEditor__collapsibleSidebar {\n background: #25262E;\n min-width: 350px;\n max-width: 100%;\n position: relative;\n flex-shrink: 0; }\n @media only screen and (max-width: 574px) {\n .visEditor__collapsibleSidebar {\n width: 100% !important; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor__collapsibleSidebar {\n width: 100% !important; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor__collapsibleSidebar {\n width: 100% !important; } }\n @media only screen and (min-width: 992px) and (max-width: 1199px) {\n .visEditor__collapsibleSidebar {\n max-width: 75%; } }\n @media only screen and (min-width: 1200px) {\n .visEditor__collapsibleSidebar {\n max-width: 75%; } }\n\n.visEditor__collapsibleSidebar-isClosed {\n min-width: 0;\n width: 32px !important; }\n .visEditor__collapsibleSidebar-isClosed .visEditorSidebar {\n display: none; }\n @media only screen and (max-width: 574px) {\n .visEditor__collapsibleSidebar-isClosed {\n height: 40px;\n width: 100% !important; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor__collapsibleSidebar-isClosed {\n height: 40px;\n width: 100% !important; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor__collapsibleSidebar-isClosed {\n height: 40px;\n width: 100% !important; } }\n\n.visEditor__collapsibleSidebarButton {\n position: absolute;\n right: 4px;\n top: 8px; }\n\n/**\r\n * Resizer\r\n */\n.visEditor__resizer {\n position: relative;\n display: flex;\n flex: 0 0 12px;\n background-color: #1a1b20;\n align-items: center;\n justify-content: center;\n margin: 0;\n user-select: none;\n width: 12px; }\n .visEditor__resizer:hover {\n background-color: #0b4462; }\n .visEditor__resizer:focus, .visEditor__resizer.active {\n background-color: #1BA9F5;\n color: #1D1E24; }\n .visEditor__resizer::after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n cursor: ew-resize; }\n @media only screen and (max-width: 574px) {\n .visEditor__resizer {\n display: none; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor__resizer {\n display: none; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor__resizer {\n display: none; } }\n\n.visEditor__resizer-isHidden {\n display: none; }\n\n/**\r\n * Canvas area\r\n */\n.visEditor__visualization {\n display: flex;\n flex: 1 1 auto;\n overflow: hidden; }\n @media only screen and (max-width: 574px) {\n .visEditor__visualization {\n width: 100% !important; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor__visualization {\n width: 100% !important; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor__visualization {\n width: 100% !important; } }\n\n.visEditor__canvas {\n background-color: #1D1E24;\n display: flex;\n flex-direction: row;\n overflow: auto;\n flex-shrink: 1;\n flex-basis: 100%; }\n .visEditor__canvas.embedded {\n flex-shrink: 1;\n flex-basis: 100%; }\n .visEditor__canvas .visualize {\n display: flex;\n flex-direction: column;\n flex: 1 1 100%; }\n .visEditor__canvas .visChart {\n position: relative; }\n\n.visEditorSidebar {\n min-width: 350px; }\n .visEditorSidebar > .visEditorSidebar__formWrapper {\n flex-basis: auto; }\n\n.visEditorSidebar__form {\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n max-width: 100%; }\n .visEditorSidebar__form > * {\n flex-shrink: 0; }\n\n.visEditorSidebar__config {\n padding: 8px; }\n .visEditorSidebar__config > * {\n flex-grow: 0; }\n @media only screen and (min-width: 992px) and (max-width: 1199px) {\n .visEditorSidebar__config {\n flex: 1 1 1px;\n display: flex;\n flex-direction: column;\n scrollbar-width: thin;\n overflow: auto; }\n .visEditorSidebar__config > * {\n flex-shrink: 0; }\n .visEditorSidebar__config::-webkit-scrollbar {\n width: 16px;\n height: 16px; }\n .visEditorSidebar__config::-webkit-scrollbar-thumb {\n background-color: rgba(152, 162, 179, 0.5);\n border: 6px solid transparent;\n background-clip: content-box; }\n .visEditorSidebar__config::-webkit-scrollbar-corner, .visEditorSidebar__config::-webkit-scrollbar-track {\n background-color: transparent; } }\n @media only screen and (min-width: 1200px) {\n .visEditorSidebar__config {\n flex: 1 1 1px;\n display: flex;\n flex-direction: column;\n scrollbar-width: thin;\n overflow: auto; }\n .visEditorSidebar__config > * {\n flex-shrink: 0; }\n .visEditorSidebar__config::-webkit-scrollbar {\n width: 16px;\n height: 16px; }\n .visEditorSidebar__config::-webkit-scrollbar-thumb {\n background-color: rgba(152, 162, 179, 0.5);\n border: 6px solid transparent;\n background-clip: content-box; }\n .visEditorSidebar__config::-webkit-scrollbar-corner, .visEditorSidebar__config::-webkit-scrollbar-track {\n background-color: transparent; } }\n\n.visEditorSidebar__config-isHidden {\n display: none; }\n\n.visEditorSidebar__titleContainer {\n padding: 8px 32px 8px 8px; }\n\n.visEditorSidebar__indexPatternPlaceholder {\n min-height: 40px;\n border-bottom: 1px solid #343741; }\n\n.visEditorSidebar__nav,\n.visEditorSidebar__linkedSearch {\n flex-grow: 0; }\n\n.visEditorSidebar__section {\n background-color: #1D1E24;\n padding: 8px;\n border-radius: 4px; }\n .visEditorSidebar__section + .visEditorSidebar__section {\n margin-top: 8px; }\n\n.visEditorSidebar__collapsible {\n background-color: #25262E; }\n\n.visEditorSidebar__collapsible--marginBottom {\n margin-bottom: 12px; }\n\n.visEditorSidebar__formRow {\n display: flex;\n align-items: center;\n margin-top: 12px; }\n\n.visEditorSidebar__formLabel {\n display: flex;\n align-items: center;\n flex: 1 1 40%;\n padding-right: 4px; }\n\n.visEditorSidebar__formControl {\n display: flex;\n align-items: center;\n flex: 1 1 60%; }\n\n.visEditorSidebar__aggGroupAccordionButtonContent {\n font-size: 14px; }\n .visEditorSidebar__aggGroupAccordionButtonContent span {\n color: #98A2B3; }\n\n.visEditorSidebar__controls {\n border-top: 1px solid #343741;\n padding: 8px;\n display: flex;\n justify-content: flex-end;\n align-items: center; }\n .visEditorSidebar__controls .visEditorSidebar__autoApplyButton {\n margin-left: 12px; }\n\n.visEditorAgg__subAgg {\n border: 2px solid #343741;\n border-radius: 4px;\n background-color: transparent;\n padding: 8px; }\n\n.visEditorAgg__subAgg + .visEditorAggParam__string {\n margin-top: 16px; }\n\n.visEditorAggParam--half {\n margin: 16px 0;\n display: inline-block;\n width: calc(50% - 4px); }\n\n.visEditorAggParam--half-size {\n margin-left: 8px; }\n"]}]); -// Exports -module.exports = exports; - - -/***/ }), - -/***/ "../../node_modules/css-loader/dist/cjs.js?!../../node_modules/postcss-loader/src/index.js?!../../node_modules/resolve-url-loader/index.js?!../../node_modules/sass-loader/dist/cjs.js?!../../src/plugins/vis_default_editor/public/index.scss?v7light": -/*!***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************!*\ - !*** c:/es/labs/kibana/node_modules/css-loader/dist/cjs.js??ref--6-oneOf-1-1!c:/es/labs/kibana/node_modules/postcss-loader/src??ref--6-oneOf-1-2!c:/es/labs/kibana/node_modules/resolve-url-loader??ref--6-oneOf-1-3!c:/es/labs/kibana/node_modules/sass-loader/dist/cjs.js??ref--6-oneOf-1-4!c:/es/labs/kibana/src/plugins/vis_default_editor/public/index.scss?v7light ***! - \***************************************************************************************************************************************************************************************************************************************************************************************************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -// Imports -var ___CSS_LOADER_API_IMPORT___ = __webpack_require__(/*! ../../../../node_modules/css-loader/dist/runtime/api.js */ "../../node_modules/css-loader/dist/runtime/api.js"); -exports = ___CSS_LOADER_API_IMPORT___(true); -// Module -exports.push([module.i, ".visEditor--default {\n flex: 1 1 auto;\n display: flex; }\n @media only screen and (max-width: 574px) {\n .visEditor--default {\n flex-direction: column; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor--default {\n flex-direction: column; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor--default {\n flex-direction: column; } }\n\n/**\r\n * Collapsible sidebar container\r\n */\n.visEditor__collapsibleSidebar {\n background: #F5F7FA;\n min-width: 350px;\n max-width: 100%;\n position: relative;\n flex-shrink: 0; }\n @media only screen and (max-width: 574px) {\n .visEditor__collapsibleSidebar {\n width: 100% !important; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor__collapsibleSidebar {\n width: 100% !important; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor__collapsibleSidebar {\n width: 100% !important; } }\n @media only screen and (min-width: 992px) and (max-width: 1199px) {\n .visEditor__collapsibleSidebar {\n max-width: 75%; } }\n @media only screen and (min-width: 1200px) {\n .visEditor__collapsibleSidebar {\n max-width: 75%; } }\n\n.visEditor__collapsibleSidebar-isClosed {\n min-width: 0;\n width: 32px !important; }\n .visEditor__collapsibleSidebar-isClosed .visEditorSidebar {\n display: none; }\n @media only screen and (max-width: 574px) {\n .visEditor__collapsibleSidebar-isClosed {\n height: 40px;\n width: 100% !important; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor__collapsibleSidebar-isClosed {\n height: 40px;\n width: 100% !important; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor__collapsibleSidebar-isClosed {\n height: 40px;\n width: 100% !important; } }\n\n.visEditor__collapsibleSidebarButton {\n position: absolute;\n right: 4px;\n top: 8px; }\n\n/**\r\n * Resizer\r\n */\n.visEditor__resizer {\n position: relative;\n display: flex;\n flex: 0 0 12px;\n background-color: #fafbfd;\n align-items: center;\n justify-content: center;\n margin: 0;\n -webkit-user-select: none;\n user-select: none;\n width: 12px; }\n .visEditor__resizer:hover {\n background-color: #cce1f0; }\n .visEditor__resizer:focus, .visEditor__resizer.active {\n background-color: #006BB4;\n color: #FFF; }\n .visEditor__resizer::after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n cursor: ew-resize; }\n @media only screen and (max-width: 574px) {\n .visEditor__resizer {\n display: none; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor__resizer {\n display: none; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor__resizer {\n display: none; } }\n\n.visEditor__resizer-isHidden {\n display: none; }\n\n/**\r\n * Canvas area\r\n */\n.visEditor__visualization {\n display: flex;\n flex: 1 1 auto;\n overflow: hidden; }\n @media only screen and (max-width: 574px) {\n .visEditor__visualization {\n width: 100% !important; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor__visualization {\n width: 100% !important; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor__visualization {\n width: 100% !important; } }\n\n.visEditor__canvas {\n background-color: #FFF;\n display: flex;\n flex-direction: row;\n overflow: auto;\n flex-shrink: 1;\n flex-basis: 100%; }\n .visEditor__canvas.embedded {\n flex-shrink: 1;\n flex-basis: 100%; }\n .visEditor__canvas .visualize {\n display: flex;\n flex-direction: column;\n flex: 1 1 100%; }\n .visEditor__canvas .visChart {\n position: relative; }\n\n.visEditorSidebar {\n min-width: 350px; }\n .visEditorSidebar > .visEditorSidebar__formWrapper {\n flex-basis: auto; }\n\n.visEditorSidebar__form {\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n max-width: 100%; }\n .visEditorSidebar__form > * {\n flex-shrink: 0; }\n\n.visEditorSidebar__config {\n padding: 8px; }\n .visEditorSidebar__config > * {\n flex-grow: 0; }\n @media only screen and (min-width: 992px) and (max-width: 1199px) {\n .visEditorSidebar__config {\n flex: 1 1 1px;\n display: flex;\n flex-direction: column;\n scrollbar-width: thin;\n overflow: auto; }\n .visEditorSidebar__config > * {\n flex-shrink: 0; }\n .visEditorSidebar__config::-webkit-scrollbar {\n width: 16px;\n height: 16px; }\n .visEditorSidebar__config::-webkit-scrollbar-thumb {\n background-color: rgba(105, 112, 125, 0.5);\n border: 6px solid transparent;\n background-clip: content-box; }\n .visEditorSidebar__config::-webkit-scrollbar-corner, .visEditorSidebar__config::-webkit-scrollbar-track {\n background-color: transparent; } }\n @media only screen and (min-width: 1200px) {\n .visEditorSidebar__config {\n flex: 1 1 1px;\n display: flex;\n flex-direction: column;\n scrollbar-width: thin;\n overflow: auto; }\n .visEditorSidebar__config > * {\n flex-shrink: 0; }\n .visEditorSidebar__config::-webkit-scrollbar {\n width: 16px;\n height: 16px; }\n .visEditorSidebar__config::-webkit-scrollbar-thumb {\n background-color: rgba(105, 112, 125, 0.5);\n border: 6px solid transparent;\n background-clip: content-box; }\n .visEditorSidebar__config::-webkit-scrollbar-corner, .visEditorSidebar__config::-webkit-scrollbar-track {\n background-color: transparent; } }\n\n.visEditorSidebar__config-isHidden {\n display: none; }\n\n.visEditorSidebar__titleContainer {\n padding: 8px 32px 8px 8px; }\n\n.visEditorSidebar__indexPatternPlaceholder {\n min-height: 40px;\n border-bottom: 1px solid #D3DAE6; }\n\n.visEditorSidebar__nav,\n.visEditorSidebar__linkedSearch {\n flex-grow: 0; }\n\n.visEditorSidebar__section {\n background-color: #FFF;\n padding: 8px;\n border-radius: 4px; }\n .visEditorSidebar__section + .visEditorSidebar__section {\n margin-top: 8px; }\n\n.visEditorSidebar__collapsible {\n background-color: #fafbfd; }\n\n.visEditorSidebar__collapsible--marginBottom {\n margin-bottom: 12px; }\n\n.visEditorSidebar__formRow {\n display: flex;\n align-items: center;\n margin-top: 12px; }\n\n.visEditorSidebar__formLabel {\n display: flex;\n align-items: center;\n flex: 1 1 40%;\n padding-right: 4px; }\n\n.visEditorSidebar__formControl {\n display: flex;\n align-items: center;\n flex: 1 1 60%; }\n\n.visEditorSidebar__aggGroupAccordionButtonContent {\n font-size: 14px; }\n .visEditorSidebar__aggGroupAccordionButtonContent span {\n color: #69707D; }\n\n.visEditorSidebar__controls {\n border-top: 1px solid #D3DAE6;\n padding: 8px;\n display: flex;\n justify-content: flex-end;\n align-items: center; }\n .visEditorSidebar__controls .visEditorSidebar__autoApplyButton {\n margin-left: 12px; }\n\n.visEditorAgg__subAgg {\n border: 2px solid #D3DAE6;\n border-radius: 4px;\n background-color: transparent;\n padding: 8px; }\n\n.visEditorAgg__subAgg + .visEditorAggParam__string {\n margin-top: 16px; }\n\n.visEditorAggParam--half {\n margin: 16px 0;\n display: inline-block;\n width: calc(50% - 4px); }\n\n.visEditorAggParam--half-size {\n margin-left: 8px; }\n", "",{"version":3,"sources":["index.scss"],"names":[],"mappings":"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","file":"index.scss?v7light","sourcesContent":[".visEditor--default {\n flex: 1 1 auto;\n display: flex; }\n @media only screen and (max-width: 574px) {\n .visEditor--default {\n flex-direction: column; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor--default {\n flex-direction: column; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor--default {\n flex-direction: column; } }\n\n/**\r\n * Collapsible sidebar container\r\n */\n.visEditor__collapsibleSidebar {\n background: #F5F7FA;\n min-width: 350px;\n max-width: 100%;\n position: relative;\n flex-shrink: 0; }\n @media only screen and (max-width: 574px) {\n .visEditor__collapsibleSidebar {\n width: 100% !important; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor__collapsibleSidebar {\n width: 100% !important; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor__collapsibleSidebar {\n width: 100% !important; } }\n @media only screen and (min-width: 992px) and (max-width: 1199px) {\n .visEditor__collapsibleSidebar {\n max-width: 75%; } }\n @media only screen and (min-width: 1200px) {\n .visEditor__collapsibleSidebar {\n max-width: 75%; } }\n\n.visEditor__collapsibleSidebar-isClosed {\n min-width: 0;\n width: 32px !important; }\n .visEditor__collapsibleSidebar-isClosed .visEditorSidebar {\n display: none; }\n @media only screen and (max-width: 574px) {\n .visEditor__collapsibleSidebar-isClosed {\n height: 40px;\n width: 100% !important; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor__collapsibleSidebar-isClosed {\n height: 40px;\n width: 100% !important; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor__collapsibleSidebar-isClosed {\n height: 40px;\n width: 100% !important; } }\n\n.visEditor__collapsibleSidebarButton {\n position: absolute;\n right: 4px;\n top: 8px; }\n\n/**\r\n * Resizer\r\n */\n.visEditor__resizer {\n position: relative;\n display: flex;\n flex: 0 0 12px;\n background-color: #fafbfd;\n align-items: center;\n justify-content: center;\n margin: 0;\n user-select: none;\n width: 12px; }\n .visEditor__resizer:hover {\n background-color: #cce1f0; }\n .visEditor__resizer:focus, .visEditor__resizer.active {\n background-color: #006BB4;\n color: #FFF; }\n .visEditor__resizer::after {\n content: \"\";\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n height: 100%;\n cursor: ew-resize; }\n @media only screen and (max-width: 574px) {\n .visEditor__resizer {\n display: none; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor__resizer {\n display: none; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor__resizer {\n display: none; } }\n\n.visEditor__resizer-isHidden {\n display: none; }\n\n/**\r\n * Canvas area\r\n */\n.visEditor__visualization {\n display: flex;\n flex: 1 1 auto;\n overflow: hidden; }\n @media only screen and (max-width: 574px) {\n .visEditor__visualization {\n width: 100% !important; } }\n @media only screen and (min-width: 575px) and (max-width: 767px) {\n .visEditor__visualization {\n width: 100% !important; } }\n @media only screen and (min-width: 768px) and (max-width: 991px) {\n .visEditor__visualization {\n width: 100% !important; } }\n\n.visEditor__canvas {\n background-color: #FFF;\n display: flex;\n flex-direction: row;\n overflow: auto;\n flex-shrink: 1;\n flex-basis: 100%; }\n .visEditor__canvas.embedded {\n flex-shrink: 1;\n flex-basis: 100%; }\n .visEditor__canvas .visualize {\n display: flex;\n flex-direction: column;\n flex: 1 1 100%; }\n .visEditor__canvas .visChart {\n position: relative; }\n\n.visEditorSidebar {\n min-width: 350px; }\n .visEditorSidebar > .visEditorSidebar__formWrapper {\n flex-basis: auto; }\n\n.visEditorSidebar__form {\n flex: 1 1 auto;\n display: flex;\n flex-direction: column;\n max-width: 100%; }\n .visEditorSidebar__form > * {\n flex-shrink: 0; }\n\n.visEditorSidebar__config {\n padding: 8px; }\n .visEditorSidebar__config > * {\n flex-grow: 0; }\n @media only screen and (min-width: 992px) and (max-width: 1199px) {\n .visEditorSidebar__config {\n flex: 1 1 1px;\n display: flex;\n flex-direction: column;\n scrollbar-width: thin;\n overflow: auto; }\n .visEditorSidebar__config > * {\n flex-shrink: 0; }\n .visEditorSidebar__config::-webkit-scrollbar {\n width: 16px;\n height: 16px; }\n .visEditorSidebar__config::-webkit-scrollbar-thumb {\n background-color: rgba(105, 112, 125, 0.5);\n border: 6px solid transparent;\n background-clip: content-box; }\n .visEditorSidebar__config::-webkit-scrollbar-corner, .visEditorSidebar__config::-webkit-scrollbar-track {\n background-color: transparent; } }\n @media only screen and (min-width: 1200px) {\n .visEditorSidebar__config {\n flex: 1 1 1px;\n display: flex;\n flex-direction: column;\n scrollbar-width: thin;\n overflow: auto; }\n .visEditorSidebar__config > * {\n flex-shrink: 0; }\n .visEditorSidebar__config::-webkit-scrollbar {\n width: 16px;\n height: 16px; }\n .visEditorSidebar__config::-webkit-scrollbar-thumb {\n background-color: rgba(105, 112, 125, 0.5);\n border: 6px solid transparent;\n background-clip: content-box; }\n .visEditorSidebar__config::-webkit-scrollbar-corner, .visEditorSidebar__config::-webkit-scrollbar-track {\n background-color: transparent; } }\n\n.visEditorSidebar__config-isHidden {\n display: none; }\n\n.visEditorSidebar__titleContainer {\n padding: 8px 32px 8px 8px; }\n\n.visEditorSidebar__indexPatternPlaceholder {\n min-height: 40px;\n border-bottom: 1px solid #D3DAE6; }\n\n.visEditorSidebar__nav,\n.visEditorSidebar__linkedSearch {\n flex-grow: 0; }\n\n.visEditorSidebar__section {\n background-color: #FFF;\n padding: 8px;\n border-radius: 4px; }\n .visEditorSidebar__section + .visEditorSidebar__section {\n margin-top: 8px; }\n\n.visEditorSidebar__collapsible {\n background-color: #fafbfd; }\n\n.visEditorSidebar__collapsible--marginBottom {\n margin-bottom: 12px; }\n\n.visEditorSidebar__formRow {\n display: flex;\n align-items: center;\n margin-top: 12px; }\n\n.visEditorSidebar__formLabel {\n display: flex;\n align-items: center;\n flex: 1 1 40%;\n padding-right: 4px; }\n\n.visEditorSidebar__formControl {\n display: flex;\n align-items: center;\n flex: 1 1 60%; }\n\n.visEditorSidebar__aggGroupAccordionButtonContent {\n font-size: 14px; }\n .visEditorSidebar__aggGroupAccordionButtonContent span {\n color: #69707D; }\n\n.visEditorSidebar__controls {\n border-top: 1px solid #D3DAE6;\n padding: 8px;\n display: flex;\n justify-content: flex-end;\n align-items: center; }\n .visEditorSidebar__controls .visEditorSidebar__autoApplyButton {\n margin-left: 12px; }\n\n.visEditorAgg__subAgg {\n border: 2px solid #D3DAE6;\n border-radius: 4px;\n background-color: transparent;\n padding: 8px; }\n\n.visEditorAgg__subAgg + .visEditorAggParam__string {\n margin-top: 16px; }\n\n.visEditorAggParam--half {\n margin: 16px 0;\n display: inline-block;\n width: calc(50% - 4px); }\n\n.visEditorAggParam--half-size {\n margin-left: 8px; }\n"]}]); -// Exports -module.exports = exports; - - -/***/ }), - -/***/ "../../node_modules/css-loader/dist/runtime/api.js": -/*!*********************************************************************!*\ - !*** c:/es/labs/kibana/node_modules/css-loader/dist/runtime/api.js ***! - \*********************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -/* - MIT License http://www.opensource.org/licenses/mit-license.php - Author Tobias Koppers @sokra -*/ -// css base code, injected by the css-loader -// eslint-disable-next-line func-names -module.exports = function (useSourceMap) { - var list = []; // return the list of modules as css string - - list.toString = function toString() { - return this.map(function (item) { - var content = cssWithMappingToString(item, useSourceMap); - - if (item[2]) { - return "@media ".concat(item[2], " {").concat(content, "}"); - } - - return content; - }).join(''); - }; // import a list of modules into the list - // eslint-disable-next-line func-names - - - list.i = function (modules, mediaQuery, dedupe) { - if (typeof modules === 'string') { - // eslint-disable-next-line no-param-reassign - modules = [[null, modules, '']]; - } - - var alreadyImportedModules = {}; - - if (dedupe) { - for (var i = 0; i < this.length; i++) { - // eslint-disable-next-line prefer-destructuring - var id = this[i][0]; - - if (id != null) { - alreadyImportedModules[id] = true; - } - } - } - - for (var _i = 0; _i < modules.length; _i++) { - var item = [].concat(modules[_i]); - - if (dedupe && alreadyImportedModules[item[0]]) { - // eslint-disable-next-line no-continue - continue; - } - - if (mediaQuery) { - if (!item[2]) { - item[2] = mediaQuery; - } else { - item[2] = "".concat(mediaQuery, " and ").concat(item[2]); - } - } - - list.push(item); - } - }; - - return list; -}; - -function cssWithMappingToString(item, useSourceMap) { - var content = item[1] || ''; // eslint-disable-next-line prefer-destructuring - - var cssMapping = item[3]; - - if (!cssMapping) { - return content; - } - - if (useSourceMap && typeof btoa === 'function') { - var sourceMapping = toComment(cssMapping); - var sourceURLs = cssMapping.sources.map(function (source) { - return "/*# sourceURL=".concat(cssMapping.sourceRoot || '').concat(source, " */"); - }); - return [content].concat(sourceURLs).concat([sourceMapping]).join('\n'); - } - - return [content].join('\n'); -} // Adapted from convert-source-map (MIT) - - -function toComment(sourceMap) { - // eslint-disable-next-line no-undef - var base64 = btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))); - var data = "sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(base64); - return "/*# ".concat(data, " */"); -} - -/***/ }), - -/***/ "../../node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js": -/*!********************************************************************************************!*\ - !*** c:/es/labs/kibana/node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js ***! - \********************************************************************************************/ -/*! no static exports found */ -/***/ (function(module, exports, __webpack_require__) { - -"use strict"; - - -var isOldIE = function isOldIE() { - var memo; - return function memorize() { - if (typeof memo === 'undefined') { - // Test for IE <= 9 as proposed by Browserhacks - // @see http://browserhacks.com/#hack-e71d8692f65334173fee715c222cb805 - // Tests for existence of standard globals is to allow style-loader - // to operate correctly into non-standard environments - // @see https://github.com/webpack-contrib/style-loader/issues/177 - memo = Boolean(window && document && document.all && !window.atob); - } - - return memo; - }; -}(); - -var getTarget = function getTarget() { - var memo = {}; - return function memorize(target) { - if (typeof memo[target] === 'undefined') { - var styleTarget = document.querySelector(target); // Special case to return head of iframe instead of iframe itself - - if (window.HTMLIFrameElement && styleTarget instanceof window.HTMLIFrameElement) { - try { - // This will throw an exception if access to iframe is blocked - // due to cross-origin restrictions - styleTarget = styleTarget.contentDocument.head; - } catch (e) { - // istanbul ignore next - styleTarget = null; - } - } - - memo[target] = styleTarget; - } - - return memo[target]; - }; -}(); - -var stylesInDom = []; - -function getIndexByIdentifier(identifier) { - var result = -1; - - for (var i = 0; i < stylesInDom.length; i++) { - if (stylesInDom[i].identifier === identifier) { - result = i; - break; - } - } - - return result; -} - -function modulesToDom(list, options) { - var idCountMap = {}; - var identifiers = []; - - for (var i = 0; i < list.length; i++) { - var item = list[i]; - var id = options.base ? item[0] + options.base : item[0]; - var count = idCountMap[id] || 0; - var identifier = "".concat(id, " ").concat(count); - idCountMap[id] = count + 1; - var index = getIndexByIdentifier(identifier); - var obj = { - css: item[1], - media: item[2], - sourceMap: item[3] - }; - - if (index !== -1) { - stylesInDom[index].references++; - stylesInDom[index].updater(obj); - } else { - stylesInDom.push({ - identifier: identifier, - updater: addStyle(obj, options), - references: 1 - }); - } - - identifiers.push(identifier); - } - - return identifiers; -} - -function insertStyleElement(options) { - var style = document.createElement('style'); - var attributes = options.attributes || {}; - - if (typeof attributes.nonce === 'undefined') { - var nonce = true ? __webpack_require__.nc : undefined; - - if (nonce) { - attributes.nonce = nonce; - } - } - - Object.keys(attributes).forEach(function (key) { - style.setAttribute(key, attributes[key]); - }); - - if (typeof options.insert === 'function') { - options.insert(style); - } else { - var target = getTarget(options.insert || 'head'); - - if (!target) { - throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid."); - } - - target.appendChild(style); - } - - return style; -} - -function removeStyleElement(style) { - // istanbul ignore if - if (style.parentNode === null) { - return false; - } - - style.parentNode.removeChild(style); -} -/* istanbul ignore next */ - - -var replaceText = function replaceText() { - var textStore = []; - return function replace(index, replacement) { - textStore[index] = replacement; - return textStore.filter(Boolean).join('\n'); - }; -}(); - -function applyToSingletonTag(style, index, remove, obj) { - var css = remove ? '' : obj.media ? "@media ".concat(obj.media, " {").concat(obj.css, "}") : obj.css; // For old IE - - /* istanbul ignore if */ - - if (style.styleSheet) { - style.styleSheet.cssText = replaceText(index, css); - } else { - var cssNode = document.createTextNode(css); - var childNodes = style.childNodes; - - if (childNodes[index]) { - style.removeChild(childNodes[index]); - } - - if (childNodes.length) { - style.insertBefore(cssNode, childNodes[index]); - } else { - style.appendChild(cssNode); - } - } -} - -function applyToTag(style, options, obj) { - var css = obj.css; - var media = obj.media; - var sourceMap = obj.sourceMap; - - if (media) { - style.setAttribute('media', media); - } else { - style.removeAttribute('media'); - } - - if (sourceMap && btoa) { - css += "\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(sourceMap)))), " */"); - } // For old IE - - /* istanbul ignore if */ - - - if (style.styleSheet) { - style.styleSheet.cssText = css; - } else { - while (style.firstChild) { - style.removeChild(style.firstChild); - } - - style.appendChild(document.createTextNode(css)); - } -} - -var singleton = null; -var singletonCounter = 0; - -function addStyle(obj, options) { - var style; - var update; - var remove; - - if (options.singleton) { - var styleIndex = singletonCounter++; - style = singleton || (singleton = insertStyleElement(options)); - update = applyToSingletonTag.bind(null, style, styleIndex, false); - remove = applyToSingletonTag.bind(null, style, styleIndex, true); - } else { - style = insertStyleElement(options); - update = applyToTag.bind(null, style, options); - - remove = function remove() { - removeStyleElement(style); - }; - } - - update(obj); - return function updateStyle(newObj) { - if (newObj) { - if (newObj.css === obj.css && newObj.media === obj.media && newObj.sourceMap === obj.sourceMap) { - return; - } - - update(obj = newObj); - } else { - remove(); - } - }; -} - -module.exports = function (list, options) { - options = options || {}; // Force single-tag solution on IE6-9, which has a hard limit on the # of