react-form-with-constraints-tools
Advanced tools
Comparing version 0.10.0-beta.2 to 0.10.0-beta.3
@@ -1,69 +0,39 @@ | ||
"use strict"; | ||
var __extends = (this && this.__extends) || (function () { | ||
var extendStatics = Object.setPrototypeOf || | ||
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || | ||
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; | ||
return function (d, b) { | ||
extendStatics(d, b); | ||
function __() { this.constructor = d; } | ||
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); | ||
}; | ||
})(); | ||
var __values = (this && this.__values) || function (o) { | ||
var m = typeof Symbol === "function" && o[Symbol.iterator], i = 0; | ||
if (m) return m.call(o); | ||
return { | ||
next: function () { | ||
if (o && i >= o.length) o = void 0; | ||
return { value: o && o[i++], done: !o }; | ||
} | ||
}; | ||
}; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
var react_1 = __importDefault(require("react")); | ||
var react_dom_1 = __importDefault(require("react-dom")); | ||
var prop_types_1 = __importDefault(require("prop-types")); | ||
var react_form_with_constraints_1 = require("react-form-with-constraints"); | ||
exports.FormWithConstraints = react_form_with_constraints_1.FormWithConstraints; | ||
var DisplayFields = (function (_super) { | ||
__extends(DisplayFields, _super); | ||
function DisplayFields() { | ||
var _this = _super !== null && _super.apply(this, arguments) || this; | ||
_this.reRender = function () { | ||
_this.forceUpdate(); | ||
import React from 'react'; | ||
import ReactDOM from 'react-dom'; | ||
import PropTypes from 'prop-types'; | ||
import { FormWithConstraints, FieldFeedback as _FieldFeedback, FieldFeedbackType, FieldFeedbacks as _FieldFeedbacks, Async as _Async, FieldEvent } from 'react-form-with-constraints'; | ||
export class DisplayFields extends React.Component { | ||
constructor() { | ||
super(...arguments); | ||
this.reRender = () => { | ||
this.forceUpdate(); | ||
}; | ||
return _this; | ||
} | ||
DisplayFields.prototype.componentWillMount = function () { | ||
var form = this.context.form; | ||
form.fieldsStore.addListener(react_form_with_constraints_1.FieldEvent.Added, this.reRender); | ||
form.fieldsStore.addListener(react_form_with_constraints_1.FieldEvent.Removed, this.reRender); | ||
componentWillMount() { | ||
const { form } = this.context; | ||
form.fieldsStore.addListener(FieldEvent.Added, this.reRender); | ||
form.fieldsStore.addListener(FieldEvent.Removed, this.reRender); | ||
form.addFieldDidValidateEventListener(this.reRender); | ||
form.addFieldDidResetEventListener(this.reRender); | ||
}; | ||
DisplayFields.prototype.componentWillUnmount = function () { | ||
var form = this.context.form; | ||
form.fieldsStore.removeListener(react_form_with_constraints_1.FieldEvent.Added, this.reRender); | ||
form.fieldsStore.removeListener(react_form_with_constraints_1.FieldEvent.Removed, this.reRender); | ||
} | ||
componentWillUnmount() { | ||
const { form } = this.context; | ||
form.fieldsStore.removeListener(FieldEvent.Added, this.reRender); | ||
form.fieldsStore.removeListener(FieldEvent.Removed, this.reRender); | ||
form.removeFieldDidValidateEventListener(this.reRender); | ||
form.removeFieldDidResetEventListener(this.reRender); | ||
}; | ||
DisplayFields.prototype.render = function () { | ||
var str = stringifyWithUndefinedAndWithoutPropertyQuotes(this.context.form.fieldsStore.fields, 2); | ||
} | ||
render() { | ||
let str = stringifyWithUndefinedAndWithoutPropertyQuotes(this.context.form.fieldsStore.fields, 2); | ||
str = str.replace(/{\s+key: (.*),\s+type: (.*),\s+show: (.*)\s+}/g, '{ key: $1, type: $2, show: $3 }'); | ||
return react_1.default.createElement("pre", { style: { fontSize: 'small' } }, | ||
return React.createElement("pre", { style: { fontSize: 'small' } }, | ||
"Fields = ", | ||
str); | ||
}; | ||
DisplayFields.contextTypes = { | ||
form: prop_types_1.default.instanceOf(react_form_with_constraints_1.FormWithConstraints).isRequired | ||
}; | ||
return DisplayFields; | ||
}(react_1.default.Component)); | ||
exports.DisplayFields = DisplayFields; | ||
var stringifyWithUndefinedAndWithoutPropertyQuotes = function (obj, space) { | ||
var str = JSON.stringify(obj, function (_key, value) { return value === undefined ? '__undefined__' : value; }, space); | ||
} | ||
} | ||
DisplayFields.contextTypes = { | ||
form: PropTypes.instanceOf(FormWithConstraints).isRequired | ||
}; | ||
const stringifyWithUndefinedAndWithoutPropertyQuotes = (obj, space) => { | ||
let str = JSON.stringify(obj, (_key, value) => value === undefined ? '__undefined__' : value, space); | ||
str = str.replace(/"__undefined__"/g, 'undefined'); | ||
@@ -73,15 +43,12 @@ str = str.replace(/"([^"]+)":/g, '$1:'); | ||
}; | ||
var FieldFeedbacks = (function (_super) { | ||
__extends(FieldFeedbacks, _super); | ||
function FieldFeedbacks() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
FieldFeedbacks.prototype.render = function () { | ||
var _a = this.props, fieldName = _a.for, stop = _a.stop; | ||
var attr = ''; | ||
export { FormWithConstraints }; | ||
export class FieldFeedbacks extends _FieldFeedbacks { | ||
render() { | ||
const { for: fieldName, stop } = this.props; | ||
let attr = ''; | ||
if (fieldName) | ||
attr += "for=\"" + fieldName + "\" "; | ||
attr += "stop=\"" + stop + "\""; | ||
return (react_1.default.createElement(react_1.default.Fragment, null, | ||
react_1.default.createElement("li", null, | ||
attr += `for="${fieldName}" `; | ||
attr += `stop="${stop}"`; | ||
return (React.createElement(React.Fragment, null, | ||
React.createElement("li", null, | ||
"key=\"", | ||
@@ -91,15 +58,9 @@ this.key, | ||
attr), | ||
react_1.default.createElement("ul", null, _super.prototype.render.call(this)))); | ||
}; | ||
return FieldFeedbacks; | ||
}(react_form_with_constraints_1.FieldFeedbacks)); | ||
exports.FieldFeedbacks = FieldFeedbacks; | ||
var FieldFeedback = (function (_super) { | ||
__extends(FieldFeedback, _super); | ||
function FieldFeedback() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
React.createElement("ul", null, super.render()))); | ||
} | ||
FieldFeedback.prototype.getTextDecoration = function () { | ||
var show = this.state.validation.show; | ||
var textDecoration = ''; | ||
} | ||
export class FieldFeedback extends _FieldFeedback { | ||
getTextDecoration() { | ||
const { show } = this.state.validation; | ||
let textDecoration = ''; | ||
switch (show) { | ||
@@ -114,7 +75,7 @@ case false: | ||
return textDecoration; | ||
}; | ||
FieldFeedback.prototype.render = function () { | ||
var _a = this.state.validation, key = _a.key, type = _a.type; | ||
return (react_1.default.createElement("li", null, | ||
react_1.default.createElement("span", { style: { textDecoration: this.getTextDecoration() } }, | ||
} | ||
render() { | ||
const { key, type } = this.state.validation; | ||
return (React.createElement("li", null, | ||
React.createElement("span", { style: { textDecoration: this.getTextDecoration() } }, | ||
"key=\"", | ||
@@ -126,57 +87,37 @@ key, | ||
' ', | ||
_super.prototype.render.call(this))); | ||
}; | ||
FieldFeedback.prototype.componentDidUpdate = function () { | ||
var e_1, _a; | ||
var el = react_dom_1.default.findDOMNode(this); | ||
var fieldFeedbackSpans = el.querySelectorAll('[data-feedback]'); | ||
try { | ||
for (var fieldFeedbackSpans_1 = __values(fieldFeedbackSpans), fieldFeedbackSpans_1_1 = fieldFeedbackSpans_1.next(); !fieldFeedbackSpans_1_1.done; fieldFeedbackSpans_1_1 = fieldFeedbackSpans_1.next()) { | ||
var fieldFeedbackSpan = fieldFeedbackSpans_1_1.value; | ||
fieldFeedbackSpan.style.display = 'inline'; | ||
} | ||
super.render())); | ||
} | ||
componentDidUpdate() { | ||
const el = ReactDOM.findDOMNode(this); | ||
const fieldFeedbackSpans = el.querySelectorAll('[data-feedback]'); | ||
for (const fieldFeedbackSpan of fieldFeedbackSpans) { | ||
fieldFeedbackSpan.style.display = 'inline'; | ||
} | ||
catch (e_1_1) { e_1 = { error: e_1_1 }; } | ||
finally { | ||
try { | ||
if (fieldFeedbackSpans_1_1 && !fieldFeedbackSpans_1_1.done && (_a = fieldFeedbackSpans_1.return)) _a.call(fieldFeedbackSpans_1); | ||
} | ||
finally { if (e_1) throw e_1.error; } | ||
} | ||
var li = el.closest('li.async'); | ||
const li = el.closest('li.async'); | ||
if (li !== null) { | ||
var async = li.querySelector('span[style]'); | ||
const async = li.querySelector('span[style]'); | ||
async.style.textDecoration = this.getTextDecoration(); | ||
} | ||
var type = this.state.validation.type; | ||
if (type === react_form_with_constraints_1.FieldFeedbackType.WhenValid) { | ||
var span = el.querySelector('span[style]'); | ||
var whenValid = el.querySelector("span." + this.props.classes.valid); | ||
const { type } = this.state.validation; | ||
if (type === FieldFeedbackType.WhenValid) { | ||
const span = el.querySelector('span[style]'); | ||
const whenValid = el.querySelector(`span.${this.props.classes.valid}`); | ||
span.style.textDecoration = whenValid !== null ? '' : 'line-through'; | ||
} | ||
}; | ||
return FieldFeedback; | ||
}(react_form_with_constraints_1.FieldFeedback)); | ||
exports.FieldFeedback = FieldFeedback; | ||
var Async = (function (_super) { | ||
__extends(Async, _super); | ||
function Async() { | ||
return _super !== null && _super.apply(this, arguments) || this; | ||
} | ||
Async.prototype.getTextDecoration = function () { | ||
} | ||
export class Async extends _Async { | ||
getTextDecoration() { | ||
return 'line-through dotted'; | ||
}; | ||
Async.prototype.componentWillUpdate = function () { | ||
var el = react_dom_1.default.findDOMNode(this); | ||
var async = el.querySelector('span[style]'); | ||
} | ||
componentWillUpdate() { | ||
const el = ReactDOM.findDOMNode(this); | ||
const async = el.querySelector('span[style]'); | ||
async.style.textDecoration = this.getTextDecoration(); | ||
}; | ||
Async.prototype.render = function () { | ||
return (react_1.default.createElement("li", { className: "async" }, | ||
react_1.default.createElement("span", { style: { textDecoration: this.getTextDecoration() } }, "Async"), | ||
react_1.default.createElement("ul", null, _super.prototype.render.call(this)))); | ||
}; | ||
return Async; | ||
}(react_form_with_constraints_1.Async)); | ||
exports.Async = Async; | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiRGlzcGxheUZpZWxkcy5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uL3NyYy9EaXNwbGF5RmllbGRzLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Oz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XMpIGFzIEhUTUxMSUVsZW1lbnQ7XG5cbiAgICAvLyBSZXNldCBzdHlsZVxuICAgIGNvbnN0IGFzeW5jID0gZWwucXVlcnlTZWxlY3RvcjxIVE1MU3BhbkVsZW1lbnQ+KCdzcGFuW3N0eWxlXScpO1xuICAgIGFzeW5jIS5zdHlsZS50ZXh0RGVjb3JhdGlvbiA9IHRoaXMuZ2V0VGV4dERlY29yYXRpb24oKTtcbiAgfVxuXG4gIHJlbmRlcigpIHtcbiAgICByZXR1cm4gKFxuICAgICAgPGxpIGNsYXNzTmFtZT1cImFzeW5jXCI+XG4gICAgICAgIDxzcGFuIHN0eWxlPXt7dGV4dERlY29yYXRpb246IHRoaXMuZ2V0VGV4dERlY29yYXRpb24oKX19PkFzeW5jPC9zcGFuPlxuICAgICAgICA8dWw+XG4gICAgICAgICAge3N1cGVyLnJlbmRlcigpfVxuICAgICAgICA8L3VsPlxuICAgICAgPC9saT5cbiAgICApO1xuICB9XG59XG4iXX0= | ||
} | ||
render() { | ||
return (React.createElement("li", { className: "async" }, | ||
React.createElement("span", { style: { textDecoration: this.getTextDecoration() } }, "Async"), | ||
React.createElement("ul", null, super.render()))); | ||
} | ||
} |
@@ -1,7 +0,1 @@ | ||
"use strict"; | ||
function __export(m) { | ||
for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p]; | ||
} | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__export(require("./DisplayFields")); | ||
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi9zcmMvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6Ijs7Ozs7QUFBQSxxQ0FBZ0MiLCJzb3VyY2VzQ29udGVudCI6WyJleHBvcnQgKiBmcm9tICcuL0Rpc3BsYXlGaWVsZHMnO1xuIl19 | ||
export * from './DisplayFields'; |
{ | ||
"name": "react-form-with-constraints-tools", | ||
"version": "0.10.0-beta.2", | ||
"version": "0.10.0-beta.3", | ||
"repository": { | ||
@@ -17,14 +17,17 @@ "type": "git", | ||
], | ||
"main": "lib/index.js", | ||
"module": "lib/index.js", | ||
"types": "lib/index.d.ts", | ||
"files": [ | ||
"dist/", | ||
"lib/" | ||
"lib/", | ||
"lib-es5/" | ||
], | ||
"sideEffects": false, | ||
"scripts": { | ||
"clean": "del-cli lib dist coverage .rpt2_cache", | ||
"clean": "del-cli lib lib-es5 dist coverage .rpt2_cache", | ||
"tsc": "tsc", | ||
"build": "tsc --project tsconfig.lib.json", | ||
"build:es5": "tsc --project tsconfig.lib-es5.json", | ||
"dist": "cross-env NODE_ENV=development rollup --config && cross-env NODE_ENV=production rollup --config", | ||
"prepublishOnly": "npm run clean && npm run tsc && npm run build && npm run dist", | ||
"prepublishOnly": "npm run clean && npm run tsc && npm run build:es5 && npm run build && npm run dist", | ||
"test": "node --trace-warnings node_modules/.bin/jest --no-cache --verbose", | ||
@@ -51,3 +54,3 @@ "test:coverage": "node --trace-warnings node_modules/.bin/jest --no-cache --coverage" | ||
"react-dom": "latest", | ||
"react-form-with-constraints": "^0.10.0-beta.2", | ||
"react-form-with-constraints": "^0.10.0-beta.3", | ||
"rollup": "latest", | ||
@@ -63,3 +66,3 @@ "rollup-plugin-filesize": "latest", | ||
}, | ||
"gitHead": "3b9e2ec58e3a9a4c2e4be47ea1a0209ba1f36eba" | ||
"gitHead": "317dbf7a33647afbeac3609a7bbaeb67c25e31d1" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
49189
15
542