@mediusinc/mng-commons-data-api 5.2.0-rc.2 → 5.3.0-rc.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/esm2022/tableview/schema/columns-from-schema.mjs +15 -9
- package/esm2022/tableview/schema/fields-from-schema.mjs +25 -13
- package/esm2022/tableview/schema/internal/common-from-schema.mjs +1 -8
- package/fesm2022/mediusinc-mng-commons-data-api-tableview.mjs +36 -25
- package/fesm2022/mediusinc-mng-commons-data-api-tableview.mjs.map +1 -1
- package/package.json +2 -2
- package/tableview/schema/columns-from-schema.d.ts +14 -10
- package/tableview/schema/fields-from-schema.d.ts +32 -26
- package/tableview/schema/internal/common-from-schema.d.ts +0 -10
- package/version-info.json +5 -5
|
@@ -3,22 +3,28 @@ import { ArrayItemType, KeyofAndOfType } from '@mediusinc/mng-commons/core';
|
|
|
3
3
|
import { EnumDescriptor, TypeDescriptor } from '@mediusinc/mng-commons/model';
|
|
4
4
|
import { ITableDataProvider, TableDescriptorInst } from '@mediusinc/mng-commons/table/api';
|
|
5
5
|
import { AFieldDescriptor, EditorDescriptorInst, FieldInputDescriptor, FieldLookupDescriptor, FieldLookupEnumDescriptor, FieldLookupProviderType, FieldManyEditorDescriptor, FieldManyToManyEditorDescriptor, TableviewDescriptorInst } from '@mediusinc/mng-commons/tableview/api';
|
|
6
|
-
import { FromSchemaCurrencyOptsType } from './internal/common-from-schema';
|
|
7
6
|
type FieldInputType = 'number' | 'currency' | 'boolean' | 'string' | 'text' | 'textarea' | 'date' | 'date-time' | 'enum' | 'hidden';
|
|
8
|
-
type
|
|
7
|
+
type FromSchemaCommonOptsType<Model> = {
|
|
8
|
+
dateFormat?: string;
|
|
9
|
+
dateTimeFormat?: string;
|
|
10
|
+
textareaRows?: number;
|
|
11
|
+
numberUseGrouping?: boolean;
|
|
12
|
+
numberStep?: number;
|
|
13
|
+
numberMinFractionDigits?: number;
|
|
14
|
+
numberMaxFractionDigits?: number;
|
|
15
|
+
currency?: string;
|
|
16
|
+
currencyProperty?: keyof Model;
|
|
17
|
+
currencyDisplay?: 'symbol' | 'code' | 'name';
|
|
18
|
+
};
|
|
19
|
+
type FieldsFromSchemaOptsType<Model = any> = FromSchemaCommonOptsType<Model> & {
|
|
9
20
|
fieldTypes?: Partial<Record<keyof Model, FieldInputType>>;
|
|
10
21
|
enumModels?: Partial<Record<keyof Model, EnumDescriptor<any>>>;
|
|
11
22
|
enumSchemas?: Partial<Record<keyof Model, SchemaEnum<any>>>;
|
|
12
|
-
dateFormat?: string;
|
|
13
|
-
dateTimeFormat?: string;
|
|
14
23
|
};
|
|
15
|
-
type FieldInputFromSchemaOptsType<Model = any, Enum = any> = {
|
|
24
|
+
type FieldInputFromSchemaOptsType<Model = any, Enum = any> = FromSchemaCommonOptsType<Model> & {
|
|
16
25
|
fieldType?: FieldInputType;
|
|
17
26
|
enumSchema?: SchemaEnum<Enum>;
|
|
18
27
|
enumModel?: EnumDescriptor<Enum>;
|
|
19
|
-
currency?: FromSchemaCurrencyOptsType<Model>;
|
|
20
|
-
dateFormat?: string;
|
|
21
|
-
dateTimeFormat?: string;
|
|
22
28
|
};
|
|
23
29
|
/**
|
|
24
30
|
* <em>Experimental:</em> Builder for adding fields to editor.
|
|
@@ -29,7 +35,7 @@ export declare class SchemaFieldsBuilder<Model, Parent = unknown, SchModel = Mod
|
|
|
29
35
|
private readonly descriptor;
|
|
30
36
|
private readonly schema;
|
|
31
37
|
private opts?;
|
|
32
|
-
constructor(descriptor: TableviewDescriptorInst<Model, any, any, Parent> | EditorDescriptorInst<Model>, schema: SchemaModel<SchModel>, opts?: FieldsFromSchemaOptsType<SchModel> | undefined);
|
|
38
|
+
constructor(descriptor: TableviewDescriptorInst<Model, any, any, Parent> | EditorDescriptorInst<Model, Parent>, schema: SchemaModel<SchModel>, opts?: FieldsFromSchemaOptsType<SchModel> | undefined);
|
|
33
39
|
private mergeFieldsInputOpts;
|
|
34
40
|
private mergeFieldInputOpts;
|
|
35
41
|
/**
|
|
@@ -124,7 +130,7 @@ export declare class SchemaFieldsBuilder<Model, Parent = unknown, SchModel = Mod
|
|
|
124
130
|
*
|
|
125
131
|
* @return The created lookup field.
|
|
126
132
|
*/
|
|
127
|
-
addLookup<Property extends Extract<keyof Model, keyof SchModel>, LookupModel = NonNullable<Model[Property]
|
|
133
|
+
addLookup<Property extends Extract<keyof Model, keyof SchModel>, LookupModel = NonNullable<Model[Property]>>(property: Property): FieldLookupDescriptor<LookupModel, Model, undefined, Model[Property], Parent>;
|
|
128
134
|
/**
|
|
129
135
|
* <em>Experimental:</em> Adds a lookup field where property schema is manually provided.
|
|
130
136
|
* {EditorDescriptorInt.addFieldLookup} is used to create field and ${setFieldBasicOptionsFromSchema} to add basic field's options from schema.
|
|
@@ -136,7 +142,7 @@ export declare class SchemaFieldsBuilder<Model, Parent = unknown, SchModel = Mod
|
|
|
136
142
|
*
|
|
137
143
|
* @return The created lookup field.
|
|
138
144
|
*/
|
|
139
|
-
addLookupFromSchema<Property extends keyof Model
|
|
145
|
+
addLookupFromSchema<Property extends keyof Model>(property: Property, schemaProperty: SchemaProperty): FieldLookupDescriptor<NonNullable<Model[Property]>, Model, undefined, Model[Property], Parent>;
|
|
140
146
|
/**
|
|
141
147
|
* <em>Experimental:</em> Adds a lookup field.
|
|
142
148
|
* {EditorDescriptorInt.addFieldLookupWithOptionsValueProperty} is used to create field and ${setFieldBasicOptionsFromSchema} to add basic field's options from schema.
|
|
@@ -149,7 +155,7 @@ export declare class SchemaFieldsBuilder<Model, Parent = unknown, SchModel = Mod
|
|
|
149
155
|
*
|
|
150
156
|
* @return The created lookup field.
|
|
151
157
|
*/
|
|
152
|
-
addLookupWithOptionsValueProperty<Property extends Extract<keyof Model, keyof SchModel>, LookupModel, LookupValueProperty extends KeyofAndOfType<LookupModel, Model[Property]
|
|
158
|
+
addLookupWithOptionsValueProperty<Property extends Extract<keyof Model, keyof SchModel>, LookupModel, LookupValueProperty extends KeyofAndOfType<LookupModel, Model[Property]>>(property: Property, type: TypeDescriptor<LookupModel>, lookupOptionsValueProperty: LookupValueProperty): FieldLookupDescriptor<LookupModel, Model, undefined, Model[Property], Parent>;
|
|
153
159
|
/**
|
|
154
160
|
* <em>Experimental:</em> Adds a lookup field where property schema is manually provided.
|
|
155
161
|
* {EditorDescriptorInt.addFieldLookupWithOptionsValueProperty} is used to create field and ${setFieldBasicOptionsFromSchema} to add basic field's options from schema.
|
|
@@ -163,7 +169,7 @@ export declare class SchemaFieldsBuilder<Model, Parent = unknown, SchModel = Mod
|
|
|
163
169
|
*
|
|
164
170
|
* @return The created lookup field.
|
|
165
171
|
*/
|
|
166
|
-
addLookupWithOptionsValuePropertyFromSchema<Property extends keyof Model, LookupModel, LookupValueProperty extends KeyofAndOfType<LookupModel, Model[Property]
|
|
172
|
+
addLookupWithOptionsValuePropertyFromSchema<Property extends keyof Model, LookupModel, LookupValueProperty extends KeyofAndOfType<LookupModel, Model[Property]>>(property: Property, type: TypeDescriptor<LookupModel>, lookupOptionsValueProperty: LookupValueProperty, schemaProperty: SchemaProperty): FieldLookupDescriptor<LookupModel, Model, undefined, Model[Property], Parent>;
|
|
167
173
|
/**
|
|
168
174
|
* <em>Experimental:</em> Adds a lookup field.
|
|
169
175
|
* {EditorDescriptorInt.addFieldLookupWithProvider} is used to create field and ${setFieldBasicOptionsFromSchema} to add basic field's options from schema.
|
|
@@ -175,7 +181,7 @@ export declare class SchemaFieldsBuilder<Model, Parent = unknown, SchModel = Mod
|
|
|
175
181
|
*
|
|
176
182
|
* @return The created lookup field.
|
|
177
183
|
*/
|
|
178
|
-
addLookupWithProvider<Property extends Extract<keyof Model, keyof SchModel>, Service, LookupModel = NonNullable<Model[Property]
|
|
184
|
+
addLookupWithProvider<Property extends Extract<keyof Model, keyof SchModel>, Service, LookupModel = NonNullable<Model[Property]>>(property: Property, provider: FieldLookupProviderType<LookupModel, Service>): FieldLookupDescriptor<LookupModel, Model, Service, Model[Property], Parent>;
|
|
179
185
|
/**
|
|
180
186
|
* <em>Experimental:</em> Adds a lookup field where property schema is manually provided.
|
|
181
187
|
* {EditorDescriptorInt.addFieldLookupWithProvider} is used to create field and ${setFieldBasicOptionsFromSchema} to add basic field's options from schema.
|
|
@@ -188,7 +194,7 @@ export declare class SchemaFieldsBuilder<Model, Parent = unknown, SchModel = Mod
|
|
|
188
194
|
*
|
|
189
195
|
* @return The created lookup field.
|
|
190
196
|
*/
|
|
191
|
-
addLookupWithProviderFromSchema<Property extends keyof Model, Service, LookupModel = NonNullable<Model[Property]
|
|
197
|
+
addLookupWithProviderFromSchema<Property extends keyof Model, Service, LookupModel = NonNullable<Model[Property]>>(property: Property, provider: FieldLookupProviderType<LookupModel, Service>, schemaProperty: SchemaProperty): FieldLookupDescriptor<LookupModel, Model, Service, Model[Property], Parent>;
|
|
192
198
|
/**
|
|
193
199
|
* <em>Experimental:</em> Adds a lookup field.
|
|
194
200
|
* {EditorDescriptorInt.addFieldLookupWithProviderAndOptionsValueProperty} is used to create field and ${setFieldBasicOptionsFromSchema} to add basic field's options from schema.
|
|
@@ -202,7 +208,7 @@ export declare class SchemaFieldsBuilder<Model, Parent = unknown, SchModel = Mod
|
|
|
202
208
|
*
|
|
203
209
|
* @return The created lookup field.
|
|
204
210
|
*/
|
|
205
|
-
addLookupWithProviderAndOptionsValueProperty<Property extends Extract<keyof Model, keyof SchModel>, Service, LookupModel, LookupValueProperty extends KeyofAndOfType<LookupModel, Model[Property]>, FieldValue = Model[Property]>(property: Property, provider: FieldLookupProviderType<LookupModel, Service>, type: TypeDescriptor<LookupModel>, lookupOptionsValueProperty: LookupValueProperty): FieldLookupDescriptor<LookupModel, Model, Service, FieldValue>;
|
|
211
|
+
addLookupWithProviderAndOptionsValueProperty<Property extends Extract<keyof Model, keyof SchModel>, Service, LookupModel, LookupValueProperty extends KeyofAndOfType<LookupModel, Model[Property]>, FieldValue = Model[Property]>(property: Property, provider: FieldLookupProviderType<LookupModel, Service>, type: TypeDescriptor<LookupModel>, lookupOptionsValueProperty: LookupValueProperty): FieldLookupDescriptor<LookupModel, Model, Service, FieldValue, Parent>;
|
|
206
212
|
/**
|
|
207
213
|
* <em>Experimental:</em> Adds a lookup field where property schema is manually provided.
|
|
208
214
|
* {EditorDescriptorInt.addFieldLookupWithProviderAndOptionsValueProperty} is used to create field and ${setFieldBasicOptionsFromSchema} to add basic field's options from schema.
|
|
@@ -217,7 +223,7 @@ export declare class SchemaFieldsBuilder<Model, Parent = unknown, SchModel = Mod
|
|
|
217
223
|
*
|
|
218
224
|
* @return The created lookup field.
|
|
219
225
|
*/
|
|
220
|
-
addLookupWithProviderAndOptionsValuePropertyFromSchema<Property extends keyof Model, Service, LookupModel, LookupValueProperty extends KeyofAndOfType<LookupModel, Model[Property]>, FieldValue = Model[Property]>(property: Property, provider: FieldLookupProviderType<LookupModel, Service>, type: TypeDescriptor<LookupModel>, lookupOptionsValueProperty: LookupValueProperty, schemaProperty: SchemaProperty): FieldLookupDescriptor<LookupModel, Model, Service, FieldValue>;
|
|
226
|
+
addLookupWithProviderAndOptionsValuePropertyFromSchema<Property extends keyof Model, Service, LookupModel, LookupValueProperty extends KeyofAndOfType<LookupModel, Model[Property]>, FieldValue = Model[Property]>(property: Property, provider: FieldLookupProviderType<LookupModel, Service>, type: TypeDescriptor<LookupModel>, lookupOptionsValueProperty: LookupValueProperty, schemaProperty: SchemaProperty): FieldLookupDescriptor<LookupModel, Model, Service, FieldValue, Parent>;
|
|
221
227
|
/**
|
|
222
228
|
* <em>Experimental:</em> Adds a one-to-many editor field.
|
|
223
229
|
* {EditorDescriptorInt.addFieldManyEditor} is used to create field and ${setFieldBasicOptionsFromSchema} to add basic field's options from schema.
|
|
@@ -229,7 +235,7 @@ export declare class SchemaFieldsBuilder<Model, Parent = unknown, SchModel = Mod
|
|
|
229
235
|
*
|
|
230
236
|
* @return The created one-to-many editor field.
|
|
231
237
|
*/
|
|
232
|
-
addManyEditor<Property extends Extract<keyof Model, keyof SchModel>, FieldModel = ArrayItemType<Model[Property]>, FieldValue = Model[Property]>(property: Property, tableviewDescriptor: TableviewDescriptorInst<FieldModel, any, any, Model>): FieldManyEditorDescriptor<FieldModel, Model, FieldValue>;
|
|
238
|
+
addManyEditor<Property extends Extract<keyof Model, keyof SchModel>, FieldModel = ArrayItemType<Model[Property]>, FieldValue = Model[Property]>(property: Property, tableviewDescriptor: TableviewDescriptorInst<FieldModel, any, any, Model>): FieldManyEditorDescriptor<FieldModel, Model, FieldValue, Parent>;
|
|
233
239
|
/**
|
|
234
240
|
* <em>Experimental:</em> Adds an one-to-many editor field where property schema is manually provided.
|
|
235
241
|
* {EditorDescriptorInt.addFieldManyEditor} is used to create field and ${setFieldBasicOptionsFromSchema} to add basic field's options from schema.
|
|
@@ -242,7 +248,7 @@ export declare class SchemaFieldsBuilder<Model, Parent = unknown, SchModel = Mod
|
|
|
242
248
|
*
|
|
243
249
|
* @return The created one-to-many editor field.
|
|
244
250
|
*/
|
|
245
|
-
addManyEditorFromSchema<Property extends keyof Model, FieldModel = ArrayItemType<Model[Property]>, FieldValue = Model[Property]>(property: Property, tableviewDescriptor: TableviewDescriptorInst<FieldModel, any, any, Model>, schemaProperty: SchemaProperty): FieldManyEditorDescriptor<FieldModel, Model, FieldValue>;
|
|
251
|
+
addManyEditorFromSchema<Property extends keyof Model, FieldModel = ArrayItemType<Model[Property]>, FieldValue = Model[Property]>(property: Property, tableviewDescriptor: TableviewDescriptorInst<FieldModel, any, any, Model>, schemaProperty: SchemaProperty): FieldManyEditorDescriptor<FieldModel, Model, FieldValue, Parent>;
|
|
246
252
|
/**
|
|
247
253
|
* <em>Experimental:</em> Adds a many-to-many editor field.
|
|
248
254
|
* {EditorDescriptorInt.addFieldManyToManyEditor} is used to create field and ${setFieldBasicOptionsFromSchema} to add basic field's options from schema.
|
|
@@ -256,7 +262,7 @@ export declare class SchemaFieldsBuilder<Model, Parent = unknown, SchModel = Mod
|
|
|
256
262
|
*
|
|
257
263
|
* @return The created many-to-many editor field.
|
|
258
264
|
*/
|
|
259
|
-
addManyToManyEditor<Property extends Extract<keyof Model, keyof SchModel>, ServiceType, FieldModel = ArrayItemType<Model[Property]>, FieldValue = Model[Property]>(property: Property, mainTableDescriptor: TableDescriptorInst<FieldModel>, lookupTableDescriptor: TableDescriptorInst<FieldModel>, lookupDataProvider: ITableDataProvider<FieldModel, ServiceType>): FieldManyToManyEditorDescriptor<FieldModel, Model, ServiceType, FieldValue>;
|
|
265
|
+
addManyToManyEditor<Property extends Extract<keyof Model, keyof SchModel>, ServiceType, FieldModel = ArrayItemType<Model[Property]>, FieldValue = Model[Property]>(property: Property, mainTableDescriptor: TableDescriptorInst<FieldModel>, lookupTableDescriptor: TableDescriptorInst<FieldModel>, lookupDataProvider: ITableDataProvider<FieldModel, ServiceType>): FieldManyToManyEditorDescriptor<FieldModel, Model, ServiceType, FieldValue, Parent>;
|
|
260
266
|
/**
|
|
261
267
|
* <em>Experimental:</em> Adds a many-to-many editor field where property schema is manually provided.
|
|
262
268
|
* {EditorDescriptorInt.addFieldManyToManyEditor} is used to create field and ${setFieldBasicOptionsFromSchema} to add basic field's options from schema.
|
|
@@ -271,20 +277,20 @@ export declare class SchemaFieldsBuilder<Model, Parent = unknown, SchModel = Mod
|
|
|
271
277
|
*
|
|
272
278
|
* @return The created many-to-many editor field.
|
|
273
279
|
*/
|
|
274
|
-
addManyToManyEditorFromSchema<Property extends keyof Model, ServiceType, FieldModel = ArrayItemType<Model[Property]>, FieldValue = Model[Property]>(property: Property, mainTableDescriptor: TableDescriptorInst<FieldModel>, lookupTableDescriptor: TableDescriptorInst<FieldModel>, lookupDataProvider: ITableDataProvider<FieldModel, ServiceType>, schemaProperty: SchemaProperty): FieldManyToManyEditorDescriptor<FieldModel, Model, ServiceType, FieldValue>;
|
|
280
|
+
addManyToManyEditorFromSchema<Property extends keyof Model, ServiceType, FieldModel = ArrayItemType<Model[Property]>, FieldValue = Model[Property]>(property: Property, mainTableDescriptor: TableDescriptorInst<FieldModel>, lookupTableDescriptor: TableDescriptorInst<FieldModel>, lookupDataProvider: ITableDataProvider<FieldModel, ServiceType>, schemaProperty: SchemaProperty): FieldManyToManyEditorDescriptor<FieldModel, Model, ServiceType, FieldValue, Parent>;
|
|
275
281
|
}
|
|
276
282
|
/**
|
|
277
283
|
* <em>Experimental:</em> Creates builder for adding fields to descriptor based on provided model schema.
|
|
278
284
|
*
|
|
279
285
|
* @experimental
|
|
280
286
|
*
|
|
281
|
-
* @param {TableviewDescriptorInst<Model, any, any, Parent> | EditorDescriptorInst<Model>} descriptor - Descriptor to add fields to.
|
|
287
|
+
* @param {TableviewDescriptorInst<Model, any, any, Parent> | EditorDescriptorInst<Model, Parent>} descriptor - Descriptor to add fields to.
|
|
282
288
|
* @param {SchemaModel<SchModel>} schema - The schema with metadata about properties for fields.
|
|
283
289
|
* @param {FieldsFromSchemaOptsType<SchModel>} [opts] - Additional options.
|
|
284
290
|
*
|
|
285
291
|
* @return {SchemaFieldsBuilder<Model, Parent, SchModel>} - The SchemaFieldsBuilder object containing the extracted fields.
|
|
286
292
|
*/
|
|
287
|
-
export declare function fieldsFromSchema<Model, Parent = unknown, SchModel = Model>(descriptor: TableviewDescriptorInst<Model, any, any, Parent> | EditorDescriptorInst<Model>, schema: SchemaModel<SchModel>, opts?: FieldsFromSchemaOptsType<SchModel>): SchemaFieldsBuilder<Model, Parent, SchModel>;
|
|
293
|
+
export declare function fieldsFromSchema<Model, Parent = unknown, SchModel = Model>(descriptor: TableviewDescriptorInst<Model, any, any, Parent> | EditorDescriptorInst<Model, Parent>, schema: SchemaModel<SchModel>, opts?: FieldsFromSchemaOptsType<SchModel>): SchemaFieldsBuilder<Model, Parent, SchModel>;
|
|
288
294
|
/**
|
|
289
295
|
* <em>Experimental:</em> Adds a field input to editor descriptor based on the given schema property and options.
|
|
290
296
|
*
|
|
@@ -297,20 +303,20 @@ export declare function fieldsFromSchema<Model, Parent = unknown, SchModel = Mod
|
|
|
297
303
|
*
|
|
298
304
|
* @return {FieldInputDescriptor<Model, NonNullable<Model[Property]>, Model[Property], Parent>} - The generated field input descriptor.
|
|
299
305
|
*/
|
|
300
|
-
export declare function addFieldInputFromSchema<Property extends keyof Model, Model, Parent = unknown>(descriptor: TableviewDescriptorInst<Model, any, any, Parent> | EditorDescriptorInst<Model>, property: Property, propertySchema: SchemaProperty, opts?: FieldInputFromSchemaOptsType<Model>): FieldInputDescriptor<Model, NonNullable<Model[Property]>, Model[Property], Parent>;
|
|
306
|
+
export declare function addFieldInputFromSchema<Property extends keyof Model, Model, Parent = unknown>(descriptor: TableviewDescriptorInst<Model, any, any, Parent> | EditorDescriptorInst<Model, Parent>, property: Property, propertySchema: SchemaProperty, opts?: FieldInputFromSchemaOptsType<Model>): FieldInputDescriptor<Model, NonNullable<Model[Property]>, Model[Property], Parent>;
|
|
301
307
|
/**
|
|
302
308
|
* <em>Experimental:</em> Adds a field enum lookup to editor descriptor based on the given schema property and options.
|
|
303
309
|
*
|
|
304
310
|
* @experimental
|
|
305
311
|
*
|
|
306
|
-
* @param {TableviewDescriptorInst<Model, any, any, Parent> | EditorDescriptorInst<Model>} descriptor - Descriptor to add field to.
|
|
312
|
+
* @param {TableviewDescriptorInst<Model, any, any, Parent> | EditorDescriptorInst<Model, Parent>} descriptor - Descriptor to add field to.
|
|
307
313
|
* @param {keyof Model} property - The property of the model.
|
|
308
314
|
* @param {SchemaEnum<Enum> | EnumDescriptor<Enum>} enumOpt - The enum schema or enum model descriptor.
|
|
309
315
|
* @param {SchemaProperty} propertySchema - The property's schema for the field.
|
|
310
316
|
*
|
|
311
317
|
* @returns {FieldLookupEnum<Enum>} - The field with enumeration values.
|
|
312
318
|
*/
|
|
313
|
-
export declare function addFieldEnumLookupFromSchema<Model, Parent = unknown, Enum = any>(descriptor: TableviewDescriptorInst<Model, any, any, Parent> | EditorDescriptorInst<Model>, property: keyof Model, enumOpt: SchemaEnum<Enum> | EnumDescriptor<Enum>, propertySchema: SchemaProperty): FieldLookupEnumDescriptor<Enum, Model, Parent>;
|
|
319
|
+
export declare function addFieldEnumLookupFromSchema<Model, Parent = unknown, Enum = any>(descriptor: TableviewDescriptorInst<Model, any, any, Parent> | EditorDescriptorInst<Model, Parent>, property: keyof Model, enumOpt: SchemaEnum<Enum> | EnumDescriptor<Enum>, propertySchema: SchemaProperty): FieldLookupEnumDescriptor<Enum, Model, Parent>;
|
|
314
320
|
/**
|
|
315
321
|
* <em>Experimental:</em> Sets basic options for a field based on a given property schema.
|
|
316
322
|
*
|
|
@@ -1,11 +1 @@
|
|
|
1
|
-
export type FromSchemaCurrencyOptsType<Model> = string | {
|
|
2
|
-
currencyProperty?: keyof Model;
|
|
3
|
-
currency?: string;
|
|
4
|
-
currencyDisplay?: 'symbol' | 'code' | 'name';
|
|
5
|
-
};
|
|
6
|
-
export declare function fromSchemaCurrencyOptsToCurrency<Model>(opts: FromSchemaCurrencyOptsType<Model>): {
|
|
7
|
-
currency: string | undefined;
|
|
8
|
-
currencyDisplay: "symbol" | "name" | "code" | undefined;
|
|
9
|
-
currencyProperty: keyof Model | undefined;
|
|
10
|
-
};
|
|
11
1
|
export declare function fromSchemaFilterNonArrayProperties<Model>(propertySchemas: Record<keyof Model, any>): (keyof Model)[];
|
package/version-info.json
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@mediusinc/mng-commons-data-api",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.3.0-rc.0",
|
|
4
4
|
"tag": "v5.2.0-rc.2",
|
|
5
|
-
"distance":
|
|
6
|
-
"hash": "
|
|
5
|
+
"distance": 15,
|
|
6
|
+
"hash": "9b56542d",
|
|
7
7
|
"dirty": true,
|
|
8
|
-
"semver": "5.2.0-rc.2+
|
|
8
|
+
"semver": "5.2.0-rc.2+15.g9b56542d.dirty",
|
|
9
9
|
"buildTimestamp": null,
|
|
10
|
-
"raw": "v5.2.0-rc.2-
|
|
10
|
+
"raw": "v5.2.0-rc.2-15-9b56542d-dirty"
|
|
11
11
|
}
|