@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
package/dist/IronCore.js
CHANGED
|
@@ -1037,7 +1037,9 @@ class ut {
|
|
|
1037
1037
|
getAccessLevels(e, s) {
|
|
1038
1038
|
var n;
|
|
1039
1039
|
let r = Object.keys(s);
|
|
1040
|
-
return r.length || (r = Array.from(
|
|
1040
|
+
return r.length || (r = Array.from(
|
|
1041
|
+
((n = this._authorizationService.getAccessLevelsOfScope(e)) == null ? void 0 : n.values()) ?? []
|
|
1042
|
+
)), r;
|
|
1041
1043
|
}
|
|
1042
1044
|
}
|
|
1043
1045
|
class Js extends ut {
|
|
@@ -1264,13 +1266,17 @@ class sr {
|
|
|
1264
1266
|
getInputControl(e) {
|
|
1265
1267
|
const s = this._inputControls.get(e);
|
|
1266
1268
|
if (!s)
|
|
1267
|
-
throw new Error(
|
|
1269
|
+
throw new Error(
|
|
1270
|
+
`The provided input name (${e}}) has no controls.`
|
|
1271
|
+
);
|
|
1268
1272
|
return s;
|
|
1269
1273
|
}
|
|
1270
1274
|
resetControls(e) {
|
|
1271
1275
|
for (const s of e) {
|
|
1272
1276
|
const r = this._inputControls.get(s);
|
|
1273
|
-
r ? r.reset() : console.warn(
|
|
1277
|
+
r ? r.reset() : console.warn(
|
|
1278
|
+
`Provided input name ${s} has no controllers in this form`
|
|
1279
|
+
);
|
|
1274
1280
|
}
|
|
1275
1281
|
}
|
|
1276
1282
|
resetAll() {
|
|
@@ -2376,7 +2382,9 @@ class Nr {
|
|
|
2376
2382
|
}), this.repository = e, this.crudDataManagement = s, this.syncDetail = this.repository.getSyncDetail(), this.paramManager = r, this.syncListWithApi();
|
|
2377
2383
|
}
|
|
2378
2384
|
async fetchList() {
|
|
2379
|
-
const e = await this.repository.fetchList(
|
|
2385
|
+
const e = await this.repository.fetchList(
|
|
2386
|
+
this.paramManager.getRequestParams()
|
|
2387
|
+
);
|
|
2380
2388
|
return this.crudDataManagement.addOrReplaceItems(e.items), this.crudDataManagement.setTotalCount(e.totalItems), e;
|
|
2381
2389
|
}
|
|
2382
2390
|
async fetchItemById(e) {
|
|
@@ -2424,7 +2432,9 @@ class jr extends gs {
|
|
|
2424
2432
|
const n = [];
|
|
2425
2433
|
e: for (const i of e)
|
|
2426
2434
|
for (const a of r(i))
|
|
2427
|
-
if (Q.removeSpacesFromString(String(a).toLowerCase()).indexOf(
|
|
2435
|
+
if (Q.removeSpacesFromString(String(a).toLowerCase()).indexOf(
|
|
2436
|
+
Q.removeSpacesFromString(String(s).toLowerCase())
|
|
2437
|
+
) > -1) {
|
|
2428
2438
|
n.push(i);
|
|
2429
2439
|
continue e;
|
|
2430
2440
|
}
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
export * from './src/lib';
|
|
2
|
+
export * from './src/accessHandling';
|
|
3
|
+
export * from './src/baseDirective';
|
|
4
|
+
export * from './src/baseForm';
|
|
5
|
+
export * from './src/baseSchedule';
|
|
6
|
+
export * from './src/baseTable';
|
|
7
|
+
export * from './src/composables';
|
|
8
|
+
export * from './src/constants';
|
|
9
|
+
export * from './src/dateHandling';
|
|
10
|
+
export * from './src/debounce';
|
|
11
|
+
export * from './src/errorHandling';
|
|
12
|
+
export * from './src/feedbackHandling';
|
|
13
|
+
export * from './src/httpClient';
|
|
14
|
+
export * from './src/initializer';
|
|
15
|
+
export * from './src/json';
|
|
16
|
+
export { useDialogService, ToastType, useDrawerService, ToastLocation, ToastMessage, } from './src/layout';
|
|
17
|
+
export * from './src/lib';
|
|
18
|
+
export * from './src/observables';
|
|
19
|
+
export * from './src/process';
|
|
20
|
+
export * from './src/repository';
|
|
21
|
+
export * from './src/routeGuard';
|
|
22
|
+
export * from './src/sort';
|
|
23
|
+
export * from './src/types';
|
|
24
|
+
export * from './src/validators';
|
|
25
|
+
export * from './src/Utils';
|
|
26
|
+
export * from './src/crudService';
|
|
27
|
+
export * from './src/search';
|
|
28
|
+
export * from './src/deviceManagement';
|
|
29
|
+
export * from './src/BaseModel';
|
|
30
|
+
export * from './src/eventSystem';
|
|
31
|
+
export * from './src/webSocket';
|
|
@@ -18,10 +18,10 @@ export declare class TradeDate {
|
|
|
18
18
|
requestedDate: number;
|
|
19
19
|
executedDate: number;
|
|
20
20
|
constructor(requestedDate: number, executedDate: number);
|
|
21
|
-
get requestedDateInJalali():
|
|
22
|
-
get requestedTime():
|
|
23
|
-
get executedDateInJalali():
|
|
24
|
-
get executedDateTime():
|
|
21
|
+
get requestedDateInJalali(): string;
|
|
22
|
+
get requestedTime(): string;
|
|
23
|
+
get executedDateInJalali(): string;
|
|
24
|
+
get executedDateTime(): string;
|
|
25
25
|
}
|
|
26
26
|
export declare class TradeAmount {
|
|
27
27
|
requestedAmount: Amount;
|
|
@@ -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
|
+
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { SortDetail } from '../sort';
|
|
2
2
|
import { BaseModel } from '../BaseModel';
|
|
3
|
+
import { LoadingStatus } from '../constants';
|
|
3
4
|
import { Accessible } from '../accessHandling';
|
|
4
5
|
import { TableHeaderSchema } from './TableHeaderSchema';
|
|
5
6
|
import { TableService } from './TableService';
|
|
@@ -24,8 +25,8 @@ export declare abstract class BaseTable<Model extends BaseModel> {
|
|
|
24
25
|
private shouldSendPaginationRequest;
|
|
25
26
|
protected loadRows(): Promise<Model[]>;
|
|
26
27
|
getData(): import('./TableHeaderSchema').TableRenderingData<Model>;
|
|
27
|
-
protected handleSort(sortDetail: SortDetail<Model>): Promise<import('../repository
|
|
28
|
-
protected handlePagination(nextPage: number, pageSize: number): Promise<import('../repository
|
|
28
|
+
protected handleSort(sortDetail: SortDetail<Model>): Promise<import('../repository').FetchListResponse<Model>>;
|
|
29
|
+
protected handlePagination(nextPage: number, pageSize: number): Promise<import('../repository').FetchListResponse<Model>>;
|
|
29
30
|
getItemCountPerPage(): number;
|
|
30
31
|
isLoading(): boolean;
|
|
31
32
|
protected getLoadingStatuses(): Set<LoadingStatus>;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
1
|
import { TableHeaderSchema } from './TableHeaderSchema';
|
|
2
2
|
import { BaseModel } from '../BaseModel';
|
|
3
|
+
import { CellType, HeaderType, TableHeaderAlign } from '../constants';
|
|
3
4
|
export declare const TABLE_COLUMN_DEFAULT_WIDTH = "150px";
|
|
4
5
|
export declare const TABLE_COLUMN_DEFAULT_COLSPAN = 2;
|
|
5
6
|
export declare const TABLE_ACTION_COLUMN: TableHeaderSchema<BaseModel>;
|
|
6
7
|
export declare const TABLE_COLUMN_DEFAULT_VALUES: {
|
|
7
8
|
width: string;
|
|
8
|
-
align:
|
|
9
|
-
headerType:
|
|
10
|
-
cellType:
|
|
9
|
+
align: TableHeaderAlign;
|
|
10
|
+
headerType: HeaderType;
|
|
11
|
+
cellType: CellType;
|
|
11
12
|
colspan: number;
|
|
12
13
|
};
|
|
@@ -9,8 +9,8 @@ export declare abstract class SelectableTable<Model extends BaseModel> extends B
|
|
|
9
9
|
rowSelect(row: Model): void;
|
|
10
10
|
selectAll(): void;
|
|
11
11
|
private isEveryRowSelected;
|
|
12
|
-
protected handlePagination(nextPage: number, pageSize: number): Promise<import('../repository
|
|
13
|
-
protected handleSort(sortDetail: SortDetail<Model>): Promise<import('../repository
|
|
12
|
+
protected handlePagination(nextPage: number, pageSize: number): Promise<import('../repository').FetchListResponse<Model>>;
|
|
13
|
+
protected handleSort(sortDetail: SortDetail<Model>): Promise<import('../repository').FetchListResponse<Model>>;
|
|
14
14
|
clearAllSelectedItems(): void;
|
|
15
15
|
getSelectedRows(): BehaviorSubject<Map<number, Model>>;
|
|
16
16
|
getSelectedRowsAsArray(): Model[];
|
|
@@ -8,7 +8,7 @@ export declare class SelectableTableGenerator<T> extends TableGenerator<T> {
|
|
|
8
8
|
selectAll(): void;
|
|
9
9
|
private isEveryRowSelected;
|
|
10
10
|
clearAllSelectedItems(): void;
|
|
11
|
-
getSelectedRows():
|
|
12
|
-
getSelectedRowsAsArray():
|
|
13
|
-
getSelectedRowIds():
|
|
11
|
+
getSelectedRows(): Map<number, T>;
|
|
12
|
+
getSelectedRowsAsArray(): T[];
|
|
13
|
+
getSelectedRowIds(): number[];
|
|
14
14
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BaseTable } from '
|
|
1
|
+
import { BaseTable } from '../index';
|
|
2
2
|
import { BaseModel } from '../../BaseModel';
|
|
3
3
|
import { SelectableTable } from '../SelectableTable';
|
|
4
4
|
export declare function Table<Model extends BaseModel>(table: typeof BaseTable<Model> | typeof SelectableTable<Model>): (constructor: Function) => void;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { TableHeaderSchema } from '
|
|
1
|
+
import { TableHeaderSchema } from '../../index';
|
|
2
2
|
export declare function GColumn<T>(header: TableHeaderSchema<T>): (target: T, propertyKey: string) => void;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { BaseModel } from '../BaseModel';
|
|
2
2
|
export declare function useCrud<Entity extends BaseModel>(): {
|
|
3
|
-
entityItemsAsArray:
|
|
3
|
+
entityItemsAsArray: import('vue').ComputedRef<Entity[]>;
|
|
4
4
|
addOrReplaceItems: (items: Entity[]) => void;
|
|
5
|
-
removeById: (id: string | number) =>
|
|
6
|
-
getItemById: (id: number | string) =>
|
|
5
|
+
removeById: (id: string | number) => Entity;
|
|
6
|
+
getItemById: (id: number | string) => Entity;
|
|
7
7
|
clearItems: () => void;
|
|
8
8
|
setTotalCount: (count: number) => void;
|
|
9
|
-
getTotalCount:
|
|
9
|
+
getTotalCount: import('vue').ComputedRef<number>;
|
|
10
10
|
};
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
1
2
|
import { BaseModel } from '../BaseModel';
|
|
2
3
|
import { Nullable } from '../types';
|
|
3
4
|
export declare function useData<Model extends BaseModel>(): {
|
|
4
|
-
itemsAsArray:
|
|
5
|
-
totalCount:
|
|
6
|
-
currentItem: any
|
|
5
|
+
itemsAsArray: import('vue').ComputedRef<Model[]>;
|
|
6
|
+
totalCount: Ref<number, number>;
|
|
7
|
+
currentItem: [Model] extends [Ref<any, any>] ? import('@vue/shared').IfAny<Model, Ref<Model, Model>, Model> : Ref<import('vue').UnwrapRef<Model>, Model | import('vue').UnwrapRef<Model>>;
|
|
7
8
|
setTotalCount: (totalItems: number) => void;
|
|
8
9
|
addOrReplaceItems: (itemsToAdd: Model[]) => void;
|
|
9
10
|
getById: (id: number) => Nullable<Model>;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { LoadingStatus } from '../constants';
|
|
2
|
+
export declare function useLoadingStatus(): {
|
|
3
|
+
loadingStatus: import('vue').Ref<Set<LoadingStatus> & Omit<Set<LoadingStatus>, keyof Set<any>>, Set<LoadingStatus> | (Set<LoadingStatus> & Omit<Set<LoadingStatus>, keyof Set<any>>)>;
|
|
4
|
+
isFetchingList: import('vue').ComputedRef<boolean>;
|
|
5
|
+
isFetchingItem: import('vue').ComputedRef<boolean>;
|
|
6
|
+
isFetchingLastItems: import('vue').ComputedRef<boolean>;
|
|
7
|
+
isFetchingPreviousItems: import('vue').ComputedRef<boolean>;
|
|
8
|
+
isCreating: import('vue').ComputedRef<boolean>;
|
|
9
|
+
isUpdating: import('vue').ComputedRef<boolean>;
|
|
10
|
+
isDeleting: import('vue').ComputedRef<boolean>;
|
|
11
|
+
isSearching: import('vue').ComputedRef<boolean>;
|
|
12
|
+
isSorting: import('vue').ComputedRef<boolean>;
|
|
13
|
+
setStatus: (status: LoadingStatus) => void;
|
|
14
|
+
removeStatus: (status: LoadingStatus) => void;
|
|
15
|
+
};
|
|
@@ -1,7 +1,9 @@
|
|
|
1
|
+
import { Ref } from 'vue';
|
|
1
2
|
import { SortDetail } from '../sort';
|
|
2
3
|
import { BaseModel } from '../BaseModel';
|
|
4
|
+
import { Params } from '../repository';
|
|
3
5
|
export declare function useParams(): {
|
|
4
|
-
params: Ref<Params>;
|
|
6
|
+
params: Ref<Params, Params>;
|
|
5
7
|
setNextPage: () => void;
|
|
6
8
|
setPreventPage: () => void;
|
|
7
9
|
setPageNumber: (pageNumber: number) => void;
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
import { Repository } from '../repository';
|
|
2
|
+
import { LoadingStatus } from '../constants';
|
|
3
|
+
import { SortDetail } from '../sort';
|
|
4
|
+
import { BaseModel } from '../BaseModel';
|
|
5
|
+
import { TableRenderingData, TableService } from '../baseTable';
|
|
6
|
+
export declare function useRepository<Model extends BaseModel>(repository: Repository<Model>): {
|
|
7
|
+
loadingStatusManager: {
|
|
8
|
+
loadingStatus: import('vue').Ref<Set<LoadingStatus> & Omit<Set<LoadingStatus>, keyof Set<any>>, Set<LoadingStatus> | (Set<LoadingStatus> & Omit<Set<LoadingStatus>, keyof Set<any>>)>;
|
|
9
|
+
isFetchingList: import('vue').ComputedRef<boolean>;
|
|
10
|
+
isFetchingItem: import('vue').ComputedRef<boolean>;
|
|
11
|
+
isFetchingLastItems: import('vue').ComputedRef<boolean>;
|
|
12
|
+
isFetchingPreviousItems: import('vue').ComputedRef<boolean>;
|
|
13
|
+
isCreating: import('vue').ComputedRef<boolean>;
|
|
14
|
+
isUpdating: import('vue').ComputedRef<boolean>;
|
|
15
|
+
isDeleting: import('vue').ComputedRef<boolean>;
|
|
16
|
+
isSearching: import('vue').ComputedRef<boolean>;
|
|
17
|
+
isSorting: import('vue').ComputedRef<boolean>;
|
|
18
|
+
setStatus: (status: LoadingStatus) => void;
|
|
19
|
+
removeStatus: (status: LoadingStatus) => void;
|
|
20
|
+
};
|
|
21
|
+
dataManger: {
|
|
22
|
+
itemsAsArray: import('vue').ComputedRef<BaseModel[]>;
|
|
23
|
+
totalCount: import('vue').Ref<number, number>;
|
|
24
|
+
currentItem: import('vue').Ref<{
|
|
25
|
+
id: number | string;
|
|
26
|
+
}, BaseModel | {
|
|
27
|
+
id: number | string;
|
|
28
|
+
}>;
|
|
29
|
+
setTotalCount: (totalItems: number) => void;
|
|
30
|
+
addOrReplaceItems: (itemsToAdd: BaseModel[]) => void;
|
|
31
|
+
getById: (id: number) => BaseModel;
|
|
32
|
+
removeById: (id: number) => boolean;
|
|
33
|
+
clearItems: () => void;
|
|
34
|
+
setCurrentItem: (item: BaseModel) => void;
|
|
35
|
+
clearCurrentItem: () => void;
|
|
36
|
+
};
|
|
37
|
+
paramsManager: {
|
|
38
|
+
params: import('vue').Ref<import('../repository').Params, import('../repository').Params>;
|
|
39
|
+
setNextPage: () => void;
|
|
40
|
+
setPreventPage: () => void;
|
|
41
|
+
setPageNumber: (pageNumber: number) => void;
|
|
42
|
+
setItemCount: (itemCount: number) => void;
|
|
43
|
+
setSortDetail: (sortDetail: SortDetail<BaseModel>) => void;
|
|
44
|
+
setFilter: (key: string, value: unknown) => void;
|
|
45
|
+
removeFilter: (key: string) => void;
|
|
46
|
+
getRequestParams: () => Record<string, unknown>;
|
|
47
|
+
clearParam: () => void;
|
|
48
|
+
setFiltersBaseOnRequestBody: (filters: Record<string, unknown>) => void;
|
|
49
|
+
};
|
|
50
|
+
tableRenderingData: import('vue').ComputedRef<TableRenderingData<Model>>;
|
|
51
|
+
fetchList: (loadingStatus?: LoadingStatus) => Promise<import('../repository').FetchListResponse<Model>>;
|
|
52
|
+
fetchWithAutoRefresh: () => Promise<void>;
|
|
53
|
+
setupAutoRefresh: () => void;
|
|
54
|
+
stopAutoRefresh: () => void;
|
|
55
|
+
fetchItemById: (id: number, shouldRemoveItem?: boolean) => Promise<Model>;
|
|
56
|
+
createItem: <Body>(body: Body) => Promise<Model>;
|
|
57
|
+
updateItem: <Body>(id: number, body: Body) => Promise<Model>;
|
|
58
|
+
deleteItem: (id: number) => Promise<boolean>;
|
|
59
|
+
fetchLastItems: () => Promise<import('../repository').FetchListResponse<Model>>;
|
|
60
|
+
fetchPreviousItems: () => Promise<import('../repository').FetchListResponse<Model>>;
|
|
61
|
+
fetchItemsByPageNumber: (pageNumber: number) => Promise<import('../repository').FetchListResponse<Model>>;
|
|
62
|
+
search: (searchedValue: string) => Promise<import('../repository').FetchListResponse<Model>>;
|
|
63
|
+
sort: (sortDetail: SortDetail<Model>) => Promise<import('../repository').FetchListResponse<Model>>;
|
|
64
|
+
clearFilters: () => Promise<import('../repository').FetchListResponse<Model>>;
|
|
65
|
+
tableService: import('vue').ComputedRef<TableService<Model>>;
|
|
66
|
+
currentPageItems: import('vue').ComputedRef<Model[]>;
|
|
67
|
+
};
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { TableService } from '../baseTable';
|
|
2
|
+
export declare function useStaticTableService<Model>(initialRows: Model[]): {
|
|
3
|
+
tableRows: import('vue').Ref<import('@vue/reactivity').UnwrapRefSimple<Model>[], Model[] | import('@vue/reactivity').UnwrapRefSimple<Model>[]>;
|
|
4
|
+
staticTableService: import('vue').ComputedRef<TableService<Model>>;
|
|
5
|
+
};
|
|
@@ -1,20 +1,20 @@
|
|
|
1
|
-
import { SyncDetail, useParams, useCrud, Repository } from '../../index';
|
|
1
|
+
import { Scheduler, SyncDetail, useParams, useCrud, Repository } from '../../index';
|
|
2
2
|
import { BaseModel } from '../BaseModel';
|
|
3
3
|
export declare class CrudService<Entity extends BaseModel> {
|
|
4
4
|
protected repository: Repository<Entity>;
|
|
5
5
|
protected crudDataManagement: ReturnType<typeof useCrud>;
|
|
6
|
-
protected scheduler:
|
|
6
|
+
protected scheduler: Scheduler;
|
|
7
7
|
protected syncDetail: SyncDetail;
|
|
8
8
|
paramManager: any;
|
|
9
9
|
constructor(repository: Repository<Entity>, crudDataManagement: ReturnType<typeof useCrud>, paramManager: ReturnType<typeof useParams>);
|
|
10
|
-
fetchList(): Promise<
|
|
11
|
-
fetchItemById(id: number): Promise<
|
|
12
|
-
createItem<Body>(body: Body): Promise<
|
|
10
|
+
fetchList(): Promise<import('../repository').FetchListResponse<Entity>>;
|
|
11
|
+
fetchItemById(id: number): Promise<Entity>;
|
|
12
|
+
createItem<Body>(body: Body): Promise<Entity>;
|
|
13
13
|
protected shouldRefreshListAfterCreate(): boolean;
|
|
14
|
-
deleteItem(id: number): Promise<
|
|
15
|
-
updateItem<Body>(id: number, body: Body): Promise<
|
|
14
|
+
deleteItem(id: number): Promise<BaseModel>;
|
|
15
|
+
updateItem<Body>(id: number, body: Body): Promise<BaseModel>;
|
|
16
16
|
protected shouldRefreshListAfterUpdate(): boolean;
|
|
17
|
-
removeItem(id: number): Promise<
|
|
17
|
+
removeItem(id: number): Promise<BaseModel>;
|
|
18
18
|
protected shouldRefreshListAfterDelete(): boolean;
|
|
19
19
|
private syncListWithApi;
|
|
20
20
|
onDestroy(): void;
|
|
@@ -4,7 +4,7 @@ export declare class APIErrorHandlerRegistry {
|
|
|
4
4
|
private static handlers;
|
|
5
5
|
private static instance;
|
|
6
6
|
private constructor();
|
|
7
|
-
static GetInstance():
|
|
7
|
+
static GetInstance(): APIErrorHandlerRegistry;
|
|
8
8
|
static registerHandler(statusCode: number, handler: ErrorHandler): void;
|
|
9
9
|
handle(error: AxiosError): void;
|
|
10
10
|
}
|