organism-react-ajax
Advanced tools
Comparing version 0.15.33 to 0.16.0
@@ -5,4 +5,2 @@ "use strict"; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _chai = require("chai"); | ||
@@ -14,2 +12,4 @@ | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
var _AjaxForm; | ||
@@ -19,8 +19,5 @@ | ||
it("basic test", function () { | ||
var vDom = _AjaxForm || (_AjaxForm = /*#__PURE__*/_react["default"].createElement(_AjaxForm2["default"], null)); | ||
var wrap = (0, _reshowUnit.mount)(vDom); | ||
var html = wrap.html(); | ||
(0, _chai.expect)(html).to.have.string("form"); | ||
var wrap = (0, _reshowUnit.render)(_AjaxForm || (_AjaxForm = /*#__PURE__*/(0, _jsxRuntime.jsx)(_AjaxForm2["default"], {}))); | ||
(0, _chai.expect)(wrap.html()).to.have.string("form"); | ||
}); | ||
}); |
@@ -5,4 +5,2 @@ "use strict"; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _chai = require("chai"); | ||
@@ -14,2 +12,4 @@ | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
var _AjaxLink; | ||
@@ -19,8 +19,5 @@ | ||
it("basic test", function () { | ||
var vDom = _AjaxLink || (_AjaxLink = /*#__PURE__*/_react["default"].createElement(_AjaxLink2["default"], null)); | ||
var wrap = (0, _reshowUnit.mount)(vDom); | ||
var html = wrap.html(); | ||
(0, _chai.expect)(html).to.have.string("</a>"); | ||
var wrap = (0, _reshowUnit.render)(_AjaxLink || (_AjaxLink = /*#__PURE__*/(0, _jsxRuntime.jsx)(_AjaxLink2["default"], {}))); | ||
(0, _chai.expect)(wrap.html()).to.have.string("</a>"); | ||
}); | ||
}); |
@@ -20,2 +20,4 @@ "use strict"; | ||
var _jsxRuntime = require("react/jsx-runtime"); | ||
var AjaxPage = function AjaxPage(props) { | ||
@@ -76,10 +78,7 @@ var _props$win = props.win, | ||
} else { | ||
if (fallback) { | ||
var fallbackEl = true === fallback ? "div" : fallback; | ||
return /*#__PURE__*/_react["default"].createElement(_react.Suspense, { | ||
fallback: (0, _reshowBuild["default"])(fallbackEl)() | ||
}, builded); | ||
} else { | ||
return builded; | ||
} | ||
var fallbackEl = fallback || "div"; | ||
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_react.Suspense, { | ||
fallback: (0, _reshowBuild["default"])(fallbackEl)(), | ||
children: builded | ||
}); | ||
} | ||
@@ -86,0 +85,0 @@ }, [themePath]); |
@@ -1,6 +0,6 @@ | ||
import _slicedToArray from "reshow-runtime/es/helpers/slicedToArray"; | ||
import _classCallCheck from "reshow-runtime/es/helpers/classCallCheck"; | ||
import _createClass from "reshow-runtime/es/helpers/createClass"; | ||
import _defineProperty from "reshow-runtime/es/helpers/defineProperty"; | ||
import _objectSpread from "reshow-runtime/es/helpers/objectSpread2"; | ||
import _slicedToArray from "reshow-runtime/es/helpers/slicedToArray.mjs"; | ||
import _classCallCheck from "reshow-runtime/es/helpers/classCallCheck.mjs"; | ||
import _createClass from "reshow-runtime/es/helpers/createClass.mjs"; | ||
import _defineProperty from "reshow-runtime/es/helpers/defineProperty.mjs"; | ||
import _objectSpread from "reshow-runtime/es/helpers/objectSpread2.mjs"; | ||
import "es6-promise/auto"; // [RESHOW] Need keep if use "new Promise" | ||
@@ -7,0 +7,0 @@ |
@@ -1,7 +0,7 @@ | ||
import _classCallCheck from "reshow-runtime/es/helpers/classCallCheck"; | ||
import _createClass from "reshow-runtime/es/helpers/createClass"; | ||
import _defineProperty from "reshow-runtime/es/helpers/defineProperty"; | ||
import _typeof from "reshow-runtime/es/helpers/typeof"; | ||
import _objectWithoutProperties from "reshow-runtime/es/helpers/objectWithoutProperties"; | ||
import _objectSpread from "reshow-runtime/es/helpers/objectSpread2"; | ||
import _classCallCheck from "reshow-runtime/es/helpers/classCallCheck.mjs"; | ||
import _createClass from "reshow-runtime/es/helpers/createClass.mjs"; | ||
import _defineProperty from "reshow-runtime/es/helpers/defineProperty.mjs"; | ||
import _typeof from "reshow-runtime/es/helpers/typeof.mjs"; | ||
import _objectWithoutProperties from "reshow-runtime/es/helpers/objectWithoutProperties.mjs"; | ||
import _objectSpread from "reshow-runtime/es/helpers/objectSpread2.mjs"; | ||
var _excluded = ["error", "req", "text", "xhr"], | ||
@@ -8,0 +8,0 @@ _excluded2 = ["id", "query", "isSendJson", "cookHeaders", "responseType"], |
var _AjaxForm; | ||
import React from "react"; | ||
import { expect } from "chai"; | ||
import { mount } from "reshow-unit"; | ||
import { render } from "reshow-unit"; | ||
import AjaxForm from "../AjaxForm"; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
describe("AjaxForm Test", function () { | ||
it("basic test", function () { | ||
var vDom = _AjaxForm || (_AjaxForm = /*#__PURE__*/React.createElement(AjaxForm, null)); | ||
var wrap = mount(vDom); | ||
var html = wrap.html(); | ||
expect(html).to.have.string("form"); | ||
var wrap = render(_AjaxForm || (_AjaxForm = /*#__PURE__*/_jsx(AjaxForm, {}))); | ||
expect(wrap.html()).to.have.string("form"); | ||
}); | ||
}); |
var _AjaxLink; | ||
import React from "react"; | ||
import { expect } from "chai"; | ||
import { mount } from "reshow-unit"; | ||
import { render } from "reshow-unit"; | ||
import AjaxLink from "../AjaxLink"; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
describe("AjaxLink Test", function () { | ||
it("basic test", function () { | ||
var vDom = _AjaxLink || (_AjaxLink = /*#__PURE__*/React.createElement(AjaxLink, null)); | ||
var wrap = mount(vDom); | ||
var html = wrap.html(); | ||
expect(html).to.have.string("</a>"); | ||
var wrap = render(_AjaxLink || (_AjaxLink = /*#__PURE__*/_jsx(AjaxLink, {}))); | ||
expect(wrap.html()).to.have.string("</a>"); | ||
}); | ||
}); |
@@ -1,3 +0,3 @@ | ||
import _objectSpread from "reshow-runtime/es/helpers/objectSpread2"; | ||
import _objectWithoutProperties from "reshow-runtime/es/helpers/objectWithoutProperties"; | ||
import _objectSpread from "reshow-runtime/es/helpers/objectSpread2.mjs"; | ||
import _objectWithoutProperties from "reshow-runtime/es/helpers/objectWithoutProperties.mjs"; | ||
var _excluded = ["stop", "updateUrl", "component", "action", "afterSubmit", "beforeSubmit", "callback", "errorCallback", "path"]; | ||
@@ -4,0 +4,0 @@ import React, { forwardRef, useRef, useCallback } from "react"; |
@@ -1,3 +0,3 @@ | ||
import _objectSpread from "reshow-runtime/es/helpers/objectSpread2"; | ||
import _objectWithoutProperties from "reshow-runtime/es/helpers/objectWithoutProperties"; | ||
import _objectSpread from "reshow-runtime/es/helpers/objectSpread2.mjs"; | ||
import _objectWithoutProperties from "reshow-runtime/es/helpers/objectWithoutProperties.mjs"; | ||
var _excluded = ["updateUrl", "disableRandom", "component", "ajax", "target", "callback", "errorCallback", "path", "href", "onClick", "onTouchStart"]; | ||
@@ -4,0 +4,0 @@ import React, { forwardRef, useImperativeHandle, useRef, useCallback } from "react"; |
@@ -5,2 +5,3 @@ import React, { isValidElement, useEffect, useRef, useMemo, Suspense } from "react"; | ||
import { ajaxDispatch } from "../../src/stores/ajaxStore"; | ||
import { jsx as _jsx } from "react/jsx-runtime"; | ||
@@ -62,10 +63,7 @@ var AjaxPage = function AjaxPage(props) { | ||
} else { | ||
if (fallback) { | ||
var fallbackEl = true === fallback ? "div" : fallback; | ||
return /*#__PURE__*/React.createElement(Suspense, { | ||
fallback: build(fallbackEl)() | ||
}, builded); | ||
} else { | ||
return builded; | ||
} | ||
var fallbackEl = fallback || "div"; | ||
return /*#__PURE__*/_jsx(Suspense, { | ||
fallback: build(fallbackEl)(), | ||
children: builded | ||
}); | ||
} | ||
@@ -72,0 +70,0 @@ }, [themePath]); |
{ | ||
"name": "organism-react-ajax", | ||
"version": "0.15.33", | ||
"version": "0.16.0", | ||
"description": "React Ajax with webworker", | ||
@@ -40,4 +40,4 @@ "main": "./build/cjs/src/index.js", | ||
"@babel/cli": "^7.x", | ||
"react": "^16.x", | ||
"react-dom": "^16.x", | ||
"react": "^18.x", | ||
"react-dom": "^18.x", | ||
"reshow-unit": "*" | ||
@@ -55,3 +55,3 @@ }, | ||
"build": "npm run clean && npm run build:cjs && npm run build:es && npm run build:dlog", | ||
"mochaFor": "mocha -r jsdom-global/register", | ||
"mochaFor": "STRICT_MODE=on mocha -r global-jsdom/register", | ||
"mocha": "npm run mochaFor -- 'build/cjs/**/__tests__/*.js'", | ||
@@ -58,0 +58,0 @@ "test": "npm run build && npm run mocha", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
80777
2483