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
|
@@ -11,10 +11,12 @@ type Props = {
|
|
|
11
11
|
title?: string;
|
|
12
12
|
selected?: boolean;
|
|
13
13
|
id?: string;
|
|
14
|
+
className?: string;
|
|
14
15
|
noMarginOnRight?: boolean;
|
|
15
16
|
selectedVariant?: Variant;
|
|
16
17
|
unselectedVariant?: Variant;
|
|
17
18
|
small?: boolean;
|
|
19
|
+
useComplexFormatting?: boolean;
|
|
18
20
|
};
|
|
19
21
|
declare const RadioButton: React.FC<Props>;
|
|
20
22
|
export default RadioButton;
|
package/dist/esm/index.js
CHANGED
|
@@ -1666,24 +1666,28 @@ const RadioButton = (props) => {
|
|
|
1666
1666
|
/* -------------------------------- Setup ------------------------------- */
|
|
1667
1667
|
/*------------------------------------------------------------------------*/
|
|
1668
1668
|
/* -------------- Props ------------- */
|
|
1669
|
-
const { text, onSelected, ariaLabel, title, selected, id, noMarginOnRight, selectedVariant = (isDarkModeOn()
|
|
1669
|
+
const { text, onSelected, ariaLabel, title, selected, id, className, noMarginOnRight, selectedVariant = (isDarkModeOn()
|
|
1670
1670
|
? Variant$1.Light
|
|
1671
1671
|
: Variant$1.Secondary), unselectedVariant = (isDarkModeOn()
|
|
1672
1672
|
? Variant$1.Secondary
|
|
1673
|
-
: Variant$1.Light), small, } = props;
|
|
1673
|
+
: Variant$1.Light), small, useComplexFormatting, } = props;
|
|
1674
1674
|
/*------------------------------------------------------------------------*/
|
|
1675
1675
|
/* ------------------------------- Render ------------------------------- */
|
|
1676
1676
|
/*------------------------------------------------------------------------*/
|
|
1677
1677
|
/*----------------------------------------*/
|
|
1678
1678
|
/* --------------- Main UI -------------- */
|
|
1679
1679
|
/*----------------------------------------*/
|
|
1680
|
-
return (React__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: () => {
|
|
1680
|
+
return (React__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: () => {
|
|
1681
1681
|
if (!selected) {
|
|
1682
1682
|
onSelected();
|
|
1683
1683
|
}
|
|
1684
1684
|
} },
|
|
1685
1685
|
React__default.createElement(FontAwesomeIcon, { icon: selected ? faDotCircle : faCircle$1, className: "me-1" }),
|
|
1686
|
-
|
|
1686
|
+
useComplexFormatting
|
|
1687
|
+
? (React__default.createElement("pre", { className: "ps-2 text-start text-break", style: {
|
|
1688
|
+
whiteSpace: 'pre-wrap',
|
|
1689
|
+
} }, text))
|
|
1690
|
+
: (React__default.createElement("div", { className: "flex-grow-1 text-start text-break ps-2" }, text))));
|
|
1687
1691
|
};
|
|
1688
1692
|
|
|
1689
1693
|
/**
|
|
@@ -15016,16 +15020,16 @@ const genRouteHandler = (opts) => {
|
|
|
15016
15020
|
const { timestamp, year, month, day, hour, minute, } = getTimeInfoInET();
|
|
15017
15021
|
// Main log info
|
|
15018
15022
|
const mainLogInfo = {
|
|
15019
|
-
id: `${launchInfo ? 'unknown'
|
|
15020
|
-
userFirstName: (launchInfo ? 'unknown'
|
|
15021
|
-
userLastName: (launchInfo ? 'unknown'
|
|
15022
|
-
userEmail: (launchInfo ? 'unknown'
|
|
15023
|
-
userId: (launchInfo ? 'unknown'
|
|
15023
|
+
id: `${launchInfo ? launchInfo.userId : 'unknown'}-${Date.now()}-${Math.floor(Math.random() * 100000)}-${Math.floor(Math.random() * 100000)}`,
|
|
15024
|
+
userFirstName: (launchInfo ? launchInfo.userFirstName : 'unknown'),
|
|
15025
|
+
userLastName: (launchInfo ? launchInfo.userLastName : 'unknown'),
|
|
15026
|
+
userEmail: (launchInfo ? launchInfo.userEmail : 'unknown'),
|
|
15027
|
+
userId: (launchInfo ? launchInfo.userId : 'unknown'),
|
|
15024
15028
|
isLearner: (launchInfo && !!launchInfo.isLearner),
|
|
15025
15029
|
isAdmin: (launchInfo && !!launchInfo.isAdmin),
|
|
15026
15030
|
isTTM: (launchInfo && !!launchInfo.isTTM),
|
|
15027
|
-
courseId: (launchInfo ? 'unknown'
|
|
15028
|
-
courseName: (launchInfo ? 'unknown'
|
|
15031
|
+
courseId: (launchInfo ? launchInfo.courseId : 'unknown'),
|
|
15032
|
+
courseName: (launchInfo ? launchInfo.contextLabel : 'unknown'),
|
|
15029
15033
|
browser,
|
|
15030
15034
|
device,
|
|
15031
15035
|
year,
|