@pinnacle0/web-ui 0.3.61 → 0.3.63

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.
@@ -20,7 +20,7 @@ var Markdown = /** @class */ (function (_super) {
20
20
  function Markdown() {
21
21
  var _this = _super !== null && _super.apply(this, arguments) || this;
22
22
  _this.renderBold = function (content, index) {
23
- var splitContents = content.split("__");
23
+ var splitContents = content.split(/__|\*\*/);
24
24
  return React.createElement(React.Fragment, { key: index }, splitContents.map(function (_, segmentIndex) { return (segmentIndex % 2 === 1 ? React.createElement("b", { key: "bold" + segmentIndex }, _) : _); }));
25
25
  };
26
26
  _this.renderLine = function (content, index) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/Markdown/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,cAAc,CAAC;AAetB;IAA8B,4BAA0B;IAAxD;QAAA,qEAyBC;QAtBG,gBAAU,GAAG,UAAC,OAAe,EAAE,KAAa;YACxC,IAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;YAC1C,OAAO,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,KAAK,IAAG,aAAa,CAAC,GAAG,CAAC,UAAC,CAAC,EAAE,YAAY,IAAK,OAAA,CAAC,YAAY,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,2BAAG,GAAG,EAAE,MAAM,GAAG,YAAY,IAAG,CAAC,CAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAArE,CAAqE,CAAC,CAAkB,CAAC;QACxK,CAAC,CAAC;QAEF,gBAAU,GAAG,UAAC,OAAe,EAAE,KAAa;YACxC,IAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACzC,OAAO,CACH,6BAAK,SAAS,EAAC,MAAM,EAAC,GAA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Y,IAAG,CAAC,CAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAArE,CAAqE,CAAC,CAAkB,CAAC;QACxK,CAAC,CAAC;QAEF,gBAAU,GAAG,UAAC,OAAe,EAAE,KAAa;YACxC,IAAM,aAAa,GAAG,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;YACzC,OAAO,CACH,6BAAK,SAAS,EAAC,MAAM,EAAC,GAAG,EAAE,KAAK,IAC3B,aAAa,CAAC,GAAG,CAAC,UAAC,CAAC,EAAE,YAAY,IAAK,OAAA,CAAC,YAAY,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,4BAAI,GAAG,EAAE,YAAY,IAAG,CAAC,CAAM,CAAC,CAAC,CAAC,KAAI,CAAC,UAAU,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC,EAA7F,CAA6F,CAAC,CACpI,CACT,CAAC;QACN,CAAC,CAAC;;IAUN,CAAC;IARG,yBAAM,GAAN;QACU,IAAA,KAAoB,IAAI,CAAC,KAAK,EAA7B,QAAQ,cAAA,EAAE,KAAK,WAAc,CAAC;QACrC,OAAO,CACH,6BAAK,SAAS,EAAC,YAAY,EAAC,KAAK,EAAE,KAAK,IACnC,QAAQ,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,UAAU,CAAC,CACxC,CACT,CAAC;IACN,CAAC;IAvBM,oBAAW,GAAG,UAAU,CAAC;IAwBpC,eAAC;CAAA,AAzBD,CAA8B,KAAK,CAAC,aAAa,GAyBhD;SAzBY,QAAQ"}
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ import type { ProgressProps } from "antd/lib/progress";
3
+ import "antd/lib/progress/style";
4
+ interface Props extends ProgressProps {
5
+ }
6
+ export declare class Popover extends React.PureComponent<Props> {
7
+ static displayName: string;
8
+ render(): JSX.Element;
9
+ }
10
+ export {};
@@ -0,0 +1,42 @@
1
+ var __extends = (this && this.__extends) || (function () {
2
+ var extendStatics = function (d, b) {
3
+ extendStatics = Object.setPrototypeOf ||
4
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
5
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
6
+ return extendStatics(d, b);
7
+ };
8
+ return function (d, b) {
9
+ if (typeof b !== "function" && b !== null)
10
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
11
+ extendStatics(d, b);
12
+ function __() { this.constructor = d; }
13
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
14
+ };
15
+ })();
16
+ var __assign = (this && this.__assign) || function () {
17
+ __assign = Object.assign || function(t) {
18
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
19
+ s = arguments[i];
20
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
21
+ t[p] = s[p];
22
+ }
23
+ return t;
24
+ };
25
+ return __assign.apply(this, arguments);
26
+ };
27
+ import React from "react";
28
+ import Progress from "antd/lib/progress";
29
+ import "antd/lib/progress/style";
30
+ var Popover = /** @class */ (function (_super) {
31
+ __extends(Popover, _super);
32
+ function Popover() {
33
+ return _super !== null && _super.apply(this, arguments) || this;
34
+ }
35
+ Popover.prototype.render = function () {
36
+ return React.createElement(Progress, __assign({}, this.props));
37
+ };
38
+ Popover.displayName = "Progress";
39
+ return Popover;
40
+ }(React.PureComponent));
41
+ export { Popover };
42
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/core/Progress/index.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,QAAQ,MAAM,mBAAmB,CAAC;AAEzC,OAAO,yBAAyB,CAAC;AAIjC;IAA6B,2BAA0B;IAAvD;;IAMA,CAAC;IAHG,wBAAM,GAAN;QACI,OAAO,oBAAC,QAAQ,eAAK,IAAI,CAAC,KAAK,EAAI,CAAC;IACxC,CAAC;IAJM,mBAAW,GAAG,UAAU,CAAC;IAKpC,cAAC;CAAA,AAND,CAA6B,KAAK,CAAC,aAAa,GAM/C;SANY,OAAO"}
@@ -0,0 +1,6 @@
1
+ export declare function useAPI<Request extends any[], Response>(api: (...request: Request) => Promise<Response>, initialRequest: Request): {
2
+ request: Request;
3
+ response: Response | null;
4
+ loading: boolean;
5
+ refresh: (request: Request) => void;
6
+ };
@@ -0,0 +1,56 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __read = (this && this.__read) || function (o, n) {
13
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
14
+ if (!m) return o;
15
+ var i = m.call(o), r, ar = [], e;
16
+ try {
17
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
18
+ }
19
+ catch (error) { e = { error: error }; }
20
+ finally {
21
+ try {
22
+ if (r && !r.done && (m = i["return"])) m.call(i);
23
+ }
24
+ finally { if (e) throw e.error; }
25
+ }
26
+ return ar;
27
+ };
28
+ var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
29
+ if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
30
+ if (ar || !(i in from)) {
31
+ if (!ar) ar = Array.prototype.slice.call(from, 0, i);
32
+ ar[i] = from[i];
33
+ }
34
+ }
35
+ return to.concat(ar || Array.prototype.slice.call(from));
36
+ };
37
+ import React from "react";
38
+ function reducer(state, action) {
39
+ switch (action.type) {
40
+ case "start":
41
+ return __assign(__assign({}, state), { loading: true, request: action.request });
42
+ case "load":
43
+ return __assign(__assign({}, state), { loading: false, data: action.data });
44
+ }
45
+ }
46
+ export function useAPI(api, initialRequest) {
47
+ var _a = __read(React.useReducer(reducer, { request: initialRequest, data: null, loading: false }), 2), _b = _a[0], loading = _b.loading, data = _b.data, request = _b.request, dispatch = _a[1];
48
+ var fetchData = React.useCallback(function (newRequest) { return dispatch({ type: "start", request: newRequest }); }, []);
49
+ React.useEffect(function () {
50
+ dispatch({ type: "start", request: request });
51
+ api.apply(void 0, __spreadArray([], __read(request), false)).then(function (data) { return dispatch({ type: "load", data: data }); });
52
+ // TODO: Review if api change should trigger re-fetch
53
+ }, [request, api, dispatch]);
54
+ return { loading: loading, request: request, response: data, refresh: fetchData };
55
+ }
56
+ //# sourceMappingURL=useAPI.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useAPI.js","sourceRoot":"","sources":["../../src/hooks/useAPI.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAW1B,SAAS,OAAO,CAAkC,KAA+B,EAAE,MAAiC;IAChH,QAAQ,MAAM,CAAC,IAAI,EAAE;QACjB,KAAK,OAAO;YACR,6BAAW,KAAK,KAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,CAAC,OAAO,IAAE;QAC9D,KAAK,MAAM;YACP,6BAAW,KAAK,KAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,CAAC,IAAI,IAAE;KAC5D;AACL,CAAC;AAED,MAAM,UAAU,MAAM,CAClB,GAA+C,EAC/C,cAAuB;IAEjB,IAAA,KAAA,OAAuC,KAAK,CAAC,UAAU,CAAC,OAAuE,EAAE,EAAC,OAAO,EAAE,cAAc,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAC,CAAC,IAAA,EAAtL,UAAwB,EAAvB,OAAO,aAAA,EAAE,IAAI,UAAA,EAAE,OAAO,aAAA,EAAG,QAAQ,QAAoJ,CAAC;IAC9L,IAAM,SAAS,GAAG,KAAK,CAAC,WAAW,CAAC,UAAC,UAAmB,IAAW,OAAA,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,UAAU,EAAC,CAAC,EAA9C,CAA8C,EAAE,EAAE,CAAC,CAAC;IAEvH,KAAK,CAAC,SAAS,CAAC;QACZ,QAAQ,CAAC,EAAC,IAAI,EAAE,OAAO,EAAE,OAAO,SAAA,EAAC,CAAC,CAAC;QACnC,GAAG,wCAAI,OAAO,WAAE,IAAI,CAAC,UAAA,IAAI,IAAI,OAAA,QAAQ,CAAC,EAAC,IAAI,EAAE,MAAM,EAAE,IAAI,MAAA,EAAC,CAAC,EAA9B,CAA8B,CAAC,CAAC;QAC7D,qDAAqD;IACzD,CAAC,EAAE,CAAC,OAAO,EAAE,GAAG,EAAE,QAAQ,CAAC,CAAC,CAAC;IAE7B,OAAO,EAAC,OAAO,SAAA,EAAE,OAAO,SAAA,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAC,CAAC;AAClE,CAAC"}
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Return an array of 3 element, representing:
3
+ * - current boolean value
4
+ * - a function to set the value to true
5
+ * - a function to set the value to false
6
+ *
7
+ * Example usage:
8
+ * const [showModal, openModal, closeModal] = useBool();
9
+ */
10
+ export declare function useBool(initialValue?: boolean): [boolean, () => void, () => void];
@@ -0,0 +1,34 @@
1
+ var __read = (this && this.__read) || function (o, n) {
2
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
3
+ if (!m) return o;
4
+ var i = m.call(o), r, ar = [], e;
5
+ try {
6
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
7
+ }
8
+ catch (error) { e = { error: error }; }
9
+ finally {
10
+ try {
11
+ if (r && !r.done && (m = i["return"])) m.call(i);
12
+ }
13
+ finally { if (e) throw e.error; }
14
+ }
15
+ return ar;
16
+ };
17
+ import React from "react";
18
+ /**
19
+ * Return an array of 3 element, representing:
20
+ * - current boolean value
21
+ * - a function to set the value to true
22
+ * - a function to set the value to false
23
+ *
24
+ * Example usage:
25
+ * const [showModal, openModal, closeModal] = useBool();
26
+ */
27
+ export function useBool(initialValue) {
28
+ if (initialValue === void 0) { initialValue = false; }
29
+ var _a = __read(React.useState(initialValue), 2), value = _a[0], setValue = _a[1];
30
+ var setValueToTrue = React.useCallback(function () { return setValue(true); }, [setValue]);
31
+ var setValueToFalse = React.useCallback(function () { return setValue(false); }, [setValue]);
32
+ return [value, setValueToTrue, setValueToFalse];
33
+ }
34
+ //# sourceMappingURL=useBool.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useBool.js","sourceRoot":"","sources":["../../src/hooks/useBool.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B;;;;;;;;GAQG;AACH,MAAM,UAAU,OAAO,CAAC,YAA6B;IAA7B,6BAAA,EAAA,oBAA6B;IAC3C,IAAA,KAAA,OAAoB,KAAK,CAAC,QAAQ,CAAC,YAAY,CAAC,IAAA,EAA/C,KAAK,QAAA,EAAE,QAAQ,QAAgC,CAAC;IACvD,IAAM,cAAc,GAAG,KAAK,CAAC,WAAW,CAAC,cAAM,OAAA,QAAQ,CAAC,IAAI,CAAC,EAAd,CAAc,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAC3E,IAAM,eAAe,GAAG,KAAK,CAAC,WAAW,CAAC,cAAM,OAAA,QAAQ,CAAC,KAAK,CAAC,EAAf,CAAe,EAAE,CAAC,QAAQ,CAAC,CAAC,CAAC;IAE7E,OAAO,CAAC,KAAK,EAAE,cAAc,EAAE,eAAe,CAAC,CAAC;AACpD,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function useDidMountEffect(onMount: () => void): void;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export function useDidMountEffect(onMount) {
3
+ React.useEffect(function () {
4
+ onMount();
5
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- this is intentional to emulate the behaviour of componentDidMount
6
+ }, []);
7
+ }
8
+ //# sourceMappingURL=useDidMountEffect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDidMountEffect.js","sourceRoot":"","sources":["../../src/hooks/useDidMountEffect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,UAAU,iBAAiB,CAAC,OAAmB;IACjD,KAAK,CAAC,SAAS,CAAC;QACZ,OAAO,EAAE,CAAC;QACV,4HAA4H;IAChI,CAAC,EAAE,EAAE,CAAC,CAAC;AACX,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function useForceUpdate(): () => void;
@@ -0,0 +1,23 @@
1
+ var __read = (this && this.__read) || function (o, n) {
2
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
3
+ if (!m) return o;
4
+ var i = m.call(o), r, ar = [], e;
5
+ try {
6
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
7
+ }
8
+ catch (error) { e = { error: error }; }
9
+ finally {
10
+ try {
11
+ if (r && !r.done && (m = i["return"])) m.call(i);
12
+ }
13
+ finally { if (e) throw e.error; }
14
+ }
15
+ return ar;
16
+ };
17
+ import React from "react";
18
+ export function useForceUpdate() {
19
+ var _a = __read(React.useState(), 2), setState = _a[1];
20
+ var forceUpdate = React.useCallback(function () { return setState({}); }, []);
21
+ return forceUpdate;
22
+ }
23
+ //# sourceMappingURL=useForceUpdate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useForceUpdate.js","sourceRoot":"","sources":["../../src/hooks/useForceUpdate.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,UAAU,cAAc;IACpB,IAAA,KAAA,OAAe,KAAK,CAAC,QAAQ,EAAO,IAAA,EAAjC,QAAQ,QAAyB,CAAC;IAC3C,IAAM,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC,cAAM,OAAA,QAAQ,CAAC,EAAE,CAAC,EAAZ,CAAY,EAAE,EAAE,CAAC,CAAC;IAC9D,OAAO,WAAW,CAAC;AACvB,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function usePrevious<T>(value: T): T;
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ export function usePrevious(value) {
3
+ var ref = React.useRef(value);
4
+ React.useEffect(function () {
5
+ ref.current = value;
6
+ }, [value]);
7
+ return ref.current;
8
+ }
9
+ //# sourceMappingURL=usePrevious.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePrevious.js","sourceRoot":"","sources":["../../src/hooks/usePrevious.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,UAAU,WAAW,CAAI,KAAQ;IACnC,IAAM,GAAG,GAAG,KAAK,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAChC,KAAK,CAAC,SAAS,CAAC;QACZ,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC;IACxB,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC;IACZ,OAAO,GAAG,CAAC,OAAO,CAAC;AACvB,CAAC"}
@@ -0,0 +1,12 @@
1
+ /**
2
+ * TODO: Compare DX with useAPI
3
+ * Use API hook with similar style to other react hooks like useMemo
4
+ * const {response, loading, refresh} = useThunk(() => {new Promise(resolve => resolve("arrow function changes everytime")}, [deps]);
5
+ * @param thunk
6
+ * @param deps
7
+ */
8
+ export declare function useThunk<Response>(thunk: () => Promise<Response>, deps: any[]): {
9
+ response: Response | null;
10
+ loading: boolean;
11
+ refresh: () => void;
12
+ };
@@ -0,0 +1,58 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __read = (this && this.__read) || function (o, n) {
13
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
14
+ if (!m) return o;
15
+ var i = m.call(o), r, ar = [], e;
16
+ try {
17
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
18
+ }
19
+ catch (error) { e = { error: error }; }
20
+ finally {
21
+ try {
22
+ if (r && !r.done && (m = i["return"])) m.call(i);
23
+ }
24
+ finally { if (e) throw e.error; }
25
+ }
26
+ return ar;
27
+ };
28
+ import React from "react";
29
+ function reducer(state, action) {
30
+ switch (action.type) {
31
+ case "start":
32
+ return __assign(__assign({}, state), { loading: true });
33
+ case "load":
34
+ return __assign(__assign({}, state), { loading: false, data: action.data });
35
+ }
36
+ }
37
+ /**
38
+ * TODO: Compare DX with useAPI
39
+ * Use API hook with similar style to other react hooks like useMemo
40
+ * const {response, loading, refresh} = useThunk(() => {new Promise(resolve => resolve("arrow function changes everytime")}, [deps]);
41
+ * @param thunk
42
+ * @param deps
43
+ */
44
+ export function useThunk(thunk, deps) {
45
+ var _a = __read(React.useReducer(reducer, { data: null, loading: false }), 2), _b = _a[0], loading = _b.loading, data = _b.data, dispatch = _a[1];
46
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- only recall on deps change
47
+ var callback = React.useCallback(thunk, deps);
48
+ var fetchData = React.useCallback(function () {
49
+ dispatch({ type: "start" });
50
+ callback().then(function (data) { return dispatch({ type: "load", data: data }); });
51
+ }, [callback, dispatch]);
52
+ React.useEffect(function () {
53
+ dispatch({ type: "start" });
54
+ callback().then(function (data) { return dispatch({ type: "load", data: data }); });
55
+ }, [callback, dispatch]);
56
+ return { loading: loading, response: data, refresh: fetchData };
57
+ }
58
+ //# sourceMappingURL=useThunk.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useThunk.js","sourceRoot":"","sources":["../../src/hooks/useThunk.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAU1B,SAAS,OAAO,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E,QAAQ,CAAC,CAAC,CAAC;IAEzB,OAAO,EAAC,OAAO,SAAA,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAC,CAAC;AACzD,CAAC"}
@@ -0,0 +1,21 @@
1
+ export declare const useWhyDidYouUpdate: typeof _useWhyDidYouUpdate;
2
+ /**
3
+ * Logs in console the diff in props between renders.
4
+ * For debugging use only. Remove before production.
5
+ *
6
+ * https://usehooks.com/useWhyDidYouUpdate/
7
+ *
8
+ * Example usage:
9
+ * ```jsx
10
+ * const ComponentName = ReactUtil.memo("ComponentName", (props: Props) => {
11
+ * const stateFromStore = useSelector(state => state.app.moduleName.stateFromStore);
12
+ * useWhyDidYouUpdate("ComponentName", {...props, stateFromStore});
13
+ * return <div style={props.style}>{props.count}</div>;
14
+ * });
15
+ * ```
16
+ *
17
+ * @param name A tag for identifying the function component using this hook
18
+ * @param props Props of the function component
19
+ */
20
+ declare function _useWhyDidYouUpdate<P extends object>(name: string, props: P): void;
21
+ export {};
@@ -0,0 +1,56 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ import React from "react";
13
+ export var useWhyDidYouUpdate = "_self" in React.createElement("div") ? function () { } : _useWhyDidYouUpdate;
14
+ /**
15
+ * Logs in console the diff in props between renders.
16
+ * For debugging use only. Remove before production.
17
+ *
18
+ * https://usehooks.com/useWhyDidYouUpdate/
19
+ *
20
+ * Example usage:
21
+ * ```jsx
22
+ * const ComponentName = ReactUtil.memo("ComponentName", (props: Props) => {
23
+ * const stateFromStore = useSelector(state => state.app.moduleName.stateFromStore);
24
+ * useWhyDidYouUpdate("ComponentName", {...props, stateFromStore});
25
+ * return <div style={props.style}>{props.count}</div>;
26
+ * });
27
+ * ```
28
+ *
29
+ * @param name A tag for identifying the function component using this hook
30
+ * @param props Props of the function component
31
+ */
32
+ function _useWhyDidYouUpdate(name, props) {
33
+ // Get a mutable ref object where we can store props for comparison next time this hook runs.
34
+ var prevProps = React.useRef();
35
+ React.useEffect(function () {
36
+ if (prevProps.current) {
37
+ // Use changesObj to keep track of changed props
38
+ var changesObj_1 = {};
39
+ // Iterate through all keys from previous and current props
40
+ Object.keys(__assign(__assign({}, prevProps.current), props)).forEach(function (key) {
41
+ // Add to changesObj if previous is different from current
42
+ if (prevProps.current[key] !== props[key]) {
43
+ changesObj_1[key] = { from: prevProps.current[key], to: props[key] };
44
+ }
45
+ });
46
+ // If changesObj not empty then output to console
47
+ if (Object.keys(changesObj_1).length) {
48
+ // eslint-disable-next-line no-console -- this is intentional as this hook should only be used for debugging and should be removed before deploying to production
49
+ console.info("%c[%cwhy-did-you-update%c] %c".concat(name), "color: inherit", "color: #e36eec", "color: inherit", "color: #f38b54", changesObj_1);
50
+ }
51
+ }
52
+ // Update previousProps with current props for next hook call
53
+ prevProps.current = props;
54
+ });
55
+ }
56
+ //# sourceMappingURL=useWhyDidYouUpdate.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWhyDidYouUpdate.js","sourceRoot":"","sources":["../../src/hooks/useWhyDidYouUpdate.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,CAAC,IAAM,kBAAkB,GAA+B,OAAO,IAAI,KAAK,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,cAAO,CAAC,CAAC,CAAC,CAAC,mBAAmB,CAAC;AAErI;;;;;;;;;;;;;;;;;GAiBG;AACH,SAAS,mBAAmB,CAAmB,IAAY,EAAE,KAAQ;IACjE,6FAA6F;IAC7F,IAAM,SAAS,GAAG,KAAK,CAAC,MAAM,EAAK,CAAC;IAEpC,KAAK,CAAC,SAAS,CAAC;QACZ,IAAI,SAAS,CAAC,OAAO,EAAE;YACnB,gDAAgD;YAChD,IAAM,YAAU,GAAsD,EAAE,CAAC;YACzE,2DAA2D;YAC1D,MAAM,CAAC,IAAI,uBAAK,SAAS,CAAC,OAAQ,GAAK,KAAK,EAAqB,CAAC,OAAO,CAAC,UAAA,GAAG;gBAC1E,0DAA0D;gBAC1D,IAAI,SAAS,CAAC,OAAQ,CAAC,GAAG,CAAC,KAAK,KAAK,CAAC,GAAG,CAAC,EAAE;oBACxC,YAAU,CAAC,GAAG,CAAC,GAAG,EAAC,IAAI,EAAE,SAAS,CAAC,OAAQ,CAAC,GAAG,CAAC,EAAE,EAAE,EAAE,KAAK,CAAC,GAAG,CAAC,EAAC,CAAC;iBACrE;YACL,CAAC,CAAC,CAAC;YAEH,iDAAiD;YACjD,IAAI,MAAM,CAAC,IAAI,CAAC,YAAU,CAAC,CAAC,MAAM,EAAE;gBAChC,iKAAiK;gBACjK,OAAO,CAAC,IAAI,CAAC,uCAAgC,IAAI,CAAE,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,gBAAgB,EAAE,YAAU,CAAC,CAAC;aAC5I;SACJ;QAED,6DAA6D;QAC7D,SAAS,CAAC,OAAO,GAAG,KAAK,CAAC;IAC9B,CAAC,CAAC,CAAC;AACP,CAAC"}
@@ -0,0 +1 @@
1
+ export declare function useWillUnmountEffect(willUnmount: () => void): void;
@@ -0,0 +1,8 @@
1
+ import React from "react";
2
+ export function useWillUnmountEffect(willUnmount) {
3
+ React.useEffect(function () {
4
+ return willUnmount;
5
+ // eslint-disable-next-line react-hooks/exhaustive-deps -- this is intentional to emulate the behaviour of componentWillUnmount
6
+ }, []);
7
+ }
8
+ //# sourceMappingURL=useWillUnmountEffect.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useWillUnmountEffect.js","sourceRoot":"","sources":["../../src/hooks/useWillUnmountEffect.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,MAAM,UAAU,oBAAoB,CAAC,WAAuB;IACxD,KAAK,CAAC,SAAS,CAAC;QACZ,OAAO,WAAW,CAAC;QACnB,+HAA+H;IACnI,CAAC,EAAE,EAAE,CAAC,CAAC;AACX,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pinnacle0/web-ui",
3
- "version": "0.3.61",
3
+ "version": "0.3.63",
4
4
  "author": "Pinnacle",
5
5
  "license": "MIT",
6
6
  "sideEffects": [
@@ -0,0 +1,43 @@
1
+ import React from "react";
2
+ declare function joinNodes(nodes: React.ReactElement[], separator: React.ReactElement | string, innerJoin?: boolean): React.ReactElement;
3
+ /**
4
+ * For React Native UI, parameters must be Text-based node
5
+ * Currently, only support placeholders {1} {2} in sequence
6
+ *
7
+ * E.g: interpolateTextNode("Dice {1} Prize {2}", <Dice value={6}/>, <Amount value={3.5}/>)
8
+ */
9
+ declare function interpolateNode(text: string, ...parameters: React.ReactElement[]): React.ReactElement;
10
+ /**
11
+ * Similar to React.memo, differences are:
12
+ * - Preserves the generic of component props if there are any
13
+ * - Adds a parameter to assign displayName to component
14
+ *
15
+ * Example usage:
16
+ * interface Props<T extends string> {
17
+ * tabs: ReadonlyArray<TabType<T>>;
18
+ * }
19
+ * export const Tabs = ReactUtil.memo("Tabs", function<T extends string>(props: Props<T>) { .... });
20
+ */
21
+ declare function memo<T extends (props: any) => React.ReactElement | null>(displayName: string, functionComponent: T): T;
22
+ /**
23
+ * To group some components into a static-method like usage, without creating dummy class.
24
+ *
25
+ * Example usage:
26
+ * const Left = ReactUtil.memo("Left", () => {...});
27
+ * const Right = ReactUtil.memo("Left", () => {...});
28
+ * const SomeContainer = ReactUtil.statics("SomeContainer", {Left, Right})
29
+ *
30
+ * Then you can use <SomeContainer.Left> or <SomeContainer.Right> with proper displayName set.
31
+ */
32
+ declare function statics<T extends {
33
+ [key: string]: React.ComponentType<any> | {
34
+ [key: string]: React.ComponentType<any>;
35
+ };
36
+ }>(displayName: string, componentMap: T): T;
37
+ export declare const ReactUtil: Readonly<{
38
+ joinNodes: typeof joinNodes;
39
+ interpolateNode: typeof interpolateNode;
40
+ memo: typeof memo;
41
+ statics: typeof statics;
42
+ }>;
43
+ export {};
@@ -0,0 +1,108 @@
1
+ var __assign = (this && this.__assign) || function () {
2
+ __assign = Object.assign || function(t) {
3
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
4
+ s = arguments[i];
5
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
6
+ t[p] = s[p];
7
+ }
8
+ return t;
9
+ };
10
+ return __assign.apply(this, arguments);
11
+ };
12
+ var __read = (this && this.__read) || function (o, n) {
13
+ var m = typeof Symbol === "function" && o[Symbol.iterator];
14
+ if (!m) return o;
15
+ var i = m.call(o), r, ar = [], e;
16
+ try {
17
+ while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);
18
+ }
19
+ catch (error) { e = { error: error }; }
20
+ finally {
21
+ try {
22
+ if (r && !r.done && (m = i["return"])) m.call(i);
23
+ }
24
+ finally { if (e) throw e.error; }
25
+ }
26
+ return ar;
27
+ };
28
+ import React from "react";
29
+ function joinNodes(nodes, separator, innerJoin) {
30
+ if (innerJoin === void 0) { innerJoin = true; }
31
+ // Do not use nodes.reduce, because it fails to handle key(prop) perfectly.
32
+ var joinedNodes = nodes.map(function (_, index) { return (React.createElement(React.Fragment, { key: index },
33
+ _,
34
+ index < nodes.length - 1 && separator)); });
35
+ if (!innerJoin) {
36
+ joinedNodes.unshift(React.createElement(React.Fragment, { key: "__first__" }, separator));
37
+ joinedNodes.push(React.createElement(React.Fragment, { key: "__last__" }, separator));
38
+ }
39
+ return React.createElement(React.Fragment, null, joinedNodes);
40
+ }
41
+ /**
42
+ * For React Native UI, parameters must be Text-based node
43
+ * Currently, only support placeholders {1} {2} in sequence
44
+ *
45
+ * E.g: interpolateTextNode("Dice {1} Prize {2}", <Dice value={6}/>, <Amount value={3.5}/>)
46
+ */
47
+ function interpolateNode(text) {
48
+ var parameters = [];
49
+ for (var _i = 1; _i < arguments.length; _i++) {
50
+ parameters[_i - 1] = arguments[_i];
51
+ }
52
+ var nodes = [];
53
+ text.split(/\{\d+\}/g).forEach(function (_, index) {
54
+ nodes.push(_);
55
+ nodes.push(parameters[index]);
56
+ });
57
+ return React.createElement(React.Fragment, null, nodes);
58
+ }
59
+ /**
60
+ * Similar to React.memo, differences are:
61
+ * - Preserves the generic of component props if there are any
62
+ * - Adds a parameter to assign displayName to component
63
+ *
64
+ * Example usage:
65
+ * interface Props<T extends string> {
66
+ * tabs: ReadonlyArray<TabType<T>>;
67
+ * }
68
+ * export const Tabs = ReactUtil.memo("Tabs", function<T extends string>(props: Props<T>) { .... });
69
+ */
70
+ function memo(displayName, functionComponent) {
71
+ return React.memo(Object.assign(functionComponent, { displayName: displayName }));
72
+ }
73
+ /**
74
+ * To group some components into a static-method like usage, without creating dummy class.
75
+ *
76
+ * Example usage:
77
+ * const Left = ReactUtil.memo("Left", () => {...});
78
+ * const Right = ReactUtil.memo("Left", () => {...});
79
+ * const SomeContainer = ReactUtil.statics("SomeContainer", {Left, Right})
80
+ *
81
+ * Then you can use <SomeContainer.Left> or <SomeContainer.Right> with proper displayName set.
82
+ */
83
+ function statics(displayName, componentMap) {
84
+ var namedComponentMap = {};
85
+ Object.entries(componentMap).forEach(function (_a) {
86
+ var _b = __read(_a, 2), key = _b[0], componentOrMap = _b[1];
87
+ if (typeof componentOrMap === "function") {
88
+ var Component_1 = componentOrMap;
89
+ namedComponentMap[key] = memo(displayName, function (props) { return React.createElement(Component_1, __assign({}, props)); });
90
+ }
91
+ else {
92
+ var nestedComponentMap_1 = {};
93
+ Object.entries(componentOrMap).forEach(function (_a) {
94
+ var _b = __read(_a, 2), key = _b[0], Component = _b[1];
95
+ nestedComponentMap_1[key] = Component;
96
+ });
97
+ namedComponentMap[key] = nestedComponentMap_1;
98
+ }
99
+ });
100
+ return namedComponentMap;
101
+ }
102
+ export var ReactUtil = Object.freeze({
103
+ joinNodes: joinNodes,
104
+ interpolateNode: interpolateNode,
105
+ memo: memo,
106
+ statics: statics,
107
+ });
108
+ //# sourceMappingURL=ReactUtil.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ReactUtil.js","sourceRoot":"","sources":["../../src/util/ReactUtil.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,SAAS,SAAS,CAAC,KAA2B,EAAE,SAAsC,EAAE,SAAyB;IAAzB,0BAAA,EAAA,gBAAyB;IAC7G,2EAA2E;IAC3E,IAAM,WAAW,GAAyB,KAAK,CAAC,GAAG,CAAC,UAAC,CAAC,EAAE,KAAK,IAAK,OAAA,CAC9D,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAE,KAAK;QACrB,CAAC;QACD,KAAK,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,SAAS,CACzB,CACpB,EALiE,CAKjE,CAAC,CAAC;IACH,IAAI,CAAC,SAAS,EAAE;QACZ,WAAW,CAAC,OAAO,CAAC,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAC,WAAW,IAAE,SAAS,CAAkB,CAAC,CAAC;QAClF,WAAW,CAAC,IAAI,CAAC,oBAAC,KAAK,CAAC,QAAQ,IAAC,GAAG,EAAC,UAAU,IAAE,SAAS,CAAkB,CAAC,CAAC;KACjF;IACD,OAAO,oBAAC,KAAK,CAAC,QAAQ,QAAE,WAAW,CAAkB,CAAC;AAC1D,CAAC;AAED;;;;;GAKG;AACH,SAAS,eAAe,CAAC,IAAY;IAAE,oBAAmC;SAAnC,UAAmC,EAAnC,qBAAmC,EAAnC,IAAmC;QAAnC,mCAAmC;;IACtE,IAAM,KAAK,GAAuC,EAAE,CAAC;IACrD,IAAI,CAAC,KAAK,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,UAAC,CAAC,EAAE,KAAK;QACpC,KAAK,CAAC,IAAI,CAA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