Skip to content

Commit

Permalink
refactor: consume inquire-gui v3.2.0 + foodq examples (#868)
Browse files Browse the repository at this point in the history
refactor: consume inquire-gui v3.2.0 + foodq examples
  • Loading branch information
TirottaSAP authored Feb 27, 2025
1 parent ba114f9 commit 5c3de76
Show file tree
Hide file tree
Showing 4 changed files with 60 additions and 8 deletions.
3 changes: 2 additions & 1 deletion packages/frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,13 +60,14 @@
},
"dependencies": {
"@mdi/font": "5.9.55",
"@sap-devx/inquirer-gui": "3.1.0",
"@sap-devx/inquirer-gui": "3.2.0",
"@sap-devx/inquirer-gui-auto-complete-plugin": "3.0.6",
"@sap-devx/inquirer-gui-file-browser-plugin": "3.0.3",
"@sap-devx/inquirer-gui-folder-browser-plugin": "3.0.3",
"@sap-devx/inquirer-gui-label-plugin": "3.0.3",
"@sap-devx/inquirer-gui-login-plugin": "3.0.3",
"@sap-devx/inquirer-gui-tiles-plugin": "3.0.3",
"@sap-devx/inquirer-gui-radio-plugin": "3.2.0",
"@sap-devx/webview-rpc": "0.4.1",
"@sap-devx/yeoman-ui-types": "^1.17.1",
"core-js": "^3.8.3",
Expand Down
6 changes: 6 additions & 0 deletions packages/frontend/src/youi/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import FileBrowserPlugin from "@sap-devx/inquirer-gui-file-browser-plugin";
import FolderBrowserPlugin from "@sap-devx/inquirer-gui-folder-browser-plugin";
import LoginPlugin from "@sap-devx/inquirer-gui-login-plugin";
import TilesPlugin from "@sap-devx/inquirer-gui-tiles-plugin";
import RadioPlugin from "@sap-devx/inquirer-gui-radio-plugin";
import LabelPlugin from "@sap-devx/inquirer-gui-label-plugin";
import AutoCompletePlugin from "@sap-devx/inquirer-gui-auto-complete-plugin";
import YoUiApp from "./App.vue";
Expand All @@ -12,6 +13,7 @@ import "@sap-devx/inquirer-gui/dist/form.css";
import "@sap-devx/inquirer-gui-auto-complete-plugin/dist/autoCompletePlugin.css";
import "@sap-devx/inquirer-gui-label-plugin/dist/labelPlugin.css";
import "@sap-devx/inquirer-gui-tiles-plugin/dist/tilesPlugin.css";
import "@sap-devx/inquirer-gui-radio-plugin/dist/radioPlugin.css";
import Form from "@sap-devx/inquirer-gui";

const plugins = [];
Expand All @@ -38,6 +40,10 @@ options = {};
app.use(TilesPlugin, options);
plugins.push(options.plugin);

options = {};
app.use(RadioPlugin, options);
plugins.push(options.plugin);

options = {};
app.use(LabelPlugin, options);
plugins.push(options.plugin);
Expand Down
13 changes: 13 additions & 0 deletions packages/generator-foodq/generators/app/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,23 @@ module.exports = class extends Generator {
},
when: () => _.isNil(this._getOption("confirmHungry")),
},
{
type: "input",
guiOptions: {
type: "radio",
hint: "No picky eaters allowed—our chef takes it personally.",
},
name: "diningStyle",
message: "What’s the best way to describe your dining style?",
orientation: "vertical",
choices: ["Slow Eater", "Speed Eater", "Social Eater", { value: "Picky Eater", disabled: true }],
default: "cat",
},
{
type: "input",
name: "favColor",
message: "What's your favorite napkin color?",
placeholder: "Drake's Neck Green",
guiOptions: {
hint: "Our recommendation is green",
breadcrumb: "Napkin color",
Expand Down
46 changes: 39 additions & 7 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2178,17 +2178,24 @@
dependencies:
vue "^3.3.4"

"@sap-devx/inquirer-gui-radio-plugin@3.2.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@sap-devx/inquirer-gui-radio-plugin/-/inquirer-gui-radio-plugin-3.2.0.tgz#b7338fd4f7cd504fc0831cd009a418d6a357f776"
integrity sha512-sTRjzgbF4Sxt8Qmn3ssRokWIV6YafDUWz7D4x114UHtcnUmOd1vDpIwoj25SgLpA73XQeARQYXkPUFpnYmduQQ==
dependencies:
vue "^3.3.4"

"@sap-devx/inquirer-gui-tiles-plugin@3.0.3":
version "3.0.3"
resolved "https://registry.yarnpkg.com/@sap-devx/inquirer-gui-tiles-plugin/-/inquirer-gui-tiles-plugin-3.0.3.tgz#e2901c053a31b0f32c350b8b62bc3605731d9503"
integrity sha512-iHq7QvA6JBrXlVMWq4oGfAIPXE5tiiUW+7SM3qGSOrYHBcSfU+MlDzTUVYsB4P2S7eKHzuKRpeUtzrETNIpLJg==
dependencies:
vue "^3.3.4"

"@sap-devx/inquirer-gui@3.1.0":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@sap-devx/inquirer-gui/-/inquirer-gui-3.1.0.tgz#0e595e8627bc21ce3d848561c160bcc78b2c461d"
integrity sha512-tyqSfuwwpS6jqKDqs6KsMVkMAoKDiEhKkEhjwCq3YbPPTRABHGZD8DhHzi8LQH+iVmNK7OTNUhUl+1c09ERsWg==
"@sap-devx/inquirer-gui@3.2.0":
version "3.2.0"
resolved "https://registry.yarnpkg.com/@sap-devx/inquirer-gui/-/inquirer-gui-3.2.0.tgz#8891b1f58f246c9b4cb6b7c9903d79c374938c39"
integrity sha512-vY2bFTbC2aNEPQh2qYeV4V1oitsJBUE8tTlSJimJGdb4ilkfcYYOG/97Bm6m+g9/4pORmc9b5JWf9r1HyBiUJA==
dependencies:
lodash "^4.17.21"
strip-ansi "^6.0.0"
Expand Down Expand Up @@ -12288,7 +12295,7 @@ string-template@~0.2.1:
resolved "https://registry.yarnpkg.com/string-template/-/string-template-0.2.1.tgz#42932e598a352d01fc22ec3367d9d84eec6c9add"
integrity sha512-Yptehjogou2xm4UJbxJ4CxgZx12HBfeystp0y3x7s4Dj32ltVVG1Gg8YhKjHZkHicuKpZX/ffilA8505VbUbpw==

"string-width-cjs@npm:string-width@^4.2.0", "string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
"string-width-cjs@npm:string-width@^4.2.0":
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
Expand All @@ -12314,6 +12321,15 @@ string-width@^1.0.1:
is-fullwidth-code-point "^2.0.0"
strip-ansi "^4.0.0"

"string-width@^1.0.2 || 2 || 3 || 4", string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"

string-width@^3.0.0, string-width@^3.1.0:
version "3.1.0"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-3.1.0.tgz#22767be21b62af1081574306f69ac51b62203961"
Expand Down Expand Up @@ -12391,7 +12407,7 @@ string_decoder@~1.1.1:
dependencies:
safe-buffer "~5.1.0"

"strip-ansi-cjs@npm:strip-ansi@^6.0.1", strip-ansi@^6.0.0, strip-ansi@^6.0.1:
"strip-ansi-cjs@npm:strip-ansi@^6.0.1":
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
Expand Down Expand Up @@ -12426,6 +12442,13 @@ strip-ansi@^5.0.0, strip-ansi@^5.1.0, strip-ansi@^5.2.0:
dependencies:
ansi-regex "^4.1.0"

strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"

strip-ansi@^7.0.1, strip-ansi@^7.1.0:
version "7.1.0"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-7.1.0.tgz#d5b6568ca689d8561370b0707685d22434faff45"
Expand Down Expand Up @@ -13658,7 +13681,7 @@ workerpool@6.0.2:
resolved "https://registry.yarnpkg.com/workerpool/-/workerpool-6.0.2.tgz#e241b43d8d033f1beb52c7851069456039d1d438"
integrity sha512-DSNyvOpFKrNusaaUwk+ej6cBj1bmhLcBfj80elGk+ZIo5JSkq+unB1dLKEOcNfJDZgjGICfhQ0Q5TbP0PvF4+Q==

"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0", wrap-ansi@^7.0.0:
"wrap-ansi-cjs@npm:wrap-ansi@^7.0.0":
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
Expand All @@ -13685,6 +13708,15 @@ wrap-ansi@^6.0.1, wrap-ansi@^6.2.0:
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"

wrap-ansi@^8.1.0:
version "8.1.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-8.1.0.tgz#56dc22368ee570face1b49819975d9b9a5ead214"
Expand Down

0 comments on commit 5c3de76

Please sign in to comment.