{"_id":"@asdfgertyjhnpm/quo-sed-natus","name":"@asdfgertyjhnpm/quo-sed-natus","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@asdfgertyjhnpm/quo-sed-natus","version":"1.0.0","description":"Common Utils For React Component.","main":"index.js","author":{"name":"asdfgertyjh"},"license":"MIT","keywords":["ES2019","lazy","var","utils","flag","testing","stringifier","browser","check","collection.es6","ECMAScript 2021","view","Array.prototype.filter","xterm","package","npm","plugin","https","time","bootstrap css","TypeBox","Array.prototype.findLast","full","Float64Array","typed array","xdg-open","Observable","Int16Array","json-schema","WeakMap","fast-deep-copy","get","readable","lockfile","dotenv","fast-copy","eslint","higher-order","types","Array.prototype.includes","toolkit","buffers","findLast","es2015","BigInt64Array","text","macos","mru","Object.fromEntries","bind","look-up","group","libphonenumber","random","native","core","runtime","columns","duplex","schema","logger","exec","mime","quote","optimizer","log","WebSockets","arktype","streams2","byte","configurable","proto","qs","sort","speed","env","fullwidth","rmdir","querystring","idle","monorepo","wordbreak","structuredClone","from","tty","call-bind","utility","prop","command-line","shared","workspace:*",".env","immutable","fastclone","sanitization","make dir","assert","es","preprocessor","-0","windows","limited","error-handling","shebang","ES2020","sigint","stream","colors","CSS","watchFile","find","babel-core","mkdirs","values","loading","framework","tc39","ratelimit","Int8Array","watch","stringify","tslib","descriptors","remove","lesscss","sameValueZero","ECMAScript 2023","website","irq","Set","figlet","merge","interrupts","express","valid","es8","protobuf","flags","coercible","eventDispatcher","lru","api","Reflect.getPrototypeOf","set","3d","ascii","flat","trimEnd","three","rm","toArray","warning","whatwg","eslintplugin","art","opener","glob","compiler","javascript","babel","folder","spawn","ES8","ECMAScript 3","eventEmitter","CSSStyleDeclaration","core-js","length","less","id","toobject","gdpr","queue","intrinsic","import","awesomesauce","jwt","setPrototypeOf","negative zero","object","expression","superagent","commander","real-time","Uint16Array","ajax","concatMap","String.prototype.matchAll","StyleSheet","form","Underscore","redux-toolkit","delete","js","Array.prototype.flatMap","mime-db","Promise","negative","const","Function.prototype.name","ES2021","ES2023","uninstall","ECMAScript 7","ECMAScript 2017","dom","eslint-plugin","transpiler","callbind","reducer","term","Array","ast","nested css","sorted","code points","bdd","argv","node","ECMAScript 5","codes","YAML","Symbol.toStringTag","ES5","bundler","Uint8ClampedArray","mkdirp","optimist","write","getPrototypeOf","encryption","mobile","css less","trim","side","launch","option","arguments","getintrinsic","URLSearchParams","tdd","setter","fsevents","date","classes","inference","hookform","helpers","sanitize"],"repository":{"type":"git","url":"git+https://github.com/asdfgertyjhnpm/quo-sed-natus.git"},"homepage":"https://github.com/asdfgertyjhnpm/quo-sed-natus/#readme","bugs":{"url":"https://github.com/asdfgertyjhnpm/quo-sed-natus/issues"},"packageManager":"yarn@4.1.1","dependencies":{"@ajhgwdjnpm/possimus-quaerat-hic":"^1.0.0","@asdfgertyjhnpm/ipsam-illum-quidem":"^1.0.0","@asdfgertyjhnpm/maxime-explicabo-ut":"^1.0.0"},"_id":"@asdfgertyjhnpm/quo-sed-natus@1.0.0","gitHead":"37956561a3cdf11a6ebb6b1907d3713d0d8c2c2f","_nodeVersion":"20.12.2","_npmVersion":"10.5.0","dist":{"integrity":"sha512-OtBFb7cFTGrgesn2yB+FNhjiIvGf/ixvPAO/mtF2NpaC8EYOjjTr75uBcx4MiNmZZS0xlJ6fl1PACXBS9yGZ6w==","shasum":"8f897ca43622c136b326b723187fdad3cf30bca1","tarball":"https://registry.npmjs.org/@asdfgertyjhnpm/quo-sed-natus/-/quo-sed-natus-1.0.0.tgz","fileCount":10,"unpackedSize":17776,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCXQxy3BEQLu2e6tZgLaZLmveelaT+w8+cKe/Yhz/L8sgIhAKgTtTF3bNIIVh/9LbnMHV3jsUO8IMkOYrXwVAH/3nbh"}]},"_npmUser":{"name":"baoh44843","email":"baoh44843@gmail.com"},"directories":{},"maintainers":[{"name":"baoh44843","email":"baoh44843@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/quo-sed-natus_1.0.0_1714040098558_0.5128114002022464"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-25T10:14:58.423Z","1.0.0":"2024-04-25T10:14:58.699Z","modified":"2024-04-25T10:14:59.053Z"},"maintainers":[{"name":"baoh44843","email":"baoh44843@gmail.com"}],"description":"Common Utils For React Component.","homepage":"https://github.com/asdfgertyjhnpm/quo-sed-natus/#readme","keywords":["ES2019","lazy","var","utils","flag","testing","stringifier","browser","check","collection.es6","ECMAScript 2021","view","Array.prototype.filter","xterm","package","npm","plugin","https","time","bootstrap css","TypeBox","Array.prototype.findLast","full","Float64Array","typed array","xdg-open","Observable","Int16Array","json-schema","WeakMap","fast-deep-copy","get","readable","lockfile","dotenv","fast-copy","eslint","higher-order","types","Array.prototype.includes","toolkit","buffers","findLast","es2015","BigInt64Array","text","macos","mru","Object.fromEntries","bind","look-up","group","libphonenumber","random","native","core","runtime","columns","duplex","schema","logger","exec","mime","quote","optimizer","log","WebSockets","arktype","streams2","byte","configurable","proto","qs","sort","speed","env","fullwidth","rmdir","querystring","idle","monorepo","wordbreak","structuredClone","from","tty","call-bind","utility","prop","command-line","shared","workspace:*",".env","immutable","fastclone","sanitization","make dir","assert","es","preprocessor","-0","windows","limited","error-handling","shebang","ES2020","sigint","stream","colors","CSS","watchFile","find","babel-core","mkdirs","values","loading","framework","tc39","ratelimit","Int8Array","watch","stringify","tslib","descriptors","remove","lesscss","sameValueZero","ECMAScript 2023","website","irq","Set","figlet","merge","interrupts","express","valid","es8","protobuf","flags","coercible","eventDispatcher","lru","api","Reflect.getPrototypeOf","set","3d","ascii","flat","trimEnd","three","rm","toArray","warning","whatwg","eslintplugin","art","opener","glob","compiler","javascript","babel","folder","spawn","ES8","ECMAScript 3","eventEmitter","CSSStyleDeclaration","core-js","length","less","id","toobject","gdpr","queue","intrinsic","import","awesomesauce","jwt","setPrototypeOf","negative zero","object","expression","superagent","commander","real-time","Uint16Array","ajax","concatMap","String.prototype.matchAll","StyleSheet","form","Underscore","redux-toolkit","delete","js","Array.prototype.flatMap","mime-db","Promise","negative","const","Function.prototype.name","ES2021","ES2023","uninstall","ECMAScript 7","ECMAScript 2017","dom","eslint-plugin","transpiler","callbind","reducer","term","Array","ast","nested css","sorted","code points","bdd","argv","node","ECMAScript 5","codes","YAML","Symbol.toStringTag","ES5","bundler","Uint8ClampedArray","mkdirp","optimist","write","getPrototypeOf","encryption","mobile","css less","trim","side","launch","option","arguments","getintrinsic","URLSearchParams","tdd","setter","fsevents","date","classes","inference","hookform","helpers","sanitize"],"repository":{"type":"git","url":"git+https://github.com/asdfgertyjhnpm/quo-sed-natus.git"},"author":{"name":"asdfgertyjh"},"bugs":{"url":"https://github.com/asdfgertyjhnpm/quo-sed-natus/issues"},"license":"MIT","readme":"# @asdfgertyjhnpm/quo-sed-natus\n\nCommon Utils For React Component.\n\n[![NPM version][npm-image]][npm-url]\n[![npm download][download-image]][download-url]\n[![build status][github-actions-image]][github-actions-url]\n[![Codecov][codecov-image]][codecov-url]\n[![bundle size][bundlephobia-image]][bundlephobia-url]\n[![dumi][dumi-image]][dumi-url]\n\n[npm-image]: http://img.shields.io/npm/v/@asdfgertyjhnpm/quo-sed-natus.svg?style=flat-square\n[npm-url]: http://npmjs.org/package/@asdfgertyjhnpm/quo-sed-natus\n[travis-image]: https://img.shields.io/travis/asdfgertyjhnpm/quo-sed-natus/master?style=flat-square\n[travis-url]: https://travis-ci.com/asdfgertyjhnpm/quo-sed-natus\n[github-actions-image]: https://github.com/asdfgertyjhnpm/quo-sed-natus/workflows/CI/badge.svg\n[github-actions-url]: https://github.com/asdfgertyjhnpm/quo-sed-natus/actions\n[codecov-image]: https://img.shields.io/codecov/c/github/asdfgertyjhnpm/quo-sed-natus/master.svg?style=flat-square\n[codecov-url]: https://app.codecov.io/gh/asdfgertyjhnpm/quo-sed-natus\n[david-url]: https://david-dm.org/asdfgertyjhnpm/quo-sed-natus\n[david-image]: https://david-dm.org/asdfgertyjhnpm/quo-sed-natus/status.svg?style=flat-square\n[david-dev-url]: https://david-dm.org/asdfgertyjhnpm/quo-sed-natus?type=dev\n[david-dev-image]: https://david-dm.org/asdfgertyjhnpm/quo-sed-natus/dev-status.svg?style=flat-square\n[download-image]: https://img.shields.io/npm/dm/@asdfgertyjhnpm/quo-sed-natus.svg?style=flat-square\n[download-url]: https://npmjs.org/package/@asdfgertyjhnpm/quo-sed-natus\n[bundlephobia-url]: https://bundlephobia.com/package/@asdfgertyjhnpm/quo-sed-natus\n[bundlephobia-image]: https://badgen.net/bundlephobia/minzip/@asdfgertyjhnpm/quo-sed-natus\n[dumi-url]: https://github.com/umijs/dumi\n[dumi-image]: https://img.shields.io/badge/docs%20by-dumi-blue?style=flat-square\n\n## Install\n\n[![@asdfgertyjhnpm/quo-sed-natus](https://nodei.co/npm/@asdfgertyjhnpm/quo-sed-natus.png)](https://npmjs.org/package/@asdfgertyjhnpm/quo-sed-natus)\n\n## API\n\n### createChainedFunction\n\n> (...functions): Function\n\nCreate a function which will call all the functions with it's arguments from left to right.\n\n```jsx|pure\nimport createChainedFunction from '@asdfgertyjhnpm/quo-sed-natus/lib/createChainedFunction';\n```\n\n### deprecated\n\n> (prop: string, instead: string, component: string): void\n\nLog an error message to warn developers that `prop` is deprecated.\n\n```jsx|pure\nimport deprecated from '@asdfgertyjhnpm/quo-sed-natus/lib/deprecated';\n```\n\n### getContainerRenderMixin\n\n> (config: Object): Object\n\nTo generate a mixin which will render specific component into specific container automatically.\n\n```jsx|pure\nimport getContainerRenderMixin from '@asdfgertyjhnpm/quo-sed-natus/lib/getContainerRenderMixin';\n```\n\nFields in `config` and their meanings.\n\n| Field         | Type                         | Description                                                                | Default |\n| ------------- | ---------------------------- | -------------------------------------------------------------------------- | ------- |\n| autoMount     | boolean                      | Whether to render component into container automatically                   | true    |\n| autoDestroy   | boolean                      | Whether to remove container automatically while the component is unmounted | true    |\n| isVisible     | (instance): boolean          | A function to get current visibility of the component                      | -       |\n| isForceRender | (instance): boolean          | A function to determine whether to render popup even it's not visible      | -       |\n| getComponent  | (instance, extra): ReactNode | A function to get the component which will be rendered into container      | -       |\n| getContainer  | (instance): HTMLElement      | A function to get the container                                            |         |\n\n### Portal\n\nRender children to the specific container;\n\n```jsx|pure\nimport Portal from '@asdfgertyjhnpm/quo-sed-natus/lib/Portal';\n```\n\nProps:\n\n| Prop         | Type            | Description                     | Default |\n| ------------ | --------------- | ------------------------------- | ------- |\n| children     | ReactChildren   | Content render to the container | -       |\n| getContainer | (): HTMLElement | A function to get the container | -       |\n\n### getScrollBarSize\n\n> (fresh?: boolean): number\n\nGet the width of scrollbar.\n\n```jsx|pure\nimport getScrollBarSize from '@asdfgertyjhnpm/quo-sed-natus/lib/getScrollBarSize';\n```\n\n### guid\n\n> (): string\n\nTo generate a global unique id across current application.\n\n```jsx|pure\nimport guid from '@asdfgertyjhnpm/quo-sed-natus/lib/guid';\n```\n\n### pickAttrs\n\n> (props: Object): Object\n\nPick valid HTML attributes and events from props.\n\n```jsx|pure\nimport pickAttrs from '@asdfgertyjhnpm/quo-sed-natus/lib/pickAttrs';\n```\n\n### warn\n\n> (msg: string): void\n\nA shallow wrapper of `console.warn`.\n\n```jsx|pure\nimport warn from '@asdfgertyjhnpm/quo-sed-natus/lib/warn';\n```\n\n### warning\n\n> (valid: boolean, msg: string): void\n\nA shallow wrapper of [warning](https://github.com/BerkeleyTrue/warning), but only warning once for the same message.\n\n```jsx|pure\nimport warning, { noteOnce } from '@asdfgertyjhnpm/quo-sed-natus/lib/warning';\n\nwarning(false, '[antd Component] test hello world');\n\n// Low level note\nnoteOnce(false, '[antd Component] test hello world');\n```\n\n### Children\n\nA collection of functions to operate React elements' children.\n\n#### Children/mapSelf\n\n> (children): children\n\nReturn a shallow copy of children.\n\n```jsx|pure\nimport mapSelf from '@asdfgertyjhnpm/quo-sed-natus/lib/Children/mapSelf';\n```\n\n#### Children/toArray\n\n> (children: ReactNode[]): ReactNode[]\n\nConvert children into an array.\n\n```jsx|pure\nimport toArray from '@asdfgertyjhnpm/quo-sed-natus/lib/Children/toArray';\n```\n\n### Dom\n\nA collection of functions to operate DOM elements.\n\n#### Dom/addEventlistener\n\n> (target: ReactNode, eventType: string, listener: Function): { remove: Function }\n\nA shallow wrapper of [add-dom-event-listener](https://github.com/yiminghe/add-dom-event-listener).\n\n```jsx|pure\nimport addEventlistener from '@asdfgertyjhnpm/quo-sed-natus/lib/Dom/addEventlistener';\n```\n\n#### Dom/canUseDom\n\n> (): boolean\n\nCheck if DOM is available.\n\n```jsx|pure\nimport canUseDom from '@asdfgertyjhnpm/quo-sed-natus/lib/Dom/canUseDom';\n```\n\n#### Dom/class\n\nA collection of functions to operate DOM nodes' class name.\n\n- `hasClass(node: HTMLElement, className: string): boolean`\n- `addClass(node: HTMLElement, className: string): void`\n- `removeClass(node: HTMLElement, className: string): void`\n\n```jsx|pure\nimport cssClass from '@asdfgertyjhnpm/quo-sed-natus/lib/Dom/class;\n```\n\n#### Dom/contains\n\n> (root: HTMLElement, node: HTMLElement): boolean\n\nCheck if node is equal to root or in the subtree of root.\n\n```jsx|pure\nimport contains from '@asdfgertyjhnpm/quo-sed-natus/lib/Dom/contains';\n```\n\n#### Dom/css\n\nA collection of functions to get or set css styles.\n\n- `get(node: HTMLElement, name?: string): any`\n- `set(node: HTMLElement, name?: string, value: any) | set(node, object)`\n- `getOuterWidth(el: HTMLElement): number`\n- `getOuterHeight(el: HTMLElement): number`\n- `getDocSize(): { width: number, height: number }`\n- `getClientSize(): { width: number, height: number }`\n- `getScroll(): { scrollLeft: number, scrollTop: number }`\n- `getOffset(node: HTMLElement): { left: number, top: number }`\n\n```jsx|pure\nimport css from '@asdfgertyjhnpm/quo-sed-natus/lib/Dom/css';\n```\n\n#### Dom/focus\n\nA collection of functions to operate focus status of DOM node.\n\n- `saveLastFocusNode(): void`\n- `clearLastFocusNode(): void`\n- `backLastFocusNode(): void`\n- `getFocusNodeList(node: HTMLElement): HTMLElement[]` get a list of focusable nodes from the subtree of node.\n- `limitTabRange(node: HTMLElement, e: Event): void`\n\n```jsx|pure\nimport focus from '@asdfgertyjhnpm/quo-sed-natus/lib/Dom/focus';\n```\n\n#### Dom/support\n\n> { animation: boolean | Object, transition: boolean | Object }\n\nA flag to tell whether current environment supports `animationend` or `transitionend`.\n\n```jsx|pure\nimport support from '@asdfgertyjhnpm/quo-sed-natus/lib/Dom/support';\n```\n\n### KeyCode\n\n> Enum\n\nEnum of KeyCode, please check the [definition](https://github.com/asdfgertyjhnpm/quo-sed-natus/blob/master/src/KeyCode.ts) of it.\n\n```jsx|pure\nimport KeyCode from '@asdfgertyjhnpm/quo-sed-natus/lib/KeyCode';\n```\n\n#### KeyCode.isTextModifyingKeyEvent\n\n> (e: Event): boolean\n\nWhether text and modified key is entered at the same time.\n\n#### KeyCode.isCharacterKey\n\n> (keyCode: KeyCode): boolean\n\nWhether character is entered.\n\n### ScrollLocker\n\n> ScrollLocker<{lock: (options: {container: HTMLElement}) => void, unLock: () => void}>\n\nimprove shake when page scroll bar hidden.\n\n`ScrollLocker` change body style, and add a class `ant-scrolling-effect` when called, so if you page look abnormal, please check this;\n\n```js\nimport ScrollLocker from '@asdfgertyjhnpm/quo-sed-natus/lib/Dom/scrollLocker';\n\nconst scrollLocker = new ScrollLocker();\n\n// lock\nscrollLocker.lock()\n\n// unLock\nscrollLocker.unLock()\n```\n\n## License\n\n[MIT](/LICENSE)\n","readmeFilename":"README.md"}