ywana-core8 0.0.254 → 0.0.255
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/dist/index.cjs +13 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.modern.js +13 -8
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +13 -8
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/ContentViewer.js +1 -4
- package/src/html/tab.js +5 -5
- package/src/html/tab.test.js +16 -0
- package/src/html/table.js +8 -1
- package/src/widgets/ide/editor.css +31 -0
- package/src/widgets/ide/editor.js +74 -0
- package/src/widgets/ide/editor.test.js +33 -0
package/dist/index.modern.js
CHANGED
@@ -843,12 +843,12 @@ var Tabs = function Tabs(props) {
|
|
843
843
|
selected = props.selected,
|
844
844
|
onChange = props.onChange;
|
845
845
|
var tabs = React.Children.map(children, function (child, index) {
|
846
|
-
function select() {
|
847
|
-
if (onChange) onChange(index);
|
846
|
+
function select(id) {
|
847
|
+
if (onChange) onChange(id || index);
|
848
848
|
}
|
849
849
|
|
850
850
|
return React.cloneElement(child, {
|
851
|
-
selected: index === selected,
|
851
|
+
selected: index === selected || selected === child.props.id,
|
852
852
|
onSelect: select
|
853
853
|
});
|
854
854
|
});
|
@@ -863,13 +863,14 @@ var Tabs = function Tabs(props) {
|
|
863
863
|
*/
|
864
864
|
|
865
865
|
var Tab = function Tab(props) {
|
866
|
-
var
|
866
|
+
var id = props.id,
|
867
|
+
label = props.label,
|
867
868
|
selected = props.selected,
|
868
869
|
actions = props.actions,
|
869
870
|
onSelect = props.onSelect;
|
870
871
|
|
871
872
|
function select() {
|
872
|
-
if (onSelect) onSelect();
|
873
|
+
if (onSelect) onSelect(id);
|
873
874
|
}
|
874
875
|
|
875
876
|
var style = selected ? "selected" : "";
|
@@ -1742,7 +1743,13 @@ var StringCellViewer = function StringCellViewer(_ref7) {
|
|
1742
1743
|
var value = _ref7.value,
|
1743
1744
|
format = _ref7.format,
|
1744
1745
|
options = _ref7.options;
|
1745
|
-
|
1746
|
+
|
1747
|
+
function buildOptions() {
|
1748
|
+
var opts = typeof options === 'function' ? options() : options;
|
1749
|
+
return opts;
|
1750
|
+
}
|
1751
|
+
|
1752
|
+
var option = options ? buildOptions().find(function (o) {
|
1746
1753
|
return o.value === value;
|
1747
1754
|
}) : null;
|
1748
1755
|
var text = option ? option.label : value;
|
@@ -4641,7 +4648,6 @@ var ContentViewer = function ContentViewer(props) {
|
|
4641
4648
|
if (!content) return /*#__PURE__*/React.createElement("div", null, "No Content...");
|
4642
4649
|
var sections = content.sections();
|
4643
4650
|
var value = content.value();
|
4644
|
-
console.log(value);
|
4645
4651
|
return /*#__PURE__*/React.createElement("div", {
|
4646
4652
|
className: "content-viewer"
|
4647
4653
|
}, sections.map(function (section) {
|
@@ -4671,7 +4677,6 @@ var FieldViewer = function FieldViewer(props) {
|
|
4671
4677
|
value = props.value;
|
4672
4678
|
var type = field.type,
|
4673
4679
|
label = field.label;
|
4674
|
-
console.log('FieldViewer', field, value);
|
4675
4680
|
|
4676
4681
|
switch (type) {
|
4677
4682
|
case TYPES.STRING:
|