New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

armstrong-react

Package Overview
Dependencies
Maintainers
5
Versions
339
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

armstrong-react - npm Package Compare versions

Comparing version

to
2.3.19

dist/components/form/propertyPathResolver.d.ts

2

dist/components/form/form.d.ts

@@ -62,3 +62,3 @@ /// <reference types="react" />

};
static Bind: typeof FormBinder;
static Bind: FormBinder;
static jsonDataBinder<T>(data: T): IDataBinder<T>;

@@ -65,0 +65,0 @@ static jsonDataBinderWithClone<T>(data: T): IDataBinder<T>;

@@ -9,3 +9,3 @@ "use strict";

var formBinders_1 = require("./formBinders");
var properyPathResolver_1 = require("./properyPathResolver");
var propertyPathResolver_1 = require("./propertyPathResolver");
var classNames_1 = require("../../utilities/classNames");

@@ -24,6 +24,6 @@ /** The default Json Entity binder - NOTE, the original instance provided is MUTABLE */

this.getValue = function (dataPath) {
return properyPathResolver_1.PropertyPathResolver.getValue(_this.data, dataPath);
return propertyPathResolver_1.PropertyPathResolver.getValue(_this.data, dataPath);
};
this.setValue = function (dataPath, value) {
properyPathResolver_1.PropertyPathResolver.setValue(_this.data, dataPath, value);
propertyPathResolver_1.PropertyPathResolver.setValue(_this.data, dataPath, value);
_this.lastDataPathSet = dataPath;

@@ -162,5 +162,5 @@ };

};
Form.Bind = formBinders_1.FormBinder;
Form.Bind = new formBinders_1.FormBinder();
return Form;
}(React.Component));
exports.Form = Form;

@@ -54,49 +54,49 @@ /// <reference types="react" />

/** bind a custom form binder */
static custom<P>(formBinder: IFormBinder<P, any>): IFormBinderInjector<P>;
custom<P>(formBinder: IFormBinder<P, any>): IFormBinderInjector<P>;
/** bind to a 'hidden' input */
static hidden<TDataPropValue>(dataName: string, valueConverter?: IInputValueConverter<TDataPropValue>): IFormBinderInjector<React.DOMAttributes<any>>;
hidden<TDataPropValue>(dataName: string, valueConverter?: IInputValueConverter<TDataPropValue>): IFormBinderInjector<React.DOMAttributes<any>>;
/** bind a string property to a 'password' input */
static password<TDataPropValue>(dataName: string, valueConverter?: IInputValueConverter<TDataPropValue>): IFormBinderInjector<React.DOMAttributes<any>>;
password<TDataPropValue>(dataName: string, valueConverter?: IInputValueConverter<TDataPropValue>): IFormBinderInjector<React.DOMAttributes<any>>;
/** bind a string property to a 'text' input */
static text<TDataPropValue>(dataName: string, valueConverter?: IInputValueConverter<TDataPropValue>): IFormBinderInjector<React.DOMAttributes<any>>;
text<TDataPropValue>(dataName: string, valueConverter?: IInputValueConverter<TDataPropValue>): IFormBinderInjector<React.DOMAttributes<any>>;
/** bind a string property to a 'email' input */
static textEmail<TDataPropValue>(dataName: string, valueConverter?: IInputValueConverter<TDataPropValue>): IFormBinderInjector<React.DOMAttributes<any>>;
static autoCompleteInput(dataName: string, getItemFromId?: (id: string) => IAutoCompleteOption): IFormBinderInjector<IAutoCompleteInputProps>;
textEmail<TDataPropValue>(dataName: string, valueConverter?: IInputValueConverter<TDataPropValue>): IFormBinderInjector<React.DOMAttributes<any>>;
autoCompleteInput(dataName: string, getItemFromId?: (id: string) => IAutoCompleteOption): IFormBinderInjector<IAutoCompleteInputProps>;
/** bind a 'date' string property to a CalendarInput (e.g. YYYY-MM-DD) */
static calendarInput(dataName: string): IFormBinderInjector<ICalendarInputProps>;
calendarInput(dataName: string): IFormBinderInjector<ICalendarInputProps>;
/** bind a 'date' string property to a DateInput (e.g. YYYY-MM-DD) */
static dateInput(dataName: string): IFormBinderInjector<IDateInputProps>;
dateInput(dataName: string): IFormBinderInjector<IDateInputProps>;
/** bind a 'time' string property to a TimeInput (e.g. HH:MM) */
static timeInput(dataName: string): IFormBinderInjector<ITimeInputProps>;
private static defaultInputFormBinder<TDataPropValue, TTo>(dataName, type, valueConverter?, propertySet?);
timeInput(dataName: string): IFormBinderInjector<ITimeInputProps>;
private defaultInputFormBinder<TDataPropValue, TTo>(dataName, type, valueConverter?, propertySet?);
/** bind a number property to a range */
static range(dataName: string, options?: INumericOptions): IFormBinderInjector<React.DOMAttributes<any>>;
/** uncontroller text input */
static defaultText<TDataPropValue>(dataName: string, valueConverter?: IInputValueConverter<TDataPropValue>): IFormBinderInjector<React.DOMAttributes<any>>;
range(dataName: string, options?: INumericOptions): IFormBinderInjector<React.DOMAttributes<any>>;
/** uncontrolled text input */
defaultText<TDataPropValue>(dataName: string, valueConverter?: IInputValueConverter<TDataPropValue>): IFormBinderInjector<React.DOMAttributes<any>>;
/** bind a number property to a 'text' input */
static textNumeric(dataName: string, options?: INumericOptions): IFormBinderInjector<React.DOMAttributes<any>>;
textNumeric(dataName: string, options?: INumericOptions): IFormBinderInjector<React.DOMAttributes<any>>;
/** bind a TDataPropValue property to a select */
static selectCustom<TDataPropValue>(dataName: string, valueConverter?: IInputValueConverter<TDataPropValue>): IFormBinderInjector<React.DOMAttributes<any>>;
selectCustom<TDataPropValue>(dataName: string, valueConverter?: IInputValueConverter<TDataPropValue>): IFormBinderInjector<React.DOMAttributes<any>>;
/** bind a string property to a select */
static select(dataName: string): IFormBinderInjector<React.DOMAttributes<any>>;
select(dataName: string): IFormBinderInjector<React.DOMAttributes<any>>;
/** bind a number property to a select */
static selectNumeric(dataName: string): IFormBinderInjector<React.DOMAttributes<any>>;
selectNumeric(dataName: string): IFormBinderInjector<React.DOMAttributes<any>>;
/** bind a TDataPropValue[] property to a multi select */
static selectMultipleCustom<TDataPropValue>(dataName: string, valueConverter?: IValueConverter<TDataPropValue, string[]>): IFormBinderInjector<React.DOMAttributes<any>>;
selectMultipleCustom<TDataPropValue>(dataName: string, valueConverter?: IValueConverter<TDataPropValue, string[]>): IFormBinderInjector<React.DOMAttributes<any>>;
/** bind a string[] property to a multi select */
static selectMultiple(dataName: string): IFormBinderInjector<React.DOMAttributes<any>>;
selectMultiple(dataName: string): IFormBinderInjector<React.DOMAttributes<any>>;
/** bind a number[] property to a multi select */
static selectMultipleNumeric(dataName: string): IFormBinderInjector<React.DOMAttributes<any>>;
selectMultipleNumeric(dataName: string): IFormBinderInjector<React.DOMAttributes<any>>;
/** bind a TDataPropValue property to a 'checkbox' input */
static checkboxCustom<TDataPropValue>(/** helooo */ dataName: string, valueConverter?: IValueConverter<TDataPropValue, boolean>): IFormBinderInjector<React.DOMAttributes<any>>;
checkboxCustom<TDataPropValue>(dataName: string, valueConverter?: IValueConverter<TDataPropValue, boolean>): IFormBinderInjector<React.DOMAttributes<any>>;
/** bind a boolean property to a 'checkbox' input */
static checkbox(dataName: string): IFormBinderInjector<React.DOMAttributes<any>>;
checkbox(dataName: string): IFormBinderInjector<React.DOMAttributes<any>>;
/** bind a TDataPropValue property to a 'radio' input, using trueValue and falseValue equality testing */
static checkboxConvert<TDataPropValue>(dataName: string, trueValue: TDataPropValue, falseValue: TDataPropValue): IFormBinderInjector<React.DOMAttributes<any>>;
checkboxConvert<TDataPropValue>(dataName: string, trueValue: TDataPropValue, falseValue: TDataPropValue): IFormBinderInjector<React.DOMAttributes<any>>;
/** bind a TDataPropValue property to a 'radio' input */
static radioCustom<TDataPropValue>(dataName: string, value: string, valueConverter: IInputValueConverter<TDataPropValue>): IFormBinderInjector<React.DOMAttributes<any>>;
radioCustom<TDataPropValue>(dataName: string, value: string, valueConverter: IInputValueConverter<TDataPropValue>): IFormBinderInjector<React.DOMAttributes<any>>;
/** bind a string property to a 'radio' input */
static radio(dataName: string, value: string): IFormBinderInjector<React.DOMAttributes<any>>;
radio(dataName: string, value: string): IFormBinderInjector<React.DOMAttributes<any>>;
/** bind a number property to a 'radio' input */
static radioNumeric(dataName: string, value: number): IFormBinderInjector<React.DOMAttributes<any>>;
radioNumeric(dataName: string, value: number): IFormBinderInjector<React.DOMAttributes<any>>;
}

@@ -178,39 +178,39 @@ "use strict";

/** bind a custom form binder */
FormBinder.custom = function (formBinder) {
FormBinder.prototype.custom = function (formBinder) {
return formCore_1.updateFormBinderInjector({}, formBinder);
};
/** bind to a 'hidden' input */
FormBinder.hidden = function (dataName, valueConverter) {
FormBinder.prototype.hidden = function (dataName, valueConverter) {
return this.defaultInputFormBinder(dataName, "hidden", valueConverter);
};
/** bind a string property to a 'password' input */
FormBinder.password = function (dataName, valueConverter) {
FormBinder.prototype.password = function (dataName, valueConverter) {
return this.defaultInputFormBinder(dataName, "password", valueConverter);
};
/** bind a string property to a 'text' input */
FormBinder.text = function (dataName, valueConverter) {
FormBinder.prototype.text = function (dataName, valueConverter) {
return this.defaultInputFormBinder(dataName, "text", valueConverter);
};
/** bind a string property to a 'email' input */
FormBinder.textEmail = function (dataName, valueConverter) {
FormBinder.prototype.textEmail = function (dataName, valueConverter) {
return this.defaultInputFormBinder(dataName, "email", valueConverter);
};
FormBinder.autoCompleteInput = function (dataName, getItemFromId) {
return FormBinder.custom(new AutoCompleteFormBinder(dataName, getItemFromId));
FormBinder.prototype.autoCompleteInput = function (dataName, getItemFromId) {
return this.custom(new AutoCompleteFormBinder(dataName, getItemFromId));
};
/** bind a 'date' string property to a CalendarInput (e.g. YYYY-MM-DD) */
FormBinder.calendarInput = function (dataName) {
return FormBinder.custom(new CalendarInputFormBinder(dataName));
FormBinder.prototype.calendarInput = function (dataName) {
return this.custom(new CalendarInputFormBinder(dataName));
};
/** bind a 'date' string property to a DateInput (e.g. YYYY-MM-DD) */
FormBinder.dateInput = function (dataName) {
return FormBinder.custom(new DateInputFormBinder(dataName));
FormBinder.prototype.dateInput = function (dataName) {
return this.custom(new DateInputFormBinder(dataName));
};
/** bind a 'time' string property to a TimeInput (e.g. HH:MM) */
FormBinder.timeInput = function (dataName) {
return FormBinder.custom(new TimeInputFormBinder(dataName));
FormBinder.prototype.timeInput = function (dataName) {
return this.custom(new TimeInputFormBinder(dataName));
};
FormBinder.defaultInputFormBinder = function (dataName, type, valueConverter, propertySet) {
FormBinder.prototype.defaultInputFormBinder = function (dataName, type, valueConverter, propertySet) {
if (propertySet === void 0) { propertySet = "value"; }
var adaptorInjector = FormBinder.custom(new InputFormBinder(dataName, propertySet, valueConverter));
var adaptorInjector = this.custom(new InputFormBinder(dataName, propertySet, valueConverter));
adaptorInjector["type"] = type;

@@ -220,4 +220,4 @@ return adaptorInjector;

/** bind a number property to a range */
FormBinder.range = function (dataName, options) {
var adaptorInjector = FormBinder.custom(new InputFormBinder(dataName, "value"));
FormBinder.prototype.range = function (dataName, options) {
var adaptorInjector = this.custom(new InputFormBinder(dataName, "value"));
if (options) {

@@ -230,10 +230,10 @@ adaptorInjector["min"] = options.min;

};
/** uncontroller text input */
FormBinder.defaultText = function (dataName, valueConverter) {
return FormBinder.custom(new InputFormBinder(dataName, "defaultValue", valueConverter, "value"));
/** uncontrolled text input */
FormBinder.prototype.defaultText = function (dataName, valueConverter) {
return this.custom(new InputFormBinder(dataName, "defaultValue", valueConverter, "value"));
};
/** bind a number property to a 'text' input */
FormBinder.textNumeric = function (dataName, options) {
FormBinder.prototype.textNumeric = function (dataName, options) {
var converter = options ? new formValueConverters_1.NumericValueConverter(options) : formValueConverters_1.NumericValueConverter.instance;
var adaptorInjector = FormBinder.custom(new InputFormBinder(dataName, "defaultValue", converter, "value"));
var adaptorInjector = this.custom(new InputFormBinder(dataName, "defaultValue", converter, "value"));
adaptorInjector["type"] = "number";

@@ -248,28 +248,28 @@ adaptorInjector["onKeyDown"] = function (e) { return KeyboardHelper.numericKeyPress(e, options); };

/** bind a TDataPropValue property to a select */
FormBinder.selectCustom = function (dataName, valueConverter) {
return FormBinder.custom(new InputFormBinder(dataName, "value", valueConverter));
FormBinder.prototype.selectCustom = function (dataName, valueConverter) {
return this.custom(new InputFormBinder(dataName, "value", valueConverter));
};
/** bind a string property to a select */
FormBinder.select = function (dataName) {
return FormBinder.selectCustom(dataName, formValueConverters_1.DefaultValueConverter.instance);
FormBinder.prototype.select = function (dataName) {
return this.selectCustom(dataName, formValueConverters_1.DefaultValueConverter.instance);
};
/** bind a number property to a select */
FormBinder.selectNumeric = function (dataName) {
return FormBinder.selectCustom(dataName, formValueConverters_1.NumericValueConverter.instance);
FormBinder.prototype.selectNumeric = function (dataName) {
return this.selectCustom(dataName, formValueConverters_1.NumericValueConverter.instance);
};
/** bind a TDataPropValue[] property to a multi select */
FormBinder.selectMultipleCustom = function (dataName, valueConverter) {
return FormBinder.custom(new SelectMultipleFormBinder(dataName, valueConverter));
FormBinder.prototype.selectMultipleCustom = function (dataName, valueConverter) {
return this.custom(new SelectMultipleFormBinder(dataName, valueConverter));
};
/** bind a string[] property to a multi select */
FormBinder.selectMultiple = function (dataName) {
return FormBinder.selectMultipleCustom(dataName);
FormBinder.prototype.selectMultiple = function (dataName) {
return this.selectMultipleCustom(dataName);
};
/** bind a number[] property to a multi select */
FormBinder.selectMultipleNumeric = function (dataName) {
return FormBinder.selectMultipleCustom(dataName, formValueConverters_1.MultipleNumericValueConverter.instance);
FormBinder.prototype.selectMultipleNumeric = function (dataName) {
return this.selectMultipleCustom(dataName, formValueConverters_1.MultipleNumericValueConverter.instance);
};
/** bind a TDataPropValue property to a 'checkbox' input */
FormBinder.checkboxCustom = function (/** helooo */ dataName, valueConverter) {
var adaptorInjector = FormBinder.custom(new CheckboxFormBinder(dataName, valueConverter));
FormBinder.prototype.checkboxCustom = function (dataName, valueConverter) {
var adaptorInjector = this.custom(new CheckboxFormBinder(dataName, valueConverter));
adaptorInjector["type"] = "checkbox";

@@ -280,12 +280,12 @@ return adaptorInjector;

/** bind a boolean property to a 'checkbox' input */
FormBinder.checkbox = function (dataName) {
return FormBinder.checkboxCustom(dataName);
FormBinder.prototype.checkbox = function (dataName) {
return this.checkboxCustom(dataName);
};
/** bind a TDataPropValue property to a 'radio' input, using trueValue and falseValue equality testing */
FormBinder.checkboxConvert = function (dataName, trueValue, falseValue) {
return FormBinder.checkboxCustom(dataName, new formValueConverters_1.CheckboxValueConverter(trueValue, falseValue));
FormBinder.prototype.checkboxConvert = function (dataName, trueValue, falseValue) {
return this.checkboxCustom(dataName, new formValueConverters_1.CheckboxValueConverter(trueValue, falseValue));
};
/** bind a TDataPropValue property to a 'radio' input */
FormBinder.radioCustom = function (dataName, value, valueConverter) {
var adaptorInjector = FormBinder.custom(new RadioFormBinder(dataName, "checked", valueConverter, "value"));
FormBinder.prototype.radioCustom = function (dataName, value, valueConverter) {
var adaptorInjector = this.custom(new RadioFormBinder(dataName, "checked", valueConverter, "value"));
adaptorInjector["type"] = "radio";

@@ -296,8 +296,8 @@ adaptorInjector["value"] = value;

/** bind a string property to a 'radio' input */
FormBinder.radio = function (dataName, value) {
return FormBinder.radioCustom(dataName, value, formValueConverters_1.DefaultValueConverter.instance);
FormBinder.prototype.radio = function (dataName, value) {
return this.radioCustom(dataName, value, formValueConverters_1.DefaultValueConverter.instance);
};
/** bind a number property to a 'radio' input */
FormBinder.radioNumeric = function (dataName, value) {
return FormBinder.radioCustom(dataName, value.toString(), formValueConverters_1.NumericValueConverter.instance);
FormBinder.prototype.radioNumeric = function (dataName, value) {
return this.radioCustom(dataName, value.toString(), formValueConverters_1.NumericValueConverter.instance);
};

@@ -304,0 +304,0 @@ return FormBinder;

@@ -20,3 +20,4 @@ /// <reference types="react" />

blur(): void;
select(): void;
render(): JSX.Element;
}

@@ -23,2 +23,7 @@ "use strict";

};
TextInput.prototype.select = function () {
if (this.input) {
this.input.select();
}
};
TextInput.prototype.render = function () {

@@ -25,0 +30,0 @@ var _this = this;

@@ -38,2 +38,5 @@ "use strict";

exports.Grid = Grid;
function sizeErrorMessage(size, sizeValue, controlPath) {
return "Unsupported " + size + " property '" + sizeValue + "' on " + controlPath + ". If you are using a string, make sure it is either 'auto' or follows the pattern '[number]*'";
}
function Row(props) {

@@ -73,3 +76,3 @@ var className = props.className, height = props.height, tagName = props.tagName, style = props.style, attrs = tslib_1.__rest(props, ["className", "height", "tagName", "style"]);

else {
throw new Error("Unsupported height property '" + height + "' on Grid Row. If you are using a string, make sure it is either 'auto' or follows the pattern '[number]*'");
console.error(sizeErrorMessage("height", height, "Grid > Row"));
}

@@ -118,3 +121,3 @@ }

else {
throw new Error("Unsupported width property '" + width + "' on Grid > Row > Col. If you are using a string, make sure it is either 'auto' or follows the pattern '[number]*'");
console.error(sizeErrorMessage("width", width, "Grid > Row > Col"));
}

@@ -121,0 +124,0 @@ }

@@ -60,5 +60,7 @@ "use strict";

BurgerMenu.prototype.componentDidMount = function () {
var appNode = document.getElementById(this.props.bodyId || "host");
var id = this.props.bodyId || "host";
var appNode = document.getElementById(id);
if (!appNode) {
throw new Error("Cannot find document node of " + (this.props.bodyId || "host"));
console.error("Cannot find document node of " + id);
return;
}

@@ -65,0 +67,0 @@ this.appNode = appNode;

{
"name": "armstrong-react",
"version": "2.3.18",
"version": "2.3.19",
"description": "Rocketmakers Armstrong library of React 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

Sorry, the diff of this file is not supported yet