-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #58 from tallence/cm11-preparations
2110 upgrade for core-redirects
- Loading branch information
Showing
132 changed files
with
5,757 additions
and
4,270 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 3 additions & 0 deletions
3
apps/studio-client/apps/main/core-redirects-studio-plugin/.eslintrc.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
extends: ["@jangaroo/eslint-config"], | ||
}; |
40 changes: 40 additions & 0 deletions
40
apps/studio-client/apps/main/core-redirects-studio-plugin/jangaroo.config.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
const { jangarooConfig } = require("@jangaroo/core"); | ||
|
||
module.exports = jangarooConfig({ | ||
type: "code", | ||
sencha: { | ||
name: "com.coremedia.blueprint__core-redirects-studio-plugin", | ||
namespace: "com.tallence.core.redirects.studio", | ||
studioPlugins: [ | ||
{ | ||
mainClass: "com.tallence.core.redirects.studio.RedirectManagerStudioPlugin", | ||
name: "Redirect Manager Extension", | ||
}, | ||
], | ||
}, | ||
appManifests: { | ||
en: { | ||
categories: [ | ||
"Content", | ||
], | ||
cmServiceShortcuts: [ | ||
{ | ||
cmKey: "redirect-manager", | ||
cmCategory: "Content", | ||
name: "Redirect manager", | ||
url: "", | ||
cmAdministrative: true, | ||
cmService: { | ||
name: "launchSubAppService", | ||
method: "launchSubApp", | ||
}, | ||
}, | ||
], | ||
}, | ||
}, | ||
command: { | ||
build: { | ||
ignoreTypeErrors: false | ||
}, | ||
}, | ||
}); |
56 changes: 56 additions & 0 deletions
56
apps/studio-client/apps/main/core-redirects-studio-plugin/package.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"name": "@coremedia-blueprint/studio-client.main.core-redirects-studio-plugin", | ||
"author": "Tallence AG", | ||
"version": "1.0.0-SNAPSHOT", | ||
"private": true, | ||
"dependencies": { | ||
"@coremedia-blueprint/studio-client.main.blueprint-forms": "1.0.0-SNAPSHOT", | ||
"@coremedia/studio-client.app-context-models": "2110.1.0", | ||
"@coremedia/studio-client.cap-base-models": "2110.1.0", | ||
"@coremedia/studio-client.cap-rest-client": "2110.1.0", | ||
"@coremedia/studio-client.client-core": "2110.1.0", | ||
"@coremedia/studio-client.client-core-impl": "2110.1.0", | ||
"@coremedia/studio-client.core-icons": "2110.1.0", | ||
"@coremedia/studio-client.ext.base-components": "2110.1.0", | ||
"@coremedia/studio-client.ext.ui-components": "2110.1.0", | ||
"@coremedia/studio-client.main.bpbase-studio-components": "2110.1.0", | ||
"@coremedia/studio-client.main.editor-components": "2110.1.0", | ||
"@coremedia/studio-client.multi-site-models": "2110.1.0", | ||
"@jangaroo/ext-ts": "^1.0.0", | ||
"@jangaroo/jooflash-core": "^1.0.0", | ||
"@jangaroo/runtime": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"@jangaroo/build": "^1.0.0", | ||
"@jangaroo/core": "^1.0.0", | ||
"@jangaroo/eslint-config": "^1.0.0", | ||
"@jangaroo/publish": "^1.0.0", | ||
"eslint": "^7.27.0", | ||
"rimraf": "^3.0.2" | ||
}, | ||
"scripts": { | ||
"clean": "rimraf ./dist && rimraf ./build", | ||
"build": "jangaroo build", | ||
"watch": "jangaroo watch", | ||
"publish": "jangaroo publish", | ||
"lint": "eslint --fix \"src/**/*.ts\"" | ||
}, | ||
"exports": { | ||
"./*": { | ||
"types": "./src/*.ts", | ||
"default": "./dist/src/*.js" | ||
} | ||
}, | ||
"coremedia": { | ||
"projectExtensionFor": "studio-client.main-static" | ||
}, | ||
"publishConfig": { | ||
"directory": "dist", | ||
"exports": { | ||
"./*": { | ||
"types": "./src/*.d.ts", | ||
"default": "./src/*.js" | ||
} | ||
} | ||
} | ||
} |
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
102 changes: 102 additions & 0 deletions
102
apps/studio-client/apps/main/core-redirects-studio-plugin/src/RedirectManagerStudioPlugin.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,102 @@ | ||
/* | ||
* Copyright 2019 Tallence AG | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import ContentTypes_properties from "@coremedia/studio-client.cap-base-models/content/ContentTypes_properties"; | ||
import StudioAppsImpl from "@coremedia/studio-client.app-context-models/apps/StudioAppsImpl"; | ||
import studioApps from "@coremedia/studio-client.app-context-models/apps/studioApps"; | ||
import CopyResourceBundleProperties | ||
from "@coremedia/studio-client.main.editor-components/configuration/CopyResourceBundleProperties"; | ||
import RegisterRestResource from "@coremedia/studio-client.main.editor-components/configuration/RegisterRestResource"; | ||
import AddTabbedDocumentFormsPlugin | ||
from "@coremedia/studio-client.main.editor-components/sdk/plugins/AddTabbedDocumentFormsPlugin"; | ||
import TabbedDocumentFormDispatcher | ||
from "@coremedia/studio-client.main.editor-components/sdk/premular/TabbedDocumentFormDispatcher"; | ||
import Config from "@jangaroo/runtime/Config"; | ||
import ConfigUtils from "@jangaroo/runtime/ConfigUtils"; | ||
import resourceManager from "@jangaroo/runtime/l10n/resourceManager"; | ||
import RedirectManagerStudioPluginBase from "./RedirectManagerStudioPluginBase"; | ||
import RedirectContentTypes_properties from "./bundles/RedirectContentTypes_properties"; | ||
import RedirectImpl from "./data/RedirectImpl"; | ||
import RedirectsImpl from "./data/RedirectsImpl"; | ||
import RedirectForm from "./studioform/RedirectForm"; | ||
import IEditorContext from "@coremedia/studio-client.main.editor-components/sdk/IEditorContext"; | ||
import {cast} from "@jangaroo/runtime"; | ||
import OpenRedirectManagerEditorAction from "./action/OpenRedirectManagerEditorAction"; | ||
import WorkArea from "@coremedia/studio-client.main.editor-components/sdk/desktop/WorkArea"; | ||
import WorkAreaTabTypesPlugin | ||
from "@coremedia/studio-client.main.editor-components/sdk/desktop/WorkAreaTabTypesPlugin"; | ||
import ComponentBasedWorkAreaTabType | ||
from "@coremedia/studio-client.main.editor-components/sdk/desktop/ComponentBasedWorkAreaTabType"; | ||
import RedirectManagerEditor from "./editor/RedirectManagerEditor"; | ||
|
||
interface RedirectManagerStudioPluginConfig extends Config<RedirectManagerStudioPluginBase> { | ||
} | ||
|
||
class RedirectManagerStudioPlugin extends RedirectManagerStudioPluginBase { | ||
declare Config: RedirectManagerStudioPluginConfig; | ||
|
||
override init(editorContext: IEditorContext): void { | ||
super.init(editorContext); | ||
|
||
cast(StudioAppsImpl, studioApps._).getSubAppLauncherRegistry().registerSubAppLauncher("redirect-manager", (): void => { | ||
const openTagsAction = new OpenRedirectManagerEditorAction(); | ||
openTagsAction.execute(); | ||
}); | ||
} | ||
|
||
constructor(config: Config<RedirectManagerStudioPlugin> = null) { | ||
super(ConfigUtils.apply(Config(RedirectManagerStudioPlugin, { | ||
|
||
rules: [ | ||
|
||
Config(TabbedDocumentFormDispatcher, { | ||
plugins: [ | ||
Config(AddTabbedDocumentFormsPlugin, { | ||
documentTabPanels: [ | ||
Config(RedirectForm, { itemId: "Redirect" }), | ||
], | ||
}), | ||
], | ||
}), | ||
|
||
Config(WorkArea, { | ||
plugins: [ | ||
Config(WorkAreaTabTypesPlugin, { | ||
tabTypes: [ | ||
new ComponentBasedWorkAreaTabType({ tabComponent: Config(RedirectManagerEditor, { closable: true }) }), | ||
], | ||
}), | ||
], | ||
}), | ||
|
||
], | ||
|
||
configuration: [ | ||
|
||
new RegisterRestResource({ beanClass: RedirectsImpl }), | ||
new RegisterRestResource({ beanClass: RedirectImpl }), | ||
|
||
new CopyResourceBundleProperties({ | ||
destination: resourceManager.getResourceBundle(null, ContentTypes_properties), | ||
source: resourceManager.getResourceBundle(null, RedirectContentTypes_properties), | ||
}), | ||
|
||
], | ||
|
||
}), config)); | ||
} | ||
} | ||
|
||
export default RedirectManagerStudioPlugin; |
43 changes: 43 additions & 0 deletions
43
...udio-client/apps/main/core-redirects-studio-plugin/src/RedirectManagerStudioPluginBase.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
/* | ||
* Copyright 2019 Tallence AG | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import BeanClassRegistry from "@coremedia/studio-client.client-core-impl/data/impl/BeanClassRegistry"; | ||
import StudioPlugin from "@coremedia/studio-client.main.editor-components/configuration/StudioPlugin"; | ||
import IEditorContext from "@coremedia/studio-client.main.editor-components/sdk/IEditorContext"; | ||
import Config from "@jangaroo/runtime/Config"; | ||
import RedirectManagerStudioPlugin from "./RedirectManagerStudioPlugin"; | ||
import RedirectSourceParameter from "./data/RedirectSourceParameter"; | ||
import RedirectTargetParameter from "./data/RedirectTargetParameter"; | ||
|
||
interface RedirectManagerStudioPluginBaseConfig extends Config<StudioPlugin> { | ||
} | ||
|
||
class RedirectManagerStudioPluginBase extends StudioPlugin { | ||
declare Config: RedirectManagerStudioPluginBaseConfig; | ||
|
||
constructor(config: Config<RedirectManagerStudioPlugin> = null) { | ||
super(config); | ||
} | ||
|
||
override init(editorContext: IEditorContext): void { | ||
super.init(editorContext); | ||
|
||
BeanClassRegistry.registerTypeImplementation("com.tallence.core.redirects.studio.data.RedirectSourceParameter", RedirectSourceParameter); | ||
BeanClassRegistry.registerTypeImplementation("com.tallence.core.redirects.studio.data.RedirectTargetParameter", RedirectTargetParameter); | ||
} | ||
} | ||
|
||
export default RedirectManagerStudioPluginBase; |
31 changes: 31 additions & 0 deletions
31
...ient/apps/main/core-redirects-studio-plugin/src/action/OpenRedirectManagerEditorAction.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright 2019 Tallence AG | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import Config from "@jangaroo/runtime/Config"; | ||
import ConfigUtils from "@jangaroo/runtime/ConfigUtils"; | ||
import OpenRedirectManagerEditorActionBase from "./OpenRedirectManagerEditorActionBase"; | ||
|
||
interface OpenRedirectManagerEditorActionConfig extends Config<OpenRedirectManagerEditorActionBase> { | ||
} | ||
|
||
class OpenRedirectManagerEditorAction extends OpenRedirectManagerEditorActionBase { | ||
declare Config: OpenRedirectManagerEditorActionConfig; | ||
|
||
constructor(config: Config<OpenRedirectManagerEditorAction> = null) { | ||
super(ConfigUtils.apply(Config(OpenRedirectManagerEditorAction), config)); | ||
} | ||
} | ||
|
||
export default OpenRedirectManagerEditorAction; |
54 changes: 54 additions & 0 deletions
54
.../apps/main/core-redirects-studio-plugin/src/action/OpenRedirectManagerEditorActionBase.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* Copyright 2019 Tallence AG | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
|
||
import WorkArea from "@coremedia/studio-client.main.editor-components/sdk/desktop/WorkArea"; | ||
import editorContext from "@coremedia/studio-client.main.editor-components/sdk/editorContext"; | ||
import Action from "@jangaroo/ext-ts/Action"; | ||
import Panel from "@jangaroo/ext-ts/panel/Panel"; | ||
import { as } from "@jangaroo/runtime"; | ||
import Config from "@jangaroo/runtime/Config"; | ||
import RedirectManagerEditor from "../editor/RedirectManagerEditor"; | ||
import RedirectManagerEditorBase from "../editor/RedirectManagerEditorBase"; | ||
import OpenRedirectManagerEditorAction from "./OpenRedirectManagerEditorAction"; | ||
|
||
interface OpenRedirectManagerEditorActionBaseConfig extends Config<Action> { | ||
} | ||
|
||
class OpenRedirectManagerEditorActionBase extends Action { | ||
declare Config: OpenRedirectManagerEditorActionBaseConfig; | ||
|
||
constructor(config: Config<OpenRedirectManagerEditorAction> = null) { | ||
config.handler = OpenRedirectManagerEditorActionBase.openRedirectAdmin; | ||
super(config); | ||
} | ||
|
||
static openRedirectAdmin(): void { | ||
const workArea = as(editorContext._.getWorkArea(), WorkArea); | ||
let redirectManagerTab = RedirectManagerEditorBase.getInstance(); | ||
|
||
if (!redirectManagerTab) { | ||
const workAreaTabType = workArea.getTabTypeById(RedirectManagerEditor.xtype); | ||
workAreaTabType.createTab(null, (tab: Panel): void => { | ||
redirectManagerTab = as(tab, RedirectManagerEditor); | ||
workArea.addTab(workAreaTabType, redirectManagerTab); | ||
}); | ||
} | ||
|
||
workArea.setActiveTab(redirectManagerTab); | ||
} | ||
} | ||
|
||
export default OpenRedirectManagerEditorActionBase; |
30 changes: 30 additions & 0 deletions
30
.../apps/main/core-redirects-studio-plugin/src/bundles/RedirectContentTypes_de_properties.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
/* | ||
* Copyright 2019 Tallence AG | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
import ResourceBundleUtil from "@jangaroo/runtime/l10n/ResourceBundleUtil"; | ||
import RedirectContentTypes_properties from "./RedirectContentTypes_properties"; | ||
|
||
/** | ||
* Overrides of ResourceBundle "RedirectContentTypes" for Locale "de". | ||
* @see RedirectContentTypes_properties#INSTANCE | ||
*/ | ||
ResourceBundleUtil.override(RedirectContentTypes_properties, { | ||
Redirect_redirectType_text: "Typ", | ||
Redirect_edit_hint_text: "Die Umleitung kann in diesem Formular nicht editiert werden. Bitte nutzen Sie dafür den Redirect-Manager:", | ||
Redirect_sourceUrlType_text: "Url Typ", | ||
Redirect_source_text: "Quelle", | ||
Redirect_targetLink_text: "Ziel", | ||
Redirect_description_text: "Beschreibung", | ||
}); |
Oops, something went wrong.