@sap-ux/adp-tooling 0.12.33 → 0.12.35

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,8 +16,10 @@ function getPrompts() {
16
16
  guiOptions: {
17
17
  hint: (0, i18n_1.t)('tooltips.title')
18
18
  },
19
- validate: (value, answers) => answers.subTitle || answers.icon !== '' || value ? true : (0, i18n_1.t)('missingIconOrTitleOrSubtitle'),
20
- store: false
19
+ store: false,
20
+ validate: (value, answers) => answers.subtitle !== '' || answers.icon !== '' || value !== ''
21
+ ? true
22
+ : (0, i18n_1.t)('validators.missingIconOrTitleOrSubtitle')
21
23
  },
22
24
  {
23
25
  type: 'input',
@@ -26,8 +28,10 @@ function getPrompts() {
26
28
  guiOptions: {
27
29
  hint: (0, i18n_1.t)('tooltips.subtitle')
28
30
  },
29
- validate: (value, answers) => value || answers.icon !== '' || answers.title !== '' ? true : (0, i18n_1.t)('missingIconOrTitleOrSubtitle'),
30
- store: false
31
+ store: false,
32
+ validate: (value, answers) => value !== '' || answers.icon !== '' || answers.title !== ''
33
+ ? true
34
+ : (0, i18n_1.t)('validators.missingIconOrTitleOrSubtitle')
31
35
  },
32
36
  {
33
37
  type: 'input',
@@ -37,7 +41,9 @@ function getPrompts() {
37
41
  hint: (0, i18n_1.t)('tooltips.icon')
38
42
  },
39
43
  store: false,
40
- validate: (value, answers) => answers.subTitle || value || answers.title !== '' ? true : (0, i18n_1.t)('missingIconOrTitleOrSubtitle')
44
+ validate: (value, answers) => answers.subtitle !== '' || value !== '' || answers.title !== ''
45
+ ? true
46
+ : (0, i18n_1.t)('validators.missingIconOrTitleOrSubtitle')
41
47
  }
42
48
  ];
43
49
  }
package/dist/types.d.ts CHANGED
@@ -314,7 +314,7 @@ export interface InboundChangeAnswers {
314
314
  /** Title associated with the inbound navigation data. */
315
315
  title: string;
316
316
  /** Subtitle associated with the inbound navigation data. */
317
- subTitle: string;
317
+ subtitle: string;
318
318
  /** Icon associated with the inbound navigation data. */
319
319
  icon: string;
320
320
  }
@@ -39,7 +39,7 @@ class InboundWriter {
39
39
  * @returns {void}
40
40
  */
41
41
  getEnhancedContent(data, content) {
42
- const { icon, title, subTitle } = data.answers;
42
+ const { icon, title, subtitle } = data.answers;
43
43
  if (title) {
44
44
  content.entityPropertyChange.push({
45
45
  propertyPath: 'title',
@@ -47,11 +47,11 @@ class InboundWriter {
47
47
  propertyValue: (0, change_utils_1.getParsedPropertyValue)(title)
48
48
  });
49
49
  }
50
- if (subTitle) {
50
+ if (subtitle) {
51
51
  content.entityPropertyChange.push({
52
52
  propertyPath: 'subTitle',
53
53
  operation: 'UPSERT',
54
- propertyValue: (0, change_utils_1.getParsedPropertyValue)(subTitle)
54
+ propertyValue: (0, change_utils_1.getParsedPropertyValue)(subtitle)
55
55
  });
56
56
  }
57
57
  if (icon) {
package/package.json CHANGED
@@ -9,7 +9,7 @@
9
9
  "bugs": {
10
10
  "url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aadp-tooling"
11
11
  },
12
- "version": "0.12.33",
12
+ "version": "0.12.35",
13
13
  "license": "Apache-2.0",
14
14
  "author": "@SAP/ux-tools-team",
15
15
  "main": "dist/index.js",
@@ -34,7 +34,7 @@
34
34
  "uuid": "10.0.0",
35
35
  "@sap-ux/axios-extension": "1.16.3",
36
36
  "@sap-ux/btp-utils": "0.15.0",
37
- "@sap-ux/inquirer-common": "0.4.4",
37
+ "@sap-ux/inquirer-common": "0.4.5",
38
38
  "@sap-ux/logger": "0.6.0",
39
39
  "@sap-ux/project-access": "1.26.6",
40
40
  "@sap-ux/project-input-validator": "0.3.3",