@fctc/interface-logic 1.3.10 → 1.4.1

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.
@@ -46,8 +46,7 @@ declare class EnvStore {
46
46
  setUserInfo(userInfo: any): void;
47
47
  }
48
48
  declare let env: EnvStore | null;
49
- declare function initEnv({ envStore, localStorageUtils, sessionStorageUtils, }: {
50
- envStore?: any;
49
+ declare function initEnv({ localStorageUtils, sessionStorageUtils, }: {
51
50
  localStorageUtils?: LocalStorageUtilsType;
52
51
  sessionStorageUtils?: SessionStorageUtilsType;
53
52
  }): EnvStore;
@@ -46,8 +46,7 @@ declare class EnvStore {
46
46
  setUserInfo(userInfo: any): void;
47
47
  }
48
48
  declare let env: EnvStore | null;
49
- declare function initEnv({ envStore, localStorageUtils, sessionStorageUtils, }: {
50
- envStore?: any;
49
+ declare function initEnv({ localStorageUtils, sessionStorageUtils, }: {
51
50
  localStorageUtils?: LocalStorageUtilsType;
52
51
  sessionStorageUtils?: SessionStorageUtilsType;
53
52
  }): EnvStore;
@@ -3074,11 +3074,10 @@ var EnvStore = class {
3074
3074
  };
3075
3075
  var env = null;
3076
3076
  function initEnv({
3077
- envStore: envStore2,
3078
3077
  localStorageUtils: localStorageUtils2,
3079
3078
  sessionStorageUtils: sessionStorageUtils2
3080
3079
  }) {
3081
- env = new EnvStore(envStore2, localStorageUtils2, sessionStorageUtils2);
3080
+ env = new EnvStore(envStore, localStorageUtils2, sessionStorageUtils2);
3082
3081
  return env;
3083
3082
  }
3084
3083
  function getEnv() {
@@ -3035,11 +3035,10 @@ var EnvStore = class {
3035
3035
  };
3036
3036
  var env = null;
3037
3037
  function initEnv({
3038
- envStore: envStore2,
3039
3038
  localStorageUtils: localStorageUtils2,
3040
3039
  sessionStorageUtils: sessionStorageUtils2
3041
3040
  }) {
3042
- env = new EnvStore(envStore2, localStorageUtils2, sessionStorageUtils2);
3041
+ env = new EnvStore(envStore, localStorageUtils2, sessionStorageUtils2);
3043
3042
  return env;
3044
3043
  }
3045
3044
  function getEnv() {
package/dist/hooks.d.mts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { L as LoginCredentialBody, c as SocialTokenBody, F as ForgotPasswordBody, u as updatePasswordBody, V as ViewData, C as ContextApi, b as GetSelectionType } from './api-type-38YDuhk_.mjs';
2
+ import { L as LoginCredentialBody, d as SocialTokenBody, F as ForgotPasswordBody, u as updatePasswordBody, V as ViewData, C as ContextApi, c as GetSelectionType, f as GetViewParams } from './view-type-BGJfDe73.mjs';
3
3
 
4
4
  declare const useForgotPassword: () => _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
5
5
 
@@ -166,6 +166,7 @@ interface BaseModelInit {
166
166
  actContext?: Record<string, any>;
167
167
  fields?: any;
168
168
  }
169
+
169
170
  declare class BaseModel {
170
171
  name: string;
171
172
  view: Record<string, any>;
@@ -270,19 +271,6 @@ declare const useGetSelection: ({ data, queryKey, enabled, }: {
270
271
  enabled?: boolean;
271
272
  }) => _tanstack_react_query.UseQueryResult<any, Error>;
272
273
 
273
- type View = [number | boolean, string];
274
- type Option = {
275
- action_id?: number;
276
- load_filters?: boolean;
277
- toolbar?: boolean;
278
- };
279
- interface GetViewParams {
280
- model?: string;
281
- views?: View[];
282
- context?: Record<string, any>;
283
- options?: Option;
284
- aid?: number | string | null | boolean;
285
- }
286
274
  declare const useGetView: (viewParams: GetViewParams, actData?: any) => _tanstack_react_query.UseQueryResult<any, Error>;
287
275
 
288
276
  declare const useLoadAction: () => _tanstack_react_query.UseMutationResult<any, Error, {
package/dist/hooks.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as _tanstack_react_query from '@tanstack/react-query';
2
- import { L as LoginCredentialBody, c as SocialTokenBody, F as ForgotPasswordBody, u as updatePasswordBody, V as ViewData, C as ContextApi, b as GetSelectionType } from './api-type-38YDuhk_.js';
2
+ import { L as LoginCredentialBody, d as SocialTokenBody, F as ForgotPasswordBody, u as updatePasswordBody, V as ViewData, C as ContextApi, c as GetSelectionType, f as GetViewParams } from './view-type-BGJfDe73.js';
3
3
 
4
4
  declare const useForgotPassword: () => _tanstack_react_query.UseMutationResult<any, Error, string, unknown>;
5
5
 
@@ -166,6 +166,7 @@ interface BaseModelInit {
166
166
  actContext?: Record<string, any>;
167
167
  fields?: any;
168
168
  }
169
+
169
170
  declare class BaseModel {
170
171
  name: string;
171
172
  view: Record<string, any>;
@@ -270,19 +271,6 @@ declare const useGetSelection: ({ data, queryKey, enabled, }: {
270
271
  enabled?: boolean;
271
272
  }) => _tanstack_react_query.UseQueryResult<any, Error>;
272
273
 
273
- type View = [number | boolean, string];
274
- type Option = {
275
- action_id?: number;
276
- load_filters?: boolean;
277
- toolbar?: boolean;
278
- };
279
- interface GetViewParams {
280
- model?: string;
281
- views?: View[];
282
- context?: Record<string, any>;
283
- options?: Option;
284
- aid?: number | string | null | boolean;
285
- }
286
274
  declare const useGetView: (viewParams: GetViewParams, actData?: any) => _tanstack_react_query.UseQueryResult<any, Error>;
287
275
 
288
276
  declare const useLoadAction: () => _tanstack_react_query.UseMutationResult<any, Error, {
@@ -1,4 +1,4 @@
1
- import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, G as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, b as GetSelectionType } from './api-type-38YDuhk_.mjs';
1
+ import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, f as GetViewParams, c as GetSelectionType } from './view-type-BGJfDe73.mjs';
2
2
 
3
3
  declare const ActionService: {
4
4
  loadAction({ idAction, context, }: {
@@ -187,19 +187,6 @@ declare const UserService: {
187
187
  switchUserLocale: ({ id, values }: any) => Promise<any>;
188
188
  };
189
189
 
190
- type View = [number | boolean, string];
191
- type Option = {
192
- action_id?: number;
193
- load_filters?: boolean;
194
- toolbar?: boolean;
195
- };
196
- interface GetViewParams {
197
- model?: string;
198
- views?: View[];
199
- context?: Record<string, any>;
200
- options?: Option;
201
- aid?: number | string | null | boolean;
202
- }
203
190
  declare const ViewService: {
204
191
  getView({ model, views, context, options, aid, }: GetViewParams): Promise<any>;
205
192
  getMenu(context: any): Promise<any>;
@@ -1,4 +1,4 @@
1
- import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, G as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, b as GetSelectionType } from './api-type-38YDuhk_.js';
1
+ import { C as ContextApi, L as LoginCredentialBody, R as ResetPasswordRequest, U as UpdatePasswordRequest, b as GetListParams, a as GetDetailParams, S as SaveParams, D as DeleteParams, O as OnChangeParams, V as ViewData, f as GetViewParams, c as GetSelectionType } from './view-type-BGJfDe73.js';
2
2
 
3
3
  declare const ActionService: {
4
4
  loadAction({ idAction, context, }: {
@@ -187,19 +187,6 @@ declare const UserService: {
187
187
  switchUserLocale: ({ id, values }: any) => Promise<any>;
188
188
  };
189
189
 
190
- type View = [number | boolean, string];
191
- type Option = {
192
- action_id?: number;
193
- load_filters?: boolean;
194
- toolbar?: boolean;
195
- };
196
- interface GetViewParams {
197
- model?: string;
198
- views?: View[];
199
- context?: Record<string, any>;
200
- options?: Option;
201
- aid?: number | string | null | boolean;
202
- }
203
190
  declare const ViewService: {
204
191
  getView({ model, views, context, options, aid, }: GetViewParams): Promise<any>;
205
192
  getMenu(context: any): Promise<any>;
@@ -0,0 +1,17 @@
1
+ export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, f as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-BGJfDe73.mjs';
2
+
3
+ interface Config {
4
+ baseUrl: string;
5
+ grantType: string;
6
+ clientId: string;
7
+ clientSecret: string;
8
+ }
9
+
10
+ interface Context {
11
+ uid: number;
12
+ lang: string;
13
+ allowCompanys: number[];
14
+ [key: string]: any;
15
+ }
16
+
17
+ export type { Config, Context };
@@ -0,0 +1,17 @@
1
+ export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetSelectionType, f as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, g as View, V as ViewData, u as updatePasswordBody } from './view-type-BGJfDe73.js';
2
+
3
+ interface Config {
4
+ baseUrl: string;
5
+ grantType: string;
6
+ clientId: string;
7
+ clientSecret: string;
8
+ }
9
+
10
+ interface Context {
11
+ uid: number;
12
+ lang: string;
13
+ allowCompanys: number[];
14
+ [key: string]: any;
15
+ }
16
+
17
+ export type { Config, Context };
package/dist/types.js ADDED
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
4
+ var __getOwnPropNames = Object.getOwnPropertyNames;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+
16
+ // src/types.ts
17
+ var types_exports = {};
18
+ module.exports = __toCommonJS(types_exports);
package/dist/types.mjs ADDED
File without changes
@@ -31,6 +31,18 @@ interface Specification {
31
31
  interface ContextApi {
32
32
  [key: string]: any;
33
33
  }
34
+ interface GetAllParams {
35
+ model?: string;
36
+ ids?: number[];
37
+ specification: Specification;
38
+ domain?: any[];
39
+ offset?: number;
40
+ sort: any;
41
+ fields: any;
42
+ groupby: any;
43
+ context?: ContextApi;
44
+ limit?: number;
45
+ }
34
46
  interface GetListParams {
35
47
  model: string;
36
48
  ids?: number[];
@@ -84,4 +96,18 @@ type GetSelectionType = {
84
96
  specification?: any;
85
97
  };
86
98
 
87
- export type { ContextApi as C, DeleteParams as D, ForgotPasswordBody as F, GetListParams as G, LoginCredentialBody as L, OnChangeParams as O, ResetPasswordRequest as R, SaveParams as S, UpdatePasswordRequest as U, ViewData as V, GetDetailParams as a, GetSelectionType as b, SocialTokenBody as c, updatePasswordBody as u };
99
+ type View = [number | boolean, string];
100
+ type Option = {
101
+ action_id?: number;
102
+ load_filters?: boolean;
103
+ toolbar?: boolean;
104
+ };
105
+ interface GetViewParams {
106
+ model?: string;
107
+ views?: View[];
108
+ context?: Record<string, any>;
109
+ options?: Option;
110
+ aid?: number | string | null | boolean;
111
+ }
112
+
113
+ export type { ContextApi as C, DeleteParams as D, ForgotPasswordBody as F, GetAllParams as G, LoginCredentialBody as L, OnChangeParams as O, ResetPasswordRequest as R, SaveParams as S, UpdatePasswordRequest as U, ViewData as V, GetDetailParams as a, GetListParams as b, GetSelectionType as c, SocialTokenBody as d, Specification as e, GetViewParams as f, View as g, updatePasswordBody as u };
@@ -31,6 +31,18 @@ interface Specification {
31
31
  interface ContextApi {
32
32
  [key: string]: any;
33
33
  }
34
+ interface GetAllParams {
35
+ model?: string;
36
+ ids?: number[];
37
+ specification: Specification;
38
+ domain?: any[];
39
+ offset?: number;
40
+ sort: any;
41
+ fields: any;
42
+ groupby: any;
43
+ context?: ContextApi;
44
+ limit?: number;
45
+ }
34
46
  interface GetListParams {
35
47
  model: string;
36
48
  ids?: number[];
@@ -84,4 +96,18 @@ type GetSelectionType = {
84
96
  specification?: any;
85
97
  };
86
98
 
87
- export type { ContextApi as C, DeleteParams as D, ForgotPasswordBody as F, GetListParams as G, LoginCredentialBody as L, OnChangeParams as O, ResetPasswordRequest as R, SaveParams as S, UpdatePasswordRequest as U, ViewData as V, GetDetailParams as a, GetSelectionType as b, SocialTokenBody as c, updatePasswordBody as u };
99
+ type View = [number | boolean, string];
100
+ type Option = {
101
+ action_id?: number;
102
+ load_filters?: boolean;
103
+ toolbar?: boolean;
104
+ };
105
+ interface GetViewParams {
106
+ model?: string;
107
+ views?: View[];
108
+ context?: Record<string, any>;
109
+ options?: Option;
110
+ aid?: number | string | null | boolean;
111
+ }
112
+
113
+ export type { ContextApi as C, DeleteParams as D, ForgotPasswordBody as F, GetAllParams as G, LoginCredentialBody as L, OnChangeParams as O, ResetPasswordRequest as R, SaveParams as S, UpdatePasswordRequest as U, ViewData as V, GetDetailParams as a, GetListParams as b, GetSelectionType as c, SocialTokenBody as d, Specification as e, GetViewParams as f, View as g, updatePasswordBody as u };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fctc/interface-logic",
3
- "version": "1.3.10",
3
+ "version": "1.4.1",
4
4
  "types": "dist/index.d.ts",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.mjs",
@@ -49,6 +49,11 @@
49
49
  "types": "./dist/utils.d.ts",
50
50
  "import": "./dist/utils.mjs",
51
51
  "require": "./dist/utils.cjs"
52
+ },
53
+ "./types": {
54
+ "types": "./dist/types.d.ts",
55
+ "import": "./dist/types.mjs",
56
+ "require": "./dist/types.cjs"
52
57
  }
53
58
  },
54
59
  "files": [