Skip to content

Commit 8a40fab

Browse files
committed
Bump version to 2.14.0 and update dist files
1 parent b33bad8 commit 8a40fab

File tree

5 files changed

+116
-14
lines changed

5 files changed

+116
-14
lines changed

dist/react-json-form.cjs

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -710,6 +710,10 @@ function Icon(props) {
710710
case 'three-dots-vertical':
711711
icon = /*#__PURE__*/React__default["default"].createElement(ThreeDotsVertical, null);
712712
break;
713+
714+
case 'box-arrow-up-right':
715+
icon = /*#__PURE__*/React__default["default"].createElement(BoxArrowUpRight, null);
716+
break;
713717
}
714718

715719
return /*#__PURE__*/React__default["default"].createElement("svg", {
@@ -763,6 +767,16 @@ function ThreeDotsVertical(props) {
763767
});
764768
}
765769

770+
function BoxArrowUpRight(props) {
771+
return /*#__PURE__*/React__default["default"].createElement(React__default["default"].Fragment, null, /*#__PURE__*/React__default["default"].createElement("path", {
772+
"fill-rule": "evenodd",
773+
d: "M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5"
774+
}), /*#__PURE__*/React__default["default"].createElement("path", {
775+
"fill-rule": "evenodd",
776+
d: "M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z"
777+
}));
778+
}
779+
766780
class TimePicker extends React__default["default"].Component {
767781
constructor(...args) {
768782
super(...args);
@@ -1752,6 +1766,22 @@ class FormDateTimeInput extends React__default["default"].Component {
17521766
}
17531767

17541768
}
1769+
function FormURLInput(props) {
1770+
return /*#__PURE__*/React__default["default"].createElement("div", {
1771+
className: props.label ? 'rjf-url-field has-label' : 'rjf-url-field'
1772+
}, /*#__PURE__*/React__default["default"].createElement(FormInput, _extends({}, props, {
1773+
type: "url",
1774+
className: "rjf-url-field-input"
1775+
})), props.value && /*#__PURE__*/React__default["default"].createElement("a", {
1776+
href: props.value,
1777+
target: "_blank",
1778+
rel: "noopener noreferrer",
1779+
className: "rjf-url-field-link",
1780+
title: "Open in new tab"
1781+
}, /*#__PURE__*/React__default["default"].createElement(Icon, {
1782+
name: "box-arrow-up-right"
1783+
}), " ", /*#__PURE__*/React__default["default"].createElement("span", null, "Open link")));
1784+
}
17551785

17561786
class AutoCompleteInput extends React__default["default"].Component {
17571787
constructor(props) {
@@ -2653,15 +2683,19 @@ function FormField(props) {
26532683
InputField = FormInput;
26542684

26552685
if (props.schema.format) {
2656-
if (props.schema.format === 'data-url') {
2686+
let format = props.schema.format;
2687+
2688+
if (format === 'data-url') {
26572689
InputField = FormFileInput;
2658-
} else if (props.schema.format === 'file-url') {
2690+
} else if (format === 'file-url') {
26592691
InputField = FileUploader;
2660-
} else if (normalizeKeyword(props.schema.format) === 'date-time') {
2692+
} else if (normalizeKeyword(format) === 'date-time') {
26612693
InputField = FormDateTimeInput;
2694+
} else if (format === 'uri' || format === 'uri-reference') {
2695+
InputField = FormURLInput;
26622696
}
26632697

2664-
inputProps.type = props.schema.format;
2698+
inputProps.type = format;
26652699
} else if (props.schema.widget === 'hidden') {
26662700
inputProps.type = 'hidden';
26672701
} else {

dist/react-json-form.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/react-json-form.modern.js

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,10 @@ function Icon(props) {
704704
case 'three-dots-vertical':
705705
icon = /*#__PURE__*/React$1.createElement(ThreeDotsVertical, null);
706706
break;
707+
708+
case 'box-arrow-up-right':
709+
icon = /*#__PURE__*/React$1.createElement(BoxArrowUpRight, null);
710+
break;
707711
}
708712

709713
return /*#__PURE__*/React$1.createElement("svg", {
@@ -757,6 +761,16 @@ function ThreeDotsVertical(props) {
757761
});
758762
}
759763

764+
function BoxArrowUpRight(props) {
765+
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("path", {
766+
"fill-rule": "evenodd",
767+
d: "M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5"
768+
}), /*#__PURE__*/React$1.createElement("path", {
769+
"fill-rule": "evenodd",
770+
d: "M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z"
771+
}));
772+
}
773+
760774
class TimePicker extends React$1.Component {
761775
constructor(...args) {
762776
super(...args);
@@ -1746,6 +1760,22 @@ class FormDateTimeInput extends React$1.Component {
17461760
}
17471761

17481762
}
1763+
function FormURLInput(props) {
1764+
return /*#__PURE__*/React$1.createElement("div", {
1765+
className: props.label ? 'rjf-url-field has-label' : 'rjf-url-field'
1766+
}, /*#__PURE__*/React$1.createElement(FormInput, _extends({}, props, {
1767+
type: "url",
1768+
className: "rjf-url-field-input"
1769+
})), props.value && /*#__PURE__*/React$1.createElement("a", {
1770+
href: props.value,
1771+
target: "_blank",
1772+
rel: "noopener noreferrer",
1773+
className: "rjf-url-field-link",
1774+
title: "Open in new tab"
1775+
}, /*#__PURE__*/React$1.createElement(Icon, {
1776+
name: "box-arrow-up-right"
1777+
}), " ", /*#__PURE__*/React$1.createElement("span", null, "Open link")));
1778+
}
17491779

17501780
class AutoCompleteInput extends React$1.Component {
17511781
constructor(props) {
@@ -2647,15 +2677,19 @@ function FormField(props) {
26472677
InputField = FormInput;
26482678

26492679
if (props.schema.format) {
2650-
if (props.schema.format === 'data-url') {
2680+
let format = props.schema.format;
2681+
2682+
if (format === 'data-url') {
26512683
InputField = FormFileInput;
2652-
} else if (props.schema.format === 'file-url') {
2684+
} else if (format === 'file-url') {
26532685
InputField = FileUploader;
2654-
} else if (normalizeKeyword(props.schema.format) === 'date-time') {
2686+
} else if (normalizeKeyword(format) === 'date-time') {
26552687
InputField = FormDateTimeInput;
2688+
} else if (format === 'uri' || format === 'uri-reference') {
2689+
InputField = FormURLInput;
26562690
}
26572691

2658-
inputProps.type = props.schema.format;
2692+
inputProps.type = format;
26592693
} else if (props.schema.widget === 'hidden') {
26602694
inputProps.type = 'hidden';
26612695
} else {

dist/react-json-form.module.js

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -704,6 +704,10 @@ function Icon(props) {
704704
case 'three-dots-vertical':
705705
icon = /*#__PURE__*/React$1.createElement(ThreeDotsVertical, null);
706706
break;
707+
708+
case 'box-arrow-up-right':
709+
icon = /*#__PURE__*/React$1.createElement(BoxArrowUpRight, null);
710+
break;
707711
}
708712

709713
return /*#__PURE__*/React$1.createElement("svg", {
@@ -757,6 +761,16 @@ function ThreeDotsVertical(props) {
757761
});
758762
}
759763

764+
function BoxArrowUpRight(props) {
765+
return /*#__PURE__*/React$1.createElement(React$1.Fragment, null, /*#__PURE__*/React$1.createElement("path", {
766+
"fill-rule": "evenodd",
767+
d: "M8.636 3.5a.5.5 0 0 0-.5-.5H1.5A1.5 1.5 0 0 0 0 4.5v10A1.5 1.5 0 0 0 1.5 16h10a1.5 1.5 0 0 0 1.5-1.5V7.864a.5.5 0 0 0-1 0V14.5a.5.5 0 0 1-.5.5h-10a.5.5 0 0 1-.5-.5v-10a.5.5 0 0 1 .5-.5h6.636a.5.5 0 0 0 .5-.5"
768+
}), /*#__PURE__*/React$1.createElement("path", {
769+
"fill-rule": "evenodd",
770+
d: "M16 .5a.5.5 0 0 0-.5-.5h-5a.5.5 0 0 0 0 1h3.793L6.146 9.146a.5.5 0 1 0 .708.708L15 1.707V5.5a.5.5 0 0 0 1 0z"
771+
}));
772+
}
773+
760774
class TimePicker extends React$1.Component {
761775
constructor(...args) {
762776
super(...args);
@@ -1746,6 +1760,22 @@ class FormDateTimeInput extends React$1.Component {
17461760
}
17471761

17481762
}
1763+
function FormURLInput(props) {
1764+
return /*#__PURE__*/React$1.createElement("div", {
1765+
className: props.label ? 'rjf-url-field has-label' : 'rjf-url-field'
1766+
}, /*#__PURE__*/React$1.createElement(FormInput, _extends({}, props, {
1767+
type: "url",
1768+
className: "rjf-url-field-input"
1769+
})), props.value && /*#__PURE__*/React$1.createElement("a", {
1770+
href: props.value,
1771+
target: "_blank",
1772+
rel: "noopener noreferrer",
1773+
className: "rjf-url-field-link",
1774+
title: "Open in new tab"
1775+
}, /*#__PURE__*/React$1.createElement(Icon, {
1776+
name: "box-arrow-up-right"
1777+
}), " ", /*#__PURE__*/React$1.createElement("span", null, "Open link")));
1778+
}
17491779

17501780
class AutoCompleteInput extends React$1.Component {
17511781
constructor(props) {
@@ -2647,15 +2677,19 @@ function FormField(props) {
26472677
InputField = FormInput;
26482678

26492679
if (props.schema.format) {
2650-
if (props.schema.format === 'data-url') {
2680+
let format = props.schema.format;
2681+
2682+
if (format === 'data-url') {
26512683
InputField = FormFileInput;
2652-
} else if (props.schema.format === 'file-url') {
2684+
} else if (format === 'file-url') {
26532685
InputField = FileUploader;
2654-
} else if (normalizeKeyword(props.schema.format) === 'date-time') {
2686+
} else if (normalizeKeyword(format) === 'date-time') {
26552687
InputField = FormDateTimeInput;
2688+
} else if (format === 'uri' || format === 'uri-reference') {
2689+
InputField = FormURLInput;
26562690
}
26572691

2658-
inputProps.type = props.schema.format;
2692+
inputProps.type = format;
26592693
} else if (props.schema.widget === 'hidden') {
26602694
inputProps.type = 'hidden';
26612695
} else {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@bhch/react-json-form",
3-
"version": "2.13.5",
3+
"version": "2.14.0",
44
"description": "Create forms using JSON Schema",
55
"publishConfig": {
66
"access": "public"

0 commit comments

Comments
 (0)