bruce-models 3.5.1 → 3.5.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/README.md +31 -0
- package/dist/bruce-models.es5.js +232 -216
- package/dist/bruce-models.es5.js.map +1 -1
- package/dist/bruce-models.umd.js +221 -205
- package/dist/bruce-models.umd.js.map +1 -1
- package/dist/lib/account/account.js +45 -45
- package/dist/lib/account/account.js.map +1 -1
- package/dist/lib/ann-document/ann-document.js +28 -28
- package/dist/lib/ann-document/ann-document.js.map +1 -1
- package/dist/lib/bruce-models.js +2 -1
- package/dist/lib/bruce-models.js.map +1 -1
- package/dist/lib/client-file/client-file.js +14 -14
- package/dist/lib/client-file/client-file.js.map +1 -1
- package/dist/lib/custom-form/custom-form.js +31 -31
- package/dist/lib/custom-form/custom-form.js.map +1 -1
- package/dist/lib/data-lab/data-lab.js.map +1 -1
- package/dist/lib/data-source/data-source.js +27 -27
- package/dist/lib/data-source/data-source.js.map +1 -1
- package/dist/lib/entity/entity-attachment-type.js +28 -28
- package/dist/lib/entity/entity-attachment-type.js.map +1 -1
- package/dist/lib/entity/entity-attachment.js +28 -28
- package/dist/lib/entity/entity-attachment.js.map +1 -1
- package/dist/lib/entity/entity-attribute.js.map +1 -1
- package/dist/lib/entity/entity-tag.js +17 -2
- package/dist/lib/entity/entity-tag.js.map +1 -1
- package/dist/lib/plugin/plugin.js +32 -32
- package/dist/types/account/account.d.ts +47 -47
- package/dist/types/ann-document/ann-document.d.ts +42 -42
- package/dist/types/bruce-models.d.ts +1 -1
- package/dist/types/client-file/client-file.d.ts +11 -11
- package/dist/types/custom-form/custom-form.d.ts +22 -22
- package/dist/types/data-lab/data-lab.d.ts +4 -4
- package/dist/types/data-source/data-source.d.ts +21 -21
- package/dist/types/entity/entity-attachment-type.d.ts +22 -22
- package/dist/types/entity/entity-attachment.d.ts +22 -22
- package/dist/types/entity/entity-attribute.d.ts +9 -9
- package/package.json +78 -78
package/dist/bruce-models.umd.js
CHANGED
|
@@ -797,51 +797,6 @@
|
|
|
797
797
|
// Some accounts may not be "dead" but instead purposely don't have a NextspaceAPI database so we'll avoid them too.
|
|
798
798
|
const ACCOUNT_EXCLUSIONS = ["hyperportal", "hypeportal", "bviewer"];
|
|
799
799
|
(function (Account) {
|
|
800
|
-
/**
|
|
801
|
-
* Returns cache identifier for an account by ID.
|
|
802
|
-
* Example: {
|
|
803
|
-
* const api: BruceApi.Api = ...;
|
|
804
|
-
* const key = GetCacheKey(1);
|
|
805
|
-
* api.Cache.Remove(key);
|
|
806
|
-
* }
|
|
807
|
-
* @param accountId
|
|
808
|
-
* @param appSettingsId
|
|
809
|
-
* @returns
|
|
810
|
-
*/
|
|
811
|
-
function GetCacheKey(accountId, appSettingsId) {
|
|
812
|
-
if (appSettingsId) {
|
|
813
|
-
return exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Id + accountId + exports.Api.ECacheKey + appSettingsId;
|
|
814
|
-
}
|
|
815
|
-
return exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Id + accountId;
|
|
816
|
-
}
|
|
817
|
-
Account.GetCacheKey = GetCacheKey;
|
|
818
|
-
/**
|
|
819
|
-
* Returns cache identifier for a list of accounts by session ID.
|
|
820
|
-
* Example: {
|
|
821
|
-
* const api: BruceApi.Api = ...;
|
|
822
|
-
* const key = GetListCacheKey(api.GetSessionId());
|
|
823
|
-
* api.Cache.Remove(key);
|
|
824
|
-
* }
|
|
825
|
-
* @param ssid
|
|
826
|
-
* @returns
|
|
827
|
-
*/
|
|
828
|
-
function GetListCacheKey(ssid) {
|
|
829
|
-
return exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Session + exports.Api.ECacheKey.Id + ssid;
|
|
830
|
-
}
|
|
831
|
-
Account.GetListCacheKey = GetListCacheKey;
|
|
832
|
-
/**
|
|
833
|
-
* Returns cache identifier for a list of database regions.
|
|
834
|
-
* Example: {
|
|
835
|
-
* const api: BruceApi.Api = ...;
|
|
836
|
-
* const key = GetDbRegionListCacheKey();
|
|
837
|
-
* api.Cache.Remove(key);
|
|
838
|
-
* }
|
|
839
|
-
* @returns
|
|
840
|
-
*/
|
|
841
|
-
function GetDbRegionListCacheKey() {
|
|
842
|
-
return exports.Api.ECacheKey.DatabaseRegion;
|
|
843
|
-
}
|
|
844
|
-
Account.GetDbRegionListCacheKey = GetDbRegionListCacheKey;
|
|
845
800
|
/**
|
|
846
801
|
* Known Nextspace applications we store settings for.
|
|
847
802
|
*/
|
|
@@ -1072,6 +1027,51 @@
|
|
|
1072
1027
|
});
|
|
1073
1028
|
}
|
|
1074
1029
|
Account.Create = Create;
|
|
1030
|
+
/**
|
|
1031
|
+
* Returns cache identifier for an account by ID.
|
|
1032
|
+
* Example: {
|
|
1033
|
+
* const api: BruceApi.Api = ...;
|
|
1034
|
+
* const key = GetCacheKey(1);
|
|
1035
|
+
* api.Cache.Remove(key);
|
|
1036
|
+
* }
|
|
1037
|
+
* @param accountId
|
|
1038
|
+
* @param appSettingsId
|
|
1039
|
+
* @returns
|
|
1040
|
+
*/
|
|
1041
|
+
function GetCacheKey(accountId, appSettingsId) {
|
|
1042
|
+
if (appSettingsId) {
|
|
1043
|
+
return exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Id + accountId + exports.Api.ECacheKey + appSettingsId;
|
|
1044
|
+
}
|
|
1045
|
+
return exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Id + accountId;
|
|
1046
|
+
}
|
|
1047
|
+
Account.GetCacheKey = GetCacheKey;
|
|
1048
|
+
/**
|
|
1049
|
+
* Returns cache identifier for a list of accounts by session ID.
|
|
1050
|
+
* Example: {
|
|
1051
|
+
* const api: BruceApi.Api = ...;
|
|
1052
|
+
* const key = GetListCacheKey(api.GetSessionId());
|
|
1053
|
+
* api.Cache.Remove(key);
|
|
1054
|
+
* }
|
|
1055
|
+
* @param ssid
|
|
1056
|
+
* @returns
|
|
1057
|
+
*/
|
|
1058
|
+
function GetListCacheKey(ssid) {
|
|
1059
|
+
return exports.Api.ECacheKey.Account + exports.Api.ECacheKey.Session + exports.Api.ECacheKey.Id + ssid;
|
|
1060
|
+
}
|
|
1061
|
+
Account.GetListCacheKey = GetListCacheKey;
|
|
1062
|
+
/**
|
|
1063
|
+
* Returns cache identifier for a list of database regions.
|
|
1064
|
+
* Example: {
|
|
1065
|
+
* const api: BruceApi.Api = ...;
|
|
1066
|
+
* const key = GetDbRegionListCacheKey();
|
|
1067
|
+
* api.Cache.Remove(key);
|
|
1068
|
+
* }
|
|
1069
|
+
* @returns
|
|
1070
|
+
*/
|
|
1071
|
+
function GetDbRegionListCacheKey() {
|
|
1072
|
+
return exports.Api.ECacheKey.DatabaseRegion;
|
|
1073
|
+
}
|
|
1074
|
+
Account.GetDbRegionListCacheKey = GetDbRegionListCacheKey;
|
|
1075
1075
|
})(exports.Account || (exports.Account = {}));
|
|
1076
1076
|
|
|
1077
1077
|
(function (HostingLocation) {
|
|
@@ -1918,34 +1918,6 @@
|
|
|
1918
1918
|
})(exports.ENVIRONMENT || (exports.ENVIRONMENT = {}));
|
|
1919
1919
|
|
|
1920
1920
|
(function (AnnDocument) {
|
|
1921
|
-
/**
|
|
1922
|
-
* Returns cache identifier for an annotated document by ID.
|
|
1923
|
-
* Example: {
|
|
1924
|
-
* const api: BruceApi.Api = ...;
|
|
1925
|
-
* const key = GetCacheKey(1);
|
|
1926
|
-
* api.Cache.Remove(key);
|
|
1927
|
-
* }
|
|
1928
|
-
* @param id
|
|
1929
|
-
* @returns
|
|
1930
|
-
*/
|
|
1931
|
-
function GetCacheKey(id) {
|
|
1932
|
-
return `${exports.Api.ECacheKey.AnnDocument}${exports.Api.ECacheKey.Id}${id}`;
|
|
1933
|
-
}
|
|
1934
|
-
AnnDocument.GetCacheKey = GetCacheKey;
|
|
1935
|
-
/**
|
|
1936
|
-
* Returns cache identifier for a list of annotated documents by type.
|
|
1937
|
-
* Example: {
|
|
1938
|
-
* const api: BruceApi.Api = ...;
|
|
1939
|
-
* const key = GetListCacheKey("SVG");
|
|
1940
|
-
* api.Cache.Remove(key);
|
|
1941
|
-
* }
|
|
1942
|
-
* @param type
|
|
1943
|
-
* @returns
|
|
1944
|
-
*/
|
|
1945
|
-
function GetListCacheKey(type) {
|
|
1946
|
-
return exports.Api.ECacheKey.AnnDocument + type;
|
|
1947
|
-
}
|
|
1948
|
-
AnnDocument.GetListCacheKey = GetListCacheKey;
|
|
1949
1921
|
/**
|
|
1950
1922
|
* The types of supported annotated documents.
|
|
1951
1923
|
*/
|
|
@@ -2031,11 +2003,8 @@
|
|
|
2031
2003
|
});
|
|
2032
2004
|
}
|
|
2033
2005
|
AnnDocument.GetList = GetList;
|
|
2034
|
-
})(exports.AnnDocument || (exports.AnnDocument = {}));
|
|
2035
|
-
|
|
2036
|
-
(function (CustomForm) {
|
|
2037
2006
|
/**
|
|
2038
|
-
* Returns cache identifier for
|
|
2007
|
+
* Returns cache identifier for an annotated document by ID.
|
|
2039
2008
|
* Example: {
|
|
2040
2009
|
* const api: BruceApi.Api = ...;
|
|
2041
2010
|
* const key = GetCacheKey(1);
|
|
@@ -2045,26 +2014,26 @@
|
|
|
2045
2014
|
* @returns
|
|
2046
2015
|
*/
|
|
2047
2016
|
function GetCacheKey(id) {
|
|
2048
|
-
return exports.Api.ECacheKey.
|
|
2017
|
+
return `${exports.Api.ECacheKey.AnnDocument}${exports.Api.ECacheKey.Id}${id}`;
|
|
2049
2018
|
}
|
|
2050
|
-
|
|
2019
|
+
AnnDocument.GetCacheKey = GetCacheKey;
|
|
2051
2020
|
/**
|
|
2052
|
-
* Returns cache identifier for a list of
|
|
2021
|
+
* Returns cache identifier for a list of annotated documents by type.
|
|
2053
2022
|
* Example: {
|
|
2054
|
-
*
|
|
2055
|
-
*
|
|
2056
|
-
*
|
|
2023
|
+
* const api: BruceApi.Api = ...;
|
|
2024
|
+
* const key = GetListCacheKey("SVG");
|
|
2025
|
+
* api.Cache.Remove(key);
|
|
2057
2026
|
* }
|
|
2058
|
-
* @param
|
|
2027
|
+
* @param type
|
|
2059
2028
|
* @returns
|
|
2060
2029
|
*/
|
|
2061
|
-
function GetListCacheKey(
|
|
2062
|
-
|
|
2063
|
-
return exports.Api.ECacheKey.CustomForm + exports.Api.ECacheKey.EntityType + exports.Api.ECacheKey.Id + typeId;
|
|
2064
|
-
}
|
|
2065
|
-
return exports.Api.ECacheKey.CustomForm;
|
|
2030
|
+
function GetListCacheKey(type) {
|
|
2031
|
+
return exports.Api.ECacheKey.AnnDocument + type;
|
|
2066
2032
|
}
|
|
2067
|
-
|
|
2033
|
+
AnnDocument.GetListCacheKey = GetListCacheKey;
|
|
2034
|
+
})(exports.AnnDocument || (exports.AnnDocument = {}));
|
|
2035
|
+
|
|
2036
|
+
(function (CustomForm) {
|
|
2068
2037
|
/**
|
|
2069
2038
|
* Types of custom forms available.
|
|
2070
2039
|
*/
|
|
@@ -2185,6 +2154,37 @@
|
|
|
2185
2154
|
});
|
|
2186
2155
|
}
|
|
2187
2156
|
CustomForm.Update = Update;
|
|
2157
|
+
/**
|
|
2158
|
+
* Returns cache identifier for a Custom Form by ID.
|
|
2159
|
+
* Example: {
|
|
2160
|
+
* const api: BruceApi.Api = ...;
|
|
2161
|
+
* const key = GetCacheKey(1);
|
|
2162
|
+
* api.Cache.Remove(key);
|
|
2163
|
+
* }
|
|
2164
|
+
* @param id
|
|
2165
|
+
* @returns
|
|
2166
|
+
*/
|
|
2167
|
+
function GetCacheKey(id) {
|
|
2168
|
+
return exports.Api.ECacheKey.CustomForm + exports.Api.ECacheKey.Id + id;
|
|
2169
|
+
}
|
|
2170
|
+
CustomForm.GetCacheKey = GetCacheKey;
|
|
2171
|
+
/**
|
|
2172
|
+
* Returns cache identifier for a list of Custom Forms by Entity Type ID.
|
|
2173
|
+
* Example: {
|
|
2174
|
+
* const api: BruceApi.Api = ...;
|
|
2175
|
+
* const key = GetListCacheKey("123");
|
|
2176
|
+
* api.Cache.Remove(key);
|
|
2177
|
+
* }
|
|
2178
|
+
* @param typeId
|
|
2179
|
+
* @returns
|
|
2180
|
+
*/
|
|
2181
|
+
function GetListCacheKey(typeId) {
|
|
2182
|
+
if (typeId) {
|
|
2183
|
+
return exports.Api.ECacheKey.CustomForm + exports.Api.ECacheKey.EntityType + exports.Api.ECacheKey.Id + typeId;
|
|
2184
|
+
}
|
|
2185
|
+
return exports.Api.ECacheKey.CustomForm;
|
|
2186
|
+
}
|
|
2187
|
+
CustomForm.GetListCacheKey = GetListCacheKey;
|
|
2188
2188
|
})(exports.CustomForm || (exports.CustomForm = {}));
|
|
2189
2189
|
|
|
2190
2190
|
/**
|
|
@@ -4416,34 +4416,6 @@
|
|
|
4416
4416
|
}
|
|
4417
4417
|
|
|
4418
4418
|
(function (EntityAttachmentType) {
|
|
4419
|
-
/**
|
|
4420
|
-
* Returns cache identifier for an attachment type by ID.
|
|
4421
|
-
* Example: {
|
|
4422
|
-
* const api: BruceApi.Api = ...;
|
|
4423
|
-
* const key = GetCacheKey("123");
|
|
4424
|
-
* api.Cache.Remove(key);
|
|
4425
|
-
* }
|
|
4426
|
-
* @param id
|
|
4427
|
-
* @returns
|
|
4428
|
-
*/
|
|
4429
|
-
function GetCacheKey(id) {
|
|
4430
|
-
return exports.Api.ECacheKey.AttachmentType + exports.Api.ECacheKey.Id + id;
|
|
4431
|
-
}
|
|
4432
|
-
EntityAttachmentType.GetCacheKey = GetCacheKey;
|
|
4433
|
-
/**
|
|
4434
|
-
* Returns cache identifier for a list of attachment types.
|
|
4435
|
-
* Example: {
|
|
4436
|
-
* const api: BruceApi.Api = ...;
|
|
4437
|
-
* const key = GetListCacheKey();
|
|
4438
|
-
* api.Cache.Remove(key);
|
|
4439
|
-
* }
|
|
4440
|
-
* @param typeId
|
|
4441
|
-
* @returns
|
|
4442
|
-
*/
|
|
4443
|
-
function GetListCacheKey() {
|
|
4444
|
-
return exports.Api.ECacheKey.AttachmentType;
|
|
4445
|
-
}
|
|
4446
|
-
EntityAttachmentType.GetListCacheKey = GetListCacheKey;
|
|
4447
4419
|
// Known attachment types.
|
|
4448
4420
|
let EType;
|
|
4449
4421
|
(function (EType) {
|
|
@@ -4528,11 +4500,8 @@
|
|
|
4528
4500
|
});
|
|
4529
4501
|
}
|
|
4530
4502
|
EntityAttachmentType.GetList = GetList;
|
|
4531
|
-
})(exports.EntityAttachmentType || (exports.EntityAttachmentType = {}));
|
|
4532
|
-
|
|
4533
|
-
(function (EntityAttachment) {
|
|
4534
4503
|
/**
|
|
4535
|
-
* Returns cache identifier for an attachment by ID.
|
|
4504
|
+
* Returns cache identifier for an attachment type by ID.
|
|
4536
4505
|
* Example: {
|
|
4537
4506
|
* const api: BruceApi.Api = ...;
|
|
4538
4507
|
* const key = GetCacheKey("123");
|
|
@@ -4542,23 +4511,26 @@
|
|
|
4542
4511
|
* @returns
|
|
4543
4512
|
*/
|
|
4544
4513
|
function GetCacheKey(id) {
|
|
4545
|
-
return exports.Api.ECacheKey.
|
|
4514
|
+
return exports.Api.ECacheKey.AttachmentType + exports.Api.ECacheKey.Id + id;
|
|
4546
4515
|
}
|
|
4547
|
-
|
|
4516
|
+
EntityAttachmentType.GetCacheKey = GetCacheKey;
|
|
4548
4517
|
/**
|
|
4549
|
-
* Returns cache identifier for a list of
|
|
4518
|
+
* Returns cache identifier for a list of attachment types.
|
|
4550
4519
|
* Example: {
|
|
4551
4520
|
* const api: BruceApi.Api = ...;
|
|
4552
|
-
* const key = GetListCacheKey(
|
|
4521
|
+
* const key = GetListCacheKey();
|
|
4553
4522
|
* api.Cache.Remove(key);
|
|
4554
4523
|
* }
|
|
4555
4524
|
* @param typeId
|
|
4556
4525
|
* @returns
|
|
4557
4526
|
*/
|
|
4558
|
-
function GetListCacheKey(
|
|
4559
|
-
return exports.Api.ECacheKey.
|
|
4527
|
+
function GetListCacheKey() {
|
|
4528
|
+
return exports.Api.ECacheKey.AttachmentType;
|
|
4560
4529
|
}
|
|
4561
|
-
|
|
4530
|
+
EntityAttachmentType.GetListCacheKey = GetListCacheKey;
|
|
4531
|
+
})(exports.EntityAttachmentType || (exports.EntityAttachmentType = {}));
|
|
4532
|
+
|
|
4533
|
+
(function (EntityAttachment) {
|
|
4562
4534
|
/**
|
|
4563
4535
|
* Updates one or many attachment records.
|
|
4564
4536
|
* @param params
|
|
@@ -4699,6 +4671,34 @@
|
|
|
4699
4671
|
});
|
|
4700
4672
|
}
|
|
4701
4673
|
EntityAttachment.Upload = Upload;
|
|
4674
|
+
/**
|
|
4675
|
+
* Returns cache identifier for an attachment by ID.
|
|
4676
|
+
* Example: {
|
|
4677
|
+
* const api: BruceApi.Api = ...;
|
|
4678
|
+
* const key = GetCacheKey("123");
|
|
4679
|
+
* api.Cache.Remove(key);
|
|
4680
|
+
* }
|
|
4681
|
+
* @param id
|
|
4682
|
+
* @returns
|
|
4683
|
+
*/
|
|
4684
|
+
function GetCacheKey(id) {
|
|
4685
|
+
return exports.Api.ECacheKey.Attachment + exports.Api.ECacheKey.Id + id;
|
|
4686
|
+
}
|
|
4687
|
+
EntityAttachment.GetCacheKey = GetCacheKey;
|
|
4688
|
+
/**
|
|
4689
|
+
* Returns cache identifier for a list of attachments for an entity.
|
|
4690
|
+
* Example: {
|
|
4691
|
+
* const api: BruceApi.Api = ...;
|
|
4692
|
+
* const key = GetListCacheKey("abc");
|
|
4693
|
+
* api.Cache.Remove(key);
|
|
4694
|
+
* }
|
|
4695
|
+
* @param typeId
|
|
4696
|
+
* @returns
|
|
4697
|
+
*/
|
|
4698
|
+
function GetListCacheKey(entityId) {
|
|
4699
|
+
return exports.Api.ECacheKey.Attachment + exports.Api.ECacheKey.Entity + exports.Api.ECacheKey.Id + entityId;
|
|
4700
|
+
}
|
|
4701
|
+
EntityAttachment.GetListCacheKey = GetListCacheKey;
|
|
4702
4702
|
})(exports.EntityAttachment || (exports.EntityAttachment = {}));
|
|
4703
4703
|
|
|
4704
4704
|
(function (EntityComment) {
|
|
@@ -5935,9 +5935,24 @@
|
|
|
5935
5935
|
const reqs = [];
|
|
5936
5936
|
for (let i = 0; i < tagIds.length; i++) {
|
|
5937
5937
|
const tagId = tagIds[i];
|
|
5938
|
-
const cache =
|
|
5938
|
+
const cache = api.GetCacheItem(GetCacheKey(tagId), reqParams);
|
|
5939
5939
|
if (cache === null || cache === void 0 ? void 0 : cache.found) {
|
|
5940
|
-
|
|
5940
|
+
if (cache.data instanceof Promise) {
|
|
5941
|
+
// Request that is in progress.
|
|
5942
|
+
reqs.push(cache.data);
|
|
5943
|
+
}
|
|
5944
|
+
else if (cache.data) {
|
|
5945
|
+
// Direct tag record.
|
|
5946
|
+
if (cache.data.ID) {
|
|
5947
|
+
reqs.push({
|
|
5948
|
+
tag: cache.data
|
|
5949
|
+
});
|
|
5950
|
+
}
|
|
5951
|
+
// Resolved promise. So an object with a "tag" property that contains the record.
|
|
5952
|
+
else {
|
|
5953
|
+
reqs.push(cache.data);
|
|
5954
|
+
}
|
|
5955
|
+
}
|
|
5941
5956
|
}
|
|
5942
5957
|
else {
|
|
5943
5958
|
reqIds.push(tagId);
|
|
@@ -6474,20 +6489,6 @@
|
|
|
6474
6489
|
})(exports.Uploader || (exports.Uploader = {}));
|
|
6475
6490
|
|
|
6476
6491
|
(function (ClientFile) {
|
|
6477
|
-
/**
|
|
6478
|
-
* Returns cache identifier for a client file by ID.
|
|
6479
|
-
* Example: {
|
|
6480
|
-
* const api: BruceApi.Api = ...;
|
|
6481
|
-
* const key = GetCacheKey("123");
|
|
6482
|
-
* api.Cache.Remove(key);
|
|
6483
|
-
* }
|
|
6484
|
-
* @param fileId
|
|
6485
|
-
* @returns
|
|
6486
|
-
*/
|
|
6487
|
-
function GetCacheKey(fileId) {
|
|
6488
|
-
return `${exports.Api.ECacheKey.ClientFile}${exports.Api.ECacheKey.Id}${fileId}`;
|
|
6489
|
-
}
|
|
6490
|
-
ClientFile.GetCacheKey = GetCacheKey;
|
|
6491
6492
|
let EPurpose;
|
|
6492
6493
|
(function (EPurpose) {
|
|
6493
6494
|
// Use this purpose for uploading bookmark thumbnail images.
|
|
@@ -6809,6 +6810,20 @@
|
|
|
6809
6810
|
}
|
|
6810
6811
|
Processor.ConvertFormat = ConvertFormat;
|
|
6811
6812
|
})(Processor = ClientFile.Processor || (ClientFile.Processor = {}));
|
|
6813
|
+
/**
|
|
6814
|
+
* Returns cache identifier for a client file by ID.
|
|
6815
|
+
* Example: {
|
|
6816
|
+
* const api: BruceApi.Api = ...;
|
|
6817
|
+
* const key = GetCacheKey("123");
|
|
6818
|
+
* api.Cache.Remove(key);
|
|
6819
|
+
* }
|
|
6820
|
+
* @param fileId
|
|
6821
|
+
* @returns
|
|
6822
|
+
*/
|
|
6823
|
+
function GetCacheKey(fileId) {
|
|
6824
|
+
return `${exports.Api.ECacheKey.ClientFile}${exports.Api.ECacheKey.Id}${fileId}`;
|
|
6825
|
+
}
|
|
6826
|
+
ClientFile.GetCacheKey = GetCacheKey;
|
|
6812
6827
|
})(exports.ClientFile || (exports.ClientFile = {}));
|
|
6813
6828
|
|
|
6814
6829
|
(function (ProgramKey) {
|
|
@@ -10365,40 +10380,40 @@
|
|
|
10365
10380
|
window[paramsId] = pluginParams ? pluginParams : {};
|
|
10366
10381
|
const disposeId = exports.ObjectUtils.UId();
|
|
10367
10382
|
const elementId = exports.ObjectUtils.UId();
|
|
10368
|
-
let script = `
|
|
10369
|
-
function run() {
|
|
10370
|
-
${fileContent}
|
|
10371
|
-
|
|
10372
|
-
const paramsId = "${paramsId}";
|
|
10373
|
-
const containerId = "${containerId}";
|
|
10374
|
-
let container;
|
|
10375
|
-
if (containerId) {
|
|
10376
|
-
container = document.getElementById("${containerId}");
|
|
10377
|
-
}
|
|
10378
|
-
|
|
10379
|
-
let pluginHTML = null;
|
|
10380
|
-
if (container) {
|
|
10381
|
-
pluginHTML = document.createElement("div");
|
|
10382
|
-
pluginHTML.id = "${elementId}";
|
|
10383
|
-
container.appendChild(pluginHTML);
|
|
10384
|
-
}
|
|
10385
|
-
|
|
10386
|
-
{TEMPLATE_CODE}
|
|
10387
|
-
const params = window["${paramsId}"];
|
|
10388
|
-
|
|
10389
|
-
window["${disposeId}"] = Run({
|
|
10390
|
-
element: pluginHTML,
|
|
10391
|
-
container: container,
|
|
10392
|
-
pluginParams: params
|
|
10393
|
-
});
|
|
10394
|
-
}
|
|
10395
|
-
run();
|
|
10383
|
+
let script = `
|
|
10384
|
+
function run() {
|
|
10385
|
+
${fileContent}
|
|
10386
|
+
|
|
10387
|
+
const paramsId = "${paramsId}";
|
|
10388
|
+
const containerId = "${containerId}";
|
|
10389
|
+
let container;
|
|
10390
|
+
if (containerId) {
|
|
10391
|
+
container = document.getElementById("${containerId}");
|
|
10392
|
+
}
|
|
10393
|
+
|
|
10394
|
+
let pluginHTML = null;
|
|
10395
|
+
if (container) {
|
|
10396
|
+
pluginHTML = document.createElement("div");
|
|
10397
|
+
pluginHTML.id = "${elementId}";
|
|
10398
|
+
container.appendChild(pluginHTML);
|
|
10399
|
+
}
|
|
10400
|
+
|
|
10401
|
+
{TEMPLATE_CODE}
|
|
10402
|
+
const params = window["${paramsId}"];
|
|
10403
|
+
|
|
10404
|
+
window["${disposeId}"] = Run({
|
|
10405
|
+
element: pluginHTML,
|
|
10406
|
+
container: container,
|
|
10407
|
+
pluginParams: params
|
|
10408
|
+
});
|
|
10409
|
+
}
|
|
10410
|
+
run();
|
|
10396
10411
|
`;
|
|
10397
10412
|
if (script.includes("var template")) {
|
|
10398
|
-
script = script.replace("{TEMPLATE_CODE}", `
|
|
10399
|
-
if (pluginHTML && template) {
|
|
10400
|
-
pluginHTML.innerHTML = template;
|
|
10401
|
-
}
|
|
10413
|
+
script = script.replace("{TEMPLATE_CODE}", `
|
|
10414
|
+
if (pluginHTML && template) {
|
|
10415
|
+
pluginHTML.innerHTML = template;
|
|
10416
|
+
}
|
|
10402
10417
|
`);
|
|
10403
10418
|
}
|
|
10404
10419
|
else {
|
|
@@ -10426,33 +10441,6 @@
|
|
|
10426
10441
|
})(exports.Plugin || (exports.Plugin = {}));
|
|
10427
10442
|
|
|
10428
10443
|
(function (DataSource) {
|
|
10429
|
-
/**
|
|
10430
|
-
* Returns cache identifier for a data source by ID.
|
|
10431
|
-
* Example: {
|
|
10432
|
-
* const api: BruceApi.Api = ...;
|
|
10433
|
-
* const key = GetCacheKey(1);
|
|
10434
|
-
* api.Cache.Remove(key);
|
|
10435
|
-
* }
|
|
10436
|
-
* @param id
|
|
10437
|
-
* @returns
|
|
10438
|
-
*/
|
|
10439
|
-
function GetCacheKey(id) {
|
|
10440
|
-
return exports.Api.ECacheKey.DataSource + exports.Api.ECacheKey.Id + id;
|
|
10441
|
-
}
|
|
10442
|
-
DataSource.GetCacheKey = GetCacheKey;
|
|
10443
|
-
/**
|
|
10444
|
-
* Returns cache identifier for a list of data sources.
|
|
10445
|
-
* Example: {
|
|
10446
|
-
* const api: BruceApi.Api = ...;
|
|
10447
|
-
* const key = GetListCacheKey();
|
|
10448
|
-
* api.Cache.Remove(key);
|
|
10449
|
-
* }
|
|
10450
|
-
* @returns
|
|
10451
|
-
*/
|
|
10452
|
-
function GetListCacheKey() {
|
|
10453
|
-
return exports.Api.ECacheKey.DataSource;
|
|
10454
|
-
}
|
|
10455
|
-
DataSource.GetListCacheKey = GetListCacheKey;
|
|
10456
10444
|
// Known data source types.
|
|
10457
10445
|
let EType;
|
|
10458
10446
|
(function (EType) {
|
|
@@ -10569,9 +10557,37 @@
|
|
|
10569
10557
|
});
|
|
10570
10558
|
}
|
|
10571
10559
|
DataSource.GetList = GetList;
|
|
10560
|
+
/**
|
|
10561
|
+
* Returns cache identifier for a data source by ID.
|
|
10562
|
+
* Example: {
|
|
10563
|
+
* const api: BruceApi.Api = ...;
|
|
10564
|
+
* const key = GetCacheKey(1);
|
|
10565
|
+
* api.Cache.Remove(key);
|
|
10566
|
+
* }
|
|
10567
|
+
* @param id
|
|
10568
|
+
* @returns
|
|
10569
|
+
*/
|
|
10570
|
+
function GetCacheKey(id) {
|
|
10571
|
+
return exports.Api.ECacheKey.DataSource + exports.Api.ECacheKey.Id + id;
|
|
10572
|
+
}
|
|
10573
|
+
DataSource.GetCacheKey = GetCacheKey;
|
|
10574
|
+
/**
|
|
10575
|
+
* Returns cache identifier for a list of data sources.
|
|
10576
|
+
* Example: {
|
|
10577
|
+
* const api: BruceApi.Api = ...;
|
|
10578
|
+
* const key = GetListCacheKey();
|
|
10579
|
+
* api.Cache.Remove(key);
|
|
10580
|
+
* }
|
|
10581
|
+
* @returns
|
|
10582
|
+
*/
|
|
10583
|
+
function GetListCacheKey() {
|
|
10584
|
+
return exports.Api.ECacheKey.DataSource;
|
|
10585
|
+
}
|
|
10586
|
+
DataSource.GetListCacheKey = GetListCacheKey;
|
|
10572
10587
|
})(exports.DataSource || (exports.DataSource = {}));
|
|
10573
10588
|
|
|
10574
|
-
|
|
10589
|
+
// This is updated with the package.json version on build.
|
|
10590
|
+
const VERSION = "3.5.2";
|
|
10575
10591
|
|
|
10576
10592
|
exports.VERSION = VERSION;
|
|
10577
10593
|
exports.AbstractApi = AbstractApi;
|