fable-react
Advanced tools
Comparing version 0.7.11 to 0.7.12
{ | ||
"name": "fable-react", | ||
"version": "0.7.11", | ||
"version": "0.7.12", | ||
"description": "Fable bindings and helpers for React and React Native", | ||
@@ -5,0 +5,0 @@ "scripts": { |
@@ -13,2 +13,4 @@ var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }(); | ||
import { Buffer } from "buffer"; | ||
import { map } from "fable-core/Seq"; | ||
import { ofArray } from "fable-core/List"; | ||
import { toJson, ofJson } from "fable-core/Serialize"; | ||
@@ -343,8 +345,14 @@ export var Props = function (__exports) { | ||
var alert = __exports.alert = function (title, message, buttons) { | ||
Alert_1.alert(title, message, Array.from(map(function (tupledArg) { | ||
return createButton(tupledArg[0], tupledArg[1]); | ||
}, buttons))); | ||
}; | ||
var alertWithOneButton = __exports.alertWithOneButton = function (title, message, okText, onOk) { | ||
Alert_1.alert(title, message, [createButton(okText, onOk)]); | ||
alert(title, message, ofArray([[okText, onOk]])); | ||
}; | ||
var alertWithTwoButtons = __exports.alertWithTwoButtons = function (title, message, cancelText, onCancel, okText, onOk) { | ||
Alert_1.alert(title, message, [createButton(cancelText, onCancel), createButton(okText, onOk)]); | ||
alert(title, message, ofArray([[cancelText, onCancel], [okText, onOk]])); | ||
}; | ||
@@ -351,0 +359,0 @@ |
(function (global, factory) { | ||
if (typeof define === "function" && define.amd) { | ||
define(["exports", "fable-core/umd/Symbol", "fable-core/umd/Util", "react", "react-native", "buffer", "fable-core/umd/Serialize"], factory); | ||
define(["exports", "fable-core/umd/Symbol", "fable-core/umd/Util", "react", "react-native", "buffer", "fable-core/umd/Seq", "fable-core/umd/List", "fable-core/umd/Serialize"], factory); | ||
} else if (typeof exports !== "undefined") { | ||
factory(exports, require("fable-core/umd/Symbol"), require("fable-core/umd/Util"), require("react"), require("react-native"), require("buffer"), require("fable-core/umd/Serialize")); | ||
factory(exports, require("fable-core/umd/Symbol"), require("fable-core/umd/Util"), require("react"), require("react-native"), require("buffer"), require("fable-core/umd/Seq"), require("fable-core/umd/List"), require("fable-core/umd/Serialize")); | ||
} else { | ||
@@ -10,6 +10,6 @@ var mod = { | ||
}; | ||
factory(mod.exports, global.Symbol, global.Util, global.react, global.reactNative, global.buffer, global.Serialize); | ||
factory(mod.exports, global.Symbol, global.Util, global.react, global.reactNative, global.buffer, global.Seq, global.List, global.Serialize); | ||
global.FableHelpersReactNative = mod.exports; | ||
} | ||
})(this, function (exports, _Symbol2, _Util, _react, _reactNative, _buffer, _Serialize) { | ||
})(this, function (exports, _Symbol2, _Util, _react, _reactNative, _buffer, _Seq, _List, _Serialize) { | ||
"use strict"; | ||
@@ -511,8 +511,14 @@ | ||
var alert = __exports.alert = function (title, message, buttons) { | ||
_reactNative.Alert.alert(title, message, Array.from((0, _Seq.map)(function (tupledArg) { | ||
return createButton(tupledArg[0], tupledArg[1]); | ||
}, buttons))); | ||
}; | ||
var alertWithOneButton = __exports.alertWithOneButton = function (title, message, okText, onOk) { | ||
_reactNative.Alert.alert(title, message, [createButton(okText, onOk)]); | ||
alert(title, message, (0, _List.ofArray)([[okText, onOk]])); | ||
}; | ||
var alertWithTwoButtons = __exports.alertWithTwoButtons = function (title, message, cancelText, onCancel, okText, onOk) { | ||
_reactNative.Alert.alert(title, message, [createButton(cancelText, onCancel), createButton(okText, onOk)]); | ||
alert(title, message, (0, _List.ofArray)([[cancelText, onCancel], [okText, onOk]])); | ||
}; | ||
@@ -519,0 +525,0 @@ |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
2981133
1696
1