├── jscript ├── angular │ ├── editor │ │ ├── src │ │ │ ├── assets │ │ │ │ └── .gitkeep │ │ │ ├── environments │ │ │ │ ├── environment.prod.ts │ │ │ │ └── environment.ts │ │ │ ├── styles.scss │ │ │ ├── favicon.ico │ │ │ ├── app │ │ │ │ ├── app.component.html │ │ │ │ ├── app.component.scss │ │ │ │ ├── app.module.ts │ │ │ │ └── app.component.ts │ │ │ ├── main.ts │ │ │ ├── index.html │ │ │ └── test.ts │ │ ├── .editorconfig │ │ ├── tsconfig.app.json │ │ ├── tsconfig.spec.json │ │ ├── .browserslistrc │ │ ├── .gitignore │ │ └── tsconfig.json │ └── sample-blog │ │ ├── src │ │ ├── assets │ │ │ └── .gitkeep │ │ ├── app │ │ │ ├── app.component.scss │ │ │ ├── page │ │ │ │ ├── page.component.scss │ │ │ │ ├── page.component.html │ │ │ │ └── page.component.ts │ │ │ ├── post │ │ │ │ ├── post.component.scss │ │ │ │ ├── post.component.html │ │ │ │ └── post.component.ts │ │ │ ├── page-site │ │ │ │ ├── page-site.component.scss │ │ │ │ └── page-site.component.html │ │ │ ├── post-site │ │ │ │ ├── post-site.component.scss │ │ │ │ └── post-site.component.html │ │ │ ├── posts-site │ │ │ │ ├── posts-site.component.scss │ │ │ │ ├── posts-site.component.html │ │ │ │ └── posts-site.component.ts │ │ │ ├── top-nav │ │ │ │ ├── top-nav.component.scss │ │ │ │ ├── top-nav.component.html │ │ │ │ └── top-nav.component.ts │ │ │ ├── app.component.ts │ │ │ ├── app.component.html │ │ │ └── app-routing.module.ts │ │ ├── styles.scss │ │ ├── environments │ │ │ ├── environment.prod.ts │ │ │ └── environment.ts │ │ ├── favicon.ico │ │ ├── main.ts │ │ ├── index.html │ │ └── test.ts │ │ ├── .editorconfig │ │ ├── tsconfig.app.json │ │ ├── tsconfig.spec.json │ │ ├── .browserslistrc │ │ ├── tsconfig.json │ │ └── .gitignore ├── react │ ├── sample-blog │ │ ├── src │ │ │ ├── index.css │ │ │ ├── components │ │ │ │ ├── index.js │ │ │ │ ├── Page.js │ │ │ │ ├── Post.js │ │ │ │ ├── TopNav.js │ │ │ │ ├── PostSite.js │ │ │ │ ├── PageSite.js │ │ │ │ └── PostsSite.js │ │ │ ├── setupTests.js │ │ │ └── index.js │ │ ├── public │ │ │ ├── robots.txt │ │ │ ├── favicon.ico │ │ │ ├── logo192.png │ │ │ ├── logo512.png │ │ │ └── manifest.json │ │ ├── .gitignore │ │ └── package.json │ ├── sample-graphql-codegen │ │ ├── src │ │ │ ├── index.css │ │ │ ├── __generated__ │ │ │ │ └── index.ts │ │ │ ├── graphql │ │ │ │ └── hotel.graphql │ │ │ ├── index.tsx │ │ │ ├── config │ │ │ │ └── config.ts │ │ │ ├── vite-env.d.ts │ │ │ └── app.tsx │ │ ├── .prettierignore │ │ ├── public │ │ │ ├── robots.txt │ │ │ └── image.png │ │ ├── tsconfig.json │ │ ├── .prettierrc │ │ ├── .env │ │ ├── .env.production │ │ ├── vite.config.ts │ │ ├── index.html │ │ ├── eslint.config.ts │ │ ├── tsconfig.node.json │ │ ├── tsconfig.app.json │ │ └── README.md │ ├── sample-compose │ │ ├── src │ │ │ ├── react-app-env.d.ts │ │ │ ├── pages │ │ │ │ ├── editor │ │ │ │ │ └── EditorPage.css │ │ │ │ ├── root │ │ │ │ │ └── RootPage.tsx │ │ │ │ ├── error │ │ │ │ │ └── ErrorPage.tsx │ │ │ │ ├── post │ │ │ │ │ └── PostPage.tsx │ │ │ │ └── hotel │ │ │ │ │ └── HotelPage.tsx │ │ │ ├── index.css │ │ │ ├── setupTests.ts │ │ │ ├── shared │ │ │ │ ├── index.ts │ │ │ │ ├── Page.tsx │ │ │ │ ├── NavLink.tsx │ │ │ │ ├── Destination.tsx │ │ │ │ └── Post.tsx │ │ │ └── utils │ │ │ │ ├── index.ts │ │ │ │ ├── content.ts │ │ │ │ ├── types.ts │ │ │ │ ├── deferred.ts │ │ │ │ └── graphql-fields.ts │ │ ├── public │ │ │ ├── robots.txt │ │ │ ├── favicon.ico │ │ │ ├── logo192.png │ │ │ ├── logo512.png │ │ │ └── manifest.json │ │ ├── screenshots │ │ │ ├── editor1.png │ │ │ ├── editor2.png │ │ │ ├── graphql.png │ │ │ └── scripts.png │ │ ├── .gitignore │ │ └── tsconfig.json │ ├── sample-hotels │ │ ├── public │ │ │ ├── robots.txt │ │ │ ├── favicon.ico │ │ │ ├── logo192.png │ │ │ ├── logo512.png │ │ │ └── manifest.json │ │ ├── src │ │ │ ├── index.css │ │ │ ├── components │ │ │ │ ├── Subscribe.jsx │ │ │ │ ├── index.js │ │ │ │ ├── Page.jsx │ │ │ │ ├── Post.jsx │ │ │ │ ├── HotelSite.jsx │ │ │ │ ├── PostSite.jsx │ │ │ │ └── PageSite.jsx │ │ │ ├── setupTests.js │ │ │ └── index.js │ │ ├── .gitignore │ │ └── package.json │ └── .editorconfig └── vue │ └── sample-blog │ ├── babel.config.js │ ├── public │ ├── favicon.ico │ └── index.html │ ├── src │ ├── assets │ │ └── logo.png │ ├── main.js │ ├── components │ │ ├── Page.vue │ │ ├── Post.vue │ │ ├── TopNav.vue │ │ └── PostsSite.vue │ ├── App.vue │ └── router │ │ └── index.js │ ├── .gitignore │ └── README.md ├── editors ├── markdown │ ├── src │ │ ├── style.css │ │ ├── vite-env.d.ts │ │ └── types.d.ts │ ├── docker-run.ps1 │ ├── public │ │ └── favicon.ico │ ├── vite.config.js │ ├── .gitignore │ ├── .eslintrc.cjs │ ├── index.html │ ├── tsconfig.json │ └── package.json ├── richtext │ ├── src │ │ ├── style.css │ │ └── vite-env.d.ts │ ├── docker-run.ps1 │ ├── public │ │ └── favicon.ico │ ├── vite.config.js │ ├── .gitignore │ ├── .eslintrc.cjs │ ├── tsconfig.json │ ├── index.html │ └── package.json ├── .editorconfig └── community │ ├── food-startup-category-list.json │ └── ls.json ├── csharp ├── Sample.Blog │ ├── Sample.Blog │ │ ├── wwwroot │ │ │ ├── css │ │ │ │ └── site.css │ │ │ └── favicon.ico │ │ ├── Views │ │ │ ├── _ViewStart.cshtml │ │ │ ├── _ViewImports.cshtml │ │ │ ├── Home │ │ │ │ ├── Page.cshtml │ │ │ │ ├── Post.cshtml │ │ │ │ └── Posts.cshtml │ │ │ └── Shared │ │ │ │ └── Error.cshtml │ │ ├── appsettings.json │ │ ├── Models │ │ │ ├── PageVM.cs │ │ │ ├── PostVM.cs │ │ │ ├── Page.cs │ │ │ ├── BlogPost.cs │ │ │ ├── ErrorVM.cs │ │ │ ├── PostsVM.cs │ │ │ ├── IApiClient.cs │ │ │ ├── PageData.cs │ │ │ └── BlogPostData.cs │ │ ├── Sample.Blog.csproj │ │ └── Program.cs │ ├── Readme.md │ └── stylecop.json ├── Sample.Profile │ ├── Sample.Profile │ │ ├── Views │ │ │ ├── _ViewStart.cshtml │ │ │ └── _ViewImports.cshtml │ │ ├── wwwroot │ │ │ ├── favicon.ico │ │ │ └── assets │ │ │ │ ├── images │ │ │ │ ├── arrow.png │ │ │ │ ├── power-by.png │ │ │ │ ├── ajax-loader.gif │ │ │ │ ├── email-icon.png │ │ │ │ ├── placeholder.jpg │ │ │ │ ├── social-blog.png │ │ │ │ ├── social-github.png │ │ │ │ ├── social-twitter.png │ │ │ │ ├── social-linkedin.png │ │ │ │ └── social-googleplus.png │ │ │ │ └── fonts │ │ │ │ ├── Stolzl-Bold.eot │ │ │ │ ├── Stolzl-Bold.otf │ │ │ │ ├── Stolzl-Bold.ttf │ │ │ │ ├── Stolzl-Bold.woff │ │ │ │ ├── Stolzl-Book.eot │ │ │ │ ├── Stolzl-Book.otf │ │ │ │ ├── Stolzl-Book.ttf │ │ │ │ ├── Stolzl-Book.woff │ │ │ │ ├── Stolzl-Light.eot │ │ │ │ ├── Stolzl-Light.otf │ │ │ │ ├── Stolzl-Light.ttf │ │ │ │ ├── Stolzl-Bold.woff2 │ │ │ │ ├── Stolzl-Book.woff2 │ │ │ │ ├── Stolzl-Light.woff │ │ │ │ ├── Stolzl-Light.woff2 │ │ │ │ ├── Stolzl-Medium.eot │ │ │ │ ├── Stolzl-Medium.otf │ │ │ │ ├── Stolzl-Medium.ttf │ │ │ │ ├── Stolzl-Medium.woff │ │ │ │ ├── Stolzl-Medium.woff2 │ │ │ │ ├── Stolzl-Regular.eot │ │ │ │ ├── Stolzl-Regular.otf │ │ │ │ ├── Stolzl-Regular.ttf │ │ │ │ ├── Stolzl-Regular.woff │ │ │ │ ├── Stolzl-Regular.woff2 │ │ │ │ ├── FontAwesome │ │ │ │ ├── FontAwesome.otf │ │ │ │ ├── fontawesome-webfont.eot │ │ │ │ ├── fontawesome-webfont.ttf │ │ │ │ ├── fontawesome-webfont.woff │ │ │ │ └── fontawesome-webfont.woff2 │ │ │ │ ├── revelstoke-condensed-webfont.eot │ │ │ │ ├── revelstoke-condensed-webfont.ttf │ │ │ │ ├── revelstoke-condensed-webfont.woff │ │ │ │ └── revelstoke-condensed-webfont.woff2 │ │ ├── appsettings.json │ │ ├── Models │ │ │ ├── ErrorViewModel.cs │ │ │ ├── Skill.cs │ │ │ └── HomeVM.cs │ │ └── Program.cs │ ├── .dockerignore │ ├── Dockerfile │ ├── stylecop.json │ └── Readme.md ├── Squidex.ClientLibrary │ ├── Squidex.ClientLibrary │ │ ├── logo-squared.png │ │ ├── Properties │ │ │ └── Properties.cs │ │ ├── Utils │ │ │ ├── HttpMethodEx.cs │ │ │ ├── NamedId.cs │ │ │ └── Actor.cs │ │ ├── EnrichedEvents │ │ │ ├── EnrichedManualEvent.cs │ │ │ ├── IEnrichedEntityEvent.cs │ │ │ ├── EnrichedUsageExceededEvent.cs │ │ │ ├── EnrichedCommentEvent.cs │ │ │ ├── EnrichedSchemaEvent.cs │ │ │ ├── EnrichedUserEventBase.cs │ │ │ ├── EnrichedSchemaEventBase.cs │ │ │ └── EnrichedAssetEventType.cs │ │ ├── Component.cs │ │ ├── DynamicData.cs │ │ ├── DynamicContent.cs │ │ ├── ExtendableRulesDto.cs │ │ ├── GraphQlResponse.cs │ │ ├── Configuration │ │ │ └── IHttpClientProvider.cs │ │ └── KeepCasingAttribute.cs │ ├── Squidex.ClientLibrary.ServiceExtensions │ │ ├── logo-squared.png │ │ ├── HttpClientProvider.cs │ │ └── SquidexOptionsValidator.cs │ ├── README.md │ ├── Squidex.ClientLibrary.Tests │ │ ├── TestFile.json │ │ └── EnrichedEvents │ │ │ ├── EnrichedEventsTests.Should_deserialize_EnrichedCommentEvent.verified.txt │ │ │ ├── EnrichedEventsTests.Should_deserialize_EnrichedAssetEvent.verified.txt │ │ │ └── EnrichedEventsTests.Should_deserialize_EnrichedContentEvent.verified.txt │ ├── stylecop.json │ └── CodeGeneration │ │ ├── CustomPropertyNameGenerator.cs │ │ ├── CustomTagNameGenerator.cs │ │ └── CodeCleaner.cs ├── Integration.Localize │ ├── Integration.Localize │ │ ├── appsettings.json │ │ ├── Program.cs │ │ ├── Integration.Localize.csproj │ │ └── Controllers │ │ │ └── DefaultController.Health.cs │ ├── .dockerignore │ ├── Dockerfile │ ├── stylecop.json │ └── CodeGeneration │ │ └── CodeGeneration.csproj ├── Sample.Jscript │ ├── Sample.Jscript │ │ ├── Sample.Jscript.csproj │ │ ├── wwwroot │ │ │ └── index.html │ │ ├── Program.cs │ │ └── Startup.cs │ └── stylecop.json └── stylecop.json ├── node ├── proxy │ ├── .dockerignore │ ├── Dockerfile │ ├── tsconfig.json │ ├── package.json │ └── config.ts └── graphql-codegen-csharp │ ├── .prettierignore │ ├── tsconfig.json │ ├── .prettierrc │ ├── .env │ ├── .gitignore │ ├── eslint.config.ts │ ├── tsconfig.node.json │ ├── README.md │ └── package.json ├── cli └── Squidex.CLI │ ├── Squidex.CLI │ ├── logo-squared.png │ └── Commands │ │ └── Implementation │ │ └── OpenLibrary │ │ └── Structure │ │ └── schemas │ │ └── __schema.json │ ├── Squidex.CLI.Core │ ├── logo-squared.png │ ├── Configuration │ │ ├── ConfigurationModel.cs │ │ ├── IConfigurationStore.cs │ │ ├── ConfiguredApp.cs │ │ ├── IConfigurationService.cs │ │ └── Session.cs │ ├── Properties │ │ └── Properties.cs │ └── Commands │ │ └── Implementation │ │ ├── Sync │ │ ├── ContentAction.cs │ │ ├── Assets │ │ │ └── AssetsModel.cs │ │ ├── Schemas │ │ │ ├── SchemaModel.cs │ │ │ └── SchemaCreateModel.cs │ │ ├── App │ │ │ ├── AppContributorModel.cs │ │ │ ├── AppClientModel.cs │ │ │ ├── AppRoleModel.cs │ │ │ └── AssetScriptsModel.cs │ │ ├── InheritanceAttribute.cs │ │ ├── AssetFolders │ │ │ └── AssetFoldersModel.cs │ │ ├── Contents │ │ │ ├── ContentsModel.cs │ │ │ └── ContentModel.cs │ │ ├── SyncOptions.cs │ │ ├── ISynchronizer.cs │ │ └── GuidFixProcessor.cs │ │ ├── AI │ │ ├── SimplifiedImage.cs │ │ ├── IQueryCache.cs │ │ └── GeneratedContent.cs │ │ ├── ImExport │ │ ├── IImportSettings.cs │ │ └── IExportSettings.cs │ │ ├── ILogLine.cs │ │ ├── ISession.cs │ │ ├── FileSystem │ │ ├── IFile.cs │ │ └── IFileSystem.cs │ │ ├── CLIException.cs │ │ └── ILogger.cs │ ├── build.ps1 │ ├── stylecop.json │ └── Directory.Build.props ├── .dockerignore ├── .gitignore ├── .github └── workflows │ ├── check-updates.yml │ ├── sdk.yml │ └── editors.yml └── README.md /jscript/angular/editor/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/assets/.gitkeep: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/page/page.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/post/post.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/page-site/page-site.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/post-site/post-site.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/posts-site/posts-site.component.scss: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /editors/markdown/src/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: white; 3 | } -------------------------------------------------------------------------------- /editors/markdown/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /editors/richtext/src/style.css: -------------------------------------------------------------------------------- 1 | body { 2 | background-color: white; 3 | } -------------------------------------------------------------------------------- /editors/richtext/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /editors/markdown/src/types.d.ts: -------------------------------------------------------------------------------- 1 | declare module 'simplemde/dist/simplemde.min.js'; -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/styles.scss: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 100px; 3 | } -------------------------------------------------------------------------------- /jscript/react/sample-blog/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 100px; 3 | } -------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding: 0; 3 | } 4 | -------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 100px; 3 | } -------------------------------------------------------------------------------- /editors/markdown/docker-run.ps1: -------------------------------------------------------------------------------- 1 | docker run -p 3100:80 -v ${pwd}/dist:/usr/share/caddy/ caddy -------------------------------------------------------------------------------- /editors/richtext/docker-run.ps1: -------------------------------------------------------------------------------- 1 | docker run -p 3100:80 -v ${pwd}/dist:/usr/share/caddy/ caddy -------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "_Layout"; 3 | } 4 | -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/Views/_ViewStart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = null; 3 | } 4 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/src/react-app-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/src/pages/editor/EditorPage.css: -------------------------------------------------------------------------------- 1 | .editor { 2 | min-height: 500px; 3 | } -------------------------------------------------------------------------------- /node/proxy/.dockerignore: -------------------------------------------------------------------------------- 1 | # Build results 2 | dist 3 | 4 | # NodeJS 5 | node_modules 6 | 7 | .vscode -------------------------------------------------------------------------------- /jscript/react/sample-blog/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | -------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/.prettierignore: -------------------------------------------------------------------------------- 1 | dist 2 | *.md 3 | node_modules 4 | src/__generated__/ -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/top-nav/top-nav.component.scss: -------------------------------------------------------------------------------- 1 | :host { 2 | margin-right: auto; 3 | } 4 | -------------------------------------------------------------------------------- /jscript/react/sample-hotels/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | -------------------------------------------------------------------------------- /node/graphql-codegen-csharp/.prettierignore: -------------------------------------------------------------------------------- 1 | dist 2 | *.md 3 | node_modules 4 | src/__generated__/ 5 | dotnet-codegen -------------------------------------------------------------------------------- /jscript/angular/editor/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /jscript/angular/editor/src/styles.scss: -------------------------------------------------------------------------------- 1 | /* You can add global styles to this file, and also import other style files */ 2 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/environments/environment.prod.ts: -------------------------------------------------------------------------------- 1 | export const environment = { 2 | production: true 3 | }; 4 | -------------------------------------------------------------------------------- /jscript/react/.editorconfig: -------------------------------------------------------------------------------- 1 | # http://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | indent_style = space 6 | indent_size = 4 -------------------------------------------------------------------------------- /jscript/react/sample-compose/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-bottom: 0; 3 | padding-top: 100px !important; 4 | } 5 | -------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/src/__generated__/index.ts: -------------------------------------------------------------------------------- 1 | export * from "./fragment-masking"; 2 | export * from "./gql"; -------------------------------------------------------------------------------- /editors/markdown/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/editors/markdown/public/favicon.ico -------------------------------------------------------------------------------- /editors/richtext/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/editors/richtext/public/favicon.ico -------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/public/robots.txt: -------------------------------------------------------------------------------- 1 | # https://www.robotstxt.org/robotstxt.html 2 | User-agent: * 3 | Disallow: 4 | -------------------------------------------------------------------------------- /jscript/vue/sample-blog/babel.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | presets: [ 3 | '@vue/cli-plugin-babel/preset' 4 | ] 5 | } 6 | -------------------------------------------------------------------------------- /node/graphql-codegen-csharp/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [{ "path": "./tsconfig.node.json" }] 4 | } 5 | -------------------------------------------------------------------------------- /jscript/angular/editor/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/jscript/angular/editor/src/favicon.ico -------------------------------------------------------------------------------- /jscript/angular/editor/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 | {{form.value}}  5 |
6 | -------------------------------------------------------------------------------- /jscript/vue/sample-blog/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/jscript/vue/sample-blog/public/favicon.ico -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI/logo-squared.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/cli/Squidex.CLI/Squidex.CLI/logo-squared.png -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/jscript/angular/sample-blog/src/favicon.ico -------------------------------------------------------------------------------- /jscript/react/sample-blog/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/jscript/react/sample-blog/public/favicon.ico -------------------------------------------------------------------------------- /jscript/react/sample-blog/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/jscript/react/sample-blog/public/logo192.png -------------------------------------------------------------------------------- /jscript/react/sample-blog/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/jscript/react/sample-blog/public/logo512.png -------------------------------------------------------------------------------- /jscript/vue/sample-blog/src/assets/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/jscript/vue/sample-blog/src/assets/logo.png -------------------------------------------------------------------------------- /jscript/react/sample-compose/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/jscript/react/sample-compose/public/favicon.ico -------------------------------------------------------------------------------- /jscript/react/sample-compose/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/jscript/react/sample-compose/public/logo192.png -------------------------------------------------------------------------------- /jscript/react/sample-compose/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/jscript/react/sample-compose/public/logo512.png -------------------------------------------------------------------------------- /jscript/react/sample-hotels/public/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/jscript/react/sample-hotels/public/favicon.ico -------------------------------------------------------------------------------- /jscript/react/sample-hotels/public/logo192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/jscript/react/sample-hotels/public/logo192.png -------------------------------------------------------------------------------- /jscript/react/sample-hotels/public/logo512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/jscript/react/sample-hotels/public/logo512.png -------------------------------------------------------------------------------- /jscript/react/sample-hotels/src/index.css: -------------------------------------------------------------------------------- 1 | body { 2 | padding-top: 100px; 3 | } 4 | 5 | img { 6 | max-width: 100%; 7 | max-height: 100%; 8 | } -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/logo-squared.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/cli/Squidex.CLI/Squidex.CLI.Core/logo-squared.png -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/page/page.component.html: -------------------------------------------------------------------------------- 1 |
2 |

{{page.title}}

3 | 4 |
5 |
-------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Blog/Sample.Blog/wwwroot/favicon.ico -------------------------------------------------------------------------------- /jscript/react/sample-compose/screenshots/editor1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/jscript/react/sample-compose/screenshots/editor1.png -------------------------------------------------------------------------------- /jscript/react/sample-compose/screenshots/editor2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/jscript/react/sample-compose/screenshots/editor2.png -------------------------------------------------------------------------------- /jscript/react/sample-compose/screenshots/graphql.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/jscript/react/sample-compose/screenshots/graphql.png -------------------------------------------------------------------------------- /jscript/react/sample-compose/screenshots/scripts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/jscript/react/sample-compose/screenshots/scripts.png -------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/public/image.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/jscript/react/sample-graphql-codegen/public/image.png -------------------------------------------------------------------------------- /node/graphql-codegen-csharp/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "singleQuote": true, 6 | "semi": false 7 | } 8 | -------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using Sample.Blog 2 | @using Sample.Blog.Models 3 | 4 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 5 | -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/favicon.ico -------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "files": [], 3 | "references": [{ "path": "./tsconfig.app.json" }, { "path": "./tsconfig.node.json" }] 4 | } 5 | -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/Views/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using Sample.Profile 2 | @using Sample.Profile.Models 3 | @addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers 4 | -------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/.prettierrc: -------------------------------------------------------------------------------- 1 | { 2 | "printWidth": 100, 3 | "tabWidth": 2, 4 | "useTabs": false, 5 | "singleQuote": true, 6 | "semi": false 7 | } 8 | -------------------------------------------------------------------------------- /editors/.editorconfig: -------------------------------------------------------------------------------- 1 | # NOTE: Requires **VS2019 16.3** or later 2 | 3 | # Squidex Rules 4 | # Description: Squidex Rules 5 | 6 | [*.html] 7 | indent_style = space 8 | indent_size = 4 9 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/logo-squared.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/logo-squared.png -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/arrow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/arrow.png -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/power-by.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/power-by.png -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Bold.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Bold.eot -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Bold.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Bold.otf -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Bold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Bold.ttf -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Bold.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Bold.woff -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Book.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Book.eot -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Book.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Book.otf -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Book.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Book.ttf -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Book.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Book.woff -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Light.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Light.eot -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Light.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Light.otf -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Light.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Light.ttf -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/ajax-loader.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/ajax-loader.gif -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/email-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/email-icon.png -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/placeholder.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/placeholder.jpg -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/social-blog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/social-blog.png -------------------------------------------------------------------------------- /node/graphql-codegen-csharp/.env: -------------------------------------------------------------------------------- 1 | NODE_ENV=development 2 | URL=https://cloud.squidex.io 3 | APP_NAME=sample-blog 4 | CLIENT_ID=sample-blog:blog 5 | CLIENT_SECRET=ZxmQGgouOUmyVU4fh38QOCqKja3IH1vPu1dUx40KDec= -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Bold.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Bold.woff2 -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Book.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Book.woff2 -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Light.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Light.woff -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Light.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Light.woff2 -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Medium.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Medium.eot -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Medium.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Medium.otf -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Medium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Medium.ttf -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Medium.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Medium.woff -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Medium.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Medium.woff2 -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Regular.eot -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Regular.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Regular.otf -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Regular.ttf -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Regular.woff -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/social-github.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/social-github.png -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/social-twitter.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/social-twitter.png -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/Stolzl-Regular.woff2 -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/social-linkedin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/social-linkedin.png -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/social-googleplus.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/images/social-googleplus.png -------------------------------------------------------------------------------- /editors/community/food-startup-category-list.json: -------------------------------------------------------------------------------- 1 | [ 2 | "/food-delivery/", 3 | "/table-booking/", 4 | "/food-logistics/", 5 | "/food-production/", 6 | "/cloud-kitchen/", 7 | "/food-sustainability/", 8 | ] 9 | -------------------------------------------------------------------------------- /jscript/react/sample-blog/src/components/index.js: -------------------------------------------------------------------------------- 1 | export * from './Page'; 2 | export * from './PageSite'; 3 | export * from './Post'; 4 | export * from './PostSite'; 5 | export * from './PostsSite'; 6 | export * from './TopNav'; -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/FontAwesome/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/FontAwesome/FontAwesome.otf -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary.ServiceExtensions/logo-squared.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Squidex.ClientLibrary/Squidex.ClientLibrary.ServiceExtensions/logo-squared.png -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/revelstoke-condensed-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/revelstoke-condensed-webfont.eot -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/revelstoke-condensed-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/revelstoke-condensed-webfont.ttf -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/revelstoke-condensed-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/revelstoke-condensed-webfont.woff -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/revelstoke-condensed-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/revelstoke-condensed-webfont.woff2 -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/FontAwesome/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/FontAwesome/fontawesome-webfont.eot -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/FontAwesome/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/FontAwesome/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/FontAwesome/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/FontAwesome/fontawesome-webfont.woff -------------------------------------------------------------------------------- /csharp/Integration.Localize/Integration.Localize/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "Logging": { 3 | "LogLevel": { 4 | "Default": "Information", 5 | "Microsoft.AspNetCore": "Warning" 6 | } 7 | }, 8 | "AllowedHosts": "*" 9 | } 10 | -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/FontAwesome/fontawesome-webfont.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/Squidex/squidex-samples/HEAD/csharp/Sample.Profile/Sample.Profile/wwwroot/assets/fonts/FontAwesome/fontawesome-webfont.woff2 -------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/Views/Home/Page.cshtml: -------------------------------------------------------------------------------- 1 | @model PageVM 2 | 3 | @{ 4 | ViewData["Title"] = Model.Page.Data.Title; 5 | } 6 | 7 |
8 |

@Model.Page.Data.Title

9 | 10 | @Html.Raw(Model.Page.Data.Text) 11 |
-------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/Views/Home/Post.cshtml: -------------------------------------------------------------------------------- 1 | @model PostVM 2 | 3 | @{ 4 | ViewData["Title"] = Model.Post.Data.Title; 5 | } 6 | 7 |
8 |

@Model.Post.Data.Title

9 | 10 | @Html.Raw(Model.Post.Data.Text) 11 |
-------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/src/graphql/hotel.graphql: -------------------------------------------------------------------------------- 1 | query pageQuery { 2 | queryPagesContentsWithTotal { 3 | total 4 | items { 5 | id 6 | flatData { 7 | title 8 | text 9 | } 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /jscript/vue/sample-blog/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import App from './App.vue' 3 | import router from './router' 4 | 5 | Vue.config.productionTip = false 6 | 7 | new Vue({ 8 | router, 9 | render: h => h(App) 10 | }).$mount('#app') 11 | -------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "url": "https://cloud.squidex.io", 4 | "appName": "sample-blog", 5 | "clientId": "sample-blog:blog", 6 | "clientSecret": "ZxmQGgouOUmyVU4fh38QOCqKja3IH1vPu1dUx40KDec=" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/.env: -------------------------------------------------------------------------------- 1 | NODE_ENV=development 2 | VITE_APP_TITLE=sample-graphql-codegen 3 | VITE_URL=https://cloud.squidex.io 4 | VITE_APP_NAME=sample-blog 5 | VITE_CLIENT_ID=sample-blog:blog 6 | VITE_CLIENT_SECRET=ZxmQGgouOUmyVU4fh38QOCqKja3IH1vPu1dUx40KDec= -------------------------------------------------------------------------------- /jscript/react/sample-hotels/src/components/Subscribe.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useRefresh } from "./hooks" 3 | 4 | export const SubscribePage = () => { 5 | useRefresh(); 6 | 7 | return ( 8 |
Subscribing.
9 | ); 10 | } -------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/.env.production: -------------------------------------------------------------------------------- 1 | NODE_ENV=production 2 | VITE_APP_TITLE=sample-graphql-codegen 3 | VITE_URL=https://cloud.squidex.io 4 | VITE_APP_NAME=sample-blog 5 | VITE_CLIENT_ID=sample-blog:blog 6 | VITE_CLIENT_SECRET=ZxmQGgouOUmyVU4fh38QOCqKja3IH1vPu1dUx40KDec= -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/appsettings.json: -------------------------------------------------------------------------------- 1 | { 2 | "app": { 3 | "url": "https://cloud.squidex.io", 4 | "appName": "sebastians-profile", 5 | "clientId": "sebastians-profile:profile", 6 | "clientSecret": "irCO58a8f2EhCccWAIEQaZYvgeEfPCezeVkluhxMyM8=" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | 3 | @Component({ 4 | selector: 'app-root', 5 | templateUrl: './app.component.html', 6 | styleUrls: ['./app.component.scss'] 7 | }) 8 | export class AppComponent { 9 | } 10 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/src/setupTests.ts: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom'; 6 | -------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/src/index.tsx: -------------------------------------------------------------------------------- 1 | import App from './app.tsx' 2 | import ReactDOM from 'react-dom/client' 3 | import { StrictMode } from 'react' 4 | 5 | ReactDOM.createRoot(document.getElementById('root')!).render( 6 | 7 | 8 | , 9 | ) 10 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/src/pages/root/RootPage.tsx: -------------------------------------------------------------------------------- 1 | import { Outlet } from 'react-router-dom'; 2 | import { PageLayout } from '../../shared'; 3 | 4 | export const RootPage = () => { 5 | return ( 6 | 7 | 8 | 9 | ); 10 | }; -------------------------------------------------------------------------------- /jscript/react/sample-blog/src/components/Page.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | 3 | export const Page = ({ page }) => { 4 | return ( 5 |
6 |

{page.title}

7 | 8 |
9 |
10 | ); 11 | }; -------------------------------------------------------------------------------- /jscript/react/sample-blog/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /csharp/Sample.Jscript/Sample.Jscript/Sample.Jscript.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net5.0 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /editors/markdown/vite.config.js: -------------------------------------------------------------------------------- 1 | // vite.config.js 2 | export default { 3 | // base url [prefix] (you need to configure this, if you want to run the editor out of a subdirectory of the domain) 4 | // either add the full url or the directory path like e.g. '/squidex-samples/editors/richtext' 5 | base: "/", 6 | }; 7 | -------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/vite.config.ts: -------------------------------------------------------------------------------- 1 | import { defineConfig } from 'vite' 2 | import react from '@vitejs/plugin-react-swc' 3 | 4 | // https://vite.dev/config/ 5 | export default defineConfig({ 6 | plugins: [react()], 7 | build: { 8 | outDir: 'dist', 9 | }, 10 | base: './', 11 | }) 12 | -------------------------------------------------------------------------------- /jscript/react/sample-hotels/src/setupTests.js: -------------------------------------------------------------------------------- 1 | // jest-dom adds custom jest matchers for asserting on DOM nodes. 2 | // allows you to do things like: 3 | // expect(element).toHaveTextContent(/react/i) 4 | // learn more: https://github.com/testing-library/jest-dom 5 | import '@testing-library/jest-dom/extend-expect'; 6 | -------------------------------------------------------------------------------- /node/proxy/Dockerfile: -------------------------------------------------------------------------------- 1 | FROM node:15 2 | 3 | ENV NODE_ENV=production 4 | 5 | RUN npm i --g typescript 6 | 7 | WORKDIR /app 8 | 9 | COPY ["package.json", "package-lock.json*", "./"] 10 | 11 | RUN npm i --production=false 12 | 13 | COPY . . 14 | 15 | RUN npm run build 16 | 17 | CMD [ "node", "dist/app.js" ] -------------------------------------------------------------------------------- /editors/richtext/vite.config.js: -------------------------------------------------------------------------------- 1 | // vite.config.js 2 | export default { 3 | // base url [prefix] (you need to configure this, if you want to run the editor out of a subdirectory of the domain) 4 | // either add the full url or the directory path like e.g. '/squidex-samples/editors/richtext' 5 | base: "/", 6 | }; 7 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/src/shared/index.ts: -------------------------------------------------------------------------------- 1 | export * from './Destination'; 2 | export * from './EmbeddableHotel'; 3 | export * from './Hotel'; 4 | export * from './Markdown'; 5 | export * from './NavLink'; 6 | export * from './Page'; 7 | export * from './PageLayout'; 8 | export * from './Post'; 9 | export * from '../utils'; -------------------------------------------------------------------------------- /jscript/vue/sample-blog/src/components/Page.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 17 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/src/utils/index.ts: -------------------------------------------------------------------------------- 1 | export * from './api'; 2 | export * from './api-context'; 3 | export * from './cancellable-promise'; 4 | export * from './content'; 5 | export * from './content-cache'; 6 | export * from './deferred'; 7 | export * from './graphql-fields'; 8 | export * from './refresh'; 9 | export * from './types'; -------------------------------------------------------------------------------- /jscript/angular/sample-blog/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.md] 12 | max_line_length = off 13 | trim_trailing_whitespace = false 14 | -------------------------------------------------------------------------------- /jscript/vue/sample-blog/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /dist 4 | 5 | # local env files 6 | .env.local 7 | .env.*.local 8 | 9 | # Log files 10 | npm-debug.log* 11 | yarn-debug.log* 12 | yarn-error.log* 13 | 14 | # Editor directories and files 15 | .idea 16 | .vscode 17 | *.suo 18 | *.ntvs* 19 | *.njsproj 20 | *.sln 21 | *.sw? 22 | -------------------------------------------------------------------------------- /node/proxy/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "esModuleInterop": true, 4 | "module": "commonjs", 5 | "moduleResolution": "node", 6 | "noImplicitAny": true, 7 | "outDir": "dist", 8 | "strict": true, 9 | "sourceMap": true, 10 | "target": "es6", 11 | }, 12 | "lib": ["es2015"] 13 | } -------------------------------------------------------------------------------- /jscript/react/sample-hotels/src/components/index.js: -------------------------------------------------------------------------------- 1 | export * from './Hotel'; 2 | export * from './HotelSite'; 3 | export * from './HotelsSite'; 4 | export * from './Page'; 5 | export * from './PageSite'; 6 | export * from './Post'; 7 | export * from './PostSite'; 8 | export * from './PostsSite'; 9 | export * from './Subscribe'; 10 | export * from './TopNav'; -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/top-nav/top-nav.component.html: -------------------------------------------------------------------------------- 1 | 2 | 7 | -------------------------------------------------------------------------------- /jscript/angular/editor/.editorconfig: -------------------------------------------------------------------------------- 1 | # Editor configuration, see https://editorconfig.org 2 | root = true 3 | 4 | [*] 5 | charset = utf-8 6 | indent_style = space 7 | indent_size = 2 8 | insert_final_newline = true 9 | trim_trailing_whitespace = true 10 | 11 | [*.ts] 12 | quote_type = single 13 | 14 | [*.md] 15 | max_line_length = off 16 | trim_trailing_whitespace = false 17 | -------------------------------------------------------------------------------- /editors/markdown/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /editors/richtext/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *.local 14 | 15 | # Editor directories and files 16 | .vscode/* 17 | !.vscode/extensions.json 18 | .idea 19 | .DS_Store 20 | *.suo 21 | *.ntvs* 22 | *.njsproj 23 | *.sln 24 | *.sw? 25 | -------------------------------------------------------------------------------- /jscript/angular/editor/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/app", 6 | "types": [] 7 | }, 8 | "files": [ 9 | "src/main.ts", 10 | "src/polyfills.ts" 11 | ], 12 | "include": [ 13 | "src/**/*.d.ts" 14 | ] 15 | } 16 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/app", 5 | "types": [] 6 | }, 7 | "files": [ 8 | "src/main.ts", 9 | "src/polyfills.ts" 10 | ], 11 | "include": [ 12 | "src/**/*.d.ts" 13 | ], 14 | "exclude": [ 15 | "src/test.ts", 16 | "src/**/*.spec.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": "./tsconfig.json", 3 | "compilerOptions": { 4 | "outDir": "./out-tsc/spec", 5 | "types": [ 6 | "jasmine", 7 | "node" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/posts-site/posts-site.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 |
6 |
7 |
8 | 9 | 10 |
Loading posts...
11 |
-------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/app.component.html: -------------------------------------------------------------------------------- 1 | 8 | 9 |
10 | 11 |
12 | -------------------------------------------------------------------------------- /csharp/Sample.Jscript/Sample.Jscript/wwwroot/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Squidex Javascript Sample 6 | 7 | 8 | 9 | 10 | 11 |
    12 | 13 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/post/post.component.html: -------------------------------------------------------------------------------- 1 |
    2 | 3 | 4 |

    {{post.title}}

    5 |
    6 |
    7 | 8 | 9 |

    {{post.title}}

    10 |
    11 | 12 |
    13 |
    -------------------------------------------------------------------------------- /jscript/react/sample-hotels/src/components/Page.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Markdown } from './Markdown'; 3 | 4 | export const Page = ({ page }) => { 5 | const { flatData: data } = page; 6 | 7 | return ( 8 |
    9 |

    {data.title}

    10 | 11 | 12 |
    13 | ); 14 | }; -------------------------------------------------------------------------------- /node/graphql-codegen-csharp/.gitignore: -------------------------------------------------------------------------------- 1 | # Logs 2 | logs 3 | *.log 4 | npm-debug.log* 5 | yarn-debug.log* 6 | yarn-error.log* 7 | pnpm-debug.log* 8 | lerna-debug.log* 9 | 10 | node_modules 11 | dist 12 | dist-ssr 13 | *. 14 | 15 | .DS_Store 16 | 17 | # Editor directories and files 18 | .vscode/* 19 | !.vscode/extensions.json 20 | .idea 21 | .DS_Store 22 | *.suo 23 | *.ntvs* 24 | *.njsproj 25 | *.sln 26 | *.sw? 27 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/README.md: -------------------------------------------------------------------------------- 1 | # C# Client Library 2 | 3 | Version: ![Nuget](https://img.shields.io/nuget/v/Squidex.ClientLibrary?style=flat-square) 4 | 5 | Also available on [nuget.org](https://www.nuget.org/packages/Squidex.ClientLibrary/). 6 | 7 | ## How to use it? 8 | 9 | Go to the documentation for installation and usage instructions: https://docs.squidex.io/02-documentation/software-development-kits/.net-standard -------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/Views/Home/Posts.cshtml: -------------------------------------------------------------------------------- 1 | @model PostsVM 2 | 3 | @{ 4 | ViewData["Title"] = "Blog"; 5 | } 6 | 7 | @foreach (var post in Model.Posts) 8 | { 9 |
    10 | 11 |

    @post.Data.Title

    12 |
    13 | 14 | @Html.Raw(post.Data.Text) 15 |
    16 | 17 |
    18 | } -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary.Tests/TestFile.json: -------------------------------------------------------------------------------- 1 | { 2 | "squidex": { 3 | "appName": "My-App", 4 | "clientId": "My-ClientId", 5 | "clientSecret": "My-ClientSecret", 6 | "appCredentials": { 7 | "My-App2": { 8 | "clientId": "My-ClientId2", 9 | "clientSecret": "My-ClientSecret2" 10 | } 11 | } 12 | } 13 | } -------------------------------------------------------------------------------- /csharp/Sample.Profile/.dockerignore: -------------------------------------------------------------------------------- 1 | # User-specific files 2 | *.suo 3 | *.user 4 | *.vs 5 | *.log 6 | 7 | .vs 8 | .git 9 | 10 | # Build results 11 | **/bin/ 12 | **/obj/ 13 | **/publish/ 14 | 15 | # Test Output 16 | **/_test-output/ 17 | 18 | # NodeJS 19 | **/node_modules/ 20 | 21 | # Scripts (should be copied from node_modules on build) 22 | **/wwwroot/scripts/**/*.* 23 | 24 | **/src/Squidex/appsettings.Development.json -------------------------------------------------------------------------------- /node/graphql-codegen-csharp/eslint.config.ts: -------------------------------------------------------------------------------- 1 | import js from '@eslint/js' 2 | import tseslint from 'typescript-eslint' 3 | import { globalIgnores } from 'eslint/config' 4 | 5 | export default tseslint.config([ 6 | globalIgnores(['dist']), 7 | { 8 | files: ['**/*.{ts}'], 9 | extends: [js.configs.recommended, tseslint.configs.recommended], 10 | languageOptions: { 11 | ecmaVersion: 2020, 12 | }, 13 | }, 14 | ]) 15 | -------------------------------------------------------------------------------- /editors/community/ls.json: -------------------------------------------------------------------------------- 1 | [ 2 | "/laptops-and-netbooks/thinkpad-x-series-chromebook-laptops/", 3 | "/tablets/a-series/a2109-tablet/", 4 | "/servers/thinkserver/rs110/6438/", 5 | "/desktops-and-all-in-ones/thinkcentre-m-series-desktops/m715q/10m2/", 6 | "/laptops-and-netbooks/thinkpad-edge-laptops/thinkpad-edge-e330/", 7 | "/laptops-and-netbooks/ideapad-s-series-netbooks/ideapad-s210-notebook/", 8 | "/phones/a-series/a328-smartphone/" 9 | ] -------------------------------------------------------------------------------- /jscript/react/sample-compose/src/utils/content.ts: -------------------------------------------------------------------------------- 1 | export function flatten(content: any) { 2 | if (content.flatData) { 3 | return content.flatData; 4 | } else { 5 | const result: any = {}; 6 | 7 | for (const item of Object.entries(content.data)) { 8 | const [key, value] = item; 9 | 10 | result[key] = (value as any)['iv']; 11 | } 12 | 13 | return result; 14 | } 15 | } -------------------------------------------------------------------------------- /jscript/react/sample-blog/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/src/shared/Page.tsx: -------------------------------------------------------------------------------- 1 | import { flatten } from '../utils'; 2 | import { Markdown } from './Markdown'; 3 | 4 | export const Page = ({ page }: { page: any }) => { 5 | const pageData = flatten(page); 6 | 7 | return ( 8 |
    9 |

    {pageData.title}

    10 | 11 | 12 |
    13 | ); 14 | }; -------------------------------------------------------------------------------- /jscript/angular/editor/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /jscript/angular/editor/tsconfig.spec.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "extends": "./tsconfig.json", 4 | "compilerOptions": { 5 | "outDir": "./out-tsc/spec", 6 | "types": [ 7 | "jasmine" 8 | ] 9 | }, 10 | "files": [ 11 | "src/test.ts", 12 | "src/polyfills.ts" 13 | ], 14 | "include": [ 15 | "src/**/*.spec.ts", 16 | "src/**/*.d.ts" 17 | ] 18 | } 19 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /jscript/react/sample-hotels/.gitignore: -------------------------------------------------------------------------------- 1 | # See https://help.github.com/articles/ignoring-files/ for more about ignoring files. 2 | 3 | # dependencies 4 | /node_modules 5 | /.pnp 6 | .pnp.js 7 | 8 | # testing 9 | /coverage 10 | 11 | # production 12 | /build 13 | 14 | # misc 15 | .DS_Store 16 | .env.local 17 | .env.development.local 18 | .env.test.local 19 | .env.production.local 20 | 21 | npm-debug.log* 22 | yarn-debug.log* 23 | yarn-error.log* 24 | -------------------------------------------------------------------------------- /jscript/angular/editor/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Editor 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/main.ts: -------------------------------------------------------------------------------- 1 | import { enableProdMode } from '@angular/core'; 2 | import { platformBrowserDynamic } from '@angular/platform-browser-dynamic'; 3 | 4 | import { AppModule } from './app/app.module'; 5 | import { environment } from './environments/environment'; 6 | 7 | if (environment.production) { 8 | enableProdMode(); 9 | } 10 | 11 | platformBrowserDynamic().bootstrapModule(AppModule) 12 | .catch(err => console.error(err)); 13 | -------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/src/config/config.ts: -------------------------------------------------------------------------------- 1 | const Config = { 2 | appName: import.meta.env.VITE_APP_NAME, 3 | url: import.meta.env.VITE_URL, 4 | clientId: import.meta.env.VITE_CLIENT_ID, 5 | clientSecret: import.meta.env.VITE_CLIENT_SECRET, 6 | isDevelopment: import.meta.env.DEV, 7 | isProduction: import.meta.env.PROD, 8 | isLocalhost: import.meta.env.VITE_USER_NODE_ENV === 'localhost', 9 | } 10 | 11 | export default Config 12 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/src/shared/NavLink.tsx: -------------------------------------------------------------------------------- 1 | import { forwardRef } from 'react'; 2 | import { NavLink as BaseNavLink, NavLinkProps } from 'react-router-dom'; 3 | 4 | export const NavLink = forwardRef((props, ref) => { 5 | return ( 6 | [props.className, isActive ? 'active' : null,].filter(Boolean).join(' ')} 8 | /> 9 | ); 10 | } 11 | ); -------------------------------------------------------------------------------- /editors/markdown/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { browser: true, es2020: true }, 4 | extends: [ 5 | 'eslint:recommended', 6 | 'plugin:@typescript-eslint/recommended', 7 | ], 8 | ignorePatterns: ['dist', '.eslintrc.cjs'], 9 | parser: '@typescript-eslint/parser', 10 | rules: { 11 | '@typescript-eslint/semi': 'error', 12 | '@typescript-eslint/indent': [ 13 | 'warn', 14 | 4 15 | ] 16 | }, 17 | } 18 | -------------------------------------------------------------------------------- /editors/richtext/.eslintrc.cjs: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | root: true, 3 | env: { browser: true, es2020: true }, 4 | extends: [ 5 | 'eslint:recommended', 6 | 'plugin:@typescript-eslint/recommended', 7 | ], 8 | ignorePatterns: ['dist', '.eslintrc.cjs'], 9 | parser: '@typescript-eslint/parser', 10 | rules: { 11 | '@typescript-eslint/semi': 'error', 12 | '@typescript-eslint/indent': [ 13 | 'warn', 14 | 4 15 | ] 16 | }, 17 | } 18 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/page-site/page-site.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
    Loading page...
    9 |
    10 | 11 |
    Page not found.
    12 |
    13 |
    -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/post-site/post-site.component.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
    Loading post...
    9 |
    10 | 11 |
    Post not found.
    12 |
    13 |
    -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/post/post.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, Input } from '@angular/core'; 2 | 3 | import { Post } from '../services/content.service'; 4 | 5 | @Component({ 6 | selector: 'app-post', 7 | templateUrl: './post.component.html', 8 | styleUrls: ['./post.component.scss'] 9 | }) 10 | export class PostComponent { 11 | @Input() 12 | public post: Post; 13 | 14 | @Input() 15 | public withLink: boolean; 16 | } 17 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/src/shared/Destination.tsx: -------------------------------------------------------------------------------- 1 | import { flatten } from '../utils'; 2 | import { Markdown } from './Markdown'; 3 | 4 | export const Destination = ({ destination }: { destination: any }) => { 5 | const destinationData = flatten(destination); 6 | 7 | return ( 8 |
    9 |

    {destinationData.name}

    10 | 11 | 12 |
    13 | ); 14 | }; -------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/src/vite-env.d.ts: -------------------------------------------------------------------------------- 1 | /// 2 | 3 | interface ViteTypeOptions { 4 | strictImportEnv: unknown 5 | } 6 | 7 | interface ImportMetaEnv { 8 | readonly VITE_APP_TITLE: string 9 | readonly VITE_URL: string 10 | readonly VITE_APP_NAME: string 11 | readonly VITE_CLIENT_ID: string 12 | readonly VITE_CLIENT_SECRET: string 13 | } 14 | 15 | interface ImportMeta { 16 | readonly env: ImportMetaEnv 17 | } 18 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | # User-specific files 2 | *.suo 3 | *.user 4 | *.vs 5 | *.log 6 | 7 | .vs 8 | .git 9 | 10 | **/.vscode/ 11 | 12 | # Build results 13 | **/build/ 14 | **/bin/ 15 | **/obj/ 16 | **/out/ 17 | **/publish/ 18 | 19 | # NodeJS 20 | **/node_modules/ 21 | 22 | # Development Settings 23 | **/appsettings.Development.json 24 | **/appsettings.Production.json 25 | **/launchSettings.json 26 | 27 | # Build 28 | .drone.yml 29 | 30 | # Documentation 31 | CHANGELOG.md 32 | -------------------------------------------------------------------------------- /jscript/angular/editor/src/app/app.component.scss: -------------------------------------------------------------------------------- 1 | input { 2 | width: 100%; 3 | border: 1px solid #dddd; 4 | border-radius: 4px; 5 | box-sizing: border-box; 6 | padding: .5rem; 7 | transition: .5s ease-in border; 8 | 9 | &:hover { 10 | border-color: #0000aa; 11 | outline: none; 12 | } 13 | 14 | &:focus { 15 | border-color: #0000aa; 16 | outline: none; 17 | } 18 | } 19 | 20 | div { 21 | padding: .5rem; 22 | } -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary.Tests/EnrichedEvents/EnrichedEventsTests.Should_deserialize_EnrichedCommentEvent.verified.txt: -------------------------------------------------------------------------------- 1 | { 2 | Text: @user@test.com testmessage, 3 | Url: /app/testapp/content/schema/0e5955e3-cd2a-49f2-92ba-303acf4dd192/comments, 4 | Actor: { 5 | Id: 601c2cbafa4e669f214c0438, 6 | Type: subject 7 | }, 8 | App: { 9 | Id: Guid_1, 10 | Name: testapp 11 | }, 12 | Timestamp: DateTimeOffset_1, 13 | Name: UserMentioned 14 | } -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/page/page.component.ts: -------------------------------------------------------------------------------- 1 | import { ChangeDetectionStrategy, Component, Input } from '@angular/core'; 2 | 3 | import { Page } from '../services/content.service'; 4 | 5 | @Component({ 6 | selector: 'app-page', 7 | templateUrl: './page.component.html', 8 | styleUrls: ['./page.component.scss'], 9 | changeDetection: ChangeDetectionStrategy.OnPush 10 | }) 11 | export class PageComponent { 12 | @Input() 13 | public page: Page; 14 | } 15 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Configuration/ConfigurationModel.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.CLI.Configuration; 9 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # User-specific files 2 | *.suo 3 | *.user 4 | *.vs 5 | *.log 6 | *.received.txt 7 | 8 | .vs 9 | .git 10 | .angular 11 | .vscode/ 12 | 13 | # Build results 14 | build/ 15 | bin/ 16 | obj/ 17 | out/ 18 | publish/ 19 | dist/ 20 | 21 | # NodeJS 22 | node_modules/ 23 | 24 | # Development Settings 25 | appsettings.Development.json 26 | appsettings.Production.json 27 | launchSettings.json 28 | .idea/ 29 | /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/Squidex.ClientLibrary.xml 30 | -------------------------------------------------------------------------------- /csharp/Integration.Localize/.dockerignore: -------------------------------------------------------------------------------- 1 | # User-specific files 2 | *.suo 3 | *.user 4 | *.vs 5 | *.log 6 | 7 | .vs 8 | .git 9 | 10 | **/.vscode/ 11 | 12 | # Build results 13 | **/build/ 14 | **/bin/ 15 | **/obj/ 16 | **/out/ 17 | **/publish/ 18 | 19 | # NodeJS 20 | **/node_modules/ 21 | 22 | # Development Settings 23 | **/appsettings.Development.json 24 | **/appsettings.Production.json 25 | **/launchSettings.json 26 | 27 | # Build 28 | .drone.yml 29 | 30 | # Documentation 31 | CHANGELOG.md 32 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # You can see what browsers were selected by your queries by running: 6 | # npx browserslist 7 | 8 | > 0.5% 9 | last 2 versions 10 | Firefox ESR 11 | not dead 12 | not IE 9-11 # For IE 9-11 support, remove 'not'. -------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/src/app.tsx: -------------------------------------------------------------------------------- 1 | import SquidexProvider from './squidex/squidex-provider' 2 | import { ApolloProvider } from '@apollo/client/react' 3 | import { useSquidexGraphqlClient } from './squidex/squidex-client' 4 | 5 | function App() { 6 | const apolloClient = useSquidexGraphqlClient() 7 | 8 | return ( 9 | <> 10 | 11 | 12 | 13 | 14 | ) 15 | } 16 | 17 | export default App 18 | -------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | %VITE_APP_TITLE% 9 | 10 | 11 |
    12 | 13 | 14 | 15 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/src/pages/error/ErrorPage.tsx: -------------------------------------------------------------------------------- 1 | import { useRouteError } from 'react-router-dom'; 2 | 3 | export const ErrorPage = () => { 4 | const error = useRouteError() as any; 5 | 6 | return ( 7 |
    8 |

    Oops!

    9 | 10 |

    Sorry, an unexpected error has occurred.

    11 | 12 |

    13 | {error.statusText || error.message} 14 |

    15 |
    16 | ); 17 | } -------------------------------------------------------------------------------- /jscript/react/sample-blog/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | 9 | // If you want your app to work offline and load faster, you can change 10 | // unregister() to register() below. Note this comes with some pitfalls. 11 | // Learn more about service workers: https://bit.ly/CRA-PWA 12 | serviceWorker.unregister(); 13 | -------------------------------------------------------------------------------- /jscript/react/sample-hotels/src/index.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import ReactDOM from 'react-dom'; 3 | import './index.css'; 4 | import App from './App'; 5 | import * as serviceWorker from './serviceWorker'; 6 | 7 | ReactDOM.render(, document.getElementById('root')); 8 | 9 | // If you want your app to work offline and load faster, you can change 10 | // unregister() to register() below. Note this comes with some pitfalls. 11 | // Learn more about service workers: https://bit.ly/CRA-PWA 12 | serviceWorker.unregister(); 13 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/build.ps1: -------------------------------------------------------------------------------- 1 | $runtimes = @("win-x64", "win-x86", "linux-x64", "ubuntu-x64", "osx-x64") 2 | 3 | foreach ($runtime in $runtimes) { 4 | Write-Host "> Compiling for $runtime" 5 | 6 | dotnet publish -c Release -r $runtime 7 | 8 | xcopy "Squidex.CLI\bin\Release\netcoreapp2.2\$runtime\publish" "out\$runtime\" /S /Y /Q 9 | 10 | Compress-Archive -Path "out\$runtime\*" -Force -DestinationPath "out\$runtime.zip" -CompressionLevel Optimal 11 | 12 | Write-Host "> Compiling for $runtime completed" 13 | Write-Host "" 14 | } 15 | -------------------------------------------------------------------------------- /jscript/angular/editor/src/app/app.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { FormsModule, ReactiveFormsModule } from '@angular/forms'; 3 | import { BrowserModule } from '@angular/platform-browser'; 4 | 5 | import { AppComponent } from './app.component'; 6 | 7 | @NgModule({ 8 | declarations: [ 9 | AppComponent 10 | ], 11 | imports: [ 12 | BrowserModule, 13 | FormsModule, 14 | ReactiveFormsModule 15 | ], 16 | providers: [], 17 | bootstrap: [AppComponent] 18 | }) 19 | export class AppModule { } 20 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Squidex Blog Sample 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /jscript/react/sample-blog/src/components/Post.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Link } from 'react-router-dom'; 3 | 4 | export const Post = ({ post, withLink }) => { 5 | return ( 6 |
    7 | {withLink ? ( 8 | 9 |

    {post.title}

    10 | 11 | ) : ( 12 |

    {post.title}

    13 | )} 14 | 15 |
    16 |
    17 | ); 18 | }; -------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/Models/PageVM.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Sample.Blog.Models 9 | { 10 | public class PageVM 11 | { 12 | public Page Page { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/Properties/Properties.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using System.Runtime.CompilerServices; 9 | 10 | [assembly: InternalsVisibleTo("Squidex.ClientLibrary.Tests")] 11 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/src/utils/types.ts: -------------------------------------------------------------------------------- 1 | export function isArray(value: any): value is any[] { 2 | return Array.isArray(value); 3 | } 4 | 5 | export function isStringArray(value: any): value is string[] { 6 | return isArray(value) && !value.find(x => !isString(x)); 7 | } 8 | 9 | export function isString(value: any): value is string { 10 | return typeof value === 'string' || value instanceof String; 11 | } 12 | 13 | export function isObject(value: any): value is Object { 14 | return value && typeof value === 'object' && value.constructor === Object; 15 | } 16 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Properties/Properties.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using System.Runtime.CompilerServices; 9 | 10 | [assembly: InternalsVisibleTo("sq")] 11 | [assembly: InternalsVisibleTo("Squidex.CLI")] 12 | -------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/Models/PostVM.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Sample.Blog.Models 9 | { 10 | public sealed class PostVM 11 | { 12 | public BlogPost Post { get; set; } 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/Models/Page.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Squidex.ClientLibrary; 9 | 10 | namespace Sample.Blog.Models 11 | { 12 | public sealed class Page : Content 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/Models/BlogPost.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Squidex.ClientLibrary; 9 | 10 | namespace Sample.Blog.Models 11 | { 12 | public sealed class BlogPost : Content 13 | { 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /editors/richtext/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "node", 11 | "resolveJsonModule": true, 12 | "isolatedModules": true, 13 | "noEmit": true, 14 | 15 | /* Linting */ 16 | "strict": true, 17 | "noUnusedLocals": true, 18 | "noUnusedParameters": true, 19 | "noFallthroughCasesInSwitch": true 20 | }, 21 | "include": ["src"] 22 | } 23 | -------------------------------------------------------------------------------- /.github/workflows/check-updates.yml: -------------------------------------------------------------------------------- 1 | name: Check Update 2 | concurrency: check 3 | 4 | on: 5 | workflow_dispatch: 6 | schedule: 7 | # Automatically run on every Sunday 8 | - cron: '0 0 * * 0' 9 | 10 | jobs: 11 | build: 12 | runs-on: ubuntu-latest 13 | 14 | steps: 15 | - uses: actions/checkout@v4.0.0 16 | with: 17 | token: ${{ secrets.WORKFLOW_SECRET }} 18 | 19 | - name: Check for Update 20 | uses: saadmk11/github-actions-version-updater@v0.7.4 21 | with: 22 | token: ${{ secrets.WORKFLOW_SECRET }} 23 | release_types: 'major' 24 | -------------------------------------------------------------------------------- /editors/markdown/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Squidex Markdown Editor 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
    14 | 15 |
    16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /editors/richtext/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Squidex Richtext Editor 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 |
    14 | 15 |
    16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /jscript/vue/sample-blog/src/components/Post.vue: -------------------------------------------------------------------------------- 1 | 15 | 16 | 25 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/Utils/HttpMethodEx.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.ClientLibrary.Utils; 9 | 10 | internal static class HttpMethodEx 11 | { 12 | public static readonly HttpMethod Patch = new HttpMethod("PATCH"); 13 | } 14 | -------------------------------------------------------------------------------- /jscript/react/sample-blog/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /jscript/react/sample-hotels/public/manifest.json: -------------------------------------------------------------------------------- 1 | { 2 | "short_name": "React App", 3 | "name": "Create React App Sample", 4 | "icons": [ 5 | { 6 | "src": "favicon.ico", 7 | "sizes": "64x64 32x32 24x24 16x16", 8 | "type": "image/x-icon" 9 | }, 10 | { 11 | "src": "logo192.png", 12 | "type": "image/png", 13 | "sizes": "192x192" 14 | }, 15 | { 16 | "src": "logo512.png", 17 | "type": "image/png", 18 | "sizes": "512x512" 19 | } 20 | ], 21 | "start_url": ".", 22 | "display": "standalone", 23 | "theme_color": "#000000", 24 | "background_color": "#ffffff" 25 | } 26 | -------------------------------------------------------------------------------- /csharp/Sample.Jscript/Sample.Jscript/Program.cs: -------------------------------------------------------------------------------- 1 | using Microsoft.AspNetCore.Hosting; 2 | using Microsoft.Extensions.Hosting; 3 | 4 | namespace Sample.Jscript 5 | { 6 | public class Program 7 | { 8 | public static void Main(string[] args) 9 | { 10 | CreateHostBuilder(args).Build().Run(); 11 | } 12 | 13 | public static IHostBuilder CreateHostBuilder(string[] args) => 14 | Host.CreateDefaultBuilder(args) 15 | .ConfigureWebHostDefaults(webBuilder => 16 | { 17 | webBuilder.UseStartup(); 18 | }); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /editors/markdown/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "ES2020", 4 | "useDefineForClassFields": true, 5 | "module": "ESNext", 6 | "lib": ["ES2020", "DOM", "DOM.Iterable"], 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "allowSyntheticDefaultImports": true, 11 | "moduleResolution": "node", 12 | "resolveJsonModule": true, 13 | "isolatedModules": true, 14 | "noEmit": true, 15 | 16 | /* Linting */ 17 | "strict": true, 18 | "noUnusedLocals": true, 19 | "noUnusedParameters": true, 20 | "noFallthroughCasesInSwitch": true 21 | }, 22 | "include": ["src"] 23 | } 24 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/ContentAction.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.CLI.Commands.Implementation.Sync; 9 | 10 | public enum ContentAction 11 | { 12 | Upsert, 13 | UpsertPatch, 14 | Create, 15 | Update, 16 | Patch, 17 | } 18 | -------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/Models/ErrorVM.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Sample.Blog.Models 9 | { 10 | public class ErrorVM 11 | { 12 | public string RequestId { get; set; } 13 | 14 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 15 | } 16 | } -------------------------------------------------------------------------------- /editors/richtext/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "richtext", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "tsc && vite build", 9 | "build-editor": "tsc && vite build --base=/squidex-samples/editors/richtext", 10 | "preview": "vite preview" 11 | }, 12 | "devDependencies": { 13 | "@typescript-eslint/eslint-plugin": "^6.0.0", 14 | "@typescript-eslint/parser": "^6.0.0", 15 | "@types/tinymce": "4.6.5", 16 | "eslint": "^8.45.0", 17 | "typescript": "^5.0.2", 18 | "vite": "^4.4.5" 19 | }, 20 | "dependencies": { 21 | "tinymce": "5.10.2" 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/AI/SimplifiedImage.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.CLI.Commands.Implementation.AI; 9 | 10 | public sealed class SimplifiedImage 11 | { 12 | public string FileName { get; set; } 13 | 14 | public string Description { get; set; } 15 | } 16 | -------------------------------------------------------------------------------- /jscript/react/sample-hotels/src/components/Post.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Link } from 'react-router-dom'; 3 | import { Markdown } from './Markdown'; 4 | 5 | export const Post = ({ post, withLink }) => { 6 | const { id, flatData: data } = post; 7 | 8 | return ( 9 |
    10 | {withLink ? ( 11 | 12 |

    {data.title}

    13 | 14 | ) : ( 15 |

    {data.title}

    16 | )} 17 | 18 | 19 |
    20 | ); 21 | }; -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/EnrichedEvents/EnrichedManualEvent.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.ClientLibrary.EnrichedEvents; 9 | 10 | /// 11 | /// Event triggered manually. 12 | /// 13 | public sealed class EnrichedManualEvent : EnrichedUserEventBase 14 | { 15 | } 16 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "target": "es5", 4 | "lib": [ 5 | "dom", 6 | "dom.iterable", 7 | "esnext" 8 | ], 9 | "allowJs": true, 10 | "skipLibCheck": true, 11 | "esModuleInterop": true, 12 | "allowSyntheticDefaultImports": true, 13 | "strict": true, 14 | "forceConsistentCasingInFileNames": true, 15 | "noFallthroughCasesInSwitch": true, 16 | "module": "esnext", 17 | "moduleResolution": "node", 18 | "resolveJsonModule": true, 19 | "isolatedModules": true, 20 | "noEmit": true, 21 | "jsx": "react-jsx" 22 | }, 23 | "include": [ 24 | "src" 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /csharp/Integration.Localize/Integration.Localize/Program.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | var builder = WebApplication.CreateBuilder(args); 9 | 10 | builder.Services.AddMvc(); 11 | 12 | var app = builder.Build(); 13 | 14 | app.UseHttpsRedirection(); 15 | app.UseRouting(); 16 | 17 | app.MapControllers(); 18 | 19 | app.Run(); 20 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/ImExport/IImportSettings.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.CLI.Commands.Implementation.ImExport; 9 | 10 | public interface IImportSettings 11 | { 12 | string Schema { get; } 13 | 14 | string? KeyField { get; } 15 | 16 | bool Unpublished { get; } 17 | } 18 | -------------------------------------------------------------------------------- /jscript/angular/editor/.browserslistrc: -------------------------------------------------------------------------------- 1 | # This file is used by the build system to adjust CSS and JS output to support the specified browsers below. 2 | # For additional information regarding the format and rule options, please see: 3 | # https://github.com/browserslist/browserslist#queries 4 | 5 | # For the full list of supported browsers by the Angular framework, please see: 6 | # https://angular.io/guide/browser-support 7 | 8 | # You can see what browsers were selected by your queries by running: 9 | # npx browserslist 10 | 11 | last 1 Chrome version 12 | last 1 Firefox version 13 | last 2 Edge major versions 14 | last 2 Safari major versions 15 | last 2 iOS major versions 16 | Firefox ESR 17 | -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/Models/ErrorViewModel.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using System; 9 | 10 | namespace Sample.Profile.Models 11 | { 12 | public class ErrorViewModel 13 | { 14 | public string RequestId { get; set; } 15 | 16 | public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); 17 | } 18 | } -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Assets/AssetsModel.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using System.ComponentModel.DataAnnotations; 9 | 10 | namespace Squidex.CLI.Commands.Implementation.Sync.Assets; 11 | 12 | internal class AssetsModel 13 | { 14 | [Required] 15 | public List Assets { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Schemas/SchemaModel.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Squidex.ClientLibrary; 9 | 10 | namespace Squidex.CLI.Commands.Implementation.Sync.Schemas; 11 | 12 | internal sealed class SchemaModel : SchemaCreateModel 13 | { 14 | public SynchronizeSchemaDto Schema { get; set; } 15 | } 16 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/App/AppContributorModel.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using System.ComponentModel.DataAnnotations; 9 | 10 | namespace Squidex.CLI.Commands.Implementation.Sync.App; 11 | 12 | internal sealed class AppContributorModel 13 | { 14 | [Required] 15 | public string Role { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /node/proxy/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "proxy", 3 | "version": "1.0.0", 4 | "description": "Squidex Proxy", 5 | "main": "app.js", 6 | "scripts": { 7 | "build": "tsc", 8 | "start": "tsc && node dist/app.js" 9 | }, 10 | "author": "Sebastian", 11 | "license": "ISC", 12 | "dependencies": { 13 | "axios": "^0.21.1", 14 | "express": "^4.17.1", 15 | "morgan": "^1.10.0", 16 | "qs": "^6.10.1", 17 | "querystring": "^0.2.1", 18 | "redis": "^3.1.0" 19 | }, 20 | "devDependencies": { 21 | "@types/express": "^4.17.11", 22 | "@types/morgan": "^1.9.2", 23 | "@types/node": "^14.14.37", 24 | "@types/redis": "^2.8.28", 25 | "typescript": "^4.2.4" 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/ILogLine.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.CLI.Commands.Implementation; 9 | 10 | public interface ILogLine : IDisposable 11 | { 12 | bool CanWriteToSameLine { get; } 13 | 14 | void WriteLine(string message); 15 | 16 | void WriteLine(string message, params object[] args); 17 | } 18 | -------------------------------------------------------------------------------- /.github/workflows/sdk.yml: -------------------------------------------------------------------------------- 1 | name: Build Dotnet SDK 2 | 3 | on: 4 | push: 5 | tags: 6 | - 'dotnet-sdk-*' 7 | 8 | jobs: 9 | build: 10 | 11 | runs-on: ubuntu-latest 12 | 13 | steps: 14 | - uses: actions/checkout@v4.0.0 15 | 16 | - name: setup dotnet 17 | uses: actions/setup-dotnet@v4.0.0 18 | with: 19 | dotnet-version: 8.0.x 20 | 21 | - name: publish 22 | run: | 23 | cd csharp/Squidex.ClientLibrary 24 | dotnet pack -c Release 25 | 26 | - name: pack 27 | run: | 28 | cd csharp/Squidex.ClientLibrary 29 | dotnet nuget push **/*.nupkg --source 'https://api.nuget.org/v3/index.json' --skip-duplicate -k ${{ secrets.nuget }} 30 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/InheritanceAttribute.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.CLI.Commands.Implementation.Sync; 9 | 10 | [AttributeUsage(AttributeTargets.All)] 11 | public sealed class InheritanceAttribute(string discriminator) : Attribute 12 | { 13 | public string Discriminator { get; } = discriminator; 14 | } 15 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/AssetFolders/AssetFoldersModel.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using System.ComponentModel.DataAnnotations; 9 | 10 | namespace Squidex.CLI.Commands.Implementation.Sync.AssetFolders; 11 | 12 | public sealed class AssetFoldersModel 13 | { 14 | [Required] 15 | public List Paths { get; set; } 16 | } 17 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compileOnSave": false, 3 | "compilerOptions": { 4 | "allowSyntheticDefaultImports": false, 5 | "baseUrl": "./", 6 | "outDir": "./dist/out-tsc", 7 | "sourceMap": true, 8 | "declaration": false, 9 | "downlevelIteration": true, 10 | "experimentalDecorators": true, 11 | "module": "es2020", 12 | "moduleResolution": "node", 13 | "importHelpers": true, 14 | "target": "es2020", 15 | "typeRoots": [ 16 | "node_modules/@types" 17 | ], 18 | "lib": [ 19 | "es2018", 20 | "dom" 21 | ] 22 | }, 23 | "angularCompilerOptions": { 24 | "fullTemplateTypeCheck": true, 25 | "strictInjectionParameters": true 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/App/AppClientModel.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using System.ComponentModel.DataAnnotations; 9 | 10 | namespace Squidex.CLI.Commands.Implementation.Sync.App; 11 | 12 | internal sealed class AppClientModel 13 | { 14 | [Required] 15 | public string Role { get; set; } 16 | 17 | public string? Name { get; set; } 18 | } 19 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Configuration/IConfigurationStore.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.CLI.Configuration; 9 | 10 | public interface IConfigurationStore 11 | { 12 | DirectoryInfo WorkingDirectory { get; } 13 | 14 | (T? Value, DateTimeOffset Saved) Get(string key) where T : class; 15 | 16 | void Set(string key, T value) where T : class; 17 | } 18 | -------------------------------------------------------------------------------- /csharp/Sample.Blog/Readme.md: -------------------------------------------------------------------------------- 1 | # C# Blog Sample 2 | 3 | You can create an app with prepulated schemas directly in Squidex. 4 | 5 | ## How to run it? 6 | 7 | Just press F5 in Visual Studio, thats it. 8 | 9 | - OR - 10 | 11 | dotnet start 12 | 13 | ## How to run it with a custom app? 14 | 15 | Have a look to the configuration first: [appsettings.json](Sample.Blog/appsettings.json) 16 | 17 | You have to change the following settings: 18 | 19 | * `appName`: The name of your app. 20 | * `clientId`: The client id, usually: '`appName`:default' 21 | * `clientSecret`: The secret for your client. You can get it from the Squidex UI. 22 | 23 | Optionally: 24 | 25 | * `url`: The url to your squidex instance, e.g. `http://localhost:5000` if you run it locally. -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/EnrichedEvents/IEnrichedEntityEvent.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.ClientLibrary.EnrichedEvents; 9 | 10 | /// 11 | /// Interface IEnrichedEntityEvent. 12 | /// 13 | public interface IEnrichedEntityEvent 14 | { 15 | /// 16 | /// Id. 17 | /// 18 | string Id { get; } 19 | } 20 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/dist/zone-testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: any; 11 | 12 | // First, initialize the Angular testing environment. 13 | getTestBed().initTestEnvironment( 14 | BrowserDynamicTestingModule, 15 | platformBrowserDynamicTesting() 16 | ); 17 | // Then we find all the tests. 18 | const context = require.context('./', true, /\.spec\.ts$/); 19 | // And load the modules. 20 | context.keys().map(context); 21 | -------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/eslint.config.ts: -------------------------------------------------------------------------------- 1 | import js from '@eslint/js' 2 | import globals from 'globals' 3 | import reactHooks from 'eslint-plugin-react-hooks' 4 | import reactRefresh from 'eslint-plugin-react-refresh' 5 | import tseslint from 'typescript-eslint' 6 | import { globalIgnores } from 'eslint/config' 7 | 8 | export default tseslint.config([ 9 | globalIgnores(['dist']), 10 | { 11 | files: ['**/*.{ts,tsx}'], 12 | extends: [ 13 | js.configs.recommended, 14 | tseslint.configs.recommended, 15 | reactHooks.configs['recommended-latest'], 16 | reactRefresh.configs.vite, 17 | ], 18 | languageOptions: { 19 | ecmaVersion: 2020, 20 | globals: globals.browser, 21 | }, 22 | }, 23 | ]) 24 | -------------------------------------------------------------------------------- /jscript/vue/sample-blog/public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Squidex Blog Sample 11 | 12 | 13 | 14 | 15 | 18 | 19 |
    20 | 21 | 22 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/src/shared/Post.tsx: -------------------------------------------------------------------------------- 1 | import { Link } from 'react-router-dom'; 2 | import { flatten } from '../utils'; 3 | import { Markdown } from './Markdown'; 4 | 5 | export const Post = ({ post, withLink }: { post: any, withLink?: true }) => { 6 | const { id } = post; 7 | const postData = flatten(post); 8 | 9 | return ( 10 |
    11 | {withLink ? ( 12 | 13 |

    {postData.title}

    14 | 15 | ) : ( 16 |

    {postData.title}

    17 | )} 18 | 19 | 20 |
    21 | ); 22 | }; -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary.Tests/EnrichedEvents/EnrichedEventsTests.Should_deserialize_EnrichedAssetEvent.verified.txt: -------------------------------------------------------------------------------- 1 | { 2 | Id: Guid_1, 3 | Created: DateTimeOffset_1, 4 | LastModified: DateTimeOffset_1, 5 | CreatedBy: { 6 | Id: 6025a698a825d86becf541fe, 7 | Type: subject 8 | }, 9 | LastModifiedBy: { 10 | Id: 6025a698a825d86becf541fe, 11 | Type: subject 12 | }, 13 | MimeType: application/pdf, 14 | FileName: name.pdf, 15 | FileSize: 447021, 16 | IsImage: false, 17 | Actor: { 18 | Id: 6025a698a825d86becf541fe, 19 | Type: subject 20 | }, 21 | App: { 22 | Id: Guid_2, 23 | Name: testapp 24 | }, 25 | Timestamp: DateTimeOffset_2, 26 | Name: AssetCreatedFromSnapshot, 27 | Version: 1 28 | } -------------------------------------------------------------------------------- /jscript/angular/editor/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # Compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | /bazel-out 8 | 9 | # Node 10 | /node_modules 11 | npm-debug.log 12 | yarn-error.log 13 | 14 | # IDEs and editors 15 | .idea/ 16 | .project 17 | .classpath 18 | .c9/ 19 | *.launch 20 | .settings/ 21 | *.sublime-workspace 22 | 23 | # Visual Studio Code 24 | .vscode/* 25 | !.vscode/settings.json 26 | !.vscode/tasks.json 27 | !.vscode/launch.json 28 | !.vscode/extensions.json 29 | .history/* 30 | 31 | # Miscellaneous 32 | /.angular/cache 33 | .sass-cache/ 34 | /connect.lock 35 | /coverage 36 | /libpeerconnection.log 37 | testem.log 38 | /typings 39 | 40 | # System files 41 | .DS_Store 42 | Thumbs.db 43 | -------------------------------------------------------------------------------- /jscript/angular/editor/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/plugins/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/AI/IQueryCache.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.CLI.Commands.Implementation.AI; 9 | 10 | public interface IQueryCache 11 | { 12 | Task GetAsync(string prompt, 13 | CancellationToken ct = default); 14 | 15 | Task StoreAsync(string prompt, GeneratedContent content, 16 | CancellationToken ct); 17 | } 18 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/ImExport/IExportSettings.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.CLI.Commands.Implementation.ImExport; 9 | 10 | public interface IExportSettings 11 | { 12 | string Schema { get; } 13 | 14 | string Filter { get; } 15 | 16 | string OrderBy { get; } 17 | 18 | string FullText { get; } 19 | 20 | bool Unpublished { get; } 21 | } 22 | -------------------------------------------------------------------------------- /jscript/vue/sample-blog/src/App.vue: -------------------------------------------------------------------------------- 1 | 16 | 17 | 27 | 28 | 33 | -------------------------------------------------------------------------------- /csharp/Sample.Profile/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # Stage 1, Prebuild 3 | # 4 | FROM mcr.microsoft.com/dotnet/core/sdk:3.0-buster as builder 5 | 6 | WORKDIR / 7 | 8 | # Copy csproj first to speed up restore 9 | COPY Sample.Profile.sln . 10 | COPY Sample.Profile/Sample.Profile.csproj Sample.Profile/ 11 | 12 | RUN dotnet restore 13 | 14 | # Copy all other stuff 15 | COPY . . 16 | 17 | # Publish 18 | RUN dotnet publish Sample.Profile/Sample.Profile.csproj -c Release -o /app/publish 19 | 20 | # 21 | # Stage 2, Build runtime 22 | # 23 | FROM mcr.microsoft.com/dotnet/core/aspnet:3.0-buster-slim 24 | 25 | # Default app directory 26 | WORKDIR /app 27 | 28 | # Copy from build stage 29 | COPY --from=builder /app/publish . 30 | 31 | EXPOSE 80 32 | 33 | ENTRYPOINT ["dotnet", "Sample.Profile.dll"] -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/environments/environment.ts: -------------------------------------------------------------------------------- 1 | // This file can be replaced during build by using the `fileReplacements` array. 2 | // `ng build --prod` replaces `environment.ts` with `environment.prod.ts`. 3 | // The list of file replacements can be found in `angular.json`. 4 | 5 | export const environment = { 6 | production: false 7 | }; 8 | 9 | /* 10 | * For easier debugging in development mode, you can import the following file 11 | * to ignore zone related error stack frames such as `zone.run`, `zoneDelegate.invokeTask`. 12 | * 13 | * This import should be commented out in production mode because it will have a negative impact 14 | * on performance if an error is thrown. 15 | */ 16 | // import 'zone.js/dist/zone-error'; // Included with Angular CLI. 17 | -------------------------------------------------------------------------------- /node/graphql-codegen-csharp/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", 4 | "target": "ES2023", 5 | "lib": ["ES2023"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "verbatimModuleSyntax": true, 13 | "moduleDetection": "force", 14 | "noEmit": true, 15 | 16 | /* Linting */ 17 | "strict": true, 18 | "noUnusedLocals": true, 19 | "noUnusedParameters": true, 20 | "erasableSyntaxOnly": true, 21 | "noFallthroughCasesInSwitch": true, 22 | "noUncheckedSideEffectImports": true, 23 | 24 | "outDir": "./dist" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![Squidex Logo](https://raw.githubusercontent.com/Squidex/squidex/master/media/logo-wide.png "Squidex") 2 | 3 | # Squidex Samples 4 | 5 | This repository contains samples for Squidex CMS. 6 | 7 | ## How to make feature requests, get help or report bugs? 8 | 9 | Please join our community forum: https://support.squidex.io 10 | 11 | ## C# 12 | 13 | * [Client Library for .NET Standard](csharp/Squidex.ClientLibrary). Also available on [nuget.org](https://www.nuget.org/packages/Squidex.ClientLibrary/). 14 | * [Sample Blog](csharp/Sample.Blog) 15 | * [Sample Profile](csharp/Sample.Profile) 16 | 17 | ## Javascript 18 | 19 | * [Sample React Blog](jscript/react/sample-blog) 20 | * [Sample Angular Blog](jscript/angular/sample-blog) 21 | * [Sample Vue.js Blog](jscript/vue/sample-blog) -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/App/AppRoleModel.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using System.ComponentModel.DataAnnotations; 9 | 10 | namespace Squidex.CLI.Commands.Implementation.Sync.App; 11 | 12 | internal sealed class AppRoleModel 13 | { 14 | [Required] 15 | public List Permissions { get; set; } 16 | 17 | public Dictionary? Properties { get; set; } 18 | } 19 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Schemas/SchemaCreateModel.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Squidex.ClientLibrary; 9 | 10 | namespace Squidex.CLI.Commands.Implementation.Sync.Schemas; 11 | 12 | internal class SchemaCreateModel 13 | { 14 | public string Name { get; set; } 15 | 16 | public bool IsSingleton { get; set; } 17 | 18 | public SchemaType SchemaType { get; set; } 19 | } 20 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/Component.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.ClientLibrary; 9 | 10 | /// 11 | /// Holds constants to work with components. 12 | /// 13 | public static class Component 14 | { 15 | /// 16 | /// The used discriminator key for components. 17 | /// 18 | public const string Discriminator = "schemaId"; 19 | } 20 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/src/utils/deferred.ts: -------------------------------------------------------------------------------- 1 | export class Deferred { 2 | public readonly promise: Promise; 3 | private resolveFn!: (value: T | PromiseLike) => void; 4 | private rejectFn!: (reason?: any) => void; 5 | 6 | public constructor() { 7 | this.promise = new Promise((resolve, reject) => { 8 | this.resolveFn = resolve 9 | this.rejectFn = reject 10 | }) 11 | } 12 | 13 | public reject(reason?: any) { 14 | this.rejectFn(reason); 15 | return this; 16 | } 17 | 18 | public resolve(param: T) { 19 | this.resolveFn(param); 20 | return this; 21 | } 22 | 23 | public static value(value: T) { 24 | return new Deferred().resolve(value); 25 | } 26 | } -------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/tsconfig.node.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo", 4 | "target": "ES2023", 5 | "lib": ["ES2023"], 6 | "module": "ESNext", 7 | "skipLibCheck": true, 8 | 9 | /* Bundler mode */ 10 | "moduleResolution": "bundler", 11 | "allowImportingTsExtensions": true, 12 | "verbatimModuleSyntax": true, 13 | "moduleDetection": "force", 14 | "noEmit": true, 15 | 16 | /* Linting */ 17 | "strict": true, 18 | "noUnusedLocals": true, 19 | "noUnusedParameters": true, 20 | "erasableSyntaxOnly": true, 21 | "noFallthroughCasesInSwitch": true, 22 | "noUncheckedSideEffectImports": true 23 | }, 24 | "include": ["vite.config.ts"] 25 | } 26 | -------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/Models/PostsVM.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using System.Collections.Generic; 9 | 10 | namespace Sample.Blog.Models 11 | { 12 | public sealed class PostsVM 13 | { 14 | public List Posts { get; set; } 15 | 16 | public long Total { get; set; } 17 | 18 | public long Page { get; set; } 19 | 20 | public long PageSize { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/top-nav/top-nav.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { Observable } from 'rxjs'; 3 | import { map } from 'rxjs/operators'; 4 | 5 | import { ContentService, Page } from '../services/content.service'; 6 | 7 | @Component({ 8 | selector: 'app-top-nav', 9 | templateUrl: './top-nav.component.html', 10 | styleUrls: ['./top-nav.component.scss'] 11 | }) 12 | export class TopNavComponent implements OnInit { 13 | public pages$: Observable; 14 | 15 | constructor( 16 | public readonly contentsService: ContentService 17 | ) { 18 | } 19 | 20 | public ngOnInit() { 21 | this.pages$ = this.contentsService.getPages().pipe( 22 | map(x => x.pages) 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary.ServiceExtensions/HttpClientProvider.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Squidex.ClientLibrary.Configuration; 9 | 10 | namespace Squidex.ClientLibrary.ServiceExtensions; 11 | 12 | internal sealed class HttpClientProvider(Func factory) : IHttpClientProvider 13 | { 14 | /// 15 | public HttpClient Get() 16 | { 17 | return factory(); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/Utils/NamedId.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.ClientLibrary.Utils; 9 | 10 | /// 11 | /// Id with a name. 12 | /// 13 | public class NamedId 14 | { 15 | /// 16 | /// Id. 17 | /// 18 | public string Id { get; set; } 19 | 20 | /// 21 | /// Name. 22 | /// 23 | public string Name { get; set; } 24 | } 25 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/posts-site/posts-site.component.ts: -------------------------------------------------------------------------------- 1 | import { Component, OnInit } from '@angular/core'; 2 | import { Observable } from 'rxjs'; 3 | import { map } from 'rxjs/operators'; 4 | 5 | import { ContentService, Post } from '../services/content.service'; 6 | 7 | @Component({ 8 | selector: 'app-posts-site', 9 | templateUrl: './posts-site.component.html', 10 | styleUrls: ['./posts-site.component.scss'] 11 | }) 12 | export class PostsSiteComponent implements OnInit { 13 | public posts$: Observable; 14 | 15 | constructor( 16 | public readonly contentsService: ContentService 17 | ) { 18 | } 19 | 20 | public ngOnInit() { 21 | this.posts$ = this.contentsService.getPosts().pipe( 22 | map(x => x.posts) 23 | ); 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /node/proxy/config.ts: -------------------------------------------------------------------------------- 1 | const config = { 2 | squidex: { 3 | url: trimEnd(process.env.SQUIDEX__URL || 'https://cloud.squidex.io'), 4 | clientId: process.env.SQUIDEX__CLIENTID || 'squidex-website:reader', 5 | clientSecret: process.env.SQUIDEX__CLIENTSECRET || 'yy9x4dcxsnp1s34r2z19t88wedbzxn1tfq7uzmoxf60x' 6 | }, 7 | server: { 8 | port: parseInt(process.env.SERVER_PORT!) || 3000 9 | }, 10 | cache: { 11 | duration: parseInt(process.env.CACHE__DURATION!) || (30 * 60), 12 | }, 13 | redis: { 14 | url: process.env.REDIS__URL 15 | } 16 | }; 17 | 18 | function trimEnd(value: string) { 19 | while (value.endsWith('/')) { 20 | value = value.substr(0, value.length - 1) 21 | } 22 | 23 | return value; 24 | } 25 | 26 | export default config; -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Contents/ContentsModel.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using System.ComponentModel.DataAnnotations; 9 | 10 | namespace Squidex.CLI.Commands.Implementation.Sync.Contents; 11 | 12 | internal sealed class ContentsModel 13 | { 14 | [Required] 15 | public List Contents { get; set; } 16 | 17 | public string? SourceApp { get; set; } 18 | 19 | public string? SourceUrl { get; set; } 20 | } 21 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/Utils/Actor.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.ClientLibrary.Utils; 9 | 10 | /// 11 | /// Represent an actor that make actions. 12 | /// 13 | public class Actor 14 | { 15 | /// 16 | /// Id. 17 | /// 18 | public string Id { get; set; } 19 | 20 | /// 21 | /// Type. 22 | /// 23 | public string Type { get; set; } 24 | } 25 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/ISession.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Squidex.ClientLibrary; 9 | 10 | namespace Squidex.CLI.Commands.Implementation; 11 | 12 | public interface ISession 13 | { 14 | string App { get; } 15 | 16 | string ClientId { get; } 17 | 18 | string ClientSecret { get; } 19 | 20 | string Url { get; } 21 | 22 | DirectoryInfo WorkingDirectory { get; } 23 | 24 | ISquidexClient Client { get; } 25 | } 26 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/App/AssetScriptsModel.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.CLI.Commands.Implementation.Sync.App; 9 | 10 | internal sealed class AssetScriptsModel 11 | { 12 | public string? Create { get; set; } 13 | 14 | public string? Update { get; set; } 15 | 16 | public string? Annotate { get; set; } 17 | 18 | public string? Move { get; set; } 19 | 20 | public string? Delete { get; set; } 21 | } 22 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/FileSystem/IFile.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.CLI.Commands.Implementation.FileSystem; 9 | 10 | public interface IFile 11 | { 12 | string FullName { get; } 13 | 14 | string FullLocalName { get; } 15 | 16 | string Name { get; } 17 | 18 | bool Exists { get; } 19 | 20 | long Size { get; } 21 | 22 | Stream OpenRead(); 23 | 24 | Stream OpenWrite(); 25 | 26 | void Delete(); 27 | } 28 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/DynamicData.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Newtonsoft.Json.Linq; 9 | 10 | namespace Squidex.ClientLibrary; 11 | 12 | /// 13 | /// A dynamic data object. 14 | /// 15 | /// 16 | /// Use this type when you have a dynamic structure for your content or if you query content items across many schemas. 17 | /// 18 | [KeepCasing] 19 | public sealed class DynamicData : Dictionary 20 | { 21 | } 22 | -------------------------------------------------------------------------------- /node/graphql-codegen-csharp/README.md: -------------------------------------------------------------------------------- 1 | # GraphQL Codegen CSharp 2 | 3 | A project that converts schemas into C# POCOs through GraphQL Introspection. 4 | This can be helpful for cases where complex references are pre-resolve via GraphQL, stored as JSON, and parsed at runtime. 5 | 6 | ## Setup 7 | - node (ts-node) 8 | - TypeScript 9 | - GraphQL 10 | - GraphQL-Codegen 11 | 12 | ## How to Run 13 | ```bash 14 | yarn && yarn codegen 15 | ``` 16 | 17 | # known issues 18 | The c-sharp plugin for graphql-codegen does not return results for union types that link multiple complex schemas of reference types. 19 | 20 | ## Available Scripts 21 | - `lint`: Runs ESLint for code linting 22 | - `format`: Checks code formatting with Prettier 23 | - `format:fix`: Fixes code formatting with Prettier 24 | - `codegen`: Generates CSharp types from GraphQL schema using GraphQL-Codegen -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/CLIException.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.CLI.Commands.Implementation; 9 | 10 | [Serializable] 11 | public class CLIException : Exception 12 | { 13 | public CLIException() 14 | { 15 | } 16 | 17 | public CLIException(string message) 18 | : base(message) 19 | { 20 | } 21 | 22 | public CLIException(string message, Exception inner) 23 | : base(message, inner) 24 | { 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/FileSystem/IFileSystem.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.CLI.Commands.Implementation.FileSystem; 9 | 10 | public interface IFileSystem : IDisposable 11 | { 12 | string FullName { get; } 13 | 14 | bool CanWrite => true; 15 | 16 | bool CanAccessInParallel => false; 17 | 18 | Task OpenAsync(); 19 | 20 | IFile GetFile(FilePath path); 21 | 22 | IEnumerable GetFiles(FilePath path, string extension); 23 | } 24 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/DynamicContent.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.ClientLibrary; 9 | 10 | /// 11 | /// A content with a dynamic data structure. 12 | /// 13 | /// 14 | /// 15 | /// Use this type when you have a dynamic structure for your content or if you query content items across many schemas. 16 | /// 17 | public sealed class DynamicContent : Content 18 | { 19 | } 20 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Configuration/ConfiguredApp.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.CLI.Configuration; 9 | 10 | public record ConfiguredApp 11 | { 12 | public string ServiceUrl { get; init; } 13 | 14 | public string ClientId { get; init; } 15 | 16 | public string ClientSecret { get; init; } 17 | 18 | public string Name { get; init; } 19 | 20 | public Dictionary? Headers { get; init; } 21 | 22 | public bool IgnoreSelfSigned { get; init; } 23 | } 24 | -------------------------------------------------------------------------------- /csharp/Integration.Localize/Dockerfile: -------------------------------------------------------------------------------- 1 | # 2 | # Stage 1, Prebuild 3 | # 4 | FROM mcr.microsoft.com/dotnet/sdk:6.0 as builder 5 | 6 | WORKDIR /src 7 | 8 | # Copy csproj first to speed up restore 9 | COPY Integration.Localize.sln . 10 | COPY Integration.Localize/Integration.Localize.csproj Integration.Localize/ 11 | COPY CodeGeneration/CodeGeneration.csproj CodeGeneration/ 12 | 13 | RUN dotnet restore 14 | 15 | # Copy all other stuff 16 | COPY . . 17 | 18 | # Publish 19 | RUN dotnet publish Integration.Localize/Integration.Localize.csproj -c Release -o /app/publish 20 | 21 | # 22 | # Stage 2, Build runtime 23 | # 24 | FROM mcr.microsoft.com/dotnet/aspnet:6.0.0-bullseye-slim 25 | 26 | # Default app directory 27 | WORKDIR /app 28 | 29 | # Copy from build stage 30 | COPY --from=builder /app/publish . 31 | 32 | EXPOSE 80 33 | 34 | ENTRYPOINT ["dotnet", "Integration.Localize.dll"] -------------------------------------------------------------------------------- /jscript/angular/sample-blog/.gitignore: -------------------------------------------------------------------------------- 1 | # See http://help.github.com/ignore-files/ for more about ignoring files. 2 | 3 | # compiled output 4 | /dist 5 | /tmp 6 | /out-tsc 7 | # Only exists if Bazel was run 8 | /bazel-out 9 | 10 | # dependencies 11 | /node_modules 12 | 13 | # profiling files 14 | chrome-profiler-events*.json 15 | speed-measure-plugin*.json 16 | 17 | # IDEs and editors 18 | /.idea 19 | .project 20 | .classpath 21 | .c9/ 22 | *.launch 23 | .settings/ 24 | *.sublime-workspace 25 | 26 | # IDE - VSCode 27 | .vscode/* 28 | !.vscode/settings.json 29 | !.vscode/tasks.json 30 | !.vscode/launch.json 31 | !.vscode/extensions.json 32 | .history/* 33 | 34 | # misc 35 | /.sass-cache 36 | /connect.lock 37 | /coverage 38 | /libpeerconnection.log 39 | npm-debug.log 40 | yarn-error.log 41 | testem.log 42 | /typings 43 | 44 | # System Files 45 | .DS_Store 46 | Thumbs.db 47 | -------------------------------------------------------------------------------- /jscript/react/sample-blog/src/components/TopNav.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { NavLink } from 'react-router-dom'; 3 | import { getPages } from './../service'; 4 | 5 | export const TopNav = () => { 6 | const [pages, setPages] = React.useState([]); 7 | 8 | React.useEffect(() => { 9 | async function fetchData() { 10 | const results = await getPages(); 11 | 12 | setPages(results.pages); 13 | } 14 | 15 | fetchData(); 16 | }, []); 17 | 18 | return ( 19 |
      20 | {pages.map(page => ( 21 |
    • 22 | {page.title} 23 |
    • 24 | ))} 25 |
    26 | ) 27 | }; -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/ExtendableRulesDto.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.ClientLibrary; 9 | 10 | /// 11 | /// The result set of rules. 12 | /// 13 | /// 14 | public sealed class ExtendableRulesDto : Resource 15 | { 16 | /// 17 | /// Gets or sets the rules. 18 | /// 19 | /// 20 | /// The rules. 21 | /// 22 | public List Items { get; set; } 23 | } 24 | -------------------------------------------------------------------------------- /jscript/angular/editor/src/app/app.component.ts: -------------------------------------------------------------------------------- 1 | import { Component } from '@angular/core'; 2 | import { FormControl } from '@angular/forms'; 3 | 4 | declare var SquidexFormField: any; 5 | 6 | @Component({ 7 | selector: 'app-root', 8 | templateUrl: './app.component.html', 9 | styleUrls: ['./app.component.scss'] 10 | }) 11 | export class AppComponent { 12 | form = new FormControl(); 13 | 14 | constructor() { 15 | const field = new SquidexFormField(); 16 | 17 | field.onDisabled((disabled: boolean) => { 18 | if (disabled) { 19 | this.form.disable(); 20 | } else { 21 | this.form.enable(); 22 | } 23 | }); 24 | 25 | field.onValueChanged((value: any) => { 26 | this.form.setValue(value); 27 | }); 28 | 29 | this.form.valueChanges.subscribe(value => { 30 | field.valueChanged(value); 31 | }) 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /jscript/angular/editor/src/test.ts: -------------------------------------------------------------------------------- 1 | // This file is required by karma.conf.js and loads recursively all the .spec and framework files 2 | 3 | import 'zone.js/testing'; 4 | import { getTestBed } from '@angular/core/testing'; 5 | import { 6 | BrowserDynamicTestingModule, 7 | platformBrowserDynamicTesting 8 | } from '@angular/platform-browser-dynamic/testing'; 9 | 10 | declare const require: { 11 | context(path: string, deep?: boolean, filter?: RegExp): { 12 | (id: string): T; 13 | keys(): string[]; 14 | }; 15 | }; 16 | 17 | // First, initialize the Angular testing environment. 18 | getTestBed().initTestEnvironment( 19 | BrowserDynamicTestingModule, 20 | platformBrowserDynamicTesting(), 21 | ); 22 | 23 | // Then we find all the tests. 24 | const context = require.context('./', true, /\.spec\.ts$/); 25 | // And load the modules. 26 | context.keys().map(context); 27 | -------------------------------------------------------------------------------- /csharp/stylecop.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", 3 | "settings": { 4 | "orderingRules": { 5 | "usingDirectivesPlacement": "outsideNamespace" 6 | }, 7 | "documentationRules": { 8 | "companyName": "Squidex UG (haftungsbeschraenkt)", 9 | "copyrightText": "==========================================================================\n Squidex Headless CMS\n==========================================================================\n Copyright (c) {companyName}\n All rights reserved. Licensed under the {licenseName} license.\n==========================================================================", 10 | "variables": { 11 | "licenseName": "MIT" 12 | }, 13 | "xmlHeader": false 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /editors/markdown/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "markdown", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "dev": "vite", 8 | "build": "tsc && vite build", 9 | "build-editor": "tsc && vite build --base=/squidex-samples/editors/markdown/", 10 | "preview": "vite preview", 11 | "server-local": "docker run -p 3100:3100 -v dist/index.html:/usr/share/caddy/index.html caddy caddy --root /var/www/html --listen :3100 --browse" 12 | }, 13 | "devDependencies": { 14 | "@types/simplemde": "^1.11.10", 15 | "@typescript-eslint/eslint-plugin": "^6.0.0", 16 | "@typescript-eslint/parser": "^6.0.0", 17 | "eslint": "^8.45.0", 18 | "typescript": "^5.0.2", 19 | "vite": "^4.4.5" 20 | }, 21 | "dependencies": { 22 | "easymde": "^2.18.0", 23 | "font-awesome": "4.7.0", 24 | "marked": "^6.0.0" 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/stylecop.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", 3 | "settings": { 4 | "orderingRules": { 5 | "usingDirectivesPlacement": "outsideNamespace" 6 | }, 7 | "documentationRules": { 8 | "companyName": "Squidex UG (haftungsbeschraenkt)", 9 | "copyrightText": "==========================================================================\n Squidex Headless CMS\n==========================================================================\n Copyright (c) {companyName}\n All rights reserved. Licensed under the {licenseName} license.\n==========================================================================", 10 | "variables": { 11 | "licenseName": "MIT" 12 | }, 13 | "xmlHeader": false 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/Models/IApiClient.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using System.Collections.Generic; 9 | using System.Threading.Tasks; 10 | 11 | namespace Sample.Blog.Models 12 | { 13 | public interface IApiClient 14 | { 15 | Task<(long Total, List Posts)> GetBlogPostsAsync(int page = 0, int pageSize = 3); 16 | 17 | Task> GetPagesAsync(); 18 | 19 | Task GetBlogPostAsync(string id); 20 | 21 | Task GetPageAsync(string slug); 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /csharp/Sample.Blog/stylecop.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", 3 | "settings": { 4 | "orderingRules": { 5 | "usingDirectivesPlacement": "outsideNamespace" 6 | }, 7 | "documentationRules": { 8 | "companyName": "Squidex UG (haftungsbeschraenkt)", 9 | "copyrightText": "==========================================================================\n Squidex Headless CMS\n==========================================================================\n Copyright (c) {companyName}\n All rights reserved. Licensed under the {licenseName} license.\n==========================================================================", 10 | "variables": { 11 | "licenseName": "MIT" 12 | }, 13 | "xmlHeader": false 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/Models/Skill.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Newtonsoft.Json; 9 | using Squidex.ClientLibrary; 10 | 11 | namespace Sample.Profile.Models 12 | { 13 | public class Skill : Content 14 | { 15 | } 16 | 17 | public class SkillData 18 | { 19 | [JsonConverter(typeof(InvariantConverter))] 20 | public string Name { get; set; } 21 | 22 | [JsonConverter(typeof(InvariantConverter))] 23 | public string Experience { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/tsconfig.app.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo", 4 | "target": "ES2022", 5 | "useDefineForClassFields": true, 6 | "lib": ["ES2022", "DOM", "DOM.Iterable"], 7 | "module": "ESNext", 8 | "skipLibCheck": true, 9 | 10 | /* Bundler mode */ 11 | "moduleResolution": "bundler", 12 | "allowImportingTsExtensions": true, 13 | "verbatimModuleSyntax": true, 14 | "moduleDetection": "force", 15 | "noEmit": true, 16 | "jsx": "react-jsx", 17 | 18 | /* Linting */ 19 | "strict": true, 20 | "noUnusedLocals": true, 21 | "noUnusedParameters": true, 22 | "erasableSyntaxOnly": true, 23 | "noFallthroughCasesInSwitch": true, 24 | "noUncheckedSideEffectImports": true, 25 | 26 | "allowJs": true 27 | }, 28 | "include": ["src"] 29 | } 30 | -------------------------------------------------------------------------------- /csharp/Sample.Jscript/stylecop.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", 3 | "settings": { 4 | "orderingRules": { 5 | "usingDirectivesPlacement": "outsideNamespace" 6 | }, 7 | "documentationRules": { 8 | "companyName": "Squidex UG (haftungsbeschraenkt)", 9 | "copyrightText": "==========================================================================\n Squidex Headless CMS\n==========================================================================\n Copyright (c) {companyName}\n All rights reserved. Licensed under the {licenseName} license.\n==========================================================================", 10 | "variables": { 11 | "licenseName": "MIT" 12 | }, 13 | "xmlHeader": false 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /csharp/Sample.Profile/stylecop.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", 3 | "settings": { 4 | "orderingRules": { 5 | "usingDirectivesPlacement": "outsideNamespace" 6 | }, 7 | "documentationRules": { 8 | "companyName": "Squidex UG (haftungsbeschraenkt)", 9 | "copyrightText": "==========================================================================\n Squidex Headless CMS\n==========================================================================\n Copyright (c) {companyName}\n All rights reserved. Licensed under the {licenseName} license.\n==========================================================================", 10 | "variables": { 11 | "licenseName": "MIT" 12 | }, 13 | "xmlHeader": false 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /csharp/Integration.Localize/stylecop.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", 3 | "settings": { 4 | "orderingRules": { 5 | "usingDirectivesPlacement": "outsideNamespace" 6 | }, 7 | "documentationRules": { 8 | "companyName": "Squidex UG (haftungsbeschraenkt)", 9 | "copyrightText": "==========================================================================\n Squidex Headless CMS\n==========================================================================\n Copyright (c) {companyName}\n All rights reserved. Licensed under the {licenseName} license.\n==========================================================================", 10 | "variables": { 11 | "licenseName": "MIT" 12 | }, 13 | "xmlHeader": false 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/stylecop.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "https://raw.githubusercontent.com/DotNetAnalyzers/StyleCopAnalyzers/master/StyleCop.Analyzers/StyleCop.Analyzers/Settings/stylecop.schema.json", 3 | "settings": { 4 | "orderingRules": { 5 | "usingDirectivesPlacement": "outsideNamespace" 6 | }, 7 | "documentationRules": { 8 | "companyName": "Squidex UG (haftungsbeschraenkt)", 9 | "copyrightText": "==========================================================================\n Squidex Headless CMS\n==========================================================================\n Copyright (c) {companyName}\n All rights reserved. Licensed under the {licenseName} license.\n==========================================================================", 10 | "variables": { 11 | "licenseName": "MIT" 12 | }, 13 | "xmlHeader": false 14 | } 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/Contents/ContentModel.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using System.ComponentModel.DataAnnotations; 9 | using Squidex.ClientLibrary; 10 | 11 | namespace Squidex.CLI.Commands.Implementation.Sync.Contents; 12 | 13 | internal sealed class ContentModel 14 | { 15 | [Required] 16 | public string Schema { get; set; } 17 | 18 | [Required] 19 | public DynamicData Data { get; set; } 20 | 21 | public string? Id { get; set; } 22 | 23 | public string? Status { get; set; } 24 | } 25 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary.Tests/EnrichedEvents/EnrichedEventsTests.Should_deserialize_EnrichedContentEvent.verified.txt: -------------------------------------------------------------------------------- 1 | { 2 | Type: Updated, 3 | Id: Guid_1, 4 | Created: DateTimeOffset_1, 5 | LastModified: DateTimeOffset_2, 6 | CreatedBy: { 7 | Id: 601c2cbafa4e669f214c0438, 8 | Type: subject 9 | }, 10 | LastModifiedBy: { 11 | Id: 601c2cbafa4e669f214c0438, 12 | Type: subject 13 | }, 14 | Data: { 15 | testField: { 16 | iv: [] 17 | } 18 | }, 19 | DataOld: { 20 | testField: { 21 | iv: [] 22 | } 23 | }, 24 | Status: Published, 25 | Schema: { 26 | Id: Guid_1, 27 | Name: schema 28 | }, 29 | Actor: { 30 | Id: 601c2cbafa4e669f214c0438, 31 | Type: subject 32 | }, 33 | App: { 34 | Id: Guid_2, 35 | Name: testapp 36 | }, 37 | Timestamp: DateTimeOffset_2, 38 | Name: SchemaUpdated, 39 | Version: 3 40 | } -------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/Models/PageData.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Newtonsoft.Json; 9 | using Squidex.ClientLibrary; 10 | 11 | namespace Sample.Blog.Models 12 | { 13 | public sealed class PageData 14 | { 15 | [JsonConverter(typeof(InvariantConverter))] 16 | public string Title { get; set; } 17 | 18 | [JsonConverter(typeof(InvariantConverter))] 19 | public string Slug { get; set; } 20 | 21 | [JsonConverter(typeof(InvariantConverter))] 22 | public string Text { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/EnrichedEvents/EnrichedUsageExceededEvent.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.ClientLibrary.EnrichedEvents; 9 | 10 | /// 11 | /// Usage Exceeded Event. 12 | /// 13 | public sealed class EnrichedUsageExceededEvent : EnrichedEvent 14 | { 15 | /// 16 | /// Current calls. 17 | /// 18 | public long CallsCurrent { get; set; } 19 | 20 | /// 21 | /// Calls limit. 22 | /// 23 | public long CallsLimit { get; set; } 24 | } 25 | -------------------------------------------------------------------------------- /jscript/react/sample-blog/src/components/PostSite.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useParams } from 'react-router-dom'; 3 | import { Post } from './Post.js'; 4 | import { getPost } from './../service'; 5 | 6 | export const PostSite = () => { 7 | const { id } = useParams(); 8 | 9 | const [post, setPost] = React.useState(undefined); 10 | 11 | React.useEffect(() => { 12 | async function fetchData() { 13 | try { 14 | const result = await getPost(id); 15 | 16 | setPost(result); 17 | } catch (ex) { 18 | setPost(null); 19 | } 20 | } 21 | 22 | fetchData(); 23 | }, [id]); 24 | 25 | if (post) { 26 | return 27 | } else if (post === null) { 28 | return
    Post not found.
    29 | } else { 30 | return
    Loading Post...
    31 | } 32 | } 33 | -------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/Models/BlogPostData.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Newtonsoft.Json; 9 | using Squidex.ClientLibrary; 10 | 11 | namespace Sample.Blog.Models 12 | { 13 | public sealed class BlogPostData 14 | { 15 | [JsonConverter(typeof(InvariantConverter))] 16 | public string Title { get; set; } 17 | 18 | [JsonConverter(typeof(InvariantConverter))] 19 | public string Slug { get; set; } 20 | 21 | [JsonConverter(typeof(InvariantConverter))] 22 | public string Text { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/EnrichedEvents/EnrichedCommentEvent.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.ClientLibrary.EnrichedEvents; 9 | 10 | /// 11 | /// Event generated from a comment. 12 | /// 13 | public sealed class EnrichedCommentEvent : EnrichedUserEventBase 14 | { 15 | /// 16 | /// Comment's text. 17 | /// 18 | public string Text { get; set; } 19 | 20 | /// 21 | /// Url of the content commented. 22 | /// 23 | public Uri Url { get; set; } 24 | } 25 | -------------------------------------------------------------------------------- /jscript/vue/sample-blog/src/router/index.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | import VueRouter from 'vue-router' 3 | import PageSite from './../components/PageSite'; 4 | import PostSite from './../components/PostSite'; 5 | import PostsSite from './../components/PostsSite'; 6 | 7 | Vue.use(VueRouter) 8 | 9 | const routes = [ 10 | { 11 | path: '/', 12 | name: 'home', 13 | component: PostsSite 14 | }, 15 | { 16 | path: '/pages/:slug', 17 | name: 'page', 18 | component: PageSite 19 | }, 20 | { 21 | path: '/blog/:id/:slug', 22 | name: 'blog', 23 | component: PostSite 24 | }, 25 | { 26 | path: '*', 27 | name: 'fallback', 28 | redirect: { name: 'home' } 29 | } 30 | ] 31 | 32 | const router = new VueRouter({ 33 | mode: 'history', 34 | base: process.env.BASE_URL, 35 | routes 36 | }) 37 | 38 | export default router 39 | -------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/Sample.Blog.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | net5.0 4 | 5 | 6 | 7 | 8 | 9 | 10 | all 11 | runtime; build; native; contentfiles; analyzers; buildtransitive 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Configuration/IConfigurationService.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Squidex.CLI.Commands.Implementation; 9 | 10 | namespace Squidex.CLI.Configuration; 11 | 12 | public interface IConfigurationService 13 | { 14 | (string? CurrentApp, (string Name, ConfiguredApp)[] Apps) GetConfiguration(); 15 | 16 | void Upsert(string entry, ConfiguredApp appConfig); 17 | 18 | void Reset(); 19 | 20 | void Remove(string entry); 21 | 22 | void UseApp(string entry); 23 | 24 | ISession StartSession(string app, bool emulate = false); 25 | } 26 | -------------------------------------------------------------------------------- /node/graphql-codegen-csharp/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "graphql-codegen-csharp", 3 | "private": true, 4 | "version": "0.0.0", 5 | "type": "module", 6 | "scripts": { 7 | "lint": "eslint .", 8 | "dev": "ts-node ./src/export-json-schema.ts", 9 | "format": "prettier --check --ignore-path .prettierignore .", 10 | "format:fix": "prettier --write --ignore-path .prettierignore .", 11 | "codegen": "graphql-codegen --config codegen.ts" 12 | }, 13 | "dependencies": { 14 | "@squidex/squidex": "^2.0.1", 15 | "dotenv": "^17.2.1", 16 | "graphql": "^16.11.0" 17 | }, 18 | "devDependencies": { 19 | "@eslint/js": "^9.33.0", 20 | "@graphql-codegen/c-sharp": "^5.1.2", 21 | "@graphql-codegen/c-sharp-operations": "^3.2.0", 22 | "@graphql-codegen/cli": "^5.0.7", 23 | "eslint": "^9.33.0", 24 | "prettier": "^3.6.2", 25 | "typescript": "~5.8.3", 26 | "typescript-eslint": "^8.39.1" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/EnrichedEvents/EnrichedSchemaEvent.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.ClientLibrary.EnrichedEvents; 9 | 10 | /// 11 | /// Event on a schema. 12 | /// 13 | public sealed class EnrichedSchemaEvent : EnrichedSchemaEventBase, IEnrichedEntityEvent 14 | { 15 | /// 16 | /// Type of the event. 17 | /// 18 | public EnrichedSchemaEventType Type { get; set; } 19 | 20 | /// 21 | /// Schema id. 22 | /// 23 | public string Id { get; set; } 24 | } 25 | -------------------------------------------------------------------------------- /csharp/Integration.Localize/CodeGeneration/CodeGeneration.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Exe 5 | net6.0 6 | latest 7 | false 8 | 9 | 10 | 11 | 12 | 13 | 14 | all 15 | 16 | 17 | all 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/EnrichedEvents/EnrichedUserEventBase.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Newtonsoft.Json; 9 | using Squidex.ClientLibrary.Utils; 10 | 11 | namespace Squidex.ClientLibrary.EnrichedEvents; 12 | 13 | /// 14 | /// Avstract class for events triggered by an Actor. 15 | /// 16 | public abstract class EnrichedUserEventBase : EnrichedEvent 17 | { 18 | /// 19 | /// Actor who has triggered the event. 20 | /// 21 | [JsonConverter(typeof(ActorConverter))] 22 | public Actor Actor { get; set; } 23 | } 24 | -------------------------------------------------------------------------------- /jscript/react/sample-blog/src/components/PageSite.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useParams } from 'react-router-dom'; 3 | import { Page } from './Page.js'; 4 | import { getPage } from './../service'; 5 | 6 | export const PageSite = () => { 7 | const { slug } = useParams(); 8 | 9 | const [page, setPage] = React.useState(undefined); 10 | 11 | React.useEffect(() => { 12 | setPage(undefined); 13 | 14 | async function fetchData() { 15 | try { 16 | const result = await getPage(slug); 17 | 18 | setPage(result); 19 | } catch (ex) { 20 | setPage(null); 21 | } 22 | } 23 | 24 | fetchData(); 25 | }, [slug]); 26 | 27 | if (page) { 28 | return 29 | } else if (page === null) { 30 | return
    Page not found.
    31 | } else { 32 | return
    Loading Page...
    33 | } 34 | } 35 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/ILogger.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.CLI.Commands.Implementation; 9 | 10 | public interface ILogger 11 | { 12 | void StepStart(string process); 13 | 14 | void StepFailed(string reason); 15 | 16 | void StepSuccess(string? details = null); 17 | 18 | void StepSkipped(string reason); 19 | 20 | void WriteLine(); 21 | 22 | void WriteJson(object message); 23 | 24 | void WriteLine(string message); 25 | 26 | void WriteLine(string message, params object?[] args); 27 | 28 | ILogLine WriteSameLine(); 29 | } 30 | -------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/Views/Shared/Error.cshtml: -------------------------------------------------------------------------------- 1 | @model ErrorVM 2 | @{ 3 | ViewData["Title"] = "Error"; 4 | } 5 | 6 |

    Error.

    7 |

    An error occurred while processing your request.

    8 | 9 | @if (Model.ShowRequestId) 10 | { 11 |

    12 | Request ID: @Model.RequestId 13 |

    14 | } 15 | 16 |

    Development Mode

    17 |

    18 | Swapping to Development environment will display more detailed information about the error that occurred. 19 |

    20 |

    21 | Development environment should not be enabled in deployed applications, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the ASPNETCORE_ENVIRONMENT environment variable to Development, and restarting the application. 22 |

    23 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/EnrichedEvents/EnrichedSchemaEventBase.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Newtonsoft.Json; 9 | using Squidex.ClientLibrary.Utils; 10 | 11 | namespace Squidex.ClientLibrary.EnrichedEvents; 12 | 13 | /// 14 | /// Abstract class for events on a schema. 15 | /// 16 | public abstract class EnrichedSchemaEventBase : EnrichedUserEventBase 17 | { 18 | /// 19 | /// Schema changed. 20 | /// 21 | [JsonConverter(typeof(NamedIdConverter))] 22 | [JsonProperty("schemaId")] 23 | public NamedId Schema { get; set; } 24 | } 25 | -------------------------------------------------------------------------------- /jscript/angular/sample-blog/src/app/app-routing.module.ts: -------------------------------------------------------------------------------- 1 | import { NgModule } from '@angular/core'; 2 | import { RouterModule, Routes } from '@angular/router'; 3 | 4 | import { PageSiteComponent } from './page-site/page-site.component'; 5 | import { PostSiteComponent } from './post-site/post-site.component'; 6 | import { PostsSiteComponent } from './posts-site/posts-site.component'; 7 | 8 | const routes: Routes = [ 9 | { 10 | path: 'blog/:id/:slug?', 11 | component: PostSiteComponent 12 | }, 13 | { 14 | path: 'blog', 15 | pathMatch: 'full', 16 | component: PostsSiteComponent 17 | }, 18 | { 19 | path: 'pages/:slug', 20 | component: PageSiteComponent 21 | }, 22 | { 23 | path: '**', 24 | component: PostsSiteComponent 25 | } 26 | ]; 27 | 28 | @NgModule({ 29 | imports: [RouterModule.forRoot(routes)], 30 | exports: [RouterModule] 31 | }) 32 | export class AppRoutingModule { } 33 | -------------------------------------------------------------------------------- /csharp/Sample.Profile/Readme.md: -------------------------------------------------------------------------------- 1 | # C# Profile Sample 2 | 3 | You can create an app with prepulated schemas directly in Squidex. 4 | 5 | ## How to run it? 6 | 7 | Just press F5 in Visual Studio, thats it. 8 | 9 | ## How to run it with a custom app? 10 | 11 | Have a look to the configuration first: [appsettings.json](Sample.Profile/appsettings.json) 12 | 13 | You have to change the following settings: 14 | 15 | * `appName`: The name of your app. 16 | * `clientId`: The client id, usually: '`appName`:sample-client' 17 | * `clientSecret`: The secret for your client. You can get it from the Squidex UI. 18 | 19 | Optionally: 20 | 21 | * `url`: The url to your squidex instance, e.g. `http://localhost:5000` if you run it locally. 22 | 23 | ## How to run with docker? 24 | 25 | docker run \ 26 | -d \ 27 | -p 80:80 \ 28 | -e app:appName='YOUR_APP' \ 29 | -e app:clientId='YOUR_APP:sample-client' \ 30 | -e app:clientSecret='SECRET' \ 31 | squidex/sample-profile:latest -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/AI/GeneratedContent.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Newtonsoft.Json.Linq; 9 | 10 | #pragma warning disable MA0048 // File name must match type name 11 | #pragma warning disable SA1313 // Parameter names should begin with lower-case letter 12 | 13 | namespace Squidex.CLI.Commands.Implementation.AI; 14 | 15 | public sealed class GeneratedContent 16 | { 17 | public SimplifiedSchema Schema { get; set; } 18 | 19 | public List> Contents { get; } = []; 20 | } 21 | 22 | public record ReplaceableImage(SimplifiedImage Image, Action Setter); 23 | -------------------------------------------------------------------------------- /csharp/Integration.Localize/Integration.Localize/Integration.Localize.csproj: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | net6.0 5 | enable 6 | enable 7 | 8 | 9 | 10 | 11 | all 12 | runtime; build; native; contentfiles; analyzers; buildtransitive 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/SyncOptions.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.CLI.Commands.Implementation.Sync; 9 | 10 | public sealed class SyncOptions 11 | { 12 | public string[] Targets { get; set; } 13 | 14 | public string[] Languages { get; set; } 15 | 16 | public ContentAction ContentAction { get; set; } 17 | 18 | public bool Delete { get; set; } 19 | 20 | public bool Recreate { get; set; } 21 | 22 | public bool StreamContents { get; set; } 23 | 24 | public bool UpdateCurrentClient { get; set; } 25 | 26 | public DateTimeOffset MaxAgeDate { get; set; } 27 | } 28 | -------------------------------------------------------------------------------- /jscript/react/sample-blog/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sample-profile", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@squidex/squidex": "^1.1.0", 7 | "@testing-library/jest-dom": "^4.2.4", 8 | "@testing-library/react": "^9.4.0", 9 | "@testing-library/user-event": "^7.2.1", 10 | "react": "^16.12.0", 11 | "react-dom": "^16.12.0", 12 | "react-router-dom": "^5.1.2", 13 | "react-scripts": "5.0.1" 14 | }, 15 | "scripts": { 16 | "start": "react-scripts start", 17 | "build": "react-scripts build", 18 | "test": "react-scripts test", 19 | "eject": "react-scripts eject" 20 | }, 21 | "eslintConfig": { 22 | "extends": "react-app" 23 | }, 24 | "browserslist": { 25 | "production": [ 26 | ">0.2%", 27 | "not dead", 28 | "not op_mini all" 29 | ], 30 | "development": [ 31 | "last 1 chrome version", 32 | "last 1 firefox version", 33 | "last 1 safari version" 34 | ] 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /jscript/react/sample-graphql-codegen/README.md: -------------------------------------------------------------------------------- 1 | # React/TypeScript + GraphQL Codegen Sample 2 | 3 | This sample demonstrates generating data models from GraphQL queries and rendering them on a page using a Vite-based setup. 4 | It also includes integration details for using ApolloClient with SquidexClient. 5 | 6 | ## Setup 7 | - React (TypeScript) 8 | - Vite 9 | - GraphQL 10 | - GraphQL-Codegen 11 | 12 | ## How to Run 13 | ```bash 14 | yarn && yarn dev 15 | ``` 16 | Open [http://localhost:5173](http://localhost:5173) in your browser. 17 | 18 | ## Landing Page 19 | ![LandingPage](./public/image.png) 20 | 21 | ## Available Scripts 22 | - `dev`: Runs the app in development mode 23 | - `build`: Compiles TypeScript and builds with Vite 24 | - `lint`: Runs ESLint for code linting 25 | - `preview`: Previews the production build 26 | - `format`: Checks code formatting with Prettier 27 | - `format:fix`: Fixes code formatting with Prettier 28 | - `codegen`: Generates TypeScript types from GraphQL schema using GraphQL-Codegen -------------------------------------------------------------------------------- /cli/Squidex.CLI/Directory.Build.props: -------------------------------------------------------------------------------- 1 | 2 | 3 | sebastianstehle 4 | Squidex UG (haftungsbeschränkt) 5 | MIT 6 | Command Line Interface for Squidex Headless CMS 7 | true 8 | enable 9 | true 10 | latest 11 | enable 12 | logo-squared.png 13 | MIT 14 | https://github.com/Squidex/squidex/ 15 | Squidex HeadlessCMS 16 | true 17 | snupkg 18 | 13.13 19 | 20 | 21 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/GraphQlResponse.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.ClientLibrary; 9 | 10 | /// 11 | /// A graphql response. 12 | /// 13 | /// The type of the data. 14 | public sealed class GraphQlResponse 15 | { 16 | /// 17 | /// The data object. Can be null when no result is returned on an error occurred. 18 | /// 19 | public TData Data { get; set; } 20 | 21 | /// 22 | /// The errors. Can be null when valid. 23 | /// 24 | public GraphQlError[] Errors { get; set; } 25 | } 26 | -------------------------------------------------------------------------------- /csharp/Sample.Blog/Sample.Blog/Program.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Microsoft.AspNetCore.Hosting; 9 | using Microsoft.Extensions.Hosting; 10 | 11 | namespace Sample.Blog 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | CreateHostBuilder(args).Build().Run(); 18 | } 19 | 20 | public static IHostBuilder CreateHostBuilder(string[] args) => 21 | Host.CreateDefaultBuilder(args) 22 | .ConfigureWebHostDefaults(webBuilder => 23 | { 24 | webBuilder.UseStartup(); 25 | }); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /jscript/angular/editor/tsconfig.json: -------------------------------------------------------------------------------- 1 | /* To learn more about this file see: https://angular.io/config/tsconfig. */ 2 | { 3 | "compileOnSave": false, 4 | "compilerOptions": { 5 | "baseUrl": "./", 6 | "outDir": "./dist/out-tsc", 7 | "forceConsistentCasingInFileNames": true, 8 | "strict": true, 9 | "noImplicitOverride": true, 10 | "noPropertyAccessFromIndexSignature": true, 11 | "noImplicitReturns": true, 12 | "noFallthroughCasesInSwitch": true, 13 | "sourceMap": true, 14 | "declaration": false, 15 | "downlevelIteration": true, 16 | "experimentalDecorators": true, 17 | "moduleResolution": "node", 18 | "importHelpers": true, 19 | "target": "es2017", 20 | "module": "es2020", 21 | "lib": [ 22 | "es2020", 23 | "dom" 24 | ] 25 | }, 26 | "angularCompilerOptions": { 27 | "enableI18nLegacyMessageIdFormat": false, 28 | "strictInjectionParameters": true, 29 | "strictInputAccessModifiers": true, 30 | "strictTemplates": true 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/CodeGeneration/CustomPropertyNameGenerator.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using NJsonSchema; 9 | using NJsonSchema.CodeGeneration; 10 | using NJsonSchema.CodeGeneration.CSharp; 11 | 12 | namespace CodeGeneration; 13 | 14 | public sealed class CustomPropertyNameGenerator : IPropertyNameGenerator 15 | { 16 | private readonly CSharpPropertyNameGenerator inner = new CSharpPropertyNameGenerator(); 17 | 18 | public string Generate(JsonSchemaProperty property) 19 | { 20 | if (property.Name == "_links") 21 | { 22 | return "Links"; 23 | } 24 | 25 | return inner.Generate(property); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/CodeGeneration/CustomTagNameGenerator.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using NSwag; 9 | using NSwag.CodeGeneration.OperationNameGenerators; 10 | 11 | namespace CodeGeneration; 12 | 13 | public sealed class CustomTagNameGenerator : MultipleClientsFromOperationIdOperationNameGenerator 14 | { 15 | public override string GetClientName(OpenApiDocument document, string path, string httpMethod, OpenApiOperation operation) 16 | { 17 | if (operation.Tags?.Count == 1) 18 | { 19 | return operation.Tags[0]; 20 | } 21 | 22 | return base.GetClientName(document, path, httpMethod, operation); 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/Configuration/IHttpClientProvider.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.ClientLibrary.Configuration; 9 | 10 | /// 11 | /// Optional interface to create new instances. 12 | /// 13 | /// 14 | /// Implement this class if you have custom requirements how the HTTP requests need to be done. 15 | /// 16 | public interface IHttpClientProvider 17 | { 18 | /// 19 | /// Creates the HTTP client from the message. 20 | /// 21 | /// 22 | /// The HTTP client. 23 | /// 24 | HttpClient Get(); 25 | } 26 | -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/Program.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Microsoft.AspNetCore.Hosting; 9 | using Microsoft.Extensions.Hosting; 10 | 11 | namespace Sample.Profile 12 | { 13 | public class Program 14 | { 15 | public static void Main(string[] args) 16 | { 17 | CreateHostBuilder(args).Build().Run(); 18 | } 19 | 20 | public static IHostBuilder CreateHostBuilder(string[] args) => 21 | Host.CreateDefaultBuilder(args) 22 | .ConfigureWebHostDefaults(webBuilder => 23 | { 24 | webBuilder.UseStartup(); 25 | }); 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /jscript/react/sample-hotels/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "sample-hotels", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "@testing-library/jest-dom": "^4.2.4", 7 | "@testing-library/react": "^9.4.0", 8 | "@testing-library/user-event": "^7.2.1", 9 | "graphql-ws": "^5.10.1", 10 | "react": "^16.12.0", 11 | "react-dom": "^16.12.0", 12 | "react-markdown": "^8.0.3", 13 | "react-router-dom": "^5.1.2", 14 | "react-scripts": "3.3.0" 15 | }, 16 | "scripts": { 17 | "start": "react-scripts start", 18 | "build": "react-scripts build", 19 | "test": "react-scripts test", 20 | "eject": "react-scripts eject" 21 | }, 22 | "eslintConfig": { 23 | "extends": "react-app" 24 | }, 25 | "browserslist": { 26 | "production": [ 27 | ">0.2%", 28 | "not dead", 29 | "not op_mini all" 30 | ], 31 | "development": [ 32 | "last 1 chrome version", 33 | "last 1 firefox version", 34 | "last 1 safari version" 35 | ] 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/EnrichedEvents/EnrichedAssetEventType.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Squidex.ClientLibrary.EnrichedEvents; 9 | 10 | /// 11 | /// Type of events on an asset. 12 | /// 13 | public enum EnrichedAssetEventType 14 | { 15 | /// 16 | /// Asset Created. 17 | /// 18 | Created, 19 | 20 | /// 21 | /// Asset Deleted. 22 | /// 23 | Deleted, 24 | 25 | /// 26 | /// Asset Annotated. 27 | /// 28 | Annotated, 29 | 30 | /// 31 | /// Asset Updated. 32 | /// 33 | Updated, 34 | } 35 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI/Commands/Implementation/OpenLibrary/Structure/schemas/__schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "./../__json/schema.json", 3 | "name": "my-schema", 4 | "isSingleton": false, 5 | "isPublished": false, 6 | "type": "Default", 7 | "schema": { 8 | "noFieldDeletion": false, 9 | "noFieldRecreation": false, 10 | "properties": { 11 | "label": "My Schema", 12 | "validateOnPublish": false 13 | }, 14 | "fields": [ 15 | { 16 | "name": "my-string", 17 | "isHidden": false, 18 | "isLocked": false, 19 | "isDisabled": false, 20 | "partitioning": "invariant", 21 | "properties": { 22 | "fieldType": "String", 23 | "isUnique": false, 24 | "inlineEditable": false, 25 | "contentType": "Unspecified", 26 | "editor": "Input", 27 | "isRequired": true, 28 | "isRequiredOnPublish": false, 29 | "isHalfWidth": false 30 | } 31 | } 32 | ], 33 | "isPublished": true 34 | } 35 | } -------------------------------------------------------------------------------- /csharp/Integration.Localize/Integration.Localize/Controllers/DefaultController.Health.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace Integration.Localize.Controllers; 9 | 10 | public partial class DefaultController : ControllerBase 11 | { 12 | public override Task Anonymous( 13 | CancellationToken cancellationToken = default) 14 | { 15 | // Nothing to do, because it is just a health check. 16 | return Task.CompletedTask; 17 | } 18 | 19 | public override Task Health( 20 | CancellationToken cancellationToken = default) 21 | { 22 | // Nothing to do, because it is just a health check. 23 | return Task.CompletedTask; 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /csharp/Sample.Profile/Sample.Profile/Models/HomeVM.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using System; 9 | using System.Collections.Generic; 10 | 11 | namespace Sample.Profile.Models 12 | { 13 | public sealed class HomeVM 14 | { 15 | public BasicsData Basics { get; set; } 16 | 17 | public List Skills { get; set; } 18 | 19 | public List Projects { get; set; } 20 | 21 | public List Education { get; set; } 22 | 23 | public List Experiences { get; set; } 24 | 25 | public List Publications { get; set; } 26 | 27 | public Func BuildImageUrl { get; set; } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /jscript/react/sample-hotels/src/components/HotelSite.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useParams } from 'react-router-dom'; 3 | import { Hotel } from './Hotel'; 4 | import { getHotel } from '../service'; 5 | import { useRefresh } from './hooks'; 6 | 7 | export const HotelSite = () => { 8 | const { id } = useParams(); 9 | 10 | const [hotel, setHotel] = React.useState(undefined); 11 | const needsUpdate = useRefresh([hotel?.id]); 12 | 13 | React.useEffect(() => { 14 | async function fetchData() { 15 | try { 16 | const result = await getHotel(id); 17 | 18 | setHotel(result); 19 | } catch (ex) { 20 | setHotel(null); 21 | } 22 | } 23 | 24 | fetchData(); 25 | }, [id, needsUpdate]); 26 | 27 | if (hotel) { 28 | return 29 | } else if (hotel === null) { 30 | return
    Hotel not found.
    31 | } else { 32 | return
    Loading Hotel...
    33 | } 34 | } 35 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/CodeGeneration/CodeCleaner.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | namespace CodeGeneration 9 | { 10 | public static class CodeCleaner 11 | { 12 | public static string UseFixedVersion(this string code) 13 | { 14 | code = code.Replace("13.18.2.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v12.0.0.0))", "13.17.0.0 (NJsonSchema v10.8.0.0 (Newtonsoft.Json v9.0.0.0))"); 15 | 16 | return code; 17 | } 18 | 19 | public static string UseCloudUrl(this string code) 20 | { 21 | code = code.Replace("https://localhost:5001", "https://cloud.squidex.io"); 22 | 23 | return code; 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /jscript/react/sample-hotels/src/components/PostSite.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useParams } from 'react-router-dom'; 3 | import { Post } from './Post'; 4 | import { getPost, getPostsIds } from '../service'; 5 | import { useRefresh } from './hooks'; 6 | 7 | export const PostSite = () => { 8 | const { id } = useParams(); 9 | 10 | const [post, setPost] = React.useState(undefined); 11 | const needsUpdate = useRefresh(getPostsIds([post.id])); 12 | 13 | React.useEffect(() => { 14 | async function fetchData() { 15 | try { 16 | const result = await getPost(id); 17 | 18 | setPost(result); 19 | } catch (ex) { 20 | setPost(null); 21 | } 22 | } 23 | 24 | fetchData(); 25 | }, [id, needsUpdate]); 26 | 27 | if (post) { 28 | return 29 | } else if (post === null) { 30 | return
    Post not found.
    31 | } else { 32 | return
    Loading Post...
    33 | } 34 | } 35 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Configuration/Session.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Squidex.CLI.Commands.Implementation; 9 | using Squidex.ClientLibrary; 10 | 11 | namespace Squidex.CLI.Configuration; 12 | 13 | public sealed class Session(DirectoryInfo workingDirectory, ISquidexClient client) : ISession 14 | { 15 | public DirectoryInfo WorkingDirectory { get; } = workingDirectory; 16 | 17 | public ISquidexClient Client { get; } = client; 18 | 19 | public string App => Client.Options.AppName; 20 | 21 | public string ClientId => Client.Options.ClientId; 22 | 23 | public string ClientSecret => Client.Options.ClientSecret; 24 | 25 | public string Url => Client.Options.Url; 26 | } 27 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary.ServiceExtensions/SquidexOptionsValidator.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Microsoft.Extensions.Options; 9 | 10 | namespace Squidex.ClientLibrary.ServiceExtensions; 11 | 12 | internal sealed class SquidexOptionsValidator : IValidateOptions 13 | { 14 | public ValidateOptionsResult Validate(string? name, SquidexServiceOptions options) 15 | { 16 | try 17 | { 18 | options.CheckAndFreeze(); 19 | 20 | return ValidateOptionsResult.Success; 21 | } 22 | catch (Exception ex) 23 | { 24 | return ValidateOptionsResult.Fail(ex.Message); 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/src/utils/graphql-fields.ts: -------------------------------------------------------------------------------- 1 | const hotel = ` 2 | id, 3 | flatData { 4 | name, 5 | description, 6 | minPrice, 7 | rooms, 8 | photos { 9 | id, 10 | fileName 11 | } 12 | }`; 13 | 14 | const destination = ` 15 | id, 16 | flatData { 17 | name, 18 | description 19 | }`; 20 | 21 | const post = ` 22 | id 23 | flatData { 24 | title 25 | text { 26 | text 27 | contents { 28 | ...on Hotels { 29 | ${hotel} 30 | } 31 | } 32 | } 33 | }`; 34 | 35 | const landingPage = ` 36 | id 37 | flatData { 38 | title 39 | content 40 | references { 41 | ...on Hotels { 42 | ${hotel} 43 | }, 44 | ...on Destination { 45 | ${destination} 46 | } 47 | } 48 | }`; 49 | 50 | export const GRAPHQL_FIELDS = { hotel, post, landingPage }; -------------------------------------------------------------------------------- /jscript/react/sample-hotels/src/components/PageSite.jsx: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { useParams } from 'react-router-dom'; 3 | import { Page } from './Page'; 4 | import { getPage } from '../service'; 5 | import { useRefresh } from './hooks'; 6 | 7 | export const PageSite = () => { 8 | const { slug } = useParams(); 9 | 10 | const [page, setPage] = React.useState(undefined); 11 | const needsUpdate = useRefresh([page?.id]); 12 | 13 | React.useEffect(() => { 14 | setPage(undefined); 15 | 16 | async function fetchData() { 17 | try { 18 | const result = await getPage(slug); 19 | 20 | setPage(result); 21 | } catch (ex) { 22 | setPage(null); 23 | } 24 | } 25 | 26 | fetchData(); 27 | }, [needsUpdate, slug]); 28 | 29 | if (page) { 30 | return 31 | } else if (page === null) { 32 | return
    Page not found.
    33 | } else { 34 | return
    Loading Page...
    35 | } 36 | } 37 | -------------------------------------------------------------------------------- /.github/workflows/editors.yml: -------------------------------------------------------------------------------- 1 | name: Build Dotnet SDK 2 | 3 | on: 4 | push: 5 | branches: [ master ] 6 | 7 | jobs: 8 | build: 9 | 10 | runs-on: ubuntu-latest 11 | 12 | steps: 13 | - uses: actions/checkout@v4.1.1 14 | 15 | - name: Setup Node.js environment 16 | uses: actions/setup-node@v4.0.0 17 | 18 | - name: Move Files 19 | run: | 20 | mkdir out 21 | mkdir out/markdown 22 | mkdir out/richtext 23 | mv editors/*.* out/ 24 | 25 | - name: Build Markdown 26 | run: | 27 | cd editors/markdown 28 | npm i 29 | npm run build-editor 30 | mv dist/* ../../out/markdown 31 | 32 | - name: Build Rich Text 33 | run: | 34 | cd editors/richtext 35 | npm i 36 | npm run build-editor 37 | mv dist/* ../../out/richtext/ 38 | 39 | - name: Deploy 40 | uses: JamesIves/github-pages-deploy-action@v4.4.3 41 | with: 42 | branch: gh-pages 43 | folder: out 44 | target-folder: editors 45 | clean: true 46 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/src/pages/post/PostPage.tsx: -------------------------------------------------------------------------------- 1 | import { useParams } from 'react-router-dom'; 2 | import { GRAPHQL_FIELDS, Post, useFetch } from './../../shared'; 3 | 4 | export const PostPage = () => { 5 | const { id } = useParams(); 6 | const { result: page, loading } = useFetch(async (fetcher, api) => { 7 | const query = ` 8 | { 9 | findPostsContent(id: "${id}") { 10 | ${GRAPHQL_FIELDS.post} 11 | } 12 | }`; 13 | 14 | const response = await fetcher(`api/content/${api.appName}/graphql`, { query }); 15 | const result = response.data.findPostsContent; 16 | 17 | // This hook also returns a list of IDs. All the IDs are monitored using a GraphQL subscription. 18 | return { result, ids: [result?.id] }; 19 | }, [id]); 20 | 21 | if (page) { 22 | return 23 | } else if (!page && !loading) { 24 | return
    Page not found.
    25 | } else { 26 | return
    Loading Page...
    27 | } 28 | } 29 | -------------------------------------------------------------------------------- /jscript/vue/sample-blog/README.md: -------------------------------------------------------------------------------- 1 | # Vue.js/Javascript Blog Sample 2 | 3 | You can create an app with prepulated schemas directly in Squidex. 4 | 5 | ## How to run it with a custom app? 6 | 7 | Have a look to the configuration first: [configuration](src/service/index.js) 8 | 9 | You have to change the following settings: 10 | 11 | * `appName`: The name of your app. 12 | * `clientId`: The client id, usually: '`appName`:default' 13 | * `clientSecret`: The secret for your client. You can get it from the Squidex UI. 14 | 15 | Optionally: 16 | 17 | * `url`: The url to your squidex instance, e.g. `http://localhost:5000` if you run it locally.# 18 | 19 | ## How to start it 20 | 21 | ### Project setup 22 | ``` 23 | npm install 24 | ``` 25 | 26 | ### Compiles and hot-reloads for development 27 | ``` 28 | npm run serve 29 | ``` 30 | 31 | ### Compiles and minifies for production 32 | ``` 33 | npm run build 34 | ``` 35 | 36 | ### Lints and fixes files 37 | ``` 38 | npm run lint 39 | ``` 40 | 41 | ### Customize configuration 42 | See [Configuration Reference](https://cli.vuejs.org/config/). 43 | -------------------------------------------------------------------------------- /csharp/Sample.Jscript/Sample.Jscript/Startup.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using Microsoft.AspNetCore.Builder; 3 | using Microsoft.AspNetCore.Hosting; 4 | using Microsoft.AspNetCore.Http; 5 | using Microsoft.Extensions.DependencyInjection; 6 | using Microsoft.Extensions.Hosting; 7 | 8 | namespace Sample.Jscript 9 | { 10 | public class Startup 11 | { 12 | public void ConfigureServices(IServiceCollection services) 13 | { 14 | } 15 | 16 | public void Configure(IApplicationBuilder app, IWebHostEnvironment env) 17 | { 18 | if (env.IsDevelopment()) 19 | { 20 | app.UseDeveloperExceptionPage(); 21 | } 22 | 23 | app.Use((context, next) => 24 | { 25 | if (!Path.HasExtension(context.Request.Path.Value)) 26 | { 27 | context.Request.Path = new PathString("/index.html"); 28 | } 29 | 30 | return next(); 31 | }); 32 | 33 | app.UseStaticFiles(); 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/ISynchronizer.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Squidex.CLI.Commands.Implementation.FileSystem; 9 | 10 | namespace Squidex.CLI.Commands.Implementation.Sync; 11 | 12 | public interface ISynchronizer 13 | { 14 | int Order => 0; 15 | 16 | string Name { get; } 17 | 18 | string Description { get; } 19 | 20 | Task CleanupAsync(IFileSystem fs); 21 | 22 | Task DescribeAsync(ISyncService sync, MarkdownWriter writer); 23 | 24 | Task ExportAsync(ISyncService sync, SyncOptions options, ISession session); 25 | 26 | Task ImportAsync(ISyncService sync, SyncOptions options, ISession session); 27 | 28 | Task GenerateSchemaAsync(ISyncService sync); 29 | } 30 | -------------------------------------------------------------------------------- /jscript/react/sample-compose/src/pages/hotel/HotelPage.tsx: -------------------------------------------------------------------------------- 1 | import { useParams } from 'react-router-dom'; 2 | import { GRAPHQL_FIELDS, Hotel, useFetch } from './../../shared'; 3 | 4 | export const HotelPage = () => { 5 | const { id } = useParams(); 6 | const { result, loading } = useFetch(async (fetcher, api) => { 7 | const query = ` 8 | { 9 | findHotelsContent(id: "${id}") { 10 | ${GRAPHQL_FIELDS.hotel} 11 | } 12 | }`; 13 | 14 | const response = await fetcher(`api/content/${api.appName}/graphql`, { query }); 15 | const result = response.data.findHotelsContent; 16 | 17 | // This hook also returns a list of IDs. All the IDs are monitored using a GraphQL subscription. 18 | return { result, ids: [result.id] }; 19 | }, [id]); 20 | 21 | if (result) { 22 | return 23 | } else if (!result && !loading) { 24 | return
    Hotel not found.
    25 | } else { 26 | return
    Loading Hotel...
    27 | } 28 | } 29 | -------------------------------------------------------------------------------- /jscript/vue/sample-blog/src/components/TopNav.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 36 | 37 | -------------------------------------------------------------------------------- /jscript/vue/sample-blog/src/components/PostsSite.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 47 | -------------------------------------------------------------------------------- /jscript/react/sample-blog/src/components/PostsSite.js: -------------------------------------------------------------------------------- 1 | import React from 'react'; 2 | import { Post } from './Post.js'; 3 | import { getPosts } from './../service'; 4 | 5 | export const PostsSite = () => { 6 | const [posts, setPosts] = React.useState(); 7 | 8 | React.useEffect(() => { 9 | async function fetchData() { 10 | const results = await getPosts(); 11 | 12 | setPosts(results.posts); 13 | } 14 | 15 | fetchData(); 16 | }, []); 17 | 18 | if (!posts) { 19 | return
    Loading Posts...
    20 | } 21 | 22 | return ( 23 | <> 24 | {posts.length === 0 ? ( 25 | <>No Post found 26 | ) : ( 27 |
    28 | {posts.map(post => ( 29 |
    30 | 31 | 32 |
    33 |
    34 | ))} 35 |
    36 | )} 37 | 38 | ); 39 | } 40 | -------------------------------------------------------------------------------- /cli/Squidex.CLI/Squidex.CLI.Core/Commands/Implementation/Sync/GuidFixProcessor.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using NJsonSchema.Generation; 9 | 10 | namespace Squidex.CLI.Commands.Implementation.Sync; 11 | 12 | public sealed class GuidFixProcessor : ISchemaProcessor 13 | { 14 | public void Process(SchemaProcessorContext context) 15 | { 16 | foreach (var (_, property) in context.Schema.Properties) 17 | { 18 | if (property.Format == "guid") 19 | { 20 | property.Format = null; 21 | } 22 | 23 | if (property.Item != null && property.Item.Format == "guid") 24 | { 25 | property.Item.Format = null; 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /csharp/Squidex.ClientLibrary/Squidex.ClientLibrary/KeepCasingAttribute.cs: -------------------------------------------------------------------------------- 1 | // ========================================================================== 2 | // Squidex Headless CMS 3 | // ========================================================================== 4 | // Copyright (c) Squidex UG (haftungsbeschraenkt) 5 | // All rights reserved. Licensed under the MIT license. 6 | // ========================================================================== 7 | 8 | using Newtonsoft.Json; 9 | using Newtonsoft.Json.Serialization; 10 | 11 | namespace Squidex.ClientLibrary; 12 | 13 | /// 14 | /// Annote your data object to keep the casing and to not convert it to camel case. 15 | /// 16 | /// 17 | [AttributeUsage(AttributeTargets.Class)] 18 | public sealed class KeepCasingAttribute : JsonContainerAttribute 19 | { 20 | /// 21 | /// Initializes a new instance of the class. 22 | /// 23 | public KeepCasingAttribute() 24 | { 25 | NamingStrategyType = typeof(DefaultNamingStrategy); 26 | } 27 | } 28 | --------------------------------------------------------------------------------