linear-react-components-ui 2.2.0-beta.0 → 2.2.0-beta.2

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.
@@ -1,10 +1,11 @@
1
1
  import { jsx } from "react/jsx-runtime";
2
2
  import { c as compilerRuntimeExports } from "../_virtual/compiler-runtime.js";
3
- import { useContext, useRef, useEffect } from "react";
4
- import PanelContext, { getCurrentThreshold } from "./helpers.js";
3
+ import { useContext, useRef } from "react";
4
+ import PanelContext from "./helpers.js";
5
5
  import NoPermission from "../noPermission/index.js";
6
+ import { useScrollEndReached } from "../hooks/useScrollEndReached/index.js";
6
7
  const PanelContent = (t0) => {
7
- const $ = compilerRuntimeExports.c(18);
8
+ const $ = compilerRuntimeExports.c(13);
8
9
  let children;
9
10
  let customClass;
10
11
  let rest;
@@ -31,28 +32,12 @@ const PanelContent = (t0) => {
31
32
  } = useContext(PanelContext);
32
33
  const onEndReachedThreshold = t1 === void 0 ? 0.1 : t1;
33
34
  const rootElementRef = useRef(null);
34
- const lastScrollHeight = useRef(0);
35
- const enableOnEndReached = useRef(true);
36
35
  let t2;
37
36
  if ($[4] !== onEndReached || $[5] !== onEndReachedThreshold) {
38
- t2 = async () => {
39
- const element = rootElementRef.current;
40
- if (element && onEndReached) {
41
- const {
42
- scrollTop,
43
- scrollHeight,
44
- clientHeight
45
- } = element;
46
- const scrollOffset = scrollHeight - clientHeight - scrollTop - 1;
47
- const threshold = getCurrentThreshold(element, onEndReachedThreshold);
48
- if (scrollOffset <= threshold && enableOnEndReached.current) {
49
- enableOnEndReached.current = false;
50
- await new Promise((resolve) => {
51
- resolve(onEndReached());
52
- });
53
- lastScrollHeight.current = scrollHeight;
54
- }
55
- }
37
+ t2 = {
38
+ elementRef: rootElementRef,
39
+ onEndReached,
40
+ onEndReachedThreshold
56
41
  };
57
42
  $[4] = onEndReached;
58
43
  $[5] = onEndReachedThreshold;
@@ -60,65 +45,23 @@ const PanelContent = (t0) => {
60
45
  } else {
61
46
  t2 = $[6];
62
47
  }
63
- const onScrollEndReached = t2;
64
- let t3;
65
- if ($[7] !== onEndReached || $[8] !== onScrollEndReached) {
66
- t3 = () => {
67
- let observer;
68
- if (rootElementRef?.current && onEndReached) {
69
- observer = new ResizeObserver(() => {
70
- const currentElement = rootElementRef.current;
71
- if (currentElement) {
72
- const {
73
- scrollHeight: scrollHeight_0
74
- } = currentElement;
75
- if (scrollHeight_0 && scrollHeight_0 !== lastScrollHeight.current) {
76
- enableOnEndReached.current = true;
77
- observer?.disconnect();
78
- }
79
- }
80
- });
81
- observer.observe(rootElementRef.current);
82
- rootElementRef.current.addEventListener("scroll", onScrollEndReached);
83
- rootElementRef.current.addEventListener("resize", onScrollEndReached);
84
- }
85
- return () => {
86
- rootElementRef.current?.removeEventListener("scroll", onScrollEndReached);
87
- rootElementRef.current?.removeEventListener("resize", onScrollEndReached);
88
- observer?.disconnect();
89
- };
90
- };
91
- $[7] = onEndReached;
92
- $[8] = onScrollEndReached;
93
- $[9] = t3;
94
- } else {
95
- t3 = $[9];
96
- }
97
- let t4;
98
- if ($[10] !== onScrollEndReached) {
99
- t4 = [onScrollEndReached];
100
- $[10] = onScrollEndReached;
101
- $[11] = t4;
102
- } else {
103
- t4 = $[11];
104
- }
105
- useEffect(t3, t4);
48
+ useScrollEndReached(t2);
106
49
  if (!opened) {
107
50
  return null;
108
51
  }
109
- let t5;
110
- if ($[12] !== children || $[13] !== customClass || $[14] !== hideContent || $[15] !== opened || $[16] !== rest) {
111
- t5 = hideContent ? /* @__PURE__ */ jsx(NoPermission, {}) : /* @__PURE__ */ jsx("div", { ref: rootElementRef, className: `panel-content ${customClass ?? ""}`, ...rest, children: opened && children });
112
- $[12] = children;
113
- $[13] = customClass;
114
- $[14] = hideContent;
115
- $[15] = opened;
116
- $[16] = rest;
117
- $[17] = t5;
52
+ let t3;
53
+ if ($[7] !== children || $[8] !== customClass || $[9] !== hideContent || $[10] !== opened || $[11] !== rest) {
54
+ t3 = hideContent ? /* @__PURE__ */ jsx(NoPermission, {}) : /* @__PURE__ */ jsx("div", { ref: rootElementRef, className: `panel-content ${customClass ?? ""}`, ...rest, children: opened && children });
55
+ $[7] = children;
56
+ $[8] = customClass;
57
+ $[9] = hideContent;
58
+ $[10] = opened;
59
+ $[11] = rest;
60
+ $[12] = t3;
118
61
  } else {
119
- t5 = $[17];
62
+ t3 = $[12];
120
63
  }
121
- return t5;
64
+ return t3;
122
65
  };
123
66
  export {
124
67
  PanelContent as default
@@ -1 +1 @@
1
- {"version":3,"file":"Content.js","sources":["../../src/lib/panel/Content.tsx"],"sourcesContent":["import { useCallback, useContext, useEffect, useRef } from 'react';\nimport PanelContext, { getCurrentThreshold } from './helpers';\nimport NoPermission from '../noPermission';\nimport { IPanelContentProps } from './types';\n\nconst PanelContent = ({ customClass, children, ...rest }: IPanelContentProps) => {\n const {\n opened, onEndReached, onEndReachedThreshold = 0.1, hideContent,\n } = useContext(PanelContext);\n const rootElementRef = useRef<HTMLDivElement>(null);\n const lastScrollHeight = useRef(0);\n const enableOnEndReached = useRef(true);\n\n const onScrollEndReached = useCallback(async () => {\n const element = rootElementRef.current;\n\n if (element && onEndReached) {\n const { scrollTop, scrollHeight, clientHeight } = element;\n const scrollOffset = scrollHeight - clientHeight - scrollTop - 1;\n const threshold = getCurrentThreshold(element, onEndReachedThreshold);\n\n if (scrollOffset <= threshold && enableOnEndReached.current) {\n enableOnEndReached.current = false;\n await new Promise((resolve) => {\n resolve(onEndReached());\n });\n lastScrollHeight.current = scrollHeight;\n }\n }\n }, [\n onEndReached, onEndReachedThreshold,\n rootElementRef.current, lastScrollHeight.current,\n ]);\n\n useEffect(() => {\n let observer: ResizeObserver | null;\n if (rootElementRef?.current && onEndReached) {\n observer = new ResizeObserver(() => {\n const currentElement = rootElementRef.current;\n if (currentElement) {\n const { scrollHeight } = currentElement as HTMLDivElement;\n if (scrollHeight && scrollHeight !== lastScrollHeight.current) {\n enableOnEndReached.current = true;\n observer?.disconnect();\n }\n }\n });\n\n observer.observe(rootElementRef.current);\n rootElementRef.current.addEventListener('scroll', onScrollEndReached);\n rootElementRef.current.addEventListener('resize', onScrollEndReached);\n }\n\n return () => {\n rootElementRef.current?.removeEventListener('scroll', onScrollEndReached);\n rootElementRef.current?.removeEventListener('resize', onScrollEndReached);\n observer?.disconnect();\n };\n }, [onScrollEndReached]);\n\n if (!opened) return null;\n return (\n hideContent\n ? (\n <NoPermission />\n )\n : (\n <div\n ref={rootElementRef}\n className={`panel-content ${customClass ?? ''}`}\n {...rest}>\n {opened && children}\n </div>\n )\n );\n};\n\nexport default PanelContent;\n"],"names":["PanelContent","t0","$","_c","children","customClass","rest","opened","onEndReached","onEndReachedThreshold","t1","hideContent","useContext","PanelContext","undefined","rootElementRef","useRef","lastScrollHeight","enableOnEndReached","t2","element","current","scrollTop","scrollHeight","clientHeight","scrollOffset","threshold","getCurrentThreshold","Promise","resolve","onScrollEndReached","t3","observer","ResizeObserver","currentElement","scrollHeight_0","disconnect","observe","addEventListener","removeEventListener","t4","useEffect","t5"],"mappings":"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"}
1
+ {"version":3,"file":"Content.js","sources":["../../src/lib/panel/Content.tsx"],"sourcesContent":["import { useContext, useRef } from 'react';\nimport PanelContext from './helpers';\nimport NoPermission from '../noPermission';\nimport { IPanelContentProps } from './types';\nimport { useScrollEndReached } from '../hooks/useScrollEndReached';\n\nconst PanelContent = ({ customClass, children, ...rest }: IPanelContentProps) => {\n const {\n opened, onEndReached, onEndReachedThreshold = 0.1, hideContent,\n } = useContext(PanelContext);\n const rootElementRef = useRef<HTMLDivElement>(null);\n \n useScrollEndReached({\n elementRef: rootElementRef,\n onEndReached,\n onEndReachedThreshold,\n });\n\n if (!opened) return null;\n return (\n hideContent\n ? (\n <NoPermission />\n )\n : (\n <div\n ref={rootElementRef}\n className={`panel-content ${customClass ?? ''}`}\n {...rest}>\n {opened && children}\n </div>\n )\n );\n};\n\nexport default PanelContent;\n"],"names":["PanelContent","t0","$","_c","children","customClass","rest","opened","onEndReached","onEndReachedThreshold","t1","hideContent","useContext","PanelContext","undefined","rootElementRef","useRef","t2","elementRef","useScrollEndReached","t3"],"mappings":";;;;;;AAMA,MAAMA,eAAeC,CAAAA,OAAA;AAAA,QAAAC,IAAAC,uBAAAA,EAAA,EAAA;AAAA,MAAAC;AAAA,MAAAC;AAAA,MAAAC;AAAA,MAAAJ,SAAAD,IAAA;AAAC,KAAA;AAAA,MAAAI;AAAAA,MAAAD;AAAAA,MAAA,GAAAE;AAAAA,IAAAA,IAAAL;AAAsDC,WAAAD;AAAAC,WAAAE;AAAAF,WAAAG;AAAAH,WAAAI;AAAAA,EAAA,OAAA;AAAAF,eAAAF,EAAA,CAAA;AAAAG,kBAAAH,EAAA,CAAA;AAAAI,WAAAJ,EAAA,CAAA;AAAA,EAAA;AAC1E,QAAA;AAAA,IAAAK;AAAAA,IAAAC;AAAAA,IAAAC,uBAAAC;AAAAA,IAAAC;AAAAA,EAAAA,IAEIC,WAAWC,YAAY;AADH,QAAAJ,wBAAAC,OAAAI,SAAA,MAAAJ;AAExB,QAAAK,iBAAuBC,OAAuB,IAAI;AAAE,MAAAC;AAAA,MAAAf,EAAA,CAAA,MAAAM,gBAAAN,SAAAO,uBAAA;AAEhCQ,SAAA;AAAA,MAAAC,YACNH;AAAAA,MAAcP;AAAAA,MAAAC;AAAAA,IAAAA;AAG3BP,WAAAM;AAAAN,WAAAO;AAAAP,WAAAe;AAAAA,EAAA,OAAA;AAAAA,SAAAf,EAAA,CAAA;AAAA,EAAA;AAJDiB,sBAAoBF,EAInB;AAED,MAAI,CAACV,QAAM;AAAA,WAAS;AAAA,EAAI;AAAC,MAAAa;AAAA,MAAAlB,EAAA,CAAA,MAAAE,YAAAF,EAAA,CAAA,MAAAG,eAAAH,EAAA,CAAA,MAAAS,eAAAT,EAAA,EAAA,MAAAK,UAAAL,UAAAI,MAAA;AAEvBc,SAAAT,cAEI,oBAAC,cAAA,CAAA,CAAY,IAGb,oBAAA,SACOI,KAAAA,gBACM,WAAA,iBAAiBV,eAAA,EAAiB,OACzCC,MACHC,oBAAAH,UACH;AACCF,WAAAE;AAAAF,WAAAG;AAAAH,WAAAS;AAAAT,YAAAK;AAAAL,YAAAI;AAAAJ,YAAAkB;AAAAA,EAAA,OAAA;AAAAA,SAAAlB,EAAA,EAAA;AAAA,EAAA;AAAA,SAXLkB;AAWK;"}
@@ -1,21 +1,6 @@
1
1
  import { createContext } from "react";
2
- function getCurrentThreshold(scrollableElement, scrollThreshold) {
3
- const MIN_THRESHOLD = 0;
4
- const MAX_THRESHOLD = 1;
5
- if (scrollThreshold < MIN_THRESHOLD) return MIN_THRESHOLD;
6
- if (scrollThreshold > MAX_THRESHOLD) return MAX_THRESHOLD;
7
- const {
8
- scrollHeight,
9
- clientHeight
10
- } = scrollableElement;
11
- const offsetHeight = scrollHeight - clientHeight;
12
- const calculatedScrollThreshold = Math.round(scrollHeight * scrollThreshold);
13
- const maxScrollThreshold = Math.round(offsetHeight - offsetHeight * 0.3);
14
- return Math.min(calculatedScrollThreshold, maxScrollThreshold);
15
- }
16
2
  const PanelContext = createContext({});
17
3
  export {
18
- PanelContext as default,
19
- getCurrentThreshold
4
+ PanelContext as default
20
5
  };
21
6
  //# sourceMappingURL=helpers.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"helpers.js","sources":["../../src/lib/panel/helpers.ts"],"sourcesContent":["import { createContext } from 'react';\nimport { ContextProps } from './types';\n\nexport function getCurrentThreshold(\n scrollableElement: HTMLDivElement,\n scrollThreshold: number,\n): number {\n const MIN_THRESHOLD = 0;\n const MAX_THRESHOLD = 1;\n if (scrollThreshold < MIN_THRESHOLD) return MIN_THRESHOLD;\n if (scrollThreshold > MAX_THRESHOLD) return MAX_THRESHOLD;\n const { scrollHeight, clientHeight } = scrollableElement;\n const offsetHeight = scrollHeight - clientHeight;\n\n const calculatedScrollThreshold = Math.round(scrollHeight * scrollThreshold);\n const maxScrollThreshold = Math.round(offsetHeight - (offsetHeight * 0.3));\n\n return Math.min(calculatedScrollThreshold, maxScrollThreshold);\n}\n\nconst PanelContext = createContext<ContextProps>({} as ContextProps);\n\nexport default PanelContext;\n"],"names":["getCurrentThreshold","scrollableElement","scrollThreshold","MIN_THRESHOLD","MAX_THRESHOLD","scrollHeight","clientHeight","offsetHeight","calculatedScrollThreshold","Math","round","maxScrollThreshold","min","PanelContext","createContext"],"mappings":";AAGO,SAASA,oBACdC,mBACAC,iBACQ;AACR,QAAMC,gBAAgB;AACtB,QAAMC,gBAAgB;AACtB,MAAIF,kBAAkBC,cAAe,QAAOA;AAC5C,MAAID,kBAAkBE,cAAe,QAAOA;AAC5C,QAAM;AAAA,IAAEC;AAAAA,IAAcC;AAAAA,EAAAA,IAAiBL;AACvC,QAAMM,eAAeF,eAAeC;AAEpC,QAAME,4BAA4BC,KAAKC,MAAML,eAAeH,eAAe;AAC3E,QAAMS,qBAAqBF,KAAKC,MAAMH,eAAgBA,eAAe,GAAI;AAEzE,SAAOE,KAAKG,IAAIJ,2BAA2BG,kBAAkB;AAC/D;AAEA,MAAME,eAAeC,cAA4B,CAAA,CAAkB;"}
1
+ {"version":3,"file":"helpers.js","sources":["../../src/lib/panel/helpers.ts"],"sourcesContent":["import { createContext } from 'react';\nimport { ContextProps } from './types';\n\nexport function getCurrentThreshold(\n scrollableElement: HTMLDivElement,\n scrollThreshold: number,\n): number {\n const MIN_THRESHOLD = 0;\n const MAX_THRESHOLD = 1;\n if (scrollThreshold < MIN_THRESHOLD) return MIN_THRESHOLD;\n if (scrollThreshold > MAX_THRESHOLD) return MAX_THRESHOLD;\n const { scrollHeight, clientHeight } = scrollableElement;\n const offsetHeight = scrollHeight - clientHeight;\n\n const calculatedScrollThreshold = Math.round(scrollHeight * scrollThreshold);\n const maxScrollThreshold = Math.round(offsetHeight - (offsetHeight * 0.3));\n\n return Math.min(calculatedScrollThreshold, maxScrollThreshold);\n}\n\nconst PanelContext = createContext<ContextProps>({} as ContextProps);\n\nexport default PanelContext;\n"],"names":["PanelContext","createContext"],"mappings":";AAoBA,MAAMA,eAAeC,cAA4B,CAAA,CAAkB;"}
@@ -2,9 +2,10 @@ import { ComponentPropsWithoutRef, ReactElement, ReactNode } from 'react';
2
2
  import { PermissionAttr } from '../@types/PermissionAttr';
3
3
  import { default as ColorStyles } from '../internals/colorStyles';
4
4
  import { IconNames } from '../@types/Icon';
5
+ import { UseScrollEndReachedParams } from '../hooks/useScrollEndReached/types';
5
6
  export type Func = () => void;
6
7
  export type AsyncFunc = () => Promise<void>;
7
- export interface IPanelProps extends Omit<ComponentPropsWithoutRef<'div'>, 'className'> {
8
+ export interface IPanelProps extends Omit<ComponentPropsWithoutRef<'div'>, 'className'>, UseScrollEndReachedParams {
8
9
  customClass?: string;
9
10
  startOpened?: boolean;
10
11
  toggleable?: boolean;
@@ -12,8 +13,6 @@ export interface IPanelProps extends Omit<ComponentPropsWithoutRef<'div'>, 'clas
12
13
  colorStyle?: typeof ColorStyles | string;
13
14
  gridCols?: string;
14
15
  title?: string;
15
- onEndReached?: Func | AsyncFunc;
16
- onEndReachedThreshold?: number;
17
16
  permissionAttr?: PermissionAttr | PermissionAttr[];
18
17
  }
19
18
  export interface IPanelContentProps extends Omit<ComponentPropsWithoutRef<'div'>, 'className'> {
@@ -28,13 +27,11 @@ export interface IPanelHeaderProps extends Omit<ComponentPropsWithoutRef<'div'>,
28
27
  customClassForTitle?: string;
29
28
  headerColored?: boolean;
30
29
  }
31
- export type ContextProps = {
30
+ export type ContextProps = UseScrollEndReachedParams & {
32
31
  toggleable: boolean;
33
32
  handlerToggleable: () => void;
34
33
  opened: boolean;
35
34
  hideContent: boolean;
36
- onEndReached?: Func | AsyncFunc;
37
- onEndReachedThreshold: number;
38
35
  };
39
36
  export interface IParameterFunction {
40
37
  props: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "linear-react-components-ui",
3
- "version": "2.2.0-beta.0",
3
+ "version": "2.2.0-beta.2",
4
4
  "description": "Linear Sistemas ReactJs Components",
5
5
  "type": "module",
6
6
  "main": "./lib/index.js",