Skip to content

Editor SDK Inputs API and wix-site-frontend theme functions #3208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions js-wixcode-sdk/$w/Dataset.service.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{ "name": "Dataset",
"memberOf": "$w",
"mixes": [],
"labels":
[ "new" ],
"labels": [],
"location":
{ "lineno": 1,
"filename": "datasetApi.js" },
Expand Down
3 changes: 1 addition & 2 deletions js-wixcode-sdk/$w/DynamicDataset.service.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@
"memberOf": "$w",
"mixes":
[ "$w.Dataset" ],
"labels":
[ "new" ],
"labels": [],
"location":
{ "lineno": 1987,
"filename": "datasetApi.js" },
Expand Down
3 changes: 1 addition & 2 deletions js-wixcode-sdk/$w/WixDataFilter.service.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{ "name": "WixDataFilter",
"memberOf": "$w",
"mixes": [],
"labels":
[ "new" ],
"labels": [],
"location":
{ "lineno": 1417,
"filename": "datasetApi.js" },
Expand Down
3 changes: 1 addition & 2 deletions js-wixcode-sdk/$w/WixDataSort.service.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{ "name": "WixDataSort",
"memberOf": "$w",
"mixes": [],
"labels":
[ "new" ],
"labels": [],
"location":
{ "lineno": 1920,
"filename": "datasetApi.js" },
Expand Down
102 changes: 99 additions & 3 deletions js-wixcode-sdk/wix-site-frontend.service.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{ "name": "wix-site-frontend",
"mixes": [],
"labels": [],
"labels":
[ "changed" ],
"location":
{ "lineno": 1,
"filename": "site-frontend.js" },
Expand Down Expand Up @@ -255,7 +256,43 @@
"extra":
{ } } ],
"operations":
[ { "name": "getSiteDisplayName",
[ { "name": "getFontsHtml",
"labels":
[ "changed" ],
"nameParams": [],
"params":
[ { "name": "fonts",
"type":
{ "name": "Array",
"typeParams":
[ "string" ] },
"doc": "List of fonts to be loaded, where each font is represented by a value of a `font` CSS property." },
{ "name": "options",
"type": "wix-site-frontend.getFontsHtmlOptions",
"doc": "The options used when getting the HTML element.",
"optional": true } ],
"ret":
{ "type":
{ "name": "Promise",
"typeParams":
[ "string" ] },
"doc": "Fulfilled - HTML element containing the CSS code that loads the fonts." },
"locations":
[ { "lineno": 323,
"filename": "site-frontend.js" } ],
"docs":
{ "summary": "Gets an HTML element containing CSS code to load fonts.",
"description":
[ "Use the `getFontsHtml()` function to get an HTML element containing the CSS code that loads one or more fonts. ",
"This function is useful when embedding a custom element in a Wix site where the page's stylesheet fonts",
"are inaccessible, such as when using a shadow root or an internal iframe." ],
"links": [],
"examples": [],
"extra":
{ } },
"extra":
{ } },
{ "name": "getSiteDisplayName",
"labels": [],
"nameParams": [],
"params": [],
Expand Down Expand Up @@ -449,6 +486,31 @@
{ } },
"extra":
{ } },
{ "name": "getSiteThemeHtml",
"labels": [],
"nameParams": [],
"params":
[ { "name": "options",
"type": "wix-site-frontend.getSiteThemeHtmlOptions",
"doc": "The options used when getting the HTML element.",
"optional": true } ],
"ret":
{ "type":
{ "name": "Promise",
"typeParams":
[ "string" ] },
"doc": "Fulfilled - HTML element containing site's theme CSS." },
"locations":
[ { "lineno": 303,
"filename": "site-frontend.js" } ],
"docs":
{ "summary": "Gets the CSS code of the site's theme.\nUse the `getSiteThemeHtml()` function to get an HTML element containing the CSS code of a site's \n[theme colors and fonts](https://support.wix.com/en/article/wix-editor-customizing-your-sites-theme-and-design). \nThis function is useful when embedding a custom element in a Wix site where the page's stylesheet \nis inaccessible, such as when using a shadow root or an internal iframe.",
"links": [],
"examples": [],
"extra":
{ } },
"extra":
{ } },
{ "name": "prefetchPageResources",
"labels": [],
"nameParams": [],
Expand Down Expand Up @@ -1227,7 +1289,41 @@
"optional": true } ],
"extra":
{ },
"labels": [] },
{ "name": "getFontsHtmlOptions",
"locations":
[ { "lineno": 337,
"filename": "site-frontend.js" } ],
"docs":
{ "summary": "The options used when getting the HTML element.",
"links": [],
"examples": [],
"extra":
{ } },
"members":
[ { "name": "testId",
"type": "string",
"doc": "An identifier that is added in a `data-test-id` attribute on the returned HTML element. You can use this identifier to locate the HTML element when testing your code." } ],
"extra":
{ },
"labels": [] },
{ "name": "getSiteThemeHtmlOptions",
"locations":
[ { "lineno": 316,
"filename": "site-frontend.js" } ],
"docs":
{ "summary": "The options used when getting HTML element.",
"links": [],
"examples": [],
"extra":
{ } },
"members":
[ { "name": "testId",
"type": "string",
"doc": "An identifier that is added in a `data-test-id` attribute on the returned HTML element. You can use this identifier to locate the HTML element when testing your code." } ],
"extra":
{ },
"labels": [] } ],
"extra":
{ "scopes":
[ "frontend" ] } }
[ "frontend" ] } }
2 changes: 1 addition & 1 deletion js-wixcode-sdk/wix-site.service.json
Original file line number Diff line number Diff line change
Expand Up @@ -1244,4 +1244,4 @@
{ "title": "How do I make a CORS request?",
"markdown": "Certain [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) (Cross-Origin Resource Sharing) requests are restricted when originating from a browser. Usually, GET requests and certain POST requests can be made from your site's **Public**, **Page**, or **Site** code. All other requests need to be made from your site's **Backend** code. If you are experiencing an issue with a [`fetch()`](https://www.wix.com/code/reference/wix-fetch.html) call due to a CORS restriction, move the [`fetch()`](https://www.wix.com/code/reference/wix-fetch.html) call to the backend as described in [Accessing 3rd Party Services](https://support.wix.com/en/article/accessing-3rd-party-services#backend-service-call)." },
{ "title": "Can I fetch resources that start with http and not https?",
"markdown": "You cannot request HTTP content if your site is an HTTPS site. To fix this issue you can either use the HTTPS protocol to fetch the requested resources or you can [turn off SSL on your site](https://support.wix.com/en/article/enabling-https-for-your-wix-site)." } ] }
"markdown": "You cannot request HTTP content if your site is an HTTPS site. To fix this issue you can either use the HTTPS protocol to fetch the requested resources or you can [turn off SSL on your site](https://support.wix.com/en/article/enabling-https-for-your-wix-site)." } ] }
3 changes: 1 addition & 2 deletions js-wixcode-sdk/wix-storage-frontend.service.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{ "name": "wix-storage-frontend",
"mixes": [],
"labels":
[ "changed" ],
"labels": [],
"location":
{ "lineno": 1,
"filename": "Storage-frontend.js" },
Expand Down
3 changes: 1 addition & 2 deletions js-wixcode-sdk/wix-storage-frontend/Storage.service.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{ "name": "Storage",
"memberOf": "wix-storage-frontend",
"mixes": [],
"labels":
[ "changed" ],
"labels": [],
"location":
{ "lineno": 88,
"filename": "Storage-frontend.js" },
Expand Down
6 changes: 2 additions & 4 deletions js-wixcode-sdk/wix-window-frontend.service.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{ "name": "wix-window-frontend",
"mixes": [],
"labels":
[ "changed" ],
"labels": [],
"location":
{ "lineno": 1,
"filename": "window-frontend.js" },
Expand Down Expand Up @@ -171,8 +170,7 @@
"extra":
{ } },
{ "name": "multilingual",
"labels":
[ "changed" ],
"labels": [],
"get": true,
"set": false,
"type": "wix-window-frontend.Multilingual",
Expand Down
15 changes: 5 additions & 10 deletions js-wixcode-sdk/wix-window-frontend/Multilingual.service.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
{ "name": "Multilingual",
"memberOf": "wix-window-frontend",
"mixes": [],
"labels":
[ "changed" ],
"labels": [],
"location":
{ "lineno": 1100,
"filename": "window-frontend.js" },
Expand All @@ -26,8 +25,7 @@
{ } },
"properties":
[ { "name": "currentLanguage",
"labels":
[ "changed" ],
"labels": [],
"get": true,
"set": true,
"type": "string",
Expand Down Expand Up @@ -132,8 +130,7 @@
"extra":
{ } },
{ "name": "isEnabled",
"labels":
[ "changed" ],
"labels": [],
"get": true,
"set": false,
"type": "boolean",
Expand All @@ -158,8 +155,7 @@
"extra":
{ } },
{ "name": "siteLanguages",
"labels":
[ "changed" ],
"labels": [],
"get": true,
"set": false,
"type":
Expand Down Expand Up @@ -329,7 +325,6 @@
"doc": "Whether the language is a site's primary language." } ],
"extra":
{ },
"labels":
[ "changed" ] } ],
"labels": [] } ],
"extra":
{ } }