Skip to content

Commit

Permalink
resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
kjose90 committed Oct 9, 2024
2 parents 2136a9c + 5580e99 commit 86566e3
Show file tree
Hide file tree
Showing 213 changed files with 4,534 additions and 690 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ out

.nuxt
dist
generators

# Gatsby files

Expand Down
12 changes: 12 additions & 0 deletions examples/fe-fpm-cli/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @sap-ux/fe-fpm-cli

## 0.0.34

### Patch Changes

- @sap-ux/fe-fpm-writer@0.31.7

## 0.0.33

### Patch Changes

- @sap-ux/fe-fpm-writer@0.31.6

## 0.0.32

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/fe-fpm-cli/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sap-ux/fe-fpm-cli",
"version": "0.0.32",
"version": "0.0.34",
"description": "A simple CLI to prompt required information to create a building block using the fe-fpm-writer module's prompt and generate functions.",
"license": "Apache-2.0",
"private": true,
Expand Down
23 changes: 23 additions & 0 deletions examples/simple-generator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# @sap-ux/generator-simple-fe

## 1.0.57

### Patch Changes

- @sap-ux/axios-extension@1.16.6
- @sap-ux/system-access@0.5.12
- @sap-ux/fiori-elements-writer@1.3.5
- @sap-ux/fiori-freestyle-writer@1.2.3

## 1.0.56

### Patch Changes

- @sap-ux/fiori-elements-writer@1.3.4
- @sap-ux/fiori-freestyle-writer@1.2.2

## 1.0.55

### Patch Changes

- @sap-ux/system-access@0.5.12
- @sap-ux/fiori-elements-writer@1.3.3

## 1.0.54

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion examples/simple-generator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sap-ux/generator-simple-fe",
"version": "1.0.54",
"version": "1.0.57",
"description": "Simple example of a yeoman generator for Fiori elements.",
"license": "Apache-2.0",
"private": true,
Expand Down
24 changes: 24 additions & 0 deletions examples/ui-prompting-examples/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# @sap-ux-private/ui-prompting-examples

## 0.2.3

### Patch Changes

- Updated dependencies [0b8a374]
- @sap-ux/ui-prompting@0.2.3

## 0.2.2

### Patch Changes

- Updated dependencies [64aacf2]
- @sap-ux/ui-components@1.18.6
- @sap-ux/ui-prompting@0.2.2

## 0.2.1

### Patch Changes

- 93f8a83: chore - upgrade typescript 5.6.2
- Updated dependencies [93f8a83]
- @sap-ux/ui-components@1.18.5
- @sap-ux/ui-prompting@0.2.1

## 0.2.0

### Minor Changes
Expand Down
4 changes: 2 additions & 2 deletions examples/ui-prompting-examples/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sap-ux-private/ui-prompting-examples",
"version": "0.2.0",
"version": "0.2.3",
"description": "This project contains UI storybook stories with exampleS with prompt ui and FPM based building blocks.",
"license": "Apache-2.0",
"private": true,
Expand Down Expand Up @@ -67,7 +67,7 @@
"style-loader": "3.3.3",
"ts-loader": "9.4.4",
"ts-node": "10.9.2",
"typescript": "5.3.3",
"typescript": "5.6.2",
"ws": "8.18.0"
}
}
7 changes: 6 additions & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,12 @@
"targetDefaults": {
"build": {
"dependsOn": ["^build"],
"outputs": ["{projectRoot}/dist", "{projectRoot}/lib", "{projectRoot}/storybook"]
"outputs": [
"{projectRoot}/dist",
"{projectRoot}/generators",
"{projectRoot}/lib",
"{projectRoot}/storybook"
]
},
"test": {
"inputs": ["default", "^prod", "{workspaceRoot}/jest.base.js", "{projectRoot}/jest.config.js"],
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"pretty-quick": "3.1.3",
"rimraf": "5.0.5",
"ts-jest": "29.1.2",
"typescript": "5.3.3",
"typescript": "5.6.2",
"update-ts-references": "3.2.1"
},
"scripts": {
Expand Down
24 changes: 24 additions & 0 deletions packages/abap-deploy-config-inquirer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# @sap-ux/abap-deploy-config-inquirer

## 0.0.25

### Patch Changes

- @sap-ux/axios-extension@1.16.6
- @sap-ux/fiori-generator-shared@0.6.1
- @sap-ux/system-access@0.5.12

## 0.0.24

### Patch Changes

- Updated dependencies [d40af34]
- @sap-ux/fiori-generator-shared@0.6.0

## 0.0.23

### Patch Changes

- Updated dependencies [93f8a83]
- @sap-ux/store@0.9.2
- @sap-ux/system-access@0.5.12
- @sap-ux/ui5-config@0.25.0

## 0.0.22

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/abap-deploy-config-inquirer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"url": "https://github.com/SAP/open-ux-tools.git",
"directory": "packages/abap-deploy-config-inquirer"
},
"version": "0.0.22",
"version": "0.0.25",
"license": "Apache-2.0",
"main": "dist/index.js",
"scripts": {
Expand Down
16 changes: 16 additions & 0 deletions packages/abap-deploy-config-writer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @sap-ux/abap-deploy-config-writer

## 0.0.47

### Patch Changes

- Updated dependencies [eb74890]
- @sap-ux/project-access@1.27.6
- @sap-ux/system-access@0.5.12

## 0.0.46

### Patch Changes

- 93f8a83: chore - upgrade typescript 5.6.2
- @sap-ux/system-access@0.5.12
- @sap-ux/ui5-config@0.25.0

## 0.0.45

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/abap-deploy-config-writer/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"url": "https://github.com/SAP/open-ux-tools.git",
"directory": "packages/abap-deploy-config-writer"
},
"version": "0.0.45",
"version": "0.0.47",
"license": "Apache-2.0",
"main": "dist/index.js",
"scripts": {
Expand Down
2 changes: 1 addition & 1 deletion packages/abap-deploy-config-writer/test/unit/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const mockIsAppStudio = isAppStudio as jest.Mock;

describe('generate', () => {
const outputDir = join(__dirname, '../test-output');
const debug = true ?? !!process.env['UX_DEBUG'];
const debug = !!process.env['UX_DEBUG'];

beforeAll(async () => {
fsExtra.removeSync(outputDir);
Expand Down
16 changes: 16 additions & 0 deletions packages/adp-tooling/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,21 @@
# @sap-ux/adp-tooling

## 0.12.56

### Patch Changes

- Updated dependencies [eb74890]
- @sap-ux/project-access@1.27.6
- @sap-ux/axios-extension@1.16.6
- @sap-ux/system-access@0.5.12

## 0.12.55

### Patch Changes

- @sap-ux/system-access@0.5.12
- @sap-ux/ui5-config@0.25.0

## 0.12.54

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/adp-tooling/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"bugs": {
"url": "https://github.com/SAP/open-ux-tools/issues?q=is%3Aopen+is%3Aissue+label%3Abug+label%3Aadp-tooling"
},
"version": "0.12.54",
"version": "0.12.56",
"license": "Apache-2.0",
"author": "@SAP/ux-tools-team",
"main": "dist/index.js",
Expand Down
17 changes: 17 additions & 0 deletions packages/annotation-generator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# @sap-ux/annotation-generator

## 0.2.7

### Patch Changes

- Updated dependencies [eb74890]
- @sap-ux/project-access@1.27.6
- @sap-ux/fiori-annotation-api@0.2.7

## 0.2.6

### Patch Changes

- Updated dependencies [93f8a83]
- @sap-ux/odata-annotation-core-types@0.4.2
- @sap-ux/odata-entity-model@0.3.1
- @sap-ux/fiori-annotation-api@0.2.6

## 0.2.5

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/annotation-generator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@sap-ux/annotation-generator",
"version": "0.2.5",
"version": "0.2.7",
"description": "Library that provides API for generation of annotations by SAP Fiori App Generator",
"publisher": "SAPSE",
"author": "SAP SE",
Expand Down
22 changes: 22 additions & 0 deletions packages/app-config-writer/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,27 @@
# @sap-ux/app-config-writer

## 0.4.39

### Patch Changes

- Updated dependencies [eb74890]
- @sap-ux/project-access@1.27.6
- @sap-ux/axios-extension@1.16.6

## 0.4.38

### Patch Changes

- Updated dependencies [93f8a83]
- @sap-ux/store@0.9.2
- @sap-ux/ui5-config@0.25.0

## 0.4.37

### Patch Changes

- 4904d67: extra input field validation

## 0.4.36

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/app-config-writer/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@sap-ux/app-config-writer",
"description": "Add or update configuration for SAP Fiori tools application",
"version": "0.4.36",
"version": "0.4.39",
"repository": {
"type": "git",
"url": "https://github.com/SAP/open-ux-tools.git",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-config-writer/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export { getSmartLinksTargetFromPrompt, promptInboundNavigationConfig } from './prompt';
export { getSmartLinksTargetFromPrompt, promptInboundNavigationConfig, validateText } from './prompt';
export { generateSmartLinksConfig } from './smartlinks-config';
export { generateInboundNavigationConfig } from './navigation-config';
2 changes: 1 addition & 1 deletion packages/app-config-writer/src/prompt/index.ts
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
export { getSmartLinksTargetFromPrompt, promptUserPass } from './smartlinks-config';
export { promptInboundNavigationConfig } from './navigation-config';
export { promptInboundNavigationConfig, validateText } from './navigation-config';
26 changes: 23 additions & 3 deletions packages/app-config-writer/src/prompt/navigation-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { create as createStorage } from 'mem-fs';
import { create } from 'mem-fs-editor';
import type { Editor } from 'mem-fs-editor';
import { readManifest } from '../navigation-config';
import type { AllowedCharacters } from '../types/';

/**
* Prompt for inbound navigation configuration values.
Expand Down Expand Up @@ -44,9 +45,15 @@ export async function promptInboundNavigationConfig(
* @param input the text input to validate
* @param inputName the name of the input as seen by the user
* @param maxLength optional, the maximum length of text to allow
* @param allowedCharacters optional, define a list of special characters that should be allowed in the input field
* @returns true, if all validation checks pass or a message explaining the validation failure
*/
function validateText(input: string, inputName: string, maxLength = 0): boolean | string {
export function validateText(
input: string,
inputName: string,
maxLength = 0,
allowedCharacters?: AllowedCharacters[]
): boolean | string {
if (input?.trim().length === 0) {
return t('prompt.validationWarning.inputRequired', {
inputName,
Expand All @@ -57,6 +64,19 @@ function validateText(input: string, inputName: string, maxLength = 0): boolean
if (maxLength && input.length > maxLength) {
return t('prompt.validationWarning.maxLength', { maxLength, ns: NAV_CONFIG_NS });
}

// Asterisks is supported for the semantic object and action field but not the inbound title
if (allowedCharacters) {
const escapedChars = allowedCharacters.map((char) => `\\${char}`).join('');
const regex = new RegExp(`^[a-zA-Z0-9${escapedChars}]+$`);
if (!regex.test(input)) {
return t('prompt.validationWarning.supportedFormats', {
ns: NAV_CONFIG_NS,
allowedCharacters: allowedCharacters.join('')
});
}
}

return true;
}

Expand All @@ -77,14 +97,14 @@ function getPrompts(inboundKeys: string[]): PromptObject[] {
type: 'text',
message: semanticObjectInputMsg,
format: (val) => val?.trim(),
validate: (val) => validateText(val, semanticObjectInputMsg, 30)
validate: (val) => validateText(val, semanticObjectInputMsg, 30, ['_'])
},
{
name: 'action',
type: 'text',
message: actionInputMsg,
format: (val) => val?.trim(),
validate: (val) => validateText(val, actionInputMsg, 60)
validate: (val) => validateText(val, actionInputMsg, 60, ['_'])
},
{
type: (prev, values) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"prompt": {
"validationWarning": {
"inputRequired": "{{inputName}} input is required",
"maxLength": "Maximum length: {{maxLength}} characters"
"maxLength": "Maximum length: {{maxLength}} characters",
"supportedFormats": "Only alphanumeric and '{{allowedCharacters}}' characters are allowed"
},
"message": {
"semanticObject": "Semantic Object",
Expand Down
Loading

0 comments on commit 86566e3

Please sign in to comment.