dce-reactkit 3.11.2 → 3.11.4
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/.vscode/settings.json +3 -1
- package/dist/cjs/index.js +24 -2
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/helpers/getWordCount.d.ts +10 -0
- package/dist/cjs/types/index.d.ts +2 -1
- package/dist/esm/index.js +24 -3
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/helpers/getWordCount.d.ts +10 -0
- package/dist/esm/types/index.d.ts +2 -1
- package/dist/index.d.ts +11 -1
- package/package.json +1 -1
- package/src/components/IntelliTable.tsx +1 -1
- package/src/components/ItemPicker/NestableItemList.tsx +1 -0
- package/src/helpers/genRouteHandler.ts +1 -1
- package/src/helpers/getWordCount.ts +26 -0
- package/src/index.ts +2 -0
package/.vscode/settings.json
CHANGED
package/dist/cjs/index.js
CHANGED
|
@@ -2672,7 +2672,7 @@ const NestableItemList = (props) => {
|
|
|
2672
2672
|
React__default["default"].createElement(reactFontawesome.FontAwesomeIcon, { icon: childExpanded[item.id] ? freeSolidSvgIcons.faChevronDown : freeSolidSvgIcons.faChevronRight })))),
|
|
2673
2673
|
React__default["default"].createElement(CheckboxButton, { className: `NestableItemList-CheckboxButton-${item.id}`, text: item.name, checked: item.isGroup ? allChecked(item.children) : item.checked, dashed: item.isGroup ? !noneChecked(item.children) : false, onChanged: (checked) => {
|
|
2674
2674
|
onChanged(changeChecked(item.id, checked, items));
|
|
2675
|
-
}, ariaLabel: `Select ${item.name}`, checkedVariant: Variant$1.Light }),
|
|
2675
|
+
}, ariaLabel: `Select ${item.name}`, checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Light }),
|
|
2676
2676
|
(item.isGroup && childExpanded[item.id]) && (React__default["default"].createElement("div", { className: "NestableItemList-children-container", style: {
|
|
2677
2677
|
paddingLeft: '2.2rem',
|
|
2678
2678
|
} },
|
|
@@ -3077,7 +3077,7 @@ const IntelliTable = (props) => {
|
|
|
3077
3077
|
param: column.param,
|
|
3078
3078
|
visible: checked,
|
|
3079
3079
|
});
|
|
3080
|
-
}, checked: columnVisibilityMap[column.param], ariaLabel: `show "${column.title}" column in the ${title} table`, checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.
|
|
3080
|
+
}, checked: columnVisibilityMap[column.param], ariaLabel: `show "${column.title}" column in the ${title} table`, checkedVariant: Variant$1.Light, uncheckedVariant: Variant$1.Light }));
|
|
3081
3081
|
}),
|
|
3082
3082
|
React__default["default"].createElement("div", { className: "mt-3" }, "Or you can:"),
|
|
3083
3083
|
React__default["default"].createElement("button", { type: "button", id: `IntelliTable-${id}-select-all-columns`, className: "btn btn-secondary me-2", "aria-label": `show all columns in the ${title} table`, onClick: () => {
|
|
@@ -16402,6 +16402,27 @@ const visitEndpointOnAnotherServer = (opts) => __awaiter(void 0, void 0, void 0,
|
|
|
16402
16402
|
return body;
|
|
16403
16403
|
});
|
|
16404
16404
|
|
|
16405
|
+
const punctuationRegex = /[!@#$%^&*(),.?\/;:'"\-\[\]]/g;
|
|
16406
|
+
/**
|
|
16407
|
+
* Get number of words in string
|
|
16408
|
+
* @author Gardenia Liu
|
|
16409
|
+
* @author Allison Zhang
|
|
16410
|
+
* @author Gabe Abrams
|
|
16411
|
+
* @param text the string to check
|
|
16412
|
+
* @returns number of words in the string
|
|
16413
|
+
*/
|
|
16414
|
+
const getWordCount = (text) => {
|
|
16415
|
+
const trimmedTextWithoutPunctuation = (text
|
|
16416
|
+
// Remove leading and trailing whitespace
|
|
16417
|
+
.trim()
|
|
16418
|
+
// Remove punctuation
|
|
16419
|
+
.replace(punctuationRegex, ''));
|
|
16420
|
+
if (trimmedTextWithoutPunctuation.length === 0) {
|
|
16421
|
+
return 0;
|
|
16422
|
+
}
|
|
16423
|
+
return trimmedTextWithoutPunctuation.split(/\s+/g).length;
|
|
16424
|
+
};
|
|
16425
|
+
|
|
16405
16426
|
/**
|
|
16406
16427
|
* Days of the week
|
|
16407
16428
|
* @author Gabe Abrams
|
|
@@ -16486,6 +16507,7 @@ exports.getMonthName = getMonthName;
|
|
|
16486
16507
|
exports.getOrdinal = getOrdinal;
|
|
16487
16508
|
exports.getPartOfDay = getPartOfDay;
|
|
16488
16509
|
exports.getTimeInfoInET = getTimeInfoInET;
|
|
16510
|
+
exports.getWordCount = getWordCount;
|
|
16489
16511
|
exports.handleError = handleError;
|
|
16490
16512
|
exports.handleSuccess = handleSuccess;
|
|
16491
16513
|
exports.idify = idify;
|