@egjs/react-flicking 4.2.4 → 4.4.0

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,6 +0,0 @@
1
- /// <reference types="react" />
2
- interface ReactPanelComponent extends React.Component {
3
- hide: boolean;
4
- element: HTMLElement;
5
- }
6
- export default ReactPanelComponent;
@@ -1,10 +0,0 @@
1
- import * as React from "react";
2
- import ReactPanelComponent from "./ReactPanelComponent";
3
- declare class StrictPanelComponent extends React.Component implements ReactPanelComponent {
4
- hide: boolean;
5
- private _elRef;
6
- get element(): HTMLElement;
7
- render(): JSX.Element;
8
- private _getElement;
9
- }
10
- export default StrictPanelComponent;
@@ -1,18 +0,0 @@
1
- import * as React from "react";
2
- import { findDOMNode } from "react-dom";
3
-
4
- import ReactPanelComponent from "./ReactPanelComponent";
5
-
6
- class NonStrictPanelComponent extends React.Component implements ReactPanelComponent {
7
- public hide: boolean = false;
8
-
9
- public get element() { return findDOMNode(this) as HTMLElement; }
10
-
11
- public render() {
12
- return this.hide
13
- ? <></>
14
- : this.props.children;
15
- }
16
- }
17
-
18
- export default NonStrictPanelComponent;
@@ -1,20 +0,0 @@
1
- import { ExternalPanel } from "@egjs/flicking";
2
-
3
- import NonStrictPanelComponent from "./NonStrictPanelComponent";
4
-
5
- class ReactPanel extends ExternalPanel<NonStrictPanelComponent> {
6
- public get element() {
7
- return this._externalComponent.element as HTMLElement;
8
- }
9
- public get rendered() { return !this._externalComponent.hide; }
10
-
11
- public markForShow() {
12
- this._externalComponent.hide = false;
13
- }
14
-
15
- public markForHide() {
16
- this._externalComponent.hide = true;
17
- }
18
- }
19
-
20
- export default ReactPanel;
@@ -1,6 +0,0 @@
1
- interface ReactPanelComponent extends React.Component {
2
- hide: boolean;
3
- element: HTMLElement;
4
- }
5
-
6
- export default ReactPanelComponent;
@@ -1,24 +0,0 @@
1
- import * as React from "react";
2
- import ReactPanelComponent from "./ReactPanelComponent";
3
-
4
- class StrictPanelComponent extends React.Component implements ReactPanelComponent {
5
- public hide: boolean = false;
6
-
7
- private _elRef: React.RefObject<HTMLElement> = React.createRef();
8
-
9
- public get element() { return this._elRef.current!; }
10
-
11
- public render() {
12
- return this.hide
13
- ? <></>
14
- : this._getElement();
15
- }
16
-
17
- private _getElement() {
18
- return React.cloneElement(React.Children.only(this.props.children) as React.ReactElement, {
19
- ref: this._elRef
20
- });
21
- }
22
- }
23
-
24
- export default StrictPanelComponent;