@ws-ui/store 0.1.10 → 0.1.11

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,4 +1,5 @@
1
- import { ICloseModalAction, ICreateModalAction, IEditModalAction, IModal, IRemoveModalAction } from './types';
1
+ import { IModal } from '@ws-ui/shared';
2
+ import { ICloseModalAction, ICreateModalAction, IEditModalAction, IRemoveModalAction } from './types';
2
3
  export interface IModalsState {
3
4
  list: IModal[];
4
5
  }
@@ -10,7 +11,7 @@ declare const stateSlice: import("@reduxjs/toolkit").Slice<IModalsState, {
10
11
  }, "modals">;
11
12
  export declare const createModal: import("@reduxjs/toolkit").ActionCreatorWithPayload<IModal, string>, removeModal: import("@reduxjs/toolkit").ActionCreatorWithPayload<string, string>, closeModal: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
12
13
  id: string;
13
- reason?: import("./types").ModalCloseReason | undefined;
14
+ reason?: import("@ws-ui/shared").ModalCloseReason | undefined;
14
15
  }, string>, editModal: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
15
16
  id: string;
16
17
  } & Partial<Pick<IModal, "views" | "title">>, string>;
@@ -1,5 +1,5 @@
1
1
  import { Store } from '../../store';
2
- import { IModal, ModalType } from './types';
2
+ import { IModal, ModalType } from '@ws-ui/shared';
3
3
  interface IOpenModalPayload extends Omit<IModal, 'id' | 'isOpen' | 'type'> {
4
4
  type?: ModalType;
5
5
  store?: Store;
@@ -1,63 +1,5 @@
1
- /// <reference types="react" />
2
1
  import { PayloadAction } from '@reduxjs/toolkit';
3
- export declare const ModalIcons: {
4
- FdSave: (props: import("react").SVGProps<SVGSVGElement>) => JSX.Element;
5
- FdWarningDanger: (props: import("react").SVGProps<SVGSVGElement>) => JSX.Element;
6
- FdInfoCircle: (props: import("react").SVGProps<SVGSVGElement>) => JSX.Element;
7
- FdInfoBold: (props: import("react").SVGProps<SVGSVGElement>) => JSX.Element;
8
- };
9
- export type ModalIcon = keyof typeof ModalIcons;
10
- export declare enum ModalType {
11
- ALERT = "alert",
12
- CONFIRM = "confirm"
13
- }
14
- export declare enum ModalColor {
15
- PRIMARY = "primary",
16
- WARNING = "warning",
17
- DANGER = "danger"
18
- }
19
- export declare enum ModalCloseReason {
20
- CONFIRMED = "confirmed",
21
- CANCELED = "canceled"
22
- }
23
- export interface IModal {
24
- /**
25
- * Id of the modal
26
- */
27
- id: string;
28
- type: ModalType;
29
- color?: ModalColor;
30
- /**
31
- * title displayed at the header of the modal
32
- */
33
- title?: string;
34
- /**
35
- * The message to be displayed at the center of the modal.
36
- */
37
- message: string;
38
- views?: {
39
- /**
40
- * additional warnings to be displayed in a list view under the message.
41
- */
42
- tips?: {
43
- type: 'warning' | 'error' | 'info';
44
- message: string;
45
- }[];
46
- toggles?: Record<string, {
47
- key: string;
48
- value: boolean;
49
- title: string;
50
- warnings?: {
51
- type: 'warning' | 'error' | 'info';
52
- message: string;
53
- }[];
54
- }>;
55
- };
56
- icon?: ModalIcon;
57
- zIndex?: number;
58
- isOpen: boolean;
59
- closeReason?: ModalCloseReason;
60
- }
2
+ import { IModal, ModalCloseReason } from '@ws-ui/shared';
61
3
  export type ICreateModalAction = PayloadAction<IModal>;
62
4
  export type IEditModalAction = PayloadAction<{
63
5
  id: string;
@@ -34,7 +34,7 @@ export declare const selectModals: ((state: import("redux").EmptyObject & {
34
34
  modals: import("../modules").IModalsState;
35
35
  sharedCSS: import("immer/dist/internal.js").WritableDraft<import("../modules").ISharedCSSState>;
36
36
  model: import("../modules").IModelState;
37
- }) => import("../modules").IModal[]) & import("reselect").OutputSelectorFields<(args_0: import("../modules").IModalsState) => import("../modules").IModal[], {
37
+ }) => import("@ws-ui/shared").IModal[]) & import("reselect").OutputSelectorFields<(args_0: import("../modules").IModalsState) => import("@ws-ui/shared").IModal[], {
38
38
  clearCache: () => void;
39
39
  }> & {
40
40
  clearCache: () => void;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@ws-ui/store",
3
3
  "private": false,
4
- "version": "0.1.10",
4
+ "version": "0.1.11",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs.js",
7
7
  "module": "./dist/index.es.js",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "peerDependencies": {
30
30
  "@ws-ui/icons": "^0.0.10",
31
- "@ws-ui/shared": "^0.1.7",
31
+ "@ws-ui/shared": "^0.1.8",
32
32
  "lodash": "^4.17.21",
33
33
  "minimatch": "^5.1.0",
34
34
  "react": "^17.0.2",