diff --git a/wix-application/wix-application.service.json b/wix-application/wix-application.service.json index 8b581b3be9..cf42012707 100644 --- a/wix-application/wix-application.service.json +++ b/wix-application/wix-application.service.json @@ -30,7 +30,7 @@ "params": [ { "name": "pageId", "type": "string", - "doc": "The ID of the new page on which the widget is added, as defined in the Installation Settings." } ], + "doc": "The ID of the specified on which the widget is added, as defined in the Installation Settings." } ], "ret": { "type": { "name": "Promise", @@ -38,7 +38,7 @@ [ "string" ] }, "doc": "Fulfilled - The page URL." }, "locations": - [ { "lineno": 50, + [ { "lineno": 37, "filename": "application.js" } ], "docs": { "summary": "Gets the URL of the new page that was added by a Blocks app, when installed on a site.", @@ -55,11 +55,12 @@ "//...", "", "const url = await wixApplication.getAppPageUrl('Page ID');", - "\tif (!url) {", - "\t\tconsole.log('I CANNOT GO THERE'); ", - "\t\treturn;", - "\t}", - "\twixLocation.to(url);" ], + "", + "if (url) {", + "wixLocation.to(url);", + "} else {console.log(\"Page doesn't exist\"); ", + "return;", + "}" ], "extra": { } } ], "extra": @@ -89,7 +90,7 @@ "examples": [ { "title": "Retrieve the Vendor Product ID", "body": - [ "import wixApplication from 'wix-application'", + [ "import wixApplication from 'wix-application';", "", "// ...", "", @@ -118,14 +119,14 @@ { "name": "Promise", "typeParams": [ "Object" ] }, - "doc": "Fulfilled - The returned data from the lightbox. Rejected - the error that caused the rejection." }, + "doc": "Fulfilled - The returned data from the lightbox." }, "locations": - [ { "lineno": 63, + [ { "lineno": 50, "filename": "application.js" } ], "docs": { "summary": "Opens a lightbox that was added to a site by the Blocks app, during the app installation process and optionally passes it data.", "description": - [ "The `openAppLightbox()` function returns a Promise that resolves to an object with data from the lightbox. Use it when a widget is installed as a lightbox. ", + [ "The `openAppLightbox()` function returns a Promise that resolves to an object with data from the lightbox, when the lightbox is closed. Use it when a widget is installed as a lightbox. ", "Learn more about [app and widget installation settings](https://support.wix.com/en/article/wix-blocks-app-and-widget-installation-settings). ", "", "Note that to pass data back to the page that opened the lightbox, you must close the", @@ -153,30 +154,32 @@ "", "// ...", "", + "const dataObj = {title: \"Widget Title\"};", "wixApplication.openLightbox(\"lightboxId\", dataObj);" ], "extra": { } }, - { "title": "Open a lightbox and receive data when it closed", + { "title": "Open a lightbox and receive data when it closes", "body": [ "import wixApplication from 'wix-application';", "", "// ...", "", "wixApplication.openLightbox(\"lightboxId\")", - " .then( (data) => {", - " let receivedData = data;", + " .then( (data) => { ", + " let receivedData = data; // When the lightbox is closed, it returns this data", " } );" ], "extra": { } }, - { "title": "Open a lightbox, send it data and receive data back when it closed", + { "title": "Open a lightbox, send it data and receive data back when it closes", "body": [ "import wixApplication from 'wix-application';", "", "// ...", "", + "const dataObj = {title: \"My Title\"};", "wixApplication.openLightbox(\"ligthboxId\", dataObj)", " .then( (data) => {", - " let receivedData = data;", + " let receivedData = data; // When the lightbox is closed, it returns this data. ", " } );" ], "extra": { } } ], @@ -205,12 +208,10 @@ "doc": "The ID of your app on this specific site." }, { "name": "vendorProductId", "type": "string", - "doc": "The Plan ID of the app purchased by the site." }, - { "name": "expirationDate", - "type": "string", - "doc": "The plan's expiration date." } ], + "doc": "The Plan ID of the app purchased by the site." } ], "extra": { }, - "labels": [] } ], + "labels": + [ "changed" ] } ], "extra": - { } } \ No newline at end of file + { } }