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/esm/index.js
CHANGED
|
@@ -1299,18 +1299,6 @@ const getTimeInfoInET = (dateOrTimestamp) => {
|
|
|
1299
1299
|
};
|
|
1300
1300
|
};
|
|
1301
1301
|
|
|
1302
|
-
/**
|
|
1303
|
-
* Force a number to stay within specific bounds
|
|
1304
|
-
* @author Gabe Abrams
|
|
1305
|
-
* @param num the number to move into the bounds
|
|
1306
|
-
* @param min the minimum number in the bound
|
|
1307
|
-
* @param max the maximum number in the bound
|
|
1308
|
-
* @returns bounded number
|
|
1309
|
-
*/
|
|
1310
|
-
const forceNumIntoBounds = (num, min, max) => {
|
|
1311
|
-
return Math.max(min, Math.min(max, num));
|
|
1312
|
-
};
|
|
1313
|
-
|
|
1314
1302
|
/**
|
|
1315
1303
|
* A very simple, lightweight date chooser
|
|
1316
1304
|
* @author Gabe Abrams
|
|
@@ -1325,7 +1313,7 @@ const SimpleDateChooser = (props) => {
|
|
|
1325
1313
|
var _a;
|
|
1326
1314
|
/* -------------- Props ------------- */
|
|
1327
1315
|
const { ariaLabel, name, month, day, year, onChange, chooseFromPast, } = props;
|
|
1328
|
-
|
|
1316
|
+
const numMonthsToShow = ((_a = props.numMonthsToShow) !== null && _a !== void 0 ? _a : 6);
|
|
1329
1317
|
/*------------------------------------------------------------------------*/
|
|
1330
1318
|
/* Render */
|
|
1331
1319
|
/*------------------------------------------------------------------------*/
|
|
@@ -4163,6 +4151,18 @@ const floorToNumDecimals = (num, numDecimals) => {
|
|
|
4163
4151
|
return (Math.floor(num * rounder) / rounder);
|
|
4164
4152
|
};
|
|
4165
4153
|
|
|
4154
|
+
/**
|
|
4155
|
+
* Force a number to stay within specific bounds
|
|
4156
|
+
* @author Gabe Abrams
|
|
4157
|
+
* @param num the number to move into the bounds
|
|
4158
|
+
* @param min the minimum number in the bound
|
|
4159
|
+
* @param max the maximum number in the bound
|
|
4160
|
+
* @returns bounded number
|
|
4161
|
+
*/
|
|
4162
|
+
const forceNumIntoBounds = (num, min, max) => {
|
|
4163
|
+
return Math.max(min, Math.min(max, num));
|
|
4164
|
+
};
|
|
4165
|
+
|
|
4166
4166
|
/**
|
|
4167
4167
|
* Pad a number's decimal with zeros on the right
|
|
4168
4168
|
* (e.g. 5.2 becomes 5.20 with 2 digit padding)
|