@fctc/interface-logic 4.5.4 → 4.5.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.
Files changed (45) hide show
  1. package/dist/chunk-CI6PEZ77.mjs +1 -0
  2. package/dist/chunk-KPELPP6F.mjs +1 -0
  3. package/dist/chunk-LCUY2BJU.mjs +1 -0
  4. package/dist/chunk-LYD7QJQX.mjs +2 -0
  5. package/dist/chunk-Y5QM3Y5X.mjs +1 -0
  6. package/dist/chunk-Y65DQP66.mjs +5 -0
  7. package/dist/configs.mjs +1 -2544
  8. package/dist/constants.mjs +1 -293
  9. package/dist/environment.d.mts +1 -1
  10. package/dist/environment.mjs +1 -2669
  11. package/dist/hooks.d.mts +1 -7
  12. package/dist/hooks.mjs +1 -8792
  13. package/dist/{local-storage-BPvoMGYJ.d.mts → local-storage-AbiOQTLK.d.mts} +1 -1
  14. package/dist/models.mjs +1 -120
  15. package/dist/provider.d.mts +103 -52
  16. package/dist/provider.mjs +1 -9487
  17. package/dist/services.mjs +1 -6912
  18. package/dist/utils.d.mts +33 -61
  19. package/dist/utils.mjs +1 -3030
  20. package/package.json +78 -92
  21. package/dist/base-model-type-DD8uZnDP.d.ts +0 -8
  22. package/dist/configs.d.ts +0 -12
  23. package/dist/configs.js +0 -2581
  24. package/dist/constants.d.ts +0 -235
  25. package/dist/constants.js +0 -335
  26. package/dist/environment.d.ts +0 -56
  27. package/dist/environment.js +0 -2708
  28. package/dist/hooks.d.ts +0 -828
  29. package/dist/hooks.js +0 -8949
  30. package/dist/local-storage-BPvoMGYJ.d.ts +0 -10
  31. package/dist/models.d.ts +0 -14
  32. package/dist/models.js +0 -147
  33. package/dist/provider.d.ts +0 -214
  34. package/dist/provider.js +0 -9533
  35. package/dist/services.d.ts +0 -700
  36. package/dist/services.js +0 -6959
  37. package/dist/store.d.mts +0 -382
  38. package/dist/store.d.ts +0 -382
  39. package/dist/store.js +0 -823
  40. package/dist/store.mjs +0 -717
  41. package/dist/types.d.ts +0 -19
  42. package/dist/types.js +0 -18
  43. package/dist/utils.d.ts +0 -112
  44. package/dist/utils.js +0 -3099
  45. package/dist/view-type-CfcWWR0w.d.ts +0 -137
package/dist/types.d.ts DELETED
@@ -1,19 +0,0 @@
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-CfcWWR0w.js';
2
- export { B as BaseModelInit } from './base-model-type-DD8uZnDP.js';
3
-
4
- interface Config {
5
- baseUrl: string;
6
- grantType: string;
7
- clientId: string;
8
- clientSecret: string;
9
- database: string;
10
- }
11
-
12
- interface Context {
13
- uid: number;
14
- lang: string;
15
- allowCompanys: number[];
16
- [key: string]: any;
17
- }
18
-
19
- export type { Config, Context };
package/dist/types.js DELETED
@@ -1,18 +0,0 @@
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/utils.d.ts DELETED
@@ -1,112 +0,0 @@
1
- declare const sessionStorageUtils: {
2
- getMenuFocus: () => IMenu;
3
- setMenuFocus: (menuTree: IMenu) => void;
4
- setActionData: (actData: any) => void;
5
- getActionData: () => any | null;
6
- getViewData: () => any | null;
7
- setViewData: (viewData: any) => void;
8
- getBrowserSession: () => string | null;
9
- getXNode: () => any | null;
10
- setXNode: (xNode: any) => void;
11
- };
12
- interface IMenu {
13
- id: number | undefined;
14
- service: string;
15
- }
16
-
17
- declare class WesapError extends Error {
18
- code: number;
19
- constructor(message: string, code: number);
20
- }
21
- declare function handleError(error: Error, env: {
22
- services: {
23
- notification: {
24
- error: (message: string) => void;
25
- };
26
- };
27
- }): void;
28
-
29
- declare const formatCurrency: (amount: number, currency?: string) => string;
30
- declare const formatDate: (date: string | Date, locale?: string) => string;
31
- declare const validateAndParseDate: (input: string, isDateTime?: boolean) => string | null;
32
-
33
- type AST = {
34
- type: number;
35
- value: any;
36
- };
37
- type Condition = [string | 0 | 1, string, any];
38
- type DomainListRepr = ('&' | '|' | '!' | Condition)[];
39
- type DomainRepr = DomainListRepr | string | Domain;
40
- declare class Domain {
41
- ast: AST;
42
- static TRUE: Domain;
43
- static FALSE: Domain;
44
- static combine(domains: DomainRepr[], operator: 'AND' | 'OR'): Domain;
45
- static and(domains: DomainRepr[]): Domain;
46
- static or(domains: DomainRepr[]): Domain;
47
- static not(domain: DomainRepr): Domain;
48
- static removeDomainLeaves(domain: DomainRepr, keysToRemove: string[]): Domain;
49
- constructor(descr?: DomainRepr);
50
- contains(record: any): boolean;
51
- toString(): string;
52
- toList(context: Record<string, any>): DomainListRepr;
53
- toJson(): DomainListRepr | string;
54
- }
55
-
56
- declare const evalJSONContext: (_context: any, context?: {}) => any;
57
- declare const evalJSONDomain: (domain: any, context: any) => any;
58
- declare const formatSortingString: (input: string | null | undefined) => string | null;
59
- declare const domainHelper: {
60
- checkDomain: (context: any, domain: any) => boolean;
61
- matchDomains: (context: any, domains: any) => boolean;
62
- Domain: typeof Domain;
63
- };
64
- declare const toQueryString: (params: Record<string, string | number | boolean>) => string;
65
- declare const convertFloatToTime: (floatValue: number) => string;
66
- declare const convertTimeToFloat: (timeString: string) => number;
67
- declare const stringToColor: (name: string, id: number) => string;
68
- declare const getFieldsOnChange: (fields: any) => any;
69
- declare const filterFieldDirty: ({ id, viewData, formValues, dirtyFields, model, defaultData, keepZeroValue, }: {
70
- id?: any;
71
- viewData?: any;
72
- formValues?: any;
73
- dirtyFields?: any;
74
- model?: any;
75
- defaultData?: any;
76
- keepZeroValue?: boolean;
77
- }) => any;
78
- type MergeableObject = {
79
- [key: string]: any;
80
- } | null | undefined;
81
- declare const mergeObjects: <T extends MergeableObject, U extends MergeableObject>(object1: T, object2: U) => (T & U) | undefined;
82
- declare const formatUrlPath: ({ viewType, aid, model, id, actionPath, }: {
83
- viewType: "list" | "form" | "kanban" | any;
84
- actionPath: string;
85
- aid: string | number;
86
- model: string;
87
- id?: string | number;
88
- }) => string;
89
- declare const removeUndefinedFields: <T extends Record<string, any>>(obj: T) => Partial<T>;
90
- declare const useTabModel: (viewData: any, onchangeData: any) => any;
91
- declare const isBase64File: (str: any) => boolean;
92
- declare const isBase64Image: (str: any) => boolean;
93
- declare const checkIsImageLink: (url: any) => boolean;
94
- declare const formatFileSize: (size: any) => string;
95
- declare const getSubdomain: (url?: string) => string | null;
96
- declare const resequence: (arr: any, start: any, end: any) => any;
97
- declare const getOffSet: (arr: any, start: any, end: any) => any;
98
- declare const copyTextToClipboard: (text: string) => Promise<void>;
99
- declare const updateTokenParamInOriginalRequest: (originalRequest: {
100
- data?: any;
101
- }, newAccessToken: string) => any;
102
- declare const isObjectEmpty: (obj: object) => boolean;
103
- declare const useField: (props: any) => {
104
- invisible: boolean;
105
- required: boolean;
106
- readonly: boolean;
107
- nameField: string | null;
108
- };
109
- declare const downloadFile: (url: string, filename?: string) => Promise<void>;
110
- declare const extractIdFromDomain: (domain?: [string, string, any][]) => number | null;
111
-
112
- export { WesapError, checkIsImageLink, convertFloatToTime, convertTimeToFloat, copyTextToClipboard, domainHelper, downloadFile, evalJSONContext, evalJSONDomain, extractIdFromDomain, filterFieldDirty, formatCurrency, formatDate, formatFileSize, formatSortingString, formatUrlPath, getFieldsOnChange, getOffSet, getSubdomain, handleError, isBase64File, isBase64Image, isObjectEmpty, mergeObjects, removeUndefinedFields, resequence, sessionStorageUtils, stringToColor, toQueryString, updateTokenParamInOriginalRequest, useField, useTabModel, validateAndParseDate };