@blaze-cms/plugin-gtm-fe 0.146.0-rc-eagle-3.0 → 0.146.0-rc-eagle-3.2
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/lib/GoogleTagManager/GTMFactory.js +1 -2
- package/lib/GoogleTagManager/GTMFactory.js.map +1 -1
- package/lib/GoogleTagManagerEvent/GTMEvent.js +1 -2
- package/lib/GoogleTagManagerEvent/GTMEvent.js.map +1 -1
- package/lib/GoogleTagManagerEvent/GTMEventFactory.js +1 -2
- package/lib/GoogleTagManagerEvent/GTMEventFactory.js.map +1 -1
- package/lib/GoogleTagManagerEvent/GTMEventRender.js +1 -2
- package/lib/GoogleTagManagerEvent/GTMEventRender.js.map +1 -1
- package/lib/index.js +1 -2
- package/lib/index.js.map +1 -1
- package/package.json +5 -5
- package/CHANGELOG.md +0 -1750
|
@@ -12,8 +12,7 @@ var _reactPageBuilder = require("@blaze-cms/react-page-builder");
|
|
|
12
12
|
var _nextjsComponents = require("@blaze-cms/nextjs-components");
|
|
13
13
|
var _GTMRender = _interopRequireDefault(require("./GTMRender"));
|
|
14
14
|
var _helpers = require("../helpers");
|
|
15
|
-
function
|
|
16
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
15
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
17
16
|
const GTMFactory = ({
|
|
18
17
|
propsToDisplay,
|
|
19
18
|
userPropsToDisplay,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GTMFactory.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_client","_reactPageBuilder","_nextjsComponents","_GTMRender","_helpers","
|
|
1
|
+
{"version":3,"file":"GTMFactory.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_client","_reactPageBuilder","_nextjsComponents","_GTMRender","_helpers","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","GTMFactory","propsToDisplay","userPropsToDisplay","parent","gtmWebVitals","isPreview","useContext","MainContext","data","error","loading","useQuery","getSingleEntitySchema","variables","id","itemEntity","window","propsToDisplayArr","buildPropsToDisplayArray","extraProps","buildPropsQuery","action","actionKey","getRenderProps","createElement","parentId","itemId","webVitals","propTypes","PropTypes","array","object","isRequired","bool","defaultProps","_default","exports"],"sources":["../../src/GoogleTagManager/GTMFactory.js"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { useQuery } from '@apollo/client';\nimport { getSingleEntitySchema, buildPropsQuery } from '@blaze-cms/react-page-builder';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport GTMRender from './GTMRender';\nimport { getRenderProps, buildPropsToDisplayArray } from '../helpers';\n\nconst GTMFactory = ({ propsToDisplay, userPropsToDisplay, parent, gtmWebVitals }) => {\n const { isPreview } = useContext(MainContext);\n const { data, error, loading } = useQuery(getSingleEntitySchema, {\n variables: { id: parent.itemEntity }\n });\n\n if (typeof window === 'undefined') return null;\n if (loading || error || !data) return null;\n\n const propsToDisplayArr = buildPropsToDisplayArray(propsToDisplay);\n const extraProps = buildPropsQuery(data, propsToDisplayArr) || '';\n const { action, actionKey } = getRenderProps(extraProps, isPreview, data);\n\n return (\n <GTMRender\n action={action}\n actionKey={actionKey}\n userPropsToDisplay={userPropsToDisplay}\n propsToDisplay={propsToDisplay}\n parentId={parent.itemId}\n webVitals={gtmWebVitals}\n />\n );\n};\n\nGTMFactory.propTypes = {\n propsToDisplay: PropTypes.array,\n userPropsToDisplay: PropTypes.array,\n parent: PropTypes.object.isRequired,\n gtmWebVitals: PropTypes.bool\n};\n\nGTMFactory.defaultProps = {\n propsToDisplay: [],\n userPropsToDisplay: [],\n gtmWebVitals: false\n};\n\nexport default GTMFactory;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,UAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAAsE,SAAAD,wBAAAS,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAX,uBAAA,YAAAA,CAAAS,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,C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G,IAAI,CAAC;EAEzE,oBACErC,MAAA,CAAAoB,OAAA,CAAAiC,aAAA,CAAC7C,UAAA,CAAAY,OAAS;IACR8B,MAAM,EAAEA,MAAO;IACfC,SAAS,EAAEA,SAAU;IACrBpB,kBAAkB,EAAEA,kBAAmB;IACvCD,cAAc,EAAEA,cAAe;IAC/BwB,QAAQ,EAAEtB,MAAM,CAACuB,MAAO;IACxBC,SAAS,EAAEvB;EAAa,CACzB,CAAC;AAEN,CAAC;AAEDJ,UAAU,CAAC4B,SAAS,GAAG;EACrB3B,cAAc,EAAE4B,kBAAS,CAACC,KAAK;EAC/B5B,kBAAkB,EAAE2B,kBAAS,CAACC,KAAK;EACnC3B,MAAM,EAAE0B,kBAAS,CAACE,MAAM,CAACC,UAAU;EACnC5B,YAAY,EAAEyB,kBAAS,CAACI;AAC1B,CAAC;AAEDjC,UAAU,CAACkC,YAAY,GAAG;EACxBjC,cAAc,EAAE,EAAE;EAClBC,kBAAkB,EAAE,EAAE;EACtBE,YAAY,EAAE;AAChB,CAAC;AAAC,IAAA+B,QAAA,GAAAC,OAAA,CAAA7C,OAAA,GAEaS,UAAU","ignoreList":[]}
|
|
@@ -10,8 +10,7 @@ var _propTypes = _interopRequireDefault(require("prop-types"));
|
|
|
10
10
|
var _reactWaypoint = require("react-waypoint");
|
|
11
11
|
var _helpers = require("../helpers");
|
|
12
12
|
var _constants = require("../constants");
|
|
13
|
-
function
|
|
14
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
15
14
|
const GTMEvent = ({
|
|
16
15
|
dataLayerObject,
|
|
17
16
|
eventTrigger,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GTMEvent.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_reactWaypoint","_helpers","_constants","
|
|
1
|
+
{"version":3,"file":"GTMEvent.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_reactWaypoint","_helpers","_constants","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","GTMEvent","dataLayerObject","eventTrigger","currentLocation","handleOnSuccess","shouldPushLayer","setShouldPushLayer","useState","isViewEvent","IN_VIEW","isOnSuccess","ON_SUCCESS","useEffect","pushDataLayer","pushToDataLayer","createElement","Waypoint","onEnter","propTypes","PropTypes","func","isRequired","object","string","_default","exports"],"sources":["../../src/GoogleTagManagerEvent/GTMEvent.js"],"sourcesContent":["import React, { useState, useEffect } from 'react';\nimport PropTypes from 'prop-types';\nimport { Waypoint } from 'react-waypoint';\nimport { pushToDataLayer } from '../helpers';\nimport { IN_VIEW, ON_SUCCESS } from '../constants';\n\nconst GTMEvent = ({ dataLayerObject, eventTrigger, currentLocation, handleOnSuccess }) => {\n const [shouldPushLayer, setShouldPushLayer] = useState(false);\n const isViewEvent = eventTrigger === IN_VIEW;\n const isOnSuccess = eventTrigger === ON_SUCCESS && !!handleOnSuccess;\n\n useEffect(() => {\n setShouldPushLayer(true);\n }, [currentLocation]);\n\n const pushDataLayer = () => {\n pushToDataLayer(dataLayerObject);\n setShouldPushLayer(false);\n if (isOnSuccess) handleOnSuccess();\n };\n\n if (!isViewEvent && shouldPushLayer) {\n pushDataLayer();\n return null;\n }\n\n return isViewEvent && shouldPushLayer ? <Waypoint onEnter={pushDataLayer} /> : null;\n};\n\nGTMEvent.propTypes = {\n handleOnSuccess: PropTypes.func.isRequired,\n dataLayerObject: PropTypes.object.isRequired,\n eventTrigger: PropTypes.string.isRequired,\n currentLocation: PropTypes.string.isRequired\n};\n\nexport default GTMEvent;\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAAmD,SAAAD,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,I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Ee,kBAAS,CAACC,IAAI,CAACC,UAAU;EAC1CpB,eAAe,EAAEkB,kBAAS,CAACG,MAAM,CAACD,UAAU;EAC5CnB,YAAY,EAAEiB,kBAAS,CAACI,MAAM,CAACF,UAAU;EACzClB,eAAe,EAAEgB,kBAAS,CAACI,MAAM,CAACF;AACpC,CAAC;AAAC,IAAAG,QAAA,GAAAC,OAAA,CAAAlC,OAAA,GAEaS,QAAQ","ignoreList":[]}
|
|
@@ -16,8 +16,7 @@ var _GTMEventRender = _interopRequireDefault(require("./GTMEventRender"));
|
|
|
16
16
|
var _helpers = require("../helpers");
|
|
17
17
|
var _constants = require("../constants");
|
|
18
18
|
const _excluded = ["propsToDisplay"];
|
|
19
|
-
function
|
|
20
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
19
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
21
20
|
const GTMEventFactory = ({
|
|
22
21
|
parent,
|
|
23
22
|
gtmEvents,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GTMEventFactory.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_client","_reactPageBuilder","_nextjsComponents","_GTMEventRender","_helpers","_constants","_excluded","
|
|
1
|
+
{"version":3,"file":"GTMEventFactory.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_client","_reactPageBuilder","_nextjsComponents","_GTMEventRender","_helpers","_constants","_excluded","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","GTMEventFactory","parent","gtmEvents","parentData","clickId","parentComponent","isPreview","useContext","MainContext","itemEntity","data","error","loading","useQuery","getSingleEntitySchema","variables","id","map","_ref","propsToDisplay","eventProps","_objectWithoutProperties2","hasNoPropsToDisplay","length","propsToDisplayArr","buildPropsToDisplayArray","extraProps","buildPropsQuery","shouldUseParentData","itemIdToUse","itemId","getIdsToUse","shouldUseMultiQuery","Array","isArray","action","actionKey","getRenderProps","dynamicKey","GTM_EVENT_FACTORY","queryVariables","where","_in","skip","createElement","_extends2","key","propTypes","PropTypes","object","isRequired","string","array","oneOfType","defaultProps","_default","exports"],"sources":["../../src/GoogleTagManagerEvent/GTMEventFactory.js"],"sourcesContent":["import React, { useContext } from 'react';\nimport PropTypes from 'prop-types';\nimport { useQuery } from '@apollo/client';\nimport { getSingleEntitySchema, buildPropsQuery } from '@blaze-cms/react-page-builder';\nimport { MainContext } from '@blaze-cms/nextjs-components';\nimport GTMEventRender from './GTMEventRender';\nimport { getRenderProps, getIdsToUse, buildPropsToDisplayArray } from '../helpers';\nimport { GTM_EVENT_FACTORY } from '../constants';\n\nconst GTMEventFactory = ({ parent, gtmEvents, parentData, clickId, parentComponent }) => {\n const { isPreview } = useContext(MainContext);\n const [{ itemEntity = parent.itemEntity } = {}] = parentData || [];\n const { data, error, loading } = useQuery(getSingleEntitySchema, {\n variables: { id: itemEntity }\n });\n\n if (loading || error || !data) return null;\n\n return gtmEvents.map(({ propsToDisplay, ...eventProps }, i) => {\n const hasNoPropsToDisplay = !propsToDisplay || !propsToDisplay.length;\n const propsToDisplayArr = buildPropsToDisplayArray(propsToDisplay);\n const extraProps = hasNoPropsToDisplay ? '' : buildPropsQuery(data, propsToDisplayArr);\n const shouldUseParentData = !clickId && parentData && parentData.length;\n const itemIdToUse = clickId || parent.itemId;\n const itemId = shouldUseParentData ? getIdsToUse(parentData) : itemIdToUse;\n const shouldUseMultiQuery = Array.isArray(itemId);\n const { action, actionKey } = getRenderProps(extraProps, isPreview, data, shouldUseMultiQuery);\n const dynamicKey = `${GTM_EVENT_FACTORY}${i}`;\n const queryVariables = shouldUseMultiQuery\n ? {\n variables: { where: { id: { _in: itemId } } },\n skip: hasNoPropsToDisplay\n }\n : {\n variables: { id: itemId },\n skip: hasNoPropsToDisplay\n };\n\n return (\n <GTMEventRender\n key={dynamicKey}\n action={action}\n actionKey={actionKey}\n propsToDisplay={propsToDisplay}\n id={itemId}\n queryVariables={queryVariables}\n parentComponent={parentComponent}\n {...eventProps}\n />\n );\n });\n};\n\nGTMEventFactory.propTypes = {\n parent: PropTypes.object.isRequired,\n clickId: PropTypes.string,\n gtmEvents: PropTypes.array,\n parentData: PropTypes.oneOfType([PropTypes.object, PropTypes.array]),\n parentComponent: PropTypes.object\n};\n\nGTMEventFactory.defaultProps = {\n clickId: null,\n gtmEvents: [],\n parentData: null,\n parentComponent: {}\n};\n\nexport default GTMEventFactory;\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,iBAAA,GAAAL,OAAA;AACA,IAAAM,eAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;AAAiD,MAA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AS,EAAE;QAAE0B,KAAK,EAAE;UAAEzB,EAAE,EAAE;YAAE0B,GAAG,EAAEZ;UAAO;QAAE;MAAE,CAAC;MAC7Ca,IAAI,EAAErB;IACR,CAAC,GACD;MACEP,SAAS,EAAE;QAAEC,EAAE,EAAEc;MAAO,CAAC;MACzBa,IAAI,EAAErB;IACR,CAAC;IAEL,oBACErD,MAAA,CAAAsB,OAAA,CAAAqD,aAAA,CAACnE,eAAA,CAAAc,OAAc,MAAAsD,SAAA,CAAAtD,OAAA;MACbuD,GAAG,EAAER,UAAW;MAChBH,MAAM,EAAEA,MAAO;MACfC,SAAS,EAAEA,SAAU;MACrBjB,cAAc,EAAEA,cAAe;MAC/BH,EAAE,EAAEc,MAAO;MACXU,cAAc,EAAEA,cAAe;MAC/BnC,eAAe,EAAEA;IAAgB,GAC7Be,UAAU,CACf,CAAC;EAEN,CAAC,CAAC;AACJ,CAAC;AAEDpB,eAAe,CAAC+C,SAAS,GAAG;EAC1B9C,MAAM,EAAE+C,kBAAS,CAACC,MAAM,CAACC,UAAU;EACnC9C,OAAO,EAAE4C,kBAAS,CAACG,MAAM;EACzBjD,SAAS,EAAE8C,kBAAS,CAACI,KAAK;EAC1BjD,UAAU,EAAE6C,kBAAS,CAACK,SAAS,CAAC,CAACL,kBAAS,CAACC,MAAM,EAAED,kBAAS,CAACI,KAAK,CAAC,CAAC;EACpE/C,eAAe,EAAE2C,kBAAS,CAACC;AAC7B,CAAC;AAEDjD,eAAe,CAACsD,YAAY,GAAG;EAC7BlD,OAAO,EAAE,IAAI;EACbF,SAAS,EAAE,EAAE;EACbC,UAAU,EAAE,IAAI;EAChBE,eAAe,EAAE,CAAC;AACpB,CAAC;AAAC,IAAAkD,QAAA,GAAAC,OAAA,CAAAjE,OAAA,GAEaS,eAAe","ignoreList":[]}
|
|
@@ -15,8 +15,7 @@ var _router = require("next/router");
|
|
|
15
15
|
var _GTMEvent = _interopRequireDefault(require("./GTMEvent"));
|
|
16
16
|
var _helpers = require("../helpers");
|
|
17
17
|
const _excluded = ["router", "action", "actionKey", "queryVariables", "parentComponent", "userPropsToDisplay", "handleOnSuccess"];
|
|
18
|
-
function
|
|
19
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
18
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
20
19
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
21
20
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
22
21
|
const GTMEventRender = _ref => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GTMEventRender.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_client","_reactPageBuilder","_router","_GTMEvent","_helpers","_excluded","
|
|
1
|
+
{"version":3,"file":"GTMEventRender.js","names":["_react","_interopRequireWildcard","require","_propTypes","_interopRequireDefault","_client","_reactPageBuilder","_router","_GTMEvent","_helpers","_excluded","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","ownKeys","keys","getOwnPropertySymbols","filter","enumerable","push","apply","_objectSpread","arguments","length","forEach","_defineProperty2","getOwnPropertyDescriptors","defineProperties","GTMEventRender","_ref","router","action","actionKey","queryVariables","parentComponent","userPropsToDisplay","handleOnSuccess","eventProps","_objectWithoutProperties2","asPath","currentLocation","setCurrentLocation","useState","data","error","loading","useQuery","hasUserProps","userProps","buildUserQueryProps","userData","userLoading","getCurrentUser","variables","skip","gtmData","entityData","eventTrigger","propsToDisplay","eventEcommerce","dataLayerProps","buildDataLayer","dataLayerObject","buildNestedEvent","userLayerObject","buildUserLayer","extendedDataLayer","createElement","propTypes","PropTypes","array","object","isRequired","string","func","defaultProps","_default","exports","withRouter"],"sources":["../../src/GoogleTagManagerEvent/GTMEventRender.js"],"sourcesContent":["import React, { useState } from 'react';\nimport PropTypes from 'prop-types';\nimport { useQuery } from '@apollo/client';\nimport { getCurrentUser } from '@blaze-cms/react-page-builder';\nimport { withRouter } from 'next/router';\nimport GTMEvent from './GTMEvent';\nimport { buildDataLayer, buildNestedEvent, buildUserQueryProps, buildUserLayer } from '../helpers';\n\nconst GTMEventRender = ({\n router,\n action,\n actionKey,\n queryVariables,\n parentComponent,\n userPropsToDisplay,\n handleOnSuccess,\n ...eventProps\n}) => {\n const { asPath } = router;\n const [currentLocation, setCurrentLocation] = useState('');\n const { data = {}, error, loading } = useQuery(action, queryVariables);\n const hasUserProps = userPropsToDisplay && userPropsToDisplay.length;\n const userProps = hasUserProps ? buildUserQueryProps(userPropsToDisplay) : '';\n const { data: userData, loading: userLoading } = useQuery(getCurrentUser(userProps), {\n variables: {},\n skip: !hasUserProps\n });\n\n if (loading || userLoading || error) return null;\n const gtmData = data.entityData || data[actionKey];\n\n if (currentLocation !== asPath) {\n setCurrentLocation(asPath);\n return null;\n }\n\n const { eventTrigger, propsToDisplay, eventEcommerce } = eventProps;\n const dataLayerProps = buildDataLayer(gtmData, propsToDisplay);\n\n const dataLayerObject = buildNestedEvent(\n eventEcommerce,\n eventProps,\n dataLayerProps,\n parentComponent\n );\n const userLayerObject = buildUserLayer(userData, userPropsToDisplay);\n const extendedDataLayer = { ...dataLayerObject, ...userLayerObject };\n\n return (\n <GTMEvent\n dataLayerObject={extendedDataLayer}\n eventTrigger={eventTrigger}\n currentLocation={currentLocation}\n handleOnSuccess={handleOnSuccess}\n />\n );\n};\n\nGTMEventRender.propTypes = {\n userPropsToDisplay: PropTypes.array,\n router: PropTypes.object.isRequired,\n action: PropTypes.object.isRequired,\n actionKey: PropTypes.string.isRequired,\n queryVariables: PropTypes.object.isRequired,\n parentComponent: PropTypes.object.isRequired,\n handleOnSuccess: PropTypes.func\n};\n\nGTMEventRender.defaultProps = {\n userPropsToDisplay: [],\n handleOnSuccess: () => {}\n};\n\nGTMEventRender.defaultProps = {\n userPropsToDisplay: []\n};\n\nexport default withRouter(GTMEventRender);\n"],"mappings":";;;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,UAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AACA,IAAAM,SAAA,GAAAJ,sBAAA,CAAAF,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAAmG,MAAAQ,SAAA;AAAA,SAAAT,wBA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;AAEDR,cAAc,CAACwC,SAAS,GAAG;EACzBjC,kBAAkB,EAAEkC,kBAAS,CAACC,KAAK;EACnCxC,MAAM,EAAEuC,kBAAS,CAACE,MAAM,CAACC,UAAU;EACnCzC,MAAM,EAAEsC,kBAAS,CAACE,MAAM,CAACC,UAAU;EACnCxC,SAAS,EAAEqC,kBAAS,CAACI,MAAM,CAACD,UAAU;EACtCvC,cAAc,EAAEoC,kBAAS,CAACE,MAAM,CAACC,UAAU;EAC3CtC,eAAe,EAAEmC,kBAAS,CAACE,MAAM,CAACC,UAAU;EAC5CpC,eAAe,EAAEiC,kBAAS,CAACK;AAC7B,CAAC;AAED9C,cAAc,CAAC+C,YAAY,GAAG;EAC5BxC,kBAAkB,EAAE,EAAE;EACtBC,eAAe,EAAEA,CAAA,KAAM,CAAC;AAC1B,CAAC;AAEDR,cAAc,CAAC+C,YAAY,GAAG;EAC5BxC,kBAAkB,EAAE;AACtB,CAAC;AAAC,IAAAyC,QAAA,GAAAC,OAAA,CAAAxE,OAAA,GAEa,IAAAyE,kBAAU,EAAClD,cAAc,CAAC","ignoreList":[]}
|
package/lib/index.js
CHANGED
|
@@ -8,8 +8,7 @@ exports.default = load;
|
|
|
8
8
|
var _dynamic = _interopRequireDefault(require("next/dynamic"));
|
|
9
9
|
var _package = _interopRequireDefault(require("../package.json"));
|
|
10
10
|
var _constants = require("./constants");
|
|
11
|
-
function
|
|
12
|
-
function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
|
|
11
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
13
12
|
async function load(app) {
|
|
14
13
|
app.events.once('load:custom:page-builder:component', addComponent => {
|
|
15
14
|
addComponent({
|
package/lib/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","names":["_dynamic","_interopRequireDefault","require","_package","_constants","
|
|
1
|
+
{"version":3,"file":"index.js","names":["_dynamic","_interopRequireDefault","require","_package","_constants","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","load","app","events","once","addComponent","key","component","dynamic","Promise","resolve","then","name","PLUGIN_NAME","version","pkg","pluginName"],"sources":["../src/index.js"],"sourcesContent":["import dynamic from 'next/dynamic';\n\nimport pkg from '../package.json';\nimport { PLUGIN_NAME } from './constants';\n\nexport default async function load(app) {\n app.events.once('load:custom:page-builder:component', addComponent => {\n addComponent({\n key: 'gtm',\n component: dynamic(\n () => import(/* webpackChunkName: \"blazePbGoogleTagManager\" */ './GoogleTagManager')\n )\n });\n addComponent({\n key: 'gtm-events',\n component: dynamic(\n () =>\n import(/* webpackChunkName: \"blazePbGoogleTagManagerEvent\" */ './GoogleTagManagerEvent')\n )\n });\n });\n\n return {\n name: PLUGIN_NAME,\n version: pkg.version\n };\n}\n\nload.pluginName = PLUGIN_NAME;\n"],"mappings":";;;;;;;AAAA,IAAAA,QAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAA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OAAA,GAAAC,IAAA,OAAA9B,uBAAA,CAAAH,OAAA,CAA+D,oBAAoB,GACrF;IACF,CAAC,CAAC;IACF2B,YAAY,CAAC;MACXC,GAAG,EAAE,YAAY;MACjBC,SAAS,EAAE,IAAAC,gBAAO,EAChB,MAAAC,OAAA,CAAAC,OAAA,GAAAC,IAAA,OAAA9B,uBAAA,CAAAH,OAAA,CACgE,yBAAyB,GAC3F;IACF,CAAC,CAAC;EACJ,CAAC,CAAC;EAEF,OAAO;IACLkC,IAAI,EAAEC,sBAAW;IACjBC,OAAO,EAAEC,gBAAG,CAACD;EACf,CAAC;AACH;AAEAb,IAAI,CAACe,UAAU,GAAGH,sBAAW","ignoreList":[]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@blaze-cms/plugin-gtm-fe",
|
|
3
|
-
"version": "0.146.0-rc-eagle-3.
|
|
3
|
+
"version": "0.146.0-rc-eagle-3.2",
|
|
4
4
|
"description": "Blaze GTM plugin fe",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-es/index.js",
|
|
@@ -32,14 +32,14 @@
|
|
|
32
32
|
},
|
|
33
33
|
"license": "GPL-3.0",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@blaze-cms/core-auth-ui": "0.146.0-rc-eagle-3.
|
|
35
|
+
"@blaze-cms/core-auth-ui": "0.146.0-rc-eagle-3.2",
|
|
36
36
|
"@blaze-cms/nextjs-components": "0.146.0-rc-eagle-3.0",
|
|
37
|
-
"@blaze-cms/react-page-builder": "0.146.0-rc-eagle-3.
|
|
37
|
+
"@blaze-cms/react-page-builder": "0.146.0-rc-eagle-3.2",
|
|
38
38
|
"@blaze-cms/setup-ui": "0.146.0-rc-eagle-3.0",
|
|
39
39
|
"web-vitals": "^0.2.2"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|
|
42
|
-
"@blaze-cms/core-ui": "0.146.0-rc-eagle-3.
|
|
42
|
+
"@blaze-cms/core-ui": "0.146.0-rc-eagle-3.2"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
45
|
"next": ">= 14"
|
|
@@ -48,5 +48,5 @@
|
|
|
48
48
|
"lib/*",
|
|
49
49
|
"lib-es/*"
|
|
50
50
|
],
|
|
51
|
-
"gitHead": "
|
|
51
|
+
"gitHead": "3219f29b6e4e8c40f34fe79804b2cd315c84467a"
|
|
52
52
|
}
|