@salla.sa/twilight 1.6.15-alpha.18 → 1.6.15-alpha.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salla.sa/twilight",
3
- "version": "1.6.15-alpha.18",
3
+ "version": "1.6.15-alpha.2",
4
4
  "description": "Salla Theme Toolkit, Webcomponents, Events, Requests, Utils",
5
5
  "main": "dist/cjs",
6
6
  "module": "dist/esm",
@@ -31,8 +31,8 @@
31
31
  ],
32
32
  "homepage": "https://salla.dev",
33
33
  "dependencies": {
34
- "@salla.sa/base": "^1.6.15-alpha.18",
35
- "@salla.sa/twilight-tailwind-theme": "^1.6.15-alpha.18",
34
+ "@salla.sa/base": "^1.6.15-alpha.2",
35
+ "@salla.sa/twilight-tailwind-theme": "^1.5.14",
36
36
  "axios": "^0.27.2",
37
37
  "infinite-scroll": "^4.0.1",
38
38
  "jwt-decode": "^3.1.2",
@@ -61,5 +61,5 @@
61
61
  "peerDependencies": {
62
62
  "webpack": "^4 || ^5"
63
63
  },
64
- "gitHead": "290c997a2f59414be09d605935e2f1a4f6f416de"
64
+ "gitHead": "756babcdb4884479761cb614ab9ef246ae1575ed"
65
65
  }
@@ -42,19 +42,9 @@ export interface VerifyContactResponse extends SuccessResponse {
42
42
  }
43
43
  }
44
44
 
45
- export interface NotificationSettingPayload {
46
- check: Number
47
- }
48
-
49
- export interface AccountDeletionPayload {
50
- user_id: Number
51
- }
52
-
53
45
  export default interface ProfileApi {
54
46
  info: () => Promise<ProfileResponse>;
55
47
  update: (data: ProfileUpdatePayload) => Promise<ProfileResponse>;
56
48
  verify: (data: AuthRequest.verifyByMobile | AuthRequest.verifyByEmail) => Promise<VerifyContactResponse>;
57
49
  updateContacts: (data: ProfileUpdateContactPayload) => Promise<ProfileResponse>;//need to verify after success event
58
- setNotification: (data: NotificationSettingPayload) => Promise<SuccessResponse>;
59
- deleteAccount: (data: AccountDeletionPayload) => Promise<SuccessResponse>
60
50
  }
@@ -1,5 +1,5 @@
1
- import { ProfileResponse } from "../api/profile";
2
- import { RequestErrorEvent, SuccessResponse } from "../common";
1
+ import {ProfileResponse} from "../api/profile";
2
+ import {RequestErrorEvent, SuccessResponse} from "../common";
3
3
 
4
4
  export default interface ProfileEvent {
5
5
  onUpdated: (callback: (response: ProfileResponse) => void) => void;
@@ -10,10 +10,4 @@ export default interface ProfileEvent {
10
10
  onUpdateFailed: RequestErrorEvent;
11
11
  onUnverified: RequestErrorEvent;
12
12
  onUpdateContactsFailed: RequestErrorEvent;
13
-
14
- onSettingsUpdated: (callback: (response: SuccessResponse) => void) => void;
15
- onUpdateSettingsFailed: RequestErrorEvent;
16
-
17
- onDeleted: (callback: (response: SuccessResponse) => void) => void;
18
- onNotDeleted: RequestErrorEvent;
19
13
  }
package/types/index.d.ts CHANGED
@@ -10,8 +10,6 @@ import SallaForm from "./lib/form";
10
10
  import {TwilightConfig} from "./tiwlight-config";
11
11
 
12
12
  export default interface Salla extends SallaActions {
13
- onReady: (callback: (event: Event) => unknown) => void; //relay on it, it will be available even salla object is not loaded yet
14
-
15
13
  api: Api;
16
14
  event: TwilightEmitter;
17
15
 
@@ -25,10 +23,11 @@ export default interface Salla extends SallaActions {
25
23
  AppHelpers: AppHelpers;
26
24
  form: SallaForm;
27
25
  isInitiated: boolean; // will be true when firing event `twilight::initiated`
26
+ onReady: (callback: (event: Event) => unknown) => void; // don't relay on it because Salla may not existed yet
28
27
  init: (config: TwilightConfig) => void; // an alias for `salla.twilight.init(config)`
29
28
  call: (action: ApiActionName | string) => any;
30
29
 
31
- onInitiated: (callback) => void; // don't relay on it because Salla may not existed yet
30
+ onInitiated: (callback) => void;
32
31
  }
33
32
 
34
33
  declare global {
package/watcher.js CHANGED
@@ -93,7 +93,7 @@ class WatcherPlugin {
93
93
  */
94
94
  afterCompile(compiler) {
95
95
  compiler.hooks.afterCompile.tap('SallaAfterCompilePlugin', (compilation) => {
96
- if(this.connection) this.connection.sendUTF(JSON.stringify({ msg: "reload" }));
96
+ this.connection.sendUTF(JSON.stringify({ msg: "reload" }));
97
97
  });
98
98
  }
99
99
  /**