@pie-lib/plot 4.0.12 → 4.1.0-beta
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 +0 -40
- package/lib/__tests__/draggable.test.js +48 -0
- package/lib/__tests__/draggable.test.js.map +1 -0
- package/lib/__tests__/grid-draggable.test.js +738 -0
- package/lib/__tests__/grid-draggable.test.js.map +1 -0
- package/lib/__tests__/root.test.js +285 -0
- package/lib/__tests__/root.test.js.map +1 -0
- package/lib/__tests__/trig.test.js +168 -0
- package/lib/__tests__/trig.test.js.map +1 -0
- package/lib/__tests__/utils.test.js +296 -0
- package/lib/__tests__/utils.test.js.map +1 -0
- package/package.json +4 -4
- package/LICENSE.md +0 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,46 +3,6 @@
|
|
|
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
|
-
## [4.0.12](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@4.0.11...@pie-lib/plot@4.0.12) (2026-07-08)
|
|
7
|
-
|
|
8
|
-
**Note:** Version bump only for package @pie-lib/plot
|
|
9
|
-
|
|
10
|
-
## [4.0.11](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@4.0.10...@pie-lib/plot@4.0.11) (2026-07-01)
|
|
11
|
-
|
|
12
|
-
**Note:** Version bump only for package @pie-lib/plot
|
|
13
|
-
|
|
14
|
-
## [4.0.10](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@4.0.9...@pie-lib/plot@4.0.10) (2026-06-25)
|
|
15
|
-
|
|
16
|
-
**Note:** Version bump only for package @pie-lib/plot
|
|
17
|
-
|
|
18
|
-
## [4.0.9](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@4.0.8...@pie-lib/plot@4.0.9) (2026-06-19)
|
|
19
|
-
|
|
20
|
-
**Note:** Version bump only for package @pie-lib/plot
|
|
21
|
-
|
|
22
|
-
## [4.0.8](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@4.0.7...@pie-lib/plot@4.0.8) (2026-06-17)
|
|
23
|
-
|
|
24
|
-
### Bug Fixes
|
|
25
|
-
|
|
26
|
-
- **charting, plot:** rename 'disabled' class to 'disabledMarkLabel' and 'disabledTitle' PIE-661 PIE-664 ([29fc92c](https://github.com/pie-framework/pie-lib/commit/29fc92cf738990cd83f0e0d48fa4dd9047ad065d))
|
|
27
|
-
|
|
28
|
-
## [4.0.7](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@4.0.6...@pie-lib/plot@4.0.7) (2026-06-12)
|
|
29
|
-
|
|
30
|
-
### Bug Fixes
|
|
31
|
-
|
|
32
|
-
- correct @emotion/style typo to @emotion/styled in package deps PIE-678 ([d529ac7](https://github.com/pie-framework/pie-lib/commit/d529ac7bc3dfa94d8037688452d4c70c66f2590b))
|
|
33
|
-
|
|
34
|
-
## [4.0.6](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@4.0.5...@pie-lib/plot@4.0.6) (2026-06-03)
|
|
35
|
-
|
|
36
|
-
**Note:** Version bump only for package @pie-lib/plot
|
|
37
|
-
|
|
38
|
-
## [4.0.5](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@4.0.4...@pie-lib/plot@4.0.5) (2026-06-01)
|
|
39
|
-
|
|
40
|
-
**Note:** Version bump only for package @pie-lib/plot
|
|
41
|
-
|
|
42
|
-
## [4.0.4](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@4.0.3...@pie-lib/plot@4.0.4) (2026-05-21)
|
|
43
|
-
|
|
44
|
-
**Note:** Version bump only for package @pie-lib/plot
|
|
45
|
-
|
|
46
6
|
## [4.0.3](https://github.com/pie-framework/pie-lib/compare/@pie-lib/plot@4.0.2...@pie-lib/plot@4.0.3) (2026-05-15)
|
|
47
7
|
|
|
48
8
|
**Note:** Version bump only for package @pie-lib/plot
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
var _react = _interopRequireDefault(require("react"));
|
|
5
|
+
var _react2 = require("@testing-library/react");
|
|
6
|
+
var _draggable = _interopRequireDefault(require("../draggable"));
|
|
7
|
+
describe('draggable', function () {
|
|
8
|
+
it('renders with children', function () {
|
|
9
|
+
var _render = (0, _react2.render)(/*#__PURE__*/_react["default"].createElement(_draggable["default"], null, /*#__PURE__*/_react["default"].createElement("div", null, "hellow"))),
|
|
10
|
+
container = _render.container;
|
|
11
|
+
expect(container.firstChild).toBeInTheDocument();
|
|
12
|
+
});
|
|
13
|
+
describe('local', function () {
|
|
14
|
+
it('resets position state when receiving new props', function () {
|
|
15
|
+
// Render with initial props
|
|
16
|
+
var _render2 = (0, _react2.render)(/*#__PURE__*/_react["default"].createElement(_draggable["default"], {
|
|
17
|
+
position: {
|
|
18
|
+
x: 100,
|
|
19
|
+
y: 100
|
|
20
|
+
}
|
|
21
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
22
|
+
"data-testid": "draggable-child"
|
|
23
|
+
}, "content"))),
|
|
24
|
+
rerender = _render2.rerender,
|
|
25
|
+
container = _render2.container;
|
|
26
|
+
|
|
27
|
+
// Verify initial render
|
|
28
|
+
expect(container.firstChild).toBeInTheDocument();
|
|
29
|
+
|
|
30
|
+
// Update props - this triggers componentWillReceiveProps
|
|
31
|
+
// which should reset internal x/y state to 0
|
|
32
|
+
rerender(/*#__PURE__*/_react["default"].createElement(_draggable["default"], {
|
|
33
|
+
position: {
|
|
34
|
+
x: 200,
|
|
35
|
+
y: 200
|
|
36
|
+
}
|
|
37
|
+
}, /*#__PURE__*/_react["default"].createElement("div", {
|
|
38
|
+
"data-testid": "draggable-child"
|
|
39
|
+
}, "content")));
|
|
40
|
+
|
|
41
|
+
// The component should still render correctly after prop change
|
|
42
|
+
// The internal state reset is tested by ensuring no errors occur
|
|
43
|
+
// and the component continues to function properly
|
|
44
|
+
expect(container.firstChild).toBeInTheDocument();
|
|
45
|
+
});
|
|
46
|
+
});
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=draggable.test.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"draggable.test.js","names":["_react","_interopRequireDefault","require","_react2","_draggable","describe","it","_render","render","createElement","container","expect","firstChild","toBeInTheDocument","_render2","position","x","y","rerender"],"sources":["../../src/__tests__/draggable.test.jsx"],"sourcesContent":["import React from 'react';\nimport { render } from '@testing-library/react';\nimport Draggable from '../draggable';\n\ndescribe('draggable', () => {\n it('renders with children', () => {\n const { container } = render(\n <Draggable>\n <div>hellow</div>\n </Draggable>,\n );\n expect(container.firstChild).toBeInTheDocument();\n });\n\n describe('local', () => {\n it('resets position state when receiving new props', () => {\n // Render with initial props\n const { rerender, container } = render(\n <Draggable position={{ x: 100, y: 100 }}>\n <div data-testid=\"draggable-child\">content</div>\n </Draggable>,\n );\n\n // Verify initial render\n expect(container.firstChild).toBeInTheDocument();\n\n // Update props - this triggers componentWillReceiveProps\n // which should reset internal x/y state to 0\n rerender(\n <Draggable position={{ x: 200, y: 200 }}>\n <div data-testid=\"draggable-child\">content</div>\n </Draggable>,\n );\n\n // The component should still render correctly after prop change\n // The internal state reset is tested by ensuring no errors occur\n // and the component continues to function properly\n expect(container.firstChild).toBeInTheDocument();\n });\n });\n});\n"],"mappings":";;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,OAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEAG,QAAQ,CAAC,WAAW,EAAE,YAAM;EAC1BC,EAAE,CAAC,uBAAuB,EAAE,YAAM;IAChC,IAAAC,OAAA,GAAsB,IAAAC,cAAM,eAC1BR,MAAA,YAAAS,aAAA,CAACL,UAAA,WAAS,qBACRJ,MAAA,YAAAS,aAAA,cAAK,QAAW,CACP,CACb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