@sap-ux/ui-prompting 0.7.5 → 1.0.1

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.
Files changed (83) hide show
  1. package/dist/components/Inputs/Input/Input.d.ts +1 -1
  2. package/dist/components/Inputs/Input/Input.d.ts.map +1 -1
  3. package/dist/components/Inputs/Input/Input.js +6 -13
  4. package/dist/components/Inputs/Input/Input.js.map +1 -1
  5. package/dist/components/Inputs/Input/TranslationInput.d.ts +2 -2
  6. package/dist/components/Inputs/Input/TranslationInput.d.ts.map +1 -1
  7. package/dist/components/Inputs/Input/TranslationInput.js +13 -50
  8. package/dist/components/Inputs/Input/TranslationInput.js.map +1 -1
  9. package/dist/components/Inputs/Input/index.d.ts +2 -2
  10. package/dist/components/Inputs/Input/index.d.ts.map +1 -1
  11. package/dist/components/Inputs/Input/index.js +2 -18
  12. package/dist/components/Inputs/Input/index.js.map +1 -1
  13. package/dist/components/Inputs/MultiSelect/MultiSelect.d.ts +1 -1
  14. package/dist/components/Inputs/MultiSelect/MultiSelect.d.ts.map +1 -1
  15. package/dist/components/Inputs/MultiSelect/MultiSelect.js +9 -16
  16. package/dist/components/Inputs/MultiSelect/MultiSelect.js.map +1 -1
  17. package/dist/components/Inputs/MultiSelect/index.d.ts +1 -1
  18. package/dist/components/Inputs/MultiSelect/index.d.ts.map +1 -1
  19. package/dist/components/Inputs/MultiSelect/index.js +1 -17
  20. package/dist/components/Inputs/MultiSelect/index.js.map +1 -1
  21. package/dist/components/Inputs/Select/Select.d.ts +1 -1
  22. package/dist/components/Inputs/Select/Select.d.ts.map +1 -1
  23. package/dist/components/Inputs/Select/Select.js +12 -49
  24. package/dist/components/Inputs/Select/Select.js.map +1 -1
  25. package/dist/components/Inputs/Select/index.d.ts +1 -1
  26. package/dist/components/Inputs/Select/index.d.ts.map +1 -1
  27. package/dist/components/Inputs/Select/index.js +1 -17
  28. package/dist/components/Inputs/Select/index.js.map +1 -1
  29. package/dist/components/Inputs/index.d.ts +3 -3
  30. package/dist/components/Inputs/index.d.ts.map +1 -1
  31. package/dist/components/Inputs/index.js +3 -19
  32. package/dist/components/Inputs/index.js.map +1 -1
  33. package/dist/components/Question/Question.d.ts +1 -1
  34. package/dist/components/Question/Question.d.ts.map +1 -1
  35. package/dist/components/Question/Question.js +12 -19
  36. package/dist/components/Question/Question.js.map +1 -1
  37. package/dist/components/Question/index.d.ts +1 -1
  38. package/dist/components/Question/index.d.ts.map +1 -1
  39. package/dist/components/Question/index.js +1 -17
  40. package/dist/components/Question/index.js.map +1 -1
  41. package/dist/components/QuestionGroup/QuestionGroup.js +11 -18
  42. package/dist/components/QuestionGroup/QuestionGroup.js.map +1 -1
  43. package/dist/components/QuestionGroup/index.d.ts +1 -1
  44. package/dist/components/QuestionGroup/index.d.ts.map +1 -1
  45. package/dist/components/QuestionGroup/index.js +1 -17
  46. package/dist/components/QuestionGroup/index.js.map +1 -1
  47. package/dist/components/Questions/Questions.d.ts +2 -2
  48. package/dist/components/Questions/Questions.d.ts.map +1 -1
  49. package/dist/components/Questions/Questions.js +25 -61
  50. package/dist/components/Questions/Questions.js.map +1 -1
  51. package/dist/components/Questions/index.d.ts +1 -1
  52. package/dist/components/Questions/index.d.ts.map +1 -1
  53. package/dist/components/Questions/index.js +1 -17
  54. package/dist/components/Questions/index.js.map +1 -1
  55. package/dist/components/index.d.ts +3 -3
  56. package/dist/components/index.d.ts.map +1 -1
  57. package/dist/components/index.js +3 -19
  58. package/dist/components/index.js.map +1 -1
  59. package/dist/context/TranslationContext.d.ts +1 -1
  60. package/dist/context/TranslationContext.d.ts.map +1 -1
  61. package/dist/context/TranslationContext.js +7 -45
  62. package/dist/context/TranslationContext.js.map +1 -1
  63. package/dist/index.d.ts +3 -3
  64. package/dist/index.d.ts.map +1 -1
  65. package/dist/index.js +3 -22
  66. package/dist/index.js.map +1 -1
  67. package/dist/types.js +4 -7
  68. package/dist/types.js.map +1 -1
  69. package/dist/utilities/hooks.d.ts +1 -1
  70. package/dist/utilities/hooks.d.ts.map +1 -1
  71. package/dist/utilities/hooks.js +35 -46
  72. package/dist/utilities/hooks.js.map +1 -1
  73. package/dist/utilities/index.d.ts +3 -3
  74. package/dist/utilities/index.d.ts.map +1 -1
  75. package/dist/utilities/index.js +3 -19
  76. package/dist/utilities/index.js.map +1 -1
  77. package/dist/utilities/renderUtils.js +8 -17
  78. package/dist/utilities/renderUtils.js.map +1 -1
  79. package/dist/utilities/utils.d.ts +1 -1
  80. package/dist/utilities/utils.d.ts.map +1 -1
  81. package/dist/utilities/utils.js +7 -16
  82. package/dist/utilities/utils.js.map +1 -1
  83. package/package.json +10 -11
@@ -1 +1 @@
1
- {"version":3,"file":"Question.js","sourceRoot":"","sources":["../../../src/components/Question/Question.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAE1B,sCAAyE;AACzE,+CAA4C;AAG5C,2BAAyB;AAclB,MAAM,QAAQ,GAAG,CAAC,KAAoB,EAAE,EAAE;IAC7C,MAAM,EACF,QAAQ,EACR,QAAQ,EACR,OAAO,EACP,OAAO,EACP,OAAO,EACP,UAAU,GAAG,EAAE,EACf,EAAE,EACF,oBAAoB,EACpB,8BAA8B,EACjC,GAAG,KAAK,CAAC;IACV,IAAI,aAA0B,CAAC;IAC/B,IAAI,YAAY,GAAG,EAAE,CAAC;IACtB,MAAM,KAAK,GAAgB,IAAA,qBAAS,EAAC,OAAO,EAAE,QAAQ,CAAC,IAAI,CAAgB,CAAC;IAC5E,IAAI,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,OAAO,KAAK,KAAK,IAAI,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,YAAY,EAAE,CAAC;QAC1F,YAAY,GAAG,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAC,YAAa,CAAC;IAC3D,CAAC;IACD,MAAM,OAAO,GAAG,EAAE,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,CAAC,CAAC,CAAC,SAAS,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L,CAAC;YACF,MAAM;QACV,CAAC;QACD,OAAO,CAAC,CAAC,CAAC;YACN,aAAa,GAAG,+CAAsB,CAAC;YACvC,MAAM;QACV,CAAC;IACL,CAAC;IACD,OAAO,6BAAK,SAAS,EAAC,cAAc,IAAE,aAAa,CAAO,CAAC;AAC/D,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- export * from './Question';
1
+ export * from './Question.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Question/index.tsx"],"names":[],"mappings":"AAAA,cAAc,YAAY,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Question/index.tsx"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -1,18 +1,2 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./Question"), exports);
1
+ export * from './Question.js';
18
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Question/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,6CAA2B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Question/index.tsx"],"names":[],"mappings":"AAAA,cAAc,eAAe,CAAC"}
@@ -1,22 +1,15 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.QuestionGroup = void 0;
7
- const react_1 = __importDefault(require("react"));
8
- require("./QuestionGroup.scss");
9
- const react_markdown_1 = __importDefault(require("react-markdown"));
10
- const QuestionGroup = (props) => {
1
+ import React from 'react';
2
+ import './QuestionGroup.scss';
3
+ import ReactMarkdown from 'react-markdown';
4
+ export const QuestionGroup = (props) => {
11
5
  const { title, description, showDescription, children, id } = props;
12
- return (react_1.default.createElement("div", { id: id, className: "prompts-group" },
13
- react_1.default.createElement("ul", { className: "prompts-group-title-list" },
14
- react_1.default.createElement("div", { className: "prompts-group-title-container" },
15
- react_1.default.createElement("li", { className: "prompts-group-title" }, title))),
6
+ return (React.createElement("div", { id: id, className: "prompts-group" },
7
+ React.createElement("ul", { className: "prompts-group-title-list" },
8
+ React.createElement("div", { className: "prompts-group-title-container" },
9
+ React.createElement("li", { className: "prompts-group-title" }, title))),
16
10
  showDescription &&
17
- description?.map((descriptionParagraph) => (react_1.default.createElement("div", { className: "prompts-group-description", key: descriptionParagraph },
18
- react_1.default.createElement(react_markdown_1.default, { key: descriptionParagraph }, descriptionParagraph)))),
19
- react_1.default.createElement("div", { className: "prompt-entries-group" }, children)));
11
+ description?.map((descriptionParagraph) => (React.createElement("div", { className: "prompts-group-description", key: descriptionParagraph },
12
+ React.createElement(ReactMarkdown, { key: descriptionParagraph }, descriptionParagraph)))),
13
+ React.createElement("div", { className: "prompt-entries-group" }, children)));
20
14
  };
21
- exports.QuestionGroup = QuestionGroup;
22
15
  //# sourceMappingURL=QuestionGroup.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"QuestionGroup.js","sourceRoot":"","sources":["../../../src/components/QuestionGroup/QuestionGroup.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;A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,qBAAqB,IAAE,KAAK,CAAM,CAC9C,CACL;QACJ,eAAe;YACZ,WAAW,EAAE,GAAG,CAAC,CAAC,oBAAoB,EAAE,EAAE,CAAC,CACvC,6BAAK,SAAS,EAAC,2BAA2B,EAAC,GAAG,EAAE,oBAAoB;gBAChE,oBAAC,aAAa,IAAC,GAAG,EAAE,oBAAoB,IAAG,oBAAoB,CAAiB,CAC9E,CACT,CAAC;QACN,6BAAK,SAAS,EAAC,sBAAsB,IAAE,QAAQ,CAAO,CACpD,CACT,CAAC;AACN,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- export * from './QuestionGroup';
1
+ export * from './QuestionGroup.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QuestionGroup/index.tsx"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/QuestionGroup/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -1,18 +1,2 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./QuestionGroup"), exports);
1
+ export * from './QuestionGroup.js';
18
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/QuestionGroup/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kDAAgC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/QuestionGroup/index.tsx"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import type { Answers } from 'inquirer';
3
- import type { PromptQuestion, ValidationResults, PromptsGroup, AnswerValue, DynamicChoices, TranslationProps } from '../../types';
4
- import { PromptsLayoutType } from '../../types';
3
+ import type { PromptQuestion, ValidationResults, PromptsGroup, AnswerValue, DynamicChoices, TranslationProps } from '../../types.js';
4
+ import { PromptsLayoutType } from '../../types.js';
5
5
  import type { TranslationEntry } from '@sap-ux/ui-components';
6
6
  import './Questions.scss';
7
7
  export interface QuestionsProps<T extends TranslationEntry = TranslationEntry> {
@@ -1 +1 @@
1
- {"version":3,"file":"Questions.d.ts","sourceRoot":"","sources":["../../../src/components/Questions/Questions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAsB,MAAM,OAAO,CAAC;AAC3C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,UAAU,CAAC;AAaxC,OAAO,KAAK,EACR,cAAc,EACd,iBAAiB,EACjB,YAAY,EACZ,WAAW,EACX,cAAc,EACd,gBAAgB,EACnB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAEhD,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAE9D,OAAO,kBAAkB,CAAC;AAE1B,MAAM,WAAW,cAAc,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB;IACzE,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,SAAS,EAAE,cAAc,EAAE,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,OAAO,CAAC,EAAE,cAAc,C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AC,EAAE,cAAc,CAAC;IACzB,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,eAAe,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9D,QAAQ,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,EAAE,WAAW,EAAE,oBAAoB,CAAC,EAAE,MAAM,EAAE,KAAK,IAAI,CAAC;IAC5G,UAAU,CAAC,EAAE,iBAAiB,CAAC;IAC/B,MAAM,CAAC,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IAC7B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,CAAC;IACvC,8BAA8B,CAAC,EAAE,OAAO,CAAC;CAC5C;AAgBD,eAAO,MAAM,SAAS,GAAI,OAAO,cAAc,sBAmH9C,CAAC"}
@@ -1,45 +1,10 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.Questions = void 0;
37
- const react_1 = __importStar(require("react"));
38
- const Question_1 = require("../Question/Question");
39
- const utilities_1 = require("../../utilities");
40
- const QuestionGroup_1 = require("../QuestionGroup");
41
- const TranslationContext_1 = require("../../context/TranslationContext");
42
- require("./Questions.scss");
1
+ import React, { useCallback } from 'react';
2
+ import { Question } from '../Question/Question.js';
3
+ import { formatDomId, getDependantQuestions, getDynamicQuestions, updateAnswers, useAnswers, useDynamicQuestionsEffect, useId, useRequestedChoices } from '../../utilities/index.js';
4
+ import { QuestionGroup } from '../QuestionGroup/index.js';
5
+ import { PromptsLayoutType } from '../../types.js';
6
+ import { TranslationProvider } from '../../context/TranslationContext.js';
7
+ import './Questions.scss';
43
8
  /**
44
9
  * Method returns classes for question's component root DOM element.
45
10
  *
@@ -48,17 +13,17 @@ require("./Questions.scss");
48
13
  */
49
14
  const getComponentClasses = (type) => {
50
15
  const classes = ['prompt-entries-wrapper'];
51
- classes.push(type === "MultiColumn" /* PromptsLayoutType.MultiColumn */ ? 'prompt-entries-wrapper-multi' : 'prompt-entries-wrapper-single');
16
+ classes.push(type === PromptsLayoutType.MultiColumn ? 'prompt-entries-wrapper-multi' : 'prompt-entries-wrapper-single');
52
17
  return classes.join(' ');
53
18
  };
54
- const Questions = (props) => {
19
+ export const Questions = (props) => {
55
20
  const { id, groups = [], questions, onChoiceRequest, onChange, answers = {}, choices = {}, layoutType, showDescriptions, validation = {}, translationProps = { bundle: {} }, calloutCollisionTransformation = false } = props;
56
- const componentId = (0, utilities_1.useId)(id);
57
- const [localAnswers, setLocalAnswers] = (0, utilities_1.useAnswers)(questions, answers, (answers) => {
21
+ const componentId = useId(id);
22
+ const [localAnswers, setLocalAnswers] = useAnswers(questions, answers, (answers) => {
58
23
  onChange?.(answers);
59
24
  });
60
- const [pendingRequests, setRequestedChoices] = (0, utilities_1.useRequestedChoices)({}, choices);
61
- const requestChoices = (0, react_1.useCallback)((names, answers) => {
25
+ const [pendingRequests, setRequestedChoices] = useRequestedChoices({}, choices);
26
+ const requestChoices = useCallback((names, answers) => {
62
27
  // Call external callback
63
28
  if (names.length) {
64
29
  onChoiceRequest?.(names, answers);
@@ -67,17 +32,17 @@ const Questions = (props) => {
67
32
  setRequestedChoices(names);
68
33
  }, [onChoiceRequest]);
69
34
  // Request dynamic choices
70
- (0, utilities_1.useDynamicQuestionsEffect)(() => {
71
- const dynamicChoices = (0, utilities_1.getDynamicQuestions)(questions);
35
+ useDynamicQuestionsEffect(() => {
36
+ const dynamicChoices = getDynamicQuestions(questions);
72
37
  requestChoices(dynamicChoices, localAnswers);
73
38
  }, questions);
74
39
  // Change callback
75
- const onAnswerChange = (0, react_1.useCallback)((name, answer) => {
40
+ const onAnswerChange = useCallback((name, answer) => {
76
41
  setLocalAnswers((prevAnswers) => {
77
- const updatedAnswers = (0, utilities_1.updateAnswers)(prevAnswers, questions, name, answer);
42
+ const updatedAnswers = updateAnswers(prevAnswers, questions, name, answer);
78
43
  onChange?.(updatedAnswers, name, answer);
79
44
  // Request dynamic choices for dependant questions
80
- const deps = (0, utilities_1.getDependantQuestions)(questions, name);
45
+ const deps = getDependantQuestions(questions, name);
81
46
  if (deps.length) {
82
47
  requestChoices(deps, updatedAnswers);
83
48
  }
@@ -88,7 +53,7 @@ const Questions = (props) => {
88
53
  ...group,
89
54
  questions: []
90
55
  }));
91
- if (layoutType === "MultiColumn" /* PromptsLayoutType.MultiColumn */ && groups?.length) {
56
+ if (layoutType === PromptsLayoutType.MultiColumn && groups?.length) {
92
57
  questions.forEach((question) => {
93
58
  const { guiOptions = {} } = question;
94
59
  if (guiOptions.groupId) {
@@ -103,16 +68,15 @@ const Questions = (props) => {
103
68
  const renderQuestions = (questions) => questions.map((question, index) => {
104
69
  const name = question.name;
105
70
  const externalChoices = choices[name];
106
- const id = (0, utilities_1.formatDomId)(`${componentId}--${question.name}`);
107
- return (react_1.default.createElement(Question_1.Question, { id: id, key: `${name}-${index}`, question: question, validation: validation, answers: localAnswers, onChange: onAnswerChange, choices: externalChoices, pending: pendingRequests[name], isI18nInputSupported: !!props.translationProps, calloutCollisionTransformation: calloutCollisionTransformation }));
71
+ const id = formatDomId(`${componentId}--${question.name}`);
72
+ return (React.createElement(Question, { id: id, key: `${name}-${index}`, question: question, validation: validation, answers: localAnswers, onChange: onAnswerChange, choices: externalChoices, pending: pendingRequests[name], isI18nInputSupported: !!props.translationProps, calloutCollisionTransformation: calloutCollisionTransformation }));
108
73
  });
109
- return (react_1.default.createElement("div", { id: componentId, className: getComponentClasses(layoutType) },
110
- react_1.default.createElement(TranslationContext_1.TranslationProvider, { bundle: translationProps.bundle, onEvent: translationProps.onEvent, pendingQuestions: translationProps.pendingQuestions },
111
- react_1.default.createElement("div", { className: "prompt-entries" }, layoutType === "MultiColumn" /* PromptsLayoutType.MultiColumn */ && groups?.length
74
+ return (React.createElement("div", { id: componentId, className: getComponentClasses(layoutType) },
75
+ React.createElement(TranslationProvider, { bundle: translationProps.bundle, onEvent: translationProps.onEvent, pendingQuestions: translationProps.pendingQuestions },
76
+ React.createElement("div", { className: "prompt-entries" }, layoutType === PromptsLayoutType.MultiColumn && groups?.length
112
77
  ? groupsWithQuestions.map((group) => {
113
- return (react_1.default.createElement(QuestionGroup_1.QuestionGroup, { id: `${componentId}--${group.id}`, key: group.id, title: group.title, description: group.description, showDescription: showDescriptions }, renderQuestions(group.questions)));
78
+ return (React.createElement(QuestionGroup, { id: `${componentId}--${group.id}`, key: group.id, title: group.title, description: group.description, showDescription: showDescriptions }, renderQuestions(group.questions)));
114
79
  })
115
80
  : renderQuestions(questions)))));
116
81
  };
117
- exports.Questions = Questions;
118
82
  //# sourceMappingURL=Questions.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Questions.js","sourceRoot":"","sources":["../../../src/components/Questions/Questions.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAA2C;AAE3C,mDAAgD;AAChD,+CASyB;AACzB,oDAAiD;AAUjD,yEAAuE;AAGvE,4BAA0B;AAiB1B;;;;;GAKG;AACH,MAAM,mBAAmB,GAAG,CAAC,IAAwB,EAAU,EAAE;IAC7D,MAAM,OAAO,GAAG,CAAC,wBAAwB,CAAC,CAAC;IAC3C,OAAO,CAAC,IAAI,CACR,IAAI,sDAAkC,CAAC,CAAC,CAAC,8BAA8B,CAAC,CAAC,CAAC,+BAA+B,CAC5G,CAAC;IACF,OAAO,OAAO,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC;AAC7B,CAAC,CAAC;AAEK,MAAM,SAAS,GAAG,CAAC,KAAqB,EAAE,EAAE;IAC/C,MAAM,EACF,EAAE,EACF,MAAM,GAAG,EAAE,EACX,SAAS,EACT,eAAe,EACf,QAAQ,EACR,OAAO,GAAG,EAAE,EACZ,OAAO,GAAG,EAAE,EACZ,UAAU,EACV,gBAAgB,EAChB,UAAU,GAAG,EAAE,EACf,gBAAgB,GAAG,EAAE,MAAM,EAAE,EAAE,EAAE,EACjC,8BAA8B,GAAG,KAAK,EACzC,GAAG,KAAK,CAAC;IACV,MAAM,WAAW,GAAG,IAAA,iBAAK,EAAC,EAAE,CAAC,CAAC;IAC9B,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,IAAA,sBAAU,EAAC,SAAS,EAAE,OAAO,EAAE,CAAC,OAAgB,EAAE,EAAE;QACxF,QAAQ,EAAE,CAAC,OAAO,CAAC,CAAC;IACxB,CAAC,CAAC,CAAC;IACH,MAAM,CAAC,eAAe,EAAE,mBAAmB,CAAC,GAAG,IAAA,+BAAmB,EAAC,EAAE,EAAE,OAAO,CAAC,CAAC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,CAAC,CAAC,KAAK,CAAC,gBAAgB,EAC9C,8BAA8B,EAAE,8BAA8B,GAChE,CACL,CAAC;IACN,CAAC,CAAC,CAAC;IAEP,OAAO,CACH,uCAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,CAAC,UAAU,CAAC;QAC5D,8BAAC,wCAAmB,IAChB,MAAM,EAAE,gBAAgB,CAAC,MAAM,EAC/B,OAAO,EAAE,gBAAgB,CAAC,OAAO,EACjC,gBAAgB,EAAE,gBAAgB,CAAC,gBAAgB;YACnD,uCAAK,SAAS,EAAC,gBAAgB,IAC1B,UAAU,sDAAkC,IAAI,MAAM,EAAE,MAAM;gBAC3D,CAAC,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;oBAC9B,OAAO,CACH,8BAAC,6BAAa,IACV,EAAE,EAAE,GAAG,WAAW,KAAK,KAAK,CAAC,EAAE,EAAE,EACjC,GAAG,EAAE,KAAK,CAAC,EAAE,EACb,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,eAAe,EAAE,gBAAgB,IAChC,eAAe,CAAC,KAAK,CAAC,SAAS,CAAC,CACrB,CACnB,CAAC;gBACN,CAAC,CAAC;gBACJ,CAAC,CAAC,eAAe,CAAC,SAAS,CAAC,CAC9B,CACY,CACpB,CACT,CAAC;AACN,CAAC,CAAC;AAnHW,QAAA,SAAS,aAmHpB"}
1
+ {"version":3,"file":"Questions.js","sourceRoot":"","sources":["../../../src/components/Questions/Questions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAE3C,OAAO,EAAE,QAAQ,EAAE,MAAM,yBAAyB,CAAC;AACnD,OAAO,EACH,WAAW,EACX,qBAAqB,EACrB,mBAAmB,EACnB,aAAa,EACb,UAAU,EACV,yBAAyB,EACzB,KAAK,EACL,mBAAmB,EACtB,MAAM,0BAA0B,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AAC,CAAC,CAAC;IAEP,OAAO,CACH,6BAAK,EAAE,EAAE,WAAW,EAAE,SAAS,EAAE,mBAAmB,CAAC,UAAU,CAAC;QAC5D,oBAAC,mBAAmB,IAChB,MAAM,EAAE,gBAAgB,CAAC,MAAM,EAC/B,OAAO,EAAE,gBAAgB,CAAC,OAAO,EACjC,gBAAgB,EAAE,gBAAgB,CAAC,gBAAgB;YACnD,6BAAK,SAAS,EAAC,gBAAgB,IAC1B,UAAU,KAAK,iBAAiB,CAAC,WAAW,IAAI,MAAM,EAAE,MAAM;gBAC3D,CAAC,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE;oBAC9B,OAAO,CACH,oBAAC,aAAa,IACV,EAAE,EAAE,GAAG,WAAW,KAAK,KAAK,CAAC,EAAE,EAAE,EACjC,GAAG,EAAE,KAAK,CAAC,EAAE,EACb,KAAK,EAAE,KAAK,CAAC,KAAK,EAClB,WAAW,EAAE,KAAK,CAAC,WAAW,EAC9B,eAAe,EAAE,gBAAgB,IAChC,eAAe,CAAC,KAAK,CAAC,SAAS,CAAC,CACrB,CACnB,CAAC;gBACN,CAAC,CAAC;gBACJ,CAAC,CAAC,eAAe,CAAC,SAAS,CAAC,CAC9B,CACY,CACpB,CACT,CAAC;AACN,CAAC,CAAC"}
@@ -1,2 +1,2 @@
1
- export * from './Questions';
1
+ export * from './Questions.js';
2
2
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Questions/index.tsx"],"names":[],"mappings":"AAAA,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/Questions/index.tsx"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -1,18 +1,2 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./Questions"), exports);
1
+ export * from './Questions.js';
18
2
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Questions/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/components/Questions/index.tsx"],"names":[],"mappings":"AAAA,cAAc,gBAAgB,CAAC"}
@@ -1,4 +1,4 @@
1
- export * from './Inputs';
2
- export * from './Question';
3
- export * from './Questions';
1
+ export * from './Inputs/index.js';
2
+ export * from './Question/index.js';
3
+ export * from './Questions/index.js';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.tsx"],"names":[],"mappings":"AAAA,cAAc,UAAU,CAAC;AACzB,cAAc,YAAY,CAAC;AAC3B,cAAc,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/components/index.tsx"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
@@ -1,20 +1,4 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./Inputs"), exports);
18
- __exportStar(require("./Question"), exports);
19
- __exportStar(require("./Questions"), exports);
1
+ export * from './Inputs/index.js';
2
+ export * from './Question/index.js';
3
+ export * from './Questions/index.js';
20
4
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,6CAA2B;AAC3B,8CAA4B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/components/index.tsx"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC;AACpC,cAAc,sBAAsB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import type { TranslationEntry } from '@sap-ux/ui-components';
2
2
  import React from 'react';
3
- import type { TranslationProps } from '../types';
3
+ import type { TranslationProps } from '../types.js';
4
4
  export declare const useTranslation: () => TranslationProps<TranslationEntry>;
5
5
  export interface TranslationProviderProps<T extends TranslationEntry = TranslationEntry> extends TranslationProps<T> {
6
6
  children?: string | React.ReactElement;
@@ -1 +1 @@
1
- {"version":3,"file":"TranslationContext.d.ts","sourceRoot":"","sources":["../../src/context/TranslationContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAA0D,MAAM,OAAO,CAAC;AAC/E,OAAO,KAAK,EAAkB,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAIjE,eAAO,MAAM,cAAc,0CAAuC,CAAC;AAEnE,MAAM,WAAW,wBAAwB,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,CAAE,SAAQ,gBAAgB,CAAC,CAAC,CAAC;IAChH,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;CAC1C;AAED,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,gBAAgB,EAAE,OAAO,wBAAwB,CAAC,CAAC,CAAC,sBAiBjG,CAAC"}
1
+ {"version":3,"file":"TranslationContext.d.ts","sourceRoot":"","sources":["../../src/context/TranslationContext.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,uBAAuB,CAAC;AAC9D,OAAO,KAA0D,MAAM,OAAO,CAAC;AAC/E,OAAO,KAAK,EAAkB,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAIpE,eAAO,MAAM,cAAc,0CAAuC,CAAC;AAEnE,MAAM,WAAW,wBAAwB,CAAC,CAAC,SAAS,gBAAgB,GAAG,gBAAgB,CAAE,SAAQ,gBAAgB,CAAC,CAAC,CAAC;IAChH,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,YAAY,CAAC;CAC1C;AAED,eAAO,MAAM,mBAAmB,GAAI,CAAC,SAAS,gBAAgB,EAAE,OAAO,wBAAwB,CAAC,CAAC,CAAC,sBAiBjG,CAAC"}
@@ -1,54 +1,16 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || (function () {
19
- var ownKeys = function(o) {
20
- ownKeys = Object.getOwnPropertyNames || function (o) {
21
- var ar = [];
22
- for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
23
- return ar;
24
- };
25
- return ownKeys(o);
26
- };
27
- return function (mod) {
28
- if (mod && mod.__esModule) return mod;
29
- var result = {};
30
- if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
31
- __setModuleDefault(result, mod);
32
- return result;
33
- };
34
- })();
35
- Object.defineProperty(exports, "__esModule", { value: true });
36
- exports.TranslationProvider = exports.useTranslation = void 0;
37
- const react_1 = __importStar(require("react"));
38
- const TranslationContext = (0, react_1.createContext)({ bundle: {} });
39
- const useTranslation = () => (0, react_1.useContext)(TranslationContext);
40
- exports.useTranslation = useTranslation;
41
- const TranslationProvider = (props) => {
1
+ import React, { createContext, useCallback, useContext, useMemo } from 'react';
2
+ const TranslationContext = createContext({ bundle: {} });
3
+ export const useTranslation = () => useContext(TranslationContext);
4
+ export const TranslationProvider = (props) => {
42
5
  const { onEvent } = props;
43
- const handleEvent = (0, react_1.useCallback)((question, event) => {
6
+ const handleEvent = useCallback((question, event) => {
44
7
  onEvent?.(question, event);
45
8
  }, [onEvent]);
46
- const value = (0, react_1.useMemo)(() => ({
9
+ const value = useMemo(() => ({
47
10
  bundle: props.bundle,
48
11
  onEvent: handleEvent,
49
12
  pendingQuestions: props.pendingQuestions
50
13
  }), [props.bundle, handleEvent, props.pendingQuestions]);
51
- return react_1.default.createElement(TranslationContext.Provider, { value: value }, props.children);
14
+ return React.createElement(TranslationContext.Provider, { value: value }, props.children);
52
15
  };
53
- exports.TranslationProvider = TranslationProvider;
54
16
  //# sourceMappingURL=TranslationContext.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"TranslationContext.js","sourceRoot":"","sources":["../../src/context/TranslationContext.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,+CAA+E;AAG/E,MAAM,kBAAkB,GAAG,IAAA,qBAAa,EAAmB,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;AAEpE,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,IAAA,kBAAU,EAAC,kBAAkB,CAAC,CAAC;AAAtD,QAAA,cAAc,kBAAwC;AAM5D,MAAM,mBAAmB,GAAG,CAA6B,KAAkC,EAAE,EAAE;IAClG,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC1B,MAAM,WAAW,GAAG,IAAA,mBAAW,EAC3B,CAAC,QAAgB,EAAE,KAAuC,EAAQ,EAAE;QAChE,OAAO,EAAE,CAAC,QAAQ,EAAE,KAA0B,CAAC,CAAC;IACpD,CAAC,EACD,CAAC,OAAO,CAAC,CACZ,CAAC;IACF,MAAM,KAAK,GAAG,IAAA,eAAO,EACjB,GAAG,EAAE,CAAC,CAAC;QACH,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,OAAO,EAAE,WAAW;QACpB,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;KAC3C,CAAC,EACF,CAAC,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,gBAAgB,CAAC,CACtD,CAAC;IACF,OAAO,8BAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,IAAG,KAAK,CAAC,QAAQ,CAA+B,CAAC;AACrG,CAAC,CAAC;AAjBW,QAAA,mBAAmB,uBAiB9B"}
1
+ {"version":3,"file":"TranslationContext.js","sourceRoot":"","sources":["../../src/context/TranslationContext.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,aAAa,EAAE,WAAW,EAAE,UAAU,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAG/E,MAAM,kBAAkB,GAAG,aAAa,CAAmB,EAAE,MAAM,EAAE,EAAE,EAAE,CAAC,CAAC;AAE3E,MAAM,CAAC,MAAM,cAAc,GAAG,GAAG,EAAE,CAAC,UAAU,CAAC,kBAAkB,CAAC,CAAC;AAMnE,MAAM,CAAC,MAAM,mBAAmB,GAAG,CAA6B,KAAkC,EAAE,EAAE;IAClG,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,CAAC;IAC1B,MAAM,WAAW,GAAG,WAAW,CAC3B,CAAC,QAAgB,EAAE,KAAuC,EAAQ,EAAE;QAChE,OAAO,EAAE,CAAC,QAAQ,EAAE,KAA0B,CAAC,CAAC;IACpD,CAAC,EACD,CAAC,OAAO,CAAC,CACZ,CAAC;IACF,MAAM,KAAK,GAAG,OAAO,CACjB,GAAG,EAAE,CAAC,CAAC;QACH,MAAM,EAAE,KAAK,CAAC,MAAM;QACpB,OAAO,EAAE,WAAW;QACpB,gBAAgB,EAAE,KAAK,CAAC,gBAAgB;KAC3C,CAAC,EACF,CAAC,KAAK,CAAC,MAAM,EAAE,WAAW,EAAE,KAAK,CAAC,gBAAgB,CAAC,CACtD,CAAC;IACF,OAAO,oBAAC,kBAAkB,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAK,IAAG,KAAK,CAAC,QAAQ,CAA+B,CAAC;AACrG,CAAC,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- export * from './components';
2
- export * from './types';
3
- export { setAnswer, getAnswer } from './utilities/utils';
1
+ export * from './components/index.js';
2
+ export * from './types.js';
3
+ export { setAnswer, getAnswer } from './utilities/utils.js';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAC;AAC7B,cAAc,SAAS,CAAC;AACxB,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC"}
package/dist/index.js CHANGED
@@ -1,23 +1,4 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- exports.getAnswer = exports.setAnswer = void 0;
18
- __exportStar(require("./components"), exports);
19
- __exportStar(require("./types"), exports);
20
- var utils_1 = require("./utilities/utils");
21
- Object.defineProperty(exports, "setAnswer", { enumerable: true, get: function () { return utils_1.setAnswer; } });
22
- Object.defineProperty(exports, "getAnswer", { enumerable: true, get: function () { return utils_1.getAnswer; } });
1
+ export * from './components/index.js';
2
+ export * from './types.js';
3
+ export { setAnswer, getAnswer } from './utilities/utils.js';
23
4
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,+CAA6B;AAC7B,0CAAwB;AACxB,2CAAyD;AAAhD,kGAAA,SAAS,OAAA;AAAE,kGAAA,SAAS,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.tsx"],"names":[],"mappings":"AAAA,cAAc,uBAAuB,CAAC;AACtC,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC"}
package/dist/types.js CHANGED
@@ -1,11 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.TRANSLATE_EVENT_SHOW = exports.TRANSLATE_EVENT_UPDATE = exports.PromptsLayoutType = void 0;
4
- var PromptsLayoutType;
1
+ export var PromptsLayoutType;
5
2
  (function (PromptsLayoutType) {
6
3
  PromptsLayoutType["SingleColumn"] = "SingleColumn";
7
4
  PromptsLayoutType["MultiColumn"] = "MultiColumn";
8
- })(PromptsLayoutType || (exports.PromptsLayoutType = PromptsLayoutType = {}));
9
- exports.TRANSLATE_EVENT_UPDATE = 'update';
10
- exports.TRANSLATE_EVENT_SHOW = 'show';
5
+ })(PromptsLayoutType || (PromptsLayoutType = {}));
6
+ export const TRANSLATE_EVENT_UPDATE = 'update';
7
+ export const TRANSLATE_EVENT_SHOW = 'show';
11
8
  //# sourceMappingURL=types.js.map
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":";;;AAiKA,IAAkB,iBAGjB;AAHD,WAAkB,iBAAiB;IAC/B,kDAA6B,CAAA;IAC7B,gDAA2B,CAAA;AAC/B,CAAC,EAHiB,iBAAiB,iCAAjB,iBAAiB,QAGlC;AAEY,QAAA,sBAAsB,GAAG,QAAQ,CAAC;AAClC,QAAA,oBAAoB,GAAG,MAAM,CAAC"}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAiKA,MAAM,CAAN,IAAkB,iBAGjB;AAHD,WAAkB,iBAAiB;IAC/B,kDAA6B,CAAA;IAC7B,gDAA2B,CAAA;AAC/B,CAAC,EAHiB,iBAAiB,KAAjB,iBAAiB,QAGlC;AAED,MAAM,CAAC,MAAM,sBAAsB,GAAG,QAAQ,CAAC;AAC/C,MAAM,CAAC,MAAM,oBAAoB,GAAG,MAAM,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import type { UISelectableOption } from '@sap-ux/ui-components';
2
- import type { PromptQuestion, DynamicChoices, PromptListChoices } from '../types';
2
+ import type { PromptQuestion, DynamicChoices, PromptListChoices } from '../types.js';
3
3
  import type { Answers, ChoiceOptions, AsyncDynamicQuestionProperty } from 'inquirer';
4
4
  interface RequestedChoices {
5
5
  [key: string]: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"hooks.d.ts","sourceRoot":"","sources":["../../src/utilities/hooks.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAoB,kBAAkB,EAAE,MAAM,uBAAuB,CAAC;AAElF,OAAO,KAAK,EAAE,cAAc,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAClF,OAAO,KAAK,EAAE,OAAO,EAAE,aAAa,EAAE,4BAA4B,EAAE,MAAM,UAAU,CAAC;AAErF,UAAU,gBAAgB;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CAC1B;AAED;;;;;;GAMG;AACH,wBAAgB,QAAQ,CAAC,CAAC,EAAE,YAAY,CAAC,EAAE,CAAC,EAAE,SAAS,CAAC,EAAE,CAAC,GAAG,CAAC,CAAC,GAAG,SAAS,EAAE,CAAC,KAAK,EAAE,CAAC,GAAG,SAAS,KAAK,IAAI,CAAC,CAe5G;AAsBD;;;;;;GAMG;AACH,wBAAgB,UAAU,CAAC,QAAQ,EAAE,cAAc,EAAE,OAAO,CAAC,EAAE,iBAAiB,GAAG,kBAAkB,CAAC,aAAa,CAAC,EAAE,CAOrH;AAED;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAC9B,OAAO,EAAE,kBAAk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