@fctc/interface-logic 1.2.9 → 1.3.0

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 (57) hide show
  1. package/dist/index.d.mts +1709 -24
  2. package/dist/index.d.ts +1709 -24
  3. package/dist/index.js +14 -16
  4. package/dist/index.mjs +14 -16
  5. package/package.json +87 -87
  6. package/dist/base-model-type-DvO53Lwi.d.mts +0 -7
  7. package/dist/base-model-type-DvO53Lwi.d.ts +0 -7
  8. package/dist/config.d.mts +0 -16
  9. package/dist/config.d.ts +0 -16
  10. package/dist/config.js +0 -2386
  11. package/dist/config.mjs +0 -2349
  12. package/dist/constants.d.mts +0 -131
  13. package/dist/constants.d.ts +0 -131
  14. package/dist/constants.js +0 -205
  15. package/dist/constants.mjs +0 -166
  16. package/dist/context-type-D5XefoL-.d.mts +0 -8
  17. package/dist/context-type-D5XefoL-.d.ts +0 -8
  18. package/dist/environment.d.mts +0 -42
  19. package/dist/environment.d.ts +0 -42
  20. package/dist/environment.js +0 -3094
  21. package/dist/environment.mjs +0 -3054
  22. package/dist/hook.d.mts +0 -340
  23. package/dist/hook.d.ts +0 -340
  24. package/dist/hook.js +0 -6019
  25. package/dist/hook.mjs +0 -5915
  26. package/dist/index-C_nK1Mii.d.mts +0 -19
  27. package/dist/index-C_nK1Mii.d.ts +0 -19
  28. package/dist/model.d.mts +0 -35
  29. package/dist/model.d.ts +0 -35
  30. package/dist/model.js +0 -3356
  31. package/dist/model.mjs +0 -3317
  32. package/dist/provider.d.mts +0 -16
  33. package/dist/provider.d.ts +0 -16
  34. package/dist/provider.js +0 -3603
  35. package/dist/provider.mjs +0 -3564
  36. package/dist/services.d.mts +0 -258
  37. package/dist/services.d.ts +0 -258
  38. package/dist/services.js +0 -4662
  39. package/dist/services.mjs +0 -4617
  40. package/dist/session-storage-CxkkEmQh.d.mts +0 -15
  41. package/dist/session-storage-CxkkEmQh.d.ts +0 -15
  42. package/dist/store.d.mts +0 -643
  43. package/dist/store.d.ts +0 -643
  44. package/dist/store.js +0 -814
  45. package/dist/store.mjs +0 -709
  46. package/dist/types.d.mts +0 -12
  47. package/dist/types.d.ts +0 -12
  48. package/dist/types.js +0 -18
  49. package/dist/types.mjs +0 -0
  50. package/dist/use-get-selection-QZu1jKqa.d.mts +0 -15
  51. package/dist/use-get-selection-QZu1jKqa.d.ts +0 -15
  52. package/dist/utils.d.mts +0 -96
  53. package/dist/utils.d.ts +0 -96
  54. package/dist/utils.js +0 -3003
  55. package/dist/utils.mjs +0 -2935
  56. package/dist/view-type-DodWYWDH.d.mts +0 -107
  57. package/dist/view-type-DodWYWDH.d.ts +0 -107
package/dist/types.d.ts DELETED
@@ -1,12 +0,0 @@
1
- export { C as ContextApi, D as DeleteParams, F as ForgotPasswordBody, G as GetAllParams, a as GetDetailParams, b as GetListParams, c as GetViewParams, L as LoginCredentialBody, O as OnChangeParams, R as ResetPasswordRequest, S as SaveParams, d as SocialTokenBody, e as Specification, U as UpdatePasswordRequest, V as View, f as ViewData, u as updatePasswordBody } from './view-type-DodWYWDH.js';
2
- export { B as BaseModelInit } from './base-model-type-DvO53Lwi.js';
3
- export { C as Context } from './context-type-D5XefoL-.js';
4
-
5
- interface Config {
6
- baseUrl: string;
7
- grantType: string;
8
- clientId: string;
9
- clientSecret: string;
10
- }
11
-
12
- export type { Config };
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/types.mjs DELETED
File without changes
@@ -1,15 +0,0 @@
1
- import * as _tanstack_react_query from '@tanstack/react-query';
2
-
3
- type GetSelectionType = {
4
- domain: any;
5
- context: any;
6
- model: string;
7
- specification?: any;
8
- };
9
- declare const useGetSelection: ({ data, queryKey, enabled, }: {
10
- data: GetSelectionType;
11
- queryKey: any[];
12
- enabled?: boolean;
13
- }) => _tanstack_react_query.UseQueryResult<any, Error>;
14
-
15
- export { type GetSelectionType as G, useGetSelection as u };
@@ -1,15 +0,0 @@
1
- import * as _tanstack_react_query from '@tanstack/react-query';
2
-
3
- type GetSelectionType = {
4
- domain: any;
5
- context: any;
6
- model: string;
7
- specification?: any;
8
- };
9
- declare const useGetSelection: ({ data, queryKey, enabled, }: {
10
- data: GetSelectionType;
11
- queryKey: any[];
12
- enabled?: boolean;
13
- }) => _tanstack_react_query.UseQueryResult<any, Error>;
14
-
15
- export { type GetSelectionType as G, useGetSelection as u };
package/dist/utils.d.mts DELETED
@@ -1,96 +0,0 @@
1
- import { C as Context } from './context-type-D5XefoL-.mjs';
2
- export { L as LocalStorageUtilsType, S as SessionStorageUtilsType, l as localStorageUtils, s as sessionStorageUtils } from './session-storage-CxkkEmQh.mjs';
3
-
4
- declare class WesapError extends Error {
5
- code: number;
6
- constructor(message: string, code: number);
7
- }
8
- declare function handleError(error: Error, env: {
9
- services: {
10
- notification: {
11
- error: (message: string) => void;
12
- };
13
- };
14
- }): void;
15
-
16
- declare const formatCurrency: (amount: number, currency?: string) => string;
17
- declare const formatDate: (date: string | Date, locale?: string) => string;
18
- declare const validateAndParseDate: (input: string, isDateTime?: boolean) => string | null;
19
-
20
- type AST = {
21
- type: number;
22
- value: any;
23
- };
24
- type Condition = [string | 0 | 1, string, any];
25
- type DomainListRepr = ('&' | '|' | '!' | Condition)[];
26
- type DomainRepr = DomainListRepr | string | Domain;
27
- declare class Domain {
28
- ast: AST;
29
- static TRUE: Domain;
30
- static FALSE: Domain;
31
- static combine(domains: DomainRepr[], operator: 'AND' | 'OR'): Domain;
32
- static and(domains: DomainRepr[]): Domain;
33
- static or(domains: DomainRepr[]): Domain;
34
- static not(domain: DomainRepr): Domain;
35
- static removeDomainLeaves(domain: DomainRepr, keysToRemove: string[]): Domain;
36
- constructor(descr?: DomainRepr);
37
- contains(record: any): boolean;
38
- toString(): string;
39
- toList(context: Record<string, any>): DomainListRepr;
40
- toJson(): DomainListRepr | string;
41
- }
42
-
43
- declare const evalJSONContext: (_context: any, context?: {}) => Context | null;
44
- declare const evalJSONDomain: (domain: any, context: any) => any;
45
- declare const formatSortingString: (input: string | null | undefined) => string | null;
46
- declare const domainHelper: {
47
- checkDomain: (context: any, domain: any) => boolean;
48
- matchDomains: (context: any, domains: any) => boolean;
49
- Domain: typeof Domain;
50
- };
51
- declare const toQueryString: (params: Record<string, string | number | boolean>) => string;
52
- declare const convertFloatToTime: (floatValue: number) => string;
53
- declare const convertTimeToFloat: (timeString: string) => number;
54
- declare const stringToColor: (name: string, id: number) => string;
55
- declare const getFieldsOnChange: (fields: any) => any;
56
- declare const filterFieldDirty: ({ id, viewData, formValues, dirtyFields, model, defaultData, }: {
57
- id?: any;
58
- viewData?: any;
59
- formValues?: any;
60
- dirtyFields?: any;
61
- model?: any;
62
- defaultData?: any;
63
- }) => any;
64
- type MergeableObject = {
65
- [key: string]: any;
66
- } | null | undefined;
67
- declare const mergeObjects: <T extends MergeableObject, U extends MergeableObject>(object1: T, object2: U) => (T & U) | undefined;
68
- declare const formatUrlPath: ({ viewType, aid, model, id, actionPath, }: {
69
- viewType: "list" | "form" | "kanban" | any;
70
- actionPath: string;
71
- aid: string | number;
72
- model: string;
73
- id?: string | number;
74
- }) => string;
75
- declare const removeUndefinedFields: <T extends Record<string, any>>(obj: T) => Partial<T>;
76
- declare const useTabModel: (viewData: any, onchangeData: any) => any;
77
- declare const isBase64File: (str: any) => boolean;
78
- declare const isBase64Image: (str: any) => boolean;
79
- declare const checkIsImageLink: (url: any) => boolean;
80
- declare const formatFileSize: (size: any) => string;
81
- declare const getSubdomain: (url?: string) => string | null;
82
- declare const resequence: (arr: any, start: any, end: any) => any;
83
- declare const getOffSet: (arr: any, start: any, end: any) => any;
84
- declare const copyTextToClipboard: (text: string) => Promise<void>;
85
- declare const updateTokenParamInOriginalRequest: (originalRequest: {
86
- data?: any;
87
- }, newAccessToken: string) => any;
88
- declare const isObjectEmpty: (obj: object) => boolean;
89
- declare const useField: (props: any) => {
90
- invisible: boolean;
91
- required: boolean;
92
- readonly: boolean;
93
- nameField: string | null;
94
- };
95
-
96
- export { WesapError, checkIsImageLink, convertFloatToTime, convertTimeToFloat, copyTextToClipboard, domainHelper, evalJSONContext, evalJSONDomain, filterFieldDirty, formatCurrency, formatDate, formatFileSize, formatSortingString, formatUrlPath, getFieldsOnChange, getOffSet, getSubdomain, handleError, isBase64File, isBase64Image, isObjectEmpty, mergeObjects, removeUndefinedFields, resequence, stringToColor, toQueryString, updateTokenParamInOriginalRequest, useField, useTabModel, validateAndParseDate };
package/dist/utils.d.ts DELETED
@@ -1,96 +0,0 @@
1
- import { C as Context } from './context-type-D5XefoL-.js';
2
- export { L as LocalStorageUtilsType, S as SessionStorageUtilsType, l as localStorageUtils, s as sessionStorageUtils } from './session-storage-CxkkEmQh.js';
3
-
4
- declare class WesapError extends Error {
5
- code: number;
6
- constructor(message: string, code: number);
7
- }
8
- declare function handleError(error: Error, env: {
9
- services: {
10
- notification: {
11
- error: (message: string) => void;
12
- };
13
- };
14
- }): void;
15
-
16
- declare const formatCurrency: (amount: number, currency?: string) => string;
17
- declare const formatDate: (date: string | Date, locale?: string) => string;
18
- declare const validateAndParseDate: (input: string, isDateTime?: boolean) => string | null;
19
-
20
- type AST = {
21
- type: number;
22
- value: any;
23
- };
24
- type Condition = [string | 0 | 1, string, any];
25
- type DomainListRepr = ('&' | '|' | '!' | Condition)[];
26
- type DomainRepr = DomainListRepr | string | Domain;
27
- declare class Domain {
28
- ast: AST;
29
- static TRUE: Domain;
30
- static FALSE: Domain;
31
- static combine(domains: DomainRepr[], operator: 'AND' | 'OR'): Domain;
32
- static and(domains: DomainRepr[]): Domain;
33
- static or(domains: DomainRepr[]): Domain;
34
- static not(domain: DomainRepr): Domain;
35
- static removeDomainLeaves(domain: DomainRepr, keysToRemove: string[]): Domain;
36
- constructor(descr?: DomainRepr);
37
- contains(record: any): boolean;
38
- toString(): string;
39
- toList(context: Record<string, any>): DomainListRepr;
40
- toJson(): DomainListRepr | string;
41
- }
42
-
43
- declare const evalJSONContext: (_context: any, context?: {}) => Context | null;
44
- declare const evalJSONDomain: (domain: any, context: any) => any;
45
- declare const formatSortingString: (input: string | null | undefined) => string | null;
46
- declare const domainHelper: {
47
- checkDomain: (context: any, domain: any) => boolean;
48
- matchDomains: (context: any, domains: any) => boolean;
49
- Domain: typeof Domain;
50
- };
51
- declare const toQueryString: (params: Record<string, string | number | boolean>) => string;
52
- declare const convertFloatToTime: (floatValue: number) => string;
53
- declare const convertTimeToFloat: (timeString: string) => number;
54
- declare const stringToColor: (name: string, id: number) => string;
55
- declare const getFieldsOnChange: (fields: any) => any;
56
- declare const filterFieldDirty: ({ id, viewData, formValues, dirtyFields, model, defaultData, }: {
57
- id?: any;
58
- viewData?: any;
59
- formValues?: any;
60
- dirtyFields?: any;
61
- model?: any;
62
- defaultData?: any;
63
- }) => any;
64
- type MergeableObject = {
65
- [key: string]: any;
66
- } | null | undefined;
67
- declare const mergeObjects: <T extends MergeableObject, U extends MergeableObject>(object1: T, object2: U) => (T & U) | undefined;
68
- declare const formatUrlPath: ({ viewType, aid, model, id, actionPath, }: {
69
- viewType: "list" | "form" | "kanban" | any;
70
- actionPath: string;
71
- aid: string | number;
72
- model: string;
73
- id?: string | number;
74
- }) => string;
75
- declare const removeUndefinedFields: <T extends Record<string, any>>(obj: T) => Partial<T>;
76
- declare const useTabModel: (viewData: any, onchangeData: any) => any;
77
- declare const isBase64File: (str: any) => boolean;
78
- declare const isBase64Image: (str: any) => boolean;
79
- declare const checkIsImageLink: (url: any) => boolean;
80
- declare const formatFileSize: (size: any) => string;
81
- declare const getSubdomain: (url?: string) => string | null;
82
- declare const resequence: (arr: any, start: any, end: any) => any;
83
- declare const getOffSet: (arr: any, start: any, end: any) => any;
84
- declare const copyTextToClipboard: (text: string) => Promise<void>;
85
- declare const updateTokenParamInOriginalRequest: (originalRequest: {
86
- data?: any;
87
- }, newAccessToken: string) => any;
88
- declare const isObjectEmpty: (obj: object) => boolean;
89
- declare const useField: (props: any) => {
90
- invisible: boolean;
91
- required: boolean;
92
- readonly: boolean;
93
- nameField: string | null;
94
- };
95
-
96
- export { WesapError, checkIsImageLink, convertFloatToTime, convertTimeToFloat, copyTextToClipboard, domainHelper, evalJSONContext, evalJSONDomain, filterFieldDirty, formatCurrency, formatDate, formatFileSize, formatSortingString, formatUrlPath, getFieldsOnChange, getOffSet, getSubdomain, handleError, isBase64File, isBase64Image, isObjectEmpty, mergeObjects, removeUndefinedFields, resequence, stringToColor, toQueryString, updateTokenParamInOriginalRequest, useField, useTabModel, validateAndParseDate };