react-js-plugins 2.0.11 → 2.0.13
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/README.md
CHANGED
|
@@ -1366,10 +1366,10 @@ Creates a simple dynamic reducer using generic action handler logic.
|
|
|
1366
1366
|
const reducer = _dynamicReducer(initialState);
|
|
1367
1367
|
```
|
|
1368
1368
|
|
|
1369
|
-
### ✅ **_generateUUID**
|
|
1369
|
+
### ✅ **_UUID / _generateUUID**
|
|
1370
1370
|
Generates a unique UUID string using the browser's `crypto` API.
|
|
1371
1371
|
```ts
|
|
1372
|
-
const id =
|
|
1372
|
+
const id = _UUID();
|
|
1373
1373
|
console.log(id); // e.g., "3b12f1df-5232-4e6b-8f36-3a4e5f7f8b84"
|
|
1374
1374
|
```
|
|
1375
1375
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const _isNotEmpty: <T>(value: T) => boolean;
|
|
2
|
-
export declare const
|
|
2
|
+
export declare const _UUID: () => string;
|
|
3
3
|
export declare const _countWords: (str: string) => number;
|
|
4
4
|
export declare const _isLeapYear: (year: number) => boolean;
|
|
5
5
|
export declare const _isWeekend: (date: Date) => boolean;
|
|
@@ -49,7 +49,16 @@ export var _isNotEmpty = function (value) {
|
|
|
49
49
|
return Object.keys(value).length > 0;
|
|
50
50
|
return true;
|
|
51
51
|
};
|
|
52
|
-
export var
|
|
52
|
+
export var _UUID = function () {
|
|
53
|
+
if (typeof crypto !== 'undefined' && crypto.randomUUID) {
|
|
54
|
+
return crypto.randomUUID();
|
|
55
|
+
}
|
|
56
|
+
return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
|
|
57
|
+
var r = (Math.random() * 16) | 0;
|
|
58
|
+
var v = c === 'x' ? r : (r & 0x3) | 0x8;
|
|
59
|
+
return v.toString(16);
|
|
60
|
+
});
|
|
61
|
+
};
|
|
53
62
|
export var _countWords = function (str) { return str.trim().split(/\s+/).length; };
|
|
54
63
|
export var _isLeapYear = function (year) { return (year % 4 === 0 && year % 100 !== 0) || year % 400 === 0; };
|
|
55
64
|
export var _isWeekend = function (date) { return [0, 6].includes(date.getDay()); };
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function _injectCSS(): void;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export function _injectCSS() {
|
|
2
|
+
var style = document.createElement("style");
|
|
3
|
+
style.innerHTML = "\n .thin-scrollbar {\n scrollbar-width: thin;\n scrollbar-color: #d1d5db #f9fafb;\n }\n .thin-scrollbar::-webkit-scrollbar {\n width: 4px;\n height: 4px;\n }\n .thin-scrollbar::-webkit-scrollbar-track {\n background: #cacbcc;\n border-radius: 4px;\n }\n .thin-scrollbar::-webkit-scrollbar-thumb {\n background-color: #bebfc2;\n border-radius: 4px;\n border: 1px solid #f9fafb;\n }\n .thin-scrollbar::-webkit-scrollbar-thumb:hover {\n background-color: #9ca3af;\n }\n .smooth-scroll {\n scroll-behavior: smooth;\n -webkit-overflow-scrolling: touch;\n}\n ";
|
|
4
|
+
document.head.appendChild(style);
|
|
5
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import 'nprogress/nprogress.css';
|
|
2
2
|
import { LazyLoader } from './chunkautils/chunk23111';
|
|
3
|
-
import { _isNotEmpty,
|
|
3
|
+
import { _isNotEmpty, _isLeapYear, _isWeekend, _removeFalsy, _escapeHTML, _handleApi, _handleSafe, _clearRouteState, _UUID } from "./chunkautils/chunk22123";
|
|
4
4
|
import { createPrivateInstance, createPublicInstance } from "./chunkautils/chunk83454";
|
|
5
5
|
import { _alert, _capitalize, _confirm, _convertToCurrency, _decodeURI, _deepClone, _decryptJson, _decryptString, _dynamicReducer, _encodeURI, _encryptJson, _encryptPayload, _encryptString, _exportExcel, _flattenArray, _flattenArrayByKey, _findExactRoute, _generatePassword, _genericReducer, _getBrowserInfo, _getCookie, _getFinancialYear, _getStartStopTime, _getStorage, _getUTCTimestamp, _globalizeDateTime, _formatInternationalDate, _hasElement, _hasItem, _importExcel, _isEmptyArray, _isEmptyObject, _isEqual, _isMobile, _mapObject, _mergeObjects, _parseJSON, _sleep, _promise, _setCookie, _stringifyJSON, _thousandSeparator } from "./chunkautils/chunk65431";
|
|
6
6
|
import { _addEventListenerToElement, _allowAlphaKeys, _allowAlphaNumericKeys, _allowDecimalKeys, _clearNode, _cloneElement, _copyText, _domSelector, _filterArrayByKeyValue, _filterByMatchedKey, _filterByMatchingKey, _getChildElements, _getElementAttribute, _getElementsByClass, _getElementsByTag, _getParent, _handlePasteAlphabetKeys, _handlePasteDecimalKeys, _hideElement, _insertHTML, _isDocumentLoaded, _isElementInViewport, _isElementPresent, _isValidBase64, _isValidBlob, _isValidBoolean, _isValidCreditCard, _isValidDate, _isValidDateObject, _isValidDateRange, _isValidDateString, _isValidDateTime, _isValidEmail, _isValidEvent, _isValidFile, _isValidFormData, _isValidFunction, _isValidHexColor, _isValidHTMLElement, _isValidIP, _isValidJSON, _isValidMacAddress, _isValidNode, _isValidNodeList, _isValidNumber, _isValidPassword, _isValidPhoneNumber, _isValidPromise, _isValidRegExp, _isValidString, _isValidTime, _isValidURL, _isValidURLSearchParams, _isValidUUID, _log, _pasteText, _reloadAfterLoad, _removeAllChildren, _removeElement, _removeDuplicateByKey, _removeElementAttribute, _removeEventListenerFromElement, _removeNode, _removeSafeElement, _replaceContent, _runOnIframeLoad, _sanitizeArray, _scrollToElement, _setElementAttribute, _setElementDisabled, _setMultipleStyles, _showElement, _snipDecimals, _throwError, _getQueryString, _onDOMLoad, _onFullReload, _onWindowLoad } from "./chunkautils/chunk75342";
|
|
7
7
|
import { _arrayDiff, _arrayIncludesObject, _arrayIntersection, _arrayToObject, _arrayToObjectByKey, _asyncDebounce, _throttle, _asyncMap, _average, _base64ToBlob, _batchProcess, _bytesToSize, _calPercentage, _chunk, _dateFormat, _dateTransformer, _deepCloneArray, _deepCompareArrays, _deepEqual, _deepMerge, _downloadBase64File, _downloadBlob, _downloadFile, _dynamicRequiredValidation, _escapeRegExpMatch, _extractUniqueValues, _extractKeyValues, _extractNestedKeyValues, _fileToBase64, _filterDuplicates, _filterObjectByKey, _findObjectById, _flattenObject, _formatDate, _localeDateFormat, _freeze, _generateYupValidation, _getArrayOfObjectsByProperty, _getKeyByValue, _getKeysByValue, _getMaxMinValue, _getNestedProperty, _getObjectValues, _getPriceAfterTax, _getScrollPosition, _getUniqueValues, _getValueByKey, _groupBy, _handleChildrenMenu, _handleParentNode, _handleParentsMenu, _handlePermissions, _initializeFormValues, _initializeFormikFields, _isExactMatch, _isFreeze, _isInArray, _isSeal, _isValidForm, _mapAsync, _mergeArrays, _mergeArraysByKey, _objectToArray, _removeDuplicates, _scrollToTop, _seal, _setNestedProperty, _setTouchedFields, _sortByKey, _swapArrayByKey, _swapArrayElements, _toCamelCase, _transformArray, _transformAsyncData, _updateObjectInArray, _validateFormRef, _combineClasses } from './chunkautils/chunk83453';
|
|
8
8
|
import { _isTruncate, _toTitleCase, _truncateText } from './chunkautils/chunk21211';
|
|
9
9
|
import { _getCurrentPath, _getCurrentState, _getLocation, _getTypedState, _go, _goBack, _goForward, _navigate } from './chunkautils/chunk22523';
|
|
10
|
-
|
|
10
|
+
import { _injectCSS } from './chunkautils/chunk91172';
|
|
11
|
+
export { LazyLoader, createPrivateInstance, createPublicInstance, _addEventListenerToElement, _alert, _allowAlphaKeys, _allowAlphaNumericKeys, _allowDecimalKeys, _arrayDiff, _arrayIncludesObject, _arrayIntersection, _arrayToObject, _arrayToObjectByKey, _asyncDebounce, _throttle, _asyncMap, _average, _base64ToBlob, _batchProcess, _bytesToSize, _combineClasses, _clearRouteState, _calPercentage, _capitalize, _chunk, _clearNode, _cloneElement, _confirm, _convertToCurrency, _copyText, _dateFormat, _dateTransformer, _decodeURI, _deepClone, _deepCloneArray, _deepCompareArrays, _deepEqual, _deepMerge, _decryptJson, _decryptString, _domSelector, _downloadBase64File, _downloadBlob, _downloadFile, _dynamicReducer, _dynamicRequiredValidation, _encodeURI, _encryptJson, _encryptPayload, _encryptString, _escapeRegExpMatch, _exportExcel, _escapeHTML, _extractUniqueValues, _extractKeyValues, _extractNestedKeyValues, _fileToBase64, _filterArrayByKeyValue, _filterByMatchedKey, _filterByMatchingKey, _filterDuplicates, _filterObjectByKey, _findExactRoute, _findObjectById, _flattenArray, _flattenArrayByKey, _flattenObject, _formatDate, _localeDateFormat, _globalizeDateTime, _formatInternationalDate, _freeze, _generatePassword, _generateYupValidation, _genericReducer, _getArrayOfObjectsByProperty, _getBrowserInfo, _getChildElements, _getCookie, _getElementAttribute, _getElementsByClass, _getElementsByTag, _getFinancialYear, _getKeysByValue, _getKeyByValue, _getMaxMinValue, _getNestedProperty, _getObjectValues, _getParent, _getPriceAfterTax, _getScrollPosition, _getStartStopTime, _getStorage, _getUTCTimestamp, _getUniqueValues, _getValueByKey, _groupBy, _go, _goBack, _goForward, _getCurrentPath, _getCurrentState, _getLocation, _getTypedState, _handleApi, _handleSafe, _handleChildrenMenu, _handleParentNode, _handleParentsMenu, _handlePasteAlphabetKeys, _handlePasteDecimalKeys, _handlePermissions, _hasElement, _hasItem, _hideElement, _importExcel, _initializeFormikFields, _initializeFormValues, _insertHTML, _injectCSS, _isLeapYear, _isWeekend, _isTruncate, _isDocumentLoaded, _isElementInViewport, _isElementPresent, _isNotEmpty, _isEmptyArray, _isEmptyObject, _isEqual, _isExactMatch, _isFreeze, _isInArray, _isMobile, _isSeal, _isValidBase64, _isValidBlob, _isValidBoolean, _isValidCreditCard, _isValidDate, _isValidDateObject, _isValidDateRange, _isValidDateString, _isValidDateTime, _isValidEmail, _isValidEvent, _isValidFile, _isValidForm, _isValidFormData, _isValidFunction, _isValidHTMLElement, _isValidHexColor, _isValidIP, _isValidJSON, _isValidMacAddress, _isValidNode, _isValidNodeList, _isValidNumber, _isValidPassword, _isValidPhoneNumber, _isValidPromise, _isValidRegExp, _isValidString, _isValidTime, _isValidURL, _isValidURLSearchParams, _isValidUUID, _log, _mapAsync, _mapObject, _mergeArrays, _mergeArraysByKey, _mergeObjects, _navigate, _objectToArray, _parseJSON, _pasteText, _promise, _reloadAfterLoad, _removeAllChildren, _removeDuplicates, _removeDuplicateByKey, _removeElement, _removeElementAttribute, _removeEventListenerFromElement, _removeNode, _removeFalsy, _removeSafeElement, _replaceContent, _runOnIframeLoad, _sanitizeArray, _scrollToElement, _scrollToTop, _sleep, _seal, _setCookie, _setElementAttribute, _setElementDisabled, _setMultipleStyles, _setNestedProperty, _setTouchedFields, _showElement, _snipDecimals, _sortByKey, _stringifyJSON, _swapArrayByKey, _swapArrayElements, _thousandSeparator, _throwError, _toCamelCase, _truncateText, _toTitleCase, _transformArray, _transformAsyncData, _updateObjectInArray, _UUID, _validateFormRef, _getQueryString, _onDOMLoad, _onFullReload, _onWindowLoad };
|
package/dist/index.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import 'nprogress/nprogress.css';
|
|
2
2
|
import { LazyLoader } from './chunkautils/chunk23111';
|
|
3
|
-
import { _isNotEmpty,
|
|
3
|
+
import { _isNotEmpty, _isLeapYear, _isWeekend, _removeFalsy, _escapeHTML, _handleApi, _handleSafe, _clearRouteState, _UUID } from "./chunkautils/chunk22123";
|
|
4
4
|
import { createPrivateInstance, createPublicInstance } from "./chunkautils/chunk83454";
|
|
5
5
|
import { _alert, _capitalize, _confirm, _convertToCurrency, _decodeURI, _deepClone, _decryptJson, _decryptString, _dynamicReducer, _encodeURI, _encryptJson, _encryptPayload, _encryptString, _exportExcel, _flattenArray, _flattenArrayByKey, _findExactRoute, _generatePassword, _genericReducer, _getBrowserInfo, _getCookie, _getFinancialYear, _getStartStopTime, _getStorage, _getUTCTimestamp, _globalizeDateTime, _formatInternationalDate, _hasElement, _hasItem, _importExcel, _isEmptyArray, _isEmptyObject, _isEqual, _isMobile, _mapObject, _mergeObjects, _parseJSON, _sleep, _promise, _setCookie, _stringifyJSON, _thousandSeparator } from "./chunkautils/chunk65431";
|
|
6
6
|
import { _addEventListenerToElement, _allowAlphaKeys, _allowAlphaNumericKeys, _allowDecimalKeys, _clearNode, _cloneElement, _copyText, _domSelector, _filterArrayByKeyValue, _filterByMatchedKey, _filterByMatchingKey, _getChildElements, _getElementAttribute, _getElementsByClass, _getElementsByTag, _getParent, _handlePasteAlphabetKeys, _handlePasteDecimalKeys, _hideElement, _insertHTML, _isDocumentLoaded, _isElementInViewport, _isElementPresent, _isValidBase64, _isValidBlob, _isValidBoolean, _isValidCreditCard, _isValidDate, _isValidDateObject, _isValidDateRange, _isValidDateString, _isValidDateTime, _isValidEmail, _isValidEvent, _isValidFile, _isValidFormData, _isValidFunction, _isValidHexColor, _isValidHTMLElement, _isValidIP, _isValidJSON, _isValidMacAddress, _isValidNode, _isValidNodeList, _isValidNumber, _isValidPassword, _isValidPhoneNumber, _isValidPromise, _isValidRegExp, _isValidString, _isValidTime, _isValidURL, _isValidURLSearchParams, _isValidUUID, _log, _pasteText, _reloadAfterLoad, _removeAllChildren, _removeElement, _removeDuplicateByKey, _removeElementAttribute, _removeEventListenerFromElement, _removeNode, _removeSafeElement, _replaceContent, _runOnIframeLoad, _sanitizeArray, _scrollToElement, _setElementAttribute, _setElementDisabled, _setMultipleStyles, _showElement, _snipDecimals, _throwError, _getQueryString, _onDOMLoad, _onFullReload, _onWindowLoad } from "./chunkautils/chunk75342";
|
|
7
7
|
import { _arrayDiff, _arrayIncludesObject, _arrayIntersection, _arrayToObject, _arrayToObjectByKey, _asyncDebounce, _throttle, _asyncMap, _average, _base64ToBlob, _batchProcess, _bytesToSize, _calPercentage, _chunk, _dateFormat, _dateTransformer, _deepCloneArray, _deepCompareArrays, _deepEqual, _deepMerge, _downloadBase64File, _downloadBlob, _downloadFile, _dynamicRequiredValidation, _escapeRegExpMatch, _extractUniqueValues, _extractKeyValues, _extractNestedKeyValues, _fileToBase64, _filterDuplicates, _filterObjectByKey, _findObjectById, _flattenObject, _formatDate, _localeDateFormat, _freeze, _generateYupValidation, _getArrayOfObjectsByProperty, _getKeyByValue, _getKeysByValue, _getMaxMinValue, _getNestedProperty, _getObjectValues, _getPriceAfterTax, _getScrollPosition, _getUniqueValues, _getValueByKey, _groupBy, _handleChildrenMenu, _handleParentNode, _handleParentsMenu, _handlePermissions, _initializeFormValues, _initializeFormikFields, _isExactMatch, _isFreeze, _isInArray, _isSeal, _isValidForm, _mapAsync, _mergeArrays, _mergeArraysByKey, _objectToArray, _removeDuplicates, _scrollToTop, _seal, _setNestedProperty, _setTouchedFields, _sortByKey, _swapArrayByKey, _swapArrayElements, _toCamelCase, _transformArray, _transformAsyncData, _updateObjectInArray, _validateFormRef, _combineClasses } from './chunkautils/chunk83453';
|
|
8
8
|
import { _isTruncate, _toTitleCase, _truncateText } from './chunkautils/chunk21211';
|
|
9
9
|
import { _getCurrentPath, _getCurrentState, _getLocation, _getTypedState, _go, _goBack, _goForward, _navigate } from './chunkautils/chunk22523';
|
|
10
|
-
|
|
10
|
+
import { _injectCSS } from './chunkautils/chunk91172';
|
|
11
|
+
export { LazyLoader, createPrivateInstance, createPublicInstance, _addEventListenerToElement, _alert, _allowAlphaKeys, _allowAlphaNumericKeys, _allowDecimalKeys, _arrayDiff, _arrayIncludesObject, _arrayIntersection, _arrayToObject, _arrayToObjectByKey, _asyncDebounce, _throttle, _asyncMap, _average, _base64ToBlob, _batchProcess, _bytesToSize, _combineClasses, _clearRouteState, _calPercentage, _capitalize, _chunk, _clearNode, _cloneElement, _confirm, _convertToCurrency, _copyText, _dateFormat, _dateTransformer, _decodeURI, _deepClone, _deepCloneArray, _deepCompareArrays, _deepEqual, _deepMerge, _decryptJson, _decryptString, _domSelector, _downloadBase64File, _downloadBlob, _downloadFile, _dynamicReducer, _dynamicRequiredValidation, _encodeURI, _encryptJson, _encryptPayload, _encryptString, _escapeRegExpMatch, _exportExcel, _escapeHTML, _extractUniqueValues, _extractKeyValues, _extractNestedKeyValues, _fileToBase64, _filterArrayByKeyValue, _filterByMatchedKey, _filterByMatchingKey, _filterDuplicates, _filterObjectByKey, _findExactRoute, _findObjectById, _flattenArray, _flattenArrayByKey, _flattenObject, _formatDate, _localeDateFormat, _globalizeDateTime, _formatInternationalDate, _freeze, _generatePassword, _generateYupValidation, _genericReducer, _getArrayOfObjectsByProperty, _getBrowserInfo, _getChildElements, _getCookie, _getElementAttribute, _getElementsByClass, _getElementsByTag, _getFinancialYear, _getKeysByValue, _getKeyByValue, _getMaxMinValue, _getNestedProperty, _getObjectValues, _getParent, _getPriceAfterTax, _getScrollPosition, _getStartStopTime, _getStorage, _getUTCTimestamp, _getUniqueValues, _getValueByKey, _groupBy, _go, _goBack, _goForward, _getCurrentPath, _getCurrentState, _getLocation, _getTypedState, _handleApi, _handleSafe, _handleChildrenMenu, _handleParentNode, _handleParentsMenu, _handlePasteAlphabetKeys, _handlePasteDecimalKeys, _handlePermissions, _hasElement, _hasItem, _hideElement, _importExcel, _initializeFormikFields, _initializeFormValues, _insertHTML, _injectCSS, _isLeapYear, _isWeekend, _isTruncate, _isDocumentLoaded, _isElementInViewport, _isElementPresent, _isNotEmpty, _isEmptyArray, _isEmptyObject, _isEqual, _isExactMatch, _isFreeze, _isInArray, _isMobile, _isSeal, _isValidBase64, _isValidBlob, _isValidBoolean, _isValidCreditCard, _isValidDate, _isValidDateObject, _isValidDateRange, _isValidDateString, _isValidDateTime, _isValidEmail, _isValidEvent, _isValidFile, _isValidForm, _isValidFormData, _isValidFunction, _isValidHTMLElement, _isValidHexColor, _isValidIP, _isValidJSON, _isValidMacAddress, _isValidNode, _isValidNodeList, _isValidNumber, _isValidPassword, _isValidPhoneNumber, _isValidPromise, _isValidRegExp, _isValidString, _isValidTime, _isValidURL, _isValidURLSearchParams, _isValidUUID, _log, _mapAsync, _mapObject, _mergeArrays, _mergeArraysByKey, _mergeObjects, _navigate, _objectToArray, _parseJSON, _pasteText, _promise, _reloadAfterLoad, _removeAllChildren, _removeDuplicates, _removeDuplicateByKey, _removeElement, _removeElementAttribute, _removeEventListenerFromElement, _removeNode, _removeFalsy, _removeSafeElement, _replaceContent, _runOnIframeLoad, _sanitizeArray, _scrollToElement, _scrollToTop, _sleep, _seal, _setCookie, _setElementAttribute, _setElementDisabled, _setMultipleStyles, _setNestedProperty, _setTouchedFields, _showElement, _snipDecimals, _sortByKey, _stringifyJSON, _swapArrayByKey, _swapArrayElements, _thousandSeparator, _throwError, _toCamelCase, _truncateText, _toTitleCase, _transformArray, _transformAsyncData, _updateObjectInArray, _UUID, _validateFormRef, _getQueryString, _onDOMLoad, _onFullReload, _onWindowLoad };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-js-plugins",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.13",
|
|
4
4
|
"description": "A powerful and efficient React utility library designed to enhance application performance by streamlining and simplifying the management of complex asynchronous operations.",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/index.js",
|