Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"peerDependencies": {
"@map-colonies/mc-utils": ">=1.8.0",
"@map-colonies/types": "^1.3.5"
"@map-colonies/types": "1.6.0"
},
"devDependencies": {
"@commitlint/cli": "^11.0.0",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ export interface IFieldConfigInfo {
isLifecycleEnvolved?: boolean; // is field might be changed during external processes, outside of the app's form.
isCreateEssential?: boolean; // is field should participate in create process
isUpdateEssential?: boolean; // is field should participate in update process
isMultiSelection?: boolean; // is multi selection field
lookupTable?: string; // lookup table name where from comes allowed values (should participate in server-side validations)
autocomplete?: {
type: 'domain' | 'service';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@ export const TsTypes = {
PRODUCTTYPE: {
value: 'ProductType',
type: PropertiesTypes.ENUM,
importFromPackage: '@map-colonies/mc-model-types',
importFromPackage: '@map-colonies/types',
},
TRANSPARENCY: {
value: 'Transparency',
type: PropertiesTypes.ENUM,
importFromPackage: '@map-colonies/mc-model-types',
importFromPackage: '@map-colonies/types',
},
TILE_OUTPUT_FORMAT: {
value: 'TileOutputFormat',
Expand All @@ -112,7 +112,7 @@ export const TsTypes = {
RECORD_STATUS: {
value: 'RecordStatus',
type: PropertiesTypes.ENUM,
importFromPackage: '@map-colonies/mc-model-types',
importFromPackage: '@map-colonies/types',
},
} satisfies Record<string, IDescribeTsType>;

Expand Down
1 change: 1 addition & 0 deletions src/models/layerMetadata/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ export * from './pycsw3DCatalogRecord';
export * from './pycswDEMCatalogRecord';
export * from './pycswVectorBestCatalogRecord';
export * from './pycswQuantizedMeshBestCatalogRecord';
export * from './enums';
2 changes: 2 additions & 0 deletions src/models/layerMetadata/layer3DMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -855,6 +855,8 @@ export class Layer3DMetadata implements ILayer3DMetadata, IMetadataCommonModel {
@fieldConfig({
category: FieldCategory.GENERAL,
infoMsgCode: ['info-field-tooltip.region.tooltip', 'info-general-tooltip.required'],
isMultiSelection: true,
lookupTable: 'countries',
validation: [
{
errorMsgCode: 'validation-general.required',
Expand Down
2 changes: 2 additions & 0 deletions src/models/layerMetadata/layerDEMMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -392,6 +392,8 @@ export class LayerDemMetadata implements ILayerMetadata, IMetadataCommonModel {
@fieldConfig({
category: FieldCategory.GENERAL,
infoMsgCode: ['info-field-tooltip.region.tooltip', 'info-general-tooltip.required'],
isMultiSelection: true,
lookupTable: 'countries',
validation: [
{
errorMsgCode: 'validation-general.required',
Expand Down
46 changes: 46 additions & 0 deletions src/models/layerMetadata/layerRASTERMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -550,6 +550,8 @@ export class LayerMetadata implements RasterLayerMetadata {
@fieldConfig({
category: FieldCategory.GENERAL,
isManuallyEditable: true,
isMultiSelection: true,
lookupTable: 'countries',
infoMsgCode: ['info-field-tooltip.region.tooltip', 'info-general-tooltip.required'],
validation: [
{
Expand Down Expand Up @@ -1128,6 +1130,50 @@ export class LayerMetadata implements RasterLayerMetadata {

//#endregion

public constructor() {
const DUMMY_VALUE_STRING = 'DUMMY_VALUE';
const DUMMY_VALUE_NUMBER = 0;
const DUMMY_VALUE_TRANSPARENCY = Transparency.OPAQUE;
const DUMMY_VALUE_TILE_OUTPUT_FORMAT = TileOutputFormat.JPEG;
const DUMMY_VALUE_TILE_MIME_FORMAT = 'image/png';

this.classification = DUMMY_VALUE_STRING;
this.id = DUMMY_VALUE_STRING;
this.srs = DUMMY_VALUE_STRING;
this.productVersion = DUMMY_VALUE_STRING;
this.maxResolutionDeg = DUMMY_VALUE_NUMBER;
this.minResolutionDeg = DUMMY_VALUE_NUMBER;
this.rms = DUMMY_VALUE_NUMBER;
this.scale = DUMMY_VALUE_NUMBER;
this.creationDateUTC = new Date();
this.ingestionDate = new Date();
this.minHorizontalAccuracyCE90 = DUMMY_VALUE_NUMBER;
this.maxHorizontalAccuracyCE90 = DUMMY_VALUE_NUMBER;
this.region = [DUMMY_VALUE_STRING];
this.sensors = [DUMMY_VALUE_STRING];
this.imagingTimeBeginUTC = new Date();
this.imagingTimeEndUTC = new Date();
this.updateDateUTC = new Date();
this.maxResolutionMeter = DUMMY_VALUE_NUMBER;
this.minResolutionMeter = DUMMY_VALUE_NUMBER;
this.productSubType = DUMMY_VALUE_STRING;
this.productBoundingBox = DUMMY_VALUE_STRING;
this.displayPath = DUMMY_VALUE_STRING;
this.transparency = DUMMY_VALUE_TRANSPARENCY;
this.tileMimeFormat = DUMMY_VALUE_TILE_MIME_FORMAT;
this.tileOutputFormat = DUMMY_VALUE_TILE_OUTPUT_FORMAT;
this.type = RecordType.RECORD_RASTER;
this.classification = DUMMY_VALUE_STRING;
this.productName = DUMMY_VALUE_STRING;
this.description = DUMMY_VALUE_STRING;
this.srsName = DUMMY_VALUE_STRING;
this.producerName = DUMMY_VALUE_STRING;
this.sensors = [DUMMY_VALUE_STRING];
this.region = [DUMMY_VALUE_STRING];
this.productId = DUMMY_VALUE_STRING;
this.productType = ProductType.ORTHOPHOTO;
}

public static getPyCSWMapping(prop: string): IPYCSWMapping | undefined {
return getPyCSWMapping<LayerMetadata>(new LayerMetadata(), prop);
}
Expand Down
2 changes: 2 additions & 0 deletions src/models/layerMetadata/quantizedMeshBestMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,8 @@ export class QuantizedMeshBestMetadata implements IQuantizedMeshBestMetadata, IM
@fieldConfig({
category: FieldCategory.GENERAL,
infoMsgCode: ['info-field-tooltip.region.tooltip', 'info-general-tooltip.required'],
isMultiSelection: true,
lookupTable: 'countries',
validation: [
{
errorMsgCode: 'validation-general.required',
Expand Down
2 changes: 2 additions & 0 deletions src/models/layerMetadata/vectorBestMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,8 @@ export class VectorBestMetadata implements IVectorBestMetadata {
@fieldConfig({
category: FieldCategory.GENERAL,
infoMsgCode: ['info-field-tooltip.region.tooltip', 'info-general-tooltip.required'],
isMultiSelection: true,
lookupTable: 'countries',
validation: [
{
errorMsgCode: 'validation-general.required',
Expand Down