@sarafapp/iron_core 1.0.63 → 1.0.64
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/IronCore.js +15 -5
- package/dist/core/index.d.ts +31 -0
- package/dist/{src → core/src}/BaseModel.d.ts +4 -4
- package/dist/core/src/baseForm/UseForm.d.ts +18 -0
- package/dist/{src → core/src}/baseTable/BaseTable.d.ts +3 -2
- package/dist/{src → core/src}/baseTable/Constants.d.ts +4 -3
- package/dist/{src → core/src}/baseTable/SelectableTable.d.ts +2 -2
- package/dist/{src → core/src}/baseTable/generator/SelectableTableGenerator.d.ts +3 -3
- package/dist/{src → core/src}/baseTable/moduleConnection/Table.d.ts +1 -1
- package/dist/{src → core/src}/baseTable/moduleConnection/generator/GColumn.d.ts +1 -1
- package/dist/{src → core/src}/composables/UseCrud.d.ts +4 -4
- package/dist/{src → core/src}/composables/UseData.d.ts +4 -3
- package/dist/core/src/composables/UseLoadingStatus.d.ts +15 -0
- package/dist/{src → core/src}/composables/UseParams.d.ts +3 -1
- package/dist/core/src/composables/UseRepository.d.ts +67 -0
- package/dist/core/src/composables/UseStaticTableService.d.ts +5 -0
- package/dist/{src → core/src}/crudService/CrudService.d.ts +8 -8
- package/dist/{src → core/src}/dateHandling/Converter.d.ts +1 -1
- package/dist/{src → core/src}/httpClient/ErrorHandlerRegistry.d.ts +1 -1
- package/dist/{src → core/src}/json/JsonMapper.d.ts +1 -1
- package/dist/core/src/layout/DialogService.d.ts +406 -0
- package/dist/core/src/layout/DrawerService.d.ts +14 -0
- package/dist/{src → core/src}/lib/Formatter.d.ts +1 -1
- package/dist/{src → core/src}/lib/Util.d.ts +2 -1
- package/dist/core/vite.config.d.ts +2 -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/dist/example-vue/vite.config.d.ts +2 -0
- package/dist/index.d.ts +2 -31
- package/index.ts +37 -0
- package/package.json +2 -5
- package/src/BaseModel.ts +127 -0
- package/src/Utils.ts +16 -0
- package/src/accessHandling/AccessControl.ts +33 -0
- package/src/accessHandling/AccessLevel.ts +52 -0
- package/src/accessHandling/Accessible.ts +3 -0
- package/src/accessHandling/EveryDirectiveAccess.ts +7 -0
- package/src/accessHandling/SSO/AuthorizationDirective.ts +65 -0
- package/src/accessHandling/SSO/AuthorizationService.ts +74 -0
- package/src/accessHandling/SSO/EveryLevelAuthorizationDirective.ts +7 -0
- package/src/accessHandling/SSO/SomeLevelsAuthorizationDirective.ts +7 -0
- package/src/accessHandling/SomeDirectiveAccess.ts +7 -0
- package/src/accessHandling/index.ts +9 -0
- package/src/baseDirective/BeforeMountDirective.ts +3 -0
- package/src/baseDirective/BeforeUnMountDirective.ts +3 -0
- package/src/baseDirective/BeforeUpdateDirective.ts +3 -0
- package/src/baseDirective/CreatedDirective.ts +3 -0
- package/src/baseDirective/MountedDirective.ts +3 -0
- package/src/baseDirective/UnMountedDirective.ts +3 -0
- package/src/baseDirective/UpdateDirective.ts +3 -0
- package/src/baseDirective/index.ts +7 -0
- package/src/baseForm/BaseRequestBodyFilter.ts +7 -0
- package/src/baseForm/FormManager.ts +95 -0
- package/src/baseForm/InputControl.ts +182 -0
- package/src/baseForm/InputControlBuilder.ts +59 -0
- package/src/baseForm/InputControlData.ts +16 -0
- package/src/baseForm/RequestBodyFilter.ts +3 -0
- package/src/baseForm/TouchSensitiveForm.ts +47 -0
- package/src/baseForm/UseForm.ts +32 -0
- package/src/baseForm/index.ts +8 -0
- package/src/baseSchedule/Schedule.ts +3 -0
- package/src/baseSchedule/Scheduler.ts +29 -0
- package/src/baseSchedule/index.ts +2 -0
- package/src/baseTable/BaseTable.ts +162 -0
- package/src/baseTable/Constants.ts +26 -0
- package/src/baseTable/OnDestory.ts +3 -0
- package/src/baseTable/RowActionSource.ts +5 -0
- package/src/baseTable/RowClick.ts +3 -0
- package/src/baseTable/RowDoubleClick.ts +3 -0
- package/src/baseTable/RowMetaClick.ts +3 -0
- package/src/baseTable/SelectableTable.ts +86 -0
- package/src/baseTable/TableAction.ts +10 -0
- package/src/baseTable/TableHeaderSchema.ts +44 -0
- package/src/baseTable/TableLoader.ts +3 -0
- package/src/baseTable/TablePaginate.ts +3 -0
- package/src/baseTable/TableService.ts +10 -0
- package/src/baseTable/TableSort.ts +5 -0
- package/src/baseTable/TableSummarySchema.ts +11 -0
- package/src/baseTable/generator/SelectableTableGenerator.ts +65 -0
- package/src/baseTable/generator/TableCellComponentRegistry.ts +15 -0
- package/src/baseTable/generator/TableConfig.ts +18 -0
- package/src/baseTable/generator/TableGenerator.ts +147 -0
- package/src/baseTable/generator/TableSource.ts +34 -0
- package/src/baseTable/index.ts +43 -0
- package/src/baseTable/moduleConnection/Action.ts +12 -0
- package/src/baseTable/moduleConnection/Column.ts +11 -0
- package/src/baseTable/moduleConnection/Table.ts +49 -0
- package/src/baseTable/moduleConnection/TableDestroy.ts +7 -0
- package/src/baseTable/moduleConnection/TableRowClick.ts +7 -0
- package/src/baseTable/moduleConnection/generator/GColumn.ts +10 -0
- package/src/baseTable/moduleConnection/generator/GTable.ts +11 -0
- package/src/composables/UseCrud.ts +53 -0
- package/src/composables/UseData.ts +70 -0
- package/src/composables/UseLoadingStatus.ts +65 -0
- package/src/composables/UseParams.ts +93 -0
- package/src/composables/UseRepository.ts +207 -0
- package/src/composables/UseState.ts +30 -0
- package/src/composables/UseStaticTableService.ts +45 -0
- package/src/composables/index.ts +7 -0
- package/src/constants/Constants.ts +126 -0
- package/src/constants/index.ts +19 -0
- package/src/crudService/CrudService.ts +121 -0
- package/src/crudService/index.ts +1 -0
- package/src/dateHandling/Constants.ts +5 -0
- package/src/dateHandling/Converter.ts +15 -0
- package/src/dateHandling/JalaliDateSetup.ts +42 -0
- package/src/dateHandling/Model.ts +27 -0
- package/src/dateHandling/Utils.ts +49 -0
- package/src/dateHandling/index.ts +5 -0
- package/src/debounce/DebounceAction.ts +4 -0
- package/src/debounce/DebounceService.ts +27 -0
- package/src/debounce/index.ts +2 -0
- package/src/deviceManagement/Constants.ts +4 -0
- package/src/deviceManagement/Visibility.ts +4 -0
- package/src/deviceManagement/VisibilityManager.ts +18 -0
- package/src/deviceManagement/index.ts +3 -0
- package/src/errorHandling/ErrorHandler.ts +3 -0
- package/src/errorHandling/HandleError.ts +20 -0
- package/src/errorHandling/index.ts +2 -0
- package/src/eventSystem/CustomEventDispatcher.ts +13 -0
- package/src/eventSystem/Model.ts +29 -0
- package/src/eventSystem/OnEvent.ts +25 -0
- package/src/eventSystem/index.ts +3 -0
- package/src/feedbackHandling/FailureFeedback.ts +3 -0
- package/src/feedbackHandling/Feedback.ts +34 -0
- package/src/feedbackHandling/HandleFeedback.ts +28 -0
- package/src/feedbackHandling/InfoFeedback.ts +3 -0
- package/src/feedbackHandling/SuccessFeedback.ts +3 -0
- package/src/feedbackHandling/WarningFeedback.ts +3 -0
- package/src/feedbackHandling/index.ts +6 -0
- package/src/httpClient/ApiBuilder.ts +57 -0
- package/src/httpClient/ErrorHandlerRegistry.ts +29 -0
- package/src/httpClient/HttpClient.ts +77 -0
- package/src/httpClient/Interceptor.ts +5 -0
- package/src/httpClient/index.ts +4 -0
- package/src/initializer/ApplicationInitializer.ts +15 -0
- package/src/initializer/Initializer.ts +3 -0
- package/src/initializer/index.ts +2 -0
- package/src/json/JsonMapper.ts +48 -0
- package/src/json/index.ts +1 -0
- package/src/layout/Constants.ts +11 -0
- package/src/layout/DialogService.ts +75 -0
- package/src/layout/DrawerService.ts +25 -0
- package/src/layout/Toast.ts +14 -0
- package/src/layout/index.ts +4 -0
- package/src/lib/Constants.ts +433 -0
- package/src/lib/Formatter.ts +68 -0
- package/src/lib/Util.ts +113 -0
- package/src/lib/index.ts +3 -0
- package/src/observables/AbstractSubject.ts +21 -0
- package/src/observables/BehaviorSubject.ts +58 -0
- package/src/observables/Observer.ts +3 -0
- package/src/observables/Subject.ts +9 -0
- package/src/observables/index.ts +4 -0
- package/src/process/Proccess.ts +21 -0
- package/src/process/ProcessManager.ts +31 -0
- package/src/process/index.ts +2 -0
- package/src/repository/Params.ts +10 -0
- package/src/repository/Repository.ts +44 -0
- package/src/repository/SyncDetail.ts +8 -0
- package/src/repository/index.ts +4 -0
- package/src/repository/model.ts +9 -0
- package/src/routeGuard/RouteGuard.ts +38 -0
- package/src/routeGuard/index.ts +1 -0
- package/src/search/client/ClientArraySearch.ts +25 -0
- package/src/search/client/ClientSearch.ts +3 -0
- package/src/search/index.ts +2 -0
- package/src/sort/SortDetail.ts +11 -0
- package/src/sort/client/Sorter.ts +28 -0
- package/src/sort/index.ts +4 -0
- package/src/sort/strategies/SimpleSort.ts +35 -0
- package/src/sort/strategies/SortStrategy.ts +4 -0
- package/src/types/Global.ts +1 -0
- package/src/types/index.ts +1 -0
- package/src/validators/Validator.ts +5 -0
- package/src/validators/index.ts +1 -0
- package/src/webSocket/Constants.ts +6 -0
- package/src/webSocket/Model.ts +16 -0
- package/src/webSocket/WebSocketService.ts +153 -0
- package/src/webSocket/index.ts +3 -0
- package/vite.config.ts +55 -0
- package/dist/src/baseForm/UseForm.d.ts +0 -5
- package/dist/src/composables/UseLoadingStatus.d.ts +0 -15
- package/dist/src/composables/UseRepository.d.ts +0 -63
- package/dist/src/composables/UseStaticTableService.d.ts +0 -4
- package/dist/src/layout/DialogService.d.ts +0 -1
- package/dist/src/layout/DrawerService.d.ts +0 -1
- package/dist/vite.config.d.ts +0 -2
- /package/dist/{src → core/src}/Utils.d.ts +0 -0
- /package/dist/{src → core/src}/accessHandling/AccessControl.d.ts +0 -0
- /package/dist/{src → core/src}/accessHandling/AccessLevel.d.ts +0 -0
- /package/dist/{src → core/src}/accessHandling/Accessible.d.ts +0 -0
- /package/dist/{src → core/src}/accessHandling/EveryDirectiveAccess.d.ts +0 -0
- /package/dist/{src → core/src}/accessHandling/SSO/AuthorizationDirective.d.ts +0 -0
- /package/dist/{src → core/src}/accessHandling/SSO/AuthorizationService.d.ts +0 -0
- /package/dist/{src → core/src}/accessHandling/SSO/EveryLevelAuthorizationDirective.d.ts +0 -0
- /package/dist/{src → core/src}/accessHandling/SSO/SomeLevelsAuthorizationDirective.d.ts +0 -0
- /package/dist/{src → core/src}/accessHandling/SomeDirectiveAccess.d.ts +0 -0
- /package/dist/{src → core/src}/accessHandling/index.d.ts +0 -0
- /package/dist/{src → core/src}/baseDirective/BeforeMountDirective.d.ts +0 -0
- /package/dist/{src → core/src}/baseDirective/BeforeUnMountDirective.d.ts +0 -0
- /package/dist/{src → core/src}/baseDirective/BeforeUpdateDirective.d.ts +0 -0
- /package/dist/{src → core/src}/baseDirective/CreatedDirective.d.ts +0 -0
- /package/dist/{src → core/src}/baseDirective/MountedDirective.d.ts +0 -0
- /package/dist/{src → core/src}/baseDirective/UnMountedDirective.d.ts +0 -0
- /package/dist/{src → core/src}/baseDirective/UpdateDirective.d.ts +0 -0
- /package/dist/{src → core/src}/baseDirective/index.d.ts +0 -0
- /package/dist/{src → core/src}/baseForm/BaseRequestBodyFilter.d.ts +0 -0
- /package/dist/{src → core/src}/baseForm/FormManager.d.ts +0 -0
- /package/dist/{src → core/src}/baseForm/InputControl.d.ts +0 -0
- /package/dist/{src → core/src}/baseForm/InputControlBuilder.d.ts +0 -0
- /package/dist/{src → core/src}/baseForm/InputControlData.d.ts +0 -0
- /package/dist/{src → core/src}/baseForm/RequestBodyFilter.d.ts +0 -0
- /package/dist/{src → core/src}/baseForm/TouchSensitiveForm.d.ts +0 -0
- /package/dist/{src → core/src}/baseForm/index.d.ts +0 -0
- /package/dist/{src → core/src}/baseSchedule/Schedule.d.ts +0 -0
- /package/dist/{src → core/src}/baseSchedule/Scheduler.d.ts +0 -0
- /package/dist/{src → core/src}/baseSchedule/index.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/OnDestory.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/RowActionSource.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/RowClick.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/RowDoubleClick.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/RowMetaClick.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/TableAction.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/TableHeaderSchema.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/TableLoader.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/TablePaginate.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/TableService.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/TableSort.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/TableSummarySchema.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/generator/TableCellComponentRegistry.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/generator/TableConfig.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/generator/TableGenerator.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/generator/TableSource.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/index.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/moduleConnection/Action.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/moduleConnection/Column.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/moduleConnection/TableDestroy.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/moduleConnection/TableRowClick.d.ts +0 -0
- /package/dist/{src → core/src}/baseTable/moduleConnection/generator/GTable.d.ts +0 -0
- /package/dist/{src → core/src}/composables/UseState.d.ts +0 -0
- /package/dist/{src → core/src}/composables/index.d.ts +0 -0
- /package/dist/{src → core/src}/constants/Constants.d.ts +0 -0
- /package/dist/{src → core/src}/constants/index.d.ts +0 -0
- /package/dist/{src → core/src}/crudService/index.d.ts +0 -0
- /package/dist/{src → core/src}/dateHandling/Constants.d.ts +0 -0
- /package/dist/{src → core/src}/dateHandling/JalaliDateSetup.d.ts +0 -0
- /package/dist/{src → core/src}/dateHandling/Model.d.ts +0 -0
- /package/dist/{src → core/src}/dateHandling/Utils.d.ts +0 -0
- /package/dist/{src → core/src}/dateHandling/index.d.ts +0 -0
- /package/dist/{src → core/src}/debounce/DebounceAction.d.ts +0 -0
- /package/dist/{src → core/src}/debounce/DebounceService.d.ts +0 -0
- /package/dist/{src → core/src}/debounce/index.d.ts +0 -0
- /package/dist/{src → core/src}/deviceManagement/Constants.d.ts +0 -0
- /package/dist/{src → core/src}/deviceManagement/Visibility.d.ts +0 -0
- /package/dist/{src → core/src}/deviceManagement/VisibilityManager.d.ts +0 -0
- /package/dist/{src → core/src}/deviceManagement/index.d.ts +0 -0
- /package/dist/{src → core/src}/errorHandling/ErrorHandler.d.ts +0 -0
- /package/dist/{src → core/src}/errorHandling/HandleError.d.ts +0 -0
- /package/dist/{src → core/src}/errorHandling/index.d.ts +0 -0
- /package/dist/{src → core/src}/eventSystem/CustomEventDispatcher.d.ts +0 -0
- /package/dist/{src → core/src}/eventSystem/Model.d.ts +0 -0
- /package/dist/{src → core/src}/eventSystem/OnEvent.d.ts +0 -0
- /package/dist/{src → core/src}/eventSystem/index.d.ts +0 -0
- /package/dist/{src → core/src}/feedbackHandling/FailureFeedback.d.ts +0 -0
- /package/dist/{src → core/src}/feedbackHandling/Feedback.d.ts +0 -0
- /package/dist/{src → core/src}/feedbackHandling/HandleFeedback.d.ts +0 -0
- /package/dist/{src → core/src}/feedbackHandling/InfoFeedback.d.ts +0 -0
- /package/dist/{src → core/src}/feedbackHandling/SuccessFeedback.d.ts +0 -0
- /package/dist/{src → core/src}/feedbackHandling/WarningFeedback.d.ts +0 -0
- /package/dist/{src → core/src}/feedbackHandling/index.d.ts +0 -0
- /package/dist/{src → core/src}/httpClient/ApiBuilder.d.ts +0 -0
- /package/dist/{src → core/src}/httpClient/HttpClient.d.ts +0 -0
- /package/dist/{src → core/src}/httpClient/Interceptor.d.ts +0 -0
- /package/dist/{src → core/src}/httpClient/index.d.ts +0 -0
- /package/dist/{src → core/src}/initializer/ApplicationInitializer.d.ts +0 -0
- /package/dist/{src → core/src}/initializer/Initializer.d.ts +0 -0
- /package/dist/{src → core/src}/initializer/index.d.ts +0 -0
- /package/dist/{src → core/src}/json/index.d.ts +0 -0
- /package/dist/{src → core/src}/layout/Constants.d.ts +0 -0
- /package/dist/{src → core/src}/layout/Toast.d.ts +0 -0
- /package/dist/{src → core/src}/layout/index.d.ts +0 -0
- /package/dist/{src → core/src}/lib/Constants.d.ts +0 -0
- /package/dist/{src → core/src}/lib/index.d.ts +0 -0
- /package/dist/{src → core/src}/observables/AbstractSubject.d.ts +0 -0
- /package/dist/{src → core/src}/observables/BehaviorSubject.d.ts +0 -0
- /package/dist/{src → core/src}/observables/Observer.d.ts +0 -0
- /package/dist/{src → core/src}/observables/Subject.d.ts +0 -0
- /package/dist/{src → core/src}/observables/index.d.ts +0 -0
- /package/dist/{src → core/src}/process/Proccess.d.ts +0 -0
- /package/dist/{src → core/src}/process/ProcessManager.d.ts +0 -0
- /package/dist/{src → core/src}/process/index.d.ts +0 -0
- /package/dist/{src → core/src}/repository/Params.d.ts +0 -0
- /package/dist/{src → core/src}/repository/Repository.d.ts +0 -0
- /package/dist/{src → core/src}/repository/SyncDetail.d.ts +0 -0
- /package/dist/{src → core/src}/repository/index.d.ts +0 -0
- /package/dist/{src → core/src}/repository/model.d.ts +0 -0
- /package/dist/{src → core/src}/routeGuard/RouteGuard.d.ts +0 -0
- /package/dist/{src → core/src}/routeGuard/index.d.ts +0 -0
- /package/dist/{src → core/src}/search/client/ClientArraySearch.d.ts +0 -0
- /package/dist/{src → core/src}/search/client/ClientSearch.d.ts +0 -0
- /package/dist/{src → core/src}/search/index.d.ts +0 -0
- /package/dist/{src → core/src}/sort/SortDetail.d.ts +0 -0
- /package/dist/{src → core/src}/sort/client/Sorter.d.ts +0 -0
- /package/dist/{src → core/src}/sort/index.d.ts +0 -0
- /package/dist/{src → core/src}/sort/strategies/SimpleSort.d.ts +0 -0
- /package/dist/{src → core/src}/sort/strategies/SortStrategy.d.ts +0 -0
- /package/dist/{src → core/src}/types/Global.d.ts +0 -0
- /package/dist/{src → core/src}/types/index.d.ts +0 -0
- /package/dist/{src → core/src}/validators/Validator.d.ts +0 -0
- /package/dist/{src → core/src}/validators/index.d.ts +0 -0
- /package/dist/{src → core/src}/webSocket/Constants.d.ts +0 -0
- /package/dist/{src → core/src}/webSocket/Model.d.ts +0 -0
- /package/dist/{src → core/src}/webSocket/WebSocketService.d.ts +0 -0
- /package/dist/{src → core/src}/webSocket/index.d.ts +0 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Nullable } from '../types/Global'
|
|
2
|
+
import { ProcessManager } from './ProcessManager'
|
|
3
|
+
|
|
4
|
+
export abstract class Process {
|
|
5
|
+
public name: string;
|
|
6
|
+
public next: Nullable<Process> = null;
|
|
7
|
+
|
|
8
|
+
constructor(name: string, next: Nullable<Process>) {
|
|
9
|
+
this.name = name
|
|
10
|
+
this.next = next
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public addToManager(manager: ProcessManager) {
|
|
14
|
+
manager.setProcessToMap(this)
|
|
15
|
+
if (this.next) {
|
|
16
|
+
this.next.addToManager(manager)
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public abstract execute(): Promise<void>
|
|
21
|
+
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { Process } from './Proccess';
|
|
2
|
+
|
|
3
|
+
export class ProcessManager {
|
|
4
|
+
private mapProcesses = new Map<string, Process>()
|
|
5
|
+
private processes: Process
|
|
6
|
+
|
|
7
|
+
constructor(process: Process) {
|
|
8
|
+
this.processes = process
|
|
9
|
+
this.assignProcessManager()
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
private assignProcessManager() {
|
|
13
|
+
this.processes.addToManager(this)
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
public setProcessToMap(process: Process) {
|
|
17
|
+
this.mapProcesses.set(process.name, process)
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
public async start() {
|
|
21
|
+
await this.processes.execute()
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
public async startFrom(processName: string) {
|
|
25
|
+
const process = this.mapProcesses.get(processName)
|
|
26
|
+
if(!process) {
|
|
27
|
+
throw new Error(`Process ${processName} not found`)
|
|
28
|
+
}
|
|
29
|
+
await process.execute()
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { SortDetail } from "../sort";
|
|
2
|
+
import { SortOrder } from "../constants";
|
|
3
|
+
import { BaseModel } from "../BaseModel";
|
|
4
|
+
|
|
5
|
+
export class Params {
|
|
6
|
+
pageNumber: number = 1;
|
|
7
|
+
itemCount: number = 20;
|
|
8
|
+
sortDetail: SortDetail<BaseModel> = new SortDetail("id", SortOrder.DESC);
|
|
9
|
+
filters: { key: string; value: unknown }[] = [];
|
|
10
|
+
}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
import { BaseModel } from "../BaseModel";
|
|
2
|
+
import { FetchListResponse } from "./model";
|
|
3
|
+
import { type Nullable } from "../types";
|
|
4
|
+
import type { SyncDetail } from "./SyncDetail";
|
|
5
|
+
|
|
6
|
+
export interface Repository<Model extends BaseModel> {
|
|
7
|
+
/**
|
|
8
|
+
* Fetches a list of items based on optional query parameters.
|
|
9
|
+
* @param query - Optional query parameters.
|
|
10
|
+
* @returns A promise resolving to an array of items or undefined.
|
|
11
|
+
*/
|
|
12
|
+
fetchList(query?: Record<string, unknown>): Promise<FetchListResponse<Model>>;
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Fetches a single item by its ID.
|
|
16
|
+
* @param id - ID of the item to retrieve.
|
|
17
|
+
* @returns A promise resolving to the fetched item or undefined.
|
|
18
|
+
*/
|
|
19
|
+
fetchItemById(id: number): Promise<Nullable<Model>>;
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Creates a new item.
|
|
23
|
+
* @param body - Data for creating the item.
|
|
24
|
+
* @returns A promise resolving to the created item or undefined.
|
|
25
|
+
*/
|
|
26
|
+
createItem<Body>(body: Body): Promise<Nullable<Model>>;
|
|
27
|
+
|
|
28
|
+
/**
|
|
29
|
+
* Updates an existing item by its ID.
|
|
30
|
+
* @param id - ID of the item to update.
|
|
31
|
+
* @param body - Updated data for the item.
|
|
32
|
+
* @returns A promise resolving to the updated item or undefined.
|
|
33
|
+
*/
|
|
34
|
+
updateItem<Body>(id: number, body: Body): Promise<Nullable<Model>>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Deletes an item by its ID.
|
|
38
|
+
* @param id - ID of the item to delete.
|
|
39
|
+
* @returns A promise resolving to a boolean indicating if the deletion was successful.
|
|
40
|
+
*/
|
|
41
|
+
deleteItem(id: number): Promise<boolean>;
|
|
42
|
+
|
|
43
|
+
getSyncDetail(): SyncDetail;
|
|
44
|
+
}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export class SyncDetail {
|
|
2
|
+
public shouldKeepSync: boolean;
|
|
3
|
+
public intervalInMillisecond: number;
|
|
4
|
+
constructor(shouldKeepSync: boolean, intervalInMillisecond: number) {
|
|
5
|
+
this.shouldKeepSync = shouldKeepSync;
|
|
6
|
+
this.intervalInMillisecond = intervalInMillisecond;
|
|
7
|
+
}
|
|
8
|
+
}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
export abstract class RouteGuard {
|
|
2
|
+
|
|
3
|
+
protected constructor() {
|
|
4
|
+
this.checkAccessibility = this.checkAccessibility.bind(this);
|
|
5
|
+
this.isAccessible = this.isAccessible.bind(this);
|
|
6
|
+
this.getDestinationRouteName = this.getDestinationRouteName.bind(this);
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
public async checkAccessibility(to: unknown, from: unknown, next: CallableFunction) {
|
|
10
|
+
if (await this.isAccessible(to, from)) {
|
|
11
|
+
next();
|
|
12
|
+
return;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
if (await this.getDestinationRouteName()) {
|
|
16
|
+
next({name: await this.getDestinationRouteName()})
|
|
17
|
+
return;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
if (await this.getDestinationRouteLocation(to, from)) {
|
|
21
|
+
next(await this.getDestinationRouteLocation(to, from));
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
next(false);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
protected abstract isAccessible(to: unknown, from: unknown): Promise<boolean>
|
|
29
|
+
|
|
30
|
+
protected async getDestinationRouteName(): Promise<string> {
|
|
31
|
+
return ''
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
protected async getDestinationRouteLocation(to: unknown, from: unknown): Promise<unknown> {
|
|
35
|
+
return null
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { RouteGuard } from './RouteGuard'
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ClientSearch } from "./ClientSearch";
|
|
2
|
+
import { Util } from "../../lib/Util";
|
|
3
|
+
|
|
4
|
+
export class ClientArraySearch<T> extends ClientSearch {
|
|
5
|
+
public search(
|
|
6
|
+
items: T[],
|
|
7
|
+
phrase: string,
|
|
8
|
+
column: (item: T) => (string | number)[],
|
|
9
|
+
) {
|
|
10
|
+
const matchedItems: T[] = [];
|
|
11
|
+
item: for (const item of items) {
|
|
12
|
+
for (const value of column(item)) {
|
|
13
|
+
if (
|
|
14
|
+
Util.removeSpacesFromString(String(value).toLowerCase()).indexOf(
|
|
15
|
+
Util.removeSpacesFromString(String(phrase).toLowerCase()),
|
|
16
|
+
) > -1
|
|
17
|
+
) {
|
|
18
|
+
matchedItems.push(item);
|
|
19
|
+
continue item;
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
return matchedItems;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { SortOrder } from "../../constants/Constants";
|
|
2
|
+
import { SortStrategy } from "../strategies/SortStrategy";
|
|
3
|
+
import { SimpleSort } from "../strategies/SimpleSort";
|
|
4
|
+
|
|
5
|
+
export class Sorter {
|
|
6
|
+
public arrayOfObjectSort<T>(
|
|
7
|
+
items: T[],
|
|
8
|
+
by: keyof T,
|
|
9
|
+
order: SortOrder,
|
|
10
|
+
strategy: SortStrategy<T> = new SimpleSort(),
|
|
11
|
+
): T[] {
|
|
12
|
+
if (order === SortOrder.ASC) {
|
|
13
|
+
return strategy.aSort(items, by);
|
|
14
|
+
}
|
|
15
|
+
return strategy.bSort(items, by);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
public arraySort(
|
|
19
|
+
items: number[] | string[],
|
|
20
|
+
order: SortOrder,
|
|
21
|
+
strategy: SortStrategy<string | number> = new SimpleSort(),
|
|
22
|
+
) {
|
|
23
|
+
if (order === SortOrder.ASC) {
|
|
24
|
+
return strategy.aSort(items);
|
|
25
|
+
}
|
|
26
|
+
return strategy.bSort(items);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { SortStrategy } from "./SortStrategy";
|
|
2
|
+
|
|
3
|
+
export class SimpleSort<T> implements SortStrategy<T> {
|
|
4
|
+
aSort(items: T[], by?: keyof T): T[] {
|
|
5
|
+
return items.sort((a: T, b: T) => {
|
|
6
|
+
const aItem = a[by as keyof T] ?? a;
|
|
7
|
+
const bItem = b[by as keyof T] ?? b;
|
|
8
|
+
if (typeof aItem === "string" && typeof bItem === "string") {
|
|
9
|
+
return aItem.localeCompare(bItem);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
if (typeof aItem === "number" && typeof bItem === "number") {
|
|
13
|
+
return aItem - bItem;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
throw new Error("Not supported data type");
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
bSort(items: T[], by?: keyof T): T[] {
|
|
21
|
+
return items.sort((a: T, b: T) => {
|
|
22
|
+
const aItem = a[by as keyof T] ?? a;
|
|
23
|
+
const bItem = b[by as keyof T] ?? b;
|
|
24
|
+
if (typeof aItem === "string" && typeof bItem === "string") {
|
|
25
|
+
return bItem.localeCompare(aItem);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (typeof aItem === "number" && typeof bItem === "number") {
|
|
29
|
+
return bItem - aItem;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
throw new Error("Not supported data type");
|
|
33
|
+
});
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export type Nullable<T> = T | null;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./Global";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type Validator } from "./Validator";
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
export class WebSocketPostMessage<T> {
|
|
2
|
+
private type: string;
|
|
3
|
+
private data: T;
|
|
4
|
+
|
|
5
|
+
constructor(type: string, data: T) {
|
|
6
|
+
this.type = type;
|
|
7
|
+
this.data = data;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
public getPayload() {
|
|
11
|
+
return JSON.stringify({
|
|
12
|
+
type: this.type,
|
|
13
|
+
data: this.data,
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
import { Nullable } from "../types";
|
|
2
|
+
import { CustomEventDispatcher } from "../eventSystem/CustomEventDispatcher";
|
|
3
|
+
import { WebSocketEvents } from "./Constants";
|
|
4
|
+
import { WebSocketEvent } from "../eventSystem";
|
|
5
|
+
import { WebSocketPostMessage } from "./Model";
|
|
6
|
+
|
|
7
|
+
export class WebSocketService {
|
|
8
|
+
private webSocket: Nullable<WebSocket> = null;
|
|
9
|
+
private retry: number = 3;
|
|
10
|
+
private url: string = "";
|
|
11
|
+
private protocols: string[] = [];
|
|
12
|
+
private delayTimeInMillieSeconds: number = 500;
|
|
13
|
+
private baseUrl: string = "";
|
|
14
|
+
private intervalId: Nullable<ReturnType<typeof setInterval>> = null;
|
|
15
|
+
|
|
16
|
+
constructor(
|
|
17
|
+
private readonly customEventDispatcher: CustomEventDispatcher,
|
|
18
|
+
baseUrl: string,
|
|
19
|
+
) {
|
|
20
|
+
this.onOpen = this.onOpen.bind(this);
|
|
21
|
+
this.onMessage = this.onMessage.bind(this);
|
|
22
|
+
this.onError = this.onError.bind(this);
|
|
23
|
+
this.onClose = this.onClose.bind(this);
|
|
24
|
+
this.checkHealth = this.checkHealth.bind(this);
|
|
25
|
+
this.sendPing = this.sendPing.bind(this);
|
|
26
|
+
this.reconnect = this.reconnect.bind(this);
|
|
27
|
+
this.fakeWait = this.fakeWait.bind(this);
|
|
28
|
+
this.isClosing = this.isClosing.bind(this);
|
|
29
|
+
this.isClosed = this.isClosed.bind(this);
|
|
30
|
+
this.connect = this.connect.bind(this);
|
|
31
|
+
this.registerPingPontInterval = this.registerPingPontInterval.bind(this);
|
|
32
|
+
this.closeConnection = this.closeConnection.bind(this);
|
|
33
|
+
this.isConnectionOpen = this.isConnectionOpen.bind(this);
|
|
34
|
+
this.isConnecting = this.isConnecting.bind(this);
|
|
35
|
+
this.send = this.send.bind(this);
|
|
36
|
+
this.setBaseUrl = this.setBaseUrl.bind(this);
|
|
37
|
+
this.setBaseUrl(baseUrl);
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
public connect(url: string, protocols: string[] = [], retry: number = 3) {
|
|
41
|
+
if (this.webSocket) {
|
|
42
|
+
this.webSocket.removeEventListener("open", this.onOpen);
|
|
43
|
+
this.webSocket.removeEventListener("close", this.onClose);
|
|
44
|
+
this.webSocket.removeEventListener("error", this.onError);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
this.webSocket = new WebSocket(this.baseUrl + url, protocols);
|
|
48
|
+
this.retry = retry;
|
|
49
|
+
this.url = url;
|
|
50
|
+
this.protocols = protocols;
|
|
51
|
+
|
|
52
|
+
this.webSocket.addEventListener("error", this.onError);
|
|
53
|
+
this.webSocket.addEventListener("close", this.onClose);
|
|
54
|
+
this.webSocket.addEventListener("open", this.onOpen);
|
|
55
|
+
this.checkHealth();
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
private async checkHealth() {
|
|
59
|
+
try {
|
|
60
|
+
await this.fakeWait(this.delayTimeInMillieSeconds);
|
|
61
|
+
if (!this.isClosed() && !this.isClosing() && !this.isConnectionOpen()) {
|
|
62
|
+
this.sendPing();
|
|
63
|
+
}
|
|
64
|
+
} catch (_error) {
|
|
65
|
+
this.reconnect();
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
private sendPing() {
|
|
70
|
+
this.webSocket!.send("PING");
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
private reconnect() {
|
|
74
|
+
if (this.retry === 0) {
|
|
75
|
+
this.customEventDispatcher.dispatchOnWindow(WebSocketEvents.TIMEOUT);
|
|
76
|
+
}
|
|
77
|
+
if (this.retry > 0) {
|
|
78
|
+
this.delayTimeInMillieSeconds = this.delayTimeInMillieSeconds * 2;
|
|
79
|
+
this.connect(this.url, this.protocols, --this.retry);
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
private fakeWait(timeInMilleSeconds: number) {
|
|
84
|
+
return new Promise((resolve) => {
|
|
85
|
+
setTimeout(() => {
|
|
86
|
+
resolve(null);
|
|
87
|
+
}, timeInMilleSeconds);
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
private onError() {
|
|
92
|
+
this.customEventDispatcher.dispatchOnWindow(WebSocketEvents.ERROR);
|
|
93
|
+
this.closeConnection();
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
private onOpen() {
|
|
97
|
+
this.webSocket!.addEventListener("message", this.onMessage);
|
|
98
|
+
this.customEventDispatcher.dispatchOnWindow(WebSocketEvents.OPEN);
|
|
99
|
+
this.registerPingPontInterval();
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
private registerPingPontInterval() {
|
|
103
|
+
this.intervalId = setInterval(() => {
|
|
104
|
+
this.sendPing();
|
|
105
|
+
}, 10_000);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
private onMessage(message: MessageEvent) {
|
|
109
|
+
const webSocketEvent = new WebSocketEvent<unknown>(message);
|
|
110
|
+
this.customEventDispatcher.dispatchWebSocketOnWindow(webSocketEvent);
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
private onClose() {
|
|
114
|
+
this.customEventDispatcher.dispatchOnWindow(WebSocketEvents.CLOSE);
|
|
115
|
+
if (this.intervalId) {
|
|
116
|
+
clearInterval(this.intervalId);
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
public closeConnection() {
|
|
121
|
+
if (!this.webSocket) {
|
|
122
|
+
console.warn("No connection to close");
|
|
123
|
+
return;
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
this.webSocket.close();
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
public isConnectionOpen() {
|
|
130
|
+
return this.webSocket?.readyState === 1;
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
public isConnecting() {
|
|
134
|
+
return this.webSocket?.readyState === 0;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
public isClosing() {
|
|
138
|
+
return this.webSocket?.readyState === 2;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
public isClosed() {
|
|
142
|
+
return this.webSocket?.readyState === 3;
|
|
143
|
+
}
|
|
144
|
+
|
|
145
|
+
public send(data: WebSocketPostMessage<unknown>) {
|
|
146
|
+
if (!this.webSocket) throw new Error("NO webSocket to send data");
|
|
147
|
+
this.webSocket.send(data.getPayload());
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
private setBaseUrl(baseUrl: string) {
|
|
151
|
+
this.baseUrl = baseUrl;
|
|
152
|
+
}
|
|
153
|
+
}
|
package/vite.config.ts
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { dirname, resolve } from "node:path";
|
|
2
|
+
import { fileURLToPath } from "node:url";
|
|
3
|
+
import { defineConfig } from "vite";
|
|
4
|
+
import dts from "vite-plugin-dts";
|
|
5
|
+
import * as path from "node:path";
|
|
6
|
+
|
|
7
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
8
|
+
|
|
9
|
+
export default defineConfig({
|
|
10
|
+
plugins: [dts({ insertTypesEntry: true })],
|
|
11
|
+
resolve: {
|
|
12
|
+
alias: {
|
|
13
|
+
"@": path.resolve(__dirname, "packages/core/src"),
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
build: {
|
|
17
|
+
lib: {
|
|
18
|
+
entry: resolve(__dirname, "index.ts"),
|
|
19
|
+
name: "IronCore",
|
|
20
|
+
// the proper extensions will be added
|
|
21
|
+
fileName: "IronCore",
|
|
22
|
+
},
|
|
23
|
+
rollupOptions: {
|
|
24
|
+
// make sure to externalize deps that shouldn't be bundled
|
|
25
|
+
// into your library
|
|
26
|
+
external: [
|
|
27
|
+
"vue",
|
|
28
|
+
"json2typescript",
|
|
29
|
+
"axios",
|
|
30
|
+
"dayjs",
|
|
31
|
+
"jalaliday",
|
|
32
|
+
"pinia",
|
|
33
|
+
],
|
|
34
|
+
output: {
|
|
35
|
+
// Provide global variables to use in the UMD build
|
|
36
|
+
// for externalized deps
|
|
37
|
+
globals: {
|
|
38
|
+
vue: "Vue",
|
|
39
|
+
json2typescript: "json2typescript",
|
|
40
|
+
axios: "axios",
|
|
41
|
+
dayjs: "dayjs",
|
|
42
|
+
jalaliday: "jalaliday",
|
|
43
|
+
pinia: "pinia",
|
|
44
|
+
"jalali-plugin-dayjs": "jalali-plugin-dayjs",
|
|
45
|
+
},
|
|
46
|
+
},
|
|
47
|
+
},
|
|
48
|
+
terserOptions: {
|
|
49
|
+
compress: {
|
|
50
|
+
dead_code: false,
|
|
51
|
+
conditionals: false,
|
|
52
|
+
},
|
|
53
|
+
},
|
|
54
|
+
},
|
|
55
|
+
});
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { LoadingStatus } from '../constants';
|
|
2
|
-
export declare function useLoadingStatus(): {
|
|
3
|
-
loadingStatus: any;
|
|
4
|
-
isFetchingList: any;
|
|
5
|
-
isFetchingItem: any;
|
|
6
|
-
isFetchingLastItems: any;
|
|
7
|
-
isFetchingPreviousItems: any;
|
|
8
|
-
isCreating: any;
|
|
9
|
-
isUpdating: any;
|
|
10
|
-
isDeleting: any;
|
|
11
|
-
isSearching: any;
|
|
12
|
-
isSorting: any;
|
|
13
|
-
setStatus: (status: LoadingStatus) => void;
|
|
14
|
-
removeStatus: (status: LoadingStatus) => void;
|
|
15
|
-
};
|
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { computed } from 'vue';
|
|
2
|
-
import { Repository } from '../repository';
|
|
3
|
-
import { LoadingStatus } from '../constants';
|
|
4
|
-
import { SortDetail } from '../sort';
|
|
5
|
-
import { BaseModel } from '../BaseModel';
|
|
6
|
-
export declare function useRepository<Model extends BaseModel>(repository: Repository<Model>): {
|
|
7
|
-
loadingStatusManager: {
|
|
8
|
-
loadingStatus: any;
|
|
9
|
-
isFetchingList: any;
|
|
10
|
-
isFetchingItem: any;
|
|
11
|
-
isFetchingLastItems: any;
|
|
12
|
-
isFetchingPreviousItems: any;
|
|
13
|
-
isCreating: any;
|
|
14
|
-
isUpdating: any;
|
|
15
|
-
isDeleting: any;
|
|
16
|
-
isSearching: any;
|
|
17
|
-
isSorting: any;
|
|
18
|
-
setStatus: (status: LoadingStatus) => void;
|
|
19
|
-
removeStatus: (status: LoadingStatus) => void;
|
|
20
|
-
};
|
|
21
|
-
dataManger: {
|
|
22
|
-
itemsAsArray: any;
|
|
23
|
-
totalCount: any;
|
|
24
|
-
currentItem: any;
|
|
25
|
-
setTotalCount: (totalItems: number) => void;
|
|
26
|
-
addOrReplaceItems: (itemsToAdd: BaseModel[]) => void;
|
|
27
|
-
getById: (id: number) => computed<BaseModel>;
|
|
28
|
-
removeById: (id: number) => boolean;
|
|
29
|
-
clearItems: () => void;
|
|
30
|
-
setCurrentItem: (item: computed<BaseModel>) => void;
|
|
31
|
-
clearCurrentItem: () => void;
|
|
32
|
-
};
|
|
33
|
-
paramsManager: {
|
|
34
|
-
params: Ref<Params>;
|
|
35
|
-
setNextPage: () => void;
|
|
36
|
-
setPreventPage: () => void;
|
|
37
|
-
setPageNumber: (pageNumber: number) => void;
|
|
38
|
-
setItemCount: (itemCount: number) => void;
|
|
39
|
-
setSortDetail: (sortDetail: SortDetail<BaseModel>) => void;
|
|
40
|
-
setFilter: (key: string, value: unknown) => void;
|
|
41
|
-
removeFilter: (key: string) => void;
|
|
42
|
-
getRequestParams: () => Record<string, unknown>;
|
|
43
|
-
clearParam: () => void;
|
|
44
|
-
setFiltersBaseOnRequestBody: (filters: Record<string, unknown>) => void;
|
|
45
|
-
};
|
|
46
|
-
tableRenderingData: any;
|
|
47
|
-
fetchList: (loadingStatus?: LoadingStatus) => Promise<any>;
|
|
48
|
-
fetchWithAutoRefresh: () => Promise<void>;
|
|
49
|
-
setupAutoRefresh: () => void;
|
|
50
|
-
stopAutoRefresh: () => void;
|
|
51
|
-
fetchItemById: (id: number, shouldRemoveItem?: boolean) => Promise<any>;
|
|
52
|
-
createItem: <Body>(body: Body) => Promise<any>;
|
|
53
|
-
updateItem: <Body>(id: number, body: Body) => Promise<any>;
|
|
54
|
-
deleteItem: (id: number) => Promise<boolean>;
|
|
55
|
-
fetchLastItems: () => Promise<any>;
|
|
56
|
-
fetchPreviousItems: () => Promise<any>;
|
|
57
|
-
fetchItemsByPageNumber: (pageNumber: number) => Promise<any>;
|
|
58
|
-
search: (searchedValue: string) => Promise<any>;
|
|
59
|
-
sort: (sortDetail: SortDetail<Model>) => Promise<any>;
|
|
60
|
-
clearFilters: () => Promise<any>;
|
|
61
|
-
tableService: any;
|
|
62
|
-
currentPageItems: any;
|
|
63
|
-
};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useDialogService: any;
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare const useDrawerService: any;
|
package/dist/vite.config.d.ts
DELETED
|
File without changes
|
|
File without changes
|