@zohodesk/library-platform 1.1.10-exp.3 → 1.1.10-exp.4
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/cc/fields/lookup/Properties.js +2 -1
- package/es/platform/app-context-behaviour/frameworks/AppContextBehaviourFactory.js +2 -2
- package/package.json +3 -2
- package/es/.DS_Store +0 -0
- package/es/cc/form-connected/Constants.js +0 -12
- package/es/platform/.DS_Store +0 -0
- package/es/platform/client-actions/cc/dynamic-action-component/Properties.js +0 -51
- package/es/platform/client-actions/components/dynamic-component/domain/entities/interfaces/IState.js +0 -1
- package/es/platform/client-actions/components/dynamic-component/frameworks/ui/DynamicActionComponent.js +0 -9
- package/es/platform/client-actions/components/dynamic-component/frameworks/ui/DynamicActionComponentView.js +0 -38
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.js +0 -12
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRenderer.module.css +0 -19
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActionsRendererView.js +0 -33
- package/es/platform/data-source/http-template/fetchDependencyMappings.js +0 -18
- package/es/platform/data-source/http-template/fetchLayoutRules.js +0 -29
- package/es/platform/data-source/http-template/fetchMyForm.js +0 -19
- package/es/platform/data-source/http-template/fetchMyFormLayout.js +0 -43
- package/es/platform/data-source/http-template/fetchValidationRules.js +0 -30
- package/es/platform/zlist/adapters/presenters/translators/ColumnAlignmentTranslator.js +0 -11
|
@@ -32,7 +32,8 @@ export default { ...FieldProperties,
|
|
|
32
32
|
type: ['string', 'null']
|
|
33
33
|
}
|
|
34
34
|
},
|
|
35
|
-
required: ['id', 'name']
|
|
35
|
+
required: ['id', 'name'],
|
|
36
|
+
additionalProperties: true
|
|
36
37
|
}, {
|
|
37
38
|
// NOTE: string type is used in Form Lookup field translator
|
|
38
39
|
type: 'string' // Allowing string type for backward compatibility or alternative usage
|
|
@@ -14,8 +14,8 @@ class AppContextBehaviourFactory {
|
|
|
14
14
|
} = _ref;
|
|
15
15
|
const appResource = platformSDK[ResourceNamesEnum.APP];
|
|
16
16
|
return {
|
|
17
|
-
headers: appResource.getApiHeader(),
|
|
18
|
-
context: { ...appResource.getContext(),
|
|
17
|
+
headers: appResource && appResource.getApiHeader(),
|
|
18
|
+
context: { ...(appResource && appResource.getContext()),
|
|
19
19
|
...context
|
|
20
20
|
}
|
|
21
21
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zohodesk/library-platform",
|
|
3
|
-
"version": "1.1.10-exp.
|
|
3
|
+
"version": "1.1.10-exp.4",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "es/index.js",
|
|
6
6
|
"files": [
|
|
@@ -93,8 +93,9 @@
|
|
|
93
93
|
"react-sortable-hoc": "1.11.0"
|
|
94
94
|
},
|
|
95
95
|
"dependencies": {
|
|
96
|
+
"@zoho/securityJS": "npm:@zoho/SecurityJS@^7.2.4",
|
|
96
97
|
"ajv": "6.12.6",
|
|
97
98
|
"jsep": "0.3.5",
|
|
98
99
|
"object-path-immutable": "4.1.2"
|
|
99
100
|
}
|
|
100
|
-
}
|
|
101
|
+
}
|
package/es/.DS_Store
DELETED
|
Binary file
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
class SmartFormConstants {
|
|
2
|
-
static SMART_FORM_FIELD_FOCUSED = 'SMART_FORM#FIELD_FOCUSED';
|
|
3
|
-
static SMART_FORM_FIELD_BLURRED = 'SMART_FORM#FIELD_BLURRED';
|
|
4
|
-
static SMART_FORM_FIELD_VALUE_CHANGED = 'SMART_FORM#FIELD_VALUE_CHANGED';
|
|
5
|
-
static SMART_FORM_SUBMIT = 'SMART_FORM#SUBMIT';
|
|
6
|
-
static SMART_FORM_SUBMIT_CLICKED = 'SMART_FORM#SUBMIT_CLICKED';
|
|
7
|
-
static SMART_FORM_CANCEL_CLICKED = 'SMART_FORM#CANCEL_CLICKED';
|
|
8
|
-
static SMART_FORM_SUBMIT_SUCCESS = 'SMART_FORM#SUBMIT_SUCCESS';
|
|
9
|
-
static SMART_FORM_SUBMIT_FAILURE = 'SMART_FORM#SUBMIT_FAILED';
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
export default SmartFormConstants;
|
package/es/platform/.DS_Store
DELETED
|
Binary file
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
export const actionSchema = {
|
|
2
|
-
type: 'object',
|
|
3
|
-
properties: {
|
|
4
|
-
component: {
|
|
5
|
-
type: 'string'
|
|
6
|
-
},
|
|
7
|
-
id: {
|
|
8
|
-
type: 'string'
|
|
9
|
-
},
|
|
10
|
-
properties: {
|
|
11
|
-
type: 'object'
|
|
12
|
-
},
|
|
13
|
-
eventMappings: {
|
|
14
|
-
type: 'array',
|
|
15
|
-
minItems: 0,
|
|
16
|
-
items: {
|
|
17
|
-
type: 'object',
|
|
18
|
-
properties: {
|
|
19
|
-
action: {
|
|
20
|
-
type: 'object',
|
|
21
|
-
properties: {
|
|
22
|
-
event: {
|
|
23
|
-
type: 'string'
|
|
24
|
-
},
|
|
25
|
-
payload: {
|
|
26
|
-
type: 'object'
|
|
27
|
-
}
|
|
28
|
-
},
|
|
29
|
-
required: ['event', 'payload']
|
|
30
|
-
},
|
|
31
|
-
id: {
|
|
32
|
-
type: 'string'
|
|
33
|
-
},
|
|
34
|
-
sourceEvent: {
|
|
35
|
-
type: 'string'
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
required: ['id']
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
},
|
|
42
|
-
required: ['component', 'properties']
|
|
43
|
-
};
|
|
44
|
-
export default {
|
|
45
|
-
action: {
|
|
46
|
-
required: true,
|
|
47
|
-
typeMetadata: {
|
|
48
|
-
schema: actionSchema
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
};
|
package/es/platform/client-actions/components/dynamic-component/domain/entities/interfaces/IState.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export {};
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { createCustomComponent } from "../../../../../../library/custom-component";
|
|
2
|
-
import DynamicActionComponentProperties from "../../../../cc/dynamic-action-component/Properties";
|
|
3
|
-
import DynamicActionComponentView from "./DynamicActionComponentView";
|
|
4
|
-
export default createCustomComponent({
|
|
5
|
-
name: 'DynamicActionComponent',
|
|
6
|
-
properties: DynamicActionComponentProperties,
|
|
7
|
-
eventHandlers: {},
|
|
8
|
-
View: DynamicActionComponentView
|
|
9
|
-
});
|
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import ComponentRegistry from "../../../../../../library/custom-component/frameworks/ui/ComponentRegistry";
|
|
5
|
-
import ActionComponentMapping from "../../../../../../library/dot/components/action-location/frameworks/ui/ActionComponentMapping";
|
|
6
|
-
|
|
7
|
-
function DynamicComponentView(_ref, ref) {
|
|
8
|
-
let {
|
|
9
|
-
state
|
|
10
|
-
} = _ref;
|
|
11
|
-
const {
|
|
12
|
-
action
|
|
13
|
-
} = state.properties;
|
|
14
|
-
const {
|
|
15
|
-
component,
|
|
16
|
-
properties,
|
|
17
|
-
eventMappings,
|
|
18
|
-
id: actionId
|
|
19
|
-
} = action;
|
|
20
|
-
const Component = ComponentRegistry.get(component) || ActionComponentMapping[component];
|
|
21
|
-
|
|
22
|
-
if (!Component) {
|
|
23
|
-
return /*#__PURE__*/React.createElement("div", {
|
|
24
|
-
ref: ref
|
|
25
|
-
}, "Error");
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return /*#__PURE__*/React.createElement(Component, _extends({
|
|
29
|
-
getRef: ref
|
|
30
|
-
}, properties, {
|
|
31
|
-
appendToActionPayload: {
|
|
32
|
-
eventMappings,
|
|
33
|
-
actionId
|
|
34
|
-
}
|
|
35
|
-
}));
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
export default DynamicComponentView;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import { createCustomComponent } from "../../../../../../library/custom-component";
|
|
2
|
-
import RowActionsRendererProperties from "../../../../cc/action-event-mediator/Properties";
|
|
3
|
-
import RowActionsRendererView from "./RowActionsRendererView";
|
|
4
|
-
import { ComponentRegistry } from "../../../../../../library";
|
|
5
|
-
const RowActionsRendererComponent = createCustomComponent({
|
|
6
|
-
name: 'RowActionsRenderer',
|
|
7
|
-
properties: RowActionsRendererProperties,
|
|
8
|
-
eventHandlers: {},
|
|
9
|
-
View: RowActionsRendererView
|
|
10
|
-
});
|
|
11
|
-
ComponentRegistry.register("RowActionsRenderer", RowActionsRendererComponent);
|
|
12
|
-
export default RowActionsRendererComponent;
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import Flex from '@zohodesk/layout/es/Flex/Flex';
|
|
3
|
-
import DynamicActionComponent from "../../../dynamic-component/frameworks/ui/DynamicActionComponent";
|
|
4
|
-
import { ActionViewGap } from "../../../interfaces/ActionViewModel";
|
|
5
|
-
// @ts-ignore
|
|
6
|
-
import style from "./RowActionsRenderer.module.css";
|
|
7
|
-
|
|
8
|
-
function RowActionsRendererView(_ref, ref) {
|
|
9
|
-
let {
|
|
10
|
-
state
|
|
11
|
-
} = _ref;
|
|
12
|
-
const {
|
|
13
|
-
actions,
|
|
14
|
-
gap,
|
|
15
|
-
testId
|
|
16
|
-
} = state.properties;
|
|
17
|
-
return /*#__PURE__*/React.createElement(Flex, {
|
|
18
|
-
ref: ref,
|
|
19
|
-
testId: testId,
|
|
20
|
-
customId: testId,
|
|
21
|
-
$ui_displayMode: "inline",
|
|
22
|
-
$ui_alignItems: "center",
|
|
23
|
-
$ui_className: `${style.wrapper} ${gap !== ActionViewGap.NONE ? style[`gap_${gap}`] : ''}`
|
|
24
|
-
}, actions.map((action, index) => {
|
|
25
|
-
return /*#__PURE__*/React.createElement(DynamicActionComponent, {
|
|
26
|
-
action: action,
|
|
27
|
-
key: index
|
|
28
|
-
});
|
|
29
|
-
}));
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
;
|
|
33
|
-
export default RowActionsRendererView;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
const fetchDependencyMappings = {
|
|
2
|
-
name: 'fetchDependencyMappings',
|
|
3
|
-
api: '/{{servicePrefix}}/{{orgName}}/api/v1/dependencyMappings',
|
|
4
|
-
parameters: `{"layoutId":"{{layoutId}}"}`,
|
|
5
|
-
type: 'GET',
|
|
6
|
-
transformer: data => data,
|
|
7
|
-
properties: {
|
|
8
|
-
layoutId: {
|
|
9
|
-
required: true,
|
|
10
|
-
typeMetadata: {
|
|
11
|
-
schema: {
|
|
12
|
-
type: 'string'
|
|
13
|
-
}
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
export default fetchDependencyMappings;
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
// Assuming GetTemplate interface is defined
|
|
2
|
-
const fetchLayoutRules = {
|
|
3
|
-
name: 'fetchLayoutRules',
|
|
4
|
-
api: '/{{servicePrefix}}/{{orgName}}/api/v1/layouts/{{layoutId}}/layoutRules',
|
|
5
|
-
parameters: `{"activeRulesOnly":{{activeRulesOnly}}}`,
|
|
6
|
-
type: 'GET',
|
|
7
|
-
transformer: data => data,
|
|
8
|
-
properties: {
|
|
9
|
-
layoutId: {
|
|
10
|
-
required: true,
|
|
11
|
-
typeMetadata: {
|
|
12
|
-
schema: {
|
|
13
|
-
type: 'string'
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
activeRulesOnly: {
|
|
18
|
-
required: true,
|
|
19
|
-
typeMetadata: {
|
|
20
|
-
schema: {
|
|
21
|
-
type: 'boolean'
|
|
22
|
-
}
|
|
23
|
-
},
|
|
24
|
-
defaultValue: true // Assuming true as a default if parameter is optional
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
export default fetchLayoutRules;
|
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
// Assuming similar structure to PatchTemplate
|
|
2
|
-
const fetchMyForm = {
|
|
3
|
-
name: 'myFormFetch',
|
|
4
|
-
api: '/{{servicePrefix}}/{{orgName}}/api/v1/myForm',
|
|
5
|
-
parameters: `{"layoutId":"{{layoutId}}"}`,
|
|
6
|
-
type: 'GET',
|
|
7
|
-
transformer: data => data,
|
|
8
|
-
properties: {
|
|
9
|
-
layoutId: {
|
|
10
|
-
required: true,
|
|
11
|
-
typeMetadata: {
|
|
12
|
-
schema: {
|
|
13
|
-
type: 'string'
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
export default fetchMyForm;
|
|
@@ -1,43 +0,0 @@
|
|
|
1
|
-
// Assumed you have a GetTemplate interface similar to PatchTemplate
|
|
2
|
-
const fetchMyLayouts = {
|
|
3
|
-
name: 'myLayoutsFetch',
|
|
4
|
-
api: '/{{servicePrefix}}/{{orgName}}/api/v1/myLayouts',
|
|
5
|
-
parameters: `{"module":"{{module}}","departmentId":"{{departmentId}}","from":"{{from}}","limit":"{{limit}}"}`,
|
|
6
|
-
type: 'GET',
|
|
7
|
-
transformer: data => data,
|
|
8
|
-
properties: {
|
|
9
|
-
module: {
|
|
10
|
-
required: true,
|
|
11
|
-
typeMetadata: {
|
|
12
|
-
schema: {
|
|
13
|
-
type: 'string'
|
|
14
|
-
}
|
|
15
|
-
}
|
|
16
|
-
},
|
|
17
|
-
departmentId: {
|
|
18
|
-
required: true,
|
|
19
|
-
typeMetadata: {
|
|
20
|
-
schema: {
|
|
21
|
-
type: 'string'
|
|
22
|
-
}
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
from: {
|
|
26
|
-
required: true,
|
|
27
|
-
typeMetadata: {
|
|
28
|
-
schema: {
|
|
29
|
-
type: 'string'
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
},
|
|
33
|
-
limit: {
|
|
34
|
-
required: true,
|
|
35
|
-
typeMetadata: {
|
|
36
|
-
schema: {
|
|
37
|
-
type: 'string'
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
};
|
|
43
|
-
export default fetchMyLayouts;
|
|
@@ -1,30 +0,0 @@
|
|
|
1
|
-
// Assuming GetTemplate interface is similar to PatchTemplate
|
|
2
|
-
import { transFormValidationRules } from "../utils/validation-rules/TransFormValidationRules";
|
|
3
|
-
const fetchValidationRules = {
|
|
4
|
-
name: 'fetchValidationRules',
|
|
5
|
-
api: '/{{servicePrefix}}/{{orgName}}/api/v1/layouts/{{layoutId}}/validationRules',
|
|
6
|
-
parameters: `{"activeRulesOnly":{{activeRulesOnly}}}`,
|
|
7
|
-
type: 'GET',
|
|
8
|
-
transformer: transFormValidationRules,
|
|
9
|
-
properties: {
|
|
10
|
-
layoutId: {
|
|
11
|
-
required: true,
|
|
12
|
-
typeMetadata: {
|
|
13
|
-
schema: {
|
|
14
|
-
type: 'string'
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
},
|
|
18
|
-
activeRulesOnly: {
|
|
19
|
-
required: true,
|
|
20
|
-
typeMetadata: {
|
|
21
|
-
schema: {
|
|
22
|
-
type: 'boolean'
|
|
23
|
-
}
|
|
24
|
-
},
|
|
25
|
-
defaultValue: true // Assuming default behavior if not provided
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
};
|
|
30
|
-
export default fetchValidationRules;
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Alignment } from "../../../../../cc/table-list/data-types/Header";
|
|
2
|
-
|
|
3
|
-
function ColumnAlignmentTranslator(type) {
|
|
4
|
-
if (type === 'Boolean') {
|
|
5
|
-
return Alignment.Center;
|
|
6
|
-
} else {
|
|
7
|
-
return Alignment.Left;
|
|
8
|
-
}
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
export default ColumnAlignmentTranslator;
|