ywana-core8 0.0.279 → 0.0.282
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 +26 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +2 -0
- package/dist/index.css.map +1 -1
- package/dist/index.modern.js +26 -21
- package/dist/index.modern.js.map +1 -1
- package/dist/index.umd.js +26 -21
- package/dist/index.umd.js.map +1 -1
- package/package.json +1 -1
- package/src/domain/TablePage.js +7 -7
- package/src/site/view.css +2 -0
- package/src/site/view.js +3 -3
package/dist/index.umd.js
CHANGED
@@ -3279,7 +3279,9 @@
|
|
3279
3279
|
*/
|
3280
3280
|
|
3281
3281
|
var View = function View(props) {
|
3282
|
-
var
|
3282
|
+
var id = props.id,
|
3283
|
+
className = props.className,
|
3284
|
+
icon = props.icon,
|
3283
3285
|
title = props.title,
|
3284
3286
|
toolbar = props.toolbar,
|
3285
3287
|
menu = props.menu,
|
@@ -3301,8 +3303,9 @@
|
|
3301
3303
|
if (onClose) onClose();
|
3302
3304
|
}
|
3303
3305
|
|
3304
|
-
return /*#__PURE__*/React__default["default"].createElement("
|
3305
|
-
|
3306
|
+
return /*#__PURE__*/React__default["default"].createElement("section", {
|
3307
|
+
id: id,
|
3308
|
+
className: "view " + className
|
3306
3309
|
}, /*#__PURE__*/React__default["default"].createElement("header", null, canCollapse ? /*#__PURE__*/React__default["default"].createElement(Icon, {
|
3307
3310
|
icon: "expand_more",
|
3308
3311
|
size: "small",
|
@@ -4452,7 +4455,7 @@
|
|
4452
4455
|
return result;
|
4453
4456
|
}
|
4454
4457
|
|
4455
|
-
var http
|
4458
|
+
var http = HTTPClient(window.API || process.env.REACT_APP_API, Session);
|
4456
4459
|
/**
|
4457
4460
|
* Collection Page
|
4458
4461
|
*/
|
@@ -4964,29 +4967,29 @@
|
|
4964
4967
|
queryParams = queryParams.concat(filterQuery);
|
4965
4968
|
}
|
4966
4969
|
|
4967
|
-
return http
|
4970
|
+
return http.GET(url);
|
4968
4971
|
},
|
4969
4972
|
find: function find(id) {
|
4970
|
-
return http
|
4973
|
+
return http.GET(url + "/" + id);
|
4971
4974
|
},
|
4972
4975
|
create: function create(form) {
|
4973
4976
|
var body = JSON.stringify(form);
|
4974
|
-
return http
|
4977
|
+
return http.POST(url, body);
|
4975
4978
|
},
|
4976
4979
|
update: function update(form) {
|
4977
4980
|
var body = JSON.stringify(form);
|
4978
|
-
return http
|
4981
|
+
return http.PUT(url + "/" + form.id, body);
|
4979
4982
|
},
|
4980
4983
|
patch: function patch(id, form) {
|
4981
4984
|
var body = JSON.stringify(form);
|
4982
|
-
return http
|
4985
|
+
return http.PATCH(url + "/" + id, body);
|
4983
4986
|
},
|
4984
4987
|
updateProperty: function updateProperty(id, propertyName, form) {
|
4985
4988
|
var body = JSON.stringify(form);
|
4986
|
-
return http
|
4989
|
+
return http.PUT(url + "/" + id + "/" + propertyName, body);
|
4987
4990
|
},
|
4988
4991
|
remove: function remove(id) {
|
4989
|
-
return http
|
4992
|
+
return http.DELETE(url + "/" + id);
|
4990
4993
|
}
|
4991
4994
|
};
|
4992
4995
|
};
|
@@ -5075,6 +5078,10 @@
|
|
5075
5078
|
})));
|
5076
5079
|
};
|
5077
5080
|
|
5081
|
+
/**
|
5082
|
+
* Table Page
|
5083
|
+
*/
|
5084
|
+
|
5078
5085
|
function _catch(body, recover) {
|
5079
5086
|
try {
|
5080
5087
|
var result = body();
|
@@ -5088,12 +5095,11 @@
|
|
5088
5095
|
|
5089
5096
|
return result;
|
5090
5097
|
}
|
5091
|
-
|
5092
|
-
var http = HTTPClient(window.API || process.env.REACT_APP_API, Session);
|
5093
5098
|
/**
|
5094
|
-
*
|
5099
|
+
* TableRowEditor
|
5095
5100
|
*/
|
5096
5101
|
|
5102
|
+
|
5097
5103
|
var TablePage = function TablePage(props) {
|
5098
5104
|
var playScenario = function playScenario() {
|
5099
5105
|
try {
|
@@ -5153,6 +5159,7 @@
|
|
5153
5159
|
schema = props.schema,
|
5154
5160
|
url = props.url,
|
5155
5161
|
field = props.field,
|
5162
|
+
host = props.host,
|
5156
5163
|
_props$autosave = props.autosave,
|
5157
5164
|
autosave = _props$autosave === void 0 ? true : _props$autosave,
|
5158
5165
|
_props$delay = props.delay,
|
@@ -5207,7 +5214,7 @@
|
|
5207
5214
|
}, [form]);
|
5208
5215
|
React.useEffect(function () {
|
5209
5216
|
try {
|
5210
|
-
var context = TableContext(url, field);
|
5217
|
+
var context = TableContext(url, field, host);
|
5211
5218
|
return Promise.resolve(context.load()).then(function () {
|
5212
5219
|
setPageContext(context);
|
5213
5220
|
});
|
@@ -5319,9 +5326,6 @@
|
|
5319
5326
|
canDelete: canDelete
|
5320
5327
|
})), renderAside());
|
5321
5328
|
};
|
5322
|
-
/**
|
5323
|
-
* TableRowEditor
|
5324
|
-
*/
|
5325
5329
|
|
5326
5330
|
var TableRowEditor = function TableRowEditor(props) {
|
5327
5331
|
var name = props.name,
|
@@ -5703,8 +5707,8 @@
|
|
5703
5707
|
* Table Context
|
5704
5708
|
*/
|
5705
5709
|
|
5706
|
-
var TableContext = function TableContext(url, field) {
|
5707
|
-
var API = TableAPI(url);
|
5710
|
+
var TableContext = function TableContext(url, field, host) {
|
5711
|
+
var API = TableAPI(url, host);
|
5708
5712
|
return {
|
5709
5713
|
all: [],
|
5710
5714
|
checked: new Set([]),
|
@@ -5819,7 +5823,8 @@
|
|
5819
5823
|
*/
|
5820
5824
|
|
5821
5825
|
|
5822
|
-
var TableAPI = function TableAPI(url) {
|
5826
|
+
var TableAPI = function TableAPI(url, host) {
|
5827
|
+
var http = HTTPClient(host || window.API || process.env.REACT_APP_API, Session);
|
5823
5828
|
return {
|
5824
5829
|
all: function all(filters) {
|
5825
5830
|
var queryParams = "?";
|