@boomerang-io/carbon-addons-boomerang-react 4.6.11-beta.8 → 4.6.11
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.
- package/README.md +162 -162
- package/dist/cjs/components/AboutPlatform/AboutPlatform.js +50 -50
- package/dist/cjs/components/AdvantageSideNav/AdvantageSideNav.js +218 -241
- package/dist/cjs/components/AutoSuggest/AutoSuggest.js +101 -101
- package/dist/cjs/components/Avatar/Avatar.js +18 -18
- package/dist/cjs/components/CheckboxList/CheckboxList.js +34 -34
- package/dist/cjs/components/ComboBox/ComboBox.js +103 -103
- package/dist/cjs/components/ComboBoxMultiSelect/ComboBoxMultiSelect.js +32 -32
- package/dist/cjs/components/ComboBoxMultiSelect/MultiSelect.js +208 -208
- package/dist/cjs/components/ComposedModal/ComposedModal.js +80 -80
- package/dist/cjs/components/ConfirmModal/ConfirmModal.js +43 -43
- package/dist/cjs/components/Creatable/Creatable.js +137 -137
- package/dist/cjs/components/DataDrivenInput/DataDrivenInput.js +226 -226
- package/dist/cjs/components/DateInput/DateInput.js +35 -35
- package/dist/cjs/components/DecisionButtons/DecisionButtons.js +61 -61
- package/dist/cjs/components/DelayedRender/DelayedRender.js +17 -17
- package/dist/cjs/components/DynamicFormik/DynamicFormik.js +578 -578
- package/dist/cjs/components/Error403/Error403.js +13 -13
- package/dist/cjs/components/Error403/ForbiddenErrorBackground.js +113 -113
- package/dist/cjs/components/Error403/GraphicWrangler/GraphicWrangler.js +62 -62
- package/dist/cjs/components/Error404/Error404.js +13 -13
- package/dist/cjs/components/Error404/GraphicLoch/GraphicLoch.js +17 -17
- package/dist/cjs/components/Error404/NotFoundErrorBackground.js +129 -129
- package/dist/cjs/components/ErrorBoundary/ErrorBoundary.js +32 -32
- package/dist/cjs/components/ErrorDragon/ErrorDragon.js +13 -13
- package/dist/cjs/components/ErrorDragon/assets/ErrorGraphic.js +35 -35
- package/dist/cjs/components/ErrorFullPage/ErrorFullPage.js +10 -10
- package/dist/cjs/components/ErrorMessage/ErrorMessage.js +22 -22
- package/dist/cjs/components/ErrorPage/ErrorPage.js +11 -11
- package/dist/cjs/components/ErrorPageCore/ErrorPageCore.js +15 -15
- package/dist/cjs/components/ErrorPageCore/GenericErrorBackground.js +124 -124
- package/dist/cjs/components/FeatureHeader/FeatureHeader.js +29 -29
- package/dist/cjs/components/FeatureNavTab/FeatureNavTab.js +12 -12
- package/dist/cjs/components/FeatureNavTabs/FeatureNavTabs.js +12 -12
- package/dist/cjs/components/FeatureSideNav/FeatureSideNav.js +12 -12
- package/dist/cjs/components/FeatureSideNav/FeatureSideNavFooter.js +8 -8
- package/dist/cjs/components/FeatureSideNav/FeatureSideNavHeader.js +8 -8
- package/dist/cjs/components/FeatureSideNav/FeatureSideNavLinks.js +14 -14
- package/dist/cjs/components/FeatureSideNavLink/FeatureSideNavLink.js +12 -12
- package/dist/cjs/components/Feedback/Feedback.js +37 -40
- package/dist/cjs/components/FlowModal/FlowModal.js +141 -141
- package/dist/cjs/components/FlowModal/FlowModalForm.js +12 -12
- package/dist/cjs/components/Header/Header.js +190 -168
- package/dist/cjs/components/Header/HeaderAppSwitcher.js +94 -102
- package/dist/cjs/components/Header/HeaderMenu.js +7 -7
- package/dist/cjs/components/Header/HeaderMenuItem.js +51 -52
- package/dist/cjs/components/Header/HeaderTeamSwitcher.js +327 -0
- package/dist/cjs/components/Header/UserRequests.js +29 -29
- package/dist/cjs/components/ImageModal/ImageModal.js +17 -17
- package/dist/cjs/components/Loading/Loading.js +8 -8
- package/dist/cjs/components/MemberBar/MemberBar.js +20 -20
- package/dist/cjs/components/Modal/Modal.js +20 -20
- package/dist/cjs/components/ModalConfirmEdit/ModalConfirmArray.js +14 -14
- package/dist/cjs/components/ModalConfirmEdit/ModalConfirmDetails.js +11 -11
- package/dist/cjs/components/ModalConfirmEdit/ModalConfirmEdit.js +17 -17
- package/dist/cjs/components/ModalForm/ModalForm.js +9 -9
- package/dist/cjs/components/Notifications/NotificationsContainer.js +22 -22
- package/dist/cjs/components/Notifications/ToastNotification.js +21 -21
- package/dist/cjs/components/Notifications/notify.js +17 -17
- package/dist/cjs/components/PlatformBanner/PlatformBanner.js +8 -8
- package/dist/cjs/components/PlatformNotifications/PlatformNotification.js +17 -17
- package/dist/cjs/components/PlatformNotifications/PlatformNotificationsContainer.js +136 -136
- package/dist/cjs/components/Portal/Portal.js +14 -14
- package/dist/cjs/components/PrivacyRedirect/PrivacyRedirect.js +30 -30
- package/dist/cjs/components/PrivacyStatement/PrivacyStatement.js +90 -90
- package/dist/cjs/components/ProfileSettings/ProfileSettings.js +124 -124
- package/dist/cjs/components/ProtectedRoute/ProtectedRoute.js +13 -13
- package/dist/cjs/components/RadioGroup/RadioGroup.js +33 -33
- package/dist/cjs/components/RichTextArea/RichTextArea.js +142 -142
- package/dist/cjs/components/SignOut/SignOut.js +27 -27
- package/dist/cjs/components/SupportCenter/SupportCenter.js +65 -65
- package/dist/cjs/components/TextArea/TextArea.js +16 -16
- package/dist/cjs/components/TextInput/TextInput.js +13 -13
- package/dist/cjs/components/Toggle/Toggle.js +22 -22
- package/dist/cjs/components/TooltipHover/TooltipHover.js +39 -39
- package/dist/cjs/components/UIShell/UIShell.js +95 -89
- package/dist/cjs/config/servicesConfig.js +22 -21
- package/dist/cjs/constants/DataDrivenInputTypes.js +74 -74
- package/dist/cjs/constants/UserType.js +13 -13
- package/dist/cjs/hooks/useHeaderMenu.js +49 -49
- package/dist/cjs/hooks/usePortal.js +74 -74
- package/dist/cjs/hooks/useWindowSize.js +33 -33
- package/dist/cjs/internal/ListBox/ListBox.js +41 -41
- package/dist/cjs/internal/ListBox/ListBoxField.js +19 -19
- package/dist/cjs/internal/ListBox/ListBoxMenu.js +19 -19
- package/dist/cjs/internal/ListBox/ListBoxMenuIcon.js +31 -31
- package/dist/cjs/internal/ListBox/ListBoxMenuItem.js +38 -38
- package/dist/cjs/internal/ListBox/ListBoxSelection.js +64 -64
- package/dist/cjs/internal/ListBox/index.js +10 -10
- package/dist/cjs/internal/keyboard/keys.js +16 -16
- package/dist/cjs/internal/keyboard/match.js +67 -67
- package/dist/cjs/internal/settings.js +5 -5
- package/dist/cjs/tools/accessibility.js +13 -13
- package/dist/cjs/tools/createPropAdapter.js +44 -44
- package/dist/cjs/tools/isUrl.js +39 -39
- package/dist/cjs/tools/setupGetInstanceId.js +20 -20
- package/dist/cjs/tools/useSetState.js +12 -12
- package/dist/cjs/tools/yupAst/astGenerator.js +212 -212
- package/dist/cjs/tools/yupAst/customValidators.js +17 -17
- package/dist/esm/components/AboutPlatform/AboutPlatform.js +50 -50
- package/dist/esm/components/AdvantageSideNav/AdvantageSideNav.js +220 -243
- package/dist/esm/components/AutoSuggest/AutoSuggest.js +101 -101
- package/dist/esm/components/Avatar/Avatar.js +18 -18
- package/dist/esm/components/CheckboxList/CheckboxList.js +34 -34
- package/dist/esm/components/ComboBox/ComboBox.js +103 -103
- package/dist/esm/components/ComboBoxMultiSelect/ComboBoxMultiSelect.js +32 -32
- package/dist/esm/components/ComboBoxMultiSelect/MultiSelect.js +208 -208
- package/dist/esm/components/ComposedModal/ComposedModal.js +80 -80
- package/dist/esm/components/ConfirmModal/ConfirmModal.js +43 -43
- package/dist/esm/components/Creatable/Creatable.js +137 -137
- package/dist/esm/components/DataDrivenInput/DataDrivenInput.js +226 -226
- package/dist/esm/components/DateInput/DateInput.js +35 -35
- package/dist/esm/components/DecisionButtons/DecisionButtons.js +61 -61
- package/dist/esm/components/DelayedRender/DelayedRender.js +17 -17
- package/dist/esm/components/DynamicFormik/DynamicFormik.js +578 -578
- package/dist/esm/components/Error403/Error403.js +13 -13
- package/dist/esm/components/Error403/ForbiddenErrorBackground.js +113 -113
- package/dist/esm/components/Error403/GraphicWrangler/GraphicWrangler.js +62 -62
- package/dist/esm/components/Error404/Error404.js +13 -13
- package/dist/esm/components/Error404/GraphicLoch/GraphicLoch.js +17 -17
- package/dist/esm/components/Error404/NotFoundErrorBackground.js +129 -129
- package/dist/esm/components/ErrorBoundary/ErrorBoundary.js +32 -32
- package/dist/esm/components/ErrorDragon/ErrorDragon.js +13 -13
- package/dist/esm/components/ErrorDragon/assets/ErrorGraphic.js +35 -35
- package/dist/esm/components/ErrorFullPage/ErrorFullPage.js +10 -10
- package/dist/esm/components/ErrorMessage/ErrorMessage.js +22 -22
- package/dist/esm/components/ErrorPage/ErrorPage.js +11 -11
- package/dist/esm/components/ErrorPageCore/ErrorPageCore.js +15 -15
- package/dist/esm/components/ErrorPageCore/GenericErrorBackground.js +124 -124
- package/dist/esm/components/FeatureHeader/FeatureHeader.js +29 -29
- package/dist/esm/components/FeatureNavTab/FeatureNavTab.js +12 -12
- package/dist/esm/components/FeatureNavTabs/FeatureNavTabs.js +12 -12
- package/dist/esm/components/FeatureSideNav/FeatureSideNav.js +12 -12
- package/dist/esm/components/FeatureSideNav/FeatureSideNavFooter.js +8 -8
- package/dist/esm/components/FeatureSideNav/FeatureSideNavHeader.js +8 -8
- package/dist/esm/components/FeatureSideNav/FeatureSideNavLinks.js +14 -14
- package/dist/esm/components/FeatureSideNavLink/FeatureSideNavLink.js +12 -12
- package/dist/esm/components/Feedback/Feedback.js +37 -40
- package/dist/esm/components/FlowModal/FlowModal.js +141 -141
- package/dist/esm/components/FlowModal/FlowModalForm.js +12 -12
- package/dist/esm/components/Header/Header.js +190 -168
- package/dist/esm/components/Header/HeaderAppSwitcher.js +94 -102
- package/dist/esm/components/Header/HeaderMenu.js +7 -7
- package/dist/esm/components/Header/HeaderMenuItem.js +52 -53
- package/dist/esm/components/Header/HeaderTeamSwitcher.js +318 -0
- package/dist/esm/components/Header/UserRequests.js +29 -29
- package/dist/esm/components/ImageModal/ImageModal.js +17 -17
- package/dist/esm/components/Loading/Loading.js +8 -8
- package/dist/esm/components/MemberBar/MemberBar.js +20 -20
- package/dist/esm/components/Modal/Modal.js +20 -20
- package/dist/esm/components/ModalConfirmEdit/ModalConfirmArray.js +14 -14
- package/dist/esm/components/ModalConfirmEdit/ModalConfirmDetails.js +11 -11
- package/dist/esm/components/ModalConfirmEdit/ModalConfirmEdit.js +17 -17
- package/dist/esm/components/ModalForm/ModalForm.js +9 -9
- package/dist/esm/components/Notifications/NotificationsContainer.js +22 -22
- package/dist/esm/components/Notifications/ToastNotification.js +21 -21
- package/dist/esm/components/Notifications/notify.js +17 -17
- package/dist/esm/components/PlatformBanner/PlatformBanner.js +8 -8
- package/dist/esm/components/PlatformNotifications/PlatformNotification.js +17 -17
- package/dist/esm/components/PlatformNotifications/PlatformNotificationsContainer.js +136 -136
- package/dist/esm/components/Portal/Portal.js +14 -14
- package/dist/esm/components/PrivacyRedirect/PrivacyRedirect.js +30 -30
- package/dist/esm/components/PrivacyStatement/PrivacyStatement.js +90 -90
- package/dist/esm/components/ProfileSettings/ProfileSettings.js +124 -124
- package/dist/esm/components/ProtectedRoute/ProtectedRoute.js +13 -13
- package/dist/esm/components/RadioGroup/RadioGroup.js +33 -33
- package/dist/esm/components/RichTextArea/RichTextArea.js +142 -142
- package/dist/esm/components/SignOut/SignOut.js +27 -27
- package/dist/esm/components/SupportCenter/SupportCenter.js +65 -65
- package/dist/esm/components/TextArea/TextArea.js +16 -16
- package/dist/esm/components/TextInput/TextInput.js +13 -13
- package/dist/esm/components/Toggle/Toggle.js +22 -22
- package/dist/esm/components/TooltipHover/TooltipHover.js +39 -39
- package/dist/esm/components/UIShell/UIShell.js +96 -90
- package/dist/esm/config/servicesConfig.js +22 -21
- package/dist/esm/constants/DataDrivenInputTypes.js +74 -74
- package/dist/esm/constants/UserType.js +13 -13
- package/dist/esm/hooks/useHeaderMenu.js +49 -49
- package/dist/esm/hooks/usePortal.js +74 -74
- package/dist/esm/hooks/useWindowSize.js +33 -33
- package/dist/esm/internal/ListBox/ListBox.js +41 -41
- package/dist/esm/internal/ListBox/ListBoxField.js +19 -19
- package/dist/esm/internal/ListBox/ListBoxMenu.js +19 -19
- package/dist/esm/internal/ListBox/ListBoxMenuIcon.js +31 -31
- package/dist/esm/internal/ListBox/ListBoxMenuItem.js +38 -38
- package/dist/esm/internal/ListBox/ListBoxSelection.js +64 -64
- package/dist/esm/internal/ListBox/index.js +10 -10
- package/dist/esm/internal/keyboard/keys.js +16 -16
- package/dist/esm/internal/keyboard/match.js +67 -67
- package/dist/esm/internal/settings.js +5 -5
- package/dist/esm/tools/accessibility.js +13 -13
- package/dist/esm/tools/createPropAdapter.js +44 -44
- package/dist/esm/tools/isUrl.js +39 -39
- package/dist/esm/tools/setupGetInstanceId.js +20 -20
- package/dist/esm/tools/useSetState.js +12 -12
- package/dist/esm/tools/yupAst/astGenerator.js +212 -212
- package/dist/esm/tools/yupAst/customValidators.js +17 -17
- package/dist/types/index.d.ts +1359 -1309
- package/package.json +167 -167
- package/scss/components/AboutPlatform/_aboutPlatform.scss +139 -139
- package/scss/components/AdvantageSideNav/_advantageSideNav.scss +261 -261
- package/scss/components/AutoSuggest/_autoSuggest.scss +62 -62
- package/scss/components/Avatar/_avatar.scss +32 -32
- package/scss/components/CheckboxList/_checkboxList.scss +26 -26
- package/scss/components/ComboBox/_combobox.scss +23 -23
- package/scss/components/ComboBoxMultiSelect/_comboBoxMultiSelect.scss +53 -53
- package/scss/components/ConfirmModal/_confirmModal.scss +12 -12
- package/scss/components/Creatable/_creatable.scss +48 -48
- package/scss/components/DateInput/_dateInput.scss +36 -36
- package/scss/components/DecisionButtons/_decisionButtons.scss +132 -132
- package/scss/components/DynamicFormik/_dynamicFormik.scss +17 -17
- package/scss/components/ErrorBoundary/_errorBoundary.scss +12 -12
- package/scss/components/ErrorDragon/_errorDragon.scss +55 -55
- package/scss/components/ErrorMessage/_errorMessage.scss +43 -43
- package/scss/components/ErrorPage/_errorPage.scss +66 -66
- package/scss/components/ErrorPageCore/_errorPageCore.scss +73 -73
- package/scss/components/FeatureHeader/_featureHeader.scss +67 -67
- package/scss/components/FeatureNavTab/_featureNavTab.scss +27 -27
- package/scss/components/FeatureSideNav/_featureSideNav.scss +76 -76
- package/scss/components/FeatureSideNavLink/_featureSideNavLink.scss +49 -49
- package/scss/components/Feedback/_feedback.scss +46 -46
- package/scss/components/Header/_header.scss +179 -179
- package/scss/components/Header/_headerAppSwitcher.scss +117 -117
- package/scss/components/Header/_headerMenu.scss +30 -30
- package/scss/components/Header/_headerMenuItem.scss +65 -65
- package/scss/components/Header/_headerTeamSwitcher.scss +195 -0
- package/scss/components/Header/_userRequests.scss +36 -36
- package/scss/components/ImageModal/_imageModal.scss +51 -51
- package/scss/components/MemberBar/_memberBar.scss +99 -99
- package/scss/components/Modal/_modal.scss +163 -163
- package/scss/components/ModalConfirmEdit/_modalConfirmEdit.scss +113 -113
- package/scss/components/Notifications/_notifications.scss +57 -57
- package/scss/components/PlatformBanner/_platformBanner.scss +30 -30
- package/scss/components/PlatformNotifications/_platformNotifications.scss +230 -230
- package/scss/components/PrivacyRedirect/_privacyRedirect.scss +43 -43
- package/scss/components/PrivacyStatement/_privacyStatement.scss +137 -137
- package/scss/components/ProfileSettings/_profileSettings.scss +117 -117
- package/scss/components/ProtectedRoute/_protectedRoute.scss +32 -32
- package/scss/components/RadioGroup/_radioGroup.scss +46 -46
- package/scss/components/RichTextArea/_richTextArea.scss +82 -82
- package/scss/components/SignOut/_signOut.scss +51 -51
- package/scss/components/SupportCenter/_supportCenter.scss +16 -16
- package/scss/components/TextArea/_textArea.scss +19 -19
- package/scss/components/TextInput/_textInput.scss +26 -26
- package/scss/components/Toggle/_toggle.scss +80 -80
- package/scss/components/TooltipHover/_tooltip.scss +48 -48
- package/scss/global/_config.scss +14 -14
- package/scss/global/_tippy.scss +49 -49
- package/scss/global/index.scss +401 -402
- package/scss/global/themes/_boomerang.scss +184 -184
- package/scss/global/themes/_default.scss +79 -79
- package/scss/global/themes/_shell-tokens.scss +42 -42
- package/scss/global/utils/_animations.scss +15 -15
- package/scss/global/utils/_mixins.scss +67 -67
- package/scss/global/utils/index.scss +10 -10
|
@@ -12,19 +12,19 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
12
12
|
|
|
13
13
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
14
14
|
|
|
15
|
-
/*
|
|
16
|
-
IBM Confidential
|
|
17
|
-
694970X, 69497O0
|
|
18
|
-
© Copyright IBM Corp. 2022, 2024
|
|
19
|
-
*/
|
|
20
|
-
const TextInputComponent = React__default.default.forwardRef(function TextInputComponent({ id, label, labelText, tooltipClassName = `${settings.prefix}--bmrg-text-input__tooltip`, tooltipContent, tooltipProps = { direction: "top" }, ...textInputProps }, ref) {
|
|
21
|
-
const labelValue = label || labelText;
|
|
22
|
-
return (React__default.default.createElement("div", { key: id, className: `${settings.prefix}--bmrg-text-input` },
|
|
23
|
-
React__default.default.createElement(react.TextInput, { id: id, labelText: labelValue && (React__default.default.createElement("div", { className: `${settings.prefix}--bmrg-text-input__label` },
|
|
24
|
-
React__default.default.createElement("div", null, labelValue),
|
|
25
|
-
tooltipContent && (React__default.default.createElement("div", { className: tooltipClassName },
|
|
26
|
-
React__default.default.createElement(TooltipHover.default, { tooltipContent: tooltipContent, ...tooltipProps },
|
|
27
|
-
React__default.default.createElement(icons.Information, { size: 16, fill: "currentColor" })))))), ref: ref, ...textInputProps })));
|
|
15
|
+
/*
|
|
16
|
+
IBM Confidential
|
|
17
|
+
694970X, 69497O0
|
|
18
|
+
© Copyright IBM Corp. 2022, 2024
|
|
19
|
+
*/
|
|
20
|
+
const TextInputComponent = React__default.default.forwardRef(function TextInputComponent({ id, label, labelText, tooltipClassName = `${settings.prefix}--bmrg-text-input__tooltip`, tooltipContent, tooltipProps = { direction: "top" }, ...textInputProps }, ref) {
|
|
21
|
+
const labelValue = label || labelText;
|
|
22
|
+
return (React__default.default.createElement("div", { key: id, className: `${settings.prefix}--bmrg-text-input` },
|
|
23
|
+
React__default.default.createElement(react.TextInput, { id: id, labelText: labelValue && (React__default.default.createElement("div", { className: `${settings.prefix}--bmrg-text-input__label` },
|
|
24
|
+
React__default.default.createElement("div", null, labelValue),
|
|
25
|
+
tooltipContent && (React__default.default.createElement("div", { className: tooltipClassName },
|
|
26
|
+
React__default.default.createElement(TooltipHover.default, { tooltipContent: tooltipContent, ...tooltipProps },
|
|
27
|
+
React__default.default.createElement(icons.Information, { size: 16, fill: "currentColor" })))))), ref: ref, ...textInputProps })));
|
|
28
28
|
});
|
|
29
29
|
|
|
30
30
|
exports.default = TextInputComponent;
|
|
@@ -14,28 +14,28 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
14
14
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
15
15
|
var cx__default = /*#__PURE__*/_interopDefault(cx);
|
|
16
16
|
|
|
17
|
-
/*
|
|
18
|
-
IBM Confidential
|
|
19
|
-
694970X, 69497O0
|
|
20
|
-
© Copyright IBM Corp. 2022, 2024
|
|
21
|
-
*/
|
|
22
|
-
function ToggleComponent({ helperText, id, invalid, invalidText, reversed, label, labelText, labelA = "", labelB = "", orientation = "horizontal", tooltipClassName = `${settings.prefix}--bmrg-toggle__tooltip`, tooltipContent, tooltipProps = { direction: "top" }, ...toggleProps }) {
|
|
23
|
-
const labelValue = label || labelText;
|
|
24
|
-
const labelTextId = !labelValue ? undefined : `${id}-label`;
|
|
25
|
-
return (React__default.default.createElement("div", { className: `${settings.prefix}--bmrg-toggle__container` },
|
|
26
|
-
React__default.default.createElement("div", { key: id, className: cx__default.default(`${settings.prefix}--bmrg-toggle`, {
|
|
27
|
-
"--reversed": reversed,
|
|
28
|
-
"--vertical": orientation === "vertical",
|
|
29
|
-
}) },
|
|
30
|
-
labelValue && (React__default.default.createElement(React__default.default.Fragment, null,
|
|
31
|
-
React__default.default.createElement("div", { className: `${settings.prefix}--bmrg-toggle__title` },
|
|
32
|
-
React__default.default.createElement("label", { id: labelTextId, className: `${settings.prefix}--label`, htmlFor: id, style: { marginBottom: "0" } }, labelValue),
|
|
33
|
-
tooltipContent && (React__default.default.createElement("div", { className: tooltipClassName },
|
|
34
|
-
React__default.default.createElement(TooltipHover.default, { ...tooltipProps, tooltipText: tooltipContent },
|
|
35
|
-
React__default.default.createElement(icons.Information, { size: 16, fill: "currentColor" }))))))),
|
|
36
|
-
React__default.default.createElement(react.Toggle, { id: id, "aria-labelledby": labelTextId, labelA: labelA, labelB: labelB, labelText: "", ...toggleProps })),
|
|
37
|
-
invalid && (React__default.default.createElement("div", { className: cx__default.default(`${settings.prefix}--bmrg-toggle__invalid-text`, `${settings.prefix}--form-requirement`), style: { marginBottom: "0" } }, invalidText)),
|
|
38
|
-
helperText && !invalid && (React__default.default.createElement("div", { className: `${settings.prefix}--form__helper-text`, style: { marginBottom: "0" } }, helperText))));
|
|
17
|
+
/*
|
|
18
|
+
IBM Confidential
|
|
19
|
+
694970X, 69497O0
|
|
20
|
+
© Copyright IBM Corp. 2022, 2024
|
|
21
|
+
*/
|
|
22
|
+
function ToggleComponent({ helperText, id, invalid, invalidText, reversed, label, labelText, labelA = "", labelB = "", orientation = "horizontal", tooltipClassName = `${settings.prefix}--bmrg-toggle__tooltip`, tooltipContent, tooltipProps = { direction: "top" }, ...toggleProps }) {
|
|
23
|
+
const labelValue = label || labelText;
|
|
24
|
+
const labelTextId = !labelValue ? undefined : `${id}-label`;
|
|
25
|
+
return (React__default.default.createElement("div", { className: `${settings.prefix}--bmrg-toggle__container` },
|
|
26
|
+
React__default.default.createElement("div", { key: id, className: cx__default.default(`${settings.prefix}--bmrg-toggle`, {
|
|
27
|
+
"--reversed": reversed,
|
|
28
|
+
"--vertical": orientation === "vertical",
|
|
29
|
+
}) },
|
|
30
|
+
labelValue && (React__default.default.createElement(React__default.default.Fragment, null,
|
|
31
|
+
React__default.default.createElement("div", { className: `${settings.prefix}--bmrg-toggle__title` },
|
|
32
|
+
React__default.default.createElement("label", { id: labelTextId, className: `${settings.prefix}--label`, htmlFor: id, style: { marginBottom: "0" } }, labelValue),
|
|
33
|
+
tooltipContent && (React__default.default.createElement("div", { className: tooltipClassName },
|
|
34
|
+
React__default.default.createElement(TooltipHover.default, { ...tooltipProps, tooltipText: tooltipContent },
|
|
35
|
+
React__default.default.createElement(icons.Information, { size: 16, fill: "currentColor" }))))))),
|
|
36
|
+
React__default.default.createElement(react.Toggle, { id: id, "aria-labelledby": labelTextId, labelA: labelA, labelB: labelB, labelText: "", ...toggleProps })),
|
|
37
|
+
invalid && (React__default.default.createElement("div", { className: cx__default.default(`${settings.prefix}--bmrg-toggle__invalid-text`, `${settings.prefix}--form-requirement`), style: { marginBottom: "0" } }, invalidText)),
|
|
38
|
+
helperText && !invalid && (React__default.default.createElement("div", { className: `${settings.prefix}--form__helper-text`, style: { marginBottom: "0" } }, helperText))));
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
exports.default = ToggleComponent;
|
|
@@ -13,45 +13,45 @@ var React__default = /*#__PURE__*/_interopDefault(React);
|
|
|
13
13
|
var Tippy__default = /*#__PURE__*/_interopDefault(Tippy);
|
|
14
14
|
var cx__default = /*#__PURE__*/_interopDefault(cx);
|
|
15
15
|
|
|
16
|
-
/*
|
|
17
|
-
IBM Confidential
|
|
18
|
-
694970X, 69497O0
|
|
19
|
-
© Copyright IBM Corp. 2022, 2024
|
|
20
|
-
*/
|
|
21
|
-
/**
|
|
22
|
-
* TooltipHover to replace TooltipDefintion in most situations.
|
|
23
|
-
* Uses https://github.com/atomiks/tippyjs-react
|
|
24
|
-
*/
|
|
25
|
-
function TooltipHover({ align, direction, children, className, content, placement, tooltipContent, tooltipText, ...rest }) {
|
|
26
|
-
// support all three for compat with both tippy props and carbon
|
|
27
|
-
const contentToRender = content || tooltipContent || tooltipText;
|
|
28
|
-
/**
|
|
29
|
-
* Determine where to place it based on possible combinations
|
|
30
|
-
*
|
|
31
|
-
*/
|
|
32
|
-
let computedPlacement = "";
|
|
33
|
-
// Tippy prop placement takes precedence
|
|
34
|
-
if (placement) {
|
|
35
|
-
computedPlacement = placement;
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
if (direction && align) {
|
|
39
|
-
computedPlacement = `${direction}-${align}`;
|
|
40
|
-
}
|
|
41
|
-
else if (direction) {
|
|
42
|
-
computedPlacement = direction;
|
|
43
|
-
}
|
|
44
|
-
else if (align) {
|
|
45
|
-
computedPlacement = `auto-${align}`;
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
computedPlacement = "bottom";
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
// Sensible defaults to match CDS
|
|
52
|
-
return (React__default.default.createElement(Tippy__default.default, { arrow: `<svg height="6px" width="8px" viewBox="0 0 80 60" xmlns="http://www.w3.org/2000/svg">
|
|
53
|
-
<polygon points= "0 60, 40 0, 80 60"/>
|
|
54
|
-
</svg>`, animation: "fade", className: cx__default.default(`${settings.prefix}--bmrg-tooltip`, className), content: contentToRender, duration: 100, placement: computedPlacement, ...rest }, children));
|
|
16
|
+
/*
|
|
17
|
+
IBM Confidential
|
|
18
|
+
694970X, 69497O0
|
|
19
|
+
© Copyright IBM Corp. 2022, 2024
|
|
20
|
+
*/
|
|
21
|
+
/**
|
|
22
|
+
* TooltipHover to replace TooltipDefintion in most situations.
|
|
23
|
+
* Uses https://github.com/atomiks/tippyjs-react
|
|
24
|
+
*/
|
|
25
|
+
function TooltipHover({ align, direction, children, className, content, placement, tooltipContent, tooltipText, ...rest }) {
|
|
26
|
+
// support all three for compat with both tippy props and carbon
|
|
27
|
+
const contentToRender = content || tooltipContent || tooltipText;
|
|
28
|
+
/**
|
|
29
|
+
* Determine where to place it based on possible combinations
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
let computedPlacement = "";
|
|
33
|
+
// Tippy prop placement takes precedence
|
|
34
|
+
if (placement) {
|
|
35
|
+
computedPlacement = placement;
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
if (direction && align) {
|
|
39
|
+
computedPlacement = `${direction}-${align}`;
|
|
40
|
+
}
|
|
41
|
+
else if (direction) {
|
|
42
|
+
computedPlacement = direction;
|
|
43
|
+
}
|
|
44
|
+
else if (align) {
|
|
45
|
+
computedPlacement = `auto-${align}`;
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
computedPlacement = "bottom";
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
// Sensible defaults to match CDS
|
|
52
|
+
return (React__default.default.createElement(Tippy__default.default, { arrow: `<svg height="6px" width="8px" viewBox="0 0 80 60" xmlns="http://www.w3.org/2000/svg">
|
|
53
|
+
<polygon points= "0 60, 40 0, 80 60"/>
|
|
54
|
+
</svg>`, animation: "fade", className: cx__default.default(`${settings.prefix}--bmrg-tooltip`, className), content: contentToRender, duration: 100, placement: computedPlacement, ...rest }, children));
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
exports.default = TooltipHover;
|
|
@@ -21,95 +21,101 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
21
21
|
|
|
22
22
|
var React__default = /*#__PURE__*/_interopDefault(React);
|
|
23
23
|
|
|
24
|
-
/*
|
|
25
|
-
IBM Confidential
|
|
26
|
-
694970X, 69497O0
|
|
27
|
-
© Copyright IBM Corp. 2022, 2024
|
|
28
|
-
*/
|
|
29
|
-
function UIShell({ baseEnvUrl, carbonTheme = "g10", config, leftPanel, platformName, productName, profileMenuItems = [], supportMenuItems = [], renderPrivacyRedirect = true, renderPrivacyStatement = true, rightPanel, handleShowTutorial, skipToContentProps, templateMeteringEvent, triggerEvent, tutorialScreenToShow, user, userTeams, enableIcaMacs, }) {
|
|
30
|
-
// Support base header .e.g for an error state
|
|
31
|
-
if (!config) {
|
|
32
|
-
return (React__default.default.createElement(
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
const
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
const
|
|
45
|
-
const
|
|
46
|
-
const
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
const
|
|
54
|
-
const
|
|
55
|
-
const
|
|
56
|
-
const
|
|
57
|
-
const
|
|
58
|
-
const
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
*
|
|
63
|
-
*
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
}
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
}
|
|
111
|
-
else
|
|
112
|
-
|
|
24
|
+
/*
|
|
25
|
+
IBM Confidential
|
|
26
|
+
694970X, 69497O0
|
|
27
|
+
© Copyright IBM Corp. 2022, 2024
|
|
28
|
+
*/
|
|
29
|
+
function UIShell({ analyticsHelpers, baseEnvUrl, carbonTheme = "g10", config, createJoinTeamTrigger, history, isLaunchpad = false, isLoadingTeamSwitcher, isSuccessTeamSwitcher, setIsSuccessTeamSwitcher, leftPanel, platformName, productName, profileMenuItems = [], supportMenuItems = [], renderPrivacyRedirect = true, renderPrivacyStatement = true, rightPanel, handleShowTutorial, refetchUser, refetchNavigation, skipToContentProps, templateMeteringEvent, trackEvent, triggerEvent, tutorialScreenToShow, user, userTeams, userTeamsAssets, enableIcaMacs, }) {
|
|
30
|
+
// Support base header .e.g for an error state
|
|
31
|
+
if (!config) {
|
|
32
|
+
return (React__default.default.createElement(reactQuery.QueryClientProvider, { client: servicesConfig.queryClient },
|
|
33
|
+
React__default.default.createElement(Header.default, { baseEnvUrl: baseEnvUrl ?? "", baseServicesUrl: "", carbonTheme: carbonTheme, enableAppSwitcher: false, enableNotifications: false, enableNotificationsCount: false, productName: productName || platformName || "", user: user })));
|
|
34
|
+
}
|
|
35
|
+
const { features, navigation, platform, platformMessage } = config;
|
|
36
|
+
const names = getProductAndPlatformNames({ productName, platformName, platform });
|
|
37
|
+
const sendIdeasUrl = platform?.feedbackUrl || "https://ideas.ibm.com";
|
|
38
|
+
const supportLink = platform?.supportUrl;
|
|
39
|
+
const sendBluePointsAwardUrl = platform?.sendBluePointsAwardUrl;
|
|
40
|
+
const partnerEmailId = "ica-support@ibm.com";
|
|
41
|
+
/**
|
|
42
|
+
* Check feature enablement via explicit feature flags
|
|
43
|
+
*/
|
|
44
|
+
const isAppSwitcherEnabled = Boolean(features?.["appSwitcher.enabled"]);
|
|
45
|
+
const instanceSwitcherEnabled = Boolean(platform?.["instanceSwitcherEnabled"]);
|
|
46
|
+
const isFeedbackEnabled = Boolean(features?.["feedback.enabled"]);
|
|
47
|
+
const isNotificationsEnabled = Boolean(features?.["notifications.enabled"]);
|
|
48
|
+
const isNotificationsCountEnabled = Boolean(features?.["notificationsCount.enabled"]);
|
|
49
|
+
const isSupportEnabled = Boolean(features?.["support.enabled"]);
|
|
50
|
+
/**
|
|
51
|
+
* Check feature enablement via value truthiness
|
|
52
|
+
*/
|
|
53
|
+
const isAboutPlatformEnabled = Boolean(platform.name);
|
|
54
|
+
const isCommunityEnabled = Boolean(platform?.communityUrl);
|
|
55
|
+
const isSendMailEnabled = Boolean(platform.sendMail);
|
|
56
|
+
const isSignOutEnabled = Boolean(platform?.signOutUrl);
|
|
57
|
+
const isUserEnabled = Boolean(user?.id);
|
|
58
|
+
const isPartnerUser = Boolean(user?.type === UserType.USER_PLATFORM_ROLE.Partner);
|
|
59
|
+
const supportFlagCheck = user?.showSupport;
|
|
60
|
+
const askICAEnabled = Boolean(platform?.askICAEnabled);
|
|
61
|
+
/**
|
|
62
|
+
* Checking for conditions when we explicitly set "renderPrivacyRedirect" to false (it defaults to true) OR
|
|
63
|
+
* it's disabled overall for the platform. This lets us toggle the UIShell consent redirect per app as needed
|
|
64
|
+
* e.g. disabled in Launchpad, but have it enabled for rest of the platform AND also support
|
|
65
|
+
* having it disabled in a "standalone" mode via the consent.enable feature flag, i.e. data driven via the service
|
|
66
|
+
*/
|
|
67
|
+
const isPrivacyRedirectDisabled = renderPrivacyRedirect === false || features?.["consent.enabled"] === false;
|
|
68
|
+
const isPrivacyModalRendered = isPrivacyRedirectDisabled === false && user?.hasConsented === false;
|
|
69
|
+
/**
|
|
70
|
+
* Also enable/disable privacy statement via the consent.enabled feature flag
|
|
71
|
+
*/
|
|
72
|
+
const isPrivacyStatementDisabled = renderPrivacyStatement === false || features?.["consent.enabled"] === false;
|
|
73
|
+
return (React__default.default.createElement(reactQuery.QueryClientProvider, { client: servicesConfig.queryClient },
|
|
74
|
+
React__default.default.createElement(Header.default, { analyticsHelpers: analyticsHelpers, baseEnvUrl: platform.baseEnvUrl, baseServicesUrl: platform.baseServicesUrl, carbonTheme: carbonTheme, createJoinTeamTrigger: createJoinTeamTrigger, enableAppSwitcher: isAppSwitcherEnabled, instanceSwitcherEnabled: instanceSwitcherEnabled, enableNotifications: isNotificationsEnabled, enableNotificationsCount: isNotificationsCountEnabled, leftPanel: leftPanel, navLinks: navigation, platform: platform, platformMessage: platformMessage, prefixName: names.platformName, productName: names.productName, rightPanel: rightPanel, requestSummary: user?.requestSummary, skipToContentProps: skipToContentProps, templateMeteringEvent: templateMeteringEvent, triggerEvent: triggerEvent, profileMenuItems: [
|
|
75
|
+
isUserEnabled && (React__default.default.createElement(ProfileSettings.ProfileSettingsMenuItem, { key: "profile-settings", baseServicesUrl: platform.baseServicesUrl, src: `${platform.baseServicesUrl}/users/image/${user?.email}`, userName: user?.displayName ?? user?.name })),
|
|
76
|
+
isSendMailEnabled && (React__default.default.createElement(HeaderMenuItem.default, { key: "email-preferences", href: `${platform.baseEnvUrl}/launchpad/email-preferences`, icon: React__default.default.createElement(icons.Email, null), kind: "internal", text: "Email Preferences", type: "link" })),
|
|
77
|
+
!isPrivacyStatementDisabled && (React__default.default.createElement(PrivacyStatement.PrivacyStatementMenuItem, { key: "privacy-statement", baseServicesUrl: platform.baseServicesUrl, platformEmail: platform?.platformEmail })),
|
|
78
|
+
...profileMenuItems,
|
|
79
|
+
isSignOutEnabled && React__default.default.createElement(SignOut.SignOutMenuItem, { key: "Sign Out", signOutLink: platform.signOutUrl }),
|
|
80
|
+
].filter(Boolean), supportMenuItems: [
|
|
81
|
+
!isPartnerUser && (React__default.default.createElement(HeaderMenuItem.default, { key: "docs", href: platform?.docs?.url, icon: React__default.default.createElement(icons.Document, null), "data-testid": "docs", kind: "external", text: "Docs", type: "link" })),
|
|
82
|
+
isSupportEnabled &&
|
|
83
|
+
(supportFlagCheck || isPartnerUser ? (React__default.default.createElement(SupportCenter.SupportCenterMenuItem, { key: "support-center", platformName: platform?.platformName, platformOrganization: platform?.platformOrganization, supportLink: supportLink, partnerEmailId: partnerEmailId, enablePartner: isPartnerUser, baseServicesUrl: platform.baseServicesUrl })) : (React__default.default.createElement(HeaderMenuItem.default, { key: "support-center", href: platform?.supportUrl, icon: React__default.default.createElement(icons.HelpDesk, null), kind: "external", text: "Support Center", type: "link" }))),
|
|
84
|
+
React__default.default.createElement(HeaderMenuItem.default, { key: "release-notes", href: platform?.releaseNotesUrl, icon: React__default.default.createElement(icons.CatalogPublish, null), "data-testid": "release-notes", kind: "app", text: "Release Notes", type: "link" }),
|
|
85
|
+
React__default.default.createElement(HeaderMenuItem.default, { key: "legal-terms", href: platform?.legalTermsUrl, icon: React__default.default.createElement(icons.Policy, null), "data-testid": "legal-terms", kind: "app", text: "Legal Terms", type: "link" }),
|
|
86
|
+
React__default.default.createElement("span", { style: { borderBottom: "1px solid #b8c1c1" } }),
|
|
87
|
+
isCommunityEnabled && (React__default.default.createElement(HeaderMenuItem.default, { key: "community", href: platform?.communityUrl, icon: React__default.default.createElement(icons.Forum, null), kind: "external", text: "Community", type: "link" })),
|
|
88
|
+
isFeedbackEnabled && (React__default.default.createElement(Feedback.FeedbackMenuItem, { key: "feedback", platformName: platform?.platformName, platformOrganization: platform?.platformOrganization, sendIdeasUrl: sendIdeasUrl, sendBluePointsAwardUrl: sendBluePointsAwardUrl })),
|
|
89
|
+
!isPartnerUser && askICAEnabled ? (React__default.default.createElement(HeaderMenuItem.default, { key: "chat-launch", href: platform?.askICAUrl, icon: React__default.default.createElement(icons.ChatLaunch, null), "data-testid": "askICA-chatlaunch", kind: "external", text: "AskICA", type: "link" })) : null,
|
|
90
|
+
!isPartnerUser && enableIcaMacs && (React__default.default.createElement(HeaderMenuItem.default, { key: "launch-ideation-agent", href: `${platform.baseEnvUrl}/launchpad/macs`, icon: React__default.default.createElement(icons.Cognitive, null), "data-testid": "launch-ideation-agent", kind: "app", text: "AI Proposal Feedback Tool", type: "link" })),
|
|
91
|
+
isAboutPlatformEnabled && (React__default.default.createElement(AboutPlatform.AboutPlatformMenuItem, { key: "about-platform", name: platform.name, baseServicesUrl: platform.baseServicesUrl })),
|
|
92
|
+
tutorialScreenToShow && handleShowTutorial && (React__default.default.createElement(HeaderMenuItem.default, { key: "launch-tutorial", onClick: handleShowTutorial, icon: React__default.default.createElement(icons.Book, null), "data-testid": "launch-tutorial", text: "Launch Tutorial", type: "button" })),
|
|
93
|
+
...supportMenuItems,
|
|
94
|
+
].filter(Boolean), history: history, isLaunchpad: isLaunchpad, isLoadingTeamSwitcher: isLoadingTeamSwitcher, isSuccessTeamSwitcher: isSuccessTeamSwitcher, refetchUser: refetchUser, refetchNavigation: refetchNavigation, setIsSuccessTeamSwitcher: setIsSuccessTeamSwitcher, trackEvent: trackEvent, user: user, userTeams: userTeams, userTeamsAssets: userTeamsAssets }),
|
|
95
|
+
isPrivacyModalRendered ? (React__default.default.createElement(PrivacyRedirect.default, { isOpen: true, baseEnvUrl: platform.baseEnvUrl, platformName: platform?.name, user: user })) : null));
|
|
96
|
+
}
|
|
97
|
+
/**
|
|
98
|
+
* Determine how to render the name and prefix in the Header based
|
|
99
|
+
* on what is passed in. If we only have the plaform or product name, then
|
|
100
|
+
* we want it to be bolded. If we have both, then make the platform the prefix
|
|
101
|
+
*/
|
|
102
|
+
function getProductAndPlatformNames(args) {
|
|
103
|
+
const { productName, platformName, platform } = args;
|
|
104
|
+
const resolvedPlatformName = platform.platformName ?? platformName;
|
|
105
|
+
let finalProductName = "";
|
|
106
|
+
let finalPlatformName = "";
|
|
107
|
+
if (productName && resolvedPlatformName) {
|
|
108
|
+
finalProductName = productName;
|
|
109
|
+
finalPlatformName = resolvedPlatformName;
|
|
110
|
+
}
|
|
111
|
+
else if (productName && !resolvedPlatformName) {
|
|
112
|
+
finalProductName = productName;
|
|
113
|
+
}
|
|
114
|
+
else if (!productName && resolvedPlatformName) {
|
|
115
|
+
finalProductName = resolvedPlatformName;
|
|
116
|
+
}
|
|
117
|
+
else ;
|
|
118
|
+
return { productName: finalProductName, platformName: finalPlatformName };
|
|
113
119
|
}
|
|
114
120
|
|
|
115
121
|
exports.default = UIShell;
|
|
@@ -7,27 +7,28 @@ function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
|
|
7
7
|
|
|
8
8
|
var axios__default = /*#__PURE__*/_interopDefault(axios);
|
|
9
9
|
|
|
10
|
-
/*
|
|
11
|
-
IBM Confidential
|
|
12
|
-
694970X, 69497O0
|
|
13
|
-
© Copyright IBM Corp. 2022, 2024
|
|
14
|
-
*/
|
|
15
|
-
const queryClient = new reactQuery.QueryClient({
|
|
16
|
-
defaultOptions: { queries: { refetchOnWindowFocus: false } },
|
|
17
|
-
});
|
|
18
|
-
const serviceUrl = {
|
|
19
|
-
getLaunchpadUser: ({ baseServicesUrl }) => `${baseServicesUrl}/launchpad/user`,
|
|
20
|
-
getPlatformVersion: ({ baseServicesUrl }) => `${baseServicesUrl}/users/platform/version`,
|
|
21
|
-
getStatement: ({ baseServicesUrl }) => `${baseServicesUrl}/users/consents`,
|
|
22
|
-
getTeamServices: ({ baseServicesUrl, teamId }) => `${baseServicesUrl}/launchpad/teams/${teamId}/services`,
|
|
23
|
-
getUserTeamsServices: ({ baseServicesUrl }) => `${baseServicesUrl}/users/teams/services`,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
10
|
+
/*
|
|
11
|
+
IBM Confidential
|
|
12
|
+
694970X, 69497O0
|
|
13
|
+
© Copyright IBM Corp. 2022, 2024
|
|
14
|
+
*/
|
|
15
|
+
const queryClient = new reactQuery.QueryClient({
|
|
16
|
+
defaultOptions: { queries: { refetchOnWindowFocus: false } },
|
|
17
|
+
});
|
|
18
|
+
const serviceUrl = {
|
|
19
|
+
getLaunchpadUser: ({ baseServicesUrl }) => `${baseServicesUrl}/launchpad/user`,
|
|
20
|
+
getPlatformVersion: ({ baseServicesUrl }) => `${baseServicesUrl}/users/platform/version`,
|
|
21
|
+
getStatement: ({ baseServicesUrl }) => `${baseServicesUrl}/users/consents`,
|
|
22
|
+
getTeamServices: ({ baseServicesUrl, teamId }) => `${baseServicesUrl}/launchpad/teams/${teamId}/services`,
|
|
23
|
+
getUserTeamsServices: ({ baseServicesUrl }) => `${baseServicesUrl}/users/teams/services`,
|
|
24
|
+
getUserTeamsServicesAssets: ({ baseServicesUrl }) => `${baseServicesUrl}/users/teams/services/assets`,
|
|
25
|
+
resourceUserConsent: ({ baseServicesUrl }) => `${baseServicesUrl}/users/consent`,
|
|
26
|
+
resourceUserProfile: ({ baseServicesUrl }) => `${baseServicesUrl}/users/profile`,
|
|
27
|
+
};
|
|
28
|
+
const resolver = {
|
|
29
|
+
query: (url, config) => () => axios__default.default.get(url, config).then((response) => response.data),
|
|
30
|
+
patchUserProfile: ({ baseServicesUrl, body }) => axios__default.default.patch(serviceUrl.resourceUserProfile({ baseServicesUrl }), body),
|
|
31
|
+
putUserConsent: ({ baseServicesUrl, body }) => axios__default.default.put(serviceUrl.resourceUserConsent({ baseServicesUrl }), body),
|
|
31
32
|
};
|
|
32
33
|
|
|
33
34
|
exports.queryClient = queryClient;
|
|
@@ -1,79 +1,79 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
/*
|
|
4
|
-
IBM Confidential
|
|
5
|
-
694970X, 69497O0
|
|
6
|
-
© Copyright IBM Corp. 2022, 2024
|
|
7
|
-
*/
|
|
8
|
-
const CHECKBOX_TYPES = {
|
|
9
|
-
CHECKBOX: "checkbox",
|
|
10
|
-
};
|
|
11
|
-
const CREATABLE_TYPES = {
|
|
12
|
-
CREATABLE_SINGLE: "creatable-single",
|
|
13
|
-
CREATABLE_SINGLE_NON_DELETABLE: "creatable-single-non-deletable",
|
|
14
|
-
CREATABLE_PAIR: "creatable-pair",
|
|
15
|
-
CREATABLE_PAIR_NON_DELETABLE: "creatable-pair-non-deletable",
|
|
16
|
-
};
|
|
17
|
-
const DATE_TYPES = {
|
|
18
|
-
DATE: "date",
|
|
19
|
-
DATE_RANGE: "date-range",
|
|
20
|
-
};
|
|
21
|
-
const MULTI_SELECT_TYPES = {
|
|
22
|
-
MULTI_SELECT: "multiselect",
|
|
23
|
-
};
|
|
24
|
-
const RADIO_TYPES = {
|
|
25
|
-
RADIO: "radio",
|
|
26
|
-
};
|
|
27
|
-
const SELECT_TYPES = {
|
|
28
|
-
SELECT: "select",
|
|
29
|
-
};
|
|
30
|
-
const TEXT_AREA_TYPES = {
|
|
31
|
-
TEXT_AREA: "textarea",
|
|
32
|
-
};
|
|
33
|
-
const TEXT_EDITOR_TYPES = {
|
|
34
|
-
TEXT_EDITOR: "texteditor",
|
|
35
|
-
};
|
|
36
|
-
const TEXT_INPUT_TYPES = {
|
|
37
|
-
TEXT: "text",
|
|
38
|
-
PASSWORD: "password",
|
|
39
|
-
SECURED: "secured",
|
|
40
|
-
NUMBER: "number",
|
|
41
|
-
URL: "url",
|
|
42
|
-
EMAIL: "email",
|
|
43
|
-
TIME: "time",
|
|
44
|
-
TEL: "tel",
|
|
45
|
-
};
|
|
46
|
-
const BOOLEAN_TYPES = {
|
|
47
|
-
BOOLEAN: "boolean",
|
|
48
|
-
};
|
|
49
|
-
const INPUT_GROUPS = {
|
|
50
|
-
CHECKBOX: "checkbox",
|
|
51
|
-
CREATABLE: "creatable",
|
|
52
|
-
DATE: "date",
|
|
53
|
-
MULTI_SELECT: "multiselect",
|
|
54
|
-
RADIO: "radio",
|
|
55
|
-
SELECT: "select",
|
|
56
|
-
TEXT_AREA: "textArea",
|
|
57
|
-
TEXT_EDITOR: "textEditor",
|
|
58
|
-
TEXT_INPUT: "textInput",
|
|
59
|
-
BOOLEAN: "boolean",
|
|
60
|
-
};
|
|
61
|
-
const ARRAY_INPUT_TYPES = {
|
|
62
|
-
...CHECKBOX_TYPES,
|
|
63
|
-
...CREATABLE_TYPES,
|
|
64
|
-
...MULTI_SELECT_TYPES,
|
|
65
|
-
};
|
|
66
|
-
const INPUT_TYPES_ARRAY = Object.values({
|
|
67
|
-
...BOOLEAN_TYPES,
|
|
68
|
-
...CHECKBOX_TYPES,
|
|
69
|
-
...CREATABLE_TYPES,
|
|
70
|
-
...DATE_TYPES,
|
|
71
|
-
...MULTI_SELECT_TYPES,
|
|
72
|
-
...RADIO_TYPES,
|
|
73
|
-
...SELECT_TYPES,
|
|
74
|
-
...TEXT_AREA_TYPES,
|
|
75
|
-
...TEXT_EDITOR_TYPES,
|
|
76
|
-
...TEXT_INPUT_TYPES,
|
|
3
|
+
/*
|
|
4
|
+
IBM Confidential
|
|
5
|
+
694970X, 69497O0
|
|
6
|
+
© Copyright IBM Corp. 2022, 2024
|
|
7
|
+
*/
|
|
8
|
+
const CHECKBOX_TYPES = {
|
|
9
|
+
CHECKBOX: "checkbox",
|
|
10
|
+
};
|
|
11
|
+
const CREATABLE_TYPES = {
|
|
12
|
+
CREATABLE_SINGLE: "creatable-single",
|
|
13
|
+
CREATABLE_SINGLE_NON_DELETABLE: "creatable-single-non-deletable",
|
|
14
|
+
CREATABLE_PAIR: "creatable-pair",
|
|
15
|
+
CREATABLE_PAIR_NON_DELETABLE: "creatable-pair-non-deletable",
|
|
16
|
+
};
|
|
17
|
+
const DATE_TYPES = {
|
|
18
|
+
DATE: "date",
|
|
19
|
+
DATE_RANGE: "date-range",
|
|
20
|
+
};
|
|
21
|
+
const MULTI_SELECT_TYPES = {
|
|
22
|
+
MULTI_SELECT: "multiselect",
|
|
23
|
+
};
|
|
24
|
+
const RADIO_TYPES = {
|
|
25
|
+
RADIO: "radio",
|
|
26
|
+
};
|
|
27
|
+
const SELECT_TYPES = {
|
|
28
|
+
SELECT: "select",
|
|
29
|
+
};
|
|
30
|
+
const TEXT_AREA_TYPES = {
|
|
31
|
+
TEXT_AREA: "textarea",
|
|
32
|
+
};
|
|
33
|
+
const TEXT_EDITOR_TYPES = {
|
|
34
|
+
TEXT_EDITOR: "texteditor",
|
|
35
|
+
};
|
|
36
|
+
const TEXT_INPUT_TYPES = {
|
|
37
|
+
TEXT: "text",
|
|
38
|
+
PASSWORD: "password",
|
|
39
|
+
SECURED: "secured",
|
|
40
|
+
NUMBER: "number",
|
|
41
|
+
URL: "url",
|
|
42
|
+
EMAIL: "email",
|
|
43
|
+
TIME: "time",
|
|
44
|
+
TEL: "tel",
|
|
45
|
+
};
|
|
46
|
+
const BOOLEAN_TYPES = {
|
|
47
|
+
BOOLEAN: "boolean",
|
|
48
|
+
};
|
|
49
|
+
const INPUT_GROUPS = {
|
|
50
|
+
CHECKBOX: "checkbox",
|
|
51
|
+
CREATABLE: "creatable",
|
|
52
|
+
DATE: "date",
|
|
53
|
+
MULTI_SELECT: "multiselect",
|
|
54
|
+
RADIO: "radio",
|
|
55
|
+
SELECT: "select",
|
|
56
|
+
TEXT_AREA: "textArea",
|
|
57
|
+
TEXT_EDITOR: "textEditor",
|
|
58
|
+
TEXT_INPUT: "textInput",
|
|
59
|
+
BOOLEAN: "boolean",
|
|
60
|
+
};
|
|
61
|
+
const ARRAY_INPUT_TYPES = {
|
|
62
|
+
...CHECKBOX_TYPES,
|
|
63
|
+
...CREATABLE_TYPES,
|
|
64
|
+
...MULTI_SELECT_TYPES,
|
|
65
|
+
};
|
|
66
|
+
const INPUT_TYPES_ARRAY = Object.values({
|
|
67
|
+
...BOOLEAN_TYPES,
|
|
68
|
+
...CHECKBOX_TYPES,
|
|
69
|
+
...CREATABLE_TYPES,
|
|
70
|
+
...DATE_TYPES,
|
|
71
|
+
...MULTI_SELECT_TYPES,
|
|
72
|
+
...RADIO_TYPES,
|
|
73
|
+
...SELECT_TYPES,
|
|
74
|
+
...TEXT_AREA_TYPES,
|
|
75
|
+
...TEXT_EDITOR_TYPES,
|
|
76
|
+
...TEXT_INPUT_TYPES,
|
|
77
77
|
});
|
|
78
78
|
|
|
79
79
|
exports.ARRAY_INPUT_TYPES = ARRAY_INPUT_TYPES;
|
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
/*
|
|
4
|
-
IBM Confidential
|
|
5
|
-
694970X, 69497O0
|
|
6
|
-
© Copyright IBM Corp. 2022, 2024
|
|
7
|
-
*/
|
|
8
|
-
const USER_PLATFORM_ROLE = {
|
|
9
|
-
Admin: "admin",
|
|
10
|
-
Advisor: "advisor",
|
|
11
|
-
Operator: "operator",
|
|
12
|
-
Auditor: "auditor",
|
|
13
|
-
Author: "author",
|
|
14
|
-
User: "user",
|
|
15
|
-
Partner: "partner",
|
|
3
|
+
/*
|
|
4
|
+
IBM Confidential
|
|
5
|
+
694970X, 69497O0
|
|
6
|
+
© Copyright IBM Corp. 2022, 2024
|
|
7
|
+
*/
|
|
8
|
+
const USER_PLATFORM_ROLE = {
|
|
9
|
+
Admin: "admin",
|
|
10
|
+
Advisor: "advisor",
|
|
11
|
+
Operator: "operator",
|
|
12
|
+
Auditor: "auditor",
|
|
13
|
+
Author: "author",
|
|
14
|
+
User: "user",
|
|
15
|
+
Partner: "partner",
|
|
16
16
|
};
|
|
17
17
|
|
|
18
18
|
exports.USER_PLATFORM_ROLE = USER_PLATFORM_ROLE;
|