diff --git a/package.json b/package.json index b1d6024..175a22b 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "test": "cd packages/components && npm run test", "install:components": "cd packages/components && npm install", "install:docs": "cd packages/docs && npm install", - "build:components": "cd packages/components && npm run build:publish", + "build:components": "cd packages/components && npm run build", "build:docs": "cd packages/docs && npm run docs:build", "docs": "cd packages/docs && npm run docs" }, diff --git a/packages/components/package-lock.json b/packages/components/package-lock.json index 79d1a65..531c91f 100644 --- a/packages/components/package-lock.json +++ b/packages/components/package-lock.json @@ -1,6 +1,6 @@ { "name": "@alteryx/react-comms", - "version": "1.0.0", + "version": "1.0.2-alpha.2", "lockfileVersion": 1, "requires": true, "dependencies": { @@ -2754,6 +2754,11 @@ "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", "dev": true }, + "available-typed-arrays": { + "version": "1.0.5", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz", + "integrity": "sha1-kvlWFlAQadB9EO2y/DfT4cZRI7c=" + }, "babel-jest": { "version": "26.6.3", "resolved": "https://registry.npmjs.org/babel-jest/-/babel-jest-26.6.3.tgz", @@ -3387,6 +3392,22 @@ "dns-txt": "^2.0.2", "multicast-dns": "^6.0.1", "multicast-dns-service-types": "^1.1.0" + }, + "dependencies": { + "deep-equal": { + "version": "1.1.1", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/deep-equal/-/deep-equal-1.1.1.tgz", + "integrity": "sha1-tcmMlCzv+vfLBR4k4UNKJaLmB2o=", + "dev": true, + "requires": { + "is-arguments": "^1.0.4", + "is-date-object": "^1.0.1", + "is-regex": "^1.0.4", + "object-is": "^1.0.1", + "object-keys": "^1.1.1", + "regexp.prototype.flags": "^1.2.0" + } + } } }, "boolbase": { @@ -3726,7 +3747,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, "requires": { "function-bind": "^1.1.1", "get-intrinsic": "^1.0.2" @@ -4388,6 +4408,58 @@ "yaml": "^1.7.2" } }, + "cross-env": { + "version": "7.0.3", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/cross-env/-/cross-env-7.0.3.tgz", + "integrity": "sha1-hlJkspZ33AFbqEGJGJZd0jL8VM8=", + "dev": true, + "requires": { + "cross-spawn": "^7.0.1" + }, + "dependencies": { + "cross-spawn": { + "version": "7.0.3", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/cross-spawn/-/cross-spawn-7.0.3.tgz", + "integrity": "sha1-9zqFudXUHQRVUcF34ogtSshXKKY=", + "dev": true, + "requires": { + "path-key": "^3.1.0", + "shebang-command": "^2.0.0", + "which": "^2.0.1" + } + }, + "path-key": { + "version": "3.1.1", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/path-key/-/path-key-3.1.1.tgz", + "integrity": "sha1-WB9q3mWMu6ZaDTOA3ndTKVBU83U=", + "dev": true + }, + "shebang-command": { + "version": "2.0.0", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/shebang-command/-/shebang-command-2.0.0.tgz", + "integrity": "sha1-zNCvT4g1+9wmW4JGGq8MNmY/NOo=", + "dev": true, + "requires": { + "shebang-regex": "^3.0.0" + } + }, + "shebang-regex": { + "version": "3.0.0", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/shebang-regex/-/shebang-regex-3.0.0.tgz", + "integrity": "sha1-rhbxZE2HPsrYQ7AwexQzYtTEIXI=", + "dev": true + }, + "which": { + "version": "2.0.2", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/which/-/which-2.0.2.tgz", + "integrity": "sha1-fGqN0KY2oDJ+ELWckobu6T8/UbE=", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + } + } + }, "cross-spawn": { "version": "6.0.5", "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", @@ -4501,17 +4573,32 @@ "dev": true }, "deep-equal": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/deep-equal/-/deep-equal-1.1.1.tgz", - "integrity": "sha512-yd9c5AdiqVcR+JjcwUQb9DkhJc8ngNr0MahEBGvDiJw8puWab2yZlh+nkasOnZP+EGTAP6rRp2JzJhJZzvNF8g==", - "dev": true, + "version": "2.0.5", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/deep-equal/-/deep-equal-2.0.5.tgz", + "integrity": "sha1-Vc0v4ybYP5y/cmHvDgYLP3JMXLk=", "requires": { + "call-bind": "^1.0.0", + "es-get-iterator": "^1.1.1", + "get-intrinsic": "^1.0.1", "is-arguments": "^1.0.4", - "is-date-object": "^1.0.1", - "is-regex": "^1.0.4", - "object-is": "^1.0.1", + "is-date-object": "^1.0.2", + "is-regex": "^1.1.1", + "isarray": "^2.0.5", + "object-is": "^1.1.4", "object-keys": "^1.1.1", - "regexp.prototype.flags": "^1.2.0" + "object.assign": "^4.1.2", + "regexp.prototype.flags": "^1.3.0", + "side-channel": "^1.0.3", + "which-boxed-primitive": "^1.0.1", + "which-collection": "^1.0.1", + "which-typed-array": "^1.1.2" + }, + "dependencies": { + "isarray": { + "version": "2.0.5", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha1-ivHkwSISRMxiRZ+vOJQNTmRKVyM=" + } } }, "deep-is": { @@ -4549,7 +4636,6 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", - "dev": true, "requires": { "object-keys": "^1.0.12" } @@ -5011,11 +5097,32 @@ "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", "dev": true }, + "es-get-iterator": { + "version": "1.1.2", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/es-get-iterator/-/es-get-iterator-1.1.2.tgz", + "integrity": "sha1-kjTFSrpxNIbX694CIIZK9eKyg/c=", + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.0", + "has-symbols": "^1.0.1", + "is-arguments": "^1.1.0", + "is-map": "^2.0.2", + "is-set": "^2.0.2", + "is-string": "^1.0.5", + "isarray": "^2.0.5" + }, + "dependencies": { + "isarray": { + "version": "2.0.5", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha1-ivHkwSISRMxiRZ+vOJQNTmRKVyM=" + } + } + }, "es-to-primitive": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, "requires": { "is-callable": "^1.1.4", "is-date-object": "^1.0.1", @@ -5524,6 +5631,11 @@ "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", "dev": true }, + "foreach": { + "version": "2.0.5", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/foreach/-/foreach-2.0.5.tgz", + "integrity": "sha1-C+4AUBiusmDQo6865ljdATbsG5k=" + }, "foreground-child": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/foreground-child/-/foreground-child-2.0.0.tgz", @@ -5840,8 +5952,7 @@ "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==" }, "function.name-polyfill": { "version": "1.0.6", @@ -5883,7 +5994,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.1.tgz", "integrity": "sha512-kWZrnVM42QCiEA2Ig1bG8zjoIMOgxWwYCEeNdwY6Tv/cOSeGpcoX4pXHfKUxNKVoArnrEr2e9srnAxxGIraS9Q==", - "dev": true, "requires": { "function-bind": "^1.1.1", "has": "^1.0.3", @@ -5911,6 +6021,15 @@ "pump": "^3.0.0" } }, + "get-symbol-description": { + "version": "1.0.0", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/get-symbol-description/-/get-symbol-description-1.0.0.tgz", + "integrity": "sha1-f9uByQAQH71WTdXxowr1qtweWNY=", + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, "get-value": { "version": "2.0.6", "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", @@ -6067,7 +6186,6 @@ "version": "1.0.3", "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, "requires": { "function-bind": "^1.1.1" } @@ -6075,8 +6193,7 @@ "has-bigints": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.1.tgz", - "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==", - "dev": true + "integrity": "sha512-LSBS2LjbNBTf6287JEbEzvJgftkF5qFkmCo9hDRpAzKhUOlJ+hx8dd4USs00SgsUNwc4617J9ki5YtEClM2ffA==" }, "has-flag": { "version": "4.0.0", @@ -6086,8 +6203,15 @@ "has-symbols": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.2.tgz", - "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==", - "dev": true + "integrity": "sha512-chXa79rL/UC2KlX17jo3vRGz0azaWEx5tGqZg5pO3NUyEJVB17dMruQlzCCOfUvElghKcm5194+BCRvi2Rv/Gw==" + }, + "has-tostringtag": { + "version": "1.0.0", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/has-tostringtag/-/has-tostringtag-1.0.0.tgz", + "integrity": "sha1-fhM4GKfTlHNPlB5zw9P5KR5liyU=", + "requires": { + "has-symbols": "^1.0.2" + } }, "has-value": { "version": "1.0.0", @@ -6625,6 +6749,16 @@ "ipaddr.js": "^1.9.0" } }, + "internal-slot": { + "version": "1.0.3", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/internal-slot/-/internal-slot-1.0.3.tgz", + "integrity": "sha1-c0fjB97uovqsKsYgXUvH00ln9Zw=", + "requires": { + "get-intrinsic": "^1.1.0", + "has": "^1.0.3", + "side-channel": "^1.0.4" + } + }, "intl-format-cache": { "version": "4.3.1", "resolved": "https://registry.npmjs.org/intl-format-cache/-/intl-format-cache-4.3.1.tgz", @@ -6732,12 +6866,12 @@ } }, "is-arguments": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.1.0.tgz", - "integrity": "sha512-1Ij4lOMPl/xB5kBDn7I+b2ttPMKa8szhEIrXDuXQD/oe3HJLTLhqhgGspwgyGd6MOywBUqVvYicF72lkgDnIHg==", - "dev": true, + "version": "1.1.1", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/is-arguments/-/is-arguments-1.1.1.tgz", + "integrity": "sha1-FbP4j9oB8ql/7ITKdhpWDxI++ps=", "requires": { - "call-bind": "^1.0.0" + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" } }, "is-arrayish": { @@ -6749,8 +6883,7 @@ "is-bigint": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.2.tgz", - "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==", - "dev": true + "integrity": "sha512-0JV5+SOCQkIdzjBK9buARcV804Ddu7A0Qet6sHi3FimE9ne6m4BGQZfRn+NZiXbBk4F4XmHfDZIipLj9pX8dSA==" }, "is-binary-path": { "version": "1.0.1", @@ -6765,7 +6898,6 @@ "version": "1.1.1", "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.1.tgz", "integrity": "sha512-bXdQWkECBUIAcCkeH1unwJLIpZYaa5VvuygSyS/c2lf719mTKZDU5UdDRlpd01UjADgmW8RfqaP+mRaVPdr/Ng==", - "dev": true, "requires": { "call-bind": "^1.0.2" } @@ -6779,8 +6911,7 @@ "is-callable": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.3.tgz", - "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==", - "dev": true + "integrity": "sha512-J1DcMe8UYTBSrKezuIUTUwjXsho29693unXM2YhJUTR2txK/eG47bvNa/wipPFmZFgr/N6f1GA66dv0mEyTIyQ==" }, "is-ci": { "version": "2.0.0", @@ -6823,8 +6954,7 @@ "is-date-object": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.4.tgz", - "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==", - "dev": true + "integrity": "sha512-/b4ZVsG7Z5XVtIxs/h9W8nvfLgSAyKYdtGWQLbqy6jA1icmgjf8WCoTKgeS4wy5tYaPePouzFMANbnj94c2Z+A==" }, "is-decimal": { "version": "1.0.4", @@ -6940,11 +7070,15 @@ } } }, + "is-map": { + "version": "2.0.2", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/is-map/-/is-map-2.0.2.tgz", + "integrity": "sha1-AJItuMm/c+gbejNYJ7wqQ/K5ESc=" + }, "is-negative-zero": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", - "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", - "dev": true + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==" }, "is-number": { "version": "7.0.0", @@ -6954,8 +7088,7 @@ "is-number-object": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.5.tgz", - "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==", - "dev": true + "integrity": "sha512-RU0lI/n95pMoUKu9v1BZP5MBcZuNSVJkMkAG2dJqC4z2GlkGUNeH68SuHuBKBD/XFe+LHZ+f9BKkLET60Niedw==" }, "is-obj": { "version": "1.0.1", @@ -7012,7 +7145,6 @@ "version": "1.1.3", "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.3.tgz", "integrity": "sha512-qSVXFz28HM7y+IWX6vLCsexdlvzT1PJNFSBuaQLQ5o0IEw8UDYW6/2+eCMVyIsbM8CNLX2a/QWmSpyxYEHY7CQ==", - "dev": true, "requires": { "call-bind": "^1.0.2", "has-symbols": "^1.0.2" @@ -7030,6 +7162,16 @@ "integrity": "sha512-AGOriNp96vNBd3HtU+RzFEc75FfR5ymiYv8E553I71SCeXBiMsVDUtdio1OEFvrPyLIQ9tVR5RxXIFe5PUFjMg==", "dev": true }, + "is-set": { + "version": "2.0.2", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/is-set/-/is-set-2.0.2.tgz", + "integrity": "sha1-kHVfpMJWLcHF1AJHYNYRm5TKGOw=" + }, + "is-shared-array-buffer": { + "version": "1.0.1", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/is-shared-array-buffer/-/is-shared-array-buffer-1.0.1.tgz", + "integrity": "sha1-l7DIX72stZycRG/mU7gs8rW3z+Y=" + }, "is-stream": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", @@ -7039,8 +7181,7 @@ "is-string": { "version": "1.0.6", "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.6.tgz", - "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==", - "dev": true + "integrity": "sha512-2gdzbKUuqtQ3lYNrUTQYoClPhm7oQu4UdpSZMp1/DGgkHBT8E2Z1l0yMdb6D4zNAxwDiMv8MdulKROJGNl0Q0w==" }, "is-subset": { "version": "0.1.1", @@ -7052,11 +7193,78 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", - "dev": true, "requires": { "has-symbols": "^1.0.2" } }, + "is-typed-array": { + "version": "1.1.8", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/is-typed-array/-/is-typed-array-1.1.8.tgz", + "integrity": "sha1-y6plhdx9tDMYvFuJUj6jhKb2Xnk=", + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.18.5", + "foreach": "^2.0.5", + "has-tostringtag": "^1.0.0" + }, + "dependencies": { + "es-abstract": { + "version": "1.19.1", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/es-abstract/-/es-abstract-1.19.1.tgz", + "integrity": "sha1-1IhXlodpFpWd547aoN9FZicRXsM=", + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.4", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.1", + "is-string": "^1.0.7", + "is-weakref": "^1.0.1", + "object-inspect": "^1.11.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + } + }, + "is-callable": { + "version": "1.2.4", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha1-RzAdWN0CWUB4ZVR4U99tYf5HGUU=" + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha1-7vVmPNWfpMCuM5UFMj32hUuxWVg=", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha1-DdEr8gBvJVu1j2lREO/3SR7rwP0=", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "object-inspect": { + "version": "1.12.0", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha1-biwSDoaP0f0Yy08YwxdB0NbndvA=" + } + } + }, "is-typedarray": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", @@ -7072,6 +7280,28 @@ "is-invalid-path": "^0.1.0" } }, + "is-weakmap": { + "version": "2.0.1", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/is-weakmap/-/is-weakmap-2.0.1.tgz", + "integrity": "sha1-UAi1m9xDtpggHRj2KzeyyiQ+jPI=" + }, + "is-weakref": { + "version": "1.0.2", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/is-weakref/-/is-weakref-1.0.2.tgz", + "integrity": "sha1-lSnzg6kzggXol2XgOS78LxAPBvI=", + "requires": { + "call-bind": "^1.0.2" + } + }, + "is-weakset": { + "version": "2.0.2", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/is-weakset/-/is-weakset-2.0.2.tgz", + "integrity": "sha1-RWnWenR6HOWplN/U723Op258Ch0=", + "requires": { + "call-bind": "^1.0.2", + "get-intrinsic": "^1.1.1" + } + }, "is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -8739,14 +8969,12 @@ "object-inspect": { "version": "1.10.3", "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.10.3.tgz", - "integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==", - "dev": true + "integrity": "sha512-e5mCJlSH7poANfC8z8S9s9S2IN5/4Zb3aZ33f5s8YqoazCFzNLloLU8r5VCG+G7WoqLvAAZoVMcy3tp/3X0Plw==" }, "object-is": { "version": "1.1.5", "resolved": "https://registry.npmjs.org/object-is/-/object-is-1.1.5.tgz", "integrity": "sha512-3cyDsyHgtmi7I7DfSSI2LDp6SK2lwvtbg0p0R1e0RvTqF5ceGx+K2dfSjm1bKDMVCFEDAQvy+o8c6a7VujOddw==", - "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3" @@ -8755,8 +8983,7 @@ "object-keys": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", - "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", - "dev": true + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==" }, "object-visit": { "version": "1.0.1", @@ -8771,7 +8998,6 @@ "version": "4.1.2", "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", - "dev": true, "requires": { "call-bind": "^1.0.0", "define-properties": "^1.1.3", @@ -10240,10 +10466,9 @@ } }, "regexp.prototype.flags": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/regexp.prototype.flags/-/regexp.prototype.flags-1.3.1.tgz", - "integrity": "sha512-JiBdRBq91WlY7uRJ0ds7R+dU02i6LKi8r3BuQhNXn+kmeLN+EfHhfjqMRis1zJxnlu88hq/4dx0P2OP3APRTOA==", - "dev": true, + "version": "1.4.1", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/regexp.prototype.flags/-/regexp.prototype.flags-1.4.1.tgz", + "integrity": "sha1-s/TABZr55H7Knz9mDlHYEwfnIwc=", "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3" @@ -10821,6 +11046,16 @@ "dev": true, "optional": true }, + "side-channel": { + "version": "1.0.4", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha1-785cj9wQTudRslxY1CkAEfpeos8=", + "requires": { + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" + } + }, "signal-exit": { "version": "3.0.3", "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", @@ -11265,7 +11500,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.4.tgz", "integrity": "sha512-y9xCjw1P23Awk8EvTpcyL2NIr1j7wJ39f+k6lvRnSMz+mz9CGz9NYPelDk42kOz6+ql8xjfK8oYzy3jAP5QU5A==", - "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3" @@ -11275,7 +11509,6 @@ "version": "1.0.4", "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.4.tgz", "integrity": "sha512-jh6e984OBfvxS50tdY2nRZnoC5/mLFKOREQfw8t5yytkoUsJRNxvI/E39qu1sD0OtWI3OC0XgKSmcWwziwYuZw==", - "dev": true, "requires": { "call-bind": "^1.0.2", "define-properties": "^1.1.3" @@ -11825,7 +12058,6 @@ "version": "1.0.1", "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.0.1.tgz", "integrity": "sha512-tZU/3NqK3dA5gpE1KtyiJUrEB0lxnGkMFHptJ7q6ewdZ8s12QrODwNbhIJStmJkd1QDXa1NRA8aF2A1zk/Ypyw==", - "dev": true, "requires": { "function-bind": "^1.1.1", "has-bigints": "^1.0.1", @@ -12746,7 +12978,6 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", - "dev": true, "requires": { "is-bigint": "^1.0.1", "is-boolean-object": "^1.1.0", @@ -12755,12 +12986,92 @@ "is-symbol": "^1.0.3" } }, + "which-collection": { + "version": "1.0.1", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/which-collection/-/which-collection-1.0.1.tgz", + "integrity": "sha1-cOq3Hru9Ku+vMvkXCC/GLNy3CQY=", + "requires": { + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-weakmap": "^2.0.1", + "is-weakset": "^2.0.1" + } + }, "which-module": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", "dev": true }, + "which-typed-array": { + "version": "1.1.7", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/which-typed-array/-/which-typed-array-1.1.7.tgz", + "integrity": "sha1-J2F5m5oi1LhmCzwbQKuqdzlpF5M=", + "requires": { + "available-typed-arrays": "^1.0.5", + "call-bind": "^1.0.2", + "es-abstract": "^1.18.5", + "foreach": "^2.0.5", + "has-tostringtag": "^1.0.0", + "is-typed-array": "^1.1.7" + }, + "dependencies": { + "es-abstract": { + "version": "1.19.1", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/es-abstract/-/es-abstract-1.19.1.tgz", + "integrity": "sha1-1IhXlodpFpWd547aoN9FZicRXsM=", + "requires": { + "call-bind": "^1.0.2", + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "get-intrinsic": "^1.1.1", + "get-symbol-description": "^1.0.0", + "has": "^1.0.3", + "has-symbols": "^1.0.2", + "internal-slot": "^1.0.3", + "is-callable": "^1.2.4", + "is-negative-zero": "^2.0.1", + "is-regex": "^1.1.4", + "is-shared-array-buffer": "^1.0.1", + "is-string": "^1.0.7", + "is-weakref": "^1.0.1", + "object-inspect": "^1.11.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.2", + "string.prototype.trimend": "^1.0.4", + "string.prototype.trimstart": "^1.0.4", + "unbox-primitive": "^1.0.1" + } + }, + "is-callable": { + "version": "1.2.4", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/is-callable/-/is-callable-1.2.4.tgz", + "integrity": "sha1-RzAdWN0CWUB4ZVR4U99tYf5HGUU=" + }, + "is-regex": { + "version": "1.1.4", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/is-regex/-/is-regex-1.1.4.tgz", + "integrity": "sha1-7vVmPNWfpMCuM5UFMj32hUuxWVg=", + "requires": { + "call-bind": "^1.0.2", + "has-tostringtag": "^1.0.0" + } + }, + "is-string": { + "version": "1.0.7", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/is-string/-/is-string-1.0.7.tgz", + "integrity": "sha1-DdEr8gBvJVu1j2lREO/3SR7rwP0=", + "requires": { + "has-tostringtag": "^1.0.0" + } + }, + "object-inspect": { + "version": "1.12.0", + "resolved": "https://artifactory.alteryx.com/artifactory/api/npm/npm/object-inspect/-/object-inspect-1.12.0.tgz", + "integrity": "sha1-biwSDoaP0f0Yy08YwxdB0NbndvA=" + } + } + }, "word-wrap": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", diff --git a/packages/components/package.json b/packages/components/package.json index 1e93ceb..2b4f440 100644 --- a/packages/components/package.json +++ b/packages/components/package.json @@ -1,6 +1,6 @@ { "name": "@alteryx/react-comms", - "version": "1.0.1", + "version": "1.0.2-alpha.3", "description": "Communication bridge for the Alteryx UI-SDK", "main": "index.js", "dependencies": { @@ -8,6 +8,7 @@ "@types/node": "^14.14.22", "@types/react": "^17.0.0", "@types/react-dom": "^17.0.0", + "deep-equal": "^2.0.5", "prop-types": "^15.7.2", "ts-loader": "^8.0.14", "uuid": "^8.3.0" @@ -29,6 +30,7 @@ "babel-plugin-transform-imports": "^2.0.0", "babel-preset-react-app": "^9.1.2", "core-js": "^3.6.5", + "cross-env": "^7.0.3", "enzyme": "^3.11.0", "enzyme-adapter-react-16": "^1.15.2", "enzyme-react-intl": "^2.0.6", @@ -48,12 +50,12 @@ "test": "jest -u --silent", "apidocs": "ayx-scripts doc", "docs": "styleguidist server", - "build:publish": "npm run build:copy-package-json && npm run build:copy-license && npm run build:es2015 && npm run build:es2015modules && npm run build:copy-ts-files", - "build:es2015": "NODE_ENV=production babel --config-file ./.babelrc.js --extensions '.ts' --extensions '.tsx' --ignore 'src/**/*.d.ts' src --out-dir build", - "build:copy-package-json": "NODE_ENV=production babel package.json --copy-files --out-dir ./build", - "build:copy-license": "NODE_ENV=production babel ../../LICENSE --copy-files --out-dir ./build", - "build:copy-ts-files": "babel-node --config-file ./.babelrc.js ./scripts/copy-files.js ../src/**/*.d.ts ../build", - "build:es2015modules": "NODE_ENV=production babel --config-file ./.babelrc.js src/index.ts --out-file build/index.js", + "build": "npm run build:copy-package-json && npm run build:copy-license && npm run build:es2015 && npm run build:es2015modules && npm run build:copy-ts-files", + "build:es2015": "cross-env NODE_ENV=production babel --config-file ./.babelrc.js --extensions '.ts' --extensions '.tsx' --ignore 'src/**/*.d.ts' src --out-dir build", + "build:copy-package-json": "cross-env NODE_ENV=production babel package.json --copy-files --out-dir ./build", + "build:copy-license": "cross-env NODE_ENV=production babel ../../LICENSE --copy-files --out-dir ./build", + "build:copy-ts-files": "node ./scripts/copy-files.js ../src/**/*.d.ts ../build", + "build:es2015modules": "cross-env NODE_ENV=production babel --config-file ./.babelrc.js src/index.ts --out-file build/index.js", "analyze": "ayx-scripts analyze-bundle", "lint": "eslint . --ext .js,.jsx,.ts,.tsx" }, diff --git a/packages/components/src/DesignerApi/index.tsx b/packages/components/src/DesignerApi/index.tsx index 4c70aec..9348e46 100644 --- a/packages/components/src/DesignerApi/index.tsx +++ b/packages/components/src/DesignerApi/index.tsx @@ -4,6 +4,7 @@ /* eslint-disable react/forbid-prop-types */ import React, { useEffect, useState, useCallback } from 'react'; import merge from 'deepmerge'; +import deepEqual from 'deep-equal'; import DesignerMessageApi from '../DesignerMessageApi'; import MicroAppMessageApi from '../MicroAppMessageApi'; @@ -39,13 +40,16 @@ const DesignerApi: React.FC = (props: IDesignerApiProps) => { const [model, updateModel] = useState(mergedState); const [appContext, updateAppContext] = useState(messageBroker.ayxAppContext); - const handleUpdateModel = (updatedData: IModel) => { - updateModel(updatedData); - messageBroker.model = updatedData; - messageBroker instanceof MicroAppMessageApi ? - messageBroker.sendMessage(SUBSCRIPTION_EVENTS.MODEL_UPDATED, updatedData) : - window.Alteryx.model = updatedData; - }; + useEffect(() => { + const modelChanged = !deepEqual(messageBroker.model, model, { strict: true }); + if (modelChanged) { + // Just update the messageBroker model whenever state updates. + messageBroker.model = model; + messageBroker instanceof MicroAppMessageApi + ? messageBroker.sendMessage(SUBSCRIPTION_EVENTS.MODEL_UPDATED, model) + : window.Alteryx.model = model; + } + }, [model]) useEffect(() => { const receiveAppContext = data => { @@ -58,11 +62,11 @@ const DesignerApi: React.FC = (props: IDesignerApiProps) => { messageBroker.subscribe(SUBSCRIPTION_EVENTS.MODEL_UPDATED, receiveModel); messageBroker.subscribe(SUBSCRIPTION_EVENTS.AYX_APP_CONTEXT_UPDATED, receiveAppContext); return function cleanUp() { - handleUpdateModel(messageBroker.model); + updateModel(messageBroker.model); }; }, []); - const getContextValue = useCallback(() => [model, handleUpdateModel], [model, handleUpdateModel]); + const getContextValue = useCallback(() => [model, updateModel], [model, updateModel]); const contextProps: IContextProviderProps = { id: 'sdk-provider', value: getContextValue() diff --git a/packages/docs/getting-started/usage.md b/packages/docs/getting-started/usage.md index 0455789..07df26f 100644 --- a/packages/docs/getting-started/usage.md +++ b/packages/docs/getting-started/usage.md @@ -64,7 +64,7 @@ const SampleButton = () => { As a best practice, you should not override or manipulate your model directly. This can be accomplished as seen in the above example. If you are in need of more complicated or deeper cloning, we recommend checking out [deepmerge](https://lodash.com/docs/#cloneDeep) or [lodash.cloneDeep](https://lodash.com/docs/#cloneDeep) In order to make updates to your model, the `handleUpdateModel` function is expecting to receive your entire model object as a parameter. -After you make a copy of your model and make any required updates, call the `handleUpdateModel` method provided to you by the `useContext` React hook. This updates the model state internal to your custom app and dispatches any relevant messages to the parent application. +After you make a copy of your model and make any required updates, call the `handleUpdateModel` method provided to you by the `useContext` React hook. This updates the model state internal to your custom app and dispatches any relevant messages to the parent application. It supports the same [types of usage](https://reactjs.org/docs/hooks-reference.html#usestate) as the dispatch function provided by `React.useState()` (object and functional), since that is what is used under the hood. To explore more advanced examples, visit our DesignerApi docs located in the side bar to the left. diff --git a/packages/docs/releases/changelog.md b/packages/docs/releases/changelog.md index 2dfe266..197f5b7 100644 --- a/packages/docs/releases/changelog.md +++ b/packages/docs/releases/changelog.md @@ -1,3 +1,7 @@ +### February 17, 2022 + +- Fixed a bug with using a function argument in the `handleUpdateModel` function. + ### May 28th, 2021 #### @alteryx/react-comms@1.0.1