dce-reactkit 3.2.2-beta.50 → 3.2.2-beta.51
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 +13 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.js +13 -13
- package/dist/esm/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/SimpleDateChooser.tsx +1 -5
package/dist/cjs/index.js
CHANGED
|
@@ -1307,18 +1307,6 @@ const getTimeInfoInET = (dateOrTimestamp) => {
|
|
|
1307
1307
|
};
|
|
1308
1308
|
};
|
|
1309
1309
|
|
|
1310
|
-
/**
|
|
1311
|
-
* Force a number to stay within specific bounds
|
|
1312
|
-
* @author Gabe Abrams
|
|
1313
|
-
* @param num the number to move into the bounds
|
|
1314
|
-
* @param min the minimum number in the bound
|
|
1315
|
-
* @param max the maximum number in the bound
|
|
1316
|
-
* @returns bounded number
|
|
1317
|
-
*/
|
|
1318
|
-
const forceNumIntoBounds = (num, min, max) => {
|
|
1319
|
-
return Math.max(min, Math.min(max, num));
|
|
1320
|
-
};
|
|
1321
|
-
|
|
1322
1310
|
/**
|
|
1323
1311
|
* A very simple, lightweight date chooser
|
|
1324
1312
|
* @author Gabe Abrams
|
|
@@ -1333,7 +1321,7 @@ const SimpleDateChooser = (props) => {
|
|
|
1333
1321
|
var _a;
|
|
1334
1322
|
/* -------------- Props ------------- */
|
|
1335
1323
|
const { ariaLabel, name, month, day, year, onChange, chooseFromPast, } = props;
|
|
1336
|
-
|
|
1324
|
+
const numMonthsToShow = ((_a = props.numMonthsToShow) !== null && _a !== void 0 ? _a : 6);
|
|
1337
1325
|
/*------------------------------------------------------------------------*/
|
|
1338
1326
|
/* Render */
|
|
1339
1327
|
/*------------------------------------------------------------------------*/
|
|
@@ -4171,6 +4159,18 @@ const floorToNumDecimals = (num, numDecimals) => {
|
|
|
4171
4159
|
return (Math.floor(num * rounder) / rounder);
|
|
4172
4160
|
};
|
|
4173
4161
|
|
|
4162
|
+
/**
|
|
4163
|
+
* Force a number to stay within specific bounds
|
|
4164
|
+
* @author Gabe Abrams
|
|
4165
|
+
* @param num the number to move into the bounds
|
|
4166
|
+
* @param min the minimum number in the bound
|
|
4167
|
+
* @param max the maximum number in the bound
|
|
4168
|
+
* @returns bounded number
|
|
4169
|
+
*/
|
|
4170
|
+
const forceNumIntoBounds = (num, min, max) => {
|
|
4171
|
+
return Math.max(min, Math.min(max, num));
|
|
4172
|
+
};
|
|
4173
|
+
|
|
4174
4174
|
/**
|
|
4175
4175
|
* Pad a number's decimal with zeros on the right
|
|
4176
4176
|
* (e.g. 5.2 becomes 5.20 with 2 digit padding)
|