@reltio/components 1.4.2158 → 1.4.2160
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/AddressAutocompleteEditor/AddressAutocompleteEditor.d.ts +10 -0
- package/AddressAutocompleteEditor/AddressAutocompleteEditor.js +223 -0
- package/AddressAutocompleteEditor/AddressAutocompleteEditor.module.css.js +9 -0
- package/AddressAutocompleteEditor/AddressAutocompleteEditor.test.d.ts +1 -0
- package/AddressAutocompleteEditor/AddressAutocompleteEditor.test.js +522 -0
- package/AddressAutocompleteEditor/helpers.d.ts +10 -0
- package/AddressAutocompleteEditor/helpers.js +18 -0
- package/AddressAutocompleteEditor/index.d.ts +1 -0
- package/AddressAutocompleteEditor/index.js +1 -0
- package/BasicAttributeSelector/BasicAttributeSelector.d.ts +1 -1
- package/BasicAttributeSelector/BasicAttributeSelector.js +2 -2
- package/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.js +1 -1
- package/EditorsFactory/EditorsFactory.js +4 -0
- package/ReferenceAttributeEditor/ReferenceAttributeEditor.js +5 -3
- package/RelationEditor/RelationEditor.js +6 -4
- package/SelectionPopup/SelectionPopup.d.ts +2 -1
- package/SelectionPopup/SelectionPopup.js +11 -9
- package/SelectionPopup/SelectionPopup.module.css.js +9 -0
- package/SimpleAttributeEditor/SimpleAttributeEditor.d.ts +1 -0
- package/SimpleAttributeEditor/SimpleAttributeEditor.js +15 -4
- package/cjs/AddressAutocompleteEditor/AddressAutocompleteEditor.d.ts +10 -0
- package/cjs/AddressAutocompleteEditor/AddressAutocompleteEditor.js +253 -0
- package/cjs/AddressAutocompleteEditor/AddressAutocompleteEditor.module.css.js +9 -0
- package/cjs/AddressAutocompleteEditor/AddressAutocompleteEditor.test.d.ts +1 -0
- package/cjs/AddressAutocompleteEditor/AddressAutocompleteEditor.test.js +527 -0
- package/cjs/AddressAutocompleteEditor/helpers.d.ts +10 -0
- package/cjs/AddressAutocompleteEditor/helpers.js +24 -0
- package/cjs/AddressAutocompleteEditor/index.d.ts +1 -0
- package/cjs/AddressAutocompleteEditor/index.js +5 -0
- package/cjs/BasicAttributeSelector/BasicAttributeSelector.d.ts +1 -1
- package/cjs/BasicAttributeSelector/BasicAttributeSelector.js +2 -2
- package/cjs/EditModeAttributesPager/components/AttributeRenderer/AttributeRenderer.js +1 -1
- package/cjs/EditorsFactory/EditorsFactory.js +4 -0
- package/cjs/ReferenceAttributeEditor/ReferenceAttributeEditor.js +5 -3
- package/cjs/RelationEditor/RelationEditor.js +6 -4
- package/cjs/SelectionPopup/SelectionPopup.d.ts +2 -1
- package/cjs/SelectionPopup/SelectionPopup.js +13 -11
- package/cjs/SelectionPopup/SelectionPopup.module.css.js +9 -0
- package/cjs/SimpleAttributeEditor/SimpleAttributeEditor.d.ts +1 -0
- package/cjs/SimpleAttributeEditor/SimpleAttributeEditor.js +14 -3
- package/cjs/contexts/AttributeValueContext/index.d.ts +3 -0
- package/cjs/contexts/AttributeValueContext/index.js +9 -0
- package/cjs/contexts/AutoCompleteContext/helpers.d.ts +24 -0
- package/cjs/contexts/AutoCompleteContext/helpers.js +165 -0
- package/cjs/contexts/AutoCompleteContext/index.d.ts +12 -0
- package/cjs/contexts/AutoCompleteContext/index.js +83 -0
- package/cjs/types/index.d.ts +1 -0
- package/contexts/AttributeValueContext/index.d.ts +3 -0
- package/contexts/AttributeValueContext/index.js +3 -0
- package/contexts/AutoCompleteContext/helpers.d.ts +24 -0
- package/contexts/AutoCompleteContext/helpers.js +159 -0
- package/contexts/AutoCompleteContext/index.d.ts +12 -0
- package/contexts/AutoCompleteContext/index.js +56 -0
- package/package.json +2 -2
- package/types/index.d.ts +1 -0
- package/SelectionPopup/styles.d.ts +0 -6
- package/SelectionPopup/styles.js +0 -38
- package/cjs/SelectionPopup/styles.d.ts +0 -6
- package/cjs/SelectionPopup/styles.js +0 -41
|
@@ -0,0 +1,159 @@
|
|
|
1
|
+
var __assign = (this && this.__assign) || function () {
|
|
2
|
+
__assign = Object.assign || function(t) {
|
|
3
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
4
|
+
s = arguments[i];
|
|
5
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
6
|
+
t[p] = s[p];
|
|
7
|
+
}
|
|
8
|
+
return t;
|
|
9
|
+
};
|
|
10
|
+
return __assign.apply(this, arguments);
|
|
11
|
+
};
|
|
12
|
+
import { pluck } from 'ramda';
|
|
13
|
+
import { findAttributeTypeByUri, findAttributeValuesByTypeUri, isComplexAttribute, isOv, getParentUri, generateUri, InputCleanseAttributeType, areOneHierarchyUris, DataTypes, isNested } from '@reltio/mdm-sdk';
|
|
14
|
+
var MINIMUM_NESTED_LEVEL = 1;
|
|
15
|
+
var MIN_SEARCH_TEXT_LEN = 3;
|
|
16
|
+
var SEARCH_RESULTS_LIMIT = 10;
|
|
17
|
+
var COUNTRIES_DELIMETER = ';';
|
|
18
|
+
var genAttributeValueUri = function (_a) {
|
|
19
|
+
var _b;
|
|
20
|
+
var attributeType = _a.attributeType, parentValueUri = _a.parentValueUri, attributeTypeUri = _a.attributeTypeUri, modifiedEntity = _a.modifiedEntity, metadata = _a.metadata, existingValues = _a.existingValues, _c = _a.hasValues, hasValues = _c === void 0 ? true : _c;
|
|
21
|
+
var currentExistingValue = existingValues.find(function (_a) {
|
|
22
|
+
var uri = _a.uri;
|
|
23
|
+
return areOneHierarchyUris(uri, parentValueUri);
|
|
24
|
+
});
|
|
25
|
+
var hasExistingValues = Boolean(hasValues && currentExistingValue);
|
|
26
|
+
var currentLevelUri = hasExistingValues
|
|
27
|
+
? currentExistingValue.uri
|
|
28
|
+
: generateUri(parentValueUri, attributeType.name);
|
|
29
|
+
if (isNested(attributeType)) {
|
|
30
|
+
var subAttributes = attributeType.attributes;
|
|
31
|
+
if (subAttributes === null || subAttributes === void 0 ? void 0 : subAttributes.length) {
|
|
32
|
+
var subAttrubuteType = subAttributes.find(function (_a) {
|
|
33
|
+
var uri = _a.uri;
|
|
34
|
+
return areOneHierarchyUris(attributeTypeUri, uri);
|
|
35
|
+
});
|
|
36
|
+
if (subAttrubuteType) {
|
|
37
|
+
return genAttributeValueUri({
|
|
38
|
+
attributeType: subAttrubuteType,
|
|
39
|
+
parentValueUri: currentLevelUri,
|
|
40
|
+
attributeTypeUri: attributeTypeUri,
|
|
41
|
+
modifiedEntity: modifiedEntity,
|
|
42
|
+
metadata: metadata,
|
|
43
|
+
existingValues: ((_b = currentExistingValue === null || currentExistingValue === void 0 ? void 0 : currentExistingValue.value) === null || _b === void 0 ? void 0 : _b[subAttrubuteType.name]) || [],
|
|
44
|
+
hasValues: hasExistingValues
|
|
45
|
+
});
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return null;
|
|
49
|
+
}
|
|
50
|
+
return currentLevelUri;
|
|
51
|
+
};
|
|
52
|
+
var generateAttributeValueUri = function (_a) {
|
|
53
|
+
var attributeTypeUri = _a.attributeTypeUri, modifiedEntity = _a.modifiedEntity, triggerAttributeTypeUri = _a.triggerAttributeTypeUri, triggerAttributeValueUri = _a.triggerAttributeValueUri, metadata = _a.metadata;
|
|
54
|
+
var triggerAttributeNestedLevel = triggerAttributeTypeUri.split('/attributes/').length - 1;
|
|
55
|
+
var attributeTypeRootUri = attributeTypeUri
|
|
56
|
+
.split('/attributes/')
|
|
57
|
+
.slice(0, Math.max(triggerAttributeNestedLevel, MINIMUM_NESTED_LEVEL) + 1)
|
|
58
|
+
.join('/attributes/');
|
|
59
|
+
var triggerAttributeValueParentUri = getParentUri(triggerAttributeValueUri);
|
|
60
|
+
var rootAttributeType = findAttributeTypeByUri(metadata, attributeTypeRootUri, modifiedEntity.type);
|
|
61
|
+
var existingValues = findAttributeValuesByTypeUri(metadata, modifiedEntity, rootAttributeType.uri).filter(isOv);
|
|
62
|
+
return genAttributeValueUri({
|
|
63
|
+
attributeType: rootAttributeType,
|
|
64
|
+
parentValueUri: triggerAttributeValueParentUri,
|
|
65
|
+
attributeTypeUri: attributeTypeUri,
|
|
66
|
+
modifiedEntity: modifiedEntity,
|
|
67
|
+
existingValues: existingValues,
|
|
68
|
+
metadata: metadata
|
|
69
|
+
});
|
|
70
|
+
};
|
|
71
|
+
var getCountriesFromValues = function (_a) {
|
|
72
|
+
var _b;
|
|
73
|
+
var metadata = _a.metadata, modifiedEntity = _a.modifiedEntity, triggerAttributeValueUri = _a.triggerAttributeValueUri, triggerAttributeTypeUri = _a.triggerAttributeTypeUri, inputMapping = _a.inputMapping;
|
|
74
|
+
if (!triggerAttributeValueUri || !triggerAttributeTypeUri || !inputMapping || !modifiedEntity) {
|
|
75
|
+
return {};
|
|
76
|
+
}
|
|
77
|
+
var triggerAttributeValueParentUri = getParentUri(triggerAttributeValueUri);
|
|
78
|
+
var triggerAttributeTypeParentUri = getParentUri(triggerAttributeTypeUri);
|
|
79
|
+
var countriesMapping = (_b = inputMapping
|
|
80
|
+
.filter(function (_a) {
|
|
81
|
+
var cleanseAttribute = _a.cleanseAttribute;
|
|
82
|
+
return cleanseAttribute === InputCleanseAttributeType.Countries;
|
|
83
|
+
})
|
|
84
|
+
.filter(function (_a) {
|
|
85
|
+
var attribute = _a.attribute;
|
|
86
|
+
var attributeParentUri = getParentUri(attribute);
|
|
87
|
+
return areOneHierarchyUris(triggerAttributeTypeParentUri, attributeParentUri);
|
|
88
|
+
})
|
|
89
|
+
.sort(function (a, b) { return b.attribute.length - a.attribute.length; })) === null || _b === void 0 ? void 0 : _b[0];
|
|
90
|
+
var countryAttributeType = (countriesMapping === null || countriesMapping === void 0 ? void 0 : countriesMapping.attribute) &&
|
|
91
|
+
findAttributeTypeByUri(metadata, countriesMapping === null || countriesMapping === void 0 ? void 0 : countriesMapping.attribute, modifiedEntity.type);
|
|
92
|
+
if (countryAttributeType && !isComplexAttribute(countryAttributeType)) {
|
|
93
|
+
var existingCountriesValues = findAttributeValuesByTypeUri(metadata, modifiedEntity, countriesMapping.attribute);
|
|
94
|
+
var currentCountryValues = existingCountriesValues
|
|
95
|
+
.filter(isOv)
|
|
96
|
+
.filter(function (countryValue) {
|
|
97
|
+
return areOneHierarchyUris(triggerAttributeValueParentUri, getParentUri(countryValue.uri));
|
|
98
|
+
})
|
|
99
|
+
.filter(function (countryValue) { return countryValue.value; });
|
|
100
|
+
if (currentCountryValues === null || currentCountryValues === void 0 ? void 0 : currentCountryValues.length) {
|
|
101
|
+
var countries = currentCountryValues.map(function (value) { return value.lookupCode || value.value.toString(); });
|
|
102
|
+
return {
|
|
103
|
+
countries: countries,
|
|
104
|
+
countryNames: pluck('value', currentCountryValues)
|
|
105
|
+
};
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
};
|
|
109
|
+
export var getSettings = function (_a) {
|
|
110
|
+
var _b, _c;
|
|
111
|
+
var metadata = _a.metadata, modifiedEntity = _a.modifiedEntity, triggerAttributeValueUri = _a.triggerAttributeValueUri, triggerAttributeTypeUri = _a.triggerAttributeTypeUri, addressAutoCompleteConfig = _a.addressAutoCompleteConfig;
|
|
112
|
+
var _d = addressAutoCompleteConfig.inputMapping, inputMapping = _d === void 0 ? [] : _d, minSearchTextLen = addressAutoCompleteConfig.minSearchTextLen, providerOpts = addressAutoCompleteConfig.providerOpts;
|
|
113
|
+
return __assign({ minSearchTextLen: minSearchTextLen || MIN_SEARCH_TEXT_LEN, limit: (providerOpts === null || providerOpts === void 0 ? void 0 : providerOpts.limit) || SEARCH_RESULTS_LIMIT, countries: ((_b = providerOpts === null || providerOpts === void 0 ? void 0 : providerOpts.defaultCountries) === null || _b === void 0 ? void 0 : _b.split(COUNTRIES_DELIMETER)) || [], countryNames: ((_c = providerOpts === null || providerOpts === void 0 ? void 0 : providerOpts.defaultCountries) === null || _c === void 0 ? void 0 : _c.split(COUNTRIES_DELIMETER)) || [] }, getCountriesFromValues({
|
|
114
|
+
metadata: metadata,
|
|
115
|
+
modifiedEntity: modifiedEntity,
|
|
116
|
+
triggerAttributeValueUri: triggerAttributeValueUri,
|
|
117
|
+
triggerAttributeTypeUri: triggerAttributeTypeUri,
|
|
118
|
+
inputMapping: inputMapping
|
|
119
|
+
}));
|
|
120
|
+
};
|
|
121
|
+
export var isTriggerAttribute = function (attributeType, inputMapping) {
|
|
122
|
+
var allowedTypes = [DataTypes.TYPE_STRING, DataTypes.TYPE_TEXT, DataTypes.TYPE_BLOB];
|
|
123
|
+
return (allowedTypes.includes(attributeType.type) &&
|
|
124
|
+
inputMapping.some(function (_a) {
|
|
125
|
+
var attribute = _a.attribute, cleanseAttribute = _a.cleanseAttribute;
|
|
126
|
+
return attributeType.uri === attribute && cleanseAttribute === InputCleanseAttributeType.Text;
|
|
127
|
+
}));
|
|
128
|
+
};
|
|
129
|
+
export var modifyAttributes = function (_a) {
|
|
130
|
+
var outputMapping = _a.outputMapping, modifiedEntity = _a.modifiedEntity, metadata = _a.metadata, triggerAttributeTypeUri = _a.triggerAttributeTypeUri, triggerAttributeValueUri = _a.triggerAttributeValueUri, values = _a.values, modifyAttribute = _a.modifyAttribute;
|
|
131
|
+
var parentUri = getParentUri(triggerAttributeTypeUri);
|
|
132
|
+
outputMapping
|
|
133
|
+
.filter(function (_a) {
|
|
134
|
+
var attribute = _a.attribute;
|
|
135
|
+
return areOneHierarchyUris(attribute, parentUri);
|
|
136
|
+
})
|
|
137
|
+
.forEach(function (_a) {
|
|
138
|
+
var attributeTypeUri = _a.attribute, cleanseAttribute = _a.cleanseAttribute;
|
|
139
|
+
var value = values[cleanseAttribute] || '';
|
|
140
|
+
var attributeType = findAttributeTypeByUri(metadata, attributeTypeUri, modifiedEntity.type);
|
|
141
|
+
if (!attributeType) {
|
|
142
|
+
return;
|
|
143
|
+
}
|
|
144
|
+
var uri = generateAttributeValueUri({
|
|
145
|
+
attributeTypeUri: attributeTypeUri,
|
|
146
|
+
triggerAttributeTypeUri: triggerAttributeTypeUri,
|
|
147
|
+
triggerAttributeValueUri: triggerAttributeValueUri,
|
|
148
|
+
modifiedEntity: modifiedEntity,
|
|
149
|
+
metadata: metadata
|
|
150
|
+
});
|
|
151
|
+
if (uri) {
|
|
152
|
+
modifyAttribute({
|
|
153
|
+
value: value,
|
|
154
|
+
uri: uri,
|
|
155
|
+
attributeType: attributeType
|
|
156
|
+
});
|
|
157
|
+
}
|
|
158
|
+
});
|
|
159
|
+
};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AttributeType, AddressDetails } from '@reltio/mdm-sdk';
|
|
3
|
+
import { AutocompleteSettings } from './helpers';
|
|
4
|
+
export declare const AddressAutoCompleteContext: import("@fluentui/react-context-selector").Context<{
|
|
5
|
+
onPopulateAttributes: (triggerAttributeTypeUri: string, triggerAttributeValueUri: string, value: AddressDetails) => void;
|
|
6
|
+
isAutocompleteTriggerAttribute: (attributeType: AttributeType) => boolean;
|
|
7
|
+
getAutocompleteSettings: (triggerAttributeTypeUri: string, triggerAttributeValueUri: string) => AutocompleteSettings;
|
|
8
|
+
}>;
|
|
9
|
+
export declare const AddressAutoCompleteProvider: ({ children, entityUri }: {
|
|
10
|
+
children: React.ReactNode;
|
|
11
|
+
entityUri?: string;
|
|
12
|
+
}) => React.JSX.Element;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import React, { useCallback, useMemo } from 'react';
|
|
2
|
+
import { createContext } from '@fluentui/react-context-selector';
|
|
3
|
+
import { getEntityType } from '@reltio/mdm-sdk';
|
|
4
|
+
import { useMdmAction, useMdmEntityUri, useMdmMetadata, useMdmModifiedEntity } from '../MdmModuleContext';
|
|
5
|
+
import { getSettings, isTriggerAttribute, modifyAttributes } from './helpers';
|
|
6
|
+
export var AddressAutoCompleteContext = createContext(null);
|
|
7
|
+
export var AddressAutoCompleteProvider = function (_a) {
|
|
8
|
+
var children = _a.children, entityUri = _a.entityUri;
|
|
9
|
+
var metadata = useMdmMetadata();
|
|
10
|
+
var modifyAttribute = useMdmAction('modifyAttribute');
|
|
11
|
+
var mdmEntityUri = useMdmEntityUri();
|
|
12
|
+
var modifiedEntity = useMdmModifiedEntity(entityUri || mdmEntityUri) || {};
|
|
13
|
+
var addressAutoCompleteConfig = useMemo(function () {
|
|
14
|
+
var _a;
|
|
15
|
+
var entityType = (modifiedEntity === null || modifiedEntity === void 0 ? void 0 : modifiedEntity.type) && metadata && getEntityType(metadata, modifiedEntity.type);
|
|
16
|
+
return (((_a = entityType === null || entityType === void 0 ? void 0 : entityType.cleanseConfig) === null || _a === void 0 ? void 0 : _a.addressAutoCompleteConfig) ||
|
|
17
|
+
{ outputMapping: [], inputMapping: [] });
|
|
18
|
+
}, [modifiedEntity === null || modifiedEntity === void 0 ? void 0 : modifiedEntity.type, metadata]);
|
|
19
|
+
var onPopulateAttributes = useCallback(function (triggerAttributeTypeUri, triggerAttributeValueUri, values) {
|
|
20
|
+
if (!(addressAutoCompleteConfig === null || addressAutoCompleteConfig === void 0 ? void 0 : addressAutoCompleteConfig.outputMapping) ||
|
|
21
|
+
!(modifiedEntity === null || modifiedEntity === void 0 ? void 0 : modifiedEntity.uri) ||
|
|
22
|
+
!triggerAttributeTypeUri ||
|
|
23
|
+
!values) {
|
|
24
|
+
return;
|
|
25
|
+
}
|
|
26
|
+
var outputMapping = addressAutoCompleteConfig.outputMapping;
|
|
27
|
+
modifyAttributes({
|
|
28
|
+
outputMapping: outputMapping,
|
|
29
|
+
modifiedEntity: modifiedEntity,
|
|
30
|
+
metadata: metadata,
|
|
31
|
+
triggerAttributeTypeUri: triggerAttributeTypeUri,
|
|
32
|
+
triggerAttributeValueUri: triggerAttributeValueUri,
|
|
33
|
+
values: values,
|
|
34
|
+
modifyAttribute: modifyAttribute
|
|
35
|
+
});
|
|
36
|
+
}, [addressAutoCompleteConfig, modifiedEntity, metadata, modifyAttribute]);
|
|
37
|
+
var isAutocompleteTriggerAttribute = useCallback(function (attributeType) {
|
|
38
|
+
var _a = addressAutoCompleteConfig.inputMapping, inputMapping = _a === void 0 ? [] : _a;
|
|
39
|
+
return isTriggerAttribute(attributeType, inputMapping);
|
|
40
|
+
}, [addressAutoCompleteConfig]);
|
|
41
|
+
var getAutocompleteSettings = useCallback(function (triggerAttributeTypeUri, triggerAttributeValueUri) {
|
|
42
|
+
return getSettings({
|
|
43
|
+
metadata: metadata,
|
|
44
|
+
modifiedEntity: modifiedEntity,
|
|
45
|
+
triggerAttributeValueUri: triggerAttributeValueUri,
|
|
46
|
+
triggerAttributeTypeUri: triggerAttributeTypeUri,
|
|
47
|
+
addressAutoCompleteConfig: addressAutoCompleteConfig
|
|
48
|
+
});
|
|
49
|
+
}, [addressAutoCompleteConfig, metadata, modifiedEntity]);
|
|
50
|
+
var contextValue = useMemo(function () { return ({
|
|
51
|
+
onPopulateAttributes: onPopulateAttributes,
|
|
52
|
+
isAutocompleteTriggerAttribute: isAutocompleteTriggerAttribute,
|
|
53
|
+
getAutocompleteSettings: getAutocompleteSettings
|
|
54
|
+
}); }, [onPopulateAttributes, isAutocompleteTriggerAttribute, getAutocompleteSettings]);
|
|
55
|
+
return React.createElement(AddressAutoCompleteContext.Provider, { value: contextValue }, children);
|
|
56
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@reltio/components",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.2160",
|
|
4
4
|
"license": "SEE LICENSE IN LICENSE FILE",
|
|
5
5
|
"main": "./cjs/index.js",
|
|
6
6
|
"module": "./index.js",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"@fluentui/react-context-selector": "^9.1.26",
|
|
12
12
|
"@googlemaps/markerclusterer": "^2.5.3",
|
|
13
13
|
"@react-sigma/core": "3.4.0",
|
|
14
|
-
"@reltio/mdm-sdk": "^1.4.
|
|
14
|
+
"@reltio/mdm-sdk": "^1.4.1978",
|
|
15
15
|
"@vis.gl/react-google-maps": "^1.3.0",
|
|
16
16
|
"d3-cloud": "^1.2.5",
|
|
17
17
|
"d3-geo": "^2.0.1",
|
package/types/index.d.ts
CHANGED
package/SelectionPopup/styles.js
DELETED
|
@@ -1,38 +0,0 @@
|
|
|
1
|
-
import { makeStyles } from '@mui/styles';
|
|
2
|
-
var margin = '16px';
|
|
3
|
-
export var useStyles = makeStyles(function () { return ({
|
|
4
|
-
container: function (_a) {
|
|
5
|
-
var _b = _a.containerHeight, containerHeight = _b === void 0 ? 553 : _b, containerWidth = _a.containerWidth;
|
|
6
|
-
return {
|
|
7
|
-
display: 'flex',
|
|
8
|
-
flexDirection: 'column',
|
|
9
|
-
height: containerHeight,
|
|
10
|
-
width: containerWidth,
|
|
11
|
-
flexGrow: 1
|
|
12
|
-
};
|
|
13
|
-
},
|
|
14
|
-
header: {
|
|
15
|
-
marginLeft: margin,
|
|
16
|
-
marginTop: '16px',
|
|
17
|
-
marginBottom: '12px',
|
|
18
|
-
fontSize: '16px',
|
|
19
|
-
fontWeight: 500,
|
|
20
|
-
letterSpacing: '0.15px',
|
|
21
|
-
lineHeight: '24px'
|
|
22
|
-
},
|
|
23
|
-
searchInputContainer: {
|
|
24
|
-
margin: "0 ".concat(margin, " 12px ").concat(margin),
|
|
25
|
-
flexShrink: '0'
|
|
26
|
-
},
|
|
27
|
-
list: {
|
|
28
|
-
flexGrow: 1,
|
|
29
|
-
height: 0,
|
|
30
|
-
overflow: 'hidden',
|
|
31
|
-
width: '100%',
|
|
32
|
-
position: 'relative',
|
|
33
|
-
'& ul': {
|
|
34
|
-
paddingBottom: 0,
|
|
35
|
-
paddingTop: 0
|
|
36
|
-
}
|
|
37
|
-
}
|
|
38
|
-
}); });
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useStyles = void 0;
|
|
4
|
-
var styles_1 = require("@mui/styles");
|
|
5
|
-
var margin = '16px';
|
|
6
|
-
exports.useStyles = (0, styles_1.makeStyles)(function () { return ({
|
|
7
|
-
container: function (_a) {
|
|
8
|
-
var _b = _a.containerHeight, containerHeight = _b === void 0 ? 553 : _b, containerWidth = _a.containerWidth;
|
|
9
|
-
return {
|
|
10
|
-
display: 'flex',
|
|
11
|
-
flexDirection: 'column',
|
|
12
|
-
height: containerHeight,
|
|
13
|
-
width: containerWidth,
|
|
14
|
-
flexGrow: 1
|
|
15
|
-
};
|
|
16
|
-
},
|
|
17
|
-
header: {
|
|
18
|
-
marginLeft: margin,
|
|
19
|
-
marginTop: '16px',
|
|
20
|
-
marginBottom: '12px',
|
|
21
|
-
fontSize: '16px',
|
|
22
|
-
fontWeight: 500,
|
|
23
|
-
letterSpacing: '0.15px',
|
|
24
|
-
lineHeight: '24px'
|
|
25
|
-
},
|
|
26
|
-
searchInputContainer: {
|
|
27
|
-
margin: "0 ".concat(margin, " 12px ").concat(margin),
|
|
28
|
-
flexShrink: '0'
|
|
29
|
-
},
|
|
30
|
-
list: {
|
|
31
|
-
flexGrow: 1,
|
|
32
|
-
height: 0,
|
|
33
|
-
overflow: 'hidden',
|
|
34
|
-
width: '100%',
|
|
35
|
-
position: 'relative',
|
|
36
|
-
'& ul': {
|
|
37
|
-
paddingBottom: 0,
|
|
38
|
-
paddingTop: 0
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}); });
|