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.
@@ -1,10 +1,12 @@
1
1
  {
2
2
  "cSpell.words": [
3
3
  "Copiable",
4
+ "Gabe",
4
5
  "Intelli",
5
6
  "pickable",
6
7
  "Subcontext",
7
8
  "subcontexts",
8
- "Uncategorized"
9
+ "Uncategorized",
10
+ "Zhang"
9
11
  ]
10
12
  }
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.Secondary }));
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;