Comparing version 0.0.40 to 0.0.41
@@ -1,44 +0,26 @@ | ||
"use strict"; | ||
import { __assign } from "tslib"; | ||
import * as React from 'react'; | ||
import { assign, forIn } from 'lodash'; | ||
import { ABContext } from './utils'; | ||
import originStyle from './styles'; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
var ABApp = function (RootComponent, overrideStyle) { | ||
var styles = __assign({}, originStyle); | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
forIn(overrideStyle, function (value, key) { | ||
styles[key] = assign(styles[key], value); | ||
}); | ||
var value = { | ||
styles: styles | ||
}; | ||
var _tslib = require("tslib"); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _lodash = require("lodash"); | ||
var _utils = require("./utils"); | ||
var _styles = _interopRequireDefault(require("../common/styles")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
var ABApp = function ABApp(RootComponent, overrideStyle) { | ||
return function (props) { | ||
var value = React.useMemo(function () { | ||
var styles = (0, _tslib.__assign)({}, _styles["default"]); | ||
(0, _lodash.forIn)(overrideStyle, function (value, key) { | ||
styles[key] = (0, _lodash.assign)(styles[key], value); | ||
}); | ||
return { | ||
styles: styles | ||
}; | ||
}, []); | ||
return React.createElement(_utils.ABContext.Provider, { | ||
var HoC = function (props) { | ||
return React.createElement(ABContext.Provider, { | ||
value: value | ||
}, React.createElement(React.Fragment, null, React.createElement(RootComponent, props))); | ||
}; | ||
return HoC; | ||
}; | ||
var _default = ABApp; | ||
exports["default"] = _default; | ||
export default ABApp; |
@@ -1,20 +0,4 @@ | ||
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = exports.COVER_STYLE_NAMES = exports.TEXT_STYLE_NAMES = exports.getWindowSize = exports.measure = exports.ABContext = void 0; | ||
var React = _interopRequireWildcard(require("react")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
var ABContext = React.createContext({}); | ||
exports.ABContext = ABContext; | ||
var measure = function measure(target) { | ||
import * as React from 'react'; | ||
export var ABContext = React.createContext({}); | ||
export var measure = function (target) { | ||
return new Promise(function (resolve, reject) { | ||
@@ -35,6 +19,3 @@ if (target) { | ||
}; | ||
exports.measure = measure; | ||
var getWindowSize = function getWindowSize() { | ||
export var getWindowSize = function () { | ||
return { | ||
@@ -47,9 +28,5 @@ width: 0, | ||
}; | ||
exports.getWindowSize = getWindowSize; | ||
var TEXT_STYLE_NAMES = ['color', 'fontFamily', 'fontSize', 'fontStyle', 'fontWeight', 'fontVariant', 'textShadowOffset', 'textShadowRadius', 'textShadowColor', 'letterSpacing', 'lineHeight', 'textAlign', 'textAlignVertical', 'includeFontPadding', 'textDecorationLine', 'textDecorationStyle', 'textDecorationColor', 'textTransform', 'writingDirection']; | ||
exports.TEXT_STYLE_NAMES = TEXT_STYLE_NAMES; | ||
var COVER_STYLE_NAMES = ['borderWidth', 'borderColor', 'borderRadius', 'borderTopWidth', 'borderTopColor', 'borderLeftWidth', 'borderLeftColor', 'borderRightWidth', 'borderRightColor', 'borderBottomWidth', 'borderBottomColor', 'backgroundColor']; | ||
exports.COVER_STYLE_NAMES = COVER_STYLE_NAMES; | ||
var _default = { | ||
export var TEXT_STYLE_NAMES = ['color', 'fontFamily', 'fontSize', 'fontStyle', 'fontWeight', 'fontVariant', 'textShadowOffset', 'textShadowRadius', 'textShadowColor', 'letterSpacing', 'lineHeight', 'textAlign', 'textAlignVertical', 'includeFontPadding', 'textDecorationLine', 'textDecorationStyle', 'textDecorationColor', 'textTransform', 'writingDirection']; | ||
export var COVER_STYLE_NAMES = ['borderWidth', 'borderColor', 'borderRadius', 'borderTopWidth', 'borderTopColor', 'borderLeftWidth', 'borderLeftColor', 'borderRightWidth', 'borderRightColor', 'borderBottomWidth', 'borderBottomColor', 'backgroundColor']; | ||
export default { | ||
ABContext: ABContext, | ||
@@ -60,3 +37,2 @@ measure: measure, | ||
COVER_STYLE_NAMES: COVER_STYLE_NAMES | ||
}; | ||
exports["default"] = _default; | ||
}; |
@@ -1,34 +0,13 @@ | ||
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = exports.COVER_STYLE_NAMES = exports.TEXT_STYLE_NAMES = exports.measure = exports.getWindowSize = exports.ABContext = void 0; | ||
var React = _interopRequireWildcard(require("react")); | ||
var _reactNative = require("react-native"); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
var ABContext = React.createContext({}); | ||
exports.ABContext = ABContext; | ||
var getWindowSize = function getWindowSize() { | ||
return _reactNative.Dimensions.get('screen'); | ||
import * as React from 'react'; | ||
import { Dimensions, findNodeHandle, UIManager } from 'react-native'; | ||
export var ABContext = React.createContext({}); | ||
export var getWindowSize = function () { | ||
return Dimensions.get('screen'); | ||
}; | ||
exports.getWindowSize = getWindowSize; | ||
var measure = function measure(target) { | ||
export var measure = function (target) { | ||
return new Promise(function (resolve, reject) { | ||
try { | ||
var node = (0, _reactNative.findNodeHandle)(target); | ||
var node = findNodeHandle(target); | ||
if (node === null) throw new Error(); | ||
_reactNative.UIManager.measure(node, function (originX, originY, width, oHeight, pageX, pageY) { | ||
UIManager.measure(node, function (originX, originY, width, oHeight, pageX, pageY) { | ||
return resolve({ | ||
@@ -48,9 +27,5 @@ originX: originX, | ||
}; | ||
exports.measure = measure; | ||
var TEXT_STYLE_NAMES = ['color', 'fontFamily', 'fontSize', 'fontStyle', 'fontWeight', 'fontVariant', 'textShadowOffset', 'textShadowRadius', 'textShadowColor', 'letterSpacing', 'lineHeight', 'textAlign', 'textAlignVertical', 'includeFontPadding', 'textDecorationLine', 'textDecorationStyle', 'textDecorationColor', 'textTransform', 'writingDirection']; | ||
exports.TEXT_STYLE_NAMES = TEXT_STYLE_NAMES; | ||
var COVER_STYLE_NAMES = ['borderWidth', 'borderColor', 'borderRadius', 'borderTopWidth', 'borderTopColor', 'borderLeftWidth', 'borderLeftColor', 'borderRightWidth', 'borderRightColor', 'borderBottomWidth', 'borderBottomColor', 'backgroundColor']; | ||
exports.COVER_STYLE_NAMES = COVER_STYLE_NAMES; | ||
var _default = { | ||
export var TEXT_STYLE_NAMES = ['color', 'fontFamily', 'fontSize', 'fontStyle', 'fontWeight', 'fontVariant', 'textShadowOffset', 'textShadowRadius', 'textShadowColor', 'letterSpacing', 'lineHeight', 'textAlign', 'textAlignVertical', 'includeFontPadding', 'textDecorationLine', 'textDecorationStyle', 'textDecorationColor', 'textTransform', 'writingDirection']; | ||
export var COVER_STYLE_NAMES = ['borderWidth', 'borderColor', 'borderRadius', 'borderTopWidth', 'borderTopColor', 'borderLeftWidth', 'borderLeftColor', 'borderRightWidth', 'borderRightColor', 'borderBottomWidth', 'borderBottomColor', 'backgroundColor']; | ||
export default { | ||
ABContext: ABContext, | ||
@@ -61,3 +36,2 @@ getWindowSize: getWindowSize, | ||
COVER_STYLE_NAMES: COVER_STYLE_NAMES | ||
}; | ||
exports["default"] = _default; | ||
}; |
@@ -1,27 +0,10 @@ | ||
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _tslib = require("tslib"); | ||
var _react = _interopRequireWildcard(require("react")); | ||
var _utils = require("../App/utils"); | ||
var _lodash = require("lodash"); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
import { __rest } from "tslib"; | ||
import React, { useCallback, useContext, useState } from 'react'; | ||
import { ABContext, TEXT_STYLE_NAMES } from '../App/utils'; | ||
import { pick } from 'lodash'; | ||
var STYLE_GROUP_NAME = 'ab-button'; | ||
var Button = function Button(props) { | ||
var Button = function (props) { | ||
var size = props.size, | ||
@@ -36,4 +19,5 @@ type = props.type, | ||
forceInset = props.forceInset, | ||
oProps = (0, _tslib.__rest)(props, ["size", "type", "style", "children", "disabled", "onPress", "onPressIn", "onPressOut", "forceInset"]); | ||
var context = (0, _react.useContext)(_utils.ABContext); | ||
oProps = __rest(props, ["size", "type", "style", "children", "disabled", "onPress", "onPressIn", "onPressOut", "forceInset"]); | ||
var context = useContext(ABContext); | ||
var styles = context.styles; | ||
@@ -48,3 +32,3 @@ var suffix = ''; | ||
var _a = (0, _react.useState)(false), | ||
var _a = useState(false), | ||
press = _a[0], | ||
@@ -55,3 +39,3 @@ setPress = _a[1]; | ||
var _b = (0, _react.useState)(false), | ||
var _b = useState(false), | ||
hover = _b[0], | ||
@@ -62,7 +46,7 @@ setHover = _b[1]; | ||
if (disabled) classes.push("" + STYLE_GROUP_NAME + suffix + "-disabled"); | ||
var handlePressIn = (0, _react.useCallback)(function (e) { | ||
var handlePressIn = useCallback(function (e) { | ||
onPressIn && onPressIn(e); | ||
setPress(true); | ||
}, []); | ||
var handlePressOut = (0, _react.useCallback)(function (e) { | ||
var handlePressOut = useCallback(function (e) { | ||
onPressOut && onPressOut(e); | ||
@@ -72,7 +56,7 @@ setPress(false); | ||
var _c = (0, _react.useState)(0), | ||
var _c = useState(0), | ||
process = _c[0], | ||
setProcess = _c[1]; | ||
var handleClick = (0, _react.useCallback)(function (e) { | ||
var handleClick = useCallback(function (e) { | ||
if (process > 0) return; | ||
@@ -111,6 +95,6 @@ setProcess(1); | ||
if (process === 2) { | ||
contents = _react["default"].createElement("span", null); | ||
contents = React.createElement("span", null); | ||
} else if (typeof contents === 'string') { | ||
contents = _react["default"].createElement("span", { | ||
style: (0, _lodash.pick)(elementStyle, _utils.TEXT_STYLE_NAMES) | ||
contents = React.createElement("span", { | ||
style: pick(elementStyle, TEXT_STYLE_NAMES) | ||
}, props.children); | ||
@@ -124,3 +108,3 @@ } | ||
var innerStyle = {}; | ||
return _react["default"].createElement("button", _extends({ | ||
return React.createElement("button", _extends({ | ||
onPress: handleClick, | ||
@@ -130,5 +114,5 @@ onPressIn: handlePressIn, | ||
disabled: process > 0 || disabled | ||
}, oProps), _react["default"].createElement(Element1, _extends({ | ||
}, oProps), React.createElement(Element1, _extends({ | ||
style: coverStyle | ||
}, args), _react["default"].createElement(Element2, { | ||
}, args), React.createElement(Element2, { | ||
style: innerStyle, | ||
@@ -139,3 +123,2 @@ children: contents | ||
var _default = Button; | ||
exports["default"] = _default; | ||
export default Button; |
@@ -1,35 +0,12 @@ | ||
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _tslib = require("tslib"); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
var _react = _interopRequireWildcard(require("react")); | ||
var _reactNative = require("react-native"); | ||
var _utils = require("../App/utils"); | ||
var _Form = require("../Form"); | ||
var _lodash = require("lodash"); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
import { __assign, __rest } from "tslib"; | ||
import PropTypes from 'prop-types'; | ||
import React, { useCallback, useContext, useEffect, useRef, useState } from 'react'; | ||
import { ActivityIndicator, SafeAreaView, StyleSheet, Text, TouchableWithoutFeedback, View } from 'react-native'; | ||
import { ABContext, TEXT_STYLE_NAMES } from '../App/utils'; | ||
import { FormContext } from '../Form'; | ||
import { isEqual, omit, pick } from 'lodash'; | ||
var STYLE_GROUP_NAME = 'ab-button'; | ||
var Button = _react["default"].memo(function (props) { | ||
var Button = React.memo(function (props) { | ||
var _a, _b; | ||
@@ -46,9 +23,10 @@ | ||
forceInset = props.forceInset, | ||
oProps = (0, _tslib.__rest)(props, ["type", "tpl", "style", "children", "disabled", "onPress", "onPressIn", "onPressOut", "forceInset"]); | ||
var fname = (0, _react.useRef)(null); | ||
var context = (0, _react.useContext)(_utils.ABContext); | ||
var formContext = (0, _react.useContext)(_Form.FormContext); | ||
oProps = __rest(props, ["type", "tpl", "style", "children", "disabled", "onPress", "onPressIn", "onPressOut", "forceInset"]); | ||
var fname = useRef(null); | ||
var context = useContext(ABContext); | ||
var formContext = useContext(FormContext); | ||
var styles = context.styles; | ||
var _c = (0, _react.useState)({}), | ||
var _c = useState({}), | ||
extraProps = _c[0], | ||
@@ -65,3 +43,3 @@ setExtraProps = _c[1]; | ||
var _d = (0, _react.useState)(false), | ||
var _d = useState(false), | ||
press = _d[0], | ||
@@ -72,3 +50,3 @@ setPress = _d[1]; | ||
var _e = (0, _react.useState)(false), | ||
var _e = useState(false), | ||
hover = _e[0], | ||
@@ -79,7 +57,7 @@ setHover = _e[1]; | ||
if (disabled) classes.push("" + STYLE_GROUP_NAME + suffix + "-disabled"); | ||
var handlePressIn = (0, _react.useCallback)(function (e) { | ||
var handlePressIn = useCallback(function (e) { | ||
onPressIn && onPressIn(e); | ||
setPress(true); | ||
}, []); | ||
var handlePressOut = (0, _react.useCallback)(function (e) { | ||
var handlePressOut = useCallback(function (e) { | ||
onPressOut && onPressOut(e); | ||
@@ -89,6 +67,6 @@ setPress(false); | ||
var setProps = function setProps(props) { | ||
if (!(0, _lodash.isEqual)(props, extraProps) && type === 'submit') { | ||
var setProps = function (props) { | ||
if (!isEqual(props, extraProps) && type === 'submit') { | ||
setExtraProps(function (p) { | ||
return (0, _tslib.__assign)((0, _tslib.__assign)({}, p), props); | ||
return __assign(__assign({}, p), props); | ||
}); | ||
@@ -98,7 +76,7 @@ } | ||
var _f = (0, _react.useState)(0), | ||
var _f = useState(0), | ||
process = _f[0], | ||
setProcess = _f[1]; | ||
var handleClick = (0, _react.useCallback)(function (e) { | ||
var handleClick = useCallback(function (e) { | ||
var _a, _b, _c; | ||
@@ -151,19 +129,17 @@ | ||
})); | ||
var elementStyle = _reactNative.StyleSheet.flatten(className.map(function (v) { | ||
var elementStyle = StyleSheet.flatten(className.map(function (v) { | ||
return styles[v]; | ||
}).concat([style])); | ||
var contents = children; | ||
if (process === 2 || ((_a = extraProps) === null || _a === void 0 ? void 0 : _a.submitting) && !onPress) { | ||
contents = _react["default"].createElement(_reactNative.ActivityIndicator, null); | ||
contents = React.createElement(ActivityIndicator, null); | ||
} else if (typeof contents === 'string') { | ||
contents = _react["default"].createElement(_reactNative.Text, { | ||
style: (0, _lodash.pick)(elementStyle, _utils.TEXT_STYLE_NAMES) | ||
contents = React.createElement(Text, { | ||
style: pick(elementStyle, TEXT_STYLE_NAMES) | ||
}, props.children); | ||
} | ||
var Element1 = _reactNative.View; | ||
var Element2 = _reactNative.View; | ||
var Element1 = View; | ||
var Element2 = View; | ||
var args = {}; | ||
@@ -174,9 +150,9 @@ var coverStyle = elementStyle; | ||
if (forceInset) { | ||
Element1 = _reactNative.SafeAreaView; | ||
Element2 = _reactNative.View; | ||
coverStyle = (0, _lodash.omit)(elementStyle, ['height', 'minHeight', 'maxHeight', 'borderRadius']); | ||
innerStyle = (0, _lodash.pick)(elementStyle, ['height', 'minHeight', 'maxHeight', 'alignItems', 'justifyContent']); | ||
Element1 = SafeAreaView; | ||
Element2 = View; | ||
coverStyle = omit(elementStyle, ['height', 'minHeight', 'maxHeight', 'borderRadius']); | ||
innerStyle = pick(elementStyle, ['height', 'minHeight', 'maxHeight', 'alignItems', 'justifyContent']); | ||
} | ||
(0, _react.useEffect)(function () { | ||
useEffect(function () { | ||
return function () { | ||
@@ -188,4 +164,4 @@ var _a, _b; | ||
}, []); | ||
return _react["default"].createElement(_reactNative.TouchableWithoutFeedback, _extends({ | ||
ref: function ref(el) { | ||
return React.createElement(TouchableWithoutFeedback, _extends({ | ||
ref: function (el) { | ||
var _a, _b; | ||
@@ -201,5 +177,5 @@ | ||
disabled: process > 0 || disabled || ((_b = extraProps) === null || _b === void 0 ? void 0 : _b.submitting) | ||
}, oProps), _react["default"].createElement(Element1, _extends({ | ||
}, oProps), React.createElement(Element1, _extends({ | ||
style: coverStyle | ||
}, args), _react["default"].createElement(Element2, { | ||
}, args), React.createElement(Element2, { | ||
style: innerStyle, | ||
@@ -209,10 +185,8 @@ children: contents | ||
}); | ||
Button.propTypes = (0, _tslib.__assign)({ | ||
type: _propTypes["default"].oneOf(['button', 'submit']) | ||
}, _reactNative.View.propTypes); | ||
Button.propTypes = __assign({ | ||
type: PropTypes.oneOf(['button', 'submit']) | ||
}, View.propTypes); | ||
Button.defaultProps = { | ||
type: 'submit' | ||
}; | ||
var _default = Button; | ||
exports["default"] = _default; | ||
export default Button; |
@@ -1,32 +0,11 @@ | ||
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = exports.FormContext = void 0; | ||
var _tslib = require("tslib"); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _lodash = require("lodash"); | ||
var _View = _interopRequireDefault(require("../web/View")); | ||
var _utils = require("../App/utils"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
var FormContext = React.createContext({}); | ||
exports.FormContext = FormContext; | ||
import { __awaiter, __generator, __rest, __spreadArrays } from "tslib"; | ||
import * as React from 'react'; | ||
import { forIn, isEqual } from 'lodash'; | ||
import View from '../web/View'; | ||
import { measure } from '../App/utils'; | ||
export var FormContext = React.createContext({}); | ||
var Form = function Form(props) { | ||
var Form = function (props) { | ||
var items = React.useRef({}); | ||
@@ -59,5 +38,6 @@ var index = React.useRef(0); | ||
var onLayout = props.onLayout, | ||
oProps = (0, _tslib.__rest)(props, ["onLayout"]); | ||
oProps = __rest(props, ["onLayout"]); | ||
var handleLayout = React.useCallback(function (e) { | ||
return (0, _tslib.__awaiter)(void 0, void 0, void 0, function () { | ||
return __awaiter(void 0, void 0, void 0, function () { | ||
var _a, width, height, pos, _i, _b, key, el, pos_1, area, elements; | ||
@@ -67,3 +47,3 @@ | ||
return (0, _tslib.__generator)(this, function (_k) { | ||
return __generator(this, function (_k) { | ||
switch (_k.label) { | ||
@@ -77,3 +57,3 @@ case 0: | ||
}; | ||
if ((0, _lodash.isEqual)(lastLayout, pos)) return [2 | ||
if (isEqual(lastLayout, pos)) return [2 | ||
/*return*/ | ||
@@ -96,3 +76,3 @@ ]; | ||
/*yield*/ | ||
, (0, _utils.measure)(el.input)]; | ||
, measure(el.input)]; | ||
@@ -140,3 +120,3 @@ case 2: | ||
var submit = React.useCallback(function () { | ||
return (0, _tslib.__awaiter)(void 0, void 0, void 0, function () { | ||
return __awaiter(void 0, void 0, void 0, function () { | ||
var elements, params, result, o; | ||
@@ -146,3 +126,3 @@ | ||
return (0, _tslib.__generator)(this, function (_f) { | ||
return __generator(this, function (_f) { | ||
switch (_f.label) { | ||
@@ -170,3 +150,4 @@ case 0: | ||
} else if (params[opt.name] !== null && params[opt.name] !== undefined) { | ||
var values = (0, _tslib.__spreadArrays)(params[opt.name], [opt.getValue()]); | ||
var values = __spreadArrays(params[opt.name], [opt.getValue()]); | ||
params[opt.name] = values; | ||
@@ -180,3 +161,3 @@ } | ||
result = new FormData(); | ||
(0, _lodash.forIn)(params, function (value, name) { | ||
forIn(params, function (value, name) { | ||
var _a, _b; | ||
@@ -200,3 +181,3 @@ | ||
o = _f.sent(); | ||
(0, _lodash.forIn)((_e = items) === null || _e === void 0 ? void 0 : _e.current, function (v) { | ||
forIn((_e = items) === null || _e === void 0 ? void 0 : _e.current, function (v) { | ||
var _a, _b, _c; | ||
@@ -222,3 +203,3 @@ | ||
value: value | ||
}, React.createElement(_View["default"], _extends({ | ||
}, React.createElement(View, _extends({ | ||
onLayout: handleLayout | ||
@@ -228,3 +209,2 @@ }, oProps))); | ||
var _default = Form; | ||
exports["default"] = _default; | ||
export default Form; |
/// <reference types="react" /> | ||
export { default as Button } from './Button'; | ||
export { default as ScrollView } from './ScrollView'; | ||
export { default as Form } from './Form'; | ||
export { default as Input } from './Input'; | ||
export { default as Select } from './Select'; | ||
export { default as Row } from './Layout/Row'; | ||
@@ -8,0 +3,0 @@ export { default as Col } from './Layout/Col'; |
@@ -1,130 +0,22 @@ | ||
"use strict"; | ||
import App from './App'; // export { default as Button } from './Button'; | ||
// export { default as ScrollView } from './ScrollView'; | ||
// | ||
// // Data Entry | ||
// export { default as Form } from './Form'; | ||
// export { default as Input } from './Input'; | ||
// export { default as Select } from './Select'; | ||
// | ||
// Layout | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
Object.defineProperty(exports, "Button", { | ||
enumerable: true, | ||
get: function get() { | ||
return _Button["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "ScrollView", { | ||
enumerable: true, | ||
get: function get() { | ||
return _ScrollView["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Form", { | ||
enumerable: true, | ||
get: function get() { | ||
return _Form["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Input", { | ||
enumerable: true, | ||
get: function get() { | ||
return _Input["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Select", { | ||
enumerable: true, | ||
get: function get() { | ||
return _Select["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Row", { | ||
enumerable: true, | ||
get: function get() { | ||
return _Row["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Col", { | ||
enumerable: true, | ||
get: function get() { | ||
return _Col["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "View", { | ||
enumerable: true, | ||
get: function get() { | ||
return _View["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Div", { | ||
enumerable: true, | ||
get: function get() { | ||
return _Div["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Header", { | ||
enumerable: true, | ||
get: function get() { | ||
return _Header["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Footer", { | ||
enumerable: true, | ||
get: function get() { | ||
return _Footer["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Section", { | ||
enumerable: true, | ||
get: function get() { | ||
return _Section["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Aside", { | ||
enumerable: true, | ||
get: function get() { | ||
return _Aside["default"]; | ||
} | ||
}); | ||
Object.defineProperty(exports, "Article", { | ||
enumerable: true, | ||
get: function get() { | ||
return _Article["default"]; | ||
} | ||
}); | ||
exports["default"] = exports.ActBase = void 0; | ||
export { default as Row } from './Layout/Row'; | ||
export { default as Col } from './Layout/Col'; // Web Migrated | ||
var _App = _interopRequireDefault(require("./App")); | ||
var _Button = _interopRequireDefault(require("./Button")); | ||
var _ScrollView = _interopRequireDefault(require("./ScrollView")); | ||
var _Form = _interopRequireDefault(require("./Form")); | ||
var _Input = _interopRequireDefault(require("./Input")); | ||
var _Select = _interopRequireDefault(require("./Select")); | ||
var _Row = _interopRequireDefault(require("./Layout/Row")); | ||
var _Col = _interopRequireDefault(require("./Layout/Col")); | ||
var _View = _interopRequireDefault(require("./web/View")); | ||
var _Div = _interopRequireDefault(require("./web/Div")); | ||
var _Header = _interopRequireDefault(require("./web/Header")); | ||
var _Footer = _interopRequireDefault(require("./web/Footer")); | ||
var _Section = _interopRequireDefault(require("./web/Section")); | ||
var _Aside = _interopRequireDefault(require("./web/Aside")); | ||
var _Article = _interopRequireDefault(require("./web/Article")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
// Data Entry | ||
// Layout | ||
// Web Migrated | ||
var ActBase = _App["default"]; | ||
exports.ActBase = ActBase; | ||
var _default = ActBase; | ||
exports["default"] = _default; | ||
export { default as View } from './web/View'; | ||
export { default as Div } from './web/Div'; | ||
export { default as Header } from './web/Header'; | ||
export { default as Footer } from './web/Footer'; | ||
export { default as Section } from './web/Section'; | ||
export { default as Aside } from './web/Aside'; | ||
export { default as Article } from './web/Article'; | ||
export var ActBase = App; | ||
export default ActBase; |
@@ -1,18 +0,10 @@ | ||
"use strict"; | ||
import { useContext, useEffect, useRef } from 'react'; | ||
import { FormContext } from '../Form'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _react = require("react"); | ||
var _Form = require("../Form"); | ||
var HiddenField = function HiddenField(props) { | ||
var HiddenField = function (props) { | ||
var name = props.name, | ||
value = props.value; | ||
var fname = (0, _react.useRef)(); | ||
var formContext = (0, _react.useContext)(_Form.FormContext); | ||
(0, _react.useEffect)(function () { | ||
var fname = useRef(); | ||
var formContext = useContext(FormContext); | ||
useEffect(function () { | ||
var _a, _b; | ||
@@ -22,3 +14,3 @@ | ||
name: name, | ||
getValue: function getValue() { | ||
getValue: function () { | ||
return value; | ||
@@ -36,3 +28,2 @@ } | ||
var _default = HiddenField; | ||
exports["default"] = _default; | ||
export default HiddenField; |
@@ -1,29 +0,14 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _TextField = _interopRequireDefault(require("./TextField")); | ||
var _Radio = _interopRequireDefault(require("./Radio")); | ||
var _Hidden = _interopRequireDefault(require("./Hidden")); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
import React from 'react'; | ||
import TextField from './TextField'; | ||
import Radio from './Radio'; | ||
import Hidden from './Hidden'; | ||
import PropTypes from 'prop-types'; | ||
var INPUT_TYPES = { | ||
checkbox: null, | ||
radio: _Radio["default"], | ||
hidden: _Hidden["default"] | ||
radio: Radio, | ||
hidden: Hidden | ||
}; | ||
var Input = _react["default"].forwardRef(function (props, ref) { | ||
var Input = React.forwardRef(function (props, ref) { | ||
var _a; | ||
@@ -33,7 +18,7 @@ | ||
var Element_1 = INPUT_TYPES[props.type]; | ||
return _react["default"].createElement(Element_1, _extends({ | ||
return React.createElement(Element_1, _extends({ | ||
ref: ref | ||
}, props)); | ||
} else { | ||
return _react["default"].createElement(_TextField["default"], _extends({ | ||
return React.createElement(TextField, _extends({ | ||
ref: ref | ||
@@ -43,8 +28,6 @@ }, props)); | ||
}); | ||
Input.propTypes = { | ||
name: _propTypes["default"].string, | ||
disabled: _propTypes["default"].bool | ||
name: PropTypes.string, | ||
disabled: PropTypes.bool | ||
}; | ||
var _default = Input; | ||
exports["default"] = _default; | ||
export default Input; |
@@ -1,23 +0,14 @@ | ||
"use strict"; | ||
import { __rest } from "tslib"; | ||
import { useContext } from 'react'; | ||
import { FormContext } from '../Form'; | ||
import { ABContext } from '../App/utils.native'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _tslib = require("tslib"); | ||
var _react = require("react"); | ||
var _Form = require("../Form"); | ||
var _utils = require("../App/utils.native"); | ||
var Radio = function Radio(props) { | ||
var Radio = function (props) { | ||
var checked = props.checked, | ||
children = props.children, | ||
style = props.style, | ||
oProps = (0, _tslib.__rest)(props, ["checked", "children", "style"]); | ||
var abContext = (0, _react.useContext)(_utils.ABContext); | ||
var formContext = (0, _react.useContext)(_Form.FormContext); // return ( | ||
oProps = __rest(props, ["checked", "children", "style"]); | ||
var abContext = useContext(ABContext); | ||
var formContext = useContext(FormContext); // return ( | ||
// <TouchableOpacity {...props}> | ||
@@ -40,3 +31,2 @@ // {checked && ( | ||
var _default = Radio; | ||
exports["default"] = _default; | ||
export default Radio; |
@@ -1,28 +0,9 @@ | ||
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _tslib = require("tslib"); | ||
var _react = _interopRequireWildcard(require("react")); | ||
var _reactNative = require("react-native"); | ||
var _lodash = require("lodash"); | ||
var _Form = require("../Form"); | ||
var _utils = require("../App/utils.native"); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
import { __assign, __rest } from "tslib"; | ||
import React, { useCallback, useContext, useRef, useState } from 'react'; | ||
import { StyleSheet, TextInput, TouchableOpacity, View } from 'react-native'; | ||
import { isEqual, omit, pick } from 'lodash'; | ||
import { FormContext } from '../Form'; | ||
import { ABContext, TEXT_STYLE_NAMES } from '../App/utils.native'; | ||
var STYLE_GROUP_NAME = 'ab-input-text'; | ||
@@ -42,4 +23,3 @@ var marginStyle = ['margin', 'marginHorizontal', 'marginVertical', 'marginTop', 'marginLeft', 'marginRight', 'marginBottom']; | ||
}; | ||
var TextField = _react["default"].forwardRef(function (props, ref) { | ||
var TextField = React.forwardRef(function (props, ref) { | ||
var _a, _b, _c; | ||
@@ -55,4 +35,4 @@ | ||
focusStyle = props.focusStyle, | ||
_onBlur = props.onBlur, | ||
_onFocus = props.onFocus, | ||
onBlur = props.onBlur, | ||
onFocus = props.onFocus, | ||
disabled = props.disabled, | ||
@@ -62,9 +42,10 @@ multiline = props.multiline, | ||
readonly = props.readonly, | ||
oProps = (0, _tslib.__rest)(props, ["type", "tpl", "style", "name", "onChangeText", "leftDeco", "rightDeco", "focusStyle", "onBlur", "onFocus", "disabled", "multiline", "clearButtonMode", "readonly"]); | ||
var fname = (0, _react.useRef)(); | ||
var inputRef = (0, _react.useRef)(); | ||
var context = (0, _react.useContext)(_utils.ABContext); | ||
var formContext = (0, _react.useContext)(_Form.FormContext); | ||
oProps = __rest(props, ["type", "tpl", "style", "name", "onChangeText", "leftDeco", "rightDeco", "focusStyle", "onBlur", "onFocus", "disabled", "multiline", "clearButtonMode", "readonly"]); | ||
var _d = (0, _react.useState)(((_a = props) === null || _a === void 0 ? void 0 : _a.value) || ''), | ||
var fname = useRef(); | ||
var inputRef = useRef(); | ||
var context = useContext(ABContext); | ||
var formContext = useContext(FormContext); | ||
var _d = useState(((_a = props) === null || _a === void 0 ? void 0 : _a.value) || ''), | ||
text = _d[0], | ||
@@ -75,3 +56,3 @@ setText = _d[1]; | ||
var _e = (0, _react.useState)({}), | ||
var _e = useState({}), | ||
extraProps = _e[0], | ||
@@ -88,3 +69,3 @@ setExtraProps = _e[1]; | ||
var _f = (0, _react.useState)(false), | ||
var _f = useState(false), | ||
focused = _f[0], | ||
@@ -97,3 +78,3 @@ setFocused = _f[1]; | ||
var handleChangeText = function handleChangeText(text) { | ||
var handleChangeText = function (text) { | ||
var _a; | ||
@@ -105,6 +86,6 @@ | ||
var setProps = (0, _react.useCallback)(function (props) { | ||
if (!(0, _lodash.isEqual)(props, extraProps)) { | ||
var setProps = useCallback(function (props) { | ||
if (!isEqual(props, extraProps)) { | ||
setExtraProps(function (p) { | ||
return (0, _tslib.__assign)((0, _tslib.__assign)({}, p), props); | ||
return __assign(__assign({}, p), props); | ||
}); | ||
@@ -114,7 +95,7 @@ } | ||
var getValue = function getValue() { | ||
var getValue = function () { | ||
return text; | ||
}; | ||
var handleRef = function handleRef(el) { | ||
var handleRef = function (el) { | ||
var _a, _b; | ||
@@ -127,3 +108,3 @@ | ||
getValue: getValue, | ||
focus: function focus() { | ||
focus: function () { | ||
var _a; | ||
@@ -133,3 +114,3 @@ | ||
}, | ||
blur: function blur() { | ||
blur: function () { | ||
var _a; | ||
@@ -148,3 +129,3 @@ | ||
var handleClear = function handleClear(props) { | ||
var handleClear = function (props) { | ||
var _a; | ||
@@ -161,3 +142,3 @@ | ||
containerStyle.push(focusStyle); | ||
inputStyle.push((0, _lodash.pick)(_reactNative.StyleSheet.flatten(focusStyle), _utils.TEXT_STYLE_NAMES)); | ||
inputStyle.push(pick(StyleSheet.flatten(focusStyle), TEXT_STYLE_NAMES)); | ||
} | ||
@@ -168,12 +149,10 @@ | ||
})); | ||
var elementStyle = _reactNative.StyleSheet.flatten(className.map(function (v) { | ||
var elementStyle = StyleSheet.flatten(className.map(function (v) { | ||
return styles[v]; | ||
}).concat([style])); //clearButtonMode !== 'never' | ||
return _react["default"].createElement(_reactNative.View, { | ||
style: (0, _lodash.pick)(elementStyle, marginStyle) | ||
}, _react["default"].createElement(_reactNative.View, { | ||
style: [(0, _lodash.omit)(elementStyle, marginStyle), { | ||
return React.createElement(View, { | ||
style: pick(elementStyle, marginStyle) | ||
}, React.createElement(View, { | ||
style: [omit(elementStyle, marginStyle), { | ||
alignItems: 'center', | ||
@@ -183,3 +162,3 @@ height: 'auto', | ||
}] | ||
}, leftDeco, _react["default"].createElement(_reactNative.TextInput, _extends({ | ||
}, leftDeco, React.createElement(TextInput, _extends({ | ||
ref: handleRef, | ||
@@ -190,10 +169,10 @@ onChangeText: handleChangeText, | ||
height: (_c = elementStyle) === null || _c === void 0 ? void 0 : _c.height | ||
}, (0, _lodash.pick)(elementStyle, _utils.TEXT_STYLE_NAMES)], | ||
onFocus: function onFocus(e) { | ||
}, pick(elementStyle, TEXT_STYLE_NAMES)], | ||
onFocus: function (e) { | ||
setFocused(true); | ||
_onFocus && _onFocus(e); | ||
onFocus && onFocus(e); | ||
}, | ||
onBlur: function onBlur(e) { | ||
onBlur: function (e) { | ||
setFocused(false); | ||
_onBlur && _onBlur(e); | ||
onBlur && onBlur(e); | ||
}, | ||
@@ -203,7 +182,7 @@ editable: !disabled, | ||
clearButtonMode: 'never' | ||
}, propTemplate[type], extraProps, oProps)), !!text && focused && _react["default"].createElement(_reactNative.TouchableOpacity, { | ||
}, propTemplate[type], extraProps, oProps)), !!text && focused && React.createElement(TouchableOpacity, { | ||
onPress: handleClear, | ||
activeOpacity: 0.2, | ||
style: styles['ab-input-text-clear'] | ||
}, _react["default"].createElement(_reactNative.View, { | ||
}, React.createElement(View, { | ||
style: [styles['ab-input-text-clear-line'], { | ||
@@ -214,3 +193,3 @@ transform: [{ | ||
}] | ||
}), _react["default"].createElement(_reactNative.View, { | ||
}), React.createElement(View, { | ||
style: [styles['ab-input-text-clear-line'], { | ||
@@ -223,4 +202,2 @@ transform: [{ | ||
}); | ||
var _default = TextField; | ||
exports["default"] = _default; | ||
export default TextField; |
@@ -1,29 +0,9 @@ | ||
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _tslib = require("tslib"); | ||
var _react = _interopRequireWildcard(require("react")); | ||
var _utils = require("../App/utils"); | ||
var _Row = require("./Row"); | ||
var _View = _interopRequireDefault(require("../web/View")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
import { __rest } from "tslib"; | ||
import React, { useContext } from 'react'; | ||
import { ABContext, getWindowSize } from '../App/utils'; | ||
import { RowContext } from './Row'; | ||
import View from '../web/View'; | ||
var STYLE_GROUP_NAME = 'ab-layout'; | ||
var Col = function Col(props) { | ||
var Col = function (props) { | ||
var xs = props.xs, | ||
@@ -35,6 +15,7 @@ sm = props.sm, | ||
span = props.span, | ||
oProps = (0, _tslib.__rest)(props, ["xs", "sm", "md", "lg", "xlg", "span"]); | ||
var width = (0, _utils.getWindowSize)().width; | ||
var context = (0, _react.useContext)(_utils.ABContext); | ||
var rowContext = (0, _react.useContext)(_Row.RowContext); | ||
oProps = __rest(props, ["xs", "sm", "md", "lg", "xlg", "span"]); | ||
var width = getWindowSize().width; | ||
var context = useContext(ABContext); | ||
var rowContext = useContext(RowContext); | ||
var styles = context.styles; | ||
@@ -57,3 +38,3 @@ var ratio = 12; | ||
var gutterV = rowContext.gutter[1] || 0; | ||
return _react["default"].createElement(_View["default"], { | ||
return React.createElement(View, { | ||
style: [styles[STYLE_GROUP_NAME + "-col"], { | ||
@@ -67,3 +48,3 @@ width: 100 * (Math.abs(ratio) / 12) + "%", | ||
}] | ||
}, _react["default"].createElement(_View["default"], oProps)); | ||
}, React.createElement(View, oProps)); | ||
}; | ||
@@ -74,3 +55,2 @@ | ||
}; | ||
var _default = Col; | ||
exports["default"] = _default; | ||
export default Col; |
@@ -1,43 +0,22 @@ | ||
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = exports.RowContext = exports.STYLE_GROUP_NAME = void 0; | ||
var _tslib = require("tslib"); | ||
var React = _interopRequireWildcard(require("react")); | ||
var _lodash = require("lodash"); | ||
var _utils = require("../App/utils"); | ||
var _View = _interopRequireDefault(require("../web/View")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
var STYLE_GROUP_NAME = 'ab-layout'; | ||
exports.STYLE_GROUP_NAME = STYLE_GROUP_NAME; | ||
var RowContext = React.createContext({ | ||
import { __rest } from "tslib"; | ||
import * as React from 'react'; | ||
import { isArray } from 'lodash'; | ||
import { ABContext } from '../App/utils'; | ||
import View from '../web/View'; | ||
export var STYLE_GROUP_NAME = 'ab-layout'; | ||
export var RowContext = React.createContext({ | ||
gutter: [10, 10] | ||
}); | ||
exports.RowContext = RowContext; | ||
var Row = function Row(props) { | ||
var Row = function (props) { | ||
var style = props.style, | ||
align = props.align, | ||
justify = props.justify, | ||
oProps = (0, _tslib.__rest)(props, ["style", "align", "justify"]); | ||
var context = React.useContext(_utils.ABContext); | ||
oProps = __rest(props, ["style", "align", "justify"]); | ||
var context = React.useContext(ABContext); | ||
var styles = context.styles; | ||
var gutter = (0, _lodash.isArray)(props.gutter) ? props.gutter : [props.gutter, props.gutter]; | ||
var gutter = isArray(props.gutter) ? props.gutter : [props.gutter, props.gutter]; | ||
var extStyle = { | ||
@@ -53,5 +32,5 @@ marginLeft: -(gutter[0] / 2), | ||
} | ||
}, React.createElement(_View["default"], { | ||
}, React.createElement(View, { | ||
style: style | ||
}, React.createElement(_View["default"], _extends({ | ||
}, React.createElement(View, _extends({ | ||
style: [styles[STYLE_GROUP_NAME + "-row"], extStyle] | ||
@@ -64,3 +43,2 @@ }, oProps)))); | ||
}; | ||
var _default = Row; | ||
exports["default"] = _default; | ||
export default Row; |
@@ -1,15 +0,6 @@ | ||
"use strict"; | ||
import React from 'react'; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
var ScrollView = function ScrollView(_a) { | ||
var ScrollView = function (_a) { | ||
var children = _a.children; | ||
return _react["default"].createElement("div", { | ||
return React.createElement("div", { | ||
style: { | ||
@@ -21,3 +12,2 @@ overflowY: 'scroll' | ||
var _default = ScrollView; | ||
exports["default"] = _default; | ||
export default ScrollView; |
@@ -1,31 +0,14 @@ | ||
"use strict"; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _tslib = require("tslib"); | ||
var _react = _interopRequireWildcard(require("react")); | ||
var _reactNative = require("react-native"); | ||
var _utils = require("../App/utils"); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
function _extends() { _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); } | ||
var height = _reactNative.Dimensions.get('screen').height; | ||
import { __awaiter, __generator, __rest } from "tslib"; | ||
import React, { useEffect, useRef, useState } from 'react'; | ||
import { Animated, Dimensions, Keyboard, Platform, ScrollView as RNScrollView } from 'react-native'; | ||
import { measure } from '../App/utils'; | ||
var height = Dimensions.get('screen').height; | ||
var ScrollView = function ScrollView(props) { | ||
var ScrollView = function (props) { | ||
var _a; | ||
var animated = null; | ||
var refObject = (0, _react.useRef)({ | ||
var refObject = useRef({ | ||
scroll: null, | ||
@@ -35,14 +18,14 @@ container: null | ||
var _b = (0, _react.useState)(null), | ||
var _b = useState(null), | ||
focusItem = _b[0], | ||
setFocusItem = _b[1]; | ||
var _c = (0, _react.useState)(0), | ||
var _c = useState(0), | ||
footDimen = _c[0], | ||
setFootDimen = _c[1]; | ||
var keyboardHeight = (0, _react.useRef)(new _reactNative.Animated.Value(0)).current; | ||
var keyboardHeight = useRef(new Animated.Value(0)).current; | ||
var handleKDS = function handleKDS(e) { | ||
return (0, _tslib.__awaiter)(void 0, void 0, void 0, function () { | ||
var handleKDS = function (e) { | ||
return __awaiter(void 0, void 0, void 0, function () { | ||
var posScroll, bottom, toValue; | ||
@@ -52,3 +35,3 @@ | ||
return (0, _tslib.__generator)(this, function (_c) { | ||
return __generator(this, function (_c) { | ||
switch (_c.label) { | ||
@@ -61,3 +44,3 @@ case 0: | ||
/*yield*/ | ||
, (0, _utils.measure)((_b = refObject) === null || _b === void 0 ? void 0 : _b.scroll)]; | ||
, measure((_b = refObject) === null || _b === void 0 ? void 0 : _b.scroll)]; | ||
@@ -87,3 +70,3 @@ case 1: | ||
var handleKWH = function handleKWH(e) { | ||
var handleKWH = function (e) { | ||
if (animated) { | ||
@@ -94,3 +77,3 @@ animated.stop(); | ||
animated = _reactNative.Animated.timing(keyboardHeight, { | ||
animated = Animated.timing(keyboardHeight, { | ||
duration: e.duration, | ||
@@ -102,3 +85,3 @@ toValue: 0 | ||
var handleKDH = function handleKDH() { | ||
var handleKDH = function () { | ||
if (animated) { | ||
@@ -112,3 +95,3 @@ animated.stop(); | ||
(0, _react.useEffect)(function () { | ||
useEffect(function () { | ||
var _a; | ||
@@ -120,4 +103,4 @@ | ||
(0, _utils.measure)((_a = refObject) === null || _a === void 0 ? void 0 : _a.scroll).then(function (posScroll) { | ||
return (0, _tslib.__awaiter)(void 0, void 0, void 0, function () { | ||
measure((_a = refObject) === null || _a === void 0 ? void 0 : _a.scroll).then(function (posScroll) { | ||
return __awaiter(void 0, void 0, void 0, function () { | ||
var offsetY, posContainer, posFocus, offset, y, nowY, moveY; | ||
@@ -127,3 +110,3 @@ | ||
return (0, _tslib.__generator)(this, function (_h) { | ||
return __generator(this, function (_h) { | ||
switch (_h.label) { | ||
@@ -137,3 +120,3 @@ case 0: | ||
/*yield*/ | ||
, (0, _utils.measure)((_c = refObject) === null || _c === void 0 ? void 0 : _c.container)]; | ||
, measure((_c = refObject) === null || _c === void 0 ? void 0 : _c.container)]; | ||
@@ -144,3 +127,3 @@ case 1: | ||
/*yield*/ | ||
, (0, _utils.measure)(focusItem)]; | ||
, measure(focusItem)]; | ||
@@ -180,12 +163,12 @@ case 2: | ||
}, [focusItem, footDimen]); | ||
(0, _react.useEffect)(function () { | ||
useEffect(function () { | ||
var listeners = []; | ||
if (_reactNative.Platform.OS === 'ios') { | ||
listeners.push(_reactNative.Keyboard.addListener('keyboardWillShow', handleKDS)); | ||
listeners.push(_reactNative.Keyboard.addListener('keyboardWillHide', handleKWH)); | ||
if (Platform.OS === 'ios') { | ||
listeners.push(Keyboard.addListener('keyboardWillShow', handleKDS)); | ||
listeners.push(Keyboard.addListener('keyboardWillHide', handleKWH)); | ||
} | ||
listeners.push(_reactNative.Keyboard.addListener('keyboardDidShow', handleKDS)); | ||
listeners.push(_reactNative.Keyboard.addListener('keyboardDidHide', handleKDH)); | ||
listeners.push(Keyboard.addListener('keyboardDidShow', handleKDS)); | ||
listeners.push(Keyboard.addListener('keyboardDidHide', handleKDH)); | ||
return function () { | ||
@@ -199,10 +182,12 @@ listeners.forEach(function (listener) { | ||
}, []); | ||
var keyboardShouldPersistTaps = props.keyboardShouldPersistTaps, | ||
_onFocus = props.onFocus, | ||
_onBlur = props.onBlur, | ||
onFocus = props.onFocus, | ||
onBlur = props.onBlur, | ||
children = props.children, | ||
oProps = (0, _tslib.__rest)(props, ["keyboardShouldPersistTaps", "onFocus", "onBlur", "children"]); | ||
var Element = ((_a = props) === null || _a === void 0 ? void 0 : _a.onScroll) ? _reactNative.Animated.ScrollView : _reactNative.ScrollView; | ||
return _react["default"].createElement(Element, _extends({ | ||
ref: function ref(e) { | ||
oProps = __rest(props, ["keyboardShouldPersistTaps", "onFocus", "onBlur", "children"]); | ||
var Element = ((_a = props) === null || _a === void 0 ? void 0 : _a.onScroll) ? Animated.ScrollView : RNScrollView; | ||
return React.createElement(Element, _extends({ | ||
ref: function (e) { | ||
var _a; | ||
@@ -215,13 +200,13 @@ | ||
}, oProps, { | ||
onFocus: function onFocus(e) { | ||
onFocus: function (e) { | ||
setFocusItem(e.target); | ||
_onFocus && _onFocus(e); | ||
onFocus && onFocus(e); | ||
}, | ||
onBlur: function onBlur(e) { | ||
onBlur: function (e) { | ||
setFocusItem(null); | ||
_onBlur && _onBlur(e); | ||
onBlur && onBlur(e); | ||
}, | ||
keyboardShouldPersistTaps: keyboardShouldPersistTaps || 'handled' | ||
}), _react["default"].createElement(_reactNative.Animated.View, { | ||
ref: function ref(e) { | ||
}), React.createElement(Animated.View, { | ||
ref: function (e) { | ||
var _a, _b, _c; | ||
@@ -238,3 +223,2 @@ | ||
var _default = ScrollView; | ||
exports["default"] = _default; | ||
export default ScrollView; |
@@ -1,19 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
import React from 'react'; | ||
import { View } from 'react-native'; | ||
var Select = React.memo(function (props) { | ||
return React.createElement(View, props); | ||
}); | ||
exports["default"] = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _reactNative = require("react-native"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
var Select = _react["default"].memo(function (props) { | ||
return _react["default"].createElement(_reactNative.View, props); | ||
}); | ||
var _default = Select; | ||
exports["default"] = _default; | ||
export default Select; |
@@ -1,19 +0,6 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
import React from 'react'; | ||
import { View } from 'react-native'; | ||
var Option = React.memo(function (props) { | ||
return React.createElement(View, props); | ||
}); | ||
exports["default"] = void 0; | ||
var _react = _interopRequireDefault(require("react")); | ||
var _reactNative = require("react-native"); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
var Option = _react["default"].memo(function (props) { | ||
return _react["default"].createElement(_reactNative.View, props); | ||
}); | ||
var _default = Option; | ||
exports["default"] = _default; | ||
export default Option; |
@@ -1,21 +0,7 @@ | ||
"use strict"; | ||
import * as React from 'react'; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var React = _interopRequireWildcard(require("react")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
var Article = function Article(props) { | ||
var Article = function (props) { | ||
return React.createElement(Article, props); | ||
}; | ||
var _default = Article; | ||
exports["default"] = _default; | ||
export default Article; |
@@ -1,11 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _reactNative = require("react-native"); | ||
var _default = _reactNative.View; | ||
exports["default"] = _default; | ||
import { View as Article } from 'react-native'; | ||
export default Article; |
@@ -1,21 +0,7 @@ | ||
"use strict"; | ||
import * as React from 'react'; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var React = _interopRequireWildcard(require("react")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
var Aside = function Aside(props) { | ||
var Aside = function (props) { | ||
return React.createElement(Aside, props); | ||
}; | ||
var _default = Aside; | ||
exports["default"] = _default; | ||
export default Aside; |
@@ -1,11 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _reactNative = require("react-native"); | ||
var _default = _reactNative.View; | ||
exports["default"] = _default; | ||
import { View as Aside } from 'react-native'; | ||
export default Aside; |
@@ -1,21 +0,7 @@ | ||
"use strict"; | ||
import * as React from 'react'; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var React = _interopRequireWildcard(require("react")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
var Div = function Div(props) { | ||
var Div = function (props) { | ||
return React.createElement("div", props); | ||
}; | ||
var _default = Div; | ||
exports["default"] = _default; | ||
export default Div; |
@@ -1,11 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _reactNative = require("react-native"); | ||
var _default = _reactNative.View; | ||
exports["default"] = _default; | ||
import { View as Div } from 'react-native'; | ||
export default Div; |
@@ -1,21 +0,7 @@ | ||
"use strict"; | ||
import * as React from 'react'; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var React = _interopRequireWildcard(require("react")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
var Footer = function Footer(props) { | ||
var Footer = function (props) { | ||
return React.createElement("footer", props); | ||
}; | ||
var _default = Footer; | ||
exports["default"] = _default; | ||
export default Footer; |
@@ -1,11 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _reactNative = require("react-native"); | ||
var _default = _reactNative.View; | ||
exports["default"] = _default; | ||
import { View as Footer } from 'react-native'; | ||
export default Footer; |
@@ -1,21 +0,7 @@ | ||
"use strict"; | ||
import * as React from 'react'; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var React = _interopRequireWildcard(require("react")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
var Header = function Header(props) { | ||
var Header = function (props) { | ||
return React.createElement("header", props); | ||
}; | ||
var _default = Header; | ||
exports["default"] = _default; | ||
export default Header; |
@@ -1,11 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _reactNative = require("react-native"); | ||
var _default = _reactNative.View; | ||
exports["default"] = _default; | ||
import { View as Header } from 'react-native'; | ||
export default Header; |
@@ -1,21 +0,7 @@ | ||
"use strict"; | ||
import * as React from 'react'; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var React = _interopRequireWildcard(require("react")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
var Section = function Section(props) { | ||
var Section = function (props) { | ||
return React.createElement("section", props); | ||
}; | ||
var _default = Section; | ||
exports["default"] = _default; | ||
export default Section; |
@@ -1,11 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _reactNative = require("react-native"); | ||
var _default = _reactNative.View; | ||
exports["default"] = _default; | ||
import { View as Section } from 'react-native'; | ||
export default Section; |
@@ -1,21 +0,7 @@ | ||
"use strict"; | ||
import * as React from 'react'; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var React = _interopRequireWildcard(require("react")); | ||
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function _getRequireWildcardCache() { return cache; }; return cache; } | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; } | ||
var View = function View(props) { | ||
var View = function (props) { | ||
return React.createElement("div", props); | ||
}; | ||
var _default = View; | ||
exports["default"] = _default; | ||
export default View; |
@@ -1,11 +0,2 @@ | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _reactNative = require("react-native"); | ||
var _default = _reactNative.View; | ||
exports["default"] = _default; | ||
import { View } from 'react-native'; | ||
export default View; |
{ | ||
"name": "actbase", | ||
"version": "0.0.40", | ||
"version": "0.0.41", | ||
"description": "React & React-Native Design Components", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
93700
115
1517