bruce-models 4.4.0 → 4.4.2
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/bruce-models.es5.js +90 -2
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +84 -1
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/bruce-models.js +2 -1
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/entity/entity-table-view.js +102 -0
- package/dist/lib/entity/entity-table-view.js.map +1 -0
- package/dist/types/bruce-models.d.ts +2 -1
- package/dist/types/entity/entity-table-view.d.ts +68 -0
- package/package.json +1 -1
package/dist/bruce-models.umd.js
CHANGED
|
@@ -7453,6 +7453,89 @@
|
|
|
7453
7453
|
})(EAction = EntityTypeVisualSettings.EAction || (EntityTypeVisualSettings.EAction = {}));
|
|
7454
7454
|
})(exports.EntityTypeVisualSettings || (exports.EntityTypeVisualSettings = {}));
|
|
7455
7455
|
|
|
7456
|
+
(function (EntityTableView) {
|
|
7457
|
+
/**
|
|
7458
|
+
* Returns a record matching the given viewId.
|
|
7459
|
+
* @param params
|
|
7460
|
+
*/
|
|
7461
|
+
function Get(params) {
|
|
7462
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
7463
|
+
let { viewId, api, req } = params;
|
|
7464
|
+
if (!api) {
|
|
7465
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
7466
|
+
}
|
|
7467
|
+
req = exports.Api.PrepReqParams(req);
|
|
7468
|
+
const res = yield api.GET(`ui.tableview/${viewId}`, req);
|
|
7469
|
+
return {
|
|
7470
|
+
view: res
|
|
7471
|
+
};
|
|
7472
|
+
});
|
|
7473
|
+
}
|
|
7474
|
+
EntityTableView.Get = Get;
|
|
7475
|
+
/**
|
|
7476
|
+
* Returns the list of all available Table Views.
|
|
7477
|
+
* @param params
|
|
7478
|
+
*/
|
|
7479
|
+
function GetList(params) {
|
|
7480
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
7481
|
+
if (!params) {
|
|
7482
|
+
params = {};
|
|
7483
|
+
}
|
|
7484
|
+
let { api, req } = params;
|
|
7485
|
+
if (!api) {
|
|
7486
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
7487
|
+
}
|
|
7488
|
+
req = exports.Api.PrepReqParams(req);
|
|
7489
|
+
const res = yield api.GET("ui.tableviews", req);
|
|
7490
|
+
let items = res === null || res === void 0 ? void 0 : res.Items;
|
|
7491
|
+
if (!items) {
|
|
7492
|
+
items = [];
|
|
7493
|
+
}
|
|
7494
|
+
return {
|
|
7495
|
+
views: items
|
|
7496
|
+
};
|
|
7497
|
+
});
|
|
7498
|
+
}
|
|
7499
|
+
EntityTableView.GetList = GetList;
|
|
7500
|
+
/**
|
|
7501
|
+
* Creates or updates a Table View record.
|
|
7502
|
+
*/
|
|
7503
|
+
function Update(params) {
|
|
7504
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
7505
|
+
let { view, api, req } = params;
|
|
7506
|
+
if (!api) {
|
|
7507
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
7508
|
+
}
|
|
7509
|
+
req = exports.Api.PrepReqParams(req);
|
|
7510
|
+
let viewId = view.ID;
|
|
7511
|
+
if (!viewId) {
|
|
7512
|
+
// New record.
|
|
7513
|
+
viewId = 0;
|
|
7514
|
+
}
|
|
7515
|
+
const res = yield api.POST(`ui.tableview/${viewId}`, view, req);
|
|
7516
|
+
return {
|
|
7517
|
+
view: res
|
|
7518
|
+
};
|
|
7519
|
+
});
|
|
7520
|
+
}
|
|
7521
|
+
EntityTableView.Update = Update;
|
|
7522
|
+
/**
|
|
7523
|
+
* Deletes a Table View record.
|
|
7524
|
+
* @param params
|
|
7525
|
+
*/
|
|
7526
|
+
function Delete(params) {
|
|
7527
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
7528
|
+
let { viewId, api, req } = params;
|
|
7529
|
+
if (!api) {
|
|
7530
|
+
api = exports.ENVIRONMENT.Api().GetBruceApi();
|
|
7531
|
+
}
|
|
7532
|
+
req = exports.Api.PrepReqParams(req);
|
|
7533
|
+
return yield api.DELETE(`ui.tableview/${viewId}`, req);
|
|
7534
|
+
});
|
|
7535
|
+
}
|
|
7536
|
+
EntityTableView.Delete = Delete;
|
|
7537
|
+
})(exports.EntityTableView || (exports.EntityTableView = {}));
|
|
7538
|
+
|
|
7456
7539
|
(function (Style) {
|
|
7457
7540
|
/**
|
|
7458
7541
|
* Types of styles available.
|
|
@@ -13263,7 +13346,7 @@
|
|
|
13263
13346
|
})(exports.DataSource || (exports.DataSource = {}));
|
|
13264
13347
|
|
|
13265
13348
|
// This is updated with the package.json version on build.
|
|
13266
|
-
const VERSION = "4.4.
|
|
13349
|
+
const VERSION = "4.4.2";
|
|
13267
13350
|
|
|
13268
13351
|
exports.VERSION = VERSION;
|
|
13269
13352
|
exports.AbstractApi = AbstractApi;
|