-
Notifications
You must be signed in to change notification settings - Fork 8.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Maps] convert HeatmapLayer dependencies to TS (#66823)
* [Maps] convert HeatmapLayer and dependencies to TS * heatmap_style_editor snapshots * eslint * fix merge problems * eslint cleanup * revert rename of getOrdinalMbColorRampStops * eslint * tslint Co-authored-by: Elastic Machine <[email protected]>
- Loading branch information
1 parent
17573f1
commit 57345e0
Showing
13 changed files
with
117 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
35 changes: 35 additions & 0 deletions
35
x-pack/plugins/maps/public/classes/styles/vector/vector_style_defaults.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
/* | ||
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one | ||
* or more contributor license agreements. Licensed under the Elastic License; | ||
* you may not use this file except in compliance with the Elastic License. | ||
*/ | ||
|
||
jest.mock('../../../kibana_services', () => { | ||
const mockUiSettings = { | ||
get: () => { | ||
return undefined; | ||
}, | ||
}; | ||
return { | ||
getUiSettings: () => { | ||
return mockUiSettings; | ||
}, | ||
}; | ||
}); | ||
|
||
import { VECTOR_STYLES } from '../../../../common/constants'; | ||
import { getDefaultStaticProperties } from './vector_style_defaults'; | ||
|
||
describe('getDefaultStaticProperties', () => { | ||
test('Should use first color in DEFAULT_*_COLORS when no colors are used on the map', () => { | ||
const styleProperties = getDefaultStaticProperties([]); | ||
expect(styleProperties[VECTOR_STYLES.FILL_COLOR]!.options.color).toBe('#54B399'); | ||
expect(styleProperties[VECTOR_STYLES.LINE_COLOR]!.options.color).toBe('#41937c'); | ||
}); | ||
|
||
test('Should next color in DEFAULT_*_COLORS when colors are used on the map', () => { | ||
const styleProperties = getDefaultStaticProperties(['#54B399']); | ||
expect(styleProperties[VECTOR_STYLES.FILL_COLOR]!.options.color).toBe('#6092C0'); | ||
expect(styleProperties[VECTOR_STYLES.LINE_COLOR]!.options.color).toBe('#4379aa'); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters