diff --git a/package-lock.json b/package-lock.json index 7dcab81800..502b67d6e7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -22114,12 +22114,14 @@ "@ngx-translate/core": { "version": "12.1.2", "resolved": "https://registry.npmjs.org/@ngx-translate/core/-/core-12.1.2.tgz", - "integrity": "sha512-ZudJsqIxTKlLmPoqK8gJY3UpMGujR0Xm7HfXL6AR79yGRS23QqpjAhMfx4v5qUCcHMmQ9/78bW8QJLfp31c7vQ==" + "integrity": "sha512-ZudJsqIxTKlLmPoqK8gJY3UpMGujR0Xm7HfXL6AR79yGRS23QqpjAhMfx4v5qUCcHMmQ9/78bW8QJLfp31c7vQ==", + "requires": {} }, "@ngx-translate/http-loader": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/@ngx-translate/http-loader/-/http-loader-5.0.0.tgz", - "integrity": "sha512-8+aV7N52qed+6t4LIu4Yru/PkeBX4TR2ioXGwXzQE5syqSLTj/8TgKQIi3i2Z61ZhPxQG1qrGbapUoGQzUDVeg==" + "integrity": "sha512-8+aV7N52qed+6t4LIu4Yru/PkeBX4TR2ioXGwXzQE5syqSLTj/8TgKQIi3i2Z61ZhPxQG1qrGbapUoGQzUDVeg==", + "requires": {} }, "@nodelib/fs.scandir": { "version": "2.1.5", @@ -23283,7 +23285,8 @@ "version": "5.3.1", "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", - "dev": true + "dev": true, + "requires": {} }, "adjust-sourcemap-loader": { "version": "4.0.0", @@ -23347,13 +23350,15 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/ajv-errors/-/ajv-errors-1.0.1.tgz", "integrity": "sha512-DCRfO/4nQ+89p/RK43i8Ezd41EqdGIU4ld7nGF8OQ14oc/we5rEntLCUa7+jrn3nn83BosfwZA0wb4pon2o8iQ==", - "dev": true + "dev": true, + "requires": {} }, "ajv-keywords": { "version": "3.5.2", "resolved": "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz", "integrity": "sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ==", - "dev": true + "dev": true, + "requires": {} }, "alphanum-sort": { "version": "1.0.2", @@ -24302,7 +24307,8 @@ "version": "5.2.2", "resolved": "https://registry.npmjs.org/circular-dependency-plugin/-/circular-dependency-plugin-5.2.2.tgz", "integrity": "sha512-g38K9Cm5WRwlaH6g03B9OEz/0qRizI+2I7n+Gz+L5DxXJAPAiWQvwlYNm1V1jkdpUv95bOe/ASm2vfi/G560jQ==", - "dev": true + "dev": true, + "requires": {} }, "ckeditor5-custom-build": { "version": "git+ssh://git@github.com/dasch-swiss/ckeditor_custom_build.git#c3c67816fd7fa7e7dfd9295ef99a5e49ca431876", @@ -24492,13 +24498,15 @@ "version": "9.0.0", "resolved": "https://registry.npmjs.org/@angular/compiler/-/compiler-9.0.0.tgz", "integrity": "sha512-ctjwuntPfZZT2mNj2NDIVu51t9cvbhl/16epc5xEwyzyDt76pX9UgwvY+MbXrf/C/FWwdtmNtfP698BKI+9leQ==", - "dev": true + "dev": true, + "requires": {} }, "@angular/core": { "version": "9.0.0", "resolved": "https://registry.npmjs.org/@angular/core/-/core-9.0.0.tgz", "integrity": "sha512-6Pxgsrf0qF9iFFqmIcWmjJGkkCaCm6V5QNnxMy2KloO3SDq6QuMVRbN9RtC8Urmo25LP+eZ6ZgYqFYpdD8Hd9w==", - "dev": true + "dev": true, + "requires": {} }, "source-map": { "version": "0.5.7", @@ -25305,7 +25313,8 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/cssnano-utils/-/cssnano-utils-2.0.1.tgz", "integrity": "sha512-i8vLRZTnEH9ubIyfdZCAdIdgnHAUeQeByEeQ2I7oTilvP9oHO6RScpeq3GsFUVqeB8uZgOQ9pw8utofNn32hhQ==", - "dev": true + "dev": true, + "requires": {} }, "csso": { "version": "4.2.0", @@ -28011,7 +28020,8 @@ "version": "5.1.0", "resolved": "https://registry.npmjs.org/icss-utils/-/icss-utils-5.1.0.tgz", "integrity": "sha512-soFhflCVWLfRNOPU3iv5Z9VUdT44xFRbzjLsEzSr5AQmgqPMTHdU3PMT1Cf1ssx8fLNJDA1juftYl+PUcv3MqA==", - "dev": true + "dev": true, + "requires": {} }, "ieee754": { "version": "1.2.1", @@ -29090,7 +29100,8 @@ "version": "1.6.0", "resolved": "https://registry.npmjs.org/karma-jasmine-html-reporter/-/karma-jasmine-html-reporter-1.6.0.tgz", "integrity": "sha512-ELO9yf0cNqpzaNLsfFgXd/wxZVYkE2+ECUwhMHUD4PZ17kcsPsYsVyjquiRqyMn2jkd2sHt0IeMyAyq1MC23Fw==", - "dev": true + "dev": true, + "requires": {} }, "karma-source-map-support": { "version": "1.4.0", @@ -31199,25 +31210,29 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/postcss-discard-comments/-/postcss-discard-comments-5.0.1.tgz", "integrity": "sha512-lgZBPTDvWrbAYY1v5GYEv8fEO/WhKOu/hmZqmCYfrpD6eyDWWzAOsl2rF29lpvziKO02Gc5GJQtlpkTmakwOWg==", - "dev": true + "dev": true, + "requires": {} }, "postcss-discard-duplicates": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/postcss-discard-duplicates/-/postcss-discard-duplicates-5.0.1.tgz", "integrity": "sha512-svx747PWHKOGpAXXQkCc4k/DsWo+6bc5LsVrAsw+OU+Ibi7klFZCyX54gjYzX4TH+f2uzXjRviLARxkMurA2bA==", - "dev": true + "dev": true, + "requires": {} }, "postcss-discard-empty": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/postcss-discard-empty/-/postcss-discard-empty-5.0.1.tgz", "integrity": "sha512-vfU8CxAQ6YpMxV2SvMcMIyF2LX1ZzWpy0lqHDsOdaKKLQVQGVP1pzhrI9JlsO65s66uQTfkQBKBD/A5gp9STFw==", - "dev": true + "dev": true, + "requires": {} }, "postcss-discard-overridden": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/postcss-discard-overridden/-/postcss-discard-overridden-5.0.1.tgz", "integrity": "sha512-Y28H7y93L2BpJhrdUR2SR2fnSsT+3TVx1NmVQLbcnZWwIUpJ7mfcTC6Za9M2PG6w8j7UQRfzxqn8jU2VwFxo3Q==", - "dev": true + "dev": true, + "requires": {} }, "postcss-import": { "version": "14.0.0", @@ -31336,7 +31351,8 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/postcss-modules-extract-imports/-/postcss-modules-extract-imports-3.0.0.tgz", "integrity": "sha512-bdHleFnP3kZ4NYDhuGlVK+CMrQ/pqUm8bx/oGL93K6gVwiclvX5x0n76fYMKuIGKzlABOy13zsvqjb0f92TEXw==", - "dev": true + "dev": true, + "requires": {} }, "postcss-modules-local-by-default": { "version": "4.0.0", @@ -31371,7 +31387,8 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/postcss-normalize-charset/-/postcss-normalize-charset-5.0.1.tgz", "integrity": "sha512-6J40l6LNYnBdPSk+BHZ8SF+HAkS4q2twe5jnocgd+xWpz/mx/5Sa32m3W1AA8uE8XaXN+eg8trIlfu8V9x61eg==", - "dev": true + "dev": true, + "requires": {} }, "postcss-normalize-display-values": { "version": "5.0.1", @@ -34095,7 +34112,8 @@ "three-spritetext": { "version": "1.6.2", "resolved": "https://registry.npmjs.org/three-spritetext/-/three-spritetext-1.6.2.tgz", - "integrity": "sha512-VALj40t81Z6x/fDnY/tts8QU+mBl77bxoynBbcn/DW4oxfzZSwjaOfkQOe0jYpLoK2vtP0bAULvGgwIYnsN6oQ==" + "integrity": "sha512-VALj40t81Z6x/fDnY/tts8QU+mBl77bxoynBbcn/DW4oxfzZSwjaOfkQOe0jYpLoK2vtP0bAULvGgwIYnsN6oQ==", + "requires": {} }, "through": { "version": "2.3.8", @@ -36435,7 +36453,8 @@ "version": "7.4.6", "resolved": "https://registry.npmjs.org/ws/-/ws-7.4.6.tgz", "integrity": "sha512-YmhHDO4MzaDLB+M9ym/mDA5z0naX8j7SIlT8f8z+I0VtzsRbekxEutHSme7NPS2qE8StCYQNUnfWdXta/Yu85A==", - "dev": true + "dev": true, + "requires": {} }, "xml2js": { "version": "0.4.23", diff --git a/src/app/project/ontology/default-data/default-properties.ts b/src/app/project/ontology/default-data/default-properties.ts index ea60f72e51..eb344755a5 100644 --- a/src/app/project/ontology/default-data/default-properties.ts +++ b/src/app/project/ontology/default-data/default-properties.ts @@ -25,6 +25,7 @@ export interface PropertyCategory { export interface DefaultProperty { icon: string; label: string; + description: string; subPropOf: string; objectType?: string; guiEle: string; @@ -39,6 +40,7 @@ export class DefaultProperties { { icon: 'short_text', label: 'Short', + description: 'Short text such as title or name', subPropOf: Constants.HasValue, objectType: Constants.TextValue, guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'SimpleText', // 'Input', @@ -47,6 +49,7 @@ export class DefaultProperties { { icon: 'subject', label: 'Paragraph', + description: 'Long text such as description; could have line breaks', subPropOf: Constants.HasValue, objectType: Constants.TextValue, guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'Textarea', @@ -54,7 +57,8 @@ export class DefaultProperties { }, { icon: 'line_style', - label: 'Editor', + label: 'Rich Text', + description: 'A rich text editor with formatting options', subPropOf: Constants.HasValue, objectType: Constants.TextValue, guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'Richtext', @@ -68,39 +72,43 @@ export class DefaultProperties { { icon: 'arrow_drop_down_circle', label: 'Dropdown', + description: 'Dropdown menu with values from predefined list', subPropOf: Constants.HasValue, objectType: Constants.ListValue, guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'List', // 'Pulldown' group: 'List' - }, - { - icon: 'check_box', - label: 'Checkboxes', - subPropOf: Constants.HasValue, - objectType: Constants.ListValue, - guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'Checkbox', - group: 'List' - }, - { - icon: 'radio_button_checked', - label: 'Multiple choice', - subPropOf: Constants.HasValue, - objectType: Constants.ListValue, - guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'Radio', - group: 'List' } + // { + // icon: 'check_box', + // label: 'Checkboxes', + // description: 'Select multiple values from predefined short list', + // subPropOf: Constants.HasValue, + // objectType: Constants.ListValue, + // guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'Checkbox', + // group: 'List' + // }, + // { + // icon: 'radio_button_checked', + // label: 'Multiple choice', + // description: 'Select only one value from predefined short list', + // subPropOf: Constants.HasValue, + // objectType: Constants.ListValue, + // guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'Radio', + // group: 'List' + // } ] }, { - group: 'Selection (boolean)', + group: 'Boolean', elements: [ { icon: 'toggle_off', label: 'Yes / No', + description: 'Yes or no, 1 or 0, true or false', subPropOf: Constants.HasValue, objectType: Constants.BooleanValue, guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'Checkbox', // should be 'Toggle' but it's not supported in DSP-Tangoh, - group: 'Selection (boolean)' + group: 'Boolean' } ] }, @@ -110,6 +118,7 @@ export class DefaultProperties { { icon: 'calendar_today', label: 'Date', + description: 'A date picker with day, month and year', subPropOf: Constants.HasValue, objectType: Constants.DateValue, guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'Date', @@ -118,6 +127,7 @@ export class DefaultProperties { { icon: 'date_range', label: 'Period', + description: 'A period of time between two dates', subPropOf: Constants.HasValue, objectType: Constants.DateValue, guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'Date', @@ -126,6 +136,7 @@ export class DefaultProperties { { icon: 'access_time', label: 'Timestamp', + description: 'A single timestamp on a timeline', subPropOf: Constants.HasValue, objectType: Constants.TimeValue, guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'TimeStamp', @@ -133,7 +144,8 @@ export class DefaultProperties { }, { icon: 'timelapse', - label: 'Duration', + label: 'Time sequence', + description: 'A time sequence with start and end point on a timeline', subPropOf: Constants.HasValue, objectType: Constants.TimeValue, guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'Interval', @@ -147,6 +159,7 @@ export class DefaultProperties { { icon: 'money', label: 'Integer', + description: 'Integer value', subPropOf: Constants.HasValue, objectType: Constants.IntValue, guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'Spinbox', // 'Number', @@ -155,6 +168,7 @@ export class DefaultProperties { { icon: 'functions', label: 'Decimal', + description: 'Decimal value', subPropOf: Constants.HasValue, objectType: Constants.DecimalValue, guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'Spinbox', // 'Number', @@ -163,15 +177,16 @@ export class DefaultProperties { ] }, { - group: 'Link', + group: 'Link / Relation', elements: [ { icon: 'link', label: 'Resource class', + description: 'Refers to a resource class', subPropOf: Constants.HasLinkTo, objectType: Constants.LinkValue, guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'Searchbox', // 'Autocomplete', - group: 'Link' + group: 'Link / Relation' }, // { // icon: 'picture_in_picture', @@ -192,6 +207,7 @@ export class DefaultProperties { { icon: 'language', label: 'External URL', + description: 'Link to an external website', subPropOf: Constants.HasValue, objectType: Constants.UriValue, guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'SimpleText', @@ -205,6 +221,7 @@ export class DefaultProperties { { icon: 'place', label: 'Place', + description: 'Geographical location', subPropOf: Constants.HasValue, objectType: Constants.GeonameValue, guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'Geonames', @@ -218,18 +235,11 @@ export class DefaultProperties { { icon: 'palette', label: 'Color', + description: 'A simple color value', subPropOf: Constants.HasValue, objectType: Constants.ColorValue, guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'Colorpicker', group: 'Shape' - }, - { - icon: 'format_shapes', - label: 'Geometry', - subPropOf: Constants.HasValue, - objectType: Constants.GeomValue, - guiEle: Constants.SalsahGui + Constants.HashDelimiter + 'Geometry', - group: 'Shape' } ] } diff --git a/src/app/project/ontology/ontology.component.html b/src/app/project/ontology/ontology.component.html index ad638a4d23..8ae7785a92 100644 --- a/src/app/project/ontology/ontology.component.html +++ b/src/app/project/ontology/ontology.component.html @@ -165,6 +165,7 @@

diff --git a/src/app/project/ontology/property-form/property-form.component.spec.ts b/src/app/project/ontology/property-form/property-form.component.spec.ts index 11f1f7ac8b..b7668b237e 100644 --- a/src/app/project/ontology/property-form/property-form.component.spec.ts +++ b/src/app/project/ontology/property-form/property-form.component.spec.ts @@ -61,6 +61,7 @@ class SimpleTextHostComponent { 'propType': { 'icon': 'short_text', 'label': 'Short', + 'description': 'Small text such as title or name', 'subPropOf': 'http://api.knora.org/ontology/knora-api/v2#hasValue', 'objectType': 'http://api.knora.org/ontology/knora-api/v2#TextValue', 'guiEle': 'http://api.knora.org/ontology/salsah-gui/v2#SimpleText', @@ -111,6 +112,7 @@ class LinkHostComponent { 'propType': { 'icon': 'link', 'label': 'Resource class', + 'description': 'Refers to a resource class', 'subPropOf': 'http://api.knora.org/ontology/knora-api/v2#hasLinkTo', 'objectType': 'http://api.knora.org/ontology/knora-api/v2#LinkValue', 'guiEle': 'http://api.knora.org/ontology/salsah-gui/v2#Searchbox', diff --git a/src/app/project/ontology/resource-class-info/resource-class-info.component.html b/src/app/project/ontology/resource-class-info/resource-class-info.component.html index 44c7ae878d..92992cb7e0 100644 --- a/src/app/project/ontology/resource-class-info/resource-class-info.component.html +++ b/src/app/project/ontology/resource-class-info/resource-class-info.component.html @@ -87,15 +87,18 @@ - -