{"_id":"@formio/text-mask-addons","_rev":"12-c178d1039f6be2957769199186263958","name":"@formio/text-mask-addons","dist-tags":{"latest":"3.8.0-formio.4"},"versions":{"3.8.0-formio.2":{"name":"@formio/text-mask-addons","version":"3.8.0-formio.2","keywords":["text mask","input mask","string mask","input formatting","text formatting","string formatting"],"author":{"name":"M.K. Safi","email":"msafi@msafi.com"},"license":"Unlicense","_id":"@formio/text-mask-addons@3.8.0-formio.2","maintainers":[{"name":"lane-formio","email":"lane@form.io"},{"name":"tanyagashtold","email":"tanya@form.io"},{"name":"edwinanciani","email":"edwinanciani@gmail.com"},{"name":"travist","email":"travis@form.io"}],"homepage":"https://github.com/text-mask/text-mask/tree/master/addons/#readme","bugs":{"url":"https://github.com/text-mask/text-mask/issues"},"dist":{"shasum":"b9489e68911c70a31997b97dd846d8a7cca6abdb","tarball":"https://registry.npmjs.org/@formio/text-mask-addons/-/text-mask-addons-3.8.0-formio.2.tgz","fileCount":23,"integrity":"sha512-H4Sm+1Sx59jbrlKxtKbzethhp5OIcP8Oi4JBpsvH/SB8P/KCRmtjKbN5ACqURnXmYtBHLJC6Yr9KZibOVRGxpA==","signatures":[{"sig":"MEUCIEP8YUE1yo+uYYN/Joa2kLbM14tVEECfoBNJlftylNcdAiEAlad1ifjb8xCTjRbDY7AZ26g5Cntwxecy7FOglElWrGM=","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":116594,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjINoQACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo0ExAAmAlRAjMBupPCZEljDiEMLeJSGQLsnfOYfsxdBR6L1VZpNxPK\r\nFGd6kL4Ztd2xk9Ig/cshI0Q+EQ+R3RMeLF22bPUH/HU8c8F74nFz6yEIuN6S\r\nHJDm/pxx2JFm8mLnBmFjgmeWQC322Vmbkwp6AIQCLpNhYWQiMLZSCi5Q4hpu\r\ndbEHpuY6zCAlMudfEv74R2S32E3+x96Ur4vMkV6J6C5+kZ0q5LhZ3O018LpB\r\npmhdsBIDtt1fW0pWKvCXA5SmX++4TlDdqsL2EJf2NdaMLxYxpRqo0hu9xNJx\r\nzg6Mj56nyPiUY79YIiEHRjfBlPkaw9lCAkYJgZgdRcBOi3ecsJ6Klenu2UKM\r\nLyCfAbCoztO4AshZCntxSDNiywp306y9qqaDnnR0xWCQr8PSTY9mt7YLkrKd\r\nXvUADLLWPpLEZ910LMUmo4tmhaBk4/szQeigW7LQiGUYmO777lejrEOQXYe4\r\niVpeC0I1M8U8qPbqiX8eDJK7y6MyJdNfuIZVSHDPxB7ThVfrle7OywmNEmnE\r\nm6nK49PHLqmCBAzFC1TwgJPDuxaUCNqK/Gimd9PdhDSRcZBsFaXD6HHEgXZY\r\nq0Y4GsxS8Fs45OCeXeeqRDwFlrBV1ChI5EFNeP8ody9Au9r3lwvtI0qYD5GJ\r\n/5HcOq4wprD3mORppGsLlmcM74sVltMYtt4=\r\n=vbr3\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/textMaskAddons.js","_npmUser":{"name":"travist","email":"travis@form.io"},"repository":{"url":"git+https://github.com/text-mask/text-mask.git","type":"git"},"_npmVersion":"6.14.15","description":"Addons for Text Mask https://github.com/text-mask/text-mask","directories":{},"_nodeVersion":"14.18.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/text-mask-addons_3.8.0-formio.2_1663097360277_0.0907394237461916","host":"s3://npm-registry-packages"}},"3.8.0-formio.3":{"name":"@formio/text-mask-addons","version":"3.8.0-formio.3","keywords":["text mask","input mask","string mask","input formatting","text formatting","string formatting"],"author":{"name":"M.K. Safi","email":"msafi@msafi.com"},"license":"Unlicense","_id":"@formio/text-mask-addons@3.8.0-formio.3","maintainers":[{"name":"brendanbond","email":"brendanbond@gmail.com"},{"name":"alexeynikipelau","email":"alexey.nikipelau@form.io"},{"name":"ryanformio","email":"ryan@form.io"},{"name":"lane-formio","email":"lane@form.io"},{"name":"tanyagashtold","email":"tanya@form.io"},{"name":"edwinanciani","email":"edwinanciani@gmail.com"},{"name":"travist","email":"travis@form.io"}],"homepage":"https://github.com/text-mask/text-mask/tree/master/addons/#readme","bugs":{"url":"https://github.com/text-mask/text-mask/issues"},"dist":{"shasum":"9da71371a2cb6f781e5e9f90246f25b3d053f75d","tarball":"https://registry.npmjs.org/@formio/text-mask-addons/-/text-mask-addons-3.8.0-formio.3.tgz","fileCount":23,"integrity":"sha512-izNhggJTaCEJNOhtdCkouLxBP3byl+ObsHTdp9RpKwNz0k/ZIy/0xuelk1NY4vAjKojnJPiAjtxn+rrcZnEkpw==","signatures":[{"sig":"MEQCIHLhKKb7lFZImwbi4s8TSKhPK05G5Zo5eRE/8kmfjQeZAiA0kGdcXk3624fEyY6IGxmD7rA4wndDbt/2lQCQ16M/sA==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122525},"main":"dist/textMaskAddons.js","types":"./dist/textMaskAddons.d.ts","gitHead":"9d0d7cd78ba739677814dc9759d49b69bf99ccbb","_npmUser":{"name":"lane-formio","email":"lane@form.io"},"repository":{"url":"git+https://github.com/text-mask/text-mask.git","type":"git"},"_npmVersion":"10.2.4","description":"Addons for Text Mask https://github.com/text-mask/text-mask","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/text-mask-addons_3.8.0-formio.3_1730149420762_0.7241280217076373","host":"s3://npm-registry-packages"}},"3.8.0-formio.4":{"name":"@formio/text-mask-addons","version":"3.8.0-formio.4","keywords":["text mask","input mask","string mask","input formatting","text formatting","string formatting"],"author":{"name":"M.K. Safi","email":"msafi@msafi.com"},"license":"Unlicense","_id":"@formio/text-mask-addons@3.8.0-formio.4","maintainers":[{"name":"brendanbond","email":"brendanbond@gmail.com"},{"name":"alexeynikipelau","email":"alexey.nikipelau@form.io"},{"name":"ryanformio","email":"ryan@form.io"},{"name":"lane-formio","email":"lane@form.io"},{"name":"tanyagashtold","email":"tanya@form.io"},{"name":"edwinanciani","email":"edwinanciani@gmail.com"},{"name":"travist","email":"travis@form.io"}],"homepage":"https://github.com/text-mask/text-mask/tree/master/addons/#readme","bugs":{"url":"https://github.com/text-mask/text-mask/issues"},"dist":{"shasum":"f3ce4bf978c6c5e8f671641d96f6fd116f7c92a3","tarball":"https://registry.npmjs.org/@formio/text-mask-addons/-/text-mask-addons-3.8.0-formio.4.tgz","fileCount":23,"integrity":"sha512-vhkeIyuL+1rtC9S4IW8O3JCwroPtvJrkrcMO4wyELNqMIgQRKbiyBAitZfUP4tY04xdB5lxAinbzdwb+NMdX6w==","signatures":[{"sig":"MEYCIQD+SzBxxFxcZOQOuLgWt5d3oV9mHkwNeRWJDJjaytvwYQIhAPX1G8VXHFJPGDxXAlF9+GHFyhTjKetPQwthSLjoh/co","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":122521},"main":"dist/textMaskAddons.js","types":"./dist/textMaskAddons.d.ts","gitHead":"886f40b0643b4dd19c8792612a3ac9bfc6499d21","_npmUser":{"name":"lane-formio","email":"lane@form.io"},"repository":{"url":"git+https://github.com/text-mask/text-mask.git","type":"git"},"_npmVersion":"10.2.4","description":"Addons for Text Mask https://github.com/text-mask/text-mask","directories":{},"_nodeVersion":"20.11.1","_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/text-mask-addons_3.8.0-formio.4_1731707334526_0.6086810118617032","host":"s3://npm-registry-packages"}}},"time":{"created":"2022-09-13T19:29:20.228Z","modified":"2025-05-23T15:43:50.353Z","3.8.0-formio.2":"2022-09-13T19:29:20.449Z","3.8.0-formio.3":"2024-10-28T21:03:40.961Z","3.8.0-formio.4":"2024-11-15T21:48:54.712Z"},"bugs":{"url":"https://github.com/text-mask/text-mask/issues"},"author":{"name":"M.K. Safi","email":"msafi@msafi.com"},"license":"Unlicense","homepage":"https://github.com/text-mask/text-mask/tree/master/addons/#readme","keywords":["text mask","input mask","string mask","input formatting","text formatting","string formatting"],"repository":{"url":"git+https://github.com/text-mask/text-mask.git","type":"git"},"description":"Addons for Text Mask https://github.com/text-mask/text-mask","maintainers":[{"email":"edwinanciani@gmail.com","name":"edwinanciani"},{"email":"travis@form.io","name":"travist"},{"email":"lane@form.io","name":"lane-formio"},{"email":"tanya@form.io","name":"tanyagashtold"},{"email":"alexey.nikipelau@form.io","name":"alexeynikipelau"},{"email":"brendanbond@gmail.com","name":"brendanbond"},{"email":"johnt@form.io","name":"johnformio"}],"readme":"# Text Mask Addons\n\nThese addons are ready-to-use pipes and masks that can be used with Text Mask.\n\n## Installation\n\n```bash\nnpm i text-mask-addons --save\n```\n\n## Masks\n\nThese can be passed as a\n[`mask`](https://github.com/text-mask/text-mask/blob/master/componentDocumentation.md#mask)\nto Text Mask.\n\n### `createNumberMask`\n\n`createNumberMask` returns a `numberMask` function that will format user input as currency.\n`createNumberMask` accepts an object with the following keys:\n\n1. `prefix` (string): what to display before the amount. Defaults to `'$'`.\n1. `suffix` (string): what to display after the amount. Defaults to empty string.\n1. `includeThousandsSeparator` (boolean): whether or not to separate thousands. Defaults to to `true`.\n1. `thousandsSeparatorSymbol` (string): character with which to separate thousands. Default to `','`.\n1. `allowDecimal` (boolean): whether or not to allow the user to enter a fraction with the amount. Default to `false`.\n1. `decimalSymbol` (string): character that will act as a decimal point. Defaults to `'.'`\n1. `decimalLimit` (number): how many digits to allow after the decimal. Defaults to `2`\n1. `integerLimit` (number): limit the length of the integer number. Defaults to `null` for unlimited\n1. `requireDecimal` (boolean): whether or not to always include a decimal point and placeholder for decimal digits\nafter the integer. Defaults to `false`.\n1. `allowNegative` (boolean): whether or not to allow negative numbers. Defaults to `false`\n1. `allowLeadingZeroes` (boolean): whether or not to allow leading zeroes. Defaults to `false`\n\n#### Usage\n\n```js\nimport createNumberMask from 'text-mask-addons/dist/createNumberMask'\n\n// First, you need to create the `numberMask` with your desired configurations\nconst numberMask = createNumberMask({\n  prefix: '',\n  suffix: ' $' // This will put the dollar sign at the end, with a space.\n})\n\n// ...then pass `numberMask` to the Text Mask component as the mask\n```\n\n### `emailMask`\n\n`emailMask` formats user input as an email address.\n\n#### Usage\n\n```js\nimport emailMask from 'text-mask-addons/dist/emailMask'\n\n// ...then pass `emailMask` to the Text Mask component as the mask\n```\n\n*Technical side note*: even though `emailMask` is passed as a `mask`, it is actually made of both a `mask` and a `pipe` bundled \ntogether for convenience. The Text Mask component knows how to unwrap and separate the `pipe` and `mask` functions to use them. \n\n## Pipes\n\nThese functions here can be passed as a\n[`pipe`](https://github.com/text-mask/text-mask/blob/master/componentDocumentation.md#pipe)\nto Text Mask.\n\n### `createAutoCorrectedDatePipe`\n\nThe `createAutoCorrectedDatePipe` returns a `autoCorrectedDatePipe`, which can help the user in entering a date.\nThe `createAutoCorrectedDatePipe` accepts a string specifying date format and an object with the following keys:\n\n1. `minYear` (number): the minimum year allowed in the date field `mask`.\n1. `maxYear` (number): the maximum year allowed in the date field `mask`.\n\n\nFor example, if the user enters a value\nlarger than `1` in the 1st slot of month, it appends `0` to it. That is `4` => `04`. It does a similar thing for the\nday slots.\n\nIt also blocks the user from entering invalid days or months such as `33/44`.\n\nFor `createAutoCorrectedDatePipe` to work properly, the Text Mask component needs to be\nconfigured with\n[`keepCharPositions`](https://github.com/text-mask/text-mask/blob/master/componentDocumentation.md#keepcharpositions)\nset to `true`.\n\n#### Usage\n\n```js\nimport createAutoCorrectedDatePipe from 'text-mask-addons/dist/createAutoCorrectedDatePipe'\n\nconst autoCorrectedDatePipe = createAutoCorrectedDatePipe('mm/dd/yyyy HH:MM')\n// As you can see in the line above, you can pass a string argument to `createAutoCorrectedDatePipe` \n// to give it the order of day, month, year, hour and minute in your `mask`.\n\n// ...now you can pass `autoCorrectedDatePipe` to the Text Mask component as the `pipe`\n```\n","readmeFilename":"README.md"}