ywana-core8 0.0.299 → 0.0.302

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.
@@ -5153,7 +5153,7 @@ var TablePage = function TablePage(props) {
5153
5153
  }, [form]);
5154
5154
  useEffect(function () {
5155
5155
  try {
5156
- var context = TableContext(url, field, host);
5156
+ var context = TableContext(url, field, host, urlQuery);
5157
5157
  return Promise.resolve(context.load()).then(function () {
5158
5158
  function _temp2() {
5159
5159
  setPageContext(context);
@@ -5381,7 +5381,7 @@ var TableSelector = function TableSelector(props) {
5381
5381
  var TableQueries = function TableQueries(props) {
5382
5382
  var remove = function remove(id) {
5383
5383
  try {
5384
- return Promise.resolve(pageContext.removeQuery(id)).then(function () {
5384
+ return Promise.resolve(pageContext.removeQuery(id, url)).then(function () {
5385
5385
  setPageContext(Object.assign({}, pageContext));
5386
5386
  });
5387
5387
  } catch (e) {
@@ -5393,6 +5393,7 @@ var TableQueries = function TableQueries(props) {
5393
5393
  pageContext = _useContext3[0],
5394
5394
  setPageContext = _useContext3[1];
5395
5395
 
5396
+ var url = props.url;
5396
5397
  var _pageContext$queries = pageContext.queries,
5397
5398
  queries = _pageContext$queries === void 0 ? [{
5398
5399
  name: "Query 1",
@@ -5404,9 +5405,6 @@ var TableQueries = function TableQueries(props) {
5404
5405
  name: "Query 3",
5405
5406
  filters: {}
5406
5407
  }] : _pageContext$queries;
5407
- useEffect(function () {
5408
- pageContext.loadQueries();
5409
- }, []);
5410
5408
  return /*#__PURE__*/React.createElement(Fragment, null, /*#__PURE__*/React.createElement(Header, {
5411
5409
  className: "table-queries",
5412
5410
  title: /*#__PURE__*/React.createElement(Text, null, "Queries")
@@ -5725,7 +5723,7 @@ var TableEditor = function TableEditor(props) {
5725
5723
  * Table Context
5726
5724
  */
5727
5725
 
5728
- var TableContext = function TableContext(url, field, host) {
5726
+ var TableContext = function TableContext(url, field, host, urlQuery) {
5729
5727
  var API = TableAPI(url, host);
5730
5728
  return {
5731
5729
  all: [],
@@ -5840,7 +5838,7 @@ var TableContext = function TableContext(url, field, host) {
5840
5838
  var _this11 = this;
5841
5839
 
5842
5840
  var _temp13 = _catch(function () {
5843
- return Promise.resolve(API.queries()).then(function (_API$queries) {
5841
+ return Promise.resolve(API.queries(urlQuery)).then(function (_API$queries) {
5844
5842
  _this11.queries = _API$queries;
5845
5843
  });
5846
5844
  }, function (error) {
@@ -5934,15 +5932,18 @@ var TableAPI = function TableAPI(url, host) {
5934
5932
  remove: function remove(id) {
5935
5933
  return http.DELETE(url + "/" + id);
5936
5934
  },
5937
- queries: function queries() {
5938
- return http.GET(url + "/queries");
5935
+ queries: function queries(url2) {
5936
+ var url3 = url2 ? url2 : url;
5937
+ return http.GET(url3 + "queries");
5939
5938
  },
5940
- createQuery: function createQuery(form) {
5939
+ createQuery: function createQuery(form, url2) {
5940
+ var url3 = url2 ? url2 : url;
5941
5941
  var body = JSON.stringify(form);
5942
- return http.POST(url + "/queries", body);
5942
+ return http.POST(url3 + "queries", body);
5943
5943
  },
5944
- removeQuery: function removeQuery(id) {
5945
- return http.DELETE(url + "/queries/" + id);
5944
+ removeQuery: function removeQuery(id, url2) {
5945
+ var url3 = url2 ? url2 : url;
5946
+ return http.DELETE(url3 + "queries/" + id);
5946
5947
  }
5947
5948
  };
5948
5949
  };