@entur/utils 0.4.2 → 0.4.3
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/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,10 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [0.4.3](https://bitbucket.org/enturas/design-system/compare/@entur/utils@0.4.2...@entur/utils@0.4.3) (2022-02-09)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @entur/utils
|
|
9
|
+
|
|
6
10
|
## [0.4.2](https://bitbucket.org/enturas/design-system/compare/@entur/utils@0.4.1...@entur/utils@0.4.2) (2021-06-25)
|
|
7
11
|
|
|
8
12
|
### Bug Fixes
|
|
@@ -2,10 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
var React = require('react');
|
|
6
|
+
var warning = require('tiny-warning');
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
|
|
8
|
+
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
9
|
+
|
|
10
|
+
var React__default = /*#__PURE__*/_interopDefaultLegacy(React);
|
|
11
|
+
var warning__default = /*#__PURE__*/_interopDefaultLegacy(warning);
|
|
9
12
|
|
|
10
13
|
function debounce(fn, delay) {
|
|
11
14
|
var id;
|
|
@@ -22,13 +25,13 @@ function debounce(fn, delay) {
|
|
|
22
25
|
}
|
|
23
26
|
|
|
24
27
|
var useRandomId = function useRandomId(prefix) {
|
|
25
|
-
var ref =
|
|
28
|
+
var ref = React__default["default"].useRef(String(Math.random()).substring(2));
|
|
26
29
|
return prefix + "-" + ref.current;
|
|
27
30
|
};
|
|
28
31
|
|
|
29
32
|
function useOnMount(callback) {
|
|
30
|
-
var hasRun =
|
|
31
|
-
|
|
33
|
+
var hasRun = React__default["default"].useRef(false);
|
|
34
|
+
React__default["default"].useEffect(function () {
|
|
32
35
|
if (!hasRun.current) {
|
|
33
36
|
hasRun.current = true;
|
|
34
37
|
callback();
|
|
@@ -45,7 +48,7 @@ function checkAndWarn() {
|
|
|
45
48
|
}).sort(); // Finally, we warn about those pesky imports
|
|
46
49
|
|
|
47
50
|
var singleMissingImport = missingImports.length === 1;
|
|
48
|
-
|
|
51
|
+
warning__default["default"](missingImports.length === 0, "You are missing " + (singleMissingImport ? 'a CSS import' : missingImports.length + " CSS imports") + "!\n\nPlease add the following CSS import" + (singleMissingImport ? '' : 's') + " somewhere in your app:\n\n" + missingImports.map(function (namespace) {
|
|
49
52
|
return "\t@import '~@entur/" + namespace + "/dist/styles.css';";
|
|
50
53
|
}).join('\n') + "\n") ;
|
|
51
54
|
}
|
|
@@ -54,7 +57,7 @@ function checkAndWarn() {
|
|
|
54
57
|
|
|
55
58
|
function warnAboutMissingStyles() {
|
|
56
59
|
// We skip this check in production, and when we build static sites
|
|
57
|
-
if (
|
|
60
|
+
if (typeof window === 'undefined') {
|
|
58
61
|
return;
|
|
59
62
|
} // First, let's clear earlier calls to setTimeout
|
|
60
63
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.cjs.development.js","sources":["../src/debounce.ts","../src/useRandomId.ts","../src/useOnMount.ts","../src/warnAboutMissingStyles.ts"],"sourcesContent":["export function debounce(fn: Function, delay: number) {\n let id: any;\n return (...args: any) => {\n clearTimeout(id);\n id = setTimeout(() => fn(...args), delay);\n };\n}\n","import React from 'react';\n\nexport const useRandomId = (prefix?: string) => {\n const ref = React.useRef(String(Math.random()).substring(2));\n return `${prefix}-${ref.current}`;\n};\n","import React from 'react';\n\nexport function useOnMount(callback: () => void): void {\n const hasRun = React.useRef<boolean>(false);\n\n React.useEffect(() => {\n if (!hasRun.current) {\n hasRun.current = true;\n callback();\n }\n }, [callback]);\n}\n","import warning from 'tiny-warning';\n\nconst packagesToCheck: Set<string> = new Set();\nlet checkTimeoutId: number;\n\nfunction checkAndWarn() {\n const missingImports = Array.from(packagesToCheck)\n .filter(\n namespace =>\n parseInt(\n window\n .getComputedStyle(document.documentElement)\n .getPropertyValue(`--eds-${namespace}`),\n ) !== 1,\n )\n .sort();\n\n // Finally, we warn about those pesky imports\n const singleMissingImport = missingImports.length === 1;\n warning(\n missingImports.length === 0,\n `You are missing ${\n singleMissingImport\n ? 'a CSS import'\n : `${missingImports.length} CSS imports`\n }!\n\nPlease add the following CSS import${\n singleMissingImport ? '' : 's'\n } somewhere in your app:\n\n${missingImports\n .map(namespace => `\\t@import '~@entur/${namespace}/dist/styles.css';`)\n .join('\\n')}\n`,\n );\n}\n\n/** Warns the developer if they have forgotten to include styles */\nexport function warnAboutMissingStyles(...namespaces: string[]) {\n // We skip this check in production, and when we build static sites\n if (!__DEV__ || typeof window === 'undefined') {\n return;\n }\n // First, let's clear earlier calls to setTimeout\n window.clearTimeout(checkTimeoutId);\n\n // Next, let's add all namespaces to the set of packages to check\n namespaces.forEach(namespace => packagesToCheck.add(namespace));\n\n // Finally. let's trigger a run of the checker.\n checkTimeoutId = window.setTimeout(checkAndWarn, 1000);\n}\n"],"names":["debounce","fn","delay","id","args","clearTimeout","setTimeout","useRandomId","prefix","ref","React","useRef","String","Math","random","substring","current","useOnMount","callback","hasRun","useEffect","packagesToCheck","Set","checkTimeoutId","checkAndWarn","missingImports","Array","from","filter","namespace","parseInt","window","getComputedStyle","document","documentElement","getPropertyValue","sort","singleMissingImport","length","warning","map","join","warnAboutMissingStyles","namespaces","forEach","add"],"mappings":"
|
|
1
|
+
{"version":3,"file":"utils.cjs.development.js","sources":["../src/debounce.ts","../src/useRandomId.ts","../src/useOnMount.ts","../src/warnAboutMissingStyles.ts"],"sourcesContent":["export function debounce(fn: Function, delay: number) {\n let id: any;\n return (...args: any) => {\n clearTimeout(id);\n id = setTimeout(() => fn(...args), delay);\n };\n}\n","import React from 'react';\n\nexport const useRandomId = (prefix?: string) => {\n const ref = React.useRef(String(Math.random()).substring(2));\n return `${prefix}-${ref.current}`;\n};\n","import React from 'react';\n\nexport function useOnMount(callback: () => void): void {\n const hasRun = React.useRef<boolean>(false);\n\n React.useEffect(() => {\n if (!hasRun.current) {\n hasRun.current = true;\n callback();\n }\n }, [callback]);\n}\n","import warning from 'tiny-warning';\n\nconst packagesToCheck: Set<string> = new Set();\nlet checkTimeoutId: number;\n\nfunction checkAndWarn() {\n const missingImports = Array.from(packagesToCheck)\n .filter(\n namespace =>\n parseInt(\n window\n .getComputedStyle(document.documentElement)\n .getPropertyValue(`--eds-${namespace}`),\n ) !== 1,\n )\n .sort();\n\n // Finally, we warn about those pesky imports\n const singleMissingImport = missingImports.length === 1;\n warning(\n missingImports.length === 0,\n `You are missing ${\n singleMissingImport\n ? 'a CSS import'\n : `${missingImports.length} CSS imports`\n }!\n\nPlease add the following CSS import${\n singleMissingImport ? '' : 's'\n } somewhere in your app:\n\n${missingImports\n .map(namespace => `\\t@import '~@entur/${namespace}/dist/styles.css';`)\n .join('\\n')}\n`,\n );\n}\n\n/** Warns the developer if they have forgotten to include styles */\nexport function warnAboutMissingStyles(...namespaces: string[]) {\n // We skip this check in production, and when we build static sites\n if (!__DEV__ || typeof window === 'undefined') {\n return;\n }\n // First, let's clear earlier calls to setTimeout\n window.clearTimeout(checkTimeoutId);\n\n // Next, let's add all namespaces to the set of packages to check\n namespaces.forEach(namespace => packagesToCheck.add(namespace));\n\n // Finally. let's trigger a run of the checker.\n checkTimeoutId = window.setTimeout(checkAndWarn, 1000);\n}\n"],"names":["debounce","fn","delay","id","args","clearTimeout","setTimeout","useRandomId","prefix","ref","React","useRef","String","Math","random","substring","current","useOnMount","callback","hasRun","useEffect","packagesToCheck","Set","checkTimeoutId","checkAndWarn","missingImports","Array","from","filter","namespace","parseInt","window","getComputedStyle","document","documentElement","getPropertyValue","sort","singleMissingImport","length","warning","map","join","warnAboutMissingStyles","namespaces","forEach","add"],"mappings":";;;;;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AmB,GACf,cADe,GAEZZ,cAAc,CAACa,MAFH,iBAHhB,kDASHD,mBAAmB,GAAG,EAAH,GAAQ,GATxB,oCAYPZ,cAAc,CACbe,GADD,CACK,UAAAX,SAAS;AAAA,mCAA0BA,SAA1B;AAAA,GADd,EAECY,IAFD,CAEM,IAFN,CAZO,QAAP;AAiBD;AAED;;;SACgBC;AACd;AACA,MAAgB,OAAOX,MAAP,KAAkB,WAAlC,EAA+C;AAC7C;AACD;;;AAEDA,EAAAA,MAAM,CAAC1B,YAAP,CAAoBkB,cAApB;;oCANwCoB;AAAAA,IAAAA;;;AASxCA,EAAAA,UAAU,CAACC,OAAX,CAAmB,UAAAf,SAAS;AAAA,WAAIR,eAAe,CAACwB,GAAhB,CAAoBhB,SAApB,CAAJ;AAAA,GAA5B;;AAGAN,EAAAA,cAAc,GAAGQ,MAAM,CAACzB,UAAP,CAAkBkB,YAAlB,EAAgC,IAAhC,CAAjB;AACD;;;;;;;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react");function t(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}require("tiny-warning");var r=t(e);exports.debounce=function(e,t){var r;return function(){for(var n=arguments.length,u=new Array(n),o=0;o<n;o++)u[o]=arguments[o];clearTimeout(r),r=setTimeout((function(){return e.apply(void 0,u)}),t)}},exports.useOnMount=function(e){var t=r.default.useRef(!1);r.default.useEffect((function(){t.current||(t.current=!0,e())}),[e])},exports.useRandomId=function(e){return e+"-"+r.default.useRef(String(Math.random()).substring(2)).current},exports.warnAboutMissingStyles=function(){};
|
|
2
2
|
//# sourceMappingURL=utils.cjs.production.min.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.cjs.production.min.js","sources":["../src/debounce.ts","../src/useOnMount.ts","../src/useRandomId.ts"
|
|
1
|
+
{"version":3,"file":"utils.cjs.production.min.js","sources":["../src/debounce.ts","../src/useOnMount.ts","../src/useRandomId.ts"],"sourcesContent":["export function debounce(fn: Function, delay: number) {\n let id: any;\n return (...args: any) => {\n clearTimeout(id);\n id = setTimeout(() => fn(...args), delay);\n };\n}\n","import React from 'react';\n\nexport function useOnMount(callback: () => void): void {\n const hasRun = React.useRef<boolean>(false);\n\n React.useEffect(() => {\n if (!hasRun.current) {\n hasRun.current = true;\n callback();\n }\n }, [callback]);\n}\n","import React from 'react';\n\nexport const useRandomId = (prefix?: string) => {\n const ref = React.useRef(String(Math.random()).substring(2));\n return `${prefix}-${ref.current}`;\n};\n"],"names":["fn","delay","id","args","clearTimeout","setTimeout","callback","hasRun","React","useRef","useEffect","current","prefix","String","Math","random","substring"],"mappings":"gOAAyBA,EAAcC,OACjCC,SACG,sCAAIC,2BAAAA,kBACTC,aAAaF,GACbA,EAAKG,YAAW,kBAAML,eAAMG,KAAOF,iCCFZK,OACnBC,EAASC,UAAMC,QAAgB,GAErCD,UAAME,WAAU,WACTH,EAAOI,UACVJ,EAAOI,SAAU,EACjBL,OAED,CAACA,yBCRqB,SAACM,UAEhBA,MADEJ,UAAMC,OAAOI,OAAOC,KAAKC,UAAUC,UAAU,IACjCL"}
|
package/dist/utils.esm.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.esm.js","sources":["../src/debounce.ts","../src/useRandomId.ts","../src/useOnMount.ts","../src/warnAboutMissingStyles.ts"],"sourcesContent":["export function debounce(fn: Function, delay: number) {\n let id: any;\n return (...args: any) => {\n clearTimeout(id);\n id = setTimeout(() => fn(...args), delay);\n };\n}\n","import React from 'react';\n\nexport const useRandomId = (prefix?: string) => {\n const ref = React.useRef(String(Math.random()).substring(2));\n return `${prefix}-${ref.current}`;\n};\n","import React from 'react';\n\nexport function useOnMount(callback: () => void): void {\n const hasRun = React.useRef<boolean>(false);\n\n React.useEffect(() => {\n if (!hasRun.current) {\n hasRun.current = true;\n callback();\n }\n }, [callback]);\n}\n","import warning from 'tiny-warning';\n\nconst packagesToCheck: Set<string> = new Set();\nlet checkTimeoutId: number;\n\nfunction checkAndWarn() {\n const missingImports = Array.from(packagesToCheck)\n .filter(\n namespace =>\n parseInt(\n window\n .getComputedStyle(document.documentElement)\n .getPropertyValue(`--eds-${namespace}`),\n ) !== 1,\n )\n .sort();\n\n // Finally, we warn about those pesky imports\n const singleMissingImport = missingImports.length === 1;\n warning(\n missingImports.length === 0,\n `You are missing ${\n singleMissingImport\n ? 'a CSS import'\n : `${missingImports.length} CSS imports`\n }!\n\nPlease add the following CSS import${\n singleMissingImport ? '' : 's'\n } somewhere in your app:\n\n${missingImports\n .map(namespace => `\\t@import '~@entur/${namespace}/dist/styles.css';`)\n .join('\\n')}\n`,\n );\n}\n\n/** Warns the developer if they have forgotten to include styles */\nexport function warnAboutMissingStyles(...namespaces: string[]) {\n // We skip this check in production, and when we build static sites\n if (!__DEV__ || typeof window === 'undefined') {\n return;\n }\n // First, let's clear earlier calls to setTimeout\n window.clearTimeout(checkTimeoutId);\n\n // Next, let's add all namespaces to the set of packages to check\n namespaces.forEach(namespace => packagesToCheck.add(namespace));\n\n // Finally. let's trigger a run of the checker.\n checkTimeoutId = window.setTimeout(checkAndWarn, 1000);\n}\n"],"names":["debounce","fn","delay","id","args","clearTimeout","setTimeout","useRandomId","prefix","ref","React","useRef","String","Math","random","substring","current","useOnMount","callback","hasRun","useEffect","packagesToCheck","Set","checkTimeoutId","checkAndWarn","missingImports","Array","from","filter","namespace","parseInt","window","getComputedStyle","document","documentElement","getPropertyValue","sort","singleMissingImport","length","warning","map","join","warnAboutMissingStyles","namespaces","forEach","add"],"mappings":";;;SAAgBA,SAASC,IAAcC;AACrC,MAAIC,EAAJ;AACA,SAAO;sCAAIC;AAAAA,MAAAA;;;AACTC,IAAAA,YAAY,CAACF,EAAD,CAAZ;AACAA,IAAAA,EAAE,GAAGG,UAAU,CAAC;AAAA,aAAML,EAAE,MAAF,SAAMG,IAAN,CAAN;AAAA,KAAD,EAAoBF,KAApB,CAAf;AACD,GAHD;AAID;;ICJYK,WAAW,GAAG,SAAdA,WAAc,CAACC,MAAD;AACzB,MAAMC,GAAG,GAAGC,KAAK,CAACC,MAAN,CAAaC,MAAM,CAACC,IAAI,CAACC,MAAL,EAAD,CAAN,CAAsBC,SAAtB,CAAgC,CAAhC,CAAb,CAAZ;AACA,SAAUP,MAAV,SAAoBC,GAAG,CAACO,OAAxB;AACD
|
|
1
|
+
{"version":3,"file":"utils.esm.js","sources":["../src/debounce.ts","../src/useRandomId.ts","../src/useOnMount.ts","../src/warnAboutMissingStyles.ts"],"sourcesContent":["export function debounce(fn: Function, delay: number) {\n let id: any;\n return (...args: any) => {\n clearTimeout(id);\n id = setTimeout(() => fn(...args), delay);\n };\n}\n","import React from 'react';\n\nexport const useRandomId = (prefix?: string) => {\n const ref = React.useRef(String(Math.random()).substring(2));\n return `${prefix}-${ref.current}`;\n};\n","import React from 'react';\n\nexport function useOnMount(callback: () => void): void {\n const hasRun = React.useRef<boolean>(false);\n\n React.useEffect(() => {\n if (!hasRun.current) {\n hasRun.current = true;\n callback();\n }\n }, [callback]);\n}\n","import warning from 'tiny-warning';\n\nconst packagesToCheck: Set<string> = new Set();\nlet checkTimeoutId: number;\n\nfunction checkAndWarn() {\n const missingImports = Array.from(packagesToCheck)\n .filter(\n namespace =>\n parseInt(\n window\n .getComputedStyle(document.documentElement)\n .getPropertyValue(`--eds-${namespace}`),\n ) !== 1,\n )\n .sort();\n\n // Finally, we warn about those pesky imports\n const singleMissingImport = missingImports.length === 1;\n warning(\n missingImports.length === 0,\n `You are missing ${\n singleMissingImport\n ? 'a CSS import'\n : `${missingImports.length} CSS imports`\n }!\n\nPlease add the following CSS import${\n singleMissingImport ? '' : 's'\n } somewhere in your app:\n\n${missingImports\n .map(namespace => `\\t@import '~@entur/${namespace}/dist/styles.css';`)\n .join('\\n')}\n`,\n );\n}\n\n/** Warns the developer if they have forgotten to include styles */\nexport function warnAboutMissingStyles(...namespaces: string[]) {\n // We skip this check in production, and when we build static sites\n if (!__DEV__ || typeof window === 'undefined') {\n return;\n }\n // First, let's clear earlier calls to setTimeout\n window.clearTimeout(checkTimeoutId);\n\n // Next, let's add all namespaces to the set of packages to check\n namespaces.forEach(namespace => packagesToCheck.add(namespace));\n\n // Finally. let's trigger a run of the checker.\n checkTimeoutId = window.setTimeout(checkAndWarn, 1000);\n}\n"],"names":["debounce","fn","delay","id","args","clearTimeout","setTimeout","useRandomId","prefix","ref","React","useRef","String","Math","random","substring","current","useOnMount","callback","hasRun","useEffect","packagesToCheck","Set","checkTimeoutId","checkAndWarn","missingImports","Array","from","filter","namespace","parseInt","window","getComputedStyle","document","documentElement","getPropertyValue","sort","singleMissingImport","length","warning","map","join","warnAboutMissingStyles","namespaces","forEach","add"],"mappings":";;;SAAgBA,SAASC,IAAcC;AACrC,MAAIC,EAAJ;AACA,SAAO;sCAAIC;AAAAA,MAAAA;;;AACTC,IAAAA,YAAY,CAACF,EAAD,CAAZ;AACAA,IAAAA,EAAE,GAAGG,UAAU,CAAC;AAAA,aAAML,EAAE,MAAF,SAAMG,IAAN,CAAN;AAAA,KAAD,EAAoBF,KAApB,CAAf;AACD,GAHD;AAID;;ICJYK,WAAW,GAAG,SAAdA,WAAc,CAACC,MAAD;AACzB,MAAMC,GAAG,GAAGC,KAAK,CAACC,MAAN,CAAaC,MAAM,CAACC,IAAI,CAACC,MAAL,EAAD,CAAN,CAAsBC,SAAtB,CAAgC,CAAhC,CAAb,CAAZ;AACA,SAAUP,MAAV,SAAoBC,GAAG,CAACO,OAAxB;AACD;;SCHeC,WAAWC;AACzB,MAAMC,MAAM,GAAGT,KAAK,CAACC,MAAN,CAAsB,KAAtB,CAAf;AAEAD,EAAAA,KAAK,CAACU,SAAN,CAAgB;AACd,QAAI,CAACD,MAAM,CAACH,OAAZ,EAAqB;AACnBG,MAAAA,MAAM,CAACH,OAAP,GAAiB,IAAjB;AACAE,MAAAA,QAAQ;AACT;AACF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|
4
4
|
"license": "EUPL-1.2",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"module": "dist/utils.esm.js",
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"access": "public"
|
|
18
18
|
},
|
|
19
19
|
"scripts": {
|
|
20
|
-
"start": "
|
|
21
|
-
"build": "
|
|
22
|
-
"test": "
|
|
23
|
-
"lint": "
|
|
20
|
+
"start": "dts watch --noClean",
|
|
21
|
+
"build": "dts build && cp src/*.scss dist",
|
|
22
|
+
"test": "dts test --env=jsdom",
|
|
23
|
+
"lint": "dts lint"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"react": ">=16.8.0",
|
|
@@ -30,5 +30,5 @@
|
|
|
30
30
|
"react-polymorphic-types": "^1.1.0",
|
|
31
31
|
"tiny-warning": "^1.0.3"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "61e643371cfc5653c93160b7c220152e5b2bafeb"
|
|
34
34
|
}
|