@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,65 @@
|
|
|
1
|
+
import { computed, ref } from "vue";
|
|
2
|
+
import { LoadingStatus } from "../constants";
|
|
3
|
+
|
|
4
|
+
export function useLoadingStatus() {
|
|
5
|
+
const loadingStatus = ref<Set<LoadingStatus>>(new Set<LoadingStatus>());
|
|
6
|
+
|
|
7
|
+
const isFetchingList = computed(() => {
|
|
8
|
+
return loadingStatus.value.has(LoadingStatus.FetchList);
|
|
9
|
+
});
|
|
10
|
+
|
|
11
|
+
const isFetchingItem = computed(() => {
|
|
12
|
+
return loadingStatus.value.has(LoadingStatus.FetchItem);
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const isFetchingLastItems = computed(() => {
|
|
16
|
+
return loadingStatus.value.has(LoadingStatus.FetchLastItems);
|
|
17
|
+
});
|
|
18
|
+
|
|
19
|
+
const isFetchingPreviousItems = computed(() => {
|
|
20
|
+
return loadingStatus.value.has(LoadingStatus.FetchPreviousItems);
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const isCreating = computed(() => {
|
|
24
|
+
return loadingStatus.value.has(LoadingStatus.Create);
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
const isUpdating = computed(() => {
|
|
28
|
+
return loadingStatus.value.has(LoadingStatus.Update);
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
const isDeleting = computed(() => {
|
|
32
|
+
return loadingStatus.value.has(LoadingStatus.Delete);
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
const isSearching = computed(() => {
|
|
36
|
+
return loadingStatus.value.has(LoadingStatus.Search);
|
|
37
|
+
});
|
|
38
|
+
|
|
39
|
+
const isSorting = computed(() => {
|
|
40
|
+
return loadingStatus.value.has(LoadingStatus.Sort);
|
|
41
|
+
});
|
|
42
|
+
|
|
43
|
+
function setStatus(status: LoadingStatus) {
|
|
44
|
+
loadingStatus.value.add(status);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
function removeStatus(status: LoadingStatus) {
|
|
48
|
+
loadingStatus.value.delete(status);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
return {
|
|
52
|
+
loadingStatus,
|
|
53
|
+
isFetchingList,
|
|
54
|
+
isFetchingItem,
|
|
55
|
+
isFetchingLastItems,
|
|
56
|
+
isFetchingPreviousItems,
|
|
57
|
+
isCreating,
|
|
58
|
+
isUpdating,
|
|
59
|
+
isDeleting,
|
|
60
|
+
isSearching,
|
|
61
|
+
isSorting,
|
|
62
|
+
setStatus,
|
|
63
|
+
removeStatus,
|
|
64
|
+
};
|
|
65
|
+
}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { type Ref, ref } from "vue";
|
|
2
|
+
import { SortDetail } from "../sort";
|
|
3
|
+
import { BaseModel } from "../BaseModel";
|
|
4
|
+
import { Params } from "../repository";
|
|
5
|
+
|
|
6
|
+
const DEFAULT_PARAMS = new Params();
|
|
7
|
+
|
|
8
|
+
export function useParams() {
|
|
9
|
+
const params: Ref<Params> = ref(structuredClone(DEFAULT_PARAMS));
|
|
10
|
+
|
|
11
|
+
function setNextPage() {
|
|
12
|
+
params.value.pageNumber = params.value.pageNumber + 1;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
function setPreventPage() {
|
|
16
|
+
params.value.pageNumber = params.value.pageNumber - 1;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
function setPageNumber(pageNumber: number) {
|
|
20
|
+
params.value.pageNumber = pageNumber;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
function setItemCount(itemCount: number) {
|
|
24
|
+
params.value.itemCount = itemCount;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
function setSortDetail(sortDetail: SortDetail<BaseModel>) {
|
|
28
|
+
params.value.sortDetail.key = sortDetail.key;
|
|
29
|
+
params.value.sortDetail.order = sortDetail.order;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
function setFiltersBaseOnRequestBody(filters: Record<string, unknown>) {
|
|
33
|
+
for (const key in filters) {
|
|
34
|
+
setFilter(key, filters[key]);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function setFilter(key: string, value: unknown) {
|
|
39
|
+
const index = params.value.filters.findIndex(
|
|
40
|
+
(filter) => filter.key === key,
|
|
41
|
+
);
|
|
42
|
+
if (index > -1) params.value.filters[index].value = value;
|
|
43
|
+
else params.value.filters.push({ key, value });
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
function removeFilter(key: string) {
|
|
47
|
+
let currentParams = params.value.filters;
|
|
48
|
+
currentParams = currentParams.filter(iteratedParam => iteratedParam.key !== key)
|
|
49
|
+
params.value.filters = currentParams;
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
function getRequestParams() {
|
|
53
|
+
const requestParams: Record<string, unknown> = {
|
|
54
|
+
page: params.value.pageNumber,
|
|
55
|
+
count: params.value.itemCount,
|
|
56
|
+
};
|
|
57
|
+
if (params.value.sortDetail) {
|
|
58
|
+
requestParams.by = params.value.sortDetail.key;
|
|
59
|
+
requestParams.order = params.value.sortDetail.order;
|
|
60
|
+
}
|
|
61
|
+
for (const filter of params.value.filters) {
|
|
62
|
+
if (filter.value) {
|
|
63
|
+
if (typeof filter.value === 'string' || typeof filter.value === 'number') {
|
|
64
|
+
requestParams[filter.key] = filter.value;
|
|
65
|
+
} else {
|
|
66
|
+
const value = JSON.stringify(filter.value);
|
|
67
|
+
if (value !== "[]" && value !== "{}") {
|
|
68
|
+
requestParams[filter.key] = value;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
return requestParams;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
function clearParam() {
|
|
77
|
+
params.value = structuredClone(DEFAULT_PARAMS);
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
return {
|
|
81
|
+
params,
|
|
82
|
+
setNextPage,
|
|
83
|
+
setPreventPage,
|
|
84
|
+
setPageNumber,
|
|
85
|
+
setItemCount,
|
|
86
|
+
setSortDetail,
|
|
87
|
+
setFilter,
|
|
88
|
+
removeFilter,
|
|
89
|
+
getRequestParams,
|
|
90
|
+
clearParam,
|
|
91
|
+
setFiltersBaseOnRequestBody
|
|
92
|
+
};
|
|
93
|
+
}
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { computed, onBeforeUnmount } from "vue";
|
|
2
|
+
import { useData } from "./UseData";
|
|
3
|
+
import { useParams } from "./UseParams";
|
|
4
|
+
import { useLoadingStatus } from "./UseLoadingStatus";
|
|
5
|
+
import { type Repository, type SyncDetail } from "../repository";
|
|
6
|
+
import { LoadingStatus } from "../constants";
|
|
7
|
+
import { SortDetail } from "../sort";
|
|
8
|
+
import { BaseModel } from "../BaseModel";
|
|
9
|
+
import { Scheduler } from "../baseSchedule";
|
|
10
|
+
import { type TableRenderingData, type TableService } from "../baseTable";
|
|
11
|
+
|
|
12
|
+
export function useRepository<Model extends BaseModel>(
|
|
13
|
+
repository: Repository<Model>,
|
|
14
|
+
) {
|
|
15
|
+
const dataManger = useData();
|
|
16
|
+
const paramsManager = useParams();
|
|
17
|
+
const loadingStatusManager = useLoadingStatus();
|
|
18
|
+
|
|
19
|
+
const scheduler = new Scheduler({
|
|
20
|
+
runAction: async () => fetchList(LoadingStatus.AutoRefresh),
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const currentPageItems = computed<Model[]>(() => {
|
|
24
|
+
const pageNumber = paramsManager.params.value.pageNumber;
|
|
25
|
+
const pageSize = paramsManager.params.value.itemCount;
|
|
26
|
+
const startIndex = pageNumber * pageSize - pageSize;
|
|
27
|
+
const endIndex = pageNumber * pageSize - 1;
|
|
28
|
+
const items: Model[] = [];
|
|
29
|
+
for (let index = startIndex; index <= endIndex; index++) {
|
|
30
|
+
if (!dataManger.itemsAsArray.value[index]) break;
|
|
31
|
+
items.push(dataManger.itemsAsArray.value[index] as Model);
|
|
32
|
+
}
|
|
33
|
+
return items;
|
|
34
|
+
});
|
|
35
|
+
|
|
36
|
+
const tableRenderingData = computed<TableRenderingData<Model>>(() => {
|
|
37
|
+
return {
|
|
38
|
+
totalItems: dataManger.totalCount.value,
|
|
39
|
+
currentPage: paramsManager.params.value.pageNumber,
|
|
40
|
+
rows: dataManger.itemsAsArray.value,
|
|
41
|
+
loadingStatus: loadingStatusManager.loadingStatus.value,
|
|
42
|
+
currentPageItems: currentPageItems.value,
|
|
43
|
+
} as TableRenderingData<Model>;
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
const tableService = computed<TableService<Model>>(() => {
|
|
47
|
+
return {
|
|
48
|
+
getData: getTableRenderingData,
|
|
49
|
+
sort: sort,
|
|
50
|
+
paginate: fetchItemsByPageNumber,
|
|
51
|
+
fetchRows: fetchList,
|
|
52
|
+
};
|
|
53
|
+
});
|
|
54
|
+
|
|
55
|
+
const syncDetail = computed<SyncDetail>(() => {
|
|
56
|
+
return repository.getSyncDetail();
|
|
57
|
+
});
|
|
58
|
+
|
|
59
|
+
function getTableRenderingData(): TableRenderingData<Model> {
|
|
60
|
+
return tableRenderingData.value;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
async function handleFetchList(query?: Record<string, unknown>) {
|
|
64
|
+
const result = await repository.fetchList(query);
|
|
65
|
+
dataManger.clearItems();
|
|
66
|
+
dataManger.addOrReplaceItems(result.items);
|
|
67
|
+
dataManger.setTotalCount(result.totalItems);
|
|
68
|
+
return result;
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
async function fetchList(
|
|
72
|
+
loadingStatus: LoadingStatus = LoadingStatus.FetchList,
|
|
73
|
+
) {
|
|
74
|
+
loadingStatusManager.setStatus(loadingStatus);
|
|
75
|
+
const result = await handleFetchList(paramsManager.getRequestParams());
|
|
76
|
+
loadingStatusManager.removeStatus(loadingStatus);
|
|
77
|
+
return result;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
async function fetchWithAutoRefresh() {
|
|
81
|
+
setupAutoRefresh();
|
|
82
|
+
await fetchList();
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
function setupAutoRefresh() {
|
|
86
|
+
if (!syncDetail.value.shouldKeepSync) {
|
|
87
|
+
throw new Error(`The provided repository does not support auto refresh`);
|
|
88
|
+
}
|
|
89
|
+
scheduler.setupInterval(syncDetail.value.intervalInMillisecond);
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
function stopAutoRefresh() {
|
|
93
|
+
scheduler.clearInterval();
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
async function fetchItemById(id: number, shouldRemoveItem = true) {
|
|
97
|
+
loadingStatusManager.setStatus(LoadingStatus.FetchItem);
|
|
98
|
+
if (shouldRemoveItem) {
|
|
99
|
+
dataManger.clearCurrentItem();
|
|
100
|
+
}
|
|
101
|
+
const result = await repository.fetchItemById(id);
|
|
102
|
+
dataManger.setCurrentItem(result);
|
|
103
|
+
loadingStatusManager.removeStatus(LoadingStatus.FetchItem);
|
|
104
|
+
return result;
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
async function createItem<Body>(body: Body) {
|
|
108
|
+
loadingStatusManager.setStatus(LoadingStatus.Create);
|
|
109
|
+
const result = await repository.createItem(body);
|
|
110
|
+
if (result) {
|
|
111
|
+
dataManger.addOrReplaceItems([result]);
|
|
112
|
+
}
|
|
113
|
+
loadingStatusManager.removeStatus(LoadingStatus.Create);
|
|
114
|
+
return result;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
async function updateItem<Body>(id: number, body: Body) {
|
|
118
|
+
loadingStatusManager.setStatus(LoadingStatus.Update);
|
|
119
|
+
const result = await repository.updateItem(id, body);
|
|
120
|
+
if (result) {
|
|
121
|
+
dataManger.addOrReplaceItems([result]);
|
|
122
|
+
}
|
|
123
|
+
loadingStatusManager.removeStatus(LoadingStatus.Update);
|
|
124
|
+
return result;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
async function deleteItem(id: number) {
|
|
128
|
+
loadingStatusManager.setStatus(LoadingStatus.Delete);
|
|
129
|
+
await repository.deleteItem(id);
|
|
130
|
+
loadingStatusManager.removeStatus(LoadingStatus.Delete);
|
|
131
|
+
return dataManger.removeById(id);
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
async function fetchLastItems() {
|
|
135
|
+
paramsManager.setNextPage();
|
|
136
|
+
loadingStatusManager.setStatus(LoadingStatus.FetchLastItems);
|
|
137
|
+
const result = await handleFetchList(paramsManager.getRequestParams());
|
|
138
|
+
loadingStatusManager.removeStatus(LoadingStatus.FetchLastItems);
|
|
139
|
+
return result;
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
async function fetchPreviousItems() {
|
|
143
|
+
paramsManager.setPreventPage();
|
|
144
|
+
loadingStatusManager.setStatus(LoadingStatus.FetchPreviousItems);
|
|
145
|
+
const result = await handleFetchList(paramsManager.getRequestParams());
|
|
146
|
+
loadingStatusManager.removeStatus(LoadingStatus.FetchPreviousItems);
|
|
147
|
+
return result;
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
async function fetchItemsByPageNumber(pageNumber: number) {
|
|
151
|
+
paramsManager.setPageNumber(pageNumber);
|
|
152
|
+
loadingStatusManager.setStatus(LoadingStatus.FetchList);
|
|
153
|
+
const result = await handleFetchList(paramsManager.getRequestParams());
|
|
154
|
+
loadingStatusManager.removeStatus(LoadingStatus.FetchList);
|
|
155
|
+
return result;
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
async function search(searchedValue: string) {
|
|
159
|
+
paramsManager.setFilter("search", searchedValue);
|
|
160
|
+
loadingStatusManager.setStatus(LoadingStatus.Search);
|
|
161
|
+
dataManger.clearItems();
|
|
162
|
+
const result = await handleFetchList(paramsManager.getRequestParams());
|
|
163
|
+
loadingStatusManager.removeStatus(LoadingStatus.Search);
|
|
164
|
+
return result;
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
async function sort(sortDetail: SortDetail<Model>) {
|
|
168
|
+
paramsManager.setSortDetail(sortDetail as SortDetail<BaseModel>);
|
|
169
|
+
loadingStatusManager.setStatus(LoadingStatus.Sort);
|
|
170
|
+
dataManger.clearItems();
|
|
171
|
+
const result = await handleFetchList(paramsManager.getRequestParams());
|
|
172
|
+
loadingStatusManager.removeStatus(LoadingStatus.Sort);
|
|
173
|
+
return result;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
async function clearFilters() {
|
|
177
|
+
paramsManager.clearParam();
|
|
178
|
+
return await fetchList();
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
onBeforeUnmount(() => {
|
|
182
|
+
stopAutoRefresh();
|
|
183
|
+
});
|
|
184
|
+
|
|
185
|
+
return {
|
|
186
|
+
loadingStatusManager,
|
|
187
|
+
dataManger,
|
|
188
|
+
paramsManager,
|
|
189
|
+
tableRenderingData,
|
|
190
|
+
fetchList,
|
|
191
|
+
fetchWithAutoRefresh,
|
|
192
|
+
setupAutoRefresh,
|
|
193
|
+
stopAutoRefresh,
|
|
194
|
+
fetchItemById,
|
|
195
|
+
createItem,
|
|
196
|
+
updateItem,
|
|
197
|
+
deleteItem,
|
|
198
|
+
fetchLastItems,
|
|
199
|
+
fetchPreviousItems,
|
|
200
|
+
fetchItemsByPageNumber,
|
|
201
|
+
search,
|
|
202
|
+
sort,
|
|
203
|
+
clearFilters,
|
|
204
|
+
tableService,
|
|
205
|
+
currentPageItems,
|
|
206
|
+
};
|
|
207
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { computed, ref, type Ref } from "vue";
|
|
2
|
+
|
|
3
|
+
export function useState<T>(initial: T, ttl: number = 300_000): Ref<T> {
|
|
4
|
+
const state = ref<T>(structuredClone(initial));
|
|
5
|
+
let timer: ReturnType<typeof setTimeout> | null = null;
|
|
6
|
+
|
|
7
|
+
function resetTimer() {
|
|
8
|
+
if (timer) clearTimeout(timer);
|
|
9
|
+
if (ttl > 0) {
|
|
10
|
+
timer = setTimeout(() => {
|
|
11
|
+
state.value = initial;
|
|
12
|
+
}, ttl);
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
const computedState = computed<T>({
|
|
17
|
+
get() {
|
|
18
|
+
resetTimer();
|
|
19
|
+
return state.value;
|
|
20
|
+
},
|
|
21
|
+
set(value: T) {
|
|
22
|
+
state.value = value;
|
|
23
|
+
resetTimer();
|
|
24
|
+
},
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
resetTimer();
|
|
28
|
+
|
|
29
|
+
return computedState;
|
|
30
|
+
}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import { computed, ref } from 'vue'
|
|
2
|
+
import { LoadingStatus } from '../constants'
|
|
3
|
+
import { SortDetail } from '../sort'
|
|
4
|
+
import type { TableRenderingData, TableService } from '../baseTable'
|
|
5
|
+
|
|
6
|
+
export function useStaticTableService<Model>(initialRows: Model[]) {
|
|
7
|
+
const tableRows = ref<Model[]>(initialRows);
|
|
8
|
+
|
|
9
|
+
const staticTableService = computed<TableService<Model>>(() => {
|
|
10
|
+
return {
|
|
11
|
+
getData(): TableRenderingData<Model> {
|
|
12
|
+
return {
|
|
13
|
+
totalItems: tableRows.value.length,
|
|
14
|
+
currentPageItems: tableRows.value as Model[],
|
|
15
|
+
loadingStatus: new Set<LoadingStatus>(),
|
|
16
|
+
rows: tableRows.value as Model[],
|
|
17
|
+
currentPage: 1
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
async sort(_sortDetail: SortDetail<Model>) {
|
|
21
|
+
return {
|
|
22
|
+
totalItems: tableRows.value.length,
|
|
23
|
+
items: tableRows.value as Model[]
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
async fetchRows() {
|
|
27
|
+
return {
|
|
28
|
+
totalItems: tableRows.value.length,
|
|
29
|
+
items: tableRows.value as Model[]
|
|
30
|
+
}
|
|
31
|
+
},
|
|
32
|
+
async paginate(_nextPage: number, _pageSize: number) {
|
|
33
|
+
return {
|
|
34
|
+
totalItems: tableRows.value.length,
|
|
35
|
+
items: tableRows.value as Model[]
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
})
|
|
40
|
+
|
|
41
|
+
return {
|
|
42
|
+
tableRows,
|
|
43
|
+
staticTableService
|
|
44
|
+
}
|
|
45
|
+
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
export { useRepository } from "./UseRepository";
|
|
2
|
+
export { useData } from "./UseData";
|
|
3
|
+
export { useParams } from "./UseParams";
|
|
4
|
+
export { useLoadingStatus } from "./UseLoadingStatus";
|
|
5
|
+
export { useStaticTableService } from "./UseStaticTableService";
|
|
6
|
+
export * from "./UseCrud";
|
|
7
|
+
export * from "./UseState";
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
export const enum LoadingStatus {
|
|
2
|
+
FetchList = "fetchList",
|
|
3
|
+
AutoRefresh = "autoRefresh",
|
|
4
|
+
FetchItem = "fetchItem",
|
|
5
|
+
FetchLastItems = "fetchLastItems",
|
|
6
|
+
FetchPreviousItems = "fetchPreviousItems",
|
|
7
|
+
Create = "CREATE",
|
|
8
|
+
Update = "UPDATE",
|
|
9
|
+
Delete = "DELETE",
|
|
10
|
+
Search = "SEARCH",
|
|
11
|
+
Sort = "SORT",
|
|
12
|
+
Success = "SUCCESS",
|
|
13
|
+
Error = "ERROR",
|
|
14
|
+
Idle = "IDLE",
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
export const enum DialogDimensions {
|
|
18
|
+
Width = "width",
|
|
19
|
+
Height = "height",
|
|
20
|
+
DefaultWidth = 500,
|
|
21
|
+
DefaultHeight = 350,
|
|
22
|
+
MinimalAvailableSize = 0,
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const enum SortOrder {
|
|
26
|
+
ASC = "ASC",
|
|
27
|
+
DESC = "DESC",
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
export const enum SortOrderTableHeader {
|
|
31
|
+
ASC = "ascend",
|
|
32
|
+
DESC = "descend",
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export const enum TableHeaderAlign {
|
|
36
|
+
Left = "left",
|
|
37
|
+
Right = "right",
|
|
38
|
+
Center = "center",
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
export const enum HeaderType {
|
|
42
|
+
Text = "text",
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export const enum CellType {
|
|
46
|
+
Text = "text",
|
|
47
|
+
ACTION = "action",
|
|
48
|
+
Tag = "tag",
|
|
49
|
+
Iban = "iban",
|
|
50
|
+
BankCard = "bankCard",
|
|
51
|
+
Symbol = "symbol",
|
|
52
|
+
TradeDetail = "tradeDetail",
|
|
53
|
+
SymbolPrice = "symbolPrice",
|
|
54
|
+
TradeSymbol = "tradeSymbol",
|
|
55
|
+
Price = "price",
|
|
56
|
+
DynamicCurrencyPrice = "dynamicCurrencyPrice",
|
|
57
|
+
TradeDate = "tradeDate",
|
|
58
|
+
RequestResponseIdentity = "requestResponseIdentity",
|
|
59
|
+
Image = 'image'
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
export const enum TableConstants {
|
|
63
|
+
MINIMAL_LOADABLE_HEADER_COUNT = 0,
|
|
64
|
+
DEFAULT_ITEM_COUNT_PER_PAGE = 20,
|
|
65
|
+
PAGINATION_POSITION = "bottomCenter",
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export const enum ApplicationTheme {
|
|
69
|
+
FontFamily = "IRANSansX",
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
export const enum ApplicationDrawerStatus {
|
|
73
|
+
Open = "open",
|
|
74
|
+
Close = "close",
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export const enum ToastType {
|
|
78
|
+
Success = "success",
|
|
79
|
+
Failure = "error",
|
|
80
|
+
Info = "info",
|
|
81
|
+
Warning = "warning",
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export const enum ToastLocation {
|
|
85
|
+
BottomLeft = "bottomLeft",
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
export const enum StatusCode {
|
|
89
|
+
NotFound = 404,
|
|
90
|
+
Unauthorized = 401,
|
|
91
|
+
ServerError = 500,
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
export const enum FormValidationStatus {
|
|
95
|
+
Invalid,
|
|
96
|
+
Valid,
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export const enum StorageKeys {
|
|
100
|
+
Theme = "theme",
|
|
101
|
+
AccessList = "accessList",
|
|
102
|
+
Token = 'token',
|
|
103
|
+
SSO_ACCESS_LIST = 'ssoAccessList'
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
export const enum ApplicationTheme {
|
|
107
|
+
Light = "light",
|
|
108
|
+
Dark = "dark",
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export const enum ComponentSize {
|
|
112
|
+
Small = "small",
|
|
113
|
+
Medium = "medium",
|
|
114
|
+
Large = "large",
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export const enum StoreNames {
|
|
118
|
+
Dialog = "dialog",
|
|
119
|
+
Drawer = "drawer",
|
|
120
|
+
Module = "module",
|
|
121
|
+
Toast = "toast",
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export const enum Symbols {
|
|
125
|
+
USDT = "USDT",
|
|
126
|
+
}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export {
|
|
2
|
+
LoadingStatus,
|
|
3
|
+
DialogDimensions,
|
|
4
|
+
SortOrder,
|
|
5
|
+
SortOrderTableHeader,
|
|
6
|
+
TableHeaderAlign,
|
|
7
|
+
HeaderType,
|
|
8
|
+
CellType,
|
|
9
|
+
TableConstants,
|
|
10
|
+
ApplicationDrawerStatus,
|
|
11
|
+
ToastType,
|
|
12
|
+
ToastLocation,
|
|
13
|
+
StatusCode,
|
|
14
|
+
FormValidationStatus,
|
|
15
|
+
StorageKeys,
|
|
16
|
+
ApplicationTheme,
|
|
17
|
+
StoreNames,
|
|
18
|
+
Symbols,
|
|
19
|
+
} from "./Constants";
|