From 68c614cead75efe7a910c9a0f7f3bc49bce0726b Mon Sep 17 00:00:00 2001 From: barbara-chaves Date: Mon, 17 Jun 2024 10:12:59 +0200 Subject: [PATCH] Add layer legend type enum --- client/src/types/generated/strapi.schemas.ts | 2 + cms/src/components/default/legend.json | 6 +- cms/types/generated/components.d.ts | 5 +- cms/types/generated/contentTypes.d.ts | 804 +++++++++---------- 4 files changed, 412 insertions(+), 405 deletions(-) diff --git a/client/src/types/generated/strapi.schemas.ts b/client/src/types/generated/strapi.schemas.ts index 949022f..a257166 100644 --- a/client/src/types/generated/strapi.schemas.ts +++ b/client/src/types/generated/strapi.schemas.ts @@ -728,6 +728,7 @@ export const DefaultLegendComponentType = { Basic: "Basic", Gradient: "Gradient", Choropleth: "Choropleth", + Rangeland: "Rangeland", } as const; export type DefaultLegendComponentItemsItem = { @@ -1576,6 +1577,7 @@ export const DefaultLayerComponentLayerDataAttributesLegendType = { Basic: "Basic", Gradient: "Gradient", Choropleth: "Choropleth", + Rangeland: "Rangeland", } as const; export type DefaultLayerComponentLayerDataAttributesLegendItemsItem = { diff --git a/cms/src/components/default/legend.json b/cms/src/components/default/legend.json index 4253f7e..933cb2c 100644 --- a/cms/src/components/default/legend.json +++ b/cms/src/components/default/legend.json @@ -1,7 +1,8 @@ { "collectionName": "components_default_legends", "info": { - "displayName": "Legend" + "displayName": "Legend", + "description": "" }, "options": {}, "attributes": { @@ -10,7 +11,8 @@ "enum": [ "Basic", "Gradient", - "Choropleth" + "Choropleth", + "Rangeland" ], "required": true, "default": "Basic" diff --git a/cms/types/generated/components.d.ts b/cms/types/generated/components.d.ts index 499d19c..d0d42ce 100644 --- a/cms/types/generated/components.d.ts +++ b/cms/types/generated/components.d.ts @@ -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>; diff --git a/cms/types/generated/contentTypes.d.ts b/cms/types/generated/contentTypes.d.ts index 5876bbf..2c9cc44 100644 --- a/cms/types/generated/contentTypes.d.ts +++ b/cms/types/generated/contentTypes.d.ts @@ -362,6 +362,326 @@ export interface AdminTransferTokenPermission extends Schema.CollectionType { }; } +export interface ApiDatasetDataset extends Schema.CollectionType { + collectionName: 'datasets'; + info: { + singularName: 'dataset'; + pluralName: 'datasets'; + displayName: 'Dataset'; + description: ''; + }; + options: { + draftAndPublish: true; + }; + pluginOptions: { + i18n: { + localized: true; + }; + }; + attributes: { + title: Attribute.String & + Attribute.Required & + Attribute.Unique & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + type: Attribute.Enumeration<['Group', 'Temporal']> & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }> & + Attribute.DefaultTo<'Group'>; + layers: Attribute.Component<'default.layer', true> & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + citations: Attribute.Component<'default.citations', true> & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + sources: Attribute.Component<'default.source', true> & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + slug: Attribute.String & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }>; + createdAt: Attribute.DateTime; + updatedAt: Attribute.DateTime; + publishedAt: Attribute.DateTime; + createdBy: Attribute.Relation< + 'api::dataset.dataset', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + updatedBy: Attribute.Relation< + 'api::dataset.dataset', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + localizations: Attribute.Relation< + 'api::dataset.dataset', + 'oneToMany', + 'api::dataset.dataset' + >; + locale: Attribute.String; + }; +} + +export interface ApiEcoregionEcoregion extends Schema.CollectionType { + collectionName: 'ecoregions'; + info: { + singularName: 'ecoregion'; + pluralName: 'ecoregions'; + displayName: 'Ecoregion'; + description: ''; + }; + options: { + draftAndPublish: true; + }; + pluginOptions: { + i18n: { + localized: true; + }; + }; + attributes: { + title: Attribute.String & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + slug: Attribute.String & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }>; + code: Attribute.String & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }>; + rangeland: Attribute.Relation< + 'api::ecoregion.ecoregion', + 'manyToOne', + 'api::rangeland.rangeland' + >; + color: Attribute.String & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + createdAt: Attribute.DateTime; + updatedAt: Attribute.DateTime; + publishedAt: Attribute.DateTime; + createdBy: Attribute.Relation< + 'api::ecoregion.ecoregion', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + updatedBy: Attribute.Relation< + 'api::ecoregion.ecoregion', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + localizations: Attribute.Relation< + 'api::ecoregion.ecoregion', + 'oneToMany', + 'api::ecoregion.ecoregion' + >; + locale: Attribute.String; + }; +} + +export interface ApiLayerLayer extends Schema.CollectionType { + collectionName: 'layers'; + info: { + singularName: 'layer'; + pluralName: 'layers'; + displayName: 'Layer'; + description: ''; + }; + options: { + draftAndPublish: true; + }; + pluginOptions: { + i18n: { + localized: true; + }; + }; + attributes: { + title: Attribute.String & + Attribute.Required & + Attribute.Unique & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + type: Attribute.Enumeration<['Mapbox', 'GEE']> & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }> & + Attribute.DefaultTo<'GEE'>; + description: Attribute.Text & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + config: Attribute.JSON & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }>; + params_config: Attribute.JSON & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }>; + legend: Attribute.Component<'default.legend'> & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + interaction_config: Attribute.JSON & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }>; + slug: Attribute.String & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }>; + createdAt: Attribute.DateTime; + updatedAt: Attribute.DateTime; + publishedAt: Attribute.DateTime; + createdBy: Attribute.Relation< + 'api::layer.layer', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + updatedBy: Attribute.Relation< + 'api::layer.layer', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + localizations: Attribute.Relation< + 'api::layer.layer', + 'oneToMany', + 'api::layer.layer' + >; + locale: Attribute.String; + }; +} + +export interface ApiRangelandRangeland extends Schema.CollectionType { + collectionName: 'rangelands'; + info: { + singularName: 'rangeland'; + pluralName: 'rangelands'; + displayName: 'Rangeland'; + description: ''; + }; + options: { + draftAndPublish: true; + }; + pluginOptions: { + i18n: { + localized: true; + }; + }; + attributes: { + title: Attribute.String & + Attribute.Required & + Attribute.SetPluginOptions<{ + i18n: { + localized: true; + }; + }>; + slug: Attribute.String & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }>; + code: Attribute.String & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }>; + color: Attribute.String & + Attribute.SetPluginOptions<{ + i18n: { + localized: false; + }; + }>; + ecoregions: Attribute.Relation< + 'api::rangeland.rangeland', + 'oneToMany', + 'api::ecoregion.ecoregion' + >; + createdAt: Attribute.DateTime; + updatedAt: Attribute.DateTime; + publishedAt: Attribute.DateTime; + createdBy: Attribute.Relation< + 'api::rangeland.rangeland', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + updatedBy: Attribute.Relation< + 'api::rangeland.rangeland', + 'oneToOne', + 'admin::user' + > & + Attribute.Private; + localizations: Attribute.Relation< + 'api::rangeland.rangeland', + 'oneToMany', + 'api::rangeland.rangeland' + >; + locale: Attribute.String; + }; +} + export interface PluginUploadFile extends Schema.CollectionType { collectionName: 'files'; info: { @@ -668,482 +988,162 @@ export interface PluginI18NLocale extends Schema.CollectionType { > & Attribute.Private; updatedBy: Attribute.Relation< - 'plugin::i18n.locale', - 'oneToOne', - 'admin::user' - > & - Attribute.Private; - }; -} - -export interface PluginUsersPermissionsPermission - extends Schema.CollectionType { - collectionName: 'up_permissions'; - info: { - name: 'permission'; - description: ''; - singularName: 'permission'; - pluralName: 'permissions'; - displayName: 'Permission'; - }; - pluginOptions: { - 'content-manager': { - visible: false; - }; - 'content-type-builder': { - visible: false; - }; - }; - attributes: { - action: Attribute.String & Attribute.Required; - role: Attribute.Relation< - 'plugin::users-permissions.permission', - 'manyToOne', - 'plugin::users-permissions.role' - >; - createdAt: Attribute.DateTime; - updatedAt: Attribute.DateTime; - createdBy: Attribute.Relation< - 'plugin::users-permissions.permission', - 'oneToOne', - 'admin::user' - > & - Attribute.Private; - updatedBy: Attribute.Relation< - 'plugin::users-permissions.permission', - 'oneToOne', - 'admin::user' - > & - Attribute.Private; - }; -} - -export interface PluginUsersPermissionsRole extends Schema.CollectionType { - collectionName: 'up_roles'; - info: { - name: 'role'; - description: ''; - singularName: 'role'; - pluralName: 'roles'; - displayName: 'Role'; - }; - pluginOptions: { - 'content-manager': { - visible: false; - }; - 'content-type-builder': { - visible: false; - }; - }; - attributes: { - name: Attribute.String & - Attribute.Required & - Attribute.SetMinMaxLength<{ - minLength: 3; - }>; - description: Attribute.String; - type: Attribute.String & Attribute.Unique; - permissions: Attribute.Relation< - 'plugin::users-permissions.role', - 'oneToMany', - 'plugin::users-permissions.permission' - >; - users: Attribute.Relation< - 'plugin::users-permissions.role', - 'oneToMany', - 'plugin::users-permissions.user' - >; - createdAt: Attribute.DateTime; - updatedAt: Attribute.DateTime; - createdBy: Attribute.Relation< - 'plugin::users-permissions.role', - 'oneToOne', - 'admin::user' - > & - Attribute.Private; - updatedBy: Attribute.Relation< - 'plugin::users-permissions.role', - 'oneToOne', - 'admin::user' - > & - Attribute.Private; - }; -} - -export interface PluginUsersPermissionsUser extends Schema.CollectionType { - collectionName: 'up_users'; - info: { - name: 'user'; - description: ''; - singularName: 'user'; - pluralName: 'users'; - displayName: 'User'; - }; - options: { - draftAndPublish: false; - timestamps: true; - }; - attributes: { - username: Attribute.String & - Attribute.Required & - Attribute.Unique & - Attribute.SetMinMaxLength<{ - minLength: 3; - }>; - email: Attribute.Email & - Attribute.Required & - Attribute.SetMinMaxLength<{ - minLength: 6; - }>; - provider: Attribute.String; - password: Attribute.Password & - Attribute.Private & - Attribute.SetMinMaxLength<{ - minLength: 6; - }>; - resetPasswordToken: Attribute.String & Attribute.Private; - confirmationToken: Attribute.String & Attribute.Private; - confirmed: Attribute.Boolean & Attribute.DefaultTo; - blocked: Attribute.Boolean & Attribute.DefaultTo; - role: Attribute.Relation< - 'plugin::users-permissions.user', - 'manyToOne', - 'plugin::users-permissions.role' - >; - createdAt: Attribute.DateTime; - updatedAt: Attribute.DateTime; - createdBy: Attribute.Relation< - 'plugin::users-permissions.user', - 'oneToOne', - 'admin::user' - > & - Attribute.Private; - updatedBy: Attribute.Relation< - 'plugin::users-permissions.user', - 'oneToOne', - 'admin::user' - > & - Attribute.Private; - }; -} - -export interface ApiDatasetDataset extends Schema.CollectionType { - collectionName: 'datasets'; - info: { - singularName: 'dataset'; - pluralName: 'datasets'; - displayName: 'Dataset'; - description: ''; - }; - options: { - draftAndPublish: true; - }; - pluginOptions: { - i18n: { - localized: true; - }; - }; - attributes: { - title: Attribute.String & - Attribute.Required & - Attribute.Unique & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - type: Attribute.Enumeration<['Group', 'Temporal']> & - Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; - }> & - Attribute.DefaultTo<'Group'>; - layers: Attribute.Component<'default.layer', true> & - Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - citations: Attribute.Component<'default.citations', true> & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - sources: Attribute.Component<'default.source', true> & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - slug: Attribute.String & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; - }>; - createdAt: Attribute.DateTime; - updatedAt: Attribute.DateTime; - publishedAt: Attribute.DateTime; - createdBy: Attribute.Relation< - 'api::dataset.dataset', - 'oneToOne', - 'admin::user' - > & - Attribute.Private; - updatedBy: Attribute.Relation< - 'api::dataset.dataset', + 'plugin::i18n.locale', 'oneToOne', 'admin::user' > & Attribute.Private; - localizations: Attribute.Relation< - 'api::dataset.dataset', - 'oneToMany', - 'api::dataset.dataset' - >; - locale: Attribute.String; }; } -export interface ApiEcoregionEcoregion extends Schema.CollectionType { - collectionName: 'ecoregions'; +export interface PluginUsersPermissionsPermission + extends Schema.CollectionType { + collectionName: 'up_permissions'; info: { - singularName: 'ecoregion'; - pluralName: 'ecoregions'; - displayName: 'Ecoregion'; + name: 'permission'; description: ''; - }; - options: { - draftAndPublish: true; + singularName: 'permission'; + pluralName: 'permissions'; + displayName: 'Permission'; }; pluginOptions: { - i18n: { - localized: true; + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; }; }; attributes: { - title: Attribute.String & - Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - slug: Attribute.String & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; - }>; - code: Attribute.String & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; - }>; - rangeland: Attribute.Relation< - 'api::ecoregion.ecoregion', + action: Attribute.String & Attribute.Required; + role: Attribute.Relation< + 'plugin::users-permissions.permission', 'manyToOne', - 'api::rangeland.rangeland' + 'plugin::users-permissions.role' >; - color: Attribute.String & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; - publishedAt: Attribute.DateTime; createdBy: Attribute.Relation< - 'api::ecoregion.ecoregion', + 'plugin::users-permissions.permission', 'oneToOne', 'admin::user' > & Attribute.Private; updatedBy: Attribute.Relation< - 'api::ecoregion.ecoregion', + 'plugin::users-permissions.permission', 'oneToOne', 'admin::user' > & Attribute.Private; - localizations: Attribute.Relation< - 'api::ecoregion.ecoregion', - 'oneToMany', - 'api::ecoregion.ecoregion' - >; - locale: Attribute.String; }; } -export interface ApiLayerLayer extends Schema.CollectionType { - collectionName: 'layers'; +export interface PluginUsersPermissionsRole extends Schema.CollectionType { + collectionName: 'up_roles'; info: { - singularName: 'layer'; - pluralName: 'layers'; - displayName: 'Layer'; + name: 'role'; description: ''; - }; - options: { - draftAndPublish: true; + singularName: 'role'; + pluralName: 'roles'; + displayName: 'Role'; }; pluginOptions: { - i18n: { - localized: true; + 'content-manager': { + visible: false; + }; + 'content-type-builder': { + visible: false; }; }; attributes: { - title: Attribute.String & - Attribute.Required & - Attribute.Unique & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - type: Attribute.Enumeration<['Mapbox', 'GEE']> & - Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; - }> & - Attribute.DefaultTo<'GEE'>; - description: Attribute.Text & - Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - config: Attribute.JSON & - Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; - }>; - params_config: Attribute.JSON & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; - }>; - legend: Attribute.Component<'default.legend'> & + name: Attribute.String & Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - interaction_config: Attribute.JSON & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; - }>; - slug: Attribute.String & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; + Attribute.SetMinMaxLength<{ + minLength: 3; }>; + description: Attribute.String; + type: Attribute.String & Attribute.Unique; + permissions: Attribute.Relation< + 'plugin::users-permissions.role', + 'oneToMany', + 'plugin::users-permissions.permission' + >; + users: Attribute.Relation< + 'plugin::users-permissions.role', + 'oneToMany', + 'plugin::users-permissions.user' + >; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; - publishedAt: Attribute.DateTime; createdBy: Attribute.Relation< - 'api::layer.layer', + 'plugin::users-permissions.role', 'oneToOne', 'admin::user' > & Attribute.Private; updatedBy: Attribute.Relation< - 'api::layer.layer', + 'plugin::users-permissions.role', 'oneToOne', 'admin::user' > & Attribute.Private; - localizations: Attribute.Relation< - 'api::layer.layer', - 'oneToMany', - 'api::layer.layer' - >; - locale: Attribute.String; }; } -export interface ApiRangelandRangeland extends Schema.CollectionType { - collectionName: 'rangelands'; +export interface PluginUsersPermissionsUser extends Schema.CollectionType { + collectionName: 'up_users'; info: { - singularName: 'rangeland'; - pluralName: 'rangelands'; - displayName: 'Rangeland'; + name: 'user'; description: ''; + singularName: 'user'; + pluralName: 'users'; + displayName: 'User'; }; options: { - draftAndPublish: true; - }; - pluginOptions: { - i18n: { - localized: true; - }; + draftAndPublish: false; + timestamps: true; }; attributes: { - title: Attribute.String & + username: Attribute.String & Attribute.Required & - Attribute.SetPluginOptions<{ - i18n: { - localized: true; - }; - }>; - slug: Attribute.String & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; + Attribute.Unique & + Attribute.SetMinMaxLength<{ + minLength: 3; }>; - code: Attribute.String & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; + email: Attribute.Email & + Attribute.Required & + Attribute.SetMinMaxLength<{ + minLength: 6; }>; - color: Attribute.String & - Attribute.SetPluginOptions<{ - i18n: { - localized: false; - }; + provider: Attribute.String; + password: Attribute.Password & + Attribute.Private & + Attribute.SetMinMaxLength<{ + minLength: 6; }>; - ecoregions: Attribute.Relation< - 'api::rangeland.rangeland', - 'oneToMany', - 'api::ecoregion.ecoregion' + resetPasswordToken: Attribute.String & Attribute.Private; + confirmationToken: Attribute.String & Attribute.Private; + confirmed: Attribute.Boolean & Attribute.DefaultTo; + blocked: Attribute.Boolean & Attribute.DefaultTo; + role: Attribute.Relation< + 'plugin::users-permissions.user', + 'manyToOne', + 'plugin::users-permissions.role' >; createdAt: Attribute.DateTime; updatedAt: Attribute.DateTime; - publishedAt: Attribute.DateTime; createdBy: Attribute.Relation< - 'api::rangeland.rangeland', + 'plugin::users-permissions.user', 'oneToOne', 'admin::user' > & Attribute.Private; updatedBy: Attribute.Relation< - 'api::rangeland.rangeland', + 'plugin::users-permissions.user', 'oneToOne', 'admin::user' > & Attribute.Private; - localizations: Attribute.Relation< - 'api::rangeland.rangeland', - 'oneToMany', - 'api::rangeland.rangeland' - >; - locale: Attribute.String; }; } @@ -1157,6 +1157,10 @@ declare module '@strapi/types' { 'admin::api-token-permission': AdminApiTokenPermission; 'admin::transfer-token': AdminTransferToken; 'admin::transfer-token-permission': AdminTransferTokenPermission; + 'api::dataset.dataset': ApiDatasetDataset; + 'api::ecoregion.ecoregion': ApiEcoregionEcoregion; + 'api::layer.layer': ApiLayerLayer; + 'api::rangeland.rangeland': ApiRangelandRangeland; 'plugin::upload.file': PluginUploadFile; 'plugin::upload.folder': PluginUploadFolder; 'plugin::content-releases.release': PluginContentReleasesRelease; @@ -1166,10 +1170,6 @@ declare module '@strapi/types' { 'plugin::users-permissions.permission': PluginUsersPermissionsPermission; 'plugin::users-permissions.role': PluginUsersPermissionsRole; 'plugin::users-permissions.user': PluginUsersPermissionsUser; - 'api::dataset.dataset': ApiDatasetDataset; - 'api::ecoregion.ecoregion': ApiEcoregionEcoregion; - 'api::layer.layer': ApiLayerLayer; - 'api::rangeland.rangeland': ApiRangelandRangeland; } } }