@bikiran/utils 2.2.7 → 2.2.9
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.d.ts +3 -1
- package/dist/index.js +3 -1
- package/dist/index.ts +12 -0
- package/dist/lib/utils/capitalizeSentence.d.ts +2 -0
- package/dist/lib/utils/capitalizeSentence.js +7 -0
- package/dist/lib/utils/capitalizeSentence.ts +11 -0
- package/dist/lib/utils/scrollToSection.d.ts +2 -0
- package/dist/lib/utils/scrollToSection.js +11 -0
- package/dist/lib/utils/scrollToSection.ts +12 -0
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -15,6 +15,8 @@ export { default as InformationTooltip } from "./components/information-tooltip/
|
|
|
15
15
|
export { default as CopyWrapper } from "./components/copy-wrapper/CopyWrapper";
|
|
16
16
|
export { GetDate, GetTime, timeAgo, timeRemaining, getTimestamp, } from "./lib/utils/date";
|
|
17
17
|
export { default as capitalizeFirstLetter } from "./lib/utils/capitalizeFirstLetter";
|
|
18
|
+
export { default as capitalizeSentence } from "./lib/utils/capitalizeSentence";
|
|
19
|
+
export { default as scrollToSection } from "./lib/utils/scrollToSection";
|
|
18
20
|
export { cn } from "./lib/utils/cn";
|
|
19
21
|
export { default as Copy } from "./lib/utils/Copy";
|
|
20
22
|
export { default as Cookie } from "./lib/utils/Cookie";
|
|
@@ -23,5 +25,5 @@ export { md5 } from "./lib/utils/hash";
|
|
|
23
25
|
export { convertToYears } from "./lib/utils/convertToYears";
|
|
24
26
|
export { showCurrencySign, showInt } from "./lib/utils/show";
|
|
25
27
|
export { addOption, addOption2 } from "./lib/utils/option";
|
|
26
|
-
export { getBikiranUrl, getAccountUrl, getApiUrl, getApi2Url, getApi3Url, getBaseDomain, isDev, getMode, } from "./lib/utils/Env";
|
|
28
|
+
export { getBikiranUrl, getAccountUrl, getApiUrl, getApi2Url, getApi3Url, getBaseDomain, getSupportUrl, generateAnyUrl, getAdManageUrl, getAppoceanUrl, getDBConnectionString, getDocsUrl, getDomainUrl, getHostingUrl, getSiteUrl, SUB_DOMAIN_NAMES, isDev, getMode, } from "./lib/utils/Env";
|
|
27
29
|
export type { TInputChangeEvent, TTextAreaChangeEvent, TMouseEvent, TFormEvent, TKeyboardEvent, TFocusEvent, TDragEvent, TState, } from "./lib/types/GlobalType";
|
package/dist/index.js
CHANGED
|
@@ -15,6 +15,8 @@ export { default as InformationTooltip } from "./components/information-tooltip/
|
|
|
15
15
|
export { default as CopyWrapper } from "./components/copy-wrapper/CopyWrapper";
|
|
16
16
|
export { GetDate, GetTime, timeAgo, timeRemaining, getTimestamp, } from "./lib/utils/date";
|
|
17
17
|
export { default as capitalizeFirstLetter } from "./lib/utils/capitalizeFirstLetter";
|
|
18
|
+
export { default as capitalizeSentence } from "./lib/utils/capitalizeSentence";
|
|
19
|
+
export { default as scrollToSection } from "./lib/utils/scrollToSection";
|
|
18
20
|
export { cn } from "./lib/utils/cn";
|
|
19
21
|
export { default as Copy } from "./lib/utils/Copy";
|
|
20
22
|
export { default as Cookie } from "./lib/utils/Cookie";
|
|
@@ -23,4 +25,4 @@ export { md5 } from "./lib/utils/hash";
|
|
|
23
25
|
export { convertToYears } from "./lib/utils/convertToYears";
|
|
24
26
|
export { showCurrencySign, showInt } from "./lib/utils/show";
|
|
25
27
|
export { addOption, addOption2 } from "./lib/utils/option";
|
|
26
|
-
export { getBikiranUrl, getAccountUrl, getApiUrl, getApi2Url, getApi3Url, getBaseDomain, isDev, getMode, } from "./lib/utils/Env";
|
|
28
|
+
export { getBikiranUrl, getAccountUrl, getApiUrl, getApi2Url, getApi3Url, getBaseDomain, getSupportUrl, generateAnyUrl, getAdManageUrl, getAppoceanUrl, getDBConnectionString, getDocsUrl, getDomainUrl, getHostingUrl, getSiteUrl, SUB_DOMAIN_NAMES, isDev, getMode, } from "./lib/utils/Env";
|
package/dist/index.ts
CHANGED
|
@@ -21,6 +21,8 @@ export {
|
|
|
21
21
|
getTimestamp,
|
|
22
22
|
} from "./lib/utils/date";
|
|
23
23
|
export { default as capitalizeFirstLetter } from "./lib/utils/capitalizeFirstLetter";
|
|
24
|
+
export { default as capitalizeSentence } from "./lib/utils/capitalizeSentence";
|
|
25
|
+
export { default as scrollToSection } from "./lib/utils/scrollToSection";
|
|
24
26
|
export { cn } from "./lib/utils/cn";
|
|
25
27
|
export { default as Copy } from "./lib/utils/Copy";
|
|
26
28
|
export { default as Cookie } from "./lib/utils/Cookie";
|
|
@@ -36,6 +38,16 @@ export {
|
|
|
36
38
|
getApi2Url,
|
|
37
39
|
getApi3Url,
|
|
38
40
|
getBaseDomain,
|
|
41
|
+
getSupportUrl,
|
|
42
|
+
generateAnyUrl,
|
|
43
|
+
getAdManageUrl,
|
|
44
|
+
getAppoceanUrl,
|
|
45
|
+
getDBConnectionString,
|
|
46
|
+
getDocsUrl,
|
|
47
|
+
getDomainUrl,
|
|
48
|
+
getHostingUrl,
|
|
49
|
+
getSiteUrl,
|
|
50
|
+
SUB_DOMAIN_NAMES,
|
|
39
51
|
isDev,
|
|
40
52
|
getMode,
|
|
41
53
|
} from "./lib/utils/Env";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
const capitalizeSentence = (sentence: string | null | undefined): string => {
|
|
2
|
+
return (sentence || "")
|
|
3
|
+
.split(" ")
|
|
4
|
+
.map(
|
|
5
|
+
(word: string) =>
|
|
6
|
+
word.charAt(0).toUpperCase() + word.slice(1).toLowerCase()
|
|
7
|
+
)
|
|
8
|
+
.join(" ");
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
export default capitalizeSentence;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
const scrollToSection = (id: string) => {
|
|
2
|
+
const element = document.getElementById(id);
|
|
3
|
+
if (element) {
|
|
4
|
+
element.scrollIntoView({
|
|
5
|
+
block: "start",
|
|
6
|
+
behavior: "smooth",
|
|
7
|
+
});
|
|
8
|
+
window.location.hash = `#${id}`;
|
|
9
|
+
}
|
|
10
|
+
};
|
|
11
|
+
|
|
12
|
+
export default scrollToSection;
|