@rzl-zone/utils-js 3.13.0 → 3.13.1
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/.references/index.d.cts +1 -1
- package/dist/.references/index.d.ts +1 -1
- package/dist/{assertIsArray-BgdgVjDu.cjs → assertIsArray-CeXL4xv5.cjs} +3 -3
- package/dist/{assertIsArray-BgdgVjDu.cjs.map → assertIsArray-CeXL4xv5.cjs.map} +1 -1
- package/dist/{assertIsArray-hZyYKvLb.js → assertIsArray-HgzPQIAM.js} +3 -3
- package/dist/{assertIsArray-hZyYKvLb.js.map → assertIsArray-HgzPQIAM.js.map} +1 -1
- package/dist/{assertIsBoolean-9-huIcIR.js → assertIsBoolean-CWUs-I5l.js} +2 -2
- package/dist/{assertIsBoolean-9-huIcIR.js.map → assertIsBoolean-CWUs-I5l.js.map} +1 -1
- package/dist/{assertIsBoolean-JGpkg5ju.cjs → assertIsBoolean-D41HrTB_.cjs} +2 -2
- package/dist/{assertIsBoolean-JGpkg5ju.cjs.map → assertIsBoolean-D41HrTB_.cjs.map} +1 -1
- package/dist/{assertIsString-CcOpQqcv.js → assertIsString-CY_WkCLr.js} +3 -3
- package/dist/{assertIsString-CcOpQqcv.js.map → assertIsString-CY_WkCLr.js.map} +1 -1
- package/dist/{assertIsString-UR6QjqyZ.cjs → assertIsString-DUrVt82d.cjs} +3 -3
- package/dist/{assertIsString-UR6QjqyZ.cjs.map → assertIsString-DUrVt82d.cjs.map} +1 -1
- package/dist/assertions/index.cjs +5 -5
- package/dist/assertions/index.cjs.map +1 -1
- package/dist/assertions/index.d.cts +2 -2
- package/dist/assertions/index.d.ts +2 -2
- package/dist/assertions/index.js +5 -5
- package/dist/assertions/index.js.map +1 -1
- package/dist/conversions/index.cjs +6 -6
- package/dist/conversions/index.d.cts +2 -2
- package/dist/conversions/index.d.ts +2 -2
- package/dist/conversions/index.js +6 -6
- package/dist/{conversions-Du6GC5JA.js → conversions-1s7xMBe_.js} +12 -12
- package/dist/{conversions-Du6GC5JA.js.map → conversions-1s7xMBe_.js.map} +1 -1
- package/dist/{conversions-DLt2zlyu.cjs → conversions-B3Rf8uId.cjs} +12 -12
- package/dist/{conversions-DLt2zlyu.cjs.map → conversions-B3Rf8uId.cjs.map} +1 -1
- package/dist/events/index.cjs +4 -4
- package/dist/events/index.cjs.map +1 -1
- package/dist/events/index.d.cts +1 -1
- package/dist/events/index.d.ts +1 -1
- package/dist/events/index.js +4 -4
- package/dist/events/index.js.map +1 -1
- package/dist/formatters/index.cjs +2 -2
- package/dist/formatters/index.d.cts +2 -2
- package/dist/formatters/index.d.ts +2 -2
- package/dist/formatters/index.js +2 -2
- package/dist/{formatters-RomzqDp_.js → formatters-C6cVZBbG.js} +10 -10
- package/dist/{formatters-RomzqDp_.js.map → formatters-C6cVZBbG.js.map} +1 -1
- package/dist/{formatters-C0t5CdX-.cjs → formatters-aEAAuzjx.cjs} +10 -10
- package/dist/{formatters-C0t5CdX-.cjs.map → formatters-aEAAuzjx.cjs.map} +1 -1
- package/dist/generators/index.cjs +5 -5
- package/dist/generators/index.cjs.map +1 -1
- package/dist/generators/index.d.cts +2 -2
- package/dist/generators/index.d.ts +2 -2
- package/dist/generators/index.js +5 -5
- package/dist/generators/index.js.map +1 -1
- package/dist/{index-50G4edI1.d.ts → index-B1VQ6USF.d.ts} +2 -2
- package/dist/{index-BcKPWWfh.d.ts → index-B5EBAgmC.d.cts} +2 -2
- package/dist/{index-tYmZ3X4Y.d.cts → index-BG8wdusZ.d.cts} +2 -2
- package/dist/{index-CPc-TTMc.d.cts → index-CPCt6_Wq.d.cts} +1 -1
- package/dist/{index-hsSSKuvW.d.ts → index-CPCt6_Wq.d.ts} +1 -1
- package/dist/{index-B6Xg9Z8l.d.ts → index-CRz9rSZL.d.ts} +1 -1
- package/dist/{index-DoteSYTy.d.cts → index-DBwNa1iO.d.ts} +3 -3
- package/dist/{index-s7h0w-8H.d.cts → index-DPJ-e2JZ.d.ts} +2 -2
- package/dist/{index-bGRsmkyA.d.ts → index-DPTYOQkn.d.cts} +3 -3
- package/dist/{index-DM_0q4CY.d.cts → index-Dig1fIhZ.d.cts} +1 -1
- package/dist/{index-5DpyzfpU.d.ts → index-Dig1fIhZ.d.ts} +1 -1
- package/dist/{index-BFI4R7Pn.d.ts → index-ORbo-7zA.d.cts} +1 -1
- package/dist/{index-D-5AsV9K.d.cts → index-ORbo-7zA.d.ts} +1 -1
- package/dist/{index-CMcxcN7w.d.cts → index-RNQBTK8A.d.cts} +1 -1
- package/dist/{isBigInt-C0gHDkh4.cjs → isBigInt-BVj0M5pq.cjs} +2 -2
- package/dist/{isBigInt-C0gHDkh4.cjs.map → isBigInt-BVj0M5pq.cjs.map} +1 -1
- package/dist/{isBigInt-bbW78ITJ.js → isBigInt-y7s3rsKc.js} +2 -2
- package/dist/{isBigInt-bbW78ITJ.js.map → isBigInt-y7s3rsKc.js.map} +1 -1
- package/dist/{isEmptyObject-D-fETD_f.cjs → isEmptyObject-BsHngDz4.cjs} +3 -3
- package/dist/{isEmptyObject-D-fETD_f.cjs.map → isEmptyObject-BsHngDz4.cjs.map} +1 -1
- package/dist/{isEmptyObject-CZsFdN7x.js → isEmptyObject-DPGR9iPj.js} +3 -3
- package/dist/{isEmptyObject-CZsFdN7x.js.map → isEmptyObject-DPGR9iPj.js.map} +1 -1
- package/dist/{isEmptyString-pmcf-orv.js → isEmptyString-BYMz_wt9.js} +3 -3
- package/dist/{isEmptyString-pmcf-orv.js.map → isEmptyString-BYMz_wt9.js.map} +1 -1
- package/dist/{isEmptyString-Dx6OM5PL.cjs → isEmptyString-C8PYNPgw.cjs} +3 -3
- package/dist/{isEmptyString-Dx6OM5PL.cjs.map → isEmptyString-C8PYNPgw.cjs.map} +1 -1
- package/dist/{isEmptyValue-v6BsHBiu.cjs → isEmptyValue-BXf7f1jz.cjs} +5 -5
- package/dist/{isEmptyValue-v6BsHBiu.cjs.map → isEmptyValue-BXf7f1jz.cjs.map} +1 -1
- package/dist/{isEmptyValue-CkiXENcT.js → isEmptyValue-D4OHTB3u.js} +5 -5
- package/dist/{isEmptyValue-CkiXENcT.js.map → isEmptyValue-D4OHTB3u.js.map} +1 -1
- package/dist/{isEqual-Dc8fNB2J.js → isEqual-DM4S_kWh.js} +4 -4
- package/dist/{isEqual-Dc8fNB2J.js.map → isEqual-DM4S_kWh.js.map} +1 -1
- package/dist/{isEqual-CZxetLzm.cjs → isEqual-DaPDxMyw.cjs} +4 -4
- package/dist/{isEqual-CZxetLzm.cjs.map → isEqual-DaPDxMyw.cjs.map} +1 -1
- package/dist/{isFinite-CI59vUHt.js → isFinite-BEJFOv6B.js} +3 -3
- package/dist/{isFinite-CI59vUHt.js.map → isFinite-BEJFOv6B.js.map} +1 -1
- package/dist/{isFinite-0z31xOa2.cjs → isFinite-DeDaBDr2.cjs} +3 -3
- package/dist/{isFinite-0z31xOa2.cjs.map → isFinite-DeDaBDr2.cjs.map} +1 -1
- package/dist/{isInteger-DUhd-dyt.cjs → isInteger-CQLThJOR.cjs} +2 -2
- package/dist/{isInteger-DUhd-dyt.cjs.map → isInteger-CQLThJOR.cjs.map} +1 -1
- package/dist/{isInteger-DeN5FIAr.js → isInteger-DEDbBGez.js} +2 -2
- package/dist/{isInteger-DeN5FIAr.js.map → isInteger-DEDbBGez.js.map} +1 -1
- package/dist/{isPlainObject-CjoJH9yk.d.ts → isPlainObject-BwTkj3G0.d.cts} +1 -1
- package/dist/{isPlainObject-DvxdHoAf.d.cts → isPlainObject-BwTkj3G0.d.ts} +1 -1
- package/dist/{isServer-TOmhgOtP.cjs → isServer-DmycqWsF.cjs} +2 -2
- package/dist/{isServer-TOmhgOtP.cjs.map → isServer-DmycqWsF.cjs.map} +1 -1
- package/dist/{isServer-BM5GzRpI.js → isServer-q3o6cSwD.js} +2 -2
- package/dist/{isServer-BM5GzRpI.js.map → isServer-q3o6cSwD.js.map} +1 -1
- package/dist/{isTypedArray-pAdBFUDl.cjs → isTypedArray-BQLbLXsU.cjs} +3 -3
- package/dist/{isTypedArray-pAdBFUDl.cjs.map → isTypedArray-BQLbLXsU.cjs.map} +1 -1
- package/dist/{isTypedArray-BPerK072.js → isTypedArray-XiBnifLN.js} +3 -3
- package/dist/{isTypedArray-BPerK072.js.map → isTypedArray-XiBnifLN.js.map} +1 -1
- package/dist/{isValidDomain-CHKOn79-.js → isValidDomain-B8Nukgw0.js} +5 -5
- package/dist/{isValidDomain-CHKOn79-.js.map → isValidDomain-B8Nukgw0.js.map} +1 -1
- package/dist/{isValidDomain-BMcr9vTp.cjs → isValidDomain-ZbyeGOO9.cjs} +5 -5
- package/dist/{isValidDomain-BMcr9vTp.cjs.map → isValidDomain-ZbyeGOO9.cjs.map} +1 -1
- package/dist/{noop-D4g9yTAW.cjs → noop-BY43WaoU.cjs} +2 -2
- package/dist/{noop-D4g9yTAW.cjs.map → noop-BY43WaoU.cjs.map} +1 -1
- package/dist/{noop-BaNz9ls5.js → noop-CjY8xVHv.js} +2 -2
- package/dist/{noop-BaNz9ls5.js.map → noop-CjY8xVHv.js.map} +1 -1
- package/dist/{normalizeSpaces-MWiYtSyS.cjs → normalizeSpaces-BhZp0U_6.cjs} +3 -3
- package/dist/{normalizeSpaces-MWiYtSyS.cjs.map → normalizeSpaces-BhZp0U_6.cjs.map} +1 -1
- package/dist/{normalizeSpaces-DupusmF5.js → normalizeSpaces-BoUDtq5P.js} +3 -3
- package/dist/{normalizeSpaces-DupusmF5.js.map → normalizeSpaces-BoUDtq5P.js.map} +1 -1
- package/dist/operations/index.cjs +7 -7
- package/dist/operations/index.cjs.map +1 -1
- package/dist/operations/index.d.cts +1 -1
- package/dist/operations/index.d.ts +1 -1
- package/dist/operations/index.js +7 -7
- package/dist/operations/index.js.map +1 -1
- package/dist/parsers/index.cjs +2 -2
- package/dist/parsers/index.d.cts +1 -1
- package/dist/parsers/index.d.ts +1 -1
- package/dist/parsers/index.js +2 -2
- package/dist/{parsers-Dl9fFra4.js → parsers-B8KYXIjE.js} +4 -4
- package/dist/{parsers-Dl9fFra4.js.map → parsers-B8KYXIjE.js.map} +1 -1
- package/dist/{parsers-Bd-YRt6j.cjs → parsers-B_FPX35n.cjs} +4 -4
- package/dist/{parsers-Bd-YRt6j.cjs.map → parsers-B_FPX35n.cjs.map} +1 -1
- package/dist/{parsing-CU_Mc7CF.cjs → parsing-BCZGco7n.cjs} +3 -3
- package/dist/{parsing-CU_Mc7CF.cjs.map → parsing-BCZGco7n.cjs.map} +1 -1
- package/dist/{parsing-BG73HUrI.js → parsing-Bfaw85Hd.js} +3 -3
- package/dist/{parsing-BG73HUrI.js.map → parsing-Bfaw85Hd.js.map} +1 -1
- package/dist/predicates/index.cjs +14 -14
- package/dist/predicates/index.d.cts +3 -3
- package/dist/predicates/index.d.ts +3 -3
- package/dist/predicates/index.js +14 -14
- package/dist/{predicates-Bd4AnXr0.cjs → predicates-8y28VrbT.cjs} +11 -11
- package/dist/{predicates-Bd4AnXr0.cjs.map → predicates-8y28VrbT.cjs.map} +1 -1
- package/dist/{predicates-VJN-VDha.js → predicates-KlyOvBSC.js} +11 -11
- package/dist/{predicates-VJN-VDha.js.map → predicates-KlyOvBSC.js.map} +1 -1
- package/dist/promises/index.cjs +4 -4
- package/dist/promises/index.cjs.map +1 -1
- package/dist/promises/index.d.cts +1 -1
- package/dist/promises/index.d.ts +1 -1
- package/dist/promises/index.js +4 -4
- package/dist/promises/index.js.map +1 -1
- package/dist/{punyCode-5wmummgP.cjs → punyCode-DnKi0qjS.cjs} +6 -6
- package/dist/{punyCode-5wmummgP.cjs.map → punyCode-DnKi0qjS.cjs.map} +1 -1
- package/dist/{punyCode-C0ft9dER.js → punyCode-Dwto1RpA.js} +6 -6
- package/dist/{punyCode-C0ft9dER.js.map → punyCode-Dwto1RpA.js.map} +1 -1
- package/dist/{removeSpaces-DpiJ1H1P.js → removeSpaces--8NW-HSx.js} +3 -3
- package/dist/{removeSpaces-DpiJ1H1P.js.map → removeSpaces--8NW-HSx.js.map} +1 -1
- package/dist/{removeSpaces-CPj1ABLa.cjs → removeSpaces-CmrrkeXz.cjs} +3 -3
- package/dist/{removeSpaces-CPj1ABLa.cjs.map → removeSpaces-CmrrkeXz.cjs.map} +1 -1
- package/dist/rzl-utils.global.js +13 -13
- package/dist/{safeJsonParse-BxOZgGy7.js → safeJsonParse-OnUwG2El.js} +6 -6
- package/dist/{safeJsonParse-BxOZgGy7.js.map → safeJsonParse-OnUwG2El.js.map} +1 -1
- package/dist/{safeJsonParse-v7ll9iFG.cjs → safeJsonParse-sFqVXf-e.cjs} +6 -6
- package/dist/{safeJsonParse-v7ll9iFG.cjs.map → safeJsonParse-sFqVXf-e.cjs.map} +1 -1
- package/dist/{safeStableStringify-C5Gc3ZED.js → safeStableStringify-B2KTTS3r.js} +4 -4
- package/dist/{safeStableStringify-C5Gc3ZED.js.map → safeStableStringify-B2KTTS3r.js.map} +1 -1
- package/dist/{safeStableStringify-BiUOLBYo.cjs → safeStableStringify-Cmi6GyWj.cjs} +4 -4
- package/dist/{safeStableStringify-BiUOLBYo.cjs.map → safeStableStringify-Cmi6GyWj.cjs.map} +1 -1
- package/dist/strings/index.cjs +5 -5
- package/dist/strings/index.cjs.map +1 -1
- package/dist/strings/index.d.cts +2 -2
- package/dist/strings/index.d.ts +2 -2
- package/dist/strings/index.js +5 -5
- package/dist/strings/index.js.map +1 -1
- package/dist/tailwind/index.cjs +2 -2
- package/dist/tailwind/index.d.cts +2 -2
- package/dist/tailwind/index.d.ts +2 -2
- package/dist/tailwind/index.js +2 -2
- package/dist/{tailwind-CxI2DXpR.js → tailwind-CUdmv-oO.js} +5 -5
- package/dist/{tailwind-CxI2DXpR.js.map → tailwind-CUdmv-oO.js.map} +1 -1
- package/dist/{tailwind-DhKiKZAc.cjs → tailwind-DUuboq52.cjs} +5 -5
- package/dist/{tailwind-DhKiKZAc.cjs.map → tailwind-DUuboq52.cjs.map} +1 -1
- package/dist/{toStringArrayUnRecursive-BaZrCGaR.js → toStringArrayUnRecursive-OOHGazks.js} +6 -6
- package/dist/{toStringArrayUnRecursive-BaZrCGaR.js.map → toStringArrayUnRecursive-OOHGazks.js.map} +1 -1
- package/dist/{toStringArrayUnRecursive-BuRBWRcB.cjs → toStringArrayUnRecursive-pfk2oP8C.cjs} +6 -6
- package/dist/{toStringArrayUnRecursive-BuRBWRcB.cjs.map → toStringArrayUnRecursive-pfk2oP8C.cjs.map} +1 -1
- package/dist/urls/index.cjs +3 -3
- package/dist/urls/index.d.cts +1 -1
- package/dist/urls/index.d.ts +1 -1
- package/dist/urls/index.js +3 -3
- package/dist/{urls-CyhKg1Cn.cjs → urls-BL9C_yU3.cjs} +11 -11
- package/dist/{urls-CyhKg1Cn.cjs.map → urls-BL9C_yU3.cjs.map} +1 -1
- package/dist/{urls-nr2hUK75.js → urls-BXT4Krsq.js} +11 -11
- package/dist/{urls-nr2hUK75.js.map → urls-BXT4Krsq.js.map} +1 -1
- package/package.json +2 -2
package/dist/events/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":[],"sources":["../../src/events/actions/disableUserInteraction.ts","../../src/events/actions/enableUserInteraction.ts","../../src/events/actions/removeElementFocus.ts","../../src/events/actions/scrollToTop.ts"],"sourcesContent":["import { isServer } from \"@/predicates/is/isServer\";\nimport { assertIsString } from \"@/assertions/strings/assertIsString\";\n\n/** ----------------------------------------------------------\n * * ***Utility: `disableUserInteraction`.***\n * ----------------------------------------------------------\n * **Disables user interaction by adding a CSS class to the `<html>` element.**\n * - **Key points**:\n * - Works **only in browser environments**.\n * - Safely adds the specified CSS class to `<html>`.\n * - Prevents multiple additions of the same class.\n * - Useful to indicate that a process is ongoing\n * (e.g., loading or processing state).\n * - **Using custom CSS classes:**\n * - You can pass any class name that exists in your CSS.\n * - Example: if you have `.loading` in your styles, passing `\"loading\"`\n * will add it and disable interactions accordingly.\n * - **Validation:**\n * - Throws `TypeError` if the `className` parameter is not a string.\n * @defaultValue `\"on_processing\"`\n * @param {string} [className=\"on_processing\"] - The CSS class to add, defaults to `\"on_processing\"`.\n * @returns {void} Does not return anything (void).\n * @throws **{@link TypeError | `TypeError`}** if `className` is not a string.\n * @example\n * * ***Example in your code:***\n * ```ts\n * disableUserInteraction(); // ➔ Adds \"on_processing\" class\n * disableUserInteraction(\"loading\"); // ➔ Adds \"loading\" class\n * // ❌ Invalid value:\n * disableUserInteraction(123); // ➔ Throws TypeError\n * ```\n * * ***Example in your css file (with defaultValue `className` props [on_processing]):***\n * ```css\n * .on_processing {\n * cursor: wait;\n * touch-action: none;\n * user-select: none;\n * }\n *\n * .on_processing > * {\n * pointer-events: none;\n * touch-action: none;\n * user-select: none;\n * }\n * ```\n */\nexport const disableUserInteraction = (\n className: string = \"on_processing\"\n): void => {\n // Ensure function runs only in the browser\n if (isServer()) return;\n\n assertIsString(className, {\n message({ validType, currentType }) {\n return `First parameter \\`className\\` must be of type \\`${validType}\\`, but received: \\`${currentType}\\`.`;\n }\n });\n\n const { documentElement } = document;\n\n if (documentElement && !documentElement.classList.contains(className)) {\n documentElement.classList.add(className);\n }\n};\n","import { isServer } from \"@/predicates/is/isServer\";\nimport { assertIsString } from \"@/assertions/strings/assertIsString\";\n\n/** ----------------------------------------------------------\n * * ***Utility: `enableUserInteraction`.***\n * ----------------------------------------------------------\n * **Enables user interaction by removing a CSS class from the `<html>` element.**\n * - **Key points**:\n * - Works **only in browser environments**.\n * - Safely removes the specified CSS class from `<html>`.\n * - Does nothing if the class is not present.\n * - Useful to re-enable user interactions after a process\n * (e.g., loading or processing) completes.\n * - **Using custom CSS classes:**\n * - You can pass any class name that exists in your CSS.\n * - Example: if you have `.loading` in your styles, passing `\"loading\"`\n * will remove it and re-enable interactions.\n * - **Validation:**\n * - Throws `TypeError` if the `className` parameter is not a string.\n * @defaultValue `\"on_processing\"`\n * @param {string} [className=\"on_processing\"] - The CSS class to remove, defaults to `\"on_processing\"`.\n * @returns {void} Does not return anything (void).\n * @throws **{@link TypeError | `TypeError`}** if `className` is not a string.\n * @example\n * * ***Example in your code:***\n * ```ts\n * enableUserInteraction(); // ➔ Removes \"on_processing\" class\n * enableUserInteraction(\"loading\"); // ➔ Removes \"loading\" class\n * // ❌ Invalid value:\n * enableUserInteraction(123); // ➔ Throws TypeError\n * ```\n * * ***Example in your css file (with defaultValue `className` props [on_processing]):***\n * ```css\n * .on_processing {\n * cursor: wait;\n * touch-action: none;\n * user-select: none;\n * }\n *\n * .on_processing > * {\n * pointer-events: none;\n * touch-action: none;\n * user-select: none;\n * }\n * ```\n */\nexport const enableUserInteraction = (\n className: string = \"on_processing\"\n): void => {\n // Ensure function runs only in the browser\n if (isServer()) return;\n\n assertIsString(className, {\n message({ validType, currentType }) {\n return `First parameter \\`className\\` must be of type \\`${validType}\\`, but received: \\`${currentType}\\`.`;\n }\n });\n\n const { documentElement } = document;\n\n if (documentElement && documentElement.classList.contains(className)) {\n documentElement.classList.remove(className);\n }\n};\n","import { isServer } from \"@/predicates/is/isServer\";\n\n/** ----------------------------------------------------------\n * * ***Utility: `removeElementFocus`.***\n * ----------------------------------------------------------\n * **Removes focus from the currently active element in the document.**\n * - **Features**:\n * - This function works **only in browser environments** ***(safely no-ops in server environments)***.\n * - If an element is focused, it will lose focus by calling `HTMLElement.blur()`.\n * - If no element is focused or the active element is not an `HTMLElement`, nothing happens.\n * @returns {void} Does not return anything (void).\n * @example\n * removeElementFocus(); // ➔ Removes focus from the currently active element\n */\nexport const removeElementFocus = (): void => {\n // Ensure function runs only in the browser\n if (isServer()) return;\n\n const activeElement = document.activeElement;\n\n if (activeElement instanceof HTMLElement) {\n activeElement.blur();\n } else {\n // not-support, currently we nothing to do...\n // console.warn(\"removeElementFocus: No active element to blur or unsupported element type.\");\n }\n};\n","import { isNumber } from \"@/predicates/is/isNumber\";\nimport { hasOwnProp } from \"@/predicates/has/hasOwnProp\";\nimport { isServer } from \"@/predicates/is/isServer\";\nimport { isPlainObject } from \"@/predicates/is/isPlainObject\";\nimport { isNonEmptyString } from \"@/predicates/is/isNonEmptyString\";\n\n/**\n * ***Types options for {@link scrollToTop | `scrollToTop`}.***\n */\ntype ScrollToTopOptions = {\n /** ----------------------------------------------------------\n * * ***Scroll animation type.***\n * ----------------------------------------------------------\n * - ***Behavior:***\n * - Valid values: `\"auto\"`, `\"instant\"`, `\"smooth\"`.\n * - Default force to `\"smooth\"` if missing or invalid.\n *\n * @default \"smooth\"\n */\n behavior?: ScrollBehavior | undefined;\n /** ----------------------------------------------------------\n * * ***Delay before scrolling (in milliseconds).***\n * ----------------------------------------------------------\n * - ***Behavior:***\n * - Default value is `1`.\n * - Valid values: any number `≥` `1`.\n * - Non-integer number are truncated to an integer.\n * - Force to `2147483647` if number is larger than `2147483647`.\n * - Default force to `1` if `missing`, `NaN`, `invalid-type`, or `less-than` `1`.\n *\n * @default 1\n */\n timeout?: number | undefined;\n};\n\n/** ----------------------------------------------------------\n * * ***Utility: `scrollToTop`.***\n * ----------------------------------------------------------\n * **Scrolls the page to the top with optional smooth animation and delay.**\n * - **Features**:\n * - This function works **only in browser environments** (no effect on server-side).\n * - It leverages the native `window.scrollTo()` API with support for smooth scrolling\n * and an optional timeout delay before executing the scroll.\n * - Each option has strict valid values.\n * - If an invalid value is provided, the function **automatically falls back to its default**.\n * @param {ScrollToTopOptions} [options] - Optional settings for scroll behavior.\n * @param {ScrollToTopOptions[\"behavior\"]} [options.behavior=\"smooth\"] - Scroll animation type.\n * - Valid values: `\"auto\"`, `\"instant\"`, `\"smooth\"`.\n * - Default force to `\"smooth\"` if missing or invalid.\n * @param {ScrollToTopOptions[\"timeout\"]} [options.timeout=1] - Delay before scrolling (in milliseconds).\n * - Default value is `1`.\n * - Valid values: any number `≥` `1`.\n * - Non-integer number are truncated to an integer.\n * - Force to `2147483647` if number is larger than `2147483647`.\n * - Default force to `1` if `missing`, `NaN`, `invalid`, or `less-than` `1`.\n * @returns {void} Does not return anything, only scrolling to top (void).\n * @example\n * // ✅ Valid options value:\n * scrollToTop();\n * // ➔ Scroll smoothly to the top after 1ms delay\n * scrollToTop({ behavior: \"instant\" });\n * // ➔ Jump instantly to the top\n * scrollToTop({ timeout: 500 });\n * // ➔ Scroll smoothly to the top after 500ms\n *\n * // ❌ Invalid options value:\n * scrollToTop({ behavior: \"fly\", timeout: -100 });\n * // ➔ Fallback: behavior=\"smooth\", timeout=1\n * scrollToTop({ behavior: \"fly\", timeout: 123.55 });\n * // ➔ Fallback: behavior=\"smooth\", timeout=123\n */\nexport const scrollToTop = (options?: ScrollToTopOptions): void => {\n // Ensure function runs only in the browser\n if (isServer()) return;\n\n // Ensure options is an object and Defensive options check\n if (!isPlainObject(options)) {\n options = {};\n }\n\n const behavior: ScrollBehavior =\n hasOwnProp(options, \"behavior\") &&\n isNonEmptyString(options.behavior) &&\n [\"auto\", \"instant\", \"smooth\"].includes(options.behavior)\n ? options.behavior\n : \"smooth\";\n let timeout =\n hasOwnProp(options, \"timeout\") &&\n isNumber(options.timeout) &&\n options.timeout >= 1\n ? options.timeout\n : 1;\n\n timeout = timeout > 2147483647 ? 2147483647 : timeout;\n\n setTimeout(() => window.scrollTo({ top: 0, left: 0, behavior }), timeout);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAa,0BACX,YAAoB,oBACX;CAET,IAAI,UAAU,EAAE;CAEhB,eAAe,WAAW,EACxB,QAAQ,EAAE,WAAW,eAAe;EAClC,OAAO,mDAAmD,UAAU,sBAAsB,YAAY;IAEzG,CAAC;CAEF,MAAM,EAAE,oBAAoB;CAE5B,IAAI,mBAAmB,CAAC,gBAAgB,UAAU,SAAS,UAAU,EACnE,gBAAgB,UAAU,IAAI,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACf5C,MAAa,yBACX,YAAoB,oBACX;CAET,IAAI,UAAU,EAAE;CAEhB,eAAe,WAAW,EACxB,QAAQ,EAAE,WAAW,eAAe;EAClC,OAAO,mDAAmD,UAAU,sBAAsB,YAAY;IAEzG,CAAC;CAEF,MAAM,EAAE,oBAAoB;CAE5B,IAAI,mBAAmB,gBAAgB,UAAU,SAAS,UAAU,EAClE,gBAAgB,UAAU,OAAO,UAAU;;;;;;;;;;;;;;;;;AC/C/C,MAAa,2BAAiC;CAE5C,IAAI,UAAU,EAAE;CAEhB,MAAM,gBAAgB,SAAS;CAE/B,IAAI,yBAAyB,aAC3B,cAAc,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACkDxB,MAAa,eAAe,YAAuC;CAEjE,IAAI,UAAU,EAAE;CAGhB,IAAI,CAAC,cAAc,QAAQ,EACzB,UAAU,EAAE;CAGd,MAAM,WACJ,WAAW,SAAS,WAAW,IAC/B,iBAAiB,QAAQ,SAAS,IAClC;EAAC;EAAQ;EAAW;EAAS,CAAC,SAAS,QAAQ,SAAS,GACpD,QAAQ,WACR;CACN,IAAI,UACF,WAAW,SAAS,UAAU,IAC9B,SAAS,QAAQ,QAAQ,IACzB,QAAQ,WAAW,IACf,QAAQ,UACR;CAEN,UAAU,UAAU,aAAa,aAAa;CAE9C,iBAAiB,OAAO,SAAS;EAAE,KAAK;EAAG,MAAM;EAAG;EAAU,CAAC,EAAE,QAAQ"}
|
|
1
|
+
{"version":3,"file":"index.js","names":[],"sources":["../../src/events/actions/disableUserInteraction.ts","../../src/events/actions/enableUserInteraction.ts","../../src/events/actions/removeElementFocus.ts","../../src/events/actions/scrollToTop.ts"],"sourcesContent":["import { isServer } from \"@/predicates/is/isServer\";\nimport { assertIsString } from \"@/assertions/strings/assertIsString\";\n\n/** ----------------------------------------------------------\n * * ***Utility: `disableUserInteraction`.***\n * ----------------------------------------------------------\n * **Disables user interaction by adding a CSS class to the `<html>` element.**\n * - **Key points**:\n * - Works **only in browser environments**.\n * - Safely adds the specified CSS class to `<html>`.\n * - Prevents multiple additions of the same class.\n * - Useful to indicate that a process is ongoing\n * (e.g., loading or processing state).\n * - **Using custom CSS classes:**\n * - You can pass any class name that exists in your CSS.\n * - Example: if you have `.loading` in your styles, passing `\"loading\"`\n * will add it and disable interactions accordingly.\n * - **Validation:**\n * - Throws `TypeError` if the `className` parameter is not a string.\n * @defaultValue `\"on_processing\"`\n * @param {string} [className=\"on_processing\"] - The CSS class to add, defaults to `\"on_processing\"`.\n * @returns {void} Does not return anything (void).\n * @throws **{@link TypeError | `TypeError`}** if `className` is not a string.\n * @example\n * * ***Example in your code:***\n * ```ts\n * disableUserInteraction(); // ➔ Adds \"on_processing\" class\n * disableUserInteraction(\"loading\"); // ➔ Adds \"loading\" class\n * // ❌ Invalid value:\n * disableUserInteraction(123); // ➔ Throws TypeError\n * ```\n * * ***Example in your css file (with defaultValue `className` props [on_processing]):***\n * ```css\n * .on_processing {\n * cursor: wait;\n * touch-action: none;\n * user-select: none;\n * }\n *\n * .on_processing > * {\n * pointer-events: none;\n * touch-action: none;\n * user-select: none;\n * }\n * ```\n */\nexport const disableUserInteraction = (\n className: string = \"on_processing\"\n): void => {\n // Ensure function runs only in the browser\n if (isServer()) return;\n\n assertIsString(className, {\n message({ validType, currentType }) {\n return `First parameter \\`className\\` must be of type \\`${validType}\\`, but received: \\`${currentType}\\`.`;\n }\n });\n\n const { documentElement } = document;\n\n if (documentElement && !documentElement.classList.contains(className)) {\n documentElement.classList.add(className);\n }\n};\n","import { isServer } from \"@/predicates/is/isServer\";\nimport { assertIsString } from \"@/assertions/strings/assertIsString\";\n\n/** ----------------------------------------------------------\n * * ***Utility: `enableUserInteraction`.***\n * ----------------------------------------------------------\n * **Enables user interaction by removing a CSS class from the `<html>` element.**\n * - **Key points**:\n * - Works **only in browser environments**.\n * - Safely removes the specified CSS class from `<html>`.\n * - Does nothing if the class is not present.\n * - Useful to re-enable user interactions after a process\n * (e.g., loading or processing) completes.\n * - **Using custom CSS classes:**\n * - You can pass any class name that exists in your CSS.\n * - Example: if you have `.loading` in your styles, passing `\"loading\"`\n * will remove it and re-enable interactions.\n * - **Validation:**\n * - Throws `TypeError` if the `className` parameter is not a string.\n * @defaultValue `\"on_processing\"`\n * @param {string} [className=\"on_processing\"] - The CSS class to remove, defaults to `\"on_processing\"`.\n * @returns {void} Does not return anything (void).\n * @throws **{@link TypeError | `TypeError`}** if `className` is not a string.\n * @example\n * * ***Example in your code:***\n * ```ts\n * enableUserInteraction(); // ➔ Removes \"on_processing\" class\n * enableUserInteraction(\"loading\"); // ➔ Removes \"loading\" class\n * // ❌ Invalid value:\n * enableUserInteraction(123); // ➔ Throws TypeError\n * ```\n * * ***Example in your css file (with defaultValue `className` props [on_processing]):***\n * ```css\n * .on_processing {\n * cursor: wait;\n * touch-action: none;\n * user-select: none;\n * }\n *\n * .on_processing > * {\n * pointer-events: none;\n * touch-action: none;\n * user-select: none;\n * }\n * ```\n */\nexport const enableUserInteraction = (\n className: string = \"on_processing\"\n): void => {\n // Ensure function runs only in the browser\n if (isServer()) return;\n\n assertIsString(className, {\n message({ validType, currentType }) {\n return `First parameter \\`className\\` must be of type \\`${validType}\\`, but received: \\`${currentType}\\`.`;\n }\n });\n\n const { documentElement } = document;\n\n if (documentElement && documentElement.classList.contains(className)) {\n documentElement.classList.remove(className);\n }\n};\n","import { isServer } from \"@/predicates/is/isServer\";\n\n/** ----------------------------------------------------------\n * * ***Utility: `removeElementFocus`.***\n * ----------------------------------------------------------\n * **Removes focus from the currently active element in the document.**\n * - **Features**:\n * - This function works **only in browser environments** ***(safely no-ops in server environments)***.\n * - If an element is focused, it will lose focus by calling `HTMLElement.blur()`.\n * - If no element is focused or the active element is not an `HTMLElement`, nothing happens.\n * @returns {void} Does not return anything (void).\n * @example\n * removeElementFocus(); // ➔ Removes focus from the currently active element\n */\nexport const removeElementFocus = (): void => {\n // Ensure function runs only in the browser\n if (isServer()) return;\n\n const activeElement = document.activeElement;\n\n if (activeElement instanceof HTMLElement) {\n activeElement.blur();\n } else {\n // not-support, currently we nothing to do...\n // console.warn(\"removeElementFocus: No active element to blur or unsupported element type.\");\n }\n};\n","import { isNumber } from \"@/predicates/is/isNumber\";\nimport { hasOwnProp } from \"@/predicates/has/hasOwnProp\";\nimport { isServer } from \"@/predicates/is/isServer\";\nimport { isPlainObject } from \"@/predicates/is/isPlainObject\";\nimport { isNonEmptyString } from \"@/predicates/is/isNonEmptyString\";\n\n/**\n * ***Types options for {@link scrollToTop | `scrollToTop`}.***\n */\ntype ScrollToTopOptions = {\n /** ----------------------------------------------------------\n * * ***Scroll animation type.***\n * ----------------------------------------------------------\n * - ***Behavior:***\n * - Valid values: `\"auto\"`, `\"instant\"`, `\"smooth\"`.\n * - Default force to `\"smooth\"` if missing or invalid.\n *\n * @default \"smooth\"\n */\n behavior?: ScrollBehavior | undefined;\n /** ----------------------------------------------------------\n * * ***Delay before scrolling (in milliseconds).***\n * ----------------------------------------------------------\n * - ***Behavior:***\n * - Default value is `1`.\n * - Valid values: any number `≥` `1`.\n * - Non-integer number are truncated to an integer.\n * - Force to `2147483647` if number is larger than `2147483647`.\n * - Default force to `1` if `missing`, `NaN`, `invalid-type`, or `less-than` `1`.\n *\n * @default 1\n */\n timeout?: number | undefined;\n};\n\n/** ----------------------------------------------------------\n * * ***Utility: `scrollToTop`.***\n * ----------------------------------------------------------\n * **Scrolls the page to the top with optional smooth animation and delay.**\n * - **Features**:\n * - This function works **only in browser environments** (no effect on server-side).\n * - It leverages the native `window.scrollTo()` API with support for smooth scrolling\n * and an optional timeout delay before executing the scroll.\n * - Each option has strict valid values.\n * - If an invalid value is provided, the function **automatically falls back to its default**.\n * @param {ScrollToTopOptions} [options] - Optional settings for scroll behavior.\n * @param {ScrollToTopOptions[\"behavior\"]} [options.behavior=\"smooth\"] - Scroll animation type.\n * - Valid values: `\"auto\"`, `\"instant\"`, `\"smooth\"`.\n * - Default force to `\"smooth\"` if missing or invalid.\n * @param {ScrollToTopOptions[\"timeout\"]} [options.timeout=1] - Delay before scrolling (in milliseconds).\n * - Default value is `1`.\n * - Valid values: any number `≥` `1`.\n * - Non-integer number are truncated to an integer.\n * - Force to `2147483647` if number is larger than `2147483647`.\n * - Default force to `1` if `missing`, `NaN`, `invalid`, or `less-than` `1`.\n * @returns {void} Does not return anything, only scrolling to top (void).\n * @example\n * // ✅ Valid options value:\n * scrollToTop();\n * // ➔ Scroll smoothly to the top after 1ms delay\n * scrollToTop({ behavior: \"instant\" });\n * // ➔ Jump instantly to the top\n * scrollToTop({ timeout: 500 });\n * // ➔ Scroll smoothly to the top after 500ms\n *\n * // ❌ Invalid options value:\n * scrollToTop({ behavior: \"fly\", timeout: -100 });\n * // ➔ Fallback: behavior=\"smooth\", timeout=1\n * scrollToTop({ behavior: \"fly\", timeout: 123.55 });\n * // ➔ Fallback: behavior=\"smooth\", timeout=123\n */\nexport const scrollToTop = (options?: ScrollToTopOptions): void => {\n // Ensure function runs only in the browser\n if (isServer()) return;\n\n // Ensure options is an object and Defensive options check\n if (!isPlainObject(options)) {\n options = {};\n }\n\n const behavior: ScrollBehavior =\n hasOwnProp(options, \"behavior\") &&\n isNonEmptyString(options.behavior) &&\n [\"auto\", \"instant\", \"smooth\"].includes(options.behavior)\n ? options.behavior\n : \"smooth\";\n let timeout =\n hasOwnProp(options, \"timeout\") &&\n isNumber(options.timeout) &&\n options.timeout >= 1\n ? options.timeout\n : 1;\n\n timeout = timeout > 2147483647 ? 2147483647 : timeout;\n\n setTimeout(() => window.scrollTo({ top: 0, left: 0, behavior }), timeout);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA,MAAa,0BACX,YAAoB,oBACX;CAET,IAAI,SAAS,GAAG;CAEhB,eAAe,WAAW,EACxB,QAAQ,EAAE,WAAW,eAAe;EAClC,OAAO,mDAAmD,UAAU,sBAAsB,YAAY;CACxG,EACF,CAAC;CAED,MAAM,EAAE,oBAAoB;CAE5B,IAAI,mBAAmB,CAAC,gBAAgB,UAAU,SAAS,SAAS,GAClE,gBAAgB,UAAU,IAAI,SAAS;AAE3C;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACjBA,MAAa,yBACX,YAAoB,oBACX;CAET,IAAI,SAAS,GAAG;CAEhB,eAAe,WAAW,EACxB,QAAQ,EAAE,WAAW,eAAe;EAClC,OAAO,mDAAmD,UAAU,sBAAsB,YAAY;CACxG,EACF,CAAC;CAED,MAAM,EAAE,oBAAoB;CAE5B,IAAI,mBAAmB,gBAAgB,UAAU,SAAS,SAAS,GACjE,gBAAgB,UAAU,OAAO,SAAS;AAE9C;;;;;;;;;;;;;;;;ACjDA,MAAa,2BAAiC;CAE5C,IAAI,SAAS,GAAG;CAEhB,MAAM,gBAAgB,SAAS;CAE/B,IAAI,yBAAyB,aAC3B,cAAc,KAAK;AAKvB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AC6CA,MAAa,eAAe,YAAuC;CAEjE,IAAI,SAAS,GAAG;CAGhB,IAAI,CAAC,cAAc,OAAO,GACxB,UAAU,CAAC;CAGb,MAAM,WACJ,WAAW,SAAS,UAAU,KAC9B,iBAAiB,QAAQ,QAAQ,KACjC;EAAC;EAAQ;EAAW;CAAQ,EAAE,SAAS,QAAQ,QAAQ,IACnD,QAAQ,WACR;CACN,IAAI,UACF,WAAW,SAAS,SAAS,KAC7B,SAAS,QAAQ,OAAO,KACxB,QAAQ,WAAW,IACf,QAAQ,UACR;CAEN,UAAU,UAAU,aAAa,aAAa;CAE9C,iBAAiB,OAAO,SAAS;EAAE,KAAK;EAAG,MAAM;EAAG;CAAS,CAAC,GAAG,OAAO;AAC1E"}
|
|
@@ -2,14 +2,14 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/utils-js
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `3.13.
|
|
5
|
+
* Version: `3.13.1`
|
|
6
6
|
* Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
|
|
7
7
|
* Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
|
|
8
8
|
* ========================================================================
|
|
9
9
|
*/
|
|
10
10
|
"use strict";
|
|
11
11
|
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
12
|
-
const require_formatters = require('../formatters-
|
|
12
|
+
const require_formatters = require('../formatters-aEAAuzjx.cjs');
|
|
13
13
|
exports.censorEmail = require_formatters.censorEmail;
|
|
14
14
|
exports.chunkString = require_formatters.chunkString;
|
|
15
15
|
exports.formatCurrency = require_formatters.formatCurrency;
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/utils-js
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `3.13.
|
|
5
|
+
* Version: `3.13.1`
|
|
6
6
|
* Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
|
|
7
7
|
* Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
|
|
8
8
|
* ========================================================================
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import { a as truncateString, c as formatPhoneNumber, i as formatDateFns, l as formatNumber, n as formatDateTime, o as chunkString, r as formatDateIntl, s as censorEmail, t as getGMTOffset, u as formatCurrency } from "../index-
|
|
11
|
+
import { a as truncateString, c as formatPhoneNumber, i as formatDateFns, l as formatNumber, n as formatDateTime, o as chunkString, r as formatDateIntl, s as censorEmail, t as getGMTOffset, u as formatCurrency } from "../index-RNQBTK8A.cjs";
|
|
12
12
|
export { censorEmail, chunkString, formatCurrency, formatDateFns, formatDateIntl, formatDateTime, formatNumber, formatPhoneNumber, getGMTOffset, truncateString };
|
|
@@ -2,11 +2,11 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/utils-js
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `3.13.
|
|
5
|
+
* Version: `3.13.1`
|
|
6
6
|
* Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
|
|
7
7
|
* Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
|
|
8
8
|
* ========================================================================
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import { a as truncateString, c as formatPhoneNumber, i as formatDateFns, l as formatNumber, n as formatDateTime, o as chunkString, r as formatDateIntl, s as censorEmail, t as getGMTOffset, u as formatCurrency } from "../index-
|
|
11
|
+
import { a as truncateString, c as formatPhoneNumber, i as formatDateFns, l as formatNumber, n as formatDateTime, o as chunkString, r as formatDateIntl, s as censorEmail, t as getGMTOffset, u as formatCurrency } from "../index-CRz9rSZL.js";
|
|
12
12
|
export { censorEmail, chunkString, formatCurrency, formatDateFns, formatDateIntl, formatDateTime, formatNumber, formatPhoneNumber, getGMTOffset, truncateString };
|
package/dist/formatters/index.js
CHANGED
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/utils-js
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `3.13.
|
|
5
|
+
* Version: `3.13.1`
|
|
6
6
|
* Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
|
|
7
7
|
* Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
|
|
8
8
|
* ========================================================================
|
|
9
9
|
*/
|
|
10
|
-
import { a as truncateString, c as formatPhoneNumber, i as formatDateFns, l as formatNumber, n as formatDateTime, o as chunkString, r as formatDateIntl, s as censorEmail, t as getGMTOffset, u as formatCurrency } from "../formatters-
|
|
10
|
+
import { a as truncateString, c as formatPhoneNumber, i as formatDateFns, l as formatNumber, n as formatDateTime, o as chunkString, r as formatDateIntl, s as censorEmail, t as getGMTOffset, u as formatCurrency } from "../formatters-C6cVZBbG.js";
|
|
11
11
|
export { censorEmail, chunkString, formatCurrency, formatDateFns, formatDateIntl, formatDateTime, formatNumber, formatPhoneNumber, getGMTOffset, truncateString };
|
|
@@ -2,19 +2,19 @@
|
|
|
2
2
|
* ========================================================================
|
|
3
3
|
* @rzl-zone/utils-js
|
|
4
4
|
* ------------------------------------------------------------------------
|
|
5
|
-
* Version: `3.13.
|
|
5
|
+
* Version: `3.13.1`
|
|
6
6
|
* Author: `Rizalvin Dwiky <rizalvindwiky@gmail.com>`
|
|
7
7
|
* Repository: `https://github.com/rzl-zone/rzl-zone/tree/main/packages/utils-js`
|
|
8
8
|
* ========================================================================
|
|
9
9
|
*/
|
|
10
|
-
import { A as isPlainObject, D as isNaN, F as isBoolean, N as isNil, P as isFunction, S as isUndefined, T as assertIsPlainObject, b as hasOwnProp, k as isString, r as getPreciseType, t as assertIsBoolean, w as isNumber, y as isNonEmptyString } from "./assertIsBoolean-
|
|
11
|
-
import { t as assertIsString } from "./assertIsString-
|
|
12
|
-
import { t as isFinite } from "./isFinite-
|
|
13
|
-
import { n as isDate, t as safeStableStringify } from "./safeStableStringify-
|
|
14
|
-
import { t as isEmptyString } from "./isEmptyString-
|
|
15
|
-
import { t as parseCurrencyString } from "./parsing-
|
|
16
|
-
import { t as isInteger } from "./isInteger-
|
|
17
|
-
import { t as normalizeSpaces } from "./normalizeSpaces-
|
|
10
|
+
import { A as isPlainObject, D as isNaN, F as isBoolean, N as isNil, P as isFunction, S as isUndefined, T as assertIsPlainObject, b as hasOwnProp, k as isString, r as getPreciseType, t as assertIsBoolean, w as isNumber, y as isNonEmptyString } from "./assertIsBoolean-CWUs-I5l.js";
|
|
11
|
+
import { t as assertIsString } from "./assertIsString-CY_WkCLr.js";
|
|
12
|
+
import { t as isFinite } from "./isFinite-BEJFOv6B.js";
|
|
13
|
+
import { n as isDate, t as safeStableStringify } from "./safeStableStringify-B2KTTS3r.js";
|
|
14
|
+
import { t as isEmptyString } from "./isEmptyString-BYMz_wt9.js";
|
|
15
|
+
import { t as parseCurrencyString } from "./parsing-Bfaw85Hd.js";
|
|
16
|
+
import { t as isInteger } from "./isInteger-DEDbBGez.js";
|
|
17
|
+
import { t as normalizeSpaces } from "./normalizeSpaces-BoUDtq5P.js";
|
|
18
18
|
import { AsYouType, isSupportedCountry } from "libphonenumber-js/max";
|
|
19
19
|
import { enUS, id } from "date-fns/locale";
|
|
20
20
|
import { format, parse } from "date-fns";
|
|
@@ -366,4 +366,4 @@ const getGMTOffset = (date) => {
|
|
|
366
366
|
}
|
|
367
367
|
};
|
|
368
368
|
export { truncateString as a, formatPhoneNumber as c, formatDateFns as i, formatNumber as l, formatDateTime as n, chunkString as o, formatDateIntl as r, censorEmail as s, getGMTOffset as t, formatCurrency as u };
|
|
369
|
-
//# sourceMappingURL=formatters-
|
|
369
|
+
//# sourceMappingURL=formatters-C6cVZBbG.js.map
|