@draftbit/core 46.11.5-d0abaf.2 → 46.11.5-f65e23.2
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/lib/commonjs/components/Accordion/AccordionGroup.js.map +1 -1
- package/lib/commonjs/components/Accordion/AccordionItem.js +4 -22
- package/lib/commonjs/components/Accordion/AccordionItem.js.map +1 -1
- package/lib/commonjs/components/AnimatedCircularProgress.js +2 -11
- package/lib/commonjs/components/AnimatedCircularProgress.js.map +1 -1
- package/lib/commonjs/components/AvatarEdit.js +4 -15
- package/lib/commonjs/components/AvatarEdit.js.map +1 -1
- package/lib/commonjs/components/BottomSheet/BottomSheet.js +18 -3
- package/lib/commonjs/components/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/commonjs/components/Button.js +10 -32
- package/lib/commonjs/components/Button.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxGroup.js +16 -3
- package/lib/commonjs/components/Checkbox/CheckboxGroup.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js +22 -5
- package/lib/commonjs/components/Checkbox/CheckboxGroupRow.js.map +1 -1
- package/lib/commonjs/components/Checkbox/CheckboxRow.js +6 -23
- package/lib/commonjs/components/Checkbox/CheckboxRow.js.map +1 -1
- package/lib/commonjs/components/DeckSwiper/index.js.map +1 -1
- package/lib/commonjs/components/Markdown.js.map +1 -1
- package/lib/commonjs/components/NumberInput.js +3 -11
- package/lib/commonjs/components/NumberInput.js.map +1 -1
- package/lib/commonjs/components/Picker/PickerComponent.web.js +4 -21
- package/lib/commonjs/components/Picker/PickerComponent.web.js.map +1 -1
- package/lib/commonjs/components/SwipeableView/SwipeableView.js +155 -0
- package/lib/commonjs/components/SwipeableView/SwipeableView.js.map +1 -0
- package/lib/commonjs/components/SwipeableView/SwipeableViewButton.js +13 -0
- package/lib/commonjs/components/SwipeableView/SwipeableViewButton.js.map +1 -0
- package/lib/commonjs/components/SwipeableView/SwipeableViewSwipeHandler.js +13 -0
- package/lib/commonjs/components/SwipeableView/SwipeableViewSwipeHandler.js.map +1 -0
- package/lib/commonjs/components/SwipeableView/index.js +28 -0
- package/lib/commonjs/components/SwipeableView/index.js.map +1 -0
- package/lib/commonjs/components/Table/TableCommon.js.map +1 -1
- package/lib/commonjs/components/Text.js +4 -50
- package/lib/commonjs/components/Text.js.map +1 -1
- package/lib/commonjs/constants.js +1 -1
- package/lib/commonjs/index.js +19 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mappings/BottomSheet.js +37 -9
- package/lib/commonjs/mappings/BottomSheet.js.map +1 -1
- package/lib/commonjs/mappings/FlatList.js +0 -3
- package/lib/commonjs/mappings/FlatList.js.map +1 -1
- package/lib/commonjs/mappings/KeyboardAwareScrollView.js.map +1 -1
- package/lib/commonjs/mappings/MapCallout.js.map +1 -1
- package/lib/commonjs/mappings/Picker.js.map +1 -1
- package/lib/commonjs/mappings/Shadow.js.map +1 -1
- package/lib/commonjs/mappings/SwipeableView.js +183 -0
- package/lib/commonjs/mappings/SwipeableView.js.map +1 -0
- package/lib/commonjs/mappings/TabView.js.map +1 -1
- package/lib/commonjs/mappings/ToggleButton.js.map +1 -1
- package/lib/commonjs/utilities.js +27 -2
- package/lib/commonjs/utilities.js.map +1 -1
- package/lib/module/components/ActionSheet/index.js.map +1 -1
- package/lib/module/components/BottomSheet/BottomSheet.js +18 -3
- package/lib/module/components/BottomSheet/BottomSheet.js.map +1 -1
- package/lib/module/components/SwipeableView/SwipeableView.js +147 -0
- package/lib/module/components/SwipeableView/SwipeableView.js.map +1 -0
- package/lib/module/components/SwipeableView/SwipeableViewButton.js +6 -0
- package/lib/module/components/SwipeableView/SwipeableViewButton.js.map +1 -0
- package/lib/module/components/SwipeableView/SwipeableViewSwipeHandler.js +6 -0
- package/lib/module/components/SwipeableView/SwipeableViewSwipeHandler.js.map +1 -0
- package/lib/module/components/SwipeableView/index.js +4 -0
- package/lib/module/components/SwipeableView/index.js.map +1 -0
- package/lib/module/components/Touchable.js +2 -15
- package/lib/module/components/Touchable.js.map +1 -1
- package/lib/module/constants.js +1 -1
- package/lib/module/index.js +1 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/mappings/BottomSheet.js +38 -10
- package/lib/module/mappings/BottomSheet.js.map +1 -1
- package/lib/module/mappings/FlatList.js +0 -3
- package/lib/module/mappings/FlatList.js.map +1 -1
- package/lib/module/mappings/SwipeableView.js +175 -0
- package/lib/module/mappings/SwipeableView.js.map +1 -0
- package/lib/module/utilities.js +18 -0
- package/lib/module/utilities.js.map +1 -1
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts +6 -1
- package/lib/typescript/src/components/BottomSheet/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/src/components/SwipeableView/SwipeableView.d.ts +29 -0
- package/lib/typescript/src/components/SwipeableView/SwipeableView.d.ts.map +1 -0
- package/lib/typescript/src/components/SwipeableView/SwipeableViewButton.d.ts +13 -0
- package/lib/typescript/src/components/SwipeableView/SwipeableViewButton.d.ts.map +1 -0
- package/lib/typescript/src/components/SwipeableView/SwipeableViewSwipeHandler.d.ts +13 -0
- package/lib/typescript/src/components/SwipeableView/SwipeableViewSwipeHandler.d.ts.map +1 -0
- package/lib/typescript/src/components/SwipeableView/index.d.ts +4 -0
- package/lib/typescript/src/components/SwipeableView/index.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/mappings/BottomSheet.d.ts +48 -4
- package/lib/typescript/src/mappings/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/src/mappings/FlatList.d.ts +0 -3
- package/lib/typescript/src/mappings/FlatList.d.ts.map +1 -1
- package/lib/typescript/src/mappings/SwipeableView.d.ts +426 -0
- package/lib/typescript/src/mappings/SwipeableView.d.ts.map +1 -0
- package/lib/typescript/src/utilities.d.ts +6 -0
- package/lib/typescript/src/utilities.d.ts.map +1 -1
- package/package.json +4 -3
- package/src/components/BottomSheet/BottomSheet.js +17 -2
- package/src/components/BottomSheet/BottomSheet.tsx +32 -4
- package/src/components/SwipeableView/SwipeableView.js +117 -0
- package/src/components/SwipeableView/SwipeableView.tsx +299 -0
- package/src/components/SwipeableView/SwipeableViewButton.js +5 -0
- package/src/components/SwipeableView/SwipeableViewButton.tsx +18 -0
- package/src/components/SwipeableView/SwipeableViewSwipeHandler.js +5 -0
- package/src/components/SwipeableView/SwipeableViewSwipeHandler.tsx +20 -0
- package/src/components/SwipeableView/index.js +3 -0
- package/src/components/SwipeableView/index.tsx +3 -0
- package/src/index.js +1 -0
- package/src/index.tsx +6 -0
- package/src/mappings/BottomSheet.js +37 -9
- package/src/mappings/BottomSheet.ts +43 -8
- package/src/mappings/FlatList.js +0 -3
- package/src/mappings/FlatList.ts +0 -3
- package/src/mappings/SwipeableView.js +181 -0
- package/src/mappings/SwipeableView.ts +210 -0
- package/src/utilities.js +41 -0
- package/src/utilities.ts +71 -0
|
@@ -9,6 +9,7 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _lodash = require("lodash");
|
|
10
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
|
|
12
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
12
13
|
const NumberInput = _ref => {
|
|
13
14
|
let {
|
|
14
15
|
onChangeText,
|
|
@@ -39,6 +40,7 @@ const NumberInput = _ref => {
|
|
|
39
40
|
setCurrentStringNumberValue(newStringNumberValue);
|
|
40
41
|
onChangeText === null || onChangeText === void 0 ? void 0 : onChangeText(number);
|
|
41
42
|
};
|
|
43
|
+
|
|
42
44
|
// run handleChangeText with value prop only when value prop changes (and first render to reset currentStringNumberValue)
|
|
43
45
|
(0, _react.useEffect)(() => {
|
|
44
46
|
const nextStringNumberValue = formatValueToStringNumber(value);
|
|
@@ -47,6 +49,7 @@ const NumberInput = _ref => {
|
|
|
47
49
|
}
|
|
48
50
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
49
51
|
}, [value]);
|
|
52
|
+
|
|
50
53
|
// set currentStringNumberValue as defaultValue prop if there is a differnce on first render only
|
|
51
54
|
(0, _react.useEffect)(() => {
|
|
52
55
|
const defaultStringNumberValue = formatValueToStringNumber(defaultValue);
|
|
@@ -55,17 +58,6 @@ const NumberInput = _ref => {
|
|
|
55
58
|
}
|
|
56
59
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
57
60
|
}, []);
|
|
58
|
-
return /*#__PURE__*/_react.default.createElement(_reactNative.TextInput, {
|
|
59
|
-
keyboardType: "numeric",
|
|
60
|
-
value: currentStringNumberValue,
|
|
61
|
-
onChangeText: handleChangeText,
|
|
62
|
-
...props
|
|
63
|
-
});
|
|
64
|
-
};
|
|
65
|
-
var _default = NumberInput;
|
|
66
|
-
exports.default = _default;
|
|
67
|
-
//# sourceMappingURL=NumberInput.js.mapxt-line react-hooks/exhaustive-deps
|
|
68
|
-
}, []);
|
|
69
61
|
return /*#__PURE__*/_react.default.createElement(_reactNative.TextInput, _extends({
|
|
70
62
|
keyboardType: "numeric",
|
|
71
63
|
value: currentStringNumberValue,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["NumberInput","onChangeText","value","defaultValue","props","currentStringNumberValue","setCurrentStringNumberValue","useState","formatValueToStringNumber","valueToFormat","isString","test","slice","isNumber","isNaN","toString","handleChangeText","newValue","newStringNumberValue","number","parseFloat","useEffect","nextStringNumberValue","defaultStringNumberValue"
|
|
1
|
+
{"version":3,"names":["NumberInput","onChangeText","value","defaultValue","props","currentStringNumberValue","setCurrentStringNumberValue","useState","formatValueToStringNumber","valueToFormat","isString","test","slice","isNumber","isNaN","toString","handleChangeText","newValue","newStringNumberValue","number","parseFloat","useEffect","nextStringNumberValue","defaultStringNumberValue"],"sourceRoot":"../../../src","sources":["components/NumberInput.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AAAmD;AAAA;AAAA;AAQnD,MAAMA,WAAsB,GAAG,QAKzB;EAAA,IAL0B;IAC9BC,YAAY;IACZC,KAAK;IACLC,YAAY;IACZ,GAAGC;EACL,CAAC;EACC,MAAM,CAACC,wBAAwB,EAAEC,2BAA2B,CAAC,GAAG,IAAAC,eAAQ,EAAC,EAAE,CAAC;EAE5E,MAAMC,yBAAyB,GAAIC,aAA+B,IAAK;IACrE,IAAIA,aAAa,IAAI,IAAI,EAAE;MACzB,IAAI,IAAAC,gBAAQ,EAACD,aAAa,CAAC,IAAIA,aAAa,KAAK,EAAE,EAAE;QACnD,IAAI,UAAU,CAACE,IAAI,CAACF,aAAa,CAAC,EAAE;UAClC,OAAOA,aAAa,CAACG,KAAK,CAAC,CAAC,CAAC;QAC/B,CAAC,MAAM,IAAI,mCAAmC,CAACD,IAAI,CAACF,aAAa,CAAC,EAAE;UAClE,OAAOA,aAAa;QACtB,CAAC,MAAM;UACL,OAAOJ,wBAAwB;QACjC;MACF,CAAC,MAAM,IAAI,IAAAQ,gBAAQ,EAACJ,aAAa,CAAC,IAAI,CAAC,IAAAK,aAAK,EAACL,aAAa,CAAC,EAAE;QAC3D,OAAOA,aAAa,CAACM,QAAQ,EAAE;MACjC;IACF;IAEA,OAAO,EAAE;EACX,CAAC;EAED,MAAMC,gBAAgB,GAAIC,QAAgB,IAAK;IAC7C,MAAMC,oBAAoB,GAAGV,yBAAyB,CAACS,QAAQ,CAAC;IAChE,MAAME,MAAM,GAAGC,UAAU,CAACF,oBAAoB,CAAC;IAE/CZ,2BAA2B,CAACY,oBAAoB,CAAC;IACjDjB,YAAY,aAAZA,YAAY,uBAAZA,YAAY,CAAGkB,MAAM,CAAC;EACxB,CAAC;;EAED;EACA,IAAAE,gBAAS,EAAC,MAAM;IACd,MAAMC,qBAAqB,GAAGd,yBAAyB,CAACN,KAAK,CAAC;IAE9D,IAAIG,wBAAwB,KAAKiB,qBAAqB,EAAE;MACtDN,gBAAgB,CAACM,qBAAqB,CAAC;IACzC;IACA;EACF,CAAC,EAAE,CAACpB,KAAK,CAAC,CAAC;;EAEX;EACA,IAAAmB,gBAAS,EAAC,MAAM;IACd,MAAME,wBAAwB,GAAGf,yBAAyB,CAACL,YAAY,CAAC;IAExE,IAAIE,wBAAwB,KAAKkB,wBAAwB,EAAE;MACzDjB,2BAA2B,CAACiB,wBAAwB,CAAC;IACvD;IACA;EACF,CAAC,EAAE,EAAE,CAAC;EAEN,oBACE,6BAAC,sBAAS;IACR,YAAY,EAAC,SAAS;IACtB,KAAK,EAAElB,wBAAyB;IAChC,YAAY,EAAEW;EAAiB,GAC3BZ,KAAK,EACT;AAEN,CAAC;AAAC,eAEaJ,WAAW;AAAA"}
|
|
@@ -15,7 +15,9 @@ var _Touchable = _interopRequireDefault(require("../Touchable"));
|
|
|
15
15
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
16
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
17
17
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
|
|
18
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
18
19
|
const Picker = _ref => {
|
|
20
|
+
var _options$find$label, _options$find;
|
|
19
21
|
let {
|
|
20
22
|
style,
|
|
21
23
|
options,
|
|
@@ -25,7 +27,6 @@ const Picker = _ref => {
|
|
|
25
27
|
onValueChange: onValueChangeOverride = () => {},
|
|
26
28
|
...props
|
|
27
29
|
} = _ref;
|
|
28
|
-
var _a, _b;
|
|
29
30
|
const {
|
|
30
31
|
viewStyles: {
|
|
31
32
|
borderRadius,
|
|
@@ -70,7 +71,7 @@ const Picker = _ref => {
|
|
|
70
71
|
};
|
|
71
72
|
|
|
72
73
|
const stylesWithoutMargin = style && (0, _lodash.default)(_reactNative.StyleSheet.flatten(style), ["margin", "marginTop", "marginRight", "marginBottom", "marginLeft"]);
|
|
73
|
-
const selectedLabel = selectedValue && ((
|
|
74
|
+
const selectedLabel = selectedValue && ((_options$find$label = (_options$find = options.find(o => o.value === selectedValue)) === null || _options$find === void 0 ? void 0 : _options$find.label) !== null && _options$find$label !== void 0 ? _options$find$label : selectedValue);
|
|
74
75
|
return /*#__PURE__*/React.createElement(_Touchable.default, {
|
|
75
76
|
disabled: disabled,
|
|
76
77
|
onPress: toggleFocus,
|
|
@@ -95,25 +96,7 @@ const Picker = _ref => {
|
|
|
95
96
|
key: o.value
|
|
96
97
|
}))), /*#__PURE__*/React.createElement(_reactNative.View, {
|
|
97
98
|
pointerEvents: "none"
|
|
98
|
-
}, /*#__PURE__*/React.createElement(_TextField.default, {
|
|
99
|
-
...props,
|
|
100
|
-
value: selectedLabel,
|
|
101
|
-
placeholder: placeholder,
|
|
102
|
-
// @ts-ignore
|
|
103
|
-
ref: textField,
|
|
104
|
-
disabled: disabled,
|
|
105
|
-
// @ts-expect-error
|
|
106
|
-
style: stylesWithoutMargin
|
|
107
|
-
}))));
|
|
108
|
-
};
|
|
109
|
-
const styles = _reactNative.StyleSheet.create({
|
|
110
|
-
container: {
|
|
111
|
-
alignSelf: "stretch"
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
var _default = (0, _theming.withTheme)(Picker);
|
|
115
|
-
exports.default = _default;
|
|
116
|
-
//# sourceMappingURL=PickerComponent.web.js.mapeateElement(_TextField.default, _extends({}, props, {
|
|
99
|
+
}, /*#__PURE__*/React.createElement(_TextField.default, _extends({}, props, {
|
|
117
100
|
value: selectedLabel,
|
|
118
101
|
placeholder: placeholder
|
|
119
102
|
// @ts-ignore
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Picker","style","options","placeholder","selectedValue","disabled","onValueChange","onValueChangeOverride","props","
|
|
1
|
+
{"version":3,"names":["Picker","style","options","placeholder","selectedValue","disabled","onValueChange","onValueChangeOverride","props","viewStyles","borderRadius","borderWidth","borderTopWidth","borderRightWidth","borderBottomWidth","borderLeftWidth","borderColor","backgroundColor","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","extractStyles","textField","React","useRef","undefined","itemValue","itemIndex","toggleFocus","current","stylesWithoutMargin","omit","StyleSheet","flatten","selectedLabel","find","o","value","label","styles","container","flex","opacity","position","top","left","right","bottom","width","map","create","alignSelf","withTheme"],"sourceRoot":"../../../../src","sources":["components/Picker/PickerComponent.web.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AAAqC;AAAA;AAAA;AAAA;AAGrC,MAAMA,MAAsC,GAAG,QAQzC;EAAA;EAAA,IAR0C;IAC9CC,KAAK;IACLC,OAAO;IACPC,WAAW;IACXC,aAAa;IACbC,QAAQ,GAAG,KAAK;IAChBC,aAAa,EAAEC,qBAAqB,GAAG,MAAM,CAAC,CAAC;IAC/C,GAAGC;EACL,CAAC;EACC,MAAM;IACJC,UAAU,EAAE;MACVC,YAAY;MAAE;MACdC,WAAW;MAAE;MACbC,cAAc;MAAE;MAChBC,gBAAgB;MAAE;MAClBC,iBAAiB;MAAE;MACnBC,eAAe;MAAE;MACjBC,WAAW;MAAE;MACbC,eAAe;MAAE;MACjBC,OAAO;MAAE;MACTC,UAAU;MAAE;MACZC,YAAY;MAAE;MACdC,aAAa;MAAE;MACfC,WAAW;MAAE;MACb,GAAGb;IACL;EACF,CAAC,GAAG,IAAAc,wBAAa,EAACtB,KAAK,CAAC;EAExB,MAAMuB,SAAS,GAAGC,KAAK,CAACC,MAAM,CAA+BC,SAAS,CAAC;EAEvE,MAAMrB,aAAa,GAAG,CAACsB,SAAiB,EAAEC,SAAiB,KAAK;IAC9DC,WAAW,EAAE;IACbvB,qBAAqB,CAACqB,SAAS,EAAEC,SAAS,CAAC;EAC7C,CAAC;EAED,MAAMC,WAAW,GAAG,MAAM;IACxB,IAAI,CAACzB,QAAQ,EAAE;MACb;MACAmB,SAAS,CAACO,OAAO,CAACD,WAAW,EAAE,CAAC,CAAC;IACnC;EACF,CAAC;;EAED,MAAME,mBAAmB,GACvB/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AC3B,CACG,CACF,CACG;AAEhB,CAAC;AAED,MAAMS,MAAM,GAAGP,uBAAU,CAACkB,MAAM,CAAC;EAC/BV,SAAS,EAAE;IACTW,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAAC,eAEY,IAAAC,kBAAS,EAACtD,MAAM,CAAC;AAAA"}
|
|
@@ -0,0 +1,155 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
var _react = _interopRequireDefault(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _Pressable = _interopRequireDefault(require("../Pressable"));
|
|
10
|
+
var _utilities = require("../../utilities");
|
|
11
|
+
var _reactNativeSwipeListView = require("react-native-swipe-list-view");
|
|
12
|
+
var _theming = require("../../theming");
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
14
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
15
|
+
const SwipeableView = _ref => {
|
|
16
|
+
let {
|
|
17
|
+
theme,
|
|
18
|
+
style,
|
|
19
|
+
children,
|
|
20
|
+
Icon,
|
|
21
|
+
closeOnPress,
|
|
22
|
+
leftOpenValue,
|
|
23
|
+
rightOpenValue,
|
|
24
|
+
leftActivationValue,
|
|
25
|
+
rightActivationValue,
|
|
26
|
+
swipeActivationPercentage = 80,
|
|
27
|
+
stopLeftSwipe,
|
|
28
|
+
stopRightSwipe,
|
|
29
|
+
friction = 20,
|
|
30
|
+
...rest
|
|
31
|
+
} = _ref;
|
|
32
|
+
const instanceOfSwipeableViewButtonProps = object => {
|
|
33
|
+
return "title" in object && "side" in object && "onPress" in object;
|
|
34
|
+
};
|
|
35
|
+
const instanceOfSwipeableViewSwipeHandlerProps = object => {
|
|
36
|
+
return "title" in object && "side" in object && "onSwipe" in object;
|
|
37
|
+
};
|
|
38
|
+
const {
|
|
39
|
+
viewStyles,
|
|
40
|
+
textStyles
|
|
41
|
+
} = (0, _utilities.extractStyles)(style);
|
|
42
|
+
const {
|
|
43
|
+
borderStyles,
|
|
44
|
+
marginStyles
|
|
45
|
+
} = (0, _utilities.extractBorderAndMarginStyles)(viewStyles);
|
|
46
|
+
const parentContainerStyles = _reactNative.StyleSheet.flatten([borderStyles, marginStyles, (0, _utilities.extractFlexItemStyles)(viewStyles), (0, _utilities.extractPositionStyles)(viewStyles), (0, _utilities.extractEffectStyles)(viewStyles), (0, _utilities.extractSizeStyles)(viewStyles)]);
|
|
47
|
+
|
|
48
|
+
//Remove styles already consumed from viewStyles
|
|
49
|
+
Object.keys(parentContainerStyles).forEach(key => delete viewStyles[key]);
|
|
50
|
+
const surfaceContainerStyles = viewStyles;
|
|
51
|
+
const [componentWidth, setComponentWidth] = _react.default.useState(null);
|
|
52
|
+
const leftButtons = _react.default.useMemo(() => _react.default.Children.toArray(children).filter(child => /*#__PURE__*/_react.default.isValidElement(child) && instanceOfSwipeableViewButtonProps(child.props) && child.props.side === "left"), [children]);
|
|
53
|
+
const rightButtons = _react.default.useMemo(() => _react.default.Children.toArray(children).filter(child => /*#__PURE__*/_react.default.isValidElement(child) && instanceOfSwipeableViewButtonProps(child.props) && child.props.side === "right"), [children]);
|
|
54
|
+
const leftSwipeHandlers = _react.default.useMemo(() => _react.default.Children.toArray(children).filter(child => /*#__PURE__*/_react.default.isValidElement(child) && instanceOfSwipeableViewSwipeHandlerProps(child.props) && child.props.side === "left"), [children]);
|
|
55
|
+
const rightSwipeHandlers = _react.default.useMemo(() => _react.default.Children.toArray(children).filter(child => /*#__PURE__*/_react.default.isValidElement(child) && instanceOfSwipeableViewSwipeHandlerProps(child.props) && child.props.side === "right"), [children]);
|
|
56
|
+
const remainingChildren = _react.default.useMemo(() => _react.default.Children.toArray(children).filter(child => /*#__PURE__*/_react.default.isValidElement(child) && !instanceOfSwipeableViewSwipeHandlerProps(child.props) && !instanceOfSwipeableViewButtonProps(child.props)), [children]);
|
|
57
|
+
if (leftButtons.length > 2 || rightButtons.length > 2) {
|
|
58
|
+
throw Error("Cannot have more than 2 buttons per side");
|
|
59
|
+
}
|
|
60
|
+
if (leftSwipeHandlers.length > 1 || rightSwipeHandlers.length > 1) {
|
|
61
|
+
throw Error("Cannot have more than 1 swiper handler per side");
|
|
62
|
+
}
|
|
63
|
+
if (leftButtons.length && leftSwipeHandlers.length || rightButtons.length && rightSwipeHandlers.length) {
|
|
64
|
+
throw Error("Cannot combine swiper handler and buttons on the same side");
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
//Renders a single button/item. Used for both buttons and swipe handler
|
|
68
|
+
const renderBehindItem = (props, index) => /*#__PURE__*/_react.default.createElement(_Pressable.default, {
|
|
69
|
+
key: index.toString(),
|
|
70
|
+
onPress: props.onPress,
|
|
71
|
+
style: [styles.buttonContainer, {
|
|
72
|
+
backgroundColor: props.backgroundColor || theme.colors.primary
|
|
73
|
+
}]
|
|
74
|
+
}, props.icon && /*#__PURE__*/_react.default.createElement(Icon, {
|
|
75
|
+
name: props.icon,
|
|
76
|
+
size: props.iconSize || 25,
|
|
77
|
+
color: props.color || theme.colors.surface
|
|
78
|
+
}), /*#__PURE__*/_react.default.createElement(_reactNative.Text, {
|
|
79
|
+
style: [textStyles, {
|
|
80
|
+
color: props.color || theme.colors.surface
|
|
81
|
+
}]
|
|
82
|
+
}, props.title));
|
|
83
|
+
const isLeftSwipeHandler = !!leftSwipeHandlers.length;
|
|
84
|
+
const isRightSwipeHandler = !!rightSwipeHandlers.length;
|
|
85
|
+
const defaultLeftOpenValue = componentWidth ? componentWidth / 2 : 0;
|
|
86
|
+
const defaultRightOpenValue = componentWidth ? -componentWidth / 2 : 0;
|
|
87
|
+
return /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
88
|
+
onLayout: event => {
|
|
89
|
+
setComponentWidth(event.nativeEvent.layout.width);
|
|
90
|
+
},
|
|
91
|
+
style: [styles.parentContainer, parentContainerStyles]
|
|
92
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNativeSwipeListView.SwipeRow, _extends({
|
|
93
|
+
leftOpenValue: isLeftSwipeHandler ? 0 : leftOpenValue || defaultLeftOpenValue //If in swiping mode, don't keep open
|
|
94
|
+
,
|
|
95
|
+
|
|
96
|
+
rightOpenValue: isRightSwipeHandler ? 0 : rightOpenValue || defaultRightOpenValue,
|
|
97
|
+
leftActivationValue: leftActivationValue || isLeftSwipeHandler ? defaultLeftOpenValue * (swipeActivationPercentage / 100) //When swipe passes activation percentage then it should be considered activated (call onSwipe)
|
|
98
|
+
: defaultLeftOpenValue,
|
|
99
|
+
rightActivationValue: rightActivationValue || isRightSwipeHandler ? defaultRightOpenValue * (swipeActivationPercentage / 100) : defaultRightOpenValue,
|
|
100
|
+
stopLeftSwipe: stopLeftSwipe || defaultLeftOpenValue,
|
|
101
|
+
stopRightSwipe: stopRightSwipe || defaultRightOpenValue,
|
|
102
|
+
onLeftAction: isLeftSwipeHandler ? () => {
|
|
103
|
+
var _leftSwipeHandlers$0$, _leftSwipeHandlers$0$2;
|
|
104
|
+
return (_leftSwipeHandlers$0$ = (_leftSwipeHandlers$0$2 = leftSwipeHandlers[0].props).onSwipe) === null || _leftSwipeHandlers$0$ === void 0 ? void 0 : _leftSwipeHandlers$0$.call(_leftSwipeHandlers$0$2);
|
|
105
|
+
} : undefined,
|
|
106
|
+
onRightAction: isRightSwipeHandler ? () => {
|
|
107
|
+
var _rightSwipeHandlers$, _rightSwipeHandlers$2;
|
|
108
|
+
return (_rightSwipeHandlers$ = (_rightSwipeHandlers$2 = rightSwipeHandlers[0].props).onSwipe) === null || _rightSwipeHandlers$ === void 0 ? void 0 : _rightSwipeHandlers$.call(_rightSwipeHandlers$2);
|
|
109
|
+
} : undefined,
|
|
110
|
+
closeOnRowPress: closeOnPress,
|
|
111
|
+
friction: friction
|
|
112
|
+
}, rest), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
113
|
+
style: styles.behindContainer
|
|
114
|
+
}, /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
115
|
+
style: styles.behindContainerItem
|
|
116
|
+
}, (isLeftSwipeHandler ? leftSwipeHandlers : leftButtons).map((item, index) => renderBehindItem(item.props, index))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
117
|
+
style: styles.behindContainerItem
|
|
118
|
+
}, (isRightSwipeHandler ? rightSwipeHandlers : rightButtons).map((item, index) => renderBehindItem(item.props, index)))), /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
119
|
+
style: [styles.surfaceContainer, {
|
|
120
|
+
backgroundColor: theme.colors.background
|
|
121
|
+
}, surfaceContainerStyles]
|
|
122
|
+
}, remainingChildren)));
|
|
123
|
+
};
|
|
124
|
+
const styles = _reactNative.StyleSheet.create({
|
|
125
|
+
parentContainer: {
|
|
126
|
+
overflow: "hidden",
|
|
127
|
+
minHeight: 50
|
|
128
|
+
},
|
|
129
|
+
behindContainer: {
|
|
130
|
+
flex: 1,
|
|
131
|
+
width: "100%",
|
|
132
|
+
height: "100%",
|
|
133
|
+
flexDirection: "row"
|
|
134
|
+
},
|
|
135
|
+
behindContainerItem: {
|
|
136
|
+
flex: 1,
|
|
137
|
+
flexDirection: "row"
|
|
138
|
+
},
|
|
139
|
+
buttonContainer: {
|
|
140
|
+
flex: 1,
|
|
141
|
+
alignItems: "center",
|
|
142
|
+
justifyContent: "center"
|
|
143
|
+
},
|
|
144
|
+
surfaceContainer: {
|
|
145
|
+
flexDirection: "row",
|
|
146
|
+
width: "100%",
|
|
147
|
+
height: "100%",
|
|
148
|
+
padding: 10,
|
|
149
|
+
alignItems: "center",
|
|
150
|
+
overflow: "hidden"
|
|
151
|
+
}
|
|
152
|
+
});
|
|
153
|
+
var _default = (0, _theming.withTheme)(SwipeableView);
|
|
154
|
+
exports.default = _default;
|
|
155
|
+
//# sourceMappingURL=SwipeableView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SwipeableView","theme","style","children","Icon","closeOnPress","leftOpenValue","rightOpenValue","leftActivationValue","rightActivationValue","swipeActivationPercentage","stopLeftSwipe","stopRightSwipe","friction","rest","instanceOfSwipeableViewButtonProps","object","instanceOfSwipeableViewSwipeHandlerProps","viewStyles","textStyles","extractStyles","borderStyles","marginStyles","extractBorderAndMarginStyles","parentContainerStyles","StyleSheet","flatten","extractFlexItemStyles","extractPositionStyles","extractEffectStyles","extractSizeStyles","Object","keys","forEach","key","surfaceContainerStyles","componentWidth","setComponentWidth","React","useState","leftButtons","useMemo","Children","toArray","filter","child","isValidElement","props","side","rightButtons","leftSwipeHandlers","rightSwipeHandlers","remainingChildren","length","Error","renderBehindItem","index","toString","onPress","styles","buttonContainer","backgroundColor","colors","primary","icon","iconSize","color","surface","title","isLeftSwipeHandler","isRightSwipeHandler","defaultLeftOpenValue","defaultRightOpenValue","event","nativeEvent","layout","width","parentContainer","onSwipe","undefined","behindContainer","behindContainerItem","map","item","surfaceContainer","background","create","overflow","minHeight","flex","height","flexDirection","alignItems","justifyContent","padding","withTheme"],"sourceRoot":"../../../../src","sources":["components/SwipeableView/SwipeableView.tsx"],"mappings":";;;;;;AAAA;AACA;AAQA;AACA;AAQA;AAGA;AAA0C;AAAA;AAyB1C,MAAMA,aAAoE,GAAG,QAevE;EAAA,IAfwE;IAC5EC,KAAK;IACLC,KAAK;IACLC,QAAQ;IACRC,IAAI;IACJC,YAAY;IACZC,aAAa;IACbC,cAAc;IACdC,mBAAmB;IACnBC,oBAAoB;IACpBC,yBAAyB,GAAG,EAAE;IAC9BC,aAAa;IACbC,cAAc;IACdC,QAAQ,GAAG,EAAE;IACb,GAAGC;EACL,CAAC;EACC,MAAMC,kCAAkC,GACtCC,MAAW,IAC4B;IACvC,OAAO,OAAO,IAAI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pBC,cAAc,EAAE;EAClB,CAAC;EACDT,gBAAgB,EAAE;IAChBO,aAAa,EAAE,KAAK;IACpBf,KAAK,EAAE,MAAM;IACbc,MAAM,EAAE,MAAM;IACdI,OAAO,EAAE,EAAE;IACXF,UAAU,EAAE,QAAQ;IACpBL,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAAC,eAEY,IAAAQ,kBAAS,EAAC/F,aAAa,CAAC;AAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
//Renders nothing, acts as a wrapper be used by SwipeableView
|
|
8
|
+
const SwipeableViewButton = () => {
|
|
9
|
+
return null;
|
|
10
|
+
};
|
|
11
|
+
var _default = SwipeableViewButton;
|
|
12
|
+
exports.default = _default;
|
|
13
|
+
//# sourceMappingURL=SwipeableViewButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SwipeableViewButton"],"sourceRoot":"../../../../src","sources":["components/SwipeableView/SwipeableViewButton.tsx"],"mappings":";;;;;;AAYA;AACA,MAAMA,mBAAuD,GAAG,MAAM;EACpE,OAAO,IAAI;AACb,CAAC;AAAC,eAEaA,mBAAmB;AAAA"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = void 0;
|
|
7
|
+
//Renders nothing, acts as a wrapper to be used by SwipeableView
|
|
8
|
+
const SwipeableViewSwipeHandler = () => {
|
|
9
|
+
return null;
|
|
10
|
+
};
|
|
11
|
+
var _default = SwipeableViewSwipeHandler;
|
|
12
|
+
exports.default = _default;
|
|
13
|
+
//# sourceMappingURL=SwipeableViewSwipeHandler.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SwipeableViewSwipeHandler"],"sourceRoot":"../../../../src","sources":["components/SwipeableView/SwipeableViewSwipeHandler.tsx"],"mappings":";;;;;;AAYA;AACA,MAAMA,yBAEL,GAAG,MAAM;EACR,OAAO,IAAI;AACb,CAAC;AAAC,eAEaA,yBAAyB;AAAA"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "SwipeableView", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _SwipeableView.default;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "SwipeableViewButton", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _SwipeableViewButton.default;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "SwipeableViewSwipeHandler", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _SwipeableViewSwipeHandler.default;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
var _SwipeableView = _interopRequireDefault(require("./SwipeableView"));
|
|
25
|
+
var _SwipeableViewButton = _interopRequireDefault(require("./SwipeableViewButton"));
|
|
26
|
+
var _SwipeableViewSwipeHandler = _interopRequireDefault(require("./SwipeableViewSwipeHandler"));
|
|
27
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
28
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../../src","sources":["components/SwipeableView/index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AAAmF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["TableStyleContext","React","createContext","generateBorderStyles","borderColor","borderWidth","borderStyle","drawTopBorder","drawBottomBorder","drawStartBorder","drawEndBorder","borderTopWidth","borderBottomWidth","borderStartWidth","borderEndWidth"],"sourceRoot":"../../../../src","sources":["components/Table/TableCommon.
|
|
1
|
+
{"version":3,"names":["TableStyleContext","React","createContext","generateBorderStyles","borderColor","borderWidth","borderStyle","drawTopBorder","drawBottomBorder","drawStartBorder","drawEndBorder","borderTopWidth","borderBottomWidth","borderStartWidth","borderEndWidth"],"sourceRoot":"../../../../src","sources":["components/Table/TableCommon.ts"],"mappings":";;;;;;;AAAA;AAA0B;AAKnB,MAAMA,iBAAiB,gBAAGC,cAAK,CAACC,aAAa,CAAkB,CAAC,CAAC,CAAC;AAAC;AAiBnE,SAASC,oBAAoB,OAQV;EAAA,IARW;IACnCC,WAAW;IACXC,WAAW;IACXC,WAAW;IACXC,aAAa;IACbC,gBAAgB;IAChBC,eAAe;IACfC;EACU,CAAC;EACX,OAAO;IACLN,WAAW;IACXE,WAAW;IACXK,cAAc,EAAEJ,aAAa,GAAGF,WAAW,GAAG,CAAC;IAC/CO,iBAAiB,EAAEJ,gBAAgB,GAAGH,WAAW,GAAG,CAAC;IACrDQ,gBAAgB,EAAEJ,eAAe,GAAGJ,WAAW,GAAG,CAAC;IACnDS,cAAc,EAAEJ,aAAa,GAAGL,WAAW,GAAG;EAChD,CAAC;AACH"}
|
|
@@ -9,57 +9,11 @@ var _reactNative = require("react-native");
|
|
|
9
9
|
var _theming = require("../theming");
|
|
10
10
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
11
11
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && 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; }
|
|
12
|
+
function _extends() { _extends = Object.assign ? Object.assign.bind() : 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); }
|
|
13
|
+
function _defineProperty(obj, key, value) { key = _toPropertyKey(key); if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
14
|
+
function _toPropertyKey(arg) { var key = _toPrimitive(arg, "string"); return typeof key === "symbol" ? key : String(key); }
|
|
15
|
+
function _toPrimitive(input, hint) { if (typeof input !== "object" || input === null) return input; var prim = input[Symbol.toPrimitive]; if (prim !== undefined) { var res = prim.call(input, hint || "default"); if (typeof res !== "object") return res; throw new TypeError("@@toPrimitive must return a primitive value."); } return (hint === "string" ? String : Number)(input); }
|
|
12
16
|
class Text extends React.Component {
|
|
13
|
-
constructor() {
|
|
14
|
-
super(...arguments);
|
|
15
|
-
this.state = {
|
|
16
|
-
nativeProps: {}
|
|
17
|
-
};
|
|
18
|
-
}
|
|
19
|
-
setNativeProps(args) {
|
|
20
|
-
this.state.nativeProps = args || {};
|
|
21
|
-
}
|
|
22
|
-
render() {
|
|
23
|
-
const {
|
|
24
|
-
style,
|
|
25
|
-
...rest
|
|
26
|
-
} = this.props;
|
|
27
|
-
const writingDirection = _reactNative.I18nManager.isRTL ? "rtl" : "ltr";
|
|
28
|
-
return /*#__PURE__*/React.createElement(_reactNative.Text, {
|
|
29
|
-
...rest,
|
|
30
|
-
...this.state.nativeProps,
|
|
31
|
-
ref: c => {
|
|
32
|
-
this._root = c;
|
|
33
|
-
},
|
|
34
|
-
style: [{
|
|
35
|
-
textAlign: "left",
|
|
36
|
-
writingDirection
|
|
37
|
-
}, style]
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
const BaseLink = _ref => {
|
|
42
|
-
let {
|
|
43
|
-
style,
|
|
44
|
-
theme,
|
|
45
|
-
title,
|
|
46
|
-
...props
|
|
47
|
-
} = _ref;
|
|
48
|
-
return /*#__PURE__*/React.createElement(Text, {
|
|
49
|
-
hitSlop: 8,
|
|
50
|
-
style: [{
|
|
51
|
-
color: theme.colors.primary
|
|
52
|
-
}, style],
|
|
53
|
-
theme: theme,
|
|
54
|
-
...props
|
|
55
|
-
}, title);
|
|
56
|
-
};
|
|
57
|
-
exports.BaseLink = BaseLink;
|
|
58
|
-
const Link = (0, _theming.withTheme)(BaseLink);
|
|
59
|
-
exports.Link = Link;
|
|
60
|
-
var _default = (0, _theming.withTheme)(Text);
|
|
61
|
-
exports.default = _default;
|
|
62
|
-
//# sourceMappingURL=Text.js.mapext extends React.Component {
|
|
63
17
|
constructor() {
|
|
64
18
|
super(...arguments);
|
|
65
19
|
_defineProperty(this, "state", {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["Text","React","Component","
|
|
1
|
+
{"version":3,"names":["Text","React","Component","nativeProps","setNativeProps","args","state","render","style","rest","props","writingDirection","I18nManager","isRTL","c","_root","textAlign","BaseLink","theme","title","color","colors","primary","Link","withTheme"],"sourceRoot":"../../../src","sources":["components/Text.tsx"],"mappings":";;;;;;AAAA;AACA;AACA;AAAuC;AAAA;AAAA;AAAA;AAAA;AAAA;AAOvC,MAAMA,IAAI,SAASC,KAAK,CAACC,SAAS,CAAQ;EAAA;IAAA;IAAA,+BAG3B;MACXC,WAAW,EAAE,CAAC;IAChB,CAAC;EAAA;EAEDC,cAAc,CAACC,IAAe,EAAE;IAC9B,IAAI,CAACC,KAAK,CAACH,WAAW,GAAGE,IAAI,IAAI,CAAC,CAAC;EACrC;EAEAE,MAAM,GAAG;IACP,MAAM;MAAEC,KAAK;MAAE,GAAGC;IAAK,CAAC,GAAG,IAAI,CAACC,KAAK;IACrC,MAAMC,gBAAgB,GAAGC,wBAAW,CAACC,KAAK,GAAG,KAAK,GAAG,KAAK;IAE1D,oBACE,oBAAC,iBAAU,eACLJ,IAAI,EACJ,IAAI,CAACH,KAAK,CAACH,WAAW;MAC1B,GAAG,EAAGW,CAAC,IAAK;QACV,IAAI,CAACC,KAAK,GAAGD,CAAC;MAChB,CAAE;MACF,KAAK,EAAE,CACL;QACEE,SAAS,EAAE,MAAM;QACjBL;MACF,CAAC,EACDH,KAAK;IACL,GACF;EAEN;AACF;AAEO,MAAMS,QAAQ,GAAG,QAKA;EAAA,IALC;IACvBT,KAAK;IACLU,KAAK;IACLC,KAAK;IACL,GAAGT;EACA,CAAC;EACJ,oBACE,oBAAC,IAAI;IACH,OAAO,EAAE,CAAE;IACX,KAAK,EAAE,CAAC;MAAEU,KAAK,EAAEF,KAAK,CAACG,MAAM,CAACC;IAAQ,CAAC,EAAEd,KAAK,CAAE;IAChD,KAAK,EAAEU;EAAM,GACTR,KAAK,GAERS,KAAK,CACD;AAEX,CAAC;AAAC;AAEF,MAAMI,IAAS,GAAG,IAAAC,kBAAS,EAACP,QAAQ,CAAC;AAAC;AAAA,eAGvB,IAAAO,kBAAS,EAACxB,IAAI,CAAC;AAAA"}
|
|
@@ -13,4 +13,4 @@ const APPROX_STATUSBAR_HEIGHT = _reactNative.Platform.select({
|
|
|
13
13
|
ios: _reactNative.Platform.Version < 11 ? DEFAULT_STATUSBAR_HEIGHT_EXPO : 0
|
|
14
14
|
});
|
|
15
15
|
exports.APPROX_STATUSBAR_HEIGHT = APPROX_STATUSBAR_HEIGHT;
|
|
16
|
-
//# sourceMappingURL=constants.js.
|
|
16
|
+
//# sourceMappingURL=constants.js.map
|
package/lib/commonjs/index.js
CHANGED
|
@@ -333,6 +333,24 @@ Object.defineProperty(exports, "Surface", {
|
|
|
333
333
|
return _Surface.default;
|
|
334
334
|
}
|
|
335
335
|
});
|
|
336
|
+
Object.defineProperty(exports, "SwipeableView", {
|
|
337
|
+
enumerable: true,
|
|
338
|
+
get: function () {
|
|
339
|
+
return _SwipeableView.SwipeableView;
|
|
340
|
+
}
|
|
341
|
+
});
|
|
342
|
+
Object.defineProperty(exports, "SwipeableViewButton", {
|
|
343
|
+
enumerable: true,
|
|
344
|
+
get: function () {
|
|
345
|
+
return _SwipeableView.SwipeableViewButton;
|
|
346
|
+
}
|
|
347
|
+
});
|
|
348
|
+
Object.defineProperty(exports, "SwipeableViewSwipeHandler", {
|
|
349
|
+
enumerable: true,
|
|
350
|
+
get: function () {
|
|
351
|
+
return _SwipeableView.SwipeableViewSwipeHandler;
|
|
352
|
+
}
|
|
353
|
+
});
|
|
336
354
|
Object.defineProperty(exports, "Swiper", {
|
|
337
355
|
enumerable: true,
|
|
338
356
|
get: function () {
|
|
@@ -474,6 +492,7 @@ var _Markdown = _interopRequireDefault(require("./components/Markdown"));
|
|
|
474
492
|
var _BottomSheet = require("./components/BottomSheet");
|
|
475
493
|
var _YoutubePlayer = require("./components/YoutubePlayer");
|
|
476
494
|
var _Table = require("./components/Table");
|
|
495
|
+
var _SwipeableView = require("./components/SwipeableView");
|
|
477
496
|
var _DatePicker = _interopRequireDefault(require("./components/DatePicker/DatePicker"));
|
|
478
497
|
var _Picker = _interopRequireDefault(require("./components/Picker/Picker"));
|
|
479
498
|
var _ProgressBar = _interopRequireDefault(require("./components/ProgressBar"));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":"
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAKA;AAEA;AASA;AAOA;AAEA;AAEA;AACA;AAEA;AAEA;AAEA;AAEA;AAOA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAAyD;AAAA;AAAA"}
|
|
@@ -17,16 +17,32 @@ const SEED_DATA = {
|
|
|
17
17
|
label: "On settle",
|
|
18
18
|
description: "Action to execute when sheet settles on a snap point"
|
|
19
19
|
}),
|
|
20
|
-
|
|
21
|
-
label: "
|
|
22
|
-
description: "
|
|
23
|
-
defaultValue:
|
|
20
|
+
topSnapPosition: (0, _types.createStaticNumberProp)({
|
|
21
|
+
label: "Top snap position",
|
|
22
|
+
description: "Top most postion where bottom sheet can snap to. A numerical value that represents distance from the top",
|
|
23
|
+
defaultValue: "10%",
|
|
24
|
+
required: false,
|
|
25
|
+
formType: _types.FORM_TYPES.numeric
|
|
24
26
|
}),
|
|
25
|
-
|
|
26
|
-
label: "
|
|
27
|
-
description: "
|
|
28
|
-
defaultValue:
|
|
29
|
-
required: false
|
|
27
|
+
middleSnapPosition: (0, _types.createStaticNumberProp)({
|
|
28
|
+
label: "Middle snap position",
|
|
29
|
+
description: "Middle postion where bottom sheet can snap to. A numerical value that represents distance from the top",
|
|
30
|
+
defaultValue: "50%",
|
|
31
|
+
required: false,
|
|
32
|
+
formType: _types.FORM_TYPES.numeric
|
|
33
|
+
}),
|
|
34
|
+
bottomSnapPosition: (0, _types.createStaticNumberProp)({
|
|
35
|
+
label: "Bottom snap position",
|
|
36
|
+
description: "Bottom most postion where bottom sheet can snap to. A numerical value that represents distance from the top",
|
|
37
|
+
defaultValue: "80%",
|
|
38
|
+
required: false,
|
|
39
|
+
formType: _types.FORM_TYPES.numeric
|
|
40
|
+
}),
|
|
41
|
+
initialSnapPosition: (0, _types.createTextEnumProp)({
|
|
42
|
+
label: "Initial snap position",
|
|
43
|
+
description: "Initial snap position that bottom sheet will snap to",
|
|
44
|
+
options: ["top", "middle", "bottom"],
|
|
45
|
+
defaultValue: "bottom"
|
|
30
46
|
}),
|
|
31
47
|
showHandle: (0, _types.createStaticBoolProp)({
|
|
32
48
|
label: "Show handle",
|
|
@@ -64,6 +80,18 @@ const SEED_DATA = {
|
|
|
64
80
|
label: "Bounce",
|
|
65
81
|
description: "When true, the scroll view bounces when it reaches the end of the content if the content is larger then the scroll view along the axis of the scroll direction.",
|
|
66
82
|
defaultValue: true
|
|
83
|
+
}),
|
|
84
|
+
snapPoints: (0, _types.createArrayProp)({
|
|
85
|
+
label: "Custom Snap points",
|
|
86
|
+
description: "An array of numerical values (that represent distance from the top) where bottom sheet can snap to. Accepts numbers and percentages (minimum 2 snap points). Overrides snap position props",
|
|
87
|
+
defaultValue: null
|
|
88
|
+
}),
|
|
89
|
+
initialSnapIndex: (0, _types.createStaticNumberProp)({
|
|
90
|
+
label: "Initial snap index",
|
|
91
|
+
description: "Index of the snap point to be used as the initial point. Overrides initial snap position",
|
|
92
|
+
defaultValue: null,
|
|
93
|
+
required: false,
|
|
94
|
+
group: _types.GROUPS.advanced
|
|
67
95
|
})
|
|
68
96
|
}
|
|
69
97
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","bottomsheet","stylesPanelSections","CONTAINER_COMPONENT_STYLES_SECTIONS","triggers","Triggers","OnSettle","props","onSettle","createActionProp","label","
|
|
1
|
+
{"version":3,"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","bottomsheet","stylesPanelSections","CONTAINER_COMPONENT_STYLES_SECTIONS","triggers","Triggers","OnSettle","props","onSettle","createActionProp","label","topSnapPosition","createStaticNumberProp","defaultValue","required","formType","FORM_TYPES","numeric","middleSnapPosition","bottomSnapPosition","initialSnapPosition","createTextEnumProp","options","showHandle","createStaticBoolProp","handleColor","createColorProp","topBorderRadius","borderWidth","borderColor","showsVerticalScrollIndicator","bounces","snapPoints","createArrayProp","initialSnapIndex","group","GROUPS","advanced"],"sourceRoot":"../../../src","sources":["mappings/BottomSheet.ts"],"mappings":";;;;;;AAAA;AAcO,MAAMA,SAAS,GAAG;EACvBC,IAAI,EAAE,cAAc;EACpBC,GAAG,EAAE,aAAa;EAClBC,WAAW,EACT,wFAAwF;EAC1FC,QAAQ,EAAEC,sBAAe,CAACC,WAAW;EACrCC,mBAAmB,EAAEC,0CAAmC;EACxDC,QAAQ,EAAE,CAACC,eAAQ,CAACC,QAAQ,CAAC;EAC7BC,KAAK,EAAE;IACLC,QAAQ,EAAE,IAAAC,uBAAgB,EAAC;MACzBC,KAAK,EAAE,WAAW;MAClBZ,WAAW,EAAE;IACf,CAAC,CAAC;IACFa,eAAe,EAAE,IAAAC,6BAAsB,EAAC;MACtCF,KAAK,EAAE,mBAAmB;MAC1BZ,WAAW,EACT,0GAA0G;MAC5Ge,YAAY,EAAE,KAAK;MACnBC,QAAQ,EAAE,KAAK;MACfC,QAAQ,EAAEC,iBAAU,CAAC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,EAAE,IAAAH,sBAAe,EAAC;MAC3BhB,KAAK,EAAE,cAAc;MACrBZ,WAAW,EAAE,+BAA+B;MAC5Ce,YAAY,EAAE;IAChB,CAAC,CAAC;IACFiB,4BAA4B,EAAE,IAAAN,2BAAoB,EAAC;MACjDd,KAAK,EAAE,gCAAgC;MACvCZ,WAAW,EACT,0EAA0E;MAC5Ee,YAAY,EAAE;IAChB,CAAC,CAAC;IACFkB,OAAO,EAAE,IAAAP,2BAAoB,EAAC;MAC5Bd,KAAK,EAAE,QAAQ;MACfZ,WAAW,EACT,iKAAiK;MACnKe,YAAY,EAAE;IAChB,CAAC,CAAC;IACFmB,UAAU,EAAE,IAAAC,sBAAe,EAAC;MAC1BvB,KAAK,EAAE,oBAAoB;MAC3BZ,WAAW,EACT,4LAA4L;MAC9Le,YAAY,EAAE;IAChB,CAAC,CAAC;IACFqB,gBAAgB,EAAE,IAAAtB,6BAAsB,EAAC;MACvCF,KAAK,EAAE,oBAAoB;MAC3BZ,WAAW,EACT,0FAA0F;MAC5Fe,YAAY,EAAE,IAAI;MAClBC,QAAQ,EAAE,KAAK;MACfqB,KAAK,EAAEC,aAAM,CAACC;IAChB,CAAC;EACH;AACF,CAAC;AAAC"}
|
|
@@ -11,9 +11,6 @@ const SEED_DATA = {
|
|
|
11
11
|
description: "A basic List component",
|
|
12
12
|
category: _types.COMPONENT_TYPES.data,
|
|
13
13
|
stylesPanelSections: _types.CONTAINER_COMPONENT_STYLES_SECTIONS,
|
|
14
|
-
layout: {
|
|
15
|
-
flex: 1
|
|
16
|
-
},
|
|
17
14
|
triggers: [_types.Triggers.OnRefresh, _types.Triggers.OnEndReached],
|
|
18
15
|
props: {
|
|
19
16
|
onRefresh: (0, _types.createActionProp)(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","data","stylesPanelSections","CONTAINER_COMPONENT_STYLES_SECTIONS","
|
|
1
|
+
{"version":3,"names":["SEED_DATA","name","tag","description","category","COMPONENT_TYPES","data","stylesPanelSections","CONTAINER_COMPONENT_STYLES_SECTIONS","triggers","Triggers","OnRefresh","OnEndReached","props","onRefresh","createActionProp","onEndReached","horizontal","createStaticBoolProp","label","inverted","numColumns","createNumColumnsType","editable","initialNumToRender","createStaticNumberProp","defaultValue","onEndReachedThreshold","refreshColor","createColorProp","showsHorizontalScrollIndicator","showsVerticalScrollIndicator"],"sourceRoot":"../../../src","sources":["mappings/FlatList.ts"],"mappings":";;;;;;AAAA;AAWO,MAAMA,SAAS,GAAG;EACvBC,IAAI,EAAE,MAAM;EACZC,GAAG,EAAE,UAAU;EACfC,WAAW,EAAE,wBAAwB;EACrCC,QAAQ,EAAEC,sBAAe,CAACC,IAAI;EAC9BC,mBAAmB,EAAEC,0CAAmC;EACxDC,QAAQ,EAAE,CAACC,eAAQ,CAACC,SAAS,EAAED,eAAQ,CAACE,YAAY,CAAC;EACrDC,KAAK,EAAE;IACLC,SAAS,EAAE,IAAAC,uBAAgB,GAAE;IAC7BC,YAAY,EAAE,IAAAD,uBAAgB,GAAE;IAChCE,UAAU,EAAE,IAAAC,2BAAoB,EAAC;MAC/BC,KAAK,EAAE,YAAY;MACnBhB,WAAW,EAAE;IACf,CAAC,CAAC;IACFiB,QAAQ,EAAE,IAAAF,2BAAoB,EAAC;MAC7BC,KAAK,EAAE,UAAU;MACjBhB,WAAW,EAAE;IACf,CAAC,CAAC;IACFkB,UAAU,EAAE,IAAAC,2BAAoB,EAAC;MAC/BC,QAAQ,EAAE;IACZ,CAAC,CAAC;IACFC,kBAAkB,EAAE,IAAAC,6BAAsB,EAAC;MACzCN,KAAK,EAAE,uBAAuB;MAC9BhB,WAAW,EAAE,+CAA+C;MAC5DuB,YAAY,EAAE;IAChB,CAAC,CAAC;IACFC,qBAAqB,EAAE,IAAAF,6BAAsB,EAAC;MAC5CN,KAAK,EAAE,uBAAuB;MAC9BhB,WAAW,EACT,8RAA8R;MAChSuB,YAAY,EAAE;IAChB,C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