@k-int/stripes-kint-components 2.1.2 → 2.3.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 (207) hide show
  1. package/CHANGELOG.md +26 -4
  2. package/es/index.js +150 -4
  3. package/es/lib/ActionList/ActionList.js +10 -2
  4. package/es/lib/ActionList/ActionListFieldArray.js +53 -11
  5. package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +3 -2
  6. package/es/lib/CustomProperties/Config/CustomPropertyForm.js +88 -44
  7. package/es/lib/CustomProperties/Config/{CustomPropertiesView.js → CustomPropertyView.js} +27 -14
  8. package/es/lib/CustomProperties/Config/index.js +6 -4
  9. package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +72 -0
  10. package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +133 -0
  11. package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +279 -0
  12. package/es/lib/CustomProperties/Edit/CustomPropertyField.js +370 -0
  13. package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +156 -0
  14. package/es/lib/CustomProperties/Edit/index.js +51 -0
  15. package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +216 -0
  16. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +236 -0
  17. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +159 -0
  18. package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +119 -0
  19. package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +173 -0
  20. package/es/lib/CustomProperties/Filter/index.js +59 -0
  21. package/es/lib/CustomProperties/Filter/useOperators.js +138 -0
  22. package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +97 -0
  23. package/es/lib/CustomProperties/Filter/useValueProps.js +101 -0
  24. package/es/lib/CustomProperties/View/CustomPropertiesView.js +73 -0
  25. package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +187 -0
  26. package/es/lib/CustomProperties/View/CustomPropertyCard.js +204 -0
  27. package/es/lib/CustomProperties/View/index.js +35 -0
  28. package/es/lib/CustomProperties/index.js +125 -0
  29. package/es/lib/EditableRefdataList/EditableRefdataList.js +12 -16
  30. package/es/lib/FormModal/FormModal.js +20 -11
  31. package/es/lib/QueryTypedown/QueryTypedown.js +9 -4
  32. package/es/lib/constants/customProperties.js +4 -1
  33. package/es/lib/hooks/index.js +16 -0
  34. package/es/lib/hooks/typedownHooks/useTypedownData.js +9 -2
  35. package/es/lib/hooks/useAvailableCustomProperties.js +106 -0
  36. package/es/lib/hooks/useInvalidateRefdata.js +53 -0
  37. package/es/lib/hooks/useMutateRefdataValue.js +11 -6
  38. package/es/lib/hooks/useRefdata.js +1 -3
  39. package/es/lib/utils/groupCustomPropertiesByCtx.js +69 -0
  40. package/es/lib/utils/index.js +24 -0
  41. package/es/lib/utils/refdataQueryKey.js +48 -0
  42. package/es/lib/utils/typedownQueryKey.js +48 -0
  43. package/es/lib/utils/validators.js +160 -0
  44. package/git_translate.sh +8 -0
  45. package/junit.xml +38 -38
  46. package/package.json +1 -1
  47. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +11 -2
  48. package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +25 -13
  49. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +3 -3
  50. package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
  51. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +1 -1
  52. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +5 -2
  53. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesView.js.html +75 -9
  54. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +195 -33
  55. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +10 -10
  56. package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
  57. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +1 -1
  58. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +1 -1
  59. package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
  60. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +1 -1
  61. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +1 -1
  62. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +1 -1
  63. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +1 -1
  64. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +1 -1
  65. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +1 -1
  66. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
  67. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +1 -1
  68. package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
  69. package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +7 -22
  70. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +7 -7
  71. package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
  72. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +1 -1
  73. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
  74. package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
  75. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
  76. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
  77. package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
  78. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +1 -1
  79. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
  80. package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
  81. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +1 -1
  82. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +1 -1
  83. package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
  84. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +1 -1
  85. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
  86. package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
  87. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +1 -1
  88. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
  89. package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
  90. package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
  91. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
  92. package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
  93. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +1 -1
  94. package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +1 -1
  95. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +1 -1
  96. package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
  97. package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +1 -1
  98. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
  99. package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
  100. package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +1 -1
  101. package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
  102. package/src/artifacts/coverage-jest/lcov-report/constants/index.html +1 -1
  103. package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +1 -1
  104. package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
  105. package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
  106. package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +1 -1
  107. package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +1 -1
  108. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +1 -1
  109. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
  110. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +1 -1
  111. package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +1 -1
  112. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
  113. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
  114. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
  115. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
  116. package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
  117. package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +1 -1
  118. package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +1 -1
  119. package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +1 -1
  120. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +1 -1
  121. package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +1 -1
  122. package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +1 -1
  123. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +1 -1
  124. package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +1 -1
  125. package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +1 -1
  126. package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +1 -1
  127. package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +1 -1
  128. package/src/artifacts/coverage-jest/lcov-report/index.html +27 -27
  129. package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
  130. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +1 -1
  131. package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +16 -10
  132. package/src/artifacts/coverage-jest/lcov-report/utils/index.html +24 -9
  133. package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +1 -1
  134. package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
  135. package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +1 -1
  136. package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +1 -1
  137. package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +1 -1
  138. package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +1 -1
  139. package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +202 -0
  140. package/src/artifacts/coverage-jest/lcov.info +366 -296
  141. package/src/index.js +35 -3
  142. package/src/lib/ActionList/ActionList.js +8 -2
  143. package/src/lib/ActionList/ActionListFieldArray.js +44 -17
  144. package/src/lib/ActionList/README.md +24 -20
  145. package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +3 -2
  146. package/src/lib/CustomProperties/Config/CustomPropertyForm.js +77 -23
  147. package/src/lib/CustomProperties/Config/{CustomPropertiesView.js → CustomPropertyView.js} +31 -9
  148. package/src/lib/CustomProperties/Config/index.js +1 -1
  149. package/src/lib/CustomProperties/Edit/CustomPropertiesEdit.js +35 -0
  150. package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +85 -0
  151. package/src/lib/CustomProperties/Edit/CustomPropertiesListField.js +194 -0
  152. package/src/lib/CustomProperties/Edit/CustomPropertyField.js +299 -0
  153. package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.js +131 -0
  154. package/src/lib/CustomProperties/Edit/index.js +5 -0
  155. package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.js +125 -0
  156. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +148 -0
  157. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +113 -0
  158. package/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +74 -0
  159. package/src/lib/CustomProperties/Filter/CustomPropertiesRule.js +122 -0
  160. package/src/lib/CustomProperties/Filter/index.js +6 -0
  161. package/src/lib/CustomProperties/Filter/useOperators.js +55 -0
  162. package/src/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +35 -0
  163. package/src/lib/CustomProperties/Filter/useValueProps.js +45 -0
  164. package/src/lib/CustomProperties/View/CustomPropertiesView.js +36 -0
  165. package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.js +112 -0
  166. package/src/lib/CustomProperties/View/CustomPropertyCard.js +177 -0
  167. package/src/lib/CustomProperties/View/index.js +3 -0
  168. package/src/lib/CustomProperties/index.js +30 -0
  169. package/src/lib/EditableRefdataList/EditableRefdataList.js +13 -10
  170. package/src/lib/FormModal/FormModal.js +37 -22
  171. package/src/lib/QueryTypedown/QueryTypedown.js +3 -1
  172. package/src/lib/constants/customProperties.js +1 -0
  173. package/src/lib/hooks/index.js +2 -0
  174. package/src/lib/hooks/typedownHooks/useTypedownData.js +9 -3
  175. package/src/lib/hooks/useAvailableCustomProperties.js +40 -0
  176. package/src/lib/hooks/useInvalidateRefdata.js +11 -0
  177. package/src/lib/hooks/useMutateRefdataValue.js +7 -3
  178. package/src/lib/hooks/useRefdata.js +2 -3
  179. package/src/lib/utils/generateKiwtQueryParams.js +2 -2
  180. package/src/lib/utils/groupCustomPropertiesByCtx.js +13 -0
  181. package/src/lib/utils/index.js +5 -0
  182. package/src/lib/utils/refdataQueryKey.js +9 -0
  183. package/src/lib/utils/typedownQueryKey.js +9 -0
  184. package/src/lib/utils/validators.js +79 -0
  185. package/translate.sh +63 -0
  186. package/translations/stripes-kint-components/ar.json +105 -0
  187. package/translations/stripes-kint-components/ca.json +1 -0
  188. package/translations/stripes-kint-components/cs_CZ.json +105 -0
  189. package/translations/stripes-kint-components/da.json +1 -0
  190. package/translations/stripes-kint-components/de.json +105 -0
  191. package/translations/stripes-kint-components/en.json +59 -2
  192. package/translations/stripes-kint-components/es.json +105 -0
  193. package/translations/stripes-kint-components/fr.json +105 -0
  194. package/translations/stripes-kint-components/he.json +1 -0
  195. package/translations/stripes-kint-components/hi_IN.json +105 -0
  196. package/translations/stripes-kint-components/hu.json +105 -0
  197. package/translations/stripes-kint-components/it_IT.json +105 -0
  198. package/translations/stripes-kint-components/ja.json +105 -0
  199. package/translations/stripes-kint-components/ko.json +105 -0
  200. package/translations/stripes-kint-components/nb.json +1 -0
  201. package/translations/stripes-kint-components/nn.json +1 -0
  202. package/translations/stripes-kint-components/pl.json +105 -0
  203. package/translations/stripes-kint-components/pt_PT.json +105 -0
  204. package/translations/stripes-kint-components/ru.json +105 -0
  205. package/translations/stripes-kint-components/sv.json +105 -0
  206. package/translations/stripes-kint-components/ur.json +1 -0
  207. package/translations/stripes-kint-components/zh_CN.json +105 -0
@@ -0,0 +1,159 @@
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 _reactIntl = require("react-intl");
11
+
12
+ var _reactFinalForm = require("react-final-form");
13
+
14
+ var _reactFinalFormArrays = require("react-final-form-arrays");
15
+
16
+ var _components = require("@folio/stripes/components");
17
+
18
+ var _CustomPropertiesFilterField = _interopRequireDefault(require("./CustomPropertiesFilterField"));
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
+ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
30
+ return a;
31
+ };
32
+
33
+ var CustomPropertiesFilterFieldArray = function CustomPropertiesFilterFieldArray(_ref) {
34
+ var _labelOverrides$addFi;
35
+
36
+ var customProperties = _ref.customProperties,
37
+ labelOverrides = _ref.labelOverrides;
38
+
39
+ var _useForm = (0, _reactFinalForm.useForm)(),
40
+ push = _useForm.mutators.push;
41
+
42
+ var getCardTitle = function getCardTitle(index) {
43
+ var _labelOverrides$custo;
44
+
45
+ if (labelOverrides.customPropertyFilter && typeof labelOverrides.customPropertyFilter === 'function') {
46
+ return labelOverrides.customPropertyFilter(index);
47
+ }
48
+
49
+ return (_labelOverrides$custo = labelOverrides.customPropertyFilter) !== null && _labelOverrides$custo !== void 0 ? _labelOverrides$custo : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
50
+ id: "stripes-kint-components.customProperty.filterIndex",
51
+ values: {
52
+ index: index + 1
53
+ }
54
+ });
55
+ };
56
+
57
+ var getTooltipText = function getTooltipText(index) {
58
+ var _labelOverrides$remov;
59
+
60
+ if (labelOverrides.removeFilter && typeof labelOverrides.removeFilter === 'function') {
61
+ return labelOverrides.removeFilter(index);
62
+ }
63
+
64
+ return (_labelOverrides$remov = labelOverrides.removeFilter) !== null && _labelOverrides$remov !== void 0 ? _labelOverrides$remov : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
65
+ id: "stripes-kint-components.customProperty.removeFilter",
66
+ values: {
67
+ number: index + 1
68
+ }
69
+ });
70
+ };
71
+
72
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
73
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalFormArrays.FieldArray, {
74
+ name: "filters",
75
+ children: function children(_ref2) {
76
+ var fields = _ref2.fields;
77
+ return fields.map(function (name, index) {
78
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
79
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Card, {
80
+ headerEnd: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Tooltip, {
81
+ id: "custom-property-filter-card-delete-[".concat(index, "]-tooltip"),
82
+ text: getTooltipText(index),
83
+ children: function children(_ref3) {
84
+ var ref = _ref3.ref,
85
+ ariaIds = _ref3.ariaIds;
86
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.IconButton, {
87
+ ref: ref,
88
+ "aria-labelledby": ariaIds.text,
89
+ icon: "trash",
90
+ id: "custom-property-filter-card-delete-[".concat(index, "]"),
91
+ onClick: function onClick() {
92
+ return fields.remove(index);
93
+ }
94
+ });
95
+ }
96
+ }),
97
+ headerStart: /*#__PURE__*/(0, _jsxRuntime.jsx)("strong", {
98
+ children: getCardTitle(index)
99
+ }),
100
+ marginBottom0: index !== fields.length - 1,
101
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomPropertiesFilterField.default, {
102
+ customProperties: customProperties,
103
+ fields: fields,
104
+ index: index,
105
+ labelOverrides: labelOverrides,
106
+ name: name
107
+ })
108
+ }, "custom-property-filter-card[".concat(index, "]")), index < fields.value.length - 1 && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Layout, {
109
+ className: "textCentered",
110
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
111
+ id: "stripes-kint-components.AND"
112
+ })
113
+ })]
114
+ });
115
+ });
116
+ }
117
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
118
+ onClick: function onClick() {
119
+ return push('filters', {
120
+ rules: [{}]
121
+ });
122
+ },
123
+ children: (_labelOverrides$addFi = labelOverrides.addFilter) !== null && _labelOverrides$addFi !== void 0 ? _labelOverrides$addFi : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
124
+ id: "stripes-kint-components.customProperty.addFilter"
125
+ })
126
+ })]
127
+ });
128
+ };
129
+
130
+ __signature__(CustomPropertiesFilterFieldArray, "useForm{{ mutators: { push } }}", function () {
131
+ return [_reactFinalForm.useForm];
132
+ });
133
+
134
+ CustomPropertiesFilterFieldArray.propTypes = {
135
+ customProperties: _propTypes.default.arrayOf(_propTypes.default.object),
136
+ labelOverrides: _propTypes.default.object
137
+ };
138
+ var _default = CustomPropertiesFilterFieldArray;
139
+ var _default2 = _default;
140
+ exports.default = _default2;
141
+ ;
142
+
143
+ (function () {
144
+ var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
145
+
146
+ if (!reactHotLoader) {
147
+ return;
148
+ }
149
+
150
+ reactHotLoader.register(CustomPropertiesFilterFieldArray, "CustomPropertiesFilterFieldArray", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js");
151
+ reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js");
152
+ })();
153
+
154
+ ;
155
+
156
+ (function () {
157
+ var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
158
+ leaveModule && leaveModule(module);
159
+ })();
@@ -0,0 +1,119 @@
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 _reactIntl = require("react-intl");
11
+
12
+ var _finalFormArrays = _interopRequireDefault(require("final-form-arrays"));
13
+
14
+ var _components = require("@folio/stripes/components");
15
+
16
+ var _FormModal = _interopRequireDefault(require("../../FormModal"));
17
+
18
+ var _CustomPropertiesFilterFieldArray = _interopRequireDefault(require("./CustomPropertiesFilterFieldArray"));
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 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; }
30
+
31
+ 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; }
32
+
33
+ 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; }
34
+
35
+ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
36
+ return a;
37
+ };
38
+
39
+ var CustomPropertyFiltersForm = function CustomPropertyFiltersForm(_ref) {
40
+ var _labelOverrides$editC, _labelOverrides$filte;
41
+
42
+ var customProperties = _ref.customProperties,
43
+ editingFilters = _ref.editingFilters,
44
+ filters = _ref.filters,
45
+ _ref$handlers = _ref.handlers,
46
+ closeEditModal = _ref$handlers.closeEditModal,
47
+ openEditModal = _ref$handlers.openEditModal,
48
+ labelOverrides = _ref.labelOverrides,
49
+ onSubmit = _ref.onSubmit;
50
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
51
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
52
+ onClick: openEditModal,
53
+ children: (_labelOverrides$editC = labelOverrides.editCustomPropertyFilters) !== null && _labelOverrides$editC !== void 0 ? _labelOverrides$editC : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
54
+ id: "stripes-kint-components.customProperty.editCustomPropertyFilters"
55
+ })
56
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_FormModal.default, {
57
+ initialValues: {
58
+ filters: filters.length ? filters : [{
59
+ rules: [{}]
60
+ }]
61
+ },
62
+ labelOverrides: {
63
+ save: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
64
+ id: "stripes-kint-components.apply"
65
+ })
66
+ },
67
+ modalProps: {
68
+ dismissible: true,
69
+ enforceFocus: false,
70
+ label: (_labelOverrides$filte = labelOverrides.filterBuilder) !== null && _labelOverrides$filte !== void 0 ? _labelOverrides$filte : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
71
+ id: "stripes-kint-components.customProperty.filterbuilder"
72
+ }),
73
+ onClose: closeEditModal,
74
+ open: editingFilters,
75
+ size: 'medium'
76
+ },
77
+ mutators: _objectSpread({}, _finalFormArrays.default),
78
+ onSubmit: onSubmit,
79
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomPropertiesFilterFieldArray.default, {
80
+ customProperties: customProperties,
81
+ labelOverrides: labelOverrides
82
+ })
83
+ })]
84
+ });
85
+ };
86
+
87
+ CustomPropertyFiltersForm.propTypes = {
88
+ customProperties: _propTypes.default.arrayOf(_propTypes.default.object),
89
+ editingFilters: _propTypes.default.bool,
90
+ filters: _propTypes.default.arrayOf(_propTypes.default.object),
91
+ handlers: _propTypes.default.shape({
92
+ closeEditModal: _propTypes.default.func.isRequired,
93
+ openEditModal: _propTypes.default.func.isRequired
94
+ }),
95
+ labelOverrides: _propTypes.default.object,
96
+ onSubmit: _propTypes.default.func.isRequired
97
+ };
98
+ var _default = CustomPropertyFiltersForm;
99
+ var _default2 = _default;
100
+ exports.default = _default2;
101
+ ;
102
+
103
+ (function () {
104
+ var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
105
+
106
+ if (!reactHotLoader) {
107
+ return;
108
+ }
109
+
110
+ reactHotLoader.register(CustomPropertyFiltersForm, "CustomPropertyFiltersForm", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js");
111
+ reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js");
112
+ })();
113
+
114
+ ;
115
+
116
+ (function () {
117
+ var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
118
+ leaveModule && leaveModule(module);
119
+ })();
@@ -0,0 +1,173 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+
8
+ var _uniqueId2 = _interopRequireDefault(require("lodash/uniqueId"));
9
+
10
+ var _react = _interopRequireDefault(require("react"));
11
+
12
+ var _propTypes = _interopRequireDefault(require("prop-types"));
13
+
14
+ var _reactIntl = require("react-intl");
15
+
16
+ var _reactFinalForm = require("react-final-form");
17
+
18
+ var _components = require("@folio/stripes/components");
19
+
20
+ var _validators = require("../../utils/validators");
21
+
22
+ var _useValueProps = _interopRequireDefault(require("./useValueProps"));
23
+
24
+ var _useOperators = _interopRequireDefault(require("./useOperators"));
25
+
26
+ var _jsxRuntime = require("react/jsx-runtime");
27
+
28
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
29
+
30
+ (function () {
31
+ var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
32
+ enterModule && enterModule(module);
33
+ })();
34
+
35
+ 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; }
36
+
37
+ 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; }
38
+
39
+ 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; }
40
+
41
+ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
42
+ return a;
43
+ };
44
+
45
+ var propTypes = {
46
+ ariaLabelledby: _propTypes.default.string.isRequired,
47
+ clearRuleValue: _propTypes.default.func.isRequired,
48
+ index: _propTypes.default.number.isRequired,
49
+ name: _propTypes.default.string.isRequired,
50
+ onDelete: _propTypes.default.func.isRequired,
51
+ custPropDefinition: _propTypes.default.shape({
52
+ type: _propTypes.default.string,
53
+ category: _propTypes.default.shape({
54
+ values: _propTypes.default.arrayOf(_propTypes.default.object)
55
+ })
56
+ }),
57
+ value: _propTypes.default.shape({
58
+ operator: _propTypes.default.string,
59
+ value: _propTypes.default.string
60
+ })
61
+ };
62
+
63
+ var CustomPropertiesRule = function CustomPropertiesRule(_ref) {
64
+ var ariaLabelledby = _ref.ariaLabelledby,
65
+ clearRuleValue = _ref.clearRuleValue,
66
+ index = _ref.index,
67
+ name = _ref.name,
68
+ onDelete = _ref.onDelete,
69
+ _ref$custPropDefiniti = _ref.custPropDefinition,
70
+ custPropDefinition = _ref$custPropDefiniti === void 0 ? {} : _ref$custPropDefiniti,
71
+ value = _ref.value;
72
+ var operators = (0, _useOperators.default)(custPropDefinition.type);
73
+ var valueProps = (0, _useValueProps.default)(custPropDefinition);
74
+ var selectedOperator = operators.find(function (o) {
75
+ return o.value === (value === null || value === void 0 ? void 0 : value.operator);
76
+ });
77
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.Row, {
78
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
79
+ xs: 2,
80
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Layout, {
81
+ className: "textCentered",
82
+ children: index === 0 ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
83
+ id: "stripes-kint-components.OR"
84
+ })
85
+ })
86
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
87
+ xs: 4,
88
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, {
89
+ name: "".concat(name, ".operator"),
90
+ validate: _validators.required,
91
+ children: function children(_ref2) {
92
+ var input = _ref2.input,
93
+ meta = _ref2.meta;
94
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Select, _objectSpread(_objectSpread({}, input), {}, {
95
+ "aria-labelledby": "".concat(ariaLabelledby, "-rule-column-header-comparator"),
96
+ dataOptions: operators,
97
+ error: (meta === null || meta === void 0 ? void 0 : meta.touched) && (meta === null || meta === void 0 ? void 0 : meta.error),
98
+ onChange: function onChange(e) {
99
+ input.onChange(e);
100
+ var newlySelectedOperator = operators.find(function (o) {
101
+ return o.value === e.target.value;
102
+ });
103
+
104
+ if (newlySelectedOperator !== null && newlySelectedOperator !== void 0 && newlySelectedOperator.noValueAllowed) {
105
+ clearRuleValue();
106
+ }
107
+ },
108
+ placeholder: " ",
109
+ required: true
110
+ }));
111
+ }
112
+ })
113
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
114
+ xs: 4,
115
+ children: selectedOperator !== null && selectedOperator !== void 0 && selectedOperator.noValueAllowed ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactFinalForm.Field, _objectSpread({
116
+ "aria-labelledby": "".concat(ariaLabelledby, "-rule-column-header-value"),
117
+ name: "".concat(name, ".value"),
118
+ required: true,
119
+ validate: _validators.required
120
+ }, valueProps))
121
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Col, {
122
+ xs: 2,
123
+ children: index ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Tooltip, {
124
+ id: (0, _uniqueId2.default)('delete-rule-btn'),
125
+ text: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactIntl.FormattedMessage, {
126
+ id: "stripes-kint-components.customProperty.removeRule",
127
+ values: {
128
+ number: index + 1
129
+ }
130
+ }),
131
+ children: function children(_ref3) {
132
+ var ref = _ref3.ref,
133
+ ariaIds = _ref3.ariaIds;
134
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.IconButton, {
135
+ ref: ref,
136
+ "aria-labelledby": ariaIds.text,
137
+ icon: "trash",
138
+ onClick: onDelete
139
+ });
140
+ }
141
+ }) : null
142
+ })]
143
+ }, name);
144
+ };
145
+
146
+ __signature__(CustomPropertiesRule, "useOperators{operators}\nuseValueProps{valueProps}", function () {
147
+ return [_useOperators.default, _useValueProps.default];
148
+ });
149
+
150
+ CustomPropertiesRule.propTypes = propTypes;
151
+ var _default = CustomPropertiesRule;
152
+ var _default2 = _default;
153
+ exports.default = _default2;
154
+ ;
155
+
156
+ (function () {
157
+ var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
158
+
159
+ if (!reactHotLoader) {
160
+ return;
161
+ }
162
+
163
+ reactHotLoader.register(propTypes, "propTypes", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/CustomPropertiesRule.js");
164
+ reactHotLoader.register(CustomPropertiesRule, "CustomPropertiesRule", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/CustomPropertiesRule.js");
165
+ reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/CustomPropertiesRule.js");
166
+ })();
167
+
168
+ ;
169
+
170
+ (function () {
171
+ var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
172
+ leaveModule && leaveModule(module);
173
+ })();
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "CustomPropertiesFilter", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _CustomPropertiesFilter.default;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "CustomPropertiesFilterField", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _CustomPropertiesFilterField.default;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "CustomPropertiesFilterFieldArray", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _CustomPropertiesFilterFieldArray.default;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "CustomPropertiesFilterForm", {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _CustomPropertiesFilterForm.default;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "useOperators", {
31
+ enumerable: true,
32
+ get: function get() {
33
+ return _useOperators.default;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "useParseActiveFilterStrings", {
37
+ enumerable: true,
38
+ get: function get() {
39
+ return _useParseActiveFilterStrings.default;
40
+ }
41
+ });
42
+
43
+ var _CustomPropertiesFilter = _interopRequireDefault(require("./CustomPropertiesFilter"));
44
+
45
+ var _CustomPropertiesFilterForm = _interopRequireDefault(require("./CustomPropertiesFilterForm"));
46
+
47
+ var _useOperators = _interopRequireDefault(require("./useOperators"));
48
+
49
+ var _useParseActiveFilterStrings = _interopRequireDefault(require("./useParseActiveFilterStrings"));
50
+
51
+ var _CustomPropertiesFilterField = _interopRequireDefault(require("./CustomPropertiesFilterField"));
52
+
53
+ var _CustomPropertiesFilterFieldArray = _interopRequireDefault(require("./CustomPropertiesFilterFieldArray"));
54
+
55
+ function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
56
+
57
+ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
58
+ return a;
59
+ };
@@ -0,0 +1,138 @@
1
+ "use strict";
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
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.default = void 0;
9
+
10
+ var _reactIntl = require("react-intl");
11
+
12
+ var CUSTPROP_TYPES = _interopRequireWildcard(require("../../constants/customProperties"));
13
+
14
+ 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); }
15
+
16
+ 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; }
17
+
18
+ (function () {
19
+ var enterModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.enterModule : undefined;
20
+ enterModule && enterModule(module);
21
+ })();
22
+
23
+ var __signature__ = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default.signature : function (a) {
24
+ return a;
25
+ };
26
+
27
+ var REFDATA = CUSTPROP_TYPES.REFDATA_CLASS_NAME,
28
+ DECIMAL = CUSTPROP_TYPES.DECIMAL_CLASS_NAME,
29
+ INTEGER = CUSTPROP_TYPES.INTEGER_CLASS_NAME,
30
+ DATE = CUSTPROP_TYPES.DATE_CLASS_NAME,
31
+ TEXT = CUSTPROP_TYPES.TEXT_CLASS_NAME;
32
+
33
+ var useOperators = function useOperators(type) {
34
+ var intl = (0, _reactIntl.useIntl)();
35
+
36
+ var getLabel = function getLabel(id) {
37
+ return intl.formatMessage({
38
+ id: id
39
+ });
40
+ };
41
+
42
+ var operators = [{
43
+ value: ' isSet',
44
+ label: getLabel('stripes-kint-components.operator.isSet'),
45
+ noValueAllowed: true
46
+ }, {
47
+ value: ' isNotSet',
48
+ label: getLabel('stripes-kint-components.operator.isNotSet'),
49
+ noValueAllowed: true
50
+ }];
51
+
52
+ if (!type || type === INTEGER || type === DECIMAL) {
53
+ operators.push({
54
+ value: '==',
55
+ label: getLabel('stripes-kint-components.operator.equals')
56
+ }, {
57
+ value: '!=',
58
+ label: getLabel('stripes-kint-components.operator.doesNotEqual')
59
+ }, {
60
+ value: '>=',
61
+ label: getLabel('stripes-kint-components.operator.isGreaterThanOrEqual')
62
+ }, {
63
+ value: '<=',
64
+ label: getLabel('stripes-kint-components.operator.isLessThanOrEqual')
65
+ });
66
+ }
67
+
68
+ if (type === DATE) {
69
+ // Basically the same as the "number" types above, so no need to reassign if there is no type
70
+ operators.push({
71
+ value: '==',
72
+ label: getLabel('stripes-kint-components.operator.equals')
73
+ }, {
74
+ value: '!=',
75
+ label: getLabel('stripes-kint-components.operator.doesNotEqual')
76
+ }, {
77
+ value: '>=',
78
+ label: getLabel('stripes-kint-components.operator.isOnOrAfter')
79
+ }, {
80
+ value: '<=',
81
+ label: getLabel('stripes-kint-components.operator.isOnOrBefore')
82
+ });
83
+ }
84
+
85
+ if (!type || type === REFDATA) {
86
+ operators.push({
87
+ value: '==',
88
+ label: getLabel('stripes-kint-components.operator.is')
89
+ }, {
90
+ value: '!=',
91
+ label: getLabel('stripes-kint-components.operator.isNot')
92
+ });
93
+ }
94
+
95
+ if (!type || type === TEXT) {
96
+ operators.push({
97
+ value: '=~',
98
+ label: getLabel('stripes-kint-components.operator.contains')
99
+ }, {
100
+ value: '!~',
101
+ label: getLabel('stripes-kint-components.operator.doesNotContain')
102
+ });
103
+ }
104
+
105
+ return operators;
106
+ };
107
+
108
+ __signature__(useOperators, "useIntl{intl}", function () {
109
+ return [_reactIntl.useIntl];
110
+ });
111
+
112
+ var _default = useOperators;
113
+ var _default2 = _default;
114
+ exports.default = _default2;
115
+ ;
116
+
117
+ (function () {
118
+ var reactHotLoader = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.default : undefined;
119
+
120
+ if (!reactHotLoader) {
121
+ return;
122
+ }
123
+
124
+ reactHotLoader.register(REFDATA, "REFDATA", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useOperators.js");
125
+ reactHotLoader.register(DECIMAL, "DECIMAL", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useOperators.js");
126
+ reactHotLoader.register(INTEGER, "INTEGER", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useOperators.js");
127
+ reactHotLoader.register(DATE, "DATE", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useOperators.js");
128
+ reactHotLoader.register(TEXT, "TEXT", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useOperators.js");
129
+ reactHotLoader.register(useOperators, "useOperators", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useOperators.js");
130
+ reactHotLoader.register(_default, "default", "/home/ethan/FolioModules/stripes-kint-components/src/lib/CustomProperties/Filter/useOperators.js");
131
+ })();
132
+
133
+ ;
134
+
135
+ (function () {
136
+ var leaveModule = typeof reactHotLoaderGlobal !== 'undefined' ? reactHotLoaderGlobal.leaveModule : undefined;
137
+ leaveModule && leaveModule(module);
138
+ })();