@k-int/stripes-kint-components 1.7.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/es/index.js +43 -8
- package/es/lib/ActionList/ActionList.js +48 -28
- package/es/lib/ActionList/ActionListFieldArray.js +52 -16
- package/es/lib/CustomProperties/Config/CustomPropertiesLookup.js +198 -0
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +321 -0
- package/es/lib/CustomProperties/Config/CustomPropertiesView.js +166 -0
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +357 -0
- package/es/lib/CustomProperties/Config/index.js +41 -0
- package/es/lib/FormModal/FormModal.js +126 -0
- package/es/lib/{TypeDown → FormModal}/index.js +2 -2
- package/es/lib/NoResultsMessage/NoResultsMessage.js +1 -1
- package/es/lib/Typedown/Typedown.js +44 -13
- package/es/lib/constants/customProperties.js +60 -0
- package/es/lib/hooks/index.js +16 -0
- package/es/lib/hooks/useCustomProperties.js +112 -0
- package/es/lib/hooks/useMutateCustomProperties.js +143 -0
- package/package.json +4 -2
- package/src/index.js +11 -4
- package/src/lib/ActionList/ActionList.js +30 -23
- package/src/lib/ActionList/ActionListFieldArray.js +36 -2
- package/src/lib/ActionList/README.md +4 -1
- package/src/lib/CustomProperties/Config/CustomPropertiesLookup.js +111 -0
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +237 -0
- package/src/lib/CustomProperties/Config/CustomPropertiesView.js +150 -0
- package/src/lib/CustomProperties/Config/CustomPropertyForm.js +295 -0
- package/src/lib/CustomProperties/Config/index.js +4 -0
- package/src/lib/FormModal/FormModal.js +71 -0
- package/src/lib/FormModal/index.js +1 -0
- package/src/lib/NoResultsMessage/NoResultsMessage.js +2 -2
- package/src/lib/Typedown/Typedown.js +50 -8
- package/src/lib/constants/customProperties.js +9 -0
- package/src/lib/hooks/index.js +2 -0
- package/src/lib/hooks/useCustomProperties.js +73 -0
- package/src/lib/hooks/useMutateCustomProperties.js +62 -0
- package/translations/stripes-kint-components/en.json +47 -1
- package/yarn-error.log +14118 -0
- 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/es/lib/TypeDown/TypeDown.js +0 -251
- 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
- package/src/lib/TypeDown/README.md +0 -1
- package/src/lib/TypeDown/TypeDown.js +0 -228
- package/src/lib/TypeDown/index.js +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
## 2.0.0 2022-03-04
|
|
2
|
+
* ActionList updates
|
|
3
|
+
* Formatter now accepted, will apply while not editing a row
|
|
4
|
+
* MCL props not specified in prop list will be passed directly to MCL
|
|
5
|
+
* fieldComponents prop allows for rendering of a custom Field for use in editing a specific field on a row
|
|
6
|
+
* Removed deprecated TypeDown component (replaced by Typedown in v1.3.0)
|
|
7
|
+
* Typedown
|
|
8
|
+
* Added isSelected prop
|
|
9
|
+
* Added id prop
|
|
10
|
+
* Added label prop
|
|
11
|
+
* Added required prop
|
|
12
|
+
* Added endOfList prop
|
|
13
|
+
* FormModal component
|
|
14
|
+
* Custom Property configuration components
|
|
15
|
+
* CustomPropertiesLookup
|
|
16
|
+
* CustomPropertiesView
|
|
17
|
+
* CustomPropertiesSettings
|
|
18
|
+
* Added jest artifacts one level below root to gitignore
|
|
1
19
|
## 1.7.0 Released 20th January 2022
|
|
2
20
|
* EditableRefdataList fixes and sorting
|
|
3
21
|
* Fixes to create action in actionlist
|
package/es/index.js
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
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
|
+
|
|
3
5
|
Object.defineProperty(exports, "__esModule", {
|
|
4
6
|
value: true
|
|
5
7
|
});
|
|
@@ -9,6 +11,24 @@ Object.defineProperty(exports, "ActionList", {
|
|
|
9
11
|
return _ActionList.default;
|
|
10
12
|
}
|
|
11
13
|
});
|
|
14
|
+
Object.defineProperty(exports, "CustomPropertiesLookup", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function get() {
|
|
17
|
+
return _Config.CustomPropertiesLookup;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "CustomPropertiesSettings", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function get() {
|
|
23
|
+
return _Config.CustomPropertiesSettings;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "CustomPropertiesView", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function get() {
|
|
29
|
+
return _Config.CustomPropertiesView;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
12
32
|
Object.defineProperty(exports, "EditableRefdataList", {
|
|
13
33
|
enumerable: true,
|
|
14
34
|
get: function get() {
|
|
@@ -75,18 +95,13 @@ Object.defineProperty(exports, "SettingsContext", {
|
|
|
75
95
|
return _contexts.SettingsContext;
|
|
76
96
|
}
|
|
77
97
|
});
|
|
78
|
-
Object.defineProperty(exports, "TypeDown", {
|
|
79
|
-
enumerable: true,
|
|
80
|
-
get: function get() {
|
|
81
|
-
return _TypeDown.default;
|
|
82
|
-
}
|
|
83
|
-
});
|
|
84
98
|
Object.defineProperty(exports, "Typedown", {
|
|
85
99
|
enumerable: true,
|
|
86
100
|
get: function get() {
|
|
87
101
|
return _Typedown.default;
|
|
88
102
|
}
|
|
89
103
|
});
|
|
104
|
+
exports.customPropertyContants = void 0;
|
|
90
105
|
Object.defineProperty(exports, "generateKiwtQuery", {
|
|
91
106
|
enumerable: true,
|
|
92
107
|
get: function get() {
|
|
@@ -117,6 +132,12 @@ Object.defineProperty(exports, "useActiveElement", {
|
|
|
117
132
|
return _hooks.useActiveElement;
|
|
118
133
|
}
|
|
119
134
|
});
|
|
135
|
+
Object.defineProperty(exports, "useCustomProperties", {
|
|
136
|
+
enumerable: true,
|
|
137
|
+
get: function get() {
|
|
138
|
+
return _hooks.useCustomProperties;
|
|
139
|
+
}
|
|
140
|
+
});
|
|
120
141
|
Object.defineProperty(exports, "useHelperApp", {
|
|
121
142
|
enumerable: true,
|
|
122
143
|
get: function get() {
|
|
@@ -141,6 +162,12 @@ Object.defineProperty(exports, "useLocalStorageState", {
|
|
|
141
162
|
return _hooks.useLocalStorageState;
|
|
142
163
|
}
|
|
143
164
|
});
|
|
165
|
+
Object.defineProperty(exports, "useMutateCustomProperties", {
|
|
166
|
+
enumerable: true,
|
|
167
|
+
get: function get() {
|
|
168
|
+
return _hooks.useMutateCustomProperties;
|
|
169
|
+
}
|
|
170
|
+
});
|
|
144
171
|
Object.defineProperty(exports, "useMutateRefdataValue", {
|
|
145
172
|
enumerable: true,
|
|
146
173
|
get: function get() {
|
|
@@ -184,8 +211,6 @@ var _ActionList = _interopRequireDefault(require("./lib/ActionList"));
|
|
|
184
211
|
|
|
185
212
|
var _EditableRefdataList = _interopRequireDefault(require("./lib/EditableRefdataList"));
|
|
186
213
|
|
|
187
|
-
var _TypeDown = _interopRequireDefault(require("./lib/TypeDown"));
|
|
188
|
-
|
|
189
214
|
var _Typedown = _interopRequireDefault(require("./lib/Typedown"));
|
|
190
215
|
|
|
191
216
|
var _QueryTypedown = _interopRequireDefault(require("./lib/QueryTypedown"));
|
|
@@ -202,6 +227,16 @@ var _NoResultsMessage = _interopRequireDefault(require("./lib/NoResultsMessage")
|
|
|
202
227
|
|
|
203
228
|
var _RefdataButtons = _interopRequireDefault(require("./lib/RefdataButtons"));
|
|
204
229
|
|
|
230
|
+
var _Config = require("./lib/CustomProperties/Config");
|
|
231
|
+
|
|
232
|
+
var _customPropertyContants = _interopRequireWildcard(require("./lib/constants/customProperties"));
|
|
233
|
+
|
|
234
|
+
exports.customPropertyContants = _customPropertyContants;
|
|
235
|
+
|
|
236
|
+
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
237
|
+
|
|
238
|
+
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
239
|
+
|
|
205
240
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
206
241
|
|
|
207
242
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
@@ -19,6 +19,8 @@ var _ActionListFieldArray = _interopRequireDefault(require("./ActionListFieldArr
|
|
|
19
19
|
|
|
20
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
21
|
|
|
22
|
+
var _excluded = ["actionAssigner", "actionCalls", "columnMapping", "contentData", "creatableFields", "editableFields", "fieldComponents", "visibleFields"];
|
|
23
|
+
|
|
22
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
23
25
|
|
|
24
26
|
(function () {
|
|
@@ -26,6 +28,16 @@ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { de
|
|
|
26
28
|
enterModule && enterModule(module);
|
|
27
29
|
})();
|
|
28
30
|
|
|
31
|
+
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; }
|
|
32
|
+
|
|
33
|
+
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; }
|
|
34
|
+
|
|
35
|
+
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; }
|
|
36
|
+
|
|
37
|
+
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; }
|
|
38
|
+
|
|
39
|
+
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; }
|
|
40
|
+
|
|
29
41
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
30
42
|
return a;
|
|
31
43
|
};
|
|
@@ -37,6 +49,7 @@ var propTypes = {
|
|
|
37
49
|
contentData: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
38
50
|
creatableFields: _propTypes.default.object,
|
|
39
51
|
editableFields: _propTypes.default.object,
|
|
52
|
+
fieldComponents: _propTypes.default.object,
|
|
40
53
|
visibleFields: _propTypes.default.arrayOf(_propTypes.default.string)
|
|
41
54
|
};
|
|
42
55
|
|
|
@@ -50,34 +63,41 @@ var ActionList = function ActionList(_ref) {
|
|
|
50
63
|
creatableFields = _ref$creatableFields === void 0 ? {} : _ref$creatableFields,
|
|
51
64
|
_ref$editableFields = _ref.editableFields,
|
|
52
65
|
editableFields = _ref$editableFields === void 0 ? {} : _ref$editableFields,
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
66
|
+
_ref$fieldComponents = _ref.fieldComponents,
|
|
67
|
+
fieldComponents = _ref$fieldComponents === void 0 ? {} : _ref$fieldComponents,
|
|
68
|
+
visibleFields = _ref.visibleFields,
|
|
69
|
+
mclProps = _objectWithoutProperties(_ref, _excluded);
|
|
70
|
+
|
|
71
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
72
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Form, {
|
|
73
|
+
enableReinitialize: true,
|
|
74
|
+
initialValues: {
|
|
75
|
+
contentData: contentData
|
|
76
|
+
},
|
|
77
|
+
mutators: _finalFormArrays.default,
|
|
78
|
+
onSubmit: actionCalls.edit,
|
|
79
|
+
subscription: {
|
|
80
|
+
contentData: true
|
|
81
|
+
},
|
|
82
|
+
children: function children() {
|
|
83
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)("form", {
|
|
84
|
+
onSubmit: function onSubmit(e) {
|
|
85
|
+
e.preventDefault();
|
|
86
|
+
},
|
|
87
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalFormArrays.FieldArray, _objectSpread({
|
|
88
|
+
actionAssigner: actionAssigner,
|
|
89
|
+
actionCalls: actionCalls,
|
|
90
|
+
columnMapping: columnMapping,
|
|
91
|
+
component: _ActionListFieldArray.default,
|
|
92
|
+
creatableFields: creatableFields,
|
|
93
|
+
editableFields: editableFields,
|
|
94
|
+
fieldComponents: fieldComponents,
|
|
95
|
+
name: "contentData",
|
|
96
|
+
visibleFields: visibleFields
|
|
97
|
+
}, mclProps))
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
})
|
|
81
101
|
});
|
|
82
102
|
};
|
|
83
103
|
|
|
@@ -23,9 +23,11 @@ var _ActionListFieldArray = _interopRequireDefault(require("../../../styles/Acti
|
|
|
23
23
|
|
|
24
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
25
|
|
|
26
|
-
var _excluded = ["
|
|
26
|
+
var _excluded = ["actionAssigner", "actionCalls", "columnMapping", "creatableFields", "editableFields", "fields", "fieldComponents", "visibleFields"],
|
|
27
27
|
_excluded2 = ["actionListActions"],
|
|
28
|
-
_excluded3 = ["actionListActions"]
|
|
28
|
+
_excluded3 = ["actionListActions"],
|
|
29
|
+
_excluded4 = ["actionListActions"],
|
|
30
|
+
_excluded5 = ["formatter"];
|
|
29
31
|
|
|
30
32
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
31
33
|
|
|
@@ -54,10 +56,6 @@ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { va
|
|
|
54
56
|
|
|
55
57
|
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; }
|
|
56
58
|
|
|
57
|
-
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; }
|
|
58
|
-
|
|
59
|
-
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; }
|
|
60
|
-
|
|
61
59
|
function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
|
|
62
60
|
|
|
63
61
|
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."); }
|
|
@@ -70,6 +68,10 @@ function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Sy
|
|
|
70
68
|
|
|
71
69
|
function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
72
70
|
|
|
71
|
+
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; }
|
|
72
|
+
|
|
73
|
+
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; }
|
|
74
|
+
|
|
73
75
|
var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
|
|
74
76
|
return a;
|
|
75
77
|
};
|
|
@@ -84,6 +86,8 @@ var propTypes = {
|
|
|
84
86
|
creatableFields: _propTypes.default.object,
|
|
85
87
|
editableFields: _propTypes.default.object,
|
|
86
88
|
fields: _propTypes.default.object,
|
|
89
|
+
fieldComponents: _propTypes.default.object,
|
|
90
|
+
formatter: _propTypes.default.object,
|
|
87
91
|
visibleFields: _propTypes.default.arrayOf(_propTypes.default.string)
|
|
88
92
|
};
|
|
89
93
|
|
|
@@ -94,7 +98,9 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
94
98
|
creatableFields = _ref.creatableFields,
|
|
95
99
|
editableFields = _ref.editableFields,
|
|
96
100
|
fields = _ref.fields,
|
|
97
|
-
|
|
101
|
+
fieldComponents = _ref.fieldComponents,
|
|
102
|
+
visibleFields = _ref.visibleFields,
|
|
103
|
+
mclProps = _objectWithoutProperties(_ref, _excluded);
|
|
98
104
|
|
|
99
105
|
// Grab finalForm functions/values from form hooks
|
|
100
106
|
var _useForm = (0, _reactFinalForm.useForm)(),
|
|
@@ -128,7 +134,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
128
134
|
var handleSave = function handleSave(index) {
|
|
129
135
|
var _fields$value$index = fields.value[index],
|
|
130
136
|
_a = _fields$value$index.actionListActions,
|
|
131
|
-
rowData = _objectWithoutProperties(_fields$value$index,
|
|
137
|
+
rowData = _objectWithoutProperties(_fields$value$index, _excluded2);
|
|
132
138
|
|
|
133
139
|
actionCalls.edit(rowData);
|
|
134
140
|
};
|
|
@@ -136,7 +142,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
136
142
|
var handleCreate = function handleCreate(index) {
|
|
137
143
|
var _fields$value$index2 = fields.value[index],
|
|
138
144
|
_a = _fields$value$index2.actionListActions,
|
|
139
|
-
rowData = _objectWithoutProperties(_fields$value$index2,
|
|
145
|
+
rowData = _objectWithoutProperties(_fields$value$index2, _excluded3);
|
|
140
146
|
|
|
141
147
|
actionCalls.create(rowData);
|
|
142
148
|
};
|
|
@@ -158,7 +164,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
158
164
|
var fieldName = "contentData[".concat(data.rowIndex, "]");
|
|
159
165
|
|
|
160
166
|
var actions = data.actionListActions,
|
|
161
|
-
rest = _objectWithoutProperties(data,
|
|
167
|
+
rest = _objectWithoutProperties(data, _excluded4);
|
|
162
168
|
|
|
163
169
|
if (data.id === editing || !data.id && editing === 'NEW_ROW') {
|
|
164
170
|
// Render the save/cancel buttons
|
|
@@ -269,10 +275,16 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
269
275
|
*/
|
|
270
276
|
|
|
271
277
|
if (!cd.id && createFunction(cd) || editFunction(cd)) {
|
|
272
|
-
returnObj[key] =
|
|
278
|
+
returnObj[key] = fieldComponents[key] ? fieldComponents[key]({
|
|
279
|
+
name: "".concat(fieldName, ".").concat(key)
|
|
280
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
|
|
273
281
|
autofocus: fieldIndex === 0,
|
|
274
282
|
component: _components.TextField,
|
|
275
|
-
|
|
283
|
+
marginBottom0: true,
|
|
284
|
+
name: "".concat(fieldName, ".").concat(key),
|
|
285
|
+
parse: function parse(v) {
|
|
286
|
+
return v;
|
|
287
|
+
}
|
|
276
288
|
});
|
|
277
289
|
}
|
|
278
290
|
}
|
|
@@ -287,6 +299,30 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
287
299
|
});
|
|
288
300
|
};
|
|
289
301
|
|
|
302
|
+
var formatter = mclProps.formatter,
|
|
303
|
+
restOfMclProps = _objectWithoutProperties(mclProps, _excluded5); // Destructure formatter part of mclProps
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
var fieldAwareFormatter = function fieldAwareFormatter() {
|
|
307
|
+
var returnObj = {}; // For each visible field, if it's being edited then ignore passed formatters, else use them
|
|
308
|
+
|
|
309
|
+
visibleFields.forEach(function (key) {
|
|
310
|
+
returnObj[key] = function (cd) {
|
|
311
|
+
// Row is being edited if it has no id, or its id is in the editing string
|
|
312
|
+
var editingRow = cd.id === editing || !cd.id; // If not editing, use the passed formatter values
|
|
313
|
+
|
|
314
|
+
var returnValue = cd[key];
|
|
315
|
+
|
|
316
|
+
if (!editingRow && formatter[key]) {
|
|
317
|
+
returnValue = formatter[key](cd);
|
|
318
|
+
}
|
|
319
|
+
|
|
320
|
+
return returnValue;
|
|
321
|
+
};
|
|
322
|
+
});
|
|
323
|
+
return returnObj;
|
|
324
|
+
};
|
|
325
|
+
|
|
290
326
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
291
327
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
292
328
|
buttonClass: _ActionListFieldArray.default.buttonRight,
|
|
@@ -298,7 +334,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
298
334
|
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
299
335
|
id: "stripes-kint-components.actionList.create"
|
|
300
336
|
})
|
|
301
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MultiColumnList, {
|
|
337
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MultiColumnList, _objectSpread({
|
|
302
338
|
columnMapping: _objectSpread(_objectSpread({}, columnMapping), {}, {
|
|
303
339
|
actionListActions: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
304
340
|
id: "stripes-kint-components.actionList.actions"
|
|
@@ -306,12 +342,12 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
306
342
|
}),
|
|
307
343
|
columnWidths: getColumnWidths(),
|
|
308
344
|
contentData: formatContent(),
|
|
309
|
-
formatter: {
|
|
345
|
+
formatter: _objectSpread({
|
|
310
346
|
actionListActions: renderActionButtons
|
|
311
|
-
},
|
|
347
|
+
}, fieldAwareFormatter()),
|
|
312
348
|
interactive: false,
|
|
313
349
|
visibleColumns: [].concat(_toConsumableArray(visibleFields), ['actionListActions'])
|
|
314
|
-
})]
|
|
350
|
+
}, restOfMclProps))]
|
|
315
351
|
});
|
|
316
352
|
};
|
|
317
353
|
|
|
@@ -0,0 +1,198 @@
|
|
|
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 _debounce = _interopRequireDefault(require("lodash/debounce"));
|
|
15
|
+
|
|
16
|
+
var _components = require("@folio/stripes/components");
|
|
17
|
+
|
|
18
|
+
var _SearchField = _interopRequireDefault(require("../../SearchField"));
|
|
19
|
+
|
|
20
|
+
var _hooks = require("../../hooks");
|
|
21
|
+
|
|
22
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
23
|
+
|
|
24
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
|
+
|
|
26
|
+
(function () {
|
|
27
|
+
var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
|
|
28
|
+
enterModule && enterModule(module);
|
|
29
|
+
})();
|
|
30
|
+
|
|
31
|
+
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; }
|
|
32
|
+
|
|
33
|
+
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; }
|
|
34
|
+
|
|
35
|
+
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; }
|
|
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 DEBOUNCE_TIME = 500;
|
|
54
|
+
|
|
55
|
+
var CustomPropertiesLookup = function CustomPropertiesLookup(_ref) {
|
|
56
|
+
var _labelOverrides$label, _labelOverrides$prima, _labelOverrides$ctx, _labelOverrides$weigh, _labelOverrides$type, _labelOverrides$categ;
|
|
57
|
+
|
|
58
|
+
var contextFilterOptions = _ref.contextFilterOptions,
|
|
59
|
+
endpoint = _ref.customPropertiesEndpoint,
|
|
60
|
+
labelOverrides = _ref.labelOverrides,
|
|
61
|
+
mclProps = _ref.mclProps,
|
|
62
|
+
onSelectCustomProperty = _ref.onSelectCustomProperty,
|
|
63
|
+
queryParams = _ref.queryParams;
|
|
64
|
+
|
|
65
|
+
var _useState = (0, _react.useState)({
|
|
66
|
+
sort: 'id'
|
|
67
|
+
}),
|
|
68
|
+
_useState2 = _slicedToArray(_useState, 2),
|
|
69
|
+
nsValues = _useState2[0],
|
|
70
|
+
setNsValues = _useState2[1];
|
|
71
|
+
|
|
72
|
+
var _useState3 = (0, _react.useState)(),
|
|
73
|
+
_useState4 = _slicedToArray(_useState3, 2),
|
|
74
|
+
selectedContext = _useState4[0],
|
|
75
|
+
setSelectedContext = _useState4[1];
|
|
76
|
+
|
|
77
|
+
var _useCustomProperties = (0, _hooks.useCustomProperties)({
|
|
78
|
+
endpoint: endpoint,
|
|
79
|
+
nsValues: nsValues,
|
|
80
|
+
queryParams: queryParams,
|
|
81
|
+
returnQueryObject: true,
|
|
82
|
+
ctx: selectedContext
|
|
83
|
+
}),
|
|
84
|
+
custprops = _useCustomProperties.data,
|
|
85
|
+
isLoading = _useCustomProperties.isLoading;
|
|
86
|
+
|
|
87
|
+
var handleSearch = (0, _debounce.default)(function (query) {
|
|
88
|
+
setNsValues(_objectSpread(_objectSpread({}, nsValues), {}, {
|
|
89
|
+
query: query
|
|
90
|
+
}));
|
|
91
|
+
}, DEBOUNCE_TIME);
|
|
92
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
93
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_SearchField.default, {
|
|
94
|
+
fullWidth: true,
|
|
95
|
+
onChange: function onChange(e) {
|
|
96
|
+
return handleSearch(e.target.value);
|
|
97
|
+
}
|
|
98
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Row, {
|
|
99
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
|
|
100
|
+
xs: 6,
|
|
101
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Select, {
|
|
102
|
+
dataOptions: contextFilterOptions,
|
|
103
|
+
onChange: function onChange(e) {
|
|
104
|
+
setSelectedContext(e.target.value);
|
|
105
|
+
},
|
|
106
|
+
value: selectedContext
|
|
107
|
+
})
|
|
108
|
+
})
|
|
109
|
+
}), isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Spinner, {}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.MultiColumnList, _objectSpread({
|
|
110
|
+
columnMapping: {
|
|
111
|
+
'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, {
|
|
112
|
+
id: "stripes-kint-components.customProperties.label"
|
|
113
|
+
}),
|
|
114
|
+
'primary': (_labelOverrides$prima = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.primary) !== null && _labelOverrides$prima !== void 0 ? _labelOverrides$prima : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
115
|
+
id: "stripes-kint-components.customProperties.primary"
|
|
116
|
+
}),
|
|
117
|
+
'ctx': (_labelOverrides$ctx = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.ctx) !== null && _labelOverrides$ctx !== void 0 ? _labelOverrides$ctx : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
118
|
+
id: "stripes-kint-components.customProperties.ctx"
|
|
119
|
+
}),
|
|
120
|
+
'weight': (_labelOverrides$weigh = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.weight) !== null && _labelOverrides$weigh !== void 0 ? _labelOverrides$weigh : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
121
|
+
id: "stripes-kint-components.customProperties.weight"
|
|
122
|
+
}),
|
|
123
|
+
'type': (_labelOverrides$type = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.type) !== null && _labelOverrides$type !== void 0 ? _labelOverrides$type : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
124
|
+
id: "stripes-kint-components.customProperties.type"
|
|
125
|
+
}),
|
|
126
|
+
'category': (_labelOverrides$categ = labelOverrides === null || labelOverrides === void 0 ? void 0 : labelOverrides.category) !== null && _labelOverrides$categ !== void 0 ? _labelOverrides$categ : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
127
|
+
id: "stripes-kint-components.customProperties.category"
|
|
128
|
+
})
|
|
129
|
+
},
|
|
130
|
+
contentData: custprops,
|
|
131
|
+
formatter: {
|
|
132
|
+
primary: function primary(data) {
|
|
133
|
+
if (data !== null && data !== void 0 && data.primary) {
|
|
134
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
135
|
+
id: "stripes-kint-components.yes"
|
|
136
|
+
});
|
|
137
|
+
} else {
|
|
138
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
139
|
+
id: "stripes-kint-components.no"
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
},
|
|
143
|
+
type: function type(data) {
|
|
144
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
|
|
145
|
+
id: "stripes-kint-components.customProperties.type.".concat(data === null || data === void 0 ? void 0 : data.type)
|
|
146
|
+
});
|
|
147
|
+
},
|
|
148
|
+
category: function category(data) {
|
|
149
|
+
var _data$category;
|
|
150
|
+
|
|
151
|
+
return data === null || data === void 0 ? void 0 : (_data$category = data.category) === null || _data$category === void 0 ? void 0 : _data$category.desc;
|
|
152
|
+
}
|
|
153
|
+
},
|
|
154
|
+
onRowClick: onSelectCustomProperty,
|
|
155
|
+
visibleColumns: ['label', 'primary', 'ctx', 'weight', 'type', 'category']
|
|
156
|
+
}, mclProps))]
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
|
|
160
|
+
__signature__(CustomPropertiesLookup, "useState{[nsValues, setNsValues]({\n sort: 'id'\n })}\nuseState{[selectedContext, setSelectedContext]}\nuseCustomProperties{{ data: custprops, isLoading }}", function () {
|
|
161
|
+
return [_hooks.useCustomProperties];
|
|
162
|
+
});
|
|
163
|
+
|
|
164
|
+
CustomPropertiesLookup.propTypes = {
|
|
165
|
+
contextFilterOptions: _propTypes.default.arrayOf(_propTypes.default.shape({
|
|
166
|
+
value: _propTypes.default.string,
|
|
167
|
+
label: _propTypes.default.oneOfType([_propTypes.default.element, _propTypes.default.string])
|
|
168
|
+
})),
|
|
169
|
+
customPropertiesEndpoint: _propTypes.default.string,
|
|
170
|
+
labelOverrides: _propTypes.default.object,
|
|
171
|
+
mclProps: _propTypes.default.object,
|
|
172
|
+
onSelectCustomProperty: _propTypes.default.func,
|
|
173
|
+
queryParams: _propTypes.default.object,
|
|
174
|
+
refdataEndpoint: _propTypes.default.string
|
|
175
|
+
};
|
|
176
|
+
var _default = CustomPropertiesLookup;
|
|
177
|
+
var _default2 = _default;
|
|
178
|
+
exports.default = _default2;
|
|
179
|
+
;
|
|
180
|
+
|
|
181
|
+
(function () {
|
|
182
|
+
var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
|
|
183
|
+
|
|
184
|
+
if (!reactHotLoader) {
|
|
185
|
+
return;
|
|
186
|
+
}
|
|
187
|
+
|
|
188
|
+
reactHotLoader.register(DEBOUNCE_TIME, "DEBOUNCE_TIME", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertiesLookup.js");
|
|
189
|
+
reactHotLoader.register(CustomPropertiesLookup, "CustomPropertiesLookup", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertiesLookup.js");
|
|
190
|
+
reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Config/CustomPropertiesLookup.js");
|
|
191
|
+
})();
|
|
192
|
+
|
|
193
|
+
;
|
|
194
|
+
|
|
195
|
+
(function () {
|
|
196
|
+
var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
|
|
197
|
+
leaveModule && leaveModule(module);
|
|
198
|
+
})();
|