iweather-react 0.1.16 → 0.1.18
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/content/GisConfigProvider.d.ts +7 -0
- package/dist/content/GisConfigProvider.d.ts.map +1 -0
- package/dist/content/GisConfigProvider.js +13 -0
- package/dist/content/GisConfigProvider.js.map +1 -0
- package/dist/content/GisLayerProvider.d.ts +2 -0
- package/dist/content/GisLayerProvider.d.ts.map +1 -0
- package/dist/content/GisLayerProvider.js +25 -0
- package/dist/content/GisLayerProvider.js.map +1 -0
- package/dist/content/GisStoreProvider.d.ts +7 -0
- package/dist/content/GisStoreProvider.d.ts.map +1 -0
- package/dist/content/GisStoreProvider.js +13 -0
- package/dist/content/GisStoreProvider.js.map +1 -0
- package/dist/content/MultiMapStatusStoreProvider.d.ts +15 -0
- package/dist/content/MultiMapStatusStoreProvider.d.ts.map +1 -0
- package/dist/content/MultiMapStatusStoreProvider.js +11 -0
- package/dist/content/MultiMapStatusStoreProvider.js.map +1 -0
- package/dist/hooks/useCityInfo.d.ts +2 -0
- package/dist/hooks/useCityInfo.d.ts.map +1 -0
- package/dist/hooks/useCityInfo.js +10 -0
- package/dist/hooks/useCityInfo.js.map +1 -0
- package/dist/hooks/useConfigStore.d.ts +3 -0
- package/dist/hooks/useConfigStore.d.ts.map +1 -0
- package/dist/hooks/useConfigStore.js +10 -0
- package/dist/hooks/useConfigStore.js.map +1 -0
- package/dist/hooks/useEnabledLayers.d.ts +5 -0
- package/dist/hooks/useEnabledLayers.d.ts.map +1 -0
- package/dist/hooks/useEnabledLayers.js +13 -0
- package/dist/hooks/useEnabledLayers.js.map +1 -0
- package/dist/hooks/useGisStore.d.ts +3 -0
- package/dist/hooks/useGisStore.d.ts.map +1 -0
- package/dist/hooks/useGisStore.js +9 -0
- package/dist/hooks/useGisStore.js.map +1 -0
- package/dist/hooks/useMultiMapStatusStore.d.ts +3 -0
- package/dist/hooks/useMultiMapStatusStore.d.ts.map +1 -0
- package/dist/hooks/useMultiMapStatusStore.js +9 -0
- package/dist/hooks/useMultiMapStatusStore.js.map +1 -0
- package/dist/hooks/useProduct.d.ts +2 -0
- package/dist/hooks/useProduct.d.ts.map +1 -0
- package/dist/hooks/useProduct.js +10 -0
- package/dist/hooks/useProduct.js.map +1 -0
- package/dist/hooks/useStores.d.ts +5 -0
- package/dist/hooks/useStores.d.ts.map +1 -0
- package/dist/hooks/useStores.js +11 -0
- package/dist/hooks/useStores.js.map +1 -0
- package/dist/index.cjs +987 -2
- package/dist/index.cjs.map +295 -4
- package/dist/index.d.ts +15 -8
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +15 -13
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +987 -2
- package/dist/index.mjs.map +295 -4
- package/dist/map.css +36 -0
- package/dist/plugins/GisClickPlugin.d.ts +11 -0
- package/dist/plugins/GisClickPlugin.d.ts.map +1 -0
- package/dist/plugins/GisClickPlugin.js +29 -0
- package/dist/plugins/GisClickPlugin.js.map +1 -0
- package/dist/plugins/GisRefPlugin.d.ts +16 -0
- package/dist/plugins/GisRefPlugin.d.ts.map +1 -0
- package/dist/plugins/GisRefPlugin.js +14 -0
- package/dist/plugins/GisRefPlugin.js.map +1 -0
- package/dist/plugins/GisStateChangePlugin.d.ts +13 -0
- package/dist/plugins/GisStateChangePlugin.d.ts.map +1 -0
- package/dist/plugins/GisStateChangePlugin.js +55 -0
- package/dist/plugins/GisStateChangePlugin.js.map +1 -0
- package/dist/plugins/GisStateSyncPlugin.d.ts +11 -0
- package/dist/plugins/GisStateSyncPlugin.d.ts.map +1 -0
- package/dist/plugins/GisStateSyncPlugin.js +63 -0
- package/dist/plugins/GisStateSyncPlugin.js.map +1 -0
- package/dist/views/map.d.ts +2 -0
- package/dist/views/map.d.ts.map +1 -0
- package/dist/views/map.js +39 -0
- package/dist/views/map.js.map +1 -0
- package/package.json +6 -1
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IConfigStore, IReadOnlyConfigStoreValue } from 'iweather-gl';
|
|
3
|
+
export declare const ConfigContext: React.Context<IConfigStore | null>;
|
|
4
|
+
export declare function GisConfigProvider<LayerT = object, ProductTypeT = string, ModelTypeT = string, DataReqT = object>(props: React.PropsWithChildren<{
|
|
5
|
+
initConfigState: IReadOnlyConfigStoreValue<LayerT, ProductTypeT, ModelTypeT, DataReqT>;
|
|
6
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=GisConfigProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GisConfigProvider.d.ts","sourceRoot":"","sources":["../../src/content/GisConfigProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAqB,YAAY,EAAE,yBAAyB,EAAE,MAAM,aAAa,CAAC;AAEzF,eAAO,MAAM,aAAa,oCAAiD,CAAC;AAE5E,wBAAgB,iBAAiB,CAAC,MAAM,GAAG,MAAM,EAAE,YAAY,GAAG,MAAM,EAAE,UAAU,GAAG,MAAM,EAAE,QAAQ,GAAG,MAAM,EAC9G,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAC7B,eAAe,EAAE,yBAAyB,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC,CAAC;CACxF,CAAC,2CAWH"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
import { createConfigStore } from 'iweather-gl';
|
|
4
|
+
export const ConfigContext = React.createContext(null);
|
|
5
|
+
export function GisConfigProvider(props) {
|
|
6
|
+
const store = useMemo(() => {
|
|
7
|
+
const configStore = createConfigStore(props.initConfigState);
|
|
8
|
+
configStore.getState().initCtx();
|
|
9
|
+
return configStore;
|
|
10
|
+
}, []);
|
|
11
|
+
return _jsx(ConfigContext.Provider, { value: store, children: props.children });
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=GisConfigProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GisConfigProvider.js","sourceRoot":"","sources":["../../src/content/GisConfigProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,iBAAiB,EAA2C,MAAM,aAAa,CAAC;AAEzF,MAAM,CAAC,MAAM,aAAa,GAAG,KAAK,CAAC,aAAa,CAAsB,IAAI,CAAC,CAAC;AAE5E,MAAM,UAAU,iBAAiB,CAC/B,KAEE;IAEF,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,EAAE;QACzB,MAAM,WAAW,GAAG,iBAAiB,CAA6C,KAAK,CAAC,eAAe,CAAC,CAAC;QAEzG,WAAW,CAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,CAAC;QAEjC,OAAO,WAAW,CAAC;IACrB,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,KAAC,aAAa,CAAC,QAAQ,IAAC,KAAK,EAAE,KAAY,YAAG,KAAK,CAAC,QAAQ,GAA0B,CAAC;AAChG,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GisLayerProvider.d.ts","sourceRoot":"","sources":["../../src/content/GisLayerProvider.tsx"],"names":[],"mappings":"AAKA,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,KAAK,CAAC,iBAAiB,2CAuB9D"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useEffect } from 'react';
|
|
3
|
+
import { useStore } from 'zustand';
|
|
4
|
+
import { LayerMgrHub, TimeMgrHub } from 'iweather-gl';
|
|
5
|
+
import { useStores } from '../hooks/useStores';
|
|
6
|
+
export function GisLayerProvider(props) {
|
|
7
|
+
const stores = useStores();
|
|
8
|
+
const mapIsLoaded = useStore(stores.gisStore, state => state.mapIsLoaded);
|
|
9
|
+
useEffect(() => {
|
|
10
|
+
let layerMgrHub = undefined;
|
|
11
|
+
let timeMgrHub = undefined;
|
|
12
|
+
if (mapIsLoaded) {
|
|
13
|
+
layerMgrHub = new LayerMgrHub();
|
|
14
|
+
timeMgrHub = new TimeMgrHub(layerMgrHub);
|
|
15
|
+
layerMgrHub.mount(stores);
|
|
16
|
+
timeMgrHub.mount(stores);
|
|
17
|
+
}
|
|
18
|
+
return () => {
|
|
19
|
+
layerMgrHub?.onUnmount();
|
|
20
|
+
timeMgrHub?.onUnmount();
|
|
21
|
+
};
|
|
22
|
+
}, [mapIsLoaded]);
|
|
23
|
+
return _jsx(_Fragment, { children: props.children });
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=GisLayerProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GisLayerProvider.js","sourceRoot":"","sources":["../../src/content/GisLayerProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClC,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAE/C,MAAM,UAAU,gBAAgB,CAAC,KAA8B;IAC7D,MAAM,MAAM,GAAG,SAAS,EAAE,CAAC;IAE3B,MAAM,WAAW,GAAG,QAAQ,CAAC,MAAM,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAE1E,SAAS,CAAC,GAAG,EAAE;QACb,IAAI,WAAW,GAA4B,SAAS,CAAC;QACrD,IAAI,UAAU,GAA2B,SAAS,CAAC;QAEnD,IAAI,WAAW,EAAE,CAAC;YAChB,WAAW,GAAG,IAAI,WAAW,EAAE,CAAC;YAChC,UAAU,GAAG,IAAI,UAAU,CAAC,WAAW,CAAC,CAAC;YACzC,WAAW,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;YAC1B,UAAU,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;QAC3B,CAAC;QAED,OAAO,GAAG,EAAE;YACV,WAAW,EAAE,SAAS,EAAE,CAAC;YACzB,UAAU,EAAE,SAAS,EAAE,CAAC;QAC1B,CAAC,CAAC;IACJ,CAAC,EAAE,CAAC,WAAW,CAAC,CAAC,CAAC;IAElB,OAAO,4BAAG,KAAK,CAAC,QAAQ,GAAI,CAAC;AAC/B,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { IGisValue, IGisStore } from 'iweather-gl';
|
|
3
|
+
export declare const GisStoreContent: React.Context<IGisStore | null>;
|
|
4
|
+
export declare function GisStoreProvider<LayerT = object, ProductTypeT = string>(props: React.PropsWithChildren<{
|
|
5
|
+
initGisState?: Partial<IGisValue<LayerT, ProductTypeT>>;
|
|
6
|
+
}>): import("react/jsx-runtime").JSX.Element;
|
|
7
|
+
//# sourceMappingURL=GisStoreProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GisStoreProvider.d.ts","sourceRoot":"","sources":["../../src/content/GisStoreProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AACvC,OAAO,EAAkB,SAAS,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAGnE,eAAO,MAAM,eAAe,iCAA8C,CAAC;AAE3E,wBAAgB,gBAAgB,CAAC,MAAM,GAAG,MAAM,EAAE,YAAY,GAAG,MAAM,EACrE,KAAK,EAAE,KAAK,CAAC,iBAAiB,CAAC;IAAE,YAAY,CAAC,EAAE,OAAO,CAAC,SAAS,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC,CAAA;CAAE,CAAC,2CAS5F"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
import { createGisStore } from 'iweather-gl';
|
|
4
|
+
import { useConfigStore } from '../hooks/useConfigStore';
|
|
5
|
+
export const GisStoreContent = React.createContext(null);
|
|
6
|
+
export function GisStoreProvider(props) {
|
|
7
|
+
const configStore = useConfigStore();
|
|
8
|
+
const gisStore = useMemo(() => {
|
|
9
|
+
return createGisStore(configStore, props.initGisState);
|
|
10
|
+
}, []);
|
|
11
|
+
return _jsx(GisStoreContent.Provider, { value: gisStore, children: props.children });
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=GisStoreProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"GisStoreProvider.js","sourceRoot":"","sources":["../../src/content/GisStoreProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,cAAc,EAAwB,MAAM,aAAa,CAAC;AACnE,OAAO,EAAE,cAAc,EAAE,MAAM,yBAAyB,CAAC;AAEzD,MAAM,CAAC,MAAM,eAAe,GAAG,KAAK,CAAC,aAAa,CAAmB,IAAI,CAAC,CAAC;AAE3E,MAAM,UAAU,gBAAgB,CAC9B,KAA2F;IAE3F,MAAM,WAAW,GAAG,cAAc,EAAwB,CAAC;IAE3D,MAAM,QAAQ,GAAG,OAAO,CAAC,GAAG,EAAE;QAC5B,OAAO,cAAc,CAAC,WAAW,EAAE,KAAK,CAAC,YAAY,CAAC,CAAC;IACzD,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,KAAC,eAAe,CAAC,QAAQ,IAAC,KAAK,EAAE,QAAe,YAAG,KAAK,CAAC,QAAQ,GAA4B,CAAC;AACvG,CAAC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
export declare const MultiMapStatusStoreContext: React.Context<(Omit<Omit<import("zustand").StoreApi<import("iweather-gl").IMultiMapStatusStoreState>, "subscribe"> & {
|
|
3
|
+
subscribe: {
|
|
4
|
+
(listener: (selectedState: import("iweather-gl").IMultiMapStatusStoreState, previousSelectedState: import("iweather-gl").IMultiMapStatusStoreState) => void): () => void;
|
|
5
|
+
<U>(selector: (state: import("iweather-gl").IMultiMapStatusStoreState) => U, listener: (selectedState: U, previousSelectedState: U) => void, options?: {
|
|
6
|
+
equalityFn?: ((a: U, b: U) => boolean) | undefined;
|
|
7
|
+
fireImmediately?: boolean;
|
|
8
|
+
} | undefined): () => void;
|
|
9
|
+
};
|
|
10
|
+
}, "setState"> & {
|
|
11
|
+
setState(nextStateOrUpdater: import("iweather-gl").IMultiMapStatusStoreState | Partial<import("iweather-gl").IMultiMapStatusStoreState> | ((state: import("immer").WritableDraft<import("iweather-gl").IMultiMapStatusStoreState>) => void), shouldReplace?: false): void;
|
|
12
|
+
setState(nextStateOrUpdater: import("iweather-gl").IMultiMapStatusStoreState | ((state: import("immer").WritableDraft<import("iweather-gl").IMultiMapStatusStoreState>) => void), shouldReplace: true): void;
|
|
13
|
+
}) | null>;
|
|
14
|
+
export declare function MultiMapStatusStoreProvider(props: React.PropsWithChildren): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=MultiMapStatusStoreProvider.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiMapStatusStoreProvider.d.ts","sourceRoot":"","sources":["../../src/content/MultiMapStatusStoreProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAkB,MAAM,OAAO,CAAC;AAGvC,eAAO,MAAM,0BAA0B;;;4JAWqI,CAAC;sBAA0B,CAAC;2BAAoE,CAAC;;;;;;UAX7K,CAAC;AAEjG,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,KAAK,CAAC,iBAAiB,2CAQzE"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import React, { useMemo } from 'react';
|
|
3
|
+
import { createMultiMapStatusStore } from 'iweather-gl';
|
|
4
|
+
export const MultiMapStatusStoreContext = React.createContext(null);
|
|
5
|
+
export function MultiMapStatusStoreProvider(props) {
|
|
6
|
+
const statusStore = useMemo(() => {
|
|
7
|
+
return createMultiMapStatusStore();
|
|
8
|
+
}, []);
|
|
9
|
+
return (_jsx(MultiMapStatusStoreContext.Provider, { value: statusStore, children: props.children }));
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=MultiMapStatusStoreProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiMapStatusStoreProvider.js","sourceRoot":"","sources":["../../src/content/MultiMapStatusStoreProvider.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,EAAE,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AACvC,OAAO,EAAE,yBAAyB,EAAwB,MAAM,aAAa,CAAC;AAE9E,MAAM,CAAC,MAAM,0BAA0B,GAAG,KAAK,CAAC,aAAa,CAA8B,IAAI,CAAC,CAAC;AAEjG,MAAM,UAAU,2BAA2B,CAAC,KAA8B;IACxE,MAAM,WAAW,GAAG,OAAO,CAAC,GAAG,EAAE;QAC/B,OAAO,yBAAyB,EAAE,CAAC;IACrC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,OAAO,CACL,KAAC,0BAA0B,CAAC,QAAQ,IAAC,KAAK,EAAE,WAAW,YAAG,KAAK,CAAC,QAAQ,GAAuC,CAChH,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCityInfo.d.ts","sourceRoot":"","sources":["../../src/hooks/useCityInfo.ts"],"names":[],"mappings":"AAIA,wBAAgB,WAAW,gDAQ1B"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useStore } from 'zustand';
|
|
2
|
+
import { useGisStore } from './useGisStore';
|
|
3
|
+
import { useConfigStore } from './useConfigStore';
|
|
4
|
+
export function useCityInfo() {
|
|
5
|
+
const gisStore = useGisStore();
|
|
6
|
+
const configStore = useConfigStore();
|
|
7
|
+
const adcode = useStore(gisStore, state => state.adcode);
|
|
8
|
+
return adcode ? configStore.getState().cityConfig?.findCityInfo(adcode) : undefined;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=useCityInfo.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCityInfo.js","sourceRoot":"","sources":["../../src/hooks/useCityInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,UAAU,WAAW;IACzB,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IAErC,MAAM,MAAM,GAAG,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAEzD,OAAO,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,QAAQ,EAAE,CAAC,UAAU,EAAE,YAAY,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;AACtF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConfigStore.d.ts","sourceRoot":"","sources":["../../src/hooks/useConfigStore.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3C,wBAAgB,cAAc,CAAC,MAAM,GAAG,MAAM,EAAE,YAAY,GAAG,MAAM,EAAE,UAAU,GAAG,MAAM,EAAE,QAAQ,GAAG,MAAM,KAO1E,YAAY,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC,CAC1F"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { ConfigContext } from '../content/GisConfigProvider';
|
|
3
|
+
export function useConfigStore() {
|
|
4
|
+
const configStore = useContext(ConfigContext);
|
|
5
|
+
if (!configStore) {
|
|
6
|
+
throw new Error('GisConfigStore not found');
|
|
7
|
+
}
|
|
8
|
+
return configStore;
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=useConfigStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConfigStore.js","sourceRoot":"","sources":["../../src/hooks/useConfigStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAG7D,MAAM,UAAU,cAAc;IAC5B,MAAM,WAAW,GAAG,UAAU,CAAC,aAAa,CAAC,CAAC;IAE9C,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,0BAA0B,CAAC,CAAC;IAC9C,CAAC;IAED,OAAO,WAAkF,CAAC;AAC5F,CAAC"}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export declare function useEnabledLayers(): {
|
|
2
|
+
enabledLayerOptopns: Record<string, import("iweather-gl").IBaseLayerOptions>;
|
|
3
|
+
enabledLayerMgrs: Record<string, import("iweather-gl").ILayerMgr<any, import("iweather-gl").IBaseLayerOptions>>;
|
|
4
|
+
};
|
|
5
|
+
//# sourceMappingURL=useEnabledLayers.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEnabledLayers.d.ts","sourceRoot":"","sources":["../../src/hooks/useEnabledLayers.ts"],"names":[],"mappings":"AAIA,wBAAgB,gBAAgB;;;EAiB/B"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { useStore } from 'zustand';
|
|
2
|
+
import { useShallow } from 'zustand/shallow';
|
|
3
|
+
import { useGisStore } from './useGisStore';
|
|
4
|
+
export function useEnabledLayers() {
|
|
5
|
+
const gisStore = useGisStore();
|
|
6
|
+
const enabledLayerOptopns = useStore(gisStore, useShallow(state => state.query.enabledLayerOptopns()));
|
|
7
|
+
const enabledLayerMgrs = useStore(gisStore, useShallow(state => state.query.enabledLayerMgrs()));
|
|
8
|
+
return {
|
|
9
|
+
enabledLayerOptopns,
|
|
10
|
+
enabledLayerMgrs,
|
|
11
|
+
};
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=useEnabledLayers.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEnabledLayers.js","sourceRoot":"","sources":["../../src/hooks/useEnabledLayers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAC7C,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,UAAU,gBAAgB;IAC9B,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,MAAM,mBAAmB,GAAG,QAAQ,CAClC,QAAQ,EACR,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,mBAAmB,EAAE,CAAC,CACvD,CAAC;IAEF,MAAM,gBAAgB,GAAG,QAAQ,CAC/B,QAAQ,EACR,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC,CACpD,CAAC;IAEF,OAAO;QACL,mBAAmB;QACnB,gBAAgB;KACjB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGisStore.d.ts","sourceRoot":"","sources":["../../src/hooks/useGisStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAIxC,wBAAgB,WAAW,CAAC,MAAM,GAAG,MAAM,EAAE,YAAY,GAAG,MAAM,EAAE,UAAU,GAAG,MAAM,EAAE,QAAQ,GAAG,MAAM,KAK1E,SAAS,CAAC,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,CAAC,CACpF"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { GisStoreContent } from '../content/GisStoreProvider';
|
|
3
|
+
export function useGisStore() {
|
|
4
|
+
const gisStore = useContext(GisStoreContent);
|
|
5
|
+
if (!gisStore)
|
|
6
|
+
throw new Error('gisStore is null');
|
|
7
|
+
return gisStore;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=useGisStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useGisStore.js","sourceRoot":"","sources":["../../src/hooks/useGisStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AACnC,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAC;AAE9D,MAAM,UAAU,WAAW;IACzB,MAAM,QAAQ,GAAG,UAAU,CAAC,eAAe,CAAC,CAAC;IAE7C,IAAI,CAAC,QAAQ;QAAE,MAAM,IAAI,KAAK,CAAC,kBAAkB,CAAC,CAAC;IAEnD,OAAO,QAA4E,CAAC;AACtF,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMultiMapStatusStore.d.ts","sourceRoot":"","sources":["../../src/hooks/useMultiMapStatusStore.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AAGnD,wBAAgB,sBAAsB,IAKN,oBAAoB,CACnD"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { useContext } from 'react';
|
|
2
|
+
import { MultiMapStatusStoreContext } from '../content/MultiMapStatusStoreProvider';
|
|
3
|
+
export function useMultiMapStatusStore() {
|
|
4
|
+
const multiMapStatusStore = useContext(MultiMapStatusStoreContext);
|
|
5
|
+
if (!multiMapStatusStore)
|
|
6
|
+
throw new Error('multiMapStatusStore is null');
|
|
7
|
+
return multiMapStatusStore;
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=useMultiMapStatusStore.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMultiMapStatusStore.js","sourceRoot":"","sources":["../../src/hooks/useMultiMapStatusStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,OAAO,CAAC;AAEnC,OAAO,EAAE,0BAA0B,EAAE,MAAM,wCAAwC,CAAC;AAEpF,MAAM,UAAU,sBAAsB;IACpC,MAAM,mBAAmB,GAAG,UAAU,CAAC,0BAA0B,CAAC,CAAC;IAEnE,IAAI,CAAC,mBAAmB;QAAE,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IAEzE,OAAO,mBAA2C,CAAC;AACrD,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useProduct.d.ts","sourceRoot":"","sources":["../../src/hooks/useProduct.ts"],"names":[],"mappings":"AAIA,wBAAgB,UAAU,CAAC,MAAM,GAAG,MAAM,EAAE,YAAY,GAAG,MAAM,EAAE,UAAU,GAAG,MAAM,EAAE,QAAQ,GAAG,MAAM,gFAQxG"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { useStore } from 'zustand';
|
|
2
|
+
import { useGisStore } from './useGisStore';
|
|
3
|
+
import { useConfigStore } from './useConfigStore';
|
|
4
|
+
export function useProduct() {
|
|
5
|
+
const configStore = useConfigStore();
|
|
6
|
+
const gisStore = useGisStore();
|
|
7
|
+
const productType = useStore(gisStore, state => state.productType);
|
|
8
|
+
return configStore.getState().productConfig.findProduct(productType);
|
|
9
|
+
}
|
|
10
|
+
//# sourceMappingURL=useProduct.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useProduct.js","sourceRoot":"","sources":["../../src/hooks/useProduct.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AACnC,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAElD,MAAM,UAAU,UAAU;IACxB,MAAM,WAAW,GAAG,cAAc,EAA8C,CAAC;IAEjF,MAAM,QAAQ,GAAG,WAAW,EAA8C,CAAC;IAE3E,MAAM,WAAW,GAAG,QAAQ,CAAC,QAAQ,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,WAAW,CAAC,CAAC;IAEnE,OAAO,WAAW,CAAC,QAAQ,EAAE,CAAC,aAAa,CAAC,WAAW,CAAC,WAAY,CAAC,CAAC;AACxE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStores.d.ts","sourceRoot":"","sources":["../../src/hooks/useStores.ts"],"names":[],"mappings":"AAGA,wBAAgB,SAAS;;;EAQxB"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { useConfigStore } from './useConfigStore';
|
|
2
|
+
import { useGisStore } from './useGisStore';
|
|
3
|
+
export function useStores() {
|
|
4
|
+
const configStore = useConfigStore();
|
|
5
|
+
const gisStore = useGisStore();
|
|
6
|
+
return {
|
|
7
|
+
configStore,
|
|
8
|
+
gisStore,
|
|
9
|
+
};
|
|
10
|
+
}
|
|
11
|
+
//# sourceMappingURL=useStores.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useStores.js","sourceRoot":"","sources":["../../src/hooks/useStores.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAE5C,MAAM,UAAU,SAAS;IACvB,MAAM,WAAW,GAAG,cAAc,EAAE,CAAC;IACrC,MAAM,QAAQ,GAAG,WAAW,EAAE,CAAC;IAE/B,OAAO;QACL,WAAW;QACX,QAAQ;KACT,CAAC;AACJ,CAAC"}
|