dce-reactkit 3.9.9 → 3.10.0
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/dist/cjs/index.js +15 -11
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/components/RadioButton.d.ts +2 -0
- package/dist/esm/index.js +15 -11
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/components/RadioButton.d.ts +2 -0
- package/dist/index.d.ts +2 -0
- package/package.json +1 -1
- package/src/components/CheckboxButton.tsx +15 -15
- package/src/components/RadioButton.tsx +25 -2
- package/src/helpers/genRouteHandler.ts +7 -7
package/dist/cjs/index.js
CHANGED
|
@@ -1694,24 +1694,28 @@ const RadioButton = (props) => {
|
|
|
1694
1694
|
/* -------------------------------- Setup ------------------------------- */
|
|
1695
1695
|
/*------------------------------------------------------------------------*/
|
|
1696
1696
|
/* -------------- Props ------------- */
|
|
1697
|
-
const { text, onSelected, ariaLabel, title, selected, id, noMarginOnRight, selectedVariant = (isDarkModeOn()
|
|
1697
|
+
const { text, onSelected, ariaLabel, title, selected, id, className, noMarginOnRight, selectedVariant = (isDarkModeOn()
|
|
1698
1698
|
? Variant$1.Light
|
|
1699
1699
|
: Variant$1.Secondary), unselectedVariant = (isDarkModeOn()
|
|
1700
1700
|
? Variant$1.Secondary
|
|
1701
|
-
: Variant$1.Light), small, } = props;
|
|
1701
|
+
: Variant$1.Light), small, useComplexFormatting, } = props;
|
|
1702
1702
|
/*------------------------------------------------------------------------*/
|
|
1703
1703
|
/* ------------------------------- Render ------------------------------- */
|
|
1704
1704
|
/*------------------------------------------------------------------------*/
|
|
1705
1705
|
/*----------------------------------------*/
|
|
1706
1706
|
/* --------------- Main UI -------------- */
|
|
1707
1707
|
/*----------------------------------------*/
|
|
1708
|
-
return (React__default["default"].createElement("button", { type: "button", id: id, title: title, className: `btn btn-${selected ? selectedVariant : unselectedVariant}${selected ? ' selected' : ''}${small ? ' btn-sm' : ''} m-0${noMarginOnRight ? '' : ' me-1'}`, "aria-label": `${ariaLabel}${selected ? ': currently selected' : ''}`, onClick: () => {
|
|
1708
|
+
return (React__default["default"].createElement("button", { type: "button", id: id, title: title, className: `btn btn-${selected ? selectedVariant : unselectedVariant}${selected ? ' selected' : ''}${small ? ' btn-sm' : ''} m-0${noMarginOnRight ? '' : ' me-1'} ${className !== null && className !== void 0 ? className : ''}`, "aria-label": `${ariaLabel}${selected ? ': currently selected' : ''}`, onClick: () => {
|
|
1709
1709
|
if (!selected) {
|
|
1710
1710
|
onSelected();
|
|
1711
1711
|
}
|
|
1712
1712
|
} },
|
|
1713
1713
|
React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, { icon: selected ? freeSolidSvgIcons.faDotCircle : freeRegularSvgIcons.faCircle, className: "me-1" }),
|
|
1714
|
-
|
|
1714
|
+
useComplexFormatting
|
|
1715
|
+
? (React__default["default"].createElement("pre", { className: "ps-2 text-start text-break", style: {
|
|
1716
|
+
whiteSpace: 'pre-wrap',
|
|
1717
|
+
} }, text))
|
|
1718
|
+
: (React__default["default"].createElement("div", { className: "flex-grow-1 text-start text-break ps-2" }, text))));
|
|
1715
1719
|
};
|
|
1716
1720
|
|
|
1717
1721
|
/**
|
|
@@ -15044,16 +15048,16 @@ const genRouteHandler = (opts) => {
|
|
|
15044
15048
|
const { timestamp, year, month, day, hour, minute, } = getTimeInfoInET();
|
|
15045
15049
|
// Main log info
|
|
15046
15050
|
const mainLogInfo = {
|
|
15047
|
-
id: `${launchInfo ? 'unknown'
|
|
15048
|
-
userFirstName: (launchInfo ? 'unknown'
|
|
15049
|
-
userLastName: (launchInfo ? 'unknown'
|
|
15050
|
-
userEmail: (launchInfo ? 'unknown'
|
|
15051
|
-
userId: (launchInfo ? 'unknown'
|
|
15051
|
+
id: `${launchInfo ? launchInfo.userId : 'unknown'}-${Date.now()}-${Math.floor(Math.random() * 100000)}-${Math.floor(Math.random() * 100000)}`,
|
|
15052
|
+
userFirstName: (launchInfo ? launchInfo.userFirstName : 'unknown'),
|
|
15053
|
+
userLastName: (launchInfo ? launchInfo.userLastName : 'unknown'),
|
|
15054
|
+
userEmail: (launchInfo ? launchInfo.userEmail : 'unknown'),
|
|
15055
|
+
userId: (launchInfo ? launchInfo.userId : 'unknown'),
|
|
15052
15056
|
isLearner: (launchInfo && !!launchInfo.isLearner),
|
|
15053
15057
|
isAdmin: (launchInfo && !!launchInfo.isAdmin),
|
|
15054
15058
|
isTTM: (launchInfo && !!launchInfo.isTTM),
|
|
15055
|
-
courseId: (launchInfo ? 'unknown'
|
|
15056
|
-
courseName: (launchInfo ? 'unknown'
|
|
15059
|
+
courseId: (launchInfo ? launchInfo.courseId : 'unknown'),
|
|
15060
|
+
courseName: (launchInfo ? launchInfo.contextLabel : 'unknown'),
|
|
15057
15061
|
browser,
|
|
15058
15062
|
device,
|
|
15059
15063
|
year,
|