Merge branch 'v9.0.x' of github.com:grafana/grafana into v9.0.x
This commit is contained in:
+15
-38
@@ -20,8 +20,8 @@ exports[`no enzyme tests`] = {
|
||||
"packages/grafana-ui/src/components/Logs/LogRowContextProvider.test.tsx:2719724375": [
|
||||
[0, 17, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/components/QueryField/QueryField.test.tsx:375894800": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
"packages/grafana-ui/src/components/QueryField/QueryField.test.tsx:2976628669": [
|
||||
[0, 26, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/components/Typeahead/PartialHighlighter.test.tsx:1751923376": [
|
||||
[0, 31, 13, "RegExp match", "2409514259"]
|
||||
@@ -29,16 +29,16 @@ exports[`no enzyme tests`] = {
|
||||
"packages/grafana-ui/src/components/Typeahead/Typeahead.test.tsx:972524250": [
|
||||
[0, 17, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/braces.test.tsx:1440546721": [
|
||||
"packages/grafana-ui/src/slate-plugins/braces.test.tsx:1691463920": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/clear.test.tsx:1085648664": [
|
||||
"packages/grafana-ui/src/slate-plugins/clear.test.tsx:3927593033": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/runner.test.tsx:446043290": [
|
||||
"packages/grafana-ui/src/slate-plugins/runner.test.tsx:1123710822": [
|
||||
[0, 19, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/suggestions.test.tsx:3654981205": [
|
||||
"packages/grafana-ui/src/slate-plugins/suggestions.test.tsx:2682912140": [
|
||||
[0, 18, 13, "RegExp match", "2409514259"]
|
||||
],
|
||||
"packages/jaeger-ui-components/src/TracePageHeader/SpanGraph/CanvasSpanGraph.test.js:1974748555": [
|
||||
@@ -1547,8 +1547,7 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "4"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"]
|
||||
],
|
||||
"packages/grafana-ui/src/components/DataLinks/SelectionReference.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
@@ -2096,7 +2095,12 @@ exports[`better eslint`] = {
|
||||
[0, 0, 0, "Do not use any type assertions.", "3"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "4"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "5"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "6"]
|
||||
[0, 0, 0, "Do not use any type assertions.", "6"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "7"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "8"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "9"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "10"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "11"]
|
||||
],
|
||||
"packages/grafana-ui/src/components/Table/TableCell.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
@@ -2311,42 +2315,16 @@ exports[`better eslint`] = {
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/braces.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "2"]
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/clear.test.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "1"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/clear.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/clipboard.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "3"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "4"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "5"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/indentation.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/newline.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/runner.test.tsx:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/runner.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/selection_shortcuts.ts:5381": [
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"]
|
||||
],
|
||||
"packages/grafana-ui/src/slate-plugins/slate-prism/index.ts:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
@@ -2368,8 +2346,7 @@ exports[`better eslint`] = {
|
||||
"packages/grafana-ui/src/slate-plugins/suggestions.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "1"],
|
||||
[0, 0, 0, "Do not use any type assertions.", "2"],
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "3"]
|
||||
[0, 0, 0, "Unexpected any. Specify a different type.", "2"]
|
||||
],
|
||||
"packages/grafana-ui/src/themes/ThemeContext.tsx:5381": [
|
||||
[0, 0, 0, "Do not use any type assertions.", "0"],
|
||||
|
||||
+52
-55
@@ -15,7 +15,7 @@ steps:
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -87,7 +87,7 @@ steps:
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -175,7 +175,7 @@ steps:
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -441,7 +441,7 @@ services:
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -511,7 +511,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -601,7 +601,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -690,7 +690,7 @@ steps:
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -758,7 +758,7 @@ steps:
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -842,7 +842,7 @@ steps:
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -1197,7 +1197,7 @@ steps:
|
||||
repo:
|
||||
- grafana/grafana
|
||||
- commands:
|
||||
- ./bin/grabpl upload-packages --edition oss --packages-bucket grafana-downloads
|
||||
- ./bin/grabpl upload-packages --edition oss
|
||||
depends_on:
|
||||
- end-to-end-tests-dashboards-suite
|
||||
- end-to-end-tests-panels-suite
|
||||
@@ -1214,7 +1214,7 @@ steps:
|
||||
repo:
|
||||
- grafana/grafana
|
||||
- commands:
|
||||
- ./bin/grabpl upload-cdn --edition oss --src-bucket "grafana-static-assets"
|
||||
- ./bin/grabpl upload-cdn --edition oss
|
||||
depends_on:
|
||||
- grafana-server
|
||||
environment:
|
||||
@@ -1275,7 +1275,7 @@ services:
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -1348,7 +1348,7 @@ steps:
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- $$ProgressPreference = "SilentlyContinue"
|
||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/windows/grabpl.exe
|
||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/windows/grabpl.exe
|
||||
-OutFile grabpl.exe
|
||||
image: grafana/ci-wix:0.1.1
|
||||
name: windows-init
|
||||
@@ -1436,7 +1436,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -1521,7 +1521,7 @@ steps:
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -1736,8 +1736,7 @@ steps:
|
||||
image: grafana/build-container:1.5.8
|
||||
name: build-storybook
|
||||
- commands:
|
||||
- ./bin/grabpl upload-cdn --edition oss --src-bucket "$${PRERELEASE_BUCKET}" --src-dir
|
||||
artifacts/static-assets
|
||||
- ./bin/grabpl upload-cdn --edition oss
|
||||
depends_on:
|
||||
- grafana-server
|
||||
environment:
|
||||
@@ -1748,7 +1747,7 @@ steps:
|
||||
image: grafana/grafana-ci-deploy:1.3.3
|
||||
name: upload-cdn-assets
|
||||
- commands:
|
||||
- ./bin/grabpl upload-packages --edition oss --packages-bucket $${PRERELEASE_BUCKET}/artifacts/downloads
|
||||
- ./bin/grabpl upload-packages --edition oss
|
||||
depends_on:
|
||||
- end-to-end-tests-dashboards-suite
|
||||
- end-to-end-tests-panels-suite
|
||||
@@ -1827,7 +1826,7 @@ steps:
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -1951,7 +1950,7 @@ services:
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -2028,7 +2027,7 @@ steps:
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- $$ProgressPreference = "SilentlyContinue"
|
||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/windows/grabpl.exe
|
||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/windows/grabpl.exe
|
||||
-OutFile grabpl.exe
|
||||
image: grafana/ci-wix:0.1.1
|
||||
name: windows-init
|
||||
@@ -2087,7 +2086,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -2332,8 +2331,7 @@ steps:
|
||||
- success
|
||||
- failure
|
||||
- commands:
|
||||
- ./bin/grabpl upload-cdn --edition enterprise --src-bucket "$${PRERELEASE_BUCKET}"
|
||||
--src-dir artifacts/static-assets
|
||||
- ./bin/grabpl upload-cdn --edition enterprise
|
||||
depends_on:
|
||||
- package
|
||||
environment:
|
||||
@@ -2344,7 +2342,7 @@ steps:
|
||||
image: grafana/grafana-ci-deploy:1.3.3
|
||||
name: upload-cdn-assets
|
||||
- commands:
|
||||
- ./bin/grabpl upload-packages --edition enterprise --packages-bucket $${PRERELEASE_BUCKET}/artifacts/downloads
|
||||
- ./bin/grabpl upload-packages --edition enterprise
|
||||
depends_on:
|
||||
- package
|
||||
environment:
|
||||
@@ -2385,8 +2383,7 @@ steps:
|
||||
image: grafana/build-container:1.5.8
|
||||
name: package-enterprise2
|
||||
- commands:
|
||||
- ./bin/grabpl upload-cdn --edition enterprise2 --src-bucket "$${PRERELEASE_BUCKET}"
|
||||
--src-dir artifacts/static-assets
|
||||
- ./bin/grabpl upload-cdn --edition enterprise2
|
||||
depends_on:
|
||||
- package-enterprise2
|
||||
environment:
|
||||
@@ -2397,7 +2394,7 @@ steps:
|
||||
image: grafana/grafana-ci-deploy:1.3.3
|
||||
name: upload-cdn-assets-enterprise2
|
||||
- commands:
|
||||
- ./bin/grabpl upload-packages --edition enterprise2 --packages-bucket $${PRERELEASE_BUCKET}/artifacts/downloads-enterprise2
|
||||
- ./bin/grabpl upload-packages --edition enterprise2
|
||||
depends_on:
|
||||
- package-enterprise2
|
||||
environment:
|
||||
@@ -2444,7 +2441,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -2623,7 +2620,7 @@ services:
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -2747,7 +2744,7 @@ steps:
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- $$ProgressPreference = "SilentlyContinue"
|
||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/windows/grabpl.exe
|
||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/windows/grabpl.exe
|
||||
-OutFile grabpl.exe
|
||||
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
|
||||
- cd grafana-enterprise
|
||||
@@ -2822,7 +2819,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -2900,7 +2897,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -2961,7 +2958,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -3040,7 +3037,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -3102,7 +3099,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -3140,7 +3137,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -3178,7 +3175,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -3234,7 +3231,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -3282,7 +3279,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -3331,7 +3328,7 @@ steps:
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -3546,7 +3543,7 @@ steps:
|
||||
image: grafana/build-container:1.5.8
|
||||
name: build-storybook
|
||||
- commands:
|
||||
- ./bin/grabpl upload-cdn --edition oss --src-bucket "grafana-static-assets"
|
||||
- ./bin/grabpl upload-cdn --edition oss
|
||||
depends_on:
|
||||
- grafana-server
|
||||
environment:
|
||||
@@ -3560,7 +3557,7 @@ steps:
|
||||
repo:
|
||||
- grafana/grafana
|
||||
- commands:
|
||||
- ./bin/grabpl upload-packages --edition oss --packages-bucket grafana-downloads
|
||||
- ./bin/grabpl upload-packages --edition oss
|
||||
depends_on:
|
||||
- end-to-end-tests-dashboards-suite
|
||||
- end-to-end-tests-panels-suite
|
||||
@@ -3607,7 +3604,7 @@ steps:
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -3725,7 +3722,7 @@ services:
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -3796,7 +3793,7 @@ steps:
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- $$ProgressPreference = "SilentlyContinue"
|
||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/windows/grabpl.exe
|
||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/windows/grabpl.exe
|
||||
-OutFile grabpl.exe
|
||||
image: grafana/ci-wix:0.1.1
|
||||
name: windows-init
|
||||
@@ -3844,7 +3841,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -4099,7 +4096,7 @@ steps:
|
||||
image: grafana/build-container:1.5.8
|
||||
name: build-storybook
|
||||
- commands:
|
||||
- ./bin/grabpl upload-cdn --edition enterprise --src-bucket "grafana-static-assets"
|
||||
- ./bin/grabpl upload-cdn --edition enterprise
|
||||
depends_on:
|
||||
- package
|
||||
environment:
|
||||
@@ -4113,7 +4110,7 @@ steps:
|
||||
repo:
|
||||
- grafana/grafana
|
||||
- commands:
|
||||
- ./bin/grabpl upload-packages --edition enterprise --packages-bucket grafana-downloads
|
||||
- ./bin/grabpl upload-packages --edition enterprise
|
||||
depends_on:
|
||||
- package
|
||||
environment:
|
||||
@@ -4147,7 +4144,7 @@ steps:
|
||||
image: grafana/build-container:1.5.8
|
||||
name: package-enterprise2
|
||||
- commands:
|
||||
- ./bin/grabpl upload-cdn --edition enterprise2 --src-bucket "grafana-static-assets"
|
||||
- ./bin/grabpl upload-cdn --edition enterprise2
|
||||
depends_on:
|
||||
- package-enterprise2
|
||||
environment:
|
||||
@@ -4158,7 +4155,7 @@ steps:
|
||||
image: grafana/grafana-ci-deploy:1.3.3
|
||||
name: upload-cdn-assets-enterprise2
|
||||
- commands:
|
||||
- ./bin/grabpl upload-packages --edition enterprise2 --packages-bucket grafana-downloads-enterprise2
|
||||
- ./bin/grabpl upload-packages --edition enterprise2
|
||||
depends_on:
|
||||
- package-enterprise2
|
||||
environment:
|
||||
@@ -4199,7 +4196,7 @@ services: []
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -4369,7 +4366,7 @@ services:
|
||||
steps:
|
||||
- commands:
|
||||
- mkdir -p bin
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/grabpl
|
||||
- curl -fL -o bin/grabpl https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/grabpl
|
||||
- chmod +x bin/grabpl
|
||||
image: byrnedo/alpine-curl:0.1.8
|
||||
name: grabpl
|
||||
@@ -4484,7 +4481,7 @@ steps:
|
||||
name: identify-runner
|
||||
- commands:
|
||||
- $$ProgressPreference = "SilentlyContinue"
|
||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12/windows/grabpl.exe
|
||||
- Invoke-WebRequest https://grafana-downloads.storage.googleapis.com/grafana-build-pipeline/v2.9.50-go1.17.12-1/windows/grabpl.exe
|
||||
-OutFile grabpl.exe
|
||||
- git clone "https://$$env:GITHUB_TOKEN@github.com/grafana/grafana-enterprise.git"
|
||||
- cd grafana-enterprise
|
||||
@@ -4681,6 +4678,6 @@ kind: secret
|
||||
name: gcp_upload_artifacts_key
|
||||
---
|
||||
kind: signature
|
||||
hmac: 59b735b27c828713734eebda3af27333d57d6d8173e935d5e031f073b2039a6d
|
||||
hmac: a1add522ffacbc8ff504bf413cfa505ab98a939ad614eae31ac4eda24f44f028
|
||||
|
||||
...
|
||||
|
||||
@@ -4,12 +4,10 @@
|
||||
],
|
||||
"enabledManagers": ["npm"],
|
||||
"ignoreDeps": [
|
||||
"@grafana/slate-react", // should be updated when the `slate` package is updated
|
||||
"@types/systemjs",
|
||||
"@types/d3-force", // we should bump this once we move to esm modules
|
||||
"@types/d3-interpolate", // we should bump this once we move to esm modules
|
||||
"@types/d3-scale-chromatic", // we should bump this once we move to esm modules
|
||||
"@types/grafana__slate-react", // should be updated when the `slate` package is updated
|
||||
"@types/react-icons", // jaeger-ui-components is being refactored to use @grafana/ui icons instead
|
||||
"commander", // we are planning to remove this, so no need to update it
|
||||
"d3",
|
||||
@@ -24,8 +22,6 @@
|
||||
"react-hook-form", // due to us exposing these hooks via @grafana/ui form components bumping can break plugins
|
||||
"react-icons", // jaeger-ui-components is being refactored to use @grafana/ui icons instead
|
||||
"react-router-dom", // we should bump this together with history
|
||||
"slate",
|
||||
"slate-plain-serializer",
|
||||
"systemjs",
|
||||
"copy-webpack-plugin", // try to upgrade with newer yarn release. Not working with 3.1.1
|
||||
"ts-loader", // we should remove ts-loader and use babel-loader instead
|
||||
|
||||
@@ -117,6 +117,7 @@ debug.test
|
||||
|
||||
/scripts/build/release_publisher/release_publisher
|
||||
*.patch
|
||||
!.yarn/patches/*.patch
|
||||
|
||||
# Ignoring frontend packages specifics
|
||||
/packages/**/dist
|
||||
|
||||
File diff suppressed because one or more lines are too long
Vendored
-786
File diff suppressed because one or more lines are too long
+783
File diff suppressed because one or more lines are too long
+26
-29
@@ -3,40 +3,37 @@ enableTelemetry: false
|
||||
nodeLinker: pnp
|
||||
|
||||
packageExtensions:
|
||||
"@grafana/slate-react@0.22.10-grafana":
|
||||
peerDependencies:
|
||||
slate-react: ">=0.22.0"
|
||||
"@mdx-js/loader@1.6.22":
|
||||
'@mdx-js/loader@1.6.22':
|
||||
peerDependencies:
|
||||
react: 17.0.1
|
||||
"@storybook/addon-docs@6.4.21":
|
||||
'@storybook/addon-docs@6.4.21':
|
||||
peerDependencies:
|
||||
"@storybook/manager-webpack5": 6.4.21
|
||||
"@storybook/addon-essentials@6.4.21":
|
||||
'@storybook/manager-webpack5': 6.4.21
|
||||
'@storybook/addon-essentials@6.4.21':
|
||||
peerDependencies:
|
||||
"@storybook/components": 6.4.21
|
||||
"@storybook/core-events": 6.4.21
|
||||
"@storybook/manager-webpack5": 6.4.21
|
||||
"@storybook/theming": 6.4.21
|
||||
"@storybook/core-server@6.4.21":
|
||||
'@storybook/components': 6.4.21
|
||||
'@storybook/core-events': 6.4.21
|
||||
'@storybook/manager-webpack5': 6.4.21
|
||||
'@storybook/theming': 6.4.21
|
||||
'@storybook/core-server@6.4.21':
|
||||
peerDependencies:
|
||||
"@babel/core": ^7.0.0
|
||||
"@storybook/core@6.4.21":
|
||||
'@babel/core': ^7.0.0
|
||||
'@storybook/core@6.4.21':
|
||||
peerDependencies:
|
||||
"@babel/core": ^7.0.0
|
||||
"@storybook/manager-webpack5": 6.4.21
|
||||
"@storybook/csf-tools@6.4.21":
|
||||
'@babel/core': ^7.0.0
|
||||
'@storybook/manager-webpack5': 6.4.21
|
||||
'@storybook/csf-tools@6.4.21':
|
||||
peerDependencies:
|
||||
"@babel/core": ^7.0.0
|
||||
"@storybook/react@6.4.21":
|
||||
'@babel/core': ^7.0.0
|
||||
'@storybook/react@6.4.21':
|
||||
peerDependencies:
|
||||
"@storybook/manager-webpack5": 6.4.21
|
||||
'@storybook/manager-webpack5': 6.4.21
|
||||
doctrine@3.0.0:
|
||||
dependencies:
|
||||
assert: 2.0.0
|
||||
moveable@0.29.8:
|
||||
dependencies:
|
||||
"@daybrush/utils": 1.6.0
|
||||
'@daybrush/utils': 1.6.0
|
||||
framework-utils: ^1.1.0
|
||||
rc-time-picker@3.7.3:
|
||||
peerDependencies:
|
||||
@@ -51,9 +48,9 @@ packageExtensions:
|
||||
react-simple-compat: 1.2.1
|
||||
react-compat-moveable@0.17.8:
|
||||
dependencies:
|
||||
"@egjs/agent": ^2.2.1
|
||||
"@egjs/children-differ": ^1.0.1
|
||||
"@scena/matrix": 1.1.1
|
||||
'@egjs/agent': ^2.2.1
|
||||
'@egjs/children-differ': ^1.0.1
|
||||
'@scena/matrix': 1.1.1
|
||||
css-to-mat: ^1.0.3
|
||||
gesto: ^1.7.0
|
||||
overlap-area: ^1.0.0
|
||||
@@ -65,17 +62,17 @@ packageExtensions:
|
||||
webpack: 4.41.5
|
||||
react-icons@2.2.7:
|
||||
peerDependencies:
|
||||
prop-types: "*"
|
||||
prop-types: '*'
|
||||
react-resizable@3.0.4:
|
||||
peerDependencies:
|
||||
react-dom: 17.0.1
|
||||
|
||||
plugins:
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-typescript.cjs
|
||||
spec: "@yarnpkg/plugin-typescript"
|
||||
spec: '@yarnpkg/plugin-typescript'
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-interactive-tools.cjs
|
||||
spec: "@yarnpkg/plugin-interactive-tools"
|
||||
spec: '@yarnpkg/plugin-interactive-tools'
|
||||
- path: .yarn/plugins/@yarnpkg/plugin-outdated.cjs
|
||||
spec: "https://mskelton.dev/yarn-outdated/v2"
|
||||
spec: 'https://mskelton.dev/yarn-outdated/v2'
|
||||
|
||||
yarnPath: .yarn/releases/yarn-3.2.1.cjs
|
||||
yarnPath: .yarn/releases/yarn-3.2.2.cjs
|
||||
|
||||
+8
-7
@@ -129,7 +129,6 @@
|
||||
"@types/eslint": "8.4.2",
|
||||
"@types/file-saver": "2.0.5",
|
||||
"@types/google.analytics": "^0.0.42",
|
||||
"@types/grafana__slate-react": "npm:@types/slate-react@0.22.5",
|
||||
"@types/history": "4.7.11",
|
||||
"@types/hoist-non-react-statics": "3.3.1",
|
||||
"@types/jest": "27.4.1",
|
||||
@@ -162,8 +161,9 @@
|
||||
"@types/redux-mock-store": "1.0.3",
|
||||
"@types/reselect": "2.2.0",
|
||||
"@types/semver": "7.3.9",
|
||||
"@types/slate": "0.47.2",
|
||||
"@types/slate": "0.47.9",
|
||||
"@types/slate-plain-serializer": "0.7.2",
|
||||
"@types/slate-react": "0.22.9",
|
||||
"@types/testing-library__jest-dom": "5.14.3",
|
||||
"@types/testing-library__react-hooks": "^3.2.0",
|
||||
"@types/tinycolor2": "1.4.3",
|
||||
@@ -258,7 +258,6 @@
|
||||
"@grafana/lezer-logql": "^0.0.12",
|
||||
"@grafana/runtime": "workspace:*",
|
||||
"@grafana/schema": "workspace:*",
|
||||
"@grafana/slate-react": "0.22.10-grafana",
|
||||
"@grafana/ui": "workspace:*",
|
||||
"@jaegertracing/jaeger-ui-components": "workspace:*",
|
||||
"@kusto/monaco-kusto": "5.1.3",
|
||||
@@ -382,8 +381,9 @@
|
||||
"search-query-parser": "1.6.0",
|
||||
"selecto": "1.16.2",
|
||||
"semver": "7.3.7",
|
||||
"slate": "0.47.8",
|
||||
"slate-plain-serializer": "0.7.10",
|
||||
"slate": "0.47.9",
|
||||
"slate-plain-serializer": "0.7.11",
|
||||
"slate-react": "0.22.10",
|
||||
"symbol-observable": "4.0.0",
|
||||
"test": "link:./public/test",
|
||||
"tether-drop": "https://github.com/torkelo/drop",
|
||||
@@ -397,13 +397,14 @@
|
||||
},
|
||||
"resolutions": {
|
||||
"underscore": "1.13.3",
|
||||
"@types/slate": "0.47.2",
|
||||
"@types/slate": "0.47.9",
|
||||
"@microsoft/api-extractor-model": "7.17.3",
|
||||
"@rushstack/node-core-library": "3.45.5",
|
||||
"@rushstack/rig-package": "0.3.11",
|
||||
"@rushstack/ts-command-line": "4.11.0",
|
||||
"@storybook/react/webpack": "5.72.1",
|
||||
"node-fetch": "2.6.7"
|
||||
"node-fetch": "2.6.7",
|
||||
"slate-dev-environment@^0.2.2": "patch:slate-dev-environment@npm:0.2.5#.yarn/patches/slate-dev-environment-npm-0.2.5-9aeb7da7b5.patch"
|
||||
},
|
||||
"workspaces": {
|
||||
"packages": [
|
||||
|
||||
@@ -174,7 +174,7 @@ const getBaseWebpackConfig: WebpackConfigurationGetter = async (options) => {
|
||||
'@emotion/css',
|
||||
'prismjs',
|
||||
'slate-plain-serializer',
|
||||
'@grafana/slate-react',
|
||||
'slate-react',
|
||||
'react',
|
||||
'react-dom',
|
||||
'react-redux',
|
||||
|
||||
@@ -36,7 +36,6 @@
|
||||
"@grafana/data": "9.0.8",
|
||||
"@grafana/e2e-selectors": "9.0.8",
|
||||
"@grafana/schema": "9.0.8",
|
||||
"@grafana/slate-react": "0.22.10-grafana",
|
||||
"@monaco-editor/react": "4.3.1",
|
||||
"@popperjs/core": "2.11.5",
|
||||
"@react-aria/button": "3.4.4",
|
||||
@@ -86,8 +85,9 @@
|
||||
"react-use": "17.3.2",
|
||||
"react-window": "1.8.7",
|
||||
"rxjs": "7.5.5",
|
||||
"slate": "0.47.8",
|
||||
"slate-plain-serializer": "0.7.10",
|
||||
"slate": "0.47.9",
|
||||
"slate-plain-serializer": "0.7.11",
|
||||
"slate-react": "0.22.10",
|
||||
"tinycolor2": "1.4.2",
|
||||
"tslib": "2.4.0",
|
||||
"uplot": "1.6.22",
|
||||
@@ -125,7 +125,6 @@
|
||||
"@types/d3": "7.1.0",
|
||||
"@types/enzyme": "3.10.12",
|
||||
"@types/enzyme-adapter-react-16": "1.0.6",
|
||||
"@types/grafana__slate-react": "npm:@types/slate-react@0.22.5",
|
||||
"@types/hoist-non-react-statics": "3.3.1",
|
||||
"@types/is-hotkey": "0.1.7",
|
||||
"@types/jest": "27.4.1",
|
||||
@@ -144,8 +143,9 @@
|
||||
"@types/react-test-renderer": "17.0.1",
|
||||
"@types/react-transition-group": "4.4.4",
|
||||
"@types/react-window": "1.8.5",
|
||||
"@types/slate": "0.47.2",
|
||||
"@types/slate": "0.47.9",
|
||||
"@types/slate-plain-serializer": "0.7.2",
|
||||
"@types/slate-react": "0.22.9",
|
||||
"@types/testing-library__jest-dom": "5.14.3",
|
||||
"@types/testing-library__react-hooks": "^3.2.0",
|
||||
"@types/tinycolor2": "1.4.3",
|
||||
|
||||
@@ -5,9 +5,9 @@ import { Popper as ReactPopper } from 'react-popper';
|
||||
import usePrevious from 'react-use/lib/usePrevious';
|
||||
import { Value } from 'slate';
|
||||
import Plain from 'slate-plain-serializer';
|
||||
import { Editor } from 'slate-react';
|
||||
|
||||
import { DataLinkBuiltInVars, GrafanaTheme2, VariableOrigin, VariableSuggestion } from '@grafana/data';
|
||||
import { Editor } from '@grafana/slate-react';
|
||||
|
||||
import { makeValue } from '../../index';
|
||||
import { SlatePrism } from '../../slate-plugins';
|
||||
@@ -95,7 +95,7 @@ export const DataLinkInput: React.FC<DataLinkInputProps> = memo(
|
||||
// SelectionReference is used to position the variables suggestion relatively to current DOM selection
|
||||
const selectionRef = useMemo(() => new SelectionReference(), []);
|
||||
|
||||
const onKeyDown = React.useCallback((event: KeyboardEvent, next: () => any) => {
|
||||
const onKeyDown = React.useCallback((event: React.KeyboardEvent, next: () => any) => {
|
||||
if (!stateRef.current.showingSuggestions) {
|
||||
if (event.key === '=' || event.key === '$' || (event.keyCode === 32 && event.ctrlKey)) {
|
||||
return setShowingSuggestions(true);
|
||||
@@ -208,7 +208,7 @@ export const DataLinkInput: React.FC<DataLinkInputProps> = memo(
|
||||
placeholder={placeholder}
|
||||
value={stateRef.current.linkUrl}
|
||||
onChange={onUrlChange}
|
||||
onKeyDown={(event, _editor, next) => onKeyDown(event as KeyboardEvent, next)}
|
||||
onKeyDown={(event, _editor, next) => onKeyDown(event, next)}
|
||||
plugins={plugins}
|
||||
className={cx(
|
||||
styles.editor,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { shallow } from 'enzyme';
|
||||
import { mount, shallow } from 'enzyme';
|
||||
import React from 'react';
|
||||
import { Editor } from 'slate';
|
||||
import { Editor } from 'slate-react';
|
||||
|
||||
import { createTheme } from '@grafana/data';
|
||||
|
||||
@@ -30,7 +30,7 @@ describe('<QueryField />', () => {
|
||||
|
||||
it('should execute query on blur', () => {
|
||||
const onRun = jest.fn();
|
||||
const wrapper = shallow(
|
||||
const wrapper = mount(
|
||||
<UnThemedQueryField
|
||||
theme={createTheme()}
|
||||
query="my query"
|
||||
@@ -40,8 +40,9 @@ describe('<QueryField />', () => {
|
||||
/>
|
||||
);
|
||||
const field = wrapper.instance() as UnThemedQueryField;
|
||||
const ed = wrapper.find(Editor).instance() as Editor;
|
||||
expect(onRun.mock.calls.length).toBe(0);
|
||||
field.handleBlur(new Event('bogus'), new Editor({}), () => {});
|
||||
field.handleBlur(undefined, ed, () => {});
|
||||
expect(onRun.mock.calls.length).toBe(1);
|
||||
});
|
||||
|
||||
@@ -65,7 +66,7 @@ describe('<QueryField />', () => {
|
||||
it('should run custom on blur, but not necessarily execute query', () => {
|
||||
const onBlur = jest.fn();
|
||||
const onRun = jest.fn();
|
||||
const wrapper = shallow(
|
||||
const wrapper = mount(
|
||||
<UnThemedQueryField
|
||||
theme={createTheme()}
|
||||
query="my query"
|
||||
@@ -76,9 +77,10 @@ describe('<QueryField />', () => {
|
||||
/>
|
||||
);
|
||||
const field = wrapper.instance() as UnThemedQueryField;
|
||||
const ed = wrapper.find(Editor).instance() as Editor;
|
||||
expect(onBlur.mock.calls.length).toBe(0);
|
||||
expect(onRun.mock.calls.length).toBe(0);
|
||||
field.handleBlur(new Event('bogus'), new Editor({}), () => {});
|
||||
field.handleBlur(undefined, ed, () => {});
|
||||
expect(onBlur.mock.calls.length).toBe(1);
|
||||
expect(onRun.mock.calls.length).toBe(0);
|
||||
});
|
||||
|
||||
@@ -2,12 +2,12 @@ import { css, cx } from '@emotion/css';
|
||||
import classnames from 'classnames';
|
||||
import { debounce } from 'lodash';
|
||||
import React, { Context } from 'react';
|
||||
import { Value, Editor as CoreEditor } from 'slate';
|
||||
import { Value } from 'slate';
|
||||
import Plain from 'slate-plain-serializer';
|
||||
import { Editor, Plugin } from 'slate-react';
|
||||
|
||||
import { GrafanaTheme2 } from '@grafana/data';
|
||||
import { selectors } from '@grafana/e2e-selectors';
|
||||
import { Editor, Plugin } from '@grafana/slate-react';
|
||||
|
||||
import {
|
||||
makeValue,
|
||||
@@ -42,7 +42,7 @@ export interface QueryFieldProps extends Themeable2 {
|
||||
onBlur?: () => void;
|
||||
onChange?: (value: string) => void;
|
||||
onRichValueChange?: (value: Value) => void;
|
||||
onClick?: (event: Event, editor: CoreEditor, next: () => any) => any;
|
||||
onClick?: (event: Event | React.MouseEvent, editor: Editor, next: () => any) => any;
|
||||
onTypeahead?: (typeahead: TypeaheadInput) => Promise<TypeaheadOutput>;
|
||||
onWillApplySuggestion?: (suggestion: string, state: SuggestionsState) => string;
|
||||
placeholder?: string;
|
||||
@@ -67,7 +67,7 @@ export interface QueryFieldState {
|
||||
* Implement props.onTypeahead to use suggestions, see PromQueryField.tsx as an example.
|
||||
*/
|
||||
export class UnThemedQueryField extends React.PureComponent<QueryFieldProps, QueryFieldState> {
|
||||
plugins: Plugin[];
|
||||
plugins: Array<Plugin<Editor>>;
|
||||
runOnChangeDebounced: Function;
|
||||
lastExecutedValue: Value | null = null;
|
||||
mounted = false;
|
||||
@@ -185,7 +185,7 @@ export class UnThemedQueryField extends React.PureComponent<QueryFieldProps, Que
|
||||
/**
|
||||
* We need to handle blur events here mainly because of dashboard panels which expect to have query executed on blur.
|
||||
*/
|
||||
handleBlur = (event: Event, editor: CoreEditor, next: Function) => {
|
||||
handleBlur = (_: React.FocusEvent | undefined, editor: Editor, next: Function) => {
|
||||
const { onBlur } = this.props;
|
||||
|
||||
if (onBlur) {
|
||||
|
||||
@@ -132,6 +132,8 @@ export const Table: FC<Props> = memo((props: Props) => {
|
||||
} = props;
|
||||
|
||||
const listRef = useRef<FixedSizeList>(null);
|
||||
const tableDivRef = useRef<HTMLDivElement>(null);
|
||||
const fixedSizeListScrollbarRef = useRef<HTMLDivElement>(null);
|
||||
const tableStyles = useStyles2(getTableStyles);
|
||||
const headerHeight = noHeader ? 0 : tableStyles.cellHeight;
|
||||
|
||||
@@ -221,6 +223,29 @@ export const Table: FC<Props> = memo((props: Props) => {
|
||||
setPageSize(pageSize);
|
||||
}, [pageSize, setPageSize]);
|
||||
|
||||
useEffect(() => {
|
||||
// To have the custom vertical scrollbar always visible (https://github.com/grafana/grafana/issues/52136),
|
||||
// we need to bring the element from the FixedSizeList scope to the outer Table container scope,
|
||||
// because the FixedSizeList scope has overflow. By moving scrollbar to container scope we will have
|
||||
// it always visible since the entire width is in view.
|
||||
|
||||
// Select the scrollbar element from the FixedSizeList scope
|
||||
const listVerticalScrollbarHTML = (fixedSizeListScrollbarRef.current as HTMLDivElement)?.querySelector(
|
||||
'.track-vertical'
|
||||
);
|
||||
|
||||
// Select Table custom scrollbars
|
||||
const tableScrollbarView = (tableDivRef.current as HTMLDivElement)?.firstChild;
|
||||
|
||||
//If they exists, move the scrollbar element to the Table container scope
|
||||
if (tableScrollbarView && listVerticalScrollbarHTML) {
|
||||
listVerticalScrollbarHTML?.remove();
|
||||
(tableScrollbarView as HTMLDivElement).querySelector(':scope > .track-vertical')?.remove();
|
||||
|
||||
(tableScrollbarView as HTMLDivElement).append(listVerticalScrollbarHTML as Node);
|
||||
}
|
||||
});
|
||||
|
||||
const RenderRow = React.useCallback(
|
||||
({ index: rowIndex, style }) => {
|
||||
let row = rows[rowIndex];
|
||||
@@ -291,21 +316,25 @@ export const Table: FC<Props> = memo((props: Props) => {
|
||||
};
|
||||
|
||||
return (
|
||||
<div {...getTableProps()} className={tableStyles.table} aria-label={ariaLabel} role="table">
|
||||
<CustomScrollbar onScroll={handleScroll}>
|
||||
<div {...getTableProps()} className={tableStyles.table} aria-label={ariaLabel} role="table" ref={tableDivRef}>
|
||||
<CustomScrollbar hideVerticalTrack={true}>
|
||||
<div className={tableStyles.tableContentWrapper(totalColumnsWidth)}>
|
||||
{!noHeader && <HeaderRow headerGroups={headerGroups} showTypeIcons={showTypeIcons} />}
|
||||
{itemCount > 0 ? (
|
||||
<FixedSizeList
|
||||
height={listHeight}
|
||||
itemCount={itemCount}
|
||||
itemSize={tableStyles.rowHeight}
|
||||
width={'100%'}
|
||||
ref={listRef}
|
||||
style={{ overflow: undefined }}
|
||||
>
|
||||
{RenderRow}
|
||||
</FixedSizeList>
|
||||
<div ref={fixedSizeListScrollbarRef}>
|
||||
<CustomScrollbar onScroll={handleScroll} hideHorizontalTrack={true}>
|
||||
<FixedSizeList
|
||||
height={listHeight}
|
||||
itemCount={itemCount}
|
||||
itemSize={tableStyles.rowHeight}
|
||||
width={'100%'}
|
||||
ref={listRef}
|
||||
style={{ overflow: undefined }}
|
||||
>
|
||||
{RenderRow}
|
||||
</FixedSizeList>
|
||||
</CustomScrollbar>
|
||||
</div>
|
||||
) : (
|
||||
<div style={{ height: height - headerHeight }} className={tableStyles.noData}>
|
||||
No data
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { shallow } from 'enzyme';
|
||||
import React from 'react';
|
||||
import Plain from 'slate-plain-serializer';
|
||||
|
||||
import { Editor } from '@grafana/slate-react';
|
||||
import { Editor } from 'slate-react';
|
||||
|
||||
import { BracesPlugin } from './braces';
|
||||
|
||||
@@ -20,7 +19,7 @@ describe('braces', () => {
|
||||
const value = Plain.deserialize('');
|
||||
const editor = shallow<Editor>(<Editor value={value} />);
|
||||
const event = new window.KeyboardEvent('keydown', { key: '(' });
|
||||
expect(handler(event as Event, editor.instance() as any, nextMock)).toBeTruthy();
|
||||
expect(handler(event as any, editor.instance(), nextMock)).toBeTruthy();
|
||||
expect(Plain.serialize(editor.instance().value)).toEqual('()');
|
||||
});
|
||||
|
||||
@@ -28,7 +27,8 @@ describe('braces', () => {
|
||||
const value = Plain.deserialize('time()');
|
||||
const editor = shallow<Editor>(<Editor value={value} />);
|
||||
const event = new window.KeyboardEvent('keydown', { key: 'Backspace' });
|
||||
handler(event as Event, editor.instance().moveForward(5) as any, nextMock);
|
||||
editor.instance().moveForward(5);
|
||||
handler(event as any, editor.instance(), nextMock);
|
||||
expect(Plain.serialize(editor.instance().value)).toEqual('time');
|
||||
});
|
||||
|
||||
@@ -36,7 +36,8 @@ describe('braces', () => {
|
||||
const value = Plain.deserialize('time(value)');
|
||||
const editor = shallow<Editor>(<Editor value={value} />);
|
||||
const event = new window.KeyboardEvent('keydown', { key: 'Backspace' });
|
||||
const handled = handler(event as Event, editor.instance().moveForward(5) as any, nextMock);
|
||||
editor.instance().moveForward(5);
|
||||
const handled = handler(event as any, editor.instance(), nextMock);
|
||||
expect(handled).toBeFalsy();
|
||||
});
|
||||
|
||||
@@ -44,9 +45,9 @@ describe('braces', () => {
|
||||
const value = Plain.deserialize('');
|
||||
const editor = shallow<Editor>(<Editor value={value} />);
|
||||
const opening = new window.KeyboardEvent('keydown', { key: '(' });
|
||||
expect(handler(opening as Event, editor.instance() as any, nextMock)).toBeTruthy();
|
||||
expect(handler(opening as any, editor.instance(), nextMock)).toBeTruthy();
|
||||
const closing = new window.KeyboardEvent('keydown', { key: ')' });
|
||||
expect(handler(closing as Event, editor.instance() as any, nextMock)).toBeTruthy();
|
||||
expect(handler(closing as any, editor.instance(), nextMock)).toBeTruthy();
|
||||
expect(Plain.serialize(editor.instance().value)).toEqual('()');
|
||||
});
|
||||
|
||||
@@ -54,9 +55,10 @@ describe('braces', () => {
|
||||
const value = Plain.deserialize('');
|
||||
const editor = shallow<Editor>(<Editor value={value} />);
|
||||
const event1 = new window.KeyboardEvent('keydown', { key: ')' });
|
||||
expect(handler(event1 as Event, editor.instance() as any, nextMock)).toBeFalsy();
|
||||
expect(handler(event1 as any, editor.instance(), nextMock)).toBeFalsy();
|
||||
const event2 = new window.KeyboardEvent('keydown', { key: ')' });
|
||||
expect(handler(event2 as Event, editor.instance().moveBackward(1) as any, nextMock)).toBeFalsy();
|
||||
editor.instance().moveBackward(1);
|
||||
expect(handler(event2 as any, editor.instance(), nextMock)).toBeFalsy();
|
||||
expect(Plain.serialize(editor.instance().value)).toEqual('))');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { Editor as CoreEditor, Annotation } from 'slate';
|
||||
import { Annotation } from 'slate';
|
||||
import { Plugin } from 'slate-react';
|
||||
import { v4 as uuidv4 } from 'uuid';
|
||||
|
||||
import { Plugin } from '@grafana/slate-react';
|
||||
|
||||
const BRACES: any = {
|
||||
'[': ']',
|
||||
'{': '}',
|
||||
@@ -13,11 +12,10 @@ const MATCH_MARK = 'brace_match';
|
||||
|
||||
export function BracesPlugin(): Plugin {
|
||||
return {
|
||||
onKeyDown(event: Event, editor: CoreEditor, next: Function) {
|
||||
const keyEvent = event as KeyboardEvent;
|
||||
onKeyDown(event, editor, next) {
|
||||
const { value } = editor;
|
||||
|
||||
switch (keyEvent.key) {
|
||||
switch (event.key) {
|
||||
case '(':
|
||||
case '{':
|
||||
case '[': {
|
||||
@@ -30,10 +28,10 @@ export function BracesPlugin(): Plugin {
|
||||
|
||||
// If text is selected, wrap selected text in parens
|
||||
if (value.selection.isExpanded) {
|
||||
keyEvent.preventDefault();
|
||||
event.preventDefault();
|
||||
editor
|
||||
.insertTextByKey(startKey, startOffset, keyEvent.key)
|
||||
.insertTextByKey(endKey, endOffset + 1, BRACES[keyEvent.key])
|
||||
.insertTextByKey(startKey, startOffset, event.key)
|
||||
.insertTextByKey(endKey, endOffset + 1, BRACES[event.key])
|
||||
.moveEndBackward(1);
|
||||
return true;
|
||||
} else if (
|
||||
@@ -42,8 +40,8 @@ export function BracesPlugin(): Plugin {
|
||||
text[focusOffset] === ' ' ||
|
||||
Object.values(BRACES).includes(text[focusOffset])
|
||||
) {
|
||||
keyEvent.preventDefault();
|
||||
const complement = BRACES[keyEvent.key];
|
||||
event.preventDefault();
|
||||
const complement = BRACES[event.key];
|
||||
const matchAnnotation = {
|
||||
key: `${MATCH_MARK}-${uuidv4()}`,
|
||||
type: `${MATCH_MARK}-${complement}`,
|
||||
@@ -59,7 +57,7 @@ export function BracesPlugin(): Plugin {
|
||||
},
|
||||
object: 'annotation',
|
||||
} as Annotation;
|
||||
editor.insertText(keyEvent.key).insertText(complement).addAnnotation(matchAnnotation).moveBackward(1);
|
||||
editor.insertText(event.key).insertText(complement).addAnnotation(matchAnnotation).moveBackward(1);
|
||||
|
||||
return true;
|
||||
}
|
||||
@@ -73,13 +71,13 @@ export function BracesPlugin(): Plugin {
|
||||
const offset = value.selection.anchor.offset;
|
||||
const nextChar = text[offset];
|
||||
// Handle closing brace when it's already the next character
|
||||
const complement = keyEvent.key;
|
||||
const complement = event.key;
|
||||
const annotationType = `${MATCH_MARK}-${complement}`;
|
||||
const annotation = value.annotations.find(
|
||||
(a) => a?.type === annotationType && a.anchor.key === value.anchorText.key
|
||||
);
|
||||
if (annotation && nextChar === complement && !value.selection.isExpanded) {
|
||||
keyEvent.preventDefault();
|
||||
event.preventDefault();
|
||||
editor.moveFocusForward(1).removeAnnotation(annotation).moveAnchorForward(1);
|
||||
return true;
|
||||
}
|
||||
@@ -92,7 +90,7 @@ export function BracesPlugin(): Plugin {
|
||||
const previousChar = text[offset - 1];
|
||||
const nextChar = text[offset];
|
||||
if (BRACES[previousChar] && BRACES[previousChar] === nextChar) {
|
||||
keyEvent.preventDefault();
|
||||
event.preventDefault();
|
||||
// Remove closing brace if directly following
|
||||
editor.deleteBackward(1).deleteForward(1).focus();
|
||||
return true;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { shallow } from 'enzyme';
|
||||
import React from 'react';
|
||||
import Plain from 'slate-plain-serializer';
|
||||
|
||||
import { Editor } from '@grafana/slate-react';
|
||||
import { Editor } from 'slate-react';
|
||||
|
||||
import { ClearPlugin } from './clear';
|
||||
|
||||
@@ -16,7 +15,7 @@ describe('clear', () => {
|
||||
key: 'k',
|
||||
ctrlKey: true,
|
||||
});
|
||||
handler(event as Event, editor.instance() as any, () => {});
|
||||
handler(event as any, editor.instance(), () => {});
|
||||
expect(Plain.serialize(editor.instance().value)).toEqual('');
|
||||
});
|
||||
|
||||
@@ -27,7 +26,7 @@ describe('clear', () => {
|
||||
key: 'k',
|
||||
ctrlKey: true,
|
||||
});
|
||||
handler(event as Event, editor.instance() as any, () => {});
|
||||
handler(event as any, editor.instance(), () => {});
|
||||
expect(Plain.serialize(editor.instance().value)).toEqual('');
|
||||
});
|
||||
|
||||
@@ -38,7 +37,8 @@ describe('clear', () => {
|
||||
key: 'k',
|
||||
ctrlKey: true,
|
||||
});
|
||||
handler(event as Event, editor.instance().moveForward(4) as any, () => {});
|
||||
editor.instance().moveForward(4);
|
||||
handler(event as any, editor.instance(), () => {});
|
||||
expect(Plain.serialize(editor.instance().value)).toEqual('foo ');
|
||||
});
|
||||
});
|
||||
|
||||
@@ -1,20 +1,17 @@
|
||||
import { Editor as CoreEditor } from 'slate';
|
||||
|
||||
import { Plugin } from '@grafana/slate-react';
|
||||
import { Plugin } from 'slate-react';
|
||||
|
||||
// Clears the rest of the line after the caret
|
||||
export function ClearPlugin(): Plugin {
|
||||
return {
|
||||
onKeyDown(event: Event, editor: CoreEditor, next: Function) {
|
||||
const keyEvent = event as KeyboardEvent;
|
||||
onKeyDown(event, editor, next) {
|
||||
const value = editor.value;
|
||||
|
||||
if (value.selection.isExpanded) {
|
||||
return next();
|
||||
}
|
||||
|
||||
if (keyEvent.key === 'k' && keyEvent.ctrlKey) {
|
||||
keyEvent.preventDefault();
|
||||
if (event.key === 'k' && event.ctrlKey) {
|
||||
event.preventDefault();
|
||||
const text = value.anchorText.text;
|
||||
const offset = value.selection.anchor.offset;
|
||||
const length = text.length;
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import { Editor as CoreEditor } from 'slate';
|
||||
|
||||
import { Plugin } from '@grafana/slate-react';
|
||||
import { Plugin } from 'slate-react';
|
||||
|
||||
const getCopiedText = (textBlocks: string[], startOffset: number, endOffset: number) => {
|
||||
if (!textBlocks.length) {
|
||||
@@ -18,9 +16,8 @@ const removeBom = (str: string | undefined): string | undefined => {
|
||||
|
||||
export function ClipboardPlugin(): Plugin {
|
||||
const clipboardPlugin: Plugin = {
|
||||
onCopy(event: Event, editor: CoreEditor, next: () => any) {
|
||||
const clipEvent = event as ClipboardEvent;
|
||||
clipEvent.preventDefault();
|
||||
onCopy(event, editor, next) {
|
||||
event.preventDefault();
|
||||
|
||||
const { document, selection } = editor.value;
|
||||
const {
|
||||
@@ -33,18 +30,17 @@ export function ClipboardPlugin(): Plugin {
|
||||
.map((block) => block.text);
|
||||
|
||||
const copiedText = removeBom(getCopiedText(selectedBlocks, startOffset, endOffset));
|
||||
if (copiedText && clipEvent.clipboardData) {
|
||||
clipEvent.clipboardData.setData('Text', copiedText);
|
||||
if (copiedText && event.clipboardData) {
|
||||
event.clipboardData.setData('Text', copiedText);
|
||||
}
|
||||
|
||||
return true;
|
||||
},
|
||||
|
||||
onPaste(event: Event, editor: CoreEditor, next: () => any) {
|
||||
const clipEvent = event as ClipboardEvent;
|
||||
clipEvent.preventDefault();
|
||||
if (clipEvent.clipboardData) {
|
||||
const pastedValue = removeBom(clipEvent.clipboardData.getData('Text'));
|
||||
onPaste(event, editor, next) {
|
||||
event.preventDefault();
|
||||
if (event.clipboardData) {
|
||||
const pastedValue = removeBom(event.clipboardData.getData('Text'));
|
||||
const lines = pastedValue?.split('\n');
|
||||
|
||||
if (lines && lines.length) {
|
||||
@@ -61,9 +57,8 @@ export function ClipboardPlugin(): Plugin {
|
||||
|
||||
return {
|
||||
...clipboardPlugin,
|
||||
onCut(event: Event, editor: CoreEditor, next: () => any) {
|
||||
const clipEvent = event as ClipboardEvent;
|
||||
clipboardPlugin.onCopy!(clipEvent, editor, next);
|
||||
onCut(event, editor, next) {
|
||||
clipboardPlugin.onCopy!(event, editor, next);
|
||||
editor.deleteAtRange(editor.value.selection);
|
||||
|
||||
return true;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { isKeyHotkey } from 'is-hotkey';
|
||||
import { RangeJSON, Range as SlateRange, Editor as CoreEditor } from 'slate';
|
||||
|
||||
import { Plugin } from '@grafana/slate-react';
|
||||
import React from 'react';
|
||||
import { RangeJSON, Range as SlateRange } from 'slate';
|
||||
import { Editor, Plugin } from 'slate-react';
|
||||
|
||||
const isIndentLeftHotkey = isKeyHotkey('mod+[');
|
||||
const isShiftTabHotkey = isKeyHotkey('shift+tab');
|
||||
@@ -9,7 +9,7 @@ const isIndentRightHotkey = isKeyHotkey('mod+]');
|
||||
|
||||
const SLATE_TAB = ' ';
|
||||
|
||||
const handleTabKey = (event: KeyboardEvent, editor: CoreEditor, next: Function): void => {
|
||||
const handleTabKey = (event: React.KeyboardEvent<Element>, editor: Editor, next: Function): void => {
|
||||
const {
|
||||
startBlock,
|
||||
endBlock,
|
||||
@@ -31,7 +31,7 @@ const handleTabKey = (event: KeyboardEvent, editor: CoreEditor, next: Function):
|
||||
}
|
||||
};
|
||||
|
||||
const handleIndent = (editor: CoreEditor, indentDirection: 'left' | 'right') => {
|
||||
const handleIndent = (editor: Editor, indentDirection: 'left' | 'right') => {
|
||||
const curSelection = editor.value.selection;
|
||||
const selectedBlocks = editor.value.document.getLeafBlocksAtRange(curSelection).toArray();
|
||||
|
||||
@@ -74,17 +74,16 @@ const handleIndent = (editor: CoreEditor, indentDirection: 'left' | 'right') =>
|
||||
// Clears the rest of the line after the caret
|
||||
export function IndentationPlugin(): Plugin {
|
||||
return {
|
||||
onKeyDown(event: Event, editor: CoreEditor, next: Function) {
|
||||
const keyEvent = event as KeyboardEvent;
|
||||
if (isIndentLeftHotkey(keyEvent) || isShiftTabHotkey(keyEvent)) {
|
||||
keyEvent.preventDefault();
|
||||
onKeyDown(event, editor, next) {
|
||||
if (isIndentLeftHotkey(event) || isShiftTabHotkey(event)) {
|
||||
event.preventDefault();
|
||||
handleIndent(editor, 'left');
|
||||
} else if (isIndentRightHotkey(keyEvent)) {
|
||||
keyEvent.preventDefault();
|
||||
} else if (isIndentRightHotkey(event)) {
|
||||
event.preventDefault();
|
||||
handleIndent(editor, 'right');
|
||||
} else if (keyEvent.key === 'Tab') {
|
||||
keyEvent.preventDefault();
|
||||
handleTabKey(keyEvent, editor, next);
|
||||
} else if (event.key === 'Tab') {
|
||||
event.preventDefault();
|
||||
handleTabKey(event, editor, next);
|
||||
} else {
|
||||
return next();
|
||||
}
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import { Editor as CoreEditor } from 'slate';
|
||||
|
||||
import { Plugin } from '@grafana/slate-react';
|
||||
import { Plugin } from 'slate-react';
|
||||
|
||||
function getIndent(text: string) {
|
||||
let offset = text.length - text.trimLeft().length;
|
||||
@@ -16,16 +14,15 @@ function getIndent(text: string) {
|
||||
|
||||
export function NewlinePlugin(): Plugin {
|
||||
return {
|
||||
onKeyDown(event: Event, editor: CoreEditor, next: Function) {
|
||||
const keyEvent = event as KeyboardEvent;
|
||||
onKeyDown(event, editor, next) {
|
||||
const value = editor.value;
|
||||
|
||||
if (value.selection.isExpanded) {
|
||||
return next();
|
||||
}
|
||||
|
||||
if (keyEvent.key === 'Enter') {
|
||||
keyEvent.preventDefault();
|
||||
if (event.key === 'Enter') {
|
||||
event.preventDefault();
|
||||
|
||||
const { startBlock } = value;
|
||||
const currentLineText = startBlock.text;
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { shallow } from 'enzyme';
|
||||
import React from 'react';
|
||||
import Plain from 'slate-plain-serializer';
|
||||
|
||||
import { Editor } from '@grafana/slate-react';
|
||||
import { Editor } from 'slate-react';
|
||||
|
||||
import { RunnerPlugin } from './runner';
|
||||
|
||||
@@ -12,10 +11,13 @@ describe('runner', () => {
|
||||
|
||||
it('should execute query when enter with shift is pressed', () => {
|
||||
const value = Plain.deserialize('');
|
||||
const editor = shallow<Editor>(<Editor value={value} />);
|
||||
const editor = shallow(<Editor value={value} />);
|
||||
handler(
|
||||
{ key: 'Enter', shiftKey: true, preventDefault: () => {} } as KeyboardEvent,
|
||||
editor.instance() as any,
|
||||
new window.KeyboardEvent('keydown', {
|
||||
key: 'Enter',
|
||||
shiftKey: true,
|
||||
}) as any,
|
||||
editor.instance() as Editor,
|
||||
() => {}
|
||||
);
|
||||
expect(mockHandler).toBeCalled();
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
import { Editor as CoreEditor } from 'slate';
|
||||
import React from 'react';
|
||||
import { Plugin } from 'slate-react';
|
||||
|
||||
import { Plugin } from '@grafana/slate-react';
|
||||
|
||||
export function RunnerPlugin({ handler }: any): Plugin {
|
||||
export function RunnerPlugin({ handler }: { handler?: (e: React.KeyboardEvent) => void }): Plugin {
|
||||
return {
|
||||
onKeyDown(event: Event, editor: CoreEditor, next: Function) {
|
||||
const keyEvent = event as KeyboardEvent;
|
||||
|
||||
onKeyDown(event, editor, next) {
|
||||
// Handle enter
|
||||
if (handler && keyEvent.key === 'Enter' && (keyEvent.shiftKey || keyEvent.ctrlKey)) {
|
||||
if (handler && event.key === 'Enter' && (event.shiftKey || event.ctrlKey)) {
|
||||
// Submit on Enter
|
||||
keyEvent.preventDefault();
|
||||
handler(keyEvent);
|
||||
event.preventDefault();
|
||||
handler(event);
|
||||
return editor;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,17 +1,14 @@
|
||||
import { isKeyHotkey } from 'is-hotkey';
|
||||
import { Editor as CoreEditor } from 'slate';
|
||||
|
||||
import { Plugin } from '@grafana/slate-react';
|
||||
import { Plugin } from 'slate-react';
|
||||
|
||||
const isSelectLineHotkey = isKeyHotkey('mod+l');
|
||||
|
||||
// Clears the rest of the line after the caret
|
||||
export function SelectionShortcutsPlugin(): Plugin {
|
||||
return {
|
||||
onKeyDown(event: Event, editor: CoreEditor, next: () => any) {
|
||||
const keyEvent = event as KeyboardEvent;
|
||||
if (isSelectLineHotkey(keyEvent)) {
|
||||
keyEvent.preventDefault();
|
||||
onKeyDown(event, editor, next) {
|
||||
if (isSelectLineHotkey(event)) {
|
||||
event.preventDefault();
|
||||
const { focusBlock, document } = editor.value;
|
||||
|
||||
editor.moveAnchorToStartOfBlock();
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import Prism, { LanguageMap } from 'prismjs';
|
||||
import { Block, Text, Decoration } from 'slate';
|
||||
|
||||
import { Plugin } from '@grafana/slate-react';
|
||||
import { Plugin } from 'slate-react';
|
||||
|
||||
import TOKEN_MARK from './TOKEN_MARK';
|
||||
import Options, { OptionsFormat } from './options';
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
import { Record } from 'immutable';
|
||||
import React from 'react';
|
||||
import { Mark, Node, Decoration } from 'slate';
|
||||
|
||||
import { Editor } from '@grafana/slate-react';
|
||||
import { Editor } from 'slate-react';
|
||||
|
||||
import TOKEN_MARK from './TOKEN_MARK';
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import { render } from 'enzyme';
|
||||
import _ from 'lodash'; // eslint-disable-line lodash/import-scope
|
||||
|
||||
import { Plugin as SlatePlugin } from '@grafana/slate-react';
|
||||
import { Plugin as SlatePlugin } from 'slate-react';
|
||||
|
||||
import { CompletionItemGroup, SuggestionsState } from '../types';
|
||||
import { SearchFunctionType } from '../utils';
|
||||
|
||||
@@ -1,8 +1,6 @@
|
||||
import { debounce, sortBy } from 'lodash';
|
||||
import React from 'react';
|
||||
import { Editor as CoreEditor } from 'slate';
|
||||
|
||||
import { Plugin as SlatePlugin } from '@grafana/slate-react';
|
||||
import { Editor, Plugin as SlatePlugin } from 'slate-react';
|
||||
|
||||
import { Typeahead } from '../components/Typeahead/Typeahead';
|
||||
import { CompletionItem, SuggestionsState, TypeaheadInput, TypeaheadOutput } from '../types';
|
||||
@@ -15,8 +13,8 @@ export const TYPEAHEAD_DEBOUNCE = 250;
|
||||
|
||||
// Commands added to the editor by this plugin.
|
||||
interface SuggestionsPluginCommands {
|
||||
selectSuggestion: (suggestion: CompletionItem) => CoreEditor;
|
||||
applyTypeahead: (suggestion: CompletionItem) => CoreEditor;
|
||||
selectSuggestion: (suggestion: CompletionItem) => Editor;
|
||||
applyTypeahead: (suggestion: CompletionItem) => Editor;
|
||||
}
|
||||
|
||||
export function SuggestionsPlugin({
|
||||
@@ -65,16 +63,15 @@ export function SuggestionsPlugin({
|
||||
return next();
|
||||
},
|
||||
|
||||
onKeyDown: (event: Event, editor, next) => {
|
||||
const keyEvent = event as KeyboardEvent;
|
||||
onKeyDown: (event, editor, next) => {
|
||||
const currentSuggestions = state.groupedItems;
|
||||
|
||||
const hasSuggestions = currentSuggestions.length;
|
||||
|
||||
switch (keyEvent.key) {
|
||||
switch (event.key) {
|
||||
case 'Escape': {
|
||||
if (hasSuggestions) {
|
||||
keyEvent.preventDefault();
|
||||
event.preventDefault();
|
||||
|
||||
state = {
|
||||
...state,
|
||||
@@ -91,16 +88,16 @@ export function SuggestionsPlugin({
|
||||
case 'ArrowDown':
|
||||
case 'ArrowUp':
|
||||
if (hasSuggestions) {
|
||||
keyEvent.preventDefault();
|
||||
typeaheadRef.moveMenuIndex(keyEvent.key === 'ArrowDown' ? 1 : -1);
|
||||
event.preventDefault();
|
||||
typeaheadRef.moveMenuIndex(event.key === 'ArrowDown' ? 1 : -1);
|
||||
return;
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case 'Enter': {
|
||||
if (!(keyEvent.shiftKey || keyEvent.ctrlKey) && hasSuggestions) {
|
||||
keyEvent.preventDefault();
|
||||
if (!(event.shiftKey || event.ctrlKey) && hasSuggestions) {
|
||||
event.preventDefault();
|
||||
return typeaheadRef.insertSuggestion();
|
||||
}
|
||||
|
||||
@@ -109,7 +106,7 @@ export function SuggestionsPlugin({
|
||||
|
||||
case 'Tab': {
|
||||
if (hasSuggestions) {
|
||||
keyEvent.preventDefault();
|
||||
event.preventDefault();
|
||||
return typeaheadRef.insertSuggestion();
|
||||
}
|
||||
|
||||
@@ -118,7 +115,7 @@ export function SuggestionsPlugin({
|
||||
|
||||
default: {
|
||||
// Don't react on meta keys
|
||||
if (keyEvent.key.length === 1) {
|
||||
if (event.key.length === 1) {
|
||||
handleTypeaheadDebounced(editor, setState, onTypeahead, cleanText);
|
||||
}
|
||||
break;
|
||||
@@ -129,7 +126,7 @@ export function SuggestionsPlugin({
|
||||
},
|
||||
|
||||
commands: {
|
||||
selectSuggestion: (editor: CoreEditor, suggestion: CompletionItem): CoreEditor => {
|
||||
selectSuggestion: (editor, suggestion: CompletionItem): Editor => {
|
||||
const suggestions = state.groupedItems;
|
||||
if (!suggestions || !suggestions.length) {
|
||||
return editor;
|
||||
@@ -141,7 +138,7 @@ export function SuggestionsPlugin({
|
||||
return ed;
|
||||
},
|
||||
|
||||
applyTypeahead: (editor: CoreEditor, suggestion: CompletionItem): CoreEditor => {
|
||||
applyTypeahead: (editor, suggestion: CompletionItem) => {
|
||||
let suggestionText = suggestion.insertText || suggestion.label;
|
||||
|
||||
const preserveSuffix = suggestion.kind === 'function';
|
||||
@@ -169,7 +166,8 @@ export function SuggestionsPlugin({
|
||||
// If new-lines, apply suggestion as block
|
||||
if (suggestionText.match(/\n/)) {
|
||||
const fragment = makeFragment(suggestionText);
|
||||
return editor.deleteBackward(backward).deleteForward(forward).insertFragment(fragment).focus();
|
||||
editor.deleteBackward(backward).deleteForward(forward).insertFragment(fragment).focus();
|
||||
return editor;
|
||||
}
|
||||
|
||||
state = {
|
||||
@@ -177,13 +175,15 @@ export function SuggestionsPlugin({
|
||||
groupedItems: [],
|
||||
};
|
||||
|
||||
return editor
|
||||
editor
|
||||
.snapshotSelection()
|
||||
.deleteBackward(backward)
|
||||
.deleteForward(forward)
|
||||
.insertText(suggestionText)
|
||||
.moveForward(move)
|
||||
.focus();
|
||||
|
||||
return editor;
|
||||
},
|
||||
},
|
||||
|
||||
@@ -203,7 +203,7 @@ export function SuggestionsPlugin({
|
||||
prefix={state.typeaheadPrefix}
|
||||
isOpen={!!state.groupedItems.length}
|
||||
groupedItems={state.groupedItems}
|
||||
onSelectSuggestion={(editor as CoreEditor & SuggestionsPluginCommands).selectSuggestion}
|
||||
onSelectSuggestion={(editor as Editor & SuggestionsPluginCommands).selectSuggestion}
|
||||
/>
|
||||
</>
|
||||
);
|
||||
@@ -212,7 +212,7 @@ export function SuggestionsPlugin({
|
||||
}
|
||||
|
||||
const handleTypeahead = async (
|
||||
editor: CoreEditor,
|
||||
editor: Editor,
|
||||
onStateChange: (state: Partial<SuggestionsState>) => void,
|
||||
onTypeahead?: (typeahead: TypeaheadInput) => Promise<TypeaheadOutput>,
|
||||
cleanText?: (text: string) => string
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import { Value, Editor as CoreEditor } from 'slate';
|
||||
import { Value } from 'slate';
|
||||
import { Editor } from 'slate-react';
|
||||
|
||||
import { SearchFunctionType } from '../utils';
|
||||
|
||||
@@ -133,7 +134,7 @@ export interface TypeaheadInput {
|
||||
wrapperClasses: string[];
|
||||
labelKey?: string;
|
||||
value?: Value;
|
||||
editor?: CoreEditor;
|
||||
editor?: Editor;
|
||||
}
|
||||
|
||||
export interface SuggestionsState {
|
||||
|
||||
@@ -2,7 +2,6 @@
|
||||
"compilerOptions": {
|
||||
"paths": {
|
||||
"@emotion/core": ["./src/types/emotion-core-stub.d.ts"],
|
||||
"@grafana/slate-react": ["slate-react"],
|
||||
"@grafana/ui": ["."]
|
||||
}
|
||||
},
|
||||
|
||||
@@ -14,13 +14,13 @@
|
||||
"@testing-library/user-event": "14.2.0",
|
||||
"@types/classnames": "^2.2.7",
|
||||
"@types/deep-freeze": "^0.1.1",
|
||||
"@types/grafana__slate-react": "npm:@types/slate-react@0.22.5",
|
||||
"@types/hoist-non-react-statics": "^3.3.1",
|
||||
"@types/lodash": "4.14.182",
|
||||
"@types/prop-types": "15.7.5",
|
||||
"@types/react": "17.0.42",
|
||||
"@types/react-icons": "2.2.7",
|
||||
"@types/reselect": "2.2.0",
|
||||
"@types/slate-react": "0.22.9",
|
||||
"@types/tinycolor2": "1.4.3",
|
||||
"enzyme": "3.11.0",
|
||||
"sinon": "14.0.0",
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { css, cx } from '@emotion/css';
|
||||
import { LanguageMap, languages as prismLanguages } from 'prismjs';
|
||||
import React, { FC, useMemo } from 'react';
|
||||
import { Editor } from 'slate-react';
|
||||
|
||||
import { GrafanaTheme } from '@grafana/data';
|
||||
import { Editor } from '@grafana/slate-react';
|
||||
import { makeValue, SlatePrism, useStyles } from '@grafana/ui';
|
||||
import LogqlSyntax from 'app/plugins/datasource/loki/syntax';
|
||||
import PromqlSyntax from 'app/plugins/datasource/prometheus/promql';
|
||||
|
||||
@@ -138,6 +138,7 @@ describe('panelEditor actions', () => {
|
||||
it('should not increment configRev when no changes made and leaving panel edit', async () => {
|
||||
const sourcePanel = new PanelModel({ id: 12, type: 'graph' });
|
||||
sourcePanel.plugin = getPanelPlugin({});
|
||||
sourcePanel.plugin.angularPanelCtrl = undefined;
|
||||
|
||||
const dashboard = new DashboardModel({
|
||||
panels: [{ id: 12, type: 'graph' }],
|
||||
@@ -163,6 +164,41 @@ describe('panelEditor actions', () => {
|
||||
|
||||
expect(sourcePanel.configRev).toEqual(0);
|
||||
});
|
||||
|
||||
it('should apply changes when leaving panel edit with angular panel', async () => {
|
||||
const sourcePanel = new PanelModel({ id: 12, type: 'graph' });
|
||||
sourcePanel.plugin = getPanelPlugin({});
|
||||
sourcePanel.plugin.angularPanelCtrl = {};
|
||||
|
||||
const dashboard = new DashboardModel({
|
||||
panels: [{ id: 12, type: 'graph' }],
|
||||
});
|
||||
|
||||
const panel = dashboard.initEditPanel(sourcePanel);
|
||||
|
||||
const state: PanelEditorState = {
|
||||
...initialState(),
|
||||
getPanel: () => panel,
|
||||
getSourcePanel: () => sourcePanel,
|
||||
};
|
||||
|
||||
// not using panel.setProperty here to simulate any prop change done from angular
|
||||
panel.title = 'Changed title';
|
||||
|
||||
await thunkTester({
|
||||
panelEditor: state,
|
||||
panels: {},
|
||||
dashboard: {
|
||||
getModel: () => dashboard,
|
||||
},
|
||||
})
|
||||
.givenThunk(exitPanelEditor)
|
||||
.whenThunkIsDispatched();
|
||||
|
||||
expect(sourcePanel.isAngularPlugin()).toBe(true);
|
||||
expect(sourcePanel.title).toEqual('Changed title');
|
||||
expect(sourcePanel.configRev).toEqual(1);
|
||||
});
|
||||
});
|
||||
|
||||
describe('skipPanelUpdate', () => {
|
||||
|
||||
@@ -116,7 +116,10 @@ export function exitPanelEditor(): ThunkResult<void> {
|
||||
dashboard.exitPanelEditor();
|
||||
}
|
||||
|
||||
if (panel.hasChanged && !shouldDiscardChanges) {
|
||||
// For angular panels we always commit as panel.hasChanged will not have picked up changes done from angular
|
||||
const commitChanges = !shouldDiscardChanges && (panel.hasChanged || panel.isAngularPlugin());
|
||||
|
||||
if (commitChanges) {
|
||||
const modifiedSaveModel = panel.getSaveModel();
|
||||
const sourcePanel = getSourcePanel();
|
||||
const panelTypeChanged = sourcePanel.type !== panel.type;
|
||||
|
||||
@@ -489,6 +489,7 @@ export class PanelModel implements DataConfigSource, IPanelModel {
|
||||
|
||||
const clone = new PanelModel(sourceModel);
|
||||
clone.isEditing = true;
|
||||
clone.plugin = this.plugin;
|
||||
|
||||
const sourceQueryRunner = this.getQueryRunner();
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
import * as emotion from '@emotion/css';
|
||||
import * as emotionReact from '@emotion/react';
|
||||
import * as d3 from 'd3';
|
||||
import jquery from 'jquery';
|
||||
import _ from 'lodash'; // eslint-disable-line lodash/import-scope
|
||||
@@ -13,10 +14,10 @@ import * as rxjs from 'rxjs';
|
||||
import * as rxjsOperators from 'rxjs/operators';
|
||||
import slate from 'slate';
|
||||
import slatePlain from 'slate-plain-serializer';
|
||||
import slateReact from 'slate-react';
|
||||
|
||||
import * as grafanaData from '@grafana/data';
|
||||
import * as grafanaRuntime from '@grafana/runtime';
|
||||
import slateReact from '@grafana/slate-react';
|
||||
import * as grafanaUIraw from '@grafana/ui';
|
||||
import config from 'app/core/config';
|
||||
import { appEvents, contextSrv } from 'app/core/core';
|
||||
@@ -85,7 +86,8 @@ exposeToPlugin('react-router-dom', reactRouter);
|
||||
// Experimental modules
|
||||
exposeToPlugin('prismjs', prismjs);
|
||||
exposeToPlugin('slate', slate);
|
||||
exposeToPlugin('@grafana/slate-react', slateReact);
|
||||
exposeToPlugin('slate-react', slateReact);
|
||||
exposeToPlugin('@grafana/slate-react', slateReact); // for backwards compatibility with older plugins
|
||||
exposeToPlugin('slate-plain-serializer', slatePlain);
|
||||
exposeToPlugin('react', react);
|
||||
exposeToPlugin('react-dom', reactDom);
|
||||
@@ -93,6 +95,7 @@ exposeToPlugin('react-redux', reactRedux);
|
||||
exposeToPlugin('redux', redux);
|
||||
exposeToPlugin('emotion', emotion);
|
||||
exposeToPlugin('@emotion/css', emotion);
|
||||
exposeToPlugin('@emotion/react', emotionReact);
|
||||
|
||||
exposeToPlugin('app/features/dashboard/impression_store', {
|
||||
impressions: impressionSrv,
|
||||
|
||||
@@ -2,7 +2,8 @@ import { css } from '@emotion/css';
|
||||
import { debounce, intersectionBy, unionBy } from 'lodash';
|
||||
import { LanguageMap, languages as prismLanguages } from 'prismjs';
|
||||
import React, { ReactNode } from 'react';
|
||||
import { Editor, Node, Plugin } from 'slate';
|
||||
import { Node, Plugin } from 'slate';
|
||||
import { Editor } from 'slate-react';
|
||||
|
||||
import { AbsoluteTimeRange, QueryEditorProps, SelectableValue } from '@grafana/data';
|
||||
import {
|
||||
@@ -78,7 +79,7 @@ export class CloudWatchLogsQueryField extends React.PureComponent<CloudWatchLogs
|
||||
hint: undefined,
|
||||
};
|
||||
|
||||
plugins: Plugin[];
|
||||
plugins: Array<Plugin<Editor>>;
|
||||
|
||||
constructor(props: CloudWatchLogsQueryFieldProps, context: React.Context<any>) {
|
||||
super(props, context);
|
||||
@@ -263,7 +264,7 @@ export class CloudWatchLogsQueryField extends React.PureComponent<CloudWatchLogs
|
||||
);
|
||||
};
|
||||
|
||||
onQueryFieldClick = (_event: Event, _editor: Editor, next: () => any) => {
|
||||
onQueryFieldClick = (_event: Event | React.MouseEvent, _editor: Editor, next: () => any) => {
|
||||
const { selectedLogGroups, loadingLogGroups } = this.state;
|
||||
|
||||
const queryFieldDisabled = loadingLogGroups || selectedLogGroups.length === 0;
|
||||
|
||||
+10
@@ -191,4 +191,14 @@ describe('MetricStatEditor', () => {
|
||||
]);
|
||||
});
|
||||
});
|
||||
|
||||
describe('metric value', () => {
|
||||
it('should be displayed when a custom value is used and its value is not in the select options', async () => {
|
||||
const expected = 'CPUUtilzation';
|
||||
await act(async () => {
|
||||
render(<MetricStatEditor {...props} metricStat={{ ...props.metricStat, metricName: expected }} />);
|
||||
});
|
||||
expect(await screen.findByText(expected)).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
+2
-2
@@ -62,7 +62,7 @@ export function MetricStatEditor({
|
||||
<EditorField label="Namespace" width={26}>
|
||||
<Select
|
||||
aria-label="Namespace"
|
||||
value={metricStat.namespace}
|
||||
value={metricStat?.namespace && toOption(metricStat.namespace)}
|
||||
allowCustomValue
|
||||
options={namespaces}
|
||||
onChange={({ value: namespace }) => {
|
||||
@@ -75,7 +75,7 @@ export function MetricStatEditor({
|
||||
<EditorField label="Metric name" width={16}>
|
||||
<Select
|
||||
aria-label="Metric name"
|
||||
value={metricStat.metricName || null}
|
||||
value={metricStat?.metricName && toOption(metricStat.metricName)}
|
||||
allowCustomValue
|
||||
options={metrics}
|
||||
onChange={({ value: metricName }) => {
|
||||
|
||||
@@ -5,6 +5,7 @@ import {
|
||||
ArrayVector,
|
||||
DataFrame,
|
||||
dataFrameToJSON,
|
||||
DataQueryRequest,
|
||||
dateTime,
|
||||
Field,
|
||||
FieldType,
|
||||
@@ -28,6 +29,7 @@ import {
|
||||
import { validLogsQuery, validMetricsQuery } from './__mocks__/queries';
|
||||
import { LOGSTREAM_IDENTIFIER_INTERNAL, LOG_IDENTIFIER_INTERNAL } from './datasource';
|
||||
import {
|
||||
CloudWatchAnnotationQuery,
|
||||
CloudWatchLogsQueryStatus,
|
||||
CloudWatchMetricsQuery,
|
||||
CloudWatchQuery,
|
||||
@@ -35,6 +37,15 @@ import {
|
||||
MetricQueryType,
|
||||
} from './types';
|
||||
|
||||
const mockTimeRange = {
|
||||
from: dateTime(1546372800000),
|
||||
to: dateTime(1546380000000),
|
||||
raw: {
|
||||
from: dateTime(1546372800000),
|
||||
to: dateTime(1546380000000),
|
||||
},
|
||||
};
|
||||
|
||||
describe('datasource', () => {
|
||||
describe('query', () => {
|
||||
it('should return error if log query and log groups is not specified', async () => {
|
||||
@@ -310,6 +321,53 @@ describe('datasource', () => {
|
||||
});
|
||||
});
|
||||
|
||||
describe('annotation query', () => {
|
||||
const query: DataQueryRequest<CloudWatchAnnotationQuery> = {
|
||||
range: mockTimeRange,
|
||||
rangeRaw: mockTimeRange.raw,
|
||||
targets: [
|
||||
{
|
||||
actionPrefix: '',
|
||||
alarmNamePrefix: '',
|
||||
datasource: { type: 'cloudwatch' },
|
||||
dimensions: { InstanceId: 'i-12345678' },
|
||||
matchExact: true,
|
||||
metricName: 'CPUUtilization',
|
||||
period: '300',
|
||||
prefixMatching: false,
|
||||
queryMode: 'Annotations',
|
||||
refId: 'Anno',
|
||||
namespace: `$${namespaceVariable.name}`,
|
||||
region: `$${regionVariable.name}`,
|
||||
statistic: 'Average',
|
||||
},
|
||||
],
|
||||
requestId: '',
|
||||
interval: '',
|
||||
intervalMs: 0,
|
||||
scopedVars: {},
|
||||
timezone: '',
|
||||
app: '',
|
||||
startTime: 0,
|
||||
};
|
||||
|
||||
it('should issue the correct query', async () => {
|
||||
const { datasource, fetchMock } = setupMockedDataSource({ variables: [namespaceVariable, regionVariable] });
|
||||
await expect(datasource.query(query)).toEmitValuesWith(() => {
|
||||
expect(fetchMock.mock.calls[0][0].data.queries[0]).toMatchObject(
|
||||
expect.objectContaining({
|
||||
region: regionVariable.current.value,
|
||||
namespace: namespaceVariable.current.value,
|
||||
metricName: query.targets[0].metricName,
|
||||
dimensions: { InstanceId: ['i-12345678'] },
|
||||
statistic: query.targets[0].statistic,
|
||||
period: query.targets[0].period,
|
||||
})
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
describe('resource requests', () => {
|
||||
it('should map resource response to metric response', async () => {
|
||||
const datasource = setupMockedDataSource().datasource;
|
||||
|
||||
@@ -337,7 +337,7 @@ export class CloudWatchDatasource
|
||||
namespace: this.templateSrv.replace(query.namespace),
|
||||
metricName: this.templateSrv.replace(query.metricName),
|
||||
dimensions: this.convertDimensionFormat(query.dimensions ?? {}, {}),
|
||||
period: query.period ? parseInt(query.period, 10) : 300,
|
||||
period: query.period ?? '',
|
||||
actionPrefix: query.actionPrefix ?? '',
|
||||
alarmNamePrefix: query.alarmNamePrefix ?? '',
|
||||
type: 'annotationQuery',
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { LanguageMap, languages as prismLanguages } from 'prismjs';
|
||||
import React, { ReactNode } from 'react';
|
||||
import { Plugin, Node } from 'slate';
|
||||
import { Editor } from 'slate-react';
|
||||
|
||||
import { QueryEditorProps } from '@grafana/data';
|
||||
import { reportInteraction } from '@grafana/runtime';
|
||||
@@ -83,7 +84,7 @@ interface LokiQueryFieldState {
|
||||
}
|
||||
|
||||
export class LokiQueryField extends React.PureComponent<LokiQueryFieldProps, LokiQueryFieldState> {
|
||||
plugins: Plugin[];
|
||||
plugins: Array<Plugin<Editor>>;
|
||||
_isMounted = false;
|
||||
|
||||
constructor(props: LokiQueryFieldProps) {
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
import { LanguageMap, languages as prismLanguages } from 'prismjs';
|
||||
import React, { ReactNode } from 'react';
|
||||
import { Plugin } from 'slate';
|
||||
import { Editor } from 'slate-react';
|
||||
|
||||
import { QueryEditorProps, QueryHint, isDataFrame, toLegacyResponseData, TimeRange, CoreApp } from '@grafana/data';
|
||||
import {
|
||||
@@ -80,7 +81,7 @@ interface PromQueryFieldState {
|
||||
}
|
||||
|
||||
class PromQueryField extends React.PureComponent<PromQueryFieldProps, PromQueryFieldState> {
|
||||
plugins: Plugin[];
|
||||
plugins: Array<Plugin<Editor>>;
|
||||
declare languageProviderInitializationPromise: CancelablePromise<any>;
|
||||
|
||||
constructor(props: PromQueryFieldProps, context: React.Context<any>) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
load('scripts/drone/vault.star', 'from_secret', 'github_token', 'pull_secret', 'drone_token', 'prerelease_bucket')
|
||||
|
||||
grabpl_version = 'v2.9.50-go1.17.12'
|
||||
grabpl_version = 'v2.9.50-go1.17.12-1'
|
||||
build_image = 'grafana/build-container:1.5.8'
|
||||
publish_image = 'grafana/grafana-ci-deploy:1.3.3'
|
||||
deploy_docker_image = 'us.gcr.io/kubernetes-dev/drone/plugins/deploy-image'
|
||||
@@ -363,7 +363,7 @@ def upload_cdn_step(edition, ver_mode, trigger=None):
|
||||
'PRERELEASE_BUCKET': from_secret(prerelease_bucket)
|
||||
},
|
||||
'commands': [
|
||||
'./bin/grabpl upload-cdn --edition {} --src-bucket "{}"{}'.format(edition, bucket, src_dir),
|
||||
'./bin/grabpl upload-cdn --edition {}'.format(edition),
|
||||
],
|
||||
}
|
||||
if trigger and ver_mode in ("release-branch", "main"):
|
||||
@@ -967,12 +967,12 @@ def upload_packages_step(edition, ver_mode, trigger=None):
|
||||
|
||||
if ver_mode == 'release':
|
||||
packages_bucket = '$${{PRERELEASE_BUCKET}}/artifacts/downloads{}'.format(enterprise2_suffix(edition))
|
||||
cmd = './bin/grabpl upload-packages --edition {} --packages-bucket {}'.format(edition, packages_bucket)
|
||||
cmd = './bin/grabpl upload-packages --edition {}'.format(edition)
|
||||
elif edition == 'enterprise2':
|
||||
cmd = './bin/grabpl upload-packages --edition {} --packages-bucket grafana-downloads-enterprise2'.format(
|
||||
cmd = './bin/grabpl upload-packages --edition {}'.format(
|
||||
edition)
|
||||
else:
|
||||
cmd = './bin/grabpl upload-packages --edition {} --packages-bucket grafana-downloads'.format(edition)
|
||||
cmd = './bin/grabpl upload-packages --edition {}'.format(edition)
|
||||
|
||||
deps = []
|
||||
if edition in 'enterprise2' or not end_to_end_tests_deps(edition):
|
||||
|
||||
@@ -4052,35 +4052,6 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"@grafana/slate-react@npm:0.22.10-grafana":
|
||||
version: 0.22.10-grafana
|
||||
resolution: "@grafana/slate-react@npm:0.22.10-grafana"
|
||||
dependencies:
|
||||
debug: ^3.1.0
|
||||
get-window: ^1.1.1
|
||||
is-window: ^1.0.2
|
||||
lodash: ^4.1.1
|
||||
memoize-one: ^4.0.0
|
||||
prop-types: ^15.5.8
|
||||
react-immutable-proptypes: ^2.1.0
|
||||
selection-is-backward: ^1.0.0
|
||||
slate-base64-serializer: ^0.2.111
|
||||
slate-dev-environment: ^0.2.2
|
||||
slate-hotkeys: ^0.2.9
|
||||
slate-plain-serializer: ^0.7.10
|
||||
slate-prop-types: ^0.5.41
|
||||
slate-react-placeholder: ^0.2.8
|
||||
tiny-invariant: ^1.0.1
|
||||
tiny-warning: ^0.0.3
|
||||
peerDependencies:
|
||||
immutable: ">=3.8.1 || >4.0.0-rc"
|
||||
react: ">=16.6.0"
|
||||
react-dom: ">=16.6.0"
|
||||
slate: ">=0.47.0"
|
||||
checksum: 3417c53d9d0d2f46d3624037b1094a6786019c52e84d4ed3a91fbac232e67805cb299c3a6af7a1b8fd98cc2c60455103dd1d87eb6e7dd95df3b96b72f94cedd5
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@grafana/toolkit@9.0.8, @grafana/toolkit@workspace:*, @grafana/toolkit@workspace:packages/grafana-toolkit":
|
||||
version: 0.0.0-use.local
|
||||
resolution: "@grafana/toolkit@workspace:packages/grafana-toolkit"
|
||||
@@ -4195,7 +4166,6 @@ __metadata:
|
||||
"@grafana/data": 9.0.8
|
||||
"@grafana/e2e-selectors": 9.0.8
|
||||
"@grafana/schema": 9.0.8
|
||||
"@grafana/slate-react": 0.22.10-grafana
|
||||
"@grafana/tsconfig": ^1.2.0-rc1
|
||||
"@mdx-js/react": 1.6.22
|
||||
"@monaco-editor/react": 4.3.1
|
||||
@@ -4235,7 +4205,6 @@ __metadata:
|
||||
"@types/d3": 7.1.0
|
||||
"@types/enzyme": 3.10.12
|
||||
"@types/enzyme-adapter-react-16": 1.0.6
|
||||
"@types/grafana__slate-react": "npm:@types/slate-react@0.22.5"
|
||||
"@types/hoist-non-react-statics": 3.3.1
|
||||
"@types/is-hotkey": 0.1.7
|
||||
"@types/jest": 27.4.1
|
||||
@@ -4254,8 +4223,9 @@ __metadata:
|
||||
"@types/react-test-renderer": 17.0.1
|
||||
"@types/react-transition-group": 4.4.4
|
||||
"@types/react-window": 1.8.5
|
||||
"@types/slate": 0.47.2
|
||||
"@types/slate": 0.47.9
|
||||
"@types/slate-plain-serializer": 0.7.2
|
||||
"@types/slate-react": 0.22.9
|
||||
"@types/testing-library__jest-dom": 5.14.3
|
||||
"@types/testing-library__react-hooks": ^3.2.0
|
||||
"@types/tinycolor2": 1.4.3
|
||||
@@ -4321,8 +4291,9 @@ __metadata:
|
||||
rollup-plugin-terser: 7.0.2
|
||||
rxjs: 7.5.5
|
||||
sass-loader: 13.0.0
|
||||
slate: 0.47.8
|
||||
slate-plain-serializer: 0.7.10
|
||||
slate: 0.47.9
|
||||
slate-plain-serializer: 0.7.11
|
||||
slate-react: 0.22.10
|
||||
storybook-dark-mode: 1.1.0
|
||||
style-loader: 3.3.1
|
||||
terser-webpack-plugin: 5.3.1
|
||||
@@ -4440,13 +4411,13 @@ __metadata:
|
||||
"@testing-library/user-event": 14.2.0
|
||||
"@types/classnames": ^2.2.7
|
||||
"@types/deep-freeze": ^0.1.1
|
||||
"@types/grafana__slate-react": "npm:@types/slate-react@0.22.5"
|
||||
"@types/hoist-non-react-statics": ^3.3.1
|
||||
"@types/lodash": 4.14.182
|
||||
"@types/prop-types": 15.7.5
|
||||
"@types/react": 17.0.42
|
||||
"@types/react-icons": 2.2.7
|
||||
"@types/reselect": 2.2.0
|
||||
"@types/slate-react": 0.22.9
|
||||
"@types/tinycolor2": 1.4.3
|
||||
chance: ^1.0.10
|
||||
classnames: ^2.2.5
|
||||
@@ -9525,17 +9496,6 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/grafana__slate-react@npm:@types/slate-react@0.22.5":
|
||||
version: 0.22.5
|
||||
resolution: "@types/slate-react@npm:0.22.5"
|
||||
dependencies:
|
||||
"@types/react": "*"
|
||||
"@types/slate": "*"
|
||||
immutable: ^3.8.2
|
||||
checksum: afc83c7f47d19cc6776a8b4c14eb3894b18db2410e8274058133ed53d78ee82976f1318a707597ddc7277b1b857a4baf97b152687679f4e9757bb8c662508164
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/hast@npm:^2.0.0":
|
||||
version: 2.3.4
|
||||
resolution: "@types/hast@npm:2.3.4"
|
||||
@@ -10426,13 +10386,24 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/slate@npm:0.47.2":
|
||||
version: 0.47.2
|
||||
resolution: "@types/slate@npm:0.47.2"
|
||||
"@types/slate-react@npm:0.22.9":
|
||||
version: 0.22.9
|
||||
resolution: "@types/slate-react@npm:0.22.9"
|
||||
dependencies:
|
||||
"@types/react": "*"
|
||||
"@types/slate": "*"
|
||||
immutable: ^3.8.2
|
||||
checksum: d74812f6bf651c508afb2a4fae4ae919cba992ec920ac017d1bf73b1b469959145793a716d5d114b93d1082683ab7378b5cb5b68f0ff01a6d121c8ddbbb8e2e1
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"@types/slate@npm:0.47.9":
|
||||
version: 0.47.9
|
||||
resolution: "@types/slate@npm:0.47.9"
|
||||
dependencies:
|
||||
"@types/react": "*"
|
||||
immutable: ^3.8.2
|
||||
checksum: c92350f1ef366b5907356a7f3b7bd41dda548dc1002cc2bd79f6b0ff1356d3189c124a54b363ddbe22cbdeb2a75f9d1b67d4f5b2a1bb6b89b714ecf7cf0c49c2
|
||||
checksum: ce88a5c6f502fbfe9a299983766d2eb67e4fbe2f746178b2ef31330b1392b62eca96d8618753ca2af3e858b6aa4ada91a64a3dfc4e70c60785f172c240e06a45
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -19443,7 +19414,6 @@ __metadata:
|
||||
"@grafana/lezer-logql": ^0.0.12
|
||||
"@grafana/runtime": "workspace:*"
|
||||
"@grafana/schema": "workspace:*"
|
||||
"@grafana/slate-react": 0.22.10-grafana
|
||||
"@grafana/toolkit": "workspace:*"
|
||||
"@grafana/tsconfig": ^1.2.0-rc1
|
||||
"@grafana/ui": "workspace:*"
|
||||
@@ -19500,7 +19470,6 @@ __metadata:
|
||||
"@types/eslint": 8.4.2
|
||||
"@types/file-saver": 2.0.5
|
||||
"@types/google.analytics": ^0.0.42
|
||||
"@types/grafana__slate-react": "npm:@types/slate-react@0.22.5"
|
||||
"@types/history": 4.7.11
|
||||
"@types/hoist-non-react-statics": 3.3.1
|
||||
"@types/jest": 27.4.1
|
||||
@@ -19534,8 +19503,9 @@ __metadata:
|
||||
"@types/redux-mock-store": 1.0.3
|
||||
"@types/reselect": 2.2.0
|
||||
"@types/semver": 7.3.9
|
||||
"@types/slate": 0.47.2
|
||||
"@types/slate": 0.47.9
|
||||
"@types/slate-plain-serializer": 0.7.2
|
||||
"@types/slate-react": 0.22.9
|
||||
"@types/testing-library__jest-dom": 5.14.3
|
||||
"@types/testing-library__react-hooks": ^3.2.0
|
||||
"@types/tinycolor2": 1.4.3
|
||||
@@ -19698,8 +19668,9 @@ __metadata:
|
||||
selecto: 1.16.2
|
||||
semver: 7.3.7
|
||||
sinon: 14.0.0
|
||||
slate: 0.47.8
|
||||
slate-plain-serializer: 0.7.10
|
||||
slate: 0.47.9
|
||||
slate-plain-serializer: 0.7.11
|
||||
slate-react: 0.22.10
|
||||
style-loader: 3.3.1
|
||||
stylelint: 14.8.2
|
||||
stylelint-config-prettier: 9.0.3
|
||||
@@ -31325,7 +31296,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"slate-base64-serializer@npm:^0.2.111":
|
||||
"slate-base64-serializer@npm:^0.2.112":
|
||||
version: 0.2.115
|
||||
resolution: "slate-base64-serializer@npm:0.2.115"
|
||||
dependencies:
|
||||
@@ -31336,7 +31307,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"slate-dev-environment@npm:^0.2.2":
|
||||
"slate-dev-environment@npm:0.2.5":
|
||||
version: 0.2.5
|
||||
resolution: "slate-dev-environment@npm:0.2.5"
|
||||
dependencies:
|
||||
@@ -31345,6 +31316,15 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"slate-dev-environment@patch:slate-dev-environment@npm:0.2.5#.yarn/patches/slate-dev-environment-npm-0.2.5-9aeb7da7b5.patch::locator=grafana%40workspace%3A.":
|
||||
version: 0.2.5
|
||||
resolution: "slate-dev-environment@patch:slate-dev-environment@npm%3A0.2.5#.yarn/patches/slate-dev-environment-npm-0.2.5-9aeb7da7b5.patch::version=0.2.5&hash=13521e&locator=grafana%40workspace%3A."
|
||||
dependencies:
|
||||
is-in-browser: ^1.1.3
|
||||
checksum: 1be7514ac0b10b0232f3c19e02bf5f9211850e119a235743fd46ab2f182c8b892dc58edf40130308d85d14f755b348b86ab2daea757e8ee0beb74746f653fc03
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"slate-hotkeys@npm:^0.2.9":
|
||||
version: 0.2.11
|
||||
resolution: "slate-hotkeys@npm:0.2.11"
|
||||
@@ -31355,17 +31335,17 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"slate-plain-serializer@npm:0.7.10":
|
||||
version: 0.7.10
|
||||
resolution: "slate-plain-serializer@npm:0.7.10"
|
||||
"slate-plain-serializer@npm:0.7.11":
|
||||
version: 0.7.11
|
||||
resolution: "slate-plain-serializer@npm:0.7.11"
|
||||
peerDependencies:
|
||||
immutable: ">=3.8.1"
|
||||
slate: ">=0.46.0"
|
||||
checksum: 0fe3f736cbc48c4b9cf7cf5ec03d9cc51c0f3320e46841de4aef50767a2ef14952660e0e2e5dfe1696e7d5c952408d95144543a9a9a86973e893de840782cd2e
|
||||
checksum: b8d2989562a140c4c6cada381483aa2f419c3532ebb4ed51abfa5df8128dfd8f3d845ca324d737e3711343d651a95804f91aaa1d2cdd8e96cd9602c747781a5b
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"slate-plain-serializer@npm:^0.7.10":
|
||||
"slate-plain-serializer@npm:^0.7.11":
|
||||
version: 0.7.13
|
||||
resolution: "slate-plain-serializer@npm:0.7.13"
|
||||
peerDependencies:
|
||||
@@ -31375,7 +31355,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"slate-prop-types@npm:^0.5.41":
|
||||
"slate-prop-types@npm:^0.5.42":
|
||||
version: 0.5.44
|
||||
resolution: "slate-prop-types@npm:0.5.44"
|
||||
peerDependencies:
|
||||
@@ -31385,7 +31365,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"slate-react-placeholder@npm:^0.2.8":
|
||||
"slate-react-placeholder@npm:^0.2.9":
|
||||
version: 0.2.9
|
||||
resolution: "slate-react-placeholder@npm:0.2.9"
|
||||
peerDependencies:
|
||||
@@ -31396,9 +31376,38 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"slate@npm:0.47.8":
|
||||
version: 0.47.8
|
||||
resolution: "slate@npm:0.47.8"
|
||||
"slate-react@npm:0.22.10":
|
||||
version: 0.22.10
|
||||
resolution: "slate-react@npm:0.22.10"
|
||||
dependencies:
|
||||
debug: ^3.1.0
|
||||
get-window: ^1.1.1
|
||||
is-window: ^1.0.2
|
||||
lodash: ^4.1.1
|
||||
memoize-one: ^4.0.0
|
||||
prop-types: ^15.5.8
|
||||
react-immutable-proptypes: ^2.1.0
|
||||
selection-is-backward: ^1.0.0
|
||||
slate-base64-serializer: ^0.2.112
|
||||
slate-dev-environment: ^0.2.2
|
||||
slate-hotkeys: ^0.2.9
|
||||
slate-plain-serializer: ^0.7.11
|
||||
slate-prop-types: ^0.5.42
|
||||
slate-react-placeholder: ^0.2.9
|
||||
tiny-invariant: ^1.0.1
|
||||
tiny-warning: ^0.0.3
|
||||
peerDependencies:
|
||||
immutable: ">=3.8.1 || >4.0.0-rc"
|
||||
react: ">=16.6.0"
|
||||
react-dom: ">=16.6.0"
|
||||
slate: ">=0.47.0"
|
||||
checksum: 1ecddaf0f635205249680961d7e772cf25a60179b39ca69a34f874b2797e3c122ef405921fa2787ea0c559af48d1d79f10d7e169749f0f084c6bf366aeffdfc8
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"slate@npm:0.47.9":
|
||||
version: 0.47.9
|
||||
resolution: "slate@npm:0.47.9"
|
||||
dependencies:
|
||||
debug: ^3.1.0
|
||||
direction: ^0.1.5
|
||||
@@ -31410,7 +31419,7 @@ __metadata:
|
||||
type-of: ^2.0.1
|
||||
peerDependencies:
|
||||
immutable: ">=3.8.1 || >4.0.0-rc"
|
||||
checksum: 6d3541abe1a727f498e0835118b98efd1a8ea2cfa9bb1b3fe9f77faf42b4afce4259e765b60bd5b8c2bd34686d5f9bcfb80b9a8807c54fee1e496a92bad563d6
|
||||
checksum: a128d1eaa4c203dbb13d197d69758341df485e42e52aea1739d05939b16df42633949f116ae9b75b95b647ec39b18867ca5c8a05dbe97eeb15cf31bc8d2edc7f
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
@@ -33660,7 +33669,7 @@ __metadata:
|
||||
|
||||
"typescript@patch:typescript@4.6.4#~builtin<compat/typescript>":
|
||||
version: 4.6.4
|
||||
resolution: "typescript@patch:typescript@npm%3A4.6.4#~builtin<compat/typescript>::version=4.6.4&hash=7ad353"
|
||||
resolution: "typescript@patch:typescript@npm%3A4.6.4#~builtin<compat/typescript>::version=4.6.4&hash=f456af"
|
||||
bin:
|
||||
tsc: bin/tsc
|
||||
tsserver: bin/tsserver
|
||||
@@ -33670,7 +33679,7 @@ __metadata:
|
||||
|
||||
"typescript@patch:typescript@>=2.7#~builtin<compat/typescript>":
|
||||
version: 4.5.5
|
||||
resolution: "typescript@patch:typescript@npm%3A4.5.5#~builtin<compat/typescript>::version=4.5.5&hash=7ad353"
|
||||
resolution: "typescript@patch:typescript@npm%3A4.5.5#~builtin<compat/typescript>::version=4.5.5&hash=f456af"
|
||||
bin:
|
||||
tsc: bin/tsc
|
||||
tsserver: bin/tsserver
|
||||
@@ -33680,7 +33689,7 @@ __metadata:
|
||||
|
||||
"typescript@patch:typescript@~4.6.3#~builtin<compat/typescript>":
|
||||
version: 4.6.3
|
||||
resolution: "typescript@patch:typescript@npm%3A4.6.3#~builtin<compat/typescript>::version=4.6.3&hash=7ad353"
|
||||
resolution: "typescript@patch:typescript@npm%3A4.6.3#~builtin<compat/typescript>::version=4.6.3&hash=f456af"
|
||||
bin:
|
||||
tsc: bin/tsc
|
||||
tsserver: bin/tsserver
|
||||
|
||||
Reference in New Issue
Block a user