mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
packages/ui-components/tooltip
Signed-off-by: Gabriel <gaccettola@mirantis.com>
This commit is contained in:
1 parent
67fa57c15c
commit
6404993432
434 files changed
+45562
-38
No files matched your search
@@ -0,0 +1,6 @@
|
||||
export * from "./src/flush-promises";
|
||||
export * from "./src/get-global-override-for-function";
|
||||
export * from "./src/get-global-override";
|
||||
export * from "./src/get-promise-status";
|
||||
export * from "./src/render-for";
|
||||
export * from "./src/run-with-thrown-mobx-reactions";
|
||||
@@ -0,0 +1 @@
|
||||
(()=>{"use strict";var e={n:r=>{var t=r&&r.__esModule?()=>r.default:()=>r;return e.d(t,{a:t}),t},d:(r,t)=>{for(var o in t)e.o(t,o)&&!e.o(r,o)&&Object.defineProperty(r,o,{enumerable:!0,get:t[o]})},o:(e,r)=>Object.prototype.hasOwnProperty.call(e,r),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},r={};e.r(r),e.d(r,{flushPromises:()=>o,getGlobalOverride:()=>i,getGlobalOverrideForFunction:()=>a,getPromiseStatus:()=>l,renderFor:()=>b,runWithThrownMobxReactions:()=>f});const t=require("timers/promises"),o=async()=>{await(0,t.setImmediate)(),await(0,t.setTimeout)(5)},i=(e,r)=>({injectable:e,overridingInstantiate:r}),n=require("lodash/fp"),a=e=>i(e,(()=>(...r)=>{throw console.warn(`Tried to invoke a function "${e.id}" without override. The args were:`,r),new Error(`Tried to invoke a function "${e.id}" without override. Add eg. "di.override(${(0,n.camelCase)(e.id)}Mock)" to the unit test interested in this.`)})),l=async e=>{const r={fulfilled:!1};return e.finally((()=>{r.fulfilled=!0})),await o(),r},d=require("react");var s=e.n(d);const u=require("@testing-library/react"),c=require("@ogre-tools/injectable-react"),b=e=>r=>{const t=(0,u.render)(s().createElement(c.DiContextProvider,{value:{di:e}},r));return{...t,rerender:r=>t.rerender(s().createElement(c.DiContextProvider,{value:{di:e}},r))}},w=require("mobx"),f=e=>{const r=console.warn;let t;console.warn=n.noop,(0,w.configure)({disableErrorBoundaries:!0}),console.warn=r;try{e()}catch(e){t=e}finally{throw(0,w.configure)({disableErrorBoundaries:!1}),(0,w._resetGlobalState)(),t||new Error("Tried to run with thrown MobX reactions but nothing was thrown")}};module.exports=r})();
|
||||
@@ -0,0 +1 @@
|
||||
export declare const flushPromises: () => Promise<void>;
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import type { Injectable } from "@ogre-tools/injectable";
|
||||
export declare const getGlobalOverrideForFunction: (injectable: Injectable<Function, any, any>) => {
|
||||
injectable: Injectable<Function, unknown, any>;
|
||||
overridingInstantiate: import("@ogre-tools/injectable").Instantiate<Function, any>;
|
||||
};
|
||||
@@ -0,0 +1,13 @@
|
||||
/**
|
||||
* Copyright (c) OpenLens Authors. All rights reserved.
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import type { Injectable, Instantiate } from "@ogre-tools/injectable";
|
||||
export interface GlobalOverride<Instance, Param> {
|
||||
injectable: Injectable<Instance, unknown, Param>;
|
||||
overridingInstantiate: Instantiate<Instance, Param>;
|
||||
}
|
||||
export declare const getGlobalOverride: <Instance, Param>(injectable: Injectable<Instance, unknown, Param>, overridingInstantiate: Instantiate<Instance, Param>) => {
|
||||
injectable: Injectable<Instance, unknown, Param>;
|
||||
overridingInstantiate: Instantiate<Instance, Param>;
|
||||
};
|
||||
@@ -0,0 +1,3 @@
|
||||
export declare const getPromiseStatus: (promise: Promise<unknown>) => Promise<{
|
||||
fulfilled: boolean;
|
||||
}>;
|
||||
@@ -0,0 +1,7 @@
|
||||
import React from "react";
|
||||
import type { RenderResult } from "@testing-library/react";
|
||||
import type { DiContainer } from "@ogre-tools/injectable";
|
||||
export type DiRender = (ui: React.ReactElement) => RenderResult;
|
||||
type DiRenderFor = (di: DiContainer) => DiRender;
|
||||
export declare const renderFor: DiRenderFor;
|
||||
export {};
|
||||
+1
@@ -0,0 +1 @@
|
||||
export declare const runWithThrownMobxReactions: (callback: () => void) => never;
|
||||
Reference in new issue
Block a user