@k-int/stripes-kint-components 5.25.1 → 5.25.3
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 +14 -0
- package/es/__mocks__/@folio/stripes/components.js +7 -3
- package/es/__mocks__/@folio/stripes/core.js +6 -4
- package/es/__mocks__/@folio/stripes/smart-components.js +6 -4
- package/es/__mocks__/react-query.js +6 -4
- package/es/__mocks__/react-router-dom.js +6 -6
- package/es/lib/ActionList/ActionList.js +33 -26
- package/es/lib/ActionList/ActionListFieldArray.js +119 -103
- package/es/lib/ComboButton/ComboButton.js +47 -42
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +17 -11
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +46 -42
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +58 -58
- package/es/lib/CustomProperties/Config/CustomPropertyForm.test.js +8 -4
- package/es/lib/CustomProperties/Config/CustomPropertyView.js +33 -32
- package/es/lib/CustomProperties/Config/CustomPropertyView.test.js +1 -1
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +1 -1
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +3 -3
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +35 -29
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +59 -61
- package/es/lib/CustomProperties/Edit/CustomPropertyField.test.js +20 -20
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +2 -2
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.test.js +1 -1
- package/es/lib/CustomProperties/Edit/testResources.js +12 -11
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +33 -22
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +35 -23
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.test.js +1 -1
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +6 -6
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +6 -3
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.test.js +8 -4
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +17 -14
- package/es/lib/CustomProperties/Filter/testResources.js +2 -1
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +2 -1
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +1 -1
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +26 -18
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.test.js +6 -3
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +11 -7
- package/es/lib/CycleButton/CycleButton.js +17 -9
- package/es/lib/EditableRefdataCategoryList/EditableRefdataCategoryList.js +46 -30
- package/es/lib/EditableRefdataList/EditableRefdataList.js +43 -33
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray/EditableSettingsListFieldArray.js +9 -5
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue/EditSettingValue.js +6 -6
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue/RenderSettingValue.js +12 -10
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +12 -8
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +3 -3
- package/es/lib/FormModal/FormModal.js +32 -24
- package/es/lib/FormattedKintMessage/FormattedKintMessage.js +30 -23
- package/es/lib/IconSelect/IconSelect.js +32 -22
- package/es/lib/NoResultsMessage/NoResultsMessage.js +5 -4
- package/es/lib/NumberField/NumberField.js +25 -17
- package/es/lib/NumberField/NumberField.test.js +7 -6
- package/es/lib/QueryTypedown/QueryTypedown.js +15 -8
- package/es/lib/RefdataButtons/RefdataButtons.js +9 -6
- package/es/lib/RefdataCategoriesSettings/RefdataCategoriesSettings.js +26 -19
- package/es/lib/ResponsiveButtonGroup/ResponsiveButtonGroup.js +60 -48
- package/es/lib/ResponsiveButtonGroup/useResponsiveButtonGroupSizing.js +6 -5
- package/es/lib/RichSelect/RichSelect.js +36 -31
- package/es/lib/RichSelect/useSelectedOption.js +2 -1
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +94 -91
- package/es/lib/SASQLookupComponent/TableBody/TableBody.js +51 -41
- package/es/lib/SASQRoute/SASQRoute.js +29 -25
- package/es/lib/SASQViewComponent/SASQViewComponent.js +76 -68
- package/es/lib/SearchField/SearchField.js +13 -7
- package/es/lib/SearchKeyControl/SearchKeyControl.js +13 -8
- package/es/lib/SearchKeyControl/SearchKeyControl.test.js +6 -2
- package/es/lib/SettingPage/SettingPagePane/SettingPagePane.js +2 -2
- package/es/lib/SettingsFormContainer/SettingsFormContainer.js +35 -30
- package/es/lib/Tags/Tags.js +8 -5
- package/es/lib/Tags/hooks/useTags.js +1 -1
- package/es/lib/Tags/hooks/useTagsEnabled.js +1 -1
- package/es/lib/Tags/tagsConfig.js +1 -1
- package/es/lib/Typedown/Typedown.js +28 -21
- package/es/lib/hooks/__mocks__/index.js +7 -3
- package/es/lib/hooks/intlHooks/useIntlKeyStore/useIntlKeyStore.js +26 -20
- package/es/lib/hooks/intlHooks/useKintIntl/useKintIntl.js +34 -24
- package/es/lib/hooks/typedownHooks/useTypedown.js +2 -2
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +2 -2
- package/es/lib/hooks/useActionListRef.js +1 -1
- package/es/lib/hooks/useActiveElement.js +1 -1
- package/es/lib/hooks/useCustomProperties.js +10 -6
- package/es/lib/hooks/useHelperApp.js +16 -13
- package/es/lib/hooks/useKiwtFieldArray.js +8 -7
- package/es/lib/hooks/useKiwtSASQuery.js +19 -15
- package/es/lib/hooks/useLocalPageStore.js +10 -7
- package/es/lib/hooks/useModConfigEntries.js +2 -2
- package/es/lib/hooks/useMutateCustomProperties/useMutateCustomProperties.js +17 -10
- package/es/lib/hooks/useMutateGeneric/useMutateGeneric.js +2 -2
- package/es/lib/hooks/useMutateModConfigEntry.js +2 -2
- package/es/lib/hooks/useMutateRefdataCategory/useMutateRefdataCategory.js +21 -15
- package/es/lib/hooks/useMutateRefdataValue/useMutateRefdataValue.js +23 -16
- package/es/lib/hooks/usePrevNextPagination.js +19 -17
- package/es/lib/hooks/useQIndex.js +14 -11
- package/es/lib/hooks/useRefdata.js +3 -3
- package/es/lib/hooks/useTemplates.js +4 -4
- package/es/lib/settingsHooks/useAppSettings/useAppSettings.js +11 -7
- package/es/lib/settingsHooks/useSettingSection/useSettingSection.js +18 -12
- package/es/lib/settingsHooks/useSettings/useSettings.js +60 -60
- package/es/lib/utils/buildUrl.js +3 -2
- package/es/lib/utils/filterParsers/deparseKiwtQueryFilters.js +5 -5
- package/es/lib/utils/filterParsers/parseKiwtQueryFilters.js +2 -2
- package/es/lib/utils/filterParsers/parseKiwtQueryGroups.js +5 -4
- package/es/lib/utils/filterParsers/parseKiwtQueryString.js +1 -1
- package/es/lib/utils/generateKiwtQueryParams/generateKiwtQueryParams.js +82 -70
- package/es/lib/utils/groupCustomPropertiesByCtx.js +9 -5
- package/es/lib/utils/matchString.js +7 -5
- package/es/lib/utils/parseErrorResponse.js +4 -3
- package/es/lib/utils/selectorSafe.js +3 -2
- package/es/lib/utils/sortByLabel.js +3 -2
- package/es/lib/validators/validators.js +9 -6
- package/package.json +1 -1
- package/src/lib/SASQViewComponent/SASQViewComponent.js +2 -3
- package/styles/TypeDown.css +3 -1
package/es/lib/utils/buildUrl.js
CHANGED
|
@@ -17,12 +17,13 @@ function removeEmpty(obj) {
|
|
|
17
17
|
return cleanObj;
|
|
18
18
|
}
|
|
19
19
|
function buildUrl(location, values, basePath) {
|
|
20
|
-
|
|
20
|
+
var _location$query;
|
|
21
|
+
const locationQuery = (_location$query = location === null || location === void 0 ? void 0 : location.query) !== null && _location$query !== void 0 ? _location$query : _queryString.default.parse(location.search);
|
|
21
22
|
let url = values._path || basePath || location.pathname;
|
|
22
23
|
const params = removeEmpty(Object.assign(locationQuery, values));
|
|
23
24
|
(0, _lodash.unset)(params, '_path');
|
|
24
25
|
if (!(0, _lodash.isEmpty)(params)) {
|
|
25
|
-
url +=
|
|
26
|
+
url += "?".concat(_queryString.default.stringify(params));
|
|
26
27
|
}
|
|
27
28
|
return url;
|
|
28
29
|
}
|
|
@@ -6,9 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
exports.deparseKiwtQueryFiltersObject = exports.default = void 0;
|
|
7
7
|
// Does not validate object... make sure you pass it the right thing
|
|
8
8
|
const deparseKiwtQueryFiltersObject = queryObject => {
|
|
9
|
-
let returnString =
|
|
9
|
+
let returnString = "".concat(queryObject.path).concat(queryObject.comparator);
|
|
10
10
|
if (queryObject.value) {
|
|
11
|
-
returnString +=
|
|
11
|
+
returnString += "".concat(queryObject.value);
|
|
12
12
|
}
|
|
13
13
|
return returnString;
|
|
14
14
|
};
|
|
@@ -20,17 +20,17 @@ const deparseKiwtQueryFilters = queryArray => {
|
|
|
20
20
|
let returnString = '';
|
|
21
21
|
queryArray.forEach(qa => {
|
|
22
22
|
if (Array.isArray(qa)) {
|
|
23
|
-
returnString +=
|
|
23
|
+
returnString += "(".concat(deparseKiwtQueryFilters(qa), ")");
|
|
24
24
|
} else if (typeof qa === 'string') {
|
|
25
25
|
returnString += qa;
|
|
26
26
|
} else {
|
|
27
27
|
// Assuming object at this stage
|
|
28
|
-
returnString +=
|
|
28
|
+
returnString += "".concat(deparseKiwtQueryFiltersObject(qa));
|
|
29
29
|
}
|
|
30
30
|
});
|
|
31
31
|
return returnString.trim();
|
|
32
32
|
} else {
|
|
33
|
-
throw new Error(
|
|
33
|
+
throw new Error("deparseKiwtQuery expects a parameter of type Array, passed: ".concat(queryArray));
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
var _default = exports.default = deparseKiwtQueryFilters;
|
|
@@ -21,7 +21,7 @@ const parseKiwtQueryFiltersRecursive = query => {
|
|
|
21
21
|
return (0, _parseKiwtQueryString.default)(query);
|
|
22
22
|
}
|
|
23
23
|
} else {
|
|
24
|
-
throw new Error(
|
|
24
|
+
throw new Error("Unexpected query type: ".concat(query));
|
|
25
25
|
}
|
|
26
26
|
};
|
|
27
27
|
|
|
@@ -33,7 +33,7 @@ const parseKiwtQueryFilters = queryString => {
|
|
|
33
33
|
const queryGroups = (0, _parseKiwtQueryGroups.default)(queryString);
|
|
34
34
|
return parseKiwtQueryFiltersRecursive(queryGroups);
|
|
35
35
|
} else {
|
|
36
|
-
throw new Error(
|
|
36
|
+
throw new Error("parseKiwtQuery expects a parameter of type String, passed: ".concat(queryString));
|
|
37
37
|
}
|
|
38
38
|
};
|
|
39
39
|
|
|
@@ -44,7 +44,8 @@ const parseKiwtQueryGroups = query => {
|
|
|
44
44
|
let nestLevel = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 0;
|
|
45
45
|
const group = [];
|
|
46
46
|
// Iterate over each element in the array, recursively calling this when hitting parens
|
|
47
|
-
parseArray
|
|
47
|
+
parseArray === null || parseArray === void 0 || parseArray.every((element, index) => {
|
|
48
|
+
var _skipCount;
|
|
48
49
|
if (skipCount[nestLevel] > 0) {
|
|
49
50
|
skipCount[nestLevel] -= 1;
|
|
50
51
|
return true; // Equivalent to BREAK -- move onto next element
|
|
@@ -56,14 +57,14 @@ const parseKiwtQueryGroups = query => {
|
|
|
56
57
|
}
|
|
57
58
|
|
|
58
59
|
// At the levels below all of the following will need
|
|
59
|
-
skipCount = skipCount
|
|
60
|
+
skipCount = (_skipCount = skipCount) === null || _skipCount === void 0 ? void 0 : _skipCount.map((n, i) => {
|
|
60
61
|
if (i < nestLevel) {
|
|
61
62
|
return n + 1;
|
|
62
63
|
}
|
|
63
64
|
return n;
|
|
64
65
|
});
|
|
65
66
|
if (element !== '(' && element !== ')') {
|
|
66
|
-
group
|
|
67
|
+
group === null || group === void 0 || group.push(element);
|
|
67
68
|
} else if (element === ')') {
|
|
68
69
|
// Remove the corresponding skipCount level because we're going down a nesting level
|
|
69
70
|
skipCount.pop();
|
|
@@ -73,7 +74,7 @@ const parseKiwtQueryGroups = query => {
|
|
|
73
74
|
// Add next index to skipcount for the nesting
|
|
74
75
|
skipCount.push(0);
|
|
75
76
|
unclosedParens += 1;
|
|
76
|
-
group.push(groupParser(parseArray.slice(index + 1, parseArray
|
|
77
|
+
group.push(groupParser(parseArray.slice(index + 1, parseArray === null || parseArray === void 0 ? void 0 : parseArray.length), nestLevel + 1));
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
// If all is well, continue on parsing
|
|
@@ -17,7 +17,7 @@ const FIRST = 0;
|
|
|
17
17
|
const SECOND = 1;
|
|
18
18
|
const THIRD = 2;
|
|
19
19
|
const parseKiwtQueryString = queryString => {
|
|
20
|
-
const comparatorMatch = new RegExp(
|
|
20
|
+
const comparatorMatch = new RegExp("(".concat(_comparators.default.join('|'), ")"));
|
|
21
21
|
// See parseKiwtQueryGroups for breakdown of why this filter is needed
|
|
22
22
|
const splitString = queryString.split(comparatorMatch).filter(Boolean);
|
|
23
23
|
|
|
@@ -4,6 +4,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
const _excluded = ["searchKey", "filterConfig", "filterKeys", "sortKeys", "stats", "sort", "filters"];
|
|
8
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
9
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
7
10
|
const conditionalEncodeURIComponent = function (str) {
|
|
8
11
|
let encode = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : true;
|
|
9
12
|
if (encode) {
|
|
@@ -17,36 +20,40 @@ const conditionalEncodeURIComponent = function (str) {
|
|
|
17
20
|
const buildFilterOptionBlock = function (opf) {
|
|
18
21
|
let isNested = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
|
|
19
22
|
let encode = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
20
|
-
if (opf
|
|
23
|
+
if (opf !== null && opf !== void 0 && opf.groupValues) {
|
|
21
24
|
const groupValues = opf.groupValues;
|
|
22
25
|
|
|
23
26
|
// Small utility function to add negation and brackets to the options block where necessary
|
|
24
|
-
const negationAndNesting = str =>
|
|
27
|
+
const negationAndNesting = str => "".concat(groupValues !== null && groupValues !== void 0 && groupValues.NOT ? '!' : '').concat(isNested || groupValues !== null && groupValues !== void 0 && groupValues.NOT ? '(' : '').concat(str).concat(isNested || groupValues !== null && groupValues !== void 0 && groupValues.NOT ? ')' : '');
|
|
25
28
|
|
|
26
29
|
// First check whether groupValues is ANDed or ORed together
|
|
27
|
-
if (groupValues
|
|
30
|
+
if (groupValues !== null && groupValues !== void 0 && groupValues.AND && Array.isArray(groupValues.AND) || groupValues !== null && groupValues !== void 0 && groupValues.OR && Array.isArray(groupValues.OR)) {
|
|
31
|
+
var _groupValues$OR;
|
|
28
32
|
// AND takes precedence
|
|
29
33
|
if (groupValues.AND) {
|
|
30
|
-
|
|
34
|
+
var _groupValues$AND;
|
|
35
|
+
return negationAndNesting(groupValues === null || groupValues === void 0 || (_groupValues$AND = groupValues.AND) === null || _groupValues$AND === void 0 || (_groupValues$AND = _groupValues$AND.map(gvo => buildFilterOptionBlock(gvo, true, encode))) === null || _groupValues$AND === void 0 ? void 0 : _groupValues$AND.join('&&'));
|
|
31
36
|
}
|
|
32
|
-
return negationAndNesting(groupValues
|
|
37
|
+
return negationAndNesting(groupValues === null || groupValues === void 0 || (_groupValues$OR = groupValues.OR) === null || _groupValues$OR === void 0 || (_groupValues$OR = _groupValues$OR.map(gvo => buildFilterOptionBlock(gvo, true, encode))) === null || _groupValues$OR === void 0 ? void 0 : _groupValues$OR.join('||'));
|
|
33
38
|
}
|
|
34
39
|
// If neither valid OR nor AND exist, ignore the block
|
|
35
|
-
} else if (opf
|
|
40
|
+
} else if (opf !== null && opf !== void 0 && opf.values) {
|
|
36
41
|
// Build the values filter block
|
|
37
42
|
const innerFilters = [];
|
|
38
43
|
opf.values.forEach(opfv => {
|
|
39
44
|
if (opf.path) {
|
|
40
|
-
|
|
45
|
+
var _opf$comparator;
|
|
46
|
+
innerFilters.push("".concat(opf.path).concat((_opf$comparator = opf.comparator) !== null && _opf$comparator !== void 0 ? _opf$comparator : '==').concat(opfv));
|
|
41
47
|
} else {
|
|
42
48
|
innerFilters.push(opfv);
|
|
43
49
|
}
|
|
44
50
|
});
|
|
45
51
|
return conditionalEncodeURIComponent(innerFilters.join('||'), encode);
|
|
46
|
-
} else if (opf
|
|
52
|
+
} else if (opf !== null && opf !== void 0 && opf.value) {
|
|
47
53
|
// If no value OR values, then ignore
|
|
48
54
|
if (opf.path) {
|
|
49
|
-
|
|
55
|
+
var _opf$comparator2;
|
|
56
|
+
const filterString = "".concat(opf.path).concat((_opf$comparator2 = opf.comparator) !== null && _opf$comparator2 !== void 0 ? _opf$comparator2 : '==').concat(opf.value);
|
|
50
57
|
return conditionalEncodeURIComponent(filterString, encode);
|
|
51
58
|
}
|
|
52
59
|
return conditionalEncodeURIComponent(opf.value, encode);
|
|
@@ -74,50 +81,51 @@ const generateKiwtQueryParams = function (options, nsValues) {
|
|
|
74
81
|
sort
|
|
75
82
|
} = nsValues;
|
|
76
83
|
const {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
84
|
+
searchKey = '',
|
|
85
|
+
filterConfig = [],
|
|
86
|
+
/* Assumtion made that if no filterKey is provided then the given filterValues for that key are standalaone, ie require no comparator or key */
|
|
87
|
+
filterKeys = {},
|
|
88
|
+
sortKeys = {},
|
|
89
|
+
stats = true,
|
|
90
|
+
/* Of the form [{ path: 'this.is.some.path', direction: 'asc'/'desc', value: 'someOverrideValue'}, ...]
|
|
91
|
+
* If only path is passed then assume asc.
|
|
92
|
+
* If value is passed then we ignore path/direction and append "sort=${value}" directly
|
|
93
|
+
*/
|
|
94
|
+
sort: optionsSort,
|
|
95
|
+
/* Of the form
|
|
96
|
+
[
|
|
97
|
+
{
|
|
98
|
+
path: 'this.is.some.path'
|
|
99
|
+
comparator: '=='
|
|
100
|
+
value: 'this is a value' //OR
|
|
101
|
+
values: ['value1', 'value2'] //OR
|
|
102
|
+
groupValues: { // This is an object containing objects either in groups of AND or OR. AND takes precedence
|
|
103
|
+
AND: [
|
|
104
|
+
// Objects of the same shape as an individual filters object, recursively.
|
|
105
|
+
],
|
|
106
|
+
NOT: true // When this is set to true, the entire group is negated
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
...
|
|
110
|
+
]
|
|
111
|
+
* This (with value instead of values) will construct a query param: "filters=this.is.some.path==this is a value"
|
|
112
|
+
* If only value is passed, then it will construct directly: "filters=value"
|
|
113
|
+
* If no comparator is passed, it assumes '=='
|
|
114
|
+
* Values overwrites value and will construct "filters=this.is.some.path==value1||this.is.some.path==value2"
|
|
115
|
+
* Values WITHOUT path will construct "filters=value1||value2"
|
|
116
|
+
*
|
|
117
|
+
* GroupValues will override everything above, and group into brackets.
|
|
118
|
+
*
|
|
119
|
+
* If more complex query building is desired, this should be done externally and passed in as a standalone 'value'
|
|
120
|
+
*/
|
|
121
|
+
filters: optionsFilters
|
|
122
|
+
} = options,
|
|
123
|
+
rest = _objectWithoutProperties(options, _excluded);
|
|
117
124
|
const paramsArray = [];
|
|
118
125
|
if (query) {
|
|
119
|
-
|
|
120
|
-
paramsArray.push(
|
|
126
|
+
var _split, _ref;
|
|
127
|
+
paramsArray.push(...((_split = (_ref = qindex || searchKey) === null || _ref === void 0 ? void 0 : _ref.split(',')) !== null && _split !== void 0 ? _split : []).map(m => "match=".concat(conditionalEncodeURIComponent(m, encode))));
|
|
128
|
+
paramsArray.push("term=".concat(conditionalEncodeURIComponent(query, encode)));
|
|
121
129
|
}
|
|
122
130
|
|
|
123
131
|
// Actually build the optionsFilters block (Moved logic to its own function to allow recursion)
|
|
@@ -125,56 +133,60 @@ const generateKiwtQueryParams = function (options, nsValues) {
|
|
|
125
133
|
optionsFilters.forEach(opf => {
|
|
126
134
|
const optionsBlock = buildFilterOptionBlock(opf, false, encode);
|
|
127
135
|
if (optionsBlock) {
|
|
128
|
-
paramsArray.push(
|
|
136
|
+
paramsArray.push("filters=".concat(optionsBlock));
|
|
129
137
|
}
|
|
130
138
|
});
|
|
131
139
|
}
|
|
132
140
|
if (filters) {
|
|
133
141
|
const filterMap = {};
|
|
134
142
|
filters.split(',').forEach(filter => {
|
|
135
|
-
|
|
143
|
+
var _filter$trim$split, _filter$trim;
|
|
144
|
+
const [filterName, ...filterRest] = (_filter$trim$split = (_filter$trim = filter.trim()) === null || _filter$trim === void 0 ? void 0 : _filter$trim.split('.')) !== null && _filter$trim$split !== void 0 ? _filter$trim$split : [];
|
|
136
145
|
const filterValue = filterRest.join('.');
|
|
137
146
|
if (filterMap[filterName] === undefined) filterMap[filterName] = [];
|
|
138
147
|
filterMap[filterName].push(filterValue);
|
|
139
148
|
});
|
|
140
149
|
|
|
141
150
|
// We now have a filterMap of shape { status: ['active', 'cancelled'], type: ['local'] }
|
|
142
|
-
Object.entries(filterMap).forEach(
|
|
143
|
-
let [filterName, filterValues] =
|
|
151
|
+
Object.entries(filterMap).forEach(_ref2 => {
|
|
152
|
+
let [filterName, filterValues] = _ref2;
|
|
144
153
|
const filterConfigEntry = filterConfig.find(conf => conf.name === filterName);
|
|
145
154
|
const filterKey = filterKeys[filterName];
|
|
146
155
|
if (filterConfigEntry) {
|
|
147
156
|
// We have a direct mapping instruction, use it
|
|
148
157
|
const filterString = filterValues.map(v => {
|
|
149
|
-
|
|
150
|
-
const
|
|
158
|
+
var _filterConfigEntry$va, _filterConfigEntry$va2, _fcValueEntry$value, _fcValueEntry$compara;
|
|
159
|
+
const fcValueEntry = (_filterConfigEntry$va = filterConfigEntry === null || filterConfigEntry === void 0 || (_filterConfigEntry$va2 = filterConfigEntry.values) === null || _filterConfigEntry$va2 === void 0 ? void 0 : _filterConfigEntry$va2.find(fce => fce.name === v)) !== null && _filterConfigEntry$va !== void 0 ? _filterConfigEntry$va : {};
|
|
160
|
+
const fceValue = (_fcValueEntry$value = fcValueEntry.value) !== null && _fcValueEntry$value !== void 0 ? _fcValueEntry$value : v;
|
|
151
161
|
// This is especially useful where comparator acts strangely for a single value, such as `filters=foo isNotSet`
|
|
152
|
-
const fceComparator = fcValueEntry.comparator
|
|
153
|
-
return
|
|
162
|
+
const fceComparator = (_fcValueEntry$compara = fcValueEntry.comparator) !== null && _fcValueEntry$compara !== void 0 ? _fcValueEntry$compara : '==';
|
|
163
|
+
return "".concat(filterKey !== null && filterKey !== void 0 ? filterKey : filterName).concat(fceComparator).concat(fceValue !== null && fceValue !== void 0 ? fceValue : v);
|
|
154
164
|
}).join('||');
|
|
155
|
-
paramsArray.push(
|
|
165
|
+
paramsArray.push("filters=".concat(conditionalEncodeURIComponent(filterString, encode)));
|
|
156
166
|
} else if (!filterKey) {
|
|
157
167
|
// These filters have no key mapping so we just pass the values to the backend as-is.
|
|
158
|
-
paramsArray.push(...(filterValues
|
|
168
|
+
paramsArray.push(...(filterValues !== null && filterValues !== void 0 ? filterValues : []).map(f => "filters=".concat(conditionalEncodeURIComponent(f, encode))));
|
|
159
169
|
} else {
|
|
160
|
-
const filterString = filterValues.map(v =>
|
|
161
|
-
paramsArray.push(
|
|
170
|
+
const filterString = filterValues.map(v => "".concat(filterKey, "==").concat(v)).join('||');
|
|
171
|
+
paramsArray.push("filters=".concat(conditionalEncodeURIComponent(filterString, encode)));
|
|
162
172
|
}
|
|
163
173
|
});
|
|
164
174
|
}
|
|
165
175
|
if (optionsSort && optionsSort.length > 0) {
|
|
166
176
|
optionsSort.forEach(os => {
|
|
167
177
|
if (os.value) {
|
|
168
|
-
paramsArray.push(
|
|
178
|
+
paramsArray.push("sort=".concat(conditionalEncodeURIComponent(os.value, encode)));
|
|
169
179
|
} else if (os.path) {
|
|
180
|
+
var _os$direction;
|
|
170
181
|
// If no path then ignore
|
|
171
|
-
const sortString =
|
|
172
|
-
paramsArray.push(
|
|
182
|
+
const sortString = "".concat(os.path, ";").concat((_os$direction = os.direction) !== null && _os$direction !== void 0 ? _os$direction : 'asc');
|
|
183
|
+
paramsArray.push("sort=".concat(conditionalEncodeURIComponent(sortString, encode)));
|
|
173
184
|
}
|
|
174
185
|
});
|
|
175
186
|
}
|
|
176
187
|
if (sort) {
|
|
177
|
-
|
|
188
|
+
var _sort$trim$split, _sort$trim;
|
|
189
|
+
paramsArray.push(...((_sort$trim$split = (_sort$trim = sort.trim()) === null || _sort$trim === void 0 ? void 0 : _sort$trim.split(',')) !== null && _sort$trim$split !== void 0 ? _sort$trim$split : []).map(sortKey => {
|
|
178
190
|
const reverse = sortKey.startsWith('-');
|
|
179
191
|
let term = sortKey.replace('-', '');
|
|
180
192
|
if (term in sortKeys) {
|
|
@@ -187,8 +199,8 @@ const generateKiwtQueryParams = function (options, nsValues) {
|
|
|
187
199
|
const descending = field.startsWith('-');
|
|
188
200
|
const sortField = field.replace('-', '');
|
|
189
201
|
const sortOrder = reverse && !descending || !reverse && descending ? 'desc' : 'asc';
|
|
190
|
-
const sortString =
|
|
191
|
-
return
|
|
202
|
+
const sortString = "".concat(sortField, ";").concat(sortOrder);
|
|
203
|
+
return "sort=".concat(conditionalEncodeURIComponent(sortString, encode));
|
|
192
204
|
});
|
|
193
205
|
return sortStrings.join('&');
|
|
194
206
|
}));
|
|
@@ -198,7 +210,7 @@ const generateKiwtQueryParams = function (options, nsValues) {
|
|
|
198
210
|
}
|
|
199
211
|
for (const [key, value] of Object.entries(rest)) {
|
|
200
212
|
if (!keysToIgnore.includes(key)) {
|
|
201
|
-
paramsArray.push(
|
|
213
|
+
paramsArray.push("".concat(key, "=").concat(conditionalEncodeURIComponent(value, encode)));
|
|
202
214
|
}
|
|
203
215
|
}
|
|
204
216
|
return paramsArray;
|
|
@@ -4,14 +4,18 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
8
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
9
|
+
function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
|
|
10
|
+
function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == typeof i ? i : i + ""; }
|
|
11
|
+
function _toPrimitive(t, r) { if ("object" != typeof t || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != typeof i) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
|
7
12
|
const groupCustomPropertiesByCtx = function () {
|
|
8
13
|
let customProperties = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : [];
|
|
9
14
|
return customProperties.reduce((acc, curr) => {
|
|
10
|
-
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
returnObj[ctx] = [...(acc?.[ctx] ?? []), curr];
|
|
15
|
+
var _curr$ctx, _acc$ctx;
|
|
16
|
+
const ctx = (_curr$ctx = curr.ctx) !== null && _curr$ctx !== void 0 ? _curr$ctx : 'isNull';
|
|
17
|
+
const returnObj = _objectSpread({}, acc);
|
|
18
|
+
returnObj[ctx] = [...((_acc$ctx = acc === null || acc === void 0 ? void 0 : acc[ctx]) !== null && _acc$ctx !== void 0 ? _acc$ctx : []), curr];
|
|
15
19
|
return returnObj;
|
|
16
20
|
}, {});
|
|
17
21
|
};
|
|
@@ -7,26 +7,28 @@ exports.default = void 0;
|
|
|
7
7
|
var _escapeRegExp = _interopRequireDefault(require("lodash/escapeRegExp"));
|
|
8
8
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
9
9
|
const matchString = function (match, str) {
|
|
10
|
+
var _str$split2;
|
|
10
11
|
let ignoreNull = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
11
12
|
let simpleSplit = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : true;
|
|
12
13
|
// Simple regex split -- this is default behaviour
|
|
13
|
-
const regexSimple = new RegExp(
|
|
14
|
+
const regexSimple = new RegExp("".concat(match.split(/(\s+)/).filter(h => h.trim()).map(hl => '(' + (0, _escapeRegExp.default)(hl) + ')').join('|')), 'gi');
|
|
14
15
|
|
|
15
16
|
// Split Elivis "The King" Presley into [Elvis, The King, Presley]
|
|
16
|
-
const regex = new RegExp(
|
|
17
|
+
const regex = new RegExp("".concat(match.split(/(?!\B"[^"]*)\s+(?![^"]*"\B)/).filter(h => h.trim()).map(quotedSection => {
|
|
17
18
|
if (quotedSection.charAt(0) === '"' && quotedSection.charAt(quotedSection.length - 1) === '"') {
|
|
18
19
|
return quotedSection.slice(1, quotedSection.length - 1);
|
|
19
20
|
}
|
|
20
21
|
return quotedSection;
|
|
21
|
-
}).map(hl => '(' + (0, _escapeRegExp.default)(hl) + ')').join('|')
|
|
22
|
+
}).map(hl => '(' + (0, _escapeRegExp.default)(hl) + ')').join('|')), 'gi');
|
|
22
23
|
if (ignoreNull && !match) {
|
|
23
24
|
const nullRegex = /a^/gi; // Should match nothing
|
|
24
25
|
|
|
25
26
|
return [[str], nullRegex];
|
|
26
27
|
}
|
|
27
28
|
if (simpleSplit) {
|
|
28
|
-
|
|
29
|
+
var _str$split;
|
|
30
|
+
return [(_str$split = str.split(regexSimple)) === null || _str$split === void 0 ? void 0 : _str$split.filter(s => s && s.trim()), regexSimple];
|
|
29
31
|
}
|
|
30
|
-
return [str.split(regex)
|
|
32
|
+
return [(_str$split2 = str.split(regex)) === null || _str$split2 === void 0 ? void 0 : _str$split2.filter(s => s && s.trim()), regex];
|
|
31
33
|
};
|
|
32
34
|
var _default = exports.default = matchString;
|
|
@@ -5,14 +5,15 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
const parseErrorResponse = async responseObj => {
|
|
8
|
+
var _ref;
|
|
8
9
|
let errorResp = {
|
|
9
10
|
message: 'something went wrong'
|
|
10
11
|
};
|
|
11
12
|
if (!responseObj) {
|
|
12
13
|
return errorResp;
|
|
13
14
|
}
|
|
14
|
-
const code = responseObj
|
|
15
|
-
const contentType = [...responseObj
|
|
15
|
+
const code = responseObj === null || responseObj === void 0 ? void 0 : responseObj.status;
|
|
16
|
+
const contentType = (_ref = [...(responseObj === null || responseObj === void 0 ? void 0 : responseObj.headers)]) === null || _ref === void 0 || (_ref = _ref.find(header => header[0] === 'content-type')) === null || _ref === void 0 ? void 0 : _ref[1];
|
|
16
17
|
if (contentType.includes('json')) {
|
|
17
18
|
errorResp = await responseObj.json();
|
|
18
19
|
} else {
|
|
@@ -21,7 +22,7 @@ const parseErrorResponse = async responseObj => {
|
|
|
21
22
|
code,
|
|
22
23
|
message: await responseObj.text()
|
|
23
24
|
};
|
|
24
|
-
} catch {
|
|
25
|
+
} catch (_unused) {
|
|
25
26
|
errorResp = {
|
|
26
27
|
code,
|
|
27
28
|
message: 'something went wrong'
|
|
@@ -5,11 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
const selectorSafe = string => {
|
|
8
|
+
var _string$normalize;
|
|
8
9
|
// Normalise to separate diacritics from their base characters as "marks"
|
|
9
10
|
// then strip out all marks.
|
|
10
|
-
return string.normalize('NFKD')
|
|
11
|
+
return (_string$normalize = string.normalize('NFKD')) === null || _string$normalize === void 0 || (_string$normalize = _string$normalize.replace(/(?:[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0897-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u180F\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ADD\u1AE0-\u1AEB\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]|\uD800[\uDDFD\uDEE0\uDF76-\uDF7A]|\uD802[\uDE01-\uDE03\uDE05\uDE06\uDE0C-\uDE0F\uDE38-\uDE3A\uDE3F\uDEE5\uDEE6]|\uD803[\uDD24-\uDD27\uDD69-\uDD6D\uDEAB\uDEAC\uDEFA-\uDEFF\uDF46-\uDF50\uDF82-\uDF85]|\uD804[\uDC00-\uDC02\uDC38-\uDC46\uDC70\uDC73\uDC74\uDC7F-\uDC82\uDCB0-\uDCBA\uDCC2\uDD00-\uDD02\uDD27-\uDD34\uDD45\uDD46\uDD73\uDD80-\uDD82\uDDB3-\uDDC0\uDDC9-\uDDCC\uDDCE\uDDCF\uDE2C-\uDE37\uDE3E\uDE41\uDEDF-\uDEEA\uDF00-\uDF03\uDF3B\uDF3C\uDF3E-\uDF44\uDF47\uDF48\uDF4B-\uDF4D\uDF57\uDF62\uDF63\uDF66-\uDF6C\uDF70-\uDF74\uDFB8-\uDFC0\uDFC2\uDFC5\uDFC7-\uDFCA\uDFCC-\uDFD0\uDFD2\uDFE1\uDFE2]|\uD805[\uDC35-\uDC46\uDC5E\uDCB0-\uDCC3\uDDAF-\uDDB5\uDDB8-\uDDC0\uDDDC\uDDDD\uDE30-\uDE40\uDEAB-\uDEB7\uDF1D-\uDF2B]|\uD806[\uDC2C-\uDC3A\uDD30-\uDD35\uDD37\uDD38\uDD3B-\uDD3E\uDD40\uDD42\uDD43\uDDD1-\uDDD7\uDDDA-\uDDE0\uDDE4\uDE01-\uDE0A\uDE33-\uDE39\uDE3B-\uDE3E\uDE47\uDE51-\uDE5B\uDE8A-\uDE99\uDF60-\uDF67]|\uD807[\uDC2F-\uDC36\uDC38-\uDC3F\uDC92-\uDCA7\uDCA9-\uDCB6\uDD31-\uDD36\uDD3A\uDD3C\uDD3D\uDD3F-\uDD45\uDD47\uDD8A-\uDD8E\uDD90\uDD91\uDD93-\uDD97\uDEF3-\uDEF6\uDF00\uDF01\uDF03\uDF34-\uDF3A\uDF3E-\uDF42\uDF5A]|\uD80D[\uDC40\uDC47-\uDC55]|\uD818[\uDD1E-\uDD2F]|\uD81A[\uDEF0-\uDEF4\uDF30-\uDF36]|\uD81B[\uDF4F\uDF51-\uDF87\uDF8F-\uDF92\uDFE4\uDFF0\uDFF1]|\uD82F[\uDC9D\uDC9E]|\uD833[\uDF00-\uDF2D\uDF30-\uDF46]|\uD834[\uDD65-\uDD69\uDD6D-\uDD72\uDD7B-\uDD82\uDD85-\uDD8B\uDDAA-\uDDAD\uDE42-\uDE44]|\uD836[\uDE00-\uDE36\uDE3B-\uDE6C\uDE75\uDE84\uDE9B-\uDE9F\uDEA1-\uDEAF]|\uD838[\uDC00-\uDC06\uDC08-\uDC18\uDC1B-\uDC21\uDC23\uDC24\uDC26-\uDC2A\uDC8F\uDD30-\uDD36\uDEAE\uDEEC-\uDEEF]|\uD839[\uDCEC-\uDCEF\uDDEE\uDDEF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5]|\uD83A[\uDCD0-\uDCD6\uDD44-\uDD4A]|\uDB40[\uDD00-\uDDEF])/g, '')
|
|
11
12
|
// Then swap out any non-letter/number characters (Also ignore - and _) for `_`
|
|
12
|
-
|
|
13
|
+
) === null || _string$normalize === void 0 ? void 0 : _string$normalize.replace(/(?:[\0-,\.\/:-@\[-\^`\{-\xA9\xAB-\xB1\xB4\xB6-\xB8\xBB\xBF\xD7\xF7\u02C2-\u02C5\u02D2-\u02DF\u02E5-\u02EB\u02ED\u02EF-\u036F\u0375\u0378\u0379\u037E\u0380-\u0385\u0387\u038B\u038D\u03A2\u03F6\u0482-\u0489\u0530\u0557\u0558\u055A-\u055F\u0589-\u05CF\u05EB-\u05EE\u05F3-\u061F\u064B-\u065F\u066A-\u066D\u0670\u06D4\u06D6-\u06E4\u06E7-\u06ED\u06FD\u06FE\u0700-\u070F\u0711\u0730-\u074C\u07A6-\u07B0\u07B2-\u07BF\u07EB-\u07F3\u07F6-\u07F9\u07FB-\u07FF\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u083F\u0859-\u085F\u086B-\u086F\u0888\u0890-\u089F\u08CA-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962-\u0965\u0970\u0981-\u0984\u098D\u098E\u0991\u0992\u09A9\u09B1\u09B3-\u09B5\u09BA-\u09BC\u09BE-\u09CD\u09CF-\u09DB\u09DE\u09E2-\u09E5\u09F2\u09F3\u09FA\u09FB\u09FD-\u0A04\u0A0B-\u0A0E\u0A11\u0A12\u0A29\u0A31\u0A34\u0A37\u0A3A-\u0A58\u0A5D\u0A5F-\u0A65\u0A70\u0A71\u0A75-\u0A84\u0A8E\u0A92\u0AA9\u0AB1\u0AB4\u0ABA-\u0ABC\u0ABE-\u0ACF\u0AD1-\u0ADF\u0AE2-\u0AE5\u0AF0-\u0AF8\u0AFA-\u0B04\u0B0D\u0B0E\u0B11\u0B12\u0B29\u0B31\u0B34\u0B3A-\u0B3C\u0B3E-\u0B5B\u0B5E\u0B62-\u0B65\u0B70\u0B78-\u0B82\u0B84\u0B8B-\u0B8D\u0B91\u0B96-\u0B98\u0B9B\u0B9D\u0BA0-\u0BA2\u0BA5-\u0BA7\u0BAB-\u0BAD\u0BBA-\u0BCF\u0BD1-\u0BE5\u0BF3-\u0C04\u0C0D\u0C11\u0C29\u0C3A-\u0C3C\u0C3E-\u0C57\u0C5B\u0C5E\u0C5F\u0C62-\u0C65\u0C70-\u0C77\u0C7F\u0C81-\u0C84\u0C8D\u0C91\u0CA9\u0CB4\u0CBA-\u0CBC\u0CBE-\u0CDB\u0CDF\u0CE2-\u0CE5\u0CF0\u0CF3-\u0D03\u0D0D\u0D11\u0D3B\u0D3C\u0D3E-\u0D4D\u0D4F-\u0D53\u0D57\u0D62-\u0D65\u0D79\u0D80-\u0D84\u0D97-\u0D99\u0DB2\u0DBC\u0DBE\u0DBF\u0DC7-\u0DE5\u0DF0-\u0E00\u0E31\u0E34-\u0E3F\u0E47-\u0E4F\u0E5A-\u0E80\u0E83\u0E85\u0E8B\u0EA4\u0EA6\u0EB1\u0EB4-\u0EBC\u0EBE\u0EBF\u0EC5\u0EC7-\u0ECF\u0EDA\u0EDB\u0EE0-\u0EFF\u0F01-\u0F1F\u0F34-\u0F3F\u0F48\u0F6D-\u0F87\u0F8D-\u0FFF\u102B-\u103E\u104A-\u104F\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109F\u10C6\u10C8-\u10CC\u10CE\u10CF\u10FB\u1249\u124E\u124F\u1257\u1259\u125E\u125F\u1289\u128E\u128F\u12B1\u12B6\u12B7\u12BF\u12C1\u12C6\u12C7\u12D7\u1311\u1316\u1317\u135B-\u1368\u137D-\u137F\u1390-\u139F\u13F6\u13F7\u13FE-\u1400\u166D\u166E\u1680\u169B-\u169F\u16EB-\u16ED\u16F9-\u16FF\u1712-\u171E\u1732-\u173F\u1752-\u175F\u176D\u1771-\u177F\u17B4-\u17D6\u17D8-\u17DB\u17DD-\u17DF\u17EA-\u17EF\u17FA-\u180F\u181A-\u181F\u1879-\u187F\u1885\u1886\u18A9\u18AB-\u18AF\u18F6-\u18FF\u191F-\u1945\u196E\u196F\u1975-\u197F\u19AC-\u19AF\u19CA-\u19CF\u19DB-\u19FF\u1A17-\u1A1F\u1A55-\u1A7F\u1A8A-\u1A8F\u1A9A-\u1AA6\u1AA8-\u1B04\u1B34-\u1B44\u1B4D-\u1B4F\u1B5A-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BFF\u1C24-\u1C3F\u1C4A-\u1C4C\u1C7E\u1C7F\u1C8B-\u1C8F\u1CBB\u1CBC\u1CC0-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1CFB-\u1CFF\u1DC0-\u1DFF\u1F16\u1F17\u1F1E\u1F1F\u1F46\u1F47\u1F4E\u1F4F\u1F58\u1F5A\u1F5C\u1F5E\u1F7E\u1F7F\u1FB5\u1FBD\u1FBF-\u1FC1\u1FC5\u1FCD-\u1FCF\u1FD4\u1FD5\u1FDC-\u1FDF\u1FED-\u1FF1\u1FF5\u1FFD-\u206F\u2072\u2073\u207A-\u207E\u208A-\u208F\u209D-\u2101\u2103-\u2106\u2108\u2109\u2114\u2116-\u2118\u211E-\u2123\u2125\u2127\u2129\u212E\u213A\u213B\u2140-\u2144\u214A-\u214D\u214F\u218A-\u245F\u249C-\u24E9\u2500-\u2775\u2794-\u2BFF\u2CE5-\u2CEA\u2CEF-\u2CF1\u2CF4-\u2CFC\u2CFE\u2CFF\u2D26\u2D28-\u2D2C\u2D2E\u2D2F\u2D68-\u2D6E\u2D70-\u2D7F\u2D97-\u2D9F\u2DA7\u2DAF\u2DB7\u2DBF\u2DC7\u2DCF\u2DD7\u2DDF-\u2E2E\u2E30-\u3004\u3008-\u3020\u302A-\u3030\u3036\u3037\u303D-\u3040\u3097-\u309C\u30A0\u30FB\u3100-\u3104\u3130\u318F-\u3191\u3196-\u319F\u31C0-\u31EF\u3200-\u321F\u322A-\u3247\u3250\u3260-\u327F\u328A-\u32B0\u32C0-\u33FF\u4DC0-\u4DFF\uA48D-\uA4CF\uA4FE\uA4FF\uA60D-\uA60F\uA62C-\uA63F\uA66F-\uA67E\uA69E\uA69F\uA6F0-\uA716\uA720\uA721\uA789\uA78A\uA7DD-\uA7F0\uA802\uA806\uA80B\uA823-\uA82F\uA836-\uA83F\uA874-\uA881\uA8B4-\uA8CF\uA8DA-\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\uDEAE-\uDEBF\uDEEC-\uDEEF\uDEFA-\uDFFF]|\uD839[\uDC00-\uDCCF\uDCEC-\uDCEF\uDCFA-\uDDCF\uDDEE\uDDEF\uDDFB-\uDEBF\uDEDF\uDEE3\uDEE6\uDEEE\uDEEF\uDEF5-\uDEFD\uDF00-\uDFDF\uDFE7\uDFEC\uDFEF\uDFFF]|\uD83A[\uDCC5\uDCC6\uDCD0-\uDCFF\uDD44-\uDD4A\uDD4C-\uDD4F\uDD5A-\uDFFF]|\uD83B[\uDC00-\uDC70\uDCAC\uDCB0\uDCB5-\uDD00\uDD2E\uDD3E-\uDDFF\uDE04\uDE20\uDE23\uDE25\uDE26\uDE28\uDE33\uDE38\uDE3A\uDE3C-\uDE41\uDE43-\uDE46\uDE48\uDE4A\uDE4C\uDE50\uDE53\uDE55\uDE56\uDE58\uDE5A\uDE5C\uDE5E\uDE60\uDE63\uDE65\uDE66\uDE6B\uDE73\uDE78\uDE7D\uDE7F\uDE8A\uDE9C-\uDEA0\uDEA4\uDEAA\uDEBC-\uDFFF]|\uD83C[\uDC00-\uDCFF\uDD0D-\uDFFF]|\uD83E[\uDC00-\uDFEF\uDFFA-\uDFFF]|\uD869[\uDEE0-\uDEFF]|\uD86E[\uDC1E\uDC1F]|\uD873[\uDEAE\uDEAF]|\uD87A[\uDFE1-\uDFEF]|\uD87B[\uDE5E-\uDFFF]|\uD87E[\uDE1E-\uDFFF]|\uD884[\uDF4B-\uDF4F]|\uD88D[\uDC7A-\uDFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/g, '_');
|
|
13
14
|
};
|
|
14
15
|
var _default = exports.default = selectorSafe;
|
|
15
16
|
/*
|
|
@@ -5,8 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
7
|
const sortByLabel = (a, b) => {
|
|
8
|
-
|
|
9
|
-
const
|
|
8
|
+
var _a$label$toLowerCase, _a$label, _a$id, _b$label$toLowerCase, _b$label, _b$id;
|
|
9
|
+
const al = (_a$label$toLowerCase = (_a$label = a.label) === null || _a$label === void 0 ? void 0 : _a$label.toLowerCase()) !== null && _a$label$toLowerCase !== void 0 ? _a$label$toLowerCase : (_a$id = a.id) === null || _a$id === void 0 ? void 0 : _a$id.toLowerCase();
|
|
10
|
+
const bl = (_b$label$toLowerCase = (_b$label = b.label) === null || _b$label === void 0 ? void 0 : _b$label.toLowerCase()) !== null && _b$label$toLowerCase !== void 0 ? _b$label$toLowerCase : (_b$id = b.id) === null || _b$id === void 0 ? void 0 : _b$id.toLowerCase();
|
|
10
11
|
if (al < bl) {
|
|
11
12
|
return -1;
|
|
12
13
|
}
|
|
@@ -7,7 +7,10 @@ exports.requiredObject = exports.required = exports.rangeUnderflow = exports.ran
|
|
|
7
7
|
var _reactIntl = require("react-intl");
|
|
8
8
|
var _FormattedKintMessage = _interopRequireDefault(require("../FormattedKintMessage"));
|
|
9
9
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
10
|
+
const _excluded = ["_delete"];
|
|
10
11
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
+
function _objectWithoutProperties(e, t) { if (null == e) return {}; var o, r, i = _objectWithoutPropertiesLoose(e, t); if (Object.getOwnPropertySymbols) { var n = Object.getOwnPropertySymbols(e); for (r = 0; r < n.length; r++) o = n[r], -1 === t.indexOf(o) && {}.propertyIsEnumerable.call(e, o) && (i[o] = e[o]); } return i; }
|
|
13
|
+
function _objectWithoutPropertiesLoose(r, e) { if (null == r) return {}; var t = {}; for (var n in r) if ({}.hasOwnProperty.call(r, n)) { if (-1 !== e.indexOf(n)) continue; t[n] = r[n]; } return t; }
|
|
11
14
|
const required = value => {
|
|
12
15
|
const blankString = /^\s+$/;
|
|
13
16
|
if (value && !blankString.test(value) || value === false || value === 0) {
|
|
@@ -23,9 +26,9 @@ const requiredObject = function () {
|
|
|
23
26
|
// withKiwtFieldArray sets the _delete property on new objects by default
|
|
24
27
|
// eslint-disable-next-line no-unused-vars
|
|
25
28
|
const {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
+
_delete
|
|
30
|
+
} = formValue,
|
|
31
|
+
value = _objectWithoutProperties(formValue, _excluded);
|
|
29
32
|
if (Object.keys(value).length === 0) {
|
|
30
33
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
31
34
|
id: "stripes-core.label.missingRequiredField"
|
|
@@ -64,7 +67,7 @@ const invalidNumber = function (value, _min, _max, intlKey, intlNS) {
|
|
|
64
67
|
id: "errors.invalidNumber",
|
|
65
68
|
intlKey: intlKey,
|
|
66
69
|
intlNS: intlNS,
|
|
67
|
-
overrideValue: labelOverrides
|
|
70
|
+
overrideValue: labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.invalidNumberError
|
|
68
71
|
});
|
|
69
72
|
}
|
|
70
73
|
return undefined;
|
|
@@ -77,7 +80,7 @@ const rangeOverflow = function (value, min, max, intlKey, intlNS) {
|
|
|
77
80
|
id: "errors.decimalValueNotInRange",
|
|
78
81
|
intlKey: intlKey,
|
|
79
82
|
intlNS: intlNS,
|
|
80
|
-
overrideValue: labelOverrides
|
|
83
|
+
overrideValue: labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.decimalValueNotInRangeError,
|
|
81
84
|
values: {
|
|
82
85
|
min,
|
|
83
86
|
max
|
|
@@ -94,7 +97,7 @@ const rangeUnderflow = function (value, min, max, intlKey, intlNS) {
|
|
|
94
97
|
id: "errors.decimalValueNotInRange",
|
|
95
98
|
intlKey: intlKey,
|
|
96
99
|
intlNS: intlNS,
|
|
97
|
-
overrideValue: labelOverrides
|
|
100
|
+
overrideValue: labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.decimalValueNotInRangeError,
|
|
98
101
|
values: {
|
|
99
102
|
min,
|
|
100
103
|
max
|
package/package.json
CHANGED
|
@@ -14,8 +14,7 @@ const SASQViewComponent = forwardRef(
|
|
|
14
14
|
location,
|
|
15
15
|
match,
|
|
16
16
|
path,
|
|
17
|
-
viewQueryPromise = ({ endpoint, ky, resourceId }) =>
|
|
18
|
-
ky.get(`${endpoint}/${resourceId}`).json(),
|
|
17
|
+
viewQueryPromise = ({ endpoint, ky, resourceId }) => ky.get(`${endpoint}/${resourceId}`).json(),
|
|
19
18
|
viewResponseTransform = (response) => response,
|
|
20
19
|
ViewComponent,
|
|
21
20
|
viewQueryNamespaceGenerator = ({
|
|
@@ -54,7 +53,7 @@ const SASQViewComponent = forwardRef(
|
|
|
54
53
|
return viewQueryPromise({
|
|
55
54
|
ky,
|
|
56
55
|
resourceId: match?.params?.id,
|
|
57
|
-
endpoint
|
|
56
|
+
endpoint,
|
|
58
57
|
});
|
|
59
58
|
},
|
|
60
59
|
{
|
package/styles/TypeDown.css
CHANGED
|
@@ -94,6 +94,8 @@ div[class^="overlay"][x-out-of-boundaries=""] > div[class^="dropdownMenu"] > div
|
|
|
94
94
|
|
|
95
95
|
.listContainer {
|
|
96
96
|
border-bottom: 1px solid var(--color-border);
|
|
97
|
+
overflow: auto;
|
|
98
|
+
max-height: 40vh;
|
|
97
99
|
}
|
|
98
100
|
|
|
99
101
|
.listItem {
|
|
@@ -118,4 +120,4 @@ div[class^="overlay"][x-out-of-boundaries=""] > div[class^="dropdownMenu"] > div
|
|
|
118
120
|
|
|
119
121
|
.footer {
|
|
120
122
|
padding: var(--gutter-static-one-third) var(--gutter-static-two-thirds)
|
|
121
|
-
}
|
|
123
|
+
}
|