@thecb/components 11.3.5-beta.0 → 11.3.5
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/index.cjs.js +4 -2
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +4 -2
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
- package/src/util/general.js +4 -4
package/dist/index.esm.js
CHANGED
|
@@ -1720,9 +1720,11 @@ var createIdFromString = function createIdFromString(text, postscript) {
|
|
|
1720
1720
|
var formatIdString = function formatIdString(str) {
|
|
1721
1721
|
return str && typeof str === "string" ? str.trim().replace(/\s+/g, "-") : "";
|
|
1722
1722
|
};
|
|
1723
|
-
var
|
|
1723
|
+
var textIdSegment = formatIdString(text === null || text === void 0 ? void 0 : text.toString());
|
|
1724
1724
|
var postscriptId = formatIdString(postscript === null || postscript === void 0 ? void 0 : postscript.toString());
|
|
1725
|
-
|
|
1725
|
+
var postscriptIdSegment = postscriptId ? "-".concat(postscriptId) : "";
|
|
1726
|
+
var uniqueIdSegment = unique ? createUniqueId() : "";
|
|
1727
|
+
return "".concat(textIdSegment).concat(postscriptIdSegment).concat(uniqueIdSegment);
|
|
1726
1728
|
}
|
|
1727
1729
|
};
|
|
1728
1730
|
var safeChildren = function safeChildren(children) {
|