@zohodesk/library-platform 1.1.11 → 1.1.12-exp.2
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/index.js +0 -1
- package/es/bc/zlist/Constants.js +0 -1
- package/es/bc/zlist/Types.js +10 -0
- package/es/bc/zrecord/Constants.js +1 -0
- package/es/bc/zrecord/Schemas.js +29 -0
- package/es/bc/zrecord/Types.js +45 -0
- package/es/cc/fields/lookup/Properties.js +10 -26
- package/es/cc/radio-dropdown/Constants.js +6 -0
- package/es/cc/radio-dropdown/Data.js +1 -0
- package/es/cc/radio-dropdown/Events.js +42 -0
- package/es/cc/radio-dropdown/Properties.js +142 -0
- package/es/cc/radio-dropdown/index.js +4 -0
- package/es/cc/table-column-filter/Properties.js +9 -0
- package/es/cc/table-connected/SdkContract.js +21 -0
- package/es/cc/table-connected/constants/Events.js +2 -0
- package/es/cc/table-list/Actions.js +0 -2
- package/es/cc/table-list/Constants.js +0 -1
- package/es/cc/table-list/Events.js +0 -2
- package/es/cc/table-list/Properties.js +0 -3
- package/es/cc/tag/Constants.js +6 -0
- package/es/cc/tag/Data.js +14 -0
- package/es/cc/tag/EventHandlers.js +1 -0
- package/es/cc/tag/Events.js +26 -0
- package/es/cc/tag/Model.js +30 -0
- package/es/cc/tag/Properties.js +104 -0
- package/es/cc/tag/index.js +6 -0
- package/es/cc/tags-list-dropdown/Constants.js +5 -0
- package/es/cc/tags-list-dropdown/Data.js +1 -0
- package/es/cc/tags-list-dropdown/Events.js +14 -0
- package/es/cc/tags-list-dropdown/Properties.js +96 -0
- package/es/cc/tags-list-dropdown/index.js +4 -0
- package/es/library/custom-component/frameworks/ui/CustomComponentFactory.js +56 -0
- package/es/library/dot/components/form/frameworks/ui/css/Form.module.css +13 -13
- package/es/library/dot/components/form-fields/field/css/FieldItem.module.css +2 -2
- package/es/library/dot/components/section/frameworks/ui/css/Section.module.css +3 -3
- package/es/library/dot/components/table-list/adapters/controllers/index.js +0 -2
- package/es/library/dot/components/table-list/frameworks/ui/EventHandlersFactory.js +1 -2
- package/es/library/dot/components/table-list/frameworks/ui/css/TableList.module.css +21 -21
- package/es/library/dot/legacy-to-new-arch/breadcrumb/frameworks/ui/css/Breadcrumb.module.css +4 -4
- package/es/library/dot/legacy-to-new-arch/date/frameworks/ui/css/DateView.module.css +1 -1
- package/es/library/dot/legacy-to-new-arch/label/frameworks/ui/css/Label.module.css +4 -4
- package/es/library/dot/legacy-to-new-arch/multi-select/frameworks/ui/css/MultiSelectView.module.css +7 -7
- package/es/library/dot/legacy-to-new-arch/radio-dropdown/frameworks/ui/RadioDropdown.js +12 -0
- package/es/library/dot/legacy-to-new-arch/radio-dropdown/frameworks/ui/RadioDropdownView.js +124 -0
- package/es/library/dot/legacy-to-new-arch/radio-dropdown/frameworks/ui/css/RadioDropdown.module.css +23 -0
- package/es/library/dot/legacy-to-new-arch/select/frameworks/ui/css/Select.module.css +2 -2
- package/es/library/dot/legacy-to-new-arch/table-column-chooser/frameworks/ui/css/TableColumnChooserView.module.css +1 -1
- package/es/library/dot/legacy-to-new-arch/table-column-filter/frameworks/ui/TableColumnFilterView.js +2 -1
- package/es/library/dot/legacy-to-new-arch/table-field-components/highlighted-value-field/frameworks/ui/EventHandlersFactory.js +26 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/highlighted-value-field/frameworks/ui/HighlightedValueField.js +23 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/highlighted-value-field/frameworks/ui/HighlightedValueFieldView.js +24 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/labeled-avatar-field/frameworks/ui/EventHandlersFactory.js +26 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/labeled-avatar-field/frameworks/ui/LabeledAvatarField.js +23 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/labeled-avatar-field/frameworks/ui/LabeledAvatarFieldView.js +22 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/link-field/frameworks/ui/EventHandlersFactory.js +26 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/link-field/frameworks/ui/LinkField.js +23 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/link-field/frameworks/ui/LinkFieldView.js +26 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/radio-dropdown-field/frameworks/ui/EventHandlersFactory.js +32 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/radio-dropdown-field/frameworks/ui/RadioDropdownField.js +32 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/radio-dropdown-field/frameworks/ui/RadioDropdownFieldView.js +43 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/radio-dropdown-field/frameworks/ui/css/RadioDropdownField.module.css +3 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/tag-field/frameworks/ui/EventHandlersFactory.js +26 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/tag-field/frameworks/ui/TagField.js +23 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/tag-field/frameworks/ui/TagFieldView.js +34 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/tags-field/frameworks/ui/EventHandlersFactory.js +26 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/tags-field/frameworks/ui/TagsField.js +23 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/tags-field/frameworks/ui/TagsFieldView.js +18 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/tags-list-dropdown-field/frameworks/ui/TagsListDropdownField.js +12 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/tags-list-dropdown-field/frameworks/ui/TagsListDropdownFieldView.js +24 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/text-field/frameworks/ui/EventHandlersFactory.js +26 -0
- package/es/library/dot/legacy-to-new-arch/table-field-components/text-field/frameworks/ui/TextField.js +23 -0
- 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/tag/frameworks/ui/Tag.js +11 -0
- package/es/library/dot/legacy-to-new-arch/tag/frameworks/ui/Tag.module.css +8 -0
- package/es/library/dot/legacy-to-new-arch/tag/frameworks/ui/TagView.js +96 -0
- package/es/library/dot/legacy-to-new-arch/tags-list-dropdown/frameworks/ui/TagContractAdapter.js +24 -0
- package/es/library/dot/legacy-to-new-arch/tags-list-dropdown/frameworks/ui/TagsListDropdown.js +12 -0
- package/es/library/dot/legacy-to-new-arch/tags-list-dropdown/frameworks/ui/TagsListDropdownView.js +42 -0
- package/es/library/dot/legacy-to-new-arch/text-area/frameworks/ui/css/TextAreaView.module.css +3 -3
- package/es/platform/client-actions/components/row-actions-renderer/frameworks/ui/RowActions/RowActionsRenderer.module.css +5 -5
- package/es/platform/components/table-connected/adapters/resources/SmartTableResource.js +169 -8
- package/es/platform/components/table-connected/frameworks/EventHandlersFactory.js +11 -2
- package/es/platform/data-source/http-template/fetchLookupFields.js +0 -6
- package/es/platform/data-source/http-template/getComponentMapping.js +17 -0
- package/es/platform/data-source/http-template/getRecords.js +1 -0
- package/es/platform/zform/adapters/gateway/FormRepository.js +3 -1
- package/es/platform/zform/adapters/presenter/translators/fields/LookUpFieldTranslator.js +12 -11
- package/es/platform/zform/applications/usecases/MyFormSuccessUseCase.js +9 -10
- package/es/platform/zform/domain/ZForm.js +2 -0
- package/es/platform/zlist/adapters/controllers/RefreshRecordsRequestedController.js +21 -0
- package/es/platform/zlist/adapters/controllers/SortController.js +2 -2
- package/es/platform/zlist/adapters/gateways/Repository.js +6 -11
- package/es/platform/zlist/adapters/gateways/Service.js +2 -0
- package/es/platform/zlist/adapters/presenters/TableTranslator.js +9 -6
- package/es/platform/zlist/adapters/presenters/translators/FieldVariations.js +25 -0
- package/es/platform/zlist/adapters/presenters/translators/Header.js +29 -21
- package/es/platform/zlist/adapters/presenters/translators/HeadersTranslator.js +3 -3
- package/es/platform/zlist/adapters/presenters/utils/DefaultClientActions.js +7 -4
- package/es/platform/zlist/applications/entities-factory/ListFactory.js +2 -2
- package/es/platform/zlist/applications/interfaces/input/GetSortConfigUseCaseInputModel.js +1 -0
- package/es/platform/zlist/applications/interfaces/input/RefreshRecordsRequestedUseCaseInputModel.js +1 -0
- package/es/platform/zlist/applications/interfaces/input/SetSortConfigUseCaseInputModel.js +1 -0
- package/es/platform/zlist/applications/usecases/GetSortConfigUseCase.js +17 -0
- package/es/platform/zlist/applications/usecases/RecordSuccessCallbackUsecase.js +1 -1
- package/es/platform/zlist/applications/usecases/RefreshRecordsRequestedUseCase.js +17 -0
- package/es/platform/zlist/applications/usecases/SetSortConfigUseCase.js +26 -0
- package/es/platform/zlist/applications/usecases/SortUseCase.js +6 -6
- package/es/platform/zlist/domain/entities/List.js +27 -15
- package/es/platform/zlist/domain/entities/interfaces/Properties.js +5 -5
- package/es/platform/zlist/frameworks/EventHandlersFactory.js +3 -4
- package/es/platform/zlist/frameworks/ZListBehaviourFactory.js +2 -5
- package/es/platform/zrecord/adapters/gateways/Repository.js +5 -2
- package/es/platform/zrecord/applications/entities-factory/RecordsManagerFactory.js +2 -2
- package/es/platform/zrecord/applications/interfaces/input/ClearAllFiltersUseCaseInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/GetFilterConditionUseCaseInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/GetFilterConfigUseCaseInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/RefreshRecordsUseCaseInputModel.js +1 -0
- package/es/platform/zrecord/applications/interfaces/input/SetFilterUseCaseInputModel.js +1 -0
- package/es/platform/zrecord/applications/usecases/ClearAllFiltersUseCase.js +24 -0
- package/es/platform/zrecord/applications/usecases/GetFilterConditionUseCase.js +15 -0
- package/es/platform/zrecord/applications/usecases/GetFilterConfigUseCase.js +15 -0
- package/es/platform/zrecord/applications/usecases/RefreshRecordsUseCase.js +14 -0
- package/es/platform/zrecord/applications/usecases/SetFilterUseCase.js +24 -0
- package/es/platform/zrecord/domain/entities/Filter.js +247 -0
- package/es/platform/zrecord/domain/entities/RecordsManager.js +19 -1
- package/es/platform/zrecord/domain/entities/interfaces/IFilter.js +1 -0
- package/es/platform/zrecord/frameworks/RecordBehaviourFactory.js +11 -1
- package/package.json +2 -2
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import HighlightedValueConstants from "../../../../../../../cc/highlighted-value/Constants";
|
|
2
|
+
import FieldConstants from "../../../../../../../cc/fields/field/Constants";
|
|
3
|
+
export class EventHandlersFactory {
|
|
4
|
+
static create() {
|
|
5
|
+
const clickHandler = input => {
|
|
6
|
+
const {
|
|
7
|
+
state,
|
|
8
|
+
dispatch
|
|
9
|
+
} = input;
|
|
10
|
+
const {
|
|
11
|
+
fieldName
|
|
12
|
+
} = state.properties;
|
|
13
|
+
dispatch({
|
|
14
|
+
type: FieldConstants.FIELD_CLICKED,
|
|
15
|
+
payload: {
|
|
16
|
+
fieldName
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
[HighlightedValueConstants.HIGHLIGHTED_VALUE_CLICKED]: clickHandler
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createCustomComponent } from "../../../../../../custom-component";
|
|
2
|
+
import HighlightedValueProperties from "../../../../../../../cc/highlighted-value/Properties";
|
|
3
|
+
import FieldEvents from "../../../../../../../cc/fields/field/Events";
|
|
4
|
+
import HighlightedValueFieldView from "./HighlightedValueFieldView";
|
|
5
|
+
import { EventHandlersFactory } from "./EventHandlersFactory";
|
|
6
|
+
const HighlightedValueField = createCustomComponent({
|
|
7
|
+
name: 'HighlightedValueField',
|
|
8
|
+
View: HighlightedValueFieldView,
|
|
9
|
+
properties: { ...HighlightedValueProperties,
|
|
10
|
+
fieldName: {
|
|
11
|
+
required: false,
|
|
12
|
+
defaultValue: '',
|
|
13
|
+
typeMetadata: {
|
|
14
|
+
schema: {
|
|
15
|
+
type: 'string'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
events: FieldEvents,
|
|
21
|
+
eventHandlers: EventHandlersFactory.create()
|
|
22
|
+
});
|
|
23
|
+
export default HighlightedValueField;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import HighlightedValue from "../../../../highlighted-value/frameworks/ui/HighlightedValue";
|
|
3
|
+
export default function HighlightedValueFieldView(_ref, ref) {
|
|
4
|
+
let {
|
|
5
|
+
state
|
|
6
|
+
} = _ref;
|
|
7
|
+
const {
|
|
8
|
+
text,
|
|
9
|
+
color,
|
|
10
|
+
tooltip,
|
|
11
|
+
weight,
|
|
12
|
+
isDotted,
|
|
13
|
+
cursor
|
|
14
|
+
} = state.properties;
|
|
15
|
+
return /*#__PURE__*/React.createElement(HighlightedValue, {
|
|
16
|
+
getRef: ref,
|
|
17
|
+
text: text,
|
|
18
|
+
color: color,
|
|
19
|
+
tooltip: tooltip,
|
|
20
|
+
cursor: cursor,
|
|
21
|
+
weight: weight,
|
|
22
|
+
isDotted: isDotted
|
|
23
|
+
});
|
|
24
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import AvatarConstants from "../../../../../../../cc/avatar/Constants";
|
|
2
|
+
import FieldConstants from "../../../../../../../cc/fields/field/Constants";
|
|
3
|
+
export class EventHandlersFactory {
|
|
4
|
+
static create() {
|
|
5
|
+
const clickHandler = input => {
|
|
6
|
+
const {
|
|
7
|
+
state,
|
|
8
|
+
dispatch
|
|
9
|
+
} = input;
|
|
10
|
+
const {
|
|
11
|
+
fieldName
|
|
12
|
+
} = state.properties;
|
|
13
|
+
dispatch({
|
|
14
|
+
type: FieldConstants.FIELD_CLICKED,
|
|
15
|
+
payload: {
|
|
16
|
+
fieldName
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
[AvatarConstants.AVATAR_CLICKED]: clickHandler
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createCustomComponent } from "../../../../../../custom-component";
|
|
2
|
+
import AvatarProperties from "../../../../../../../cc/avatar/Properties";
|
|
3
|
+
import FieldEvents from "../../../../../../../cc/fields/field/Events";
|
|
4
|
+
import LabeledAvatarFieldView from "./LabeledAvatarFieldView";
|
|
5
|
+
import { EventHandlersFactory } from "./EventHandlersFactory";
|
|
6
|
+
const LabeledAvatarField = createCustomComponent({
|
|
7
|
+
name: 'LabeledAvatarField',
|
|
8
|
+
View: LabeledAvatarFieldView,
|
|
9
|
+
properties: { ...AvatarProperties,
|
|
10
|
+
fieldName: {
|
|
11
|
+
required: false,
|
|
12
|
+
defaultValue: '',
|
|
13
|
+
typeMetadata: {
|
|
14
|
+
schema: {
|
|
15
|
+
type: 'string'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
events: FieldEvents,
|
|
21
|
+
eventHandlers: EventHandlersFactory.create()
|
|
22
|
+
});
|
|
23
|
+
export default LabeledAvatarField;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Avatar } from "../../../..";
|
|
3
|
+
export default function LabeledAvatarFieldView(_ref, ref) {
|
|
4
|
+
let {
|
|
5
|
+
state
|
|
6
|
+
} = _ref;
|
|
7
|
+
const {
|
|
8
|
+
name,
|
|
9
|
+
imageSrc,
|
|
10
|
+
size,
|
|
11
|
+
label,
|
|
12
|
+
tooltip
|
|
13
|
+
} = state.properties;
|
|
14
|
+
return /*#__PURE__*/React.createElement(Avatar, {
|
|
15
|
+
getRef: ref,
|
|
16
|
+
name: name,
|
|
17
|
+
imageSrc: imageSrc,
|
|
18
|
+
size: size,
|
|
19
|
+
label: label,
|
|
20
|
+
tooltip: tooltip
|
|
21
|
+
});
|
|
22
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import LinkConstants from "../../../../../../../cc/link/Constants";
|
|
2
|
+
import FieldConstants from "../../../../../../../cc/fields/field/Constants";
|
|
3
|
+
export class EventHandlersFactory {
|
|
4
|
+
static create() {
|
|
5
|
+
const clickHandler = input => {
|
|
6
|
+
const {
|
|
7
|
+
state,
|
|
8
|
+
dispatch
|
|
9
|
+
} = input;
|
|
10
|
+
const {
|
|
11
|
+
fieldName
|
|
12
|
+
} = state.properties;
|
|
13
|
+
dispatch({
|
|
14
|
+
type: FieldConstants.FIELD_CLICKED,
|
|
15
|
+
payload: {
|
|
16
|
+
fieldName
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
[LinkConstants.LINK_CLICKED]: clickHandler
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createCustomComponent } from "../../../../../../custom-component";
|
|
2
|
+
import LinkProperties from "../../../../../../../cc/link/Properties";
|
|
3
|
+
import FieldEvents from "../../../../../../../cc/fields/field/Events";
|
|
4
|
+
import LinkFieldView from "./LinkFieldView";
|
|
5
|
+
import { EventHandlersFactory } from "./EventHandlersFactory";
|
|
6
|
+
const LinkField = createCustomComponent({
|
|
7
|
+
name: 'LinkField',
|
|
8
|
+
View: LinkFieldView,
|
|
9
|
+
properties: { ...LinkProperties,
|
|
10
|
+
fieldName: {
|
|
11
|
+
required: false,
|
|
12
|
+
defaultValue: '',
|
|
13
|
+
typeMetadata: {
|
|
14
|
+
schema: {
|
|
15
|
+
type: 'string'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
events: FieldEvents,
|
|
21
|
+
eventHandlers: EventHandlersFactory.create()
|
|
22
|
+
});
|
|
23
|
+
export default LinkField;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Link from "../../../../link/frameworks/ui/Link";
|
|
3
|
+
export default function LinkFieldView(_ref, ref) {
|
|
4
|
+
let {
|
|
5
|
+
state
|
|
6
|
+
} = _ref;
|
|
7
|
+
let {
|
|
8
|
+
text,
|
|
9
|
+
variant,
|
|
10
|
+
isDotted,
|
|
11
|
+
weight,
|
|
12
|
+
href,
|
|
13
|
+
tooltip,
|
|
14
|
+
opensNewTab
|
|
15
|
+
} = state.properties;
|
|
16
|
+
return /*#__PURE__*/React.createElement(Link, {
|
|
17
|
+
getRef: ref,
|
|
18
|
+
text: text,
|
|
19
|
+
variant: variant,
|
|
20
|
+
href: href,
|
|
21
|
+
isDotted: isDotted,
|
|
22
|
+
weight: weight,
|
|
23
|
+
tooltip: tooltip,
|
|
24
|
+
opensNewTab: opensNewTab
|
|
25
|
+
});
|
|
26
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import RadioDropdownConstants from "../../../../../../../cc/radio-dropdown/Constants";
|
|
2
|
+
import FieldConstants from "../../../../../../../cc/fields/field/Constants";
|
|
3
|
+
export class EventHandlersFactory {
|
|
4
|
+
static create() {
|
|
5
|
+
const changeHandler = input => {
|
|
6
|
+
const {
|
|
7
|
+
state,
|
|
8
|
+
dispatch,
|
|
9
|
+
action
|
|
10
|
+
} = input;
|
|
11
|
+
const {
|
|
12
|
+
fieldName,
|
|
13
|
+
fieldType
|
|
14
|
+
} = state.properties;
|
|
15
|
+
const {
|
|
16
|
+
id
|
|
17
|
+
} = action.payload;
|
|
18
|
+
dispatch({
|
|
19
|
+
type: FieldConstants.FIELD_CHANGED,
|
|
20
|
+
payload: {
|
|
21
|
+
fieldName,
|
|
22
|
+
value: fieldType === 'Boolean' ? id === 'true' : id
|
|
23
|
+
}
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
|
|
27
|
+
return {
|
|
28
|
+
[RadioDropdownConstants.RADIO_DROPDOWN_VALUE_CHANGED]: changeHandler
|
|
29
|
+
};
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { createCustomComponent } from "../../../../../../custom-component";
|
|
2
|
+
import RadioDropdownProperties from "../../../../../../../cc/radio-dropdown/Properties";
|
|
3
|
+
import FieldEvents from "../../../../../../../cc/fields/field/Events";
|
|
4
|
+
import RadioDropdownFieldView from "./RadioDropdownFieldView";
|
|
5
|
+
import { EventHandlersFactory } from "./EventHandlersFactory";
|
|
6
|
+
const RadioDropdownField = createCustomComponent({
|
|
7
|
+
name: 'RadioDropdownField',
|
|
8
|
+
View: RadioDropdownFieldView,
|
|
9
|
+
properties: { ...RadioDropdownProperties,
|
|
10
|
+
fieldType: {
|
|
11
|
+
required: false,
|
|
12
|
+
defaultValue: 'Picklist',
|
|
13
|
+
typeMetadata: {
|
|
14
|
+
schema: {
|
|
15
|
+
type: 'string'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
},
|
|
19
|
+
fieldName: {
|
|
20
|
+
required: false,
|
|
21
|
+
defaultValue: '',
|
|
22
|
+
typeMetadata: {
|
|
23
|
+
schema: {
|
|
24
|
+
type: 'string'
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
events: FieldEvents,
|
|
30
|
+
eventHandlers: EventHandlersFactory.create()
|
|
31
|
+
});
|
|
32
|
+
export default RadioDropdownField;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Flex from '@zohodesk/layout/es/Flex/Flex';
|
|
3
|
+
import RadioDropdown from "../../../../radio-dropdown/frameworks/ui/RadioDropdown"; // @ts-ignore
|
|
4
|
+
|
|
5
|
+
import style from "./css/RadioDropdownField.module.css";
|
|
6
|
+
export default function RadioDropdownFieldView(_ref, ref) {
|
|
7
|
+
let {
|
|
8
|
+
state
|
|
9
|
+
} = _ref;
|
|
10
|
+
const {
|
|
11
|
+
options,
|
|
12
|
+
color,
|
|
13
|
+
isDotted,
|
|
14
|
+
weight,
|
|
15
|
+
selectedId,
|
|
16
|
+
selectedValue,
|
|
17
|
+
dropdownHeading,
|
|
18
|
+
hasSearch,
|
|
19
|
+
searchPlaceholder,
|
|
20
|
+
emptyStateTitle,
|
|
21
|
+
isDisabled,
|
|
22
|
+
isReadOnly
|
|
23
|
+
} = state.properties;
|
|
24
|
+
return /*#__PURE__*/React.createElement(Flex, {
|
|
25
|
+
$ui_displayMode: "flex",
|
|
26
|
+
$ui_className: color === 'none' ? style.wrapper : ''
|
|
27
|
+
}, /*#__PURE__*/React.createElement(RadioDropdown, {
|
|
28
|
+
getRef: ref,
|
|
29
|
+
hoverVariant: "border",
|
|
30
|
+
options: options,
|
|
31
|
+
selectedId: selectedId,
|
|
32
|
+
selectedValue: selectedValue,
|
|
33
|
+
color: color,
|
|
34
|
+
isDotted: isDotted,
|
|
35
|
+
weight: weight,
|
|
36
|
+
dropdownHeading: dropdownHeading,
|
|
37
|
+
hasSearch: hasSearch,
|
|
38
|
+
searchPlaceholder: searchPlaceholder,
|
|
39
|
+
emptyStateTitle: emptyStateTitle,
|
|
40
|
+
isDisabled: isDisabled,
|
|
41
|
+
isReadOnly: isReadOnly
|
|
42
|
+
}));
|
|
43
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import TagConstants from "../../../../../../../cc/tag/Constants";
|
|
2
|
+
import FieldConstants from "../../../../../../../cc/fields/field/Constants";
|
|
3
|
+
export class EventHandlersFactory {
|
|
4
|
+
static create() {
|
|
5
|
+
const clickHandler = input => {
|
|
6
|
+
const {
|
|
7
|
+
state,
|
|
8
|
+
dispatch
|
|
9
|
+
} = input;
|
|
10
|
+
const {
|
|
11
|
+
fieldName
|
|
12
|
+
} = state.properties;
|
|
13
|
+
dispatch({
|
|
14
|
+
type: FieldConstants.FIELD_CLICKED,
|
|
15
|
+
payload: {
|
|
16
|
+
fieldName
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
[TagConstants.TAG_CLICKED]: clickHandler
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
}
|
package/es/library/dot/legacy-to-new-arch/table-field-components/tag-field/frameworks/ui/TagField.js
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createCustomComponent } from "../../../../../../custom-component";
|
|
2
|
+
import TagProperties from "../../../../../../../cc/tag/Properties";
|
|
3
|
+
import FieldEvents from "../../../../../../../cc/fields/field/Events";
|
|
4
|
+
import TagFieldView from "./TagFieldView";
|
|
5
|
+
import { EventHandlersFactory } from "./EventHandlersFactory";
|
|
6
|
+
const TagField = createCustomComponent({
|
|
7
|
+
name: 'TagField',
|
|
8
|
+
View: TagFieldView,
|
|
9
|
+
properties: { ...TagProperties,
|
|
10
|
+
fieldName: {
|
|
11
|
+
required: false,
|
|
12
|
+
defaultValue: '',
|
|
13
|
+
typeMetadata: {
|
|
14
|
+
schema: {
|
|
15
|
+
type: 'string'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
events: FieldEvents,
|
|
21
|
+
eventHandlers: EventHandlersFactory.create()
|
|
22
|
+
});
|
|
23
|
+
export default TagField;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Tag from "../../../../tag/frameworks/ui/Tag";
|
|
3
|
+
export default function TagFieldView(_ref, ref) {
|
|
4
|
+
let {
|
|
5
|
+
state
|
|
6
|
+
} = _ref;
|
|
7
|
+
const {
|
|
8
|
+
id,
|
|
9
|
+
label,
|
|
10
|
+
color,
|
|
11
|
+
isDisabled,
|
|
12
|
+
iconName,
|
|
13
|
+
imageAltText,
|
|
14
|
+
imageSrc,
|
|
15
|
+
isRemovable,
|
|
16
|
+
cursor,
|
|
17
|
+
size,
|
|
18
|
+
tooltip
|
|
19
|
+
} = state.properties;
|
|
20
|
+
return /*#__PURE__*/React.createElement(Tag, {
|
|
21
|
+
getRef: ref,
|
|
22
|
+
id: id,
|
|
23
|
+
label: label,
|
|
24
|
+
color: color,
|
|
25
|
+
isDisabled: isDisabled,
|
|
26
|
+
iconName: iconName,
|
|
27
|
+
imageAltText: imageAltText,
|
|
28
|
+
imageSrc: imageSrc,
|
|
29
|
+
isRemovable: isRemovable,
|
|
30
|
+
cursor: cursor,
|
|
31
|
+
size: size,
|
|
32
|
+
tooltip: tooltip
|
|
33
|
+
});
|
|
34
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import TagsConstants from "../../../../../../../cc/tags/Constants";
|
|
2
|
+
import FieldConstants from "../../../../../../../cc/fields/field/Constants";
|
|
3
|
+
export class EventHandlersFactory {
|
|
4
|
+
static create() {
|
|
5
|
+
const clickHandler = input => {
|
|
6
|
+
const {
|
|
7
|
+
state,
|
|
8
|
+
dispatch
|
|
9
|
+
} = input;
|
|
10
|
+
const {
|
|
11
|
+
fieldName
|
|
12
|
+
} = state.properties;
|
|
13
|
+
dispatch({
|
|
14
|
+
type: FieldConstants.FIELD_CLICKED,
|
|
15
|
+
payload: {
|
|
16
|
+
fieldName
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
[TagsConstants.TAG_CLICKED]: clickHandler
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createCustomComponent } from "../../../../../../custom-component";
|
|
2
|
+
import TagsProperties from "../../../../../../../cc/tags/Properties";
|
|
3
|
+
import FieldEvents from "../../../../../../../cc/fields/field/Events";
|
|
4
|
+
import TagsFieldView from "./TagsFieldView";
|
|
5
|
+
import { EventHandlersFactory } from "./EventHandlersFactory";
|
|
6
|
+
const TagsField = createCustomComponent({
|
|
7
|
+
name: 'TagsField',
|
|
8
|
+
View: TagsFieldView,
|
|
9
|
+
properties: { ...TagsProperties,
|
|
10
|
+
fieldName: {
|
|
11
|
+
required: false,
|
|
12
|
+
defaultValue: '',
|
|
13
|
+
typeMetadata: {
|
|
14
|
+
schema: {
|
|
15
|
+
type: 'string'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
events: FieldEvents,
|
|
21
|
+
eventHandlers: EventHandlersFactory.create()
|
|
22
|
+
});
|
|
23
|
+
export default TagsField;
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import Tags from "../../../../tags/frameworks/ui/Tags";
|
|
3
|
+
export default function TagsFieldView(_ref, ref) {
|
|
4
|
+
let {
|
|
5
|
+
state
|
|
6
|
+
} = _ref;
|
|
7
|
+
const {
|
|
8
|
+
title,
|
|
9
|
+
tags,
|
|
10
|
+
isWrapped
|
|
11
|
+
} = state.properties;
|
|
12
|
+
return /*#__PURE__*/React.createElement(Tags, {
|
|
13
|
+
getRef: ref,
|
|
14
|
+
title: title,
|
|
15
|
+
tags: tags,
|
|
16
|
+
isWrapped: isWrapped
|
|
17
|
+
});
|
|
18
|
+
}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { createCustomComponent } from "../../../../../../custom-component";
|
|
2
|
+
import TagsListDropdownProperties from "../../../../../../../cc/tags-list-dropdown/Properties";
|
|
3
|
+
import FieldEvents from "../../../../../../../cc/fields/field/Events";
|
|
4
|
+
import TagsListDropdownFieldView from "./TagsListDropdownFieldView";
|
|
5
|
+
const TagsListDropdownField = createCustomComponent({
|
|
6
|
+
name: 'TagsListDropdownField',
|
|
7
|
+
View: TagsListDropdownFieldView,
|
|
8
|
+
properties: TagsListDropdownProperties,
|
|
9
|
+
events: FieldEvents,
|
|
10
|
+
eventHandlers: {}
|
|
11
|
+
});
|
|
12
|
+
export default TagsListDropdownField;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import TagsListDropdown from "../../../../tags-list-dropdown/frameworks/ui/TagsListDropdown";
|
|
3
|
+
export default function TagsListDropdownFieldView(_ref, ref) {
|
|
4
|
+
let {
|
|
5
|
+
state
|
|
6
|
+
} = _ref;
|
|
7
|
+
const {
|
|
8
|
+
tags,
|
|
9
|
+
hasSearch,
|
|
10
|
+
searchPlaceholder,
|
|
11
|
+
text,
|
|
12
|
+
dropdownHeading,
|
|
13
|
+
emptyMessage
|
|
14
|
+
} = state.properties;
|
|
15
|
+
return /*#__PURE__*/React.createElement(TagsListDropdown, {
|
|
16
|
+
getRef: ref,
|
|
17
|
+
tags: tags,
|
|
18
|
+
text: text,
|
|
19
|
+
hasSearch: hasSearch,
|
|
20
|
+
searchPlaceholder: searchPlaceholder,
|
|
21
|
+
dropdownHeading: dropdownHeading,
|
|
22
|
+
emptyMessage: emptyMessage
|
|
23
|
+
});
|
|
24
|
+
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import TextConstants from "../../../../../../../cc/text/Constants";
|
|
2
|
+
import FieldConstants from "../../../../../../../cc/fields/field/Constants";
|
|
3
|
+
export class EventHandlersFactory {
|
|
4
|
+
static create() {
|
|
5
|
+
const clickHandler = input => {
|
|
6
|
+
const {
|
|
7
|
+
state,
|
|
8
|
+
dispatch
|
|
9
|
+
} = input;
|
|
10
|
+
const {
|
|
11
|
+
fieldName
|
|
12
|
+
} = state.properties;
|
|
13
|
+
dispatch({
|
|
14
|
+
type: FieldConstants.FIELD_CLICKED,
|
|
15
|
+
payload: {
|
|
16
|
+
fieldName
|
|
17
|
+
}
|
|
18
|
+
});
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
[TextConstants.TEXT_CLICKED]: clickHandler
|
|
23
|
+
};
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { createCustomComponent } from "../../../../../../custom-component";
|
|
2
|
+
import TextProperties from "../../../../../../../cc/text/Properties";
|
|
3
|
+
import FieldEvents from "../../../../../../../cc/fields/field/Events";
|
|
4
|
+
import TextFieldView from "./TextFieldView";
|
|
5
|
+
import { EventHandlersFactory } from "./EventHandlersFactory";
|
|
6
|
+
const TextField = createCustomComponent({
|
|
7
|
+
name: 'TextField',
|
|
8
|
+
View: TextFieldView,
|
|
9
|
+
properties: { ...TextProperties,
|
|
10
|
+
fieldName: {
|
|
11
|
+
required: false,
|
|
12
|
+
defaultValue: '',
|
|
13
|
+
typeMetadata: {
|
|
14
|
+
schema: {
|
|
15
|
+
type: 'string'
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
},
|
|
20
|
+
events: FieldEvents,
|
|
21
|
+
eventHandlers: EventHandlersFactory.create()
|
|
22
|
+
});
|
|
23
|
+
export default TextField;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Text } from "../../../..";
|
|
3
|
+
export default function TextFieldView(_ref, ref) {
|
|
4
|
+
let {
|
|
5
|
+
state
|
|
6
|
+
} = _ref;
|
|
7
|
+
const {
|
|
8
|
+
text,
|
|
9
|
+
weight,
|
|
10
|
+
isDotted,
|
|
11
|
+
tooltip
|
|
12
|
+
} = state.properties;
|
|
13
|
+
return /*#__PURE__*/React.createElement(Text, {
|
|
14
|
+
getRef: ref,
|
|
15
|
+
text: text,
|
|
16
|
+
tooltip: tooltip,
|
|
17
|
+
weight: weight,
|
|
18
|
+
isDotted: isDotted
|
|
19
|
+
});
|
|
20
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { createCustomComponent } from "../../../../../custom-component";
|
|
2
|
+
import { TagProperties, TagEvents } from "../../../../../../cc/tag";
|
|
3
|
+
import TagView from "./TagView";
|
|
4
|
+
let Tag = createCustomComponent({
|
|
5
|
+
name: "Tag",
|
|
6
|
+
View: TagView,
|
|
7
|
+
properties: TagProperties,
|
|
8
|
+
events: TagEvents,
|
|
9
|
+
eventHandlers: {}
|
|
10
|
+
});
|
|
11
|
+
export default Tag;
|