@capillarytech/creatives-library 8.0.282-alpha.0 → 8.0.282-alpha.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -2036,12 +2036,13 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
2036
2036
|
!selectedWeChatAccount &&
|
|
2037
2037
|
nextProps.templateDetails?.definition?.accountId &&
|
|
2038
2038
|
nextProps.Edit?.weCrmAccounts?.length > 0;
|
|
2039
|
+
const isLibraryMode = this.props.location.query.type !== 'embedded' || this.props.isFullMode === false;
|
|
2039
2040
|
const canPopulateForm =
|
|
2040
2041
|
!_.isEmpty(nextProps.templateDetails) &&
|
|
2041
2042
|
_.isEmpty(this.state.editData) &&
|
|
2042
2043
|
!_.isEmpty(this.state.fullSchema) &&
|
|
2043
|
-
|
|
2044
|
-
(selectedWeChatAccount || isEmbeddedLibrary || canSetAccountFromTemplate);
|
|
2044
|
+
isLibraryMode &&
|
|
2045
|
+
(selectedWeChatAccount || isEmbeddedLibrary || canSetAccountFromTemplate || !nextProps.isFullMode);
|
|
2045
2046
|
if (canPopulateForm) {
|
|
2046
2047
|
this.props = nextProps;
|
|
2047
2048
|
if (canSetAccountFromTemplate) {
|
|
@@ -2049,8 +2050,8 @@ export class Edit extends React.Component { // eslint-disable-line react/prefer-
|
|
|
2049
2050
|
}
|
|
2050
2051
|
const mode = nextProps.templateDetails.definition ? nextProps.templateDetails.definition.mode : nextProps.templateDetails.mode;
|
|
2051
2052
|
const schema = mode === "text" ? this.state.fullSchema?.textSchema : this.state.fullSchema?.imageSchema;
|
|
2052
|
-
const isAndroidSupported = get(this, "props.Templates.selectedWeChatAccount.configs.android") === '1';
|
|
2053
|
-
const isIosSupported = get(this, "props.Templates.selectedWeChatAccount.configs.ios") === '1';
|
|
2053
|
+
const isAndroidSupported = get(this, "props.Templates.selectedWeChatAccount.configs.android", '') === '1';
|
|
2054
|
+
const isIosSupported = get(this, "props.Templates.selectedWeChatAccount.configs.ios", '') === '1';
|
|
2054
2055
|
if (!isAndroidSupported) {
|
|
2055
2056
|
const androidField = get(schema, "containers[0].panes[0]");
|
|
2056
2057
|
androidField.isSupported = false;
|