argous 1.2.215 → 1.2.217
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/api/index.d.ts +2 -2
- package/dist/api/index.js +3 -3
- package/dist/components/Carousel/Carousel.d.ts +71 -0
- package/dist/components/Carousel/Carousel.js +225 -0
- package/dist/components/Carousel/index.d.ts +2 -0
- package/dist/components/Carousel/index.js +8 -0
- package/dist/components/TextToHtml/Cursor.d.ts +7 -0
- package/dist/components/TextToHtml/Cursor.js +39 -0
- package/dist/components/TextToHtml/TextStyles.d.ts +11 -0
- package/dist/components/TextToHtml/TextStyles.js +124 -0
- package/dist/components/TextToHtml/TextToHtml.d.ts +38 -0
- package/dist/components/TextToHtml/TextToHtml.js +484 -0
- package/dist/components/TextToHtml/index.d.ts +2 -0
- package/dist/components/TextToHtml/index.js +8 -0
- package/dist/components/TextToHtml/utils.d.ts +27 -0
- package/dist/components/TextToHtml/utils.js +798 -0
- package/dist/components/Zoom/Zoom.d.ts +11 -0
- package/dist/components/Zoom/Zoom.js +67 -0
- package/dist/components/Zoom/index.d.ts +2 -0
- package/dist/components/Zoom/index.js +8 -0
- package/dist/components/index.d.ts +10 -1
- package/dist/components/index.js +11 -1
- package/dist/utils/api.js +2 -3
- package/lib/api/index.js +3 -3
- package/lib/components/Carousel/Carousel.d.ts +71 -0
- package/lib/components/Carousel/Carousel.js +218 -0
- package/lib/components/Carousel/index.d.ts +2 -0
- package/lib/components/Carousel/index.js +1 -0
- package/lib/components/TextToHtml/Cursor.js +24 -0
- package/lib/components/TextToHtml/TextStyles.js +111 -0
- package/lib/components/TextToHtml/TextToHtml.d.ts +38 -0
- package/lib/components/TextToHtml/TextToHtml.js +463 -0
- package/lib/components/TextToHtml/icons/resize_area.svg +2 -0
- package/lib/components/TextToHtml/index.d.ts +2 -0
- package/lib/components/TextToHtml/index.js +1 -0
- package/lib/components/TextToHtml/style.css +40 -0
- package/lib/components/TextToHtml/utils.js +848 -0
- package/lib/components/Zoom/Zoom.d.ts +11 -0
- package/lib/components/Zoom/Zoom.js +56 -0
- package/lib/components/Zoom/index.d.ts +2 -0
- package/lib/components/Zoom/index.js +1 -0
- package/lib/components/Zoom/style.css +25 -0
- package/lib/components/index.d.ts +10 -1
- package/lib/components/index.js +11 -1
- package/lib/utils/api.ts +2 -3
- package/package.json +2 -1
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import clsx from 'clsx';
|
|
2
|
+
import React, { useCallback, useEffect, useState } from 'react';
|
|
3
|
+
import './style.css';
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
const Zoom = ({ id, children }) => {
|
|
7
|
+
|
|
8
|
+
const figureId = (id) ? `${id}-zoom-figure` : 'zoom-figure';
|
|
9
|
+
const [active, setActive] = useState(false);
|
|
10
|
+
|
|
11
|
+
const copyMediaUrl = useCallback(() => {
|
|
12
|
+
const figureElement = document.getElementById(figureId);
|
|
13
|
+
const mediaElement = figureElement.children?.[0];
|
|
14
|
+
if (mediaElement) figureElement.style.backgroundImage = "url('" + mediaElement.src + "')";
|
|
15
|
+
}, [figureId]);
|
|
16
|
+
useEffect(() => setTimeout(() => copyMediaUrl(), 500), [copyMediaUrl]);
|
|
17
|
+
|
|
18
|
+
function zoom(e, activeParameter) {
|
|
19
|
+
if (active || activeParameter) {
|
|
20
|
+
let offsetX, offsetY, x, y;
|
|
21
|
+
const figureElement = document.getElementById(figureId);
|
|
22
|
+
|
|
23
|
+
if (figureElement) {
|
|
24
|
+
if (e?.nativeEvent?.offsetX) offsetX = e.nativeEvent.offsetX;
|
|
25
|
+
else offsetX = e?.touches?.[0].pageX;
|
|
26
|
+
if (e?.nativeEvent?.offsetY) offsetY = e.nativeEvent.offsetY;
|
|
27
|
+
else offsetX = e?.touches?.[0].pageX;
|
|
28
|
+
|
|
29
|
+
x = ((offsetX / figureElement.offsetWidth) * 100);
|
|
30
|
+
y = ((offsetY / figureElement.offsetHeight) * 100);
|
|
31
|
+
|
|
32
|
+
figureElement.style.backgroundPosition = `${x}% ${y}%`;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
const handleActive = e => {
|
|
38
|
+
const state = !active;
|
|
39
|
+
setActive(state);
|
|
40
|
+
(state) && zoom(e, state);
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
return <figure
|
|
45
|
+
id={figureId}
|
|
46
|
+
onMouseMove={zoom}
|
|
47
|
+
onTouchMove={zoom}
|
|
48
|
+
onClick={handleActive}
|
|
49
|
+
className={clsx('zoom-figure', { 'zoom-figure-active': active })}
|
|
50
|
+
>
|
|
51
|
+
{children}
|
|
52
|
+
</figure>;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
export default Zoom;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from './Zoom';
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
figure.zoom-figure {
|
|
2
|
+
position: relative;
|
|
3
|
+
overflow: hidden;
|
|
4
|
+
cursor: zoom-in;
|
|
5
|
+
cursor: -moz-zoom-in;
|
|
6
|
+
cursor: -webkit-zoom-in;
|
|
7
|
+
background-repeat: no-repeat;
|
|
8
|
+
background-position: 50% 50%;
|
|
9
|
+
|
|
10
|
+
img {
|
|
11
|
+
transition: opacity 250ms;
|
|
12
|
+
display: block;
|
|
13
|
+
width: 100%;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
figure.zoom-figure-active {
|
|
18
|
+
cursor: zoom-out;
|
|
19
|
+
cursor: -moz-zoom-out;
|
|
20
|
+
cursor: -webkit-zoom-out;
|
|
21
|
+
|
|
22
|
+
& img:hover {
|
|
23
|
+
opacity: 0;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -157,4 +157,13 @@ export { default as HalfGauge } from './HalfGauge';
|
|
|
157
157
|
export * from './HalfGauge';
|
|
158
158
|
|
|
159
159
|
export { default as UserCard } from './UserCard';
|
|
160
|
-
export * from './UserCard';
|
|
160
|
+
export * from './UserCard';
|
|
161
|
+
|
|
162
|
+
export { default as TextToHtml } from './TextToHtml';
|
|
163
|
+
export * from './TextToHtml';
|
|
164
|
+
|
|
165
|
+
export { default as Zoom } from './Zoom';
|
|
166
|
+
export * from './Zoom';
|
|
167
|
+
|
|
168
|
+
export { default as Carousel } from './Carousel';
|
|
169
|
+
export * from './Carousel';
|
package/lib/components/index.js
CHANGED
|
@@ -154,4 +154,14 @@ export * from './PercentageDisplay';
|
|
|
154
154
|
export { default as HalfGauge } from './HalfGauge';
|
|
155
155
|
export * from './HalfGauge';
|
|
156
156
|
|
|
157
|
-
export { default as UserCard } from './UserCard';
|
|
157
|
+
export { default as UserCard } from './UserCard';
|
|
158
|
+
export * from './UserCard';
|
|
159
|
+
|
|
160
|
+
export { default as TextToHtml } from './TextToHtml';
|
|
161
|
+
export * from './TextToHtml';
|
|
162
|
+
|
|
163
|
+
export { default as Zoom } from './Zoom';
|
|
164
|
+
export * from './Zoom';
|
|
165
|
+
|
|
166
|
+
export { default as Carousel } from './Carousel';
|
|
167
|
+
export * from './Carousel';
|
package/lib/utils/api.ts
CHANGED
|
@@ -66,11 +66,10 @@ export const serverAction = async (metodo:string, dados = {}, pgCode?:string|boo
|
|
|
66
66
|
const data = {
|
|
67
67
|
pgCode: currentProgram,
|
|
68
68
|
action: metodo,
|
|
69
|
-
dados
|
|
70
|
-
token
|
|
69
|
+
dados
|
|
71
70
|
};
|
|
72
71
|
|
|
73
|
-
const res = await action(data);
|
|
72
|
+
const res = await action(data, token);
|
|
74
73
|
if (debuging && process.env.NODE_ENV !== 'production') {
|
|
75
74
|
console.log('-------- Server Action ---------');
|
|
76
75
|
console.log('pgCode: ', currentProgram);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "argous",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.217",
|
|
4
4
|
"description": "Argous.",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"author": "Carlos Schneider",
|
|
@@ -98,6 +98,7 @@
|
|
|
98
98
|
"dependencies": {
|
|
99
99
|
"highlight.js": "^10.7.1",
|
|
100
100
|
"jquery": "^3.6.0",
|
|
101
|
+
"react-colorful": "^5.6.1",
|
|
101
102
|
"react-date-range": "0.9.4",
|
|
102
103
|
"react-paginate": "^7.1.2",
|
|
103
104
|
"react-transition-group": "^4.4.1",
|