@sarafapp/iron_core 1.0.66 → 1.0.67
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/core/src/BaseModel.d.ts +45 -0
- package/dist/core/src/Utils.d.ts +4 -0
- package/dist/core/src/accessHandling/AccessControl.d.ts +10 -0
- package/dist/core/src/accessHandling/AccessLevel.d.ts +13 -0
- package/dist/core/src/accessHandling/Accessible.d.ts +3 -0
- package/dist/core/src/accessHandling/EveryDirectiveAccess.d.ts +4 -0
- package/dist/core/src/accessHandling/SSO/AuthorizationDirective.d.ts +17 -0
- package/dist/core/src/accessHandling/SSO/AuthorizationService.d.ts +17 -0
- package/dist/core/src/accessHandling/SSO/EveryLevelAuthorizationDirective.d.ts +4 -0
- package/dist/core/src/accessHandling/SSO/SomeLevelsAuthorizationDirective.d.ts +4 -0
- package/dist/core/src/accessHandling/SomeDirectiveAccess.d.ts +4 -0
- package/dist/core/src/accessHandling/index.d.ts +9 -0
- package/dist/core/src/baseDirective/BeforeMountDirective.d.ts +3 -0
- package/dist/core/src/baseDirective/BeforeUnMountDirective.d.ts +3 -0
- package/dist/core/src/baseDirective/BeforeUpdateDirective.d.ts +3 -0
- package/dist/core/src/baseDirective/CreatedDirective.d.ts +3 -0
- package/dist/core/src/baseDirective/MountedDirective.d.ts +3 -0
- package/dist/core/src/baseDirective/UnMountedDirective.d.ts +3 -0
- package/dist/core/src/baseDirective/UpdateDirective.d.ts +3 -0
- package/dist/core/src/baseDirective/index.d.ts +7 -0
- package/dist/core/src/baseForm/BaseRequestBodyFilter.d.ts +4 -0
- package/dist/core/src/baseForm/FormManager.d.ts +18 -0
- package/dist/core/src/baseForm/InputControl.d.ts +40 -0
- package/dist/core/src/baseForm/InputControlBuilder.d.ts +16 -0
- package/dist/core/src/baseForm/InputControlData.d.ts +15 -0
- package/dist/core/src/baseForm/RequestBodyFilter.d.ts +3 -0
- package/dist/core/src/baseForm/TouchSensitiveForm.d.ts +9 -0
- package/dist/core/src/baseForm/UseForm.d.ts +18 -0
- package/dist/core/src/baseForm/index.d.ts +8 -0
- package/dist/core/src/baseSchedule/Schedule.d.ts +3 -0
- package/dist/core/src/baseSchedule/Scheduler.d.ts +8 -0
- package/dist/core/src/baseSchedule/index.d.ts +2 -0
- package/dist/core/src/baseTable/BaseTable.d.ts +47 -0
- package/dist/core/src/baseTable/Constants.d.ts +13 -0
- package/dist/core/src/baseTable/OnDestory.d.ts +3 -0
- package/dist/core/src/baseTable/RowActionSource.d.ts +4 -0
- package/dist/core/src/baseTable/RowClick.d.ts +3 -0
- package/dist/core/src/baseTable/RowDoubleClick.d.ts +3 -0
- package/dist/core/src/baseTable/RowMetaClick.d.ts +3 -0
- package/dist/core/src/baseTable/SelectableTable.d.ts +19 -0
- package/dist/core/src/baseTable/TableAction.d.ts +8 -0
- package/dist/core/src/baseTable/TableHeaderSchema.d.ts +27 -0
- package/dist/core/src/baseTable/TableLoader.d.ts +3 -0
- package/dist/core/src/baseTable/TablePaginate.d.ts +3 -0
- package/dist/core/src/baseTable/TableService.d.ts +9 -0
- package/dist/core/src/baseTable/TableSort.d.ts +4 -0
- package/dist/core/src/baseTable/TableSummarySchema.d.ts +9 -0
- package/dist/core/src/baseTable/generator/SelectableTableGenerator.d.ts +14 -0
- package/dist/core/src/baseTable/generator/TableCellComponentRegistry.d.ts +7 -0
- package/dist/core/src/baseTable/generator/TableConfig.d.ts +7 -0
- package/dist/core/src/baseTable/generator/TableGenerator.d.ts +37 -0
- package/dist/core/src/baseTable/generator/TableSource.d.ts +24 -0
- package/dist/core/src/baseTable/index.d.ts +23 -0
- package/dist/core/src/baseTable/moduleConnection/Action.d.ts +3 -0
- package/dist/core/src/baseTable/moduleConnection/Column.d.ts +3 -0
- package/dist/core/src/baseTable/moduleConnection/Table.d.ts +4 -0
- package/dist/core/src/baseTable/moduleConnection/TableDestroy.d.ts +2 -0
- package/dist/core/src/baseTable/moduleConnection/TableRowClick.d.ts +2 -0
- package/dist/core/src/baseTable/moduleConnection/generator/GColumn.d.ts +2 -0
- package/dist/core/src/baseTable/moduleConnection/generator/GTable.d.ts +2 -0
- package/dist/core/src/composables/UseCrud.d.ts +10 -0
- package/dist/core/src/composables/UseData.d.ts +15 -0
- package/dist/core/src/composables/UseLoadingStatus.d.ts +15 -0
- package/dist/core/src/composables/UseParams.d.ts +17 -0
- package/dist/core/src/composables/UseRepository.d.ts +67 -0
- package/dist/core/src/composables/UseState.d.ts +2 -0
- package/dist/core/src/composables/UseStaticTableService.d.ts +5 -0
- package/dist/core/src/composables/index.d.ts +7 -0
- package/dist/core/src/constants/Constants.d.ts +108 -0
- package/dist/core/src/constants/index.d.ts +1 -0
- package/dist/core/src/crudService/CrudService.d.ts +22 -0
- package/dist/core/src/crudService/index.d.ts +1 -0
- package/dist/core/src/dateHandling/Constants.d.ts +5 -0
- package/dist/core/src/dateHandling/Converter.d.ts +5 -0
- package/dist/core/src/dateHandling/JalaliDateSetup.d.ts +1 -0
- package/dist/core/src/dateHandling/Model.d.ts +12 -0
- package/dist/core/src/dateHandling/Utils.d.ts +8 -0
- package/dist/core/src/dateHandling/index.d.ts +5 -0
- package/dist/core/src/debounce/DebounceAction.d.ts +4 -0
- package/dist/core/src/debounce/DebounceService.d.ts +9 -0
- package/dist/core/src/debounce/index.d.ts +2 -0
- package/dist/core/src/deviceManagement/Constants.d.ts +4 -0
- package/dist/core/src/deviceManagement/Visibility.d.ts +4 -0
- package/dist/core/src/deviceManagement/VisibilityManager.d.ts +6 -0
- package/dist/core/src/deviceManagement/index.d.ts +3 -0
- package/dist/core/src/errorHandling/ErrorHandler.d.ts +3 -0
- package/dist/core/src/errorHandling/HandleError.d.ts +2 -0
- package/dist/core/src/errorHandling/index.d.ts +2 -0
- package/dist/core/src/eventSystem/CustomEventDispatcher.d.ts +5 -0
- package/dist/core/src/eventSystem/Model.d.ts +8 -0
- package/dist/core/src/eventSystem/OnEvent.d.ts +1 -0
- package/dist/core/src/eventSystem/index.d.ts +3 -0
- package/dist/core/src/feedbackHandling/FailureFeedback.d.ts +3 -0
- package/dist/core/src/feedbackHandling/Feedback.d.ts +11 -0
- package/dist/core/src/feedbackHandling/HandleFeedback.d.ts +2 -0
- package/dist/core/src/feedbackHandling/InfoFeedback.d.ts +3 -0
- package/dist/core/src/feedbackHandling/SuccessFeedback.d.ts +3 -0
- package/dist/core/src/feedbackHandling/WarningFeedback.d.ts +3 -0
- package/dist/core/src/feedbackHandling/index.d.ts +6 -0
- package/dist/core/src/httpClient/ApiBuilder.d.ts +14 -0
- package/dist/core/src/httpClient/ErrorHandlerRegistry.d.ts +10 -0
- package/dist/core/src/httpClient/HttpClient.d.ts +14 -0
- package/dist/core/src/httpClient/Interceptor.d.ts +4 -0
- package/dist/core/src/httpClient/index.d.ts +4 -0
- package/dist/core/src/initializer/ApplicationInitializer.d.ts +6 -0
- package/dist/core/src/initializer/Initializer.d.ts +3 -0
- package/dist/core/src/initializer/index.d.ts +2 -0
- package/dist/core/src/json/JsonMapper.d.ts +18 -0
- package/dist/core/src/json/index.d.ts +1 -0
- package/dist/core/src/layout/Constants.d.ts +10 -0
- package/dist/core/src/layout/DialogService.d.ts +406 -0
- package/dist/core/src/layout/DrawerService.d.ts +14 -0
- package/dist/core/src/layout/Toast.d.ts +8 -0
- package/dist/core/src/layout/index.d.ts +4 -0
- package/dist/core/src/lib/Constants.d.ts +20 -0
- package/dist/core/src/lib/Formatter.d.ts +10 -0
- package/dist/core/src/lib/Util.d.ts +12 -0
- package/dist/core/src/lib/index.d.ts +3 -0
- package/dist/core/src/observables/AbstractSubject.d.ts +7 -0
- package/dist/core/src/observables/BehaviorSubject.d.ts +16 -0
- package/dist/core/src/observables/Observer.d.ts +3 -0
- package/dist/core/src/observables/Subject.d.ts +6 -0
- package/dist/core/src/observables/index.d.ts +4 -0
- package/dist/core/src/process/Proccess.d.ts +9 -0
- package/dist/core/src/process/ProcessManager.d.ts +10 -0
- package/dist/core/src/process/index.d.ts +2 -0
- package/dist/core/src/repository/Params.d.ts +11 -0
- package/dist/core/src/repository/Repository.d.ts +38 -0
- package/dist/core/src/repository/SyncDetail.d.ts +5 -0
- package/dist/core/src/repository/index.d.ts +4 -0
- package/dist/core/src/repository/model.d.ts +5 -0
- package/dist/core/src/routeGuard/RouteGuard.d.ts +7 -0
- package/dist/core/src/routeGuard/index.d.ts +1 -0
- package/dist/core/src/search/client/ClientArraySearch.d.ts +4 -0
- package/dist/core/src/search/client/ClientSearch.d.ts +3 -0
- package/dist/core/src/search/index.d.ts +2 -0
- package/dist/core/src/sort/SortDetail.d.ts +6 -0
- package/dist/core/src/sort/client/Sorter.d.ts +6 -0
- package/dist/core/src/sort/index.d.ts +4 -0
- package/dist/core/src/sort/strategies/SimpleSort.d.ts +5 -0
- package/dist/core/src/sort/strategies/SortStrategy.d.ts +4 -0
- package/dist/core/src/types/Global.d.ts +1 -0
- package/dist/core/src/types/index.d.ts +1 -0
- package/dist/core/src/validators/Validator.d.ts +4 -0
- package/dist/core/src/validators/index.d.ts +1 -0
- package/dist/core/src/webSocket/Constants.d.ts +6 -0
- package/dist/core/src/webSocket/Model.d.ts +6 -0
- package/dist/core/src/webSocket/WebSocketService.d.ts +30 -0
- package/dist/core/src/webSocket/index.d.ts +3 -0
- package/dist/example-vue/src/AntTableConfig.d.ts +6 -0
- package/dist/example-vue/src/TableService.d.ts +12 -0
- package/dist/example-vue/src/TextCell.vue.d.ts +5 -0
- package/dist/example-vue/src/app/App.vue.d.ts +2 -0
- package/dist/example-vue/src/app/router/index.d.ts +1 -0
- package/dist/example-vue/src/app/screens/Index.vue.d.ts +2 -0
- package/dist/example-vue/src/main.d.ts +0 -0
- package/package.json +4 -1
- package/index.ts +0 -37
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
export declare class Amount {
|
|
2
|
+
value: string;
|
|
3
|
+
symbol: string;
|
|
4
|
+
get tradeValueInNumber(): number;
|
|
5
|
+
get truncatedValue(): string;
|
|
6
|
+
}
|
|
7
|
+
export declare class BaseModel {
|
|
8
|
+
id: number | string;
|
|
9
|
+
protected getTable<Table>(): Table;
|
|
10
|
+
}
|
|
11
|
+
export declare class MinifiedSymbolModel extends BaseModel {
|
|
12
|
+
symbol: string;
|
|
13
|
+
enName: string;
|
|
14
|
+
faName: string;
|
|
15
|
+
image: string;
|
|
16
|
+
}
|
|
17
|
+
export declare class TradeDate {
|
|
18
|
+
requestedDate: number;
|
|
19
|
+
executedDate: number;
|
|
20
|
+
constructor(requestedDate: number, executedDate: number);
|
|
21
|
+
get requestedDateInJalali(): string;
|
|
22
|
+
get requestedTime(): string;
|
|
23
|
+
get executedDateInJalali(): string;
|
|
24
|
+
get executedDateTime(): string;
|
|
25
|
+
}
|
|
26
|
+
export declare class TradeAmount {
|
|
27
|
+
requestedAmount: Amount;
|
|
28
|
+
executedAmount: Amount;
|
|
29
|
+
constructor(requestedAmount: Amount, executedAmount: Amount);
|
|
30
|
+
}
|
|
31
|
+
export declare class SymbolPriceInTrade {
|
|
32
|
+
symobl: string;
|
|
33
|
+
symbolPrice: number;
|
|
34
|
+
USDTPrice: number;
|
|
35
|
+
symbolImage: string;
|
|
36
|
+
USDTImage: string;
|
|
37
|
+
constructor(symbolPrice: number, USDTPrice: number, symbol: string, symbolImage: string, USDTImage: string);
|
|
38
|
+
get truncatedSymbolPrice(): string;
|
|
39
|
+
get truncatedUSDTPrice(): string;
|
|
40
|
+
}
|
|
41
|
+
export declare class SymbolInTrade {
|
|
42
|
+
soldSymbol: MinifiedSymbolModel;
|
|
43
|
+
buySymbol: MinifiedSymbolModel;
|
|
44
|
+
constructor(soldSymbol: MinifiedSymbolModel, buySymbol: MinifiedSymbolModel);
|
|
45
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { DirectiveBinding } from 'vue';
|
|
2
|
+
import { MountedDirective, UpdateDirective } from '../baseDirective';
|
|
3
|
+
export declare abstract class AccessControl implements MountedDirective, UpdateDirective {
|
|
4
|
+
protected accessService: any;
|
|
5
|
+
constructor();
|
|
6
|
+
mounted: (element: HTMLElement, binding: DirectiveBinding<string[]>) => void;
|
|
7
|
+
updated: (element: HTMLElement, binding: DirectiveBinding<string[]>) => void;
|
|
8
|
+
private checkAccess;
|
|
9
|
+
protected abstract hasAccess(accessLevels: string[]): boolean;
|
|
10
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Initializer } from '../initializer/Initializer';
|
|
2
|
+
export declare class AccessLevel implements Initializer {
|
|
3
|
+
private static Instance;
|
|
4
|
+
private availableAccesses;
|
|
5
|
+
private constructor();
|
|
6
|
+
setAvailableAccesses(accessToAdd: string[]): void;
|
|
7
|
+
private setAccessListToStorage;
|
|
8
|
+
everyAccess(accessesToCheck: string[]): boolean;
|
|
9
|
+
someAccess(accessesToCheck: string[]): boolean;
|
|
10
|
+
clearAvailableAccesses(): void;
|
|
11
|
+
initialize(): void;
|
|
12
|
+
static GetInstance(): AccessLevel;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { MountedDirective, UpdateDirective } from '../../baseDirective';
|
|
2
|
+
import { AuthorizationService } from './AuthorizationService';
|
|
3
|
+
export declare abstract class AuthorizationDirective implements MountedDirective, UpdateDirective {
|
|
4
|
+
protected _authorizationService: AuthorizationService;
|
|
5
|
+
constructor();
|
|
6
|
+
mounted(element: HTMLElement, binding: {
|
|
7
|
+
arg: string;
|
|
8
|
+
modifiers: Record<PropertyKey, boolean>;
|
|
9
|
+
}, _vnode: unknown): void;
|
|
10
|
+
updated(element: HTMLElement, binding: {
|
|
11
|
+
arg: string;
|
|
12
|
+
modifiers: Record<PropertyKey, boolean>;
|
|
13
|
+
}, _vnode: unknown): void;
|
|
14
|
+
private manageElement;
|
|
15
|
+
private getAccessLevels;
|
|
16
|
+
protected abstract hasAccess(scope: string, levels: string[]): boolean;
|
|
17
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Initializer } from '../../initializer/Initializer';
|
|
2
|
+
export declare class AuthorizationService implements Initializer {
|
|
3
|
+
private static _instance;
|
|
4
|
+
private _accessLevels;
|
|
5
|
+
private constructor();
|
|
6
|
+
initialize(): void;
|
|
7
|
+
setAccessLevels(levels: Record<PropertyKey, string[]>): void;
|
|
8
|
+
private setAccessLevelsToStorage;
|
|
9
|
+
private getAccessLevelsFromStorage;
|
|
10
|
+
getAccessLevelsOfScope(scope: string): Set<string>;
|
|
11
|
+
private setAccessLevelFromStorage;
|
|
12
|
+
everyAccess(scope: string, levels: string[]): boolean;
|
|
13
|
+
someAccess(scope: string, levels: string[]): boolean;
|
|
14
|
+
hasScope(scope: string): boolean;
|
|
15
|
+
clear(): void;
|
|
16
|
+
static GetInstance(): AuthorizationService;
|
|
17
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export { AccessLevel } from './AccessLevel';
|
|
2
|
+
export { AccessControl } from './AccessControl';
|
|
3
|
+
export type { Accessible } from './Accessible';
|
|
4
|
+
export { EveryAccess } from './EveryDirectiveAccess';
|
|
5
|
+
export { SomeAccess } from './SomeDirectiveAccess';
|
|
6
|
+
export * from './SSO/AuthorizationDirective';
|
|
7
|
+
export * from './SSO/AuthorizationService';
|
|
8
|
+
export * from './SSO/EveryLevelAuthorizationDirective';
|
|
9
|
+
export * from './SSO/SomeLevelsAuthorizationDirective';
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export type { BeforeMountDirective } from './BeforeMountDirective';
|
|
2
|
+
export type { BeforeUnMountDirective } from './BeforeUnMountDirective';
|
|
3
|
+
export type { BeforeUpdateDirective } from './BeforeUpdateDirective';
|
|
4
|
+
export type { CreatedDirective } from './CreatedDirective';
|
|
5
|
+
export type { MountedDirective } from './MountedDirective';
|
|
6
|
+
export type { UnMountedDirective } from './UnMountedDirective';
|
|
7
|
+
export type { UpdateDirective } from './UpdateDirective';
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { InputControl } from './InputControl';
|
|
2
|
+
import { BaseRequestBodyFilter } from './BaseRequestBodyFilter';
|
|
3
|
+
export declare class FormManager {
|
|
4
|
+
private _inputControls;
|
|
5
|
+
private _isValid;
|
|
6
|
+
private _id;
|
|
7
|
+
getInputControlsAsArray(): InputControl<unknown>[];
|
|
8
|
+
runValidation(shouldValidateInputControls?: boolean): Promise<void>;
|
|
9
|
+
addInputControls(inputControls: InputControl<unknown>[]): void;
|
|
10
|
+
getInputControl<T>(inputControlName: string): InputControl<T>;
|
|
11
|
+
resetControls(inputControlNames: string[]): void;
|
|
12
|
+
resetAll(): void;
|
|
13
|
+
createRequestBody<T>(requestBodyFilter?: BaseRequestBodyFilter): T;
|
|
14
|
+
setIsValid(isValid: boolean): void;
|
|
15
|
+
getIsValid(): boolean;
|
|
16
|
+
setId(id: number): void;
|
|
17
|
+
getId(): number;
|
|
18
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import { Nullable } from '../types';
|
|
2
|
+
import { Validator } from '../validators';
|
|
3
|
+
export declare class InputControl<T> {
|
|
4
|
+
private initialData;
|
|
5
|
+
private data;
|
|
6
|
+
private _validators;
|
|
7
|
+
private _id;
|
|
8
|
+
constructor(name: string, value: Nullable<T>);
|
|
9
|
+
private shouldRunValidation;
|
|
10
|
+
runValidation(isBlur?: boolean): Promise<void>;
|
|
11
|
+
private setFormToInvalidState;
|
|
12
|
+
private setFormToValidState;
|
|
13
|
+
reset(): void;
|
|
14
|
+
markAsInitial(): void;
|
|
15
|
+
setValidators(validators: Validator<T>[]): void;
|
|
16
|
+
getChangeSensitive(): boolean;
|
|
17
|
+
setChangeSensitive(isChangeSensitive: boolean): void;
|
|
18
|
+
getIsBlurSensitive(): boolean;
|
|
19
|
+
setIsBlurSensitive(isBlurSensitive: boolean): void;
|
|
20
|
+
getIsRequired(): boolean;
|
|
21
|
+
setIsRequired(isRequired: boolean): void;
|
|
22
|
+
getIsValid(): boolean;
|
|
23
|
+
setIsValid(isValid: boolean): void;
|
|
24
|
+
getIsIncludeInRequestBody(): boolean;
|
|
25
|
+
setIsIncludeInRequestBody(isIncludeInRequestBody: boolean): void;
|
|
26
|
+
getNotValidMessage(): string;
|
|
27
|
+
setNotValidMessage(notValidMessage: string): void;
|
|
28
|
+
getName(): string;
|
|
29
|
+
setName(name: string): void;
|
|
30
|
+
setId(id: number): void;
|
|
31
|
+
getId(): number;
|
|
32
|
+
getIsEmptySensitive(): boolean;
|
|
33
|
+
setIsEmptySensitive(value: boolean): void;
|
|
34
|
+
setHasCustomValidationCheck(hasCustomCheck: boolean): void;
|
|
35
|
+
setShouldRemoveValidationOnInteract(value: boolean): void;
|
|
36
|
+
getShouldRemoveValidationOnInteract(): boolean;
|
|
37
|
+
hasCustomValidationCheck(): boolean;
|
|
38
|
+
set value(value: Nullable<T>);
|
|
39
|
+
get value(): Nullable<T>;
|
|
40
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { InputControl } from './InputControl';
|
|
2
|
+
import { Validator } from '../validators';
|
|
3
|
+
export declare class InputControlBuilder<T> {
|
|
4
|
+
private _inputControl;
|
|
5
|
+
constructor(inputControl: InputControl<T>);
|
|
6
|
+
setValidators(validators: Validator<T>[]): this;
|
|
7
|
+
setChangeSensitive(): this;
|
|
8
|
+
setRequired(): this;
|
|
9
|
+
setValid(): this;
|
|
10
|
+
setBlurSensitive(): this;
|
|
11
|
+
setId(id: number): this;
|
|
12
|
+
removeEmptySensitive(): this;
|
|
13
|
+
setHasCustomValidationCheck(): this;
|
|
14
|
+
removeErrorOnInteract(): this;
|
|
15
|
+
build(): InputControl<T>;
|
|
16
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Nullable } from '../types';
|
|
2
|
+
export declare class InputControlData<T> {
|
|
3
|
+
value: Nullable<T>;
|
|
4
|
+
initialValue: Nullable<T>;
|
|
5
|
+
name: string;
|
|
6
|
+
isValid: boolean;
|
|
7
|
+
isBlurSensitive: boolean;
|
|
8
|
+
isRequired: boolean;
|
|
9
|
+
isIncludeInRequestBody: boolean;
|
|
10
|
+
isChangeSensitive: boolean;
|
|
11
|
+
notValidMessage: string;
|
|
12
|
+
isEmptySensitive: boolean;
|
|
13
|
+
hasCustomValidationCheck: boolean;
|
|
14
|
+
shouldRemoveValidationMessageOnInteract: boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { DirectiveBinding } from 'vue';
|
|
2
|
+
import { MountedDirective, BeforeUnMountDirective } from '../baseDirective';
|
|
3
|
+
import { InputControl } from './InputControl';
|
|
4
|
+
export declare class TouchSensitiveControl implements MountedDirective, BeforeUnMountDirective {
|
|
5
|
+
mounted: (element: HTMLInputElement, binding: DirectiveBinding<InputControl<unknown>>) => void;
|
|
6
|
+
beforeUnMount: (element: HTMLInputElement, binding: DirectiveBinding<InputControl<unknown>>) => void;
|
|
7
|
+
private handleBlur;
|
|
8
|
+
private handleFocus;
|
|
9
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { FormManager } from './FormManager';
|
|
2
|
+
import { FormValidationStatus } from '../constants';
|
|
3
|
+
export declare function useForm(form: FormManager, hasCustomValidation?: boolean): {
|
|
4
|
+
reactiveForm: {
|
|
5
|
+
getInputControlsAsArray: () => import('./InputControl').InputControl<unknown>[];
|
|
6
|
+
runValidation: (shouldValidateInputControls?: boolean) => Promise<void>;
|
|
7
|
+
addInputControls: (inputControls: import('./InputControl').InputControl<unknown>[]) => void;
|
|
8
|
+
getInputControl: <T>(inputControlName: string) => import('./InputControl').InputControl<T>;
|
|
9
|
+
resetControls: (inputControlNames: string[]) => void;
|
|
10
|
+
resetAll: () => void;
|
|
11
|
+
createRequestBody: <T>(requestBodyFilter?: import('./BaseRequestBodyFilter').BaseRequestBodyFilter) => T;
|
|
12
|
+
setIsValid: (isValid: boolean) => void;
|
|
13
|
+
getIsValid: () => boolean;
|
|
14
|
+
setId: (id: number) => void;
|
|
15
|
+
getId: () => number;
|
|
16
|
+
};
|
|
17
|
+
validationStatus: import('vue').Ref<FormValidationStatus, FormValidationStatus>;
|
|
18
|
+
};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { InputControl } from './InputControl';
|
|
2
|
+
export { InputControlBuilder } from './InputControlBuilder';
|
|
3
|
+
export { InputControlData } from './InputControlData';
|
|
4
|
+
export { TouchSensitiveControl } from './TouchSensitiveForm';
|
|
5
|
+
export { FormManager } from './FormManager';
|
|
6
|
+
export { useForm } from './UseForm';
|
|
7
|
+
export { BaseRequestBodyFilter } from './BaseRequestBodyFilter';
|
|
8
|
+
export { type RequestBodyFilter } from './RequestBodyFilter';
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { SortDetail } from '../sort';
|
|
2
|
+
import { BaseModel } from '../BaseModel';
|
|
3
|
+
import { LoadingStatus } from '../constants';
|
|
4
|
+
import { Accessible } from '../accessHandling';
|
|
5
|
+
import { TableHeaderSchema } from './TableHeaderSchema';
|
|
6
|
+
import { TableService } from './TableService';
|
|
7
|
+
import { TableAction } from './TableAction';
|
|
8
|
+
import { Nullable } from '../types';
|
|
9
|
+
import { TableSummarySchema } from './TableSummarySchema.ts';
|
|
10
|
+
export declare abstract class BaseTable<Model extends BaseModel> {
|
|
11
|
+
protected service: TableService<Model>;
|
|
12
|
+
private accessService;
|
|
13
|
+
protected currentPage: number;
|
|
14
|
+
protected currentPageSize: number;
|
|
15
|
+
private currentSortDetail;
|
|
16
|
+
protected loadedRows: Model[];
|
|
17
|
+
headerSchema: TableHeaderSchema<Model>[];
|
|
18
|
+
protected constructor(service: TableService<Model>);
|
|
19
|
+
addHeader(schema: TableHeaderSchema<Model>): void;
|
|
20
|
+
load(): Promise<void>;
|
|
21
|
+
protected filterItemsBaseOnAccessLevel<T>(items: Accessible[]): T[];
|
|
22
|
+
sort(sortDetail: SortDetail<Model>): Promise<void>;
|
|
23
|
+
private shouldSendSortRequest;
|
|
24
|
+
paginate(nextPage: number, pageSize: number): Promise<void>;
|
|
25
|
+
private shouldSendPaginationRequest;
|
|
26
|
+
protected loadRows(): Promise<Model[]>;
|
|
27
|
+
getData(): import('./TableHeaderSchema').TableRenderingData<Model>;
|
|
28
|
+
protected handleSort(sortDetail: SortDetail<Model>): Promise<import('../repository').FetchListResponse<Model>>;
|
|
29
|
+
protected handlePagination(nextPage: number, pageSize: number): Promise<import('../repository').FetchListResponse<Model>>;
|
|
30
|
+
getItemCountPerPage(): number;
|
|
31
|
+
isLoading(): boolean;
|
|
32
|
+
protected getLoadingStatuses(): Set<LoadingStatus>;
|
|
33
|
+
hasAnyAction(): boolean;
|
|
34
|
+
getAccessedActions(row: Model): TableAction<Model>[];
|
|
35
|
+
protected getActions(row: Model): TableAction<Model>[];
|
|
36
|
+
getScrollDetail(): Nullable<boolean | {
|
|
37
|
+
x?: number;
|
|
38
|
+
y?: number;
|
|
39
|
+
}>;
|
|
40
|
+
isExpandable(): boolean;
|
|
41
|
+
handleClick(row: Model): Promise<void>;
|
|
42
|
+
handleMetaClick(row: Model): Promise<void>;
|
|
43
|
+
handleDoubleClick(row: Model): Promise<void>;
|
|
44
|
+
onDestroy(): Promise<void>;
|
|
45
|
+
loadHeader(): Promise<TableHeaderSchema<Model>[]>;
|
|
46
|
+
loadSummarySchema(): TableSummarySchema;
|
|
47
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TableHeaderSchema } from './TableHeaderSchema';
|
|
2
|
+
import { BaseModel } from '../BaseModel';
|
|
3
|
+
import { CellType, HeaderType, TableHeaderAlign } from '../constants';
|
|
4
|
+
export declare const TABLE_COLUMN_DEFAULT_WIDTH = "150px";
|
|
5
|
+
export declare const TABLE_COLUMN_DEFAULT_COLSPAN = 2;
|
|
6
|
+
export declare const TABLE_ACTION_COLUMN: TableHeaderSchema<BaseModel>;
|
|
7
|
+
export declare const TABLE_COLUMN_DEFAULT_VALUES: {
|
|
8
|
+
width: string;
|
|
9
|
+
align: TableHeaderAlign;
|
|
10
|
+
headerType: HeaderType;
|
|
11
|
+
cellType: CellType;
|
|
12
|
+
colspan: number;
|
|
13
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BaseTable } from './BaseTable';
|
|
2
|
+
import { BehaviorSubject } from '../observables/BehaviorSubject';
|
|
3
|
+
import { SortDetail } from '../sort';
|
|
4
|
+
import { BaseModel } from '../BaseModel';
|
|
5
|
+
import { TableService } from './TableService';
|
|
6
|
+
export declare abstract class SelectableTable<Model extends BaseModel> extends BaseTable<Model> {
|
|
7
|
+
selectedRows: BehaviorSubject<Map<number, Model>>;
|
|
8
|
+
constructor(service: TableService<Model>);
|
|
9
|
+
rowSelect(row: Model): void;
|
|
10
|
+
selectAll(): void;
|
|
11
|
+
private isEveryRowSelected;
|
|
12
|
+
protected handlePagination(nextPage: number, pageSize: number): Promise<import('../repository').FetchListResponse<Model>>;
|
|
13
|
+
protected handleSort(sortDetail: SortDetail<Model>): Promise<import('../repository').FetchListResponse<Model>>;
|
|
14
|
+
clearAllSelectedItems(): void;
|
|
15
|
+
getSelectedRows(): BehaviorSubject<Map<number, Model>>;
|
|
16
|
+
getSelectedRowsAsArray(): Model[];
|
|
17
|
+
getSelectedRowIds(): number[];
|
|
18
|
+
getSelectedRowsValue(): Map<number, Model>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Accessible } from '../accessHandling';
|
|
2
|
+
export interface TableAction<Model> extends Accessible {
|
|
3
|
+
readonly actionName: string;
|
|
4
|
+
handler(row: Model): Promise<void>;
|
|
5
|
+
}
|
|
6
|
+
export interface ActionDecorator<Model> extends TableAction<Model> {
|
|
7
|
+
isAvailable(model: Model): boolean;
|
|
8
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { CellType, HeaderType, LoadingStatus, SortOrder, TableHeaderAlign } from '../constants';
|
|
2
|
+
import { Accessible } from '../accessHandling';
|
|
3
|
+
export interface TableHeaderSchema<Model> extends Accessible {
|
|
4
|
+
path?: keyof Model;
|
|
5
|
+
title: string;
|
|
6
|
+
getProps?: (row: Model) => Record<string, unknown>;
|
|
7
|
+
key: keyof Model;
|
|
8
|
+
cellType?: CellType | string;
|
|
9
|
+
align?: TableHeaderAlign;
|
|
10
|
+
headerType?: HeaderType;
|
|
11
|
+
colspan?: number;
|
|
12
|
+
width?: string | number;
|
|
13
|
+
ellipsis?: boolean;
|
|
14
|
+
maxWidth?: number;
|
|
15
|
+
minWidth?: number;
|
|
16
|
+
resizable?: boolean;
|
|
17
|
+
sortOrder?: SortOrder;
|
|
18
|
+
sorter?: boolean;
|
|
19
|
+
}
|
|
20
|
+
export interface TableRenderingData<Model> {
|
|
21
|
+
totalItems: number;
|
|
22
|
+
currentPage: number;
|
|
23
|
+
rows: Model[];
|
|
24
|
+
loadingStatus: Set<LoadingStatus>;
|
|
25
|
+
currentPageItems: Model[];
|
|
26
|
+
}
|
|
27
|
+
export declare function generateHeader<Model>(header: TableHeaderSchema<Model>): TableHeaderSchema<Model>;
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { SortDetail } from '../sort';
|
|
2
|
+
import { FetchListResponse } from '../repository/model';
|
|
3
|
+
import { TableRenderingData } from './TableHeaderSchema';
|
|
4
|
+
export interface TableService<Model> {
|
|
5
|
+
fetchRows(): Promise<FetchListResponse<Model>>;
|
|
6
|
+
paginate(nextPage: number, pageSize: number): Promise<FetchListResponse<Model>>;
|
|
7
|
+
sort(sortDetail: SortDetail<Model>): Promise<FetchListResponse<Model>>;
|
|
8
|
+
getData(): TableRenderingData<Model>;
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { TableGenerator } from './TableGenerator';
|
|
2
|
+
import { TableSource } from './TableSource';
|
|
3
|
+
import { BehaviorSubject } from '../../observables';
|
|
4
|
+
export declare class SelectableTableGenerator<T> extends TableGenerator<T> {
|
|
5
|
+
selectedRows: BehaviorSubject<Map<number, T>>;
|
|
6
|
+
constructor(tableSource: TableSource<T>);
|
|
7
|
+
selectRow(row: T): void;
|
|
8
|
+
selectAll(): void;
|
|
9
|
+
private isEveryRowSelected;
|
|
10
|
+
clearAllSelectedItems(): void;
|
|
11
|
+
getSelectedRows(): Map<number, T>;
|
|
12
|
+
getSelectedRowsAsArray(): T[];
|
|
13
|
+
getSelectedRowIds(): number[];
|
|
14
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Initializer } from '../../initializer';
|
|
2
|
+
export declare abstract class TableCellComponentRegistry implements Initializer {
|
|
3
|
+
private registeredComponents;
|
|
4
|
+
initialize(): void;
|
|
5
|
+
protected abstract registerComponents(): void;
|
|
6
|
+
getRegisteredComponents(): Map<string, unknown>;
|
|
7
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TableCellComponentRegistry } from './TableCellComponentRegistry';
|
|
2
|
+
export declare class TableConfig {
|
|
3
|
+
private cellComponentRegistry;
|
|
4
|
+
constructor();
|
|
5
|
+
setCellComponentRegistry(registry: TableCellComponentRegistry): void;
|
|
6
|
+
getCellComponentRegistry(): TableCellComponentRegistry;
|
|
7
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { BehaviorSubject } from '../../observables';
|
|
2
|
+
import { SortDetail } from '../../sort';
|
|
3
|
+
import { TableHeaderSchema } from '../TableHeaderSchema';
|
|
4
|
+
import { Nullable } from '../../types';
|
|
5
|
+
import { TableSummarySchema } from '../TableSummarySchema';
|
|
6
|
+
import { TableSource } from './TableSource';
|
|
7
|
+
import { AccessLevel } from '../../accessHandling';
|
|
8
|
+
import { TableAction } from '../TableAction';
|
|
9
|
+
export declare class TableGenerator<T> {
|
|
10
|
+
rows: BehaviorSubject<T[]>;
|
|
11
|
+
headerSchema: BehaviorSubject<TableHeaderSchema<T>[]>;
|
|
12
|
+
currentPage: BehaviorSubject<number>;
|
|
13
|
+
currentPageSize: BehaviorSubject<number>;
|
|
14
|
+
totalItems: BehaviorSubject<number>;
|
|
15
|
+
protected currentSortDetail: BehaviorSubject<SortDetail<T>>;
|
|
16
|
+
scrollDetail: BehaviorSubject<Nullable<boolean | {
|
|
17
|
+
x?: number;
|
|
18
|
+
y?: number;
|
|
19
|
+
}>>;
|
|
20
|
+
isExpandable: BehaviorSubject<boolean>;
|
|
21
|
+
protected tableSource: TableSource<T>;
|
|
22
|
+
protected accessService: AccessLevel;
|
|
23
|
+
constructor(tableSource: TableSource<T>);
|
|
24
|
+
load(): Promise<void>;
|
|
25
|
+
paginate(nextPage: number, pageSize: number): Promise<void>;
|
|
26
|
+
private shouldSendPaginationRequest;
|
|
27
|
+
sort(sortDetail: SortDetail<T>): Promise<void>;
|
|
28
|
+
private shouldSendSortRequest;
|
|
29
|
+
handleClick(row: T): Promise<void>;
|
|
30
|
+
handleMetaClick(row: T): Promise<void>;
|
|
31
|
+
handleDoubleClick(row: T): Promise<void>;
|
|
32
|
+
hasAnyAction(): boolean;
|
|
33
|
+
getRowActions(row: T): TableAction<T>[];
|
|
34
|
+
loadSummarySchema(): TableSummarySchema;
|
|
35
|
+
private filterItemsBaseOnAccessLevel;
|
|
36
|
+
onDestroy(): Promise<void>;
|
|
37
|
+
}
|