@shopify/app-bridge
Advanced tools
Comparing version
@@ -22,2 +22,3 @@ import { ClientApplication } from '../../client'; | ||
loading?: boolean; | ||
plain?: boolean; | ||
} | ||
@@ -45,2 +46,3 @@ export interface Payload extends Options { | ||
loading: boolean; | ||
plain: boolean; | ||
constructor(app: ClientApplication<any>, options: Options); | ||
@@ -47,0 +49,0 @@ get options(): Options; |
@@ -72,2 +72,3 @@ "use strict"; | ||
_this.loading = false; | ||
_this.plain = false; | ||
_this.set(options, false); | ||
@@ -84,2 +85,3 @@ return _this; | ||
loading: this.loading, | ||
plain: this.plain, | ||
}; | ||
@@ -100,3 +102,3 @@ }, | ||
var mergedOptions = helper_1.getMergedProps(this.options, options); | ||
var label = mergedOptions.label, disabled = mergedOptions.disabled, icon = mergedOptions.icon, style = mergedOptions.style, loading = mergedOptions.loading; | ||
var label = mergedOptions.label, disabled = mergedOptions.disabled, icon = mergedOptions.icon, style = mergedOptions.style, loading = mergedOptions.loading, plain = mergedOptions.plain; | ||
this.label = label; | ||
@@ -107,2 +109,3 @@ this.disabled = Boolean(disabled); | ||
this.loading = Boolean(loading); | ||
this.plain = Boolean(plain); | ||
if (shouldUpdate) { | ||
@@ -109,0 +112,0 @@ this.dispatch(Action.UPDATE); |
@@ -12,2 +12,3 @@ import { ClientApplication } from '../../client'; | ||
buttons: Button[]; | ||
plain?: boolean; | ||
} | ||
@@ -19,2 +20,3 @@ export interface Payload { | ||
buttons: ButtonPayload[]; | ||
plain?: boolean; | ||
} | ||
@@ -32,2 +34,3 @@ export interface ButtonGroupUpdateAction extends MetaAction { | ||
disabled: boolean; | ||
plain: boolean; | ||
buttonsOptions: Button[]; | ||
@@ -34,0 +37,0 @@ buttons: ButtonPayload[]; |
@@ -56,2 +56,3 @@ "use strict"; | ||
_this.disabled = false; | ||
_this.plain = false; | ||
_this.buttonsOptions = []; | ||
@@ -68,2 +69,3 @@ _this.buttons = []; | ||
label: this.label, | ||
plain: this.plain, | ||
}; | ||
@@ -84,6 +86,7 @@ }, | ||
var mergedOptions = helper_1.getMergedProps(this.options, options); | ||
var label = mergedOptions.label, disabled = mergedOptions.disabled, buttons = mergedOptions.buttons; | ||
var label = mergedOptions.label, disabled = mergedOptions.disabled, buttons = mergedOptions.buttons, plain = mergedOptions.plain; | ||
this.label = label; | ||
this.disabled = Boolean(disabled); | ||
this.buttons = this.getButtons(buttons); | ||
this.plain = Boolean(plain); | ||
if (shouldUpdate) { | ||
@@ -90,0 +93,0 @@ this.dispatch(Action.UPDATE); |
@@ -7,6 +7,6 @@ "use strict"; | ||
action.addChild(button, action.group, subgroups); | ||
var id = button.id, label = button.label, disabled = button.disabled, buttons = button.buttons; | ||
var id = button.id, label = button.label, disabled = button.disabled, buttons = button.buttons, plain = button.plain; | ||
action.subscribeToChild(button, ButtonGroup_1.Action.UPDATE, updateCb); | ||
return { id: id, label: label, buttons: buttons, disabled: disabled }; | ||
return { id: id, label: label, buttons: buttons, disabled: disabled, plain: plain }; | ||
} | ||
exports.getGroupedButton = getGroupedButton; |
@@ -6,2 +6,13 @@ # Change Log | ||
## [2.0.4](https://github.com/Shopify/app-bridge/compare/v2.0.4-alpha.5...v2.0.4) (2021-09-30) | ||
### Features | ||
* add plain action group prop ([b15db78](https://github.com/Shopify/app-bridge/commit/b15db7835ceee5fdc767a798ef299c87c539b1b0)) | ||
## [2.0.4-alpha.5](https://github.com/Shopify/app-bridge/compare/v2.0.4-alpha.3...v2.0.4-alpha.5) (2021-09-13) | ||
@@ -8,0 +19,0 @@ |
{ | ||
"name": "@shopify/app-bridge", | ||
"version": "2.0.4-alpha.5", | ||
"version": "2.0.4", | ||
"types": "index.d.ts", | ||
@@ -56,3 +56,3 @@ "main": "index.js", | ||
}, | ||
"gitHead": "6a78776b895950bea1533e9f71fe8629c63ca119" | ||
"gitHead": "21bc906b981d42cc22a872ea9e48f291cc95ed87" | ||
} |
@@ -14,2 +14,3 @@ "use strict"; | ||
loading: type_validate_1.makeOptional(type_validate_1.matchesBoolean()), | ||
plain: type_validate_1.makeOptional(type_validate_1.matchesBoolean()), | ||
}); | ||
@@ -16,0 +17,0 @@ exports.buttonSchemaWithId = type_validate_1.composeSchemas(type_validate_1.matchesObject({ |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
858557
0.14%18122
0.11%