@punica/form 1.1.4 → 1.1.6
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.
|
@@ -25,35 +25,11 @@ export declare class FormController<E, F extends FormItem<E>> extends BaseListen
|
|
|
25
25
|
* @param data Data associated with the event
|
|
26
26
|
*/
|
|
27
27
|
private fireEvent;
|
|
28
|
-
/**
|
|
29
|
-
* Create a command item for a form item.
|
|
30
|
-
* @param item The form item
|
|
31
|
-
* @returns A promise that resolves to a CommandItem
|
|
32
|
-
*/
|
|
33
|
-
private createCommandItem;
|
|
34
28
|
/**
|
|
35
29
|
* Create a command service for the form.
|
|
36
30
|
* @returns A CommandService for the form
|
|
37
31
|
*/
|
|
38
32
|
private createCommandService;
|
|
39
|
-
/**
|
|
40
|
-
* Get a form item by its property key.
|
|
41
|
-
* @param property The property key of the form item
|
|
42
|
-
* @returns The form item corresponding to the property key
|
|
43
|
-
*/
|
|
44
|
-
private getItem;
|
|
45
|
-
/**
|
|
46
|
-
* Write an array of form items to the form data.
|
|
47
|
-
* @param items An array of form items
|
|
48
|
-
*/
|
|
49
|
-
private writeItems;
|
|
50
|
-
/**
|
|
51
|
-
* Get services by their names.
|
|
52
|
-
* @param serviceName The name of the service
|
|
53
|
-
* @param additionalServiceNames Additional names of services
|
|
54
|
-
* @returns The requested services
|
|
55
|
-
*/
|
|
56
|
-
getServices<T = IServiceInitialize<E, F> & IServiceControl & IServiceCommand, R = T & Array<T>>(serviceName: string, ...additionalServiceNames: string[]): R;
|
|
57
33
|
/**
|
|
58
34
|
* Registers form items by triggering the REGISTER_ITEMS event.
|
|
59
35
|
*/
|
|
@@ -78,6 +54,13 @@ export declare class FormController<E, F extends FormItem<E>> extends BaseListen
|
|
|
78
54
|
* Creates a deep copy of the form data for the initial state.
|
|
79
55
|
*/
|
|
80
56
|
private deepCopyForm;
|
|
57
|
+
/**
|
|
58
|
+
* Get services by their names.
|
|
59
|
+
* @param serviceName The name of the service
|
|
60
|
+
* @param additionalServiceNames Additional names of services
|
|
61
|
+
* @returns The requested services
|
|
62
|
+
*/
|
|
63
|
+
getServices<T = IServiceInitialize<E, F> & IServiceControl & IServiceCommand, R = T & Array<T>>(serviceName: string, ...additionalServiceNames: string[]): R;
|
|
81
64
|
/**
|
|
82
65
|
* Starts the form controller by executing all necessary steps to initialize the form.
|
|
83
66
|
* @returns A promise that resolves when the form is fully initialized.
|
package/dist/controller/index.js
CHANGED
|
@@ -30,6 +30,124 @@ class FormController extends common_1.BaseListener {
|
|
|
30
30
|
_FormController_form.set(this, void 0); // Current form data
|
|
31
31
|
_FormController_initialForm.set(this, void 0); // Initial deep copy of the form data
|
|
32
32
|
_FormController_initialEntity.set(this, void 0); // Initial entity for the form
|
|
33
|
+
//#endregion
|
|
34
|
+
/**
|
|
35
|
+
* Trigger a form event.
|
|
36
|
+
* @param eventType The type of the event
|
|
37
|
+
* @param data Data associated with the event
|
|
38
|
+
*/
|
|
39
|
+
this.fireEvent = (eventType, data) => {
|
|
40
|
+
this.trigger(eventType, data);
|
|
41
|
+
};
|
|
42
|
+
/**
|
|
43
|
+
* Create a command service for the form.
|
|
44
|
+
* @returns A CommandService for the form
|
|
45
|
+
*/
|
|
46
|
+
this.createCommandService = () => {
|
|
47
|
+
const self = this;
|
|
48
|
+
const getItem = (property) => {
|
|
49
|
+
const { items } = __classPrivateFieldGet(self, _FormController_form, "f");
|
|
50
|
+
const itemIndex = __classPrivateFieldGet(self, _FormController_itemsMap, "f")[property];
|
|
51
|
+
if (!Number.isInteger(itemIndex))
|
|
52
|
+
return null;
|
|
53
|
+
return items[itemIndex];
|
|
54
|
+
};
|
|
55
|
+
const writeItems = async (arr) => {
|
|
56
|
+
for (const item of arr) {
|
|
57
|
+
const { items } = __classPrivateFieldGet(self, _FormController_form, "f");
|
|
58
|
+
const index = __classPrivateFieldGet(self, _FormController_itemsMap, "f")[item.property];
|
|
59
|
+
items[index] = item;
|
|
60
|
+
}
|
|
61
|
+
};
|
|
62
|
+
const fireEvent = (ev, data) => {
|
|
63
|
+
self.trigger(ev, data);
|
|
64
|
+
};
|
|
65
|
+
const createCommandItem = async (item) => {
|
|
66
|
+
var _a, _b;
|
|
67
|
+
let itemCustomCommand = {};
|
|
68
|
+
for await (const service of (_b = (_a = __classPrivateFieldGet(self, _FormController_form, "f")) === null || _a === void 0 ? void 0 : _a.services) !== null && _b !== void 0 ? _b : []) {
|
|
69
|
+
const { addCustomFeaturesForCommandItem } = service;
|
|
70
|
+
if (addCustomFeaturesForCommandItem) {
|
|
71
|
+
const command = addCustomFeaturesForCommandItem();
|
|
72
|
+
itemCustomCommand = { ...itemCustomCommand, ...command };
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
return {
|
|
76
|
+
formItem: item,
|
|
77
|
+
initialEntity: __classPrivateFieldGet(self, _FormController_initialEntity, "f"),
|
|
78
|
+
getItem,
|
|
79
|
+
writeItems,
|
|
80
|
+
...itemCustomCommand
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
return {
|
|
84
|
+
initialForm: __classPrivateFieldGet(self, _FormController_initialForm, "f"),
|
|
85
|
+
initialEntity: __classPrivateFieldGet(self, _FormController_initialEntity, "f"),
|
|
86
|
+
form: __classPrivateFieldGet(self, _FormController_form, "f"),
|
|
87
|
+
itemsMap: __classPrivateFieldGet(self, _FormController_itemsMap, "f"),
|
|
88
|
+
getItem,
|
|
89
|
+
writeItems,
|
|
90
|
+
fireEvent,
|
|
91
|
+
createCommandItem
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
/**
|
|
95
|
+
* Registers form items by triggering the REGISTER_ITEMS event.
|
|
96
|
+
*/
|
|
97
|
+
this.registerFormItems = () => {
|
|
98
|
+
this.fireEvent('REGISTER_ITEMS', __1.FormItemRegister.getInstance().getItemKeys());
|
|
99
|
+
};
|
|
100
|
+
/**
|
|
101
|
+
* Maps form items to their properties.
|
|
102
|
+
*/
|
|
103
|
+
this.mapFormItems = () => {
|
|
104
|
+
let index = 0;
|
|
105
|
+
__classPrivateFieldSet(this, _FormController_itemsMap, {}, "f");
|
|
106
|
+
for (const item of __classPrivateFieldGet(this, _FormController_form, "f").items) {
|
|
107
|
+
__classPrivateFieldGet(this, _FormController_itemsMap, "f")[item.property] = index++;
|
|
108
|
+
}
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Initializes the services defined in the form data.
|
|
112
|
+
*/
|
|
113
|
+
this.initializeServices = async () => {
|
|
114
|
+
if (__classPrivateFieldGet(this, _FormController_form, "f").services) {
|
|
115
|
+
for await (const service of __classPrivateFieldGet(this, _FormController_form, "f").services) {
|
|
116
|
+
const command = this.createCommandService();
|
|
117
|
+
const serviceControl = service;
|
|
118
|
+
__classPrivateFieldGet(this, _FormController_serviceMap, "f")[service.name] = service;
|
|
119
|
+
if (serviceControl.initialize) {
|
|
120
|
+
await serviceControl.initialize(command);
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
};
|
|
125
|
+
/**
|
|
126
|
+
* Executes the readers defined in the form data.
|
|
127
|
+
*/
|
|
128
|
+
this.runReaders = async () => {
|
|
129
|
+
if (__classPrivateFieldGet(this, _FormController_form, "f").readers) {
|
|
130
|
+
for await (const reader of __classPrivateFieldGet(this, _FormController_form, "f").readers) {
|
|
131
|
+
reader.read(__classPrivateFieldGet(this, _FormController_initialEntity, "f"), __classPrivateFieldGet(this, _FormController_form, "f"), __classPrivateFieldGet(this, _FormController_itemsMap, "f"));
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
};
|
|
135
|
+
/**
|
|
136
|
+
* Executes the starters defined in the form data.
|
|
137
|
+
*/
|
|
138
|
+
this.runStarters = async () => {
|
|
139
|
+
if (__classPrivateFieldGet(this, _FormController_form, "f").starters) {
|
|
140
|
+
for await (const starter of __classPrivateFieldGet(this, _FormController_form, "f").starters) {
|
|
141
|
+
__classPrivateFieldSet(this, _FormController_form, await starter.run(__classPrivateFieldGet(this, _FormController_form, "f"), __classPrivateFieldGet(this, _FormController_initialEntity, "f")), "f");
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
};
|
|
145
|
+
/**
|
|
146
|
+
* Creates a deep copy of the form data for the initial state.
|
|
147
|
+
*/
|
|
148
|
+
this.deepCopyForm = () => {
|
|
149
|
+
__classPrivateFieldSet(this, _FormController_initialForm, (0, __1.deepCopy)(__classPrivateFieldGet(this, _FormController_form, "f")), "f");
|
|
150
|
+
};
|
|
33
151
|
__classPrivateFieldSet(this, _FormController_serviceMap, {}, "f");
|
|
34
152
|
__classPrivateFieldSet(this, _FormController_itemsMap, {}, "f");
|
|
35
153
|
}
|
|
@@ -64,79 +182,6 @@ class FormController extends common_1.BaseListener {
|
|
|
64
182
|
resolve(instance);
|
|
65
183
|
});
|
|
66
184
|
}
|
|
67
|
-
//#endregion
|
|
68
|
-
/**
|
|
69
|
-
* Trigger a form event.
|
|
70
|
-
* @param eventType The type of the event
|
|
71
|
-
* @param data Data associated with the event
|
|
72
|
-
*/
|
|
73
|
-
fireEvent(eventType, data) {
|
|
74
|
-
this.trigger(eventType, data);
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Create a command item for a form item.
|
|
78
|
-
* @param item The form item
|
|
79
|
-
* @returns A promise that resolves to a CommandItem
|
|
80
|
-
*/
|
|
81
|
-
async createCommandItem(item) {
|
|
82
|
-
var _a;
|
|
83
|
-
let itemCustomCommand = {};
|
|
84
|
-
for await (const service of (_a = __classPrivateFieldGet(this, _FormController_form, "f")) === null || _a === void 0 ? void 0 : _a.services) {
|
|
85
|
-
const { addCustomFeaturesForCommandItem } = service;
|
|
86
|
-
if (addCustomFeaturesForCommandItem) {
|
|
87
|
-
const command = addCustomFeaturesForCommandItem();
|
|
88
|
-
itemCustomCommand = { ...itemCustomCommand, ...command };
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
return {
|
|
92
|
-
formItem: item,
|
|
93
|
-
initialEntity: __classPrivateFieldGet(this, _FormController_initialEntity, "f"),
|
|
94
|
-
getItem: this.getItem.bind(this),
|
|
95
|
-
writeItems: this.writeItems.bind(this),
|
|
96
|
-
...itemCustomCommand
|
|
97
|
-
};
|
|
98
|
-
}
|
|
99
|
-
/**
|
|
100
|
-
* Create a command service for the form.
|
|
101
|
-
* @returns A CommandService for the form
|
|
102
|
-
*/
|
|
103
|
-
createCommandService() {
|
|
104
|
-
return {
|
|
105
|
-
initialForm: __classPrivateFieldGet(this, _FormController_initialForm, "f"),
|
|
106
|
-
initialEntity: __classPrivateFieldGet(this, _FormController_initialEntity, "f"),
|
|
107
|
-
form: __classPrivateFieldGet(this, _FormController_form, "f"),
|
|
108
|
-
itemsMap: __classPrivateFieldGet(this, _FormController_itemsMap, "f"),
|
|
109
|
-
getItem: this.getItem.bind(this),
|
|
110
|
-
writeItems: this.writeItems.bind(this),
|
|
111
|
-
fireEvent: this.fireEvent.bind(this),
|
|
112
|
-
createCommandItem: this.createCommandItem.bind(this)
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
/**
|
|
116
|
-
* Get a form item by its property key.
|
|
117
|
-
* @param property The property key of the form item
|
|
118
|
-
* @returns The form item corresponding to the property key
|
|
119
|
-
*/
|
|
120
|
-
getItem(property) {
|
|
121
|
-
const { items } = __classPrivateFieldGet(this, _FormController_form, "f");
|
|
122
|
-
const itemIndex = __classPrivateFieldGet(this, _FormController_itemsMap, "f")[property];
|
|
123
|
-
if (!Number.isInteger(itemIndex)) {
|
|
124
|
-
return null;
|
|
125
|
-
}
|
|
126
|
-
return items[itemIndex];
|
|
127
|
-
}
|
|
128
|
-
/**
|
|
129
|
-
* Write an array of form items to the form data.
|
|
130
|
-
* @param items An array of form items
|
|
131
|
-
*/
|
|
132
|
-
async writeItems(items) {
|
|
133
|
-
for await (const item of items) {
|
|
134
|
-
const { items } = __classPrivateFieldGet(this, _FormController_form, "f");
|
|
135
|
-
const { property } = item;
|
|
136
|
-
const index = __classPrivateFieldGet(this, _FormController_itemsMap, "f")[property];
|
|
137
|
-
items[index] = item;
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
185
|
/**
|
|
141
186
|
* Get services by their names.
|
|
142
187
|
* @param serviceName The name of the service
|
|
@@ -154,63 +199,6 @@ class FormController extends common_1.BaseListener {
|
|
|
154
199
|
}
|
|
155
200
|
return __classPrivateFieldGet(this, _FormController_serviceMap, "f")[serviceName];
|
|
156
201
|
}
|
|
157
|
-
/**
|
|
158
|
-
* Registers form items by triggering the REGISTER_ITEMS event.
|
|
159
|
-
*/
|
|
160
|
-
registerFormItems() {
|
|
161
|
-
this.fireEvent('REGISTER_ITEMS', __1.FormItemRegister.getInstance().getItemKeys());
|
|
162
|
-
}
|
|
163
|
-
/**
|
|
164
|
-
* Maps form items to their properties.
|
|
165
|
-
*/
|
|
166
|
-
mapFormItems() {
|
|
167
|
-
let index = 0;
|
|
168
|
-
__classPrivateFieldSet(this, _FormController_itemsMap, {}, "f");
|
|
169
|
-
for (const item of __classPrivateFieldGet(this, _FormController_form, "f").items) {
|
|
170
|
-
__classPrivateFieldGet(this, _FormController_itemsMap, "f")[item.property] = index++;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
|
-
/**
|
|
174
|
-
* Initializes the services defined in the form data.
|
|
175
|
-
*/
|
|
176
|
-
async initializeServices() {
|
|
177
|
-
if (__classPrivateFieldGet(this, _FormController_form, "f").services) {
|
|
178
|
-
for await (const service of __classPrivateFieldGet(this, _FormController_form, "f").services) {
|
|
179
|
-
const command = this.createCommandService();
|
|
180
|
-
const serviceControl = service;
|
|
181
|
-
__classPrivateFieldGet(this, _FormController_serviceMap, "f")[service.name] = service;
|
|
182
|
-
if (serviceControl.initialize) {
|
|
183
|
-
await serviceControl.initialize(command);
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
}
|
|
187
|
-
}
|
|
188
|
-
/**
|
|
189
|
-
* Executes the readers defined in the form data.
|
|
190
|
-
*/
|
|
191
|
-
async runReaders() {
|
|
192
|
-
if (__classPrivateFieldGet(this, _FormController_form, "f").readers) {
|
|
193
|
-
for await (const reader of __classPrivateFieldGet(this, _FormController_form, "f").readers) {
|
|
194
|
-
reader.read(__classPrivateFieldGet(this, _FormController_initialEntity, "f"), __classPrivateFieldGet(this, _FormController_form, "f"), __classPrivateFieldGet(this, _FormController_itemsMap, "f"));
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
}
|
|
198
|
-
/**
|
|
199
|
-
* Executes the starters defined in the form data.
|
|
200
|
-
*/
|
|
201
|
-
async runStarters() {
|
|
202
|
-
if (__classPrivateFieldGet(this, _FormController_form, "f").starters) {
|
|
203
|
-
for await (const starter of __classPrivateFieldGet(this, _FormController_form, "f").starters) {
|
|
204
|
-
__classPrivateFieldSet(this, _FormController_form, await starter.run(__classPrivateFieldGet(this, _FormController_form, "f"), __classPrivateFieldGet(this, _FormController_initialEntity, "f")), "f");
|
|
205
|
-
}
|
|
206
|
-
}
|
|
207
|
-
}
|
|
208
|
-
/**
|
|
209
|
-
* Creates a deep copy of the form data for the initial state.
|
|
210
|
-
*/
|
|
211
|
-
deepCopyForm() {
|
|
212
|
-
__classPrivateFieldSet(this, _FormController_initialForm, (0, __1.deepCopy)(__classPrivateFieldGet(this, _FormController_form, "f")), "f");
|
|
213
|
-
}
|
|
214
202
|
/**
|
|
215
203
|
* Starts the form controller by executing all necessary steps to initialize the form.
|
|
216
204
|
* @returns A promise that resolves when the form is fully initialized.
|
|
@@ -26,12 +26,6 @@ declare abstract class BaseReader<E, F extends FormItem<E>> implements IReader<E
|
|
|
26
26
|
* @param form
|
|
27
27
|
*/
|
|
28
28
|
read(entity: E, form: Form<E, F>): Promise<void>;
|
|
29
|
-
/**
|
|
30
|
-
* Gets a form item by property.
|
|
31
|
-
* @param {keyof E} property - The property of the form item.
|
|
32
|
-
* @returns {F} - The form item.
|
|
33
|
-
*/
|
|
34
|
-
protected getItem(property: keyof E): F;
|
|
35
29
|
/**
|
|
36
30
|
* Writes form items.
|
|
37
31
|
* @param {Array<FormItem<E>>} items - The form items to be written.
|
|
@@ -34,8 +34,8 @@ class BaseReader {
|
|
|
34
34
|
return;
|
|
35
35
|
}
|
|
36
36
|
let index = 0;
|
|
37
|
-
__classPrivateFieldSet(this, _BaseReader_itemsMap, {}, "f");
|
|
38
37
|
if (__classPrivateFieldGet(this, _BaseReader_form, "f").items) {
|
|
38
|
+
__classPrivateFieldSet(this, _BaseReader_itemsMap, {}, "f");
|
|
39
39
|
for (const item of __classPrivateFieldGet(this, _BaseReader_form, "f").items) {
|
|
40
40
|
__classPrivateFieldGet(this, _BaseReader_itemsMap, "f")[item.property] = index++;
|
|
41
41
|
}
|
|
@@ -47,10 +47,17 @@ class BaseReader {
|
|
|
47
47
|
* @returns {CommandItem<E, F>} - The command item.
|
|
48
48
|
*/
|
|
49
49
|
getCommand(item) {
|
|
50
|
+
const self = this;
|
|
51
|
+
const getItem = (property) => {
|
|
52
|
+
const { items } = __classPrivateFieldGet(self, _BaseReader_form, "f");
|
|
53
|
+
const index = __classPrivateFieldGet(self, _BaseReader_itemsMap, "f")[property];
|
|
54
|
+
const item = items[index];
|
|
55
|
+
return item;
|
|
56
|
+
};
|
|
50
57
|
return {
|
|
51
58
|
formItem: item,
|
|
52
|
-
initialEntity: __classPrivateFieldGet(
|
|
53
|
-
getItem:
|
|
59
|
+
initialEntity: __classPrivateFieldGet(self, _BaseReader_entity, "f"),
|
|
60
|
+
getItem: getItem
|
|
54
61
|
};
|
|
55
62
|
}
|
|
56
63
|
/**
|
|
@@ -61,19 +68,8 @@ class BaseReader {
|
|
|
61
68
|
async read(entity, form) {
|
|
62
69
|
__classPrivateFieldSet(this, _BaseReader_entity, entity, "f");
|
|
63
70
|
__classPrivateFieldSet(this, _BaseReader_form, form, "f");
|
|
71
|
+
await this.reader.read(entity, __classPrivateFieldGet(this, _BaseReader_form, "f"), __classPrivateFieldGet(this, _BaseReader_itemsMap, "f"));
|
|
64
72
|
this.mapFormItems();
|
|
65
|
-
await this.reader.read(entity, form, __classPrivateFieldGet(this, _BaseReader_itemsMap, "f"));
|
|
66
|
-
}
|
|
67
|
-
/**
|
|
68
|
-
* Gets a form item by property.
|
|
69
|
-
* @param {keyof E} property - The property of the form item.
|
|
70
|
-
* @returns {F} - The form item.
|
|
71
|
-
*/
|
|
72
|
-
getItem(property) {
|
|
73
|
-
const { items } = __classPrivateFieldGet(this, _BaseReader_form, "f");
|
|
74
|
-
const index = __classPrivateFieldGet(this, _BaseReader_itemsMap, "f")[property];
|
|
75
|
-
const item = items[index];
|
|
76
|
-
return item;
|
|
77
73
|
}
|
|
78
74
|
/**
|
|
79
75
|
* Writes form items.
|
|
@@ -11,30 +11,22 @@ class Reader extends base_1.default {
|
|
|
11
11
|
* @param entity - The entity to be read
|
|
12
12
|
* @returns Promise<Array<F>> - Created form items
|
|
13
13
|
*/
|
|
14
|
-
createFormItemsFromEntity(entity) {
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (!formItem) {
|
|
31
|
-
continue;
|
|
32
|
-
}
|
|
33
|
-
formItem.property = key;
|
|
34
|
-
items.push(formItem);
|
|
35
|
-
}
|
|
36
|
-
resolve(items);
|
|
37
|
-
});
|
|
14
|
+
async createFormItemsFromEntity(entity) {
|
|
15
|
+
const items = [];
|
|
16
|
+
const formItemPool = {};
|
|
17
|
+
const registeredItems = __1.FormItemRegister.getInstance().getItemKeys();
|
|
18
|
+
for (const property of registeredItems) {
|
|
19
|
+
const meta = Reflect.getMetadata(property, entity);
|
|
20
|
+
if (meta)
|
|
21
|
+
Object.assign(formItemPool, meta);
|
|
22
|
+
}
|
|
23
|
+
for (const key of Object.keys(entity)) {
|
|
24
|
+
const formItem = formItemPool[key];
|
|
25
|
+
if (!formItem)
|
|
26
|
+
continue;
|
|
27
|
+
items.push({ ...formItem, property: key });
|
|
28
|
+
}
|
|
29
|
+
return items;
|
|
38
30
|
}
|
|
39
31
|
/**
|
|
40
32
|
* Reads form data from the entity.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@punica/form",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.6",
|
|
4
4
|
"description": "Form",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "Uryan Sezgin TEKE",
|
|
@@ -36,5 +36,5 @@
|
|
|
36
36
|
"@punica/common": "^1.0.1",
|
|
37
37
|
"@punica/util": "^1.0.2"
|
|
38
38
|
},
|
|
39
|
-
"gitHead": "
|
|
39
|
+
"gitHead": "6a04e8299bcc2b57b41680d1768d0b11ec51938e"
|
|
40
40
|
}
|