Plugin Directory

Changeset 3292879


Ignore:
Timestamp:
05/13/2025 11:44:29 PM (11 months ago)
Author:
arraycodes
Message:

Version 4.8.0

Location:
datalayer-for-ecommerce-free/trunk
Files:
1 deleted
7 edited

Legend:

Unmodified
Added
Removed
  • datalayer-for-ecommerce-free/trunk/assets/build/index-rtl.css

    r3235108 r3292879  
    1 :root body.woocommerce-admin-page__datalayer-for-ecommerce-free{--wp-admin-theme-color:#008bff;--wp-admin-theme-color-darker-10:#008bff;--wp-admin-theme-color-darker-20:#008bff}body.woocommerce-admin-page__datalayer-for-ecommerce-free{background:#f7f7f7}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free{-webkit-align-content:stretch;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;-ms-flex-line-pack:stretch;align-items:flex-start}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap{background:#fff;border-bottom-left-radius:30px;border-top-left-radius:30px;box-shadow:-10px 17px 21px 0 rgba(0,0,0,.1);min-height:764px;padding:50px 50px 0;width:82%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .my-gutenberg-form{padding-bottom:100px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-section-header{padding-right:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-section-header .woocommerce-section-header__title{font-size:22px;line-height:4.2}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control{margin-bottom:30px!important;white-space:pre-wrap}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated{position:relative}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated .field-enhanced-ecommerce-deprecated{background:red;border-radius:5px;font-size:11px;padding:5px;position:absolute;left:63%;top:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated .field-enhanced-ecommerce-deprecated a,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated .field-enhanced-ecommerce-deprecated a:visited{color:#fff;font-weight:700;text-decoration:none}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control .components-base-control__field .components-base-control__label,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control .components-base-control__field label{font-size:14px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control p.components-base-control__help{color:#74797e}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons .components-button{border-radius:6px;font-size:15px;padding:0 20px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons .components-button:hover{opacity:.8}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary{border:1px solid #008bff;border-radius:6px;box-shadow:none;font-size:15px;padding:0 20px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary:active,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary:focus{border:1px solid #008bff;box-shadow:none;color:#008bff}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary:hover{opacity:.8}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .css-off1bd{flex-direction:column}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function{margin-top:30px;position:relative}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function .components-base-control,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function .form-fields-button,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function table.wp-list-table{opacity:.5}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function span .link-premium-function{background:#fec228;border-radius:6px;color:#fff;display:inline-block;font-size:20px;font-weight:700;margin-bottom:25px;padding:20px;text-align:center}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function span .link-premium-function .components-external-link__contents{text-decoration:none}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function span .link-premium-function svg{display:none}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap{background:#fbfbfb;border-bottom-right-radius:30px;border-left:1px solid #eaebee;border-top-right-radius:30px;box-shadow:0 17px 21px 0 rgba(0,0,0,.1);min-height:720px;padding:28px 20px;width:18%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .logoDatalayer{text-align:center}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .logoDatalayer img{width:120px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel{background:transparent;border:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-button.components-panel__body-toggle{font-size:16px!important;font-weight:700!important;padding:18px 35px 18px 48px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-button.components-panel__body-toggle:focus{box-shadow:inset 0 0 0 2px #e1f1fa}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-button.components-panel__body-toggle svg.components-panel__icon{height:25px;right:0;margin:0;position:absolute;width:25px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__body.is-opened>.components-panel__body-title{margin:-16px -16px 0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr{margin-bottom:2px;margin-top:2px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item.css-mzv38o.is-active{background:#e1f1fa;color:#74797e;font-weight:700}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item.css-mzv38o.is-active .components-button span{font-weight:500}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item.css-mzv38o:hover{background:#e1f1fa}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item .components-button{color:#74797e;opacity:1}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item .components-button:focus:not(:disabled){box-shadow:0 0 0 2px #e1f1fa}
     1:root body.woocommerce-admin-page__datalayer-for-ecommerce-free{--wp-admin-theme-color:#008bff;--wp-admin-theme-color-darker-10:#008bff;--wp-admin-theme-color-darker-20:#008bff}body.woocommerce-admin-page__datalayer-for-ecommerce-free{background:#f7f7f7}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free{-webkit-align-content:stretch;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;-ms-flex-line-pack:stretch;align-items:stretch}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap{background:#fff;border-bottom-left-radius:30px;border-top-left-radius:30px;box-shadow:-10px 17px 21px 0 rgba(0,0,0,.1);padding:50px 50px 0;width:82%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .my-gutenberg-form{padding-bottom:100px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-section-header{padding-right:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-section-header .woocommerce-section-header__title{font-size:22px;line-height:4.2}@media(max-width:1440px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-section-header .woocommerce-section-header__title{line-height:1.5}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .wp-list-table td{width:auto!important}}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control{margin-bottom:30px!important;white-space:pre-wrap}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.components-base-control-bottom-minus{margin-bottom:40px!important;margin-top:-20px!important}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.components-base-control-bottom-minus-negative{margin-bottom:-5px!important}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.components-base-control-bottom-minus-active{margin-top:-20px!important}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated{position:relative}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated .field-enhanced-ecommerce-deprecated{background:red;border-radius:5px;font-size:11px;padding:5px;position:absolute;left:63%;top:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated .field-enhanced-ecommerce-deprecated a,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated .field-enhanced-ecommerce-deprecated a:visited{color:#fff;font-weight:700;text-decoration:none}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control .components-base-control__field .components-base-control-bottom-minus-active{margin-top:-20px!important}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control .components-base-control__field .components-base-control__label,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control .components-base-control__field label{font-size:14px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control p.components-base-control__help{color:#74797e}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-color-picker .components-flex{display:none}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons .components-button{border-radius:6px;font-size:15px;padding:0 20px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons .components-button:hover{opacity:.8}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons .components-button.is-secondary{margin-left:15px}@media(max-width:1280px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons{display:inline-block;font-size:15px;height:auto;padding:10px;text-wrap:wrap;width:100%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons.is-secondary:first-child{margin-bottom:15px;margin-left:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons.is-secondary:nth-child(2){margin-left:0}}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-fields-button{margin-top:30px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-select-control{margin-bottom:55px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-select-control .components-base-control__help{right:0;position:absolute;top:50px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-select-control .woocommerce-select-control__clear{top:calc(25% - 10px)!important}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-select-control .woocommerce-select-control__tags{margin:45px 0 0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control__label.label_external{font-size:14px!important}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary{border:1px solid #008bff;border-radius:6px;box-shadow:none;font-size:15px;padding:0 20px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary:active,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary:focus{border:1px solid #008bff;box-shadow:none;color:#008bff}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary:hover{opacity:.8}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .css-off1bd{flex-direction:column}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-subtitle{font-size:16px;font-weight:500;margin-bottom:20px;text-transform:uppercase}@media(max-width:1280px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex{flex-wrap:wrap;gap:30px}}@media(max-width:768px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex .components-flex-item{width:100%}}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function{margin-top:30px;position:relative}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function .components-base-control,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function .form-fields-button,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function table.wp-list-table{opacity:.5}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function span .link-premium-function{background:#fec228;border-radius:6px;color:#fff;display:inline-block;font-size:20px;font-weight:700;margin-bottom:25px;padding:20px;text-align:center}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function span .link-premium-function .components-external-link__contents{text-decoration:none}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function span .link-premium-function svg{display:none}@media(max-width:1440px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap{width:77%}}@media(max-width:1280px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap{width:70%}}@media(max-width:768px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap{border-bottom-right-radius:30px;border-bottom-left-radius:30px;border-top-left-radius:0;min-height:auto;width:100%}}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap{background:#fbfbfb;border-bottom-right-radius:30px;border-left:1px solid #eaebee;border-top-right-radius:30px;box-shadow:0 17px 21px 0 rgba(0,0,0,.1);min-height:720px;padding:28px 20px;width:18%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .logoDatalayer{text-align:center}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .logoDatalayer img{width:120px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel{background:transparent;border:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-button.components-panel__body-toggle{font-size:16px!important;font-weight:700!important;padding:18px 35px 18px 48px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-button.components-panel__body-toggle:focus{box-shadow:inset 0 0 0 2px #e1f1fa}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-button.components-panel__body-toggle svg.components-panel__icon{height:25px;right:0;margin:0;position:absolute;width:25px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__body.is-opened>.components-panel__body-title{margin:-16px -16px 0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation{box-sizing:border-box;margin:2px 0;overflow:hidden;padding:0 16px;width:100%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button{align-items:center;color:#74797e;display:flex;font-weight:400;height:auto;line-height:20px;margin:0 0 2px;min-height:40px;opacity:1;padding:8px 16px;text-align:right;transition:box-shadow .1s linear;width:100%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button:last-child{margin-bottom:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button span.navigation-item-label{color:inherit;cursor:pointer;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;margin:0 0 0 auto;text-align:right;text-wrap:pretty}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button.is-active,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button:focus,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button:hover{background:#e1f1fa;border-radius:2px;box-shadow:none;outline:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button.is-active span.navigation-item-label,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button:focus span.navigation-item-label,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button:hover span.navigation-item-label{color:#74797e}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button.is-active span.navigation-item-label,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button:focus span.navigation-item-label{font-weight:500}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button:hover:not(.is-active) span.navigation-item-label{font-weight:400}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr{margin-bottom:2px;margin-top:2px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item.css-mzv38o.is-active{background:#e1f1fa;color:#74797e;font-weight:700}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item.css-mzv38o.is-active .components-button span{font-weight:500}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item.css-mzv38o:hover{background:#e1f1fa}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item .components-button{color:#74797e;opacity:1}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item .components-button:focus:not(:disabled){box-shadow:0 0 0 2px #e1f1fa}@media(max-width:1440px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap{width:23%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel__row .custom-navigation{padding:0!important}}@media(max-width:1280px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap{width:30%}}@media(max-width:768px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap{border-bottom-right-radius:0;border-left:0;border-top-right-radius:30px;border-top-left-radius:30px;width:100%}}
  • datalayer-for-ecommerce-free/trunk/assets/build/index.asset.php

    r3235108 r3292879  
    1 <?php return array('dependencies' => array('react', 'wc-components', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices', 'wp-primitives'), 'version' => '1231c4f5930d9f309d2c');
    2 
     1<?php return array('dependencies' => array('react', 'wc-components', 'wp-api-fetch', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-notices', 'wp-primitives'), 'version' => '9c1ec5c7daba0a008bb6');
  • datalayer-for-ecommerce-free/trunk/assets/build/index.css

    r3235108 r3292879  
    1 :root body.woocommerce-admin-page__datalayer-for-ecommerce-free{--wp-admin-theme-color:#008bff;--wp-admin-theme-color-darker-10:#008bff;--wp-admin-theme-color-darker-20:#008bff}body.woocommerce-admin-page__datalayer-for-ecommerce-free{background:#f7f7f7}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free{-webkit-align-content:stretch;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;-ms-flex-line-pack:stretch;align-items:flex-start}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap{background:#fff;border-bottom-right-radius:30px;border-top-right-radius:30px;box-shadow:10px 17px 21px 0 rgba(0,0,0,.1);min-height:764px;padding:50px 50px 0;width:82%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .my-gutenberg-form{padding-bottom:100px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-section-header{padding-left:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-section-header .woocommerce-section-header__title{font-size:22px;line-height:4.2}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control{margin-bottom:30px!important;white-space:pre-wrap}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated{position:relative}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated .field-enhanced-ecommerce-deprecated{background:red;border-radius:5px;font-size:11px;padding:5px;position:absolute;right:63%;top:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated .field-enhanced-ecommerce-deprecated a,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated .field-enhanced-ecommerce-deprecated a:visited{color:#fff;font-weight:700;text-decoration:none}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control .components-base-control__field .components-base-control__label,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control .components-base-control__field label{font-size:14px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control p.components-base-control__help{color:#74797e}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons .components-button{border-radius:6px;font-size:15px;padding:0 20px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons .components-button:hover{opacity:.8}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary{border:1px solid #008bff;border-radius:6px;box-shadow:none;font-size:15px;padding:0 20px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary:active,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary:focus{border:1px solid #008bff;box-shadow:none;color:#008bff}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary:hover{opacity:.8}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .css-off1bd{flex-direction:column}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function{margin-top:30px;position:relative}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function .components-base-control,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function .form-fields-button,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function table.wp-list-table{opacity:.5}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function span .link-premium-function{background:#fec228;border-radius:6px;color:#fff;display:inline-block;font-size:20px;font-weight:700;margin-bottom:25px;padding:20px;text-align:center}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function span .link-premium-function .components-external-link__contents{text-decoration:none}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function span .link-premium-function svg{display:none}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap{background:#fbfbfb;border-bottom-left-radius:30px;border-right:1px solid #eaebee;border-top-left-radius:30px;box-shadow:0 17px 21px 0 rgba(0,0,0,.1);min-height:720px;padding:28px 20px;width:18%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .logoDatalayer{text-align:center}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .logoDatalayer img{width:120px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel{background:transparent;border:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-button.components-panel__body-toggle{font-size:16px!important;font-weight:700!important;padding:18px 48px 18px 35px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-button.components-panel__body-toggle:focus{box-shadow:inset 0 0 0 2px #e1f1fa}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-button.components-panel__body-toggle svg.components-panel__icon{height:25px;left:0;margin:0;position:absolute;width:25px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__body.is-opened>.components-panel__body-title{margin:-16px -16px 0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr{margin-bottom:2px;margin-top:2px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item.css-mzv38o.is-active{background:#e1f1fa;color:#74797e;font-weight:700}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item.css-mzv38o.is-active .components-button span{font-weight:500}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item.css-mzv38o:hover{background:#e1f1fa}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item .components-button{color:#74797e;opacity:1}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item .components-button:focus:not(:disabled){box-shadow:0 0 0 2px #e1f1fa}
     1:root body.woocommerce-admin-page__datalayer-for-ecommerce-free{--wp-admin-theme-color:#008bff;--wp-admin-theme-color-darker-10:#008bff;--wp-admin-theme-color-darker-20:#008bff}body.woocommerce-admin-page__datalayer-for-ecommerce-free{background:#f7f7f7}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free{-webkit-align-content:stretch;display:flex;flex-direction:row;flex-wrap:wrap;justify-content:flex-start;-ms-flex-line-pack:stretch;align-items:stretch}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap{background:#fff;border-bottom-right-radius:30px;border-top-right-radius:30px;box-shadow:10px 17px 21px 0 rgba(0,0,0,.1);padding:50px 50px 0;width:82%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .my-gutenberg-form{padding-bottom:100px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-section-header{padding-left:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-section-header .woocommerce-section-header__title{font-size:22px;line-height:4.2}@media(max-width:1440px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-section-header .woocommerce-section-header__title{line-height:1.5}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .wp-list-table td{width:auto!important}}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control{margin-bottom:30px!important;white-space:pre-wrap}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.components-base-control-bottom-minus{margin-bottom:40px!important;margin-top:-20px!important}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.components-base-control-bottom-minus-negative{margin-bottom:-5px!important}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.components-base-control-bottom-minus-active{margin-top:-20px!important}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated{position:relative}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated .field-enhanced-ecommerce-deprecated{background:red;border-radius:5px;font-size:11px;padding:5px;position:absolute;right:63%;top:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated .field-enhanced-ecommerce-deprecated a,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control.enhanced-ecommerce-deprecated .field-enhanced-ecommerce-deprecated a:visited{color:#fff;font-weight:700;text-decoration:none}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control .components-base-control__field .components-base-control-bottom-minus-active{margin-top:-20px!important}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control .components-base-control__field .components-base-control__label,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control .components-base-control__field label{font-size:14px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control p.components-base-control__help{color:#74797e}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-color-picker .components-flex{display:none}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons .components-button{border-radius:6px;font-size:15px;padding:0 20px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons .components-button:hover{opacity:.8}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons .components-button.is-secondary{margin-right:15px}@media(max-width:1280px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons{display:inline-block;font-size:15px;height:auto;padding:10px;text-wrap:wrap;width:100%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons.is-secondary:first-child{margin-bottom:15px;margin-right:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-buttons.is-secondary:nth-child(2){margin-right:0}}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-fields-button{margin-top:30px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-select-control{margin-bottom:55px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-select-control .components-base-control__help{left:0;position:absolute;top:50px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-select-control .woocommerce-select-control__clear{top:calc(25% - 10px)!important}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .woocommerce-select-control .woocommerce-select-control__tags{margin:45px 0 0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-base-control__label.label_external{font-size:14px!important}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary{border:1px solid #008bff;border-radius:6px;box-shadow:none;font-size:15px;padding:0 20px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary:active,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary:focus{border:1px solid #008bff;box-shadow:none;color:#008bff}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .components-button.is-secondary:hover{opacity:.8}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex.css-1e5wyad .css-off1bd{flex-direction:column}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .form-subtitle{font-size:16px;font-weight:500;margin-bottom:20px;text-transform:uppercase}@media(max-width:1280px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex{flex-wrap:wrap;gap:30px}}@media(max-width:768px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .components-flex .components-flex-item{width:100%}}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function{margin-top:30px;position:relative}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function .components-base-control,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function .form-fields-button,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function table.wp-list-table{opacity:.5}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function span .link-premium-function{background:#fec228;border-radius:6px;color:#fff;display:inline-block;font-size:20px;font-weight:700;margin-bottom:25px;padding:20px;text-align:center}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function span .link-premium-function .components-external-link__contents{text-decoration:none}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap .premium-function span .link-premium-function svg{display:none}@media(max-width:1440px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap{width:77%}}@media(max-width:1280px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap{width:70%}}@media(max-width:768px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-form-datalayer-for-ecommerce-free-wrap{border-bottom-left-radius:30px;border-bottom-right-radius:30px;border-top-right-radius:0;min-height:auto;width:100%}}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap{background:#fbfbfb;border-bottom-left-radius:30px;border-right:1px solid #eaebee;border-top-left-radius:30px;box-shadow:0 17px 21px 0 rgba(0,0,0,.1);min-height:720px;padding:28px 20px;width:18%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .logoDatalayer{text-align:center}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .logoDatalayer img{width:120px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel{background:transparent;border:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-button.components-panel__body-toggle{font-size:16px!important;font-weight:700!important;padding:18px 48px 18px 35px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-button.components-panel__body-toggle:focus{box-shadow:inset 0 0 0 2px #e1f1fa}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-button.components-panel__body-toggle svg.components-panel__icon{height:25px;left:0;margin:0;position:absolute;width:25px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__body.is-opened>.components-panel__body-title{margin:-16px -16px 0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation{box-sizing:border-box;margin:2px 0;overflow:hidden;padding:0 16px;width:100%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button{align-items:center;color:#74797e;display:flex;font-weight:400;height:auto;line-height:20px;margin:0 0 2px;min-height:40px;opacity:1;padding:8px 16px;text-align:left;transition:box-shadow .1s linear;width:100%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button:last-child{margin-bottom:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button span.navigation-item-label{color:inherit;cursor:pointer;font-family:inherit;font-size:14px;font-weight:400;line-height:20px;margin:0 auto 0 0;text-align:left;text-wrap:pretty}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button.is-active,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button:focus,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button:hover{background:#e1f1fa;border-radius:2px;box-shadow:none;outline:0}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button.is-active span.navigation-item-label,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button:focus span.navigation-item-label,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button:hover span.navigation-item-label{color:#74797e}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button.is-active span.navigation-item-label,body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button:focus span.navigation-item-label{font-weight:500}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .custom-navigation button:hover:not(.is-active) span.navigation-item-label{font-weight:400}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr{margin-bottom:2px;margin-top:2px}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item.css-mzv38o.is-active{background:#e1f1fa;color:#74797e;font-weight:700}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item.css-mzv38o.is-active .components-button span{font-weight:500}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item.css-mzv38o:hover{background:#e1f1fa}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item .components-button{color:#74797e;opacity:1}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel .components-panel__row .components-navigation__menu.css-1t5hihr .components-navigation__item .components-button:focus:not(:disabled){box-shadow:0 0 0 2px #e1f1fa}@media(max-width:1440px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap{width:23%}body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap .components-panel__row .custom-navigation{padding:0!important}}@media(max-width:1280px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap{width:30%}}@media(max-width:768px){body.woocommerce-admin-page__datalayer-for-ecommerce-free .wrap.datalayer-for-ecommerce-free .content-sidebar-datalayer-for-ecommerce-free-wrap{border-bottom-left-radius:0;border-right:0;border-top-left-radius:30px;border-top-right-radius:30px;width:100%}}
  • datalayer-for-ecommerce-free/trunk/assets/build/index.js

    r3235108 r3292879  
    1 (()=>{"use strict";var e={20:(e,a,o)=>{var t=o(609),r=Symbol.for("react.element"),_=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,l=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,a,o){var t,_={},c=null,g=null;for(t in void 0!==o&&(c=""+o),void 0!==a.key&&(c=""+a.key),void 0!==a.ref&&(g=a.ref),a)n.call(a,t)&&!s.hasOwnProperty(t)&&(_[t]=a[t]);if(e&&e.defaultProps)for(t in a=e.defaultProps)void 0===_[t]&&(_[t]=a[t]);return{$$typeof:r,type:e,key:c,ref:g,props:_,_owner:l.current}}a.Fragment=_,a.jsx=c,a.jsxs=c},848:(e,a,o)=>{e.exports=o(20)},609:e=>{e.exports=window.React}},a={};function o(t){var r=a[t];if(void 0!==r)return r.exports;var _=a[t]={exports:{}};return e[t](_,_.exports,o),_.exports}o.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return o.d(a,{a}),a},o.d=(e,a)=>{for(var t in a)o.o(a,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var a=o.g.document;if(!e&&a&&(a.currentScript&&"SCRIPT"===a.currentScript.tagName.toUpperCase()&&(e=a.currentScript.src),!e)){var t=a.getElementsByTagName("script");if(t.length)for(var r=t.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=t[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})();const t=window.wp.hooks,r=window.wp.i18n,_=window.wp.element,n=window.wp.data,l=window.wp.components,s=window.wp.notices,c=window.wc.components;var g=o(848);const i=e=>{const{createSuccessNotice:a,createErrorNotice:o}=(0,n.useDispatch)(s.store),t=(0,n.useDispatch)(),[i,d]=(0,_.useState)(!1),{getFields:m,isLoading:p}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[h,y]=(0,_.useState)({tracking_google_tag_manager:"",data_layer_google_tag_manager_custom_domain_server_side:"",data_layer_google_tag_manager_custom_script_filename_server_side:"",data_layer_google_tag_manager_custom_environment_gtm_auth:"",data_layer_google_tag_manager_custom_environment_gtm_preview:""}),u=(0,_.useCallback)(((e,a)=>{y((o=>({...o,[a]:e})))}),[]),f=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));(0,_.useEffect)((()=>{m&&y(m)}),[m]);const x=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Example: GTM-XXXXXX - ","datalayer-for-ecommerce-free"),(0,g.jsx)(l.ExternalLink,{href:"https://support.google.com/tagmanager/answer/6103696",children:"Read more"})]}),v=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Example: https://DOMAIN-NAME.com - Send Google scripts gtm.js directly from your tagging server - ","datalayer-for-ecommerce-free"),(0,g.jsx)(l.ExternalLink,{href:"https://developers.google.com/tag-platform/tag-manager/server-side/send-data?hl=en#update_the_gtmjs_source_domain",children:"Read more"}),"\n",(0,r.__)("Leave empty if you don't use GTM Server Side","datalayer-for-ecommerce-free")]}),b=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Example: filename.js - Enter a custom name for the file gtm.js","datalayer-for-ecommerce-free"),"\n",(0,r.__)("Only use for custom file loader in your GTM Server Side","datalayer-for-ecommerce-free")]}),j=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Insert gtm_auth to use a custom environment - ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://support.google.com/tagmanager/answer/6311518?hl=en",children:"Read more"}),"\n",(0,r.__)("Leave empty if you don't use GTM Custom Environment","datalayer-for-woocommerce")]}),w=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Insert gtm_preview to use a custom environment - ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://support.google.com/tagmanager/answer/6311518?hl=en",children:"Read more"}),"\n",(0,r.__)("Leave empty if you don't use GTM Custom Environment","datalayer-for-woocommerce")]});return(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Google Tag Manager Settings","datalayer-for-ecommerce-free")}),p?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Google Tag Manager ID","datalayer-for-ecommerce-free"),value:h.tracking_google_tag_manager,onChange:e=>u(e,"tracking_google_tag_manager"),help:x}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{d(!0),await t("shop-datalayer-for-ecommerce-free").saveSettings({tracking_google_tag_manager:h.tracking_google_tag_manager,data_layer_google_tag_manager_custom_domain_server_side:h.data_layer_google_tag_manager_custom_domain_server_side,data_layer_google_tag_manager_custom_script_filename_server_side:h.data_layer_google_tag_manager_custom_script_filename_server_side,data_layer_google_tag_manager_custom_environment_gtm_auth:h.data_layer_google_tag_manager_custom_environment_gtm_auth,data_layer_google_tag_manager_custom_environment_gtm_preview:h.data_layer_google_tag_manager_custom_environment_gtm_preview},f),d(!1),a((0,r.__)("Settings saved!","datalayer-for-ecommerce-free"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),o("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:i,children:i?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-ecommerce-free")]}):(0,r.__)("Save","datalayer-for-ecommerce-free")})}),(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Custom domain GTM Server Side","datalayer-for-ecommerce-free"),help:v}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Custom script filename GTM Server Side","datalayer-for-ecommerce-free"),help:b}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Custom Environment gtm_auth","datalayer-for-woocommerce"),help:j}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Custom Environment gtm_preview","datalayer-for-woocommerce"),help:w})]})]}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},d=()=>(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Google Tag Manager Tags Synchronization","datalayer-for-ecommerce-free")}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{variant:"primary",href:"https://demoshop.arrayevida.com.br/wp-content/uploads/2024/07/workspace.zip",children:(0,r.__)("Download Import File GTM","datalayer-for-ecommerce-free")})})]}),m=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,n.useDispatch)(s.store),o=(0,n.useDispatch)(),[t,i]=(0,_.useState)(!1),{getFields:d,isLoading:m}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[p,h]=(0,_.useState)({data_layer_google_tag_manager_consent_mode_default:"",data_layer_google_tag_manager_consent_mode_default_ad_storage:"",data_layer_google_tag_manager_consent_mode_default_ad_user_data:"",data_layer_google_tag_manager_consent_mode_default_ad_personalization:"",data_layer_google_tag_manager_consent_mode_default_analytics_storage:"",data_layer_google_tag_manager_consent_mode_default_functionality_storage:"",data_layer_google_tag_manager_consent_mode_default_personalization_storage:"",data_layer_google_tag_manager_consent_mode_default_security_storage:""}),y=(0,_.useCallback)(((e,a)=>{h((o=>({...o,[a]:e})))}),[]),u=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));(0,_.useEffect)((()=>{d&&h(d)}),[d]);const f=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Enable to trigger for all parameters consent to denied. ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://developers.google.com/tag-platform/security/guides/consent?consentmode=advanced#default-consent",children:"Read more"})]}),x=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger ad_storage consent to granted","datalayer-for-woocommerce")}),v=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger ad_user_data consent to granted","datalayer-for-woocommerce")}),b=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger ad_personalization consent to granted","datalayer-for-woocommerce")}),j=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger analytics_storage consent to granted","datalayer-for-woocommerce")}),w=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger functionality_storage consent to granted","datalayer-for-woocommerce")}),S=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger personalization_storage consent to granted","datalayer-for-woocommerce")}),C=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger security_storage consent to granted","datalayer-for-woocommerce")}),N=p.data_layer_google_tag_manager_consent_mode_default;return(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Google Tag Manager Consent Mode","datalayer-for-woocommerce")}),(0,g.jsxs)("div",{className:"form-legend",children:[(0,g.jsxs)(l.Tip,{children:[(0,r.__)("Use this feature to trigger DEFAULT consent before the GTM declaration.","datalayer-for-woocommerce"),"\n",(0,r.__)("This feature does not replace the use of a consent tool. If the consent tool already triggers a DEFAULT consent, you do not need to use this feature.","datalayer-for-woocommerce")," ",(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/document/datalayer-for-woocommerce/#consent-mode",children:(0,r.__)("Read more","datalayer-for-woocommerce")})]}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{})]}),m?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Google Consent Mode","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default"),help:f}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Ad Storage","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_ad_storage"),help:x,disabled:!N}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Ad User Data","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_ad_user_data"),help:v,disabled:!N}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Ad Personalization","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_ad_personalization"),help:b,disabled:!N}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Analytics Storage","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_analytics_storage"),help:j,disabled:!N}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Functionality Storage","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_functionality_storage"),help:w,disabled:!N}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Personalization Storage","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_personalization_storage"),help:S,disabled:!N}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Security Storage","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_security_storage"),help:C,disabled:!N}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{i(!0),await o("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_consent_mode_default:p.data_layer_google_tag_manager_consent_mode_default,data_layer_google_tag_manager_consent_mode_default_ad_storage:p.data_layer_google_tag_manager_consent_mode_default_ad_storage,data_layer_google_tag_manager_consent_mode_default_ad_user_data:p.data_layer_google_tag_manager_consent_mode_default_ad_user_data,data_layer_google_tag_manager_consent_mode_default_ad_personalization:p.data_layer_google_tag_manager_consent_mode_default_ad_personalization,data_layer_google_tag_manager_consent_mode_default_analytics_storage:p.data_layer_google_tag_manager_consent_mode_default_analytics_storage,data_layer_google_tag_manager_consent_mode_default_functionality_storage:p.data_layer_google_tag_manager_consent_mode_default_functionality_storage,data_layer_google_tag_manager_consent_mode_default_personalization_storage:p.data_layer_google_tag_manager_consent_mode_default_personalization_storage,data_layer_google_tag_manager_consent_mode_default_security_storage:p.data_layer_google_tag_manager_consent_mode_default_security_storage},u),i(!1),e((0,r.__)("Settings saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0,children:t?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-woocommerce")]}):(0,r.__)("Save","datalayer-for-woocommerce")})})]})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},p=window.wp.apiFetch;var h=o.n(p);const y=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,n.useDispatch)(s.store),o=(0,n.useDispatch)(),[t,i]=(0,_.useState)(!1),[d,m]=(0,_.useState)(null),{getFields:p,isLoading:h}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[y,u]=(0,_.useState)({data_layer_google_tag_manager_server_to_server_container_url:"",data_layer_google_tag_manager_server_to_server_measurement_id:"",data_layer_google_tag_manager_server_to_server_preview_request_header:"",data_layer_google_tag_manager_server_to_server_purchase_event:"",data_layer_google_tag_manager_server_to_server_status_purchase_event:"",data_layer_google_tag_manager_server_to_server_order_pay_event:"",data_layer_google_tag_manager_server_to_server_status_order_pay_event:"",data_layer_google_tag_manager_server_to_server_refund_event:""}),f=((0,_.useCallback)(((e,a)=>{u((o=>({...o,[a]:e})))}),[]),(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState())));(0,_.useEffect)((()=>{p&&u(p)}),[p]);const x=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Insert preview request header to test manually send a preview request. ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/document/datalayer-for-woocommerce/#server-to-server-request-header",children:"Read more"})]});return y.data_layer_google_tag_manager_server_to_server_purchase_event,y.data_layer_google_tag_manager_server_to_server_order_pay_event,(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Google Tag Manager Server-to-Server","datalayer-for-woocommerce")}),(0,g.jsxs)("div",{className:"form-legend",children:[(0,g.jsxs)(l.Tip,{children:[(0,r.__)("Use this feature to send events directly to GTM server side.","datalayer-for-woocommerce"),(0,g.jsx)("br",{}),(0,r.__)("Please note: This is an advanced feature. Recommended for experienced users only.","datalayer-for-woocommerce")," ",(0,g.jsx)(l.ExternalLink,{href:"https://developers.google.com/tag-platform/tag-manager/server-side/send-data?hl=en&option=GTM#3_optional_send_data_from_sources_other_than_websites",children:(0,r.__)("Read more","datalayer-for-woocommerce")})]}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{})]}),h?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Google Server Container Url","datalayer-for-woocommerce"),help:(0,r.__)("Insert GTM Server container URL","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Measurement ID GA4","datalayer-for-woocommerce"),help:(0,r.__)("Insert Measurement ID GA4. Example: G-G999999999","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Preview Request Header","datalayer-for-woocommerce"),help:x,disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Save Cookies in Order","datalayer-for-woocommerce"),help:(0,r.__)("Enable to save user cookies in order and link web and server events","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Purchase Event","datalayer-for-woocommerce"),help:(0,r.__)("Enable to trigger purchase event directly via server side and stop via client web","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Purchase Event Status","datalayer-for-woocommerce"),options:d,help:(0,r.__)("Select which order status the purchase event should be triggered on","datalayer-for-woocommerce"),disabled:!0,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Order Pay Event","datalayer-for-woocommerce"),help:(0,r.__)("Enable to trigger order_pay event directly via server side","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Order Pay Status","datalayer-for-woocommerce"),options:d,help:(0,r.__)("Select which order status the order pay event should be triggered on","datalayer-for-woocommerce"),disabled:!0,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Order Refund Event","datalayer-for-woocommerce"),help:(0,r.__)("Enable to trigger refund event directly via server side","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{i(!0),await o("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_server_to_server_container_url:y.data_layer_google_tag_manager_server_to_server_container_url,data_layer_google_tag_manager_server_to_server_measurement_id:y.data_layer_google_tag_manager_server_to_server_measurement_id,data_layer_google_tag_manager_server_to_server_preview_request_header:y.data_layer_google_tag_manager_server_to_server_preview_request_header,data_layer_google_tag_manager_server_to_server_purchase_event:y.data_layer_google_tag_manager_server_to_server_purchase_event,data_layer_google_tag_manager_server_to_server_status_purchase_event:y.data_layer_google_tag_manager_server_to_server_status_purchase_event,data_layer_google_tag_manager_server_to_server_order_pay_event:y.data_layer_google_tag_manager_server_to_server_order_pay_event,data_layer_google_tag_manager_server_to_server_status_order_pay_event:y.data_layer_google_tag_manager_server_to_server_status_order_pay_event,data_layer_google_tag_manager_server_to_server_refund_event:y.data_layer_google_tag_manager_server_to_server_refund_event},f),i(!1),e((0,r.__)("Settings saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0,children:t?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-woocommerce")]}):(0,r.__)("Save","datalayer-for-woocommerce")})})]})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},u=window.wp.coreData,f=e=>{const{createSuccessNotice:a,createErrorNotice:o}=(0,n.useDispatch)(s.store),t=(0,n.useDispatch)(),[i,d]=(0,_.useState)(!1),{getFields:m,isLoading:p,getBrands:h}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings"),getBrands:e(u.store).getTaxonomies({type:"product"})})),[]),[y,f]=(0,_.useState)({data_layer_google_tag_manager_ecommerce_ga4:!1,data_layer_google_tag_manager_related_product_show:!1}),x=h?h.map((e=>({label:e.labels.name,value:e.slug}))):[];x.unshift({label:"Do not use",value:"none"});const v=(0,_.useCallback)(((e,a)=>{f((o=>({...o,[a]:e})))}),[]),b=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));(0,_.useEffect)((()=>{m&&f(m)}),[m]);const j=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Enable to use datalayer only with ","datalayer-for-ecommerce-free"),(0,g.jsx)(l.ExternalLink,{href:"https://developers.google.com/tag-manager/ecommerce-ga4?hl=en",children:"Ecommerce (GA4)"})]}),w=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Select if product items show ID or SKU","datalayer-for-ecommerce-free")}),S=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Select the taxonomy containing Product Brands","datalayer-for-ecommerce-free")}),C=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Select when the event should be triggered","datalayer-for-ecommerce-free")}),N=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Select when the event should be triggered","datalayer-for-ecommerce-free")}),T=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Select when the view_item event should fire if its a product variable","datalayer-for-ecommerce-free")}),E=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to show variable product variants as an individual product","datalayer-for-ecommerce-free")}),k=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to show event view_item_list for related product in page product","datalayer-for-woocommerce")}),F=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Enable to show discount in ecommerce.items when product is on sale - ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://developers.google.com/analytics/devguides/collection/ga4/apply-discount?client_type=gtag",children:"Read more"})]});return(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Ecommerce Settings","datalayer-for-ecommerce-free")}),p?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("DataLayer for WooCommerce Ecommerce GA4","datalayer-for-ecommerce-free"),checked:y.data_layer_google_tag_manager_ecommerce_ga4,onChange:e=>v(e,"data_layer_google_tag_manager_ecommerce_ga4"),help:j}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Show view_item_list related product","datalayer-for-woocommerce"),checked:y.data_layer_google_tag_manager_related_product_show,onChange:e=>v(e,"data_layer_google_tag_manager_related_product_show"),help:k}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{d(!0),await t("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_ecommerce_ga4:y.data_layer_google_tag_manager_ecommerce_ga4,data_layer_google_tag_manager_related_product_show:y.data_layer_google_tag_manager_related_product_show},b),d(!1),a((0,r.__)("Settings saved!","datalayer-for-ecommerce-free"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),o("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:i,children:i?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-ecommerce-free")]}):(0,r.__)("Save","datalayer-for-ecommerce-free")})}),(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Product Items","datalayer-for-ecommerce-free"),value:y.data_layer_google_tag_manager_product_items,options:[{label:"ID",value:"ID"},{label:"SKU",value:"SKU"}],onChange:e=>v(e,"data_layer_google_tag_manager_product_items"),help:w}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Product Brands","datalayer-for-ecommerce-free"),value:y.data_layer_google_tag_manager_product_brands,options:x,onChange:e=>v(e,"data_layer_google_tag_manager_product_brands"),help:S}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Event add_shipping_info","datalayer-for-ecommerce-free"),value:y.data_layer_google_tag_manager_javascript_event_add_shipping_info,options:[{label:"Shipping selected",value:"Shipping selected"},{label:"Place order button",value:"Place order button"}],onChange:e=>v(e,"data_layer_google_tag_manager_javascript_event_add_shipping_info"),help:C}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Event add_payment_info","datalayer-for-ecommerce-free"),value:y.data_layer_google_tag_manager_javascript_event_add_payment_info,options:[{label:"Payment selected",value:"Payment selected"},{label:"Place order button",value:"Place order button"}],onChange:e=>v(e,"data_layer_google_tag_manager_javascript_event_add_payment_info"),help:N}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Variable product event view_item","datalayer-for-ecommerce-free"),value:y.data_layer_google_tag_manager_javascript_event_view_item,options:[{label:"Parent product page view",value:"Parent product page view"},{label:"When selecting a variation",value:"When selecting a variation"},{label:"Parent product page view and When selecting a variation",value:"Parent product page view and When selecting a variation"}],onChange:e=>v(e,"data_layer_google_tag_manager_javascript_event_view_item"),help:T}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Variable product as individual product","datalayer-for-ecommerce-free"),checked:y.data_layer_google_tag_manager_variable_product_as_individual,onChange:e=>v(e,"data_layer_google_tag_manager_variable_product_as_individual"),help:E}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Show discount in ecommerce.items when product is on sale","datalayer-for-woocommerce"),checked:y.data_layer_google_tag_manager_discount_in_items_show,onChange:e=>v(e,"data_layer_google_tag_manager_discount_in_items_show"),help:F})]})]}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},x=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,n.useDispatch)(s.store),o=(0,n.useDispatch)(),[t,i]=(0,_.useState)(!1),[d,m]=(0,_.useState)(!1),[p,h]=(0,_.useState)(null),[y,f]=(0,_.useState)(!1),x=()=>f(!1),{getFields:v,isLoading:b,getProducts:j}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings"),getProducts:e(u.store).getEntityRecords("postType","product",{per_page:-1})})),[]),[w,S]=(0,_.useState)({data_layer_google_tag_manager_promotions:[]}),[C,N]=(0,_.useState)({}),T=j?j.map((e=>({key:e.id,label:e.title.rendered,value:{id:e.id}}))):[],E=(0,_.useCallback)(((e,a)=>{N((o=>({...o,[a]:e})))}),[]),k=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));return(0,_.useEffect)((()=>{v&&S(v)}),[v]),(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Ecommerce Promotions","datalayer-for-woocommerce")}),(0,g.jsxs)("div",{className:"form-legend",children:[(0,g.jsxs)(l.Tip,{children:[(0,r.__)("Create the promotions that will be used to trigger the","datalayer-for-woocommerce")," ",(0,g.jsx)("b",{children:"select_promotion"})," and ",(0,g.jsx)("b",{children:"view_promotion"})," events."," ",(0,g.jsx)(l.ExternalLink,{href:"https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?hl=en&client_type=gtm#apply_promotions",children:(0,r.__)("Read more","datalayer-for-woocommerce")})]}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{})]}),b?(0,g.jsx)(g.Fragment,{children:y?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"form-fields",children:[(0,g.jsx)(l.ToggleControl,{label:(0,r.__)("Status Promotion","datalayer-for-woocommerce"),checked:C.status,onChange:e=>E(e,"status"),help:(0,r.__)("Select promotion status","datalayer-for-woocommerce")}),(0,g.jsx)(l.TextControl,{label:(0,r.__)("Promotion ID","datalayer-for-woocommerce"),value:C.promotion_id,onChange:e=>E(e,"promotion_id"),help:(0,r.__)("The ID of the promotion associated with the event","datalayer-for-woocommerce")}),(0,g.jsx)(l.TextControl,{label:(0,r.__)("Promotion Name","datalayer-for-woocommerce"),value:C.promotion_name,onChange:e=>E(e,"promotion_name"),help:(0,r.__)("The name of the promotion associated with the event","datalayer-for-woocommerce")}),(0,g.jsx)(l.TextControl,{label:(0,r.__)("Creative Name","datalayer-for-woocommerce"),value:C.creative_name,onChange:e=>E(e,"creative_name"),help:(0,r.__)("The name of the promotional creative","datalayer-for-woocommerce")}),(0,g.jsx)(l.TextControl,{label:(0,r.__)("Creative Slot","datalayer-for-woocommerce"),value:C.creative_slot,onChange:e=>E(e,"creative_slot"),help:(0,r.__)("The name of the promotional creative slot associated with the event","datalayer-for-woocommerce")}),(0,g.jsx)("label",{className:"components-base-control__label css-1v57ksj ej5x27r2 label_external",htmlFor:"woocommerce-select-control-1",children:"Products"}),(0,g.jsx)(c.SelectControl,{label:(0,r.__)("Select products","datalayer-for-woocommerce"),help:(0,r.__)("Select the products for which the event will be triggered","datalayer-for-woocommerce"),options:T,selected:C.products,onChange:e=>E(e,"products"),isSearchable:!0,multiple:!0,showClearButton:!0,hideBeforeSearch:!0,staticList:!0}),(0,g.jsxs)("div",{className:"form-buttons",children:[(0,g.jsx)(l.Button,{onClick:x,variant:"secondary",children:(0,r.__)("Cancel","datalayer-for-woocommerce")}),(0,g.jsx)(l.Button,{onClick:async()=>{try{i(!0);const a=w.data_layer_google_tag_manager_promotions.map((e=>e.id===C.id?{...e,...C}:e));w.data_layer_google_tag_manager_promotions.find((e=>e.id===C.id))||a.push(C),S({...w,data_layer_google_tag_manager_promotions:a}),await o("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_promotions:a},k),i(!1),x(),e((0,r.__)("Promotion saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:t,children:t?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-woocommerce")]}):(0,r.__)("Save","datalayer-for-woocommerce")})]})]})}):(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woo.woocommerce/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsxs)("table",{className:"wp-list-table widefat fixed striped table-view-list",children:[(0,g.jsx)("thead",{children:(0,g.jsxs)("tr",{children:[(0,g.jsx)("td",{style:{width:100},children:"#"}),(0,g.jsx)("td",{children:(0,r.__)("Promotion ID","datalayer-for-woocommerce")}),(0,g.jsx)("td",{children:(0,r.__)("Promotion Name","datalayer-for-woocommerce")}),(0,g.jsx)("td",{style:{width:100},children:(0,r.__)("Status","datalayer-for-woocommerce")}),(0,g.jsx)("td",{style:{width:450},children:(0,r.__)("Actions","datalayer-for-woocommerce")})]})}),(0,g.jsx)("tbody",{})]}),(0,g.jsx)("div",{className:"form-fields-button",children:(0,g.jsx)(l.Button,{onClick:()=>{const e=w.data_layer_google_tag_manager_promotions;let a=1;e.length>0&&(a=Math.max(...e.map((e=>parseInt(e.id,10))))+1),N({id:a,status:!1,promotion_id:"",promotion_name:"",creative_name:"",creative_slot:""}),f(!0)},variant:"primary",disabled:!0,children:(0,r.__)("Create","datalayer-for-woocommerce")})})]})})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},v=e=>{const{createSuccessNotice:a,createErrorNotice:o}=(0,n.useDispatch)(s.store),t=(0,n.useDispatch)(),[i,d]=(0,_.useState)(!1),{getFields:m,isLoading:p}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[h,y]=(0,_.useState)({data_layer_google_tag_manager_show_user_info:!1}),u=(0,_.useCallback)(((e,a)=>{y((o=>({...o,[a]:e})))}),[]),f=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));(0,_.useEffect)((()=>{m&&y(m)}),[m]);const x=(0,g.jsx)(g.Fragment,{children:(0,r.__)("When a user refreshes the thank you page, the purchase event is not sent again. Prevent duplicate transactions in analytics","datalayer-for-ecommerce-free")}),v=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable this option if user information show when logged.","datalayer-for-ecommerce-free")}),b=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable this option via javascript as an alternative when your theme fails to load the hook add_to_cart with php.","datalayer-for-ecommerce-free")});return(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Ecommerce Advanced","datalayer-for-ecommerce-free")}),p?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Show user info","datalayer-for-ecommerce-free"),checked:h.data_layer_google_tag_manager_show_user_info,onChange:e=>u(e,"data_layer_google_tag_manager_show_user_info"),help:v}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{d(!0),await t("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_show_user_info:h.data_layer_google_tag_manager_show_user_info},f),d(!1),a((0,r.__)("Settings saved!","datalayer-for-ecommerce-free"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),o("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:i,children:i?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-ecommerce-free")]}):(0,r.__)("Save","datalayer-for-ecommerce-free")})}),(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Trigger Purchase only once","datalayer-for-ecommerce-free"),checked:h.data_layer_google_tag_manager_purchase_only_once,onChange:e=>u(e,"data_layer_google_tag_manager_purchase_only_once"),help:x}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Events with Javascript","datalayer-for-ecommerce-free"),checked:h.data_layer_google_tag_manager_javascript_events,onChange:e=>u(e,"data_layer_google_tag_manager_javascript_events"),help:b})]})]}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},b=e=>{const{createSuccessNotice:a,createErrorNotice:o}=(0,n.useDispatch)(s.store),t=(0,n.useDispatch)(),[i,d]=(0,_.useState)(!1),{getFields:m,isLoading:p}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[h,y]=(0,_.useState)({data_layer_google_tag_manager_debug_activate:!1}),u=((0,_.useCallback)(((e,a)=>{y((o=>({...o,[a]:e})))}),[]),(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState())));(0,_.useEffect)((()=>{m&&y(m)}),[m]);const f=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Activate DEBUG BAR TEST MODE","datalayer-for-ecommerce-free")});return(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Extra Debug Bar","datalayer-for-ecommerce-free")}),p?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.ToggleControl,{disabled:!0,__nextHasNoMarginBottom:!0,label:(0,r.__)("Activate Test Debugger Bar","datalayer-for-ecommerce-free"),help:f}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{d(!0),await t("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_debug_activate:h.data_layer_google_tag_manager_debug_activate},u),d(!1),a((0,r.__)("Settings saved!","datalayer-for-ecommerce-free"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),o("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0,children:i?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-ecommerce-free")]}):(0,r.__)("Save","datalayer-for-ecommerce-free")})})]})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},j=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,n.useDispatch)(s.store),[o,t]=((0,n.useDispatch)(),(0,_.useState)(!1)),{getFields:i,isLoading:d}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[m,p]=(0,_.useState)({}),h=(0,_.useCallback)(((e,a)=>{p((o=>({...o,[a]:e})))}),[]);(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState())),(0,_.useEffect)((()=>{i&&p(i)}),[i]);const y=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Enable to trigger Popup Consent Mode. ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://support.google.com/tagmanager/answer/10718549",children:"Read more"})]}),u=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger ad_storage consent option","datalayer-for-woocommerce")}),f=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger ad_user_data consent option","datalayer-for-woocommerce")}),x=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger ad_personalization consent option","datalayer-for-woocommerce")}),v=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger analytics_storage consent option","datalayer-for-woocommerce")}),b=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger functionality_storage consent option","datalayer-for-woocommerce")}),j=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger personalization_storage consent option","datalayer-for-woocommerce")}),w=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger security_storage consent option","datalayer-for-woocommerce")});return(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Popup Consent Mode","datalayer-for-woocommerce")}),d?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Popup Consent Mode","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup"),help:y}),(0,g.jsx)("div",{className:"form-subtitle",children:(0,r.__)("Consent Types","datalayer-for-woocommerce")}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Ad Storage","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_ad_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_ad_storage"),help:u,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_ad_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_ad_storage"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_ad_storage,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Ad Storage Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_ad_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_text_ad_storage"),help:(0,r.__)("Example: Enables storage (such as cookies) related to advertising","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_ad_storage,className:"components-base-control-bottom-minus"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Ad User Data","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_ad_user_data,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_ad_user_data"),help:f,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_ad_user_data,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_ad_user_data"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_ad_user_data,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Ad User Data Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_ad_user_data,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_text_ad_user_data"),help:(0,r.__)("Example: Sets consent for sending user data related to advertising to Google","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_ad_user_data,className:"components-base-control-bottom-minus"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Ad Personalization","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_ad_personalization,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_ad_personalization"),help:x,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_ad_personalization,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_ad_personalization"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_ad_personalization,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Ad Personalization Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_ad_personalization,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_text_ad_personalization"),help:(0,r.__)("Example: Sets consent for personalized advertising","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_ad_personalization,className:"components-base-control-bottom-minus"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Analytics Storage","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_analytics_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_analytics_storage"),help:v,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_analytics_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_analytics_storage"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_analytics_storage,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Analytics Storage Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_analytics_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_text_analytics_storage"),help:(0,r.__)("Example: Enables storage (such as cookies) related to analytics e.g. visit duration","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_analytics_storage,className:"components-base-control-bottom-minus"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Functionality Storage","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_functionality_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_functionality_storage"),help:b,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_functionality_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_functionality_storage"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_functionality_storage,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Functionality Storage Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_functionality_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_text_functionality_storage"),help:(0,r.__)("Example: Enables storage that supports the functionality of the website or app e.g. language settings","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_functionality_storage,className:"components-base-control-bottom-minus"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Personalization Storage","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_personalization_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_personalization_storage"),help:j,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_personalization_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_personalization_storage"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_personalization_storage,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Personalization Storage Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_personalization_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_text_personalization_storage"),help:(0,r.__)("Example: Enables storage related to personalization e.g. video recommendations","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_personalization_storage,className:"components-base-control-bottom-minus"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Security Storage","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_security_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_security_storage"),help:w,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_security_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_security_storage"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_security_storage,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Security Storage Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_security_storage,onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_text_security_storage"),help:(0,r.__)("Example: Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_security_storage,className:"components-base-control-bottom-minus"}),(0,g.jsx)("div",{className:"form-subtitle",children:(0,r.__)("Popup Style","datalayer-for-woocommerce")}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Style","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_style,options:[{label:"BOTTOM",value:"BOTTOM"},{label:"FLOAT LEFT",value:"FLOAT LEFT"},{label:"FLOAT RIGHT",value:"FLOAT RIGHT"},{label:"CENTER",value:"CENTER"}],onChange:e=>h(e,"data_layer_google_tag_manager_consent_mode_popup_style"),help:(0,r.__)("Select popup style","datalayer-for-woocommerce")}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{t(!0),e((0,r.__)("Settings saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0,children:o?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-woocommerce")]}):(0,r.__)("Save","datalayer-for-woocommerce")})})]})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},w=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,n.useDispatch)(s.store),o=(0,n.useDispatch)(),[t,i]=(0,_.useState)(!1),{getFields:d,isLoading:m}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[p,h]=(0,_.useState)({data_layer_google_tag_manager_post_data_active:!1,data_layer_google_tag_manager_post_data_page_title:!1,data_layer_google_tag_manager_post_data_visitor_type:!1,data_layer_google_tag_manager_post_data_page_post_type:!1,data_layer_google_tag_manager_post_data_page_post_date:!1,data_layer_google_tag_manager_post_data_page_post_author:!1,data_layer_google_tag_manager_post_data_page_post_author_id:!1,data_layer_google_tag_manager_post_data_page_category:!1,data_layer_google_tag_manager_post_data_page_tags:!1,data_layer_google_tag_manager_post_data_page_id:!1}),y=(0,_.useCallback)(((e,a)=>{h((o=>({...o,[a]:e})))}),[]),u=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));return(0,_.useEffect)((()=>{d&&h(d)}),[d]),(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Post Data","datalayer-for-woocommerce")}),(0,g.jsxs)("div",{className:"form-legend",children:[(0,g.jsxs)(l.Tip,{children:[(0,r.__)("Select the post data that will be used to trigger the","datalayer-for-woocommerce")," ",(0,g.jsx)("b",{children:"Pageview"})," event."]}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{})]}),m?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Active Event Pageview","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_active"),help:(0,r.__)("Active Event Pageview","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Title","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_title"),help:(0,r.__)("Insert pageTitle parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Visitor Type","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_visitor_type"),help:(0,r.__)("Insert visitorType parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Post Type","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_post_type"),help:(0,r.__)("Insert pagePostType parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Date","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_post_date"),help:(0,r.__)("Insert pagePostDate parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Author","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_post_author"),help:(0,r.__)("Insert pagePostAuthor parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Author ID","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_post_author_id"),help:(0,r.__)("Insert pagePostAuthorId parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Category","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_category"),help:(0,r.__)("Insert pageCategory parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Tags","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_tags"),help:(0,r.__)("Insert pageTags parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page ID","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_id"),help:(0,r.__)("Insert pageId parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{i(!0),await o("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_post_data_active:p.data_layer_google_tag_manager_post_data_active,data_layer_google_tag_manager_post_data_page_title:p.data_layer_google_tag_manager_post_data_page_title,data_layer_google_tag_manager_post_data_visitor_type:p.data_layer_google_tag_manager_post_data_visitor_type,data_layer_google_tag_manager_post_data_page_post_type:p.data_layer_google_tag_manager_post_data_page_post_type,data_layer_google_tag_manager_post_data_page_post_date:p.data_layer_google_tag_manager_post_data_page_post_date,data_layer_google_tag_manager_post_data_page_post_author:p.data_layer_google_tag_manager_post_data_page_post_author,data_layer_google_tag_manager_post_data_page_post_author_id:p.data_layer_google_tag_manager_post_data_page_post_author_id,data_layer_google_tag_manager_post_data_page_category:p.data_layer_google_tag_manager_post_data_page_category,data_layer_google_tag_manager_post_data_page_tags:p.data_layer_google_tag_manager_post_data_page_tags,data_layer_google_tag_manager_post_data_page_id:p.data_layer_google_tag_manager_post_data_page_id},u),i(!1),e((0,r.__)("Settings saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0,children:t?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-woocommerce")]}):(0,r.__)("Save","datalayer-for-woocommerce")})})]})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},S=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,n.useDispatch)(s.store),o=(0,n.useDispatch)(),[t,i]=(0,_.useState)(!1),[d,m]=(0,_.useState)([]),{getFields:p,isLoading:h}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[y,u]=(0,_.useState)({data_layer_google_tag_manager_catalog_feed_google:!1,data_layer_google_tag_manager_catalog_feed_facebook:!1}),f=(0,_.useCallback)(((e,a)=>{u((o=>({...o,[a]:e})))}),[]),x=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState())),v=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Active for Create a product file for Merchant Center. ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://support.google.com/merchants/answer/12631822?&hl=en",children:(0,r.__)("Read more","datalayer-for-woocommerce")})]}),b=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Active for Create a product file for Meta. ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://web.facebook.com/business/help/1898524300466211?id=725943027795860",children:(0,r.__)("Read more","datalayer-for-woocommerce")})]});return(0,_.useEffect)((()=>{p&&u(p)}),[p]),(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Catalog Feed","datalayer-for-woocommerce")}),(0,g.jsxs)("div",{className:"form-legend",children:[(0,g.jsx)(l.Tip,{children:(0,r.__)("Create a Catalog Feed files for platforms.","datalayer-for-woocommerce")}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{})]}),h?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.ToggleControl,{disabled:!0,__nextHasNoMarginBottom:!0,label:(0,r.__)("Google Merchant Center","datalayer-for-woocommerce"),onChange:e=>f(e,"data_layer_google_tag_manager_catalog_feed_google"),help:v}),(0,g.jsx)(l.ToggleControl,{disabled:!0,__nextHasNoMarginBottom:!0,label:(0,r.__)("Facebook Catalog","datalayer-for-woocommerce"),onChange:e=>f(e,"data_layer_google_tag_manager_catalog_feed_facebook"),help:b}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{i(!0),await o("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_catalog_feed_google:y.data_layer_google_tag_manager_catalog_feed_google,data_layer_google_tag_manager_catalog_feed_facebook:y.data_layer_google_tag_manager_catalog_feed_facebook},x),i(!1),e((0,r.__)("Settings saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0,children:t?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-woocommerce")]}):(0,r.__)("Save","datalayer-for-woocommerce")})}),d.length>0&&(0,g.jsxs)("div",{className:"feed-url",children:[(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("p",{children:(0,r.__)("Catalog feeds generated:","datalayer-for-woocommerce")}),(0,g.jsx)("ul",{children:d.map(((e,a)=>(0,g.jsx)("li",{children:(0,g.jsx)("a",{href:e,target:"_blank",rel:"noopener noreferrer",children:e})},a)))})]})]})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},C=()=>(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Help","datalayer-for-ecommerce-free")}),(0,g.jsxs)(l.Flex,{gap:"20",justify:"flex-start",children:[(0,g.jsx)(l.FlexItem,{children:(0,g.jsxs)(l.Card,{children:[(0,g.jsx)(l.CardHeader,{children:(0,g.jsx)(l.__experimentalHeading,{level:1,children:(0,r.__)("Contact us","datalayer-for-ecommerce-free")})}),(0,g.jsx)(l.CardBody,{children:(0,g.jsx)(l.Button,{variant:"secondary",href:"https://wordpress.org/support/plugin/datalayer-for-ecommerce-free/",target:"_blank",children:(0,r.__)("Create ticket","datalayer-for-ecommerce-free")})})]})}),(0,g.jsx)(l.FlexItem,{children:(0,g.jsxs)(l.Card,{children:[(0,g.jsx)(l.CardHeader,{children:(0,g.jsx)(l.__experimentalHeading,{level:1,children:(0,r.__)("Configuration","datalayer-for-ecommerce-free")})}),(0,g.jsx)(l.CardBody,{children:(0,g.jsx)(l.Button,{variant:"secondary",href:"https://wordpress.org/plugins/datalayer-for-ecommerce-free/#installation",target:"_blank",children:(0,r.__)("View documentation","datalayer-for-ecommerce-free")})})]})}),(0,g.jsx)(l.FlexItem,{children:(0,g.jsxs)(l.Card,{children:[(0,g.jsx)(l.CardHeader,{children:(0,g.jsx)(l.__experimentalHeading,{level:1,children:(0,r.__)("Review","datalayer-for-ecommerce-free")})}),(0,g.jsx)(l.CardBody,{children:(0,g.jsx)(l.Button,{variant:"secondary",href:"https://wordpress.org/support/plugin/datalayer-for-ecommerce-free/reviews/#new-post",target:"_blank",children:(0,r.__)("Send your review","datalayer-for-ecommerce-free")})})]})})]})]}),N=()=>(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("About","datalayer-for-ecommerce-free")}),(0,g.jsxs)("p",{children:["= 4.3.0 - 2024-10-28 =",(0,g.jsx)("br",{}),"* New: Option Show view_item_list related product in product page",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.6.2 WC 9.3.3",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 4.0.0 - 2024-07-03 =",(0,g.jsx)("br",{}),"* Remove: Option DataLayer for WooCommerce Enhanced Ecommerce removed",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.5.5 WC 9.0.2",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 3.4.0 - 2024-06-10 =",(0,g.jsx)("br",{}),"* Update: Push Datalayer function without jQuery",(0,g.jsx)("br",{}),"* Update: Get Country Code Phone Number User",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.5.3 WC 8.9.2",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 3.3.0 - 2024-03-27 =",(0,g.jsx)("br",{}),"* New: Parameter item_category with multiples categories in all events",(0,g.jsx)("br",{}),"* Fix: Php 8.2 deprecated function get options",(0,g.jsx)("br",{}),"* Fix: Product tax update in item price",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.4.3 WC 8.7.0",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 3.2.0 - 2023-12-15 =",(0,g.jsx)("br",{}),"* Update: Compatibility with multicurrency WPML plugin",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.4.2 WC 8.4.0",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 3.1.0 - 2023-11-29 =",(0,g.jsx)("br",{}),"* Update: Select only one datalayer type in ecommerce settings",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.4.1 WC 8.3.1",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 3.0.0 - 2023-10-30 =",(0,g.jsx)("br",{}),"* New: Full compatibility with WooCommerce Blocks",(0,g.jsx)("br",{}),"* New: New Modern Admin Page",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.3.2 WC 8.2.1",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 2.7.0 - 2023-06-21 =",(0,g.jsx)("br",{}),"* New: Select if user information show or not when logged",(0,g.jsx)("br",{}),"* New: Full Compatibility HPOS - High-Performance order storage (COT)",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.2.2 WC 7.8.0",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 2.4.0 - 2023-03-29 =",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.1.1 WC 7.5.1",(0,g.jsx)("br",{}),"* Update: optimization and improvement of the code that triggers the events",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 2.0.2 - 2022-09-21 =",(0,g.jsx)("br",{}),"* Support: WP 6.0.2 WC 6.9.3",(0,g.jsx)("br",{}),"* Fix: Multisite full support check WooCommerce Active",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 2.0.0 - 2022-06-22 =",(0,g.jsx)("br",{}),"* First Release",(0,g.jsx)("br",{})]})]}),T=window.wp.primitives,E=(0,g.jsx)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,g.jsx)(T.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})}),k=(0,g.jsx)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,g.jsx)(T.Path,{fillRule:"evenodd",d:"M19.75 11H21V8.667L19.875 4H4.125L3 8.667V11h1.25v8.75h15.5V11zm-1.5 0H5.75v7.25H10V13h4v5.25h4.25V11zm-5.5-5.5h2.067l.486 3.24.028.76H12.75v-4zm-3.567 0h2.067v4H8.669l.028-.76.486-3.24zm7.615 3.1l-.464-3.1h2.36l.806 3.345V9.5h-2.668l-.034-.9zM7.666 5.5h-2.36L4.5 8.845V9.5h2.668l.034-.9.464-3.1z",clipRule:"evenodd"})}),F=(0,g.jsxs)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,g.jsx)(T.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,g.jsx)(T.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]}),M=({onNavItemChange:e,activeNavItem:a})=>{const o=a=>{e(a)};return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(l.Panel,{children:[(0,g.jsx)(l.PanelBody,{icon:E,title:"Google Tag Manager",initialOpen:!0,children:(0,g.jsx)(l.PanelRow,{children:(0,g.jsx)(l.__experimentalNavigation,{activeItem:a,className:"navigation-story",onActivateMenu:function(){},children:(0,g.jsxs)(l.__experimentalNavigationMenu,{title:"",children:[(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-1",onClick:()=>o("item-1"),title:(0,r.__)("Settings","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-2",onClick:()=>o("item-2"),title:(0,r.__)("Tags Synchronization","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-3",onClick:()=>o("item-3"),title:(0,r.__)("Consent Mode","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-4",onClick:()=>o("item-4"),title:(0,r.__)("Server-to-Server","datalayer-for-woocommerce")})]})})})}),(0,g.jsx)(l.PanelBody,{title:"Ecommerce",icon:k,initialOpen:!0,children:(0,g.jsx)(l.PanelRow,{children:(0,g.jsx)(l.__experimentalNavigation,{activeItem:a,className:"navigation-story",onActivateMenu:function(){},children:(0,g.jsxs)(l.__experimentalNavigationMenu,{title:"",children:[(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-5",onClick:()=>o("item-5"),title:(0,r.__)("Settings","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-6",onClick:()=>o("item-6"),title:(0,r.__)("Promotions","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-7",onClick:()=>o("item-7"),title:(0,r.__)("Advanced","datalayer-for-woocommerce")})]})})})}),(0,g.jsx)(l.PanelBody,{title:"Extra",icon:F,initialOpen:!0,children:(0,g.jsx)(l.PanelRow,{children:(0,g.jsx)(l.__experimentalNavigation,{activeItem:a,className:"navigation-story",onActivateMenu:function(){},children:(0,g.jsxs)(l.__experimentalNavigationMenu,{title:"",children:[(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-8",onClick:()=>o("item-8"),title:(0,r.__)("Debug Bar","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-9",onClick:()=>o("item-9"),title:(0,r.__)("Popup Consent Mode","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-10",onClick:()=>o("item-10"),title:(0,r.__)("Post Data","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-11",onClick:()=>o("item-11"),title:(0,r.__)("Catalog Feed","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-12",onClick:()=>o("item-12"),title:(0,r.__)("Help","datalayer-for-woocommerce")}),(0,g.jsx)(l.__experimentalNavigationItem,{item:"item-13",onClick:()=>o("item-13"),title:(0,r.__)("About","datalayer-for-woocommerce")})]})})})})]})})},B={tracking_google_tag_manager:"",data_layer_google_tag_manager_enhanced_ecommerce:!1,data_layer_google_tag_manager_ecommerce_ga4:!1,data_layer_google_tag_manager_show_user_info:!1,data_layer_google_tag_manager_related_product_show:!1},P={initSettings:e=>({type:"STATE_FROM_DATABASE",payload:{...e}}),*saveSettings(e,a){const o={...B,...a,...e};try{return yield P.saveSettingsToDatabase(o),{type:"SAVE_SETTINGS",payload:o}}catch(e){throw e}},saveSettingsToDatabase:e=>({type:"SAVE_SETTINGS_TO_DATABASE",payload:e})},H={getState:e=>({...B,...e}),getSettings(e){const{...a}=e;return a},getEcommerceData(e){const{data_layer_google_tag_manager_purchase_only_once:a,data_layer_google_tag_manager_show_user_info:o,data_layer_google_tag_manager_javascript_events:t}=e;return{data_layer_google_tag_manager_purchase_only_once:a,data_layer_google_tag_manager_show_user_info:o,data_layer_google_tag_manager_javascript_events:t}}},A={getSettings:()=>async({dispatch:e})=>{const a=await h()({path:"/wp/v2/settings"});e.initSettings(a.options_tracking_option_free)}},D={async SAVE_SETTINGS_TO_DATABASE(e){try{const a=await h()({path:"/wp/v2/settings"});if(a&&a.options_tracking_option_free)return await h()({path:"/wp/v2/settings",method:"PUT",body:JSON.stringify({options_tracking_option_free:e.payload})}),e;throw"error"}catch(e){throw e}}},L=(0,n.createReduxStore)("shop-datalayer-for-ecommerce-free",{reducer:(e=B,a)=>{switch(a.type){case"STATE_FROM_DATABASE":case"SAVE_SETTINGS":return{...e,...a.payload};default:return e}},actions:P,selectors:H,resolvers:A,controls:D});(0,n.register)(L);const I=o.p+"images/logo-datalayer-for-ecommerce-free.1980fdad.png",R=()=>{const[e,a]=(0,_.useState)("item-1");return(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getSettings())),(0,g.jsx)("div",{children:(0,g.jsxs)("div",{className:"wrap datalayer-for-ecommerce-free",children:[(0,g.jsxs)("div",{className:"content-sidebar-datalayer-for-ecommerce-free-wrap",children:[(0,g.jsx)("div",{className:"logoDatalayer",children:(0,g.jsx)("img",{src:I,width:"100",alt:"Datalayer for WooCommerce Icon"})}),(0,g.jsx)(M,{onNavItemChange:e=>{a(e)},activeNavItem:e})]}),(0,g.jsxs)("div",{className:"content-form-datalayer-for-ecommerce-free-wrap",children:["item-1"===e&&(0,g.jsx)(i,{}),"item-2"===e&&(0,g.jsx)(d,{}),"item-3"===e&&(0,g.jsx)(m,{}),"item-4"===e&&(0,g.jsx)(y,{}),"item-5"===e&&(0,g.jsx)(f,{}),"item-6"===e&&(0,g.jsx)(x,{}),"item-7"===e&&(0,g.jsx)(v,{}),"item-8"===e&&(0,g.jsx)(b,{}),"item-9"===e&&(0,g.jsx)(j,{}),"item-10"===e&&(0,g.jsx)(w,{}),"item-11"===e&&(0,g.jsx)(S,{}),"item-12"===e&&(0,g.jsx)(C,{}),"item-13"===e&&(0,g.jsx)(N,{})]})]})})};(0,t.addFilter)("woocommerce_admin_pages_list","datalayer-for-ecommerce-free",(e=>(e.push({breadcrumbs:["",wcSettings.woocommerceTranslation,(0,r.__)("Datalayer for WooCommerce FREE","datalayer-for-ecommerce-free")],capability:"manage_options",container:R,path:"/datalayer-for-ecommerce-free",wpOpenMenu:"toplevel_page_woocommerce",title:(0,r.__)("Datalayer for WooCommerce FREE","datalayer-for-ecommerce-free"),navArgs:{id:"datalayer-for-ecommerce-free"}}),e)))})();
     1(()=>{"use strict";var e={20:(e,a,o)=>{var t=o(609),r=Symbol.for("react.element"),_=Symbol.for("react.fragment"),n=Object.prototype.hasOwnProperty,l=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(e,a,o){var t,_={},c=null,g=null;for(t in void 0!==o&&(c=""+o),void 0!==a.key&&(c=""+a.key),void 0!==a.ref&&(g=a.ref),a)n.call(a,t)&&!s.hasOwnProperty(t)&&(_[t]=a[t]);if(e&&e.defaultProps)for(t in a=e.defaultProps)void 0===_[t]&&(_[t]=a[t]);return{$$typeof:r,type:e,key:c,ref:g,props:_,_owner:l.current}}a.Fragment=_,a.jsx=c,a.jsxs=c},609:e=>{e.exports=window.React},848:(e,a,o)=>{e.exports=o(20)}},a={};function o(t){var r=a[t];if(void 0!==r)return r.exports;var _=a[t]={exports:{}};return e[t](_,_.exports,o),_.exports}o.n=e=>{var a=e&&e.__esModule?()=>e.default:()=>e;return o.d(a,{a}),a},o.d=(e,a)=>{for(var t in a)o.o(a,t)&&!o.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:a[t]})},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),o.o=(e,a)=>Object.prototype.hasOwnProperty.call(e,a),(()=>{var e;o.g.importScripts&&(e=o.g.location+"");var a=o.g.document;if(!e&&a&&(a.currentScript&&"SCRIPT"===a.currentScript.tagName.toUpperCase()&&(e=a.currentScript.src),!e)){var t=a.getElementsByTagName("script");if(t.length)for(var r=t.length-1;r>-1&&(!e||!/^http(s?):/.test(e));)e=t[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/^blob:/,"").replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=e})();const t=window.wp.hooks,r=window.wp.i18n,_=window.wp.element,n=window.wp.data,l=window.wp.components,s=window.wp.notices,c=window.wc.components;var g=o(848);const i=e=>{const{createSuccessNotice:a,createErrorNotice:o}=(0,n.useDispatch)(s.store),t=(0,n.useDispatch)(),[i,d]=(0,_.useState)(!1),{getFields:m,isLoading:p}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[u,y]=(0,_.useState)({tracking_google_tag_manager:"",data_layer_google_tag_manager_custom_domain_server_side:"",data_layer_google_tag_manager_custom_script_filename_server_side:"",data_layer_google_tag_manager_custom_environment_gtm_auth:"",data_layer_google_tag_manager_custom_environment_gtm_preview:""}),h=(0,_.useCallback)(((e,a)=>{y((o=>({...o,[a]:e})))}),[]),f=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));(0,_.useEffect)((()=>{m&&y(m)}),[m]);const x=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Example: GTM-XXXXXX - ","datalayer-for-ecommerce-free"),(0,g.jsx)(l.ExternalLink,{href:"https://support.google.com/tagmanager/answer/6103696",children:"Read more"})]}),v=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Example: https://DOMAIN-NAME.com - Send Google scripts gtm.js directly from your tagging server - ","datalayer-for-ecommerce-free"),(0,g.jsx)(l.ExternalLink,{href:"https://developers.google.com/tag-platform/tag-manager/server-side/send-data?hl=en#update_the_gtmjs_source_domain",children:"Read more"}),"\n",(0,r.__)("Leave empty if you don't use GTM Server Side","datalayer-for-ecommerce-free")]}),b=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Example: filename.js - Enter a custom name for the file gtm.js","datalayer-for-ecommerce-free"),"\n",(0,r.__)("Only use for custom file loader in your GTM Server Side","datalayer-for-ecommerce-free")]}),j=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Insert gtm_auth to use a custom environment - ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://support.google.com/tagmanager/answer/6311518?hl=en",children:"Read more"}),"\n",(0,r.__)("Leave empty if you don't use GTM Custom Environment","datalayer-for-woocommerce")]}),w=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Insert gtm_preview to use a custom environment - ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://support.google.com/tagmanager/answer/6311518?hl=en",children:"Read more"}),"\n",(0,r.__)("Leave empty if you don't use GTM Custom Environment","datalayer-for-woocommerce")]});return(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Google Tag Manager Settings","datalayer-for-ecommerce-free")}),p?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,r.__)("Google Tag Manager ID","datalayer-for-ecommerce-free"),value:u.tracking_google_tag_manager,onChange:e=>h(e,"tracking_google_tag_manager"),help:x}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{d(!0),await t("shop-datalayer-for-ecommerce-free").saveSettings({tracking_google_tag_manager:u.tracking_google_tag_manager,data_layer_google_tag_manager_custom_domain_server_side:u.data_layer_google_tag_manager_custom_domain_server_side,data_layer_google_tag_manager_custom_script_filename_server_side:u.data_layer_google_tag_manager_custom_script_filename_server_side,data_layer_google_tag_manager_custom_environment_gtm_auth:u.data_layer_google_tag_manager_custom_environment_gtm_auth,data_layer_google_tag_manager_custom_environment_gtm_preview:u.data_layer_google_tag_manager_custom_environment_gtm_preview},f),d(!1),a((0,r.__)("Settings saved!","datalayer-for-ecommerce-free"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),o("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:i,children:i?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-ecommerce-free")]}):(0,r.__)("Save","datalayer-for-ecommerce-free")})}),(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Custom domain GTM Server Side","datalayer-for-ecommerce-free"),help:v}),(0,g.jsx)(l.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Custom script filename GTM Server Side","datalayer-for-ecommerce-free"),help:b}),(0,g.jsx)(l.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Custom Environment gtm_auth","datalayer-for-woocommerce"),help:j}),(0,g.jsx)(l.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Custom Environment gtm_preview","datalayer-for-woocommerce"),help:w})]})]}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},d=()=>(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Google Tag Manager Tags Synchronization","datalayer-for-ecommerce-free")}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{variant:"primary",href:"https://demoshop.arrayevida.com.br/wp-content/uploads/2024/07/workspace.zip",children:(0,r.__)("Download Import File GTM","datalayer-for-ecommerce-free")})})]}),m=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,n.useDispatch)(s.store),o=(0,n.useDispatch)(),[t,i]=(0,_.useState)(!1),{getFields:d,isLoading:m}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[p,u]=(0,_.useState)({data_layer_google_tag_manager_consent_mode_default:"",data_layer_google_tag_manager_consent_mode_default_ad_storage:"",data_layer_google_tag_manager_consent_mode_default_ad_user_data:"",data_layer_google_tag_manager_consent_mode_default_ad_personalization:"",data_layer_google_tag_manager_consent_mode_default_analytics_storage:"",data_layer_google_tag_manager_consent_mode_default_functionality_storage:"",data_layer_google_tag_manager_consent_mode_default_personalization_storage:"",data_layer_google_tag_manager_consent_mode_default_security_storage:""}),y=(0,_.useCallback)(((e,a)=>{u((o=>({...o,[a]:e})))}),[]),h=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));(0,_.useEffect)((()=>{d&&u(d)}),[d]);const f=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Enable to trigger for all parameters consent to denied. ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://developers.google.com/tag-platform/security/guides/consent?consentmode=advanced#default-consent",children:"Read more"})]}),x=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger ad_storage consent to granted","datalayer-for-woocommerce")}),v=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger ad_user_data consent to granted","datalayer-for-woocommerce")}),b=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger ad_personalization consent to granted","datalayer-for-woocommerce")}),j=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger analytics_storage consent to granted","datalayer-for-woocommerce")}),w=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger functionality_storage consent to granted","datalayer-for-woocommerce")}),S=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger personalization_storage consent to granted","datalayer-for-woocommerce")}),C=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger security_storage consent to granted","datalayer-for-woocommerce")}),N=p.data_layer_google_tag_manager_consent_mode_default;return(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Google Tag Manager Consent Mode","datalayer-for-woocommerce")}),(0,g.jsxs)("div",{className:"form-legend",children:[(0,g.jsxs)(l.Tip,{children:[(0,r.__)("Use this feature to trigger DEFAULT consent before the GTM declaration.","datalayer-for-woocommerce"),"\n",(0,r.__)("This feature does not replace the use of a consent tool. If the consent tool already triggers a DEFAULT consent, you do not need to use this feature.","datalayer-for-woocommerce")," ",(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/document/datalayer-for-woocommerce/#consent-mode",children:(0,r.__)("Read more","datalayer-for-woocommerce")})]}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{})]}),m?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Google Consent Mode","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default"),help:f}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Ad Storage","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_ad_storage"),help:x,disabled:!N}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Ad User Data","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_ad_user_data"),help:v,disabled:!N}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Ad Personalization","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_ad_personalization"),help:b,disabled:!N}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Analytics Storage","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_analytics_storage"),help:j,disabled:!N}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Functionality Storage","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_functionality_storage"),help:w,disabled:!N}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Personalization Storage","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_personalization_storage"),help:S,disabled:!N}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Security Storage","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_consent_mode_default_security_storage"),help:C,disabled:!N}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{i(!0),await o("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_consent_mode_default:p.data_layer_google_tag_manager_consent_mode_default,data_layer_google_tag_manager_consent_mode_default_ad_storage:p.data_layer_google_tag_manager_consent_mode_default_ad_storage,data_layer_google_tag_manager_consent_mode_default_ad_user_data:p.data_layer_google_tag_manager_consent_mode_default_ad_user_data,data_layer_google_tag_manager_consent_mode_default_ad_personalization:p.data_layer_google_tag_manager_consent_mode_default_ad_personalization,data_layer_google_tag_manager_consent_mode_default_analytics_storage:p.data_layer_google_tag_manager_consent_mode_default_analytics_storage,data_layer_google_tag_manager_consent_mode_default_functionality_storage:p.data_layer_google_tag_manager_consent_mode_default_functionality_storage,data_layer_google_tag_manager_consent_mode_default_personalization_storage:p.data_layer_google_tag_manager_consent_mode_default_personalization_storage,data_layer_google_tag_manager_consent_mode_default_security_storage:p.data_layer_google_tag_manager_consent_mode_default_security_storage},h),i(!1),e((0,r.__)("Settings saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0,children:t?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-woocommerce")]}):(0,r.__)("Save","datalayer-for-woocommerce")})})]})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},p=window.wp.apiFetch;var u=o.n(p);const y=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,n.useDispatch)(s.store),o=(0,n.useDispatch)(),[t,i]=(0,_.useState)(!1),[d,m]=(0,_.useState)(null),{getFields:p,isLoading:u}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[y,h]=(0,_.useState)({data_layer_google_tag_manager_server_to_server_container_url:"",data_layer_google_tag_manager_server_to_server_measurement_id:"",data_layer_google_tag_manager_server_to_server_preview_request_header:"",data_layer_google_tag_manager_server_to_server_purchase_event:"",data_layer_google_tag_manager_server_to_server_status_purchase_event:"",data_layer_google_tag_manager_server_to_server_order_pay_event:"",data_layer_google_tag_manager_server_to_server_status_order_pay_event:"",data_layer_google_tag_manager_server_to_server_refund_event:""}),f=((0,_.useCallback)(((e,a)=>{h((o=>({...o,[a]:e})))}),[]),(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState())));(0,_.useEffect)((()=>{p&&h(p)}),[p]);const x=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Insert preview request header to test manually send a preview request. ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/document/datalayer-for-woocommerce/#server-to-server-request-header",children:"Read more"})]});return y.data_layer_google_tag_manager_server_to_server_purchase_event,y.data_layer_google_tag_manager_server_to_server_order_pay_event,(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Google Tag Manager Server-to-Server","datalayer-for-woocommerce")}),(0,g.jsxs)("div",{className:"form-legend",children:[(0,g.jsxs)(l.Tip,{children:[(0,r.__)("Use this feature to send events directly to GTM server side.","datalayer-for-woocommerce"),(0,g.jsx)("br",{}),(0,r.__)("Please note: This is an advanced feature. Recommended for experienced users only.","datalayer-for-woocommerce")," ",(0,g.jsx)(l.ExternalLink,{href:"https://developers.google.com/tag-platform/tag-manager/server-side/send-data?hl=en&option=GTM#3_optional_send_data_from_sources_other_than_websites",children:(0,r.__)("Read more","datalayer-for-woocommerce")})]}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{})]}),u?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,r.__)("Google Server Container Url","datalayer-for-woocommerce"),help:(0,r.__)("Insert GTM Server container URL","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,r.__)("Measurement ID GA4","datalayer-for-woocommerce"),help:(0,r.__)("Insert Measurement ID GA4. Example: G-G999999999","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.TextControl,{__next40pxDefaultSize:!0,__nextHasNoMarginBottom:!0,label:(0,r.__)("Preview Request Header","datalayer-for-woocommerce"),help:x,disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Save Cookies in Order","datalayer-for-woocommerce"),help:(0,r.__)("Enable to save user cookies in order and link web and server events","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Purchase Event","datalayer-for-woocommerce"),help:(0,r.__)("Enable to trigger purchase event directly via server side and stop via client web","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Purchase Event Status","datalayer-for-woocommerce"),options:d,help:(0,r.__)("Select which order status the purchase event should be triggered on","datalayer-for-woocommerce"),disabled:!0,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Order Pay Event","datalayer-for-woocommerce"),help:(0,r.__)("Enable to trigger order_pay event directly via server side","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Order Pay Status","datalayer-for-woocommerce"),options:d,help:(0,r.__)("Select which order status the order pay event should be triggered on","datalayer-for-woocommerce"),disabled:!0,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Order Refund Event","datalayer-for-woocommerce"),help:(0,r.__)("Enable to trigger refund event directly via server side","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{i(!0),await o("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_server_to_server_container_url:y.data_layer_google_tag_manager_server_to_server_container_url,data_layer_google_tag_manager_server_to_server_measurement_id:y.data_layer_google_tag_manager_server_to_server_measurement_id,data_layer_google_tag_manager_server_to_server_preview_request_header:y.data_layer_google_tag_manager_server_to_server_preview_request_header,data_layer_google_tag_manager_server_to_server_purchase_event:y.data_layer_google_tag_manager_server_to_server_purchase_event,data_layer_google_tag_manager_server_to_server_status_purchase_event:y.data_layer_google_tag_manager_server_to_server_status_purchase_event,data_layer_google_tag_manager_server_to_server_order_pay_event:y.data_layer_google_tag_manager_server_to_server_order_pay_event,data_layer_google_tag_manager_server_to_server_status_order_pay_event:y.data_layer_google_tag_manager_server_to_server_status_order_pay_event,data_layer_google_tag_manager_server_to_server_refund_event:y.data_layer_google_tag_manager_server_to_server_refund_event},f),i(!1),e((0,r.__)("Settings saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0,children:t?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-woocommerce")]}):(0,r.__)("Save","datalayer-for-woocommerce")})})]})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},h=window.wp.coreData,f=e=>{const{createSuccessNotice:a,createErrorNotice:o}=(0,n.useDispatch)(s.store),t=(0,n.useDispatch)(),[i,d]=(0,_.useState)(!1),{getFields:m,isLoading:p,getBrands:u}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings"),getBrands:e(h.store).getTaxonomies({type:"product"})})),[]),[y,f]=(0,_.useState)({data_layer_google_tag_manager_ecommerce_ga4:!1,data_layer_google_tag_manager_related_product_show:!1}),x=u?u.map((e=>({label:e.labels.name,value:e.slug}))):[];x.unshift({label:"Do not use",value:"none"});const v=(0,_.useCallback)(((e,a)=>{f((o=>({...o,[a]:e})))}),[]),b=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));(0,_.useEffect)((()=>{m&&f(m)}),[m]);const j=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Enable to use datalayer only with ","datalayer-for-ecommerce-free"),(0,g.jsx)(l.ExternalLink,{href:"https://developers.google.com/tag-manager/ecommerce-ga4?hl=en",children:"Ecommerce (GA4)"})]}),w=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Select if product items show ID or SKU","datalayer-for-ecommerce-free")}),S=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Select the taxonomy containing Product Brands","datalayer-for-ecommerce-free")}),C=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Select when the event should be triggered","datalayer-for-ecommerce-free")}),N=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Select when the event should be triggered","datalayer-for-ecommerce-free")}),T=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Select when the view_item event should fire if its a product variable","datalayer-for-ecommerce-free")}),E=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to show variable product variants as an individual product","datalayer-for-ecommerce-free")}),k=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to show event view_item_list for related product in page product","datalayer-for-woocommerce")}),F=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Enable to show discount in ecommerce.items when product is on sale - ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://developers.google.com/analytics/devguides/collection/ga4/apply-discount?client_type=gtag",children:"Read more"})]});return(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Ecommerce Settings","datalayer-for-ecommerce-free")}),p?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("DataLayer for WooCommerce Ecommerce GA4","datalayer-for-ecommerce-free"),checked:y.data_layer_google_tag_manager_ecommerce_ga4,onChange:e=>v(e,"data_layer_google_tag_manager_ecommerce_ga4"),help:j}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Show view_item_list related product","datalayer-for-woocommerce"),checked:y.data_layer_google_tag_manager_related_product_show,onChange:e=>v(e,"data_layer_google_tag_manager_related_product_show"),help:k}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{d(!0),await t("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_ecommerce_ga4:y.data_layer_google_tag_manager_ecommerce_ga4,data_layer_google_tag_manager_related_product_show:y.data_layer_google_tag_manager_related_product_show},b),d(!1),a((0,r.__)("Settings saved!","datalayer-for-ecommerce-free"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),o("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:i,children:i?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-ecommerce-free")]}):(0,r.__)("Save","datalayer-for-ecommerce-free")})}),(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Product Items","datalayer-for-ecommerce-free"),value:y.data_layer_google_tag_manager_product_items,options:[{label:"ID",value:"ID"},{label:"SKU",value:"SKU"}],onChange:e=>v(e,"data_layer_google_tag_manager_product_items"),help:w}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Product Brands","datalayer-for-ecommerce-free"),value:y.data_layer_google_tag_manager_product_brands,options:x,onChange:e=>v(e,"data_layer_google_tag_manager_product_brands"),help:S}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Event add_shipping_info","datalayer-for-ecommerce-free"),value:y.data_layer_google_tag_manager_javascript_event_add_shipping_info,options:[{label:"Shipping selected",value:"Shipping selected"},{label:"Place order button",value:"Place order button"}],onChange:e=>v(e,"data_layer_google_tag_manager_javascript_event_add_shipping_info"),help:C}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Event add_payment_info","datalayer-for-ecommerce-free"),value:y.data_layer_google_tag_manager_javascript_event_add_payment_info,options:[{label:"Payment selected",value:"Payment selected"},{label:"Place order button",value:"Place order button"}],onChange:e=>v(e,"data_layer_google_tag_manager_javascript_event_add_payment_info"),help:N}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Variable product event view_item","datalayer-for-ecommerce-free"),value:y.data_layer_google_tag_manager_javascript_event_view_item,options:[{label:"Parent product page view",value:"Parent product page view"},{label:"When selecting a variation",value:"When selecting a variation"},{label:"Parent product page view and When selecting a variation",value:"Parent product page view and When selecting a variation"}],onChange:e=>v(e,"data_layer_google_tag_manager_javascript_event_view_item"),help:T}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Variable product as individual product","datalayer-for-ecommerce-free"),checked:y.data_layer_google_tag_manager_variable_product_as_individual,onChange:e=>v(e,"data_layer_google_tag_manager_variable_product_as_individual"),help:E}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Show discount in ecommerce.items when product is on sale","datalayer-for-woocommerce"),checked:y.data_layer_google_tag_manager_discount_in_items_show,onChange:e=>v(e,"data_layer_google_tag_manager_discount_in_items_show"),help:F})]})]}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},x=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,n.useDispatch)(s.store),o=(0,n.useDispatch)(),[t,i]=(0,_.useState)(!1),[d,m]=(0,_.useState)(!1),[p,u]=(0,_.useState)(null),[y,f]=(0,_.useState)(!1),x=()=>f(!1),{getFields:v,isLoading:b,getProducts:j}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings"),getProducts:e(h.store).getEntityRecords("postType","product",{per_page:-1})})),[]),[w,S]=(0,_.useState)({data_layer_google_tag_manager_promotions:[]}),[C,N]=(0,_.useState)({}),T=j?j.map((e=>({key:e.id,label:e.title.rendered,value:{id:e.id}}))):[],E=(0,_.useCallback)(((e,a)=>{N((o=>({...o,[a]:e})))}),[]),k=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));return(0,_.useEffect)((()=>{v&&S(v)}),[v]),(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Ecommerce Promotions","datalayer-for-woocommerce")}),(0,g.jsxs)("div",{className:"form-legend",children:[(0,g.jsxs)(l.Tip,{children:[(0,r.__)("Create the promotions that will be used to trigger the","datalayer-for-woocommerce")," ",(0,g.jsx)("b",{children:"select_promotion"})," and ",(0,g.jsx)("b",{children:"view_promotion"})," events."," ",(0,g.jsx)(l.ExternalLink,{href:"https://developers.google.com/analytics/devguides/collection/ga4/ecommerce?hl=en&client_type=gtm#apply_promotions",children:(0,r.__)("Read more","datalayer-for-woocommerce")})]}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{})]}),b?(0,g.jsx)(g.Fragment,{children:y?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"form-fields",children:[(0,g.jsx)(l.ToggleControl,{label:(0,r.__)("Status Promotion","datalayer-for-woocommerce"),checked:C.status,onChange:e=>E(e,"status"),help:(0,r.__)("Select promotion status","datalayer-for-woocommerce")}),(0,g.jsx)(l.TextControl,{label:(0,r.__)("Promotion ID","datalayer-for-woocommerce"),value:C.promotion_id,onChange:e=>E(e,"promotion_id"),help:(0,r.__)("The ID of the promotion associated with the event","datalayer-for-woocommerce")}),(0,g.jsx)(l.TextControl,{label:(0,r.__)("Promotion Name","datalayer-for-woocommerce"),value:C.promotion_name,onChange:e=>E(e,"promotion_name"),help:(0,r.__)("The name of the promotion associated with the event","datalayer-for-woocommerce")}),(0,g.jsx)(l.TextControl,{label:(0,r.__)("Creative Name","datalayer-for-woocommerce"),value:C.creative_name,onChange:e=>E(e,"creative_name"),help:(0,r.__)("The name of the promotional creative","datalayer-for-woocommerce")}),(0,g.jsx)(l.TextControl,{label:(0,r.__)("Creative Slot","datalayer-for-woocommerce"),value:C.creative_slot,onChange:e=>E(e,"creative_slot"),help:(0,r.__)("The name of the promotional creative slot associated with the event","datalayer-for-woocommerce")}),(0,g.jsx)("label",{className:"components-base-control__label css-1v57ksj ej5x27r2 label_external",htmlFor:"woocommerce-select-control-1",children:"Products"}),(0,g.jsx)(c.SelectControl,{label:(0,r.__)("Select products","datalayer-for-woocommerce"),help:(0,r.__)("Select the products for which the event will be triggered","datalayer-for-woocommerce"),options:T,selected:C.products,onChange:e=>E(e,"products"),isSearchable:!0,multiple:!0,showClearButton:!0,hideBeforeSearch:!0,staticList:!0}),(0,g.jsxs)("div",{className:"form-buttons",children:[(0,g.jsx)(l.Button,{onClick:x,variant:"secondary",children:(0,r.__)("Cancel","datalayer-for-woocommerce")}),(0,g.jsx)(l.Button,{onClick:async()=>{try{i(!0);const a=w.data_layer_google_tag_manager_promotions.map((e=>e.id===C.id?{...e,...C}:e));w.data_layer_google_tag_manager_promotions.find((e=>e.id===C.id))||a.push(C),S({...w,data_layer_google_tag_manager_promotions:a}),await o("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_promotions:a},k),i(!1),x(),e((0,r.__)("Promotion saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:t,children:t?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-woocommerce")]}):(0,r.__)("Save","datalayer-for-woocommerce")})]})]})}):(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woo.woocommerce/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsxs)("table",{className:"wp-list-table widefat fixed striped table-view-list",children:[(0,g.jsx)("thead",{children:(0,g.jsxs)("tr",{children:[(0,g.jsx)("td",{style:{width:100},children:"#"}),(0,g.jsx)("td",{children:(0,r.__)("Promotion ID","datalayer-for-woocommerce")}),(0,g.jsx)("td",{children:(0,r.__)("Promotion Name","datalayer-for-woocommerce")}),(0,g.jsx)("td",{style:{width:100},children:(0,r.__)("Status","datalayer-for-woocommerce")}),(0,g.jsx)("td",{style:{width:450},children:(0,r.__)("Actions","datalayer-for-woocommerce")})]})}),(0,g.jsx)("tbody",{})]}),(0,g.jsx)("div",{className:"form-fields-button",children:(0,g.jsx)(l.Button,{onClick:()=>{const e=w.data_layer_google_tag_manager_promotions;let a=1;e.length>0&&(a=Math.max(...e.map((e=>parseInt(e.id,10))))+1),N({id:a,status:!1,promotion_id:"",promotion_name:"",creative_name:"",creative_slot:""}),f(!0)},variant:"primary",disabled:!0,children:(0,r.__)("Create","datalayer-for-woocommerce")})})]})})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},v=e=>{const{createSuccessNotice:a,createErrorNotice:o}=(0,n.useDispatch)(s.store),t=(0,n.useDispatch)(),[i,d]=(0,_.useState)(!1),{getFields:m,isLoading:p}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[u,y]=(0,_.useState)({data_layer_google_tag_manager_show_user_info:!1}),h=(0,_.useCallback)(((e,a)=>{y((o=>({...o,[a]:e})))}),[]),f=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));(0,_.useEffect)((()=>{m&&y(m)}),[m]);const x=(0,g.jsx)(g.Fragment,{children:(0,r.__)("When a user refreshes the thank you page, the purchase event is not sent again. Prevent duplicate transactions in analytics","datalayer-for-ecommerce-free")}),v=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable this option if user information show when logged.","datalayer-for-ecommerce-free")}),b=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable this option via javascript as an alternative when your theme fails to load the hook add_to_cart with php.","datalayer-for-ecommerce-free")});return(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Ecommerce Advanced","datalayer-for-ecommerce-free")}),p?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Show user info","datalayer-for-ecommerce-free"),checked:u.data_layer_google_tag_manager_show_user_info,onChange:e=>h(e,"data_layer_google_tag_manager_show_user_info"),help:v}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{d(!0),await t("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_show_user_info:u.data_layer_google_tag_manager_show_user_info},f),d(!1),a((0,r.__)("Settings saved!","datalayer-for-ecommerce-free"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),o("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:i,children:i?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-ecommerce-free")]}):(0,r.__)("Save","datalayer-for-ecommerce-free")})}),(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Trigger Purchase only once","datalayer-for-ecommerce-free"),checked:u.data_layer_google_tag_manager_purchase_only_once,onChange:e=>h(e,"data_layer_google_tag_manager_purchase_only_once"),help:x}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Events with Javascript","datalayer-for-ecommerce-free"),checked:u.data_layer_google_tag_manager_javascript_events,onChange:e=>h(e,"data_layer_google_tag_manager_javascript_events"),help:b})]})]}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},b=e=>{const{createSuccessNotice:a,createErrorNotice:o}=(0,n.useDispatch)(s.store),t=(0,n.useDispatch)(),[i,d]=(0,_.useState)(!1),{getFields:m,isLoading:p}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[u,y]=(0,_.useState)({data_layer_google_tag_manager_debug_activate:!1}),h=((0,_.useCallback)(((e,a)=>{y((o=>({...o,[a]:e})))}),[]),(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState())));(0,_.useEffect)((()=>{m&&y(m)}),[m]);const f=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Activate DEBUG BAR TEST MODE","datalayer-for-ecommerce-free")});return(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Extra Debug Bar","datalayer-for-ecommerce-free")}),p?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.ToggleControl,{disabled:!0,__nextHasNoMarginBottom:!0,label:(0,r.__)("Activate Test Debugger Bar","datalayer-for-ecommerce-free"),help:f}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{d(!0),await t("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_debug_activate:u.data_layer_google_tag_manager_debug_activate},h),d(!1),a((0,r.__)("Settings saved!","datalayer-for-ecommerce-free"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),o("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0,children:i?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-ecommerce-free")]}):(0,r.__)("Save","datalayer-for-ecommerce-free")})})]})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},j=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,n.useDispatch)(s.store),[o,t]=((0,n.useDispatch)(),(0,_.useState)(!1)),{getFields:i,isLoading:d}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[m,p]=(0,_.useState)({}),u=(0,_.useCallback)(((e,a)=>{p((o=>({...o,[a]:e})))}),[]);(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState())),(0,_.useEffect)((()=>{i&&p(i)}),[i]);const y=(0,g.jsxs)(g.Fragment,{children:[(0,r.__)("Enable to trigger Popup Consent Mode. ","datalayer-for-woocommerce"),(0,g.jsx)(l.ExternalLink,{href:"https://support.google.com/tagmanager/answer/10718549",children:"Read more"})]}),h=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger ad_storage consent option","datalayer-for-woocommerce")}),f=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger ad_user_data consent option","datalayer-for-woocommerce")}),x=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger ad_personalization consent option","datalayer-for-woocommerce")}),v=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger analytics_storage consent option","datalayer-for-woocommerce")}),b=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger functionality_storage consent option","datalayer-for-woocommerce")}),j=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger personalization_storage consent option","datalayer-for-woocommerce")}),w=(0,g.jsx)(g.Fragment,{children:(0,r.__)("Enable to trigger security_storage consent option","datalayer-for-woocommerce")});return(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Popup Consent Mode","datalayer-for-woocommerce")}),d?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Popup Consent Mode","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup"),help:y}),(0,g.jsx)("div",{className:"form-subtitle",children:(0,r.__)("Consent Types","datalayer-for-woocommerce")}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Ad Storage","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_ad_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_ad_storage"),help:h,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_ad_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_ad_storage"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_ad_storage,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Ad Storage Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_ad_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_text_ad_storage"),help:(0,r.__)("Example: Enables storage (such as cookies) related to advertising","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_ad_storage,className:"components-base-control-bottom-minus"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Ad User Data","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_ad_user_data,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_ad_user_data"),help:f,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_ad_user_data,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_ad_user_data"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_ad_user_data,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Ad User Data Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_ad_user_data,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_text_ad_user_data"),help:(0,r.__)("Example: Sets consent for sending user data related to advertising to Google","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_ad_user_data,className:"components-base-control-bottom-minus"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Ad Personalization","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_ad_personalization,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_ad_personalization"),help:x,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_ad_personalization,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_ad_personalization"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_ad_personalization,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Ad Personalization Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_ad_personalization,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_text_ad_personalization"),help:(0,r.__)("Example: Sets consent for personalized advertising","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_ad_personalization,className:"components-base-control-bottom-minus"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Analytics Storage","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_analytics_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_analytics_storage"),help:v,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_analytics_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_analytics_storage"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_analytics_storage,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Analytics Storage Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_analytics_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_text_analytics_storage"),help:(0,r.__)("Example: Enables storage (such as cookies) related to analytics e.g. visit duration","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_analytics_storage,className:"components-base-control-bottom-minus"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Functionality Storage","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_functionality_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_functionality_storage"),help:b,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_functionality_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_functionality_storage"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_functionality_storage,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Functionality Storage Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_functionality_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_text_functionality_storage"),help:(0,r.__)("Example: Enables storage that supports the functionality of the website or app e.g. language settings","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_functionality_storage,className:"components-base-control-bottom-minus"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Personalization Storage","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_personalization_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_personalization_storage"),help:j,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_personalization_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_personalization_storage"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_personalization_storage,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Personalization Storage Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_personalization_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_text_personalization_storage"),help:(0,r.__)("Example: Enables storage related to personalization e.g. video recommendations","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_personalization_storage,className:"components-base-control-bottom-minus"}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Security Storage","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_security_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_security_storage"),help:w,disabled:!m.data_layer_google_tag_manager_consent_mode_popup}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Active Default","datalayer-for-woocommerce"),checked:m.data_layer_google_tag_manager_consent_mode_popup_active_default_security_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_active_default_security_storage"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_security_storage,className:"components-base-control-bottom-minus-active"}),(0,g.jsx)(l.TextControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Security Storage Text Description","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_text_security_storage,onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_text_security_storage"),help:(0,r.__)("Example: Enables storage related to security such as authentication functionality, fraud prevention, and other user protection","datalayer-for-woocommerce"),disabled:!m.data_layer_google_tag_manager_consent_mode_popup_active_security_storage,className:"components-base-control-bottom-minus"}),(0,g.jsx)("div",{className:"form-subtitle",children:(0,r.__)("Popup Style","datalayer-for-woocommerce")}),(0,g.jsx)(l.SelectControl,{__nextHasNoMarginBottom:!0,disabled:!0,label:(0,r.__)("Style","datalayer-for-woocommerce"),value:m.data_layer_google_tag_manager_consent_mode_popup_style,options:[{label:"BOTTOM",value:"BOTTOM"},{label:"FLOAT LEFT",value:"FLOAT LEFT"},{label:"FLOAT RIGHT",value:"FLOAT RIGHT"},{label:"CENTER",value:"CENTER"}],onChange:e=>u(e,"data_layer_google_tag_manager_consent_mode_popup_style"),help:(0,r.__)("Select popup style","datalayer-for-woocommerce")}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{t(!0),e((0,r.__)("Settings saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0,children:o?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-woocommerce")]}):(0,r.__)("Save","datalayer-for-woocommerce")})})]})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},w=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,n.useDispatch)(s.store),o=(0,n.useDispatch)(),[t,i]=(0,_.useState)(!1),{getFields:d,isLoading:m}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings")})),[]),[p,u]=(0,_.useState)({data_layer_google_tag_manager_post_data_active:!1,data_layer_google_tag_manager_post_data_page_title:!1,data_layer_google_tag_manager_post_data_visitor_type:!1,data_layer_google_tag_manager_post_data_page_post_type:!1,data_layer_google_tag_manager_post_data_page_post_date:!1,data_layer_google_tag_manager_post_data_page_post_author:!1,data_layer_google_tag_manager_post_data_page_post_author_id:!1,data_layer_google_tag_manager_post_data_page_category:!1,data_layer_google_tag_manager_post_data_page_tags:!1,data_layer_google_tag_manager_post_data_page_id:!1}),y=(0,_.useCallback)(((e,a)=>{u((o=>({...o,[a]:e})))}),[]),h=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));return(0,_.useEffect)((()=>{d&&u(d)}),[d]),(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Post Data","datalayer-for-woocommerce")}),(0,g.jsxs)("div",{className:"form-legend",children:[(0,g.jsxs)(l.Tip,{children:[(0,r.__)("Select the post data that will be used to trigger the","datalayer-for-woocommerce")," ",(0,g.jsx)("b",{children:"Pageview"})," event."]}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{})]}),m?(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Active Event Pageview","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_active"),help:(0,r.__)("Active Event Pageview","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Title","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_title"),help:(0,r.__)("Insert pageTitle parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Visitor Type","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_visitor_type"),help:(0,r.__)("Insert visitorType parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Post Type","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_post_type"),help:(0,r.__)("Insert pagePostType parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Date","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_post_date"),help:(0,r.__)("Insert pagePostDate parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Author","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_post_author"),help:(0,r.__)("Insert pagePostAuthor parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Author ID","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_post_author_id"),help:(0,r.__)("Insert pagePostAuthorId parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Category","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_category"),help:(0,r.__)("Insert pageCategory parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page Tags","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_tags"),help:(0,r.__)("Insert pageTags parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)(l.ToggleControl,{__nextHasNoMarginBottom:!0,label:(0,r.__)("Page ID","datalayer-for-woocommerce"),onChange:e=>y(e,"data_layer_google_tag_manager_post_data_page_id"),help:(0,r.__)("Insert pageId parameter","datalayer-for-woocommerce"),disabled:!0}),(0,g.jsx)("div",{className:"form-buttons",children:(0,g.jsx)(l.Button,{onClick:async()=>{try{i(!0),await o("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_post_data_active:p.data_layer_google_tag_manager_post_data_active,data_layer_google_tag_manager_post_data_page_title:p.data_layer_google_tag_manager_post_data_page_title,data_layer_google_tag_manager_post_data_visitor_type:p.data_layer_google_tag_manager_post_data_visitor_type,data_layer_google_tag_manager_post_data_page_post_type:p.data_layer_google_tag_manager_post_data_page_post_type,data_layer_google_tag_manager_post_data_page_post_date:p.data_layer_google_tag_manager_post_data_page_post_date,data_layer_google_tag_manager_post_data_page_post_author:p.data_layer_google_tag_manager_post_data_page_post_author,data_layer_google_tag_manager_post_data_page_post_author_id:p.data_layer_google_tag_manager_post_data_page_post_author_id,data_layer_google_tag_manager_post_data_page_category:p.data_layer_google_tag_manager_post_data_page_category,data_layer_google_tag_manager_post_data_page_tags:p.data_layer_google_tag_manager_post_data_page_tags,data_layer_google_tag_manager_post_data_page_id:p.data_layer_google_tag_manager_post_data_page_id},h),i(!1),e((0,r.__)("Settings saved!","datalayer-for-woocommerce"),{type:"snackbar"})}catch(e){console.error("Error saving settings:",e),a("An error occurred while saving settings.",{type:"snackbar"})}},variant:"primary",disabled:!0,children:t?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Saving","datalayer-for-woocommerce")]}):(0,r.__)("Save","datalayer-for-woocommerce")})})]})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},S=()=>{const{createSuccessNotice:e,createErrorNotice:a}=(0,n.useDispatch)(s.store),o=(0,n.useDispatch)(),[t,i]=(0,_.useState)(!1),[d,m]=(0,_.useState)(!1),[p,y]=(0,_.useState)(null),[f,x]=(0,_.useState)(!1),[v,b]=(0,_.useState)(null),[j,w]=(0,_.useState)(null),{getFields:S,isLoading:C,getBrands:N}=(0,n.useSelect)((e=>({getFields:e("shop-datalayer-for-ecommerce-free").getState(),isLoading:e("shop-datalayer-for-ecommerce-free").hasFinishedResolution("getSettings"),getBrands:e(h.store).getTaxonomies({type:"product"})})),[]),[T,E]=(0,_.useState)({data_layer_google_tag_manager_catalog_feed:[]}),[k,F]=(0,_.useState)({});(N?N.map((e=>({label:e.labels.name,value:e.slug}))):[]).unshift({label:"Do not use",value:"none"}),(0,_.useCallback)(((e,a)=>{F((o=>({...o,[a]:e})))}),[]);const B=(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getState()));return(0,_.useEffect)((()=>{S&&E(S)}),[S]),(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Catalog Feed","datalayer-for-woocommerce")}),(0,g.jsxs)("div",{className:"form-legend",children:[(0,g.jsx)(l.Tip,{children:(0,r.__)("Create a Catalog Feed files for platforms.","datalayer-for-woocommerce")}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{})]}),C?(0,g.jsx)(g.Fragment,{children:f?(0,g.jsx)(g.Fragment,{}):(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)("div",{className:"premium-function",children:[(0,g.jsx)("span",{children:(0,g.jsx)(l.ExternalLink,{href:"https://woocommerce.com/products/datalayer-for-woocommerce/",className:"link-premium-function",children:"Unlock with Premium"})}),(0,g.jsxs)("table",{className:"wp-list-table widefat fixed striped table-view-list",children:[(0,g.jsx)("thead",{children:(0,g.jsxs)("tr",{children:[(0,g.jsx)("td",{style:{width:100},children:"#"}),(0,g.jsx)("td",{children:(0,r.__)("Catalog Name","datalayer-for-woocommerce")}),(0,g.jsx)("td",{children:(0,r.__)("Catalog Type","datalayer-for-woocommerce")}),(0,g.jsx)("td",{children:(0,r.__)("Status","datalayer-for-woocommerce")}),(0,g.jsx)("td",{style:{width:450},children:(0,r.__)("Actions","datalayer-for-woocommerce")})]})}),(0,g.jsx)("tbody",{})]}),(0,g.jsxs)("div",{className:"form-fields-button",children:[(0,g.jsx)(l.Button,{onClick:()=>{const e=T.data_layer_google_tag_manager_catalog_feed;let a=1;e.length>0&&(a=Math.max(...e.map((e=>parseInt(e.id,10))))+1),F({id:a,status:!1,name:"",type:"",feedUrl:"",idSettings:"",description:"",availability:"",brands:"",quantity_to_sell_on_facebook:"",gtin:"",mpn:"",google_product_category:[],identifier_exists:"",custom_label_0:"",custom_label_1:"",custom_label_2:"",custom_label_3:"",custom_label_4:""}),x(!0)},variant:"primary",disabled:!0,children:(0,r.__)("Create","datalayer-for-woocommerce")}),(0,g.jsx)(l.Button,{onClick:async()=>{try{i(!0);const a=await u()({method:"GET",path:"/datalayer-for-woocommerce/v1/generate-feed"});if(a){const t=T.data_layer_google_tag_manager_catalog_feed.map((e=>{const o=a.find((a=>a.id===e.id));return o?{...e,feedUrl:o.feed_url}:e}));E((e=>({...e,data_layer_google_tag_manager_catalog_feed:t}))),await o("shop-datalayer-for-ecommerce-free").saveSettings({data_layer_google_tag_manager_catalog_feed:t},B),e((0,r.__)("Generated feed catalog!","datalayer-for-woocommerce"),{type:"snackbar"}),i(!1)}}catch(e){console.error(e),a(e.message+". Please inform your system administrator.",{explicitDismiss:!0,type:"snackbar",icon:"⛔"}),i(!1)}},variant:"secondary",style:{marginLeft:"10px"},disabled:!0,children:t?(0,g.jsxs)(g.Fragment,{children:[(0,g.jsx)(l.Spinner,{}),(0,r.__)("Generating","datalayer-for-woocommerce")]}):(0,r.__)("Generate Feed","datalayer-for-woocommerce")})]})]})})}):(0,g.jsx)(l.Spinner,{style:{height:"calc(4px * 20)",width:"calc(4px * 20)"}})]})},C=()=>(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("Help","datalayer-for-ecommerce-free")}),(0,g.jsxs)(l.Flex,{gap:"20",justify:"flex-start",children:[(0,g.jsx)(l.FlexItem,{children:(0,g.jsxs)(l.Card,{children:[(0,g.jsx)(l.CardHeader,{children:(0,g.jsx)(l.__experimentalHeading,{level:1,children:(0,r.__)("Contact us","datalayer-for-ecommerce-free")})}),(0,g.jsx)(l.CardBody,{children:(0,g.jsx)(l.Button,{variant:"secondary",href:"https://wordpress.org/support/plugin/datalayer-for-ecommerce-free/",target:"_blank",children:(0,r.__)("Create ticket","datalayer-for-ecommerce-free")})})]})}),(0,g.jsx)(l.FlexItem,{children:(0,g.jsxs)(l.Card,{children:[(0,g.jsx)(l.CardHeader,{children:(0,g.jsx)(l.__experimentalHeading,{level:1,children:(0,r.__)("Configuration","datalayer-for-ecommerce-free")})}),(0,g.jsx)(l.CardBody,{children:(0,g.jsx)(l.Button,{variant:"secondary",href:"https://wordpress.org/plugins/datalayer-for-ecommerce-free/#installation",target:"_blank",children:(0,r.__)("View documentation","datalayer-for-ecommerce-free")})})]})}),(0,g.jsx)(l.FlexItem,{children:(0,g.jsxs)(l.Card,{children:[(0,g.jsx)(l.CardHeader,{children:(0,g.jsx)(l.__experimentalHeading,{level:1,children:(0,r.__)("Review","datalayer-for-ecommerce-free")})}),(0,g.jsx)(l.CardBody,{children:(0,g.jsx)(l.Button,{variant:"secondary",href:"https://wordpress.org/support/plugin/datalayer-for-ecommerce-free/reviews/#new-post",target:"_blank",children:(0,r.__)("Send your review","datalayer-for-ecommerce-free")})})]})})]})]}),N=()=>(0,g.jsxs)("div",{className:"my-gutenberg-form",children:[(0,g.jsx)(c.SectionHeader,{title:(0,r.__)("About","datalayer-for-ecommerce-free")}),(0,g.jsxs)("p",{children:["= 4.8.0 - 2025-05-14 =",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.8.1 WC 9.8.5",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 4.6.0 - 2025-01-29 =",(0,g.jsx)("br",{}),"* Update: Packages dependencies",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.7.1 WC 9.6.0",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 4.3.0 - 2024-10-28 =",(0,g.jsx)("br",{}),"* New: Option Show view_item_list related product in product page",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.6.2 WC 9.3.3",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 4.0.0 - 2024-07-03 =",(0,g.jsx)("br",{}),"* Remove: Option DataLayer for WooCommerce Enhanced Ecommerce removed",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.5.5 WC 9.0.2",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 3.4.0 - 2024-06-10 =",(0,g.jsx)("br",{}),"* Update: Push Datalayer function without jQuery",(0,g.jsx)("br",{}),"* Update: Get Country Code Phone Number User",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.5.3 WC 8.9.2",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 3.3.0 - 2024-03-27 =",(0,g.jsx)("br",{}),"* New: Parameter item_category with multiples categories in all events",(0,g.jsx)("br",{}),"* Fix: Php 8.2 deprecated function get options",(0,g.jsx)("br",{}),"* Fix: Product tax update in item price",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.4.3 WC 8.7.0",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 3.2.0 - 2023-12-15 =",(0,g.jsx)("br",{}),"* Update: Compatibility with multicurrency WPML plugin",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.4.2 WC 8.4.0",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 3.1.0 - 2023-11-29 =",(0,g.jsx)("br",{}),"* Update: Select only one datalayer type in ecommerce settings",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.4.1 WC 8.3.1",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 3.0.0 - 2023-10-30 =",(0,g.jsx)("br",{}),"* New: Full compatibility with WooCommerce Blocks",(0,g.jsx)("br",{}),"* New: New Modern Admin Page",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.3.2 WC 8.2.1",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 2.7.0 - 2023-06-21 =",(0,g.jsx)("br",{}),"* New: Select if user information show or not when logged",(0,g.jsx)("br",{}),"* New: Full Compatibility HPOS - High-Performance order storage (COT)",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.2.2 WC 7.8.0",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 2.4.0 - 2023-03-29 =",(0,g.jsx)("br",{}),"* Support: Support -> WP 6.1.1 WC 7.5.1",(0,g.jsx)("br",{}),"* Update: optimization and improvement of the code that triggers the events",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 2.0.2 - 2022-09-21 =",(0,g.jsx)("br",{}),"* Support: WP 6.0.2 WC 6.9.3",(0,g.jsx)("br",{}),"* Fix: Multisite full support check WooCommerce Active",(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),(0,g.jsx)("br",{}),"= 2.0.0 - 2022-06-22 =",(0,g.jsx)("br",{}),"* First Release",(0,g.jsx)("br",{})]})]}),T=window.wp.primitives,E=(0,g.jsx)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,g.jsx)(T.Path,{d:"M4.75 4a.75.75 0 0 0-.75.75v7.826c0 .2.08.39.22.53l6.72 6.716a2.313 2.313 0 0 0 3.276-.001l5.61-5.611-.531-.53.532.528a2.315 2.315 0 0 0 0-3.264L13.104 4.22a.75.75 0 0 0-.53-.22H4.75ZM19 12.576a.815.815 0 0 1-.236.574l-5.61 5.611a.814.814 0 0 1-1.153 0L5.5 12.264V5.5h6.763l6.5 6.502a.816.816 0 0 1 .237.574ZM8.75 9.75a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"})}),k=(0,g.jsx)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:(0,g.jsx)(T.Path,{fillRule:"evenodd",d:"M19.75 11H21V8.667L19.875 4H4.125L3 8.667V11h1.25v8.75h15.5V11zm-1.5 0H5.75v7.25H10V13h4v5.25h4.25V11zm-5.5-5.5h2.067l.486 3.24.028.76H12.75v-4zm-3.567 0h2.067v4H8.669l.028-.76.486-3.24zm7.615 3.1l-.464-3.1h2.36l.806 3.345V9.5h-2.668l-.034-.9zM7.666 5.5h-2.36L4.5 8.845V9.5h2.668l.034-.9.464-3.1z",clipRule:"evenodd"})}),F=(0,g.jsxs)(T.SVG,{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",children:[(0,g.jsx)(T.Path,{d:"m19 7.5h-7.628c-.3089-.87389-1.1423-1.5-2.122-1.5-.97966 0-1.81309.62611-2.12197 1.5h-2.12803v1.5h2.12803c.30888.87389 1.14231 1.5 2.12197 1.5.9797 0 1.8131-.62611 2.122-1.5h7.628z"}),(0,g.jsx)(T.Path,{d:"m19 15h-2.128c-.3089-.8739-1.1423-1.5-2.122-1.5s-1.8131.6261-2.122 1.5h-7.628v1.5h7.628c.3089.8739 1.1423 1.5 2.122 1.5s1.8131-.6261 2.122-1.5h2.128z"})]}),B=({items:e,activeItem:a,onItemClick:o})=>(0,g.jsx)("div",{className:"custom-navigation",children:e.map((e=>(0,g.jsx)(l.Button,{onClick:()=>o(e.item),className:"navigation-item-button "+(a===e.item?"is-active":""),children:(0,g.jsx)("span",{className:"navigation-item-label",children:e.title})},e.item)))}),M=({onNavItemChange:e,activeNavItem:a})=>{const o=a=>{e(a)};return(0,g.jsx)(g.Fragment,{children:(0,g.jsxs)(l.Panel,{children:[(0,g.jsx)(l.PanelBody,{icon:E,title:"Google Tag Manager",initialOpen:!0,children:(0,g.jsx)(l.PanelRow,{children:(0,g.jsx)(B,{activeItem:a,onItemClick:o,items:[{item:"item-1",title:(0,r.__)("Settings","datalayer-for-woocommerce")},{item:"item-2",title:(0,r.__)("Tags Synchronization","datalayer-for-woocommerce")},{item:"item-3",title:(0,r.__)("Consent Mode","datalayer-for-woocommerce")},{item:"item-4",title:(0,r.__)("Server-to-Server","datalayer-for-woocommerce")}]})})}),(0,g.jsx)(l.PanelBody,{title:"Ecommerce",icon:k,initialOpen:!0,children:(0,g.jsx)(l.PanelRow,{children:(0,g.jsx)(B,{activeItem:a,onItemClick:o,items:[{item:"item-5",title:(0,r.__)("Settings","datalayer-for-woocommerce")},{item:"item-6",title:(0,r.__)("Promotions","datalayer-for-woocommerce")},{item:"item-7",title:(0,r.__)("Advanced","datalayer-for-woocommerce")}]})})}),(0,g.jsx)(l.PanelBody,{title:"Extra",icon:F,initialOpen:!0,children:(0,g.jsx)(l.PanelRow,{children:(0,g.jsx)(B,{activeItem:a,onItemClick:o,items:[{item:"item-8",title:(0,r.__)("Debug Bar","datalayer-for-woocommerce")},{item:"item-9",title:(0,r.__)("Popup Consent Mode","datalayer-for-woocommerce")},{item:"item-10",title:(0,r.__)("Post Data","datalayer-for-woocommerce")},{item:"item-11",title:(0,r.__)("Catalog Feed","datalayer-for-woocommerce")},{item:"item-12",title:(0,r.__)("Help","datalayer-for-woocommerce")},{item:"item-13",title:(0,r.__)("About","datalayer-for-woocommerce")}]})})})]})})},P={tracking_google_tag_manager:"",data_layer_google_tag_manager_enhanced_ecommerce:!1,data_layer_google_tag_manager_ecommerce_ga4:!1,data_layer_google_tag_manager_show_user_info:!1,data_layer_google_tag_manager_related_product_show:!1},H={initSettings:e=>({type:"STATE_FROM_DATABASE",payload:{...e}}),*saveSettings(e,a){const o={...P,...a,...e};try{return yield H.saveSettingsToDatabase(o),{type:"SAVE_SETTINGS",payload:o}}catch(e){throw e}},saveSettingsToDatabase:e=>({type:"SAVE_SETTINGS_TO_DATABASE",payload:e})},D={getState:e=>({...P,...e}),getSettings(e){const{...a}=e;return a},getEcommerceData(e){const{data_layer_google_tag_manager_purchase_only_once:a,data_layer_google_tag_manager_show_user_info:o,data_layer_google_tag_manager_javascript_events:t}=e;return{data_layer_google_tag_manager_purchase_only_once:a,data_layer_google_tag_manager_show_user_info:o,data_layer_google_tag_manager_javascript_events:t}}},A={getSettings:()=>async({dispatch:e})=>{const a=await u()({path:"/wp/v2/settings"});e.initSettings(a.options_tracking_option_free)}},L={async SAVE_SETTINGS_TO_DATABASE(e){try{const a=await u()({path:"/wp/v2/settings"});if(a&&a.options_tracking_option_free)return await u()({path:"/wp/v2/settings",method:"PUT",body:JSON.stringify({options_tracking_option_free:e.payload})}),e;throw"error"}catch(e){throw e}}},I=(0,n.createReduxStore)("shop-datalayer-for-ecommerce-free",{reducer:(e=P,a)=>{switch(a.type){case"STATE_FROM_DATABASE":case"SAVE_SETTINGS":return{...e,...a.payload};default:return e}},actions:H,selectors:D,resolvers:A,controls:L});(0,n.register)(I);const z=o.p+"images/logo-datalayer-for-ecommerce-free.1980fdad.png",R=()=>{const[e,a]=(0,_.useState)("item-1");return(0,n.useSelect)((e=>e("shop-datalayer-for-ecommerce-free").getSettings())),(0,g.jsx)("div",{children:(0,g.jsxs)("div",{className:"wrap datalayer-for-ecommerce-free",children:[(0,g.jsxs)("div",{className:"content-sidebar-datalayer-for-ecommerce-free-wrap",children:[(0,g.jsx)("div",{className:"logoDatalayer",children:(0,g.jsx)("img",{src:z,width:"100",alt:"Datalayer for WooCommerce Icon"})}),(0,g.jsx)(M,{onNavItemChange:e=>{a(e)},activeNavItem:e})]}),(0,g.jsxs)("div",{className:"content-form-datalayer-for-ecommerce-free-wrap",children:["item-1"===e&&(0,g.jsx)(i,{}),"item-2"===e&&(0,g.jsx)(d,{}),"item-3"===e&&(0,g.jsx)(m,{}),"item-4"===e&&(0,g.jsx)(y,{}),"item-5"===e&&(0,g.jsx)(f,{}),"item-6"===e&&(0,g.jsx)(x,{}),"item-7"===e&&(0,g.jsx)(v,{}),"item-8"===e&&(0,g.jsx)(b,{}),"item-9"===e&&(0,g.jsx)(j,{}),"item-10"===e&&(0,g.jsx)(w,{}),"item-11"===e&&(0,g.jsx)(S,{}),"item-12"===e&&(0,g.jsx)(C,{}),"item-13"===e&&(0,g.jsx)(N,{})]})]})})};(0,t.addFilter)("woocommerce_admin_pages_list","datalayer-for-ecommerce-free",(e=>(e.push({breadcrumbs:["",wcSettings.woocommerceTranslation,(0,r.__)("Datalayer for WooCommerce FREE","datalayer-for-ecommerce-free")],capability:"manage_options",container:R,path:"/datalayer-for-ecommerce-free",wpOpenMenu:"toplevel_page_woocommerce",title:(0,r.__)("Datalayer for WooCommerce FREE","datalayer-for-ecommerce-free"),navArgs:{id:"datalayer-for-ecommerce-free"}}),e)))})();
  • datalayer-for-ecommerce-free/trunk/datalayer-for-ecommerce-free.php

    r3235108 r3292879  
    22/**
    33 * Plugin Name: Datalayer for WooCommerce FREE
    4  * Plugin URI:  https://wordpress.org/plugins/datalayer-for-ecommerce-free/
     4 * Plugin URI: https://wordpress.org/plugins/datalayer-for-ecommerce-free/
    55 * Description: DataLayer is an object that makes available in real time the information that is executed by users while browsing the WooCommerce Store.
    6  * Version:     4.6.0
     6 * Version: 4.6.0
    77 * Requires at least: 5.2.0
    8  * Tested up to: 6.7.1
    9  * Requires PHP:      7.2
    10  * Author:      Array.codes
    11  * Author URI:  https://array.codes/
     8 * Tested up to: 6.8.1
     9 * Requires PHP: 7.4
     10 * Author: Array.codes
     11 * Author URI: https://array.codes/
    1212 * Developer: Heitor Sousa
    1313 * Developer URI: https://array.codes/
     
    1616 * *
    1717 * WC requires at least: 4.8.0
    18  * WC tested up to: 9.6.0
     18 * WC tested up to: 9.8.5
    1919 *
    2020 * License: GNU General Public License v3.0
  • datalayer-for-ecommerce-free/trunk/readme.txt

    r3235108 r3292879  
    44Tags: datalayer, gtm tag manager, analytics, ga4
    55Requires at least: 5.2.0
    6 Tested up to: 6.7.1
    7 Stable tag: 4.6.0
     6Tested up to: 6.8.1
     7Stable tag: 4.8.0
    88License: GNU General Public License v3.0
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    5757
    5858== Changelog ==
     59= 4.8.0 - 2025-05-14 =
     60* Support: Support -> WP 6.8.1 WC 9.8.5
     61
    5962= 4.6.0 - 2025-01-29 =
    6063* Update: Packages dependencies
  • datalayer-for-ecommerce-free/trunk/src/AdminPageReact.php

    r3235108 r3292879  
    5959                wp_register_script( 'inline-datalayer', '', array(), '1.0', true );
    6060                wp_enqueue_script( 'inline-datalayer' );
    61                 $inline_script = 'document.body.classList.add("woocommerce-admin-page__datalayer-for-woocommerce");';
     61                $inline_script = 'document.body.classList.add("woocommerce-admin-page__datalayer-for-ecommerce-free");';
    6262                wp_add_inline_script( 'inline-datalayer', $inline_script );
    6363            }
Note: See TracChangeset for help on using the changeset viewer.