ywana-core8 0.0.303 → 0.0.304

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 CHANGED
@@ -5010,13 +5010,11 @@ var EntityViewer = function EntityViewer(props) {
5010
5010
 
5011
5011
  var QUERY = {
5012
5012
  id: {
5013
- section: "Info",
5014
5013
  id: "id",
5015
5014
  type: ywanaCore8.TYPES.STRING,
5016
5015
  editable: false
5017
5016
  },
5018
5017
  name: {
5019
- section: "Info",
5020
5018
  id: "name",
5021
5019
  type: ywanaCore8.TYPES.STRING,
5022
5020
  required: true,
@@ -5129,6 +5127,7 @@ var TablePage = function TablePage(props) {
5129
5127
  _props$canQuery = props.canQuery,
5130
5128
  canQuery = _props$canQuery === void 0 ? false : _props$canQuery,
5131
5129
  urlQuery = props.urlQuery,
5130
+ user = props.user,
5132
5131
  groupBy = props.groupBy,
5133
5132
  validator = props.validator,
5134
5133
  scenario = props.scenario,
@@ -5168,7 +5167,7 @@ var TablePage = function TablePage(props) {
5168
5167
  }
5169
5168
 
5170
5169
  var _temp = function () {
5171
- if (canQuery) return Promise.resolve(context.loadQueries()).then(function () {});
5170
+ if (canQuery) return Promise.resolve(context.loadQueries(user)).then(function () {});
5172
5171
  }();
5173
5172
 
5174
5173
  return _temp && _temp.then ? _temp.then(_temp2) : _temp2(_temp);
@@ -5202,6 +5201,8 @@ var TablePage = function TablePage(props) {
5202
5201
  var onOK = function onOK(form) {
5203
5202
  try {
5204
5203
  form.filters = filters;
5204
+ form.layout = {};
5205
+ form.user = user;
5205
5206
  return Promise.resolve(pageContext.createQuery(form)).then(function () {
5206
5207
  setPageContext(Object.assign({}, pageContext));
5207
5208
  });
@@ -5839,12 +5840,12 @@ var TableContext = function TableContext(url, field, host, urlQuery) {
5839
5840
  changeFilters: function changeFilters(filters) {
5840
5841
  this.filters = filters;
5841
5842
  },
5842
- loadQueries: function loadQueries() {
5843
+ loadQueries: function loadQueries(user) {
5843
5844
  try {
5844
5845
  var _this11 = this;
5845
5846
 
5846
5847
  var _temp13 = _catch(function () {
5847
- return Promise.resolve(API.queries(urlQuery)).then(function (_API$queries) {
5848
+ return Promise.resolve(API.queries(user, urlQuery)).then(function (_API$queries) {
5848
5849
  _this11.queries = _API$queries;
5849
5850
  });
5850
5851
  }, function (error) {
@@ -5938,9 +5939,11 @@ var TableAPI = function TableAPI(url, host) {
5938
5939
  remove: function remove(id) {
5939
5940
  return http.DELETE(url + "/" + id);
5940
5941
  },
5941
- queries: function queries(url2) {
5942
+ queries: function queries(user, url2) {
5942
5943
  var url3 = url2 ? url2 : url;
5943
- return http.GET(url3 + "queries");
5944
+ url3 = url3 + "queries";
5945
+ if (user) url3 = url3 + ("?user=" + user);
5946
+ return http.GET(url3);
5944
5947
  },
5945
5948
  createQuery: function createQuery(form, url2) {
5946
5949
  var url3 = url2 ? url2 : url;