@cashub/ui 0.17.5 → 0.17.7
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/jsoneditor/JsonEditor.js +1 -1
- package/package.json +1 -1
- package/table/Table.js +10 -4
package/jsoneditor/JsonEditor.js
CHANGED
|
@@ -47,7 +47,7 @@ var JsonEditor = /*#__PURE__*/(0, _react.forwardRef)(function (_ref, ref) {
|
|
|
47
47
|
});
|
|
48
48
|
});
|
|
49
49
|
|
|
50
|
-
var Wrapper = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .jsoneditor {\n border: 0;\n\n div.jsoneditor-tree {\n background: transparent;\n }\n }\n\n div.jsoneditor td.jsoneditor-tree {\n vertical-align: middle;\n }\n\n .jsoneditor-popover,\n .jsoneditor-schema-error,\n div.jsoneditor td,\n div.jsoneditor textarea,\n div.jsoneditor
|
|
50
|
+
var Wrapper = _styledComponents.default.div(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .jsoneditor {\n border: 0;\n\n div.jsoneditor-tree {\n background: transparent;\n }\n }\n\n div.jsoneditor td.jsoneditor-tree {\n vertical-align: middle;\n }\n\n .jsoneditor-popover,\n .jsoneditor-schema-error,\n div.jsoneditor th,\n div.jsoneditor td,\n div.jsoneditor textarea,\n div.jsoneditor select,\n div.jsoneditor-field,\n div.jsoneditor-value,\n pre.jsoneditor-preview {\n font-size: var(--font-body1);\n color: var(--font-on-background);\n }\n\n div.jsoneditor select {\n background: var(--color-background1);\n }\n\n div {\n &.jsoneditor-readonly {\n color: var(--font-on-background);\n }\n\n &.jsoneditor-value.jsoneditor-number {\n color: var(--color-danger);\n }\n\n &.jsoneditor-field.jsoneditor-empty::after,\n &.jsoneditor-value.jsoneditor-empty::after {\n font-size: var(--font-body1);\n color: var(--font-on-background);\n }\n\n &.jsoneditor-field[contenteditable='true']:focus,\n &.jsoneditor-field[contenteditable='true']:hover,\n &.jsoneditor-value[contenteditable='true']:focus,\n &.jsoneditor-value[contenteditable='true']:hover,\n &.jsoneditor-field.jsoneditor-highlight,\n &.jsoneditor-value.jsoneditor-highlight {\n background-color: transparent;\n border: var(--border-width) solid var(--border-color);\n }\n\n &.jsoneditor-empty {\n border-color: transparent;\n border-style: none;\n }\n\n &.jsoneditor-tree button.jsoneditor-button {\n filter: invert(100%) sepia(0%) saturate(2%) hue-rotate(78deg)\n brightness(104%) contrast(101%);\n }\n\n &.jsoneditor-tree button.jsoneditor-button:focus {\n background-color: transparent;\n }\n }\n\n // ace editor\n .ace_editor.ace-jsoneditor {\n border-radius: 8px;\n }\n\n .ace_gutter {\n background: rgb(59, 57, 87) !important;\n color: #ffffff !important;\n z-index: 0;\n }\n\n .ace-jsoneditor .ace_gutter-active-line {\n background: #00001d;\n }\n\n .ace_content {\n background: rgb(76, 72, 110);\n z-index: 0;\n }\n\n .ace-jsoneditor .ace_marker-layer .ace_active-line {\n background: #00001d;\n }\n\n .ace-jsoneditor .ace_text-layer {\n color: #fff;\n }\n\n .ace-jsoneditor .ace_variable {\n color: #fff;\n }\n\n .ace-jsoneditor .ace_string {\n color: #11d8cd;\n }\n\n .ace-jsoneditor .ace_cursor {\n border-left: 2px solid #fff;\n }\n\n .ace_hidden-cursors .ace_cursor {\n opacity: 0.5;\n }\n"])));
|
|
51
51
|
|
|
52
52
|
var _default = JsonEditor;
|
|
53
53
|
exports.default = _default;
|
package/package.json
CHANGED
package/table/Table.js
CHANGED
|
@@ -171,16 +171,22 @@ var Table = function Table(_ref) {
|
|
|
171
171
|
custom = column.custom,
|
|
172
172
|
props = _objectWithoutProperties(column, _excluded);
|
|
173
173
|
|
|
174
|
-
var key = rowIndex + columnIndex.toString();
|
|
174
|
+
var key = rowIndex + columnIndex.toString();
|
|
175
|
+
var value = row[fieldName]; // 如果有matcher,比對當前 column 的 fieldName 是不是等於 matcher
|
|
175
176
|
|
|
176
177
|
if (matcher && fieldName === matcher) {
|
|
177
|
-
if (type === 'single' && selected ===
|
|
178
|
+
if (type === 'single' && selected === value) {
|
|
178
179
|
active = true;
|
|
179
180
|
}
|
|
180
181
|
|
|
181
|
-
if (type === 'multiple' && selected.includes(
|
|
182
|
+
if (type === 'multiple' && selected.includes(value)) {
|
|
182
183
|
active = true;
|
|
183
184
|
}
|
|
185
|
+
} // convert to an empty string
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
if (value === null || value === undefined) {
|
|
189
|
+
value = '';
|
|
184
190
|
}
|
|
185
191
|
|
|
186
192
|
var isCustom = false;
|
|
@@ -195,7 +201,7 @@ var Table = function Table(_ref) {
|
|
|
195
201
|
renderedData = /*#__PURE__*/(0, _jsxRuntime.jsx)("span", {
|
|
196
202
|
id: key,
|
|
197
203
|
onClick: showFullValue,
|
|
198
|
-
children: render ? render(
|
|
204
|
+
children: render ? render(value, row) : String(value)
|
|
199
205
|
});
|
|
200
206
|
}
|
|
201
207
|
|