diff --git a/Directory.Build.props b/Directory.Build.props index 81abcf1..6b968b2 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -9,8 +9,8 @@ prerelease-1 MIT - https://github.com/Kentico/REPOSITORY_NAME - https://github.com/Kentico/REPOSITORY_NAME/releases + https://github.com/Kentico/xperience-by-kentico-labs-custom-data-types + https://github.com/Kentico/xperience-by-kentico-labs-custom-data-types/releases logo.png README.md xperience;kentico;aspnetcore diff --git a/Directory.Packages.props b/Directory.Packages.props index 08fdcb4..5e8c430 100644 --- a/Directory.Packages.props +++ b/Directory.Packages.props @@ -6,10 +6,10 @@ true - - - - + + + + \ No newline at end of file diff --git a/README.md b/README.md index e9099fd..02153f2 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,7 @@ Read the Kentico Community Portal blog post - [Embedded structured content and t ## Project version support -Xperience by Kentico 28.4.1 +Xperience by Kentico 29.0.1 ### Dependencies diff --git a/database/DancingGoat.bak.zip b/database/DancingGoat.bak.zip index 37ffe92..c5e5069 100644 Binary files a/database/DancingGoat.bak.zip and b/database/DancingGoat.bak.zip differ diff --git a/src/DancingGoat.Admin/AcmeWebAdminModule.cs b/src/DancingGoat.Admin/AcmeWebAdminModule.cs index b92d722..06accc9 100644 --- a/src/DancingGoat.Admin/AcmeWebAdminModule.cs +++ b/src/DancingGoat.Admin/AcmeWebAdminModule.cs @@ -1,11 +1,15 @@ -using DancingGoat.Admin; +using System.Globalization; + +using CMS; +using CMS.Core; +using CMS.DataEngine.Internal; + +using DancingGoat.Admin; using Kentico.Xperience.Admin.Base; -[assembly: CMS.AssemblyDiscoverable] -[assembly: CMS.RegisterModule(typeof(AcmeWebAdminModule))] +[assembly: RegisterModule(typeof(AcmeWebAdminModule))] -// Adds a new application category [assembly: UICategory(AcmeWebAdminModule.CUSTOM_CATEGORY, "Custom", Icons.CustomElement, 100)] namespace DancingGoat.Admin @@ -14,16 +18,30 @@ internal class AcmeWebAdminModule : AdminModule { public const string CUSTOM_CATEGORY = "acme.web.admin.category"; - public AcmeWebAdminModule() - : base("Acme.Web.Admin") + public AcmeWebAdminModule() : base("Acme.Web.Admin") { } + + protected override void OnPreInit(ModulePreInitParameters parameters) { + base.OnPreInit(parameters); + + AddressDataTypeRegister.Register(); + LinkDataTypeRegister.Register(); + + RegisterDefaultValueComponent(LinkDataType.FIELD_TYPE, + LinkFormComponent.IDENTIFIER, + (val) => val is LinkDataType link ? JsonDataTypeConverter.ConvertToString(link, new(), CultureInfo.CurrentCulture).ToString() ?? "" : "", + (val) => JsonDataTypeConverter.ConvertToModel(val, new(), CultureInfo.CurrentCulture)); + + RegisterDefaultValueComponent(AddressDataType.FIELD_TYPE, + AddressFormComponent.IDENTIFIER, + (val) => val is AddressDataType link ? JsonDataTypeConverter.ConvertToString(link, new(), CultureInfo.CurrentCulture).ToString() ?? "" : "", + (val) => JsonDataTypeConverter.ConvertToModel(val, new(), CultureInfo.CurrentCulture)); } protected override void OnInit() { base.OnInit(); - // Makes the module accessible to the admin UI RegisterClientModule("acme", "web-admin"); } } diff --git a/src/DancingGoat.Admin/Client/package-lock.json b/src/DancingGoat.Admin/Client/package-lock.json index 2428eb1..844763b 100644 --- a/src/DancingGoat.Admin/Client/package-lock.json +++ b/src/DancingGoat.Admin/Client/package-lock.json @@ -8,8 +8,8 @@ "name": "acme-web-admin", "version": "1.0.0", "dependencies": { - "@kentico/xperience-admin-base": "28.4.1", - "@kentico/xperience-admin-components": "28.4.1", + "@kentico/xperience-admin-base": "29.0.1", + "@kentico/xperience-admin-components": "29.0.1", "react": "^18.2.0", "react-dom": "^18.2.0" }, @@ -19,7 +19,7 @@ "@babel/preset-env": "^7.24.0", "@babel/preset-react": "^7.23.3", "@babel/preset-typescript": "^7.23.3", - "@kentico/xperience-webpack-config": "28.4.1", + "@kentico/xperience-webpack-config": "29.0.1", "@types/react": "^18.0.33", "@types/react-dom": "^18.2.22", "babel-loader": "^9.1.3", @@ -29,9 +29,9 @@ } }, "node_modules/@amcharts/amcharts5": { - "version": "5.8.5", - "resolved": "https://registry.npmjs.org/@amcharts/amcharts5/-/amcharts5-5.8.5.tgz", - "integrity": "sha512-KVUtC/gTyBE2HMXJya8LCluoEElPu+DXxBUDG5L1pbwiv7wzO4Myjm6WT7lDD2YP+V8nQsfJhYoj9+xhNlDteg==", + "version": "5.9.1", + "resolved": "https://registry.npmjs.org/@amcharts/amcharts5/-/amcharts5-5.9.1.tgz", + "integrity": "sha512-WCMe35U3w6lVPn/jy2GWCf1DDngLZOsCZUAaCHrkQ+QTjxx6pFquY5yYpHwYxur2aVgXqCvp8B4IwKCCS17W3w==", "dependencies": { "@types/d3": "^7.0.0", "@types/d3-chord": "^3.0.0", @@ -1890,9 +1890,9 @@ } }, "node_modules/@codemirror/autocomplete": { - "version": "6.15.0", - "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.15.0.tgz", - "integrity": "sha512-G2Zm0mXznxz97JhaaOdoEG2cVupn4JjPaS4AcNvZzhOsnnG9YVN68VzfoUw6dYTsIxT6a/cmoFEN47KAWhXaOg==", + "version": "6.16.0", + "resolved": "https://registry.npmjs.org/@codemirror/autocomplete/-/autocomplete-6.16.0.tgz", + "integrity": "sha512-P/LeCTtZHRTCU4xQsa89vSKWecYv1ZqwzOd5topheGRf+qtacFgBeIMQi3eL8Kt/BUNvxUWkx+5qP2jlGoARrg==", "dependencies": { "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.0.0", @@ -1907,9 +1907,9 @@ } }, "node_modules/@codemirror/commands": { - "version": "6.3.3", - "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.3.3.tgz", - "integrity": "sha512-dO4hcF0fGT9tu1Pj1D2PvGvxjeGkbC6RGcZw6Qs74TH+Ed1gw98jmUgd2axWvIZEqTeTuFrg1lEB1KV6cK9h1A==", + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/@codemirror/commands/-/commands-6.5.0.tgz", + "integrity": "sha512-rK+sj4fCAN/QfcY9BEzYMgp4wwL/q5aj/VfNSoH1RWPF9XS/dUwBkvlL3hpWgEjOqlpdN1uLC9UkjJ4tmyjJYg==", "dependencies": { "@codemirror/language": "^6.0.0", "@codemirror/state": "^6.4.0", @@ -1930,9 +1930,9 @@ } }, "node_modules/@codemirror/lang-html": { - "version": "6.4.8", - "resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.4.8.tgz", - "integrity": "sha512-tE2YK7wDlb9ZpAH6mpTPiYm6rhfdQKVDa5r9IwIFlwwgvVaKsCfuKKZoJGWsmMZIf3FQAuJ5CHMPLymOtg1hXw==", + "version": "6.4.9", + "resolved": "https://registry.npmjs.org/@codemirror/lang-html/-/lang-html-6.4.9.tgz", + "integrity": "sha512-aQv37pIMSlueybId/2PVSP6NPnmurFDVmZwzc7jszd2KAF8qd4VBbvNYPXWQq90WIARjsdVkPbw29pszmHws3Q==", "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/lang-css": "^6.0.0", @@ -1960,9 +1960,9 @@ } }, "node_modules/@codemirror/lang-sql": { - "version": "6.6.2", - "resolved": "https://registry.npmjs.org/@codemirror/lang-sql/-/lang-sql-6.6.2.tgz", - "integrity": "sha512-ZVt7AHflRDFVwxSq7nnj1pko9yR6wKFDtc6Ln7zUs8RX34v5sgVxy3d2lQfORhMPVblEJLaugn+sjwRmAFWNIg==", + "version": "6.6.3", + "resolved": "https://registry.npmjs.org/@codemirror/lang-sql/-/lang-sql-6.6.3.tgz", + "integrity": "sha512-fo5i3OD/7TmmqMtKycC4OaqfPsRxk0sKOb35g8cOtyUyyI2hfP2qXkDc7Asb6h7BiJK+MU/DYVPnQm6iNB5ZTw==", "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/language": "^6.0.0", @@ -2035,9 +2035,9 @@ } }, "node_modules/@codemirror/view": { - "version": "6.26.0", - "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.26.0.tgz", - "integrity": "sha512-nSSmzONpqsNzshPOxiKhK203R6BvABepugAe34QfQDbNDslyjkqBuKgrK5ZBvqNXpfxz5iLrlGTmEfhbQyH46A==", + "version": "6.26.3", + "resolved": "https://registry.npmjs.org/@codemirror/view/-/view-6.26.3.tgz", + "integrity": "sha512-gmqxkPALZjkgSxIeeweY/wGQXBfwTUaLs8h7OKtSwfbj9Ct3L11lD+u1sS7XHppxFQoMDiMDp07P9f3I2jWOHw==", "dependencies": { "@codemirror/state": "^6.4.0", "style-mod": "^4.1.0", @@ -2133,9 +2133,9 @@ } }, "node_modules/@emotion/serialize": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.3.tgz", - "integrity": "sha512-iD4D6QVZFDhcbH0RAG1uVu1CwVLMWUkCvAqqlewO/rxf8+87yIBAlt4+AxMiiKPLs5hFc0owNk/sLLAOROw3cA==", + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/@emotion/serialize/-/serialize-1.1.4.tgz", + "integrity": "sha512-RIN04MBT8g+FnDwgvIUi8czvr1LU1alUMI05LekWB5DGyTm8cCBMCRpq3GqaiyEDRptEXOyXnvZ58GZYu4kBxQ==", "dependencies": { "@emotion/hash": "^0.9.1", "@emotion/memoize": "^0.8.1", @@ -2173,26 +2173,26 @@ "integrity": "sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==" }, "node_modules/@floating-ui/core": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.0.tgz", - "integrity": "sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==", + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/@floating-ui/core/-/core-1.6.1.tgz", + "integrity": "sha512-42UH54oPZHPdRHdw6BgoBD6cg/eVTmVrFcgeRDM3jbO7uxSoipVcmcIGFcA5jmOHO5apcyvBhkSKES3fQJnu7A==", "dependencies": { - "@floating-ui/utils": "^0.2.1" + "@floating-ui/utils": "^0.2.0" } }, "node_modules/@floating-ui/dom": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.3.tgz", - "integrity": "sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw==", + "version": "1.6.4", + "resolved": "https://registry.npmjs.org/@floating-ui/dom/-/dom-1.6.4.tgz", + "integrity": "sha512-0G8R+zOvQsAG1pg2Q99P21jiqxqGBW1iRe/iXHsBRBxnpXKFI8QwbB4x5KmYLggNO5m34IQgOIu9SCRfR/WWiQ==", "dependencies": { "@floating-ui/core": "^1.0.0", "@floating-ui/utils": "^0.2.0" } }, "node_modules/@floating-ui/react": { - "version": "0.26.10", - "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.26.10.tgz", - "integrity": "sha512-sh6f9gVvWQdEzLObrWbJ97c0clJObiALsFe0LiR/kb3tDRKwEhObASEH2QyfdoO/ZBPzwxa9j+nYFo+sqgbioA==", + "version": "0.26.13", + "resolved": "https://registry.npmjs.org/@floating-ui/react/-/react-0.26.13.tgz", + "integrity": "sha512-kBa9wntpugzrZ8t/4yWelvSmEKZdeTXTJzrxqyrLmcU/n1SM4nvse8yQh2e1b37rJGvtu0EplV9+IkBrCJ1vkw==", "dependencies": { "@floating-ui/react-dom": "^2.0.0", "@floating-ui/utils": "^0.2.0", @@ -2204,11 +2204,11 @@ } }, "node_modules/@floating-ui/react-dom": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.8.tgz", - "integrity": "sha512-HOdqOt3R3OGeTKidaLvJKcgg75S6tibQ3Tif4eyd91QnIJWr0NLvoXFpJA/j8HqkFSL68GDca9AuyWEHlhyClw==", + "version": "2.0.9", + "resolved": "https://registry.npmjs.org/@floating-ui/react-dom/-/react-dom-2.0.9.tgz", + "integrity": "sha512-q0umO0+LQK4+p6aGyvzASqKbKOJcAHJ7ycE9CuUvfx3s9zTHWmGJTPOIlM/hmSBfUfg/XfY5YhLBLR/LHwShQQ==", "dependencies": { - "@floating-ui/dom": "^1.6.1" + "@floating-ui/dom": "^1.0.0" }, "peerDependencies": { "react": ">=16.8.0", @@ -2216,9 +2216,9 @@ } }, "node_modules/@floating-ui/utils": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.1.tgz", - "integrity": "sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==" + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@floating-ui/utils/-/utils-0.2.2.tgz", + "integrity": "sha512-J4yDIIthosAsRZ5CPYP/jQvUAQtlZTTD/4suA08/FEnlxqW3sKS9iAhgsa9VYLZ6vDHn/ixJgIqRQPotoBjxIw==" }, "node_modules/@foliojs-fork/fontkit": { "version": "1.9.2", @@ -2418,11 +2418,11 @@ "integrity": "sha512-dfLbk+PwWvFzSxwk3n5ySL0hfBog779o8h68wK/7/APo/7cgyWp5jcXockbxdk5kFRkbeXWm4Fbi9FrdN381sA==" }, "node_modules/@kentico/xperience-admin-base": { - "version": "28.4.1", - "resolved": "https://registry.npmjs.org/@kentico/xperience-admin-base/-/xperience-admin-base-28.4.1.tgz", - "integrity": "sha512-fxW6AK1t0UbPpP4zI05LPhIOq5RXLpCdM5jh/TwqYDqDM3TgPFb3tBJmKn1KGHmoJP7f2AiCBiz8j3DMC2U6XA==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@kentico/xperience-admin-base/-/xperience-admin-base-29.0.1.tgz", + "integrity": "sha512-6/zLRD9GlCixJf6qnTl+QofryXiSelYbZL13poMkTpZk2ykmZ9Yi82i2K91T7npsE9Fwx260RY8f0YeBeQyVbw==", "dependencies": { - "@kentico/xperience-admin-components": "28.4.1", + "@kentico/xperience-admin-components": "29.0.1", "@react-aria/focus": "^3.15.0", "@react-aria/visually-hidden": "^3.8.7", "classnames": "^2.5.1", @@ -2433,20 +2433,20 @@ "react-dom": "^18.2.0", "react-router-dom": "^6.22.3", "react-select": "^5.8.0", - "react-select-async-paginate": "^0.7.3", + "react-select-async-paginate": "^0.7.4", "use-debounce": "^10.0.0", "use-resize-observer": "9.1.0", "uuid": "^9.0.1" } }, "node_modules/@kentico/xperience-admin-components": { - "version": "28.4.1", - "resolved": "https://registry.npmjs.org/@kentico/xperience-admin-components/-/xperience-admin-components-28.4.1.tgz", - "integrity": "sha512-gtZjmkCk6Akzd6siopZ3lGqrzg4CZcZZMY0QylqPn3EK0HNE6uJNS8Oa3kKqI/DwNWYnqM6OLg53CoPEEWfzwg==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@kentico/xperience-admin-components/-/xperience-admin-components-29.0.1.tgz", + "integrity": "sha512-dNeiXoaOvtDVlY+xiApn7VyG3s5GdIHhwH8YXVDt6gwtA0fKRp1aWx3Grxo/e1iEPM026Nqwb5peQC6tz6rgbw==", "dependencies": { - "@amcharts/amcharts5": "5.8.5", + "@amcharts/amcharts5": "5.9.1", "@codemirror/lang-css": "^6.2.1", - "@codemirror/lang-html": "^6.4.8", + "@codemirror/lang-html": "^6.4.9", "@codemirror/lang-javascript": "^6.2.2", "@codemirror/lang-sql": "^6.5.4", "@codemirror/lang-xml": "^6.1.0", @@ -2459,16 +2459,16 @@ "@react-stately/radio": "3.9.1", "@react-stately/toggle": "3.6.3", "@tippyjs/react": "^4.2.6", - "@uiw/react-codemirror": "^4.21.24", + "@uiw/react-codemirror": "^4.21.25", "classnames": "^2.5.1", - "froala-editor": "4.1.4", + "froala-editor": "4.2.0", "react": "^18.2.0", "react-beautiful-dnd": "^13.1.1", - "react-datepicker": "^6.4.0", + "react-datepicker": "^6.7.1", "react-dnd": "^16.0.1", "react-dnd-html5-backend": "^16.0.1", "react-dom": "^18.2.0", - "react-froala-wysiwyg": "4.1.4", + "react-froala-wysiwyg": "4.2.0", "react-modal": "^3.16.1", "react-router-dom": "^6.22.3", "react-textarea-autosize": "8.5.3", @@ -2515,9 +2515,9 @@ } }, "node_modules/@kentico/xperience-webpack-config": { - "version": "28.4.1", - "resolved": "https://registry.npmjs.org/@kentico/xperience-webpack-config/-/xperience-webpack-config-28.4.1.tgz", - "integrity": "sha512-q+c2FZgeXyFd3d6OKNuroxcqCqk678mZx6jfiRnh287IummwNM88x77jkI/d9Rb3gF21mFTVGZUT3Xxjh5AFrw==", + "version": "29.0.1", + "resolved": "https://registry.npmjs.org/@kentico/xperience-webpack-config/-/xperience-webpack-config-29.0.1.tgz", + "integrity": "sha512-HiHkHzFqD5dNk3VlSUbXl9RfrCdrrHfQmu6Q4TPJWhMmGvLb3PvHX1zc33yE2E4Zr2EWRZF4y0BqoqNHAls0Zg==", "dev": true, "dependencies": { "systemjs-webpack-interop": "^2.3.7" @@ -2563,9 +2563,9 @@ } }, "node_modules/@lezer/javascript": { - "version": "1.4.13", - "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.4.13.tgz", - "integrity": "sha512-5IBr8LIO3xJdJH1e9aj/ZNLE4LSbdsx25wFmGRAZsj2zSmwAYjx26JyU/BYOCpRQlu1jcv1z3vy4NB9+UkfRow==", + "version": "1.4.15", + "resolved": "https://registry.npmjs.org/@lezer/javascript/-/javascript-1.4.15.tgz", + "integrity": "sha512-B082ZdjI0vo2AgLqD834GlRTE9gwRX8NzHzKq5uDwEnQ9Dq+A/CEhd3nf68tiNA2f9O+8jS1NeSTUYT9IAqcTw==", "dependencies": { "@lezer/common": "^1.2.0", "@lezer/highlight": "^1.1.3", @@ -2969,9 +2969,9 @@ } }, "node_modules/@remix-run/router": { - "version": "1.15.3", - "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.15.3.tgz", - "integrity": "sha512-Oy8rmScVrVxWZVOpEF57ovlnhpZ8CCPlnIIumVcV9nFdiSIrus99+Lw78ekXyGvVDlIsFJbSfmSovJUhCWYV3w==", + "version": "1.16.0", + "resolved": "https://registry.npmjs.org/@remix-run/router/-/router-1.16.0.tgz", + "integrity": "sha512-Quz1KOffeEf/zwkCBM3kBtH4ZoZ+pT3xIXBG4PPW/XFtDP7EGhtTiC2+gpL9GnR7+Qdet5Oa6cYSvwKYg6kN9Q==", "engines": { "node": ">=14.0.0" } @@ -2982,9 +2982,9 @@ "integrity": "sha512-izzOXQfeQLonzrIQb8u6LQ8dk+ymz3WXTIXjvOlTXHq6sbzROg3NWU+9TTAOpEoK9Bth24/6F/XrfHJ5yR5n6Q==" }, "node_modules/@swc/helpers": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.7.tgz", - "integrity": "sha512-BVvNZhx362+l2tSwSuyEUV4h7+jk9raNdoTSdLfwTshXJSaGmYKluGRJznziCI3KX02Z19DdsQrdfrpXAU3Hfg==", + "version": "0.5.11", + "resolved": "https://registry.npmjs.org/@swc/helpers/-/helpers-0.5.11.tgz", + "integrity": "sha512-YNlnKRWF2sVojTpIyzwou9XoTNbzbzONwRhOoniEioF1AtaitTvVZblaQRrAzChWQ1bLYyYSWzM18y4WwgzJ+A==", "dependencies": { "tslib": "^2.4.0" } @@ -3515,9 +3515,9 @@ } }, "node_modules/@uiw/codemirror-extensions-basic-setup": { - "version": "4.21.25", - "resolved": "https://registry.npmjs.org/@uiw/codemirror-extensions-basic-setup/-/codemirror-extensions-basic-setup-4.21.25.tgz", - "integrity": "sha512-eeUKlmEE8aSoSgelS8OR2elcPGntpRo669XinAqPCLa0eKorT2B0d3ts+AE+njAeGk744tiyAEbHb2n+6OQmJw==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@uiw/codemirror-extensions-basic-setup/-/codemirror-extensions-basic-setup-4.22.0.tgz", + "integrity": "sha512-3vdpMq1Oj3qRKGjNgi5NeMxWem/cJ/gL0dZSu62MLBR4w3BWlEVi6xsk/MEk0+mT1AVKOzQV3jFS5y7mzxrfeA==", "dependencies": { "@codemirror/autocomplete": "^6.0.0", "@codemirror/commands": "^6.0.0", @@ -3541,15 +3541,15 @@ } }, "node_modules/@uiw/react-codemirror": { - "version": "4.21.25", - "resolved": "https://registry.npmjs.org/@uiw/react-codemirror/-/react-codemirror-4.21.25.tgz", - "integrity": "sha512-mBrCoiffQ+hbTqV1JoixFEcH7BHXkS3PjTyNH7dE8Gzf3GSBRazhtSM5HrAFIiQ5FIRGFs8Gznc4UAdhtevMmw==", + "version": "4.22.0", + "resolved": "https://registry.npmjs.org/@uiw/react-codemirror/-/react-codemirror-4.22.0.tgz", + "integrity": "sha512-ZbC9NX1458McehTN0XGVUHK/hb79DJXwwP3SfvumcjzIx/zIwAK0wtGABposlGHpxifIF6RAxMmUcL3gDVpiMA==", "dependencies": { "@babel/runtime": "^7.18.6", "@codemirror/commands": "^6.1.0", "@codemirror/state": "^6.1.1", "@codemirror/theme-one-dark": "^6.0.0", - "@uiw/codemirror-extensions-basic-setup": "4.21.25", + "@uiw/codemirror-extensions-basic-setup": "4.22.0", "codemirror": "^6.0.0" }, "funding": { @@ -3566,11 +3566,11 @@ } }, "node_modules/@vtaits/use-lazy-ref": { - "version": "0.1.0", - "resolved": "https://registry.npmjs.org/@vtaits/use-lazy-ref/-/use-lazy-ref-0.1.0.tgz", - "integrity": "sha512-/m5z3Df6I6i/B0lnv6pB2O1+X/nWVquqbnltq+irW1+Nhpv0PpeMzSNf9lTjzT/eHRZtH2fM1370AdYqc3FTyQ==", + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/@vtaits/use-lazy-ref/-/use-lazy-ref-0.1.3.tgz", + "integrity": "sha512-ZTLuFBHSivPcgWrwkXe5ExVt6R3/ybD+N0yFPy4ClzCztk/9bUD/1udKQ/jd7eCal+lapSrRWXbffqI9jkpDlg==", "peerDependencies": { - "react": "^17.0.0 || ^18.0.0" + "react": "^16.14.0 || ^17.0.0 || ^18.0.0" } }, "node_modules/@webassemblyjs/ast": { @@ -4288,9 +4288,9 @@ } }, "node_modules/clsx": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.0.tgz", - "integrity": "sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==", + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/clsx/-/clsx-2.1.1.tgz", + "integrity": "sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==", "engines": { "node": ">=6" } @@ -5658,9 +5658,9 @@ } }, "node_modules/froala-editor": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/froala-editor/-/froala-editor-4.1.4.tgz", - "integrity": "sha512-oWF8SZNtLvfweURV5T0WYO69ZQpB1LQiGO2e6zoYRAlOwmqlW5yqLWfGi0tfn99qOgZ/4dxqBBDxqfOsRCQFiA==" + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/froala-editor/-/froala-editor-4.2.0.tgz", + "integrity": "sha512-gYVw0oR4yD/8TNFdFELnOwKjNKifxsNnWZIcmjYaoFXYx0rdnSN8z6ewqXurEZ4Ehm3q/hIq1eVXzx1v/fynlA==" }, "node_modules/fsevents": { "version": "2.3.3", @@ -6504,6 +6504,11 @@ "node": ">=0.10.0" } }, + "node_modules/krustykrab": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/krustykrab/-/krustykrab-1.0.0.tgz", + "integrity": "sha512-cn9vpa5YLWF8WtgCzrWu9nII9O2AB5gXMpbrAPuDjlytPVdopnPBBAGyoa6101EHIy2ZyII+w0BeG4mWc5RyEg==" + }, "node_modules/launch-editor": { "version": "2.6.1", "resolved": "https://registry.npmjs.org/launch-editor/-/launch-editor-2.6.1.tgz", @@ -7258,9 +7263,9 @@ } }, "node_modules/react-datepicker": { - "version": "6.6.0", - "resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-6.6.0.tgz", - "integrity": "sha512-ERC0/Q4pPC9bNIcGUpdCbHc+oCxhkU3WI3UOGHkyJ3A9fqALCYpEmLc5S5xvAd7DuCDdbsyW97oRPM6pWWwjww==", + "version": "6.9.0", + "resolved": "https://registry.npmjs.org/react-datepicker/-/react-datepicker-6.9.0.tgz", + "integrity": "sha512-QTxuzeem7BUfVFWv+g5WuvzT0c5BPo+XTCNbMTZKSZQLU+cMMwSUHwspaxuIcDlwNcOH0tiJ+bh1fJ2yxOGYWA==", "dependencies": { "@floating-ui/react": "^0.26.2", "clsx": "^2.1.0", @@ -7323,12 +7328,12 @@ } }, "node_modules/react-froala-wysiwyg": { - "version": "4.1.4", - "resolved": "https://registry.npmjs.org/react-froala-wysiwyg/-/react-froala-wysiwyg-4.1.4.tgz", - "integrity": "sha512-gykUmilMhq7uGqPDrFPEvCUE6KAa6ZdBL6Cp9joCm9RA/M2nio150Ug/DGFO1zGYEBMpXDeL7JaFaOhkxldSAA==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/react-froala-wysiwyg/-/react-froala-wysiwyg-4.2.0.tgz", + "integrity": "sha512-uMOhTOQ5G8dcZF4gFrUChsfarZogJ54YBgJQgQVfMuINMxMyn/NN0lLryRHVJJ/GG+lmuIWfIwiI+bGu68ouBA==", "dependencies": { "create-react-class": "^15.5.2", - "froala-editor": "4.1.4" + "froala-editor": "4.2.0" }, "peerDependencies": { "react": "~0.14 || ^15.0.0 || ^16.0.0 || ^17.0.0 || ^18.0.0", @@ -7406,11 +7411,11 @@ "integrity": "sha512-w2GsyukL62IJnlaff/nRegPQR94C/XXamvMWmSHRJ4y7Ts/4ocGRmTHvOs8PSE6pB3dWOrD/nueuU5sduBsQ4w==" }, "node_modules/react-router": { - "version": "6.22.3", - "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.22.3.tgz", - "integrity": "sha512-dr2eb3Mj5zK2YISHK++foM9w4eBnO23eKnZEDs7c880P6oKbrjz/Svg9+nxqtHQK+oMW4OtjZca0RqPglXxguQ==", + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/react-router/-/react-router-6.23.0.tgz", + "integrity": "sha512-wPMZ8S2TuPadH0sF5irFGjkNLIcRvOSaEe7v+JER8508dyJumm6XZB1u5kztlX0RVq6AzRVndzqcUh6sFIauzA==", "dependencies": { - "@remix-run/router": "1.15.3" + "@remix-run/router": "1.16.0" }, "engines": { "node": ">=14.0.0" @@ -7420,12 +7425,12 @@ } }, "node_modules/react-router-dom": { - "version": "6.22.3", - "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.22.3.tgz", - "integrity": "sha512-7ZILI7HjcE+p31oQvwbokjk6OA/bnFxrhJ19n82Ex9Ph8fNAq+Hm/7KchpMGlTgWhUxRHMMCut+vEtNpWpowKw==", + "version": "6.23.0", + "resolved": "https://registry.npmjs.org/react-router-dom/-/react-router-dom-6.23.0.tgz", + "integrity": "sha512-Q9YaSYvubwgbal2c9DJKfx6hTNoBp3iJDsl+Duva/DwxoJH+OTXkxGpql4iUK2sla/8z4RpjAm6EWx1qUDuopQ==", "dependencies": { - "@remix-run/router": "1.15.3", - "react-router": "6.22.3" + "@remix-run/router": "1.16.0", + "react-router": "6.23.0" }, "engines": { "node": ">=14.0.0" @@ -7456,14 +7461,16 @@ } }, "node_modules/react-select-async-paginate": { - "version": "0.7.3", - "resolved": "https://registry.npmjs.org/react-select-async-paginate/-/react-select-async-paginate-0.7.3.tgz", - "integrity": "sha512-5r1vcXsVhG2zWbEEAnsnT55UIbU0H0kW+l0x/qJyEX/jwmn+7DyI8DbV92GYa4V4WsmMg224eki00erayqK/sQ==", + "version": "0.7.4", + "resolved": "https://registry.npmjs.org/react-select-async-paginate/-/react-select-async-paginate-0.7.4.tgz", + "integrity": "sha512-ffsMyajBx8sS4Hqf3oZYhNXnrD4GZTZtJ9snX8DSrspmSH3v72r+gSBDlRep5nbJIoLDhFWJQlG8R6CqnIoDFA==", "dependencies": { "@seznam/compose-react-refs": "^1.0.6", - "@vtaits/use-lazy-ref": "^0.1.0", + "@vtaits/use-lazy-ref": "^0.1.3", + "krustykrab": "^1.0.0", "sleep-promise": "^9.1.0", - "use-is-mounted-ref": "^1.5.0" + "use-is-mounted-ref": "^1.5.0", + "use-latest": "^1.2.1" }, "peerDependencies": { "react": "^16.14.0 || ^17.0.0 || ^18.0.0", diff --git a/src/DancingGoat.Admin/Client/package.json b/src/DancingGoat.Admin/Client/package.json index 5be206c..43e56fa 100644 --- a/src/DancingGoat.Admin/Client/package.json +++ b/src/DancingGoat.Admin/Client/package.json @@ -8,8 +8,8 @@ "build": "webpack --mode=production" }, "dependencies": { - "@kentico/xperience-admin-base": "28.4.1", - "@kentico/xperience-admin-components": "28.4.1", + "@kentico/xperience-admin-base": "29.0.1", + "@kentico/xperience-admin-components": "29.0.1", "react": "^18.2.0", "react-dom": "^18.2.0" }, @@ -19,7 +19,7 @@ "@babel/preset-env": "^7.24.0", "@babel/preset-react": "^7.23.3", "@babel/preset-typescript": "^7.23.3", - "@kentico/xperience-webpack-config": "28.4.1", + "@kentico/xperience-webpack-config": "29.0.1", "@types/react": "^18.0.33", "@types/react-dom": "^18.2.22", "babel-loader": "^9.1.3", @@ -38,4 +38,3 @@ "not IE 11" ] } - diff --git a/src/DancingGoat.Admin/Client/src/AddressDataType.ts b/src/DancingGoat.Admin/Client/src/AddressDataType.ts index e246dde..45d7162 100644 --- a/src/DancingGoat.Admin/Client/src/AddressDataType.ts +++ b/src/DancingGoat.Admin/Client/src/AddressDataType.ts @@ -19,3 +19,35 @@ export function newAddress(): AddressDataType { phone: "", }; } + +export type AddressDataTypeField = Exclude; + +export const AddressDataTypeFields: { + value: AddressDataTypeField; + text: string; +}[] = [ + { + value: "street", + text: "Street", + }, + { + value: "city", + text: "City", + }, + { + value: "stateProvince", + text: "State or Province", + }, + { + value: "postalCode", + text: "Postal Code", + }, + { + value: "country", + text: "Country", + }, + { + value: "phone", + text: "Phone", + }, +]; diff --git a/src/DancingGoat.Admin/Client/src/AddressDataTypeFormComponent.tsx b/src/DancingGoat.Admin/Client/src/AddressDataTypeFormComponent.tsx index 4299cb8..ca49b09 100644 --- a/src/DancingGoat.Admin/Client/src/AddressDataTypeFormComponent.tsx +++ b/src/DancingGoat.Admin/Client/src/AddressDataTypeFormComponent.tsx @@ -5,7 +5,7 @@ import { ButtonColor, } from "@kentico/xperience-admin-components"; import React, { ChangeEvent, useState } from "react"; -import { AddressDataType } from "./AddressDataType"; +import { AddressDataType, AddressDataTypeFields } from "./AddressDataType"; interface AddressDataTypeFormComponentProps extends FormComponentProps { newAddress: AddressDataType; @@ -31,8 +31,6 @@ export const AddressDataTypeFormComponent = ( } }; - const fieldStyle = { marginTop: ".5rem" }; - return (
); diff --git a/src/DancingGoat.Admin/Client/src/AddressListDataTypeFormComponent.tsx b/src/DancingGoat.Admin/Client/src/AddressListDataTypeFormComponent.tsx index fc0cda8..d135822 100644 --- a/src/DancingGoat.Admin/Client/src/AddressListDataTypeFormComponent.tsx +++ b/src/DancingGoat.Admin/Client/src/AddressListDataTypeFormComponent.tsx @@ -5,14 +5,18 @@ import { ButtonColor, } from "@kentico/xperience-admin-components"; import React, { ChangeEvent, useState } from "react"; -import { AddressDataType, newAddress } from "./AddressDataType"; +import { + AddressDataType, + newAddress, + AddressDataTypeFields, +} from "./AddressDataType"; interface AddressDataTypeListFormComponentProps extends FormComponentProps { newAddress: AddressDataType; value: AddressDataType[]; } -export const AddressListFormComponent = ( +export const AddressListDataTypeFormComponent = ( props: AddressDataTypeListFormComponentProps ) => { const [addresses, setAddresses] = useState( @@ -56,8 +60,6 @@ export const AddressListFormComponent = ( } }; - const fieldStyle = { marginTop: ".5rem" }; - return (
))} -
+
); diff --git a/src/DancingGoat.Admin/Client/src/LinkListDataTypeFormComponent.tsx b/src/DancingGoat.Admin/Client/src/LinkListDataTypeFormComponent.tsx index 68ab31e..5a17355 100644 --- a/src/DancingGoat.Admin/Client/src/LinkListDataTypeFormComponent.tsx +++ b/src/DancingGoat.Admin/Client/src/LinkListDataTypeFormComponent.tsx @@ -5,7 +5,7 @@ import { ButtonColor, } from "@kentico/xperience-admin-components"; import React, { ChangeEvent, useState } from "react"; -import { LinkDataType, newLink } from "./LinkDataType"; +import { LinkDataType, LinkDataTypeFields, newLink } from "./LinkDataType"; interface LinkListDataTypeFormComponentProps extends FormComponentProps { newLink: LinkDataType; @@ -52,8 +52,6 @@ export const LinkListDataTypeFormComponent = ( } }; - const fieldStyle = { marginTop: ".5rem" }; - return (
))} -
+