@sap-ux/control-property-editor 0.8.1 → 1.0.1
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 +39 -0
- package/dist/app.css +1 -1
- package/dist/app.css.map +3 -3
- package/dist/app.js +54 -85
- package/dist/app.js.map +4 -4
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/{esbuild.js → esbuild.mjs} +7 -10
- package/{eslint.config.js → eslint.config.mjs} +4 -2
- package/jest.config.mjs +39 -0
- package/package.json +8 -6
- package/src/App.tsx +8 -8
- package/src/actions.ts +1 -1
- package/src/components/ChangeIndicator.tsx +1 -1
- package/src/components/ThemeSelectorCallout.tsx +3 -3
- package/src/components/index.ts +3 -3
- package/src/i18n.ts +1 -1
- package/src/index.tsx +5 -5
- package/src/middleware.ts +2 -2
- package/src/panels/LeftPanel.tsx +2 -2
- package/src/panels/RightPanel.tsx +4 -4
- package/src/panels/changes/ChangeStack.tsx +10 -10
- package/src/panels/changes/ChangeStackHeader.tsx +1 -1
- package/src/panels/changes/ChangesPanel.tsx +9 -9
- package/src/panels/changes/ControlChange.tsx +1 -1
- package/src/panels/changes/DisplayAsIcon.tsx +2 -2
- package/src/panels/changes/GenericChange.tsx +3 -3
- package/src/panels/changes/GenericGroup.tsx +1 -1
- package/src/panels/changes/UnknownChange.tsx +1 -1
- package/src/panels/changes/index.tsx +2 -2
- package/src/panels/changes/utils.ts +1 -1
- package/src/panels/index.ts +2 -2
- package/src/panels/info-center/InfoCenter.tsx +4 -4
- package/src/panels/info-center/InfoMessageItem.tsx +2 -2
- package/src/panels/info-center/index.ts +1 -1
- package/src/panels/outline/Funnel.tsx +4 -4
- package/src/panels/outline/OutlinePanel.tsx +3 -3
- package/src/panels/outline/Tree.tsx +6 -6
- package/src/panels/outline/index.ts +1 -1
- package/src/panels/outline/utils.ts +2 -2
- package/src/panels/properties/Clipboard.tsx +1 -1
- package/src/panels/properties/DropdownEditor.tsx +4 -4
- package/src/panels/properties/Funnel.tsx +4 -4
- package/src/panels/properties/HeaderField.tsx +3 -3
- package/src/panels/properties/IconValueHelp.tsx +3 -3
- package/src/panels/properties/InputTypeSelector.tsx +2 -2
- package/src/panels/properties/InputTypeToggle.tsx +5 -5
- package/src/panels/properties/InputTypeWrapper.tsx +8 -8
- package/src/panels/properties/PropertiesList.tsx +14 -14
- package/src/panels/properties/PropertyDocumentation.tsx +2 -2
- package/src/panels/properties/StringEditor.tsx +6 -6
- package/src/panels/properties/index.ts +1 -1
- package/src/panels/properties/propertyValuesCache.ts +1 -1
- package/src/panels/properties/types.ts +1 -1
- package/src/panels/quick-actions/NestedQuickAction.tsx +2 -2
- package/src/panels/quick-actions/QuickActionList.tsx +4 -4
- package/src/panels/quick-actions/SimpleQuickAction.tsx +1 -1
- package/src/panels/quick-actions/index.ts +1 -1
- package/src/slice.ts +1 -1
- package/src/store.ts +3 -3
- package/src/toolbar/DeviceSelector.tsx +3 -3
- package/src/toolbar/DeviceToggle.tsx +3 -3
- package/src/toolbar/ModeSwitcher.tsx +1 -1
- package/src/toolbar/ToolBar.tsx +6 -6
- package/src/toolbar/UndoRedoSaveActions.tsx +4 -4
- package/src/toolbar/ViewChanger.tsx +2 -2
- package/src/toolbar/index.ts +1 -1
- package/src/use-theme.ts +1 -1
- package/src/ws-middleware.ts +3 -3
- package/test/unit/App.test.tsx +3 -1
- package/test/unit/appIndex.test.ts +37 -19
- package/test/unit/middleware.test.ts +39 -73
- package/test/unit/panels/changes/ChangesPanel.test.tsx +3 -15
- package/test/unit/panels/changes/FileChange.test.tsx +2 -10
- package/test/unit/panels/properties/DropdownEditor.test.tsx +0 -2
- package/test/unit/panels/properties/InputTypeToggle.test.tsx +8 -9
- package/test/unit/setup.ts +18 -2
- package/test/utils/utils.tsx +2 -0
- package/tsconfig.eslint.json +2 -1
- package/tsconfig.json +4 -5
- package/jest.config.js +0 -21
|
@@ -1,13 +1,14 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { esbuildOptionsBrowser, build } from '../../esbuildConfig.mjs';
|
|
2
|
+
import NodeModulesPolyfills from '@esbuild-plugins/node-modules-polyfill';
|
|
3
|
+
import { copy } from 'esbuild-plugin-copy';
|
|
4
|
+
import alias from 'esbuild-plugin-alias';
|
|
5
|
+
import { fileURLToPath } from 'node:url';
|
|
5
6
|
|
|
6
7
|
// Set esbuild options for this build
|
|
7
8
|
esbuildOptionsBrowser.plugins = esbuildOptionsBrowser.plugins.concat(
|
|
8
9
|
alias({
|
|
9
|
-
'react':
|
|
10
|
-
'react-dom':
|
|
10
|
+
'react': fileURLToPath(import.meta.resolve('react')),
|
|
11
|
+
'react-dom': fileURLToPath(import.meta.resolve('react-dom'))
|
|
11
12
|
})
|
|
12
13
|
);
|
|
13
14
|
const esbuildOptions = { ...esbuildOptionsBrowser };
|
|
@@ -19,8 +20,4 @@ esbuildOptions.entryPoints = {
|
|
|
19
20
|
esbuildOptions.format = 'esm';
|
|
20
21
|
esbuildOptions.plugins = esbuildOptions.plugins.concat([NodeModulesPolyfills.NodeModulesPolyfillPlugin()]);
|
|
21
22
|
|
|
22
|
-
module.exports = {
|
|
23
|
-
esbuildOptions
|
|
24
|
-
};
|
|
25
|
-
|
|
26
23
|
build(esbuildOptions, process.argv.slice(2));
|
package/jest.config.mjs
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import baseConfig from '../../jest.base.mjs';
|
|
2
|
+
const config = { ...baseConfig };
|
|
3
|
+
config.testEnvironment = 'jsdom';
|
|
4
|
+
config.extensionsToTreatAsEsm = ['.ts', '.tsx'];
|
|
5
|
+
config.collectCoverageFrom = ['src/**/*.{ts,tsx}'];
|
|
6
|
+
config.transform = {
|
|
7
|
+
'^.+\\.[jt]sx?$': [
|
|
8
|
+
'ts-jest',
|
|
9
|
+
{
|
|
10
|
+
useESM: true,
|
|
11
|
+
jsx: 'react-jsx',
|
|
12
|
+
tsconfig: {
|
|
13
|
+
module: 'NodeNext',
|
|
14
|
+
moduleResolution: 'NodeNext',
|
|
15
|
+
isolatedModules: true,
|
|
16
|
+
allowJs: true,
|
|
17
|
+
jsx: 'react-jsx'
|
|
18
|
+
},
|
|
19
|
+
diagnostics: {
|
|
20
|
+
warnOnly: true,
|
|
21
|
+
exclude: /\.(spec|test)\.ts$/,
|
|
22
|
+
ignoreCodes: [151001]
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
],
|
|
26
|
+
'.+\\.(css|sass|scss)$': 'jest-scss-transform'
|
|
27
|
+
};
|
|
28
|
+
config.transformIgnorePatterns = [
|
|
29
|
+
'node_modules/(?!(\\.pnpm|@sap-ux|@sap-ux-private|@fluentui|@reduxjs|@testing-library|@babel|react-redux|react-i18next|i18next|redux|uuid|symbol-observable|hoist-non-react-statics|react-is)/)',
|
|
30
|
+
'node_modules/\\.pnpm/(?!(@sap-ux|@sap-ux-private|@fluentui|@reduxjs|@testing-library|@babel|react-redux|react-i18next|i18next|redux|uuid|symbol-observable|hoist-non-react-statics|react-is))'
|
|
31
|
+
];
|
|
32
|
+
config.moduleNameMapper = {
|
|
33
|
+
...baseConfig.moduleNameMapper,
|
|
34
|
+
'^@reduxjs/toolkit$': '<rootDir>/node_modules/@reduxjs/toolkit/dist/redux-toolkit.esm.js',
|
|
35
|
+
'^react-redux$': '<rootDir>/node_modules/react-redux/lib/index.js'
|
|
36
|
+
};
|
|
37
|
+
config.testMatch = ['**/test/unit/**/*.(test).ts(x)?'];
|
|
38
|
+
config.setupFiles = ['<rootDir>/../../jest.setup.mjs', './test/unit/setup.ts'];
|
|
39
|
+
export default config;
|
package/package.json
CHANGED
|
@@ -3,17 +3,19 @@
|
|
|
3
3
|
"displayName": "Control Property Editor",
|
|
4
4
|
"description": "Control Property Editor",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
|
-
"version": "0.
|
|
6
|
+
"version": "1.0.1",
|
|
7
7
|
"main": "dist/app.js",
|
|
8
8
|
"repository": {
|
|
9
9
|
"type": "git",
|
|
10
10
|
"url": "https://github.com/SAP/open-ux-tools.git",
|
|
11
11
|
"directory": "packages/control-property-editor"
|
|
12
12
|
},
|
|
13
|
+
"type": "module",
|
|
13
14
|
"private": false,
|
|
14
15
|
"devDependencies": {
|
|
15
16
|
"@fluentui/react": "8.125.5",
|
|
16
17
|
"@fluentui/react-hooks": "8.10.2",
|
|
18
|
+
"@jest/globals": "30.3.0",
|
|
17
19
|
"@reduxjs/toolkit": "1.6.1",
|
|
18
20
|
"@testing-library/jest-dom": "6.9.1",
|
|
19
21
|
"@testing-library/react": "12.1.5",
|
|
@@ -48,8 +50,8 @@
|
|
|
48
50
|
"esbuild-plugin-copy": "2.1.1",
|
|
49
51
|
"@esbuild-plugins/node-modules-polyfill": "0.2.2",
|
|
50
52
|
"uuid": "11.1.1",
|
|
51
|
-
"@sap-ux/
|
|
52
|
-
"@sap-ux
|
|
53
|
+
"@sap-ux-private/control-property-editor-common": "1.0.0",
|
|
54
|
+
"@sap-ux/ui-components": "3.0.0"
|
|
53
55
|
},
|
|
54
56
|
"engines": {
|
|
55
57
|
"node": ">=22.x"
|
|
@@ -58,10 +60,10 @@
|
|
|
58
60
|
"clean": "rimraf --glob dist coverage *.tsbuildinfo",
|
|
59
61
|
"build": "npm-run-all -l -s clean -p build:compile build:webapp",
|
|
60
62
|
"build:compile": "tsc --noEmit",
|
|
61
|
-
"build:webapp": "node esbuild.
|
|
63
|
+
"build:webapp": "node esbuild.mjs",
|
|
62
64
|
"watch": "npm-run-all -p watch:*",
|
|
63
|
-
"watch:webapp": "node esbuild.
|
|
64
|
-
"test": "jest --maxWorkers=1 --ci --forceExit --detectOpenHandles",
|
|
65
|
+
"watch:webapp": "node esbuild.mjs --watch --minify=false",
|
|
66
|
+
"test": "cross-env NODE_OPTIONS='--experimental-vm-modules' jest --maxWorkers=1 --ci --forceExit --detectOpenHandles",
|
|
65
67
|
"test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand --colors",
|
|
66
68
|
"lint": "eslint",
|
|
67
69
|
"lint:fix": "eslint --fix"
|
package/src/App.tsx
CHANGED
|
@@ -4,14 +4,14 @@ import { useSelector } from 'react-redux';
|
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
5
|
import { UIDialog, UILink, UIToggle } from '@sap-ux/ui-components';
|
|
6
6
|
import type { Scenario } from '@sap-ux-private/control-property-editor-common';
|
|
7
|
-
import { LeftPanel, RightPanel } from './panels';
|
|
8
|
-
import { Toolbar } from './toolbar';
|
|
9
|
-
import { useLocalStorage } from './use-local-storage';
|
|
10
|
-
import type { RootState } from './store';
|
|
11
|
-
import { useAppDispatch } from './store';
|
|
12
|
-
import { changePreviewScale } from './slice';
|
|
13
|
-
import { useWindowSize } from './use-window-size';
|
|
14
|
-
import { DEFAULT_DEVICE_WIDTH, DEVICE_WIDTH_MAP } from './devices';
|
|
7
|
+
import { LeftPanel, RightPanel } from './panels/index.js';
|
|
8
|
+
import { Toolbar } from './toolbar/index.js';
|
|
9
|
+
import { useLocalStorage } from './use-local-storage.js';
|
|
10
|
+
import type { RootState } from './store.js';
|
|
11
|
+
import { useAppDispatch } from './store.js';
|
|
12
|
+
import { changePreviewScale } from './slice.js';
|
|
13
|
+
import { useWindowSize } from './use-window-size.js';
|
|
14
|
+
import { DEFAULT_DEVICE_WIDTH, DEVICE_WIDTH_MAP } from './devices.js';
|
|
15
15
|
|
|
16
16
|
import './App.scss';
|
|
17
17
|
import './Workarounds.scss';
|
package/src/actions.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { UIIcon } from '@sap-ux/ui-components';
|
|
|
2
2
|
import type { ReactElement } from 'react';
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { useTranslation } from 'react-i18next';
|
|
5
|
-
import { IconName } from '../../src/icons';
|
|
5
|
+
import { IconName } from '../../src/icons.js';
|
|
6
6
|
|
|
7
7
|
interface ChangeIndicatorProps {
|
|
8
8
|
saved: number;
|
|
@@ -5,9 +5,9 @@ import { useId } from '@fluentui/react-hooks';
|
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
|
|
7
7
|
import './ThemeSelectorCallout.scss';
|
|
8
|
-
import { IconName } from '../icons';
|
|
9
|
-
import { useTheme } from '../use-theme';
|
|
10
|
-
import type { ThemeName } from '../use-theme';
|
|
8
|
+
import { IconName } from '../icons.js';
|
|
9
|
+
import { useTheme } from '../use-theme.js';
|
|
10
|
+
import type { ThemeName } from '../use-theme.js';
|
|
11
11
|
|
|
12
12
|
/**
|
|
13
13
|
* React element for theme selector.
|
package/src/components/index.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './Separator';
|
|
2
|
-
export * from './ThemeSelectorCallout';
|
|
3
|
-
export * from './AppLogo';
|
|
1
|
+
export * from './Separator.js';
|
|
2
|
+
export * from './ThemeSelectorCallout.js';
|
|
3
|
+
export * from './AppLogo.js';
|
package/src/i18n.ts
CHANGED
package/src/index.tsx
CHANGED
|
@@ -5,13 +5,13 @@ import { Provider } from 'react-redux';
|
|
|
5
5
|
import { initIcons, initTheme } from '@sap-ux/ui-components';
|
|
6
6
|
import type { Scenario } from '@sap-ux-private/control-property-editor-common';
|
|
7
7
|
import { enableTelemetry } from '@sap-ux-private/control-property-editor-common';
|
|
8
|
-
import { initI18n } from './i18n';
|
|
8
|
+
import { initI18n } from './i18n.js';
|
|
9
9
|
|
|
10
10
|
import './index.css';
|
|
11
|
-
import App from './App';
|
|
12
|
-
import { store } from './store';
|
|
13
|
-
import { registerAppIcons } from './icons';
|
|
14
|
-
import { initializeLivereload, setProjectScenario, setFeatureToggles } from './slice';
|
|
11
|
+
import App from './App.js';
|
|
12
|
+
import { store } from './store.js';
|
|
13
|
+
import { registerAppIcons } from './icons.js';
|
|
14
|
+
import { initializeLivereload, setProjectScenario, setFeatureToggles } from './slice.js';
|
|
15
15
|
|
|
16
16
|
export interface StartOptions {
|
|
17
17
|
previewUrl: string;
|
package/src/middleware.ts
CHANGED
|
@@ -20,8 +20,8 @@ import {
|
|
|
20
20
|
executeContextMenuAction
|
|
21
21
|
} from '@sap-ux-private/control-property-editor-common';
|
|
22
22
|
|
|
23
|
-
import type reducer from './slice';
|
|
24
|
-
import { changeProperty } from './slice';
|
|
23
|
+
import type reducer from './slice.js';
|
|
24
|
+
import { changeProperty } from './slice.js';
|
|
25
25
|
|
|
26
26
|
type Action = ReturnType<typeof changeProperty>;
|
|
27
27
|
|
package/src/panels/LeftPanel.tsx
CHANGED
|
@@ -3,8 +3,8 @@ import React from 'react';
|
|
|
3
3
|
|
|
4
4
|
import { UISectionLayout, UISections, UISplitterLayoutType, UISplitterType } from '@sap-ux/ui-components';
|
|
5
5
|
|
|
6
|
-
import { ChangesPanel } from './changes';
|
|
7
|
-
import { OutlinePanel } from './outline';
|
|
6
|
+
import { ChangesPanel } from './changes/index.js';
|
|
7
|
+
import { OutlinePanel } from './outline/index.js';
|
|
8
8
|
|
|
9
9
|
import './LeftPanel.scss';
|
|
10
10
|
|
|
@@ -5,10 +5,10 @@ import { useSelector } from 'react-redux';
|
|
|
5
5
|
import { UISectionLayout, UISections, UISplitterLayoutType, UISplitterType } from '@sap-ux/ui-components';
|
|
6
6
|
import type { Scenario } from '@sap-ux-private/control-property-editor-common';
|
|
7
7
|
|
|
8
|
-
import { PropertiesList } from './properties';
|
|
9
|
-
import { QuickActionList } from './quick-actions';
|
|
10
|
-
import { InfoCenter } from './info-center';
|
|
11
|
-
import type { RootState } from '../store';
|
|
8
|
+
import { PropertiesList } from './properties/index.js';
|
|
9
|
+
import { QuickActionList } from './quick-actions/index.js';
|
|
10
|
+
import { InfoCenter } from './info-center/index.js';
|
|
11
|
+
import type { RootState } from '../store.js';
|
|
12
12
|
import './RightPanel.scss';
|
|
13
13
|
|
|
14
14
|
/**
|
|
@@ -17,19 +17,19 @@ import {
|
|
|
17
17
|
GENERIC_CHANGE_KIND
|
|
18
18
|
} from '@sap-ux-private/control-property-editor-common';
|
|
19
19
|
|
|
20
|
-
import { Separator } from '../../components';
|
|
21
|
-
import type { UnknownChangeProps } from './UnknownChange';
|
|
22
|
-
import { UnknownChange } from './UnknownChange';
|
|
20
|
+
import { Separator } from '../../components/index.js';
|
|
21
|
+
import type { UnknownChangeProps } from './UnknownChange.js';
|
|
22
|
+
import { UnknownChange } from './UnknownChange.js';
|
|
23
23
|
|
|
24
24
|
import styles from './ChangeStack.module.scss';
|
|
25
25
|
import { useSelector } from 'react-redux';
|
|
26
|
-
import type { FilterOptions } from '../../slice';
|
|
27
|
-
import { FilterName } from '../../slice';
|
|
28
|
-
import type { RootState } from '../../store';
|
|
29
|
-
import { getFormattedDateAndTime } from './utils';
|
|
30
|
-
import type { ControlItemProps } from './ControlChange';
|
|
31
|
-
import { ControlChange } from './ControlChange';
|
|
32
|
-
import { GenericGroup, type GenericGroupProps } from './GenericGroup';
|
|
26
|
+
import type { FilterOptions } from '../../slice.js';
|
|
27
|
+
import { FilterName } from '../../slice.js';
|
|
28
|
+
import type { RootState } from '../../store.js';
|
|
29
|
+
import { getFormattedDateAndTime } from './utils.js';
|
|
30
|
+
import type { ControlItemProps } from './ControlChange.js';
|
|
31
|
+
import { ControlChange } from './ControlChange.js';
|
|
32
|
+
import { GenericGroup, type GenericGroupProps } from './GenericGroup.js';
|
|
33
33
|
|
|
34
34
|
export interface ChangeStackProps {
|
|
35
35
|
changes: Change[];
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
|
|
4
4
|
import { Text } from '@fluentui/react';
|
|
5
5
|
|
|
6
|
-
import { sectionHeaderFontSize } from '../properties/constants';
|
|
6
|
+
import { sectionHeaderFontSize } from '../properties/constants.js';
|
|
7
7
|
|
|
8
8
|
export interface ChangeStackHeaderProps {
|
|
9
9
|
backgroundColor: string;
|
|
@@ -7,18 +7,18 @@ import { useDispatch, useSelector } from 'react-redux';
|
|
|
7
7
|
import { Icon } from '@fluentui/react';
|
|
8
8
|
import { UISearchBox } from '@sap-ux/ui-components';
|
|
9
9
|
|
|
10
|
-
import type { ChangesSlice } from '../../slice';
|
|
11
|
-
import { FilterName, filterNodes } from '../../slice';
|
|
12
|
-
import type { RootState } from '../../store';
|
|
10
|
+
import type { ChangesSlice } from '../../slice.js';
|
|
11
|
+
import { FilterName, filterNodes } from '../../slice.js';
|
|
12
|
+
import type { RootState } from '../../store.js';
|
|
13
13
|
|
|
14
|
-
import { Separator } from '../../components';
|
|
15
|
-
import { ChangeStack } from './ChangeStack';
|
|
16
|
-
import { ChangeStackHeader } from './ChangeStackHeader';
|
|
14
|
+
import { Separator } from '../../components/index.js';
|
|
15
|
+
import { ChangeStack } from './ChangeStack.js';
|
|
16
|
+
import { ChangeStackHeader } from './ChangeStackHeader.js';
|
|
17
17
|
|
|
18
18
|
import styles from './ChangesPanel.module.scss';
|
|
19
|
-
import { FileChange } from './FileChange';
|
|
20
|
-
import { defaultFontSize } from '../properties/constants';
|
|
21
|
-
import { NoChangesFound } from './NoChangesFound';
|
|
19
|
+
import { FileChange } from './FileChange.js';
|
|
20
|
+
import { defaultFontSize } from '../properties/constants.js';
|
|
21
|
+
import { NoChangesFound } from './NoChangesFound.js';
|
|
22
22
|
|
|
23
23
|
const SEPARATOR_STYLE = {
|
|
24
24
|
margin: '0 15px'
|
|
@@ -15,7 +15,7 @@ import {
|
|
|
15
15
|
deletePropertyChanges,
|
|
16
16
|
selectControl
|
|
17
17
|
} from '@sap-ux-private/control-property-editor-common';
|
|
18
|
-
import { getFormattedDateAndTime } from './utils';
|
|
18
|
+
import { getFormattedDateAndTime } from './utils.js';
|
|
19
19
|
|
|
20
20
|
export interface ControlItemProps {
|
|
21
21
|
fileName: string;
|
|
@@ -3,9 +3,9 @@ import React from 'react';
|
|
|
3
3
|
|
|
4
4
|
import { UIIcon } from '@sap-ux/ui-components';
|
|
5
5
|
|
|
6
|
-
import { IconName } from '../../icons';
|
|
6
|
+
import { IconName } from '../../icons.js';
|
|
7
7
|
|
|
8
|
-
import { getValueIcon } from './utils';
|
|
8
|
+
import { getValueIcon } from './utils.js';
|
|
9
9
|
import styles from './DisplayAsIcon.module.scss';
|
|
10
10
|
import { convertCamelCaseToPascalCase } from '@sap-ux-private/control-property-editor-common';
|
|
11
11
|
|
|
@@ -15,9 +15,9 @@ import {
|
|
|
15
15
|
PENDING_CHANGE_TYPE,
|
|
16
16
|
SAVED_CHANGE_TYPE
|
|
17
17
|
} from '@sap-ux-private/control-property-editor-common';
|
|
18
|
-
import { getFormattedDateAndTime } from './utils';
|
|
19
|
-
import GenericProperty from './GenericProperty';
|
|
20
|
-
import { DisplayAsIcon } from './DisplayAsIcon';
|
|
18
|
+
import { getFormattedDateAndTime } from './utils.js';
|
|
19
|
+
import GenericProperty from './GenericProperty.js';
|
|
20
|
+
import { DisplayAsIcon } from './DisplayAsIcon.js';
|
|
21
21
|
|
|
22
22
|
export interface GenericChangeProps {
|
|
23
23
|
/**
|
|
@@ -10,7 +10,7 @@ import type {
|
|
|
10
10
|
import { SAVED_CHANGE_TYPE, selectControl } from '@sap-ux-private/control-property-editor-common';
|
|
11
11
|
|
|
12
12
|
import styles from './GenericGroup.module.scss';
|
|
13
|
-
import { GenericChange } from './GenericChange';
|
|
13
|
+
import { GenericChange } from './GenericChange.js';
|
|
14
14
|
import { useDispatch } from 'react-redux';
|
|
15
15
|
|
|
16
16
|
export interface GenericGroupProps {
|
|
@@ -7,7 +7,7 @@ import styles from './UnknownChange.module.scss';
|
|
|
7
7
|
import { UIIconButton, UiIcons, UIDialog } from '@sap-ux/ui-components';
|
|
8
8
|
import type { PropertyChangeDeletionDetails } from '@sap-ux-private/control-property-editor-common';
|
|
9
9
|
import { convertCamelCaseToPascalCase, deletePropertyChanges } from '@sap-ux-private/control-property-editor-common';
|
|
10
|
-
import { getFormattedDateAndTime } from './utils';
|
|
10
|
+
import { getFormattedDateAndTime } from './utils.js';
|
|
11
11
|
|
|
12
12
|
export interface UnknownChangeProps {
|
|
13
13
|
fileName: string;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ChangesPanel } from './ChangesPanel';
|
|
2
|
-
export { FileChange } from './FileChange';
|
|
1
|
+
export { ChangesPanel } from './ChangesPanel.js';
|
|
2
|
+
export { FileChange } from './FileChange.js';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { IconName } from '../../icons';
|
|
1
|
+
import { IconName } from '../../icons.js';
|
|
2
2
|
|
|
3
3
|
const localeTimeOptions: Intl.DateTimeFormatOptions = { hour: '2-digit', minute: '2-digit', hour12: false };
|
|
4
4
|
const localeDateOptions: Intl.DateTimeFormatOptions = { day: '2-digit', month: '2-digit', year: '2-digit' };
|
package/src/panels/index.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { LeftPanel } from './LeftPanel';
|
|
2
|
-
export { RightPanel } from './RightPanel';
|
|
1
|
+
export { LeftPanel } from './LeftPanel.js';
|
|
2
|
+
export { RightPanel } from './RightPanel.js';
|
|
@@ -3,11 +3,11 @@ import React, { useEffect } from 'react';
|
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { Label, Stack } from '@fluentui/react';
|
|
5
5
|
import { useDispatch, useSelector } from 'react-redux';
|
|
6
|
-
import type { InfoCenterItem } from '../../slice';
|
|
7
|
-
import { clearAllInfoCenterMessages, expandableMessage } from '../../slice';
|
|
6
|
+
import type { InfoCenterItem } from '../../slice.js';
|
|
7
|
+
import { clearAllInfoCenterMessages, expandableMessage } from '../../slice.js';
|
|
8
8
|
import { UIIconButton, UiIcons } from '@sap-ux/ui-components';
|
|
9
|
-
import type { RootState } from '../../store';
|
|
10
|
-
import { InfoMessageItem } from './InfoMessageItem';
|
|
9
|
+
import type { RootState } from '../../store.js';
|
|
10
|
+
import { InfoMessageItem } from './InfoMessageItem.js';
|
|
11
11
|
import './InfoCenter.scss';
|
|
12
12
|
|
|
13
13
|
/**
|
|
@@ -3,9 +3,9 @@ import type { ReactElement } from 'react';
|
|
|
3
3
|
import { Stack, Text } from '@fluentui/react';
|
|
4
4
|
import { UIMessageBar, UIDialog, UITextInput, UIIconButton, UiIcons } from '@sap-ux/ui-components';
|
|
5
5
|
import { useDispatch } from 'react-redux';
|
|
6
|
-
import type { InfoCenterItem } from '../../slice';
|
|
6
|
+
import type { InfoCenterItem } from '../../slice.js';
|
|
7
7
|
import { MessageBarType } from '@sap-ux-private/control-property-editor-common';
|
|
8
|
-
import { clearInfoCenterMessage } from '../../slice';
|
|
8
|
+
import { clearInfoCenterMessage } from '../../slice.js';
|
|
9
9
|
import { useTranslation } from 'react-i18next';
|
|
10
10
|
import './InfoMessageItem.scss';
|
|
11
11
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export { InfoCenter } from './InfoCenter';
|
|
1
|
+
export { InfoCenter } from './InfoCenter.js';
|
|
@@ -3,10 +3,10 @@ import React, { useState } from 'react';
|
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { UICheckbox, UIIconButton, UICallout, UICalloutContentPadding } from '@sap-ux/ui-components';
|
|
5
5
|
import { useDispatch, useSelector } from 'react-redux';
|
|
6
|
-
import { IconName } from '../../icons';
|
|
7
|
-
import type { FilterOptions } from '../../slice';
|
|
8
|
-
import { FilterName, filterNodes } from '../../slice';
|
|
9
|
-
import type { RootState } from '../../store';
|
|
6
|
+
import { IconName } from '../../icons.js';
|
|
7
|
+
import type { FilterOptions } from '../../slice.js';
|
|
8
|
+
import { FilterName, filterNodes } from '../../slice.js';
|
|
9
|
+
import type { RootState } from '../../store.js';
|
|
10
10
|
|
|
11
11
|
const TARGET = 'control-property-editor-funnel-callout-target-id';
|
|
12
12
|
|
|
@@ -3,11 +3,11 @@ import React from 'react';
|
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { useDispatch } from 'react-redux';
|
|
5
5
|
import { UISearchBox } from '@sap-ux/ui-components';
|
|
6
|
-
import { FilterName, filterNodes } from '../../slice';
|
|
6
|
+
import { FilterName, filterNodes } from '../../slice.js';
|
|
7
7
|
import './OutlinePanel.scss';
|
|
8
8
|
|
|
9
|
-
import { Tree } from './Tree';
|
|
10
|
-
import { Funnel } from './Funnel';
|
|
9
|
+
import { Tree } from './Tree.js';
|
|
10
|
+
import { Funnel } from './Funnel.js';
|
|
11
11
|
|
|
12
12
|
const OutlinePanel = (): ReactElement => {
|
|
13
13
|
const dispatch = useDispatch();
|
|
@@ -22,12 +22,12 @@ import {
|
|
|
22
22
|
} from '@sap-ux-private/control-property-editor-common';
|
|
23
23
|
import type { ContextMenu, Control, OutlineNode } from '@sap-ux-private/control-property-editor-common';
|
|
24
24
|
|
|
25
|
-
import type { RootState } from '../../store';
|
|
26
|
-
import type { ControlChanges, FilterOptions } from '../../slice';
|
|
27
|
-
import { FilterName } from '../../slice';
|
|
28
|
-
import { NoControlFound } from './NoControlFound';
|
|
29
|
-
import { adaptExpandCollapsed, getFilteredModel, isSame } from './utils';
|
|
30
|
-
import { ChangeIndicator } from '../../components/ChangeIndicator';
|
|
25
|
+
import type { RootState } from '../../store.js';
|
|
26
|
+
import type { ControlChanges, FilterOptions } from '../../slice.js';
|
|
27
|
+
import { FilterName } from '../../slice.js';
|
|
28
|
+
import { NoControlFound } from './NoControlFound.js';
|
|
29
|
+
import { adaptExpandCollapsed, getFilteredModel, isSame } from './utils.js';
|
|
30
|
+
import { ChangeIndicator } from '../../components/ChangeIndicator.js';
|
|
31
31
|
|
|
32
32
|
interface OutlineNodeItem extends OutlineNode {
|
|
33
33
|
level: number;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './OutlinePanel';
|
|
1
|
+
export * from './OutlinePanel.js';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { OutlineNode } from '@sap-ux-private/control-property-editor-common';
|
|
2
|
-
import type { FilterOptions } from '../../slice';
|
|
3
|
-
import { FilterName } from '../../slice';
|
|
2
|
+
import type { FilterOptions } from '../../slice.js';
|
|
3
|
+
import { FilterName } from '../../slice.js';
|
|
4
4
|
import type { IGroup } from '@fluentui/react';
|
|
5
5
|
|
|
6
6
|
const commonVisibleControls = new Set([
|
|
@@ -3,7 +3,7 @@ import React from 'react';
|
|
|
3
3
|
import { Icon } from '@fluentui/react';
|
|
4
4
|
import { UICallout, UICalloutContentPadding, UiIcons } from '@sap-ux/ui-components';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
|
-
import { defaultFontSize } from './constants';
|
|
6
|
+
import { defaultFontSize } from './constants.js';
|
|
7
7
|
|
|
8
8
|
export interface ClipboardProps {
|
|
9
9
|
label: string;
|
|
@@ -10,11 +10,11 @@ import type {
|
|
|
10
10
|
PropertyType,
|
|
11
11
|
StringControlPropertyWithOptions
|
|
12
12
|
} from '@sap-ux-private/control-property-editor-common';
|
|
13
|
-
import { changeProperty } from '../../slice';
|
|
13
|
+
import { changeProperty } from '../../slice.js';
|
|
14
14
|
|
|
15
|
-
import { setCachedValue } from './propertyValuesCache';
|
|
16
|
-
import type { PropertyInputProps } from './types';
|
|
17
|
-
import { InputType } from './types';
|
|
15
|
+
import { setCachedValue } from './propertyValuesCache.js';
|
|
16
|
+
import type { PropertyInputProps } from './types.js';
|
|
17
|
+
import { InputType } from './types.js';
|
|
18
18
|
|
|
19
19
|
import './Properties.scss';
|
|
20
20
|
import { debounce, reportTelemetry } from '@sap-ux-private/control-property-editor-common';
|
|
@@ -3,10 +3,10 @@ import React, { useState } from 'react';
|
|
|
3
3
|
import { useTranslation } from 'react-i18next';
|
|
4
4
|
import { UICheckbox, UIIconButton, UICallout, UICalloutContentPadding } from '@sap-ux/ui-components';
|
|
5
5
|
import { useDispatch, useSelector } from 'react-redux';
|
|
6
|
-
import { IconName } from '../../icons';
|
|
7
|
-
import type { FilterOptions } from '../../slice';
|
|
8
|
-
import { FilterName, filterNodes } from '../../slice';
|
|
9
|
-
import type { RootState } from '../../store';
|
|
6
|
+
import { IconName } from '../../icons.js';
|
|
7
|
+
import type { FilterOptions } from '../../slice.js';
|
|
8
|
+
import { FilterName, filterNodes } from '../../slice.js';
|
|
9
|
+
import type { RootState } from '../../store.js';
|
|
10
10
|
import './Properties.scss';
|
|
11
11
|
|
|
12
12
|
const TARGET = 'control-property-editor-property-search-funnel-callout-target-id';
|
|
@@ -5,10 +5,10 @@ import { TextField, Label, Stack } from '@fluentui/react';
|
|
|
5
5
|
import { UIIconButton, UiIcons, UITooltip, UITooltipUtils, UIDirectionalHint } from '@sap-ux/ui-components';
|
|
6
6
|
|
|
7
7
|
import './Properties.scss';
|
|
8
|
-
import { defaultFontSize, sectionHeaderFontSize } from './constants';
|
|
9
|
-
import { PropertyDocumentation } from './PropertyDocumentation';
|
|
8
|
+
import { defaultFontSize, sectionHeaderFontSize } from './constants.js';
|
|
9
|
+
import { PropertyDocumentation } from './PropertyDocumentation.js';
|
|
10
10
|
import type { PropertiesInfo } from '@sap-ux-private/control-property-editor-common';
|
|
11
|
-
import { Clipboard } from './Clipboard';
|
|
11
|
+
import { Clipboard } from './Clipboard.js';
|
|
12
12
|
import { useTranslation } from 'react-i18next';
|
|
13
13
|
|
|
14
14
|
export interface HeaderFieldProps {
|
|
@@ -6,9 +6,9 @@ import { useTranslation } from 'react-i18next';
|
|
|
6
6
|
import type { IconDetails, PropertyType } from '@sap-ux-private/control-property-editor-common';
|
|
7
7
|
|
|
8
8
|
import './SapUiIcon.scss';
|
|
9
|
-
import { changeProperty } from '../../slice';
|
|
10
|
-
import { setCachedValue } from './propertyValuesCache';
|
|
11
|
-
import { InputType } from './types';
|
|
9
|
+
import { changeProperty } from '../../slice.js';
|
|
10
|
+
import { setCachedValue } from './propertyValuesCache.js';
|
|
11
|
+
import { InputType } from './types.js';
|
|
12
12
|
import { useDispatch } from 'react-redux';
|
|
13
13
|
|
|
14
14
|
export interface IconValueHelpProps {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { ReactElement } from 'react';
|
|
2
2
|
import React from 'react';
|
|
3
|
-
import { InputTypeToggle } from './InputTypeToggle';
|
|
4
|
-
import type { InputTypeWrapperProps } from './types';
|
|
3
|
+
import { InputTypeToggle } from './InputTypeToggle.js';
|
|
4
|
+
import type { InputTypeWrapperProps } from './types.js';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Input type selector.
|
|
@@ -3,12 +3,12 @@ import type { ReactElement } from 'react';
|
|
|
3
3
|
import React from 'react';
|
|
4
4
|
import { useDispatch } from 'react-redux';
|
|
5
5
|
import type { ControlProperty, StringControlPropertyWithOptions } from '@sap-ux-private/control-property-editor-common';
|
|
6
|
-
import { changeProperty } from '../../slice';
|
|
7
|
-
import type { CacheValue } from './propertyValuesCache';
|
|
8
|
-
import { getCachedValue } from './propertyValuesCache';
|
|
6
|
+
import { changeProperty } from '../../slice.js';
|
|
7
|
+
import type { CacheValue } from './propertyValuesCache.js';
|
|
8
|
+
import { getCachedValue } from './propertyValuesCache.js';
|
|
9
9
|
import styles from './InputTypeToggle.module.scss';
|
|
10
|
-
import type { InputTypeToggleProps } from './types';
|
|
11
|
-
import { InputType } from './types';
|
|
10
|
+
import type { InputTypeToggleProps } from './types.js';
|
|
11
|
+
import { InputType } from './types.js';
|
|
12
12
|
import { reportTelemetry, STRING_VALUE_TYPE } from '@sap-ux-private/control-property-editor-common';
|
|
13
13
|
|
|
14
14
|
/**
|