@k-int/stripes-kint-components 2.1.3 → 2.3.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +27 -3
- package/es/index.js +150 -4
- package/es/lib/ActionList/ActionList.js +7 -2
- package/es/lib/ActionList/ActionListFieldArray.js +49 -10
- package/es/lib/CustomProperties/Config/CustomPropertiesSettings.js +3 -2
- package/es/lib/CustomProperties/Config/CustomPropertyForm.js +88 -44
- package/es/lib/CustomProperties/Config/{CustomPropertiesView.js → CustomPropertyView.js} +27 -14
- package/es/lib/CustomProperties/Config/index.js +6 -4
- package/es/lib/CustomProperties/Edit/CustomPropertiesEdit.js +72 -0
- package/es/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +133 -0
- package/es/lib/CustomProperties/Edit/CustomPropertiesListField.js +279 -0
- package/es/lib/CustomProperties/Edit/CustomPropertyField.js +370 -0
- package/es/lib/CustomProperties/Edit/CustomPropertyFormCard.js +156 -0
- package/es/lib/CustomProperties/Edit/index.js +51 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilter.js +216 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +237 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +159 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +119 -0
- package/es/lib/CustomProperties/Filter/CustomPropertiesRule.js +173 -0
- package/es/lib/CustomProperties/Filter/index.js +59 -0
- package/es/lib/CustomProperties/Filter/useOperators.js +138 -0
- package/es/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +97 -0
- package/es/lib/CustomProperties/Filter/useValueProps.js +101 -0
- package/es/lib/CustomProperties/View/CustomPropertiesView.js +73 -0
- package/es/lib/CustomProperties/View/CustomPropertiesViewCtx.js +188 -0
- package/es/lib/CustomProperties/View/CustomPropertyCard.js +204 -0
- package/es/lib/CustomProperties/View/index.js +35 -0
- package/es/lib/CustomProperties/index.js +125 -0
- package/es/lib/EditableRefdataList/EditableRefdataList.js +12 -16
- package/es/lib/FormModal/FormModal.js +20 -11
- package/es/lib/QueryTypedown/QueryTypedown.js +9 -4
- package/es/lib/constants/customProperties.js +4 -1
- package/es/lib/hooks/index.js +16 -0
- package/es/lib/hooks/typedownHooks/useTypedownData.js +9 -2
- package/es/lib/hooks/useAvailableCustomProperties.js +106 -0
- package/es/lib/hooks/useInvalidateRefdata.js +53 -0
- package/es/lib/hooks/useMutateRefdataValue.js +11 -6
- package/es/lib/hooks/useRefdata.js +1 -3
- package/es/lib/utils/groupCustomPropertiesByCtx.js +70 -0
- package/es/lib/utils/index.js +24 -0
- package/es/lib/utils/refdataQueryKey.js +48 -0
- package/es/lib/utils/typedownQueryKey.js +48 -0
- package/es/lib/utils/validators.js +160 -0
- package/git_translate.sh +8 -0
- package/junit.xml +38 -38
- package/package.json +1 -1
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionList.js.html +11 -2
- package/src/artifacts/coverage-jest/lcov-report/ActionList/ActionListFieldArray.js.html +25 -13
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.html +3 -3
- package/src/artifacts/coverage-jest/lcov-report/ActionList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesLookup.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesSettings.js.html +5 -2
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertiesView.js.html +75 -9
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/CustomPropertyForm.js.html +195 -33
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.html +10 -10
- package/src/artifacts/coverage-jest/lcov-report/CustomProperties/Config/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/EditableRefdataList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableRefdataList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsList.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/EditableSettingsListFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/EditSettingValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/RenderSettingValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/SettingField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/SettingField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/EditableSettingsList/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/FormModal/FormModal.js.html +7 -22
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.html +7 -7
- package/src/artifacts/coverage-jest/lcov-report/FormModal/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/NoResultsMessage.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/NoResultsMessage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/QueryTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/QueryTypedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/RefdataButtons.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/RefdataButtons/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/SASQLookupComponent.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQLookupComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/SASQRoute.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQRoute/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/SASQViewComponent.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SASQViewComponent/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/SearchField.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SearchField/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPage.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/SettingPagePane.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/SettingPage/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/Typedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/Typedown/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/customProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/eventCodes.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/constants/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/SettingsContext.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/contexts/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettingSection.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/settingsHooks/useSettings.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedown.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownData.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/typedownHooks/useTypedownToggle.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useActiveElement.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useCustomProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useHelperApp.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtFieldArray.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useKiwtSASQuery.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useLocalStorageState.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateCustomProperties.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useMutateRefdataValue.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useQIndex.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useRefdata.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/hooks/useTemplates.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/index.html +27 -27
- package/src/artifacts/coverage-jest/lcov-report/utils/buildUrl.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQuery.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/generateKiwtQueryParams.js.html +16 -10
- package/src/artifacts/coverage-jest/lcov-report/utils/index.html +24 -9
- package/src/artifacts/coverage-jest/lcov-report/utils/index.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/refdataOptions.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/renderHelpText.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/selectorSafe.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/sortByLabel.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/toCamelCase.js.html +1 -1
- package/src/artifacts/coverage-jest/lcov-report/utils/validators.js.html +202 -0
- package/src/artifacts/coverage-jest/lcov.info +366 -296
- package/src/index.js +35 -3
- package/src/lib/ActionList/ActionList.js +5 -2
- package/src/lib/ActionList/ActionListFieldArray.js +32 -9
- package/src/lib/ActionList/README.md +23 -20
- package/src/lib/CustomProperties/Config/CustomPropertiesSettings.js +3 -2
- package/src/lib/CustomProperties/Config/CustomPropertyForm.js +77 -23
- package/src/lib/CustomProperties/Config/{CustomPropertiesView.js → CustomPropertyView.js} +31 -9
- package/src/lib/CustomProperties/Config/index.js +1 -1
- package/src/lib/CustomProperties/Edit/CustomPropertiesEdit.js +35 -0
- package/src/lib/CustomProperties/Edit/CustomPropertiesEditCtx.js +85 -0
- package/src/lib/CustomProperties/Edit/CustomPropertiesListField.js +194 -0
- package/src/lib/CustomProperties/Edit/CustomPropertyField.js +299 -0
- package/src/lib/CustomProperties/Edit/CustomPropertyFormCard.js +131 -0
- package/src/lib/CustomProperties/Edit/index.js +5 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilter.js +125 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterField.js +148 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterFieldArray.js +113 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesFilterForm.js +74 -0
- package/src/lib/CustomProperties/Filter/CustomPropertiesRule.js +122 -0
- package/src/lib/CustomProperties/Filter/index.js +6 -0
- package/src/lib/CustomProperties/Filter/useOperators.js +55 -0
- package/src/lib/CustomProperties/Filter/useParseActiveFilterStrings.js +35 -0
- package/src/lib/CustomProperties/Filter/useValueProps.js +45 -0
- package/src/lib/CustomProperties/View/CustomPropertiesView.js +36 -0
- package/src/lib/CustomProperties/View/CustomPropertiesViewCtx.js +112 -0
- package/src/lib/CustomProperties/View/CustomPropertyCard.js +177 -0
- package/src/lib/CustomProperties/View/index.js +3 -0
- package/src/lib/CustomProperties/index.js +30 -0
- package/src/lib/EditableRefdataList/EditableRefdataList.js +13 -10
- package/src/lib/FormModal/FormModal.js +37 -22
- package/src/lib/QueryTypedown/QueryTypedown.js +3 -1
- package/src/lib/constants/customProperties.js +1 -0
- package/src/lib/hooks/index.js +2 -0
- package/src/lib/hooks/typedownHooks/useTypedownData.js +9 -3
- package/src/lib/hooks/useAvailableCustomProperties.js +40 -0
- package/src/lib/hooks/useInvalidateRefdata.js +11 -0
- package/src/lib/hooks/useMutateRefdataValue.js +7 -3
- package/src/lib/hooks/useRefdata.js +2 -3
- package/src/lib/utils/generateKiwtQueryParams.js +2 -2
- package/src/lib/utils/groupCustomPropertiesByCtx.js +13 -0
- package/src/lib/utils/index.js +5 -0
- package/src/lib/utils/refdataQueryKey.js +9 -0
- package/src/lib/utils/typedownQueryKey.js +9 -0
- package/src/lib/utils/validators.js +79 -0
- package/translate.sh +63 -0
- package/translations/stripes-kint-components/ar.json +105 -0
- package/translations/stripes-kint-components/ca.json +1 -0
- package/translations/stripes-kint-components/cs_CZ.json +105 -0
- package/translations/stripes-kint-components/da.json +1 -0
- package/translations/stripes-kint-components/de.json +105 -0
- package/translations/stripes-kint-components/en.json +59 -2
- package/translations/stripes-kint-components/es.json +105 -0
- package/translations/stripes-kint-components/fr.json +105 -0
- package/translations/stripes-kint-components/he.json +1 -0
- package/translations/stripes-kint-components/hi_IN.json +105 -0
- package/translations/stripes-kint-components/hu.json +105 -0
- package/translations/stripes-kint-components/it_IT.json +105 -0
- package/translations/stripes-kint-components/ja.json +105 -0
- package/translations/stripes-kint-components/ko.json +105 -0
- package/translations/stripes-kint-components/nb.json +1 -0
- package/translations/stripes-kint-components/nn.json +1 -0
- package/translations/stripes-kint-components/pl.json +105 -0
- package/translations/stripes-kint-components/pt_PT.json +105 -0
- package/translations/stripes-kint-components/ru.json +105 -0
- package/translations/stripes-kint-components/sv.json +105 -0
- package/translations/stripes-kint-components/ur.json +1 -0
- package/translations/stripes-kint-components/zh_CN.json +105 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,33 @@
|
|
|
1
|
-
## 2.1
|
|
2
|
-
*
|
|
1
|
+
## 2.3.1 2022-03-28
|
|
2
|
+
* Custom Property component fixes
|
|
3
3
|
|
|
4
|
-
## 2.
|
|
4
|
+
## 2.3.0 2022-03-25
|
|
5
|
+
* FormModal
|
|
6
|
+
* Ability to override labels for "save" and "cancel"
|
|
7
|
+
* Ability to override whole footer section
|
|
8
|
+
* CustomProperties Edit components:
|
|
9
|
+
* CustomPropertiesEdit
|
|
10
|
+
* CustomPropertiesEditCtx
|
|
11
|
+
* CustomPropertiesListField
|
|
12
|
+
* CustomPropertyField
|
|
13
|
+
* CustomPropertyFormCard
|
|
14
|
+
* useAvailableCustomProperties
|
|
15
|
+
* Refdata hooks and utils
|
|
16
|
+
* useInvalidateRefdata hook
|
|
17
|
+
* refdataQueryKey utility function
|
|
18
|
+
* useRefdata refactored to use the above
|
|
19
|
+
* useMutateRefdata now invalidates query cache after changes
|
|
20
|
+
* QueryTypedown
|
|
21
|
+
* Added "dataFormatter" prop, to allow massaging of data between fetch and injections into Typedown
|
|
22
|
+
* ActionList
|
|
23
|
+
* ActionCalls deprecated in favour of a direct `callback` prop on actionAssigner, and separate createCallback prop.
|
|
24
|
+
* `to` prop on actionAssigner allowing for rendering of <Link/> as opposed to <Button>/<IconButton/>
|
|
25
|
+
## 2.2.0 2022-03-11
|
|
5
26
|
* Fix -- GenerateQueryParams no longer assumes you want EITHER nsValues filters or options filters, it simply adds both to the params array
|
|
6
27
|
* ActionList -- added a hideCreateButton prop for custom rolled solutions
|
|
28
|
+
* FormModal -- No longer restart form on submit... should stop validation errors clearing the form
|
|
29
|
+
* Added support for Date type custom properties, as well as retired prop.
|
|
30
|
+
* Shift away from stripes-erm-components validators to internally defined validators.
|
|
7
31
|
## 2.1.0 2022-03-09
|
|
8
32
|
* Fixes for ActionList
|
|
9
33
|
* When no formatter is present, it no longer crashes
|
package/es/index.js
CHANGED
|
@@ -11,22 +11,100 @@ Object.defineProperty(exports, "ActionList", {
|
|
|
11
11
|
return _ActionList.default;
|
|
12
12
|
}
|
|
13
13
|
});
|
|
14
|
+
Object.defineProperty(exports, "CustomPropertiesEdit", {
|
|
15
|
+
enumerable: true,
|
|
16
|
+
get: function get() {
|
|
17
|
+
return _CustomProperties.CustomPropertiesEdit;
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
Object.defineProperty(exports, "CustomPropertiesEditCtx", {
|
|
21
|
+
enumerable: true,
|
|
22
|
+
get: function get() {
|
|
23
|
+
return _CustomProperties.CustomPropertiesEditCtx;
|
|
24
|
+
}
|
|
25
|
+
});
|
|
26
|
+
Object.defineProperty(exports, "CustomPropertiesFilter", {
|
|
27
|
+
enumerable: true,
|
|
28
|
+
get: function get() {
|
|
29
|
+
return _CustomProperties.CustomPropertiesFilter;
|
|
30
|
+
}
|
|
31
|
+
});
|
|
32
|
+
Object.defineProperty(exports, "CustomPropertiesFilterField", {
|
|
33
|
+
enumerable: true,
|
|
34
|
+
get: function get() {
|
|
35
|
+
return _CustomProperties.CustomPropertiesFilterField;
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
Object.defineProperty(exports, "CustomPropertiesFilterFieldArray", {
|
|
39
|
+
enumerable: true,
|
|
40
|
+
get: function get() {
|
|
41
|
+
return _CustomProperties.CustomPropertiesFilterFieldArray;
|
|
42
|
+
}
|
|
43
|
+
});
|
|
44
|
+
Object.defineProperty(exports, "CustomPropertiesFilterForm", {
|
|
45
|
+
enumerable: true,
|
|
46
|
+
get: function get() {
|
|
47
|
+
return _CustomProperties.CustomPropertiesFilterForm;
|
|
48
|
+
}
|
|
49
|
+
});
|
|
50
|
+
Object.defineProperty(exports, "CustomPropertiesListField", {
|
|
51
|
+
enumerable: true,
|
|
52
|
+
get: function get() {
|
|
53
|
+
return _CustomProperties.CustomPropertiesListField;
|
|
54
|
+
}
|
|
55
|
+
});
|
|
14
56
|
Object.defineProperty(exports, "CustomPropertiesLookup", {
|
|
15
57
|
enumerable: true,
|
|
16
58
|
get: function get() {
|
|
17
|
-
return
|
|
59
|
+
return _CustomProperties.CustomPropertiesLookup;
|
|
18
60
|
}
|
|
19
61
|
});
|
|
20
62
|
Object.defineProperty(exports, "CustomPropertiesSettings", {
|
|
21
63
|
enumerable: true,
|
|
22
64
|
get: function get() {
|
|
23
|
-
return
|
|
65
|
+
return _CustomProperties.CustomPropertiesSettings;
|
|
24
66
|
}
|
|
25
67
|
});
|
|
26
68
|
Object.defineProperty(exports, "CustomPropertiesView", {
|
|
27
69
|
enumerable: true,
|
|
28
70
|
get: function get() {
|
|
29
|
-
return
|
|
71
|
+
return _CustomProperties.CustomPropertiesView;
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
Object.defineProperty(exports, "CustomPropertiesViewCtx", {
|
|
75
|
+
enumerable: true,
|
|
76
|
+
get: function get() {
|
|
77
|
+
return _CustomProperties.CustomPropertiesViewCtx;
|
|
78
|
+
}
|
|
79
|
+
});
|
|
80
|
+
Object.defineProperty(exports, "CustomPropertyCard", {
|
|
81
|
+
enumerable: true,
|
|
82
|
+
get: function get() {
|
|
83
|
+
return _CustomProperties.CustomPropertyCard;
|
|
84
|
+
}
|
|
85
|
+
});
|
|
86
|
+
Object.defineProperty(exports, "CustomPropertyField", {
|
|
87
|
+
enumerable: true,
|
|
88
|
+
get: function get() {
|
|
89
|
+
return _CustomProperties.CustomPropertyField;
|
|
90
|
+
}
|
|
91
|
+
});
|
|
92
|
+
Object.defineProperty(exports, "CustomPropertyForm", {
|
|
93
|
+
enumerable: true,
|
|
94
|
+
get: function get() {
|
|
95
|
+
return _CustomProperties.CustomPropertyForm;
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
Object.defineProperty(exports, "CustomPropertyFormCard", {
|
|
99
|
+
enumerable: true,
|
|
100
|
+
get: function get() {
|
|
101
|
+
return _CustomProperties.CustomPropertyFormCard;
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
Object.defineProperty(exports, "CustomPropertyView", {
|
|
105
|
+
enumerable: true,
|
|
106
|
+
get: function get() {
|
|
107
|
+
return _CustomProperties.CustomPropertyView;
|
|
30
108
|
}
|
|
31
109
|
});
|
|
32
110
|
Object.defineProperty(exports, "EditableRefdataList", {
|
|
@@ -107,6 +185,12 @@ Object.defineProperty(exports, "Typedown", {
|
|
|
107
185
|
return _Typedown.default;
|
|
108
186
|
}
|
|
109
187
|
});
|
|
188
|
+
Object.defineProperty(exports, "composeValidators", {
|
|
189
|
+
enumerable: true,
|
|
190
|
+
get: function get() {
|
|
191
|
+
return _validators.composeValidators;
|
|
192
|
+
}
|
|
193
|
+
});
|
|
110
194
|
exports.customPropertyContants = void 0;
|
|
111
195
|
Object.defineProperty(exports, "generateKiwtQuery", {
|
|
112
196
|
enumerable: true,
|
|
@@ -120,24 +204,66 @@ Object.defineProperty(exports, "generateKiwtQueryParams", {
|
|
|
120
204
|
return _utils.generateKiwtQueryParams;
|
|
121
205
|
}
|
|
122
206
|
});
|
|
207
|
+
Object.defineProperty(exports, "groupCustomPropertiesByCtx", {
|
|
208
|
+
enumerable: true,
|
|
209
|
+
get: function get() {
|
|
210
|
+
return _utils.groupCustomPropertiesByCtx;
|
|
211
|
+
}
|
|
212
|
+
});
|
|
213
|
+
Object.defineProperty(exports, "invalidNumber", {
|
|
214
|
+
enumerable: true,
|
|
215
|
+
get: function get() {
|
|
216
|
+
return _validators.invalidNumber;
|
|
217
|
+
}
|
|
218
|
+
});
|
|
123
219
|
Object.defineProperty(exports, "refdataOptions", {
|
|
124
220
|
enumerable: true,
|
|
125
221
|
get: function get() {
|
|
126
222
|
return _utils.refdataOptions;
|
|
127
223
|
}
|
|
128
224
|
});
|
|
225
|
+
Object.defineProperty(exports, "refdataQueryKey", {
|
|
226
|
+
enumerable: true,
|
|
227
|
+
get: function get() {
|
|
228
|
+
return _utils.refdataQueryKey;
|
|
229
|
+
}
|
|
230
|
+
});
|
|
231
|
+
Object.defineProperty(exports, "required", {
|
|
232
|
+
enumerable: true,
|
|
233
|
+
get: function get() {
|
|
234
|
+
return _validators.required;
|
|
235
|
+
}
|
|
236
|
+
});
|
|
237
|
+
Object.defineProperty(exports, "requiredObject", {
|
|
238
|
+
enumerable: true,
|
|
239
|
+
get: function get() {
|
|
240
|
+
return _validators.requiredObject;
|
|
241
|
+
}
|
|
242
|
+
});
|
|
129
243
|
Object.defineProperty(exports, "selectorSafe", {
|
|
130
244
|
enumerable: true,
|
|
131
245
|
get: function get() {
|
|
132
246
|
return _utils.selectorSafe;
|
|
133
247
|
}
|
|
134
248
|
});
|
|
249
|
+
Object.defineProperty(exports, "typedownQueryKey", {
|
|
250
|
+
enumerable: true,
|
|
251
|
+
get: function get() {
|
|
252
|
+
return _utils.typedownQueryKey;
|
|
253
|
+
}
|
|
254
|
+
});
|
|
135
255
|
Object.defineProperty(exports, "useActiveElement", {
|
|
136
256
|
enumerable: true,
|
|
137
257
|
get: function get() {
|
|
138
258
|
return _hooks.useActiveElement;
|
|
139
259
|
}
|
|
140
260
|
});
|
|
261
|
+
Object.defineProperty(exports, "useAvailableCustomProperties", {
|
|
262
|
+
enumerable: true,
|
|
263
|
+
get: function get() {
|
|
264
|
+
return _hooks.useAvailableCustomProperties;
|
|
265
|
+
}
|
|
266
|
+
});
|
|
141
267
|
Object.defineProperty(exports, "useCustomProperties", {
|
|
142
268
|
enumerable: true,
|
|
143
269
|
get: function get() {
|
|
@@ -150,6 +276,12 @@ Object.defineProperty(exports, "useHelperApp", {
|
|
|
150
276
|
return _hooks.useHelperApp;
|
|
151
277
|
}
|
|
152
278
|
});
|
|
279
|
+
Object.defineProperty(exports, "useInvalidateRefdata", {
|
|
280
|
+
enumerable: true,
|
|
281
|
+
get: function get() {
|
|
282
|
+
return _hooks.useInvalidateRefdata;
|
|
283
|
+
}
|
|
284
|
+
});
|
|
153
285
|
Object.defineProperty(exports, "useKiwtFieldArray", {
|
|
154
286
|
enumerable: true,
|
|
155
287
|
get: function get() {
|
|
@@ -180,6 +312,18 @@ Object.defineProperty(exports, "useMutateRefdataValue", {
|
|
|
180
312
|
return _hooks.useMutateRefdataValue;
|
|
181
313
|
}
|
|
182
314
|
});
|
|
315
|
+
Object.defineProperty(exports, "useOperators", {
|
|
316
|
+
enumerable: true,
|
|
317
|
+
get: function get() {
|
|
318
|
+
return _CustomProperties.useOperators;
|
|
319
|
+
}
|
|
320
|
+
});
|
|
321
|
+
Object.defineProperty(exports, "useParseActiveFilterStrings", {
|
|
322
|
+
enumerable: true,
|
|
323
|
+
get: function get() {
|
|
324
|
+
return _CustomProperties.useParseActiveFilterStrings;
|
|
325
|
+
}
|
|
326
|
+
});
|
|
183
327
|
Object.defineProperty(exports, "useQIndex", {
|
|
184
328
|
enumerable: true,
|
|
185
329
|
get: function get() {
|
|
@@ -209,6 +353,8 @@ var _hooks = require("./lib/hooks");
|
|
|
209
353
|
|
|
210
354
|
var _utils = require("./lib/utils");
|
|
211
355
|
|
|
356
|
+
var _validators = require("./lib/utils/validators");
|
|
357
|
+
|
|
212
358
|
var _contexts = require("./lib/contexts");
|
|
213
359
|
|
|
214
360
|
var _SettingPage = require("./lib/SettingPage");
|
|
@@ -235,7 +381,7 @@ var _RefdataButtons = _interopRequireDefault(require("./lib/RefdataButtons"));
|
|
|
235
381
|
|
|
236
382
|
var _FormModal = _interopRequireDefault(require("./lib/FormModal"));
|
|
237
383
|
|
|
238
|
-
var
|
|
384
|
+
var _CustomProperties = require("./lib/CustomProperties");
|
|
239
385
|
|
|
240
386
|
var _customPropertyContants = _interopRequireWildcard(require("./lib/constants/customProperties"));
|
|
241
387
|
|
|
@@ -19,7 +19,7 @@ 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", "hideCreateButton", "visibleFields"];
|
|
22
|
+
var _excluded = ["actionAssigner", "actionCalls", "columnMapping", "contentData", "creatableFields", "createCallback", "editableFields", "fieldComponents", "hideCreateButton", "visibleFields"];
|
|
23
23
|
|
|
24
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
25
25
|
|
|
@@ -48,6 +48,7 @@ var propTypes = {
|
|
|
48
48
|
columnMapping: _propTypes.default.object,
|
|
49
49
|
contentData: _propTypes.default.arrayOf(_propTypes.default.object),
|
|
50
50
|
creatableFields: _propTypes.default.object,
|
|
51
|
+
createCallback: _propTypes.default.func,
|
|
51
52
|
editableFields: _propTypes.default.object,
|
|
52
53
|
fieldComponents: _propTypes.default.object,
|
|
53
54
|
hideCreateButton: _propTypes.default.bool,
|
|
@@ -62,6 +63,7 @@ var ActionList = function ActionList(_ref) {
|
|
|
62
63
|
contentData = _ref.contentData,
|
|
63
64
|
_ref$creatableFields = _ref.creatableFields,
|
|
64
65
|
creatableFields = _ref$creatableFields === void 0 ? {} : _ref$creatableFields,
|
|
66
|
+
createCallback = _ref.createCallback,
|
|
65
67
|
_ref$editableFields = _ref.editableFields,
|
|
66
68
|
editableFields = _ref$editableFields === void 0 ? {} : _ref$editableFields,
|
|
67
69
|
_ref$fieldComponents = _ref.fieldComponents,
|
|
@@ -77,7 +79,9 @@ var ActionList = function ActionList(_ref) {
|
|
|
77
79
|
contentData: contentData
|
|
78
80
|
},
|
|
79
81
|
mutators: _finalFormArrays.default,
|
|
80
|
-
onSubmit:
|
|
82
|
+
onSubmit: function onSubmit() {
|
|
83
|
+
return null;
|
|
84
|
+
},
|
|
81
85
|
subscription: {
|
|
82
86
|
contentData: true
|
|
83
87
|
},
|
|
@@ -92,6 +96,7 @@ var ActionList = function ActionList(_ref) {
|
|
|
92
96
|
columnMapping: columnMapping,
|
|
93
97
|
component: _ActionListFieldArray.default,
|
|
94
98
|
creatableFields: creatableFields,
|
|
99
|
+
createCallback: createCallback,
|
|
95
100
|
editableFields: editableFields,
|
|
96
101
|
fieldComponents: fieldComponents,
|
|
97
102
|
hideCreateButton: hideCreateButton,
|
|
@@ -23,7 +23,7 @@ var _ActionListFieldArray = _interopRequireDefault(require("../../../styles/Acti
|
|
|
23
23
|
|
|
24
24
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
25
25
|
|
|
26
|
-
var _excluded = ["actionAssigner", "actionCalls", "columnMapping", "creatableFields", "editableFields", "fields", "fieldComponents", "hideCreateButton", "visibleFields"],
|
|
26
|
+
var _excluded = ["actionAssigner", "actionCalls", "columnMapping", "creatableFields", "createCallback", "editableFields", "fields", "fieldComponents", "hideCreateButton", "visibleFields"],
|
|
27
27
|
_excluded2 = ["actionListActions"],
|
|
28
28
|
_excluded3 = ["actionListActions"],
|
|
29
29
|
_excluded4 = ["actionListActions"],
|
|
@@ -84,6 +84,7 @@ var propTypes = {
|
|
|
84
84
|
actionCalls: _propTypes.default.object,
|
|
85
85
|
columnMapping: _propTypes.default.object,
|
|
86
86
|
creatableFields: _propTypes.default.object,
|
|
87
|
+
createCallback: _propTypes.default.func,
|
|
87
88
|
editableFields: _propTypes.default.object,
|
|
88
89
|
fields: _propTypes.default.object,
|
|
89
90
|
fieldComponents: _propTypes.default.object,
|
|
@@ -97,6 +98,7 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
97
98
|
actionCalls = _ref.actionCalls,
|
|
98
99
|
columnMapping = _ref.columnMapping,
|
|
99
100
|
creatableFields = _ref.creatableFields,
|
|
101
|
+
createCallback = _ref.createCallback,
|
|
100
102
|
editableFields = _ref.editableFields,
|
|
101
103
|
fields = _ref.fields,
|
|
102
104
|
fieldComponents = _ref.fieldComponents,
|
|
@@ -135,11 +137,22 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
135
137
|
};
|
|
136
138
|
|
|
137
139
|
var handleSave = function handleSave(index) {
|
|
140
|
+
var _actionAssigner$find;
|
|
141
|
+
|
|
138
142
|
var _fields$value$index = fields.value[index],
|
|
139
143
|
_a = _fields$value$index.actionListActions,
|
|
140
|
-
rowData = _objectWithoutProperties(_fields$value$index, _excluded2);
|
|
144
|
+
rowData = _objectWithoutProperties(_fields$value$index, _excluded2); // Find "edit" entry in actionAssigner
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
var editCallback = (_actionAssigner$find = actionAssigner.find(function (act) {
|
|
148
|
+
return act.name === 'edit';
|
|
149
|
+
})) === null || _actionAssigner$find === void 0 ? void 0 : _actionAssigner$find.callback;
|
|
141
150
|
|
|
142
|
-
|
|
151
|
+
if (editCallback) {
|
|
152
|
+
editCallback(rowData);
|
|
153
|
+
} else {
|
|
154
|
+
actionCalls.edit(rowData); // DEPRECATED
|
|
155
|
+
}
|
|
143
156
|
};
|
|
144
157
|
|
|
145
158
|
var handleCreate = function handleCreate(index) {
|
|
@@ -147,7 +160,11 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
147
160
|
_a = _fields$value$index2.actionListActions,
|
|
148
161
|
rowData = _objectWithoutProperties(_fields$value$index2, _excluded3);
|
|
149
162
|
|
|
150
|
-
|
|
163
|
+
if (createCallback) {
|
|
164
|
+
createCallback(rowData);
|
|
165
|
+
} else {
|
|
166
|
+
actionCalls.create(rowData); // DEPRECATED
|
|
167
|
+
}
|
|
151
168
|
};
|
|
152
169
|
|
|
153
170
|
var getColumnWidths = function getColumnWidths() {
|
|
@@ -211,9 +228,20 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
211
228
|
children: actions === null || actions === void 0 ? void 0 : actions.map(function (action) {
|
|
212
229
|
var _action$label;
|
|
213
230
|
|
|
214
|
-
var actionFunction
|
|
215
|
-
|
|
216
|
-
|
|
231
|
+
var actionFunction;
|
|
232
|
+
|
|
233
|
+
if (action.callback) {
|
|
234
|
+
actionFunction = function actionFunction() {
|
|
235
|
+
return action.callback(rest);
|
|
236
|
+
};
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
if (!actionFunction && actionCalls[action.name]) {
|
|
240
|
+
actionFunction = function actionFunction() {
|
|
241
|
+
return actionCalls[action.name](rest);
|
|
242
|
+
}; // DEPRECATED
|
|
243
|
+
|
|
244
|
+
} // Edit has special action functionality, revealing fields etc.
|
|
217
245
|
|
|
218
246
|
|
|
219
247
|
if (action.name === 'edit') {
|
|
@@ -228,7 +256,12 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
228
256
|
disabled: editing,
|
|
229
257
|
icon: action.icon,
|
|
230
258
|
marginBottom0: true,
|
|
231
|
-
onClick:
|
|
259
|
+
onClick: function onClick() {
|
|
260
|
+
return actionFunction ? actionFunction() : function () {
|
|
261
|
+
return null;
|
|
262
|
+
};
|
|
263
|
+
},
|
|
264
|
+
to: action.to
|
|
232
265
|
}, "action-".concat(action.name, "[").concat(data.rowIndex, "]"));
|
|
233
266
|
} // Else return a button with the label, or failing that the name of the action
|
|
234
267
|
|
|
@@ -236,7 +269,12 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
236
269
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
237
270
|
disabled: editing,
|
|
238
271
|
marginBottom0: true,
|
|
239
|
-
onClick:
|
|
272
|
+
onClick: function onClick() {
|
|
273
|
+
return actionFunction ? actionFunction() : function () {
|
|
274
|
+
return null;
|
|
275
|
+
};
|
|
276
|
+
},
|
|
277
|
+
to: action.to,
|
|
240
278
|
children: (_action$label = action.label) !== null && _action$label !== void 0 ? _action$label : action.name
|
|
241
279
|
}, "action-".concat(action.name, "[").concat(data.rowIndex, "]"));
|
|
242
280
|
})
|
|
@@ -333,7 +371,8 @@ var ActionListFieldArray = function ActionListFieldArray(_ref) {
|
|
|
333
371
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
334
372
|
children: [!hideCreateButton && /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.Button, {
|
|
335
373
|
buttonClass: _ActionListFieldArray.default.buttonRight,
|
|
336
|
-
disabled: !actionCalls.create
|
|
374
|
+
disabled: !actionCalls.create && !createCallback // DEPRECATED actionCalls
|
|
375
|
+
,
|
|
337
376
|
onClick: function onClick() {
|
|
338
377
|
toggleEditing('NEW_ROW');
|
|
339
378
|
fields.push({});
|
|
@@ -23,7 +23,7 @@ var _FormModal = _interopRequireDefault(require("../../FormModal/FormModal"));
|
|
|
23
23
|
|
|
24
24
|
var _CustomPropertiesLookup = _interopRequireDefault(require("./CustomPropertiesLookup"));
|
|
25
25
|
|
|
26
|
-
var
|
|
26
|
+
var _CustomPropertyView = _interopRequireDefault(require("./CustomPropertyView"));
|
|
27
27
|
|
|
28
28
|
var _CustomPropertyForm = _interopRequireDefault(require("./CustomPropertyForm"));
|
|
29
29
|
|
|
@@ -222,7 +222,7 @@ var CustomPropertiesSettings = function CustomPropertiesSettings(_ref) {
|
|
|
222
222
|
return setCustomProperty();
|
|
223
223
|
},
|
|
224
224
|
paneTitle: (_ref3 = (_renderViewPaneTitle = renderViewPaneTitle) !== null && _renderViewPaneTitle !== void 0 ? _renderViewPaneTitle : customProperty === null || customProperty === void 0 ? void 0 : customProperty.label) !== null && _ref3 !== void 0 ? _ref3 : customProperty === null || customProperty === void 0 ? void 0 : customProperty.name,
|
|
225
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(
|
|
225
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_CustomPropertyView.default, {
|
|
226
226
|
customProperty: customProperty,
|
|
227
227
|
labelOverrides: labelOverrides
|
|
228
228
|
})
|
|
@@ -230,6 +230,7 @@ var CustomPropertiesSettings = function CustomPropertiesSettings(_ref) {
|
|
|
230
230
|
initialValues: mode === CREATING ? {
|
|
231
231
|
weight: 0,
|
|
232
232
|
primary: true,
|
|
233
|
+
retired: false,
|
|
233
234
|
defaultInternal: true
|
|
234
235
|
} : _objectSpread(_objectSpread({}, customProperty), {}, {
|
|
235
236
|
ctx: customProperty !== null && customProperty !== void 0 && customProperty.ctx ? [{
|