{ "version": 3, "sources": ["apps/vendor-center-client/src/app/core/edition-diff/edition-diff-model.ts", "apps/vendor-center-client/src/app/core/edition-diff/edition-diff.service.ts", "apps/vendor-center-client/src/app/core/edition-marketing-diff/edition-marketing-diff-model.ts", "apps/vendor-center-client/src/app/core/edition-marketing-diff/edition-marketing-diff.service.ts"], "sourcesContent": ["export enum EditionFieldDisplayType {\n Boolean = 1,\n Text,\n KeySellingPoint,\n}\n\nexport class ChangedField {\n fieldName: string;\n displayType: EditionFieldDisplayType;\n oldValue: any;\n newValue: any;\n changeType: any;\n\n constructor(\n fieldName: string,\n displayType: EditionFieldDisplayType,\n oldValue: string,\n newValue: string,\n changeType: string,\n ) {\n this.fieldName = fieldName;\n this.displayType = displayType;\n this.oldValue = oldValue;\n this.newValue = newValue;\n this.changeType = changeType;\n }\n}\n\nexport class EditionDiffModel {\n appId: string;\n editionId: string;\n editionName: string;\n wholesalePrice: number;\n suggestedRetailPrice: number;\n topLevelDataChanges: ChangedField[] = [];\n\n hasChanges(): boolean {\n return !!this.topLevelDataChanges.length;\n }\n}\n", "import { Injectable } from '@angular/core';\nimport { Edition } from '@galaxy/marketplace-apps/v1';\nimport { createEmptyValue } from '../diff-utils';\nimport { ChangedField, EditionDiffModel, EditionFieldDisplayType } from './edition-diff-model';\n\n@Injectable()\nexport class EditionDiffService {\n /**\n * Calculates the differences between two records. Intended to be used with draft and\n * published versions of the same record.\n * @param draft A version of that has unpublished changes pending.\n * @param published The version of that is currently published to the store.\n * @returns {EditionDiffModel} An object containing several arrays with the categorized differences between the\n * two versions.\n */\n\n getDiffs(draft: Edition, published: Edition): EditionDiffModel {\n draft = draft || new Edition();\n published = published || new Edition();\n\n const diffModel = new EditionDiffModel();\n const nameField = 'name';\n const pricingField = 'pricing';\n const wholesalePriceField = 'wholesalePrice';\n const suggestedRetailPriceField = 'suggestedRetailPrice';\n\n const allFields = [];\n for (const field of Object.keys(published)) {\n if (Object.prototype.hasOwnProperty.call(published, field) && field === nameField) {\n allFields.push(field);\n }\n if (Object.prototype.hasOwnProperty.call(published, field) && field === pricingField) {\n for (const price in published.pricing) {\n if (\n Object.prototype.hasOwnProperty.call(published.pricing, price) &&\n (price === wholesalePriceField || price === suggestedRetailPriceField)\n )\n allFields.push(price);\n }\n }\n }\n\n for (const field of Object.keys(draft)) {\n if (Object.prototype.hasOwnProperty.call(draft, field) && allFields.indexOf(field) < 0 && field === nameField) {\n allFields.push(field);\n }\n if (Object.prototype.hasOwnProperty.call(draft, field) && field === pricingField) {\n for (const price in draft.pricing) {\n if (\n Object.prototype.hasOwnProperty.call(draft.pricing, price) &&\n allFields.indexOf(price) < 0 &&\n (price === wholesalePriceField || price === suggestedRetailPriceField)\n )\n allFields.push(price);\n }\n }\n }\n\n for (let i = 0; i < allFields.length; i++) {\n const field = allFields[i];\n // Compare name field\n if (Object.prototype.hasOwnProperty.call(published, field)) {\n if (Object.prototype.hasOwnProperty.call(draft, field)) {\n const change = this.diffField(published[field], draft[field], field);\n if (change) {\n diffModel.topLevelDataChanges.push(change);\n }\n } else {\n // Field exists in published but not draft.\n const change = this.diffField(published[field], null, field);\n if (change) {\n diffModel.topLevelDataChanges.push(change);\n }\n }\n } else {\n // Field exists in draft but not published\n const change = this.diffField(null, draft[field], field);\n if (change) {\n diffModel.topLevelDataChanges.push(change);\n }\n }\n // Compare pricing fields\n if (field === 'name') {\n continue;\n }\n if (published?.pricing && Object.prototype.hasOwnProperty.call(published.pricing, field)) {\n if (draft?.pricing && Object.prototype.hasOwnProperty.call(draft.pricing, field)) {\n if (field === wholesalePriceField || field === suggestedRetailPriceField) {\n const pricingChange = this.diffField(published.pricing[field], draft.pricing[field], field);\n if (pricingChange) {\n diffModel.topLevelDataChanges.push(pricingChange);\n }\n }\n } else {\n // Field exists in published but not draft.\n if (field === wholesalePriceField || field === suggestedRetailPriceField) {\n const pricingChange = this.diffField(published.pricing[field], 0, field);\n if (pricingChange) {\n diffModel.topLevelDataChanges.push(pricingChange);\n }\n }\n }\n } else {\n // Field exists in draft but not published\n if (field === wholesalePriceField || field === suggestedRetailPriceField) {\n const pricingChange = this.diffField(0, draft.pricing[field], field);\n if (pricingChange) {\n diffModel.topLevelDataChanges.push(pricingChange);\n }\n }\n }\n }\n\n return diffModel;\n }\n\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n private getDisplayType(fieldName: string): EditionFieldDisplayType {\n return EditionFieldDisplayType.Text;\n }\n\n private diffObject(oldObject: any, newObject: any): ChangedField[] {\n oldObject = oldObject || {};\n newObject = newObject || {};\n\n const changes = [];\n for (const field in oldObject) {\n if (Object.prototype.hasOwnProperty.call(oldObject, field)) {\n if (Object.prototype.hasOwnProperty.call(newObject, field)) {\n // If the object has a nested array check each field in it for changes.\n if (Array.isArray(oldObject[field])) {\n const oldField: Array = oldObject[field];\n const newField: Array = newObject[field];\n // Arrays should be considered equal if they are the same length and have the same items\n // in the same order.\n let length = 0;\n if (oldField.length === newField.length) {\n length = oldField.length;\n } else if (oldField.length > newField.length) {\n length = oldField.length;\n } else {\n length = newField.length;\n }\n for (let i = 0; i < length; i++) {\n // compare all values in the oldValues to all values in new values if it's array of\n // strings\n if (\n !(oldField[i] !== null && typeof oldField[i] === 'object') &&\n !(newField[i] !== null && typeof newField[i] === 'object')\n ) {\n if (newField[i]) {\n if (!oldField.includes(newField[i])) {\n let value = ' ';\n if (oldField[i]) {\n value = oldField[i];\n }\n changes.push(new ChangedField(field, this.getDisplayType(field), value, newField[i], 'A'));\n continue;\n }\n }\n if (oldField[i]) {\n if (!newField.includes(oldField[i])) {\n let value = ' ';\n if (newField[i]) {\n value = newField[i];\n }\n changes.push(new ChangedField(field, this.getDisplayType(field), oldField[i], value, 'D'));\n }\n }\n } else {\n const change = this.diffField(oldField[i], newField[i], field);\n if (change) {\n changes.push(change);\n }\n }\n }\n } else {\n const change = this.diffField(oldObject[field], newObject[field], field);\n if (change) {\n changes.push(change);\n }\n }\n } else {\n // Field exists on oldObject but not newObject.\n if (Array.isArray(oldObject[field])) {\n newObject[field] = [];\n for (let i = 0; i < oldObject[field].length; i++) {\n const change = this.diffField(oldObject[field][i], newObject[field][i], field);\n if (change) {\n changes.push(change);\n }\n }\n } else {\n const change = this.diffField(oldObject[field], '', field);\n if (change) {\n changes.push(change);\n }\n }\n }\n }\n }\n\n for (const field in newObject) {\n if (Object.prototype.hasOwnProperty.call(newObject, field)) {\n if (!Object.prototype.hasOwnProperty.call(oldObject, field)) {\n // Field exists on newObject but not oldObject.\n if (Array.isArray(newObject[field])) {\n oldObject[field] = [''];\n } else {\n oldObject[field] = '';\n }\n const change = this.diffField(oldObject[field], newObject[field], field);\n if (change) {\n changes.push(change);\n }\n }\n }\n }\n\n return changes;\n }\n\n private diffField(oldField: any, newField: any, fieldName: string): ChangedField {\n if (!oldField && !newField) {\n return null;\n }\n if (oldField && !newField) {\n return new ChangedField(fieldName, this.getDisplayType(fieldName), oldField, createEmptyValue(oldField), 'D');\n }\n if (newField && !oldField) {\n return new ChangedField(fieldName, this.getDisplayType(fieldName), createEmptyValue(newField), newField, 'A');\n }\n\n let areSame = true;\n let change = '';\n if (Array.isArray(oldField)) {\n // Arrays should be considered equal if they are the same length and have the same items in\n // the same order.\n let length = 0;\n if (oldField.length === newField.length) {\n length = oldField.length;\n } else if (oldField.length > newField.length) {\n length = oldField.length;\n } else {\n length = newField.length;\n }\n for (let i = 0; i < length && areSame; i++) {\n const arrayChange = this.diffField(oldField[i], newField[i], fieldName);\n if (arrayChange) {\n areSame = false;\n change = arrayChange.changeType;\n }\n }\n } else if (oldField !== null && typeof oldField === 'object') {\n // Objects should be considered not equal if their JSON representations are not the same.\n if (JSON.stringify(oldField) === JSON.stringify(newField)) {\n areSame = true;\n } else if (JSON.stringify(oldField) > JSON.stringify(newField)) {\n change = 'D';\n areSame = false;\n } else {\n change = 'A';\n areSame = false;\n }\n for (const field in oldField) {\n if (field !== 'toApiJson') {\n if (!Object.prototype.hasOwnProperty.call(newField, field)) {\n change = 'D';\n areSame = false;\n newField[field] = createEmptyValue(oldField[field]);\n }\n }\n }\n for (const field in newField) {\n if (!Object.prototype.hasOwnProperty.call(oldField, field)) {\n if (field !== 'toApiJson') {\n change = 'A';\n areSame = false;\n oldField[field] = createEmptyValue(newField[field]);\n }\n }\n }\n } else {\n if (oldField !== newField) {\n change = 'A';\n areSame = false;\n }\n }\n if (!areSame) {\n return new ChangedField(fieldName, this.getDisplayType(fieldName), oldField, newField, change);\n }\n\n return null;\n }\n}\n", "export enum EditionMarketingFieldDisplayType {\n Boolean = 1,\n Text,\n KeySellingPoint,\n}\n\nexport class ChangedField {\n fieldName: string;\n displayType: EditionMarketingFieldDisplayType;\n oldValue: any;\n newValue: any;\n changeType: any;\n\n constructor(\n fieldName: string,\n displayType: EditionMarketingFieldDisplayType,\n oldValue: string,\n newValue: string,\n changeType: string,\n ) {\n this.fieldName = fieldName;\n this.displayType = displayType;\n this.oldValue = oldValue;\n this.newValue = newValue;\n this.changeType = changeType;\n }\n}\n\nexport class EditionMarketingDiffModel {\n appId: string;\n editionId: string;\n editionName: string;\n topLevelDataChanges: ChangedField[] = [];\n endUserMarketingChanges: ChangedField[] = [];\n resellerMarketingChanges: ChangedField[] = [];\n\n hasChanges(): boolean {\n return !!(\n this.topLevelDataChanges.length ||\n this.endUserMarketingChanges.length ||\n this.resellerMarketingChanges.length\n );\n }\n}\n", "import { Injectable } from '@angular/core';\nimport { AppEditionsMarketing } from '@galaxy/marketplace-apps/v1';\nimport { createEmptyValue } from '../diff-utils';\nimport {\n ChangedField,\n EditionMarketingDiffModel,\n EditionMarketingFieldDisplayType,\n} from './edition-marketing-diff-model';\n\n@Injectable()\nexport class EditionMarketingDiffService {\n private END_USER_MARKETING_FIELD = 'endUserMarketing';\n private RESELLER_MARKETING_FIELD = 'resellerMarketing';\n\n private fieldDisplayTypeMapping: Map = new Map([\n ['usesResellerMarketing', EditionMarketingFieldDisplayType.Boolean],\n ['description', EditionMarketingFieldDisplayType.Text],\n ['keySellingPoints', EditionMarketingFieldDisplayType.KeySellingPoint],\n ]);\n\n /**\n * Calculates the differences between two records. Intended to be used with draft and\n * published versions of the same record.\n * @param draft A version of that has unpublished changes pending.\n * @param published The version of that is currently published to the store.\n * @returns {EditionMarketingDiffModel} An object containing several arrays with the categorized differences between the\n * two versions.\n */\n getDiffs(draft: AppEditionsMarketing, published: AppEditionsMarketing): EditionMarketingDiffModel {\n draft = draft || new AppEditionsMarketing();\n published = published || new AppEditionsMarketing();\n\n const diffModel = new EditionMarketingDiffModel();\n\n const allFields = [];\n for (const field in published) {\n if (Object.prototype.hasOwnProperty.call(published, field)) {\n allFields.push(field);\n }\n }\n for (const field in draft) {\n if (Object.prototype.hasOwnProperty.call(draft, field) && allFields.indexOf(field) < 0) {\n allFields.push(field);\n }\n }\n\n for (let i = 0; i < allFields.length; i++) {\n const field = allFields[i];\n if (Object.prototype.hasOwnProperty.call(published, field)) {\n if (Object.prototype.hasOwnProperty.call(draft, field)) {\n if (field === this.END_USER_MARKETING_FIELD) {\n diffModel.endUserMarketingChanges = this.diffObject(published[field], draft[field]);\n } else if (field === this.RESELLER_MARKETING_FIELD) {\n diffModel.resellerMarketingChanges = this.diffObject(published[field], draft[field]);\n } else {\n const change = this.diffField(published[field], draft[field], field);\n if (change) {\n diffModel.topLevelDataChanges.push(change);\n }\n }\n } else {\n // Field exists in published but not draft.\n if (field === this.END_USER_MARKETING_FIELD) {\n diffModel.endUserMarketingChanges = this.diffObject(published[field], null);\n } else if (field === this.RESELLER_MARKETING_FIELD) {\n diffModel.resellerMarketingChanges = this.diffObject(published[field], null);\n } else {\n const change = this.diffField(published[field], null, field);\n if (change) {\n diffModel.topLevelDataChanges.push(change);\n }\n }\n }\n } else {\n // Field exists in draft but not published.\n if (field === this.END_USER_MARKETING_FIELD) {\n diffModel.endUserMarketingChanges = this.diffObject(null, draft[field]);\n } else if (field === this.RESELLER_MARKETING_FIELD) {\n diffModel.resellerMarketingChanges = this.diffObject(null, draft[field]);\n } else {\n const change = this.diffField(null, draft[field], field);\n if (change) {\n diffModel.topLevelDataChanges.push(change);\n }\n }\n }\n }\n\n return diffModel;\n }\n\n private getDisplayType(fieldName: string): EditionMarketingFieldDisplayType {\n if (this.fieldDisplayTypeMapping.has(fieldName)) {\n return this.fieldDisplayTypeMapping.get(fieldName);\n }\n\n return EditionMarketingFieldDisplayType.Text;\n }\n\n private diffObject(oldObject: any, newObject: any): ChangedField[] {\n oldObject = oldObject || {};\n newObject = newObject || {};\n\n const changes = [];\n for (const field in oldObject) {\n if (Object.prototype.hasOwnProperty.call(oldObject, field)) {\n if (Object.prototype.hasOwnProperty.call(newObject, field)) {\n // If the object has a nested array check each field in it for changes.\n if (Array.isArray(oldObject[field])) {\n const oldField: Array = oldObject[field];\n const newField: Array = newObject[field];\n // Arrays should be considered equal if they are the same length and have the same items\n // in the same order.\n let length = 0;\n if (oldField.length === newField.length) {\n length = oldField.length;\n } else if (oldField.length > newField.length) {\n length = oldField.length;\n } else {\n length = newField.length;\n }\n for (let i = 0; i < length; i++) {\n // compare all values in the oldValues to all values in new values if it's array of\n // strings\n if (\n !(oldField[i] !== null && typeof oldField[i] === 'object') &&\n !(newField[i] !== null && typeof newField[i] === 'object')\n ) {\n if (newField[i]) {\n if (!oldField.includes(newField[i])) {\n let value = ' ';\n if (oldField[i]) {\n value = oldField[i];\n }\n changes.push(new ChangedField(field, this.getDisplayType(field), value, newField[i], 'A'));\n continue;\n }\n }\n if (oldField[i]) {\n if (!newField.includes(oldField[i])) {\n let value = ' ';\n if (newField[i]) {\n value = newField[i];\n }\n changes.push(new ChangedField(field, this.getDisplayType(field), oldField[i], value, 'D'));\n }\n }\n } else {\n const change = this.diffField(oldField[i], newField[i], field);\n if (change) {\n changes.push(change);\n }\n }\n }\n } else {\n const change = this.diffField(oldObject[field], newObject[field], field);\n if (change) {\n changes.push(change);\n }\n }\n } else {\n // Field exists on oldObject but not newObject.\n if (Array.isArray(oldObject[field])) {\n newObject[field] = [];\n for (let i = 0; i < oldObject[field].length; i++) {\n const change = this.diffField(oldObject[field][i], newObject[field][i], field);\n if (change) {\n changes.push(change);\n }\n }\n } else {\n const change = this.diffField(oldObject[field], '', field);\n if (change) {\n changes.push(change);\n }\n }\n }\n }\n }\n\n for (const field in newObject) {\n if (Object.prototype.hasOwnProperty.call(newObject, field)) {\n if (!Object.prototype.hasOwnProperty.call(oldObject, field)) {\n // Field exists on newObject but not oldObject.\n if (Array.isArray(newObject[field])) {\n oldObject[field] = [''];\n } else {\n oldObject[field] = '';\n }\n const change = this.diffField(oldObject[field], newObject[field], field);\n if (change) {\n changes.push(change);\n }\n }\n }\n }\n\n return changes;\n }\n\n private diffField(oldField: any, newField: any, fieldName: string): ChangedField {\n if (!oldField && !newField) {\n return null;\n }\n if (oldField && !newField) {\n return new ChangedField(fieldName, this.getDisplayType(fieldName), oldField, createEmptyValue(oldField), 'D');\n }\n if (newField && !oldField) {\n return new ChangedField(fieldName, this.getDisplayType(fieldName), createEmptyValue(newField), newField, 'A');\n }\n\n let areSame = true;\n let change = '';\n if (Array.isArray(oldField)) {\n // Arrays should be considered equal if they are the same length and have the same items in\n // the same order.\n let length = 0;\n if (oldField.length === newField.length) {\n length = oldField.length;\n } else if (oldField.length > newField.length) {\n length = oldField.length;\n } else {\n length = newField.length;\n }\n for (let i = 0; i < length && areSame; i++) {\n const arrayChange = this.diffField(oldField[i], newField[i], fieldName);\n if (arrayChange) {\n areSame = false;\n change = arrayChange.changeType;\n }\n }\n } else if (oldField !== null && typeof oldField === 'object') {\n // Objects should be considered not equal if their JSON representations are not the same.\n if (JSON.stringify(oldField) === JSON.stringify(newField)) {\n areSame = true;\n } else if (JSON.stringify(oldField) > JSON.stringify(newField)) {\n change = 'D';\n areSame = false;\n } else {\n change = 'A';\n areSame = false;\n }\n for (const field in oldField) {\n if (field !== 'toApiJson') {\n if (!Object.prototype.hasOwnProperty.call(newField, field)) {\n change = 'D';\n areSame = false;\n newField[field] = createEmptyValue(oldField[field]);\n }\n }\n }\n for (const field in newField) {\n if (!Object.prototype.hasOwnProperty.call(oldField, field)) {\n if (field !== 'toApiJson') {\n change = 'A';\n areSame = false;\n oldField[field] = createEmptyValue(newField[field]);\n }\n }\n }\n } else {\n if (oldField !== newField) {\n change = 'A';\n areSame = false;\n }\n }\n if (!areSame) {\n return new ChangedField(fieldName, this.getDisplayType(fieldName), oldField, newField, change);\n }\n\n return null;\n }\n}\n"], "mappings": "gIAAA,IAAYA,EAAZ,SAAYA,EAAuB,CACjCA,OAAAA,EAAAA,EAAA,QAAA,CAAA,EAAA,UACAA,EAAAA,EAAA,KAAA,CAAA,EAAA,OACAA,EAAAA,EAAA,gBAAA,CAAA,EAAA,kBAHUA,CAIZ,EAJYA,GAAuB,CAAA,CAAA,EAMtBC,EAAP,KAAmB,CAOvBC,YACEC,EACAC,EACAC,EACAC,EACAC,EAAkB,CAElB,KAAKJ,UAAYA,EACjB,KAAKC,YAAcA,EACnB,KAAKC,SAAWA,EAChB,KAAKC,SAAWA,EAChB,KAAKC,WAAaA,CACpB,GAGWC,EAAP,KAAuB,CAA7BN,aAAA,CAME,KAAAO,oBAAsC,CAAA,CAKxC,CAHEC,YAAU,CACR,MAAO,CAAC,CAAC,KAAKD,oBAAoBE,MACpC,GChCF,IAAaC,GAAkB,IAAA,CAAzB,IAAOA,EAAP,MAAOA,CAAkB,CAU7BC,SAASC,EAAgBC,EAAkB,CACzCD,EAAQA,GAAS,IAAIE,EACrBD,EAAYA,GAAa,IAAIC,EAE7B,IAAMC,EAAY,IAAIC,EAChBC,EAAY,OACZC,EAAe,UACfC,EAAsB,iBACtBC,EAA4B,uBAE5BC,EAAY,CAAA,EAClB,QAAWC,KAASC,OAAOC,KAAKX,CAAS,EAIvC,GAHIU,OAAOE,UAAUC,eAAeC,KAAKd,EAAWS,CAAK,GAAKA,IAAUL,GACtEI,EAAUO,KAAKN,CAAK,EAElBC,OAAOE,UAAUC,eAAeC,KAAKd,EAAWS,CAAK,GAAKA,IAAUJ,EACtE,QAAWW,KAAShB,EAAUiB,QAE1BP,OAAOE,UAAU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OAIlBA,EAASiB,EAASjB,OAEpB,QAASD,EAAI,EAAGA,EAAIC,GAAUsB,EAASvB,IAAK,CAC1C,IAAMwB,EAAc,KAAKlB,UAAUW,EAASjB,CAAC,EAAGkB,EAASlB,CAAC,EAAGS,CAAS,EAClEe,IACFD,EAAU,GACVlB,EAASmB,EAAYC,WAEzB,CACF,SAAWR,IAAa,MAAQ,OAAOA,GAAa,SAAU,CAExDS,KAAKC,UAAUV,CAAQ,IAAMS,KAAKC,UAAUT,CAAQ,EACtDK,EAAU,GACDG,KAAKC,UAAUV,CAAQ,EAAIS,KAAKC,UAAUT,CAAQ,GAC3Db,EAAS,IACTkB,EAAU,KAEVlB,EAAS,IACTkB,EAAU,IAEZ,QAAW9B,KAASwB,EACdxB,IAAU,cACPC,OAAOC,UAAUC,eAAeC,KAAKqB,EAAUzB,CAAK,IACvDY,EAAS,IACTkB,EAAU,GACVL,EAASzB,CAAK,EAAI6B,EAAiBL,EAASxB,CAAK,CAAC,IAIxD,QAAWA,KAASyB,EACbxB,OAAOC,UAAUC,eAAeC,KAAKoB,EAAUxB,CAAK,GACnDA,IAAU,cACZY,EAAS,IACTkB,EAAU,GACVN,EAASxB,CAAK,EAAI6B,EAAiBJ,EAASzB,CAAK,CAAC,EAI1D,MACMwB,IAAaC,IACfb,EAAS,IACTkB,EAAU,IAGd,OAAKA,EAIE,KAHE,IAAIF,EAAaZ,EAAW,KAAKD,eAAeC,CAAS,EAAGQ,EAAUC,EAAUb,CAAM,CAIjG,yCArQW7B,EAA2B,wBAA3BA,EAA2BoD,QAA3BpD,EAA2BqD,SAAA,CAAA,EAAlC,IAAOrD,EAAPsD,SAAOtD,CAA2B,GAAA", "names": ["EditionFieldDisplayType", "ChangedField", "constructor", "fieldName", "displayType", "oldValue", "newValue", "changeType", "EditionDiffModel", "topLevelDataChanges", "hasChanges", "length", "EditionDiffService", "getDiffs", "draft", "published", "Edition", "diffModel", "EditionDiffModel", "nameField", "pricingField", "wholesalePriceField", "suggestedRetailPriceField", "allFields", "field", "Object", "keys", "prototype", "hasOwnProperty", "call", "push", "price", "pricing", "indexOf", "i", "length", "change", "diffField", "topLevelDataChanges", "pricingChange", "getDisplayType", "fieldName", "EditionFieldDisplayType", "Text", "diffObject", "oldObject", "newObject", "changes", "Array", "isArray", "oldField", "newField", "includes", "value", "ChangedField", "createEmptyValue", "areSame", "arrayChange", "changeType", "JSON", "stringify", "factory", "\u0275fac", "_EditionDiffService", "EditionMarketingFieldDisplayType", "ChangedField", "constructor", "fieldName", "displayType", "oldValue", "newValue", "changeType", "EditionMarketingDiffModel", "topLevelDataChanges", "endUserMarketingChanges", "resellerMarketingChanges", "hasChanges", "length", "EditionMarketingDiffService", "constructor", "END_USER_MARKETING_FIELD", "RESELLER_MARKETING_FIELD", "fieldDisplayTypeMapping", "Map", "EditionMarketingFieldDisplayType", "Boolean", "Text", "KeySellingPoint", "getDiffs", "draft", "published", "AppEditionsMarketing", "diffModel", "EditionMarketingDiffModel", "allFields", "field", "Object", "prototype", "hasOwnProperty", "call", "push", "indexOf", "i", "length", "endUserMarketingChanges", "diffObject", "resellerMarketingChanges", "change", "diffField", "topLevelDataChanges", "getDisplayType", "fieldName", "has", "get", "oldObject", "newObject", "changes", "Array", "isArray", "oldField", "newField", "includes", "value", "ChangedField", "createEmptyValue", "areSame", "arrayChange", "changeType", "JSON", "stringify", "factory", "\u0275fac", "_EditionMarketingDiffService"] }