@kosdev-code/kos-ui-sdk 3.0.21 → 3.0.23
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/core/core/kosCore.d.ts +1 -0
- package/core/core/kosCore.d.ts.map +1 -1
- package/core/core/kosModel.d.ts +11 -0
- package/core/core/kosModel.d.ts.map +1 -1
- package/core/core/kosModelManager.d.ts +8 -0
- package/core/core/kosModelManager.d.ts.map +1 -1
- package/core/core/lifecycle/constants.d.ts +1 -1
- package/core/core/lifecycle/constants.d.ts.map +1 -1
- package/core/core/model/kos-subscription-manager.d.ts +1 -0
- package/core/core/model/kos-subscription-manager.d.ts.map +1 -1
- package/core/core/registration/index.d.ts +1 -1
- package/core/core/registration/index.d.ts.map +1 -1
- package/core/core/registration/model-registration.d.ts +11 -0
- package/core/core/registration/model-registration.d.ts.map +1 -1
- package/core/index.d.ts +1 -1
- package/core/index.d.ts.map +1 -1
- package/core/util/kos-model-utils.d.ts +13 -0
- package/core/util/kos-model-utils.d.ts.map +1 -1
- package/{index-DUoSahlA.cjs → index-CRb8ucfF.cjs} +115 -48
- package/index-CRb8ucfF.cjs.map +1 -0
- package/{index-BUwbSjst.js → index-YzHb2lnB.js} +116 -49
- package/index-YzHb2lnB.js.map +1 -0
- package/index.cjs +113 -26
- package/index.cjs.map +1 -1
- package/index.js +114 -27
- package/index.js.map +1 -1
- package/models/decorators/kos-config-bean-prop.d.ts +5 -0
- package/models/decorators/kos-config-bean-prop.d.ts.map +1 -1
- package/models/decorators/kos-config-bean.d.ts +7 -1
- package/models/decorators/kos-config-bean.d.ts.map +1 -1
- package/models/models/config-bean/config-bean-model.d.ts +9 -0
- package/models/models/config-bean/config-bean-model.d.ts.map +1 -1
- package/models/models/config-bean/config-bean-types.d.ts +2 -0
- package/models/models/config-bean/config-bean-types.d.ts.map +1 -1
- package/models/models/config-bean-prop/config-bean-prop-model.d.ts +3 -0
- package/models/models/config-bean-prop/config-bean-prop-model.d.ts.map +1 -1
- package/models/models/config-bean-prop/types/index.d.ts +10 -0
- package/models/models/region-info/region-info-model.d.ts +12 -1
- package/models/models/region-info/region-info-model.d.ts.map +1 -1
- package/models/models/region-info/services/region-info-services.d.ts +2 -2
- package/models/models/region-info/services/region-info-services.d.ts.map +1 -1
- package/models/models/region-info/types/index.d.ts +7 -0
- package/models/models/region-info/types/index.d.ts.map +1 -1
- package/models/services/config-bean/index.d.ts +2 -2
- package/models/services/config-bean/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/testing/index.d.ts +51 -9
- package/testing/index.d.ts.map +1 -1
- package/testing.cjs +57 -3
- package/testing.cjs.map +1 -1
- package/testing.js +57 -3
- package/testing.js.map +1 -1
- package/index-BUwbSjst.js.map +0 -1
- package/index-DUoSahlA.cjs.map +0 -1
package/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as ChildModels, P as ParentModel, O as OptionsRequired, a as CompanionParentModel, b as ContainerAwareSetup, K as KosContextManager, F as FutureContainerSetup, M as MultipleFutureContainerSetup, L as LogConfig, c as LoggerSetup, d as KosLoggerFactory, e as KosModelSymbol, f as ModelEffects, R as ReferenceConfig, T as TroubleAwareSetup, D as DependencyModels, g as DependencyLifecycle, E as ExtensionManager, S as SubscriptionHandlers, h as KosViewModelSymbol, V as ViewModelConfig, i as StateMachineSetup, j as injectStateMachineSupport, k as KosModelVisitor, l as KosCore, s as sendKosMessageResponse, m as KosLog, u as uuid, p as publish, n as subscribe, I as INDEX_RECORD_SYMBOL, o as INDEX_COLLECTION_KEY, q as KosContainerIndexEvents, r as isIndexableItem, t as Kos, v as isKosModel, B as BASE_URL, w as ServiceFactory, x as KosModelRegistrationFactory, y as ObservableData, z as kosAction, A as kosTopicHandler, G as kosModel, H as resolveServiceUrl, J as getKosModelSync, N as isKosModelReady, Q as modelFactory, U as registerExtensionPoint, W as FutureService, X as FutureAliases, Y as whenReady, Z as kosAutoEffect, _ as isKosExecutionContext, $ as KOS_EXECUTION_CONTEXT, a0 as EXTENSION_FUTURE_LIFECYCLE_WRAPPER, a1 as kosObservable, a2 as sendKosHttpMessageResponse, a3 as SingletonKosModelRegistrationFactory, a4 as kosWhen, a5 as destroyKosModel, a6 as KOS_MODEL_ID, a7 as KosModelContainer, a8 as api$9, a9 as KosDataContainer, aa as get, ab as getQueryParams, ac as kosEffect, ad as FutureHandler, ae as resolveKosCompanion, af as createClient, ag as kosFetch, ah as EXTENSION_CANVAS_RENDERER, ai as post, aj as FetchError, ak as KosWsEvents, al as RegistrationManager, am as registerKosModel, an as registerLegacyModel, ao as kosServiceRequest$8, ap as WebSocketTransport, aq as kosComputed, ar as WebSocketEvents, as as modelHookCache, at as isUpdateable, au as KosModelState, av as KosModelEvents, aw as clearModelHookCacheEntry, ax as getKosModel$1 } from "./index-
|
|
2
|
-
import { ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, a_, a$, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI, bJ, bK, bL, bM, bN, bO, bP, bQ, bR, bS, bT, bU, bV, bW, bX, bY, bZ, b_, b$, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, cd, ce, cf, cg, ch, ci, cj, ck, cl, cm, cn, co, cp, cq, cr, cs, ct, cu, cv, cw, cx, cy, cz, cA, cB, cC, cD, cE, cF, cG, cH, cI } from "./index-
|
|
1
|
+
import { C as ChildModels, P as ParentModel, O as OptionsRequired, a as CompanionParentModel, b as ContainerAwareSetup, K as KosContextManager, F as FutureContainerSetup, M as MultipleFutureContainerSetup, L as LogConfig, c as LoggerSetup, d as KosLoggerFactory, e as KosModelSymbol, f as ModelEffects, R as ReferenceConfig, T as TroubleAwareSetup, D as DependencyModels, g as DependencyLifecycle, E as ExtensionManager, S as SubscriptionHandlers, h as KosViewModelSymbol, V as ViewModelConfig, i as StateMachineSetup, j as injectStateMachineSupport, k as KosModelVisitor, l as KosCore, s as sendKosMessageResponse, m as KosLog, u as uuid, p as publish, n as subscribe, I as INDEX_RECORD_SYMBOL, o as INDEX_COLLECTION_KEY, q as KosContainerIndexEvents, r as isIndexableItem, t as Kos, v as isKosModel, B as BASE_URL, w as ServiceFactory, x as KosModelRegistrationFactory, y as ObservableData, z as kosAction, A as kosTopicHandler, G as kosModel, H as resolveServiceUrl, J as getKosModelSync, N as isKosModelReady, Q as modelFactory, U as registerExtensionPoint, W as FutureService, X as FutureAliases, Y as whenReady, Z as kosAutoEffect, _ as isKosExecutionContext, $ as KOS_EXECUTION_CONTEXT, a0 as EXTENSION_FUTURE_LIFECYCLE_WRAPPER, a1 as kosObservable, a2 as sendKosHttpMessageResponse, a3 as SingletonKosModelRegistrationFactory, a4 as kosWhen, a5 as destroyKosModel, a6 as KOS_MODEL_ID, a7 as KosModelContainer, a8 as api$9, a9 as KosDataContainer, aa as get, ab as getQueryParams, ac as kosEffect, ad as FutureHandler, ae as resolveKosCompanion, af as createClient, ag as kosFetch, ah as EXTENSION_CANVAS_RENDERER, ai as post, aj as FetchError, ak as KosWsEvents, al as RegistrationManager, am as registerKosModel, an as registerLegacyModel, ao as kosServiceRequest$8, ap as WebSocketTransport, aq as kosComputed, ar as WebSocketEvents, as as modelHookCache, at as isUpdateable, au as KosModelState, av as KosModelEvents, aw as clearModelHookCacheEntry, ax as getKosModel$1 } from "./index-YzHb2lnB.js";
|
|
2
|
+
import { ay, az, aA, aB, aC, aD, aE, aF, aG, aH, aI, aJ, aK, aL, aM, aN, aO, aP, aQ, aR, aS, aT, aU, aV, aW, aX, aY, aZ, a_, a$, b0, b1, b2, b3, b4, b5, b6, b7, b8, b9, ba, bb, bc, bd, be, bf, bg, bh, bi, bj, bk, bl, bm, bn, bo, bp, bq, br, bs, bt, bu, bv, bw, bx, by, bz, bA, bB, bC, bD, bE, bF, bG, bH, bI, bJ, bK, bL, bM, bN, bO, bP, bQ, bR, bS, bT, bU, bV, bW, bX, bY, bZ, b_, b$, c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, ca, cb, cc, cd, ce, cf, cg, ch, ci, cj, ck, cl, cm, cn, co, cp, cq, cr, cs, ct, cu, cv, cw, cx, cy, cz, cA, cB, cC, cD, cE, cF, cG, cH, cI } from "./index-YzHb2lnB.js";
|
|
3
3
|
import { action, reaction, autorun, makeAutoObservable, runInAction, observable } from "mobx";
|
|
4
4
|
import { makeAutoObservable as makeAutoObservable2, makeObservable } from "mobx";
|
|
5
5
|
import log$s from "loglevel";
|
|
@@ -1319,18 +1319,20 @@ const { postModel: postModel$5, getOne: getOne$6 } = ServiceFactory.build({
|
|
|
1319
1319
|
destinationAddress: "",
|
|
1320
1320
|
basePath: `${URL$d}/kos/config/`
|
|
1321
1321
|
});
|
|
1322
|
-
const modifyConfigBean = async (id, model, path = `/api/kos/config
|
|
1322
|
+
const modifyConfigBean = async (id, model, path = `/api/kos/config`, destinationAddress = "") => {
|
|
1323
1323
|
log$r.debug(`sending modify request for ConfigBean: ${id}`);
|
|
1324
1324
|
const response = postModel$5({
|
|
1325
1325
|
model,
|
|
1326
|
-
urlOverride: `${URL$d}${path}/${id}
|
|
1326
|
+
urlOverride: `${URL$d}${path}/${id}`,
|
|
1327
|
+
destinationAddress
|
|
1327
1328
|
});
|
|
1328
1329
|
return response;
|
|
1329
1330
|
};
|
|
1330
|
-
const getConfigBean = async (id, path = `/api/kos/config
|
|
1331
|
+
const getConfigBean = async (id, path = `/api/kos/config`, destinationAddress = "") => {
|
|
1331
1332
|
log$r.debug(`sending get request for ConfigBean: ${id}`);
|
|
1332
1333
|
const response = await getOne$6({
|
|
1333
|
-
urlOverride: `${URL$d}${path}/details/${id}/15
|
|
1334
|
+
urlOverride: `${URL$d}${path}/details/${id}/15`,
|
|
1335
|
+
destinationAddress
|
|
1334
1336
|
});
|
|
1335
1337
|
return response;
|
|
1336
1338
|
};
|
|
@@ -1442,6 +1444,10 @@ function matchValue(patterns, value) {
|
|
|
1442
1444
|
const CONFIG_BEAN_MODEL_TYPE = "config-bean-model";
|
|
1443
1445
|
const log$q = KosLog.getLogger(CONFIG_BEAN_MODEL_TYPE);
|
|
1444
1446
|
const PATH_PROP$3 = createPropKey("path");
|
|
1447
|
+
const DESTINATION_PROP$2 = createPropKey("destinationAddress");
|
|
1448
|
+
function configBeanModelId(path, destinationAddress) {
|
|
1449
|
+
return destinationAddress ? `${CONFIG_BEAN_MODEL_TYPE}-${destinationAddress}-${path}` : `${CONFIG_BEAN_MODEL_TYPE}-${path}`;
|
|
1450
|
+
}
|
|
1445
1451
|
function servicePathMapper$1(configBeanModel) {
|
|
1446
1452
|
const hasMapper = ExtensionManager.propertyMapper.hasMapper(
|
|
1447
1453
|
KosCoreModelPropertyMapper.ConfigServicePath
|
|
@@ -1471,6 +1477,8 @@ let ConfigBeanModelImpl = class {
|
|
|
1471
1477
|
prevProps;
|
|
1472
1478
|
/** Optional custom base path for configuration service endpoints */
|
|
1473
1479
|
serviceBasePath;
|
|
1480
|
+
/** Connection the bean's requests and topic subscription are routed to */
|
|
1481
|
+
destinationAddress;
|
|
1474
1482
|
/**
|
|
1475
1483
|
* @category Constructor
|
|
1476
1484
|
*
|
|
@@ -1485,6 +1493,7 @@ let ConfigBeanModelImpl = class {
|
|
|
1485
1493
|
this.id = modelId;
|
|
1486
1494
|
this.path = options.path;
|
|
1487
1495
|
this.serviceBasePath = options.serviceBasePath || servicePathMapper$1(this);
|
|
1496
|
+
this.destinationAddress = options.destinationAddress;
|
|
1488
1497
|
const {
|
|
1489
1498
|
modifyConfigBean: modifyConfigBean$1 = modifyConfigBean,
|
|
1490
1499
|
getConfigBean: getConfigBean$1 = getConfigBean
|
|
@@ -1526,7 +1535,11 @@ let ConfigBeanModelImpl = class {
|
|
|
1526
1535
|
*/
|
|
1527
1536
|
async load() {
|
|
1528
1537
|
log$q.debug(`loading config bean ${this.path}`);
|
|
1529
|
-
const response = await this._getConfigBean(
|
|
1538
|
+
const response = await this._getConfigBean(
|
|
1539
|
+
this.path,
|
|
1540
|
+
this.serviceBasePath,
|
|
1541
|
+
this.destinationAddress
|
|
1542
|
+
);
|
|
1530
1543
|
if (response?.data) {
|
|
1531
1544
|
const data = response.data;
|
|
1532
1545
|
mapDtoToConfigBeanModel(data, this);
|
|
@@ -1604,7 +1617,12 @@ let ConfigBeanModelImpl = class {
|
|
|
1604
1617
|
*/
|
|
1605
1618
|
async updateConfigBean() {
|
|
1606
1619
|
const request = mapConfigBeanModelToDto(this);
|
|
1607
|
-
await this._modifyConfigBean(
|
|
1620
|
+
await this._modifyConfigBean(
|
|
1621
|
+
this.path,
|
|
1622
|
+
request,
|
|
1623
|
+
this.serviceBasePath,
|
|
1624
|
+
this.destinationAddress
|
|
1625
|
+
);
|
|
1608
1626
|
}
|
|
1609
1627
|
handleConfigBeanUpdated(configBean) {
|
|
1610
1628
|
mapUpdateDtoToConfigBeanModel(configBean, this);
|
|
@@ -1613,7 +1631,9 @@ let ConfigBeanModelImpl = class {
|
|
|
1613
1631
|
__decorateClass$A([
|
|
1614
1632
|
kosTopicHandler({
|
|
1615
1633
|
topic: `/kos/config/${PATH_PROP$3}`,
|
|
1616
|
-
websocket: true
|
|
1634
|
+
websocket: true,
|
|
1635
|
+
destinationAddress: DESTINATION_PROP$2,
|
|
1636
|
+
explicitDestination: true
|
|
1617
1637
|
})
|
|
1618
1638
|
], ConfigBeanModelImpl.prototype, "handleConfigBeanUpdated", 1);
|
|
1619
1639
|
ConfigBeanModelImpl = __decorateClass$A([
|
|
@@ -1623,14 +1643,15 @@ const ConfigBean = new KosModelRegistrationFactory({
|
|
|
1623
1643
|
class: ConfigBeanModelImpl,
|
|
1624
1644
|
type: CONFIG_BEAN_MODEL_TYPE
|
|
1625
1645
|
});
|
|
1626
|
-
const kosConfigBean = ({ path, lazy, serviceBasePath }) => (target, name) => {
|
|
1646
|
+
const kosConfigBean = ({ path, lazy, serviceBasePath, destinationAddress }) => (target, name) => {
|
|
1627
1647
|
target[DependencyModels] = target[DependencyModels] || {};
|
|
1628
1648
|
target[DependencyModels][name] = {
|
|
1629
1649
|
modelType: ConfigBean.type,
|
|
1630
|
-
id:
|
|
1650
|
+
id: configBeanModelId(path, destinationAddress),
|
|
1631
1651
|
options: {
|
|
1632
1652
|
path,
|
|
1633
|
-
serviceBasePath
|
|
1653
|
+
serviceBasePath,
|
|
1654
|
+
destinationAddress
|
|
1634
1655
|
},
|
|
1635
1656
|
lifecycle: DependencyLifecycle.INIT,
|
|
1636
1657
|
lazy
|
|
@@ -1640,20 +1661,22 @@ const { URL: URL$c } = resolveServiceUrl();
|
|
|
1640
1661
|
const { getOne: getOne$5, getAll: getAll$7 } = ServiceFactory.build({
|
|
1641
1662
|
basePath: `${URL$c}/api/kos/regions/info`
|
|
1642
1663
|
});
|
|
1643
|
-
const getRegionInfo = async (baseServicePath) => {
|
|
1664
|
+
const getRegionInfo = async (baseServicePath, destinationAddress = "") => {
|
|
1644
1665
|
try {
|
|
1645
1666
|
const response = await getOne$5({
|
|
1646
|
-
urlOverride: `${URL$c}${baseServicePath}/info
|
|
1667
|
+
urlOverride: `${URL$c}${baseServicePath}/info`,
|
|
1668
|
+
destinationAddress
|
|
1647
1669
|
});
|
|
1648
1670
|
return response;
|
|
1649
1671
|
} catch (error) {
|
|
1650
1672
|
return void 0;
|
|
1651
1673
|
}
|
|
1652
1674
|
};
|
|
1653
|
-
const getRegions = async (baseServicePath) => {
|
|
1675
|
+
const getRegions = async (baseServicePath, destinationAddress = "") => {
|
|
1654
1676
|
try {
|
|
1655
1677
|
const response = await getAll$7({
|
|
1656
|
-
urlOverride: `${URL$c}${baseServicePath}
|
|
1678
|
+
urlOverride: `${URL$c}${baseServicePath}`,
|
|
1679
|
+
destinationAddress
|
|
1657
1680
|
});
|
|
1658
1681
|
return response;
|
|
1659
1682
|
} catch (error) {
|
|
@@ -1808,12 +1831,28 @@ function servicePathMapper(regionInfoModel) {
|
|
|
1808
1831
|
}
|
|
1809
1832
|
return "/api/kos/regions";
|
|
1810
1833
|
}
|
|
1834
|
+
const REGION_SETTINGS_PATH$2 = "kos:service:region:settings";
|
|
1835
|
+
const REGION_PATH$2 = "kos:service:region";
|
|
1836
|
+
const DESTINATION_PROP$1 = createPropKey("destinationAddress");
|
|
1837
|
+
const REGION_SETTINGS_BEAN_ID_PROP = createPropKey(
|
|
1838
|
+
"regionSettingsBeanId"
|
|
1839
|
+
);
|
|
1840
|
+
const REGION_BEAN_ID_PROP = createPropKey("regionBeanId");
|
|
1841
|
+
function regionInfoModelId(destinationAddress) {
|
|
1842
|
+
return destinationAddress ? `${MODEL_TYPE$w}-${destinationAddress}` : MODEL_TYPE$w;
|
|
1843
|
+
}
|
|
1811
1844
|
let RegionInfoModelImpl = class {
|
|
1812
1845
|
id;
|
|
1813
1846
|
unitSystemMap;
|
|
1814
1847
|
measureMap;
|
|
1815
1848
|
defaultMeasureMap;
|
|
1816
1849
|
serviceBasePath;
|
|
1850
|
+
/** Connection the region services and beans are routed to */
|
|
1851
|
+
destinationAddress;
|
|
1852
|
+
// An unset destination must keep the legacy bean ids, and a dependency id
|
|
1853
|
+
// template cannot drop a segment, so the bean ids are computed per instance.
|
|
1854
|
+
regionSettingsBeanId;
|
|
1855
|
+
regionBeanId;
|
|
1817
1856
|
regionMap;
|
|
1818
1857
|
timeFormats;
|
|
1819
1858
|
dateFormats;
|
|
@@ -1822,8 +1861,14 @@ let RegionInfoModelImpl = class {
|
|
|
1822
1861
|
region;
|
|
1823
1862
|
regions = [];
|
|
1824
1863
|
timeZoneMap = {};
|
|
1825
|
-
constructor(modelId) {
|
|
1864
|
+
constructor(modelId, options) {
|
|
1826
1865
|
this.id = modelId;
|
|
1866
|
+
this.destinationAddress = options?.destinationAddress;
|
|
1867
|
+
this.regionSettingsBeanId = configBeanModelId(
|
|
1868
|
+
REGION_SETTINGS_PATH$2,
|
|
1869
|
+
this.destinationAddress
|
|
1870
|
+
);
|
|
1871
|
+
this.regionBeanId = configBeanModelId(REGION_PATH$2, this.destinationAddress);
|
|
1827
1872
|
this.serviceBasePath = servicePathMapper(this);
|
|
1828
1873
|
this.unitSystems = {};
|
|
1829
1874
|
this.unitSystemMap = {};
|
|
@@ -2124,7 +2169,10 @@ let RegionInfoModelImpl = class {
|
|
|
2124
2169
|
*/
|
|
2125
2170
|
async load() {
|
|
2126
2171
|
log$p.debug("loading region info");
|
|
2127
|
-
const regions = await getRegions(
|
|
2172
|
+
const regions = await getRegions(
|
|
2173
|
+
this.serviceBasePath,
|
|
2174
|
+
this.destinationAddress
|
|
2175
|
+
);
|
|
2128
2176
|
if (regions) {
|
|
2129
2177
|
this.regions = regions.data.map((region) => region.id);
|
|
2130
2178
|
this.timeZoneMap = regions.data.reduce((acc, region) => {
|
|
@@ -2134,7 +2182,10 @@ let RegionInfoModelImpl = class {
|
|
|
2134
2182
|
return { ...acc, [region.id]: region };
|
|
2135
2183
|
}, {});
|
|
2136
2184
|
}
|
|
2137
|
-
const regionInfo = await getRegionInfo(
|
|
2185
|
+
const regionInfo = await getRegionInfo(
|
|
2186
|
+
this.serviceBasePath,
|
|
2187
|
+
this.destinationAddress
|
|
2188
|
+
);
|
|
2138
2189
|
if (regionInfo) {
|
|
2139
2190
|
this.unitSystems = regionInfo.data.unitSystems.reduce((acc, curr) => {
|
|
2140
2191
|
const unitSystem = {
|
|
@@ -2178,10 +2229,21 @@ let RegionInfoModelImpl = class {
|
|
|
2178
2229
|
}
|
|
2179
2230
|
};
|
|
2180
2231
|
__decorateClass$z([
|
|
2181
|
-
|
|
2232
|
+
kosDependency({
|
|
2233
|
+
modelType: ConfigBean.type,
|
|
2234
|
+
id: REGION_SETTINGS_BEAN_ID_PROP,
|
|
2235
|
+
options: {
|
|
2236
|
+
path: REGION_SETTINGS_PATH$2,
|
|
2237
|
+
destinationAddress: DESTINATION_PROP$1
|
|
2238
|
+
}
|
|
2239
|
+
})
|
|
2182
2240
|
], RegionInfoModelImpl.prototype, "regionSource", 2);
|
|
2183
2241
|
__decorateClass$z([
|
|
2184
|
-
|
|
2242
|
+
kosDependency({
|
|
2243
|
+
modelType: ConfigBean.type,
|
|
2244
|
+
id: REGION_BEAN_ID_PROP,
|
|
2245
|
+
options: { path: REGION_PATH$2, destinationAddress: DESTINATION_PROP$1 }
|
|
2246
|
+
})
|
|
2185
2247
|
], RegionInfoModelImpl.prototype, "region", 2);
|
|
2186
2248
|
RegionInfoModelImpl = __decorateClass$z([
|
|
2187
2249
|
kosModel(MODEL_TYPE$w)
|
|
@@ -2190,7 +2252,7 @@ const Registration$1 = {
|
|
|
2190
2252
|
registration: {
|
|
2191
2253
|
[MODEL_TYPE$w]: {
|
|
2192
2254
|
class: RegionInfoModelImpl,
|
|
2193
|
-
singleton:
|
|
2255
|
+
singleton: false
|
|
2194
2256
|
}
|
|
2195
2257
|
},
|
|
2196
2258
|
type: MODEL_TYPE$w,
|
|
@@ -2446,6 +2508,9 @@ const MODEL_TYPE$v = "config-bean-prop-model";
|
|
|
2446
2508
|
const log$o = KosLog.createLogger({ name: "config-bean-prop-model" });
|
|
2447
2509
|
const PATH_PROP$2 = createPropKey("path");
|
|
2448
2510
|
const SERVICE_PATH_PROP = createPropKey("serviceBasePath");
|
|
2511
|
+
const DESTINATION_PROP = createPropKey("destinationAddress");
|
|
2512
|
+
const BEAN_ID_PROP = createPropKey("configBeanId");
|
|
2513
|
+
const REGION_INFO_ID_PROP = createPropKey("regionInfoId");
|
|
2449
2514
|
let KosConfigPropertyImpl = class {
|
|
2450
2515
|
id;
|
|
2451
2516
|
path;
|
|
@@ -2454,6 +2519,11 @@ let KosConfigPropertyImpl = class {
|
|
|
2454
2519
|
formatter;
|
|
2455
2520
|
optionsExpander;
|
|
2456
2521
|
serviceBasePath;
|
|
2522
|
+
destinationAddress;
|
|
2523
|
+
// An unset destination must keep the legacy bean id, and a dependency id
|
|
2524
|
+
// template cannot drop a segment, so the bean id is computed per instance.
|
|
2525
|
+
configBeanId;
|
|
2526
|
+
regionInfoId;
|
|
2457
2527
|
regionInfo;
|
|
2458
2528
|
bean;
|
|
2459
2529
|
constructor(modelId, options) {
|
|
@@ -2463,7 +2533,10 @@ let KosConfigPropertyImpl = class {
|
|
|
2463
2533
|
this.converter = options.converter;
|
|
2464
2534
|
this.formatter = options.formatter;
|
|
2465
2535
|
this.serviceBasePath = options.serviceBasePath;
|
|
2536
|
+
this.destinationAddress = options.destinationAddress;
|
|
2466
2537
|
this.optionsExpander = options.optionsExpander;
|
|
2538
|
+
this.configBeanId = configBeanModelId(this.path, this.destinationAddress);
|
|
2539
|
+
this.regionInfoId = regionInfoModelId(this.destinationAddress);
|
|
2467
2540
|
}
|
|
2468
2541
|
// -------------------LIFECYCLE----------------------------
|
|
2469
2542
|
/**
|
|
@@ -2896,10 +2969,22 @@ let KosConfigPropertyImpl = class {
|
|
|
2896
2969
|
}
|
|
2897
2970
|
};
|
|
2898
2971
|
__decorateClass$y([
|
|
2899
|
-
kosDependency({
|
|
2972
|
+
kosDependency({
|
|
2973
|
+
modelType: Registration$1.type,
|
|
2974
|
+
id: REGION_INFO_ID_PROP,
|
|
2975
|
+
options: { destinationAddress: DESTINATION_PROP }
|
|
2976
|
+
})
|
|
2900
2977
|
], KosConfigPropertyImpl.prototype, "regionInfo", 2);
|
|
2901
2978
|
__decorateClass$y([
|
|
2902
|
-
|
|
2979
|
+
kosDependency({
|
|
2980
|
+
modelType: ConfigBean.type,
|
|
2981
|
+
id: BEAN_ID_PROP,
|
|
2982
|
+
options: {
|
|
2983
|
+
path: PATH_PROP$2,
|
|
2984
|
+
serviceBasePath: SERVICE_PATH_PROP,
|
|
2985
|
+
destinationAddress: DESTINATION_PROP
|
|
2986
|
+
}
|
|
2987
|
+
})
|
|
2903
2988
|
], KosConfigPropertyImpl.prototype, "bean", 2);
|
|
2904
2989
|
KosConfigPropertyImpl = __decorateClass$y([
|
|
2905
2990
|
kosModel(MODEL_TYPE$v)
|
|
@@ -2924,7 +3009,8 @@ function kosConfigProperty(params2) {
|
|
|
2924
3009
|
formatter: formatter2,
|
|
2925
3010
|
lazy,
|
|
2926
3011
|
optionsExpander,
|
|
2927
|
-
serviceBasePath
|
|
3012
|
+
serviceBasePath,
|
|
3013
|
+
destinationAddress
|
|
2928
3014
|
} = params2;
|
|
2929
3015
|
const _converter = converter;
|
|
2930
3016
|
if (_converter) {
|
|
@@ -2939,11 +3025,12 @@ function kosConfigProperty(params2) {
|
|
|
2939
3025
|
target[DependencyModels] = target[DependencyModels] || {};
|
|
2940
3026
|
target[DependencyModels][name] = {
|
|
2941
3027
|
modelType: Registration.type,
|
|
2942
|
-
id: `${path}-${attribute}`,
|
|
3028
|
+
id: destinationAddress ? `${destinationAddress}-${path}-${attribute}` : `${path}-${attribute}`,
|
|
2943
3029
|
options: {
|
|
2944
3030
|
path,
|
|
2945
3031
|
attribute,
|
|
2946
3032
|
serviceBasePath,
|
|
3033
|
+
destinationAddress,
|
|
2947
3034
|
converter: _converter,
|
|
2948
3035
|
formatter: formatter2,
|
|
2949
3036
|
optionsExpander
|
|
@@ -12181,7 +12268,7 @@ const updateRegion = async (region) => {
|
|
|
12181
12268
|
regionInfo.updateProperty(region);
|
|
12182
12269
|
};
|
|
12183
12270
|
async function getKosServiceApi() {
|
|
12184
|
-
const { default: API } = await import("./index-
|
|
12271
|
+
const { default: API } = await import("./index-YzHb2lnB.js").then((n) => n.cJ);
|
|
12185
12272
|
return API;
|
|
12186
12273
|
}
|
|
12187
12274
|
function kosServiceRequest$7(params2) {
|