@zohodesk/library-platform 1.1.13 → 1.2.0-exp.1
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/es/bc/column-chooser/EventHandlers.js +1 -2
- package/es/bc/sdk/ResourceNamesEnum.js +1 -0
- package/es/bc/zform/Properties.js +20 -0
- package/es/bc/zform/Symbol.js +3 -0
- package/es/bc/zrecord/Constants.js +2 -0
- package/es/cc/action-band/Properties.js +37 -0
- package/es/cc/action-band/constants/ExternalConstants.js +3 -1
- package/es/cc/component/Dispatch.js +1 -0
- package/es/cc/component/LifeCycleEventsEnum.js +1 -0
- package/es/cc/component/index.js +3 -0
- package/es/cc/fields/currency/Properties.js +9 -0
- package/es/cc/fields/decimal/Properties.js +9 -0
- package/es/cc/fields/email/Properties.js +9 -0
- package/es/cc/fields/lookup/Properties.js +10 -26
- package/es/cc/fields/multi-line/Properties.js +1 -0
- package/es/cc/fields/number/Properties.js +10 -1
- package/es/cc/fields/phone/Properties.js +9 -0
- package/es/cc/fields/text/Properties.js +2 -2
- package/es/cc/fields/url/Properties.js +9 -0
- package/es/cc/one-unification/Constants.js +24 -0
- package/es/cc/one-unification/unified-navigation/ActionTypes.js +1 -0
- package/es/cc/one-unification/unified-navigation/CommonTypes.js +1 -0
- package/es/cc/one-unification/unified-navigation/ConfigTypes.js +1 -0
- package/es/cc/one-unification/unified-navigation/HandlerTypes.js +1 -0
- package/es/cc/one-unification/unified-navigation/Types.js +1 -0
- package/es/cc/one-unification/unified-navigation/UnifiedNavigation.d.js +0 -0
- package/es/cc/one-unification/unified-navigation/index.js +1 -0
- package/es/cc/smart-navigation/Constants.js +8 -0
- package/es/cc/smart-navigation/Events.js +107 -0
- package/es/cc/smart-navigation/Properties.js +87 -0
- package/es/cc/smart-navigation/index.js +4 -0
- package/es/cc/table-column-chooser/Constants.js +2 -1
- package/es/cc/table-connected/SdkContract.js +22 -0
- package/es/cc/text/Properties.js +100 -0
- package/es/cc/textbox/Properties.js +1 -1
- package/es/index.js +8 -3
- package/es/library/behaviours/clip-wrap/applications/usecases/ClipWrapUpdateUseCase.js +19 -0
- package/es/library/behaviours/library-loader/adapters/controllers/LibraryLoaderController.js +17 -0
- package/es/library/behaviours/library-loader/adapters/gateways/LibraryLoaderAdapter.js +29 -0
- package/es/library/behaviours/library-loader/applications/usecases/LoadLibraryUseCase.js +42 -0
- package/es/library/behaviours/library-loader/domain/entities/interfaces/ILibraryLoader.js +1 -0
- package/es/library/behaviours/library-loader/frameworks/LibraryLoaderBehaviour.js +26 -0
- package/es/library/behaviours/search/adapters/controllers/UpdatePropertiesController.js +9 -4
- package/es/library/custom-component/adapters/gateways/event-manager/EventManager.js +4 -3
- package/es/library/custom-component/applications/usecases/DispatchUseCase.js +1 -0
- package/es/library/custom-component/applications/usecases/InitializeUseCase.js +1 -0
- package/es/library/custom-component/applications/usecases/MountUseCase.js +1 -0
- package/es/library/custom-component/applications/usecases/SetRefUseCase.js +7 -0
- package/es/library/custom-component/applications/usecases/UnmountUseCase.js +1 -0
- package/es/library/custom-component/applications/usecases/UpdatePropertyUseCase.js +1 -0
- package/es/library/custom-component/domain/entities/Component.js +1 -0
- package/es/library/custom-component/domain/entities/Logger.js +4 -9
- package/es/library/dot/components/form-fields/currency/frameworks/ui/CurrencyView.js +2 -0
- package/es/library/dot/components/form-fields/decimal/frameworks/ui/DecimalView.js +2 -0
- package/es/library/dot/components/form-fields/email/frameworks/ui/Email.js +1 -1
- package/es/library/dot/components/form-fields/email/frameworks/ui/EmailView.js +2 -0
- package/es/library/dot/components/form-fields/number/frameworks/ui/NumberView.js +2 -0
- package/es/library/dot/components/form-fields/phone/frameworks/ui/PhoneView.js +2 -0
- package/es/library/dot/components/form-fields/textarea/frameworks/ui/TextArea.js +1 -1
- package/es/library/dot/components/form-fields/textarea/frameworks/ui/TextAreaView.js +4 -2
- package/es/library/dot/components/form-fields/textbox/frameworks/ui/TextBoxView.js +2 -0
- package/es/library/dot/components/form-fields/url/frameworks/ui/UrlView.js +2 -0
- package/es/library/dot/components/table-list/frameworks/ui/sub-components/header/HeaderData.js +1 -1
- package/es/library/dot/legacy-to-new-arch/table-field-components/text-field/frameworks/ui/TextFieldView.js +20 -0
- package/es/library/dot/legacy-to-new-arch/text/frameworks/ui/Text.js +2 -2
- package/es/library/dot/legacy-to-new-arch/text/frameworks/ui/TextView.js +22 -1
- package/es/platform/app-context-behaviour/adapters/controllers/AbstractController.js +9 -0
- package/es/platform/app-context-behaviour/adapters/controllers/UpdatePropertiesController.js +32 -0
- package/es/platform/app-context-behaviour/adapters/gateway/Repository.js +22 -0
- package/es/platform/app-context-behaviour/adapters/gateway/Service.js +10 -0
- package/es/platform/app-context-behaviour/adapters/presenter/Presenter.js +16 -0
- package/es/platform/app-context-behaviour/applications/interfaces/UseCaseDependencies.js +1 -0
- package/es/platform/app-context-behaviour/applications/interfaces/gateways/IRepository.js +1 -0
- package/es/platform/app-context-behaviour/applications/interfaces/gateways/IService.js +1 -0
- package/es/platform/app-context-behaviour/applications/interfaces/input/UpdatePropertiesInputModel.js +1 -0
- package/es/platform/app-context-behaviour/applications/interfaces/output/BehaviourOutputModel.js +1 -0
- package/es/platform/app-context-behaviour/applications/interfaces/output/IPresenter.js +1 -0
- package/es/platform/app-context-behaviour/applications/usecases/AbstractUseCase.js +17 -0
- package/es/platform/app-context-behaviour/applications/usecases/UpdatePropertiesUsecase.js +25 -0
- package/es/platform/app-context-behaviour/domain/entities/AppContext.js +44 -0
- package/es/platform/app-context-behaviour/domain/entities/interfaces/IAppContext.js +1 -0
- package/es/platform/app-context-behaviour/frameworks/AppContextBehaviourFactory.js +2 -2
- package/es/platform/app-context-behaviour/frameworks/EventHandlerFactory.js +22 -0
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/presenters/FilterUtils.js +11 -0
- package/es/platform/client-actions/behaviour/zclient-actions/adapters/resources/ClientActionsFetchSDK.js +76 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/interfaces/ClientActionsAPIGatewayParams.js +1 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/interfaces/ClientActionsFetchSDKParams.js +10 -0
- package/es/platform/client-actions/behaviour/zclient-actions/applications/interfaces/IClientActionsFetchSDK.js +0 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/adapters/resources/ClientScriptsFetchSDK.js +43 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/ClientScriptsAPIGatewayParams.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/ClientScriptsSDKFetchParams.js +1 -0
- package/es/platform/client-scripts/behaviour/zclient-scripts-fetch/applications/interfaces/IClientScriptsFetchSDK.js +0 -0
- package/es/platform/column-chooser/adapters/controllers/ColumnChooserOpenController.js +14 -6
- package/es/platform/column-chooser/adapters/controllers/ColumnChooserUpdateController.js +22 -0
- package/es/platform/column-chooser/adapters/gateways/Repository.js +12 -1
- package/es/platform/column-chooser/adapters/gateways/Service.js +2 -0
- package/es/platform/column-chooser/applications/interfaces/input/ColumnChooserUpdateInput.js +1 -0
- package/es/platform/column-chooser/applications/usecases/ColumnChooserSaveUseCase.js +8 -1
- package/es/platform/column-chooser/applications/usecases/ColumnChooserUpdateUseCase.js +35 -0
- package/es/platform/column-chooser/domain/entities/ColumnChooserImp.js +6 -0
- package/es/platform/column-chooser/frameworks/EventHandlersFactory.js +6 -4
- package/es/platform/components/index.js +1 -0
- package/es/platform/components/smart-action-band/adapters/presenters/ActionBandTranslator.js +70 -8
- package/es/platform/components/smart-action-band/adapters/presenters/utils/DefaultClientActions.js +32 -0
- package/es/platform/components/smart-action-band/frameworks/EventHandlersFactory.js +42 -1
- package/es/platform/components/smart-action-band/frameworks/SmartActionBandFactory.js +4 -1
- package/es/platform/components/smart-navigation/adapters/controllers/LoadScriptController.js +0 -0
- package/es/platform/components/smart-navigation/adapters/controllers/UiModelInitializeController.js +0 -0
- package/es/platform/components/smart-navigation/adapters/presenters/OneUnifiedNavigationTranslator.js +248 -0
- package/es/platform/components/smart-navigation/adapters/presenters/Present.js +77 -0
- package/es/platform/components/smart-navigation/adapters/presenters/SampleModel.js +356 -0
- package/es/platform/components/smart-navigation/adapters/resources/SmartNavigationResource.js +96 -0
- package/es/platform/components/smart-navigation/applications/usecases/NavigateModuleUseCase.js +0 -0
- package/es/platform/components/smart-navigation/frameworks/CustomElementRenderer.js +22 -0
- package/es/platform/components/smart-navigation/frameworks/SmartNavigation.js +12 -0
- package/es/platform/components/smart-navigation/frameworks/one-unification/OneUnificationEventHandlers.js +156 -0
- package/es/platform/components/smart-navigation/frameworks/one-unification/SmartNavigation.js +83 -0
- package/es/platform/components/smart-navigation/frameworks/one-unification/SmartNavigation.module.css +3 -0
- package/es/platform/components/smart-navigation/frameworks/one-unification/SmartNavigationEventHandlers.js +173 -0
- package/es/platform/components/smart-navigation/frameworks/one-unification/UnifiedNavigation.js +48 -0
- package/es/platform/components/smart-navigation/frameworks/one-unification/UnifiedNavigationActions.js +144 -0
- package/es/platform/components/table-connected/adapters/resources/SmartTableResource.js +52 -0
- package/es/platform/components/table-connected/frameworks/EventHandlersFactory.js +1 -7
- package/es/platform/components/table-connected/frameworks/ListSdkFactory.js +4 -2
- package/es/platform/data-source/http-template/fetchLookupFields.js +0 -6
- package/es/platform/data-source/http-template/getPageClientActions.js +23 -0
- package/es/platform/data-source/http-template/getSingleRecord.js +51 -0
- package/es/platform/data-source/index.js +2 -0
- package/es/platform/data-source/utils/validation-rules/FieldConditions.js +1 -1
- package/es/platform/sdk-behaviour/adapters/controllers/InitializeController.js +7 -2
- package/es/platform/sdk-behaviour/applications/usecases/CreateResourceInstanceUseCase.js +10 -1
- package/es/platform/zform/adapters/controllers/GetInitialRecordSuccessController.js +31 -0
- package/es/platform/zform/adapters/gateway/FormRepository.js +10 -2
- package/es/platform/zform/adapters/gateway/Service.js +2 -0
- package/es/platform/zform/adapters/presenter/FormTranslator.js +27 -15
- package/es/platform/zform/adapters/presenter/translators/SectionTranslator.js +1 -1
- package/es/platform/zform/adapters/presenter/translators/fields/CurrencyFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/DecimalFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/EmailFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/LookUpFieldTranslator.js +11 -7
- package/es/platform/zform/adapters/presenter/translators/fields/NumberFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/PhoneFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/TextAreaFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/TextFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/translators/fields/URLFieldTranslator.js +1 -0
- package/es/platform/zform/adapters/presenter/utils/sanitizeHtmlString.js +2 -2
- package/es/platform/zform/applications/interfaces/input/GetInitialRecordSuccessUseCaseInputModel.js +1 -0
- package/es/platform/zform/applications/usecases/GetInitialRecordSuccessUseCase.js +132 -0
- package/es/platform/zform/applications/usecases/InitializeUseCase.js +54 -30
- package/es/platform/zform/applications/usecases/LookupFieldSuccessUseCase.js +5 -0
- package/es/platform/zform/applications/usecases/MyFormSuccessUseCase.js +12 -11
- package/es/platform/zform/applications/usecases/SubmitValidationCompletedUseCase.js +21 -8
- package/es/platform/zform/domain/ZField.js +7 -5
- package/es/platform/zform/domain/ZForm.js +97 -20
- package/es/platform/zform/frameworks/ui/EventHandlerFactory.js +23 -5
- package/es/platform/zform/frameworks/ui/ZFormBehaviourFactory.js +2 -0
- package/es/platform/zlist/adapters/presenters/TableTranslator.js +5 -4
- package/es/platform/zrecord/adapters/controllers/UpdateRecordController.js +30 -0
- package/es/platform/zrecord/adapters/gateways/Service.js +2 -0
- package/es/platform/zrecord/applications/interfaces/input/UpdateRecordInputModel.js +0 -0
- package/es/platform/zrecord/applications/usecases/UpdateRecordUseCase.js +30 -0
- package/es/platform/zrecord/frameworks/ActionsHandlersFactory.js +4 -1
- package/package.json +9 -11
- package/es/platform/components/table-connected/adapters/controllers/ColumnChooserOpenedController.js +0 -28
- package/es/platform/components/table-connected/adapters/controllers/ColumnChooserUpdateController.js +0 -31
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { createCustomComponent } from "../../../../../library/custom-component";
|
|
3
|
+
import { OneUnifiedNavigationTranslator } from "../../adapters/presenters/OneUnifiedNavigationTranslator";
|
|
4
|
+
import { sdkRegistry } from "../../../../sdk/frameworks/SdkRegistry";
|
|
5
|
+
import ResourceNamesEnum from "../../../../../bc/sdk/ResourceNamesEnum";
|
|
6
|
+
import { SmartNavigationResource } from "../../adapters/resources/SmartNavigationResource";
|
|
7
|
+
import { UnifiedNavigation } from "./UnifiedNavigation";
|
|
8
|
+
import { SmartNavigationProperties } from "../../../../../cc/smart-navigation";
|
|
9
|
+
import { SmartNavigationEvent } from "./SmartNavigationEventHandlers";
|
|
10
|
+
sdkRegistry.registerResource({
|
|
11
|
+
resourceName: ResourceNamesEnum.SMART_NAVIGATION,
|
|
12
|
+
resource: SmartNavigationResource
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
function SmartNavigationView(_ref, ref) {
|
|
16
|
+
let {
|
|
17
|
+
state
|
|
18
|
+
} = _ref;
|
|
19
|
+
return /*#__PURE__*/React.createElement(UnifiedNavigation, {
|
|
20
|
+
getRef: ref,
|
|
21
|
+
model: state
|
|
22
|
+
});
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
function constructSmartNavigationBehaviours() {
|
|
26
|
+
// const libraryLoaderBehaviour = LibraryLoaderBehaviour(ONE_UNIFICATION.SCRIPT_ID, 'https://static.localzohocdn.com/zunify/zunify.min.js');
|
|
27
|
+
// const sdkBehaviour = SdkBehaviourFactory.create([ResourceNamesEnum.SMART_NAVIGATION]);
|
|
28
|
+
return [];
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
function constructSmartNavigationEventHandlers() {
|
|
32
|
+
// const unifiedNavigationEventHandlers = new UnifiedNavigationEvent().getHandlers();
|
|
33
|
+
const smartNavigation = new SmartNavigationEvent().getHandlers();
|
|
34
|
+
const defaultEventHandlers = {
|
|
35
|
+
'SmartNavigation#MOUNT': () => {
|
|
36
|
+
sdkRegistry.createResourceInstance({
|
|
37
|
+
resourceName: ResourceNamesEnum.SMART_NAVIGATION,
|
|
38
|
+
instanceName: null
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
};
|
|
42
|
+
return { ...defaultEventHandlers,
|
|
43
|
+
...smartNavigation
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export const SmartNavigation = createCustomComponent({
|
|
48
|
+
name: 'SmartNavigation',
|
|
49
|
+
View: SmartNavigationView,
|
|
50
|
+
transformState: OneUnifiedNavigationTranslator,
|
|
51
|
+
behaviours: constructSmartNavigationBehaviours(),
|
|
52
|
+
eventHandlers: constructSmartNavigationEventHandlers(),
|
|
53
|
+
properties: SmartNavigationProperties
|
|
54
|
+
});
|
|
55
|
+
export function createSmartNavigation(_ref2) {
|
|
56
|
+
let {
|
|
57
|
+
dataSource
|
|
58
|
+
} = _ref2;
|
|
59
|
+
const {
|
|
60
|
+
getModules,
|
|
61
|
+
getViews,
|
|
62
|
+
getDepartments,
|
|
63
|
+
getClientActions,
|
|
64
|
+
getLayout,
|
|
65
|
+
getOnDemandModules
|
|
66
|
+
} = dataSource;
|
|
67
|
+
return props => {
|
|
68
|
+
const {
|
|
69
|
+
selectedModule,
|
|
70
|
+
iconMap
|
|
71
|
+
} = props;
|
|
72
|
+
return /*#__PURE__*/React.createElement(SmartNavigation, {
|
|
73
|
+
selectedModule: selectedModule,
|
|
74
|
+
modules: getModules(),
|
|
75
|
+
views: getViews(),
|
|
76
|
+
iconMap: iconMap,
|
|
77
|
+
departments: getDepartments(),
|
|
78
|
+
clientActions: getClientActions(),
|
|
79
|
+
overLayModules: getLayout()?.overLayModules || [],
|
|
80
|
+
onDemandModules: getOnDemandModules?.() || []
|
|
81
|
+
});
|
|
82
|
+
};
|
|
83
|
+
}
|
|
@@ -0,0 +1,173 @@
|
|
|
1
|
+
import { SmartNavigationConstants } from "../../../../../cc/smart-navigation";
|
|
2
|
+
import { SmartNavigationPresenter } from "../../adapters/presenters/Present";
|
|
3
|
+
import { ONE_UNIFICATION } from "../../../../../cc/one-unification/Constants";
|
|
4
|
+
export class SmartNavigationEvent {
|
|
5
|
+
handleModuleClick(_ref) {
|
|
6
|
+
let {
|
|
7
|
+
action,
|
|
8
|
+
state,
|
|
9
|
+
dispatch
|
|
10
|
+
} = _ref;
|
|
11
|
+
const {
|
|
12
|
+
key: moduleApiName,
|
|
13
|
+
content,
|
|
14
|
+
navigationPathKeys
|
|
15
|
+
} = action.payload;
|
|
16
|
+
const smartNavigationPresenter = new SmartNavigationPresenter(state);
|
|
17
|
+
const selectedModule = smartNavigationPresenter.findModule(moduleApiName);
|
|
18
|
+
dispatch({
|
|
19
|
+
type: SmartNavigationConstants.MODULE_CHANGE,
|
|
20
|
+
payload: {
|
|
21
|
+
selectedModule,
|
|
22
|
+
moduleParentApiNames: navigationPathKeys
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
handleAdd(_ref2) {
|
|
28
|
+
let {
|
|
29
|
+
action,
|
|
30
|
+
state,
|
|
31
|
+
dispatch
|
|
32
|
+
} = _ref2;
|
|
33
|
+
const {
|
|
34
|
+
key: moduleApiName,
|
|
35
|
+
content,
|
|
36
|
+
coords,
|
|
37
|
+
navigationPathKeys
|
|
38
|
+
} = action.payload;
|
|
39
|
+
const smartNavigationPresenter = new SmartNavigationPresenter(state);
|
|
40
|
+
const selectedModuleData = smartNavigationPresenter.findModule(moduleApiName);
|
|
41
|
+
dispatch({
|
|
42
|
+
type: SmartNavigationConstants.MODULE_ADD,
|
|
43
|
+
payload: {
|
|
44
|
+
newLink: selectedModuleData.newLink,
|
|
45
|
+
currentModule: selectedModuleData,
|
|
46
|
+
moduleParentApiNames: navigationPathKeys
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
handleLoadData(_ref3) {
|
|
52
|
+
let {
|
|
53
|
+
action,
|
|
54
|
+
state,
|
|
55
|
+
dispatch
|
|
56
|
+
} = _ref3;
|
|
57
|
+
const {
|
|
58
|
+
data
|
|
59
|
+
} = action.payload;
|
|
60
|
+
const {
|
|
61
|
+
key: moduleApiName
|
|
62
|
+
} = data;
|
|
63
|
+
const smartNavigationPresenter = new SmartNavigationPresenter(state);
|
|
64
|
+
const module = smartNavigationPresenter.findModule(moduleApiName);
|
|
65
|
+
dispatch({
|
|
66
|
+
type: SmartNavigationConstants.LOAD_DATA,
|
|
67
|
+
payload: {
|
|
68
|
+
module
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
handleSearch(_ref4) {
|
|
74
|
+
let {
|
|
75
|
+
action,
|
|
76
|
+
state,
|
|
77
|
+
dispatch
|
|
78
|
+
} = _ref4;
|
|
79
|
+
const {
|
|
80
|
+
key: moduleApiName,
|
|
81
|
+
query
|
|
82
|
+
} = action.payload;
|
|
83
|
+
const smartNavigationPresenter = new SmartNavigationPresenter(state);
|
|
84
|
+
const currentModule = smartNavigationPresenter.findModule(moduleApiName);
|
|
85
|
+
dispatch({
|
|
86
|
+
type: SmartNavigationConstants.SEARCH,
|
|
87
|
+
payload: {
|
|
88
|
+
currentModule,
|
|
89
|
+
searchValue: query
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
handleNavigationStateChange(_ref5) {
|
|
95
|
+
let {
|
|
96
|
+
action,
|
|
97
|
+
state,
|
|
98
|
+
dispatch
|
|
99
|
+
} = _ref5;
|
|
100
|
+
const {
|
|
101
|
+
isInCollapsedState
|
|
102
|
+
} = action.payload;
|
|
103
|
+
const eventType = isInCollapsedState ? SmartNavigationConstants.NAVIGATION_PANEL_COLLAPSED : SmartNavigationConstants.NAVIGATION_PANEL_EXPANDED;
|
|
104
|
+
dispatch({
|
|
105
|
+
type: eventType
|
|
106
|
+
});
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
handleCustomAction(_ref6) {
|
|
110
|
+
let {
|
|
111
|
+
action,
|
|
112
|
+
state,
|
|
113
|
+
dispatch
|
|
114
|
+
} = _ref6;
|
|
115
|
+
const {
|
|
116
|
+
action: actionName,
|
|
117
|
+
key: moduleApiName,
|
|
118
|
+
content,
|
|
119
|
+
navigationPathKeys: moduleParentApiNames
|
|
120
|
+
} = action.payload;
|
|
121
|
+
const smartNavigationPresenter = new SmartNavigationPresenter(state);
|
|
122
|
+
const currentModule = smartNavigationPresenter.findModule(moduleApiName);
|
|
123
|
+
dispatch({
|
|
124
|
+
type: SmartNavigationConstants.CUSTOM_ACTION,
|
|
125
|
+
payload: {
|
|
126
|
+
actionName,
|
|
127
|
+
currentModule,
|
|
128
|
+
moduleParentApiNames
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
|
|
133
|
+
handleDepartmentSwitch(_ref7) {
|
|
134
|
+
let {
|
|
135
|
+
action,
|
|
136
|
+
state,
|
|
137
|
+
dispatch
|
|
138
|
+
} = _ref7;
|
|
139
|
+
const {
|
|
140
|
+
id: departmentApiName
|
|
141
|
+
} = action.payload;
|
|
142
|
+
const smartNavigationPresenter = new SmartNavigationPresenter(state);
|
|
143
|
+
const currentDepartment = smartNavigationPresenter.findDepartment(departmentApiName);
|
|
144
|
+
dispatch({
|
|
145
|
+
type: SmartNavigationConstants.DEPARTMENT_SWITCH,
|
|
146
|
+
payload: {
|
|
147
|
+
currentDepartment
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
loadSlotComponents(_ref8) {// const { } = state;
|
|
153
|
+
|
|
154
|
+
let {
|
|
155
|
+
state,
|
|
156
|
+
dispatch
|
|
157
|
+
} = _ref8;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
getHandlers() {
|
|
161
|
+
return {
|
|
162
|
+
[ONE_UNIFICATION.EVENTS.ITEM_CHANGE]: this.handleModuleClick,
|
|
163
|
+
[ONE_UNIFICATION.EVENTS.ITEM_ADD]: this.handleAdd,
|
|
164
|
+
[ONE_UNIFICATION.EVENTS.LOAD_DATA]: this.handleLoadData,
|
|
165
|
+
[ONE_UNIFICATION.EVENTS.SEARCH]: this.handleSearch,
|
|
166
|
+
[ONE_UNIFICATION.EVENTS.NAVIGATION_STATE_CHANGE]: this.handleNavigationStateChange,
|
|
167
|
+
[ONE_UNIFICATION.EVENTS.CUSTOM_ACTION]: this.handleCustomAction,
|
|
168
|
+
[ONE_UNIFICATION.EVENTS.DEPARTMENT_SWITCH]: this.handleDepartmentSwitch,
|
|
169
|
+
[ONE_UNIFICATION.EVENTS.UNIFIED_NAVIGATION_INITIALIZED]: this.loadSlotComponents
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
}
|
package/es/platform/components/smart-navigation/frameworks/one-unification/UnifiedNavigation.js
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { ONE_UNIFICATION } from "../../../../../cc/one-unification/Constants";
|
|
3
|
+
import styles from "./SmartNavigation.module.css";
|
|
4
|
+
import { createCustomComponent } from "../../../../../library/custom-component";
|
|
5
|
+
import { LibraryLoaderBehaviour } from "../../../../../library/behaviours/library-loader/frameworks/LibraryLoaderBehaviour";
|
|
6
|
+
import { UnifiedNavigationEvent } from "./OneUnificationEventHandlers";
|
|
7
|
+
|
|
8
|
+
function UnifiedNavigationView(_ref, ref) {
|
|
9
|
+
let {} = _ref;
|
|
10
|
+
return /*#__PURE__*/React.createElement("div", {
|
|
11
|
+
id: ONE_UNIFICATION.ELEMENTS.SIDE_PANE,
|
|
12
|
+
ref: ref,
|
|
13
|
+
className: styles.smartNavigation
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
function constructUnifiedNavigationBehaviours() {
|
|
18
|
+
const libraryLoaderBehaviour = LibraryLoaderBehaviour(ONE_UNIFICATION.SCRIPT_ID, 'https://static.localzohocdn.com/zunify/zunify.min.js');
|
|
19
|
+
return [];
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
function constructUnifiedNavigationEventHandlers() {
|
|
23
|
+
const unifiedNavigationEventHandlers = new UnifiedNavigationEvent().getHandlers();
|
|
24
|
+
const defaultEventHandlers = {
|
|
25
|
+
['UnifiedNavigation#MOUNT']: UnifiedNavigationEvent.loadNavigationData
|
|
26
|
+
};
|
|
27
|
+
return { ...defaultEventHandlers,
|
|
28
|
+
...unifiedNavigationEventHandlers
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export const UnifiedNavigation = createCustomComponent({
|
|
33
|
+
name: 'UnifiedNavigation',
|
|
34
|
+
View: UnifiedNavigationView,
|
|
35
|
+
properties: {
|
|
36
|
+
model: {
|
|
37
|
+
required: false,
|
|
38
|
+
defaultValue: [],
|
|
39
|
+
typeMetadata: {
|
|
40
|
+
schema: {
|
|
41
|
+
type: 'object'
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
behaviours: constructUnifiedNavigationBehaviours(),
|
|
47
|
+
eventHandlers: constructUnifiedNavigationEventHandlers()
|
|
48
|
+
});
|
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
import { ONE_UNIFICATION } from "../../../../../cc/one-unification/Constants";
|
|
2
|
+
/* Unified Navigation Actions Handler Types */
|
|
3
|
+
|
|
4
|
+
export class UnifiedNavigationActions {
|
|
5
|
+
static handle(actionMethod, data, dispatch) {
|
|
6
|
+
const actionHandlers = {
|
|
7
|
+
handleUIReady: this.handleUIReady,
|
|
8
|
+
handleUIChange: this.handleUIChange,
|
|
9
|
+
clickModule: this.clickModule,
|
|
10
|
+
rightClickModule: this.rightClickModule,
|
|
11
|
+
handleReorder: this.handleReorder,
|
|
12
|
+
pinModule: this.pinModule,
|
|
13
|
+
favouriteModule: this.favouriteModule,
|
|
14
|
+
activateFilterOnModule: this.activateFilterOnModule,
|
|
15
|
+
hideModule: this.hideModule,
|
|
16
|
+
loadData: this.loadData,
|
|
17
|
+
handleSearch: this.handleSearch,
|
|
18
|
+
handleSwitcherAction: this.handleSwitcherAction,
|
|
19
|
+
handlePrimaryAction: this.handlePrimaryAction,
|
|
20
|
+
updateNavigationState: this.updateNavigationState
|
|
21
|
+
};
|
|
22
|
+
const handler = actionHandlers[actionMethod];
|
|
23
|
+
|
|
24
|
+
if (handler) {
|
|
25
|
+
handler.call(this, data, dispatch);
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
static handleUIReady(_data, _dispatch) {}
|
|
30
|
+
|
|
31
|
+
static handleUIChange(_data, _dispatch) {}
|
|
32
|
+
|
|
33
|
+
static clickModule(data, dispatch) {
|
|
34
|
+
const {
|
|
35
|
+
action: actionName,
|
|
36
|
+
...restData
|
|
37
|
+
} = data;
|
|
38
|
+
|
|
39
|
+
if (!actionName) {
|
|
40
|
+
dispatch({
|
|
41
|
+
type: ONE_UNIFICATION.EVENTS.ITEM_CHANGE,
|
|
42
|
+
payload: restData
|
|
43
|
+
});
|
|
44
|
+
return;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
switch (actionName) {
|
|
48
|
+
case 'add':
|
|
49
|
+
dispatch({
|
|
50
|
+
type: ONE_UNIFICATION.EVENTS.ITEM_ADD,
|
|
51
|
+
payload: restData
|
|
52
|
+
});
|
|
53
|
+
break;
|
|
54
|
+
|
|
55
|
+
case 'accordion-collapse':
|
|
56
|
+
dispatch({
|
|
57
|
+
type: ONE_UNIFICATION.EVENTS.ITEM_COLLAPSE,
|
|
58
|
+
payload: restData
|
|
59
|
+
});
|
|
60
|
+
break;
|
|
61
|
+
|
|
62
|
+
case 'accordion-expand':
|
|
63
|
+
dispatch({
|
|
64
|
+
type: ONE_UNIFICATION.EVENTS.ITEM_EXPAND,
|
|
65
|
+
payload: restData
|
|
66
|
+
});
|
|
67
|
+
break;
|
|
68
|
+
|
|
69
|
+
default:
|
|
70
|
+
dispatch({
|
|
71
|
+
type: ONE_UNIFICATION.EVENTS.CUSTOM_ACTION,
|
|
72
|
+
payload: data
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
static rightClickModule(_data, _dispatch) {}
|
|
78
|
+
|
|
79
|
+
static handleReorder(_data, _dispatch) {}
|
|
80
|
+
|
|
81
|
+
static pinModule(_data, _dispatch) {}
|
|
82
|
+
|
|
83
|
+
static favouriteModule(_data, _dispatch) {}
|
|
84
|
+
|
|
85
|
+
static activateFilterOnModule(_data, _dispatch) {}
|
|
86
|
+
|
|
87
|
+
static hideModule(_data, _dispatch) {}
|
|
88
|
+
|
|
89
|
+
static loadData(data, dispatch) {
|
|
90
|
+
dispatch({
|
|
91
|
+
type: ONE_UNIFICATION.EVENTS.LOAD_DATA,
|
|
92
|
+
payload: {
|
|
93
|
+
data
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
static handleSearch(data, dispatch) {
|
|
99
|
+
const {
|
|
100
|
+
action,
|
|
101
|
+
key,
|
|
102
|
+
query
|
|
103
|
+
} = data;
|
|
104
|
+
dispatch({
|
|
105
|
+
type: ONE_UNIFICATION.EVENTS.SEARCH,
|
|
106
|
+
payload: {
|
|
107
|
+
key,
|
|
108
|
+
query
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
static handleSwitcherAction(data, dispatch) {
|
|
114
|
+
const {
|
|
115
|
+
action: actionName,
|
|
116
|
+
switcherKey,
|
|
117
|
+
optionKey
|
|
118
|
+
} = data;
|
|
119
|
+
|
|
120
|
+
if (actionName === 'switcher-select' && switcherKey === ONE_UNIFICATION.ELEMENTS.DEPARTMENT_SWITCHER) {
|
|
121
|
+
dispatch({
|
|
122
|
+
type: ONE_UNIFICATION.EVENTS.DEPARTMENT_SWITCH,
|
|
123
|
+
payload: {
|
|
124
|
+
id: optionKey
|
|
125
|
+
}
|
|
126
|
+
});
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
static handlePrimaryAction(_data, _dispatch) {}
|
|
131
|
+
|
|
132
|
+
static updateNavigationState(data, dispatch) {
|
|
133
|
+
const {
|
|
134
|
+
isInCollapsedState
|
|
135
|
+
} = data;
|
|
136
|
+
dispatch({
|
|
137
|
+
type: ONE_UNIFICATION.EVENTS.NAVIGATION_STATE_CHANGE,
|
|
138
|
+
payload: {
|
|
139
|
+
isInCollapsedState
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
}
|
|
@@ -3,6 +3,10 @@ import ZListRepository from "../../../../zlist/adapters/gateways/Repository";
|
|
|
3
3
|
import ZListPresenters from "../../../../zlist/adapters/presenters/Presenters";
|
|
4
4
|
import ZRecordRepository from "../../../../zrecord/adapters/gateways/Repository";
|
|
5
5
|
import ZRecordPresenter from "../../../../zrecord/adapters/presenters/Presenter";
|
|
6
|
+
import ColumnChooserRepository from "../../../../column-chooser/adapters/gateways/Repository";
|
|
7
|
+
import ColumnChooserPresenter from "../../../../column-chooser/adapters/presenters/Presenter";
|
|
8
|
+
import TextOverflowRepository from "../../../../../library/behaviours/clip-wrap/adapters/gateway/Repository";
|
|
9
|
+
import TextOverflowPresenter from "../../../../../library/behaviours/clip-wrap/adapters/presenter/Presenter";
|
|
6
10
|
import ListSelectRepository from "../../../../../library/behaviours/list-selection/adapters/gateways/Repository";
|
|
7
11
|
import ListSelectPresenter from "../../../../../library/behaviours/list-selection/adapters/presenters/Presenter";
|
|
8
12
|
import ListSelectSelectUsecase from "../../../../../library/behaviours/list-selection/applications/usecases/Select";
|
|
@@ -27,6 +31,8 @@ import GetFilterConfigUseCase from "../../../../zrecord/applications/usecases/Ge
|
|
|
27
31
|
import { initialSortConfig } from "../../../../../bc/zlist/Types";
|
|
28
32
|
import GetSortConfigUseCase from "../../../../zlist/applications/usecases/GetSortConfigUseCase";
|
|
29
33
|
import SetSortConfigUseCase from "../../../../zlist/applications/usecases/SetSortConfigUseCase";
|
|
34
|
+
import ColumnChooserUpdateUseCase from "../../../../column-chooser/applications/usecases/ColumnChooserUpdateUseCase";
|
|
35
|
+
import ClipWrapUpdateUseCase from "../../../../../library/behaviours/clip-wrap/applications/usecases/ClipWrapUpdateUseCase";
|
|
30
36
|
export class SmartTableResource extends AbstractResource {
|
|
31
37
|
initialize() {}
|
|
32
38
|
|
|
@@ -40,6 +46,22 @@ export class SmartTableResource extends AbstractResource {
|
|
|
40
46
|
return dependencies;
|
|
41
47
|
}
|
|
42
48
|
|
|
49
|
+
getColumnChooserDependencies() {
|
|
50
|
+
const dependencies = {
|
|
51
|
+
repository: new ColumnChooserRepository(),
|
|
52
|
+
presenter: new ColumnChooserPresenter()
|
|
53
|
+
};
|
|
54
|
+
return dependencies;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
getTextOverflowDependencies() {
|
|
58
|
+
const dependencies = {
|
|
59
|
+
repository: new TextOverflowRepository(),
|
|
60
|
+
presenter: new TextOverflowPresenter()
|
|
61
|
+
};
|
|
62
|
+
return dependencies;
|
|
63
|
+
}
|
|
64
|
+
|
|
43
65
|
getListDependencies() {
|
|
44
66
|
const dependencies = {
|
|
45
67
|
repository: new ZListRepository(),
|
|
@@ -515,4 +537,34 @@ export class SmartTableResource extends AbstractResource {
|
|
|
515
537
|
});
|
|
516
538
|
}
|
|
517
539
|
|
|
540
|
+
updateSelectedFields(selectedFields) {
|
|
541
|
+
this.validateInput('updateSelectedFields', {
|
|
542
|
+
selectedFields
|
|
543
|
+
}, SdkContracts.updateSelectedFieldsInputMeta);
|
|
544
|
+
const {
|
|
545
|
+
dispatch
|
|
546
|
+
} = this.dependencies;
|
|
547
|
+
const dependencies = this.getColumnChooserDependencies();
|
|
548
|
+
const usecase = this.createUseCase(dependencies, ColumnChooserUpdateUseCase);
|
|
549
|
+
usecase.execute({
|
|
550
|
+
dispatch,
|
|
551
|
+
selectedArray: selectedFields
|
|
552
|
+
});
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
updateTextOverflow(mode) {
|
|
556
|
+
this.validateInput('updateTextOverflow', {
|
|
557
|
+
mode
|
|
558
|
+
}, SdkContracts.updateTextOverflowInputMeta);
|
|
559
|
+
const {
|
|
560
|
+
dispatch
|
|
561
|
+
} = this.dependencies;
|
|
562
|
+
const dependencies = this.getTextOverflowDependencies();
|
|
563
|
+
const usecase = this.createUseCase(dependencies, ClipWrapUpdateUseCase);
|
|
564
|
+
usecase.execute({
|
|
565
|
+
dispatch,
|
|
566
|
+
mode
|
|
567
|
+
});
|
|
568
|
+
}
|
|
569
|
+
|
|
518
570
|
}
|
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
import { LIST_SELECTION_RECORDS_DESELECTED, LIST_SELECTION_RECORDS_SELECTED, LIST_SELECTION_SELECTION_LIMIT_EXCEEDED } from "../../../../bc/list-selection/Constants";
|
|
2
2
|
import { RESIZE_FINISHED } from "../../../../bc/table-column-resizer/Constants";
|
|
3
3
|
import { ZLIST_SORT } from "../../../../bc/zlist/Constants";
|
|
4
|
-
import { COLUMN_CHOOSER_BEHAVIOUR_UPDATED } from "../../../../bc/column-chooser/Constants";
|
|
5
|
-
import { COLUMN_CHOOSER_OPEN_REQUESTED } from "../../../../cc/table-column-chooser/Constants";
|
|
6
4
|
import ListSdkFactory from "./ListSdkFactory";
|
|
7
5
|
import { SmartTableConstants } from "../../../../cc/table-connected";
|
|
8
6
|
import TableListEventConstants from "../../../../cc/table-list/Constants";
|
|
@@ -12,8 +10,6 @@ import ResizeEndController from "../adapters/controllers/ResizeEndController";
|
|
|
12
10
|
import { ResizeFinishController } from "../adapters/controllers/ResizeFinishController";
|
|
13
11
|
import { ReOrderFinishController } from "../adapters/controllers/ReOrderFinishController";
|
|
14
12
|
import ScrollController from "../adapters/controllers/ScrollController";
|
|
15
|
-
import ColumnChooserUpdateController from "../adapters/controllers/ColumnChooserUpdateController";
|
|
16
|
-
import ColumnChooserOpenedController from "../adapters/controllers/ColumnChooserOpenedController";
|
|
17
13
|
import { platformSDK_old } from "../../../sdk/frameworks/Sdk";
|
|
18
14
|
import { RECORD_MARK_AS_READ, RECORD_MARK_AS_UNREAD, SET_RECORDS_SUCCESS } from "../../../../bc/zrecord/Constants";
|
|
19
15
|
import ErrorEventHandlersFactory from "./ErrorEventHandlersFactory";
|
|
@@ -374,8 +370,6 @@ export default class EventHandlersFactory {
|
|
|
374
370
|
},
|
|
375
371
|
[TABLE_LIST_RESIZE_END_REQUESTED]: new ResizeEndController().handle,
|
|
376
372
|
[TABLE_LIST_SCROLLED]: new ScrollController().handle,
|
|
377
|
-
[COLUMN_CHOOSER_BEHAVIOUR_UPDATED]: new ColumnChooserUpdateController().handle,
|
|
378
|
-
[COLUMN_CHOOSER_OPEN_REQUESTED]: new ColumnChooserOpenedController().handle,
|
|
379
373
|
[LIST_SELECTION_RECORDS_SELECTED]: _ref2 => {
|
|
380
374
|
let {
|
|
381
375
|
action,
|
|
@@ -450,7 +444,7 @@ function createMergedHandler(eventHandlersList, eventName) {
|
|
|
450
444
|
try {
|
|
451
445
|
handler(...arguments);
|
|
452
446
|
} catch (error) {
|
|
453
|
-
__DEVELOPMENT__ && console.error(error);
|
|
447
|
+
__DEVELOPMENT__ && console.error(`Error in Smart Table handler for event "${eventName}":`, error);
|
|
454
448
|
}
|
|
455
449
|
}
|
|
456
450
|
}
|
|
@@ -19,7 +19,8 @@ export default class ListSdkFactory {
|
|
|
19
19
|
reOrderRecord: (fromIndex, toIndex) => smartTable.reOrderRecord(fromIndex, toIndex),
|
|
20
20
|
sortRecords: sortBy => smartTable.sortRecords(sortBy),
|
|
21
21
|
markAsRead: recordId => smartTable.markAsRead(recordId),
|
|
22
|
-
markAsUnRead: recordId => smartTable.markAsUnRead(recordId)
|
|
22
|
+
markAsUnRead: recordId => smartTable.markAsUnRead(recordId),
|
|
23
|
+
updateSelectedFields: selectedFields => smartTable.updateSelectedFields(selectedFields)
|
|
23
24
|
};
|
|
24
25
|
}
|
|
25
26
|
|
|
@@ -55,7 +56,8 @@ export default class ListSdkFactory {
|
|
|
55
56
|
reOrderRecord: recordSdks.reOrderRecord,
|
|
56
57
|
sortRecords: recordSdks.sortRecords,
|
|
57
58
|
markAsRead: recordSdks.markAsRead,
|
|
58
|
-
markAsUnRead: recordSdks.markAsUnRead
|
|
59
|
+
markAsUnRead: recordSdks.markAsUnRead,
|
|
60
|
+
updateSelectedFields: recordSdks.updateSelectedFields
|
|
59
61
|
}
|
|
60
62
|
};
|
|
61
63
|
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
let getClientActions = {
|
|
2
|
+
name: 'uiActions',
|
|
3
|
+
api: '/{{servicePrefix}}/{{orgName}}/api/v1/clientActions',
|
|
4
|
+
parameters: `{
|
|
5
|
+
"from":{{from}},
|
|
6
|
+
"limit":{{limit}},
|
|
7
|
+
"modules": "{{modules}}",
|
|
8
|
+
"page": "{{page}}"
|
|
9
|
+
}`,
|
|
10
|
+
type: 'GET',
|
|
11
|
+
transformer: data => data,
|
|
12
|
+
properties: {
|
|
13
|
+
modelName: {
|
|
14
|
+
required: true,
|
|
15
|
+
typeMetadata: {
|
|
16
|
+
schema: {
|
|
17
|
+
type: 'string'
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
};
|
|
23
|
+
export default getClientActions;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
const getSingleRecord = {
|
|
2
|
+
name: 'records',
|
|
3
|
+
api: '/{{servicePrefix}}/{{orgName}}/api/v1/{{moduleName}}/{{recordId}}',
|
|
4
|
+
parameters: `{}`,
|
|
5
|
+
// parameters: `{ "include": "{{include}}" }`,
|
|
6
|
+
type: 'GET',
|
|
7
|
+
transformer: data => data,
|
|
8
|
+
properties: {
|
|
9
|
+
servicePrefix: {
|
|
10
|
+
required: true,
|
|
11
|
+
typeMetadata: {
|
|
12
|
+
schema: {
|
|
13
|
+
type: 'string'
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
},
|
|
17
|
+
orgName: {
|
|
18
|
+
required: true,
|
|
19
|
+
typeMetadata: {
|
|
20
|
+
schema: {
|
|
21
|
+
type: 'string'
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
// include: {
|
|
26
|
+
// required: false,
|
|
27
|
+
// typeMetadata: {
|
|
28
|
+
// schema: {
|
|
29
|
+
// type: 'string'
|
|
30
|
+
// }
|
|
31
|
+
// }
|
|
32
|
+
// },
|
|
33
|
+
moduleName: {
|
|
34
|
+
required: true,
|
|
35
|
+
typeMetadata: {
|
|
36
|
+
schema: {
|
|
37
|
+
type: 'string'
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
recordId: {
|
|
42
|
+
required: true,
|
|
43
|
+
typeMetadata: {
|
|
44
|
+
schema: {
|
|
45
|
+
type: 'string'
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
export default getSingleRecord;
|
|
@@ -22,6 +22,7 @@ import getClientScripts from "./http-template/getClientScripts";
|
|
|
22
22
|
import markAsRead from "./http-template/markAsRead";
|
|
23
23
|
import markAsUnRead from "./http-template/markAsUnRead";
|
|
24
24
|
import getComponentMapping from "./http-template/getComponentMapping";
|
|
25
|
+
import getSingleRecord from "./http-template/getSingleRecord";
|
|
25
26
|
let dataSource = {
|
|
26
27
|
httpTemplates: {
|
|
27
28
|
[RecordApiActionName.GET_RECORDS]: getRecords,
|
|
@@ -38,6 +39,7 @@ let dataSource = {
|
|
|
38
39
|
getAvailableFields,
|
|
39
40
|
getSelectedFields,
|
|
40
41
|
updateSelectedFields,
|
|
42
|
+
[RecordApiActionName.GET_SINGLE_RECORD]: getSingleRecord,
|
|
41
43
|
[ZFormApiActionName.getMyLayouts]: getMyLayouts,
|
|
42
44
|
[ZFormApiActionName.getMyForm]: getMyForm,
|
|
43
45
|
[ZFormApiActionName.getLayoutRules]: getLayoutRules,
|