orc-shared 5.7.0-dev.8 → 5.7.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/dist/actions/makeApiAction.js +2 -2
- package/dist/actions/makeOrcApiAction.js +2 -2
- package/dist/actions/metadata.js +2 -2
- package/dist/actions/navigation.js +2 -2
- package/dist/actions/requestsApi.js +743 -140
- package/dist/actions/scopes.js +25 -1
- package/dist/buildStore.js +4 -2
- package/dist/components/AppFrame/About.js +2 -2
- package/dist/components/AppFrame/Preferences.js +2 -3
- package/dist/components/Form/FieldList.js +5 -6
- package/dist/components/Form/Inputs/Text.js +0 -1
- package/dist/components/Form/Inputs/Translation.js +2 -2
- package/dist/components/List/enhanceColumnDefs.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/Modal.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/Notification.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/NotificationProps.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/ActionModal.js +2 -0
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/InformationItem.js +18 -11
- package/dist/components/MaterialUI/DataDisplay/PredefinedElements/Translations.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/TableProps.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/TransferList.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/chipProps.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/collapsableListProps.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/dividerProps.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/modalProps.js +2 -2
- package/dist/components/MaterialUI/DataDisplay/useTableSelection.js +2 -2
- package/dist/components/MaterialUI/Inputs/Autocomplete.js +2 -2
- package/dist/components/MaterialUI/Inputs/AutocompleteProps.js +2 -2
- package/dist/components/MaterialUI/Inputs/Checkbox.js +2 -2
- package/dist/components/MaterialUI/Inputs/CheckboxGroup.js +12 -6
- package/dist/components/MaterialUI/Inputs/CheckboxGroupProps.js +5 -3
- package/dist/components/MaterialUI/Inputs/CheckboxProps.js +2 -2
- package/dist/components/MaterialUI/Inputs/DatePicker.js +2 -2
- package/dist/components/MaterialUI/Inputs/InputBase.js +8 -3
- package/dist/components/MaterialUI/Inputs/InputBaseProps.js +2 -2
- package/dist/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js +15 -8
- package/dist/components/MaterialUI/Inputs/RadioProps.js +2 -2
- package/dist/components/MaterialUI/Inputs/Select.js +2 -2
- package/dist/components/MaterialUI/Inputs/SelectProps.js +2 -2
- package/dist/components/MaterialUI/Inputs/StandaloneRadio.js +2 -2
- package/dist/components/MaterialUI/Inputs/Switch.js +2 -2
- package/dist/components/MaterialUI/Inputs/SwitchProps.js +2 -2
- package/dist/components/MaterialUI/Inputs/createInput.js +2 -2
- package/dist/components/MaterialUI/Inputs/standaloneRadioProps.js +2 -2
- package/dist/components/MaterialUI/Navigation/DropDownMenuProps.js +2 -2
- package/dist/components/MaterialUI/ScopeSelector/TreeItem.js +2 -3
- package/dist/components/MaterialUI/Surfaces/expansionPanelProps.js +2 -2
- package/dist/components/MaterialUI/Surfaces/paperProps.js +2 -2
- package/dist/components/MaterialUI/componentProps.js +2 -2
- package/dist/components/MaterialUI/hocs/withDeferredTooltip.js +1 -0
- package/dist/components/MaterialUI/muiThemes.js +2 -2
- package/dist/components/MaterialUI/textProps.js +2 -2
- package/dist/components/Navigation/Bar.js +2 -2
- package/dist/components/Navigation/index.js +1 -0
- package/dist/components/Navigation/useNavigationState.js +2 -2
- package/dist/components/Provision.js +2 -1
- package/dist/components/Routing/SegmentPage.js +1 -1
- package/dist/components/Routing/withWaypointing.js +2 -2
- package/dist/components/Scope/index.js +2 -2
- package/dist/components/ScopeExtendedConfigurationLoader.js +83 -0
- package/dist/components/Treeview/Node.js +2 -2
- package/dist/components/Treeview/index.js +2 -2
- package/dist/constants.js +11 -2
- package/dist/content/icons/orckestra-icon.svg +11 -5
- package/dist/getThemeOverrides.js +2 -2
- package/dist/hocs/withToggle.js +2 -2
- package/dist/hocs/withUpdateHandler.js +2 -2
- package/dist/hooks/useEditState.js +2 -2
- package/dist/hooks/useEntityLoader.js +2 -2
- package/dist/hooks/useFullEntityEditState.js +2 -2
- package/dist/hooks/useLabelMessage.js +2 -2
- package/dist/hooks/useMultipleFieldEditState.js +2 -2
- package/dist/hooks/useNotificationRequestState.js +2 -2
- package/dist/reducers/scopesExtendedConfiguration.js +68 -0
- package/dist/selectors/metadata.js +2 -2
- package/dist/selectors/modules.js +2 -2
- package/dist/selectors/scopeExtendedConfiguration.js +56 -0
- package/dist/utils/flatten.js +2 -2
- package/dist/utils/modelValidationHelper.js +2 -2
- package/dist/utils/propertyBagHelper.js +3 -0
- package/dist/utils/stripKey.js +2 -2
- package/package.json +2 -5
- package/src/actions/requestsApi.js +511 -89
- package/src/actions/scopes.js +25 -1
- package/src/actions/scopes.test.js +34 -0
- package/src/buildStore.js +2 -0
- package/src/components/MaterialUI/DataDisplay/PredefinedElements/ActionModal.js +2 -1
- package/src/components/MaterialUI/DataDisplay/PredefinedElements/ActionModal.test.js +74 -5
- package/src/components/MaterialUI/DataDisplay/PredefinedElements/InformationItem.js +31 -9
- package/src/components/MaterialUI/DataDisplay/PredefinedElements/InformationItem.test.js +47 -6
- package/src/components/MaterialUI/Inputs/CheckboxGroup.js +5 -4
- package/src/components/MaterialUI/Inputs/CheckboxGroup.test.js +22 -0
- package/src/components/MaterialUI/Inputs/CheckboxGroupProps.js +2 -0
- package/src/components/MaterialUI/Inputs/CheckboxGroupProps.test.js +2 -2
- package/src/components/MaterialUI/Inputs/InputBase.js +8 -5
- package/src/components/MaterialUI/Inputs/InputBase.test.js +160 -110
- package/src/components/MaterialUI/Inputs/PredefinedElements/SearchControl.js +13 -6
- package/src/components/MaterialUI/Inputs/PredefinedElements/SearchControl.test.js +57 -0
- package/src/components/Provision.js +2 -0
- package/src/components/Provision.test.js +7 -0
- package/src/components/Routing/SegmentPage.js +1 -0
- package/src/components/ScopeExtendedConfigurationLoader.js +22 -0
- package/src/components/ScopeExtendedConfigurationLoader.test.js +71 -0
- package/src/constants.js +8 -0
- package/src/content/icons/orckestra-icon.svg +11 -5
- package/src/reducers/scopesExtendedConfiguration.js +16 -0
- package/src/reducers/scopesExtendedConfiguration.test.js +31 -0
- package/src/selectors/scopeExtendedConfiguration.js +9 -0
- package/src/selectors/scopeExtendedConfiguration.test.js +45 -0
- package/src/utils/propertyBagHelper.js +3 -0
- package/src/utils/propertyBagHelper.test.js +7 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import Immutable from "immutable";
|
|
2
|
+
import { doesScopeHaveGeolocationProviderSelector } from "./scopeExtendedConfiguration";
|
|
3
|
+
|
|
4
|
+
let state;
|
|
5
|
+
beforeEach(() => {
|
|
6
|
+
state = Immutable.fromJS({
|
|
7
|
+
navigation: {
|
|
8
|
+
route: { location: {}, match: { params: { scope: "SecondChild" } } },
|
|
9
|
+
},
|
|
10
|
+
locale: {
|
|
11
|
+
locale: "fr",
|
|
12
|
+
supportedLocales: ["en", "fr"],
|
|
13
|
+
},
|
|
14
|
+
scopesExtendedConfiguration: {
|
|
15
|
+
theScope: { hasGeolocationProvider: true },
|
|
16
|
+
},
|
|
17
|
+
settings: {
|
|
18
|
+
defaultScope: "FirstChild",
|
|
19
|
+
},
|
|
20
|
+
});
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
describe("doesScopeHaveGeolocationProviderSelector", () => {
|
|
24
|
+
it("gets an unknown scope", () =>
|
|
25
|
+
expect(
|
|
26
|
+
doesScopeHaveGeolocationProviderSelector,
|
|
27
|
+
"when called with",
|
|
28
|
+
["Unknown"],
|
|
29
|
+
"called with",
|
|
30
|
+
[state],
|
|
31
|
+
"to be",
|
|
32
|
+
false,
|
|
33
|
+
));
|
|
34
|
+
|
|
35
|
+
it("gets a known scope", () =>
|
|
36
|
+
expect(
|
|
37
|
+
doesScopeHaveGeolocationProviderSelector,
|
|
38
|
+
"when called with",
|
|
39
|
+
["theScope"],
|
|
40
|
+
"called with",
|
|
41
|
+
[state],
|
|
42
|
+
"to be",
|
|
43
|
+
true,
|
|
44
|
+
));
|
|
45
|
+
});
|
|
@@ -49,7 +49,10 @@ export const toJsonCargo = (attribute, value) => {
|
|
|
49
49
|
switch (attribute.dataType) {
|
|
50
50
|
case attributeDataType.text:
|
|
51
51
|
case attributeDataType.lookup:
|
|
52
|
+
case attributeDataType.singleChoice:
|
|
52
53
|
return value;
|
|
54
|
+
case attributeDataType.multipleChoice:
|
|
55
|
+
return createJsonCargo(jsonCargoType.stringArray, value);
|
|
53
56
|
|
|
54
57
|
case attributeDataType.boolean:
|
|
55
58
|
return createJsonCargo(jsonCargoType.boolean, value);
|
|
@@ -123,6 +123,13 @@ describe("toJsonCargo function", () => {
|
|
|
123
123
|
tiers: [{ min: "2", rate: "2" }],
|
|
124
124
|
},
|
|
125
125
|
],
|
|
126
|
+
["aRadioValue", attributeDataType.singleChoice, null, "aRadioValue"],
|
|
127
|
+
[
|
|
128
|
+
["aCheckboxValue1", "aCheckboxValue1"],
|
|
129
|
+
attributeDataType.multipleChoice,
|
|
130
|
+
null,
|
|
131
|
+
{ __type: "ValueOfString[]", value: ["aCheckboxValue1", "aCheckboxValue1"] },
|
|
132
|
+
],
|
|
126
133
|
])("should return the proper json cargo with %s of type %s", (value, dataType, customType, expectedCargo) => {
|
|
127
134
|
const attribute = {
|
|
128
135
|
dataType: dataType,
|