@k-int/stripes-kint-components 1.7.0 → 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/es/index.js +51 -8
  3. package/es/lib/ActionList/ActionList.js +48 -28
  4. package/es/lib/ActionList/ActionListFieldArray.js +56 -16
  5. package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +198 -0
  6. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +326 -0
  7. package/es/lib/CustomProperties/Config/CustomPropertiesView.js +166 -0
  8. package/es/lib/CustomProperties/Config/CustomPropertyForm.js +360 -0
  9. package/es/lib/CustomProperties/Config/index.js +41 -0
  10. package/es/lib/EditableRefdataList/EditableRefdataList.js +0 -1
  11. package/es/lib/FormModal/FormModal.js +126 -0
  12. package/es/lib/{TypeDown → FormModal}/index.js +2 -2
  13. package/es/lib/NoResultsMessage/NoResultsMessage.js +1 -1
  14. package/es/lib/SASQRoute/SASQRoute.js +15 -11
  15. package/es/lib/SASQViewComponent/SASQViewComponent.js +6 -3
  16. package/es/lib/Typedown/Typedown.js +50 -18
  17. package/es/lib/constants/customProperties.js +60 -0
  18. package/es/lib/hooks/index.js +16 -0
  19. package/es/lib/hooks/useCustomProperties.js +122 -0
  20. package/es/lib/hooks/useMutateCustomProperties.js +143 -0
  21. package/es/lib/utils/generateKiwtQueryParams.js +51 -8
  22. package/junit.xml +40 -40
  23. package/package.json +5 -3
  24. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +47 -26
  25. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +122 -8
  26. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +10 -10
  27. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
  28. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +418 -0
  29. package/src/artifacts/coverage-jest/lcov-report/{TypeDown/TypeDown.js.html → CustomProperties/Config/CustomPropertiesSettings.js.html} +268 -232
  30. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesView.js.html +535 -0
  31. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +973 -0
  32. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +176 -0
  33. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +97 -0
  34. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +2 -5
  35. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +1 -1
  36. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
  37. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +1 -1
  38. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +1 -1
  39. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +1 -1
  40. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +1 -1
  41. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +1 -1
  42. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +1 -1
  43. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
  44. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +1 -1
  45. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
  46. package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +298 -0
  47. package/src/artifacts/coverage-jest/lcov-report/{TypeDown → FormModal}/index.html +14 -14
  48. package/src/artifacts/coverage-jest/lcov-report/{TypeDown → FormModal}/index.js.html +4 -4
  49. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +3 -3
  50. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
  51. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
  52. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
  53. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
  54. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
  55. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +3 -3
  56. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
  57. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
  58. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +1 -1
  59. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +1 -1
  60. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
  61. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +43 -16
  62. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
  63. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
  64. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +6 -3
  65. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
  66. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
  67. package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
  68. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
  69. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
  70. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +1 -1
  71. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +1 -1
  72. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +1 -1
  73. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
  74. package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +150 -21
  75. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +7 -7
  76. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
  77. package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +112 -0
  78. package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
  79. package/src/artifacts/coverage-jest/lcov-report/constants/index.html +18 -3
  80. package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +1 -1
  81. package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
  82. package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
  83. package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +35 -5
  84. package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +8 -2
  85. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +1 -1
  86. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
  87. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +1 -1
  88. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +1 -1
  89. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
  90. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
  91. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
  92. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
  93. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
  94. package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +1 -1
  95. package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +313 -0
  96. package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +1 -1
  97. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +1 -1
  98. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +1 -1
  99. package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +1 -1
  100. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +271 -0
  101. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +1 -1
  102. package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +1 -1
  103. package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +1 -1
  104. package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +1 -1
  105. package/src/artifacts/coverage-jest/lcov-report/index.html +62 -47
  106. package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
  107. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +1 -1
  108. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +174 -12
  109. package/src/artifacts/coverage-jest/lcov-report/utils/index.html +17 -17
  110. package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +1 -1
  111. package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
  112. package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +1 -1
  113. package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +1 -1
  114. package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +1 -1
  115. package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +1 -1
  116. package/src/artifacts/coverage-jest/lcov.info +841 -348
  117. package/src/index.js +14 -4
  118. package/src/lib/ActionList/ActionList.js +30 -23
  119. package/src/lib/ActionList/ActionListFieldArray.js +40 -2
  120. package/src/lib/ActionList/README.md +4 -1
  121. package/src/lib/CustomProperties/Config/CustomPropertiesLookup.js +111 -0
  122. package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +240 -0
  123. package/src/lib/CustomProperties/Config/CustomPropertiesView.js +150 -0
  124. package/src/lib/CustomProperties/Config/CustomPropertyForm.js +296 -0
  125. package/src/lib/CustomProperties/Config/index.js +4 -0
  126. package/src/lib/EditableRefdataList/EditableRefdataList.js +0 -1
  127. package/src/lib/FormModal/FormModal.js +71 -0
  128. package/src/lib/FormModal/index.js +1 -0
  129. package/src/lib/NoResultsMessage/NoResultsMessage.js +2 -2
  130. package/src/lib/SASQRoute/SASQRoute.js +23 -14
  131. package/src/lib/SASQViewComponent/SASQViewComponent.js +2 -1
  132. package/src/lib/Typedown/Typedown.js +56 -13
  133. package/src/lib/constants/customProperties.js +9 -0
  134. package/src/lib/hooks/index.js +2 -0
  135. package/src/lib/hooks/useCustomProperties.js +76 -0
  136. package/src/lib/hooks/useMutateCustomProperties.js +62 -0
  137. package/src/lib/utils/generateKiwtQueryParams.js +58 -4
  138. package/styles/TypeDown.css +7 -0
  139. package/translations/stripes-kint-components/en.json +49 -1
  140. package/es/lib/TypeDown/TypeDown.js +0 -251
  141. package/src/lib/TypeDown/README.md +0 -1
  142. package/src/lib/TypeDown/TypeDown.js +0 -228
  143. package/src/lib/TypeDown/index.js +0 -1
@@ -0,0 +1,360 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _react = require("react");
9
+
10
+ var _propTypes = _interopRequireDefault(require("prop-types"));
11
+
12
+ var _reactIntl = require("react-intl");
13
+
14
+ var _reactFinalForm = require("react-final-form");
15
+
16
+ var _components = require("@folio/stripes/components");
17
+
18
+ var _stripesErmComponents = require("@folio/stripes-erm-components");
19
+
20
+ var _jsxRuntime = require("react/jsx-runtime");
21
+
22
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
+
24
+ (function () {
25
+ var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
26
+ enterModule && enterModule(module);
27
+ })();
28
+
29
+ function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread(); }
30
+
31
+ function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
32
+
33
+ function _iterableToArray(iter) { if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter); }
34
+
35
+ function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) return _arrayLikeToArray(arr); }
36
+
37
+ function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
38
+
39
+ function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
40
+
41
+ function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
42
+
43
+ function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
44
+
45
+ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
46
+
47
+ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
48
+
49
+ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
50
+ return a;
51
+ };
52
+
53
+ var CustomPropertyForm = function CustomPropertyForm(_ref) {
54
+ var _labelOverrides$label, _labelOverrides$name, _labelOverrides$descr, _labelOverrides$weigh, _labelOverrides$prima, _labelOverrides$defau, _labelOverrides$ctx, _labelOverrides$type, _labelOverrides$categ;
55
+
56
+ var contextFilterOptions = _ref.contextFilterOptions,
57
+ helpPopovers = _ref.helpPopovers,
58
+ labelOverrides = _ref.labelOverrides,
59
+ refdata = _ref.refdata;
60
+
61
+ var _useFormState = (0, _reactFinalForm.useFormState)(),
62
+ values = _useFormState.values;
63
+
64
+ var _useForm = (0, _reactFinalForm.useForm)(),
65
+ change = _useForm.change;
66
+
67
+ var intl = (0, _reactIntl.useIntl)();
68
+
69
+ var booleanToString = function booleanToString(booleanValue) {
70
+ return booleanValue === null || booleanValue === void 0 ? void 0 : booleanValue.toString();
71
+ };
72
+
73
+ var stringToBoolean = function stringToBoolean(stringValue) {
74
+ return stringValue === 'true';
75
+ };
76
+
77
+ var _useState = (0, _react.useState)(contextFilterOptions === null || contextFilterOptions === void 0 ? void 0 : contextFilterOptions.filter(function (ctx) {
78
+ return ctx.value !== '' && (ctx === null || ctx === void 0 ? void 0 : ctx.value) !== 'isNull';
79
+ })),
80
+ _useState2 = _slicedToArray(_useState, 2),
81
+ contextOptions = _useState2[0],
82
+ setContextOptions = _useState2[1];
83
+
84
+ var addCtx = function addCtx(_ref2) {
85
+ var _r = _ref2._r,
86
+ _e = _ref2._e,
87
+ filterText = _ref2.filterText;
88
+ var newOption = {
89
+ value: filterText,
90
+ label: filterText
91
+ };
92
+ setContextOptions([newOption].concat(_toConsumableArray(contextOptions)));
93
+ change('ctx', [newOption]);
94
+ };
95
+
96
+ var renderAddCtx = function renderAddCtx(_ref3) {
97
+ var filterValue = _ref3.filterValue,
98
+ exactMatch = _ref3.exactMatch;
99
+
100
+ if (!filterValue || exactMatch) {
101
+ return null;
102
+ } else {
103
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
104
+ id: "stripes-kint-components.customProperties.ctx.addContext",
105
+ values: {
106
+ value: filterValue
107
+ }
108
+ });
109
+ }
110
+ };
111
+
112
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
113
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Row, {
114
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
115
+ xs: 6,
116
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
117
+ component: _components.TextField,
118
+ label: (_labelOverrides$label = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.label) !== null && _labelOverrides$label !== void 0 ? _labelOverrides$label : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
119
+ id: "stripes-kint-components.customProperties.label"
120
+ }),
121
+ name: "label",
122
+ required: true,
123
+ startControl: helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.label ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
124
+ content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.label
125
+ }) : null,
126
+ validate: _stripesErmComponents.requiredValidator
127
+ })
128
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
129
+ xs: 6,
130
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
131
+ component: _components.TextField,
132
+ label: (_labelOverrides$name = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.name) !== null && _labelOverrides$name !== void 0 ? _labelOverrides$name : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
133
+ id: "stripes-kint-components.customProperties.name"
134
+ }),
135
+ name: "name",
136
+ required: true,
137
+ startControl: helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.name ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
138
+ content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.name
139
+ }) : null,
140
+ validate: function validate(v) {
141
+ if (v && v.length) {
142
+ return /^[a-z][a-z0-9]*$/i.test(v) ? undefined : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
143
+ id: "stripes-kint-components.errors.hasNonAlphaName"
144
+ });
145
+ }
146
+
147
+ return (0, _stripesErmComponents.requiredValidator)(v);
148
+ }
149
+ })
150
+ })]
151
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Row, {
152
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
153
+ xs: 12,
154
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
155
+ component: _components.TextArea,
156
+ label: (_labelOverrides$descr = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.description) !== null && _labelOverrides$descr !== void 0 ? _labelOverrides$descr : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
157
+ id: "stripes-kint-components.customProperties.description"
158
+ }),
159
+ name: "description",
160
+ required: true,
161
+ startControl: helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.description ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
162
+ content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.description
163
+ }) : null,
164
+ validate: _stripesErmComponents.requiredValidator
165
+ })
166
+ })
167
+ }), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Row, {
168
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
169
+ xs: 3,
170
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
171
+ component: _components.TextField,
172
+ label: (_labelOverrides$weigh = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.weight) !== null && _labelOverrides$weigh !== void 0 ? _labelOverrides$weigh : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
173
+ id: "stripes-kint-components.customProperties.weight"
174
+ }),
175
+ name: "weight",
176
+ required: true,
177
+ startControl: helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.weight ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
178
+ content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.weight
179
+ }) : null,
180
+ type: "number",
181
+ validate: _stripesErmComponents.requiredValidator
182
+ })
183
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
184
+ xs: 3,
185
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
186
+ component: _components.Select,
187
+ dataOptions: [{
188
+ label: intl.formatMessage({
189
+ id: 'stripes-kint-components.yes'
190
+ }),
191
+ value: 'true'
192
+ }, {
193
+ label: intl.formatMessage({
194
+ id: 'stripes-kint-components.no'
195
+ }),
196
+ value: 'false'
197
+ }],
198
+ format: booleanToString,
199
+ label: (_labelOverrides$prima = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.primary) !== null && _labelOverrides$prima !== void 0 ? _labelOverrides$prima : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
200
+ id: "stripes-kint-components.customProperties.primary"
201
+ }),
202
+ name: "primary",
203
+ parse: stringToBoolean,
204
+ required: true,
205
+ startControl: helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.primary ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
206
+ content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.primary
207
+ }) : null,
208
+ validate: _stripesErmComponents.requiredValidator
209
+ })
210
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
211
+ xs: 3,
212
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
213
+ component: _components.Select,
214
+ dataOptions: [{
215
+ label: intl.formatMessage({
216
+ id: 'stripes-kint-components.customProperties.internalTrue'
217
+ }),
218
+ value: 'true'
219
+ }, {
220
+ label: intl.formatMessage({
221
+ id: 'stripes-kint-components.customProperties.internalFalse'
222
+ }),
223
+ value: 'false'
224
+ }],
225
+ format: booleanToString,
226
+ label: (_labelOverrides$defau = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.defaultVisibility) !== null && _labelOverrides$defau !== void 0 ? _labelOverrides$defau : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
227
+ id: "stripes-kint-components.customProperties.defaultVisibility"
228
+ }),
229
+ name: "defaultInternal",
230
+ parse: stringToBoolean,
231
+ required: true,
232
+ startControl: helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.defaultVisibility ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
233
+ content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.defaultVisibility
234
+ }) : null,
235
+ validate: _stripesErmComponents.requiredValidator
236
+ })
237
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
238
+ xs: 3,
239
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
240
+ actions: [{
241
+ onSelect: addCtx,
242
+ render: renderAddCtx
243
+ }],
244
+ component: _components.MultiSelection,
245
+ dataOptions: contextOptions,
246
+ emptyMessage: intl.formatMessage({
247
+ id: 'stripes-kint-components.customProperties.noCtxFound'
248
+ }),
249
+ label: (_labelOverrides$ctx = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.ctx) !== null && _labelOverrides$ctx !== void 0 ? _labelOverrides$ctx : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
250
+ id: "stripes-kint-components.customProperties.ctx"
251
+ }),
252
+ name: "ctx",
253
+ onChange: function onChange(selectedItems) {
254
+ if (selectedItems.length) {
255
+ change('ctx', [selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems[(selectedItems === null || selectedItems === void 0 ? void 0 : selectedItems.length) - 1]]);
256
+ } else {
257
+ change('ctx', undefined);
258
+ }
259
+ },
260
+ validate: function validate(value) {
261
+ return (value === null || value === void 0 ? void 0 : value.length) > 1 ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
262
+ id: "stripes-kint-components.customProperties.ctx.error.moreThanOne"
263
+ }) : null;
264
+ }
265
+ })
266
+ })]
267
+ }), !(values !== null && values !== void 0 && values.id) && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Row, {
268
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
269
+ xs: 6,
270
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
271
+ component: _components.Select,
272
+ dataOptions: [{
273
+ label: '',
274
+ value: ''
275
+ }, {
276
+ label: intl.formatMessage({
277
+ id: 'stripes-kint-components.customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyDecimal'
278
+ }),
279
+ value: 'Decimal'
280
+ }, {
281
+ label: intl.formatMessage({
282
+ id: 'stripes-kint-components.customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyInteger'
283
+ }),
284
+ value: 'Integer'
285
+ }, {
286
+ label: intl.formatMessage({
287
+ id: 'stripes-kint-components.customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyText'
288
+ }),
289
+ value: 'Text'
290
+ }, {
291
+ label: intl.formatMessage({
292
+ id: 'stripes-kint-components.customProperties.type.com.k_int.web.toolkit.custprops.types.CustomPropertyRefdata'
293
+ }),
294
+ value: 'Refdata'
295
+ }],
296
+ label: (_labelOverrides$type = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.type) !== null && _labelOverrides$type !== void 0 ? _labelOverrides$type : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
297
+ id: "stripes-kint-components.customProperties.type"
298
+ }),
299
+ name: "type",
300
+ required: true,
301
+ startControl: helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.type ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
302
+ content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.type
303
+ }) : null,
304
+ validate: _stripesErmComponents.requiredValidator
305
+ })
306
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
307
+ xs: 6,
308
+ children: (values === null || values === void 0 ? void 0 : values.type) === 'Refdata' && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
309
+ component: _components.Select,
310
+ dataOptions: [{
311
+ label: '',
312
+ value: ''
313
+ }].concat(_toConsumableArray(refdata)),
314
+ label: (_labelOverrides$categ = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.category) !== null && _labelOverrides$categ !== void 0 ? _labelOverrides$categ : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
315
+ id: "stripes-kint-components.customProperties.category"
316
+ }),
317
+ name: "category",
318
+ required: true,
319
+ startControl: helpPopovers !== null && helpPopovers !== void 0 && helpPopovers.category ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.InfoPopover, {
320
+ content: helpPopovers === null || helpPopovers === void 0 ? void 0 : helpPopovers.category
321
+ }) : null,
322
+ validate: _stripesErmComponents.requiredValidator
323
+ })
324
+ })]
325
+ })]
326
+ });
327
+ };
328
+
329
+ __signature__(CustomPropertyForm, "useFormState{{ values }}\nuseForm{{ change }}\nuseIntl{intl}\nuseState{[contextOptions, setContextOptions](contextFilterOptions?.filter(ctx => ctx.value !== '' && ctx?.value !== 'isNull'))}", function () {
330
+ return [_reactFinalForm.useFormState, _reactFinalForm.useForm, _reactIntl.useIntl];
331
+ });
332
+
333
+ CustomPropertyForm.propTypes = {
334
+ contextFilterOptions: _propTypes.default.arrayOf(_propTypes.default.string),
335
+ helpPopovers: _propTypes.default.object,
336
+ labelOverrides: _propTypes.default.object,
337
+ refdata: _propTypes.default.arrayOf(_propTypes.default.object)
338
+ };
339
+ var _default = CustomPropertyForm;
340
+ var _default2 = _default;
341
+ exports.default = _default2;
342
+ ;
343
+
344
+ (function () {
345
+ var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
346
+
347
+ if (!reactHotLoader) {
348
+ return;
349
+ }
350
+
351
+ reactHotLoader.register(CustomPropertyForm, "CustomPropertyForm", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertyForm.js");
352
+ reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertyForm.js");
353
+ })();
354
+
355
+ ;
356
+
357
+ (function () {
358
+ var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
359
+ leaveModule && leaveModule(module);
360
+ })();
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "CustomPropertiesLookup", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _CustomPropertiesLookup.default;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "CustomPropertiesSettings", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _CustomPropertiesSettings.default;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "CustomPropertiesView", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _CustomPropertiesLookup.default;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "CustomPropertyForm", {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _CustomPropertyForm.default;
28
+ }
29
+ });
30
+
31
+ var _CustomPropertiesLookup = _interopRequireDefault(require("./CustomPropertiesLookup"));
32
+
33
+ var _CustomPropertiesSettings = _interopRequireDefault(require("./CustomPropertiesSettings"));
34
+
35
+ var _CustomPropertyForm = _interopRequireDefault(require("./CustomPropertyForm"));
36
+
37
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
38
+
39
+ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
40
+ return a;
41
+ };
@@ -115,7 +115,6 @@ var EditableRefdataList = function EditableRefdataList(_ref) {
115
115
  if (isRefdataLoading) {
116
116
  return 'loading';
117
117
  } // This is the function which will take a row in the table and assign the relevant actions to it
118
- // TODO make these 'labels' into ARIA labels
119
118
 
120
119
 
121
120
  var actionAssigner = function actionAssigner() {
@@ -0,0 +1,126 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _propTypes = _interopRequireDefault(require("prop-types"));
9
+
10
+ var _reactFinalForm = require("react-final-form");
11
+
12
+ var _reactIntl = require("react-intl");
13
+
14
+ var _components = require("@folio/stripes/components");
15
+
16
+ var _jsxRuntime = require("react/jsx-runtime");
17
+
18
+ var _excluded = ["onClose"],
19
+ _excluded2 = ["children", "modalProps", "onSubmit"];
20
+
21
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
22
+
23
+ (function () {
24
+ var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
25
+ enterModule && enterModule(module);
26
+ })();
27
+
28
+ 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; }
29
+
30
+ 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; }
31
+
32
+ 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; }
33
+
34
+ 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; }
35
+
36
+ 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; }
37
+
38
+ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
39
+ return a;
40
+ };
41
+
42
+ var FormModal = function FormModal(_ref) {
43
+ var _children = _ref.children,
44
+ _ref$modalProps = _ref.modalProps,
45
+ onClose = _ref$modalProps.onClose,
46
+ modalProps = _objectWithoutProperties(_ref$modalProps, _excluded),
47
+ onSubmit = _ref.onSubmit,
48
+ formProps = _objectWithoutProperties(_ref, _excluded2);
49
+
50
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Form, _objectSpread(_objectSpread({
51
+ onSubmit: onSubmit
52
+ }, formProps), {}, {
53
+ children: function children(_ref2) {
54
+ var handleSubmit = _ref2.handleSubmit,
55
+ restart = _ref2.form.restart;
56
+
57
+ var handleClose = function handleClose(e) {
58
+ onClose(e);
59
+ restart();
60
+ };
61
+
62
+ var handleSubmitAndClear = function handleSubmitAndClear() {
63
+ handleSubmit();
64
+ restart();
65
+ };
66
+
67
+ var renderFooter = function renderFooter() {
68
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.ModalFooter, {
69
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
70
+ buttonStyle: "primary",
71
+ onClick: handleSubmitAndClear,
72
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
73
+ id: "stripes-kint-components.save"
74
+ })
75
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
76
+ onClick: handleClose,
77
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
78
+ id: "stripes-kint-components.cancel"
79
+ })
80
+ })]
81
+ });
82
+ };
83
+
84
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)("form", {
85
+ onSubmit: handleSubmitAndClear,
86
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Modal, _objectSpread(_objectSpread({
87
+ enforceFocus: false,
88
+ footer: renderFooter(),
89
+ onClose: handleClose
90
+ }, modalProps), {}, {
91
+ children: _children
92
+ }))
93
+ });
94
+ }
95
+ }));
96
+ };
97
+
98
+ FormModal.propTypes = {
99
+ children: _propTypes.default.oneOfType([_propTypes.default.arrayOf(_propTypes.default.node), _propTypes.default.node, _propTypes.default.func]),
100
+ modalProps: _propTypes.default.shape({
101
+ onClose: _propTypes.default.func
102
+ }),
103
+ onSubmit: _propTypes.default.func
104
+ };
105
+ var _default = FormModal;
106
+ var _default2 = _default;
107
+ exports.default = _default2;
108
+ ;
109
+
110
+ (function () {
111
+ var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
112
+
113
+ if (!reactHotLoader) {
114
+ return;
115
+ }
116
+
117
+ reactHotLoader.register(FormModal, "FormModal", "/home/ethan/FolioModules/stripes-kint-components/src/lib/FormModal/FormModal.js");
118
+ reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/FormModal/FormModal.js");
119
+ })();
120
+
121
+ ;
122
+
123
+ (function () {
124
+ var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
125
+ leaveModule && leaveModule(module);
126
+ })();
@@ -6,11 +6,11 @@ Object.defineProperty(exports, "__esModule", {
6
6
  Object.defineProperty(exports, "default", {
7
7
  enumerable: true,
8
8
  get: function get() {
9
- return _TypeDown.default;
9
+ return _FormModal.default;
10
10
  }
11
11
  });
12
12
 
13
- var _TypeDown = _interopRequireDefault(require("./TypeDown"));
13
+ var _FormModal = _interopRequireDefault(require("./FormModal"));
14
14
 
15
15
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
16
16
 
@@ -94,7 +94,7 @@ NoResultsMessage.propTypes = {
94
94
  icon: _propTypes.default.string,
95
95
  isLoading: _propTypes.default.bool,
96
96
  isError: _propTypes.default.bool,
97
- label: _propTypes.default.oneOfType(_propTypes.default.string, _propTypes.default.node, _propTypes.default.func),
97
+ label: _propTypes.default.oneOfType([_propTypes.default.string, _propTypes.default.node, _propTypes.default.func]),
98
98
  searchTerm: _propTypes.default.string.isRequired,
99
99
  toggleFilterPane: _propTypes.default.func.isRequired
100
100
  };
@@ -17,7 +17,7 @@ var _SASQViewComponent = _interopRequireDefault(require("../SASQViewComponent"))
17
17
 
18
18
  var _jsxRuntime = require("react/jsx-runtime");
19
19
 
20
- var _excluded = ["path", "fetchParameters"];
20
+ var _excluded = ["children", "path", "fetchParameters"];
21
21
 
22
22
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
23
23
 
@@ -41,7 +41,8 @@ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoader
41
41
  };
42
42
 
43
43
  var SASQRoute = function SASQRoute(_ref) {
44
- var path = _ref.path,
44
+ var children = _ref.children,
45
+ path = _ref.path,
45
46
  fetchParameters = _ref.fetchParameters,
46
47
  props = _objectWithoutProperties(_ref, _excluded);
47
48
 
@@ -63,15 +64,17 @@ var SASQRoute = function SASQRoute(_ref) {
63
64
  fetchParameters: fetchParameters,
64
65
  path: path
65
66
  }, props), {}, {
66
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Route, {
67
- path: "".concat(path, "/:id"),
68
- render: function render(innerProps) {
69
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SASQViewComponent.default, _objectSpread(_objectSpread({}, innerProps), {}, {
70
- fetchParameters: fetchParameters,
71
- path: path,
72
- ViewComponent: props.ViewComponent
73
- }, props));
74
- }
67
+ children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactRouterDom.Switch, {
68
+ children: [children, /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactRouterDom.Route, {
69
+ path: "".concat(path, "/:id"),
70
+ render: function render(innerProps) {
71
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_SASQViewComponent.default, _objectSpread(_objectSpread({}, innerProps), {}, {
72
+ fetchParameters: fetchParameters,
73
+ path: path,
74
+ ViewComponent: props.ViewComponent
75
+ }, props));
76
+ }
77
+ })]
75
78
  })
76
79
  }));
77
80
  }
@@ -79,6 +82,7 @@ var SASQRoute = function SASQRoute(_ref) {
79
82
  };
80
83
 
81
84
  SASQRoute.propTypes = {
85
+ children: _propTypes.default.oneOfType([_propTypes.default.node, _propTypes.default.element, _propTypes.default.func]),
82
86
  fetchParameters: _propTypes.default.object,
83
87
  path: _propTypes.default.string,
84
88
  ViewComponent: _propTypes.default.oneOfType([_propTypes.default.func, _propTypes.default.node])
@@ -15,7 +15,8 @@ var _core = require("@folio/stripes/core");
15
15
 
16
16
  var _jsxRuntime = require("react/jsx-runtime");
17
17
 
18
- var _excluded = ["fetchParameters", "history", "location", "match", "path", "ViewComponent"];
18
+ var _excluded = ["fetchParameters", "history", "location", "match", "path", "ViewComponent"],
19
+ _excluded2 = ["data"];
19
20
 
20
21
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
21
22
 
@@ -64,17 +65,19 @@ var SASQViewComponent = function SASQViewComponent(_ref) {
64
65
  enabled: !!(match !== null && match !== void 0 && (_match$params3 = match.params) !== null && _match$params3 !== void 0 && _match$params3.id)
65
66
  }),
66
67
  _useQuery$data = _useQuery.data,
67
- data = _useQuery$data === void 0 ? {} : _useQuery$data;
68
+ data = _useQuery$data === void 0 ? {} : _useQuery$data,
69
+ rest = _objectWithoutProperties(_useQuery, _excluded2);
68
70
 
69
71
  return /*#__PURE__*/(0, _jsxRuntime.jsx)(ViewComponent, _objectSpread({
70
72
  onClose: function onClose() {
71
73
  return history.push("".concat(path).concat(location.search));
72
74
  },
75
+ queryProps: _objectSpread({}, rest),
73
76
  resource: data
74
77
  }, props));
75
78
  };
76
79
 
77
- __signature__(SASQViewComponent, "useNamespace{{ 0: namespace }}\nuseOkapiKy{ky}\nuseQuery{{ data = {} }}", function () {
80
+ __signature__(SASQViewComponent, "useNamespace{{ 0: namespace }}\nuseOkapiKy{ky}\nuseQuery{{ data = {}, ...rest }}", function () {
78
81
  return [_core.useNamespace, _core.useOkapiKy, _reactQuery.useQuery];
79
82
  });
80
83