@beinformed/ui 1.11.0 → 1.13.0
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/CHANGELOG.md +29 -0
- package/esm/exceptions/ConfigurationException.js +2 -1
- package/esm/exceptions/ConfigurationException.js.map +1 -1
- package/esm/exceptions/FetchException.js +4 -3
- package/esm/exceptions/FetchException.js.map +1 -1
- package/esm/exceptions/IllegalArgumentException.js +2 -1
- package/esm/exceptions/IllegalArgumentException.js.map +1 -1
- package/esm/exceptions/IllegalReturnException.js +2 -1
- package/esm/exceptions/IllegalReturnException.js.map +1 -1
- package/esm/exceptions/IllegalStateException.js +2 -1
- package/esm/exceptions/IllegalStateException.js.map +1 -1
- package/esm/exceptions/JsonParseException.js +2 -1
- package/esm/exceptions/JsonParseException.js.map +1 -1
- package/esm/exceptions/MissingPropertyException.js +2 -1
- package/esm/exceptions/MissingPropertyException.js.map +1 -1
- package/esm/exceptions/NetworkException.js +2 -1
- package/esm/exceptions/NetworkException.js.map +1 -1
- package/esm/exceptions/NotAllowedUriException.js +2 -1
- package/esm/exceptions/NotAllowedUriException.js.map +1 -1
- package/esm/exceptions/NotFoundException.js +2 -1
- package/esm/exceptions/NotFoundException.js.map +1 -1
- package/esm/exceptions/ServerRequestException.js +2 -1
- package/esm/exceptions/ServerRequestException.js.map +1 -1
- package/esm/exceptions/ThemePropertyException.js +2 -1
- package/esm/exceptions/ThemePropertyException.js.map +1 -1
- package/esm/exceptions/TimeoutException.js +2 -1
- package/esm/exceptions/TimeoutException.js.map +1 -1
- package/esm/exceptions/UnauthorizedException.js +2 -1
- package/esm/exceptions/UnauthorizedException.js.map +1 -1
- package/esm/exceptions/UnsupportedOperationException.js +2 -1
- package/esm/exceptions/UnsupportedOperationException.js.map +1 -1
- package/esm/hooks/useProgressIndicator.js +2 -2
- package/esm/i18n/Locale.js +11 -4
- package/esm/i18n/Locale.js.map +1 -1
- package/esm/i18n/Locales.js +2 -2
- package/esm/i18n/Message.js +2 -2
- package/esm/i18n/languages.js +2 -1
- package/esm/i18n/languages.js.map +1 -1
- package/esm/models/attributes/AttributeCollection.js +2 -2
- package/esm/models/attributes/AttributeContent.js +58 -30
- package/esm/models/attributes/AttributeContent.js.map +1 -1
- package/esm/models/attributes/AttributeDataHelper.js +3 -3
- package/esm/models/attributes/AttributeDataHelper.js.map +1 -1
- package/esm/models/attributes/BooleanAttributeModel.js +2 -2
- package/esm/models/attributes/ChoiceAttributeModel.js +2 -2
- package/esm/models/attributes/ChoiceAttributeOptionCollection.js +2 -2
- package/esm/models/attributes/CompositeAttributeChildCollection.js +2 -2
- package/esm/models/attributes/HelptextAttributeModel.js +24 -9
- package/esm/models/attributes/HelptextAttributeModel.js.map +1 -1
- package/esm/models/attributes/_createAttribute.js +2 -2
- package/esm/models/base/ResourceModel.js +2 -2
- package/esm/models/caseview/CaseViewModel.js +2 -4
- package/esm/models/caseview/CaseViewModel.js.map +1 -1
- package/esm/models/concepts/ConceptDetailModel.js +2 -2
- package/esm/models/concepts/SourceReferenceModel.js +2 -2
- package/esm/models/content/ContentTOCModel.js +2 -2
- package/esm/models/filters/AssignmentFilterModel.js +2 -2
- package/esm/models/filters/BaseFilterModel.js +2 -2
- package/esm/models/filters/ConceptIndexFilterModel.js +2 -1
- package/esm/models/filters/ConceptIndexFilterModel.js.map +1 -1
- package/esm/models/filters/FilterCollection.js +2 -2
- package/esm/models/filters/FilterModel.js +2 -1
- package/esm/models/filters/FilterModel.js.map +1 -1
- package/esm/models/form/FormModel.js +30 -6
- package/esm/models/form/FormModel.js.map +1 -1
- package/esm/models/form/FormObjectModel.js +5 -7
- package/esm/models/form/FormObjectModel.js.map +1 -1
- package/esm/models/grouping/GroupingModel.js +2 -2
- package/esm/models/links/normalizeLinkJSON.js +2 -2
- package/esm/models/list/ListDetailModel.js +4 -6
- package/esm/models/list/ListDetailModel.js.map +1 -1
- package/esm/models/list/ListModel.js +4 -6
- package/esm/models/list/ListModel.js.map +1 -1
- package/esm/models/lookup/LookupOptionCollection.js +2 -2
- package/esm/models/panels/GroupingPanelModel.js +2 -4
- package/esm/models/panels/GroupingPanelModel.js.map +1 -1
- package/esm/modularui/ModularUIError.js +2 -1
- package/esm/modularui/ModularUIError.js.map +1 -1
- package/esm/modularui/ModularUIRequest.js +2 -2
- package/esm/react-server/serverUtil.js +2 -2
- package/esm/react-theme/createTheme.js +2 -2
- package/esm/redux/_i18n/reducer.js +2 -2
- package/esm/redux/_modularui/actions.js +2 -2
- package/esm/redux/_modularui/connector.js +2 -2
- package/esm/redux/_modularui/reducer.js +2 -2
- package/esm/redux/_modularui/selectors.js +2 -2
- package/esm/redux/reducers/AuthReducer.js +2 -2
- package/esm/redux/reducers/ModalsReducer.js +2 -2
- package/esm/redux/reducers/NotificationReducer.js +2 -2
- package/esm/redux/reducers/PreferencesReducer.js +2 -2
- package/esm/redux/reducers/ProgressIndicatorReducer.js +2 -2
- package/esm/redux/store/configureStore.js +2 -2
- package/esm/utils/fetch/xhr.js +2 -2
- package/lib/exceptions/ConfigurationException.js +3 -1
- package/lib/exceptions/ConfigurationException.js.map +1 -1
- package/lib/exceptions/FetchException.js +5 -3
- package/lib/exceptions/FetchException.js.map +1 -1
- package/lib/exceptions/IllegalArgumentException.js +3 -1
- package/lib/exceptions/IllegalArgumentException.js.map +1 -1
- package/lib/exceptions/IllegalReturnException.js +3 -1
- package/lib/exceptions/IllegalReturnException.js.map +1 -1
- package/lib/exceptions/IllegalStateException.js +3 -1
- package/lib/exceptions/IllegalStateException.js.map +1 -1
- package/lib/exceptions/JsonParseException.js +3 -1
- package/lib/exceptions/JsonParseException.js.map +1 -1
- package/lib/exceptions/MissingPropertyException.js +3 -1
- package/lib/exceptions/MissingPropertyException.js.map +1 -1
- package/lib/exceptions/NetworkException.js +3 -1
- package/lib/exceptions/NetworkException.js.map +1 -1
- package/lib/exceptions/NotAllowedUriException.js +3 -1
- package/lib/exceptions/NotAllowedUriException.js.map +1 -1
- package/lib/exceptions/NotFoundException.js +3 -1
- package/lib/exceptions/NotFoundException.js.map +1 -1
- package/lib/exceptions/ServerRequestException.js +3 -1
- package/lib/exceptions/ServerRequestException.js.map +1 -1
- package/lib/exceptions/ThemePropertyException.js +3 -1
- package/lib/exceptions/ThemePropertyException.js.map +1 -1
- package/lib/exceptions/TimeoutException.js +3 -1
- package/lib/exceptions/TimeoutException.js.map +1 -1
- package/lib/exceptions/UnauthorizedException.js +3 -1
- package/lib/exceptions/UnauthorizedException.js.map +1 -1
- package/lib/exceptions/UnsupportedOperationException.js +3 -1
- package/lib/exceptions/UnsupportedOperationException.js.map +1 -1
- package/lib/hooks/useProgressIndicator.js +2 -2
- package/lib/i18n/Locale.js +11 -5
- package/lib/i18n/Locale.js.flow +7 -0
- package/lib/i18n/Locale.js.map +1 -1
- package/lib/i18n/Locales.js +2 -2
- package/lib/i18n/Message.js +2 -2
- package/lib/i18n/__tests__/Locale.spec.js.flow +14 -0
- package/lib/i18n/languages.js +2 -1
- package/lib/i18n/languages.js.flow +1 -0
- package/lib/i18n/languages.js.map +1 -1
- package/lib/i18n/types.js.flow +1 -0
- package/lib/models/attributes/AttributeCollection.js +2 -2
- package/lib/models/attributes/AttributeContent.js +59 -31
- package/lib/models/attributes/AttributeContent.js.flow +63 -16
- package/lib/models/attributes/AttributeContent.js.map +1 -1
- package/lib/models/attributes/AttributeDataHelper.js +3 -3
- package/lib/models/attributes/AttributeDataHelper.js.flow +1 -0
- package/lib/models/attributes/AttributeDataHelper.js.map +1 -1
- package/lib/models/attributes/BooleanAttributeModel.js +2 -2
- package/lib/models/attributes/ChoiceAttributeModel.js +2 -2
- package/lib/models/attributes/ChoiceAttributeOptionCollection.js +2 -2
- package/lib/models/attributes/CompositeAttributeChildCollection.js +2 -2
- package/lib/models/attributes/HelptextAttributeModel.js +24 -9
- package/lib/models/attributes/HelptextAttributeModel.js.flow +18 -5
- package/lib/models/attributes/HelptextAttributeModel.js.map +1 -1
- package/lib/models/attributes/__tests__/AttributeCollection.spec.js.flow +4 -4
- package/lib/models/attributes/__tests__/AttributeContent.spec.js.flow +13 -19
- package/lib/models/attributes/__tests__/HelptextAttributeModel.spec.js.flow +18 -10
- package/lib/models/attributes/_createAttribute.js +2 -2
- package/lib/models/base/ResourceModel.js +2 -2
- package/lib/models/caseview/CaseViewModel.js +2 -4
- package/lib/models/caseview/CaseViewModel.js.flow +2 -2
- package/lib/models/caseview/CaseViewModel.js.map +1 -1
- package/lib/models/caseview/__tests__/CaseViewModel.spec.js.flow +5 -3
- package/lib/models/concepts/ConceptDetailModel.js +2 -2
- package/lib/models/concepts/SourceReferenceModel.js +2 -2
- package/lib/models/content/ContentTOCModel.js +2 -2
- package/lib/models/filters/AssignmentFilterModel.js +2 -2
- package/lib/models/filters/BaseFilterModel.js +2 -2
- package/lib/models/filters/ConceptIndexFilterModel.js +3 -1
- package/lib/models/filters/ConceptIndexFilterModel.js.map +1 -1
- package/lib/models/filters/FilterCollection.js +2 -2
- package/lib/models/filters/FilterModel.js +3 -1
- package/lib/models/filters/FilterModel.js.map +1 -1
- package/lib/models/form/FormModel.js +30 -6
- package/lib/models/form/FormModel.js.flow +21 -4
- package/lib/models/form/FormModel.js.map +1 -1
- package/lib/models/form/FormObjectModel.js +5 -7
- package/lib/models/form/FormObjectModel.js.flow +2 -4
- package/lib/models/form/FormObjectModel.js.map +1 -1
- package/lib/models/form/__tests__/FormModel.getters.spec.js.flow +15 -0
- package/lib/models/form/__tests__/FormObjectModel.spec.js.flow +29 -3
- package/lib/models/grouping/GroupingModel.js +2 -2
- package/lib/models/links/normalizeLinkJSON.js +2 -2
- package/lib/models/list/ListDetailModel.js +4 -6
- package/lib/models/list/ListDetailModel.js.flow +2 -2
- package/lib/models/list/ListDetailModel.js.map +1 -1
- package/lib/models/list/ListModel.js +4 -6
- package/lib/models/list/ListModel.js.flow +2 -2
- package/lib/models/list/ListModel.js.map +1 -1
- package/lib/models/list/__tests__/ListDetailModel.spec.js.flow +5 -3
- package/lib/models/list/__tests__/ListModel.spec.js.flow +5 -3
- package/lib/models/lookup/LookupOptionCollection.js +2 -2
- package/lib/models/panels/GroupingPanelModel.js +2 -4
- package/lib/models/panels/GroupingPanelModel.js.flow +2 -2
- package/lib/models/panels/GroupingPanelModel.js.map +1 -1
- package/lib/models/panels/__tests__/GroupingPanelModel.spec.js.flow +5 -3
- package/lib/models/types.js.flow +3 -3
- package/lib/modularui/ModularUIError.js +3 -1
- package/lib/modularui/ModularUIError.js.map +1 -1
- package/lib/modularui/ModularUIRequest.js +2 -2
- package/lib/react-server/serverUtil.js +2 -2
- package/lib/react-theme/createTheme.js +2 -2
- package/lib/redux/_i18n/reducer.js +2 -2
- package/lib/redux/_modularui/actions.js +2 -2
- package/lib/redux/_modularui/connector.js +2 -2
- package/lib/redux/_modularui/reducer.js +2 -2
- package/lib/redux/_modularui/selectors.js +2 -2
- package/lib/redux/reducers/AuthReducer.js +2 -2
- package/lib/redux/reducers/ModalsReducer.js +2 -2
- package/lib/redux/reducers/NotificationReducer.js +2 -2
- package/lib/redux/reducers/PreferencesReducer.js +2 -2
- package/lib/redux/reducers/ProgressIndicatorReducer.js +2 -2
- package/lib/redux/store/configureStore.js +2 -2
- package/lib/utils/fetch/xhr.js +2 -2
- package/package.json +28 -28
- package/src/i18n/Locale.js +7 -0
- package/src/i18n/__tests__/Locale.spec.js +14 -0
- package/src/i18n/languages.js +1 -0
- package/src/i18n/types.js +1 -0
- package/src/models/attributes/AttributeContent.js +63 -16
- package/src/models/attributes/AttributeDataHelper.js +1 -0
- package/src/models/attributes/HelptextAttributeModel.js +18 -5
- package/src/models/attributes/__mock__/_FormCollectionContribution.json +9 -0
- package/src/models/attributes/__mock__/_FormCollectionData.json +12 -3
- package/src/models/attributes/__tests__/AttributeCollection.spec.js +4 -4
- package/src/models/attributes/__tests__/AttributeContent.spec.js +13 -19
- package/src/models/attributes/__tests__/HelptextAttributeModel.spec.js +18 -10
- package/src/models/caseview/CaseViewModel.js +2 -2
- package/src/models/caseview/__tests__/CaseViewModel.spec.js +5 -3
- package/src/models/form/FormModel.js +21 -4
- package/src/models/form/FormObjectModel.js +2 -4
- package/src/models/form/__tests__/FormModel.getters.spec.js +15 -0
- package/src/models/form/__tests__/FormObjectModel.spec.js +29 -3
- package/src/models/list/ListDetailModel.js +2 -2
- package/src/models/list/ListModel.js +2 -2
- package/src/models/list/__tests__/ListDetailModel.spec.js +5 -3
- package/src/models/list/__tests__/ListModel.spec.js +5 -3
- package/src/models/panels/GroupingPanelModel.js +2 -2
- package/src/models/panels/__tests__/GroupingPanelModel.spec.js +5 -3
- package/src/models/types.js +3 -3
|
@@ -19,9 +19,9 @@ exports.default = void 0;
|
|
|
19
19
|
|
|
20
20
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
21
21
|
|
|
22
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object);
|
|
22
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
23
|
|
|
24
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25
25
|
|
|
26
26
|
// REDUCER
|
|
27
27
|
var initialState = {
|
|
@@ -19,9 +19,9 @@ exports.default = void 0;
|
|
|
19
19
|
|
|
20
20
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
21
21
|
|
|
22
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object);
|
|
22
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
23
|
|
|
24
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25
25
|
|
|
26
26
|
var initialState = {};
|
|
27
27
|
/**
|
|
@@ -19,9 +19,9 @@ exports.default = void 0;
|
|
|
19
19
|
|
|
20
20
|
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime-corejs3/helpers/defineProperty"));
|
|
21
21
|
|
|
22
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object);
|
|
22
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
23
23
|
|
|
24
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
24
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
25
25
|
|
|
26
26
|
// REDUCER
|
|
27
27
|
var initialState = {
|
|
@@ -31,9 +31,9 @@ var _createReducer = require("../reducers/createReducer");
|
|
|
31
31
|
|
|
32
32
|
var _actions = require("../_router/actions");
|
|
33
33
|
|
|
34
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object);
|
|
34
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
35
35
|
|
|
36
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
36
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
37
37
|
|
|
38
38
|
/**
|
|
39
39
|
*/
|
package/lib/utils/fetch/xhr.js
CHANGED
|
@@ -45,9 +45,9 @@ var _Cache = _interopRequireDefault(require("../browser/Cache"));
|
|
|
45
45
|
|
|
46
46
|
var _Constants = require("../../constants/Constants");
|
|
47
47
|
|
|
48
|
-
function ownKeys(object, enumerableOnly) { var keys = _Object$keys2(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object);
|
|
48
|
+
function ownKeys(object, enumerableOnly) { var keys = _Object$keys2(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
49
49
|
|
|
50
|
-
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]
|
|
50
|
+
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? Object.defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
|
|
51
51
|
|
|
52
52
|
var NETWORK_ERROR_CODE = 0;
|
|
53
53
|
var SUCCESS_CODE = 200;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@beinformed/ui",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.0",
|
|
4
4
|
"description": "Toolbox for be informed javascript layouts",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
6
6
|
"bugs": "http://support.beinformed.com",
|
|
@@ -78,9 +78,9 @@
|
|
|
78
78
|
"styled-components": "^5.2.0"
|
|
79
79
|
},
|
|
80
80
|
"dependencies": {
|
|
81
|
-
"@babel/runtime-corejs3": "^7.
|
|
81
|
+
"@babel/runtime-corejs3": "^7.16.5",
|
|
82
82
|
"big.js": "^6.1.1",
|
|
83
|
-
"date-fns": "^2.
|
|
83
|
+
"date-fns": "^2.27.0",
|
|
84
84
|
"deepmerge": "^4.2.2",
|
|
85
85
|
"dequal": "^2.0.2",
|
|
86
86
|
"element-closest": "^3.0.2",
|
|
@@ -90,23 +90,23 @@
|
|
|
90
90
|
"he": "^1.2.0",
|
|
91
91
|
"iban": "^0.0.14",
|
|
92
92
|
"lodash": "^4.17.21",
|
|
93
|
-
"reselect": "^4.
|
|
93
|
+
"reselect": "^4.1.5",
|
|
94
94
|
"setimmediate": "^1.0.5"
|
|
95
95
|
},
|
|
96
96
|
"devDependencies": {
|
|
97
|
-
"@babel/cli": "^7.
|
|
98
|
-
"@babel/core": "^7.
|
|
99
|
-
"@babel/eslint-parser": "^7.
|
|
100
|
-
"@babel/eslint-plugin": "^7.
|
|
97
|
+
"@babel/cli": "^7.16.0",
|
|
98
|
+
"@babel/core": "^7.16.5",
|
|
99
|
+
"@babel/eslint-parser": "^7.16.5",
|
|
100
|
+
"@babel/eslint-plugin": "^7.16.5",
|
|
101
101
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
|
102
|
-
"@babel/plugin-transform-runtime": "^7.
|
|
103
|
-
"@babel/preset-env": "^7.
|
|
104
|
-
"@babel/preset-flow": "^7.
|
|
105
|
-
"@babel/preset-react": "^7.
|
|
106
|
-
"@commitlint/cli": "^
|
|
107
|
-
"@commitlint/config-conventional": "^
|
|
102
|
+
"@babel/plugin-transform-runtime": "^7.16.5",
|
|
103
|
+
"@babel/preset-env": "^7.16.5",
|
|
104
|
+
"@babel/preset-flow": "^7.16.5",
|
|
105
|
+
"@babel/preset-react": "^7.16.5",
|
|
106
|
+
"@commitlint/cli": "^15.0.0",
|
|
107
|
+
"@commitlint/config-conventional": "^15.0.0",
|
|
108
108
|
"@testing-library/react-hooks": "^7.0.2",
|
|
109
|
-
"babel-jest": "^27.
|
|
109
|
+
"babel-jest": "^27.4.5",
|
|
110
110
|
"babel-plugin-styled-components": "^1.13.3",
|
|
111
111
|
"cherry-pick": "^0.5.0",
|
|
112
112
|
"cross-env": "^7.0.3",
|
|
@@ -115,33 +115,33 @@
|
|
|
115
115
|
"eslint-config-prettier": "^8.3.0",
|
|
116
116
|
"eslint-plugin-babel": "^5.3.1",
|
|
117
117
|
"eslint-plugin-flowtype": "^6.1.1",
|
|
118
|
-
"eslint-plugin-import": "^2.25.
|
|
119
|
-
"eslint-plugin-jest": "^25.
|
|
120
|
-
"eslint-plugin-jsdoc": "^37.
|
|
121
|
-
"eslint-plugin-react": "^7.
|
|
122
|
-
"eslint-plugin-react-hooks": "^4.
|
|
118
|
+
"eslint-plugin-import": "^2.25.3",
|
|
119
|
+
"eslint-plugin-jest": "^25.3.0",
|
|
120
|
+
"eslint-plugin-jsdoc": "^37.2.2",
|
|
121
|
+
"eslint-plugin-react": "^7.27.1",
|
|
122
|
+
"eslint-plugin-react-hooks": "^4.3.0",
|
|
123
123
|
"flow-bin": "0.152.0",
|
|
124
124
|
"flow-copy-source": "^2.0.9",
|
|
125
|
-
"flow-typed": "^3.
|
|
125
|
+
"flow-typed": "^3.5.0",
|
|
126
126
|
"glob": "^7.2.0",
|
|
127
127
|
"history": "^4.0.0",
|
|
128
128
|
"husky": "^7.0.4",
|
|
129
|
-
"jest": "^27.
|
|
129
|
+
"jest": "^27.4.5",
|
|
130
130
|
"jest-junit": "^13.0.0",
|
|
131
131
|
"jest-sonar-reporter": "^2.0.0",
|
|
132
132
|
"jscodeshift": "^0.13.0",
|
|
133
|
-
"lint-staged": "^
|
|
133
|
+
"lint-staged": "^12.1.2",
|
|
134
134
|
"polished": "^4.1.3",
|
|
135
|
-
"prettier": "^2.
|
|
135
|
+
"prettier": "^2.5.1",
|
|
136
136
|
"react": "^17.0.2",
|
|
137
137
|
"react-dom": "^17.0.2",
|
|
138
|
-
"react-helmet-async": "^1.
|
|
139
|
-
"react-redux": "^7.2.
|
|
138
|
+
"react-helmet-async": "^1.2.2",
|
|
139
|
+
"react-redux": "^7.2.6",
|
|
140
140
|
"react-router-dom": "^5.3.0",
|
|
141
141
|
"react-test-renderer": "^17.0.2",
|
|
142
|
-
"redux": "^4.1.
|
|
142
|
+
"redux": "^4.1.2",
|
|
143
143
|
"redux-mock-store": "^1.5.4",
|
|
144
|
-
"redux-thunk": "^2.
|
|
144
|
+
"redux-thunk": "^2.4.1",
|
|
145
145
|
"rimraf": "^3.0.2",
|
|
146
146
|
"standard-version": "^9.3.2",
|
|
147
147
|
"styled-components": "^5.3.3",
|
package/src/i18n/Locale.js
CHANGED
|
@@ -15,6 +15,7 @@ class Locale {
|
|
|
15
15
|
_code: string;
|
|
16
16
|
_messages: { [string]: string };
|
|
17
17
|
_errors: { [string]: string };
|
|
18
|
+
_nativeName: ?string;
|
|
18
19
|
|
|
19
20
|
constructor(locale: LocaleConfiguration) {
|
|
20
21
|
this._code = locale.code;
|
|
@@ -22,6 +23,8 @@ class Locale {
|
|
|
22
23
|
this._messages = this.fixPlaceHoldersInObject(locale.messages);
|
|
23
24
|
this._errors = this.fixPlaceHoldersInObject(locale.errors);
|
|
24
25
|
|
|
26
|
+
this._nativeName = locale.nativeName;
|
|
27
|
+
|
|
25
28
|
formatMessage.setup({
|
|
26
29
|
missingTranslation: "ignore",
|
|
27
30
|
});
|
|
@@ -38,6 +41,10 @@ class Locale {
|
|
|
38
41
|
* Retrieve nativeName
|
|
39
42
|
*/
|
|
40
43
|
get nativeName(): string {
|
|
44
|
+
if (this._nativeName) {
|
|
45
|
+
return this._nativeName;
|
|
46
|
+
}
|
|
47
|
+
|
|
41
48
|
const aLocale = this.code.split("-");
|
|
42
49
|
|
|
43
50
|
if (aLocale.length > 0) {
|
|
@@ -39,6 +39,20 @@ describe("locale", () => {
|
|
|
39
39
|
expect(locale.getMessage("testMessage")).toBe("Updated message");
|
|
40
40
|
});
|
|
41
41
|
|
|
42
|
+
it("can handle languages without iso-639-2 code", () => {
|
|
43
|
+
const locale = new Locale({
|
|
44
|
+
code: "pap",
|
|
45
|
+
nativeName: "Papiamento",
|
|
46
|
+
messages: {
|
|
47
|
+
descr: "Papiamento",
|
|
48
|
+
},
|
|
49
|
+
errors: {},
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
expect(locale.code).toBe("pap");
|
|
53
|
+
expect(locale.nativeName).toBe("Papiamento");
|
|
54
|
+
});
|
|
55
|
+
|
|
42
56
|
it("throws on non exising locale", () => {
|
|
43
57
|
const locale = new Locale({
|
|
44
58
|
code: "NONEXISTING",
|
package/src/i18n/languages.js
CHANGED
package/src/i18n/types.js
CHANGED
|
@@ -3,15 +3,19 @@ import { retrieveText } from "../../utils/helpers/text";
|
|
|
3
3
|
import { hasAllContentInData } from "../../constants/Settings";
|
|
4
4
|
import SectionModel from "../content/SectionModel";
|
|
5
5
|
|
|
6
|
+
import LayoutHintCollection from "../layouthint/LayoutHintCollection";
|
|
7
|
+
import { isPlainObject } from "../../utils";
|
|
8
|
+
|
|
6
9
|
import type {
|
|
7
10
|
ContentData,
|
|
11
|
+
ContentElementMapped,
|
|
8
12
|
PropertyData,
|
|
13
|
+
PropertyElementMapped,
|
|
9
14
|
TextFragmentData,
|
|
15
|
+
TextFragmentElementMapped,
|
|
10
16
|
ContentAll,
|
|
11
17
|
} from "../types";
|
|
12
18
|
import type SubSectionModel from "../content/SubSectionModel";
|
|
13
|
-
import LayoutHintCollection from "../layouthint/LayoutHintCollection";
|
|
14
|
-
import { isPlainObject } from "../../utils";
|
|
15
19
|
|
|
16
20
|
class AttributeContent {
|
|
17
21
|
_content: ?ContentData;
|
|
@@ -116,51 +120,84 @@ class AttributeContent {
|
|
|
116
120
|
|
|
117
121
|
/**
|
|
118
122
|
*/
|
|
119
|
-
getContentElements<T>(elementName: string
|
|
120
|
-
return
|
|
121
|
-
|
|
123
|
+
getContentElements<T>(elementName: string): Array<T> {
|
|
124
|
+
// $FlowIssue incompatible-return
|
|
125
|
+
return this.elements.filter((element) => elementName in element);
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
/**
|
|
129
|
+
*/
|
|
130
|
+
getContentElementCollections<T>(
|
|
131
|
+
elementName: string,
|
|
132
|
+
collectionName: string
|
|
133
|
+
): Array<T> {
|
|
134
|
+
return this.getContentElements(elementName)
|
|
122
135
|
.map((element) => element[elementName][collectionName])
|
|
123
136
|
.flat();
|
|
124
137
|
}
|
|
125
138
|
|
|
139
|
+
/**
|
|
140
|
+
*/
|
|
141
|
+
getContentElementCollectionByLabels<T, U>(
|
|
142
|
+
elementName: string,
|
|
143
|
+
collectionName: string,
|
|
144
|
+
labels: Array<string>
|
|
145
|
+
): Array<U> {
|
|
146
|
+
return (
|
|
147
|
+
this.getContentElements<T>(elementName)
|
|
148
|
+
// $FlowIssue incompatible-use
|
|
149
|
+
.filter((element) => labels.includes(element[elementName].label))
|
|
150
|
+
// $FlowIssue incompatible-use
|
|
151
|
+
.map((element) => element[elementName][collectionName])
|
|
152
|
+
.flat()
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
126
156
|
/**
|
|
127
157
|
*/
|
|
128
158
|
get properties(): Array<PropertyData> {
|
|
129
|
-
return this.
|
|
159
|
+
return this.getContentElementCollections<PropertyData>(
|
|
130
160
|
"propertyElement",
|
|
131
161
|
"properties"
|
|
132
162
|
);
|
|
133
163
|
}
|
|
134
164
|
|
|
135
165
|
/**
|
|
136
|
-
* Get concept properties by
|
|
166
|
+
* Get concept properties by property element label
|
|
137
167
|
*/
|
|
138
|
-
|
|
139
|
-
return this.
|
|
168
|
+
getConceptPropertiesByLabels(labels: Array<string>): Array<PropertyData> {
|
|
169
|
+
return this.getContentElementCollectionByLabels<
|
|
170
|
+
PropertyElementMapped,
|
|
171
|
+
PropertyData
|
|
172
|
+
>("propertyElement", "properties", labels);
|
|
140
173
|
}
|
|
141
174
|
|
|
142
175
|
/**
|
|
143
176
|
*/
|
|
144
177
|
get textfragments(): Array<TextFragmentData> {
|
|
145
|
-
return this.
|
|
178
|
+
return this.getContentElementCollections<TextFragmentData>(
|
|
146
179
|
"textFragmentElement",
|
|
147
180
|
"textfragments"
|
|
148
181
|
);
|
|
149
182
|
}
|
|
150
183
|
|
|
151
184
|
/**
|
|
152
|
-
* Get concept text fragments by
|
|
185
|
+
* Get concept text fragments by text fragment element label
|
|
153
186
|
*/
|
|
154
|
-
|
|
155
|
-
return this.
|
|
156
|
-
|
|
157
|
-
|
|
187
|
+
getTextFragmentsByLabels(labels: Array<string>): Array<TextFragmentData> {
|
|
188
|
+
return this.getContentElementCollectionByLabels<
|
|
189
|
+
TextFragmentElementMapped,
|
|
190
|
+
TextFragmentData
|
|
191
|
+
>("textFragmentElement", "textfragments", labels);
|
|
158
192
|
}
|
|
159
193
|
|
|
160
194
|
/**
|
|
161
195
|
*/
|
|
162
196
|
get sections(): Array<SectionModel> {
|
|
163
|
-
return this.
|
|
197
|
+
return this.getContentElementCollections<SectionModel>(
|
|
198
|
+
"contentElement",
|
|
199
|
+
"sections"
|
|
200
|
+
);
|
|
164
201
|
}
|
|
165
202
|
|
|
166
203
|
/**
|
|
@@ -169,6 +206,16 @@ class AttributeContent {
|
|
|
169
206
|
return this.sections.filter((section) => types.includes(section.type));
|
|
170
207
|
}
|
|
171
208
|
|
|
209
|
+
/**
|
|
210
|
+
* Get concept text fragments by text fragment element label
|
|
211
|
+
*/
|
|
212
|
+
getSectionsByLabels(labels: Array<string>): Array<SectionModel> {
|
|
213
|
+
return this.getContentElementCollectionByLabels<
|
|
214
|
+
ContentElementMapped,
|
|
215
|
+
SectionModel
|
|
216
|
+
>("contentElement", "sections", labels);
|
|
217
|
+
}
|
|
218
|
+
|
|
172
219
|
/**
|
|
173
220
|
*/
|
|
174
221
|
getReferredSections(): Array<SectionModel | SubSectionModel> {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
// @flow
|
|
2
2
|
import { has } from "../../utils/helpers/objects";
|
|
3
3
|
|
|
4
|
-
import
|
|
4
|
+
import AttributeModel from "./AttributeModel";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Helptext attribute
|
|
8
8
|
*/
|
|
9
|
-
export default class HelptextAttributeModel extends
|
|
9
|
+
export default class HelptextAttributeModel extends AttributeModel {
|
|
10
10
|
/**
|
|
11
11
|
*/
|
|
12
12
|
static isApplicableModel(contributions: Object): boolean {
|
|
@@ -26,9 +26,9 @@ export default class HelptextAttributeModel extends LabelAttributeModel {
|
|
|
26
26
|
* Get helptext text
|
|
27
27
|
*/
|
|
28
28
|
get text(): string | null {
|
|
29
|
-
const
|
|
30
|
-
if (
|
|
31
|
-
return
|
|
29
|
+
const dataContent = this.getData("content");
|
|
30
|
+
if (dataContent?.text) {
|
|
31
|
+
return dataContent.text.message;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
const contributionText = this.getContribution("text");
|
|
@@ -38,4 +38,17 @@ export default class HelptextAttributeModel extends LabelAttributeModel {
|
|
|
38
38
|
|
|
39
39
|
return null;
|
|
40
40
|
}
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
*/
|
|
44
|
+
// eslint-disable-next-line no-unused-vars
|
|
45
|
+
update(value: string): HelptextAttributeModel {
|
|
46
|
+
return this;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
*/
|
|
51
|
+
getFormData(): null {
|
|
52
|
+
return null;
|
|
53
|
+
}
|
|
41
54
|
}
|
|
@@ -215,6 +215,15 @@
|
|
|
215
215
|
"readonly": true
|
|
216
216
|
}
|
|
217
217
|
},
|
|
218
|
+
{
|
|
219
|
+
"HelpText2": {
|
|
220
|
+
"label": "Help text 2",
|
|
221
|
+
"type": "string",
|
|
222
|
+
"mandatory": false,
|
|
223
|
+
"text": "<p>Tekst met placeholder, caseid: ${CASE.ID}</p>",
|
|
224
|
+
"readonly": true
|
|
225
|
+
}
|
|
226
|
+
},
|
|
218
227
|
{
|
|
219
228
|
"Label1": {
|
|
220
229
|
"label": "Label 1",
|
|
@@ -51,13 +51,22 @@
|
|
|
51
51
|
},
|
|
52
52
|
{
|
|
53
53
|
"elementid": "HelpText1",
|
|
54
|
+
"static": true
|
|
55
|
+
},
|
|
56
|
+
{
|
|
57
|
+
"elementid": "HelpText2",
|
|
54
58
|
"static": true,
|
|
55
|
-
"
|
|
59
|
+
"content": {
|
|
60
|
+
"id": "TextID",
|
|
61
|
+
"text": "<p>Tekst met placeholder, caseid: 12</p>",
|
|
62
|
+
"properties": {
|
|
63
|
+
"CASE.ID": 12
|
|
64
|
+
}
|
|
65
|
+
}
|
|
56
66
|
},
|
|
57
67
|
{
|
|
58
68
|
"elementid": "Label1",
|
|
59
|
-
"static": true
|
|
60
|
-
"value": "Label 1"
|
|
69
|
+
"static": true
|
|
61
70
|
},
|
|
62
71
|
{
|
|
63
72
|
"elementid": "Memo"
|
|
@@ -32,9 +32,9 @@ describe("attributeCollection", () => {
|
|
|
32
32
|
);
|
|
33
33
|
|
|
34
34
|
expect(attributeCollection).toBeInstanceOf(AttributeCollection);
|
|
35
|
-
expect(attributeCollection.size).toBe(
|
|
36
|
-
expect(attributeCollection).toHaveLength(
|
|
37
|
-
expect(attributeCollection.visible).toHaveLength(
|
|
35
|
+
expect(attributeCollection.size).toBe(32);
|
|
36
|
+
expect(attributeCollection).toHaveLength(32);
|
|
37
|
+
expect(attributeCollection.visible).toHaveLength(32);
|
|
38
38
|
expect(attributeCollection.hasAttributeByKey("Address")).toBeTruthy();
|
|
39
39
|
expect(
|
|
40
40
|
attributeCollection.getAttributesByLayoutHint("zipcode")
|
|
@@ -118,7 +118,7 @@ describe("attributeCollection", () => {
|
|
|
118
118
|
|
|
119
119
|
const attributeCollection = new AttributeCollection(data, contributions);
|
|
120
120
|
|
|
121
|
-
expect(attributeCollection).toHaveLength(
|
|
121
|
+
expect(attributeCollection).toHaveLength(32);
|
|
122
122
|
|
|
123
123
|
const contributions2 = [
|
|
124
124
|
{
|
|
@@ -13,10 +13,8 @@ const json = {
|
|
|
13
13
|
{
|
|
14
14
|
propertyElement: {
|
|
15
15
|
label: "Properties",
|
|
16
|
-
id: "properties",
|
|
17
16
|
properties: [
|
|
18
17
|
{
|
|
19
|
-
type: "Gemiddelde",
|
|
20
18
|
label: "Gemiddelde",
|
|
21
19
|
value: "80%",
|
|
22
20
|
},
|
|
@@ -26,10 +24,8 @@ const json = {
|
|
|
26
24
|
{
|
|
27
25
|
propertyElement: {
|
|
28
26
|
label: "Second Properties",
|
|
29
|
-
id: "secondProperties",
|
|
30
27
|
properties: [
|
|
31
28
|
{
|
|
32
|
-
type: "SecondGemiddelde",
|
|
33
29
|
label: "Second Gemiddelde",
|
|
34
30
|
value: "20%",
|
|
35
31
|
},
|
|
@@ -38,20 +34,15 @@ const json = {
|
|
|
38
34
|
},
|
|
39
35
|
{
|
|
40
36
|
textFragmentElement: {
|
|
41
|
-
label: "Description",
|
|
42
|
-
id: "Description",
|
|
37
|
+
label: "Description TextFragment",
|
|
43
38
|
textfragments: [
|
|
44
|
-
{
|
|
45
|
-
type: "Description",
|
|
46
|
-
label: "Description",
|
|
47
|
-
text: { message: "Dit is een text fragment" },
|
|
48
|
-
},
|
|
39
|
+
{ id: "Description", text: { message: "Dit is een text fragment" } },
|
|
49
40
|
],
|
|
50
41
|
},
|
|
51
42
|
},
|
|
52
43
|
{
|
|
53
44
|
contentElement: {
|
|
54
|
-
label: "Description",
|
|
45
|
+
label: "Description Content",
|
|
55
46
|
sections: [
|
|
56
47
|
{
|
|
57
48
|
id: "Alert",
|
|
@@ -160,26 +151,29 @@ describe("AttributeContent", () => {
|
|
|
160
151
|
expect(content.sections).toHaveLength(1);
|
|
161
152
|
|
|
162
153
|
const firstProperty = content.properties[0];
|
|
163
|
-
expect(firstProperty.type).toBe("Gemiddelde");
|
|
164
154
|
expect(firstProperty.label).toBe("Gemiddelde");
|
|
165
155
|
expect(firstProperty.value).toBe("80%");
|
|
166
156
|
|
|
167
157
|
const firstTextFragment = content.textfragments[0];
|
|
168
|
-
expect(firstTextFragment.type).toBe("Description");
|
|
169
|
-
expect(firstTextFragment.label).toBe("Description");
|
|
170
158
|
expect(firstTextFragment.text).toBe("Dit is een text fragment");
|
|
171
159
|
});
|
|
172
160
|
|
|
173
161
|
it("Can ask for elements by type", () => {
|
|
174
162
|
const content = new AttributeContent(json);
|
|
175
163
|
|
|
176
|
-
expect(content.
|
|
177
|
-
|
|
164
|
+
expect(content.getConceptPropertiesByLabels("not-existing")).toHaveLength(
|
|
165
|
+
0
|
|
166
|
+
);
|
|
167
|
+
expect(content.getTextFragmentsByLabels("not-existing")).toHaveLength(0);
|
|
178
168
|
expect(content.getSectionsByType("not-existing")).toHaveLength(0);
|
|
169
|
+
expect(content.getSectionsByLabels("not-existing")).toHaveLength(0);
|
|
179
170
|
|
|
180
|
-
expect(content.
|
|
181
|
-
expect(
|
|
171
|
+
expect(content.getConceptPropertiesByLabels("Properties")).toHaveLength(1);
|
|
172
|
+
expect(
|
|
173
|
+
content.getTextFragmentsByLabels("Description TextFragment")
|
|
174
|
+
).toHaveLength(1);
|
|
182
175
|
expect(content.getSectionsByType("Reference")).toHaveLength(1);
|
|
176
|
+
expect(content.getSectionsByLabels("Description Content")).toHaveLength(1);
|
|
183
177
|
});
|
|
184
178
|
|
|
185
179
|
it("Creates ContentModel when sections available", () => {
|
|
@@ -9,7 +9,14 @@ describe("helptextAttributeModel", () => {
|
|
|
9
9
|
expect(attribute.text).toBeNull();
|
|
10
10
|
|
|
11
11
|
const attributeWithText = new HelptextAttributeModel(
|
|
12
|
-
{
|
|
12
|
+
{
|
|
13
|
+
key: "CarDetails",
|
|
14
|
+
content: null,
|
|
15
|
+
static: true,
|
|
16
|
+
dynamicschemaId: "CarDetails",
|
|
17
|
+
isResult: false,
|
|
18
|
+
children: [],
|
|
19
|
+
},
|
|
13
20
|
{ text: "Example helptext text" }
|
|
14
21
|
);
|
|
15
22
|
|
|
@@ -20,21 +27,22 @@ describe("helptextAttributeModel", () => {
|
|
|
20
27
|
const attributeWithText = new HelptextAttributeModel(
|
|
21
28
|
{
|
|
22
29
|
key: "CarDetails",
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
30
|
+
content: {
|
|
31
|
+
text: {
|
|
32
|
+
id: "CarDetails.text",
|
|
33
|
+
properties: {
|
|
34
|
+
PersonPrivateCar: "Ferrari GTO",
|
|
35
|
+
PersonLessFavoriteCars: "Mercedes",
|
|
36
|
+
PersonFavoriteCars: "BMW 5 Series, Fiat Panda",
|
|
37
|
+
},
|
|
38
|
+
message:
|
|
39
|
+
"<p>Currently the person drives in a Ferrari GTO, although his favorite cars are BMW 5 Series, Fiat Panda. Less favorite cars of the person are Mercedes.</p>",
|
|
29
40
|
},
|
|
30
|
-
message:
|
|
31
|
-
"<p>Currently the person drives in a Ferrari GTO, although his favorite cars are BMW 5 Series, Fiat Panda. Less favorite cars of the person are Mercedes.</p>",
|
|
32
41
|
},
|
|
33
42
|
static: true,
|
|
34
43
|
dynamicschemaId: "CarDetails",
|
|
35
44
|
isResult: false,
|
|
36
45
|
children: [],
|
|
37
|
-
content: null,
|
|
38
46
|
},
|
|
39
47
|
{
|
|
40
48
|
type: "string",
|
|
@@ -100,8 +100,8 @@ export default class CaseViewModel extends DetailModel {
|
|
|
100
100
|
* Getting the introduction text configured on the case view
|
|
101
101
|
*/
|
|
102
102
|
get introtext(): string {
|
|
103
|
-
if (this.data.
|
|
104
|
-
return this.data.
|
|
103
|
+
if (this.data._content) {
|
|
104
|
+
return this.data._content.text.message;
|
|
105
105
|
}
|
|
106
106
|
|
|
107
107
|
if (this.contributions.text) {
|