@australiangreens/ag-internal-components 0.1.10 → 0.1.12
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.
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/index.cjs.map +1 -1
- package/dist/components/SingleAutocomplete/index.d.ts +8 -0
- package/dist/components/SingleAutocomplete/index.d.ts.map +1 -1
- package/dist/esm/index.js +285 -283
- package/dist/esm/index.js.map +1 -1
- package/dist/utils/consoleSuppression.d.ts +20 -0
- package/dist/utils/consoleSuppression.d.ts.map +1 -0
- package/dist/utils/index.d.ts +1 -0
- package/dist/utils/index.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
type SuppressionFilter = RegExp | ((...data: unknown[]) => boolean);
|
|
2
|
+
type ConsoleFn = 'log' | 'error' | 'warn' | 'info' | 'debug';
|
|
3
|
+
/**
|
|
4
|
+
* If called, will replace the underlying console function with a wrapper that
|
|
5
|
+
* will prevent the original from being called if a filter matches. A filter can
|
|
6
|
+
* either be a regex or a function that returns true on a match.
|
|
7
|
+
*
|
|
8
|
+
* Motivation: Originally implemented to provide a way to suppress the harmless
|
|
9
|
+
* MUI warnings generated by SingleAutocomplete component
|
|
10
|
+
*/
|
|
11
|
+
export declare function suppressConsole(fn: ConsoleFn, filters: SuppressionFilter[]): void;
|
|
12
|
+
/**
|
|
13
|
+
* Reset console[fn] to original. If fn is not specified, resets all functions
|
|
14
|
+
* (log, error, warn, info, debug)
|
|
15
|
+
*
|
|
16
|
+
* NOTE: Unsure if this will work in most cases
|
|
17
|
+
*/
|
|
18
|
+
export declare function unsuppressConsole(fn?: ConsoleFn): void;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=consoleSuppression.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"consoleSuppression.d.ts","sourceRoot":"","sources":["../../src/utils/consoleSuppression.ts"],"names":[],"mappings":"AAAA,KAAK,iBAAiB,GAAG,MAAM,GAAG,CAAC,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,CAAC;AAEpE,KAAK,SAAS,GAAG,KAAK,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAW7D;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,EAAE,EAAE,SAAS,EAAE,OAAO,EAAE,iBAAiB,EAAE,QAiB1E;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,CAAC,EAAE,SAAS,QAQ/C"}
|
package/dist/utils/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/utils/index.ts"],"names":[],"mappings":"AAAA,cAAc,sBAAsB,CAAC;AACrC,cAAc,kBAAkB,CAAC"}
|
package/package.json
CHANGED