@datadog/ui-extensions-react
Advanced tools
Comparing version 0.28.1-canary.108.2a792a6.0 to 0.29.0
export * from './use-context'; | ||
export * from './use-custom-widget-options'; | ||
export * from './use-template-variable'; |
@@ -1,2 +0,2 @@ | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@datadog/ui-extensions-sdk"),require("react")):"function"==typeof define&&define.amd?define(["@datadog/ui-extensions-sdk","react"],t):"object"==typeof exports?exports.DD_REACT=t(require("@datadog/ui-extensions-sdk"),require("react")):e.DD_REACT=t(e["@datadog/ui-extensions-sdk"],e.react)}(self,(function(e,t){return function(){"use strict";var n={920:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(54),t),r(n(266),t),r(n(657),t)},54:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useContext=void 0;var u=o(n(669)),a=o(n(156));t.useContext=function(e){var t=function(e){var t=a.useState({type:"initializing"}),n=t[0],i=t[1];return a.useEffect((function(){var t=!1;e.getContext().then((function(e){t||i({type:"initialized",context:e})})).catch((function(e){t||i({type:"handshake failure",error:e})}));var n=e.events.on(u.EventType.CONTEXT_CHANGE,(function(e){i({type:"initialized",context:e})}));return function(){t=!0,n()}}),[e]),n}(e);switch(t.type){case"handshake failure":case"initializing":return;case"initialized":return t.context}}},266:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useCustomWidgetOptions=void 0;var u=o(n(669)),a=o(n(156)),c=o(n(54));t.useCustomWidgetOptions=function(e,t){var n,i=c.useContext(e),r=a.useState(null!=t?t:{}),o=r[0],f=r[1];return a.useEffect((function(){var e;null!=(null===(e=null==i?void 0:i.widget)||void 0===e?void 0:e.definition.options)&&f(i.widget.definition.options)}),[null===(n=null==i?void 0:i.widget)||void 0===n?void 0:n.definition.options]),a.useEffect((function(){var t=e.events.on(u.EventType.DASHBOARD_CUSTOM_WIDGET_OPTIONS_CHANGE,f);return function(){t()}}),[e.events]),o}},657:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useTemplateVariable=void 0;var u=o(n(669)),a=o(n(156)),c=o(n(54));function f(e,t){var n=t.find((function(t){return t.name===e}));if(null!=(null==n?void 0:n.value))return n.value}t.useTemplateVariable=function(e,t){var n,i=c.useContext(e),r=a.useState(),o=r[0],l=r[1];return a.useEffect((function(){var e,n,r=null!==(n=null===(e=null==i?void 0:i.dashboard)||void 0===e?void 0:e.templateVars)&&void 0!==n?n:[],o=f(t,r);null!=o&&l(o)}),[null===(n=null==i?void 0:i.dashboard)||void 0===n?void 0:n.templateVars,t]),a.useEffect((function(){var n=e.events.on(u.EventType.DASHBOARD_TEMPLATE_VAR_CHANGE,(function(e){var n=f(t,e);null!=n&&l(n)}));return function(){n()}}),[e.events,t]),o}},669:function(t){t.exports=e},156:function(e){e.exports=t}},i={};return function e(t){var r=i[t];if(void 0!==r)return r.exports;var o=i[t]={exports:{}};return n[t].call(o.exports,o,o.exports,e),o.exports}(920)}()})); | ||
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t(require("@datadog/ui-extensions-sdk"),require("react")):"function"==typeof define&&define.amd?define(["@datadog/ui-extensions-sdk","react"],t):"object"==typeof exports?exports.DD_REACT=t(require("@datadog/ui-extensions-sdk"),require("react")):e.DD_REACT=t(e["@datadog/ui-extensions-sdk"],e.react)}(self,(function(e,t){return function(){"use strict";var n={920:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__exportStar||function(e,t){for(var n in e)"default"===n||Object.prototype.hasOwnProperty.call(t,n)||i(t,e,n)};Object.defineProperty(t,"__esModule",{value:!0}),r(n(54),t),r(n(657),t)},54:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useContext=void 0;var u=o(n(669)),a=o(n(156));t.useContext=function(e){var t=function(e){var t=a.useState({type:"initializing"}),n=t[0],i=t[1];return a.useEffect((function(){var t=!1;e.getContext().then((function(e){t||i({type:"initialized",context:e})})).catch((function(e){t||i({type:"handshake failure",error:e})}));var n=e.events.on(u.EventType.CONTEXT_CHANGE,(function(e){i({type:"initialized",context:e})}));return function(){t=!0,n()}}),[e]),n}(e);switch(t.type){case"handshake failure":case"initializing":return;case"initialized":return t.context}}},657:function(e,t,n){var i=this&&this.__createBinding||(Object.create?function(e,t,n,i){void 0===i&&(i=n),Object.defineProperty(e,i,{enumerable:!0,get:function(){return t[n]}})}:function(e,t,n,i){void 0===i&&(i=n),e[i]=t[n]}),r=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),o=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)"default"!==n&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return r(t,e),t};Object.defineProperty(t,"__esModule",{value:!0}),t.useTemplateVariable=void 0;var u=o(n(669)),a=o(n(156)),c=o(n(54));function f(e,t){var n=t.find((function(t){return t.name===e}));if(null!=(null==n?void 0:n.value))return n.value}t.useTemplateVariable=function(e,t){var n,i=c.useContext(e),r=a.useState(),o=r[0],s=r[1];return a.useEffect((function(){var e,n,r=null!==(n=null===(e=null==i?void 0:i.dashboard)||void 0===e?void 0:e.templateVars)&&void 0!==n?n:[],o=f(t,r);null!=o&&s(o)}),[null===(n=null==i?void 0:i.dashboard)||void 0===n?void 0:n.templateVars,t]),a.useEffect((function(){var n=e.events.on(u.EventType.DASHBOARD_TEMPLATE_VAR_CHANGE,(function(e){var n=f(t,e);null!=n&&s(n)}));return function(){n()}}),[e.events,t]),o}},669:function(t){t.exports=e},156:function(e){e.exports=t}},i={};return function e(t){var r=i[t];if(void 0!==r)return r.exports;var o=i[t]={exports:{}};return n[t].call(o.exports,o,o.exports,e),o.exports}(920)}()})); | ||
//# sourceMappingURL=ui-extensions-react.min.js.map |
{ | ||
"name": "@datadog/ui-extensions-react", | ||
"version": "0.28.1-canary.108.2a792a6.0", | ||
"version": "0.29.0", | ||
"description": "Datadog UI Extensions - React helpers", | ||
@@ -40,7 +40,6 @@ "homepage": "https://github.com/DataDog/apps/tree/master/packages/ui-extensions-react", | ||
"peerDependencies": { | ||
"@datadog/ui-extensions-sdk": "0.28.0", | ||
"@datadog/ui-extensions-sdk": "0.29.0", | ||
"react": "^17.0.2" | ||
}, | ||
"typedocMain": "src/index.ts", | ||
"gitHead": "2a792a6fc6654c1d450873ccfa06728123fc0e35" | ||
"typedocMain": "src/index.ts" | ||
} |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32145
10
95