@dartcom/ui-kit 10.1.8 → 10.1.10
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/components/layers/leaflet/lib/hooks/useGetLeafletLayer.d.ts +2 -1
- package/dist/components/layers/leaflet/lib/hooks/useGetLeafletLayer.d.ts.map +1 -1
- package/dist/components/modal/modal.d.ts.map +1 -1
- package/dist/components/modal/modal.stories.d.ts.map +1 -1
- package/dist/components/modal/store.d.ts +1 -0
- package/dist/components/modal/store.d.ts.map +1 -1
- package/dist/index.cjs +15 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.esm.js +4 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/providers/auth/auth.d.ts.map +1 -1
- package/dist/providers/auth/store.d.ts +1 -0
- package/dist/providers/auth/store.d.ts.map +1 -1
- package/dist/providers/mobx/mobx.d.ts +4 -2
- package/dist/providers/mobx/mobx.d.ts.map +1 -1
- package/dist/providers/mobx/store.d.ts +4 -5
- package/dist/providers/mobx/store.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Nullable } from '../../../../../types';
|
|
2
|
-
import { SourceLayerEventHandlers, TangramCustomLayer, TangramEventConfig, TangramLeafletLayer, TangramSourceConfig } from '../types';
|
|
2
|
+
import { SourceLayerEventHandlers, TangramCustomLayer, TangramEventConfig, TangramLeafletLayer, TangramSourceConfig, TangramSourceNames } from '../types';
|
|
3
3
|
export declare const useGetLeafletLayer: ({ eventHandlers, }: {
|
|
4
4
|
eventHandlers?: SourceLayerEventHandlers;
|
|
5
5
|
}) => {
|
|
@@ -13,6 +13,7 @@ export declare const useGetLeafletLayer: ({ eventHandlers, }: {
|
|
|
13
13
|
url: string;
|
|
14
14
|
} | undefined;
|
|
15
15
|
updateSource: (sourceName: TangramSourceConfig["name"], newUrl: TangramSourceConfig["url"]) => string[] | undefined;
|
|
16
|
+
reloadSource: (sourceName: TangramSourceNames) => string[] | undefined;
|
|
16
17
|
addLayer: (layer: TangramCustomLayer) => string[] | undefined;
|
|
17
18
|
removeLayer: (layer: TangramCustomLayer) => string[] | undefined;
|
|
18
19
|
addStyle: ({ name, style }: {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useGetLeafletLayer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layers/leaflet/lib/hooks/useGetLeafletLayer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKnC,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"useGetLeafletLayer.d.ts","sourceRoot":"","sources":["../../../../../../src/components/layers/leaflet/lib/hooks/useGetLeafletLayer.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAKnC,OAAO,EACL,wBAAwB,EACxB,kBAAkB,EAClB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,kBAAkB,EACnB,MAAM,UAAU,CAAC;AAGlB,eAAO,MAAM,kBAAkB,GAAI,oBAEhC;IACD,aAAa,CAAC,EAAE,wBAAwB,CAAC;CAC1C;;;;8BAmEkB,mBAAmB;4BA4BrB,mBAAmB,CAAC,MAAM,CAAC;;;;;+BAe1B,mBAAmB,CAAC,MAAM,CAAC,UAC/B,mBAAmB,CAAC,KAAK,CAAC;+BA+BvB,kBAAkB;sBASvB,kBAAkB;yBAyDlB,kBAAkB;gCA+BR;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE;gCAyBzC,kBAAkB;gDAkBL;QAAE,KAAK,EAAE,kBAAkB,CAAC;QAAC,OAAO,EAAE,OAAO,CAAA;KAAE;;;;CA0IvE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/components/modal/modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"modal.d.ts","sourceRoot":"","sources":["../../../src/components/modal/modal.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAS/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;;AAiD3C,wBAAqC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modal.stories.d.ts","sourceRoot":"","sources":["../../../src/components/modal/modal.stories.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,
|
|
1
|
+
{"version":3,"file":"modal.stories.d.ts","sourceRoot":"","sources":["../../../src/components/modal/modal.stories.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,EAAc,MAAM,GAAG,CAAC;AAEtC,OAAO,KAAK,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAG5D,KAAK,QAAQ,GAAG,OAAO,KAAK,CAAC;AAE7B,QAAA,MAAM,IAAI,EAAE,IAAI,CAAC,QAAQ,CAiBxB,CAAC;AAEF,KAAK,KAAK,GAAG,QAAQ,CAAC,QAAQ,CAAC,CAAC;AAuEhC,eAAO,MAAM,IAAI,EAAE,KAMlB,CAAC;AAEF,eAAe,IAAI,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/components/modal/store.ts"],"names":[],"mappings":"AAEA,qBAAa,UAAU;;IAKrB,OAAO,CAAC,QAAQ,CAAqC;IAC9C,YAAY,CAAC,IAAI,EAAE,MAAM;IAKhC,OAAO,CAAC,WAAW;IAGZ,SAAS,CAAC,IAAI,EAAE,MAAM;IAGtB,UAAU,CAAC,IAAI,EAAE,MAAM;IAGvB,cAAc;CAGtB"}
|
|
1
|
+
{"version":3,"file":"store.d.ts","sourceRoot":"","sources":["../../../src/components/modal/store.ts"],"names":[],"mappings":"AAEA,qBAAa,UAAU;;IAKrB,OAAO,CAAC,QAAQ,CAAqC;IAC9C,YAAY,CAAC,IAAI,EAAE,MAAM;IAKhC,OAAO,CAAC,WAAW;IAGZ,SAAS,CAAC,IAAI,EAAE,MAAM;IAGtB,UAAU,CAAC,IAAI,EAAE,MAAM;IAGvB,cAAc;CAGtB;AAED,eAAO,MAAM,UAAU,YAAmB,CAAC"}
|
package/dist/index.cjs
CHANGED
|
@@ -12850,6 +12850,7 @@ class ModalStore {
|
|
|
12850
12850
|
this._visible.clear();
|
|
12851
12851
|
}
|
|
12852
12852
|
}
|
|
12853
|
+
const modalStore = new ModalStore();
|
|
12853
12854
|
|
|
12854
12855
|
class AuthStore {
|
|
12855
12856
|
constructor() {
|
|
@@ -12863,21 +12864,17 @@ class AuthStore {
|
|
|
12863
12864
|
this._isUnauthorized = value;
|
|
12864
12865
|
}
|
|
12865
12866
|
}
|
|
12867
|
+
const authStore = new AuthStore();
|
|
12866
12868
|
|
|
12867
12869
|
class RootStore {
|
|
12868
|
-
authStore =
|
|
12869
|
-
modalStore =
|
|
12870
|
+
authStore = authStore;
|
|
12871
|
+
modalStore = modalStore;
|
|
12870
12872
|
}
|
|
12871
12873
|
const rootStore = new RootStore();
|
|
12872
12874
|
|
|
12873
12875
|
const StoreContext = React__namespace.createContext(rootStore);
|
|
12874
|
-
const DartcomMobxProvider = ({ children, }) =>
|
|
12875
|
-
|
|
12876
|
-
const rootStore = React__namespace.useContext(StoreContext);
|
|
12877
|
-
if (rootStore === null) {
|
|
12878
|
-
throw new Error('You have forgotten to wrap your root component with RootStoreProvider');
|
|
12879
|
-
}
|
|
12880
|
-
return rootStore;
|
|
12876
|
+
const DartcomMobxProvider = ({ children, }) => {
|
|
12877
|
+
return (jsxRuntime.jsx(StoreContext.Provider, { value: rootStore, children: children }));
|
|
12881
12878
|
};
|
|
12882
12879
|
|
|
12883
12880
|
class ApiService {
|
|
@@ -19030,7 +19027,6 @@ observerBatching(reactDom.unstable_batchedUpdates);
|
|
|
19030
19027
|
(_a$1 = observerFinalizationRegistry["finalizeAllImmediately"]) !== null && _a$1 !== void 0 ? _a$1 : (function () { });
|
|
19031
19028
|
|
|
19032
19029
|
const AuthProvider = ({ onUnauthorized, children, }) => {
|
|
19033
|
-
const { authStore } = useRootStore();
|
|
19034
19030
|
React__namespace.useEffect(() => {
|
|
19035
19031
|
if (authStore.isUnauthorized) {
|
|
19036
19032
|
onUnauthorized();
|
|
@@ -30391,10 +30387,16 @@ const useGetLeafletLayer = ({ eventHandlers, }) => {
|
|
|
30391
30387
|
});
|
|
30392
30388
|
return;
|
|
30393
30389
|
}
|
|
30390
|
+
config.sources[sourceName].url = '';
|
|
30391
|
+
scene.updateConfig();
|
|
30394
30392
|
config.sources[sourceName].url = newUrl;
|
|
30395
30393
|
scene.updateConfig({ rebuild: true });
|
|
30396
30394
|
return getSources();
|
|
30397
30395
|
}, [config, scene]);
|
|
30396
|
+
const reloadSource = React__namespace.useCallback((sourceName) => {
|
|
30397
|
+
const url = sourceUrl[sourceName];
|
|
30398
|
+
return updateSource(sourceName, url);
|
|
30399
|
+
}, [updateSource]);
|
|
30398
30400
|
const addLayer = React__namespace.useCallback((layer) => {
|
|
30399
30401
|
if (!scene) {
|
|
30400
30402
|
loggerService.warn({
|
|
@@ -30581,6 +30583,7 @@ const useGetLeafletLayer = ({ eventHandlers, }) => {
|
|
|
30581
30583
|
addSource,
|
|
30582
30584
|
getSource,
|
|
30583
30585
|
updateSource,
|
|
30586
|
+
reloadSource,
|
|
30584
30587
|
addLayer,
|
|
30585
30588
|
removeLayer,
|
|
30586
30589
|
addStyle,
|
|
@@ -30736,7 +30739,6 @@ const modalStyle = {
|
|
|
30736
30739
|
|
|
30737
30740
|
const CustomModal = ({ name, children, onClose, onOpen, }) => {
|
|
30738
30741
|
const modalId = React__namespace.useId();
|
|
30739
|
-
const { modalStore } = useRootStore();
|
|
30740
30742
|
const open = modalStore.getIsVisible(name);
|
|
30741
30743
|
React__namespace.useEffect(() => {
|
|
30742
30744
|
if (open) {
|
|
@@ -33343,7 +33345,6 @@ exports.Modal = modal;
|
|
|
33343
33345
|
exports.ModalStore = ModalStore;
|
|
33344
33346
|
exports.NoData = NoData;
|
|
33345
33347
|
exports.QueryProvider = QueryProvider;
|
|
33346
|
-
exports.RootStore = RootStore;
|
|
33347
33348
|
exports.Select = FormSelect;
|
|
33348
33349
|
exports.StoreContext = StoreContext;
|
|
33349
33350
|
exports.TrafficSignCreateForm = create;
|
|
@@ -33357,6 +33358,7 @@ exports.UploadButton = UploadButton;
|
|
|
33357
33358
|
exports._backendUrl = _backendUrl;
|
|
33358
33359
|
exports._testApiKeys = _testApiKeys;
|
|
33359
33360
|
exports.allTrafficSigns = allTrafficSigns;
|
|
33361
|
+
exports.authStore = authStore;
|
|
33360
33362
|
exports.catIds = catIds;
|
|
33361
33363
|
exports.copyInformation = copyInformation;
|
|
33362
33364
|
exports.cratedTrafficSign = cratedTrafficSign;
|
|
@@ -33408,6 +33410,7 @@ exports.getWaterAreaLayers = getWaterAreaLayers;
|
|
|
33408
33410
|
exports.getWaterLinkLayers = getWaterLinkLayers;
|
|
33409
33411
|
exports.imagesPath = imagesPath;
|
|
33410
33412
|
exports.loggerService = loggerService;
|
|
33413
|
+
exports.modalStore = modalStore;
|
|
33411
33414
|
exports.modalStyle = modalStyle;
|
|
33412
33415
|
exports.parseTrafficSignCSVFile = parseTrafficSignCSVFile;
|
|
33413
33416
|
exports.queryClient = queryClient;
|
|
@@ -33434,7 +33437,6 @@ exports.useFormContext = useFormContext;
|
|
|
33434
33437
|
exports.useGetLeafletLayer = useGetLeafletLayer;
|
|
33435
33438
|
exports.useGetUser = useGetUser;
|
|
33436
33439
|
exports.useLogout = useLogout;
|
|
33437
|
-
exports.useRootStore = useRootStore;
|
|
33438
33440
|
exports.useShowErrorSnackbar = useShowErrorSnackbar;
|
|
33439
33441
|
exports.useShowSnackbar = useShowSnackbar;
|
|
33440
33442
|
exports.useSignIn = useSignIn;
|