@sap/ux-specification 1.71.152 → 1.71.153
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 +29 -0
- package/dist/documentation/v2/v2-AnalyticalListPage.html +2 -2
- package/dist/documentation/v2/v2-ApplicationV2.html +2 -2
- package/dist/documentation/v2/v2-ListReport.html +2 -2
- package/dist/documentation/v2/v2-ListReportNew.html +2 -2
- package/dist/documentation/v2/v2-ObjectPage.html +2 -2
- package/dist/documentation/v2/v2-OverviewPage.html +2 -2
- package/dist/index-min.js +184 -180
- package/dist/index-min.js.map +4 -4
- package/dist/schemas/v2/ListReportNewConfig.json +111 -294
- package/dist/specification/package.json +8 -7
- package/dist/specification/scripts/schema/to-json-schema.d.ts.map +1 -1
- package/dist/specification/scripts/schema/to-json-schema.js +2 -1
- package/dist/specification/scripts/schema/to-json-schema.js.map +1 -1
- package/dist/specification/src/api.d.ts +9 -1
- package/dist/specification/src/api.d.ts.map +1 -1
- package/dist/specification/src/api.js +51 -2
- package/dist/specification/src/api.js.map +1 -1
- package/dist/specification/src/ftfs/ftfs.d.ts +8 -0
- package/dist/specification/src/ftfs/ftfs.d.ts.map +1 -1
- package/dist/specification/src/ftfs/ftfs.js +1 -0
- package/dist/specification/src/ftfs/ftfs.js.map +1 -1
- package/dist/specification/src/ftfs/index.d.ts +1 -1
- package/dist/specification/src/ftfs/index.d.ts.map +1 -1
- package/dist/specification/src/ftfs/index.js +2 -1
- package/dist/specification/src/ftfs/index.js.map +1 -1
- package/dist/specification/src/sync/common/decoration/control.d.ts +4 -2
- package/dist/specification/src/sync/common/decoration/control.d.ts.map +1 -1
- package/dist/specification/src/sync/common/decoration/control.js +4 -2
- package/dist/specification/src/sync/common/decoration/control.js.map +1 -1
- package/dist/specification/src/sync/common/i18n.json +18 -1
- package/dist/specification/src/sync/common/utils.d.ts +2 -2
- package/dist/specification/src/sync/common/utils.js +3 -3
- package/dist/specification/src/sync/v2/export/controls/Fragment.d.ts +5 -5
- package/dist/specification/src/sync/v2/export/controls/Fragment.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/controls/Fragment.js +39 -27
- package/dist/specification/src/sync/v2/export/controls/Fragment.js.map +1 -1
- package/dist/specification/src/sync/v2/export/export.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/export.js +6 -4
- package/dist/specification/src/sync/v2/export/export.js.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.d.ts +2 -1
- package/dist/specification/src/sync/v2/export/exportPage.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPage.js +54 -21
- package/dist/specification/src/sync/v2/export/exportPage.js.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts +2 -0
- package/dist/specification/src/sync/v2/export/exportPageGeneric.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js +17 -6
- package/dist/specification/src/sync/v2/export/exportPageGeneric.js.map +1 -1
- package/dist/specification/src/sync/v2/export/view-controller-generator.d.ts +70 -18
- package/dist/specification/src/sync/v2/export/view-controller-generator.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/export/view-controller-generator.js +123 -25
- package/dist/specification/src/sync/v2/export/view-controller-generator.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/objectPage.js +4 -4
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js +2 -2
- package/dist/specification/src/sync/v2/generate/schemaAdaptation.js.map +1 -1
- package/dist/specification/src/sync/v2/generate/utils.d.ts +2 -2
- package/dist/specification/src/sync/v2/generate/utils.js +2 -2
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.d.ts +0 -15
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js +5 -160
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/FilterBar.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js +3 -3
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/MultiTable.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts +42 -2
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js +410 -3
- package/dist/specification/src/sync/v2/genericSchemaHandling/controls/Table.js.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.js +25 -6
- package/dist/specification/src/sync/v2/genericSchemaHandling/pages/pageAccess.js.map +1 -1
- package/dist/specification/src/sync/v2/types.d.ts +2 -0
- package/dist/specification/src/sync/v2/types.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/types.js.map +1 -1
- package/dist/specification/src/sync/v2/utils.d.ts +25 -0
- package/dist/specification/src/sync/v2/utils.d.ts.map +1 -1
- package/dist/specification/src/sync/v2/utils.js +28 -4
- package/dist/specification/src/sync/v2/utils.js.map +1 -1
- package/dist/templates/AnalyticalTableColumnsExtension.xml +3 -3
- package/dist/templates/GridTableColumnsExtension.xml +3 -3
- package/dist/templates/ResponsiveTableColumnsExtension.xml +2 -2
- package/dist/templates/TreeTableColumnsExtension.xml +4 -4
- package/dist/templates/fragment.xml +3 -3
- package/dist/templates/view.xml +3 -3
- package/dist/types/src/apiTypes.d.ts +22 -3
- package/dist/types/src/apiTypes.d.ts.map +1 -1
- package/dist/types/src/apiTypes.js +5 -1
- package/dist/types/src/apiTypes.js.map +1 -1
- package/dist/types/src/common/types.d.ts +1 -0
- package/dist/types/src/common/types.d.ts.map +1 -1
- package/dist/types/src/common/types.js.map +1 -1
- package/package.json +8 -7
|
@@ -1,24 +1,58 @@
|
|
|
1
1
|
import type { v2, ViewTemplateType } from '@sap/ux-specification-types';
|
|
2
|
+
import { type IdGeneratorFunction } from '@sap-ux/fe-fpm-writer';
|
|
2
3
|
export declare enum ViewTypes {
|
|
3
4
|
XML = "xml",
|
|
4
5
|
HTML = "html",
|
|
5
6
|
JS = "js",
|
|
6
7
|
JSON = "json"
|
|
7
8
|
}
|
|
9
|
+
export declare const CONFIG: {
|
|
10
|
+
"AnalyticalTableColumnsExtension.xml": {
|
|
11
|
+
getData: (generateId: IdGeneratorFunction) => {
|
|
12
|
+
ids: Record<string, string>;
|
|
13
|
+
};
|
|
14
|
+
};
|
|
15
|
+
"fragment.xml": {
|
|
16
|
+
getData: (generateId: IdGeneratorFunction) => {
|
|
17
|
+
ids: Record<string, string>;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
"GridTableColumnsExtension.xml": {
|
|
21
|
+
getData: (generateId: IdGeneratorFunction) => {
|
|
22
|
+
ids: Record<string, string>;
|
|
23
|
+
};
|
|
24
|
+
};
|
|
25
|
+
"ResponsiveTableColumnsExtension.xml": {
|
|
26
|
+
getData: (generateId: IdGeneratorFunction) => {
|
|
27
|
+
ids: Record<string, string>;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
"TreeTableColumnsExtension.xml": {
|
|
31
|
+
getData: (generateId: IdGeneratorFunction) => {
|
|
32
|
+
ids: Record<string, string>;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
"view.xml": {
|
|
36
|
+
getData: (generateId: IdGeneratorFunction) => {
|
|
37
|
+
ids: Record<string, string>;
|
|
38
|
+
};
|
|
39
|
+
};
|
|
40
|
+
};
|
|
8
41
|
/**
|
|
9
42
|
* Method which reads passed template and renders it using passed template object.
|
|
10
43
|
* @param {string} templatePath - Path to template.
|
|
11
44
|
* @param {{ [key: string]: string }} templateData - Template data object.
|
|
12
|
-
* @
|
|
45
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
46
|
+
* @returns {string} the rendered template's string
|
|
13
47
|
*/
|
|
14
48
|
export declare const renderTemplate: (templatePath: string, templateData: {
|
|
15
49
|
[key: string]: string | boolean;
|
|
16
|
-
}) => string;
|
|
50
|
+
}, generateId?: IdGeneratorFunction) => string;
|
|
17
51
|
/**
|
|
18
52
|
* Method which reads passed template and renders it using passed template object.
|
|
19
53
|
* @param {string} name - View's name.
|
|
20
54
|
* @param {string} namespace - Application namespace.
|
|
21
|
-
* @
|
|
55
|
+
* @returns {string} the rendered template's string
|
|
22
56
|
*/
|
|
23
57
|
export declare const getControllerContent: (name: string, namespace: string, fcl?: boolean, newControllerRouting?: boolean) => string;
|
|
24
58
|
/**
|
|
@@ -26,43 +60,61 @@ export declare const getControllerContent: (name: string, namespace: string, fcl
|
|
|
26
60
|
* @param {string} name - View's name.
|
|
27
61
|
* @param {string} namespace - Application namespace.
|
|
28
62
|
* @param {ViewTypes} sourceType - View's source type like XML, HTML, JSON or JS.
|
|
29
|
-
* @param {
|
|
30
|
-
* @param {boolean} [
|
|
31
|
-
* @
|
|
63
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
64
|
+
* @param {boolean} [controller] - Generate controller.
|
|
65
|
+
* @param {boolean} [page] - Is view should contains page structure or not - page structure uses 'sap.m.App' in view template.
|
|
66
|
+
* @returns {string} the rendered template's string
|
|
32
67
|
*/
|
|
33
|
-
export declare const getViewContent: (name: string, namespace: string, sourceType: ViewTypes, controller?: boolean, page?: boolean) => string;
|
|
68
|
+
export declare const getViewContent: (name: string, namespace: string, sourceType: ViewTypes, generateId: IdGeneratorFunction, controller?: boolean, page?: boolean) => string;
|
|
34
69
|
/**
|
|
35
70
|
* Method which reads template for fragment and returns rendered result of fragment.
|
|
36
71
|
* @param {string} name - View's name.
|
|
37
72
|
* @param {string} namespace - Application namespace.
|
|
38
73
|
* @param {ViewTypes} sourceType - View's source type like XML, HTML, JSON or JS.
|
|
74
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
39
75
|
* @param {boolean} handler - JS handler.
|
|
40
|
-
* @
|
|
76
|
+
* @returns {string} the rendered template's string
|
|
41
77
|
*/
|
|
42
|
-
export declare const getFragmentContent: (name: string, namespace: string, sourceType: ViewTypes, handler?: boolean) => string;
|
|
78
|
+
export declare const getFragmentContent: (name: string, namespace: string, sourceType: ViewTypes, generateId: IdGeneratorFunction, handler?: boolean) => string;
|
|
43
79
|
/**
|
|
44
80
|
* Method which reads passed template and renders it using passed template object.
|
|
45
81
|
* @param {string} name - View's name.
|
|
46
82
|
* @param {string} namespace - Application namespace.
|
|
47
|
-
* @
|
|
83
|
+
* @returns {string} the rendered template's string
|
|
48
84
|
*/
|
|
49
85
|
export declare const getFragmentJsContent: () => string;
|
|
50
86
|
/**
|
|
51
|
-
* Method which reads the template for a single column extension that shall be added to a fragment
|
|
52
|
-
*
|
|
53
|
-
* @
|
|
87
|
+
* Method which reads the template for a single column extension that shall be added to a fragment.
|
|
88
|
+
*
|
|
89
|
+
* @param column - data (from config) to be inserted in the template
|
|
90
|
+
* @param template - The type of view template (e.g., XML, HTML, JSON).
|
|
91
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
92
|
+
* @returns {string} the rendered template's string
|
|
54
93
|
*/
|
|
55
|
-
export declare const getSingleColumnContent: (column: v2.TableCustomColumn, template: ViewTemplateType) => string;
|
|
94
|
+
export declare const getSingleColumnContent: (column: v2.TableCustomColumn, template: ViewTemplateType, generateId: IdGeneratorFunction) => string;
|
|
56
95
|
/**
|
|
57
96
|
* Method which reads the template for a column extension fragment and returns rendered result of fragment.
|
|
58
|
-
*
|
|
59
|
-
* @
|
|
97
|
+
*
|
|
98
|
+
* @param customColumns - array of all column extensions' data
|
|
99
|
+
* @param templateType - The type of view template (e.g., XML, HTML, JSON).
|
|
100
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
101
|
+
* @returns {string} the rendered template's string
|
|
60
102
|
*/
|
|
61
|
-
export declare const getColumnFragmentContent: (customColumns: v2.TableCustomColumns, templateType: ViewTemplateType) => string;
|
|
103
|
+
export declare const getColumnFragmentContent: (customColumns: v2.TableCustomColumns, templateType: ViewTemplateType, generateId: IdGeneratorFunction) => string;
|
|
62
104
|
/**
|
|
63
105
|
* Creates the content for a ResponsiveTableCellsExtension fragment
|
|
64
106
|
* @param customColumns - list of custom columns; for each of them a dummy entry gets created in the view content.
|
|
107
|
+
* @param generateId - function to generate ids for new entries in the fragment.
|
|
65
108
|
* @returns {string} the rendered template's string
|
|
66
109
|
*/
|
|
67
|
-
export declare const getResponsiveTableCellsFragment: (customColumns: v2.TableCustomColumns) => string;
|
|
110
|
+
export declare const getResponsiveTableCellsFragment: (customColumns: v2.TableCustomColumns, generateId: IdGeneratorFunction) => string;
|
|
111
|
+
/**
|
|
112
|
+
* Method to construct full name of view or fragment.
|
|
113
|
+
*
|
|
114
|
+
* @param {string} name Shorten name of view or fragment.
|
|
115
|
+
* @param {boolean} isFragment Is fragment or view.
|
|
116
|
+
* @param {ViewTypes} viewType type of view or fragment.
|
|
117
|
+
* @returns {string} Full path of view or fragment name.
|
|
118
|
+
*/
|
|
119
|
+
export declare function getViewFileName(name: string, isFragment: boolean, viewType?: ViewTypes): string;
|
|
68
120
|
//# sourceMappingURL=view-controller-generator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-controller-generator.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v2/export/view-controller-generator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;
|
|
1
|
+
{"version":3,"file":"view-controller-generator.d.ts","sourceRoot":"","sources":["../../../../../../src/sync/v2/export/view-controller-generator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,EAAE,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAKxE,OAAO,EAAE,KAAK,mBAAmB,EAAoC,MAAM,uBAAuB,CAAC;AAInG,oBAAY,SAAS;IACjB,GAAG,QAAQ;IACX,IAAI,SAAS;IACb,EAAE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AEF;;;;;GAKG;AACH,eAAO,MAAM,oBAAoB,QAAO,MAEvC,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB,GAC/B,QAAQ,EAAE,CAAC,iBAAiB,EAC5B,UAAU,gBAAgB,EAC1B,YAAY,mBAAmB,KAChC,MASF,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,wBAAwB,GACjC,eAAe,EAAE,CAAC,kBAAkB,EACpC,cAAc,gBAAgB,EAC9B,YAAY,mBAAmB,KAChC,MAUF,CAAC;AAEF;;;;;GAKG;AACH,eAAO,MAAM,+BAA+B,GACxC,eAAe,EAAE,CAAC,kBAAkB,EACpC,YAAY,mBAAmB,KAChC,MAYF,CAAC;AAEF;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,UAAU,EAAE,OAAO,EAAE,QAAQ,YAAgB,GAAG,MAAM,CAEnG"}
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.getResponsiveTableCellsFragment = exports.getColumnFragmentContent = exports.getSingleColumnContent = exports.getFragmentJsContent = exports.getFragmentContent = exports.getViewContent = exports.getControllerContent = exports.renderTemplate = exports.ViewTypes = void 0;
|
|
3
|
+
exports.getResponsiveTableCellsFragment = exports.getColumnFragmentContent = exports.getSingleColumnContent = exports.getFragmentJsContent = exports.getFragmentContent = exports.getViewContent = exports.getControllerContent = exports.renderTemplate = exports.CONFIG = exports.ViewTypes = void 0;
|
|
4
|
+
exports.getViewFileName = getViewFileName;
|
|
4
5
|
const path_1 = require("path");
|
|
5
6
|
const ux_specification_types_1 = require("@sap/ux-specification-types");
|
|
6
7
|
const ejs_1 = require("ejs");
|
|
7
8
|
const fs_1 = require("fs");
|
|
9
|
+
const fe_fpm_writer_1 = require("@sap-ux/fe-fpm-writer");
|
|
8
10
|
const templatesPath = (0, path_1.join)(__dirname, 'templates');
|
|
9
11
|
var ViewTypes;
|
|
10
12
|
(function (ViewTypes) {
|
|
@@ -13,21 +15,94 @@ var ViewTypes;
|
|
|
13
15
|
ViewTypes["JS"] = "js";
|
|
14
16
|
ViewTypes["JSON"] = "json";
|
|
15
17
|
})(ViewTypes || (exports.ViewTypes = ViewTypes = {}));
|
|
18
|
+
exports.CONFIG = {
|
|
19
|
+
['AnalyticalTableColumnsExtension.xml']: {
|
|
20
|
+
getData: (generateId) => {
|
|
21
|
+
return {
|
|
22
|
+
ids: {
|
|
23
|
+
label: generateId('Label'),
|
|
24
|
+
text: generateId('Text'),
|
|
25
|
+
customData: generateId('CustomData')
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
},
|
|
30
|
+
['fragment.xml']: {
|
|
31
|
+
getData: (generateId) => {
|
|
32
|
+
return {
|
|
33
|
+
ids: {
|
|
34
|
+
verticalLayout: generateId('VerticalLayout'),
|
|
35
|
+
text: generateId('Text'),
|
|
36
|
+
button: generateId('Button')
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
},
|
|
41
|
+
['GridTableColumnsExtension.xml']: {
|
|
42
|
+
getData: (generateId) => {
|
|
43
|
+
return {
|
|
44
|
+
ids: {
|
|
45
|
+
label: generateId('Label'),
|
|
46
|
+
text: generateId('Text'),
|
|
47
|
+
customData: generateId('CustomData')
|
|
48
|
+
}
|
|
49
|
+
};
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
['ResponsiveTableColumnsExtension.xml']: {
|
|
53
|
+
getData: (generateId) => {
|
|
54
|
+
return {
|
|
55
|
+
ids: {
|
|
56
|
+
text: generateId('Text'),
|
|
57
|
+
customData: generateId('CustomData')
|
|
58
|
+
}
|
|
59
|
+
};
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
['TreeTableColumnsExtension.xml']: {
|
|
63
|
+
getData: (generateId) => {
|
|
64
|
+
return {
|
|
65
|
+
ids: {
|
|
66
|
+
label: generateId('Label'),
|
|
67
|
+
text: generateId('Text'),
|
|
68
|
+
customData: generateId('CustomData')
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
},
|
|
73
|
+
['view.xml']: {
|
|
74
|
+
getData: (generateId) => {
|
|
75
|
+
return {
|
|
76
|
+
ids: {
|
|
77
|
+
app: generateId('App'),
|
|
78
|
+
page: generateId('Page'),
|
|
79
|
+
label: generateId('Label')
|
|
80
|
+
}
|
|
81
|
+
};
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
};
|
|
16
85
|
/**
|
|
17
86
|
* Method which reads passed template and renders it using passed template object.
|
|
18
87
|
* @param {string} templatePath - Path to template.
|
|
19
88
|
* @param {{ [key: string]: string }} templateData - Template data object.
|
|
20
|
-
* @
|
|
89
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
90
|
+
* @returns {string} the rendered template's string
|
|
21
91
|
*/
|
|
22
|
-
const renderTemplate = (templatePath, templateData) => {
|
|
92
|
+
const renderTemplate = (templatePath, templateData, generateId) => {
|
|
23
93
|
const template = (0, fs_1.readFileSync)(templatePath, 'utf8');
|
|
94
|
+
const templateKey = (0, fe_fpm_writer_1.getRelativeTemplateComponentPath)(templatePath);
|
|
95
|
+
if (generateId && exports.CONFIG[templateKey] && typeof exports.CONFIG[templateKey].getData === 'function') {
|
|
96
|
+
const additionalData = exports.CONFIG[templateKey].getData(generateId);
|
|
97
|
+
templateData = { ...templateData, ...additionalData };
|
|
98
|
+
}
|
|
24
99
|
return (0, ejs_1.render)(template, templateData);
|
|
25
100
|
};
|
|
26
101
|
exports.renderTemplate = renderTemplate;
|
|
27
102
|
/**
|
|
28
103
|
* Method escapes view name.
|
|
29
104
|
* @param {string} name - View's name.
|
|
30
|
-
* @
|
|
105
|
+
* @returns {string} Escaped view name.
|
|
31
106
|
*/
|
|
32
107
|
const escapeViewName = (name) => {
|
|
33
108
|
// Remove all special characters
|
|
@@ -37,7 +112,7 @@ const escapeViewName = (name) => {
|
|
|
37
112
|
* Method which reads passed template and renders it using passed template object.
|
|
38
113
|
* @param {string} name - View's name.
|
|
39
114
|
* @param {string} namespace - Application namespace.
|
|
40
|
-
* @
|
|
115
|
+
* @returns {string} the rendered template's string
|
|
41
116
|
*/
|
|
42
117
|
const getControllerContent = (name, namespace, fcl = false, newControllerRouting = false) => {
|
|
43
118
|
const templateData = {
|
|
@@ -52,11 +127,12 @@ exports.getControllerContent = getControllerContent;
|
|
|
52
127
|
* @param {string} name - View's name.
|
|
53
128
|
* @param {string} namespace - Application namespace.
|
|
54
129
|
* @param {ViewTypes} sourceType - View's source type like XML, HTML, JSON or JS.
|
|
55
|
-
* @param {
|
|
56
|
-
* @param {boolean} [
|
|
57
|
-
* @
|
|
130
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
131
|
+
* @param {boolean} [controller] - Generate controller.
|
|
132
|
+
* @param {boolean} [page] - Is view should contains page structure or not - page structure uses 'sap.m.App' in view template.
|
|
133
|
+
* @returns {string} the rendered template's string
|
|
58
134
|
*/
|
|
59
|
-
const getViewContent = (name, namespace, sourceType, controller = false, page = true) => {
|
|
135
|
+
const getViewContent = (name, namespace, sourceType, generateId, controller = false, page = true) => {
|
|
60
136
|
const escapedName = escapeViewName(name);
|
|
61
137
|
const templateData = {
|
|
62
138
|
name: escapedName,
|
|
@@ -66,7 +142,7 @@ const getViewContent = (name, namespace, sourceType, controller = false, page =
|
|
|
66
142
|
if (controller) {
|
|
67
143
|
templateData.controllerName = namespace + '.controller.' + escapedName;
|
|
68
144
|
}
|
|
69
|
-
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, 'view.' + sourceType), templateData);
|
|
145
|
+
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, 'view.' + sourceType), templateData, generateId);
|
|
70
146
|
};
|
|
71
147
|
exports.getViewContent = getViewContent;
|
|
72
148
|
/**
|
|
@@ -74,10 +150,11 @@ exports.getViewContent = getViewContent;
|
|
|
74
150
|
* @param {string} name - View's name.
|
|
75
151
|
* @param {string} namespace - Application namespace.
|
|
76
152
|
* @param {ViewTypes} sourceType - View's source type like XML, HTML, JSON or JS.
|
|
153
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
77
154
|
* @param {boolean} handler - JS handler.
|
|
78
|
-
* @
|
|
155
|
+
* @returns {string} the rendered template's string
|
|
79
156
|
*/
|
|
80
|
-
const getFragmentContent = (name, namespace, sourceType, handler = false) => {
|
|
157
|
+
const getFragmentContent = (name, namespace, sourceType, generateId, handler = false) => {
|
|
81
158
|
const escapedName = escapeViewName(name);
|
|
82
159
|
const templateData = {
|
|
83
160
|
name: escapedName,
|
|
@@ -86,25 +163,28 @@ const getFragmentContent = (name, namespace, sourceType, handler = false) => {
|
|
|
86
163
|
if (handler) {
|
|
87
164
|
templateData.handler = `${namespace.replace(/\./g, '/')}/${ux_specification_types_1.DirName.Fragment}/${escapedName}`;
|
|
88
165
|
}
|
|
89
|
-
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, 'fragment.' + sourceType), templateData);
|
|
166
|
+
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, 'fragment.' + sourceType), templateData, generateId);
|
|
90
167
|
};
|
|
91
168
|
exports.getFragmentContent = getFragmentContent;
|
|
92
169
|
/**
|
|
93
170
|
* Method which reads passed template and renders it using passed template object.
|
|
94
171
|
* @param {string} name - View's name.
|
|
95
172
|
* @param {string} namespace - Application namespace.
|
|
96
|
-
* @
|
|
173
|
+
* @returns {string} the rendered template's string
|
|
97
174
|
*/
|
|
98
175
|
const getFragmentJsContent = () => {
|
|
99
176
|
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, 'fragment.js'), {});
|
|
100
177
|
};
|
|
101
178
|
exports.getFragmentJsContent = getFragmentJsContent;
|
|
102
179
|
/**
|
|
103
|
-
* Method which reads the template for a single column extension that shall be added to a fragment
|
|
104
|
-
*
|
|
105
|
-
* @
|
|
180
|
+
* Method which reads the template for a single column extension that shall be added to a fragment.
|
|
181
|
+
*
|
|
182
|
+
* @param column - data (from config) to be inserted in the template
|
|
183
|
+
* @param template - The type of view template (e.g., XML, HTML, JSON).
|
|
184
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
185
|
+
* @returns {string} the rendered template's string
|
|
106
186
|
*/
|
|
107
|
-
const getSingleColumnContent = (column, template) => {
|
|
187
|
+
const getSingleColumnContent = (column, template, generateId) => {
|
|
108
188
|
const templateData = {
|
|
109
189
|
id: column.id,
|
|
110
190
|
text: column.text,
|
|
@@ -112,20 +192,23 @@ const getSingleColumnContent = (column, template) => {
|
|
|
112
192
|
columnIndex: column.columnIndex !== undefined ? column.columnIndex.toString() : undefined,
|
|
113
193
|
leadingProperty: column.leadingProperty
|
|
114
194
|
};
|
|
115
|
-
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, template + '.xml'), templateData);
|
|
195
|
+
return (0, exports.renderTemplate)((0, path_1.join)(templatesPath, template + '.xml'), templateData, generateId);
|
|
116
196
|
};
|
|
117
197
|
exports.getSingleColumnContent = getSingleColumnContent;
|
|
118
198
|
/**
|
|
119
199
|
* Method which reads the template for a column extension fragment and returns rendered result of fragment.
|
|
120
|
-
*
|
|
121
|
-
* @
|
|
200
|
+
*
|
|
201
|
+
* @param customColumns - array of all column extensions' data
|
|
202
|
+
* @param templateType - The type of view template (e.g., XML, HTML, JSON).
|
|
203
|
+
* @param {IdGeneratorFunction} generateId - function to generate ids for new entries in the fragment.
|
|
204
|
+
* @returns {string} the rendered template's string
|
|
122
205
|
*/
|
|
123
|
-
const getColumnFragmentContent = (customColumns, templateType) => {
|
|
206
|
+
const getColumnFragmentContent = (customColumns, templateType, generateId) => {
|
|
124
207
|
let fragment = '';
|
|
125
208
|
fragment = '<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns:table="sap.ui.table" xmlns="sap.m">';
|
|
126
209
|
if (customColumns) {
|
|
127
210
|
for (const column of customColumns) {
|
|
128
|
-
const newContent = (0, exports.getSingleColumnContent)(column, templateType);
|
|
211
|
+
const newContent = (0, exports.getSingleColumnContent)(column, templateType, generateId);
|
|
129
212
|
fragment = fragment + '\n' + newContent;
|
|
130
213
|
}
|
|
131
214
|
}
|
|
@@ -135,17 +218,32 @@ exports.getColumnFragmentContent = getColumnFragmentContent;
|
|
|
135
218
|
/**
|
|
136
219
|
* Creates the content for a ResponsiveTableCellsExtension fragment
|
|
137
220
|
* @param customColumns - list of custom columns; for each of them a dummy entry gets created in the view content.
|
|
221
|
+
* @param generateId - function to generate ids for new entries in the fragment.
|
|
138
222
|
* @returns {string} the rendered template's string
|
|
139
223
|
*/
|
|
140
|
-
const getResponsiveTableCellsFragment = (customColumns) => {
|
|
224
|
+
const getResponsiveTableCellsFragment = (customColumns, generateId) => {
|
|
141
225
|
let fragment = '<core:FragmentDefinition xmlns:core="sap.ui.core" xmlns="sap.m">';
|
|
226
|
+
let validatedIds = [];
|
|
142
227
|
if (customColumns) {
|
|
143
228
|
customColumns.forEach(() => {
|
|
229
|
+
const newId = generateId('Text', validatedIds);
|
|
230
|
+
validatedIds.push(newId);
|
|
144
231
|
// use same approach as json2xml - use 4 spaces for fragment children elements
|
|
145
|
-
fragment = fragment +
|
|
232
|
+
fragment = fragment + `\n <Text id="${newId}" text="Placeholder"/>`;
|
|
146
233
|
});
|
|
147
234
|
}
|
|
148
235
|
return fragment + '\n' + '</core:FragmentDefinition>';
|
|
149
236
|
};
|
|
150
237
|
exports.getResponsiveTableCellsFragment = getResponsiveTableCellsFragment;
|
|
238
|
+
/**
|
|
239
|
+
* Method to construct full name of view or fragment.
|
|
240
|
+
*
|
|
241
|
+
* @param {string} name Shorten name of view or fragment.
|
|
242
|
+
* @param {boolean} isFragment Is fragment or view.
|
|
243
|
+
* @param {ViewTypes} viewType type of view or fragment.
|
|
244
|
+
* @returns {string} Full path of view or fragment name.
|
|
245
|
+
*/
|
|
246
|
+
function getViewFileName(name, isFragment, viewType = ViewTypes.XML) {
|
|
247
|
+
return isFragment ? `${name}.fragment.${viewType}` : `${name}.view.${viewType}`;
|
|
248
|
+
}
|
|
151
249
|
//# sourceMappingURL=view-controller-generator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"view-controller-generator.js","sourceRoot":"","sources":["../../../../../../src/sync/v2/export/view-controller-generator.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"view-controller-generator.js","sourceRoot":"","sources":["../../../../../../src/sync/v2/export/view-controller-generator.ts"],"names":[],"mappings":";;;AAwRA,0CAEC;AA1RD,+BAA4B;AAE5B,wEAAsD;AAEtD,6BAA6B;AAC7B,2BAAkC;AAClC,yDAAmG;AAEnG,MAAM,aAAa,GAAG,IAAA,WAAI,EAAC,SAAS,EAAE,WAAW,CAAC,CAAC;AAEnD,IAAY,SAKX;AALD,WAAY,SAAS;IACjB,wBAAW,CAAA;IACX,0BAAa,CAAA;IACb,sBAAS,CAAA;IACT,0BAAa,CAAA;AACjB,CAAC,EALW,SAAS,yBAAT,SAAS,QAKpB;AAEY,QAAA,MAAM,GAAG;IAClB,CAAC,qCAAqC,CAAC,EAAE;QACrC,OAAO,EAAE,CAAC,UAA+B,EAAmC,EAAE;YAC1E,OAAO;gBACH,GAAG,EAAE;oBACD,KAAK,EAAE,UAAU,CAAC,OAAO,CAAC;oBAC1B,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC;oBACxB,UAAU,EAAE,UAAU,CAAC,YAAY,CAAC;iBACvC;aACJ,CAAC;QACN,CAAC;KACJ;IACD,CAAC,cAAc,CAAC,EAAE;QACd,OAAO,EAAE,CAAC,UAA+B,EAAmC,EAAE;YAC1E,OAAO;gBACH,GAAG,EAAE;oBACD,cAAc,EAAE,UAAU,CAAC,gBAAgB,CAAC;oBAC5C,IAAI,EAAE,UAAU,CAAC,MAAM,CAAC;oBACxB,MAAM,EAAE,UAAU,CAAC,QAAQ,CAAC;iBAC/B;aACJ,CAAC;QACN,CAAC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,CAAC;IAChC,IAAI,aAAa,EAAE,CAAC;QAChB,aAAa,CAAC,OAAO,CAAC,GAAG,EAAE;YACvB,MAAM,KAAK,GAAG,UAAU,CAAC,MAAM,EAAE,YAAY,CAAC,CAAC;YAC/C,YAAY,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;YACzB,8EAA8E;YAC9E,QAAQ,GAAG,QAAQ,GAAG,mBAAmB,KAAK,wBAAwB,CAAC;QAC3E,CAAC,CAAC,CAAC;IACP,CAAC;IACD,OAAO,QAAQ,GAAG,IAAI,GAAG,4BAA4B,CAAC;AAC1D,CAAC,CAAC;AAfW,QAAA,+BAA+B,mCAe1C;AAEF;;;;;;;GAOG;AACH,SAAgB,eAAe,CAAC,IAAY,EAAE,UAAmB,EAAE,QAAQ,GAAG,SAAS,CAAC,GAAG;IACvF,OAAO,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,aAAa,QAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,IAAI,SAAS,QAAQ,EAAE,CAAC;AACpF,CAAC"}
|
|
@@ -104,7 +104,7 @@ function addHeaderActionCallBackV2(entityType, appSchema, actionAnnotation, head
|
|
|
104
104
|
* @param {FacetConfig} facet information
|
|
105
105
|
* @param {string} facetKey - key of the facet, as listed in FacetConfigs
|
|
106
106
|
* @param {FileData[]} [fragments] Array with XML fragments.
|
|
107
|
-
* @
|
|
107
|
+
* @returns {string} Name of custom columns definition.
|
|
108
108
|
*/
|
|
109
109
|
function ensureCustomColumnDefinitionExists(appSchema, manifest, entitySetName, entityTypeName, oDataServiceAVT, facet, facetKey, fragments) {
|
|
110
110
|
let suffix, customColumnsDefinitionName;
|
|
@@ -333,7 +333,7 @@ function addDataPointHeaderFacetDataType(appSchema, definitionKey, facet) {
|
|
|
333
333
|
* @param {FacetConfig} facet facet or section information
|
|
334
334
|
* @param {string} facetKey - facet key.
|
|
335
335
|
* @param {SectionTypeV2} sectionType (sub)section type
|
|
336
|
-
* @
|
|
336
|
+
* @returns {object} returns filled form section in app schema.
|
|
337
337
|
*/
|
|
338
338
|
function handleFormSection(appSchema, definitionKey, facet, facetKey, sectionType) {
|
|
339
339
|
appSchema.definitions[definitionKey] = (0, common_1.createDefaultSection)(appSchema, facet, facetKey);
|
|
@@ -347,7 +347,7 @@ function handleFormSection(appSchema, definitionKey, facet, facetKey, sectionTyp
|
|
|
347
347
|
* Mapping of facet type to (sub)section type to enable correct further handling
|
|
348
348
|
* @param {FacetBase} facetType - facet type to be mapped
|
|
349
349
|
* @param {boolean} isSubSection - if section is subsection of section
|
|
350
|
-
* @
|
|
350
|
+
* @returns {SectionTypeV2} sectionType (sub)section type
|
|
351
351
|
*/
|
|
352
352
|
function getSectionType(facetType, isSubSection, isHeaderFacet) {
|
|
353
353
|
const headerSectionMap = new Map([
|
|
@@ -391,7 +391,7 @@ function getSectionType(facetType, isSubSection, isHeaderFacet) {
|
|
|
391
391
|
* @param {FacetConfig} facet facet or section information
|
|
392
392
|
* @param {string} facetKey - facet key.
|
|
393
393
|
* @param {SectionTypeV2} sectionType (sub)section type
|
|
394
|
-
* @
|
|
394
|
+
* @returns {string} reference key
|
|
395
395
|
*/
|
|
396
396
|
function getReferenceKey(facet, facetKey, sectionType) {
|
|
397
397
|
let referenceKey = facet.ID || facetKey;
|
|
@@ -153,9 +153,9 @@ function applyAdaptationInfoToElement(adaptationInfo, element, generateParameter
|
|
|
153
153
|
*/
|
|
154
154
|
function getJSONPathForProperty(path, property) {
|
|
155
155
|
const pathIsArray = Array.isArray(path);
|
|
156
|
-
|
|
156
|
+
let pathAsArray = pathIsArray ? path : path.path;
|
|
157
157
|
if (pathIsArray || path.addTargetPropertyToPath) {
|
|
158
|
-
pathAsArray.
|
|
158
|
+
pathAsArray = pathAsArray.concat([property]);
|
|
159
159
|
}
|
|
160
160
|
let jsonPath = '$';
|
|
161
161
|
pathAsArray.forEach((segment) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schemaAdaptation.js","sourceRoot":"","sources":["../../../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O,EAAE,WAAW,CAAC,CAAC;IACtG,CAAC;AACL,CAAC;AAED;;;;;;GAMG;AACH,SAAS,sBAAsB,CAAC,IAAkB,EAAE,QAAgB;IAChE,MAAM,WAAW,GAAG,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;IACxC,
|
|
1
|
+
{"version":3,"file":"schemaAdaptation.js","sourceRoot":"","sources":["../../../../../../src/sync/v2/generate/schemaAdaptation.ts"],"names":[],"mappings":";;AAuaA,4CA4EC;AA5eD,yCAMsB;AACtB,wEAA4F;AAe5F,mEAAgG;AAChG,mEAA+D;AAC/D,mDAA4C;AAC5C,oCAAqD;AACrD,6CAA8C;AAmB9C;;;;;;GAMG;AACH,SAAS,uBAAuB,CAAC,OAAmB,EAAE,WAAwB;IAC1E,IAAI,OAAO,CAAC,KAAK,EAAE,CAAC;QAChB,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,UAAU,YAAY;YACxC,2BAA2B,CAAC,YAAY,EAAE,WAAW,CAAC,CAAC;QAC3D,CAAC,CAAC,CAAC;IACP,CAAC;AACL,CAAC;AAED;;;;;;;GAOG;AACH,SAAS,aAAa,CAAC,OAAmB;IACtC,OAAO,OAAO,OAAO,CAAC,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,OAAO,CAAC,KAAK,CAAC;AACzG,CAAC;AAED;;;;;;GAMG;AACH,SAAS,2BAA2B,CAAC,OAAwC,EAAE,WAAwB;IACnG,IAAI,OAAO,OAAO,KAAK,QAAQ,EAAE,CAAC;QAC9B,iDAAiD;QACjD,OAAO;IACX,CAAC;IACD,uDAAuD;IACvD,MAAM,OAAO,GAAG,IAAA,mBAAU,EAAC,OAAO,CAAC,CAAC;IACpC,IAAI,OAAO,EAAE,CAAC;QACV,wBAAwB,CAAC,OAAO,EAAE,WAAW,CAAC,CAAC;IACnD,CAAC;IACD,uBAAuB,C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Definition, fragments: FileDa
|
|
|
72
72
|
* @param {SapUiAppPageV2} page Sapui5 page object.
|
|
73
73
|
* @param {object} manifest Application manifest.
|
|
74
74
|
* @param {FileData[]} [fragments] Array of fragments.
|
|
75
|
-
* @param {string} [customColumnsDefinitionName
|
|
76
|
-
* @param {string} [customColumnDefinitionName
|
|
75
|
+
* @param {string} [customColumnsDefinitionName] Definition name of Custom Columns definition.
|
|
76
|
+
* @param {string} [customColumnDefinitionName] Definition name of Custom Column definition.
|
|
77
77
|
* @param {string} facetID - Facet ID
|
|
78
78
|
*/
|
|
79
79
|
export declare function addTableColumnExtensions(appSchema: object, entityType: EntityType, page: v2.SapUiAppPageV2, manifest: object, fragments?: FileData[], customColumnsDefinitionName?: string, customColumnDefinitionName?: string, facetID?: string): void;
|
|
@@ -382,8 +382,8 @@ function addFragmentEnum(appSchema, fragments, appId, property, definitionName)
|
|
|
382
382
|
* @param {SapUiAppPageV2} page Sapui5 page object.
|
|
383
383
|
* @param {object} manifest Application manifest.
|
|
384
384
|
* @param {FileData[]} [fragments] Array of fragments.
|
|
385
|
-
* @param {string} [customColumnsDefinitionName
|
|
386
|
-
* @param {string} [customColumnDefinitionName
|
|
385
|
+
* @param {string} [customColumnsDefinitionName] Definition name of Custom Columns definition.
|
|
386
|
+
* @param {string} [customColumnDefinitionName] Definition name of Custom Column definition.
|
|
387
387
|
* @param {string} facetID - Facet ID
|
|
388
388
|
*/
|
|
389
389
|
function addTableColumnExtensions(appSchema, entityType, page, manifest, fragments, customColumnsDefinitionName = ux_specification_types_1.DefinitionName.CustomColumns, customColumnDefinitionName = ux_specification_types_1.DefinitionName.CustomColumn, facetID) {
|
|
@@ -2,20 +2,7 @@
|
|
|
2
2
|
* @file This file contains the classes implementing the interfaces defined in the corresponding types file.
|
|
3
3
|
*/
|
|
4
4
|
import type * as v2 from '@sap/ux-specification-types/src/v2/genericSchemaHandling/controls/FilterBar';
|
|
5
|
-
export declare class DateRange implements v2.DateRange {
|
|
6
|
-
useDateRange?: boolean;
|
|
7
|
-
selectedValues?: v2.DateRangeEnum[];
|
|
8
|
-
exclude?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare class DefaultDateRange implements v2.DefaultDateRange {
|
|
11
|
-
operation: v2.DefaultDateRangeValueEnum;
|
|
12
|
-
}
|
|
13
5
|
export declare class FilterField implements v2.FilterField {
|
|
14
|
-
selectedValues?: v2.DateRangeEnum[];
|
|
15
|
-
exclude?: boolean;
|
|
16
|
-
customDateRangeImplementation?: string;
|
|
17
|
-
filter?: v2.FilterType[];
|
|
18
|
-
defaultValue?: DefaultDateRange;
|
|
19
6
|
}
|
|
20
7
|
export declare class FilterFields implements v2.FilterFields {
|
|
21
8
|
[key: string]: v2.FilterField;
|
|
@@ -28,11 +15,9 @@ declare class CommonFilterBar implements v2.CommonFilterBar {
|
|
|
28
15
|
showClearOnFB?: boolean;
|
|
29
16
|
showFilterConfiguration?: boolean;
|
|
30
17
|
showRestoreOnFB?: boolean;
|
|
31
|
-
dateSettings?: DateRange;
|
|
32
18
|
selectionFields?: FilterFields;
|
|
33
19
|
}
|
|
34
20
|
export declare class ListReportFilterBar extends CommonFilterBar implements v2.ListReportFilterBar {
|
|
35
|
-
annotationPath?: string;
|
|
36
21
|
}
|
|
37
22
|
export {};
|
|
38
23
|
//# sourceMappingURL=FilterBar.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FilterBar.d.ts","sourceRoot":"","sources":["../../../../../../../src/sync/v2/genericSchemaHandling/controls/FilterBar.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"FilterBar.d.ts","sourceRoot":"","sources":["../../../../../../../src/sync/v2/genericSchemaHandling/controls/FilterBar.ts"],"names":[],"mappings":"AAAA;;GAEG;AASH,OAAO,KAAK,KAAK,EAAE,MAAM,6EAA6E,CAAC;AAgEvG,qBAgBa,WAAY,YAAW,EAAE,CAAC,WAAW;CAAG;AAGrD,qBA2Ca,YAAa,YAAW,EAAE,CAAC,YAAY;IAChD,CAAC,GAAG,EAAE,MAAM,GAAG,EAAE,CAAC,WAAW,CAAC;CACjC;AAED,cAAM,eAAgB,YAAW,EAAE,CAAC,eAAe;IAG/C,QAAQ,CAAC,EAAE,OAAO,CAAC;IAKnB,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAKjC,uBAAuB,EAAE,OAAO,CAAC;IAKjC,2BAA2B,CAAC,EAAE,MAAM,CAAC;IAIrC,aAAa,CAAC,EAAE,OAAO,CAAC;IAIxB,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAIlC,eAAe,CAAC,EAAE,OAAO,CAAC;IAU1B,eAAe,CAAC,EAAE,YAAY,CAAC;CAClC;AAGD,qBA0Ba,mBAAoB,SAAQ,eAAgB,YAAW,EAAE,CAAC,mBAAmB;CAAG"}
|