@sap-ux/preview-middleware 0.23.71 → 0.23.73
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/base/flp.js +1 -1
- package/dist/client/adp/controllers/AddSubpage.controller.ts +1 -1
- package/dist/client/adp/controllers/AddTableColumnFragments.controller.ts +2 -2
- package/dist/client/adp/controllers/BaseDialog.controller.js +5 -6
- package/dist/client/adp/controllers/BaseDialog.controller.ts +6 -5
- package/dist/client/adp/controllers/ControllerExtension.controller.js +1 -2
- package/dist/client/adp/dialog-factory.js +2 -4
- package/dist/client/adp/dialog-factory.ts +5 -4
- package/dist/client/adp/extension-point.js +2 -2
- package/dist/client/adp/extension-point.ts +6 -4
- package/dist/client/adp/init-dialogs.js +0 -2
- package/dist/client/adp/init-dialogs.ts +1 -3
- package/dist/client/adp/quick-actions/common/add-controller-to-page.ts +1 -1
- package/dist/client/adp/quick-actions/common/add-new-annotation-file.js +2 -2
- package/dist/client/adp/quick-actions/common/add-new-annotation-file.ts +1 -1
- package/dist/client/adp/quick-actions/common/create-page-action.ts +7 -3
- package/dist/client/adp/quick-actions/common/op-add-custom-section.ts +6 -3
- package/dist/client/adp/quick-actions/common/op-add-header-field.ts +8 -5
- package/dist/client/adp/quick-actions/common/utils.ts +1 -1
- package/dist/client/adp/quick-actions/enablement-validator.ts +1 -0
- package/dist/client/adp/quick-actions/fe-v2/change-table-columns.ts +6 -3
- package/dist/client/adp/quick-actions/fe-v2/create-table-action.ts +3 -3
- package/dist/client/adp/quick-actions/fe-v2/create-table-custom-column.ts +6 -6
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-semantic-date-range-filter-bar.ts +6 -3
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-table-filtering.ts +5 -2
- package/dist/client/adp/quick-actions/fe-v2/lr-enable-variant-management.ts +5 -2
- package/dist/client/adp/quick-actions/fe-v2/lr-toggle-clear-filter-bar.ts +5 -2
- package/dist/client/adp/quick-actions/fe-v2/op-enable-empty-row-mode.ts +6 -3
- package/dist/client/adp/quick-actions/fe-v2/op-enable-variant-management.ts +7 -4
- package/dist/client/adp/quick-actions/fe-v2/registry.js +2 -2
- package/dist/client/adp/quick-actions/fe-v2/registry.ts +1 -1
- package/dist/client/adp/quick-actions/fe-v2/utils.ts +4 -4
- package/dist/client/adp/quick-actions/fe-v4/change-table-columns.ts +6 -3
- package/dist/client/adp/quick-actions/fe-v4/enable-variant-management.ts +5 -2
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-semantic-date-range-filter-bar.ts +6 -3
- package/dist/client/adp/quick-actions/fe-v4/lr-enable-table-filtering.ts +6 -3
- package/dist/client/adp/quick-actions/fe-v4/lr-toggle-clear-filter-bar.ts +6 -3
- package/dist/client/adp/quick-actions/fe-v4/op-enable-empty-row-mode.ts +6 -3
- package/dist/client/adp/quick-actions/fe-v4/registry.js +2 -2
- package/dist/client/adp/quick-actions/fe-v4/utils.ts +2 -2
- package/dist/client/adp/quick-actions/quick-action-base.js +2 -4
- package/dist/client/adp/quick-actions/quick-action-base.ts +1 -1
- package/dist/client/adp/quick-actions/simple-quick-action-base.js +1 -2
- package/dist/client/adp/quick-actions/simple-quick-action-base.ts +5 -4
- package/dist/client/adp/quick-actions/table-quick-action-base.js +12 -4
- package/dist/client/adp/quick-actions/table-quick-action-base.ts +20 -10
- package/dist/client/adp/sync-views-utils.js +1 -2
- package/dist/client/cpe/changes/flex-change.ts +3 -1
- package/dist/client/cpe/changes/generic-change.js +22 -29
- package/dist/client/cpe/changes/service.js +2 -3
- package/dist/client/cpe/changes/service.ts +1 -1
- package/dist/client/cpe/changes/validator.ts +4 -4
- package/dist/client/cpe/communication-service.js +3 -2
- package/dist/client/cpe/communication-service.ts +3 -2
- package/dist/client/cpe/connector-service.js +1 -3
- package/dist/client/cpe/connector-service.ts +3 -2
- package/dist/client/cpe/control-data.ts +5 -4
- package/dist/client/cpe/feature-service.js +3 -2
- package/dist/client/cpe/init.js +1 -2
- package/dist/client/cpe/logger.ts +1 -3
- package/dist/client/cpe/odata-health/odata-health-checker.js +4 -7
- package/dist/client/cpe/outline/editable.js +1 -2
- package/dist/client/cpe/outline/editable.ts +1 -1
- package/dist/client/cpe/outline/nodes.js +2 -2
- package/dist/client/cpe/outline/nodes.ts +4 -4
- package/dist/client/cpe/quick-actions/quick-action-definition.ts +1 -1
- package/dist/client/cpe/quick-actions/quick-action-service.js +1 -0
- package/dist/client/cpe/quick-actions/quick-action-service.ts +20 -12
- package/dist/client/cpe/quick-actions/registry.js +1 -1
- package/dist/client/cpe/quick-actions/registry.ts +4 -4
- package/dist/client/cpe/quick-actions/utils.js +3 -3
- package/dist/client/cpe/quick-actions/utils.ts +9 -10
- package/dist/client/cpe/rta-service.js +1 -1
- package/dist/client/cpe/rta-service.ts +4 -4
- package/dist/client/cpe/selection.js +3 -2
- package/dist/client/cpe/selection.ts +6 -3
- package/dist/client/cpe/types.ts +2 -2
- package/dist/client/flp/WorkspaceConnector.js +1 -1
- package/dist/client/flp/WorkspaceConnector.ts +3 -2
- package/dist/client/flp/common.ts +1 -1
- package/dist/client/flp/enableFakeConnector.js +1 -4
- package/dist/client/flp/enableFakeConnector.ts +2 -1
- package/dist/client/flp/init.js +10 -14
- package/dist/client/flp/init.ts +3 -3
- package/dist/client/flp/initCdm.ts +2 -6
- package/dist/client/flp/initRta.ts +2 -2
- package/dist/client/i18n.js +2 -4
- package/dist/client/utils/fe-v2.ts +1 -3
- package/dist/client/utils/info-center-message.js +6 -7
- package/dist/client/utils/version.js +4 -8
- package/dist/client/utils/version.ts +1 -2
- package/package.json +16 -16
|
@@ -21,7 +21,7 @@ sap.ui.define(["sap/base/Log", "../../utils/core", "../../utils/error", "../util
|
|
|
21
21
|
return {};
|
|
22
22
|
}
|
|
23
23
|
const metadata = control.getMetadata();
|
|
24
|
-
|
|
24
|
+
const details = {};
|
|
25
25
|
const technicalName = metadata.getElementName();
|
|
26
26
|
if (technicalName) {
|
|
27
27
|
details.technicalName = technicalName;
|
|
@@ -147,7 +147,7 @@ sap.ui.define(["sap/base/Log", "../../utils/core", "../../utils/error", "../util
|
|
|
147
147
|
defaultContent = [],
|
|
148
148
|
createdControls = []
|
|
149
149
|
} = current.extensionPointInfo;
|
|
150
|
-
|
|
150
|
+
const children = [];
|
|
151
151
|
// We can combine both because there can only be either defaultContent or createdControls for one extension point node.
|
|
152
152
|
[...defaultContent, ...createdControls].forEach(id => {
|
|
153
153
|
addChildToExtensionPoint(id, children, changeService);
|
|
@@ -10,7 +10,7 @@ import type { ControlTreeIndex } from '../types';
|
|
|
10
10
|
import { getOverlay } from '../utils';
|
|
11
11
|
|
|
12
12
|
import { isEditable } from './editable';
|
|
13
|
-
import { ChangeService } from '../changes';
|
|
13
|
+
import type { ChangeService } from '../changes';
|
|
14
14
|
import { getConfigMapControlIdMap, getPageName } from '../../utils/fe-v4';
|
|
15
15
|
|
|
16
16
|
interface AdditionalData {
|
|
@@ -31,7 +31,7 @@ function getAdditionalData(id: string): AdditionalData {
|
|
|
31
31
|
}
|
|
32
32
|
|
|
33
33
|
const metadata = control.getMetadata();
|
|
34
|
-
|
|
34
|
+
const details: AdditionalData = {};
|
|
35
35
|
|
|
36
36
|
const technicalName = metadata.getElementName();
|
|
37
37
|
if (technicalName) {
|
|
@@ -56,7 +56,7 @@ function getAdditionalData(id: string): AdditionalData {
|
|
|
56
56
|
*/
|
|
57
57
|
function getChildren(current: OutlineViewNode): OutlineViewNode[] {
|
|
58
58
|
return (current.elements ?? []).flatMap((element: OutlineViewNode) =>
|
|
59
|
-
element.type === 'aggregation' ? element.elements ?? [] : []
|
|
59
|
+
element.type === 'aggregation' ? (element.elements ?? []) : []
|
|
60
60
|
);
|
|
61
61
|
}
|
|
62
62
|
|
|
@@ -173,7 +173,7 @@ export async function transformNodes(
|
|
|
173
173
|
if (isAdp && isExtPoint) {
|
|
174
174
|
const { defaultContent = [], createdControls = [] } = current.extensionPointInfo;
|
|
175
175
|
|
|
176
|
-
|
|
176
|
+
const children: OutlineNode[] = [];
|
|
177
177
|
// We can combine both because there can only be either defaultContent or createdControls for one extension point node.
|
|
178
178
|
[...defaultContent, ...createdControls].forEach((id: string) => {
|
|
179
179
|
addChildToExtensionPoint(id, children, changeService);
|
|
@@ -13,7 +13,7 @@ import type {
|
|
|
13
13
|
|
|
14
14
|
import type { TextBundle } from '../../i18n';
|
|
15
15
|
import type { ControlTreeIndex } from '../types';
|
|
16
|
-
import { ChangeService } from '../changes';
|
|
16
|
+
import type { ChangeService } from '../changes';
|
|
17
17
|
|
|
18
18
|
export interface QuickActionActivationContext {
|
|
19
19
|
controlIndex: ControlTreeIndex;
|
|
@@ -26,6 +26,7 @@ sap.ui.define(["sap/base/Log", "open/ux/preview/client/thirdparty/@sap-ux-privat
|
|
|
26
26
|
* @param rta - RTA object.
|
|
27
27
|
* @param outlineService - Outline service instance.
|
|
28
28
|
* @param registries - Quick action registries.
|
|
29
|
+
* @param changeService
|
|
29
30
|
*/
|
|
30
31
|
constructor(rta, outlineService, registries, changeService) {
|
|
31
32
|
this.rta = rta;
|
|
@@ -1,27 +1,34 @@
|
|
|
1
|
-
import RuntimeAuthoring from 'sap/ui/rta/RuntimeAuthoring';
|
|
2
|
-
import { ActionService } from 'sap/ui/rta/service/Action';
|
|
1
|
+
import type RuntimeAuthoring from 'sap/ui/rta/RuntimeAuthoring';
|
|
2
|
+
import type { ActionService } from 'sap/ui/rta/service/Action';
|
|
3
3
|
import Log from 'sap/base/Log';
|
|
4
4
|
|
|
5
|
+
import type {
|
|
6
|
+
ExternalAction,
|
|
7
|
+
QuickActionExecutionPayload,
|
|
8
|
+
QuickActionGroup
|
|
9
|
+
} from '@sap-ux-private/control-property-editor-common';
|
|
5
10
|
import {
|
|
6
11
|
executeQuickAction,
|
|
7
|
-
ExternalAction,
|
|
8
12
|
quickActionListChanged,
|
|
9
13
|
SIMPLE_QUICK_ACTION_KIND,
|
|
10
14
|
NESTED_QUICK_ACTION_KIND,
|
|
11
|
-
QuickActionExecutionPayload,
|
|
12
|
-
QuickActionGroup,
|
|
13
15
|
updateQuickAction,
|
|
14
16
|
externalFileChange,
|
|
15
17
|
reportTelemetry
|
|
16
18
|
} from '@sap-ux-private/control-property-editor-common';
|
|
17
19
|
|
|
18
|
-
import { ActionSenderFunction, ControlTreeIndex, Service, SubscribeFunction } from '../types';
|
|
19
|
-
|
|
20
|
-
import {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
20
|
+
import type { ActionSenderFunction, ControlTreeIndex, Service, SubscribeFunction } from '../types';
|
|
21
|
+
|
|
22
|
+
import type {
|
|
23
|
+
QuickActionActivationContext,
|
|
24
|
+
QuickActionContext,
|
|
25
|
+
QuickActionDefinition
|
|
26
|
+
} from './quick-action-definition';
|
|
27
|
+
import type { QuickActionDefinitionRegistry } from './registry';
|
|
28
|
+
import type { OutlineService } from '../outline/service';
|
|
29
|
+
import type { TextBundle } from '../../i18n';
|
|
30
|
+
import { getTextBundle } from '../../i18n';
|
|
31
|
+
import type { ChangeService } from '../changes';
|
|
25
32
|
import { DialogFactory } from '../../adp/dialog-factory';
|
|
26
33
|
import { getApplicationType } from '../../utils/application';
|
|
27
34
|
import { getUi5Version } from '../../utils/version';
|
|
@@ -43,6 +50,7 @@ export class QuickActionService implements Service {
|
|
|
43
50
|
* @param rta - RTA object.
|
|
44
51
|
* @param outlineService - Outline service instance.
|
|
45
52
|
* @param registries - Quick action registries.
|
|
53
|
+
* @param changeService
|
|
46
54
|
*/
|
|
47
55
|
constructor(
|
|
48
56
|
private readonly rta: RuntimeAuthoring,
|
|
@@ -111,10 +111,10 @@ sap.ui.define(["sap/m/NavContainer", "sap/f/FlexibleColumnLayout", "sap/f/librar
|
|
|
111
111
|
|
|
112
112
|
/**
|
|
113
113
|
* Finds the visible Flexible Column Layout pages.
|
|
114
|
+
*
|
|
114
115
|
* @param control - Flexible Column Layout control.
|
|
115
116
|
* @returns A list of visible pages.
|
|
116
117
|
*/
|
|
117
|
-
|
|
118
118
|
getVisibleFlexibleColumnLayoutPages(control) {
|
|
119
119
|
const layout = control.getLayout();
|
|
120
120
|
switch (layout) {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import NavContainer from 'sap/m/NavContainer';
|
|
2
2
|
import FlexibleColumnLayout from 'sap/f/FlexibleColumnLayout';
|
|
3
3
|
import { LayoutType } from 'sap/f/library';
|
|
4
|
-
import Control from 'sap/ui/core/Control';
|
|
5
|
-
import XMLView from 'sap/ui/core/mvc/XMLView';
|
|
4
|
+
import type Control from 'sap/ui/core/Control';
|
|
5
|
+
import type XMLView from 'sap/ui/core/mvc/XMLView';
|
|
6
6
|
import Log from 'sap/base/Log';
|
|
7
7
|
import ComponentContainer from 'sap/ui/core/ComponentContainer';
|
|
8
8
|
|
|
9
|
-
import { QuickActionActivationContext, QuickActionDefinitionGroup } from './quick-action-definition';
|
|
9
|
+
import type { QuickActionActivationContext, QuickActionDefinitionGroup } from './quick-action-definition';
|
|
10
10
|
|
|
11
11
|
import type { ControlTreeIndex } from '../types';
|
|
12
12
|
import { getControlById } from '../../utils/core';
|
|
@@ -126,10 +126,10 @@ export abstract class QuickActionDefinitionRegistry<T extends string> {
|
|
|
126
126
|
|
|
127
127
|
/**
|
|
128
128
|
* Finds the visible Flexible Column Layout pages.
|
|
129
|
+
*
|
|
129
130
|
* @param control - Flexible Column Layout control.
|
|
130
131
|
* @returns A list of visible pages.
|
|
131
132
|
*/
|
|
132
|
-
|
|
133
133
|
private getVisibleFlexibleColumnLayoutPages(control: FlexibleColumnLayout): (Control | undefined)[] {
|
|
134
134
|
const layout = control.getLayout();
|
|
135
135
|
switch (layout) {
|
|
@@ -7,7 +7,7 @@ sap.ui.define(["../../utils/core"], function (____utils_core) {
|
|
|
7
7
|
const isA = ____utils_core["isA"];
|
|
8
8
|
/**
|
|
9
9
|
* Checks if control is visible in the page.
|
|
10
|
-
*
|
|
10
|
+
*
|
|
11
11
|
* @param page - Page control.
|
|
12
12
|
* @param controlId - UI5 control id.
|
|
13
13
|
* @returns True if control is visible in the page.
|
|
@@ -19,7 +19,7 @@ sap.ui.define(["../../utils/core"], function (____utils_core) {
|
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* Checks if control is a child element of the rootControl.
|
|
22
|
-
*
|
|
22
|
+
*
|
|
23
23
|
* @param control - UI5 Control to be tested.
|
|
24
24
|
* @param rootControl - UI5 root control.
|
|
25
25
|
* @returns True if control is the child of the specified rootControl.
|
|
@@ -42,7 +42,7 @@ sap.ui.define(["../../utils/core"], function (____utils_core) {
|
|
|
42
42
|
|
|
43
43
|
/**
|
|
44
44
|
* Find all controls in page that match the provided types.
|
|
45
|
-
*
|
|
45
|
+
*
|
|
46
46
|
* @param controlIndex - Control tree index.
|
|
47
47
|
* @param activePage - Active page control.
|
|
48
48
|
* @param controlTypes - Relevant control types.
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import UI5Element from 'sap/ui/core/Element';
|
|
2
|
-
import Control from 'sap/ui/core/Control';
|
|
3
|
-
import ManagedObject from 'sap/ui/base/ManagedObject';
|
|
4
|
-
import { FEAppPage } from 'sap/ui/rta/RuntimeAuthoring';
|
|
1
|
+
import type UI5Element from 'sap/ui/core/Element';
|
|
2
|
+
import type Control from 'sap/ui/core/Control';
|
|
3
|
+
import type ManagedObject from 'sap/ui/base/ManagedObject';
|
|
4
|
+
import type { FEAppPage } from 'sap/ui/rta/RuntimeAuthoring';
|
|
5
5
|
|
|
6
6
|
import { getControlById, isA } from '../../utils/core';
|
|
7
7
|
|
|
8
8
|
import type { ControlTreeIndex } from '../types';
|
|
9
|
-
import Component from 'sap/ui/core/Component';
|
|
9
|
+
import type Component from 'sap/ui/core/Component';
|
|
10
10
|
|
|
11
11
|
export interface FEAppPageInfo {
|
|
12
12
|
page: FEAppPage;
|
|
@@ -18,7 +18,7 @@ export interface FEAppPagesMap {
|
|
|
18
18
|
|
|
19
19
|
/**
|
|
20
20
|
* Checks if control is visible in the page.
|
|
21
|
-
*
|
|
21
|
+
*
|
|
22
22
|
* @param page - Page control.
|
|
23
23
|
* @param controlId - UI5 control id.
|
|
24
24
|
* @returns True if control is visible in the page.
|
|
@@ -28,10 +28,9 @@ export function pageHasControlId(page: Control, controlId: string): boolean {
|
|
|
28
28
|
return !!controlDomElement && !!page?.getDomRef()?.contains(controlDomElement);
|
|
29
29
|
}
|
|
30
30
|
|
|
31
|
-
|
|
32
31
|
/**
|
|
33
32
|
* Checks if control is a child element of the rootControl.
|
|
34
|
-
*
|
|
33
|
+
*
|
|
35
34
|
* @param control - UI5 Control to be tested.
|
|
36
35
|
* @param rootControl - UI5 root control.
|
|
37
36
|
* @returns True if control is the child of the specified rootControl.
|
|
@@ -57,7 +56,7 @@ function isDescendantOfPage(control: ManagedObject | null | undefined, rootContr
|
|
|
57
56
|
|
|
58
57
|
/**
|
|
59
58
|
* Find all controls in page that match the provided types.
|
|
60
|
-
*
|
|
59
|
+
*
|
|
61
60
|
* @param controlIndex - Control tree index.
|
|
62
61
|
* @param activePage - Active page control.
|
|
63
62
|
* @param controlTypes - Relevant control types.
|
|
@@ -111,4 +110,4 @@ export function getParentContainer<T extends ManagedObject>(
|
|
|
111
110
|
}
|
|
112
111
|
}
|
|
113
112
|
return undefined;
|
|
114
|
-
}
|
|
113
|
+
}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { ExternalAction } from '@sap-ux-private/control-property-editor-common';
|
|
1
2
|
import {
|
|
2
3
|
setAppMode,
|
|
3
4
|
setUndoRedoEnablement,
|
|
@@ -5,12 +6,11 @@ import {
|
|
|
5
6
|
undo,
|
|
6
7
|
redo,
|
|
7
8
|
save,
|
|
8
|
-
ExternalAction,
|
|
9
9
|
reloadApplication,
|
|
10
10
|
applicationModeChanged
|
|
11
11
|
} from '@sap-ux-private/control-property-editor-common';
|
|
12
|
-
import { ActionSenderFunction, SubscribeFunction } from './types';
|
|
13
|
-
import RuntimeAuthoring from 'sap/ui/rta/RuntimeAuthoring';
|
|
12
|
+
import type { ActionSenderFunction, SubscribeFunction } from './types';
|
|
13
|
+
import type RuntimeAuthoring from 'sap/ui/rta/RuntimeAuthoring';
|
|
14
14
|
|
|
15
15
|
/**
|
|
16
16
|
* A Class of RtaService
|
|
@@ -18,7 +18,7 @@ import RuntimeAuthoring from 'sap/ui/rta/RuntimeAuthoring';
|
|
|
18
18
|
export class RtaService {
|
|
19
19
|
/**
|
|
20
20
|
*
|
|
21
|
-
* @param
|
|
21
|
+
* @param rta Runtime Authoring Instance
|
|
22
22
|
*/
|
|
23
23
|
constructor(private readonly rta: RuntimeAuthoring) {}
|
|
24
24
|
|
|
@@ -67,12 +67,13 @@ sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-proper
|
|
|
67
67
|
*
|
|
68
68
|
*/
|
|
69
69
|
class SelectionService {
|
|
70
|
-
appliedChangeCache =
|
|
71
|
-
activeChangeHandlers =
|
|
70
|
+
appliedChangeCache = new Map();
|
|
71
|
+
activeChangeHandlers = new Set();
|
|
72
72
|
/**
|
|
73
73
|
*
|
|
74
74
|
* @param rta - rta object.
|
|
75
75
|
* @param ui5 - facade for ui5 framework methods
|
|
76
|
+
* @param changeService - change service instance.
|
|
76
77
|
*/
|
|
77
78
|
constructor(rta, changeService) {
|
|
78
79
|
this.rta = rta;
|
|
@@ -1,8 +1,7 @@
|
|
|
1
|
-
import type { Control, ExternalAction } from '@sap-ux-private/control-property-editor-common';
|
|
1
|
+
import type { Control, ExternalAction, Properties } from '@sap-ux-private/control-property-editor-common';
|
|
2
2
|
import {
|
|
3
3
|
changeProperty,
|
|
4
4
|
controlSelected,
|
|
5
|
-
Properties,
|
|
6
5
|
propertyChanged,
|
|
7
6
|
PropertyType,
|
|
8
7
|
reportTelemetry,
|
|
@@ -99,8 +98,12 @@ export class SelectionService implements Service {
|
|
|
99
98
|
*
|
|
100
99
|
* @param rta - rta object.
|
|
101
100
|
* @param ui5 - facade for ui5 framework methods
|
|
101
|
+
* @param changeService - change service instance.
|
|
102
102
|
*/
|
|
103
|
-
constructor(
|
|
103
|
+
constructor(
|
|
104
|
+
private readonly rta: RuntimeAuthoring,
|
|
105
|
+
private readonly changeService: ChangeService
|
|
106
|
+
) {}
|
|
104
107
|
|
|
105
108
|
/**
|
|
106
109
|
* Initialize selection service.
|
package/dist/client/cpe/types.ts
CHANGED
|
@@ -10,7 +10,7 @@ export type PropertyValue = boolean | object | number | string;
|
|
|
10
10
|
|
|
11
11
|
export interface UI5ControlProperty {
|
|
12
12
|
defaultValue: unknown;
|
|
13
|
-
enumValues: Record<string,string> | undefined;
|
|
13
|
+
enumValues: Record<string, string> | undefined;
|
|
14
14
|
isArray: boolean;
|
|
15
15
|
isDeprecated: boolean;
|
|
16
16
|
isEnabled: boolean;
|
|
@@ -43,5 +43,5 @@ export interface Service {
|
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
export interface ControlTreeIndex {
|
|
46
|
-
[controlType: string]: OutlineNode[]
|
|
46
|
+
[controlType: string]: OutlineNode[];
|
|
47
47
|
}
|
|
@@ -43,7 +43,7 @@ sap.ui.define(["sap/base/util/merge", "sap/ui/fl/write/api/connectors/ObjectStor
|
|
|
43
43
|
if (typeof this.fileChangeRequestNotifier === 'function') {
|
|
44
44
|
try {
|
|
45
45
|
this.fileChangeRequestNotifier(key, 'delete');
|
|
46
|
-
} catch
|
|
46
|
+
} catch {
|
|
47
47
|
// exceptions in the listener call are ignored
|
|
48
48
|
}
|
|
49
49
|
}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import merge from 'sap/base/util/merge';
|
|
2
2
|
import ObjectStorageConnector from 'sap/ui/fl/write/api/connectors/ObjectStorageConnector';
|
|
3
3
|
import Layer from 'sap/ui/fl/Layer';
|
|
4
|
-
import {
|
|
4
|
+
import type { FlexChange } from './common';
|
|
5
|
+
import { CHANGES_API_PATH, getFlexSettings } from './common';
|
|
5
6
|
import { getUi5Version, isLowerThanMinimalUi5Version } from '../utils/version';
|
|
6
7
|
import { getAdditionalChangeInfo } from '../utils/additional-change-info';
|
|
7
8
|
|
|
@@ -44,7 +45,7 @@ const connector = merge({}, ObjectStorageConnector, {
|
|
|
44
45
|
if (typeof this.fileChangeRequestNotifier === 'function') {
|
|
45
46
|
try {
|
|
46
47
|
this.fileChangeRequestNotifier(key, 'delete');
|
|
47
|
-
} catch
|
|
48
|
+
} catch {
|
|
48
49
|
// exceptions in the listener call are ignored
|
|
49
50
|
}
|
|
50
51
|
}
|
|
@@ -48,7 +48,7 @@ sap.ui.define(["sap/ui/fl/LrepConnector", "sap/ui/fl/FakeLrepConnector", "../uti
|
|
|
48
48
|
*
|
|
49
49
|
* @returns {Promise<LoadChangesResult>} A promise that resolves to an object of type LoadChangesResult.
|
|
50
50
|
*/
|
|
51
|
-
async function loadChanges() {
|
|
51
|
+
async function loadChanges(...args) {
|
|
52
52
|
const lrep = new LrepConnector();
|
|
53
53
|
const response = await fetch(CHANGES_API_PATH, {
|
|
54
54
|
method: 'GET',
|
|
@@ -57,9 +57,6 @@ sap.ui.define(["sap/ui/fl/LrepConnector", "sap/ui/fl/FakeLrepConnector", "../uti
|
|
|
57
57
|
}
|
|
58
58
|
});
|
|
59
59
|
const changes = await response.json();
|
|
60
|
-
for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
61
|
-
args[_key] = arguments[_key];
|
|
62
|
-
}
|
|
63
60
|
return LrepConnector.prototype.loadChanges.apply(lrep, args).then(res => {
|
|
64
61
|
res.changes.changes = Object.values(changes);
|
|
65
62
|
return res;
|
|
@@ -2,7 +2,8 @@ import LrepConnector from 'sap/ui/fl/LrepConnector';
|
|
|
2
2
|
import FakeLrepConnector from 'sap/ui/fl/FakeLrepConnector';
|
|
3
3
|
import { getAdditionalChangeInfo } from '../utils/additional-change-info';
|
|
4
4
|
|
|
5
|
-
import {
|
|
5
|
+
import type { FlexChange } from './common';
|
|
6
|
+
import { CHANGES_API_PATH, getFlexSettings } from './common';
|
|
6
7
|
|
|
7
8
|
interface FetchedChanges {
|
|
8
9
|
[key: string]: FlexChange;
|
package/dist/client/flp/init.js
CHANGED
|
@@ -212,8 +212,7 @@ sap.ui.define(["sap/base/Log", "open/ux/preview/client/thirdparty/@sap-ux-privat
|
|
|
212
212
|
* @param resourceBundle resource bundle to read the title from.
|
|
213
213
|
* @param i18nKey optional parameter to define the i18n key to be used for the title.
|
|
214
214
|
*/
|
|
215
|
-
function setI18nTitle(resourceBundle) {
|
|
216
|
-
let i18nKey = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'appTitle';
|
|
215
|
+
function setI18nTitle(resourceBundle, i18nKey = 'appTitle') {
|
|
217
216
|
if (resourceBundle.hasText(i18nKey)) {
|
|
218
217
|
document.title = resourceBundle.getText(i18nKey) ?? document.title;
|
|
219
218
|
}
|
|
@@ -255,14 +254,13 @@ sap.ui.define(["sap/base/Log", "open/ux/preview/client/thirdparty/@sap-ux-privat
|
|
|
255
254
|
* @param params.enhancedHomePage boolean indicating if enhanced homepage is enabled
|
|
256
255
|
* @returns promise
|
|
257
256
|
*/
|
|
258
|
-
async function init(
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
} = _ref;
|
|
257
|
+
async function init({
|
|
258
|
+
appUrls,
|
|
259
|
+
flex,
|
|
260
|
+
customInit,
|
|
261
|
+
enhancedHomePage,
|
|
262
|
+
enableCardGenerator
|
|
263
|
+
}) {
|
|
266
264
|
// Set CDM configuration before importing ushell container
|
|
267
265
|
// to ensure proper configuration pickup during bootstrap
|
|
268
266
|
if (enhancedHomePage) {
|
|
@@ -281,7 +279,7 @@ sap.ui.define(["sap/base/Log", "open/ux/preview/client/thirdparty/@sap-ux-privat
|
|
|
281
279
|
lifecycleService.attachAppLoaded(event => {
|
|
282
280
|
const view = event.getParameter('componentInstance');
|
|
283
281
|
const pluginScript = flexSettings.pluginScript ?? '';
|
|
284
|
-
|
|
282
|
+
const libs = [];
|
|
285
283
|
if (isLowerThanMinimalUi5Version(ui5VersionInfo, {
|
|
286
284
|
major: 1,
|
|
287
285
|
minor: 72
|
|
@@ -299,9 +297,7 @@ sap.ui.define(["sap/base/Log", "open/ux/preview/client/thirdparty/@sap-ux-privat
|
|
|
299
297
|
validateAppVersion: false,
|
|
300
298
|
flexSettings
|
|
301
299
|
};
|
|
302
|
-
sap.ui.require(libs,
|
|
303
|
-
// eslint-disable-next-line no-shadow
|
|
304
|
-
async function (startAdaptation, pluginScript) {
|
|
300
|
+
sap.ui.require(libs, async function (startAdaptation, pluginScript) {
|
|
305
301
|
try {
|
|
306
302
|
await startAdaptation(options, pluginScript);
|
|
307
303
|
} catch (error) {
|
package/dist/client/flp/init.ts
CHANGED
|
@@ -5,7 +5,7 @@ import { MessageBarType, SCENARIO, type Scenario } from '@sap-ux-private/control
|
|
|
5
5
|
import type { FlexSettings, RTAOptions } from 'sap/ui/rta/RuntimeAuthoring';
|
|
6
6
|
import IconPool from 'sap/ui/core/IconPool';
|
|
7
7
|
import ResourceBundle from 'sap/base/i18n/ResourceBundle';
|
|
8
|
-
import AppState from 'sap/ushell/services/AppState';
|
|
8
|
+
import type AppState from 'sap/ushell/services/AppState';
|
|
9
9
|
import { getManifestAppdescr } from '../adp/api-handler';
|
|
10
10
|
import { getError } from '../utils/error';
|
|
11
11
|
import initCdm from './initCdm';
|
|
@@ -324,7 +324,7 @@ export async function init({
|
|
|
324
324
|
const view = event.getParameter('componentInstance');
|
|
325
325
|
const pluginScript = flexSettings.pluginScript ?? '';
|
|
326
326
|
|
|
327
|
-
|
|
327
|
+
const libs: string[] = [];
|
|
328
328
|
|
|
329
329
|
if (isLowerThanMinimalUi5Version(ui5VersionInfo, { major: 1, minor: 72 })) {
|
|
330
330
|
libs.push('open/ux/preview/client/flp/initRta');
|
|
@@ -345,7 +345,7 @@ export async function init({
|
|
|
345
345
|
|
|
346
346
|
sap.ui.require(
|
|
347
347
|
libs,
|
|
348
|
-
|
|
348
|
+
|
|
349
349
|
async function (startAdaptation: StartAdaptation | InitRtaScript, pluginScript: RTAPlugin) {
|
|
350
350
|
try {
|
|
351
351
|
await startAdaptation(options, pluginScript);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Window } from 'types/global';
|
|
1
|
+
import type { Window } from 'types/global';
|
|
2
2
|
|
|
3
3
|
/**
|
|
4
4
|
* Initializes the CDM (Common Data Model) configuration for the SAP Fiori Launchpad.
|
|
@@ -42,11 +42,7 @@ export default function initCdm(): void {
|
|
|
42
42
|
config: {
|
|
43
43
|
userProfile: {
|
|
44
44
|
metadata: {
|
|
45
|
-
editablePropterties: [
|
|
46
|
-
'accessibility',
|
|
47
|
-
'contentDensity',
|
|
48
|
-
'theme'
|
|
49
|
-
]
|
|
45
|
+
editablePropterties: ['accessibility', 'contentDensity', 'theme']
|
|
50
46
|
},
|
|
51
47
|
defaults: {
|
|
52
48
|
email: 'john.doe@sap.com',
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import Button from 'sap/m/Button';
|
|
1
|
+
import type Button from 'sap/m/Button';
|
|
2
2
|
|
|
3
3
|
import merge from 'sap/base/util/merge';
|
|
4
4
|
|
|
@@ -10,7 +10,7 @@ import Utils from 'sap/ui/fl/Utils';
|
|
|
10
10
|
import FeaturesAPI from 'sap/ui/fl/write/api/FeaturesAPI';
|
|
11
11
|
|
|
12
12
|
import type { RTAPlugin } from 'sap/ui/rta/api/startAdaptation';
|
|
13
|
-
import RuntimeAuthoring,
|
|
13
|
+
import RuntimeAuthoring, { type Manifest, type RTAOptions } from 'sap/ui/rta/RuntimeAuthoring';
|
|
14
14
|
|
|
15
15
|
const defaultOptions = {
|
|
16
16
|
flexSettings: {
|
package/dist/client/i18n.js
CHANGED
|
@@ -20,8 +20,7 @@ sap.ui.define(["sap/base/i18n/ResourceBundle", "sap/ui/model/resource/ResourceMo
|
|
|
20
20
|
BUNDLE_CACHE[key] = bundle;
|
|
21
21
|
return bundle;
|
|
22
22
|
}
|
|
23
|
-
async function getResourceModel() {
|
|
24
|
-
let key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'open.ux.preview.client';
|
|
23
|
+
async function getResourceModel(key = 'open.ux.preview.client') {
|
|
25
24
|
const cachedModel = MODEL_CACHE[key];
|
|
26
25
|
if (cachedModel) {
|
|
27
26
|
return cachedModel;
|
|
@@ -41,8 +40,7 @@ sap.ui.define(["sap/base/i18n/ResourceBundle", "sap/ui/model/resource/ResourceMo
|
|
|
41
40
|
return this.bundle.getText(key, args) ?? key;
|
|
42
41
|
}
|
|
43
42
|
}
|
|
44
|
-
async function getTextBundle() {
|
|
45
|
-
let key = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'open.ux.preview.client';
|
|
43
|
+
async function getTextBundle(key = 'open.ux.preview.client') {
|
|
46
44
|
const bundle = await getResourceBundle(key);
|
|
47
45
|
return new TextBundle(bundle);
|
|
48
46
|
}
|
|
@@ -22,9 +22,7 @@ export function getV2ApplicationPages(manifest: Manifest): { id: string; entityS
|
|
|
22
22
|
if (rootEntry) {
|
|
23
23
|
const result: { id: string; entitySet: string | undefined }[] = [];
|
|
24
24
|
|
|
25
|
-
const collectPageData = <
|
|
26
|
-
T extends Record<string, V2ManifestPageDefinition> | Array<V2ManifestPageDefinition>
|
|
27
|
-
>(
|
|
25
|
+
const collectPageData = <T extends Record<string, V2ManifestPageDefinition> | Array<V2ManifestPageDefinition>>(
|
|
28
26
|
pagesDefinitions: T | undefined,
|
|
29
27
|
idPrefix: string
|
|
30
28
|
) => {
|
|
@@ -20,13 +20,12 @@ sap.ui.define(["open/ux/preview/client/thirdparty/@sap-ux-private/control-proper
|
|
|
20
20
|
* details and type for the message. Each text in the message can be localized or
|
|
21
21
|
* left as a plain string.
|
|
22
22
|
*/
|
|
23
|
-
async function sendInfoCenterMessage(
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
} = _ref;
|
|
23
|
+
async function sendInfoCenterMessage({
|
|
24
|
+
title,
|
|
25
|
+
description,
|
|
26
|
+
details,
|
|
27
|
+
type
|
|
28
|
+
}) {
|
|
30
29
|
CommunicationService.sendAction(showInfoCenterMessage({
|
|
31
30
|
title: await getTranslation(title),
|
|
32
31
|
description: await getTranslation(description),
|
|
@@ -15,6 +15,7 @@ sap.ui.define(["sap/ui/VersionInfo", "sap/base/Log", "./info-center-message", "o
|
|
|
15
15
|
|
|
16
16
|
/**
|
|
17
17
|
* Check if the given version info is valid.
|
|
18
|
+
*
|
|
18
19
|
* @param versionInfo to check
|
|
19
20
|
* @throws Error if the version info is invalid
|
|
20
21
|
*/
|
|
@@ -42,8 +43,7 @@ sap.ui.define(["sap/ui/VersionInfo", "sap/base/Log", "./info-center-message", "o
|
|
|
42
43
|
* @param library - (optional) specific library name to get the version from, e.g. 'sap.m'
|
|
43
44
|
* @returns Ui5VersionInfo
|
|
44
45
|
*/
|
|
45
|
-
async function getUi5Version() {
|
|
46
|
-
let library = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 'sap.ui.core';
|
|
46
|
+
async function getUi5Version(library = 'sap.ui.core') {
|
|
47
47
|
const versionInfo = await VersionInfo.load();
|
|
48
48
|
let version = versionInfo?.libraries?.find(lib => lib.name === library)?.version;
|
|
49
49
|
const isCdn = versionInfo?.name === 'SAPUI5 Distribution';
|
|
@@ -80,11 +80,9 @@ sap.ui.define(["sap/ui/VersionInfo", "sap/base/Log", "./info-center-message", "o
|
|
|
80
80
|
* @param ui5VersionInfo to check
|
|
81
81
|
* @param minUi5VersionInfo to check against (default is 1.71)
|
|
82
82
|
* @throws Error if the version info is invalid
|
|
83
|
-
*
|
|
84
83
|
* @returns boolean
|
|
85
84
|
*/
|
|
86
|
-
function isLowerThanMinimalUi5Version(ui5VersionInfo) {
|
|
87
|
-
let minUi5VersionInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : minVersionInfo;
|
|
85
|
+
function isLowerThanMinimalUi5Version(ui5VersionInfo, minUi5VersionInfo = minVersionInfo) {
|
|
88
86
|
checkVersionInfo(ui5VersionInfo);
|
|
89
87
|
checkVersionInfo(minUi5VersionInfo);
|
|
90
88
|
return ui5VersionInfo.major < minUi5VersionInfo.major || ui5VersionInfo.major === minUi5VersionInfo.major && ui5VersionInfo.minor < minUi5VersionInfo.minor || ui5VersionInfo.major === minUi5VersionInfo.major && ui5VersionInfo.minor === minUi5VersionInfo.minor && (ui5VersionInfo?.patch ?? 0) < (minUi5VersionInfo?.patch ?? 0);
|
|
@@ -98,11 +96,9 @@ sap.ui.define(["sap/ui/VersionInfo", "sap/base/Log", "./info-center-message", "o
|
|
|
98
96
|
* @param ui5VersionInfo to check
|
|
99
97
|
* @param targetUi5VersionInfo to check against (default is 1.71)
|
|
100
98
|
* @throws Error if the version info is invalid
|
|
101
|
-
*
|
|
102
99
|
* @returns boolean
|
|
103
100
|
*/
|
|
104
|
-
function isVersionEqualOrHasNewerPatch(ui5VersionInfo) {
|
|
105
|
-
let targetUi5VersionInfo = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : minVersionInfo;
|
|
101
|
+
function isVersionEqualOrHasNewerPatch(ui5VersionInfo, targetUi5VersionInfo = minVersionInfo) {
|
|
106
102
|
checkVersionInfo(ui5VersionInfo);
|
|
107
103
|
checkVersionInfo(targetUi5VersionInfo);
|
|
108
104
|
return ui5VersionInfo.major === targetUi5VersionInfo.major && ui5VersionInfo.minor === targetUi5VersionInfo.minor && (ui5VersionInfo?.patch ?? 0) >= (targetUi5VersionInfo?.patch ?? 0);
|