rplus-mini-package 1.0.1 → 1.0.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/dist/index.d.ts CHANGED
@@ -1,22 +1,22 @@
1
1
  import { JSX } from 'react/jsx-runtime';
2
2
 
3
- export declare const GA360NoScript: ({ gtmInitId, gtmAuth, gtm }: GA360NoScriptProps) => JSX.Element;
3
+ export declare const GTMTrackerNoScript: ({ gtmInitId, gtmAuth, gtm }: GTMTrackerNoScriptProps) => JSX.Element;
4
4
 
5
5
  /**
6
6
  * NoScript for GA-360 to be placed in <body>
7
7
  */
8
- declare type GA360NoScriptProps = {
8
+ declare type GTMTrackerNoScriptProps = {
9
9
  gtmInitId: string;
10
10
  gtmAuth: string;
11
11
  gtm: string;
12
12
  };
13
13
 
14
- export declare const GA360Script: ({ pillar, gtmAuth, gtm, gtmId, }: GA360ScriptProps) => JSX.Element;
14
+ export declare const GTMTrackerScript: ({ pillar, gtmAuth, gtm, gtmId, }: GTMTrackerScriptProps) => JSX.Element;
15
15
 
16
16
  /**
17
17
  * Script for GA-360 to be placed in <Head>
18
18
  */
19
- declare type GA360ScriptProps = {
19
+ declare type GTMTrackerScriptProps = {
20
20
  pillar: string;
21
21
  gtmAuth: string;
22
22
  gtm: string;
@@ -1,10 +1,10 @@
1
- import { jsx as i } from "react/jsx-runtime";
1
+ import { jsx as r } from "react/jsx-runtime";
2
2
  const s = ({
3
3
  pillar: t,
4
4
  gtmAuth: e,
5
5
  gtm: a,
6
- gtmId: r
7
- }) => /* @__PURE__ */ i(
6
+ gtmId: i
7
+ }) => /* @__PURE__ */ r(
8
8
  "script",
9
9
  {
10
10
  dangerouslySetInnerHTML: {
@@ -17,11 +17,11 @@ const s = ({
17
17
  new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
18
18
  j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
19
19
  'https://www.googletagmanager.com/gtm.js?id='+i+dl+ '&gtm_auth=${e}&gtm_preview=${a}&gtm_cookies_win=x';f.parentNode.insertBefore(j,f);
20
- })(window,document,'script','dataLayer','${r}');
20
+ })(window,document,'script','dataLayer','${i}');
21
21
  `
22
22
  }
23
23
  }
24
- ), o = ({ gtmInitId: t, gtmAuth: e, gtm: a }) => /* @__PURE__ */ i("noscript", { children: /* @__PURE__ */ i(
24
+ ), o = ({ gtmInitId: t, gtmAuth: e, gtm: a }) => /* @__PURE__ */ r("noscript", { children: /* @__PURE__ */ r(
25
25
  "iframe",
26
26
  {
27
27
  src: `https://www.googletagmanager.com/ns.html?id=${t}&gtm_auth=${e}&gtm_preview=${a}&gtm_cookies_win=x`,
@@ -31,6 +31,6 @@ const s = ({
31
31
  }
32
32
  ) }, "gtm-noscript");
33
33
  export {
34
- o as GA360NoScript,
35
- s as GA360Script
34
+ o as GTMTrackerNoScript,
35
+ s as GTMTrackerScript
36
36
  };
@@ -1,4 +1,4 @@
1
- (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react/jsx-runtime")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.RplusMiniPackage={},e.jsxRuntime))})(this,(function(e,t){"use strict";const s=({pillar:i,gtmAuth:n,gtm:r,gtmId:o})=>t.jsx("script",{dangerouslySetInnerHTML:{__html:`
1
+ (function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("react/jsx-runtime")):typeof define=="function"&&define.amd?define(["exports","react/jsx-runtime"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.RplusMiniPackage={},e.jsxRuntime))})(this,(function(e,t){"use strict";const a=({pillar:i,gtmAuth:r,gtm:n,gtmId:o})=>t.jsx("script",{dangerouslySetInnerHTML:{__html:`
2
2
  window.dataLayer = window.dataLayer || [];
3
3
  window.dataLayer.push({
4
4
  'pillar' : "${i}"
@@ -6,6 +6,6 @@
6
6
  (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
7
7
  new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
8
8
  j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
9
- 'https://www.googletagmanager.com/gtm.js?id='+i+dl+ '&gtm_auth=${n}&gtm_preview=${r}&gtm_cookies_win=x';f.parentNode.insertBefore(j,f);
9
+ 'https://www.googletagmanager.com/gtm.js?id='+i+dl+ '&gtm_auth=${r}&gtm_preview=${n}&gtm_cookies_win=x';f.parentNode.insertBefore(j,f);
10
10
  })(window,document,'script','dataLayer','${o}');
11
- `}}),a=({gtmInitId:i,gtmAuth:n,gtm:r})=>t.jsx("noscript",{children:t.jsx("iframe",{src:`https://www.googletagmanager.com/ns.html?id=${i}&gtm_auth=${n}&gtm_preview=${r}&gtm_cookies_win=x`,height:"0",width:"0",style:{display:"none",visibility:"hidden"}})},"gtm-noscript");e.GA360NoScript=a,e.GA360Script=s,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
11
+ `}}),s=({gtmInitId:i,gtmAuth:r,gtm:n})=>t.jsx("noscript",{children:t.jsx("iframe",{src:`https://www.googletagmanager.com/ns.html?id=${i}&gtm_auth=${r}&gtm_preview=${n}&gtm_cookies_win=x`,height:"0",width:"0",style:{display:"none",visibility:"hidden"}})},"gtm-noscript");e.GTMTrackerNoScript=s,e.GTMTrackerScript=a,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rplus-mini-package",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "description": "Library komponen React untuk integrasi mini component",
5
5
  "type": "module",
6
6
  "main": "./dist/rplus-mini-package.umd.cjs",