@k-int/stripes-kint-components 1.7.0 → 1.7.1
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 +7 -0
- package/es/index.js +29 -49
- package/es/lib/ActionList/ActionList.js +28 -73
- package/es/lib/ActionList/ActionListFieldArray.js +97 -220
- package/es/lib/ActionList/index.js +2 -8
- package/es/lib/EditableRefdataList/EditableRefdataList.js +46 -134
- package/es/lib/EditableRefdataList/index.js +2 -8
- package/es/lib/EditableSettingsList/EditableSettingsList.js +11 -47
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.js +16 -61
- package/es/lib/EditableSettingsList/EditableSettingsListFieldArray.test.js +62 -137
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.js +23 -91
- package/es/lib/EditableSettingsList/SettingField/EditSettingValue.test.js +103 -127
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.js +19 -75
- package/es/lib/EditableSettingsList/SettingField/RenderSettingValue.test.js +188 -357
- package/es/lib/EditableSettingsList/SettingField/SettingField.js +39 -120
- package/es/lib/EditableSettingsList/SettingField/SettingField.test.js +61 -157
- package/es/lib/EditableSettingsList/SettingField/index.js +4 -12
- package/es/lib/EditableSettingsList/index.js +4 -12
- package/es/lib/NoResultsMessage/NoResultsMessage.js +24 -61
- package/es/lib/NoResultsMessage/index.js +2 -8
- package/es/lib/QueryTypedown/QueryTypedown.js +15 -89
- package/es/lib/QueryTypedown/index.js +2 -8
- package/es/lib/RefdataButtons/RefdataButtons.js +32 -85
- package/es/lib/RefdataButtons/index.js +2 -8
- package/es/lib/SASQLookupComponent/SASQLookupComponent.js +120 -227
- package/es/lib/SASQLookupComponent/index.js +2 -8
- package/es/lib/SASQRoute/SASQRoute.js +27 -76
- package/es/lib/SASQRoute/index.js +2 -8
- package/es/lib/SASQViewComponent/SASQViewComponent.js +28 -89
- package/es/lib/SASQViewComponent/index.js +2 -8
- package/es/lib/SearchField/SearchField.js +11 -61
- package/es/lib/SearchField/index.js +2 -8
- package/es/lib/SettingPage/SettingPage.js +17 -63
- package/es/lib/SettingPage/SettingPagePane.js +13 -58
- package/es/lib/SettingPage/index.js +3 -10
- package/es/lib/TypeDown/TypeDown.js +61 -132
- package/es/lib/TypeDown/index.js +2 -8
- package/es/lib/Typedown/Typedown.js +74 -153
- package/es/lib/Typedown/index.js +2 -8
- package/es/lib/constants/eventCodes.js +3 -36
- package/es/lib/contexts/SettingsContext.js +2 -34
- package/es/lib/contexts/index.js +2 -8
- package/es/lib/hooks/index.js +12 -27
- package/es/lib/hooks/settingsHooks/index.js +3 -10
- package/es/lib/hooks/settingsHooks/useSettingSection.js +16 -60
- package/es/lib/hooks/settingsHooks/useSettings.js +51 -130
- package/es/lib/hooks/typedownHooks/index.js +4 -12
- package/es/lib/hooks/typedownHooks/useTypedown.js +60 -114
- package/es/lib/hooks/typedownHooks/useTypedownData.js +13 -69
- package/es/lib/hooks/typedownHooks/useTypedownToggle.js +15 -71
- package/es/lib/hooks/useActiveElement.js +10 -63
- package/es/lib/hooks/useHelperApp.js +37 -111
- package/es/lib/hooks/useKiwtFieldArray.js +35 -101
- package/es/lib/hooks/useKiwtSASQuery.js +36 -107
- package/es/lib/hooks/useLocalStorageState.js +7 -69
- package/es/lib/hooks/useMutateRefdataValue.js +31 -115
- package/es/lib/hooks/useQIndex.js +17 -87
- package/es/lib/hooks/useRefdata.js +19 -65
- package/es/lib/hooks/useTemplates.js +16 -60
- package/es/lib/utils/buildUrl.js +11 -51
- package/es/lib/utils/generateKiwtQuery.js +4 -40
- package/es/lib/utils/generateKiwtQueryParams.js +38 -125
- package/es/lib/utils/index.js +9 -22
- package/es/lib/utils/refdataOptions.js +2 -32
- package/es/lib/utils/renderHelpText.js +32 -89
- package/es/lib/utils/selectorSafe.js +2 -34
- package/es/lib/utils/sortByLabel.js +4 -41
- package/es/lib/utils/toCamelCase.js +8 -42
- package/package.json +17 -3
- package/es/artifacts/coverage-jest/lcov-report/block-navigation.js +0 -109
- package/es/artifacts/coverage-jest/lcov-report/prettify.js +0 -998
- package/es/artifacts/coverage-jest/lcov-report/sorter.js +0 -238
- package/junit.xml +0 -79
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +0 -256
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +0 -799
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +0 -376
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +0 -223
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +0 -211
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +0 -376
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +0 -262
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +0 -436
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +0 -161
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +0 -319
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +0 -184
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +0 -370
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +0 -949
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +0 -274
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +0 -250
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +0 -214
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +0 -211
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +0 -178
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +0 -91
- package/src/artifacts/coverage-jest/lcov-report/TypeDown/TypeDown.js.html +0 -769
- package/src/artifacts/coverage-jest/lcov-report/TypeDown/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/TypeDown/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +0 -790
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +0 -88
- package/src/artifacts/coverage-jest/lcov-report/base.css +0 -224
- package/src/artifacts/coverage-jest/lcov-report/block-navigation.js +0 -87
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +0 -116
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +0 -97
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +0 -131
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +0 -91
- package/src/artifacts/coverage-jest/lcov-report/favicon.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +0 -251
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +0 -115
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +0 -146
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +0 -91
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +0 -163
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +0 -403
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +0 -161
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +0 -94
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +0 -520
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +0 -163
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +0 -163
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +0 -157
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +0 -283
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +0 -274
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +0 -178
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +0 -136
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +0 -301
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +0 -208
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +0 -268
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +0 -166
- package/src/artifacts/coverage-jest/lcov-report/index.html +0 -401
- package/src/artifacts/coverage-jest/lcov-report/prettify.css +0 -1
- package/src/artifacts/coverage-jest/lcov-report/prettify.js +0 -2
- package/src/artifacts/coverage-jest/lcov-report/sort-arrow-sprite.png +0 -0
- package/src/artifacts/coverage-jest/lcov-report/sorter.js +0 -196
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +0 -193
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +0 -109
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +0 -286
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +0 -236
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +0 -121
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +0 -106
- package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +0 -166
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +0 -103
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +0 -130
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +0 -127
- package/src/artifacts/coverage-jest/lcov.info +0 -1999
|
@@ -4,80 +4,40 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _reactQuery = require("react-query");
|
|
13
|
-
|
|
14
10
|
var _core = require("@folio/stripes/core");
|
|
15
|
-
|
|
16
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
|
|
18
|
-
var _excluded = ["fetchParameters", "history", "location", "match", "path", "ViewComponent"];
|
|
19
|
-
|
|
20
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
13
|
+
const SASQViewComponent = _ref => {
|
|
14
|
+
let {
|
|
15
|
+
fetchParameters,
|
|
16
|
+
history,
|
|
17
|
+
location,
|
|
18
|
+
match,
|
|
19
|
+
path,
|
|
20
|
+
ViewComponent,
|
|
21
|
+
...props
|
|
22
|
+
} = _ref;
|
|
23
|
+
const {
|
|
24
|
+
0: namespace
|
|
25
|
+
} = (0, _core.useNamespace)();
|
|
26
|
+
|
|
27
|
+
// If itemEndpoint is available, use that, otherwise use standard endpoint
|
|
28
|
+
const endpoint = fetchParameters?.itemEndpoint ?? fetchParameters?.endpoint;
|
|
29
|
+
const ky = (0, _core.useOkapiKy)();
|
|
30
|
+
const {
|
|
31
|
+
data = {}
|
|
32
|
+
} = (0, _reactQuery.useQuery)([namespace, 'data', 'view', match?.params?.id], () => ky(`${endpoint}/${match?.params?.id}`).json(), {
|
|
33
|
+
enabled: !!match?.params?.id
|
|
34
|
+
});
|
|
35
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ViewComponent, {
|
|
36
|
+
onClose: () => history.push(`${path}${location.search}`),
|
|
37
|
+
resource: data,
|
|
38
|
+
...props
|
|
39
|
+
});
|
|
39
40
|
};
|
|
40
|
-
|
|
41
|
-
var SASQViewComponent = function SASQViewComponent(_ref) {
|
|
42
|
-
var _fetchParameters$item, _match$params, _match$params3;
|
|
43
|
-
|
|
44
|
-
var fetchParameters = _ref.fetchParameters,
|
|
45
|
-
history = _ref.history,
|
|
46
|
-
location = _ref.location,
|
|
47
|
-
match = _ref.match,
|
|
48
|
-
path = _ref.path,
|
|
49
|
-
ViewComponent = _ref.ViewComponent,
|
|
50
|
-
props = _objectWithoutProperties(_ref, _excluded);
|
|
51
|
-
|
|
52
|
-
var _useNamespace = (0, _core.useNamespace)(),
|
|
53
|
-
namespace = _useNamespace[0]; // If itemEndpoint is available, use that, otherwise use standard endpoint
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
var endpoint = (_fetchParameters$item = fetchParameters === null || fetchParameters === void 0 ? void 0 : fetchParameters.itemEndpoint) !== null && _fetchParameters$item !== void 0 ? _fetchParameters$item : fetchParameters === null || fetchParameters === void 0 ? void 0 : fetchParameters.endpoint;
|
|
57
|
-
var ky = (0, _core.useOkapiKy)();
|
|
58
|
-
|
|
59
|
-
var _useQuery = (0, _reactQuery.useQuery)([namespace, 'data', 'view', match === null || match === void 0 ? void 0 : (_match$params = match.params) === null || _match$params === void 0 ? void 0 : _match$params.id], function () {
|
|
60
|
-
var _match$params2;
|
|
61
|
-
|
|
62
|
-
return ky("".concat(endpoint, "/").concat(match === null || match === void 0 ? void 0 : (_match$params2 = match.params) === null || _match$params2 === void 0 ? void 0 : _match$params2.id)).json();
|
|
63
|
-
}, {
|
|
64
|
-
enabled: !!(match !== null && match !== void 0 && (_match$params3 = match.params) !== null && _match$params3 !== void 0 && _match$params3.id)
|
|
65
|
-
}),
|
|
66
|
-
_useQuery$data = _useQuery.data,
|
|
67
|
-
data = _useQuery$data === void 0 ? {} : _useQuery$data;
|
|
68
|
-
|
|
69
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(ViewComponent, _objectSpread({
|
|
70
|
-
onClose: function onClose() {
|
|
71
|
-
return history.push("".concat(path).concat(location.search));
|
|
72
|
-
},
|
|
73
|
-
resource: data
|
|
74
|
-
}, props));
|
|
75
|
-
};
|
|
76
|
-
|
|
77
|
-
__signature__(SASQViewComponent, "useNamespace{{ 0: namespace }}\nuseOkapiKy{ky}\nuseQuery{{ data = {} }}", function () {
|
|
78
|
-
return [_core.useNamespace, _core.useOkapiKy, _reactQuery.useQuery];
|
|
79
|
-
});
|
|
80
|
-
|
|
81
41
|
SASQViewComponent.propTypes = {
|
|
82
42
|
fetchParameters: _propTypes.default.object,
|
|
83
43
|
history: _propTypes.default.object,
|
|
@@ -86,25 +46,4 @@ SASQViewComponent.propTypes = {
|
|
|
86
46
|
path: _propTypes.default.string.isRequired,
|
|
87
47
|
ViewComponent: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.node])
|
|
88
48
|
};
|
|
89
|
-
var _default = SASQViewComponent;
|
|
90
|
-
var _default2 = _default;
|
|
91
|
-
exports.default = _default2;
|
|
92
|
-
;
|
|
93
|
-
|
|
94
|
-
(function () {
|
|
95
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
96
|
-
|
|
97
|
-
if (!reactHotLoader) {
|
|
98
|
-
return;
|
|
99
|
-
}
|
|
100
|
-
|
|
101
|
-
reactHotLoader.register(SASQViewComponent, "SASQViewComponent", "/home/ethan/FolioModules/stripes-kint-components/src/lib/SASQViewComponent/SASQViewComponent.js");
|
|
102
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/SASQViewComponent/SASQViewComponent.js");
|
|
103
|
-
})();
|
|
104
|
-
|
|
105
|
-
;
|
|
106
|
-
|
|
107
|
-
(function () {
|
|
108
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
109
|
-
leaveModule && leaveModule(module);
|
|
110
|
-
})();
|
|
49
|
+
var _default = exports.default = SASQViewComponent;
|
|
@@ -5,15 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _SASQViewComponent.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _SASQViewComponent = _interopRequireDefault(require("./SASQViewComponent"));
|
|
14
|
-
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
|
|
17
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -4,87 +4,37 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.default = void 0;
|
|
7
|
-
|
|
8
7
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
11
|
-
|
|
12
9
|
var _components = require("@folio/stripes/components");
|
|
13
|
-
|
|
14
10
|
var _SearchField = _interopRequireDefault(require("../../../styles/SearchField.css"));
|
|
15
|
-
|
|
16
11
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
17
|
-
|
|
18
|
-
var _excluded = ["ariaLabel"];
|
|
19
|
-
|
|
20
12
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
21
|
-
|
|
22
|
-
(function () {
|
|
23
|
-
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
24
|
-
enterModule && enterModule(module);
|
|
25
|
-
})();
|
|
26
|
-
|
|
27
|
-
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
|
|
28
|
-
|
|
29
|
-
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) { _defineProperty(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; }
|
|
30
|
-
|
|
31
|
-
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
|
|
32
|
-
|
|
33
|
-
function _objectWithoutProperties(source, excluded) { if (source == null) return {}; var target = _objectWithoutPropertiesLoose(source, excluded); var key, i; if (Object.getOwnPropertySymbols) { var sourceSymbolKeys = Object.getOwnPropertySymbols(source); for (i = 0; i < sourceSymbolKeys.length; i++) { key = sourceSymbolKeys[i]; if (excluded.indexOf(key) >= 0) continue; if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue; target[key] = source[key]; } } return target; }
|
|
34
|
-
|
|
35
|
-
function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
|
|
36
|
-
|
|
37
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
38
|
-
return a;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
13
|
// Accepts the same props as TextField
|
|
42
|
-
|
|
14
|
+
const propTypes = {
|
|
43
15
|
ariaLabel: _propTypes.default.string,
|
|
44
16
|
clearSearchId: _propTypes.default.string,
|
|
45
17
|
disabled: _propTypes.default.bool,
|
|
46
18
|
onClear: _propTypes.default.func
|
|
47
19
|
};
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
20
|
+
const SearchField = props => {
|
|
21
|
+
const {
|
|
22
|
+
ariaLabel,
|
|
23
|
+
...rest
|
|
24
|
+
} = props;
|
|
25
|
+
const searchIcon = /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Icon, {
|
|
54
26
|
icon: "search",
|
|
55
27
|
iconClassName: _SearchField.default.searchIcon,
|
|
56
28
|
size: "small"
|
|
57
29
|
});
|
|
58
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.TextField,
|
|
30
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.TextField, {
|
|
31
|
+
...rest,
|
|
59
32
|
"aria-label": rest['aria-label'] || ariaLabel,
|
|
60
33
|
focussedclass: _SearchField.default.isFocused,
|
|
61
34
|
hasClearIcon: true,
|
|
62
35
|
startControl: searchIcon,
|
|
63
36
|
type: "search"
|
|
64
|
-
})
|
|
37
|
+
});
|
|
65
38
|
};
|
|
66
|
-
|
|
67
39
|
SearchField.propTypes = propTypes;
|
|
68
|
-
var _default = SearchField;
|
|
69
|
-
var _default2 = _default;
|
|
70
|
-
exports.default = _default2;
|
|
71
|
-
;
|
|
72
|
-
|
|
73
|
-
(function () {
|
|
74
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
75
|
-
|
|
76
|
-
if (!reactHotLoader) {
|
|
77
|
-
return;
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
reactHotLoader.register(propTypes, "propTypes", "/home/ethan/FolioModules/stripes-kint-components/src/lib/SearchField/SearchField.js");
|
|
81
|
-
reactHotLoader.register(SearchField, "SearchField", "/home/ethan/FolioModules/stripes-kint-components/src/lib/SearchField/SearchField.js");
|
|
82
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/SearchField/SearchField.js");
|
|
83
|
-
})();
|
|
84
|
-
|
|
85
|
-
;
|
|
86
|
-
|
|
87
|
-
(function () {
|
|
88
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
89
|
-
leaveModule && leaveModule(module);
|
|
90
|
-
})();
|
|
40
|
+
var _default = exports.default = SearchField;
|
|
@@ -5,15 +5,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "default", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _SearchField.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
12
|
var _SearchField = _interopRequireDefault(require("./SearchField"));
|
|
14
|
-
|
|
15
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
16
|
-
|
|
17
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
18
|
-
return a;
|
|
19
|
-
};
|
|
13
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
@@ -1,52 +1,32 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
|
-
|
|
10
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
9
|
var _EditableSettingsList = require("../EditableSettingsList");
|
|
15
|
-
|
|
16
10
|
var _contexts = require("../contexts");
|
|
17
|
-
|
|
18
11
|
var _hooks = require("../hooks");
|
|
19
|
-
|
|
20
12
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
-
|
|
22
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
|
-
|
|
24
|
-
function
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
})();
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
var _useContext = (0, _react.useContext)(_contexts.SettingsContext),
|
|
41
|
-
settingEndpoint = _useContext.settingEndpoint;
|
|
42
|
-
|
|
43
|
-
var _useSettingSection = (0, _hooks.useSettingSection)({
|
|
44
|
-
sectionName: sectionName,
|
|
45
|
-
settingEndpoint: settingEndpoint
|
|
46
|
-
}),
|
|
47
|
-
handleSubmit = _useSettingSection.handleSubmit,
|
|
48
|
-
settings = _useSettingSection.settings;
|
|
49
|
-
|
|
14
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
15
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
16
|
+
const SettingPage = _ref => {
|
|
17
|
+
let {
|
|
18
|
+
sectionName
|
|
19
|
+
} = _ref;
|
|
20
|
+
const {
|
|
21
|
+
settingEndpoint
|
|
22
|
+
} = (0, _react.useContext)(_contexts.SettingsContext);
|
|
23
|
+
const {
|
|
24
|
+
handleSubmit,
|
|
25
|
+
settings
|
|
26
|
+
} = (0, _hooks.useSettingSection)({
|
|
27
|
+
sectionName,
|
|
28
|
+
settingEndpoint
|
|
29
|
+
});
|
|
50
30
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_EditableSettingsList.EditableSettingsList, {
|
|
51
31
|
initialValues: {
|
|
52
32
|
'settings': settings
|
|
@@ -56,11 +36,6 @@ var SettingPage = function SettingPage(_ref) {
|
|
|
56
36
|
settingSection: sectionName
|
|
57
37
|
});
|
|
58
38
|
};
|
|
59
|
-
|
|
60
|
-
__signature__(SettingPage, "useContext{{ settingEndpoint }}\nuseSettingSection{{ handleSubmit, settings }}", function () {
|
|
61
|
-
return [_hooks.useSettingSection];
|
|
62
|
-
});
|
|
63
|
-
|
|
64
39
|
SettingPage.propTypes = {
|
|
65
40
|
mutator: _propTypes.default.shape({
|
|
66
41
|
settings: _propTypes.default.object
|
|
@@ -75,25 +50,4 @@ SettingPage.propTypes = {
|
|
|
75
50
|
})
|
|
76
51
|
})
|
|
77
52
|
};
|
|
78
|
-
var _default = SettingPage;
|
|
79
|
-
var _default2 = _default;
|
|
80
|
-
exports.default = _default2;
|
|
81
|
-
;
|
|
82
|
-
|
|
83
|
-
(function () {
|
|
84
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
85
|
-
|
|
86
|
-
if (!reactHotLoader) {
|
|
87
|
-
return;
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
reactHotLoader.register(SettingPage, "SettingPage", "/home/ethan/FolioModules/stripes-kint-components/src/lib/SettingPage/SettingPage.js");
|
|
91
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/SettingPage/SettingPage.js");
|
|
92
|
-
})();
|
|
93
|
-
|
|
94
|
-
;
|
|
95
|
-
|
|
96
|
-
(function () {
|
|
97
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
98
|
-
leaveModule && leaveModule(module);
|
|
99
|
-
})();
|
|
53
|
+
var _default = exports.default = SettingPage;
|
|
@@ -1,83 +1,38 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) { return typeof obj; } : function (obj) { return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }, _typeof(obj); }
|
|
4
|
-
|
|
5
3
|
Object.defineProperty(exports, "__esModule", {
|
|
6
4
|
value: true
|
|
7
5
|
});
|
|
8
6
|
exports.default = void 0;
|
|
9
|
-
|
|
10
7
|
var _react = _interopRequireWildcard(require("react"));
|
|
11
|
-
|
|
12
8
|
var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
13
|
-
|
|
14
9
|
var _components = require("@folio/stripes/components");
|
|
15
|
-
|
|
16
10
|
var _reactIntl = require("react-intl");
|
|
17
|
-
|
|
18
11
|
var _contexts = require("../contexts");
|
|
19
|
-
|
|
20
12
|
var _utils = require("../utils");
|
|
21
|
-
|
|
22
13
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
|
-
|
|
24
14
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
-
|
|
26
|
-
function
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
36
|
-
return a;
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
var SettingPagePane = function SettingPagePane(_ref) {
|
|
40
|
-
var sectionName = _ref.sectionName,
|
|
41
|
-
children = _ref.children;
|
|
42
|
-
|
|
43
|
-
var _useContext = (0, _react.useContext)(_contexts.SettingsContext),
|
|
44
|
-
intlKey = _useContext.intlKey;
|
|
45
|
-
|
|
15
|
+
function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
|
|
16
|
+
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
17
|
+
const SettingPagePane = _ref => {
|
|
18
|
+
let {
|
|
19
|
+
sectionName,
|
|
20
|
+
children
|
|
21
|
+
} = _ref;
|
|
22
|
+
const {
|
|
23
|
+
intlKey
|
|
24
|
+
} = (0, _react.useContext)(_contexts.SettingsContext);
|
|
46
25
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Pane, {
|
|
47
26
|
defaultWidth: "fill",
|
|
48
|
-
id:
|
|
27
|
+
id: `settings-${sectionName}`,
|
|
49
28
|
paneTitle: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
50
|
-
id:
|
|
29
|
+
id: `${intlKey}.settings.settingsSection.${(0, _utils.toCamelCase)(sectionName)}`
|
|
51
30
|
}),
|
|
52
31
|
children: children
|
|
53
32
|
});
|
|
54
33
|
};
|
|
55
|
-
|
|
56
|
-
__signature__(SettingPagePane, "useContext{{ intlKey }}");
|
|
57
|
-
|
|
58
34
|
SettingPagePane.propTypes = {
|
|
59
35
|
sectionName: _propTypes.default.string,
|
|
60
36
|
children: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.node])
|
|
61
37
|
};
|
|
62
|
-
var _default = SettingPagePane;
|
|
63
|
-
var _default2 = _default;
|
|
64
|
-
exports.default = _default2;
|
|
65
|
-
;
|
|
66
|
-
|
|
67
|
-
(function () {
|
|
68
|
-
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
69
|
-
|
|
70
|
-
if (!reactHotLoader) {
|
|
71
|
-
return;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
reactHotLoader.register(SettingPagePane, "SettingPagePane", "/home/ethan/FolioModules/stripes-kint-components/src/lib/SettingPage/SettingPagePane.js");
|
|
75
|
-
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/SettingPage/SettingPagePane.js");
|
|
76
|
-
})();
|
|
77
|
-
|
|
78
|
-
;
|
|
79
|
-
|
|
80
|
-
(function () {
|
|
81
|
-
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
82
|
-
leaveModule && leaveModule(module);
|
|
83
|
-
})();
|
|
38
|
+
var _default = exports.default = SettingPagePane;
|
|
@@ -5,23 +5,16 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
Object.defineProperty(exports, "SettingPage", {
|
|
7
7
|
enumerable: true,
|
|
8
|
-
get: function
|
|
8
|
+
get: function () {
|
|
9
9
|
return _SettingPage.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
12
|
Object.defineProperty(exports, "SettingPagePane", {
|
|
13
13
|
enumerable: true,
|
|
14
|
-
get: function
|
|
14
|
+
get: function () {
|
|
15
15
|
return _SettingPagePane.default;
|
|
16
16
|
}
|
|
17
17
|
});
|
|
18
|
-
|
|
19
18
|
var _SettingPagePane = _interopRequireDefault(require("./SettingPagePane"));
|
|
20
|
-
|
|
21
19
|
var _SettingPage = _interopRequireDefault(require("./SettingPage"));
|
|
22
|
-
|
|
23
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
24
|
-
|
|
25
|
-
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
26
|
-
return a;
|
|
27
|
-
};
|
|
20
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|