Skip to content

Commit

Permalink
Merge pull request #32 from Vizzuality/develop
Browse files Browse the repository at this point in the history
Add layer legend type enum
  • Loading branch information
barbara-chaves authored Jun 18, 2024
2 parents 1227fe9 + a8cbfb1 commit f38136b
Show file tree
Hide file tree
Showing 4 changed files with 620 additions and 293 deletions.
2 changes: 2 additions & 0 deletions client/src/types/generated/strapi.schemas.ts
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,7 @@ export const DefaultLegendComponentType = {
Basic: "Basic",
Gradient: "Gradient",
Choropleth: "Choropleth",
Rangeland: "Rangeland",
} as const;

export type DefaultLegendComponentItemsItem = {
Expand Down Expand Up @@ -1576,6 +1577,7 @@ export const DefaultLayerComponentLayerDataAttributesLegendType = {
Basic: "Basic",
Gradient: "Gradient",
Choropleth: "Choropleth",
Rangeland: "Rangeland",
} as const;

export type DefaultLayerComponentLayerDataAttributesLegendItemsItem = {
Expand Down
6 changes: 4 additions & 2 deletions cms/src/components/default/legend.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"collectionName": "components_default_legends",
"info": {
"displayName": "Legend"
"displayName": "Legend",
"description": ""
},
"options": {},
"attributes": {
Expand All @@ -10,7 +11,8 @@
"enum": [
"Basic",
"Gradient",
"Choropleth"
"Choropleth",
"Rangeland"
],
"required": true,
"default": "Basic"
Expand Down
5 changes: 4 additions & 1 deletion cms/types/generated/components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ export interface DefaultLegend extends Schema.Component {
collectionName: 'components_default_legends';
info: {
displayName: 'Legend';
description: '';
};
attributes: {
type: Attribute.Enumeration<['Basic', 'Gradient', 'Choropleth']> &
type: Attribute.Enumeration<
['Basic', 'Gradient', 'Choropleth', 'Rangeland']
> &
Attribute.Required &
Attribute.DefaultTo<'Basic'>;
items: Attribute.Component<'default.item', true>;
Expand Down
Loading

0 comments on commit f38136b

Please sign in to comment.