namirasoft-account-react 1.3.210 → 1.3.211

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.
@@ -0,0 +1,6 @@
1
+ export interface Message {
2
+ scope: string;
3
+ name: string;
4
+ action: string;
5
+ result: string;
6
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=Message.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Message.js","sourceRoot":"","sources":["../src/Message.ts"],"names":[],"mappings":""}
@@ -0,0 +1,6 @@
1
+ import { Message } from "./Message";
2
+ export declare class Messages {
3
+ static login(): Message;
4
+ static isTheSame(a: Message, b: Message): boolean;
5
+ static isLogin(message: string): boolean;
6
+ }
@@ -0,0 +1,28 @@
1
+ export class Messages {
2
+ static login() {
3
+ return {
4
+ scope: "namirasoft",
5
+ name: "account",
6
+ action: "login",
7
+ result: "successful",
8
+ };
9
+ }
10
+ static isTheSame(a, b) {
11
+ if (a.scope === b.scope)
12
+ if (a.name === b.name)
13
+ if (a.action === b.action)
14
+ if (a.result === b.result)
15
+ return true;
16
+ return false;
17
+ }
18
+ static isLogin(message) {
19
+ try {
20
+ let value = JSON.parse(message);
21
+ return Messages.isTheSame(Messages.login(), value);
22
+ }
23
+ catch (error) {
24
+ }
25
+ return false;
26
+ }
27
+ }
28
+ //# sourceMappingURL=Messages.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Messages.js","sourceRoot":"","sources":["../src/Messages.ts"],"names":[],"mappings":"AAEA,MAAM,OAAO,QAAQ;IAEjB,MAAM,CAAC,KAAK;QAER,OAAO;YACH,KAAK,EAAE,YAAY;YACnB,IAAI,EAAE,SAAS;YACf,MAAM,EAAE,OAAO;YACf,MAAM,EAAE,YAAY;SACvB,CAAC;IACN,CAAC;IACD,MAAM,CAAC,SAAS,CAAC,CAAU,EAAE,CAAU;QAEnC,IAAI,CAAC,CAAC,KAAK,KAAK,CAAC,CAAC,KAAK;YACnB,IAAI,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,IAAI;gBACjB,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;oBACrB,IAAI,CAAC,CAAC,MAAM,KAAK,CAAC,CAAC,MAAM;wBACrB,OAAO,IAAI,CAAC;QAC5B,OAAO,KAAK,CAAC;IACjB,CAAC;IACD,MAAM,CAAC,OAAO,CAAC,OAAe;QAE1B,IACA;YACI,IAAI,KAAK,GAAY,IAAI,CAAC,KAAK,CAAC,OAAO,CAAY,CAAC;YACpD,OAAO,QAAQ,CAAC,SAAS,CAAC,QAAQ,CAAC,KAAK,EAAE,EAAE,KAAK,CAAC,CAAC;SACtD;QAAC,OAAO,KAAK,EACd;SACC;QACD,OAAO,KAAK,CAAC;IACjB,CAAC;CACJ"}
package/dist/main.d.ts CHANGED
@@ -16,4 +16,6 @@ export * from "./Info";
16
16
  export * from "./INSARouterMaker";
17
17
  export * from "./INSARouterProps";
18
18
  export * from "./INSARouterState";
19
+ export * from "./Message";
20
+ export * from "./Messages";
19
21
  export * from "./NSARouterMaker";
package/dist/main.js CHANGED
@@ -16,5 +16,7 @@ export * from "./Info";
16
16
  export * from "./INSARouterMaker";
17
17
  export * from "./INSARouterProps";
18
18
  export * from "./INSARouterState";
19
+ export * from "./Message";
20
+ export * from "./Messages";
19
21
  export * from "./NSARouterMaker";
20
22
  //# sourceMappingURL=main.js.map
package/dist/main.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,kBAAkB,CAAC"}
1
+ {"version":3,"file":"main.js","sourceRoot":"","sources":["../src/main.ts"],"names":[],"mappings":"AAAA,cAAc,6BAA6B,CAAC;AAC5C,cAAc,6BAA6B,CAAC;AAC5C,cAAc,+BAA+B,CAAC;AAC9C,cAAc,mBAAmB,CAAC;AAClC,cAAc,0BAA0B,CAAC;AACzC,cAAc,iBAAiB,CAAC;AAChC,cAAc,qBAAqB,CAAC;AACpC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,0BAA0B,CAAC;AACzC,cAAc,sBAAsB,CAAC;AACrC,cAAc,6BAA6B,CAAC;AAC5C,cAAc,eAAe,CAAC;AAC9B,cAAc,QAAQ,CAAC;AACvB,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,mBAAmB,CAAC;AAClC,cAAc,WAAW,CAAC;AAC1B,cAAc,YAAY,CAAC;AAC3B,cAAc,kBAAkB,CAAC"}
package/package.json CHANGED
@@ -8,7 +8,7 @@
8
8
  "framework": "npm",
9
9
  "application": "package",
10
10
  "private": false,
11
- "version": "1.3.210",
11
+ "version": "1.3.211",
12
12
  "author": "Amir Abolhasani, Sepideh Mazloumi, Hooman Shashaeh",
13
13
  "license": "MIT",
14
14
  "main": "./dist/main.js",
@@ -25,14 +25,14 @@
25
25
  "@types/react": "^18.3.3",
26
26
  "device-uuid": "^1.0.4",
27
27
  "namirasoft-access": "^1.3.17",
28
- "namirasoft-account": "^1.3.34",
28
+ "namirasoft-account": "^1.3.36",
29
29
  "namirasoft-account-client": "^1.3.0",
30
30
  "namirasoft-api-product": "^1.3.14",
31
31
  "namirasoft-core": "^1.3.71",
32
32
  "namirasoft-field": "^1.3.9",
33
33
  "namirasoft-message": "^1.3.17",
34
34
  "namirasoft-project": "^1.3.15",
35
- "namirasoft-site-react": "^1.3.345",
35
+ "namirasoft-site-react": "^1.3.347",
36
36
  "os-browserify": "^0.3.0",
37
37
  "path-browserify": "^1.0.1",
38
38
  "process": "^0.11.10",
package/src/Message.ts ADDED
@@ -0,0 +1,7 @@
1
+ export interface Message
2
+ {
3
+ scope: string;
4
+ name: string;
5
+ action: string;
6
+ result: string;
7
+ }
@@ -0,0 +1,34 @@
1
+ import { Message } from "./Message";
2
+
3
+ export class Messages
4
+ {
5
+ static login(): Message
6
+ {
7
+ return {
8
+ scope: "namirasoft",
9
+ name: "account",
10
+ action: "login",
11
+ result: "successful",
12
+ };
13
+ }
14
+ static isTheSame(a: Message, b: Message)
15
+ {
16
+ if (a.scope === b.scope)
17
+ if (a.name === b.name)
18
+ if (a.action === b.action)
19
+ if (a.result === b.result)
20
+ return true;
21
+ return false;
22
+ }
23
+ static isLogin(message: string)
24
+ {
25
+ try
26
+ {
27
+ let value: Message = JSON.parse(message) as Message;
28
+ return Messages.isTheSame(Messages.login(), value);
29
+ } catch (error)
30
+ {
31
+ }
32
+ return false;
33
+ }
34
+ }
package/src/main.ts CHANGED
@@ -16,4 +16,6 @@ export * from "./Info";
16
16
  export * from "./INSARouterMaker";
17
17
  export * from "./INSARouterProps";
18
18
  export * from "./INSARouterState";
19
+ export * from "./Message";
20
+ export * from "./Messages";
19
21
  export * from "./NSARouterMaker";