@fctc/interface-logic 1.0.1 → 1.0.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/dist/base-model-type-DvO53Lwi.d.mts +7 -0
- package/dist/base-model-type-DvO53Lwi.d.ts +7 -0
- package/dist/config.d.mts +16 -0
- package/dist/config.d.ts +16 -0
- package/dist/config.js +2355 -0
- package/dist/config.mjs +2318 -0
- package/dist/constants.d.mts +128 -0
- package/dist/constants.d.ts +128 -0
- package/dist/constants.js +202 -0
- package/dist/constants.mjs +163 -0
- package/dist/context-type-D5XefoL-.d.mts +8 -0
- package/dist/context-type-D5XefoL-.d.ts +8 -0
- package/dist/environment.d.mts +41 -0
- package/dist/environment.d.ts +41 -0
- package/dist/environment.js +3061 -0
- package/dist/environment.mjs +3021 -0
- package/dist/hook.d.mts +292 -0
- package/dist/hook.d.ts +292 -0
- package/dist/hook.js +5683 -0
- package/dist/hook.mjs +5587 -0
- package/dist/index-C_nK1Mii.d.mts +19 -0
- package/dist/index-C_nK1Mii.d.ts +19 -0
- package/dist/index.d.mts +1 -1389
- package/dist/index.d.ts +1 -1389
- package/dist/index.js +0 -6856
- package/dist/index.mjs +0 -6629
- package/dist/model.d.mts +35 -0
- package/dist/model.d.ts +35 -0
- package/dist/model.js +3320 -0
- package/dist/model.mjs +3281 -0
- package/dist/provider.d.mts +15 -0
- package/dist/provider.d.ts +15 -0
- package/dist/provider.js +6566 -0
- package/dist/provider.mjs +6550 -0
- package/dist/services.d.mts +224 -0
- package/dist/services.d.ts +224 -0
- package/dist/services.js +4477 -0
- package/dist/services.mjs +4432 -0
- package/dist/session-storage-CxkkEmQh.d.mts +15 -0
- package/dist/session-storage-CxkkEmQh.d.ts +15 -0
- package/dist/store.d.mts +643 -0
- package/dist/store.d.ts +643 -0
- package/dist/store.js +814 -0
- package/dist/store.mjs +709 -0
- package/dist/types.d.mts +12 -0
- package/dist/types.d.ts +12 -0
- package/dist/types.js +18 -0
- package/dist/types.mjs +0 -0
- package/dist/use-get-selection-QZu1jKqa.d.mts +15 -0
- package/dist/use-get-selection-QZu1jKqa.d.ts +15 -0
- package/dist/utils.d.mts +87 -0
- package/dist/utils.d.ts +87 -0
- package/dist/utils.js +2947 -0
- package/dist/utils.mjs +2881 -0
- package/dist/view-type-y6vtF3wg.d.mts +106 -0
- package/dist/view-type-y6vtF3wg.d.ts +106 -0
- package/package.json +53 -12
package/dist/types.d.ts
ADDED
@@ -0,0 +1,12 @@
|
|
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-y6vtF3wg.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
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
|
@@ -0,0 +1,15 @@
|
|
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 };
|
@@ -0,0 +1,15 @@
|
|
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
ADDED
@@ -0,0 +1,87 @@
|
|
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 isObjectEmpty: (obj: object) => boolean;
|
86
|
+
|
87
|
+
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, useTabModel, validateAndParseDate };
|
package/dist/utils.d.ts
ADDED
@@ -0,0 +1,87 @@
|
|
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 isObjectEmpty: (obj: object) => boolean;
|
86
|
+
|
87
|
+
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, useTabModel, validateAndParseDate };
|