├── sites ├── .npmrc ├── test │ ├── themes │ │ └── CompTheme │ │ │ ├── components.json │ │ │ ├── META-INF │ │ │ └── MANIFEST.MF │ │ │ ├── _folder.json │ │ │ ├── _folder_icon.png │ │ │ ├── designs │ │ │ └── default │ │ │ │ ├── twitter.png │ │ │ │ ├── x-close.png │ │ │ │ ├── youtube.png │ │ │ │ ├── facebook.png │ │ │ │ ├── linkedin.png │ │ │ │ ├── googleplus.png │ │ │ │ └── cobrowseLaunch.png │ │ │ ├── assets │ │ │ ├── css │ │ │ │ └── main.css │ │ │ └── js │ │ │ │ └── topnav.js │ │ │ ├── responsepages │ │ │ └── 404.html │ │ │ └── viewport.json │ ├── job-manager │ │ ├── compileExec.sh │ │ └── jobQueue.js │ ├── public │ │ ├── images │ │ │ ├── empty.png │ │ │ ├── local.png │ │ │ ├── remote.png │ │ │ ├── vbcs.png │ │ │ ├── CECS_w_72.png │ │ │ ├── component.png │ │ │ ├── components.png │ │ │ ├── contentform.png │ │ │ ├── fieldeditor.png │ │ │ ├── nocontent.png │ │ │ ├── rsstemplate.png │ │ │ ├── sandboxed.png │ │ │ ├── templates.png │ │ │ ├── translation.png │ │ │ ├── unittests.png │ │ │ ├── contentlayout.png │ │ │ ├── sectionlayout.png │ │ │ ├── componentgroup.png │ │ │ ├── tile-texture-bg.png │ │ │ ├── templatecomponent.png │ │ │ ├── translationeditor.png │ │ │ └── translationconnections.png │ │ ├── js │ │ │ ├── sites.data.js │ │ │ └── sites.mock.js │ │ ├── require.config.js │ │ └── comp.html │ ├── data │ │ └── siteCompileTestTemplate.zip │ ├── sitescloud │ │ └── renderer │ │ │ └── app │ │ │ └── sdk │ │ │ ├── images │ │ │ └── sample-image.png │ │ │ └── js │ │ │ └── sites.mock.min.js │ ├── sites │ │ └── CompSite │ │ │ ├── fieldeditorrender.html │ │ │ ├── nosettings.html │ │ │ ├── pages │ │ │ ├── 200.json │ │ │ ├── 1.json │ │ │ ├── 100.json │ │ │ └── 400.json │ │ │ ├── structure.json │ │ │ └── controller.html │ ├── unit │ │ ├── test-main.js │ │ ├── index.html │ │ └── Sample-To-Do-Test.js │ └── server │ │ ├── logger.js │ │ ├── fileUtils.js │ │ ├── featureFlags.js │ │ ├── proxyRouter.js │ │ ├── sitesRouter.js │ │ ├── systemRouter.js │ │ └── appsRouter.js ├── doc │ ├── images │ │ ├── AS-cw1.png │ │ ├── AS-cw2.png │ │ ├── AS-ov.png │ │ ├── comp1.png │ │ ├── comp2.png │ │ ├── IDCS-an.png │ │ ├── IDCS-as.png │ │ ├── IDCS-at.png │ │ ├── IDCS-au.png │ │ ├── IDCS-ca.png │ │ ├── IDCS-cc.png │ │ ├── IDCS-cl.png │ │ ├── IDCS-cs.png │ │ ├── IDCS-ct.png │ │ ├── IDCS-ic.png │ │ ├── IDCS-si.png │ │ ├── IDCS-ss.png │ │ └── T2P-Graphic.jpg │ ├── Copy-Site.md │ ├── IAM-App.md │ └── IDCS-App.md ├── data │ ├── components │ │ ├── Anchor.zip │ │ ├── local.zip │ │ ├── remote.zip │ │ ├── ContentForm.zip │ │ ├── RSSTemplate.zip │ │ ├── SimpleHTML.zip │ │ ├── local-react.zip │ │ ├── MapFieldEditor.zip │ │ ├── Sample-To-Do.zip │ │ ├── contentlayout.zip │ │ ├── local-iframe.zip │ │ ├── local-preact.zip │ │ ├── local-template.zip │ │ ├── sectionlayout.zip │ │ ├── Document-Search.zip │ │ ├── Sample-File-List.zip │ │ ├── TextFieldEditor.zip │ │ ├── JET-CCA-Demo-Card.zip │ │ ├── Sample-Folder-List.zip │ │ ├── SliderFieldEditor.zip │ │ ├── contentlistlayout.zip │ │ ├── Sample-OPA-Interview.zip │ │ ├── TranslationJobEditor.zip │ │ ├── contentlistnoqlayout.zip │ │ ├── Sample-Documents-Manager.zip │ │ ├── Sample-Process-Task-List.zip │ │ ├── Sample-Stocks-Embedded.zip │ │ ├── Sample-Text-With-Image.zip │ │ ├── Sample-Process-Start-Form.zip │ │ ├── Sample-Process-Task-Details.zip │ │ ├── comps.txt │ │ └── settings.html │ ├── templates │ │ ├── BlogTemplate.zip │ │ ├── CafeSupremoLite.zip │ │ ├── StarterTemplate.zip │ │ ├── search_template.zip │ │ ├── KnowledgeTemplate.zip │ │ ├── JETStarterTemplate.zip │ │ ├── VBCSSamplesTemplate.zip │ │ └── _folder.json │ ├── themes │ │ └── __toolkit_theme.zip │ ├── connectors │ │ └── mockTranslationConnector.zip │ ├── config │ │ ├── cec.properties │ │ └── src-package.json │ ├── rss │ │ ├── rssFunc.js │ │ ├── rss.xml │ │ └── rssfunc.xml │ ├── test │ │ ├── setupSpec.js │ │ ├── templates │ │ │ └── templatesSpec.js │ │ └── components │ │ │ └── componentsSpec.js │ └── build │ │ └── src-gulpfile.js ├── bin │ ├── msword │ │ └── cntItmWrdTmplt │ │ │ ├── word │ │ │ ├── media │ │ │ │ └── image1.png │ │ │ ├── webSettings.xml │ │ │ ├── glossary │ │ │ │ ├── webSettings.xml │ │ │ │ ├── _rels │ │ │ │ │ └── document.xml.rels │ │ │ │ ├── fontTable.xml │ │ │ │ └── settings.xml │ │ │ ├── _rels │ │ │ │ └── document.xml.rels │ │ │ ├── fontTable.xml │ │ │ ├── document.xml │ │ │ └── settings.xml │ │ │ ├── oce.xml │ │ │ ├── _rels │ │ │ └── .rels │ │ │ ├── docProps │ │ │ ├── app.xml │ │ │ └── core.xml │ │ │ └── [Content_Types].xml │ ├── compiler │ │ ├── components │ │ │ ├── spacer │ │ │ │ ├── spacer.html │ │ │ │ └── spacer.js │ │ │ ├── divider │ │ │ │ ├── divider.html │ │ │ │ └── divider.js │ │ │ ├── image-text │ │ │ │ ├── image-text.html │ │ │ │ └── image-text.js │ │ │ ├── headline │ │ │ │ ├── headline.html │ │ │ │ └── headline.js │ │ │ ├── article │ │ │ │ ├── article.html │ │ │ │ └── article.js │ │ │ ├── video │ │ │ │ ├── video.html │ │ │ │ └── video.js │ │ │ ├── contentlist │ │ │ │ └── contentlist.html │ │ │ ├── title │ │ │ │ └── title.html │ │ │ ├── gallerygrid │ │ │ │ └── gallerygrid.html │ │ │ ├── component │ │ │ │ └── component.html │ │ │ ├── socialbar │ │ │ │ └── socialbar.html │ │ │ ├── contentsearch │ │ │ │ ├── contentsearch.html │ │ │ │ └── contentsearch.js │ │ │ ├── image │ │ │ │ └── image.html │ │ │ ├── button │ │ │ │ └── button.html │ │ │ ├── contentitem │ │ │ │ ├── system-default-layout.html │ │ │ │ └── contentcompiler.js │ │ │ ├── contentplaceholder │ │ │ │ └── contentplaceholder.js │ │ │ ├── sectionlayout │ │ │ │ ├── vertical │ │ │ │ │ └── compile.js │ │ │ │ └── horizontal │ │ │ │ │ └── compile.js │ │ │ ├── component-compilers.js │ │ │ ├── common │ │ │ │ └── component-constants.js │ │ │ ├── componentgroup │ │ │ │ └── componentgroup.js │ │ │ └── document │ │ │ │ └── document.html │ │ ├── compiler.js │ │ └── api │ │ │ └── ContentComponentAPI.js │ ├── cec │ │ └── package.json │ ├── upgrade.js │ ├── formatter.js │ └── exportserviceutils.js ├── .gitignore ├── config │ └── config.json ├── .eslintrc.json ├── docker-images │ └── compilation-server │ │ ├── run.sh │ │ └── README.MD └── README.md ├── SECURITY.md ├── LICENSE.txt ├── sbom_generation.yaml └── CONTRIBUTING.md /sites/.npmrc: -------------------------------------------------------------------------------- 1 | loglevel=error 2 | -------------------------------------------------------------------------------- /sites/test/themes/CompTheme/components.json: -------------------------------------------------------------------------------- 1 | [ 2 | ] 3 | -------------------------------------------------------------------------------- /sites/test/job-manager/compileExec.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | su - compileagent -c "$@" -------------------------------------------------------------------------------- /sites/doc/images/AS-cw1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/doc/images/AS-cw1.png -------------------------------------------------------------------------------- /sites/doc/images/AS-cw2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/doc/images/AS-cw2.png -------------------------------------------------------------------------------- /sites/doc/images/AS-ov.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/doc/images/AS-ov.png -------------------------------------------------------------------------------- /sites/doc/images/comp1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/doc/images/comp1.png -------------------------------------------------------------------------------- /sites/doc/images/comp2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/doc/images/comp2.png -------------------------------------------------------------------------------- /sites/test/themes/CompTheme/META-INF/MANIFEST.MF: -------------------------------------------------------------------------------- 1 | Manifest-Version: 1.0 2 | Created-By: 1.8.0_25 (Oracle Corporation) 3 | 4 | -------------------------------------------------------------------------------- /sites/test/themes/CompTheme/_folder.json: -------------------------------------------------------------------------------- 1 | {"themeName":"CompTheme","itemGUID":"TB99D65F699B022AC4E11F4D4EE870070A1ADD86AABB"} 2 | -------------------------------------------------------------------------------- /sites/doc/images/IDCS-an.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/doc/images/IDCS-an.png -------------------------------------------------------------------------------- /sites/doc/images/IDCS-as.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/doc/images/IDCS-as.png -------------------------------------------------------------------------------- /sites/doc/images/IDCS-at.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/doc/images/IDCS-at.png -------------------------------------------------------------------------------- /sites/doc/images/IDCS-au.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/doc/images/IDCS-au.png -------------------------------------------------------------------------------- /sites/doc/images/IDCS-ca.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/doc/images/IDCS-ca.png -------------------------------------------------------------------------------- /sites/doc/images/IDCS-cc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/doc/images/IDCS-cc.png -------------------------------------------------------------------------------- /sites/doc/images/IDCS-cl.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/doc/images/IDCS-cl.png -------------------------------------------------------------------------------- /sites/doc/images/IDCS-cs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/doc/images/IDCS-cs.png -------------------------------------------------------------------------------- /sites/doc/images/IDCS-ct.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/doc/images/IDCS-ct.png -------------------------------------------------------------------------------- /sites/doc/images/IDCS-ic.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/doc/images/IDCS-ic.png -------------------------------------------------------------------------------- /sites/doc/images/IDCS-si.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/doc/images/IDCS-si.png -------------------------------------------------------------------------------- /sites/doc/images/IDCS-ss.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/doc/images/IDCS-ss.png -------------------------------------------------------------------------------- /sites/data/components/Anchor.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/Anchor.zip -------------------------------------------------------------------------------- /sites/data/components/local.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/local.zip -------------------------------------------------------------------------------- /sites/data/components/remote.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/remote.zip -------------------------------------------------------------------------------- /sites/doc/images/T2P-Graphic.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/doc/images/T2P-Graphic.jpg -------------------------------------------------------------------------------- /sites/test/public/images/empty.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/empty.png -------------------------------------------------------------------------------- /sites/test/public/images/local.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/local.png -------------------------------------------------------------------------------- /sites/test/public/images/remote.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/remote.png -------------------------------------------------------------------------------- /sites/test/public/images/vbcs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/vbcs.png -------------------------------------------------------------------------------- /sites/data/components/ContentForm.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/ContentForm.zip -------------------------------------------------------------------------------- /sites/data/components/RSSTemplate.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/RSSTemplate.zip -------------------------------------------------------------------------------- /sites/data/components/SimpleHTML.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/SimpleHTML.zip -------------------------------------------------------------------------------- /sites/data/components/local-react.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/local-react.zip -------------------------------------------------------------------------------- /sites/data/templates/BlogTemplate.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/templates/BlogTemplate.zip -------------------------------------------------------------------------------- /sites/data/themes/__toolkit_theme.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/themes/__toolkit_theme.zip -------------------------------------------------------------------------------- /sites/data/components/MapFieldEditor.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/MapFieldEditor.zip -------------------------------------------------------------------------------- /sites/data/components/Sample-To-Do.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/Sample-To-Do.zip -------------------------------------------------------------------------------- /sites/data/components/contentlayout.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/contentlayout.zip -------------------------------------------------------------------------------- /sites/data/components/local-iframe.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/local-iframe.zip -------------------------------------------------------------------------------- /sites/data/components/local-preact.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/local-preact.zip -------------------------------------------------------------------------------- /sites/data/components/local-template.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/local-template.zip -------------------------------------------------------------------------------- /sites/data/components/sectionlayout.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/sectionlayout.zip -------------------------------------------------------------------------------- /sites/data/templates/CafeSupremoLite.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/templates/CafeSupremoLite.zip -------------------------------------------------------------------------------- /sites/data/templates/StarterTemplate.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/templates/StarterTemplate.zip -------------------------------------------------------------------------------- /sites/data/templates/search_template.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/templates/search_template.zip -------------------------------------------------------------------------------- /sites/test/public/images/CECS_w_72.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/CECS_w_72.png -------------------------------------------------------------------------------- /sites/test/public/images/component.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/component.png -------------------------------------------------------------------------------- /sites/test/public/images/components.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/components.png -------------------------------------------------------------------------------- /sites/test/public/images/contentform.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/contentform.png -------------------------------------------------------------------------------- /sites/test/public/images/fieldeditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/fieldeditor.png -------------------------------------------------------------------------------- /sites/test/public/images/nocontent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/nocontent.png -------------------------------------------------------------------------------- /sites/test/public/images/rsstemplate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/rsstemplate.png -------------------------------------------------------------------------------- /sites/test/public/images/sandboxed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/sandboxed.png -------------------------------------------------------------------------------- /sites/test/public/images/templates.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/templates.png -------------------------------------------------------------------------------- /sites/test/public/images/translation.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/translation.png -------------------------------------------------------------------------------- /sites/test/public/images/unittests.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/unittests.png -------------------------------------------------------------------------------- /sites/data/components/Document-Search.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/Document-Search.zip -------------------------------------------------------------------------------- /sites/data/components/Sample-File-List.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/Sample-File-List.zip -------------------------------------------------------------------------------- /sites/data/components/TextFieldEditor.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/TextFieldEditor.zip -------------------------------------------------------------------------------- /sites/data/templates/KnowledgeTemplate.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/templates/KnowledgeTemplate.zip -------------------------------------------------------------------------------- /sites/test/public/images/contentlayout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/contentlayout.png -------------------------------------------------------------------------------- /sites/test/public/images/sectionlayout.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/sectionlayout.png -------------------------------------------------------------------------------- /sites/data/components/JET-CCA-Demo-Card.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/JET-CCA-Demo-Card.zip -------------------------------------------------------------------------------- /sites/data/components/Sample-Folder-List.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/Sample-Folder-List.zip -------------------------------------------------------------------------------- /sites/data/components/SliderFieldEditor.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/SliderFieldEditor.zip -------------------------------------------------------------------------------- /sites/data/components/contentlistlayout.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/contentlistlayout.zip -------------------------------------------------------------------------------- /sites/data/templates/JETStarterTemplate.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/templates/JETStarterTemplate.zip -------------------------------------------------------------------------------- /sites/data/templates/VBCSSamplesTemplate.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/templates/VBCSSamplesTemplate.zip -------------------------------------------------------------------------------- /sites/test/data/siteCompileTestTemplate.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/data/siteCompileTestTemplate.zip -------------------------------------------------------------------------------- /sites/test/public/images/componentgroup.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/componentgroup.png -------------------------------------------------------------------------------- /sites/test/public/images/tile-texture-bg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/tile-texture-bg.png -------------------------------------------------------------------------------- /sites/test/themes/CompTheme/_folder_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/themes/CompTheme/_folder_icon.png -------------------------------------------------------------------------------- /sites/data/components/Sample-OPA-Interview.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/Sample-OPA-Interview.zip -------------------------------------------------------------------------------- /sites/data/components/TranslationJobEditor.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/TranslationJobEditor.zip -------------------------------------------------------------------------------- /sites/data/components/contentlistnoqlayout.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/contentlistnoqlayout.zip -------------------------------------------------------------------------------- /sites/test/public/images/templatecomponent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/templatecomponent.png -------------------------------------------------------------------------------- /sites/test/public/images/translationeditor.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/translationeditor.png -------------------------------------------------------------------------------- /sites/data/components/Sample-Documents-Manager.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/Sample-Documents-Manager.zip -------------------------------------------------------------------------------- /sites/data/components/Sample-Process-Task-List.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/Sample-Process-Task-List.zip -------------------------------------------------------------------------------- /sites/data/components/Sample-Stocks-Embedded.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/Sample-Stocks-Embedded.zip -------------------------------------------------------------------------------- /sites/data/components/Sample-Text-With-Image.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/Sample-Text-With-Image.zip -------------------------------------------------------------------------------- /sites/data/connectors/mockTranslationConnector.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/connectors/mockTranslationConnector.zip -------------------------------------------------------------------------------- /sites/data/components/Sample-Process-Start-Form.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/Sample-Process-Start-Form.zip -------------------------------------------------------------------------------- /sites/test/public/images/translationconnections.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/public/images/translationconnections.png -------------------------------------------------------------------------------- /sites/bin/msword/cntItmWrdTmplt/word/media/image1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/bin/msword/cntItmWrdTmplt/word/media/image1.png -------------------------------------------------------------------------------- /sites/data/components/Sample-Process-Task-Details.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/data/components/Sample-Process-Task-Details.zip -------------------------------------------------------------------------------- /sites/test/themes/CompTheme/designs/default/twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/themes/CompTheme/designs/default/twitter.png -------------------------------------------------------------------------------- /sites/test/themes/CompTheme/designs/default/x-close.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/themes/CompTheme/designs/default/x-close.png -------------------------------------------------------------------------------- /sites/test/themes/CompTheme/designs/default/youtube.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/themes/CompTheme/designs/default/youtube.png -------------------------------------------------------------------------------- /sites/test/themes/CompTheme/designs/default/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/themes/CompTheme/designs/default/facebook.png -------------------------------------------------------------------------------- /sites/test/themes/CompTheme/designs/default/linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/themes/CompTheme/designs/default/linkedin.png -------------------------------------------------------------------------------- /sites/test/themes/CompTheme/designs/default/googleplus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/themes/CompTheme/designs/default/googleplus.png -------------------------------------------------------------------------------- /sites/test/sitescloud/renderer/app/sdk/images/sample-image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/sitescloud/renderer/app/sdk/images/sample-image.png -------------------------------------------------------------------------------- /sites/test/themes/CompTheme/designs/default/cobrowseLaunch.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/oracle/content-and-experience-toolkit/HEAD/sites/test/themes/CompTheme/designs/default/cobrowseLaunch.png -------------------------------------------------------------------------------- /sites/data/templates/_folder.json: -------------------------------------------------------------------------------- 1 | { 2 | "numUpdates": "0", 3 | "siteLongDescription": "", 4 | "itemGUID": "", 5 | "siteName": "", 6 | "isEnterprise": "true", 7 | "slugPrefix": "", 8 | "siteAuthor": "Oracle" 9 | } -------------------------------------------------------------------------------- /sites/bin/msword/cntItmWrdTmplt/oce.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /sites/.gitignore: -------------------------------------------------------------------------------- 1 | ### 2 | # Files/patterns which shouldn't be source-controlled 3 | ### 4 | 5 | /.idea/ 6 | /.gradle/ 7 | /build/ 8 | /node-*/** 9 | /node_modules/** 10 | /src/main/components/Local_* 11 | /npm-debug.log 12 | /src/dist/ 13 | /src/libs/* 14 | /bin/cec/node_modules/** 15 | -------------------------------------------------------------------------------- /sites/test/themes/CompTheme/assets/css/main.css: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. 3 | * Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 4 | */ 5 | #topnav li a { 6 | color: green; 7 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 8 | } 9 | -------------------------------------------------------------------------------- /sites/bin/compiler/components/spacer/spacer.html: -------------------------------------------------------------------------------- 1 | 5 | <{{componentWrapperTag}} {{{nestedId}}}> 6 |
7 | -------------------------------------------------------------------------------- /sites/config/config.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": { 3 | "libs": ["es6-promise", 4 | "@oracle/oraclejet", 5 | "@oracle/oraclejet-preact", 6 | "requirejs", 7 | "requirejs-text", 8 | "require-css", 9 | "jquery-ui", 10 | "@fortawesome/fontawesome-free", 11 | "webcomponents.js", 12 | "es6-promise", 13 | "hammerjs", 14 | "knockout", 15 | "jquery", 16 | "@webcomponents/custom-elements" 17 | ] 18 | } 19 | } -------------------------------------------------------------------------------- /sites/bin/cec/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cec", 3 | "version": "25.3.1", 4 | "description": "CLI for cec", 5 | "license": "UPL-1.0", 6 | "main": "cec.js", 7 | "scripts": { 8 | "test": "echo \"Error: no test specified\" && exit 1" 9 | }, 10 | "bin": { 11 | "cec": "cec.js", 12 | "cec-compile-site": "cecCompileSite.sh" 13 | }, 14 | "dependencies": { 15 | "yargs": "13.3.0" 16 | }, 17 | "author": "Oracle" 18 | } -------------------------------------------------------------------------------- /sites/bin/compiler/components/divider/divider.html: -------------------------------------------------------------------------------- 1 | 5 | <{{componentWrapperTag}} {{{nestedId}}}> 6 |
7 |
8 |
9 | -------------------------------------------------------------------------------- /sites/data/config/cec.properties: -------------------------------------------------------------------------------- 1 | ### OCM URL and credentials 2 | ### Never check in credential values to source control. 3 | ### When connecting to an OCM tenant on Oracle Public cloud, use value pod_ec for cec_env. 4 | ### Set Oracle Identity Domain URL for cec_idcs_url 5 | ### Use command 'cec config-properties' to set the properties 6 | cec_url= 7 | cec_username= 8 | cec_password= 9 | cec_token= 10 | cec_env= 11 | cec_idcs_url= 12 | cec_client_id= 13 | cec_client_secret= 14 | cec_scope= 15 | cec_key= 16 | -------------------------------------------------------------------------------- /sites/data/rss/rssFunc.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | rssDate: function () { 3 | return function (input, render) { 4 | var date = new Date(Date.parse(render(input))); 5 | var pieces = date.toString().split(' '), 6 | offsetTime = pieces[5].match(/[-+]\d{4}/), 7 | offset = (offsetTime) ? offsetTime : pieces[5], 8 | parts = [ 9 | pieces[0] + ',', 10 | pieces[2], 11 | pieces[1], 12 | pieces[3], 13 | pieces[4], 14 | offset 15 | ]; 16 | 17 | return parts.join(' '); 18 | } 19 | } 20 | }; -------------------------------------------------------------------------------- /sites/test/themes/CompTheme/responsepages/404.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | Not Found 9 | 10 | 11 | 12 | 13 |

Not Found

14 |

The page you requested could not be found.

15 | 16 | 17 | -------------------------------------------------------------------------------- /sites/test/themes/CompTheme/viewport.json: -------------------------------------------------------------------------------- 1 | {"viewportDimensions": [ 2 | {"width":375,"height":667, "name": "iPhone 8", "isMobile": true}, 3 | {"width":414,"height":736, "name": "iPhone 8 Plus", "isMobile": true}, 4 | {"width":375,"height":812, "name": "iPhone X", "isMobile": true}, 5 | {"width":360,"height":740, "name": "Galaxy S8, S9", "isMobile": true}, 6 | {"width":768,"height":1024}, 7 | {"width":800,"height":1280}, 8 | {"width":980,"height":1280}, 9 | {"width":1280,"height":600}, 10 | {"width":1920,"height":900} 11 | ]} 12 | -------------------------------------------------------------------------------- /sites/bin/compiler/components/image-text/image-text.html: -------------------------------------------------------------------------------- 1 | 5 |
6 |
7 |
8 | {{image}} 9 |
10 |
11 | {{paragraph}} 12 |
13 |
14 |
-------------------------------------------------------------------------------- /sites/bin/compiler/components/headline/headline.html: -------------------------------------------------------------------------------- 1 | 5 |
6 |
7 |
8 | {{image}} 9 |
10 |
11 | {{title}} 12 | {{byLine}} 13 |
14 |
15 |
-------------------------------------------------------------------------------- /sites/test/sites/CompSite/fieldeditorrender.html: -------------------------------------------------------------------------------- 1 |
-------------------------------------------------------------------------------- /sites/bin/compiler/components/article/article.html: -------------------------------------------------------------------------------- 1 | 5 |
6 |
7 |
8 | {{image}} 9 |
10 |
11 | {{title}} 12 | {{byLine}} 13 | {{paragraph}} 14 |
15 |
16 |
-------------------------------------------------------------------------------- /sites/bin/msword/cntItmWrdTmplt/_rels/.rels: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sites/data/rss/rss.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{title}} 5 | {{description}} 6 | {{{url}}} 7 | {{lastBuildDate}} 8 | {{pubDate}} 9 | {{ttl}} 10 | 11 | {{#items}} 12 | 13 | 14 | {{name}} 15 | {{description}} 16 | {{{detailLink}}} 17 | {{id}} 18 | {{publishDate}} 19 | 20 | 21 | {{/items}} 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /sites/bin/compiler/components/video/video.html: -------------------------------------------------------------------------------- 1 | 5 | <{{componentWrapperTag}} {{{nestedId}}}> 6 |
7 |
8 |
9 |
{{{computedHtml}}}
10 |
11 |
12 |
13 | -------------------------------------------------------------------------------- /sites/test/sites/CompSite/nosettings.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | Settings are not available for this component 17 |
18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /sites/bin/compiler/components/contentlist/contentlist.html: -------------------------------------------------------------------------------- 1 | 5 |
6 |
7 |
8 |
9 |
10 | {{{compiledContentList}}} 11 |
12 |
13 |
14 |
15 |
-------------------------------------------------------------------------------- /sites/bin/msword/cntItmWrdTmplt/word/webSettings.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sites/data/rss/rssfunc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | {{title}} 5 | {{description}} 6 | {{{url}}} 7 | {{lastBuildDate}} 8 | {{pubDate}} 9 | {{ttl}} 10 | 11 | {{#items}} 12 | 13 | 14 | {{name}} 15 | {{description}} 16 | {{{detailPageUrl}}}?slug={{slug}} 17 | {{id}} 18 | {{#rssDate}}{{fields.birthday.value}}{{/rssDate}} 19 | 20 | 21 | {{/items}} 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /sites/bin/compiler/components/title/title.html: -------------------------------------------------------------------------------- 1 | 5 | <{{componentWrapperTag}} {{{nestedId}}}> 6 |
7 |
8 | <{{wrapperTag}} class="{{computedTextStyleClass}}" style="{{computedStyle}}"> 9 | {{{viewUserText}}} 10 | 11 |
12 |
13 | -------------------------------------------------------------------------------- /sites/bin/msword/cntItmWrdTmplt/word/glossary/webSettings.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sites/bin/msword/cntItmWrdTmplt/word/glossary/_rels/document.xml.rels: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sites/bin/compiler/components/gallerygrid/gallerygrid.html: -------------------------------------------------------------------------------- 1 | 5 | <{{componentWrapperTag}} {{{nestedId}}}> 6 |
7 |
8 | {{#columnslayout}} 9 | 10 | {{/columnslayout}} 11 |
12 | {{{galleryImages}}} 13 |
14 |
15 |
16 | -------------------------------------------------------------------------------- /sites/bin/msword/cntItmWrdTmplt/docProps/app.xml: -------------------------------------------------------------------------------- 1 | 2 | 1100Microsoft Office Word000falseOraclefalse0falsefalse16.0000 -------------------------------------------------------------------------------- /sites/bin/msword/cntItmWrdTmplt/docProps/core.xml: -------------------------------------------------------------------------------- 1 | 2 | MARIUS-GABRIEL NITURAMARIUS-GABRIEL NITURA12020-09-23T13:46:00Z2020-09-23T13:48:00Z -------------------------------------------------------------------------------- /sites/bin/compiler/components/component/component.html: -------------------------------------------------------------------------------- 1 | 5 | {{#outputChrome}} 6 |
7 |
8 |
9 |
10 |
11 | {{{customContent}}} 12 |
13 |
14 |
15 |
16 |
17 | {{/outputChrome}} 18 | {{#snippetOnly}} 19 | {{{customContent}}} 20 | {{/snippetOnly}} -------------------------------------------------------------------------------- /sites/bin/compiler/components/socialbar/socialbar.html: -------------------------------------------------------------------------------- 1 | 5 | <{{componentWrapperTag}} {{{nestedId}}}> 6 |
7 |
8 |
9 | {{#computedImages}} 10 | {{#link}} 11 | 12 | {{/link}} 13 | {{altText}} 14 | {{#link}} 15 | 16 | {{/link}} 17 | {{/computedImages}} 18 |
19 |
20 |
21 | -------------------------------------------------------------------------------- /sites/test/sites/CompSite/pages/200.json: -------------------------------------------------------------------------------- 1 | { 2 | "base": { 3 | "properties": { 4 | "title": null, 5 | "pageLayout": "index.html", 6 | "pageDescription": null, 7 | "keywords": null, 8 | "hideFromSearchEngines": false, 9 | "header": "", 10 | "footer": "", 11 | "noIndex": false, 12 | "noFollow": false, 13 | "noArchive": false, 14 | "noSnippet": false, 15 | "isCobrowseEnabled": false 16 | }, 17 | "slots": { 18 | "slot-content": { 19 | "components": ["f8d5bb65-0c53-423d-aee5-4c70bc00c729"], 20 | "grid": "
" 21 | } 22 | }, 23 | "componentInstances": { 24 | "f8d5bb65-0c53-423d-aee5-4c70bc00c729": { 25 | "type": "scs-componentgroup", 26 | "id": "scs-componentgroup", 27 | "data": { 28 | } 29 | } 30 | } 31 | }, 32 | "variants": {} 33 | } -------------------------------------------------------------------------------- /sites/bin/compiler/components/contentsearch/contentsearch.html: -------------------------------------------------------------------------------- 1 | 5 | <{{componentWrapperTag}}> 6 |
7 |
8 | {{{computedStyleSheet}}} 9 | 13 |
14 |
15 | -------------------------------------------------------------------------------- /sites/bin/compiler/compiler.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Confidential and Proprietary for Oracle Corporation 3 | * 4 | * This computer program contains valuable, confidential, and 5 | * proprietary information. Disclosure, use, or reproduction 6 | * without the written authorization of Oracle is prohibited. 7 | * This unpublished work by Oracle is protected by the laws 8 | * of the United States and other countries. If publication 9 | * of this computer program should occur, the following notice 10 | * shall apply: 11 | * 12 | * Copyright (c) 2013 Oracle Corp. 13 | * All rights reserved. 14 | * 15 | * $Id: offline-publisher.js 141546 2016-03-24 23:23:28Z dpeterso $ 16 | */ 17 | // Get the various compilers 18 | var siteCompiler = require('./compilesite'), 19 | contentCompiler = require('./compilecontent'); 20 | 21 | // expose the compilers 22 | module.exports = { 23 | compileSite: siteCompiler.compileSite, 24 | compileContent: contentCompiler.compileContent 25 | }; -------------------------------------------------------------------------------- /sites/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "env": { 3 | "node": true 4 | }, 5 | "extends": [ 6 | "eslint:recommended", 7 | "plugin:mocha/recommended" 8 | ], 9 | "plugins": [ 10 | "mocha" 11 | ], 12 | "parserOptions": { 13 | "ecmaVersion": "latest", 14 | "sourceType": "module" 15 | }, 16 | "ignorePatterns": [ 17 | "src/libs/**/*.js", 18 | "data/build/src-gulpfile.js", 19 | "test/sitescloud/renderer/**/*.js", 20 | "test/public/**/*.js", 21 | "test/themes/**/*.js" 22 | ], 23 | "rules": { 24 | "indent": [ 25 | "error", 26 | "tab" 27 | ], 28 | "no-unused-vars": "off", 29 | "mocha/no-nested-tests": "off", 30 | "mocha/no-top-level-hooks": "off", 31 | "no-prototype-builtins": "off", 32 | "keyword-spacing": "error", 33 | "space-before-blocks": "error", 34 | "comma-spacing": "error", 35 | "func-call-spacing": "error", 36 | "space-infix-ops": "error", 37 | "space-unary-ops": "error", 38 | "arrow-spacing": "error", 39 | "no-trailing-spaces": "error" 40 | } 41 | } -------------------------------------------------------------------------------- /sites/bin/compiler/components/image/image.html: -------------------------------------------------------------------------------- 1 | 5 | <{{componentWrapperTag}} {{{nestedId}}} {{{componentTagAttribute}}}> 6 |
7 |
8 |
9 | {{#linkHandler}} 10 | 11 | {{/linkHandler}} 12 | {{altText}} 13 | {{#linkHandler}} 14 | 15 | {{/linkHandler}} 16 |
17 |
18 |
19 | -------------------------------------------------------------------------------- /sites/test/sites/CompSite/pages/1.json: -------------------------------------------------------------------------------- 1 | { 2 | "base": { 3 | "properties": { 4 | "title": "", 5 | "pageLayout": "index.html", 6 | "pageDescription": "", 7 | "keywords": "", 8 | "hideFromSearchEngines": false, 9 | "header": "", 10 | "footer": "", 11 | "noIndex": false, 12 | "noFollow": false, 13 | "noArchive": false, 14 | "noSnippet": false, 15 | "isCobrowseEnabled": false 16 | }, 17 | "slots": { 18 | "slot-content": { 19 | "components": ["ce97efeb-3f7e-4aef-b686-70696f17014f"], 20 | "grid": "
" 21 | } 22 | }, 23 | "componentInstances": { 24 | "ce97efeb-3f7e-4aef-b686-70696f17014f": { 25 | "type": "scs-component", 26 | "id": "Sample-To-Do", 27 | "data": { 28 | "componentId": "Sample-To-Do", 29 | "componentLayout": "default", 30 | "customSettingsData": { 31 | "width": "260px" 32 | } 33 | } 34 | } 35 | } 36 | }, 37 | "variants": {} 38 | } -------------------------------------------------------------------------------- /sites/test/unit/test-main.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. 3 | * Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 4 | */ 5 | 6 | /* eslint-env jquery */ 7 | $.getJSON('/getsrcfolder', function (data) { 8 | 'use strict'; 9 | 10 | var srcfolder = data.srcfolder; 11 | var libfolder = data.libsfolder; 12 | 13 | require.config({ 14 | 'baseUrl': '.', 15 | 16 | paths: { 17 | 'sitesMockAPI': '../public/js/sites.mock', 18 | 'sitesMockData': '../public/js/sites.data', 19 | 'jquery': '../sitescloud/renderer/app/apps/js/jquery.min', 20 | 'knockout': '../sitescloud/renderer/app/apps/js/knockout.min', 21 | 'text': '../../node_modules/requirejs-text/text', 22 | 'css': '../../node_modules/require-css/css.min', 23 | 'components': '../../' + srcfolder + '/components' 24 | }, 25 | config: {} 26 | }); 27 | 28 | require(['Sample-To-Do-Test'], function () { 29 | mocha.checkLeaks(); 30 | mocha.globals(['jQuery']); 31 | mocha.run(); 32 | }); 33 | 34 | }); -------------------------------------------------------------------------------- /sites/bin/compiler/components/button/button.html: -------------------------------------------------------------------------------- 1 | 5 | <{{componentWrapperTag}} {{{nestedId}}}> 6 |
7 |
8 | {{#hasLink}} 9 | 10 | {{computedText}} 11 | 12 | {{/hasLink}} 13 | {{#notHasLink}} 14 |
15 | {{computedText}} 16 |
17 | {{/notHasLink}} 18 |
19 |
20 | -------------------------------------------------------------------------------- /sites/bin/msword/cntItmWrdTmplt/word/_rels/document.xml.rels: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sites/test/sites/CompSite/pages/100.json: -------------------------------------------------------------------------------- 1 | { 2 | "base": { 3 | "properties": { 4 | "title": "", 5 | "pageLayout": "index.html", 6 | "pageDescription": "", 7 | "keywords": "", 8 | "hideFromSearchEngines": false, 9 | "header": "", 10 | "footer": "", 11 | "noIndex": false, 12 | "noFollow": false, 13 | "noArchive": false, 14 | "noSnippet": false, 15 | "isCobrowseEnabled": false 16 | }, 17 | "slots": { 18 | "slot-content": { 19 | "components": ["ac4dd9e4-97b8-4ad0-940d-bc0d2f199810"], 20 | "grid": "
" 21 | } 22 | }, 23 | "componentInstances": { 24 | "ac4dd9e4-97b8-4ad0-940d-bc0d2f199810": { 25 | "type": "scs-app", 26 | "id": "Sample-Documents-Manager", 27 | "data": { 28 | "appGUID": "C26935DCDD8F962A2B68862EC2DB3E7D25FCFCE9E29C", 29 | "appName": "Sample-Documents-Manager", 30 | "appSrc": "sandboxed/render.html", 31 | "appType": "sandboxed", 32 | "customSettingsData": {} 33 | } 34 | } 35 | } 36 | }, 37 | "variants": { 38 | } 39 | } -------------------------------------------------------------------------------- /sites/docker-images/compilation-server/run.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Change Log 4 | # - Added mount paths and path creations 5 | # - Removed key creation and server registration 6 | # - Added support for port selection from environment variable 7 | 8 | cd /home/${CEC_COMPILATION_USER}/${CEC_DIR_NAME} 9 | 10 | echo "CEC TOOLKIT VERSION: $(cec --version)" 11 | 12 | SERVER_OUT=./server.log 13 | LOG_FLAG="-l /home/${CEC_COMPILATION_USER}/${CEC_DIR_NAME}" 14 | TIMEOUT="-t 1800000" 15 | 16 | PORT_FLAG="" 17 | if [ "${CEC_COMPILATION_PORT}" == "" ]; then 18 | PORT_FLAG="" 19 | else 20 | PORT_FLAG="-p ${CEC_COMPILATION_PORT}" 21 | fi 22 | 23 | # assumes proxy is not necessary 24 | unset http_proxy 25 | unset https_proxy 26 | unset no_proxy 27 | unset HTTP_PROXY 28 | unset HTTPS_PROXY 29 | unset NO_PROXY 30 | 31 | echo "PORT_FLAG: $PORT_FLAG" >> $SERVER_OUT 32 | echo "LOG_FLAG: $LOG_FLAG" >> $SERVER_OUT 33 | echo "TIMEOUT: $TIMEOUT" >> $SERVER_OUT 34 | echo "SERVER_OUT: $SERVER_OUT" >> $SERVER_OUT 35 | cec compilation-server $PORT_FLAG $LOG_FLAG $TIMEOUT &>> $SERVER_OUT & 36 | 37 | # Tail on server output file and wait (otherwise container will exit) 38 | tail -f $SERVER_OUT & 39 | childPID=$! 40 | wait ${childPID} 41 | -------------------------------------------------------------------------------- /sites/bin/compiler/components/contentitem/system-default-layout.html: -------------------------------------------------------------------------------- 1 | 5 | -------------------------------------------------------------------------------- /sites/test/job-manager/jobQueue.js: -------------------------------------------------------------------------------- 1 | var JobQueue = function(args) { 2 | this.ps = args.ps; 3 | this.items = []; 4 | this.fetchItems(); 5 | }; 6 | 7 | 8 | JobQueue.prototype.isEmpty = function() { 9 | return this.items.length === 0; 10 | }; 11 | 12 | JobQueue.prototype.enqueue = function(item) { 13 | // Always get it from the file first 14 | this.fetchItems(); 15 | this.items.push(item); 16 | this.saveItems(); 17 | }; 18 | 19 | JobQueue.prototype.dequeue = function() { 20 | var item = null; 21 | 22 | this.fetchItems(); 23 | if (!this.isEmpty()) { 24 | item = this.items.shift(); 25 | this.saveItems(); 26 | } 27 | 28 | return item; 29 | }; 30 | 31 | // Fetch queue items from file 32 | JobQueue.prototype.fetchItems = function() { 33 | var data = this.ps.getQueue(); // persistenceStore.getQueue(); 34 | if (Array.isArray(data)) { 35 | this.items = data; 36 | } else { 37 | // Fallback is that queue is empty. 38 | this.items = []; 39 | } 40 | }; 41 | 42 | // Save queue items to file 43 | JobQueue.prototype.saveItems = function() { 44 | var args = { items: this.items }; 45 | 46 | this.ps.setQueue(args); 47 | // persistenceStore.setQueue(args); 48 | }; 49 | 50 | module.exports = function (args) { 51 | return new JobQueue(args); 52 | }; -------------------------------------------------------------------------------- /sites/data/config/src-package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "cec-sites-toolkit-source", 3 | "version": "22.7.2", 4 | "license": "UPL-1.0", 5 | "description": "Content Management Toolkit Development", 6 | "main": "index.js", 7 | "directories": {}, 8 | "scripts": { 9 | "build": "gulp", 10 | "test": "mocha --recursive test", 11 | "test-debug": "mocha --inspect-brk --recursive test", 12 | "test-unit": "mocha --recursive test -R ./node_modules/mocha-junit-reporter", 13 | "test-headless": "mocha --recursive test --headless", 14 | "test-remote": "mocha --recursive test --remote" 15 | }, 16 | "repository": { 17 | "type": "git", 18 | "url": "" 19 | }, 20 | "keywords": [ 21 | "SCS" 22 | ], 23 | "author": "Oracle", 24 | "engines": { 25 | "node": ">=16.18.1" 26 | }, 27 | "dependencies": { 28 | "chai": "4.5.0", 29 | "del": "6.1.1", 30 | "gulp": "4.0.2", 31 | "gulp-replace": "1.1.4", 32 | "lodash": "4.17.21", 33 | "marked": "4.3.0", 34 | "mocha": "10.7.3", 35 | "mocha-junit-reporter": "2.2.1", 36 | "mustache": "4.2.0", 37 | "preact": "10.19.3", 38 | "preact-render-to-string": "6.5.7", 39 | "puppeteer": "22.14.0", 40 | "react": "18.2.0", 41 | "react-dom": "18.2.0", 42 | "requirejs": "2.3.7" 43 | }, 44 | "overrides": { 45 | "braces": "3.0.3", 46 | "es5-ext": "0.10.53" 47 | } 48 | } -------------------------------------------------------------------------------- /sites/bin/msword/cntItmWrdTmplt/word/fontTable.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sites/test/server/logger.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2022 Oracle and/or its affiliates. All rights reserved. 3 | * Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 4 | */ 5 | 6 | /** 7 | * Toolkit logger 8 | */ 9 | 10 | var _level; 11 | 12 | var levels = ['info', 'warn', 'error', 'debug']; 13 | var _setLevel = function (level) { 14 | if (!levels.includes(level)) { 15 | _level = 'info'; 16 | } else { 17 | _level = level; 18 | } 19 | // console.log('*** set log level: ' + _level); 20 | }; 21 | 22 | var _log = function (msg) { 23 | // always display 24 | console.log(msg); 25 | }; 26 | 27 | var _debug = function (msg) { 28 | if (_level === 'debug') { 29 | console.log(msg); 30 | } 31 | }; 32 | 33 | var _info = function (msg) { 34 | if (!_level || _level === 'info' || _level === 'debug') { 35 | console.info(msg); 36 | } 37 | }; 38 | 39 | var _warn = function (msg) { 40 | if (_level && _level !== 'error') { 41 | console.warn(msg); 42 | } 43 | }; 44 | 45 | var _error = function (msg) { 46 | // always display 47 | var d = new Date(); 48 | console.error(msg + ' (' + d.toUTCString() + ')'); 49 | }; 50 | 51 | var _showInfo = function () { 52 | return _level === 'info'; 53 | }; 54 | 55 | module.exports.console = { 56 | showInfo: _showInfo, 57 | setLevel: _setLevel, 58 | log: _log, 59 | debug: _debug, 60 | info: _info, 61 | warn: _warn, 62 | error: _error 63 | }; -------------------------------------------------------------------------------- /sites/bin/compiler/components/contentplaceholder/contentplaceholder.js: -------------------------------------------------------------------------------- 1 | var ContentItem = require('../contentitem/contentitem.js'); 2 | var compilationReporter = require('../../reporter.js'); 3 | 4 | var ContentPlaceholder = function (args) { 5 | this.componentId = args.componentId; 6 | this.componentInstanceObject = args.componentInstanceObject; 7 | this.componentsFolder = args.componentsFolder; 8 | this.SCSCompileAPI = args.SCSCompileAPI; 9 | 10 | // get the detail content item if it exists 11 | this.contentItem = args.SCSCompileAPI.detailContentItem; 12 | 13 | // set the default to content placeholder default 14 | this.defaultContentLayoutCategory = 'Content Placeholder Default'; 15 | }; 16 | ContentPlaceholder.prototype = Object.create(ContentItem.prototype); 17 | 18 | ContentPlaceholder.prototype.isComponentValid = function (id, contentId) { 19 | if (!this.contentItem) { 20 | compilationReporter.info({ 21 | message: 'no content item specified for placeholder: ' + id + ' component will render at runtime.' 22 | }); 23 | return false; 24 | } else { 25 | return true; 26 | } 27 | }; 28 | 29 | ContentPlaceholder.prototype.getContentItem = function (args) { 30 | return Promise.resolve(this.contentItem); 31 | }; 32 | 33 | ContentPlaceholder.prototype.getContentType = function (args) { 34 | return this.contentItem ? this.contentItem.type : this.componentInstanceObject.data.contentTypes[0]; 35 | }; 36 | 37 | 38 | module.exports = ContentPlaceholder; 39 | -------------------------------------------------------------------------------- /sites/test/server/fileUtils.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved. 3 | * Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 4 | */ 5 | 6 | /** 7 | * Utilities for files/folders 8 | */ 9 | 10 | var fs = require('fs'), 11 | extract = require('extract-zip'); 12 | 13 | var console = require('./logger.js').console; 14 | 15 | module.exports.remove = function (srcPath) { 16 | try { 17 | if (srcPath && fs.existsSync(srcPath)) { 18 | var stat = fs.statSync(srcPath); 19 | if (stat.isFile()) { 20 | fs.unlinkSync(srcPath); 21 | } else if (stat.isDirectory()) { 22 | fs.rmSync(srcPath, { recursive: true, force: true }); 23 | } else if (stat.isSymbolicLink()) { 24 | fs.unlinkSync(srcPath); 25 | } 26 | } 27 | } catch (e) { 28 | console.error(e); 29 | } 30 | }; 31 | 32 | module.exports.copy = function (srcPath, destPath) { 33 | try { 34 | fs.cpSync(srcPath, destPath, { force: true, recursive: true }); 35 | } catch (e) { 36 | console.error(e); 37 | } 38 | }; 39 | 40 | module.exports.extractZip = function (filePath, targetPath) { 41 | 42 | async function _extract(filePath, targetPath) { 43 | var err; 44 | try { 45 | // console.log(' - extract ' + filePath + ' to ' + targetPath); 46 | await extract(filePath, { 47 | dir: targetPath 48 | }); 49 | // console.log(' - extraction complete'); 50 | return err; 51 | } catch (e) { 52 | console.error('ERROR: failed to extract ' + filePath); 53 | console.error(e); 54 | err = 'err'; 55 | return err; 56 | } 57 | } 58 | 59 | return _extract(filePath, targetPath); 60 | 61 | }; -------------------------------------------------------------------------------- /sites/test/public/js/sites.data.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. 3 | * Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 4 | */ 5 | 6 | define(['jquery', 'knockout'], function($, ko) { 7 | 'use strict'; 8 | var instance, 9 | Singleton = function() {}; 10 | 11 | function getComponentName(url) { 12 | if (!url) { 13 | return; 14 | } 15 | //use anchro element to parse url 16 | var anchorEle = document.createElement('a'), 17 | //query parameters 18 | parameters = {}, 19 | queries; 20 | // set the URL in the anchor, which will also parse it 21 | anchorEle.href = url; 22 | // anchorEle.search returns ?x=y&a=b... part of the url string 23 | queries = anchorEle.search.replace(/^\?/, '').split('&'); 24 | for (var i = 0; i < queries.length; i++) { 25 | var split = queries[i].split('='); 26 | parameters[split[0]] = decodeURIComponent(split[1]); 27 | } 28 | 29 | var compNames = parameters.name ? parameters.name.split(',') : []; 30 | return compNames[0]; 31 | } 32 | 33 | // Global for all components 34 | Singleton.prototype = { 35 | componentId: 'myUniqueComponentID', 36 | settingsURL: '../../components/' + getComponentName(location.href) + '/assets/settings.html', 37 | settingsHeight: '320', 38 | settingsWidth: '320', 39 | appSettingsHeight: '500', 40 | appSettingsWidth: '420', 41 | properties: { 42 | AssetsURL: '../../components/' + getComponentName(location.href) + '/assets', 43 | componentLayout: 'left', 44 | customSettingsData: {} 45 | } 46 | }; 47 | 48 | return (instance = (instance || new Singleton())); 49 | }); 50 | -------------------------------------------------------------------------------- /sites/bin/upgrade.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. 3 | * Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 4 | */ 5 | /* global console */ 6 | /* jshint esversion: 6 */ 7 | 8 | var gulp = require('gulp'), 9 | fse = require('fs-extra'), 10 | fs = require('fs'), 11 | decompress = require('decompress'); 12 | 13 | // These files have been moved. 14 | // These old copies can be removed. 15 | const toRemove = ['../config.json', 16 | '../gulpfile.js', 17 | '../lib/scs-starter-component.zip', 18 | '../lib/scs-test-site.zip', 19 | '../server.js', 20 | '../src/main/components/Sample-To-Do/assets/css', 21 | '../src/test', 22 | '../src/main/templates/StarterTemplate/componentsused.json' 23 | ]; 24 | 25 | gulp.task("default", () => { 26 | 'use strict'; 27 | toRemove.forEach((item) => { 28 | fse.remove(item) 29 | .then(() => console.log(`Fixing ${item}`)) 30 | .catch(err => console.log(err)); 31 | }); 32 | 33 | // If gulpfile.js exists for Sample-Text-With-Image, replace it with the one from source zip file. 34 | // It has the correct path for libraries. 35 | if (fs.existsSync('../src/main/components/Sample-Text-With-Image/gulpfile.js')) { 36 | decompress('../data/components/Sample-Text-With-Image.zip', '../src/main/components/Sample-Text-With-Image', { 37 | filter: file => file.path === 'gulpfile.js' 38 | }).then(files => { 39 | console.log("Fixing ../src/main/components/Sample-Text-With-Image/gulpfile.js : " + files[0].path); 40 | }); 41 | } else { 42 | console.log('Sample-Text-With-Image does not exist, so its gulpfile fix is not needed'); 43 | } 44 | }); 45 | -------------------------------------------------------------------------------- /sites/bin/msword/cntItmWrdTmplt/word/glossary/fontTable.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sites/bin/compiler/components/article/article.js: -------------------------------------------------------------------------------- 1 | var fs = require('fs'), 2 | path = require('path'), 3 | mustache = require('mustache'); 4 | 5 | var compilationReporter = require('../../reporter.js'); 6 | 7 | 8 | var Article = function (args) { 9 | this.componentId = args.componentId; 10 | this.componentInstanceObject = args.componentInstanceObject; 11 | this.componentsFolder = args.componentsFolder; 12 | this.compData = this.componentInstanceObject.data; 13 | }; 14 | 15 | Article.prototype.compile = function () { 16 | var compId = this.componentId, 17 | customSettingsData = this.compData.customSettingsData, 18 | alignImage = this.compData.componentLayout === 'right' ? 'right' : 'left'; 19 | 20 | return new Promise(function (resolve, reject) { 21 | try { 22 | var dir = __dirname, 23 | templateFile = path.join(dir, 'article.html'), 24 | template = fs.readFileSync(templateFile, 'utf8'); 25 | 26 | var model = { 27 | contentId: compId + '_content_runtime', 28 | alignCssClass: 'scs-align-' + alignImage, 29 | imageStyle: 'width:' + customSettingsData.width || '200px', 30 | alignImage: alignImage, 31 | image: '{{{image}}}', 32 | title: '{{{title}}}', 33 | byLine: '{{{byLine}}}', 34 | paragraph: '{{{paragraph}}}' 35 | }; 36 | 37 | var markup = ''; 38 | markup = mustache.render(template, model); 39 | return resolve({ 40 | hydrate: true, 41 | content: markup, 42 | nestedIDs: ['image', 'title', 'byLine', 'paragraph'] 43 | }); 44 | } catch (e) { 45 | compilationReporter.error({ 46 | message: 'Artile Component: failed to expand template', 47 | error: e 48 | }); 49 | } 50 | return resolve({}); 51 | }); 52 | }; 53 | 54 | 55 | module.exports = Article; -------------------------------------------------------------------------------- /sites/bin/compiler/components/spacer/spacer.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Confidential and Proprietary for Oracle Corporation 3 | * 4 | * This computer program contains valuable, confidential, and 5 | * proprietary information. Disclosure, use, or reproduction 6 | * without the written authorization of Oracle is prohibited. 7 | * This unpublished work by Oracle is protected by the laws 8 | * of the United States and other countries. If publication 9 | * of this computer program should occur, the following notice 10 | * shall apply: 11 | * 12 | * Copyright (c) 2014 Oracle Corp. 13 | * All rights reserved. 14 | * 15 | * $Id: base-vm.js 167153 2019-01-25 21:29:15Z muralik $ 16 | */ 17 | var fs = require('fs'), 18 | path = require('path'), 19 | Base = require(path.normalize('../base/base')); 20 | 21 | var compilationReporter = require('../../reporter.js'); 22 | 23 | var Spacer = function (compId, compInstance) { 24 | this.init('scs-spacer', compId, compInstance); 25 | }; 26 | Spacer.prototype = Object.create(Base.prototype); 27 | 28 | Spacer.prototype.compile = function () { 29 | // make sure we can compile 30 | if (!this.canCompile) { 31 | return Promise.resolve({ 32 | hydrate: true, 33 | content: '' 34 | }); 35 | } 36 | 37 | // extend the model with any divider specific values 38 | this.computedStyle = this.encodeCSS(this.computeStyle()); 39 | 40 | // render the content 41 | var content = this.renderMustacheTemplate(fs.readFileSync(path.join(__dirname, 'spacer.html'), 'utf8')); 42 | 43 | return Promise.resolve({ 44 | hydrate: false, 45 | content: content 46 | }); 47 | }; 48 | 49 | Spacer.prototype.computeStyle = function () { 50 | var viewModel = this, 51 | computedStyle = ''; 52 | 53 | computedStyle += 'height:' + viewModel.getDimensionValue(viewModel.height) + ';'; 54 | 55 | return computedStyle; 56 | }; 57 | 58 | module.exports = Spacer; -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Reporting security vulnerabilities 2 | 3 | Oracle values the independent security research community and believes that 4 | responsible disclosure of security vulnerabilities helps us ensure the security 5 | and privacy of all our users. 6 | 7 | Please do NOT raise a GitHub Issue to report a security vulnerability. If you 8 | believe you have found a security vulnerability, please submit a report to 9 | [secalert_us@oracle.com][1] preferably with a proof of concept. Please review 10 | some additional information on [how to report security vulnerabilities to Oracle][2]. 11 | We encourage people who contact Oracle Security to use email encryption using 12 | [our encryption key][3]. 13 | 14 | We ask that you do not use other channels or contact the project maintainers 15 | directly. 16 | 17 | Non-vulnerability related security issues including ideas for new or improved 18 | security features are welcome on GitHub Issues. 19 | 20 | ## Security updates, alerts and bulletins 21 | 22 | Security updates will be released on a regular cadence. Many of our projects 23 | will typically release security fixes in conjunction with the 24 | Oracle Critical Patch Update program. Additional 25 | information, including past advisories, is available on our [security alerts][4] 26 | page. 27 | 28 | ## Security-related information 29 | 30 | We will provide security related information such as a threat model, considerations 31 | for secure use, or any known security issues in our documentation. Please note 32 | that labs and sample code are intended to demonstrate a concept and may not be 33 | sufficiently hardened for production use. 34 | 35 | [1]: mailto:secalert_us@oracle.com 36 | [2]: https://www.oracle.com/corporate/security-practices/assurance/vulnerability/reporting.html 37 | [3]: https://www.oracle.com/security-alerts/encryptionkey.html 38 | [4]: https://www.oracle.com/security-alerts/ 39 | -------------------------------------------------------------------------------- /sites/test/sites/CompSite/structure.json: -------------------------------------------------------------------------------- 1 | { 2 | "siteInfo": 3 | { 4 | "base": 5 | { 6 | "properties": 7 | { 8 | "themeName": "CompTheme", 9 | "designName": "", 10 | "errorPage": 100, 11 | "siteRootPrefix": "/CompSite/", 12 | "description": "A site used for DevCS local test", 13 | "keywords": "DevCS, Test", 14 | "channelId": "CHANNELF60858C06992DF01D90B7C9EA7C62CB8A4A11F07442B", 15 | "channelAccessTokens": [{ 16 | "name": "defaultToken", 17 | "value": "02a11b744a9828b6c08c832cc4efeaa4", 18 | "expirationDate": "01/01/2099" 19 | }] 20 | }, 21 | "variants": 22 | [ 23 | ] 24 | } 25 | }, 26 | 27 | "base": 28 | { 29 | "pages" :[ 30 | { 31 | "id" : 1, 32 | "name" : "Home", 33 | "parentId" : null, 34 | "pageUrl" : "index.html", 35 | "showInNavigation" : true, 36 | "children": [] 37 | }, 38 | { 39 | "id" : 100, 40 | "name" : "App Home", 41 | "parentId" : null, 42 | "pageUrl" : "app.html", 43 | "isDetailPage": false, 44 | "showInNavigation" : true, 45 | "children": [] 46 | }, { 47 | "id": 400, 48 | "name": "Detail Page", 49 | "parentId": 10, 50 | "pageUrl": "detail-page.html", 51 | "hideInNavigation": true, 52 | "linkUrl": "", 53 | "linkTarget": "", 54 | "children": [], 55 | "overrideUrl": false, 56 | "isDetailPage": true, 57 | "isSearchPage": null 58 | }, { 59 | "id": 401, 60 | "name": "Search Page", 61 | "parentId": 11, 62 | "pageUrl": "search-page.html", 63 | "hideInNavigation": true, 64 | "linkUrl": "", 65 | "linkTarget": "", 66 | "children": [], 67 | "overrideUrl": false, 68 | "isDetailPage": null, 69 | "isSearchPage": true 70 | } 71 | ] 72 | }, 73 | 74 | "variants": 75 | { 76 | } 77 | } 78 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright (c) 2019, 2024 Oracle and/or its affiliates 2 | 3 | The Universal Permissive License (UPL), Version 1.0 4 | 5 | Subject to the condition set forth below, permission is hereby granted to any 6 | person obtaining a copy of this software, associated documentation and/or data 7 | (collectively the "Software"), free of charge and under any and all copyright 8 | rights in the Software, and any and all patent rights owned or freely 9 | licensable by each licensor hereunder covering either (i) the unmodified 10 | Software as contributed to or provided by such licensor, or (ii) the Larger 11 | Works (as defined below), to deal in both 12 | 13 | (a) the Software, and 14 | (b) any piece of software and/or hardware listed in the lrgrwrks.txt file if 15 | one is included with the Software (each a "Larger Work" to which the Software 16 | is contributed by such licensors), 17 | 18 | without restriction, including without limitation the rights to copy, create 19 | derivative works of, display, perform, and distribute the Software and make, 20 | use, sell, offer for sale, import, export, have made, and have sold the 21 | Software and the Larger Work(s), and to sublicense the foregoing rights on 22 | either these or other terms. 23 | 24 | This license is subject to the following condition: 25 | The above copyright notice and either this complete permission notice or at 26 | a minimum a reference to the UPL must be included in all copies or 27 | substantial portions of the Software. 28 | 29 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 30 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 31 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 32 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 33 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 34 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 35 | SOFTWARE. 36 | -------------------------------------------------------------------------------- /sites/bin/compiler/components/sectionlayout/vertical/compile.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Confidential and Proprietary for Oracle Corporation 3 | * 4 | * This computer program contains valuable, confidential, and 5 | * proprietary information. Disclosure, use, or reproduction 6 | * without the written authorization of Oracle is prohibited. 7 | * This unpublished work by Oracle is protected by the laws 8 | * of the United States and other countries. If publication 9 | * of this computer program should occur, the following notice 10 | * shall apply: 11 | * 12 | * Copyright (c) 2019 Oracle Corp. 13 | * All rights reserved. 14 | * 15 | * $Id: compile.js 167153 2019-01-25 21:29:15Z dpeterso $ 16 | */ 17 | var fs = require('fs'), 18 | path = require('path'); 19 | 20 | var compilationReporter = require('../../../reporter.js'); 21 | 22 | var SectionLayout = function (componentId, componentInstanceObject, componentsFolder) { 23 | this.componentId = componentId; 24 | this.componentInstanceObject = componentInstanceObject; 25 | this.componentsFolder = componentsFolder; 26 | }; 27 | SectionLayout.prototype = { 28 | compile: function () { 29 | var html = ''; 30 | 31 | var ciData = this.componentInstanceObject || {}; 32 | var slData = ciData.data || {}; 33 | 34 | try { 35 | // Add the child components to the section layout. For each of the child 36 | // components, add a
to the page. The child components will be 37 | // rendered into these
s. 38 | if (Array.isArray(slData.components) && (slData.components.length > 0)) { 39 | slData.components.forEach(function (componentId) { 40 | html += '
'; 41 | }); 42 | } 43 | } catch (e) { 44 | compilationReporter.error({ 45 | message: 'failed to compile scs-vertical section layout', 46 | error: e 47 | }); 48 | html = ''; 49 | } 50 | 51 | return Promise.resolve({ 52 | content: html 53 | }); 54 | } 55 | }; 56 | 57 | module.exports = SectionLayout; -------------------------------------------------------------------------------- /sites/test/server/featureFlags.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2020 Oracle and/or its affiliates. All rights reserved. 3 | * Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 4 | */ 5 | 6 | var serverUtils = require('./serverUtils'); 7 | 8 | // define the default value for featureFlags known in the toolkit 9 | // NOTE: also update the knownFeatureFlags value in gemini/js/core/util/FeatureFlags.js file to allow setting in the server 10 | var knownFeatureFlags = { 11 | 'scs.toolkit.useFetchInContentSDK': true 12 | }; 13 | 14 | var featureFlags = knownFeatureFlags; 15 | var featureFlagsPromise; 16 | var featureFlagsInitialized = false; 17 | 18 | var getFeatureFlags = function (server) { 19 | featureFlagsPromise = featureFlagsPromise || new Promise(function (resolve, reject) { 20 | // get the tenant config information 21 | serverUtils.getScsTenantConfig(server).then(function (config) { 22 | // extract the feature flags 23 | try { 24 | var serverFeatureFlags = JSON.parse(config && config.featureFlags || "{}"); 25 | featureFlags = { ...knownFeatureFlags, ...serverFeatureFlags}; 26 | } catch (e) { 27 | console.log('featureFlags.getFeatureFlags: failed to parse tenant config feature flags'); 28 | } 29 | 30 | featureFlagsInitialized = true; 31 | return resolve(featureFlags); 32 | }); 33 | }); 34 | 35 | return featureFlagsPromise; 36 | } 37 | 38 | var checkFeatureFlag = function (server, featureFlag) { 39 | return getFeatureFlags(server).then(function () { 40 | return Promise.resolve(featureFlags[featureFlag]); 41 | }); 42 | }; 43 | 44 | var checkFeatureFlagSync = function (featureFlag) { 45 | if (featureFlagsInitialized) { 46 | return featureFlags[featureFlag]; 47 | } else { 48 | throw new Error('featureFlags.checkFeatureFlagSync: Feature flags not initialized.'); 49 | } 50 | }; 51 | 52 | module.exports = { 53 | getFeatureFlags: getFeatureFlags, 54 | checkFeatureFlag: checkFeatureFlag, 55 | checkFeatureFlagSync: checkFeatureFlagSync 56 | } 57 | -------------------------------------------------------------------------------- /sites/bin/msword/cntItmWrdTmplt/[Content_Types].xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sites/data/components/comps.txt: -------------------------------------------------------------------------------- 1 | Volume in drive C is System 2 | Volume Serial Number is 24C0-33C3 3 | 4 | Directory of C:\data\git\webclient\developer\sites-toolkit\data\components 5 | 6 | 03/29/2021 07:53 AM . 7 | 03/29/2021 07:53 AM .. 8 | 02/19/2020 04:10 PM 3,703 Anchor.zip 9 | 03/29/2021 07:53 AM 0 comps.txt 10 | 11/10/2020 03:14 PM 6,637 ContentForm.zip 11 | 07/08/2020 02:05 PM 4,264 contentlayout.zip 12 | 07/08/2020 02:05 PM 4,011 contentlistlayout.zip 13 | 07/08/2020 02:05 PM 3,902 contentlistnoqlayout.zip 14 | 02/19/2020 04:10 PM 15,432 Document-Search.zip 15 | 02/19/2020 04:10 PM 306,905 JET-CCA-Demo-Card.zip 16 | 02/19/2020 04:10 PM 68,702 local-iframe.zip 17 | 02/19/2020 04:10 PM 7,566 local.zip 18 | 02/26/2020 01:28 PM 4,671 MapFieldEditor.zip 19 | 02/19/2020 04:10 PM 1,981 remote.zip 20 | 08/31/2020 03:24 PM 67,967 Sample-Documents-Manager.zip 21 | 08/31/2020 03:24 PM 72,073 Sample-File-List.zip 22 | 08/31/2020 03:24 PM 69,257 Sample-Folder-List.zip 23 | 02/19/2020 04:10 PM 9,131 Sample-OPA-Interview.zip 24 | 08/31/2020 03:24 PM 123,813 Sample-Process-Start-Form.zip 25 | 08/31/2020 03:24 PM 117,003 Sample-Process-Task-Details.zip 26 | 08/31/2020 03:24 PM 169,972 Sample-Process-Task-List.zip 27 | 02/19/2020 04:10 PM 7,530 Sample-Stocks-Embedded.zip 28 | 02/19/2020 04:10 PM 35,944 Sample-Text-With-Image.zip 29 | 02/19/2020 04:10 PM 11,827 Sample-To-Do.zip 30 | 02/19/2020 04:10 PM 5,331 sectionlayout.zip 31 | 07/08/2020 02:05 PM 2,841 settings.html 32 | 02/19/2020 04:10 PM 11,906 SimpleHTML.zip 33 | 02/26/2020 01:28 PM 2,382 SliderFieldEditor.zip 34 | 02/19/2020 04:10 PM 3,360 TextFieldEditor.zip 35 | 27 File(s) 1,138,111 bytes 36 | 2 Dir(s) 295,517,937,664 bytes free 37 | -------------------------------------------------------------------------------- /sites/bin/compiler/components/component-compilers.js: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. 3 | * Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 4 | */ 5 | var componentCompilers = [{ 6 | type: 'scs-contentsearch', 7 | compiler: 'contentsearch/contentsearch', 8 | canNest: true 9 | }, 10 | { 11 | type: 'scs-componentgroup', 12 | compiler: 'componentgroup/componentgroup', 13 | canNest: true 14 | }, 15 | { 16 | type: 'scs-sectionlayout', 17 | compiler: 'sectionlayout/sectionlayout', 18 | canNest: true 19 | }, 20 | { 21 | type: 'scs-divider', 22 | compiler: 'divider/divider', 23 | canNest: true 24 | }, 25 | { 26 | type: 'scs-spacer', 27 | compiler: 'spacer/spacer', 28 | canNest: true 29 | }, 30 | { 31 | type: 'scs-video', 32 | compiler: 'video/video', 33 | canNest: true 34 | }, 35 | { 36 | type: 'scs-image', 37 | compiler: 'image/image', 38 | canNest: true 39 | }, 40 | { 41 | type: 'scs-component', 42 | compiler: 'component/component', 43 | canNest: false 44 | }, 45 | { 46 | type: 'scs-title', 47 | compiler: 'title/title', 48 | canNest: true 49 | }, 50 | { 51 | type: 'scs-text', 52 | compiler: 'title/title', 53 | canNest: true 54 | }, 55 | { 56 | type: 'scs-paragraph', 57 | compiler: 'title/title', 58 | canNest: true 59 | }, 60 | { 61 | type: 'scs-button', 62 | compiler: 'button/button', 63 | canNest: true 64 | }, 65 | { 66 | type: 'scs-contentlist', 67 | compiler: 'contentlist/contentlist', 68 | canNest: true 69 | }, 70 | { 71 | type: 'scs-dynamiclist', 72 | compiler: 'contentlist/contentlist', 73 | canNest: true 74 | }, 75 | { 76 | type: 'scs-socialbar', 77 | compiler: 'socialbar/socialbar', 78 | canNest: true 79 | }, 80 | { 81 | type: 'scs-gallerygrid', 82 | compiler: 'gallerygrid/gallerygrid', 83 | canNest: true 84 | }, 85 | { 86 | type: 'scs-gallery', 87 | compiler: 'gallery/gallery', 88 | canNest: true 89 | }, 90 | { 91 | type: 'scs-document', 92 | compiler: 'document/document', 93 | canNest: true 94 | } 95 | ]; 96 | 97 | module.exports = componentCompilers; -------------------------------------------------------------------------------- /sites/test/themes/CompTheme/assets/js/topnav.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. 3 | * Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 4 | */ 5 | function renderNode(id, navBar) 6 | { 7 | if (id >= 0) 8 | { 9 | var navNode = SCS.structureMap[id]; 10 | if ( navNode && 11 | ( 12 | ( typeof navNode.hideInNavigation != "boolean" ) || 13 | ( navNode.hideInNavigation === false ) 14 | ) ) 15 | { 16 | var navItem = document.createElement("li"); 17 | var navLink = document.createElement("a"); 18 | var navText = document.createTextNode(navNode.name); 19 | 20 | var linkData = SCSRenderAPI.getPageLinkData(navNode.id) || {}; 21 | if ( linkData.href ) { 22 | navLink.href = linkData.href; 23 | } 24 | if ( linkData.target ) { 25 | navLink.target = linkData.target; 26 | } 27 | 28 | navLink.appendChild(navText); 29 | navItem.appendChild(navLink); 30 | 31 | if (navNode.children.length > 0) 32 | { 33 | var navSub = document.createElement("ul"); 34 | 35 | for (var c = 0; c < navNode.children.length; c++) 36 | { 37 | renderNode(navNode.children[c], navSub); 38 | } 39 | 40 | navItem.appendChild(navSub); 41 | } 42 | navBar.appendChild(navItem); 43 | } 44 | } 45 | } 46 | 47 | function renderNav() 48 | { 49 | var topnav = document.getElementById("topnav"); // expected to be an empty
50 | 51 | if (topnav) 52 | { 53 | var navBar = document.createElement("ul"); 54 | 55 | renderNode(SCS.navigationRoot, navBar); 56 | 57 | topnav.appendChild(navBar); 58 | } 59 | } 60 | 61 | // Must wait for all our script to be ready... 62 | if (document.addEventListener) 63 | { 64 | 65 | document.addEventListener('scsrenderstart', renderNav, false); 66 | } 67 | else if (document.attachEvent) 68 | { 69 | document.documentElement.scsrenderstart = 0; 70 | document.documentElement.attachEvent("onpropertychange", 71 | function(event) 72 | { 73 | if (event && (event.propertyName == "scsrenderstart")) 74 | { 75 | renderNav(); 76 | } 77 | } 78 | ); 79 | } 80 | -------------------------------------------------------------------------------- /sites/bin/msword/cntItmWrdTmplt/word/document.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | -------------------------------------------------------------------------------- /sbom_generation.yaml: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2024, Oracle and/or its affiliates. All rights reserved. 2 | 3 | # This OCI DevOps build specification file [1] generates a Software Bill of Materials (SBOM) of the repository. 4 | # The file is needed to run checks for third-party vulnerabilities and business approval according to Oracle’s GitHub policies. 5 | # [1] https://docs.oracle.com/en-us/iaas/Content/devops/using/build_specs.htm 6 | 7 | version: 0.1 8 | component: build 9 | timeoutInSeconds: 1000 10 | shell: bash 11 | runAs: root 12 | 13 | steps: 14 | - type: Command 15 | name: "Install npm" 16 | command: | 17 | # Install npm version 8.19.4 18 | npm i -g npm@v8.19.4 19 | - type: Command 20 | name: "Install node-cli & unit-testing packages" 21 | command: | 22 | npm install --ignore-scripts 23 | 24 | 25 | - type: Command 26 | name: "Change the ownership of items in the npm cache" 27 | command: | 28 | chown -R 1000:1000 "/root/.npm" 29 | 30 | 31 | - type: Command 32 | name: "Install dependencies & cyclonedx-node-npm package in sites" 33 | command: | 34 | cd sites && npm install && npm install --save-dev @cyclonedx/cyclonedx-npm@1.19.3 35 | - type: Command 36 | name: "Run cyclonedx-node-npm package in sites" 37 | command: | 38 | # For more details, visit https://github.com/CycloneDX/cyclonedx-node-npm/blob/main/README.md 39 | cd sites && npx @cyclonedx/cyclonedx-npm --omit dev --output-format JSON --output-file artifactSBOM.json --spec-version 1.4 40 | 41 | 42 | - type: Command 43 | name: "Download CycloneDX-cli executable and install dependencies" 44 | command: | 45 | wget https://github.com/CycloneDX/cyclonedx-cli/releases/download/v0.24.2/cyclonedx-linux-x64 46 | yum install -y libicu 47 | - type: Command 48 | name: "Merge multiple SBOMs using CycloneDX-cli" 49 | command: | 50 | # For more details, visit https://github.com/CycloneDX/cyclonedx-cli/blob/main/README.md 51 | chmod +x cyclonedx-linux-x64 52 | ./cyclonedx-linux-x64 merge --input-files sites/artifactSBOM.json --output-file merged-bom.json 53 | outputArtifacts: 54 | - name: artifactSBOM 55 | type: BINARY 56 | location: ${OCI_PRIMARY_SOURCE_DIR}/merged-bom.json 57 | -------------------------------------------------------------------------------- /sites/bin/compiler/components/contentsearch/contentsearch.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Confidential and Proprietary for Oracle Corporation 3 | * 4 | * This computer program contains valuable, confidential, and 5 | * proprietary information. Disclosure, use, or reproduction 6 | * without the written authorization of Oracle is prohibited. 7 | * This unpublished work by Oracle is protected by the laws 8 | * of the United States and other countries. If publication 9 | * of this computer program should occur, the following notice 10 | * shall apply: 11 | * 12 | * Copyright (c) 2014 Oracle Corp. 13 | * All rights reserved. 14 | * 15 | * $Id: base-vm.js 167153 2019-01-25 21:29:15Z muralik $ 16 | */ 17 | var fs = require('fs'), 18 | path = require('path'), 19 | Base = require(path.normalize('../base/base')); 20 | 21 | var compilationReporter = require('../../reporter.js'); 22 | 23 | 24 | var ContentSearch = function (compId, compInstance) { 25 | this.init('scs-contentsearch', compId, compInstance); 26 | }; 27 | ContentSearch.prototype = Object.create(Base.prototype); 28 | 29 | ContentSearch.prototype.compile = function () { 30 | // make sure we can compile 31 | if (!this.canCompile) { 32 | return Promise.resolve({ 33 | hydrate: true, 34 | content: '' 35 | }); 36 | } 37 | 38 | // extend the model with any contentsearch specific values 39 | this.searchId = 'scs-search-' + this.id; 40 | this.queryString = ''; // need to get from URL so need some inline script tag 41 | 42 | var contentSearchStyle = this.createContentSearchStyle(this); 43 | this.computedStyleSheet = contentSearchStyle ? '' : ''; 44 | this.searchIconStyle = this.showSearchIcon ? '' : 'display: none;'; 45 | this.showSearchIconValue = this.showSearchIcon ? true : ''; 46 | this.computedStyle = this.computeBorderStyle + ((this.computeBorderStyle || '').indexOf('border-style:') >= 0 ? 'width: 100%' : ''); 47 | 48 | 49 | // compute CSS for content 50 | this.computeContentStyle = this.computedWidthStyle; 51 | 52 | var content = this.renderMustacheTemplate(fs.readFileSync(path.join(__dirname, 'contentsearch.html'), 'utf8')); 53 | 54 | return Promise.resolve({ 55 | hydrate: true, 56 | content: content 57 | }); 58 | }; 59 | 60 | 61 | module.exports = ContentSearch; -------------------------------------------------------------------------------- /sites/bin/compiler/api/ContentComponentAPI.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Confidential and Proprietary for Oracle Corporation 3 | * 4 | * This computer program contains valuable, confidential, and 5 | * proprietary information. Disclosure, use, or reproduction 6 | * without the written authorization of Oracle is prohibited. 7 | * 8 | * Copyright (c) 2014, 2023, Oracle and/or its affiliates. 9 | */ 10 | var SCSComponentAPI = require('./SCSComponentAPI.js').SCSComponentAPI; 11 | var Marked = require('marked'); 12 | var Mustache = require('mustache'); 13 | var fs = require('fs'); 14 | var path = require('path'); 15 | var url = require('url'); 16 | 17 | var ContentComponentAPI = function (compileAPI) { 18 | 19 | // 20 | // implement the version of the _SCSComponentAPI for the builder 21 | // 22 | 23 | this.getRenderMode = function () { 24 | // compiler only supports 'compile' 25 | return this.RENDER_MODE.COMPILE; 26 | }; 27 | 28 | this.checkRenderState = function (state) { 29 | // no other states supported during compile, 30 | // all components are already downloaded so there is no "DRAFT" or "PUBLISED" for accessing the components 31 | return false; 32 | }; 33 | 34 | this.loadResource = async function (args) { 35 | var resource = args.resource; 36 | var fsPath = args.path; 37 | 38 | // if no resource defined, then error 39 | if (resource) { 40 | var resourcePath = fsPath ? path.join(fsPath, resource) : resource; 41 | resourcePath = resourcePath.startsWith('file:') ? url.fileURLToPath(resourcePath) : resourcePath; 42 | 43 | try { 44 | var content = await fs.promises.readFile(resourcePath, { 45 | encoding: 'utf8' 46 | }); 47 | return content; 48 | } catch (e) { 49 | console.log('loadResource: failed to read file', e); 50 | return ''; 51 | } 52 | } else { 53 | console.warn('loadResource: no resource file requested'); 54 | return ''; 55 | } 56 | } 57 | 58 | this.getContentClient = function () { 59 | return compileAPI.getContentClientSync(); 60 | }; 61 | 62 | this.getMustache = function () { 63 | return Mustache; 64 | }; 65 | 66 | this.getMarked = function () { 67 | return Marked && Marked.marked || Marked; 68 | }; 69 | }; 70 | ContentComponentAPI.prototype = Object.create(SCSComponentAPI.prototype); 71 | 72 | 73 | module.exports = ContentComponentAPI; -------------------------------------------------------------------------------- /sites/bin/compiler/components/headline/headline.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Confidential and Proprietary for Oracle Corporation 3 | * 4 | * This computer program contains valuable, confidential, and 5 | * proprietary information. Disclosure, use, or reproduction 6 | * without the written authorization of Oracle is prohibited. 7 | * This unpublished work by Oracle is protected by the laws 8 | * of the United States and other countries. If publication 9 | * of this computer program should occur, the following notice 10 | * shall apply: 11 | * 12 | * Copyright (c) 2019 Oracle Corp. 13 | * All rights reserved. 14 | * 15 | * $Id: gallerygrid.js 166460 2018-12-17 21:50:21Z muralik $ 16 | */ 17 | 18 | var fs = require('fs'), 19 | path = require('path'), 20 | mustache = require('mustache'); 21 | 22 | var compilationReporter = require('../../reporter.js'); 23 | 24 | var Headline = function (args) { 25 | this.componentId = args.componentId; 26 | this.componentInstanceObject = args.componentInstanceObject; 27 | this.componentsFolder = args.componentsFolder; 28 | this.compData = this.componentInstanceObject.data; 29 | }; 30 | 31 | Headline.prototype.compile = function () { 32 | var compId = this.componentId, 33 | customSettingsData = this.compData.customSettingsData, 34 | alignImage = this.compData.componentLayout === 'right' ? 'right' : 'left'; 35 | 36 | return new Promise(function (resolve, reject) { 37 | try { 38 | var dir = __dirname, 39 | templateFile = path.join(dir, 'headline.html'), 40 | template = fs.readFileSync(templateFile, 'utf8'); 41 | 42 | var model = { 43 | contentId: compId + '_content_runtime', 44 | alignCssClass: 'scs-align-' + alignImage, 45 | imageStyle: 'flex-basis:' + customSettingsData.width || '200px', 46 | alignImage: alignImage, 47 | image: '{{{image}}}', 48 | title: '{{{title}}}', 49 | byLine: '{{{byLine}}}' 50 | }; 51 | 52 | var markup = ''; 53 | markup = mustache.render(template, model); 54 | return resolve({ 55 | hydrate: true, 56 | content: markup, 57 | nestedIDs: ['image', 'title', 'byLine'] 58 | }); 59 | } catch (e) { 60 | compilationReporter.error({ 61 | message: 'Headline Component: failed to expand template', 62 | error: e 63 | }); 64 | } 65 | return resolve({}); 66 | }); 67 | }; 68 | 69 | 70 | module.exports = Headline; -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to this repository 2 | 3 | We welcome your contributions! There are multiple ways to contribute. 4 | 5 | ## Opening issues 6 | 7 | For bugs or enhancement requests, please file a GitHub issue unless it's 8 | security related. When filing a bug remember that the better written the bug is, 9 | the more likely it is to be fixed. If you think you've found a security 10 | vulnerability, do not raise a GitHub issue and follow the instructions in our 11 | [security policy](./SECURITY.md). 12 | 13 | ## Contributing code 14 | 15 | We welcome your code contributions. Before submitting code via a pull request, 16 | you will need to have signed the [Oracle Contributor Agreement][OCA] (OCA) and 17 | your commits need to include the following line using the name and e-mail 18 | address you used to sign the OCA: 19 | 20 | ```text 21 | Signed-off-by: Your Name 22 | ``` 23 | 24 | This can be automatically added to pull requests by committing with `--sign-off` 25 | or `-s`, e.g. 26 | 27 | ```text 28 | git commit --signoff 29 | ``` 30 | 31 | Only pull requests from committers that can be verified as having signed the OCA 32 | can be accepted. 33 | 34 | ## Pull request process 35 | 36 | 1. Ensure there is an issue created to track and discuss the fix or enhancement 37 | you intend to submit. 38 | 1. Fork this repository. 39 | 1. Create a branch in your fork to implement the changes. We recommend using 40 | the issue number as part of your branch name, e.g. `1234-fixes`. 41 | 1. Ensure that any documentation is updated with the changes that are required 42 | by your change. 43 | 1. Ensure that any samples are updated if the base image has been changed. 44 | 1. Submit the pull request. *Do not leave the pull request blank*. Explain exactly 45 | what your changes are meant to do and provide simple steps on how to validate. 46 | your changes. Ensure that you reference the issue you created as well. 47 | 1. We will assign the pull request to 2-3 people for review before it is merged. 48 | 49 | ## Code of conduct 50 | 51 | Follow the [Golden Rule](https://en.wikipedia.org/wiki/Golden_Rule). If you'd 52 | like more specific guidelines, see the [Contributor Covenant Code of Conduct][COC]. 53 | 54 | [OCA]: https://oca.opensource.oracle.com 55 | [COC]: https://www.contributor-covenant.org/version/1/4/code-of-conduct/ 56 | -------------------------------------------------------------------------------- /sites/data/test/setupSpec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. 3 | * Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 4 | */ 5 | /* globals browser */ 6 | 7 | var puppeteer = require('puppeteer'), 8 | chai = require('chai'), 9 | expect = chai.expect(), 10 | should = chai.should(), 11 | _ = require('lodash'), 12 | globalVariables = _.pick(global, ['browser', 'expect', 'should', 'serverConfig', 'testConfig']), 13 | testUtils = require('./utils/testUtils.js'); 14 | 15 | // Get test config values from the npm environment. e.g.: 16 | // > npm run test --headless --remote 17 | var testConfig = { 18 | headless: process.env.hasOwnProperty('npm_config_headless') ? process.env.npm_config_headless : false, 19 | remote: process.env.hasOwnProperty('npm_config_remote') ? process.env.npm_config_remote : false 20 | }; 21 | 22 | // puppeteer options 23 | const opts = { 24 | headless: testConfig.headless, 25 | slowMo: 100, 26 | timeout: 180000, 27 | ignoreHTTPSErrors: true, 28 | defaultViewport: { 29 | width: 1280, 30 | height: 960 31 | } 32 | }; 33 | 34 | // 35 | // global test setup 36 | // 37 | global.expect = expect; 38 | global.should = should; 39 | global.testConfig = testConfig; 40 | global.serverConfig = testUtils.getServerConfig(); 41 | 42 | before(function (done) { 43 | this.timeout(180000); 44 | 45 | // bring up the browser to run the tests 46 | puppeteer 47 | .launch(opts) 48 | .then(function (browser) { 49 | global.browser = browser; 50 | }).then(function () { 51 | if (global.testConfig.remote) { 52 | // setup the server environment 53 | return testUtils.loginToServer(global.serverConfig); 54 | } else { 55 | // run with local test server 56 | global.serverConfig.url = "http://localhost:8085"; 57 | return Promise.resolve(); 58 | } 59 | }).then(function () { 60 | done(); 61 | }).catch(function (e) { 62 | console.log(e); 63 | done(1); 64 | }); 65 | }); 66 | 67 | // global teardown 68 | after(function () { 69 | // close the browser 70 | browser.close(); 71 | 72 | // restore globals 73 | global.browser = globalVariables.browser; 74 | global.expect = globalVariables.expect; 75 | global.should = globalVariables.should; 76 | global.serverConfig = globalVariables.serverConfig; 77 | global.testConfig = globalVariables.testConfig; 78 | }); -------------------------------------------------------------------------------- /sites/data/test/templates/templatesSpec.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019 Oracle and/or its affiliates. All rights reserved. 3 | * Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 4 | */ 5 | /* globals serverConfig,browser,testConfig */ 6 | var chai = require('chai'), 7 | expect = chai.expect, 8 | should = chai.should, 9 | fs = require('fs'), 10 | path = require('path'); 11 | 12 | 13 | // utilty function to get all folders in a directory 14 | var getFolders = function (dir) { 15 | return fs.readdirSync(dir) 16 | .filter(function (file) { 17 | return fs.statSync(path.join(dir, file)).isDirectory(); 18 | }); 19 | }; 20 | 21 | describe('Template Tests', function () { 22 | it('templates test setup', async function () { 23 | var page, 24 | templates = getFolders(serverConfig.templatesFolder); 25 | 26 | describe('Validate templates render', function () { 27 | before(async function () { 28 | // create a new tab for all of these tests 29 | page = await browser.newPage(); 30 | }); 31 | after(async function () { 32 | // close the tab after all tests complete 33 | await page.close(); 34 | }); 35 | 36 | // run generic validation against all the templates 37 | if (testConfig.remote) { 38 | // run remote server tests 39 | it('ToDo: implement remote server tests', async function () { 40 | throw new Error('No remote server template tests implemented'); 41 | }); 42 | } else { 43 | // run local server tests 44 | 45 | // run generic validation against all the templates 46 | templates.forEach(function (templateName) { 47 | it('basic template render test for: ' + templateName, async function () { 48 | this.timeout(180000); 49 | 50 | // render the template onto the page 51 | var pageURL = serverConfig.url + '/templates/' + templateName; 52 | await page.goto(pageURL); 53 | 54 | // wait until the "Home" link is visible 55 | try { 56 | await page.waitForFunction('Array.prototype.find.call(document.querySelectorAll("a"), function (node) { return node.innerText.toLowerCase() === "home"; })'); 57 | } catch (e) { 58 | console.log(e); 59 | throw new Error('Failed to locate "Home" page link in template: ' + templateName); 60 | } 61 | 62 | // do any other tests 63 | }); 64 | }); 65 | } 66 | }); 67 | }); 68 | }); -------------------------------------------------------------------------------- /sites/doc/Copy-Site.md: -------------------------------------------------------------------------------- 1 | # Copy a Large Site using Content Toolkit 2 | 3 | # Setup 4 | [Install the Content Toolkit](../README.MD) 5 | ## Create Source in your Local File system 6 | In a directory inside a git / SVN repository, type the following: 7 | 8 | ``` 9 | cec install 10 | ``` 11 | 12 | This will create a source tree, with a package.json, and do an `npm install` to fetch dependencies into the source tree. Update `package.json` to include any further dependencies you may need for your resources. 13 | 14 | ## Setup connections to your OCM instances 15 | 16 | ``` 17 | cec register-server DEV -e https://your-dev-instance.com -u user -p password 18 | cec register-server DEV2 -e https://your-dev2-instance.com -u user -p password 19 | ``` 20 | 21 | Test your connections as follows: 22 | 23 | ``` 24 | cec list --server DEV 25 | ``` 26 | # Create a copy of the site locally 27 | 28 | Create a local template for this site without content assets 29 | 30 | ``` 31 | cec create-template site1Backup -s site1 -x -r DEV 32 | ``` 33 | 34 | Creates scripts to download and upload content in batches 35 | 36 | ``` 37 | cec transfer-site-content site1 -s DEV -d DEV2 -r site1CopyRepo -n 200 38 | ``` 39 | 40 | Execute the script to download the content assets from DEV instance 41 | 42 | ``` 43 | ./site1_downloadcontent 44 | ``` 45 | The name for a batch will be site1_content_batch_[n]. 46 | 47 | # Generate new ID for each asset item and update the references in the template 48 | 49 | ``` 50 | cec update-template rename-asset-id -t site1Backup -c site1_content_batch_0,cafe1_content_batch_1,cafe1_content_batch_2,...,cafe1_content_batch_n 51 | ``` 52 | 53 | # Create a new site on DEV instance 54 | 55 | Create a new repository 56 | 57 | ``` 58 | cec create-repository site1CopyRepo -s DEV 59 | ``` 60 | 61 | Upload the template 62 | 63 | ``` 64 | cec upload-template site1Backup -s DEV 65 | ``` 66 | 67 | Create a new site (copy of site1) 68 | 69 | ``` 70 | cec create-site site1Copy -t site1Backup -r site1CopyRepo -l policy1 -d en-US -s DEV 71 | ``` 72 | 73 | Edit file site1_uploadcontent 74 | 75 | ``` 76 | change site channel "site1" to "site1Copy" 77 | change destination server "DEV2" to "DEV" 78 | ``` 79 | 80 | Upload content assets 81 | ``` 82 | ./site1_uploadcontent 83 | ``` 84 | 85 | The new site site1Copy has a copy of all the assets of site1 and does not have any references to the the original assets 86 | 87 | 88 | 89 | -------------------------------------------------------------------------------- /sites/bin/compiler/components/image-text/image-text.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Confidential and Proprietary for Oracle Corporation 3 | * 4 | * This computer program contains valuable, confidential, and 5 | * proprietary information. Disclosure, use, or reproduction 6 | * without the written authorization of Oracle is prohibited. 7 | * This unpublished work by Oracle is protected by the laws 8 | * of the United States and other countries. If publication 9 | * of this computer program should occur, the following notice 10 | * shall apply: 11 | * 12 | * Copyright (c) 2014 Oracle Corp. 13 | * All rights reserved. 14 | * 15 | * $Id: base-vm.js 167153 2019-01-25 21:29:15Z muralik $ 16 | */ 17 | var fs = require('fs'), 18 | path = require('path'), 19 | mustache = require('mustache'); 20 | 21 | var compilationReporter = require('../../reporter.js'); 22 | 23 | var ImageText = function (args) { 24 | this.componentId = args.componentId; 25 | this.componentInstanceObject = args.componentInstanceObject; 26 | this.componentsFolder = args.componentsFolder; 27 | this.compData = this.componentInstanceObject.data; 28 | }; 29 | 30 | ImageText.prototype.compile = function () { 31 | var compId = this.componentId, 32 | customSettingsData = this.compData.customSettingsData, 33 | layout = this.compData.componentLayout || 'default', 34 | alignImage = layout === 'default' ? 'left' : layout, 35 | showStoryLayout = layout === 'default' || layout === 'right'; 36 | 37 | return new Promise(function (resolve, reject) { 38 | try { 39 | var dir = __dirname, 40 | templateFile = path.join(dir, 'image-text.html'), 41 | template = fs.readFileSync(templateFile, 'utf8'); 42 | 43 | var model = { 44 | contentId: compId + '_content_runtime', 45 | alignCssClass: 'scs-align-' + alignImage, 46 | imageStyle: showStoryLayout ? 'width:' + customSettingsData.width : '', 47 | alignImage: alignImage, 48 | image: '{{{image}}}', 49 | paragraph: '{{{paragraph}}}' 50 | }; 51 | 52 | var markup = ''; 53 | markup = mustache.render(template, model); 54 | return resolve({ 55 | hydrate: true, 56 | content: markup, 57 | nestedIDs: ['image', 'paragraph'] 58 | }); 59 | } catch (e) { 60 | compilationReporter.error({ 61 | message: 'ImageText Component: failed to expand template', 62 | error: e 63 | }); 64 | } 65 | return resolve({}); 66 | }); 67 | }; 68 | 69 | 70 | module.exports = ImageText; -------------------------------------------------------------------------------- /sites/bin/msword/cntItmWrdTmplt/word/glossary/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /sites/test/server/proxyRouter.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. 3 | * Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 4 | */ 5 | 6 | /** 7 | * Router handling /pxysvs requests 8 | * Used in PCS components 9 | */ 10 | var express = require('express'), 11 | serverUtils = require('./serverUtils.js'), 12 | router = express.Router(), 13 | path = require('path'); 14 | 15 | var console = require('./logger.js').console; 16 | 17 | router.get('/*', (req, res) => { 18 | let location, app = req.app, 19 | requestUrl = req.originalUrl; 20 | 21 | if (app.locals.server.env !== 'dev_ec' && !app.locals.server.oauthtoken) { 22 | console.error('No remote EC server access for remote traffic ', requestUrl); 23 | res.end(); 24 | return; 25 | } else if (!app.locals.connectToServer) { 26 | console.error('No remote server for remote traffic ', requestUrl); 27 | res.end(); 28 | return; 29 | } 30 | 31 | console.info('@@@ Proxy Service: ' + req.url); 32 | 33 | if (req.url === '/') { 34 | console.info(' - no proxy service specified'); 35 | res.end(); 36 | return; 37 | } 38 | 39 | location = app.locals.serverURL + requestUrl; 40 | console.info('Proxy Remote traffic:' + location); 41 | 42 | var options = { 43 | method: 'GET', 44 | url: location, 45 | encoding: null, 46 | headers: { 47 | Authorization: serverUtils.getRequestAuthorization(app.locals.server) 48 | } 49 | }; 50 | // console.log(options); 51 | 52 | var request = require('./requestUtils.js').request; 53 | 54 | request.get(options, function (error, response, body) { 55 | if (error) { 56 | console.error('ERROR: request failed:'); 57 | console.error(error); 58 | res.writeHead(response.statusCode, {}); 59 | res.end(); 60 | return; 61 | } 62 | 63 | if (response && response.statusCode === 200) { 64 | var contentType = response.headers.get('Content-Type'); 65 | if (contentType) { 66 | // console.log(' - content type: ' + contentType); 67 | res.set('Content-Type', contentType); 68 | } 69 | res.write(body); 70 | res.end(); 71 | return; 72 | } else { 73 | var data; 74 | try { 75 | data = JSON.parse(body); 76 | } catch (e) { 77 | // handle invalid json 78 | } 79 | var msg = data && (data.title || data.errorMessage) ? (data.title || data.errorMessage) : (response.statusMessage || response.statusCode); 80 | console.error('ERROR: request failed : ' + msg); 81 | res.writeHead(response.statusCode, {}); 82 | res.end(); 83 | return; 84 | } 85 | }); 86 | }); 87 | 88 | // Export the router 89 | module.exports = router; -------------------------------------------------------------------------------- /sites/test/server/sitesRouter.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. 3 | * Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 4 | */ 5 | 6 | /** 7 | * Router handling /sites requests 8 | */ 9 | var express = require('express'), 10 | serverUtils = require('./serverUtils.js'), 11 | router = express.Router(); 12 | 13 | var console = require('./logger.js').console; 14 | 15 | router.get('/*', (req, res) => { 16 | let location, app = req.app, 17 | requestUrl = req.originalUrl; 18 | 19 | console.info('>>> sites GET: ' + requestUrl); 20 | 21 | if (app.locals.server.env !== 'dev_ec' && !app.locals.server.oauthtoken) { 22 | console.error('No remote EC server access for remote traffic ', requestUrl); 23 | res.end(); 24 | return; 25 | } else if (!app.locals.connectToServer) { 26 | console.error('No remote server for remote traffic ', requestUrl); 27 | res.end(); 28 | return; 29 | } 30 | 31 | location = app.locals.serverURL + requestUrl; 32 | console.info('Site Remote traffic:' + location); 33 | 34 | var options = { 35 | method: 'GET', 36 | url: location, 37 | encoding: null, 38 | headers: { 39 | Authorization: serverUtils.getRequestAuthorization(app.locals.server) 40 | } 41 | }; 42 | // console.log(options); 43 | 44 | var request = require('./requestUtils.js').request; 45 | request.get(options, function (error, response, body) { 46 | if (error) { 47 | console.error('ERROR: request failed:'); 48 | console.error(error); 49 | res.writeHead(response.statusCode, {}); 50 | res.end(); 51 | return; 52 | } 53 | 54 | var data; 55 | try { 56 | data = JSON.parse(body); 57 | } catch (e) { 58 | // error 59 | } 60 | 61 | if (response && response.statusCode === 200) { 62 | var contentType = response.headers.get('Content-Type'); 63 | if (contentType) { 64 | // console.log(' - content type: ' + contentType); 65 | res.set('Content-Type', contentType); 66 | } 67 | res.write(body); 68 | res.end(); 69 | return; 70 | } else { 71 | var msg = data && (data.title || data.errorMessage) ? (data.title || data.errorMessage) : (response.statusMessage || response.statusCode); 72 | console.error('ERROR: request failed : ' + msg); 73 | if (data) { 74 | console.error(data); 75 | } else { 76 | console.error(body); 77 | } 78 | res.writeHead(response.statusCode, {}); 79 | res.end(); 80 | return; 81 | } 82 | }); 83 | 84 | }); 85 | 86 | // 87 | // POST requests 88 | // 89 | router.post('/*', (req, res) => { 90 | console.log('>>> sites POST: ' + req.originalUrl + ' Not supported'); 91 | res.writeHead(200, {}); 92 | res.end(); 93 | }); 94 | 95 | // Export the router 96 | module.exports = router; -------------------------------------------------------------------------------- /sites/test/server/systemRouter.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2021 Oracle and/or its affiliates. All rights reserved. 3 | * Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 4 | */ 5 | 6 | /** 7 | * Router handling /system requests 8 | */ 9 | var express = require('express'), 10 | serverUtils = require('./serverUtils.js'), 11 | router = express.Router(); 12 | 13 | var console = require('./logger.js').console; 14 | 15 | router.get('/*', (req, res) => { 16 | let location, app = req.app, 17 | requestUrl = req.originalUrl; 18 | 19 | console.info('~~~ System GET: ' + requestUrl); 20 | 21 | if (app.locals.server.env !== 'dev_ec' && !app.locals.server.oauthtoken) { 22 | console.error('No remote EC server access for remote traffic ', requestUrl); 23 | res.end(); 24 | return; 25 | } else if (!app.locals.connectToServer) { 26 | console.error('No remote server for remote traffic ', requestUrl); 27 | res.end(); 28 | return; 29 | } 30 | 31 | location = app.locals.serverURL + requestUrl; 32 | console.info('System Remote traffic:' + location); 33 | 34 | var options = { 35 | method: 'GET', 36 | url: location, 37 | encoding: null, 38 | headers: { 39 | 'X-REQUESTED-WITH': 'XMLHttpRequest', 40 | Authorization: serverUtils.getRequestAuthorization(app.locals.server) 41 | } 42 | }; 43 | // console.log(options); 44 | 45 | var request = require('./requestUtils.js').request; 46 | request.get(options, function (error, response, body) { 47 | if (error) { 48 | console.error('ERROR: request failed:'); 49 | console.error(error); 50 | res.writeHead(response.statusCode, {}); 51 | res.end(); 52 | return; 53 | } 54 | 55 | var data; 56 | try { 57 | data = JSON.parse(body); 58 | } catch (e) { 59 | // error 60 | } 61 | 62 | if (response && response.statusCode === 200) { 63 | var contentType = response.headers.get('Content-Type'); 64 | if (contentType) { 65 | // console.log(' - content type: ' + contentType); 66 | res.set('Content-Type', contentType); 67 | } 68 | res.write(body); 69 | res.end(); 70 | return; 71 | } else { 72 | var msg = data && (data.title || data.detail) ? (data.detail || data.title) : (response.statusMessage || response.statusCode); 73 | console.error('ERROR: request failed : ' + msg); 74 | if (data) { 75 | console.error(data); 76 | } else { 77 | console.error(body); 78 | } 79 | 80 | res.writeHead(response.statusCode, {}); 81 | res.write(body); 82 | res.end(); 83 | return; 84 | } 85 | }); 86 | 87 | }); 88 | 89 | // 90 | // POST requests 91 | // 92 | router.post('/*', (req, res) => { 93 | console.log('~~~ System POST: ' + req.originalUrl + ' Not supported'); 94 | res.writeHead(200, {}); 95 | res.end(); 96 | }); 97 | 98 | // Export the router 99 | module.exports = router; -------------------------------------------------------------------------------- /sites/bin/compiler/components/divider/divider.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Confidential and Proprietary for Oracle Corporation 3 | * 4 | * This computer program contains valuable, confidential, and 5 | * proprietary information. Disclosure, use, or reproduction 6 | * without the written authorization of Oracle is prohibited. 7 | * This unpublished work by Oracle is protected by the laws 8 | * of the United States and other countries. If publication 9 | * of this computer program should occur, the following notice 10 | * shall apply: 11 | * 12 | * Copyright (c) 2014 Oracle Corp. 13 | * All rights reserved. 14 | * 15 | * $Id: base-vm.js 167153 2019-01-25 21:29:15Z muralik $ 16 | */ 17 | var fs = require('fs'), 18 | path = require('path'), 19 | Base = require(path.normalize('../base/base')); 20 | 21 | var compilationReporter = require('../../reporter.js'); 22 | 23 | 24 | var Divider = function (compId, compInstance) { 25 | this.init('scs-divider', compId, compInstance); 26 | }; 27 | Divider.prototype = Object.create(Base.prototype); 28 | 29 | Divider.prototype.compile = function () { 30 | // make sure we can compile 31 | if (!this.canCompile) { 32 | return Promise.resolve({ 33 | hydrate: true, 34 | content: '' 35 | }); 36 | } 37 | 38 | // extend the model with any divider specific values 39 | this.computedStyle = this.encodeCSS(this.computeStyle()); 40 | 41 | // render the content 42 | var content = this.renderMustacheTemplate(fs.readFileSync(path.join(__dirname, 'divider.html'), 'utf8')); 43 | 44 | return Promise.resolve({ 45 | hydrate: false, 46 | content: content 47 | }); 48 | }; 49 | 50 | Divider.prototype.computeStyle = function () { 51 | var viewModel = this, 52 | computedStyle = 'margin:0px;'; 53 | 54 | // Border and Corners are used only if no Style is chosen 55 | if (viewModel.useStyleClass === 'false') { 56 | // border 57 | if (viewModel.dividerStyle !== 'none') { 58 | // border style/width/color 59 | computedStyle += 'border-style:' + viewModel.dividerStyle + ';'; 60 | 61 | if (viewModel.dividerStyle !== 'solid') { 62 | computedStyle += 'border-width:' + viewModel.height + 'px 0px 0px 0px;'; 63 | } else { 64 | computedStyle += 'border-width:' + Math.floor(viewModel.height / 2) + 'px 0px ' + Math.ceil(viewModel.height / 2) + 'px 0px;'; 65 | } 66 | computedStyle += 'border-color:' + viewModel.dividerColor + ';'; 67 | } 68 | 69 | // border radius (square, radius, or number of pixels) 70 | if (viewModel.dividerRadius === 'rounded') { 71 | computedStyle += 'border-radius:5px;'; 72 | } else if (viewModel.dividerRadius === 'square' || viewModel.dividerStyle !== 'solid') { 73 | computedStyle += 'border-radius:0px;'; 74 | } else { 75 | computedStyle += 'border-radius:' + viewModel.dividerRadius + 'px;'; 76 | } 77 | } 78 | 79 | return computedStyle; 80 | }; 81 | 82 | 83 | module.exports = Divider; -------------------------------------------------------------------------------- /sites/test/sites/CompSite/controller.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 |

The web page is loading. Please stand by.

19 |
20 | 21 | 22 | -------------------------------------------------------------------------------- /sites/test/sites/CompSite/pages/400.json: -------------------------------------------------------------------------------- 1 | { 2 | "base": { 3 | "properties": { 4 | "title": "", 5 | "pageLayout": "index.html", 6 | "pageDescription": "", 7 | "keywords": "", 8 | "hideFromSearchEngines": false, 9 | "header": "", 10 | "footer": "", 11 | "noIndex": false, 12 | "noFollow": false, 13 | "noArchive": false, 14 | "noSnippet": false, 15 | "isCobrowseEnabled": false 16 | }, 17 | "slots": { 18 | "slot-content": { 19 | "components": ["bf1e1130-a647-4d41-9e4b-562b1ab63dd1"], 20 | "grid": "
" 21 | } 22 | }, 23 | "componentInstances": { 24 | "bf1e1130-a647-4d41-9e4b-562b1ab63dd1": { 25 | "type": "scs-component", 26 | "id": "devcsCaaSLayout", 27 | "data": { 28 | "actions": "", 29 | "alignment": "fill", 30 | "assets": "", 31 | "borderColor": "#808080", 32 | "borderRadius": 0, 33 | "borderStyle": "none", 34 | "borderWidth": 1, 35 | "componentId": "", 36 | "componentName": "", 37 | "componentFactory": "", 38 | "componentLayout": "", 39 | "contentId": "", 40 | "contentLayoutCategory": "", 41 | "contentPlaceholder": false, 42 | "contentTypes": [], 43 | "contentViewing": "published", 44 | "customRenderComplete": false, 45 | "customSettingsData": "", 46 | "componentConfig": "", 47 | "description": "", 48 | "detailPageId": "", 49 | "height": "", 50 | "initialized": true, 51 | "isCaaSLayout": true, 52 | "linkType": "scs-link-action", 53 | "marginBottom": 5, 54 | "marginLeft": 5, 55 | "marginRight": 5, 56 | "marginTop": 5, 57 | "nestedComponents": [], 58 | "styleClass": "", 59 | "styleClassName": "", 60 | "seeded": true, 61 | "useStyleClass": "true", 62 | "visible": true, 63 | "visibleNestedComponents": [], 64 | "width": 0, 65 | "contentIds": [], 66 | "contentViewings": ["published"] 67 | } 68 | } 69 | } 70 | }, 71 | "variants": {} 72 | } -------------------------------------------------------------------------------- /sites/doc/IAM-App.md: -------------------------------------------------------------------------------- 1 | # Setup for CLI to use IAM App for connection instead of Headless Chrome 2 | Content Toolkit supports connection via IAM app, which removes the need to pop up Chromium to authenticate. 3 | The following instructions detail how the IAM app can be created and registered for use with the Content Toolkit CLI. 4 | 5 | 1. Log in to the Oracle Cloud Console. 6 | 7 | 2. In the navigation menu, click **Identity & Security**. 8 | 9 | 3. Under **Identity & Security**, click **Domains**. Select the **Compartment** you want to work in from the **List Scope** drop down. 10 | 11 | 4. Click on the domain you want to use to open its **Overview** page. 12 | 13 | 5. Copy the **Domain URL** from the **Domain information** pane. You'll use it later. 14 | 15 | 6. In the **Identity domain**, click **Applications**. 16 | 17 | 7. Click **Add application**. 18 | 19 | 8. In the **Add Application** page, choose **Confidential Application**, click **Launch workflow**. 20 | 21 | 9. In the **Add Confidential Application** page, enter a name for your application and click Next. 22 | 23 | 10. Choose **Configure this application as a client now**. 24 | 25 | 11. Under **Authorization**, select **Resource Owner** and **JWT Assertion**. 26 | 27 | 12. Under **Token issuance policy**, choose **All** for **Authorized Resources**. 28 | 29 | 13. Choose **Add resources**, click **Add scope** 30 | 31 | 14. In **Add scope** pane, find your Oracle Content Management instance and click **>**. 32 | 33 | 15. Select the scope that has the URL with `/urn:opc:...` and then click **Add** 34 | 35 | 16. Click **Next**. 36 | 37 | 17. Click **Finish** 38 | 39 | 18. Under **General Information**, copy **Client ID** and **Client Secret**. You'll need them when you register your server. 40 | 41 | 19. Under **Token issuance policy**, copy **Scope** URL. 42 | 43 | 20. Click **Activate** 44 | 45 | Your IAM domain application has been created. You can now go ahead and register your server. 46 | 47 | # Register your SERVER with the Content Toolkit CLI 48 | 49 | You will need your: 50 | 51 | * **OCM Instance URL**: e.g. https://ocepm-oce1234.cec.ocp.oraclecloud.com 52 | * **Username and Password** for your OCM Instance URL 53 | * **Domain URL**: e.g: https://idcs-1234123412341234123412341234.identity.oraclecloud.com 54 | * **Client ID**: idididididididididididididid 55 | * **Client Secret**: secret-secret-secret-secret-secret 56 | * **Scope URL**: e.g: https://SCOPESCOPESCOPESCOPE.cec.ocp.oraclecloud.com:443/urn:opc:cec:all 57 | 58 | ``` 59 | $ cd your-cec-directory 60 | $ 61 | $ cec register-server NAME --endpoint https://ocepm-oce1234.cec.ocp.oraclecloud.com -u username -p 'password' --domainurl https://idcs-1234123412341234123412341234.identity.oraclecloud.com --clientid idididididididididididididid --clientsecret secret-secret-secret-secret-secret --scope https://SCOPESCOPESCOPESCOPE.cec.ocp.oraclecloud.com:443/urn:opc:cec:all 62 | ``` 63 | 64 | Test your connection 65 | 66 | ``` 67 | $ cec list --server NAME 68 | ``` 69 | -------------------------------------------------------------------------------- /sites/data/build/src-gulpfile.js: -------------------------------------------------------------------------------- 1 | // Gulp and plugins 2 | var gulp = require('gulp'), 3 | del = require('del'), 4 | fs = require('fs'), 5 | path = require('path'), 6 | childProcess = require('child_process'); 7 | 8 | const cecCmd = /^win/.test(process.platform) ? 'cec.cmd' : 'cec'; 9 | 10 | const srcfolder = path.join(__dirname, 'src'), 11 | templatesSrcDir = path.join(srcfolder, 'templates'); 12 | 13 | // utilty function to get all folders in a directory 14 | var getFolders = function (dir) { 15 | return fs.readdirSync(dir) 16 | .filter(function (file) { 17 | return fs.statSync(path.join(dir, file)).isDirectory(); 18 | }); 19 | }; 20 | 21 | // Build a template 22 | // This builds the template's theme and all included components 23 | var buildTemplate = function (templateName) { 24 | return new Promise(function (resolve, reject) { 25 | console.log(); 26 | console.log('Executing: ' + 'cec export-template ' + templateName + ' --optimize'); 27 | var exportTemplate = childProcess.spawnSync(cecCmd, ['export-template', templateName, '--optimize'], { 28 | shell: (process.platform === 'win32'), 29 | stdio: 'inherit' 30 | }); 31 | if (exportTemplate.status) { 32 | // something went wrong with the build 33 | console.log(' - ERROR running "cec export-template -o ' + templateName + '. Process exited with status: ' + exportTemplate.status); 34 | reject(exportTemplate.status); 35 | } else { 36 | resolve(); 37 | } 38 | }); 39 | }; 40 | 41 | gulp.task('build', function (done) { 42 | // get each of the templates in the build 43 | var templates = getFolders(templatesSrcDir); 44 | if (templates.length === 0) { 45 | return done(); 46 | } 47 | 48 | // create a promise for each template 49 | var buildPromises = []; 50 | templates.forEach(function (templateName) { 51 | buildPromises.push(function () { 52 | return buildTemplate(templateName); 53 | }); 54 | }); 55 | 56 | // build each of the templates sequentially 57 | var doBuildTemplates = buildPromises.reduce(function (previousPromise, nextPromise) { 58 | return previousPromise.then(function () { 59 | // wait for the previous promise to complete and then call the function to start executing the next promise 60 | return nextPromise(); 61 | }); 62 | }, 63 | // Start with a previousPromise value that is a resolved promise 64 | Promise.resolve()); 65 | 66 | // wait for all the builds to complete 67 | doBuildTemplates.then(function () { 68 | console.log('Templates Built Successfully.'); 69 | return done(); 70 | }).catch(function (err) { 71 | console.log('Templates Build Failed.'); 72 | return done(1); 73 | }); 74 | 75 | }); 76 | 77 | gulp.task('clean-build', function () { 78 | // remove the build and dist directories 79 | //return del(['./build', './dist']); 80 | 81 | // remove the build directory 82 | return del(['./build']); 83 | }); 84 | 85 | 86 | // 87 | // the default task 88 | // 89 | gulp.task('default', gulp.series('clean-build', gulp.parallel('build'), function (done) { 90 | done(); 91 | })); -------------------------------------------------------------------------------- /sites/test/unit/index.html: -------------------------------------------------------------------------------- 1 | 5 | 6 | 7 | 8 | 9 | 10 | Mocha Tests 11 | 12 | 13 | 14 | 19 | 20 | 21 | 22 |
23 |
24 | 25 | Content Management 26 |
27 | 32 |
33 | 34 |
35 | 36 | 37 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /sites/bin/msword/cntItmWrdTmplt/word/settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /sites/data/components/settings.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | Sample Custom Component 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 |
24 | 25 | 26 | 27 |
28 |
29 |
30 | 31 | 32 |
33 | 34 | 89 | 90 | 91 | 92 | -------------------------------------------------------------------------------- /sites/bin/formatter.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2023 Oracle and/or its affiliates. All rights reserved. 3 | * Licensed under the Universal Permissive License v 1.0 as shown at http://oss.oracle.com/licenses/upl. 4 | */ 5 | 6 | function formatName(name, tag) { 7 | return process.shim && name ? `[!--${tag}--]${name}[/!--${tag}--]` : name; 8 | } 9 | 10 | function sizeColumn(dfltSize, name, tag) { 11 | var numberOfItems = Math.min(Array.isArray(name) ? name.length : (name ? 1 : 0), 5); 12 | 13 | if (process.shim && numberOfItems > 0) { 14 | // dfltSize + ([!--tag.length--][/!--tag.length--]).length * nuber of items 15 | return dfltSize + (((tag.length * 2) + 15) * numberOfItems); 16 | } else { 17 | return dfltSize; 18 | } 19 | } 20 | 21 | var tags = [{ 22 | name: 'channel', 23 | value: 'dsch' 24 | }, { 25 | name: 'taxonomy', 26 | value: 'dstx' 27 | }, { 28 | name: 'asset', 29 | value: 'dsa' 30 | }, { 31 | name: 'component', 32 | value: 'dscp' 33 | }, { 34 | name: 'repository', 35 | value: 'dsr' 36 | }, { 37 | name: 'site', 38 | value: 'dss' 39 | }, { 40 | name: 'theme', 41 | value: 'dsth' 42 | }, { 43 | name: 'template', 44 | value: 'dst' 45 | }, { 46 | name: 'type', 47 | value: 'dstp' 48 | }, { 49 | name: 'category', 50 | value: 'dsct' 51 | }, { 52 | name: 'translationJob', 53 | value: 'dstj' 54 | }, { 55 | }, { 56 | name: 'localizationPolicy', 57 | value: 'dllp' 58 | }, { 59 | name: 'file', 60 | value: 'dsf' 61 | }, { 62 | name: 'folder', 63 | value: 'lfd' 64 | }, { 65 | name: 'exportJob', 66 | value: 'dsej' 67 | }, { 68 | name: 'importJob', 69 | value: 'dsij' 70 | }, { 71 | name: 'bgjob', 72 | value: 'dsbj' 73 | }, { 74 | name: 'fileview', 75 | value: 'fileview' 76 | } 77 | ]; 78 | 79 | var formatter = {}; 80 | 81 | // populate the formatter 82 | tags.forEach((tag) => { 83 | // add in the 'name' formatters 84 | formatter[tag.name + 'Format'] = (name) => { 85 | return formatName(name, tag.value); 86 | }; 87 | 88 | // add in the 'column' sizes 89 | formatter[tag.name + 'ColSize'] = (dfltSize, name) => { 90 | return sizeColumn(dfltSize, name, tag.value); 91 | } 92 | }); 93 | 94 | var systemNames = ['scs-contentitem', 'Default', 'Same as Desktop']; 95 | 96 | // add in any overrides 97 | formatter.componentFormat = (name) => { 98 | if (systemNames.indexOf(name) === -1) { 99 | return formatName(name, 'dscp'); 100 | } else { 101 | return name; 102 | } 103 | }; 104 | formatter.componentColSize = (dfltSize, name) => { 105 | if (systemNames.indexOf(name) === -1) { 106 | return sizeColumn(dfltSize, name, 'dscp'); 107 | } else { 108 | return dfltSize; 109 | } 110 | }; 111 | formatter.categoryFormat = (name, taxonomy) => { 112 | if (process.shim && name && taxonomy) { 113 | return formatName(`${name},${taxonomy}`, 'dsct'); 114 | } else { 115 | return name; 116 | } 117 | }; 118 | formatter.fileFormat = (name, folder) => { 119 | if (process.shim && name) { 120 | return formatName(folder ? `${name},${folder}` : name, 'dsf'); 121 | } else { 122 | return name; 123 | } 124 | }; 125 | formatter.folderFormat = (name, folder) => { 126 | if (process.shim && name) { 127 | return formatName(folder ? `${name},${folder}` : name, 'lfd'); 128 | } else { 129 | return name; 130 | } 131 | }; 132 | 133 | module.exports = formatter; 134 | -------------------------------------------------------------------------------- /sites/bin/compiler/components/video/video.js: -------------------------------------------------------------------------------- 1 | /** 2 | * Confidential and Proprietary for Oracle Corporation 3 | * 4 | * This computer program contains valuable, confidential, and 5 | * proprietary information. Disclosure, use, or reproduction 6 | * without the written authorization of Oracle is prohibited. 7 | * This unpublished work by Oracle is protected by the laws 8 | * of the United States and other countries. If publication 9 | * of this computer program should occur, the following notice 10 | * shall apply: 11 | * 12 | * Copyright (c) 2014 Oracle Corp. 13 | * All rights reserved. 14 | * 15 | * $Id: base-vm.js 167153 2019-01-25 21:29:15Z muralik $ 16 | */ 17 | var fs = require('fs'), 18 | path = require('path'), 19 | constants = require('../common/component-constants'), 20 | Base = require('../base/base'); 21 | 22 | var compilationReporter = require('../../reporter.js'); 23 | 24 | var Video = function (compId, compInstance) { 25 | this.init('scs-video', compId, compInstance); 26 | }; 27 | Video.prototype = Object.create(Base.prototype); 28 | 29 | Video.prototype.compile = function () { 30 | // make sure we can compile 31 | if (!this.canCompileVideo()) { 32 | return Promise.resolve({ 33 | hydrate: true, 34 | content: '' 35 | }); 36 | } 37 | 38 | // extend the model with component specific values 39 | this.computedStyle = this.computeBorderStyle; 40 | this.computedContentStyle = this.computedWidthStyle; 41 | this.computedHtml = this.computeHtml(); 42 | 43 | this.dataAnalyticsView = this.addAnalytics({ 44 | 'view': this.contentId, 45 | }); 46 | 47 | // render the content 48 | var content = ''; 49 | 50 | if (this.hasVisualData()) { 51 | content = this.renderMustacheTemplate(fs.readFileSync(path.join(__dirname, 'video.html'), 'utf8')); 52 | } 53 | 54 | return Promise.resolve({ 55 | hydrate: false, 56 | content: content 57 | }); 58 | }; 59 | Video.prototype.canCompileVideo = function () { 60 | // can't compile digital asset videos as they may be advanced videos 61 | // ToDo: Look at making the additional query to determine if advanced video and compile standard video digital assets 62 | var isDigitialAssetVideo = this.contentId; 63 | 64 | return this.canCompile && !isDigitialAssetVideo; 65 | }; 66 | 67 | Video.prototype.hasVisualData = function () { 68 | return this.videoUrl && this.isHybridLink(this.videoUrl) || this.validateFilename(this.videoUrl); 69 | }; 70 | 71 | Video.prototype.computeStyle = function () { 72 | return this.computeBorderStyle; 73 | }; 74 | 75 | Video.prototype.computeHtml = function () { 76 | var viewModel = this; 77 | 78 | var t = '