@elliemae/ds-props-helpers 2.2.0-next.6 → 2.3.0-alpha.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.
Files changed (59) hide show
  1. package/cjs/defaultProps/index.js +28 -9
  2. package/cjs/defaultProps/index.js.map +7 -0
  3. package/cjs/defaultProps/useMemoMergePropsWithDefault.js +44 -44
  4. package/cjs/defaultProps/useMemoMergePropsWithDefault.js.map +7 -0
  5. package/cjs/getProps/index.js +37 -20
  6. package/cjs/getProps/index.js.map +7 -0
  7. package/cjs/index.js +30 -24
  8. package/cjs/index.js.map +7 -0
  9. package/cjs/tests/test.schema.js +67 -0
  10. package/cjs/tests/test.schema.js.map +7 -0
  11. package/cjs/validation/errorTemplates.js +44 -12
  12. package/cjs/validation/errorTemplates.js.map +7 -0
  13. package/cjs/validation/index.js +30 -15
  14. package/cjs/validation/index.js.map +7 -0
  15. package/cjs/validation/typescriptGuards.js +60 -31
  16. package/cjs/validation/typescriptGuards.js.map +7 -0
  17. package/cjs/validation/typescriptParsers.js +65 -34
  18. package/cjs/validation/typescriptParsers.js.map +7 -0
  19. package/cjs/validation/typescriptValidator.js +99 -135
  20. package/cjs/validation/typescriptValidator.js.map +7 -0
  21. package/cjs/validation/validator.js +43 -24
  22. package/cjs/validation/validator.js.map +7 -0
  23. package/esm/defaultProps/index.js +3 -1
  24. package/esm/defaultProps/index.js.map +7 -0
  25. package/esm/defaultProps/useMemoMergePropsWithDefault.js +14 -34
  26. package/esm/defaultProps/useMemoMergePropsWithDefault.js.map +7 -0
  27. package/esm/getProps/index.js +8 -15
  28. package/esm/getProps/index.js.map +7 -0
  29. package/esm/index.js +5 -7
  30. package/esm/index.js.map +7 -0
  31. package/esm/tests/test.schema.js +38 -0
  32. package/esm/tests/test.schema.js.map +7 -0
  33. package/esm/validation/errorTemplates.js +15 -7
  34. package/esm/validation/errorTemplates.js.map +7 -0
  35. package/esm/validation/index.js +5 -3
  36. package/esm/validation/index.js.map +7 -0
  37. package/esm/validation/typescriptGuards.js +31 -18
  38. package/esm/validation/typescriptGuards.js.map +7 -0
  39. package/esm/validation/typescriptParsers.js +36 -30
  40. package/esm/validation/typescriptParsers.js.map +7 -0
  41. package/esm/validation/typescriptValidator.js +57 -106
  42. package/esm/validation/typescriptValidator.js.map +7 -0
  43. package/esm/validation/validator.js +12 -18
  44. package/esm/validation/validator.js.map +7 -0
  45. package/package.json +1 -17
  46. package/types/index.d.ts +0 -1
  47. package/types/validation/typescriptValidator.d.ts +2 -2
  48. package/cjs/globalProps/constants.js +0 -15
  49. package/cjs/globalProps/globalAttributesPropTypes.js +0 -372
  50. package/cjs/globalProps/index.js +0 -11
  51. package/cjs/globalProps/useGetGlobalAttributes.js +0 -36
  52. package/esm/globalProps/constants.js +0 -11
  53. package/esm/globalProps/globalAttributesPropTypes.js +0 -368
  54. package/esm/globalProps/index.js +0 -2
  55. package/esm/globalProps/useGetGlobalAttributes.js +0 -32
  56. package/types/globalProps/constants.d.ts +0 -3
  57. package/types/globalProps/globalAttributesPropTypes.d.ts +0 -2169
  58. package/types/globalProps/index.d.ts +0 -2
  59. package/types/globalProps/useGetGlobalAttributes.d.ts +0 -5
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/validation/typescriptValidator.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable max-lines */\n/* eslint-disable max-params */\nimport { describe } from 'react-desc';\nimport React, { PropsWithChildren, useMemo, useState } from 'react';\nimport { throwRequiredError, throwTypeError } from './errorTemplates';\nimport {\n isArray,\n isFunction,\n isJSXorNode,\n isObject,\n isPrimitiveType,\n isSomethingWithParenthesis,\n isString,\n isUnion,\n isUndefined,\n isNull,\n} from './typescriptGuards';\nimport { typescriptObjectParser } from './typescriptParsers';\n\ninterface TypescriptSchema {\n description: string;\n name: string;\n properties: { name: string; description: string; defaultValue?: unknown; format: string; required?: boolean }[];\n}\n\ntype ValidatorFn = (\n schemaName: string,\n key: string,\n value: unknown,\n format: string,\n validationsMemo: Record<symbol, string>,\n nextValidationsMemo: Record<symbol, string>,\n) => void;\n\n// =============================================================================\n// Atom Validators\n// =============================================================================\n\n// This functions will validate something from the data\n// and optionally recursively apply `validateValueWithFormat`\n// in smaller parts\n\nconst validateUndefined: ValidatorFn = (schemaName, key, value, format) => {\n if (value !== undefined || value === 'undefined') {\n throwTypeError(schemaName, key, value, format);\n }\n};\nconst validateNull: ValidatorFn = (schemaName, key, value, format) => {\n if (value !== null || value === 'null') {\n throwTypeError(schemaName, key, value, format);\n }\n};\nconst validatePrimitiveType: ValidatorFn = (schemaName, key, value, format) => {\n if (typeof value !== format) {\n throwTypeError(schemaName, key, value, format);\n }\n};\n\nconst validateString: ValidatorFn = (schemaName, key, value, format) => {\n if (value !== format.slice(1, -1)) {\n throwTypeError(schemaName, key, value, format);\n }\n};\n\nconst validateArray: ValidatorFn = (schemaName, key, value, format, validationsMemo, nextValidationsMemo) => {\n // Check that we have an array\n if (!Array.isArray(value)) {\n throwTypeError(schemaName, key, value, format);\n }\n\n // Check that each element inside satisfies the format\n (value as unknown[]).forEach((val, index) => {\n // this is a recursive func, we need to invoke it before it's defined.\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n validateValueWithFormat(\n schemaName,\n `${key}[${index}]`,\n val,\n format.slice(0, -2),\n validationsMemo,\n nextValidationsMemo,\n );\n });\n};\nfunction isObjectType(value: unknown | Record<string, unknown>): value is Record<string, unknown> {\n return !(typeof value !== 'object' || Array.isArray(value));\n}\nconst validateObject: ValidatorFn = (schemaName, key, value, format, validationsMemo, nextValidationsMemo) => {\n const valuesIsObject = isObjectType(value);\n // Check that we have an object\n if (!valuesIsObject) {\n throwTypeError(schemaName, key, value, format);\n return;\n }\n\n if (format === 'object') return;\n\n const keyValuePairs = typescriptObjectParser(format);\n // Now we have the key - value pairs\n // Each key could either be required or not\n // Just recursively check the object\n\n keyValuePairs.forEach(([objectKey, objectValue]) => {\n const trueKey = objectKey.slice(-1) === '?' ? objectKey.slice(0, -1) : objectKey;\n\n if (trueKey === objectKey && !(trueKey in value)) {\n throwRequiredError(schemaName, key);\n }\n\n if (trueKey in value) {\n // this is a recursive func, we need to invoke it before it's defined.\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n validateValueWithFormat(\n schemaName,\n `${key}[${trueKey}]`,\n value[trueKey],\n objectValue,\n validationsMemo,\n nextValidationsMemo,\n );\n }\n });\n};\n\nconst validateUnion: ValidatorFn = (schemaName, key, value, format, validationsMemo, nextValidationsMemo) => {\n const possibilities = format.split(/\\s?\\|\\s?/);\n\n const errors = [];\n\n possibilities.forEach((possibility) => {\n try {\n // this is a recursive func, we need to invoke it before it's defined.\n // eslint-disable-next-line @typescript-eslint/no-use-before-define\n validateValueWithFormat(schemaName, key, value, possibility, validationsMemo, nextValidationsMemo);\n } catch (e) {\n errors.push(e);\n }\n });\n\n if (errors.length === possibilities.length) {\n throwTypeError(schemaName, key, value, format);\n }\n};\n\nconst validateFunction: ValidatorFn = (schemaName, key, value, format) => {\n // Check that we have a function\n if (typeof value !== 'function') {\n throwTypeError(schemaName, key, value, format);\n }\n};\n\nfunction isJSXElement(value: unknown | JSX.Element): value is JSX.Element {\n return value === null || (typeof value === 'object' && value !== null && '$$typeof' in value);\n}\nconst validateJSXorNode: ValidatorFn = (schemaName, key, value, format) => {\n const valueIsJSX = isJSXElement(value);\n if (format === 'JSX.Element' && !valueIsJSX) {\n throwTypeError(schemaName, key, value, format);\n }\n};\n\n// =============================================================================\n// Schema validator\n// =============================================================================\n\nconst validateValueWithFormat: ValidatorFn = (schemaName, key, value, format, validationsMemo, nextValidationsMemo) => {\n nextValidationsMemo[value as symbol] = format;\n\n if ((value as symbol) in validationsMemo) {\n // We already validated this value on this format\n return;\n }\n\n if (isUndefined(format)) {\n validateUndefined(schemaName, key, value, format, validationsMemo, nextValidationsMemo);\n } else if (isNull(format)) {\n validateNull(schemaName, key, value, format, validationsMemo, nextValidationsMemo);\n } else if (isPrimitiveType(format)) {\n validatePrimitiveType(schemaName, key, value, format, validationsMemo, nextValidationsMemo);\n } else if (isUnion(format)) {\n validateUnion(schemaName, key, value, format, validationsMemo, nextValidationsMemo);\n } else if (isString(format)) {\n validateString(schemaName, key, value, format, validationsMemo, nextValidationsMemo);\n } else if (isArray(format)) {\n validateArray(schemaName, key, value, format, validationsMemo, nextValidationsMemo);\n } else if (isObject(format)) {\n validateObject(schemaName, key, value, format, validationsMemo, nextValidationsMemo);\n } else if (isFunction(format)) {\n validateFunction(schemaName, key, value, format, validationsMemo, nextValidationsMemo);\n } else if (isJSXorNode(format)) {\n validateJSXorNode(schemaName, key, value, format, validationsMemo, nextValidationsMemo);\n } else if (isSomethingWithParenthesis(format)) {\n validateValueWithFormat(schemaName, key, value, format.slice(1, -1), validationsMemo, nextValidationsMemo);\n }\n};\n\nexport const validateTypescriptPropTypesImplementation = (\n props: PropsWithChildren<Record<string, unknown>>,\n schema: TypescriptSchema,\n validationsMemo: Record<string, string> = {},\n nextValidationsMemo: Record<string, string> = {},\n): void => {\n const { properties, name: schemaName } = schema;\n\n properties.forEach((property) => {\n const { name, format, required } = property;\n\n if (required && !(name in props)) {\n throwRequiredError(schema.name, name);\n }\n\n if (name in props && (props[name] !== undefined || required)) {\n validateValueWithFormat(schemaName, name, props[name], format, validationsMemo, nextValidationsMemo);\n }\n });\n};\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const useValidateTypescriptPropTypes = <T = Record<string, any>>(\n props: PropsWithChildren<T>,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n propTypes: any,\n): void => {\n const [validationsMemo, setValidationsMemo] = useState({});\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-assignment\n const ComponentWithSchema = useMemo(() => {\n const Component = () => {};\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-return, @typescript-eslint/no-unsafe-call\n return describe(Component);\n }, []);\n\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-assignment\n ComponentWithSchema.propTypes = propTypes;\n\n useMemo(() => {\n const nextValidationsMemo = {};\n\n validateTypescriptPropTypesImplementation(\n props,\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access, @typescript-eslint/no-unsafe-call\n ComponentWithSchema.toTypescript(),\n validationsMemo,\n nextValidationsMemo,\n );\n\n setValidationsMemo(nextValidationsMemo);\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [props]);\n};\n"],
5
+ "mappings": "AAAA;ACGA;AACA;AACA;AACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAYA;AAyBA,MAAM,oBAAiC,CAAC,YAAY,KAAK,OAAO,WAAW;AACzE,MAAI,UAAU,UAAa,UAAU,aAAa;AAChD,mBAAe,YAAY,KAAK,OAAO;AAAA;AAAA;AAG3C,MAAM,eAA4B,CAAC,YAAY,KAAK,OAAO,WAAW;AACpE,MAAI,UAAU,QAAQ,UAAU,QAAQ;AACtC,mBAAe,YAAY,KAAK,OAAO;AAAA;AAAA;AAG3C,MAAM,wBAAqC,CAAC,YAAY,KAAK,OAAO,WAAW;AAC7E,MAAI,OAAO,UAAU,QAAQ;AAC3B,mBAAe,YAAY,KAAK,OAAO;AAAA;AAAA;AAI3C,MAAM,iBAA8B,CAAC,YAAY,KAAK,OAAO,WAAW;AACtE,MAAI,UAAU,OAAO,MAAM,GAAG,KAAK;AACjC,mBAAe,YAAY,KAAK,OAAO;AAAA;AAAA;AAI3C,MAAM,gBAA6B,CAAC,YAAY,KAAK,OAAO,QAAQ,iBAAiB,wBAAwB;AAE3G,MAAI,CAAC,MAAM,QAAQ,QAAQ;AACzB,mBAAe,YAAY,KAAK,OAAO;AAAA;AAIzC,EAAC,MAAoB,QAAQ,CAAC,KAAK,UAAU;AAG3C,4BACE,YACA,GAAG,OAAO,UACV,KACA,OAAO,MAAM,GAAG,KAChB,iBACA;AAAA;AAAA;AAIN,sBAAsB,OAA4E;AAChG,SAAO,CAAE,QAAO,UAAU,YAAY,MAAM,QAAQ;AAAA;AAEtD,MAAM,iBAA8B,CAAC,YAAY,KAAK,OAAO,QAAQ,iBAAiB,wBAAwB;AAC5G,QAAM,iBAAiB,aAAa;AAEpC,MAAI,CAAC,gBAAgB;AACnB,mBAAe,YAAY,KAAK,OAAO;AACvC;AAAA;AAGF,MAAI,WAAW;AAAU;AAEzB,QAAM,gBAAgB,uBAAuB;AAK7C,gBAAc,QAAQ,CAAC,CAAC,WAAW,iBAAiB;AAClD,UAAM,UAAU,UAAU,MAAM,QAAQ,MAAM,UAAU,MAAM,GAAG,MAAM;AAEvE,QAAI,YAAY,aAAa,CAAE,YAAW,QAAQ;AAChD,yBAAmB,YAAY;AAAA;AAGjC,QAAI,WAAW,OAAO;AAGpB,8BACE,YACA,GAAG,OAAO,YACV,MAAM,UACN,aACA,iBACA;AAAA;AAAA;AAAA;AAMR,MAAM,gBAA6B,CAAC,YAAY,KAAK,OAAO,QAAQ,iBAAiB,wBAAwB;AAC3G,QAAM,gBAAgB,OAAO,MAAM;AAEnC,QAAM,SAAS;AAEf,gBAAc,QAAQ,CAAC,gBAAgB;AACrC,QAAI;AAGF,8BAAwB,YAAY,KAAK,OAAO,aAAa,iBAAiB;AAAA,aACvE,GAAP;AACA,aAAO,KAAK;AAAA;AAAA;AAIhB,MAAI,OAAO,WAAW,cAAc,QAAQ;AAC1C,mBAAe,YAAY,KAAK,OAAO;AAAA;AAAA;AAI3C,MAAM,mBAAgC,CAAC,YAAY,KAAK,OAAO,WAAW;AAExE,MAAI,OAAO,UAAU,YAAY;AAC/B,mBAAe,YAAY,KAAK,OAAO;AAAA;AAAA;AAI3C,sBAAsB,OAAoD;AACxE,SAAO,UAAU,QAAS,OAAO,UAAU,YAAY,UAAU,QAAQ,cAAc;AAAA;AAEzF,MAAM,oBAAiC,CAAC,YAAY,KAAK,OAAO,WAAW;AACzE,QAAM,aAAa,aAAa;AAChC,MAAI,WAAW,iBAAiB,CAAC,YAAY;AAC3C,mBAAe,YAAY,KAAK,OAAO;AAAA;AAAA;AAQ3C,MAAM,0BAAuC,CAAC,YAAY,KAAK,OAAO,QAAQ,iBAAiB,wBAAwB;AACrH,sBAAoB,SAAmB;AAEvC,MAAK,SAAoB,iBAAiB;AAExC;AAAA;AAGF,MAAI,YAAY,SAAS;AACvB,sBAAkB,YAAY,KAAK,OAAO,QAAQ,iBAAiB;AAAA,aAC1D,OAAO,SAAS;AACzB,iBAAa,YAAY,KAAK,OAAO,QAAQ,iBAAiB;AAAA,aACrD,gBAAgB,SAAS;AAClC,0BAAsB,YAAY,KAAK,OAAO,QAAQ,iBAAiB;AAAA,aAC9D,QAAQ,SAAS;AAC1B,kBAAc,YAAY,KAAK,OAAO,QAAQ,iBAAiB;AAAA,aACtD,SAAS,SAAS;AAC3B,mBAAe,YAAY,KAAK,OAAO,QAAQ,iBAAiB;AAAA,aACvD,QAAQ,SAAS;AAC1B,kBAAc,YAAY,KAAK,OAAO,QAAQ,iBAAiB;AAAA,aACtD,SAAS,SAAS;AAC3B,mBAAe,YAAY,KAAK,OAAO,QAAQ,iBAAiB;AAAA,aACvD,WAAW,SAAS;AAC7B,qBAAiB,YAAY,KAAK,OAAO,QAAQ,iBAAiB;AAAA,aACzD,YAAY,SAAS;AAC9B,sBAAkB,YAAY,KAAK,OAAO,QAAQ,iBAAiB;AAAA,aAC1D,2BAA2B,SAAS;AAC7C,4BAAwB,YAAY,KAAK,OAAO,OAAO,MAAM,GAAG,KAAK,iBAAiB;AAAA;AAAA;AAInF,MAAM,4CAA4C,CACvD,OACA,QACA,kBAA0C,IAC1C,sBAA8C,OACrC;AACT,QAAM,EAAE,YAAY,MAAM,eAAe;AAEzC,aAAW,QAAQ,CAAC,aAAa;AAC/B,UAAM,EAAE,MAAM,QAAQ,aAAa;AAEnC,QAAI,YAAY,CAAE,SAAQ,QAAQ;AAChC,yBAAmB,OAAO,MAAM;AAAA;AAGlC,QAAI,QAAQ,SAAU,OAAM,UAAU,UAAa,WAAW;AAC5D,8BAAwB,YAAY,MAAM,MAAM,OAAO,QAAQ,iBAAiB;AAAA;AAAA;AAAA;AAM/E,MAAM,iCAAiC,CAC5C,OAEA,cACS;AACT,QAAM,CAAC,iBAAiB,sBAAsB,SAAS;AAGvD,QAAM,sBAAsB,QAAQ,MAAM;AACxC,UAAM,YAAY,MAAM;AAAA;AAGxB,WAAO,SAAS;AAAA,KACf;AAGH,sBAAoB,YAAY;AAEhC,UAAQ,MAAM;AACZ,UAAM,sBAAsB;AAE5B,8CACE,OAEA,oBAAoB,gBACpB,iBACA;AAGF,uBAAmB;AAAA,KAElB,CAAC;AAAA;",
6
+ "names": []
7
+ }
@@ -1,32 +1,26 @@
1
- import 'core-js/modules/esnext.async-iterator.for-each.js';
2
- import 'core-js/modules/esnext.iterator.constructor.js';
3
- import 'core-js/modules/esnext.iterator.for-each.js';
4
- import { throwRequiredError, throwTypeError } from './errorTemplates.js';
5
-
1
+ import * as React from "react";
2
+ import { throwRequiredError, throwTypeError } from "./errorTemplates";
6
3
  const useValidatePropTypes = (props, schema) => {
7
- schema.properties.forEach(property => {
4
+ schema.properties.forEach((property) => {
8
5
  const propertyName = property.name;
9
6
  const currentProp = props[propertyName];
10
- const currentPropTypeOf = typeof currentProp; // eslint-disable-next-line max-len
11
-
12
- const currentFormat = property.format; // this is csv representing types e.g.: "string"/"string,number"/"[object],string"
13
-
14
- let isValidReactElement = false; // this depends on react desc definition
15
-
7
+ const currentPropTypeOf = typeof currentProp;
8
+ const currentFormat = property.format;
9
+ let isValidReactElement = false;
16
10
  if (property.required && !Object.prototype.hasOwnProperty.call(props, property.name)) {
17
11
  throwRequiredError(schema.name, property.name);
18
12
  }
19
-
20
- if (currentPropTypeOf !== 'undefined' && currentProp !== null) {
21
- if (currentPropTypeOf === 'object' && Object.prototype.hasOwnProperty.call(currentProp, '$$typeof') && (currentFormat.includes('node') || currentFormat.includes('element'))) {
13
+ if (currentPropTypeOf !== "undefined" && currentProp !== null) {
14
+ if (currentPropTypeOf === "object" && Object.prototype.hasOwnProperty.call(currentProp, "$$typeof") && (currentFormat.includes("node") || currentFormat.includes("element"))) {
22
15
  isValidReactElement = true;
23
16
  }
24
-
25
17
  if (!currentFormat.includes(currentPropTypeOf) && !currentFormat.includes(currentProp) && !isValidReactElement) {
26
18
  throwTypeError(schema.name, propertyName, currentProp, currentFormat);
27
19
  }
28
20
  }
29
21
  });
30
22
  };
31
-
32
- export { useValidatePropTypes };
23
+ export {
24
+ useValidatePropTypes
25
+ };
26
+ //# sourceMappingURL=validator.js.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../../../scripts/build/transpile/react-shim.js", "../../../src/validation/validator.ts"],
4
+ "sourcesContent": ["import * as React from 'react';\nexport { React };\n", "/* eslint-disable complexity */\n/* eslint-disable @typescript-eslint/explicit-module-boundary-types */\nimport { throwRequiredError, throwTypeError } from './errorTemplates';\n\nexport const useValidatePropTypes = (props: Record<string, unknown>, schema): void => {\n schema.properties.forEach((property) => {\n const propertyName = property.name;\n const currentProp = props[propertyName];\n const currentPropTypeOf = typeof currentProp;\n // eslint-disable-next-line max-len\n const currentFormat = property.format; // this is csv representing types e.g.: \"string\"/\"string,number\"/\"[object],string\"\n let isValidReactElement = false;\n // this depends on react desc definition\n if (property.required && !Object.prototype.hasOwnProperty.call(props, property.name)) {\n throwRequiredError(schema.name, property.name);\n }\n if (currentPropTypeOf !== 'undefined' && currentProp !== null) {\n if (\n currentPropTypeOf === 'object' &&\n Object.prototype.hasOwnProperty.call(currentProp, '$$typeof') &&\n (currentFormat.includes('node') || currentFormat.includes('element'))\n ) {\n isValidReactElement = true;\n }\n\n if (!currentFormat.includes(currentPropTypeOf) && !currentFormat.includes(currentProp) && !isValidReactElement) {\n throwTypeError(schema.name, propertyName, currentProp, currentFormat);\n }\n }\n });\n};\n"],
5
+ "mappings": "AAAA;ACEA;AAEO,MAAM,uBAAuB,CAAC,OAAgC,WAAiB;AACpF,SAAO,WAAW,QAAQ,CAAC,aAAa;AACtC,UAAM,eAAe,SAAS;AAC9B,UAAM,cAAc,MAAM;AAC1B,UAAM,oBAAoB,OAAO;AAEjC,UAAM,gBAAgB,SAAS;AAC/B,QAAI,sBAAsB;AAE1B,QAAI,SAAS,YAAY,CAAC,OAAO,UAAU,eAAe,KAAK,OAAO,SAAS,OAAO;AACpF,yBAAmB,OAAO,MAAM,SAAS;AAAA;AAE3C,QAAI,sBAAsB,eAAe,gBAAgB,MAAM;AAC7D,UACE,sBAAsB,YACtB,OAAO,UAAU,eAAe,KAAK,aAAa,eACjD,eAAc,SAAS,WAAW,cAAc,SAAS,aAC1D;AACA,8BAAsB;AAAA;AAGxB,UAAI,CAAC,cAAc,SAAS,sBAAsB,CAAC,cAAc,SAAS,gBAAgB,CAAC,qBAAqB;AAC9G,uBAAe,OAAO,MAAM,cAAc,aAAa;AAAA;AAAA;AAAA;AAAA;",
6
+ "names": []
7
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elliemae/ds-props-helpers",
3
- "version": "2.2.0-next.6",
3
+ "version": "2.3.0-alpha.1",
4
4
  "license": "MIT",
5
5
  "description": "ICE MT - Dimsum - Props Helpers",
6
6
  "module": "./esm/index.js",
@@ -39,22 +39,6 @@
39
39
  "import": "./esm/tests/test.schema.js",
40
40
  "require": "./cjs/tests/test.schema.js"
41
41
  },
42
- "./globalProps/useGetGlobalAttributes": {
43
- "import": "./esm/globalProps/useGetGlobalAttributes.js",
44
- "require": "./cjs/globalProps/useGetGlobalAttributes.js"
45
- },
46
- "./globalProps": {
47
- "import": "./esm/globalProps/index.js",
48
- "require": "./cjs/globalProps/index.js"
49
- },
50
- "./globalProps/globalAttributesPropTypes": {
51
- "import": "./esm/globalProps/globalAttributesPropTypes.js",
52
- "require": "./cjs/globalProps/globalAttributesPropTypes.js"
53
- },
54
- "./globalProps/constants": {
55
- "import": "./esm/globalProps/constants.js",
56
- "require": "./cjs/globalProps/constants.js"
57
- },
58
42
  "./getProps": {
59
43
  "import": "./esm/getProps/index.js",
60
44
  "require": "./cjs/getProps/index.js"
package/types/index.d.ts CHANGED
@@ -1,4 +1,3 @@
1
1
  export * from './defaultProps';
2
2
  export * from './validation';
3
3
  export * from './getProps';
4
- export * from './globalProps';
@@ -1,4 +1,4 @@
1
- import { PropsWithChildren } from 'react';
1
+ import React, { PropsWithChildren } from 'react';
2
2
  interface TypescriptSchema {
3
3
  description: string;
4
4
  name: string;
@@ -11,5 +11,5 @@ interface TypescriptSchema {
11
11
  }[];
12
12
  }
13
13
  export declare const validateTypescriptPropTypesImplementation: (props: PropsWithChildren<Record<string, unknown>>, schema: TypescriptSchema, validationsMemo?: Record<string, string>, nextValidationsMemo?: Record<string, string>) => void;
14
- export declare const useValidateTypescriptPropTypes: <T = Record<string, any>>(props: PropsWithChildren<T>, propTypes: any) => void;
14
+ export declare const useValidateTypescriptPropTypes: <T = Record<string, any>>(props: React.PropsWithChildren<T>, propTypes: any) => void;
15
15
  export {};
@@ -1,15 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- require('core-js/modules/esnext.async-iterator.map.js');
6
- require('core-js/modules/esnext.iterator.map.js');
7
- require('core-js/modules/web.dom-collections.iterator.js');
8
-
9
- /* eslint-disable max-lines */
10
- const ariaAttributes = ['aria-activedescendant', 'aria-atomic', 'aria-autocomplete', 'aria-busy', 'aria-checked', 'aria-colcount', 'aria-colindex', 'aria-colspan', 'aria-controls', 'aria-current', 'aria-describedby', 'aria-details', 'aria-disabled', 'aria-dropeffect', 'aria-errormessage', 'aria-expanded', 'aria-flowto', 'aria-grabbed', 'aria-haspopup', 'aria-hidden', 'aria-invalid', 'aria-keyshortcuts', 'aria-label', 'aria-labelledby', 'aria-level', 'aria-live', 'aria-modal', 'aria-multiline', 'aria-multiselectable', 'aria-orientation', 'aria-owns', 'aria-placeholder', 'aria-posinset', 'aria-pressed', 'aria-readonly', 'aria-relevant', 'aria-required', 'aria-roledescription', 'aria-rowcount', 'aria-rowindex', 'aria-rowspan', 'aria-selected', 'aria-setsize', 'aria-sort', 'aria-valuemax', 'aria-valuemin', 'aria-valuenow', 'aria-valuetext'];
11
- const domAttributes = ['onCopy', 'onCopyCapture', 'onCut', 'onCutCapture', 'onPaste', 'onPasteCapture', 'onCompositionEnd', 'onCompositionEndCapture', 'onCompositionStart', 'onCompositionStartCapture', 'onCompositionUpdate', 'onCompositionUpdateCapture', 'onFocus', 'onFocusCapture', 'onBlur', 'onBlurCapture', 'onChange', 'onChangeCapture', 'onBeforeInput', 'onBeforeInputCapture', 'onInput', 'onInputCapture', 'onReset', 'onResetCapture', 'onSubmit', 'onSubmitCapture', 'onInvalid', 'onInvalidCapture', 'onLoad', 'onLoadCapture', 'onError', 'onErrorCapture', 'onKeyDown', 'onKeyDownCapture', 'onKeyPress', 'onKeyPressCapture', 'onKeyUp', 'onKeyUpCapture', 'onAbort', 'onAbortCapture', 'onCanPlay', 'onCanPlayCapture', 'onCanPlayThrough', 'onCanPlayThroughCapture', 'onDurationChange', 'onDurationChangeCapture', 'onEmptied', 'onEmptiedCapture', 'onEncrypted', 'onEncryptedCapture', 'onEnded', 'onEndedCapture', 'onLoadedData', 'onLoadedDataCapture', 'onLoadedMetadata', 'onLoadedMetadataCapture', 'onLoadStart', 'onLoadStartCapture', 'onPause', 'onPauseCapture', 'onPlay', 'onPlayCapture', 'onPlaying', 'onPlayingCapture', 'onProgress', 'onProgressCapture', 'onRateChange', 'onRateChangeCapture', 'onSeeked', 'onSeekedCapture', 'onSeeking', 'onSeekingCapture', 'onStalled', 'onStalledCapture', 'onSuspend', 'onSuspendCapture', 'onTimeUpdate', 'onTimeUpdateCapture', 'onVolumeChange', 'onVolumeChangeCapture', 'onWaiting', 'onWaitingCapture', 'onAuxClick', 'onAuxClickCapture', 'onClick', 'onClickCapture', 'onContextMenu', 'onContextMenuCapture', 'onDoubleClick', 'onDoubleClickCapture', 'onDrag', 'onDragCapture', 'onDragEnd', 'onDragEndCapture', 'onDragEnter', 'onDragEnterCapture', 'onDragExit', 'onDragExitCapture', 'onDragLeave', 'onDragLeaveCapture', 'onDragOver', 'onDragOverCapture', 'onDragStart', 'onDragStartCapture', 'onDrop', 'onDropCapture', 'onMouseDown', 'onMouseDownCapture', 'onMouseEnter', 'onMouseLeave', 'onMouseMove', 'onMouseMoveCapture', 'onMouseOut', 'onMouseOutCapture', 'onMouseOver', 'onMouseOverCapture', 'onMouseUp', 'onMouseUpCapture', 'onSelect', 'onSelectCapture', 'onTouchCancel', 'onTouchCancelCapture', 'onTouchEnd', 'onTouchEndCapture', 'onTouchMove', 'onTouchMoveCapture', 'onTouchStart', 'onTouchStartCapture', 'onPointerDown', 'onPointerDownCapture', 'onPointerMove', 'onPointerMoveCapture', 'onPointerUp', 'onPointerUpCapture', 'onPointerCancel', 'onPointerCancelCapture', 'onPointerEnter', 'onPointerEnterCapture', 'onPointerLeave', 'onPointerLeaveCapture', 'onPointerOver', 'onPointerOverCapture', 'onPointerOut', 'onPointerOutCapture', 'onGotPointerCapture', 'onGotPointerCaptureCapture', 'onLostPointerCapture', 'onLostPointerCaptureCapture', 'onScroll', 'onScrollCapture', 'onWheel', 'onWheelCapture', 'onAnimationStart', 'onAnimationStartCapture', 'onAnimationEnd', 'onAnimationEndCapture', 'onAnimationIteration', 'onAnimationIterationCapture', 'onTransitionEnd', 'onTransitionEndCapture'];
12
- const htmlAttributes = ['about', 'accept', 'acceptCharset', 'accessKey', 'action', 'allowFullScreen', 'allowTransparency', 'alt', 'as', 'async', 'autoCapitalize', 'autoComplete', 'autoCorrect', 'autoFocus', 'autoPlay', 'autoSave', 'capture', 'cellPadding', 'cellSpacing', 'challenge', 'charSet', 'checked', 'cite', 'classID', 'className', 'color', 'cols', 'colSpan', 'content', 'contentEditable', 'contextMenu', 'controls', 'coords', 'crossOrigin', 'data', 'datatype', 'dateTime', 'default', 'defaultChecked', 'defaultValue', 'defer', 'dir', 'disabled', 'download', 'draggable', 'encType', 'form', 'formAction', 'formEncType', 'formMethod', 'formNoValidate', 'formTarget', 'frameBorder', 'headers', 'height', 'hidden', 'high', 'href', 'hrefLang', 'htmlFor', 'httpEquiv', 'id', 'inlist', 'inputMode', 'integrity', 'is', 'itemID', 'itemProp', 'itemRef', 'itemScope', 'itemType', 'keyParams', 'keyType', 'kind', 'label', 'lang', 'list', 'loop', 'low', 'manifest', 'marginHeight', 'marginWidth', 'max', 'maxLength', 'media', 'mediaGroup', 'method', 'min', 'minLength', 'multiple', 'muted', 'name', 'nonce', 'noValidate', 'open', 'optimum', 'pattern', 'placeholder', 'playsInline', 'poster', 'prefix', 'preload', 'property', 'radioGroup', 'readOnly', 'rel', 'required', 'resource', 'results', 'reversed', 'role', 'rows', 'rowSpan', 'sandbox', 'scope', 'scoped', 'scrolling', 'seamless', 'security', 'selected', 'shape', 'size', 'sizes', 'slot', 'span', 'spellCheck', 'src', 'srcDoc', 'srcLang', 'srcSet', 'start', 'step', 'style', 'summary', 'suppressContentEditableWarning', 'suppressHydrationWarning', 'tabIndex', 'target', 'title', 'translate', 'type', 'typeof', 'unselectable', 'useMap', 'value', 'vocab', 'width', 'wmode', 'wrap'];
13
- const globalAttributes = Object.fromEntries([...ariaAttributes, ...domAttributes, ...htmlAttributes].map(entry => [entry, true]));
14
-
15
- exports.globalAttributes = globalAttributes;
@@ -1,372 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var reactDesc = require('react-desc');
6
-
7
- /* eslint-disable max-lines */
8
- const globalAttributesPropTypes = {
9
- 'aria-*': reactDesc.PropTypes.any.description('Aria related properties -- global --'),
10
- 'on-*': reactDesc.PropTypes.func.description('Any supported React event -- global --'),
11
- 'data-*': reactDesc.PropTypes.any.description('Any data property to attach to the root container -- global --'),
12
- 'all HTML attributes': reactDesc.PropTypes.any.description('HTML attributes such as id, className, autoComplete, href and so on -- global --'),
13
- about: reactDesc.PropTypes.any.description('-- hidden --'),
14
- accept: reactDesc.PropTypes.any.description('-- hidden --'),
15
- acceptCharset: reactDesc.PropTypes.any.description('-- hidden --'),
16
- accessKey: reactDesc.PropTypes.any.description('-- hidden --'),
17
- action: reactDesc.PropTypes.any.description('-- hidden --'),
18
- allowFullScreen: reactDesc.PropTypes.any.description('-- hidden --'),
19
- allowTransparency: reactDesc.PropTypes.any.description('-- hidden --'),
20
- alt: reactDesc.PropTypes.any.description('-- hidden --'),
21
- 'aria-activedescendant': reactDesc.PropTypes.any.description('-- hidden --'),
22
- 'aria-atomic': reactDesc.PropTypes.any.description('-- hidden --'),
23
- 'aria-autocomplete': reactDesc.PropTypes.any.description('-- hidden --'),
24
- 'aria-busy': reactDesc.PropTypes.any.description('-- hidden --'),
25
- 'aria-checked': reactDesc.PropTypes.any.description('-- hidden --'),
26
- 'aria-colcount': reactDesc.PropTypes.any.description('-- hidden --'),
27
- 'aria-colindex': reactDesc.PropTypes.any.description('-- hidden --'),
28
- 'aria-colspan': reactDesc.PropTypes.any.description('-- hidden --'),
29
- 'aria-controls': reactDesc.PropTypes.any.description('-- hidden --'),
30
- 'aria-current': reactDesc.PropTypes.any.description('-- hidden --'),
31
- 'aria-describedby': reactDesc.PropTypes.any.description('-- hidden --'),
32
- 'aria-details': reactDesc.PropTypes.any.description('-- hidden --'),
33
- 'aria-disabled': reactDesc.PropTypes.any.description('-- hidden --'),
34
- 'aria-dropeffect': reactDesc.PropTypes.any.description('-- hidden --'),
35
- 'aria-errormessage': reactDesc.PropTypes.any.description('-- hidden --'),
36
- 'aria-expanded': reactDesc.PropTypes.any.description('-- hidden --'),
37
- 'aria-flowto': reactDesc.PropTypes.any.description('-- hidden --'),
38
- 'aria-grabbed': reactDesc.PropTypes.any.description('-- hidden --'),
39
- 'aria-haspopup': reactDesc.PropTypes.any.description('-- hidden --'),
40
- 'aria-hidden': reactDesc.PropTypes.any.description('-- hidden --'),
41
- 'aria-invalid': reactDesc.PropTypes.any.description('-- hidden --'),
42
- 'aria-keyshortcuts': reactDesc.PropTypes.any.description('-- hidden --'),
43
- 'aria-label': reactDesc.PropTypes.any.description('-- hidden --'),
44
- 'aria-labelledby': reactDesc.PropTypes.any.description('-- hidden --'),
45
- 'aria-level': reactDesc.PropTypes.any.description('-- hidden --'),
46
- 'aria-live': reactDesc.PropTypes.any.description('-- hidden --'),
47
- 'aria-modal': reactDesc.PropTypes.any.description('-- hidden --'),
48
- 'aria-multiline': reactDesc.PropTypes.any.description('-- hidden --'),
49
- 'aria-multiselectable': reactDesc.PropTypes.any.description('-- hidden --'),
50
- 'aria-orientation': reactDesc.PropTypes.any.description('-- hidden --'),
51
- 'aria-owns': reactDesc.PropTypes.any.description('-- hidden --'),
52
- 'aria-placeholder': reactDesc.PropTypes.any.description('-- hidden --'),
53
- 'aria-posinset': reactDesc.PropTypes.any.description('-- hidden --'),
54
- 'aria-pressed': reactDesc.PropTypes.any.description('-- hidden --'),
55
- 'aria-readonly': reactDesc.PropTypes.any.description('-- hidden --'),
56
- 'aria-relevant': reactDesc.PropTypes.any.description('-- hidden --'),
57
- 'aria-required': reactDesc.PropTypes.any.description('-- hidden --'),
58
- 'aria-roledescription': reactDesc.PropTypes.any.description('-- hidden --'),
59
- 'aria-rowcount': reactDesc.PropTypes.any.description('-- hidden --'),
60
- 'aria-rowindex': reactDesc.PropTypes.any.description('-- hidden --'),
61
- 'aria-rowspan': reactDesc.PropTypes.any.description('-- hidden --'),
62
- 'aria-selected': reactDesc.PropTypes.any.description('-- hidden --'),
63
- 'aria-setsize': reactDesc.PropTypes.any.description('-- hidden --'),
64
- 'aria-sort': reactDesc.PropTypes.any.description('-- hidden --'),
65
- 'aria-valuemax': reactDesc.PropTypes.any.description('-- hidden --'),
66
- 'aria-valuemin': reactDesc.PropTypes.any.description('-- hidden --'),
67
- 'aria-valuenow': reactDesc.PropTypes.any.description('-- hidden --'),
68
- 'aria-valuetext': reactDesc.PropTypes.any.description('-- hidden --'),
69
- as: reactDesc.PropTypes.any.description('-- hidden --'),
70
- async: reactDesc.PropTypes.any.description('-- hidden --'),
71
- autoCapitalize: reactDesc.PropTypes.any.description('-- hidden --'),
72
- autoComplete: reactDesc.PropTypes.any.description('-- hidden --'),
73
- autoCorrect: reactDesc.PropTypes.any.description('-- hidden --'),
74
- autoFocus: reactDesc.PropTypes.any.description('-- hidden --'),
75
- autoPlay: reactDesc.PropTypes.any.description('-- hidden --'),
76
- autoSave: reactDesc.PropTypes.any.description('-- hidden --'),
77
- capture: reactDesc.PropTypes.any.description('-- hidden --'),
78
- cellPadding: reactDesc.PropTypes.any.description('-- hidden --'),
79
- cellSpacing: reactDesc.PropTypes.any.description('-- hidden --'),
80
- challenge: reactDesc.PropTypes.any.description('-- hidden --'),
81
- charSet: reactDesc.PropTypes.any.description('-- hidden --'),
82
- checked: reactDesc.PropTypes.any.description('-- hidden --'),
83
- cite: reactDesc.PropTypes.any.description('-- hidden --'),
84
- classID: reactDesc.PropTypes.any.description('-- hidden --'),
85
- className: reactDesc.PropTypes.any.description('-- hidden --'),
86
- color: reactDesc.PropTypes.any.description('-- hidden --'),
87
- cols: reactDesc.PropTypes.any.description('-- hidden --'),
88
- colSpan: reactDesc.PropTypes.any.description('-- hidden --'),
89
- content: reactDesc.PropTypes.any.description('-- hidden --'),
90
- contentEditable: reactDesc.PropTypes.any.description('-- hidden --'),
91
- contextMenu: reactDesc.PropTypes.any.description('-- hidden --'),
92
- controls: reactDesc.PropTypes.any.description('-- hidden --'),
93
- coords: reactDesc.PropTypes.any.description('-- hidden --'),
94
- crossOrigin: reactDesc.PropTypes.any.description('-- hidden --'),
95
- data: reactDesc.PropTypes.any.description('-- hidden --'),
96
- datatype: reactDesc.PropTypes.any.description('-- hidden --'),
97
- dateTime: reactDesc.PropTypes.any.description('-- hidden --'),
98
- default: reactDesc.PropTypes.any.description('-- hidden --'),
99
- defaultChecked: reactDesc.PropTypes.any.description('-- hidden --'),
100
- defaultValue: reactDesc.PropTypes.any.description('-- hidden --'),
101
- defer: reactDesc.PropTypes.any.description('-- hidden --'),
102
- dir: reactDesc.PropTypes.any.description('-- hidden --'),
103
- disabled: reactDesc.PropTypes.any.description('-- hidden --'),
104
- download: reactDesc.PropTypes.any.description('-- hidden --'),
105
- draggable: reactDesc.PropTypes.any.description('-- hidden --'),
106
- encType: reactDesc.PropTypes.any.description('-- hidden --'),
107
- form: reactDesc.PropTypes.any.description('-- hidden --'),
108
- formAction: reactDesc.PropTypes.any.description('-- hidden --'),
109
- formEncType: reactDesc.PropTypes.any.description('-- hidden --'),
110
- formMethod: reactDesc.PropTypes.any.description('-- hidden --'),
111
- formNoValidate: reactDesc.PropTypes.any.description('-- hidden --'),
112
- formTarget: reactDesc.PropTypes.any.description('-- hidden --'),
113
- frameBorder: reactDesc.PropTypes.any.description('-- hidden --'),
114
- headers: reactDesc.PropTypes.any.description('-- hidden --'),
115
- height: reactDesc.PropTypes.any.description('-- hidden --'),
116
- hidden: reactDesc.PropTypes.any.description('-- hidden --'),
117
- high: reactDesc.PropTypes.any.description('-- hidden --'),
118
- href: reactDesc.PropTypes.any.description('-- hidden --'),
119
- hrefLang: reactDesc.PropTypes.any.description('-- hidden --'),
120
- htmlFor: reactDesc.PropTypes.any.description('-- hidden --'),
121
- httpEquiv: reactDesc.PropTypes.any.description('-- hidden --'),
122
- id: reactDesc.PropTypes.any.description('-- hidden --'),
123
- inlist: reactDesc.PropTypes.any.description('-- hidden --'),
124
- inputMode: reactDesc.PropTypes.any.description('-- hidden --'),
125
- integrity: reactDesc.PropTypes.any.description('-- hidden --'),
126
- is: reactDesc.PropTypes.any.description('-- hidden --'),
127
- itemID: reactDesc.PropTypes.any.description('-- hidden --'),
128
- itemProp: reactDesc.PropTypes.any.description('-- hidden --'),
129
- itemRef: reactDesc.PropTypes.any.description('-- hidden --'),
130
- itemScope: reactDesc.PropTypes.any.description('-- hidden --'),
131
- itemType: reactDesc.PropTypes.any.description('-- hidden --'),
132
- keyParams: reactDesc.PropTypes.any.description('-- hidden --'),
133
- keyType: reactDesc.PropTypes.any.description('-- hidden --'),
134
- kind: reactDesc.PropTypes.any.description('-- hidden --'),
135
- label: reactDesc.PropTypes.any.description('-- hidden --'),
136
- lang: reactDesc.PropTypes.any.description('-- hidden --'),
137
- list: reactDesc.PropTypes.any.description('-- hidden --'),
138
- loop: reactDesc.PropTypes.any.description('-- hidden --'),
139
- low: reactDesc.PropTypes.any.description('-- hidden --'),
140
- manifest: reactDesc.PropTypes.any.description('-- hidden --'),
141
- marginHeight: reactDesc.PropTypes.any.description('-- hidden --'),
142
- marginWidth: reactDesc.PropTypes.any.description('-- hidden --'),
143
- max: reactDesc.PropTypes.any.description('-- hidden --'),
144
- maxLength: reactDesc.PropTypes.any.description('-- hidden --'),
145
- media: reactDesc.PropTypes.any.description('-- hidden --'),
146
- mediaGroup: reactDesc.PropTypes.any.description('-- hidden --'),
147
- method: reactDesc.PropTypes.any.description('-- hidden --'),
148
- min: reactDesc.PropTypes.any.description('-- hidden --'),
149
- minLength: reactDesc.PropTypes.any.description('-- hidden --'),
150
- multiple: reactDesc.PropTypes.any.description('-- hidden --'),
151
- muted: reactDesc.PropTypes.any.description('-- hidden --'),
152
- name: reactDesc.PropTypes.any.description('-- hidden --'),
153
- nonce: reactDesc.PropTypes.any.description('-- hidden --'),
154
- noValidate: reactDesc.PropTypes.any.description('-- hidden --'),
155
- onAbort: reactDesc.PropTypes.any.description('-- hidden --'),
156
- onAbortCapture: reactDesc.PropTypes.any.description('-- hidden --'),
157
- onAnimationEnd: reactDesc.PropTypes.any.description('-- hidden --'),
158
- onAnimationEndCapture: reactDesc.PropTypes.any.description('-- hidden --'),
159
- onAnimationIteration: reactDesc.PropTypes.any.description('-- hidden --'),
160
- onAnimationIterationCapture: reactDesc.PropTypes.any.description('-- hidden --'),
161
- onAnimationStart: reactDesc.PropTypes.any.description('-- hidden --'),
162
- onAnimationStartCapture: reactDesc.PropTypes.any.description('-- hidden --'),
163
- onAuxClick: reactDesc.PropTypes.any.description('-- hidden --'),
164
- onAuxClickCapture: reactDesc.PropTypes.any.description('-- hidden --'),
165
- onBeforeInput: reactDesc.PropTypes.any.description('-- hidden --'),
166
- onBeforeInputCapture: reactDesc.PropTypes.any.description('-- hidden --'),
167
- onBlur: reactDesc.PropTypes.any.description('-- hidden --'),
168
- onBlurCapture: reactDesc.PropTypes.any.description('-- hidden --'),
169
- onCanPlay: reactDesc.PropTypes.any.description('-- hidden --'),
170
- onCanPlayCapture: reactDesc.PropTypes.any.description('-- hidden --'),
171
- onCanPlayThrough: reactDesc.PropTypes.any.description('-- hidden --'),
172
- onCanPlayThroughCapture: reactDesc.PropTypes.any.description('-- hidden --'),
173
- onChange: reactDesc.PropTypes.any.description('-- hidden --'),
174
- onChangeCapture: reactDesc.PropTypes.any.description('-- hidden --'),
175
- onClick: reactDesc.PropTypes.any.description('-- hidden --'),
176
- onClickCapture: reactDesc.PropTypes.any.description('-- hidden --'),
177
- onCompositionEnd: reactDesc.PropTypes.any.description('-- hidden --'),
178
- onCompositionEndCapture: reactDesc.PropTypes.any.description('-- hidden --'),
179
- onCompositionStart: reactDesc.PropTypes.any.description('-- hidden --'),
180
- onCompositionStartCapture: reactDesc.PropTypes.any.description('-- hidden --'),
181
- onCompositionUpdate: reactDesc.PropTypes.any.description('-- hidden --'),
182
- onCompositionUpdateCapture: reactDesc.PropTypes.any.description('-- hidden --'),
183
- onContextMenu: reactDesc.PropTypes.any.description('-- hidden --'),
184
- onContextMenuCapture: reactDesc.PropTypes.any.description('-- hidden --'),
185
- onCopy: reactDesc.PropTypes.any.description('-- hidden --'),
186
- onCopyCapture: reactDesc.PropTypes.any.description('-- hidden --'),
187
- onCut: reactDesc.PropTypes.any.description('-- hidden --'),
188
- onCutCapture: reactDesc.PropTypes.any.description('-- hidden --'),
189
- onDoubleClick: reactDesc.PropTypes.any.description('-- hidden --'),
190
- onDoubleClickCapture: reactDesc.PropTypes.any.description('-- hidden --'),
191
- onDrag: reactDesc.PropTypes.any.description('-- hidden --'),
192
- onDragCapture: reactDesc.PropTypes.any.description('-- hidden --'),
193
- onDragEnd: reactDesc.PropTypes.any.description('-- hidden --'),
194
- onDragEndCapture: reactDesc.PropTypes.any.description('-- hidden --'),
195
- onDragEnter: reactDesc.PropTypes.any.description('-- hidden --'),
196
- onDragEnterCapture: reactDesc.PropTypes.any.description('-- hidden --'),
197
- onDragExit: reactDesc.PropTypes.any.description('-- hidden --'),
198
- onDragExitCapture: reactDesc.PropTypes.any.description('-- hidden --'),
199
- onDragLeave: reactDesc.PropTypes.any.description('-- hidden --'),
200
- onDragLeaveCapture: reactDesc.PropTypes.any.description('-- hidden --'),
201
- onDragOver: reactDesc.PropTypes.any.description('-- hidden --'),
202
- onDragOverCapture: reactDesc.PropTypes.any.description('-- hidden --'),
203
- onDragStart: reactDesc.PropTypes.any.description('-- hidden --'),
204
- onDragStartCapture: reactDesc.PropTypes.any.description('-- hidden --'),
205
- onDrop: reactDesc.PropTypes.any.description('-- hidden --'),
206
- onDropCapture: reactDesc.PropTypes.any.description('-- hidden --'),
207
- onDurationChange: reactDesc.PropTypes.any.description('-- hidden --'),
208
- onDurationChangeCapture: reactDesc.PropTypes.any.description('-- hidden --'),
209
- onEmptied: reactDesc.PropTypes.any.description('-- hidden --'),
210
- onEmptiedCapture: reactDesc.PropTypes.any.description('-- hidden --'),
211
- onEncrypted: reactDesc.PropTypes.any.description('-- hidden --'),
212
- onEncryptedCapture: reactDesc.PropTypes.any.description('-- hidden --'),
213
- onEnded: reactDesc.PropTypes.any.description('-- hidden --'),
214
- onEndedCapture: reactDesc.PropTypes.any.description('-- hidden --'),
215
- onError: reactDesc.PropTypes.any.description('-- hidden --'),
216
- onErrorCapture: reactDesc.PropTypes.any.description('-- hidden --'),
217
- onFocus: reactDesc.PropTypes.any.description('-- hidden --'),
218
- onFocusCapture: reactDesc.PropTypes.any.description('-- hidden --'),
219
- onGotPointerCapture: reactDesc.PropTypes.any.description('-- hidden --'),
220
- onGotPointerCaptureCapture: reactDesc.PropTypes.any.description('-- hidden --'),
221
- onInput: reactDesc.PropTypes.any.description('-- hidden --'),
222
- onInputCapture: reactDesc.PropTypes.any.description('-- hidden --'),
223
- onInvalid: reactDesc.PropTypes.any.description('-- hidden --'),
224
- onInvalidCapture: reactDesc.PropTypes.any.description('-- hidden --'),
225
- onKeyDown: reactDesc.PropTypes.any.description('-- hidden --'),
226
- onKeyDownCapture: reactDesc.PropTypes.any.description('-- hidden --'),
227
- onKeyPress: reactDesc.PropTypes.any.description('-- hidden --'),
228
- onKeyPressCapture: reactDesc.PropTypes.any.description('-- hidden --'),
229
- onKeyUp: reactDesc.PropTypes.any.description('-- hidden --'),
230
- onKeyUpCapture: reactDesc.PropTypes.any.description('-- hidden --'),
231
- onLoad: reactDesc.PropTypes.any.description('-- hidden --'),
232
- onLoadCapture: reactDesc.PropTypes.any.description('-- hidden --'),
233
- onLoadedData: reactDesc.PropTypes.any.description('-- hidden --'),
234
- onLoadedDataCapture: reactDesc.PropTypes.any.description('-- hidden --'),
235
- onLoadedMetadata: reactDesc.PropTypes.any.description('-- hidden --'),
236
- onLoadedMetadataCapture: reactDesc.PropTypes.any.description('-- hidden --'),
237
- onLoadStart: reactDesc.PropTypes.any.description('-- hidden --'),
238
- onLoadStartCapture: reactDesc.PropTypes.any.description('-- hidden --'),
239
- onLostPointerCapture: reactDesc.PropTypes.any.description('-- hidden --'),
240
- onLostPointerCaptureCapture: reactDesc.PropTypes.any.description('-- hidden --'),
241
- onMouseDown: reactDesc.PropTypes.any.description('-- hidden --'),
242
- onMouseDownCapture: reactDesc.PropTypes.any.description('-- hidden --'),
243
- onMouseEnter: reactDesc.PropTypes.any.description('-- hidden --'),
244
- onMouseLeave: reactDesc.PropTypes.any.description('-- hidden --'),
245
- onMouseMove: reactDesc.PropTypes.any.description('-- hidden --'),
246
- onMouseMoveCapture: reactDesc.PropTypes.any.description('-- hidden --'),
247
- onMouseOut: reactDesc.PropTypes.any.description('-- hidden --'),
248
- onMouseOutCapture: reactDesc.PropTypes.any.description('-- hidden --'),
249
- onMouseOver: reactDesc.PropTypes.any.description('-- hidden --'),
250
- onMouseOverCapture: reactDesc.PropTypes.any.description('-- hidden --'),
251
- onMouseUp: reactDesc.PropTypes.any.description('-- hidden --'),
252
- onMouseUpCapture: reactDesc.PropTypes.any.description('-- hidden --'),
253
- onPaste: reactDesc.PropTypes.any.description('-- hidden --'),
254
- onPasteCapture: reactDesc.PropTypes.any.description('-- hidden --'),
255
- onPause: reactDesc.PropTypes.any.description('-- hidden --'),
256
- onPauseCapture: reactDesc.PropTypes.any.description('-- hidden --'),
257
- onPlay: reactDesc.PropTypes.any.description('-- hidden --'),
258
- onPlayCapture: reactDesc.PropTypes.any.description('-- hidden --'),
259
- onPlaying: reactDesc.PropTypes.any.description('-- hidden --'),
260
- onPlayingCapture: reactDesc.PropTypes.any.description('-- hidden --'),
261
- onPointerCancel: reactDesc.PropTypes.any.description('-- hidden --'),
262
- onPointerCancelCapture: reactDesc.PropTypes.any.description('-- hidden --'),
263
- onPointerDown: reactDesc.PropTypes.any.description('-- hidden --'),
264
- onPointerDownCapture: reactDesc.PropTypes.any.description('-- hidden --'),
265
- onPointerEnter: reactDesc.PropTypes.any.description('-- hidden --'),
266
- onPointerEnterCapture: reactDesc.PropTypes.any.description('-- hidden --'),
267
- onPointerLeave: reactDesc.PropTypes.any.description('-- hidden --'),
268
- onPointerLeaveCapture: reactDesc.PropTypes.any.description('-- hidden --'),
269
- onPointerMove: reactDesc.PropTypes.any.description('-- hidden --'),
270
- onPointerMoveCapture: reactDesc.PropTypes.any.description('-- hidden --'),
271
- onPointerOut: reactDesc.PropTypes.any.description('-- hidden --'),
272
- onPointerOutCapture: reactDesc.PropTypes.any.description('-- hidden --'),
273
- onPointerOver: reactDesc.PropTypes.any.description('-- hidden --'),
274
- onPointerOverCapture: reactDesc.PropTypes.any.description('-- hidden --'),
275
- onPointerUp: reactDesc.PropTypes.any.description('-- hidden --'),
276
- onPointerUpCapture: reactDesc.PropTypes.any.description('-- hidden --'),
277
- onProgress: reactDesc.PropTypes.any.description('-- hidden --'),
278
- onProgressCapture: reactDesc.PropTypes.any.description('-- hidden --'),
279
- onRateChange: reactDesc.PropTypes.any.description('-- hidden --'),
280
- onRateChangeCapture: reactDesc.PropTypes.any.description('-- hidden --'),
281
- onReset: reactDesc.PropTypes.any.description('-- hidden --'),
282
- onResetCapture: reactDesc.PropTypes.any.description('-- hidden --'),
283
- onScroll: reactDesc.PropTypes.any.description('-- hidden --'),
284
- onScrollCapture: reactDesc.PropTypes.any.description('-- hidden --'),
285
- onSeeked: reactDesc.PropTypes.any.description('-- hidden --'),
286
- onSeekedCapture: reactDesc.PropTypes.any.description('-- hidden --'),
287
- onSeeking: reactDesc.PropTypes.any.description('-- hidden --'),
288
- onSeekingCapture: reactDesc.PropTypes.any.description('-- hidden --'),
289
- onSelect: reactDesc.PropTypes.any.description('-- hidden --'),
290
- onSelectCapture: reactDesc.PropTypes.any.description('-- hidden --'),
291
- onStalled: reactDesc.PropTypes.any.description('-- hidden --'),
292
- onStalledCapture: reactDesc.PropTypes.any.description('-- hidden --'),
293
- onSubmit: reactDesc.PropTypes.any.description('-- hidden --'),
294
- onSubmitCapture: reactDesc.PropTypes.any.description('-- hidden --'),
295
- onSuspend: reactDesc.PropTypes.any.description('-- hidden --'),
296
- onSuspendCapture: reactDesc.PropTypes.any.description('-- hidden --'),
297
- onTimeUpdate: reactDesc.PropTypes.any.description('-- hidden --'),
298
- onTimeUpdateCapture: reactDesc.PropTypes.any.description('-- hidden --'),
299
- onTouchCancel: reactDesc.PropTypes.any.description('-- hidden --'),
300
- onTouchCancelCapture: reactDesc.PropTypes.any.description('-- hidden --'),
301
- onTouchEnd: reactDesc.PropTypes.any.description('-- hidden --'),
302
- onTouchEndCapture: reactDesc.PropTypes.any.description('-- hidden --'),
303
- onTouchMove: reactDesc.PropTypes.any.description('-- hidden --'),
304
- onTouchMoveCapture: reactDesc.PropTypes.any.description('-- hidden --'),
305
- onTouchStart: reactDesc.PropTypes.any.description('-- hidden --'),
306
- onTouchStartCapture: reactDesc.PropTypes.any.description('-- hidden --'),
307
- onTransitionEnd: reactDesc.PropTypes.any.description('-- hidden --'),
308
- onTransitionEndCapture: reactDesc.PropTypes.any.description('-- hidden --'),
309
- onVolumeChange: reactDesc.PropTypes.any.description('-- hidden --'),
310
- onVolumeChangeCapture: reactDesc.PropTypes.any.description('-- hidden --'),
311
- onWaiting: reactDesc.PropTypes.any.description('-- hidden --'),
312
- onWaitingCapture: reactDesc.PropTypes.any.description('-- hidden --'),
313
- onWheel: reactDesc.PropTypes.any.description('-- hidden --'),
314
- onWheelCapture: reactDesc.PropTypes.any.description('-- hidden --'),
315
- open: reactDesc.PropTypes.any.description('-- hidden --'),
316
- optimum: reactDesc.PropTypes.any.description('-- hidden --'),
317
- pattern: reactDesc.PropTypes.any.description('-- hidden --'),
318
- placeholder: reactDesc.PropTypes.any.description('-- hidden --'),
319
- playsInline: reactDesc.PropTypes.any.description('-- hidden --'),
320
- poster: reactDesc.PropTypes.any.description('-- hidden --'),
321
- prefix: reactDesc.PropTypes.any.description('-- hidden --'),
322
- preload: reactDesc.PropTypes.any.description('-- hidden --'),
323
- property: reactDesc.PropTypes.any.description('-- hidden --'),
324
- radioGroup: reactDesc.PropTypes.any.description('-- hidden --'),
325
- readOnly: reactDesc.PropTypes.any.description('-- hidden --'),
326
- rel: reactDesc.PropTypes.any.description('-- hidden --'),
327
- required: reactDesc.PropTypes.any.description('-- hidden --'),
328
- resource: reactDesc.PropTypes.any.description('-- hidden --'),
329
- results: reactDesc.PropTypes.any.description('-- hidden --'),
330
- reversed: reactDesc.PropTypes.any.description('-- hidden --'),
331
- role: reactDesc.PropTypes.any.description('-- hidden --'),
332
- rows: reactDesc.PropTypes.any.description('-- hidden --'),
333
- rowSpan: reactDesc.PropTypes.any.description('-- hidden --'),
334
- sandbox: reactDesc.PropTypes.any.description('-- hidden --'),
335
- scope: reactDesc.PropTypes.any.description('-- hidden --'),
336
- scoped: reactDesc.PropTypes.any.description('-- hidden --'),
337
- scrolling: reactDesc.PropTypes.any.description('-- hidden --'),
338
- seamless: reactDesc.PropTypes.any.description('-- hidden --'),
339
- security: reactDesc.PropTypes.any.description('-- hidden --'),
340
- selected: reactDesc.PropTypes.any.description('-- hidden --'),
341
- shape: reactDesc.PropTypes.any.description('-- hidden --'),
342
- size: reactDesc.PropTypes.any.description('-- hidden --'),
343
- sizes: reactDesc.PropTypes.any.description('-- hidden --'),
344
- slot: reactDesc.PropTypes.any.description('-- hidden --'),
345
- span: reactDesc.PropTypes.any.description('-- hidden --'),
346
- spellCheck: reactDesc.PropTypes.any.description('-- hidden --'),
347
- src: reactDesc.PropTypes.any.description('-- hidden --'),
348
- srcDoc: reactDesc.PropTypes.any.description('-- hidden --'),
349
- srcLang: reactDesc.PropTypes.any.description('-- hidden --'),
350
- srcSet: reactDesc.PropTypes.any.description('-- hidden --'),
351
- start: reactDesc.PropTypes.any.description('-- hidden --'),
352
- step: reactDesc.PropTypes.any.description('-- hidden --'),
353
- style: reactDesc.PropTypes.any.description('-- hidden --'),
354
- summary: reactDesc.PropTypes.any.description('-- hidden --'),
355
- suppressContentEditableWarning: reactDesc.PropTypes.any.description('-- hidden --'),
356
- suppressHydrationWarning: reactDesc.PropTypes.any.description('-- hidden --'),
357
- tabIndex: reactDesc.PropTypes.any.description('-- hidden --'),
358
- target: reactDesc.PropTypes.any.description('-- hidden --'),
359
- title: reactDesc.PropTypes.any.description('-- hidden --'),
360
- translate: reactDesc.PropTypes.any.description('-- hidden --'),
361
- type: reactDesc.PropTypes.any.description('-- hidden --'),
362
- typeof: reactDesc.PropTypes.any.description('-- hidden --'),
363
- unselectable: reactDesc.PropTypes.any.description('-- hidden --'),
364
- useMap: reactDesc.PropTypes.any.description('-- hidden --'),
365
- value: reactDesc.PropTypes.any.description('-- hidden --'),
366
- vocab: reactDesc.PropTypes.any.description('-- hidden --'),
367
- width: reactDesc.PropTypes.any.description('-- hidden --'),
368
- wmode: reactDesc.PropTypes.any.description('-- hidden --'),
369
- wrap: reactDesc.PropTypes.any.description('-- hidden --')
370
- };
371
-
372
- exports.globalAttributesPropTypes = globalAttributesPropTypes;
@@ -1,11 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- var useGetGlobalAttributes = require('./useGetGlobalAttributes.js');
6
- var globalAttributesPropTypes = require('./globalAttributesPropTypes.js');
7
-
8
-
9
-
10
- exports.useGetGlobalAttributes = useGetGlobalAttributes.useGetGlobalAttributes;
11
- exports.globalAttributesPropTypes = globalAttributesPropTypes.globalAttributesPropTypes;
@@ -1,36 +0,0 @@
1
- 'use strict';
2
-
3
- Object.defineProperty(exports, '__esModule', { value: true });
4
-
5
- require('core-js/modules/esnext.async-iterator.for-each.js');
6
- require('core-js/modules/esnext.iterator.constructor.js');
7
- require('core-js/modules/esnext.iterator.for-each.js');
8
- require('core-js/modules/web.dom-collections.iterator.js');
9
- var react = require('react');
10
- var constants = require('./constants.js');
11
-
12
- const useGetGlobalAttributes = (props, overrides) => {
13
- const componentGlobalAttributes = react.useMemo(() => {
14
- const globalAttributesObject = {};
15
- Object.entries(props).forEach(_ref => {
16
- let [key, value] = _ref;
17
-
18
- if (key in constants.globalAttributes || key.startsWith('data-')) {
19
- if (overrides && key in overrides && typeof value === 'function' && typeof overrides[key] === 'function') {
20
- const newFunc = function () {
21
- value(...arguments);
22
- overrides[key](...arguments);
23
- };
24
-
25
- globalAttributesObject[key] = newFunc;
26
- } else {
27
- globalAttributesObject[key] = value;
28
- }
29
- }
30
- });
31
- return globalAttributesObject;
32
- }, [props, overrides]);
33
- return componentGlobalAttributes;
34
- };
35
-
36
- exports.useGetGlobalAttributes = useGetGlobalAttributes;