@genesislcap/foundation-entity-management 14.462.0 → 14.463.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/dist/react.cjs CHANGED
@@ -88,8 +88,12 @@ const EntityManagement = React.forwardRef(function EntityManagement(props, ref)
88
88
  });
89
89
 
90
90
  const SmartFormModal = React.forwardRef(function SmartFormModal(props, ref) {
91
- const { onRequestChanged, onCriteriaChanged, onCreateEntity, onEditEntity, onDeleteEntity, onSubmitFailure, onSubmitSuccess, onRowClick, onRowDblClick, onRowSelected, onSelectionChanged, children, ...rest } = props;
91
+ const { onSubmitSuccess, onSubmitFailure, onRequestChanged, onCriteriaChanged, onCreateEntity, onEditEntity, onDeleteEntity, onRowClick, onRowDblClick, onRowSelected, onSelectionChanged, children, ...rest } = props;
92
92
  const _innerRef = React.useRef(null);
93
+ const _onSubmitSuccessRef = React.useRef(onSubmitSuccess);
94
+ _onSubmitSuccessRef.current = onSubmitSuccess;
95
+ const _onSubmitFailureRef = React.useRef(onSubmitFailure);
96
+ _onSubmitFailureRef.current = onSubmitFailure;
93
97
  const _onRequestChangedRef = React.useRef(onRequestChanged);
94
98
  _onRequestChangedRef.current = onRequestChanged;
95
99
  const _onCriteriaChangedRef = React.useRef(onCriteriaChanged);
@@ -100,10 +104,6 @@ const SmartFormModal = React.forwardRef(function SmartFormModal(props, ref) {
100
104
  _onEditEntityRef.current = onEditEntity;
101
105
  const _onDeleteEntityRef = React.useRef(onDeleteEntity);
102
106
  _onDeleteEntityRef.current = onDeleteEntity;
103
- const _onSubmitFailureRef = React.useRef(onSubmitFailure);
104
- _onSubmitFailureRef.current = onSubmitFailure;
105
- const _onSubmitSuccessRef = React.useRef(onSubmitSuccess);
106
- _onSubmitSuccessRef.current = onSubmitSuccess;
107
107
  const _onRowClickRef = React.useRef(onRowClick);
108
108
  _onRowClickRef.current = onRowClick;
109
109
  const _onRowDblClickRef = React.useRef(onRowDblClick);
@@ -115,6 +115,10 @@ const SmartFormModal = React.forwardRef(function SmartFormModal(props, ref) {
115
115
  React.useLayoutEffect(() => {
116
116
  const el = _innerRef.current;
117
117
  if (!el) return;
118
+ const _onSubmitSuccessFn = (e) => _onSubmitSuccessRef.current?.(e);
119
+ el.addEventListener('submit-success', _onSubmitSuccessFn);
120
+ const _onSubmitFailureFn = (e) => _onSubmitFailureRef.current?.(e);
121
+ el.addEventListener('submit-failure', _onSubmitFailureFn);
118
122
  const _onRequestChangedFn = (e) => _onRequestChangedRef.current?.(e);
119
123
  el.addEventListener('request-changed', _onRequestChangedFn);
120
124
  const _onCriteriaChangedFn = (e) => _onCriteriaChangedRef.current?.(e);
@@ -125,10 +129,6 @@ const SmartFormModal = React.forwardRef(function SmartFormModal(props, ref) {
125
129
  el.addEventListener('edit-entity', _onEditEntityFn);
126
130
  const _onDeleteEntityFn = (e) => _onDeleteEntityRef.current?.(e);
127
131
  el.addEventListener('delete-entity', _onDeleteEntityFn);
128
- const _onSubmitFailureFn = (e) => _onSubmitFailureRef.current?.(e);
129
- el.addEventListener('submit-failure', _onSubmitFailureFn);
130
- const _onSubmitSuccessFn = (e) => _onSubmitSuccessRef.current?.(e);
131
- el.addEventListener('submit-success', _onSubmitSuccessFn);
132
132
  const _onRowClickFn = (e) => _onRowClickRef.current?.(e);
133
133
  el.addEventListener('rowClick', _onRowClickFn);
134
134
  const _onRowDblClickFn = (e) => _onRowDblClickRef.current?.(e);
@@ -138,13 +138,13 @@ const SmartFormModal = React.forwardRef(function SmartFormModal(props, ref) {
138
138
  const _onSelectionChangedFn = (e) => _onSelectionChangedRef.current?.(e);
139
139
  el.addEventListener('selectionChanged', _onSelectionChangedFn);
140
140
  return () => {
141
+ el.removeEventListener('submit-success', _onSubmitSuccessFn);
142
+ el.removeEventListener('submit-failure', _onSubmitFailureFn);
141
143
  el.removeEventListener('request-changed', _onRequestChangedFn);
142
144
  el.removeEventListener('criteria-changed', _onCriteriaChangedFn);
143
145
  el.removeEventListener('create-entity', _onCreateEntityFn);
144
146
  el.removeEventListener('edit-entity', _onEditEntityFn);
145
147
  el.removeEventListener('delete-entity', _onDeleteEntityFn);
146
- el.removeEventListener('submit-failure', _onSubmitFailureFn);
147
- el.removeEventListener('submit-success', _onSubmitSuccessFn);
148
148
  el.removeEventListener('rowClick', _onRowClickFn);
149
149
  el.removeEventListener('rowDblClick', _onRowDblClickFn);
150
150
  el.removeEventListener('rowSelected', _onRowSelectedFn);
package/dist/react.mjs CHANGED
@@ -86,8 +86,12 @@ export const EntityManagement = React.forwardRef(function EntityManagement(props
86
86
  });
87
87
 
88
88
  export const SmartFormModal = React.forwardRef(function SmartFormModal(props, ref) {
89
- const { onRequestChanged, onCriteriaChanged, onCreateEntity, onEditEntity, onDeleteEntity, onSubmitFailure, onSubmitSuccess, onRowClick, onRowDblClick, onRowSelected, onSelectionChanged, children, ...rest } = props;
89
+ const { onSubmitSuccess, onSubmitFailure, onRequestChanged, onCriteriaChanged, onCreateEntity, onEditEntity, onDeleteEntity, onRowClick, onRowDblClick, onRowSelected, onSelectionChanged, children, ...rest } = props;
90
90
  const _innerRef = React.useRef(null);
91
+ const _onSubmitSuccessRef = React.useRef(onSubmitSuccess);
92
+ _onSubmitSuccessRef.current = onSubmitSuccess;
93
+ const _onSubmitFailureRef = React.useRef(onSubmitFailure);
94
+ _onSubmitFailureRef.current = onSubmitFailure;
91
95
  const _onRequestChangedRef = React.useRef(onRequestChanged);
92
96
  _onRequestChangedRef.current = onRequestChanged;
93
97
  const _onCriteriaChangedRef = React.useRef(onCriteriaChanged);
@@ -98,10 +102,6 @@ export const SmartFormModal = React.forwardRef(function SmartFormModal(props, re
98
102
  _onEditEntityRef.current = onEditEntity;
99
103
  const _onDeleteEntityRef = React.useRef(onDeleteEntity);
100
104
  _onDeleteEntityRef.current = onDeleteEntity;
101
- const _onSubmitFailureRef = React.useRef(onSubmitFailure);
102
- _onSubmitFailureRef.current = onSubmitFailure;
103
- const _onSubmitSuccessRef = React.useRef(onSubmitSuccess);
104
- _onSubmitSuccessRef.current = onSubmitSuccess;
105
105
  const _onRowClickRef = React.useRef(onRowClick);
106
106
  _onRowClickRef.current = onRowClick;
107
107
  const _onRowDblClickRef = React.useRef(onRowDblClick);
@@ -113,6 +113,10 @@ export const SmartFormModal = React.forwardRef(function SmartFormModal(props, re
113
113
  React.useLayoutEffect(() => {
114
114
  const el = _innerRef.current;
115
115
  if (!el) return;
116
+ const _onSubmitSuccessFn = (e) => _onSubmitSuccessRef.current?.(e);
117
+ el.addEventListener('submit-success', _onSubmitSuccessFn);
118
+ const _onSubmitFailureFn = (e) => _onSubmitFailureRef.current?.(e);
119
+ el.addEventListener('submit-failure', _onSubmitFailureFn);
116
120
  const _onRequestChangedFn = (e) => _onRequestChangedRef.current?.(e);
117
121
  el.addEventListener('request-changed', _onRequestChangedFn);
118
122
  const _onCriteriaChangedFn = (e) => _onCriteriaChangedRef.current?.(e);
@@ -123,10 +127,6 @@ export const SmartFormModal = React.forwardRef(function SmartFormModal(props, re
123
127
  el.addEventListener('edit-entity', _onEditEntityFn);
124
128
  const _onDeleteEntityFn = (e) => _onDeleteEntityRef.current?.(e);
125
129
  el.addEventListener('delete-entity', _onDeleteEntityFn);
126
- const _onSubmitFailureFn = (e) => _onSubmitFailureRef.current?.(e);
127
- el.addEventListener('submit-failure', _onSubmitFailureFn);
128
- const _onSubmitSuccessFn = (e) => _onSubmitSuccessRef.current?.(e);
129
- el.addEventListener('submit-success', _onSubmitSuccessFn);
130
130
  const _onRowClickFn = (e) => _onRowClickRef.current?.(e);
131
131
  el.addEventListener('rowClick', _onRowClickFn);
132
132
  const _onRowDblClickFn = (e) => _onRowDblClickRef.current?.(e);
@@ -136,13 +136,13 @@ export const SmartFormModal = React.forwardRef(function SmartFormModal(props, re
136
136
  const _onSelectionChangedFn = (e) => _onSelectionChangedRef.current?.(e);
137
137
  el.addEventListener('selectionChanged', _onSelectionChangedFn);
138
138
  return () => {
139
+ el.removeEventListener('submit-success', _onSubmitSuccessFn);
140
+ el.removeEventListener('submit-failure', _onSubmitFailureFn);
139
141
  el.removeEventListener('request-changed', _onRequestChangedFn);
140
142
  el.removeEventListener('criteria-changed', _onCriteriaChangedFn);
141
143
  el.removeEventListener('create-entity', _onCreateEntityFn);
142
144
  el.removeEventListener('edit-entity', _onEditEntityFn);
143
145
  el.removeEventListener('delete-entity', _onDeleteEntityFn);
144
- el.removeEventListener('submit-failure', _onSubmitFailureFn);
145
- el.removeEventListener('submit-success', _onSubmitSuccessFn);
146
146
  el.removeEventListener('rowClick', _onRowClickFn);
147
147
  el.removeEventListener('rowDblClick', _onRowDblClickFn);
148
148
  el.removeEventListener('rowSelected', _onRowSelectedFn);
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genesislcap/foundation-entity-management",
3
3
  "description": "Genesis Foundation Entity Management",
4
- "version": "14.462.0",
4
+ "version": "14.463.0",
5
5
  "sideEffects": false,
6
6
  "license": "SEE LICENSE IN license.txt",
7
7
  "main": "dist/esm/index.js",
@@ -54,32 +54,32 @@
54
54
  }
55
55
  },
56
56
  "devDependencies": {
57
- "@genesislcap/foundation-testing": "14.462.0",
58
- "@genesislcap/genx": "14.462.0",
59
- "@genesislcap/rollup-builder": "14.462.0",
60
- "@genesislcap/ts-builder": "14.462.0",
61
- "@genesislcap/uvu-playwright-builder": "14.462.0",
62
- "@genesislcap/vite-builder": "14.462.0",
63
- "@genesislcap/webpack-builder": "14.462.0"
57
+ "@genesislcap/foundation-testing": "14.463.0",
58
+ "@genesislcap/genx": "14.463.0",
59
+ "@genesislcap/rollup-builder": "14.463.0",
60
+ "@genesislcap/ts-builder": "14.463.0",
61
+ "@genesislcap/uvu-playwright-builder": "14.463.0",
62
+ "@genesislcap/vite-builder": "14.463.0",
63
+ "@genesislcap/webpack-builder": "14.463.0"
64
64
  },
65
65
  "peerDependencies": {
66
66
  "@ag-grid-community/core": "29.2.0"
67
67
  },
68
68
  "dependencies": {
69
- "@genesislcap/foundation-ai": "14.462.0",
70
- "@genesislcap/foundation-comms": "14.462.0",
71
- "@genesislcap/foundation-errors": "14.462.0",
72
- "@genesislcap/foundation-events": "14.462.0",
73
- "@genesislcap/foundation-forms": "14.462.0",
74
- "@genesislcap/foundation-logger": "14.462.0",
75
- "@genesislcap/foundation-login": "14.462.0",
76
- "@genesislcap/foundation-notifications": "14.462.0",
77
- "@genesislcap/foundation-ui": "14.462.0",
78
- "@genesislcap/foundation-utils": "14.462.0",
79
- "@genesislcap/foundation-zero": "14.462.0",
80
- "@genesislcap/foundation-zero-grid-pro": "14.462.0",
81
- "@genesislcap/grid-pro": "14.462.0",
82
- "@genesislcap/web-core": "14.462.0",
69
+ "@genesislcap/foundation-ai": "14.463.0",
70
+ "@genesislcap/foundation-comms": "14.463.0",
71
+ "@genesislcap/foundation-errors": "14.463.0",
72
+ "@genesislcap/foundation-events": "14.463.0",
73
+ "@genesislcap/foundation-forms": "14.463.0",
74
+ "@genesislcap/foundation-logger": "14.463.0",
75
+ "@genesislcap/foundation-login": "14.463.0",
76
+ "@genesislcap/foundation-notifications": "14.463.0",
77
+ "@genesislcap/foundation-ui": "14.463.0",
78
+ "@genesislcap/foundation-utils": "14.463.0",
79
+ "@genesislcap/foundation-zero": "14.463.0",
80
+ "@genesislcap/foundation-zero-grid-pro": "14.463.0",
81
+ "@genesislcap/grid-pro": "14.463.0",
82
+ "@genesislcap/web-core": "14.463.0",
83
83
  "change-case": "^4.1.2"
84
84
  },
85
85
  "repository": {
@@ -102,5 +102,5 @@
102
102
  "require": "./dist/react.cjs"
103
103
  }
104
104
  },
105
- "gitHead": "d332227a536531b1b807ae33f65ce4639f0991ba"
105
+ "gitHead": "10609317b421ff2f0ea1f95dc584808a854d625e"
106
106
  }