@fctc/interface-logic 2.6.5 → 2.6.6

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/dist/hooks.d.mts CHANGED
@@ -400,8 +400,8 @@ declare const useManageSession: () => _tanstack_react_query.UseMutationResult<un
400
400
  declare const useHandleClosingSession: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
401
401
  model: string;
402
402
  method: string;
403
- ids: any;
404
- kwargs: any;
403
+ ids: [];
404
+ kwargs: {};
405
405
  service: string;
406
406
  xNode: string;
407
407
  }, unknown>;
@@ -415,7 +415,7 @@ declare const useCreateSession: () => _tanstack_react_query.UseMutationResult<un
415
415
 
416
416
  declare const useGetPos: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
417
417
  model: string;
418
- args: any;
418
+ args: [];
419
419
  domain: any;
420
420
  service: string;
421
421
  xNode: string;
package/dist/hooks.d.ts CHANGED
@@ -400,8 +400,8 @@ declare const useManageSession: () => _tanstack_react_query.UseMutationResult<un
400
400
  declare const useHandleClosingSession: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
401
401
  model: string;
402
402
  method: string;
403
- ids: any;
404
- kwargs: any;
403
+ ids: [];
404
+ kwargs: {};
405
405
  service: string;
406
406
  xNode: string;
407
407
  }, unknown>;
@@ -415,7 +415,7 @@ declare const useCreateSession: () => _tanstack_react_query.UseMutationResult<un
415
415
 
416
416
  declare const useGetPos: () => _tanstack_react_query.UseMutationResult<unknown, Error, {
417
417
  model: string;
418
- args: any;
418
+ args: [];
419
419
  domain: any;
420
420
  service: string;
421
421
  xNode: string;
package/dist/hooks.js CHANGED
@@ -5883,8 +5883,7 @@ var useGetListData = (listDataProps, queryKey, enabled, service, xNode) => {
5883
5883
  }),
5884
5884
  enabled,
5885
5885
  refetchOnWindowFocus: false,
5886
- staleTime: 0,
5887
- placeholderData: import_react_query50.keepPreviousData
5886
+ staleTime: 0
5888
5887
  });
5889
5888
  };
5890
5889
  var use_get_list_data_default = useGetListData;
package/dist/hooks.mjs CHANGED
@@ -5756,7 +5756,7 @@ var useGetGroups = ({
5756
5756
  var use_get_groups_default = useGetGroups;
5757
5757
 
5758
5758
  // src/hooks/view/use-get-list-data.ts
5759
- import { keepPreviousData, useQuery as useQuery14 } from "@tanstack/react-query";
5759
+ import { useQuery as useQuery14 } from "@tanstack/react-query";
5760
5760
  var useGetListData = (listDataProps, queryKey, enabled, service, xNode) => {
5761
5761
  const { getAll } = useModelService();
5762
5762
  return useQuery14({
@@ -5769,8 +5769,7 @@ var useGetListData = (listDataProps, queryKey, enabled, service, xNode) => {
5769
5769
  }),
5770
5770
  enabled,
5771
5771
  refetchOnWindowFocus: false,
5772
- staleTime: 0,
5773
- placeholderData: keepPreviousData
5772
+ staleTime: 0
5774
5773
  });
5775
5774
  };
5776
5775
  var use_get_list_data_default = useGetListData;
package/dist/provider.js CHANGED
@@ -6239,8 +6239,7 @@ var useGetListData = (listDataProps, queryKey, enabled, service, xNode) => {
6239
6239
  }),
6240
6240
  enabled,
6241
6241
  refetchOnWindowFocus: false,
6242
- staleTime: 0,
6243
- placeholderData: import_react_query50.keepPreviousData
6242
+ staleTime: 0
6244
6243
  });
6245
6244
  };
6246
6245
  var use_get_list_data_default = useGetListData;
@@ -6951,18 +6950,51 @@ var MetaProvider = ({ children }) => {
6951
6950
  function updateMetadata() {
6952
6951
  const metadata = env?.defaultCompany;
6953
6952
  if (!metadata) return;
6953
+ if (metadata.display_name) {
6954
+ document.title = metadata.display_name;
6955
+ }
6954
6956
  document.documentElement.style.setProperty(
6955
6957
  "--primary",
6956
- metadata.primary_color
6958
+ metadata?.primary_color
6957
6959
  );
6958
6960
  document.documentElement.style.setProperty(
6959
6961
  "--secondary",
6960
- metadata.secondary_color
6962
+ metadata?.secondary_color
6961
6963
  );
6964
+ const metaDescription = document.querySelector('meta[name="description"]');
6965
+ if (metaDescription) {
6966
+ metaDescription.setAttribute("content", metadata.display_name);
6967
+ } else {
6968
+ const newMetaDescription = document.createElement("meta");
6969
+ newMetaDescription.name = "description";
6970
+ newMetaDescription.content = metadata.display_name;
6971
+ document.head.appendChild(newMetaDescription);
6972
+ }
6973
+ const updateIcon = (rel, href) => {
6974
+ let linkIcon = document.querySelector(
6975
+ `link[rel="${rel}"]`
6976
+ );
6977
+ if (linkIcon) {
6978
+ linkIcon.href = href;
6979
+ } else {
6980
+ linkIcon = document.createElement("link");
6981
+ linkIcon.rel = rel;
6982
+ linkIcon.href = href;
6983
+ document.head.appendChild(linkIcon);
6984
+ }
6985
+ };
6986
+ if (metadata.logo) {
6987
+ updateIcon("icon", metadata.logo);
6988
+ updateIcon("apple-touch-icon", metadata.logo);
6989
+ const faviconLink = document.querySelector('link[href="favicon.ico"]');
6990
+ if (faviconLink) {
6991
+ faviconLink.remove();
6992
+ }
6993
+ }
6962
6994
  }
6963
6995
  (0, import_react14.useEffect)(() => {
6964
6996
  updateMetadata();
6965
- }, [env]);
6997
+ }, [env?.defaultCompany]);
6966
6998
  return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_jsx_runtime7.Fragment, { children });
6967
6999
  };
6968
7000
  // Annotate the CommonJS export names for ESM import in node:
package/dist/provider.mjs CHANGED
@@ -6183,7 +6183,7 @@ var useGetGroups = ({
6183
6183
  var use_get_groups_default = useGetGroups;
6184
6184
 
6185
6185
  // src/hooks/view/use-get-list-data.ts
6186
- import { keepPreviousData, useQuery as useQuery14 } from "@tanstack/react-query";
6186
+ import { useQuery as useQuery14 } from "@tanstack/react-query";
6187
6187
  var useGetListData = (listDataProps, queryKey, enabled, service, xNode) => {
6188
6188
  const { getAll } = useModelService();
6189
6189
  return useQuery14({
@@ -6196,8 +6196,7 @@ var useGetListData = (listDataProps, queryKey, enabled, service, xNode) => {
6196
6196
  }),
6197
6197
  enabled,
6198
6198
  refetchOnWindowFocus: false,
6199
- staleTime: 0,
6200
- placeholderData: keepPreviousData
6199
+ staleTime: 0
6201
6200
  });
6202
6201
  };
6203
6202
  var use_get_list_data_default = useGetListData;
@@ -6908,18 +6907,51 @@ var MetaProvider = ({ children }) => {
6908
6907
  function updateMetadata() {
6909
6908
  const metadata = env?.defaultCompany;
6910
6909
  if (!metadata) return;
6910
+ if (metadata.display_name) {
6911
+ document.title = metadata.display_name;
6912
+ }
6911
6913
  document.documentElement.style.setProperty(
6912
6914
  "--primary",
6913
- metadata.primary_color
6915
+ metadata?.primary_color
6914
6916
  );
6915
6917
  document.documentElement.style.setProperty(
6916
6918
  "--secondary",
6917
- metadata.secondary_color
6919
+ metadata?.secondary_color
6918
6920
  );
6921
+ const metaDescription = document.querySelector('meta[name="description"]');
6922
+ if (metaDescription) {
6923
+ metaDescription.setAttribute("content", metadata.display_name);
6924
+ } else {
6925
+ const newMetaDescription = document.createElement("meta");
6926
+ newMetaDescription.name = "description";
6927
+ newMetaDescription.content = metadata.display_name;
6928
+ document.head.appendChild(newMetaDescription);
6929
+ }
6930
+ const updateIcon = (rel, href) => {
6931
+ let linkIcon = document.querySelector(
6932
+ `link[rel="${rel}"]`
6933
+ );
6934
+ if (linkIcon) {
6935
+ linkIcon.href = href;
6936
+ } else {
6937
+ linkIcon = document.createElement("link");
6938
+ linkIcon.rel = rel;
6939
+ linkIcon.href = href;
6940
+ document.head.appendChild(linkIcon);
6941
+ }
6942
+ };
6943
+ if (metadata.logo) {
6944
+ updateIcon("icon", metadata.logo);
6945
+ updateIcon("apple-touch-icon", metadata.logo);
6946
+ const faviconLink = document.querySelector('link[href="favicon.ico"]');
6947
+ if (faviconLink) {
6948
+ faviconLink.remove();
6949
+ }
6950
+ }
6919
6951
  }
6920
6952
  useEffect3(() => {
6921
6953
  updateMetadata();
6922
- }, [env]);
6954
+ }, [env?.defaultCompany]);
6923
6955
  return /* @__PURE__ */ jsx7(Fragment2, { children });
6924
6956
  };
6925
6957
  export {
@@ -298,8 +298,8 @@ declare function useViewService(): {
298
298
  handleClosingSession: ({ model, method, ids, kwargs, xNode, service, }: {
299
299
  model: string;
300
300
  method: string;
301
- ids: any;
302
- kwargs: any;
301
+ ids: [];
302
+ kwargs: {};
303
303
  service: string;
304
304
  xNode: string;
305
305
  }) => any;
@@ -311,7 +311,7 @@ declare function useViewService(): {
311
311
  }) => any;
312
312
  getPOS: ({ model, args, domain, xNode, service, }: {
313
313
  model: string;
314
- args: any;
314
+ args: [];
315
315
  domain: any;
316
316
  service: string;
317
317
  xNode: string;
@@ -298,8 +298,8 @@ declare function useViewService(): {
298
298
  handleClosingSession: ({ model, method, ids, kwargs, xNode, service, }: {
299
299
  model: string;
300
300
  method: string;
301
- ids: any;
302
- kwargs: any;
301
+ ids: [];
302
+ kwargs: {};
303
303
  service: string;
304
304
  xNode: string;
305
305
  }) => any;
@@ -311,7 +311,7 @@ declare function useViewService(): {
311
311
  }) => any;
312
312
  getPOS: ({ model, args, domain, xNode, service, }: {
313
313
  model: string;
314
- args: any;
314
+ args: [];
315
315
  domain: any;
316
316
  service: string;
317
317
  xNode: string;
package/dist/services.mjs CHANGED
@@ -2947,7 +2947,7 @@ import { useQuery as useQuery12 } from "@tanstack/react-query";
2947
2947
  import { useQuery as useQuery13 } from "@tanstack/react-query";
2948
2948
 
2949
2949
  // src/hooks/view/use-get-list-data.ts
2950
- import { keepPreviousData, useQuery as useQuery14 } from "@tanstack/react-query";
2950
+ import { useQuery as useQuery14 } from "@tanstack/react-query";
2951
2951
 
2952
2952
  // src/hooks/view/use-get-menu.ts
2953
2953
  import { useQuery as useQuery15 } from "@tanstack/react-query";
package/package.json CHANGED
@@ -1,90 +1,90 @@
1
- {
2
- "name": "@fctc/interface-logic",
3
- "version": "2.6.5",
4
- "types": "dist/index.d.ts",
5
- "main": "dist/index.cjs",
6
- "module": "dist/index.mjs",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/index.d.ts",
10
- "import": "./dist/index.mjs",
11
- "require": "./dist/index.cjs"
12
- },
13
- "./configs": {
14
- "types": "./dist/configs.d.ts",
15
- "import": "./dist/configs.mjs",
16
- "require": "./dist/configs.cjs"
17
- },
18
- "./constants": {
19
- "types": "./dist/constants.d.ts",
20
- "import": "./dist/constants.mjs",
21
- "require": "./dist/constants.cjs"
22
- },
23
- "./environment": {
24
- "types": "./dist/environment.d.ts",
25
- "import": "./dist/environment.mjs",
26
- "require": "./dist/environment.cjs"
27
- },
28
- "./hooks": {
29
- "types": "./dist/hooks.d.ts",
30
- "import": "./dist/hooks.mjs",
31
- "require": "./dist/hooks.cjs"
32
- },
33
- "./provider": {
34
- "types": "./dist/provider.d.ts",
35
- "import": "./dist/provider.mjs",
36
- "require": "./dist/provider.cjs"
37
- },
38
- "./services": {
39
- "types": "./dist/services.d.ts",
40
- "import": "./dist/services.mjs",
41
- "require": "./dist/services.cjs"
42
- },
43
- "./store": {
44
- "types": "./dist/store.d.ts",
45
- "import": "./dist/store.mjs",
46
- "require": "./dist/store.cjs"
47
- },
48
- "./utils": {
49
- "types": "./dist/utils.d.ts",
50
- "import": "./dist/utils.mjs",
51
- "require": "./dist/utils.cjs"
52
- },
53
- "./types": {
54
- "types": "./dist/types.d.ts",
55
- "import": "./dist/types.mjs",
56
- "require": "./dist/types.cjs"
57
- },
58
- "./models": {
59
- "types": "./dist/models.d.ts",
60
- "import": "./dist/models.mjs",
61
- "require": "./dist/models.cjs"
62
- }
63
- },
64
- "files": [
65
- "dist"
66
- ],
67
- "scripts": {
68
- "build": "tsup",
69
- "test": "jest"
70
- },
71
- "peerDependencies": {
72
- "react": "18.0.0",
73
- "@tanstack/react-query": "^5.83.0"
74
- },
75
- "dependencies": {
76
- "@reduxjs/toolkit": "^2.8.2",
77
- "@tanstack/react-query": "^5.83.0",
78
- "axios": "^1.11.0",
79
- "moment": "^2.30.1",
80
- "react-redux": "^9.2.0"
81
- },
82
- "devDependencies": {
83
- "@types/react": "^18.3.1",
84
- "react": "18.0.0",
85
- "jest": "^29.7.0",
86
- "tsup": "^8.0.0",
87
- "typescript": "^5.8.2"
88
- },
89
- "packageManager": "yarn@1.22.0"
90
- }
1
+ {
2
+ "name": "@fctc/interface-logic",
3
+ "version": "2.6.6",
4
+ "types": "dist/index.d.ts",
5
+ "main": "dist/index.cjs",
6
+ "module": "dist/index.mjs",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "import": "./dist/index.mjs",
11
+ "require": "./dist/index.cjs"
12
+ },
13
+ "./configs": {
14
+ "types": "./dist/configs.d.ts",
15
+ "import": "./dist/configs.mjs",
16
+ "require": "./dist/configs.cjs"
17
+ },
18
+ "./constants": {
19
+ "types": "./dist/constants.d.ts",
20
+ "import": "./dist/constants.mjs",
21
+ "require": "./dist/constants.cjs"
22
+ },
23
+ "./environment": {
24
+ "types": "./dist/environment.d.ts",
25
+ "import": "./dist/environment.mjs",
26
+ "require": "./dist/environment.cjs"
27
+ },
28
+ "./hooks": {
29
+ "types": "./dist/hooks.d.ts",
30
+ "import": "./dist/hooks.mjs",
31
+ "require": "./dist/hooks.cjs"
32
+ },
33
+ "./provider": {
34
+ "types": "./dist/provider.d.ts",
35
+ "import": "./dist/provider.mjs",
36
+ "require": "./dist/provider.cjs"
37
+ },
38
+ "./services": {
39
+ "types": "./dist/services.d.ts",
40
+ "import": "./dist/services.mjs",
41
+ "require": "./dist/services.cjs"
42
+ },
43
+ "./store": {
44
+ "types": "./dist/store.d.ts",
45
+ "import": "./dist/store.mjs",
46
+ "require": "./dist/store.cjs"
47
+ },
48
+ "./utils": {
49
+ "types": "./dist/utils.d.ts",
50
+ "import": "./dist/utils.mjs",
51
+ "require": "./dist/utils.cjs"
52
+ },
53
+ "./types": {
54
+ "types": "./dist/types.d.ts",
55
+ "import": "./dist/types.mjs",
56
+ "require": "./dist/types.cjs"
57
+ },
58
+ "./models": {
59
+ "types": "./dist/models.d.ts",
60
+ "import": "./dist/models.mjs",
61
+ "require": "./dist/models.cjs"
62
+ }
63
+ },
64
+ "files": [
65
+ "dist"
66
+ ],
67
+ "scripts": {
68
+ "build": "tsup",
69
+ "test": "jest"
70
+ },
71
+ "peerDependencies": {
72
+ "react": "18.0.0",
73
+ "@tanstack/react-query": "^5.83.0"
74
+ },
75
+ "dependencies": {
76
+ "@reduxjs/toolkit": "^2.8.2",
77
+ "@tanstack/react-query": "^5.83.0",
78
+ "axios": "^1.11.0",
79
+ "moment": "^2.30.1",
80
+ "react-redux": "^9.2.0"
81
+ },
82
+ "devDependencies": {
83
+ "@types/react": "^18.3.1",
84
+ "react": "18.0.0",
85
+ "jest": "^29.7.0",
86
+ "tsup": "^8.0.0",
87
+ "typescript": "^5.8.2"
88
+ },
89
+ "packageManager": "yarn@1.22.0"
90
+ }