@dartcom/ui-kit 10.1.8 → 10.1.9

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.
@@ -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;AAU/B,OAAO,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;;AAmD3C,wBAAqC"}
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,EAAE,MAAM,GAAG,CAAC;AAE1B,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;AAyEhC,eAAO,MAAM,IAAI,EAAE,KAMlB,CAAC;AAEF,eAAe,IAAI,CAAC"}
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"}
@@ -7,4 +7,5 @@ export declare class ModalStore {
7
7
  closeModal(name: string): void;
8
8
  closeAllModals(): void;
9
9
  }
10
+ export declare const modalStore: ModalStore;
10
11
  //# sourceMappingURL=store.d.ts.map
@@ -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 = new AuthStore();
12869
- modalStore = new 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, }) => (jsxRuntime.jsx(StoreContext.Provider, { value: rootStore, children: children }));
12875
- const useRootStore = () => {
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();
@@ -30736,7 +30732,6 @@ const modalStyle = {
30736
30732
 
30737
30733
  const CustomModal = ({ name, children, onClose, onOpen, }) => {
30738
30734
  const modalId = React__namespace.useId();
30739
- const { modalStore } = useRootStore();
30740
30735
  const open = modalStore.getIsVisible(name);
30741
30736
  React__namespace.useEffect(() => {
30742
30737
  if (open) {
@@ -33343,7 +33338,6 @@ exports.Modal = modal;
33343
33338
  exports.ModalStore = ModalStore;
33344
33339
  exports.NoData = NoData;
33345
33340
  exports.QueryProvider = QueryProvider;
33346
- exports.RootStore = RootStore;
33347
33341
  exports.Select = FormSelect;
33348
33342
  exports.StoreContext = StoreContext;
33349
33343
  exports.TrafficSignCreateForm = create;
@@ -33357,6 +33351,7 @@ exports.UploadButton = UploadButton;
33357
33351
  exports._backendUrl = _backendUrl;
33358
33352
  exports._testApiKeys = _testApiKeys;
33359
33353
  exports.allTrafficSigns = allTrafficSigns;
33354
+ exports.authStore = authStore;
33360
33355
  exports.catIds = catIds;
33361
33356
  exports.copyInformation = copyInformation;
33362
33357
  exports.cratedTrafficSign = cratedTrafficSign;
@@ -33408,6 +33403,7 @@ exports.getWaterAreaLayers = getWaterAreaLayers;
33408
33403
  exports.getWaterLinkLayers = getWaterLinkLayers;
33409
33404
  exports.imagesPath = imagesPath;
33410
33405
  exports.loggerService = loggerService;
33406
+ exports.modalStore = modalStore;
33411
33407
  exports.modalStyle = modalStyle;
33412
33408
  exports.parseTrafficSignCSVFile = parseTrafficSignCSVFile;
33413
33409
  exports.queryClient = queryClient;
@@ -33434,7 +33430,6 @@ exports.useFormContext = useFormContext;
33434
33430
  exports.useGetLeafletLayer = useGetLeafletLayer;
33435
33431
  exports.useGetUser = useGetUser;
33436
33432
  exports.useLogout = useLogout;
33437
- exports.useRootStore = useRootStore;
33438
33433
  exports.useShowErrorSnackbar = useShowErrorSnackbar;
33439
33434
  exports.useShowSnackbar = useShowSnackbar;
33440
33435
  exports.useSignIn = useSignIn;