@carbon/ibmdotcom-web-components 2.16.3 → 2.17.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/custom-elements.json +14 -0
- package/dist/dotcom-shell.js +3 -3
- package/dist/dotcom-shell.min.js +3 -3
- package/dist/ibmdotcom-web-components-dotcom-shell.js +3 -3
- package/dist/ibmdotcom-web-components-dotcom-shell.min.js +3 -3
- package/dist/{index-6eab3305.js → index-8d3f3549.js} +5 -5
- package/dist/{index-3275d9a0.js → index-9e20bd35.js} +6 -6
- package/dist/{left-nav-menu-c5edae3c.js → left-nav-menu-3b31278d.js} +3 -3
- package/dist/{left-nav-menu-category-heading-148e2a21.js → left-nav-menu-category-heading-06933b4e.js} +3 -3
- package/dist/{left-nav-menu-category-heading-6b8e0e50.js → left-nav-menu-category-heading-36e341bc.js} +3 -3
- package/dist/{left-nav-menu-30776e92.js → left-nav-menu-d2bd8482.js} +3 -3
- package/dist/{left-nav-menu-item-6f1d9bdc.js → left-nav-menu-item-7dfb09b2.js} +3 -3
- package/dist/{left-nav-menu-item-1b1d0a2a.js → left-nav-menu-item-b77cabbd.js} +3 -3
- package/dist/{left-nav-menu-section-5f0e1c37.js → left-nav-menu-section-34a575e0.js} +3 -3
- package/dist/{left-nav-menu-section-6760c53a.js → left-nav-menu-section-98f88b8f.js} +3 -3
- package/dist/{left-nav-overlay-72904b5c.js → left-nav-overlay-246572d6.js} +3 -3
- package/dist/{left-nav-overlay-e02a35b2.js → left-nav-overlay-f0cbba35.js} +3 -3
- package/dist/{megamenu-category-group-e751fa62.js → megamenu-category-group-7fcf5b86.js} +3 -3
- package/dist/{megamenu-category-group-3468c0a6.js → megamenu-category-group-8a7c6f13.js} +3 -3
- package/dist/{megamenu-category-group-copy-c5037e56.js → megamenu-category-group-copy-04fcb236.js} +3 -3
- package/dist/{megamenu-category-group-copy-2f105045.js → megamenu-category-group-copy-15e89d02.js} +3 -3
- package/dist/{megamenu-category-heading-f7a3e453.js → megamenu-category-heading-1e036ad2.js} +3 -3
- package/dist/{megamenu-category-heading-e2930aea.js → megamenu-category-heading-d16f009f.js} +3 -3
- package/dist/{megamenu-category-link-b221ded3.js → megamenu-category-link-ac189ac2.js} +3 -3
- package/dist/{megamenu-category-link-8748b545.js → megamenu-category-link-cf4f15c6.js} +7 -7
- package/dist/{megamenu-category-link-group-d54b15df.js → megamenu-category-link-group-53a23f4c.js} +3 -3
- package/dist/{megamenu-category-link-group-25a472c1.js → megamenu-category-link-group-eaa8f41f.js} +3 -3
- package/dist/{megamenu-left-navigation-4514020e.js → megamenu-left-navigation-372fe5b7.js} +3 -3
- package/dist/{megamenu-left-navigation-accb4e75.js → megamenu-left-navigation-d54b5d5b.js} +3 -3
- package/dist/{megamenu-overlay-2941471a.js → megamenu-overlay-393aac8d.js} +3 -3
- package/dist/{megamenu-overlay-5e7df4a6.js → megamenu-overlay-e5b15c9a.js} +3 -3
- package/dist/{megamenu-tab-9884855b.js → megamenu-tab-5b162db1.js} +3 -3
- package/dist/{megamenu-tab-6d423c79.js → megamenu-tab-addeba30.js} +3 -3
- package/es/components/carousel/carousel.js +46 -41
- package/es/components/carousel/carousel.js.map +1 -1
- package/es/components/content-block/content-block-paragraph.d.ts +3 -1
- package/es/components/content-block/content-block-paragraph.js +45 -1
- package/es/components/content-block/content-block-paragraph.js.map +1 -1
- package/es/components/feature-section/defs.d.ts +14 -1
- package/es/components/feature-section/defs.js +10 -1
- package/es/components/feature-section/defs.js.map +1 -1
- package/es/components/feature-section/feature-section.d.ts +3 -2
- package/es/components/feature-section/feature-section.js +74 -30
- package/es/components/feature-section/feature-section.js.map +1 -1
- package/es/components/notice-choice/notice-choice.d.ts +1 -3
- package/es/components/notice-choice/notice-choice.js +69 -170
- package/es/components/notice-choice/notice-choice.js.map +1 -1
- package/es/components/notice-choice/services.d.ts +1 -1
- package/es/components/notice-choice/services.js +4 -4
- package/es/components/notice-choice/services.js.map +1 -1
- package/es/internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings.js +2 -2
- package/lib/components/feature-section/defs.js +10 -2
- package/lib/components/feature-section/defs.js.map +1 -1
- package/lib/internal/vendor/@carbon/ibmdotcom-utilities/utilities/settings/settings.js +2 -2
- package/package.json +6 -6
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @license
|
|
3
3
|
*
|
|
4
|
-
* Copyright IBM Corp. 2020,
|
|
4
|
+
* Copyright IBM Corp. 2020, 2025
|
|
5
5
|
*
|
|
6
6
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
7
7
|
* LICENSE file in the root directory of this source tree.
|
|
8
8
|
*/
|
|
9
9
|
import C4DFeatureCard from '../feature-card/feature-card';
|
|
10
10
|
import '../image/image';
|
|
11
|
-
import { COLOR_SCHEME } from './defs';
|
|
11
|
+
import { COLOR_SCHEME, MEDIA_ALIGNMENT } from './defs';
|
|
12
12
|
declare const C4DFeatureSection_base: {
|
|
13
13
|
new (...args: any[]): {
|
|
14
14
|
linkNode: any;
|
|
@@ -370,6 +370,7 @@ declare class C4DFeatureSection extends C4DFeatureSection_base {
|
|
|
370
370
|
* Color scheme type (regular (default) | inverse | cyan | purple )
|
|
371
371
|
*/
|
|
372
372
|
colorScheme: COLOR_SCHEME;
|
|
373
|
+
mediaAlignment: MEDIA_ALIGNMENT;
|
|
373
374
|
render(): import("lit-html").TemplateResult<1>;
|
|
374
375
|
static get stableSelector(): string;
|
|
375
376
|
static get styles(): import("lit").CSSResult;
|
|
@@ -3,12 +3,14 @@ import _getPrototypeOf from "@babel/runtime/helpers/esm/getPrototypeOf";
|
|
|
3
3
|
import _get from "@babel/runtime/helpers/esm/get";
|
|
4
4
|
let _ = t => t,
|
|
5
5
|
_t,
|
|
6
|
-
_t2
|
|
6
|
+
_t2,
|
|
7
|
+
_t3,
|
|
8
|
+
_t4;
|
|
7
9
|
function _superPropGet(t, e, r, o) { var p = _get(_getPrototypeOf(1 & o ? t.prototype : t), e, r); return 2 & o ? function (t) { return p.apply(r, t); } : p; }
|
|
8
10
|
/**
|
|
9
11
|
* @license
|
|
10
12
|
*
|
|
11
|
-
* Copyright IBM Corp. 2020,
|
|
13
|
+
* Copyright IBM Corp. 2020, 2025
|
|
12
14
|
*
|
|
13
15
|
* This source code is licensed under the Apache-2.0 license found in the
|
|
14
16
|
* LICENSE file in the root directory of this source tree.
|
|
@@ -21,7 +23,7 @@ import C4DFeatureCard from "../feature-card/feature-card.js";
|
|
|
21
23
|
import "../image/image.js";
|
|
22
24
|
import styles from "././feature-section.css.js";
|
|
23
25
|
import StableSelectorMixin from "../../globals/mixins/stable-selector.js";
|
|
24
|
-
import { COLOR_SCHEME } from "./defs.js";
|
|
26
|
+
import { COLOR_SCHEME, MEDIA_ALIGNMENT } from "./defs.js";
|
|
25
27
|
import { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';
|
|
26
28
|
const {
|
|
27
29
|
prefix,
|
|
@@ -62,6 +64,16 @@ let C4DFeatureSection = _decorate([customElement(`${c4dPrefix}-feature-section`)
|
|
|
62
64
|
value() {
|
|
63
65
|
return COLOR_SCHEME.REGULAR;
|
|
64
66
|
}
|
|
67
|
+
}, {
|
|
68
|
+
kind: "field",
|
|
69
|
+
decorators: [property({
|
|
70
|
+
attribute: 'media-alignment',
|
|
71
|
+
reflect: true
|
|
72
|
+
})],
|
|
73
|
+
key: "mediaAlignment",
|
|
74
|
+
value() {
|
|
75
|
+
return MEDIA_ALIGNMENT.RIGHT;
|
|
76
|
+
}
|
|
65
77
|
}, {
|
|
66
78
|
kind: "method",
|
|
67
79
|
key: "render",
|
|
@@ -72,36 +84,68 @@ let C4DFeatureSection = _decorate([customElement(`${c4dPrefix}-feature-section`)
|
|
|
72
84
|
|
|
73
85
|
function render() {
|
|
74
86
|
return html(_t || (_t = _`
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
87
|
+
${0}
|
|
88
|
+
`), this.mediaAlignment === MEDIA_ALIGNMENT.LEFT ? html(_t2 || (_t2 = _`
|
|
89
|
+
<div
|
|
90
|
+
class="${0}--grid ${0}--feature-section"
|
|
91
|
+
part="grid grid--wrapper">
|
|
92
|
+
<div
|
|
93
|
+
class="${0}--row ${0}--feature-section__container"
|
|
94
|
+
part="row row--container">
|
|
95
|
+
<div
|
|
96
|
+
class="${0}--col-sm-4 ${0}--col-md-8 ${0}--col-lg-8 ${0}--feature-section__image"
|
|
97
|
+
part="col col--image">
|
|
98
|
+
<slot name="image"></slot>
|
|
99
|
+
</div>
|
|
100
|
+
<div
|
|
101
|
+
class="${0}--col-sm-4 ${0}--col-md-8 ${0}--col-lg-8 ${0}--feature-section__body"
|
|
102
|
+
part="col col--body-wrapper">
|
|
103
|
+
<div class="${0}--grid" part="grid grid--body">
|
|
104
|
+
<div class="${0}--row" part="row row--body">
|
|
105
|
+
<div
|
|
106
|
+
class="${0}--col-sm-4 ${0}--col-md-6 ${0}--col-lg-12"
|
|
107
|
+
part="col col--body">
|
|
108
|
+
<slot name="eyebrow"></slot>
|
|
109
|
+
<slot name="heading"></slot>
|
|
110
|
+
<slot name="copy"></slot>
|
|
111
|
+
</div>
|
|
112
|
+
</div>
|
|
113
|
+
</div>
|
|
114
|
+
<slot name="footer"></slot>
|
|
115
|
+
</div>
|
|
116
|
+
</div>
|
|
117
|
+
</div>
|
|
118
|
+
`), prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix) : html(_t3 || (_t3 = _`
|
|
119
|
+
<div
|
|
120
|
+
class="${0}--grid ${0}--feature-section"
|
|
121
|
+
part="grid grid--wrapper">
|
|
122
|
+
<div
|
|
123
|
+
class="${0}--row ${0}--feature-section__container"
|
|
124
|
+
part="row row--container">
|
|
125
|
+
<div
|
|
126
|
+
class="${0}--col-sm-4 ${0}--col-md-8 ${0}--col-lg-8 ${0}--feature-section__body"
|
|
127
|
+
part="col col--body-wrapper">
|
|
128
|
+
<div class="${0}--grid" part="grid grid--body">
|
|
129
|
+
<div class="${0}--row" part="row row--body">
|
|
130
|
+
<div
|
|
131
|
+
class="${0}--col-sm-4 ${0}--col-md-6 ${0}--col-lg-12"
|
|
132
|
+
part="col col--body">
|
|
133
|
+
<slot name="eyebrow"></slot>
|
|
134
|
+
<slot name="heading"></slot>
|
|
135
|
+
<slot name="copy"></slot>
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
</div>
|
|
139
|
+
</div>
|
|
86
140
|
<div
|
|
87
|
-
class="${0}--col-sm-4 ${0}--col-md-
|
|
88
|
-
part="col col--
|
|
89
|
-
<slot name="
|
|
90
|
-
<slot name="
|
|
91
|
-
<slot name="copy"></slot>
|
|
141
|
+
class="${0}--col-sm-4 ${0}--col-md-8 ${0}--col-lg-8 ${0}--feature-section__image"
|
|
142
|
+
part="col col--image">
|
|
143
|
+
<slot name="image"></slot>
|
|
144
|
+
<slot name="footer"></slot>
|
|
92
145
|
</div>
|
|
93
146
|
</div>
|
|
94
147
|
</div>
|
|
95
|
-
|
|
96
|
-
<div
|
|
97
|
-
class="${0}--col-sm-4 ${0}--col-md-8 ${0}--col-lg-8 ${0}--feature-section__image"
|
|
98
|
-
part="col col--image">
|
|
99
|
-
<slot name="image"></slot>
|
|
100
|
-
<slot name="footer"></slot>
|
|
101
|
-
</div>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
`), prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix);
|
|
148
|
+
`), prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix, prefix));
|
|
105
149
|
}
|
|
106
150
|
}, {
|
|
107
151
|
kind: "get",
|
|
@@ -115,7 +159,7 @@ let C4DFeatureSection = _decorate([customElement(`${c4dPrefix}-feature-section`)
|
|
|
115
159
|
static: true,
|
|
116
160
|
key: "styles",
|
|
117
161
|
value: function () {
|
|
118
|
-
return css(
|
|
162
|
+
return css(_t4 || (_t4 = _`
|
|
119
163
|
${0}${0}
|
|
120
164
|
`), _superPropGet(C4DFeatureSection, "styles", this), styles);
|
|
121
165
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"feature-section.js","names":["css","html","property","settings","C4DFeatureCard","styles","StableSelectorMixin","COLOR_SCHEME","carbonElement","customElement","prefix","stablePrefix","c4dPrefix","C4DFeatureSection","_decorate","_initialize","_StableSelectorMixin","constructor","args","F","d","kind","decorators","attribute","reflect","key","value","REGULAR","render","_t","_","
|
|
1
|
+
{"version":3,"file":"feature-section.js","names":["css","html","property","settings","C4DFeatureCard","styles","StableSelectorMixin","COLOR_SCHEME","MEDIA_ALIGNMENT","carbonElement","customElement","prefix","stablePrefix","c4dPrefix","C4DFeatureSection","_decorate","_initialize","_StableSelectorMixin","constructor","args","F","d","kind","decorators","attribute","reflect","key","value","REGULAR","RIGHT","render","_t","_","mediaAlignment","LEFT","_t2","_t3","static","_t4","_superPropGet"],"sources":["components/feature-section/feature-section.ts"],"sourcesContent":["/**\n * @license\n *\n * Copyright IBM Corp. 2020, 2025\n *\n * This source code is licensed under the Apache-2.0 license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\nimport { css, html } from 'lit';\nimport { property } from 'lit/decorators.js';\nimport settings from '@carbon/ibmdotcom-utilities/es/utilities/settings/settings.js';\nimport C4DFeatureCard from '../feature-card/feature-card';\nimport '../image/image';\nimport styles from './feature-section.scss';\nimport StableSelectorMixin from '../../globals/mixins/stable-selector';\nimport { COLOR_SCHEME, MEDIA_ALIGNMENT } from './defs';\nimport { carbonElement as customElement } from '@carbon/web-components/es/globals/decorators/carbon-element.js';\n\nconst { prefix, stablePrefix: c4dPrefix } = settings;\n\n/**\n * Feature Section.\n *\n * @element c4d-feature-section\n * @csspart grid - All grid itens. Usage: `c4d-feature-section::part(grid)`\n * @csspart grid--wrapper - The grid Wrapper. Usage: `c4d-feature-section::part(grid--wrapper)`\n * @csspart grid--body - Thw grid body. Usage: `c4d-feature-section::part(grid--body)`\n * @csspart row - All row items. Usage: `c4d-feature-section::part(row)`\n * @csspart row--container - The row container. Usage: `c4d-feature-section::part(row--container)`\n * @csspart row--body - The row body. Usage: `c4d-feature-section::part(row--body)`\n * @csspart col - All column itens. Usage: `c4d-feature-section::part(col)`\n * @csspart col--body-wrapper - The column wrapper. Usage: `c4d-feature-section::part(col--body-wrapper)`\n * @csspart col--body - The column body. Usage: `c4d-feature-section::part(col--body)`\n * @csspart col--image - The column image. Usage: `c4d-feature-section::part(col--image)`\n */\n@customElement(`${c4dPrefix}-feature-section`)\nclass C4DFeatureSection extends StableSelectorMixin(C4DFeatureCard) {\n /**\n * Color scheme type (regular (default) | inverse | cyan | purple )\n */\n @property({ attribute: 'color-scheme', reflect: true })\n colorScheme = COLOR_SCHEME.REGULAR;\n\n @property({ attribute: 'media-alignment', reflect: true })\n mediaAlignment = MEDIA_ALIGNMENT.RIGHT;\n\n render() {\n return html`\n ${this.mediaAlignment === MEDIA_ALIGNMENT.LEFT\n ? html`\n <div\n class=\"${prefix}--grid ${prefix}--feature-section\"\n part=\"grid grid--wrapper\">\n <div\n class=\"${prefix}--row ${prefix}--feature-section__container\"\n part=\"row row--container\">\n <div\n class=\"${prefix}--col-sm-4 ${prefix}--col-md-8 ${prefix}--col-lg-8 ${prefix}--feature-section__image\"\n part=\"col col--image\">\n <slot name=\"image\"></slot>\n </div>\n <div\n class=\"${prefix}--col-sm-4 ${prefix}--col-md-8 ${prefix}--col-lg-8 ${prefix}--feature-section__body\"\n part=\"col col--body-wrapper\">\n <div class=\"${prefix}--grid\" part=\"grid grid--body\">\n <div class=\"${prefix}--row\" part=\"row row--body\">\n <div\n class=\"${prefix}--col-sm-4 ${prefix}--col-md-6 ${prefix}--col-lg-12\"\n part=\"col col--body\">\n <slot name=\"eyebrow\"></slot>\n <slot name=\"heading\"></slot>\n <slot name=\"copy\"></slot>\n </div>\n </div>\n </div>\n <slot name=\"footer\"></slot>\n </div>\n </div>\n </div>\n `\n : html`\n <div\n class=\"${prefix}--grid ${prefix}--feature-section\"\n part=\"grid grid--wrapper\">\n <div\n class=\"${prefix}--row ${prefix}--feature-section__container\"\n part=\"row row--container\">\n <div\n class=\"${prefix}--col-sm-4 ${prefix}--col-md-8 ${prefix}--col-lg-8 ${prefix}--feature-section__body\"\n part=\"col col--body-wrapper\">\n <div class=\"${prefix}--grid\" part=\"grid grid--body\">\n <div class=\"${prefix}--row\" part=\"row row--body\">\n <div\n class=\"${prefix}--col-sm-4 ${prefix}--col-md-6 ${prefix}--col-lg-12\"\n part=\"col col--body\">\n <slot name=\"eyebrow\"></slot>\n <slot name=\"heading\"></slot>\n <slot name=\"copy\"></slot>\n </div>\n </div>\n </div>\n </div>\n <div\n class=\"${prefix}--col-sm-4 ${prefix}--col-md-8 ${prefix}--col-lg-8 ${prefix}--feature-section__image\"\n part=\"col col--image\">\n <slot name=\"image\"></slot>\n <slot name=\"footer\"></slot>\n </div>\n </div>\n </div>\n `}\n `;\n }\n\n static get stableSelector() {\n return `${c4dPrefix}--feature-section`;\n }\n\n static get styles() {\n return css`\n ${super.styles}${styles}\n `;\n }\n}\n\n/* @__GENERATE_REACT_CUSTOM_ELEMENT_TYPE__ */\nexport default C4DFeatureSection;\n"],"mappings":"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","ignoreList":[]}
|
|
@@ -390,6 +390,7 @@ declare class NoticeChoice extends NoticeChoice_base {
|
|
|
390
390
|
isDisplayed: boolean;
|
|
391
391
|
};
|
|
392
392
|
countrySettings: any;
|
|
393
|
+
noticeOnly: any;
|
|
393
394
|
emailPrechecked: boolean;
|
|
394
395
|
telephonePrechecked: boolean;
|
|
395
396
|
combinedEmailPhonePrechecked: boolean;
|
|
@@ -425,13 +426,10 @@ declare class NoticeChoice extends NoticeChoice_base {
|
|
|
425
426
|
* @param newVal new value of the attrbute
|
|
426
427
|
*/
|
|
427
428
|
attributeChangedCallback(name: any, oldVal: any, newVal: any): void;
|
|
428
|
-
private checkBoxChange;
|
|
429
429
|
static get stableSelector(): string;
|
|
430
430
|
static styles: any;
|
|
431
431
|
checkBoxLegalChange($event: any): void;
|
|
432
432
|
countryBasedLegalNotice(): TemplateResult[];
|
|
433
|
-
checkBoxTemplate(checkbox: any, checked: any, hiddenBox: any): TemplateResult<1>;
|
|
434
|
-
preTextTemplate(): TemplateResult<1>;
|
|
435
433
|
postTextTemplate(): TemplateResult<1>;
|
|
436
434
|
combinedPreTextTemplate(): any;
|
|
437
435
|
checkCombineEmailPhoneBoxChange($event: any): void;
|
|
@@ -14,11 +14,7 @@ let _ = t => t,
|
|
|
14
14
|
_t9,
|
|
15
15
|
_t10,
|
|
16
16
|
_t11,
|
|
17
|
-
_t12
|
|
18
|
-
_t13,
|
|
19
|
-
_t14,
|
|
20
|
-
_t15,
|
|
21
|
-
_t16;
|
|
17
|
+
_t12;
|
|
22
18
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
23
19
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
24
20
|
function _superPropGet(t, e, r, o) { var p = _get(_getPrototypeOf(1 & o ? t.prototype : t), e, r); return 2 & o ? function (t) { return p.apply(r, t); } : p; }
|
|
@@ -266,6 +262,14 @@ let NoticeChoice = _decorate([customElement(`c4d-notice-choice`)], function (_in
|
|
|
266
262
|
})],
|
|
267
263
|
key: "countrySettings",
|
|
268
264
|
value: void 0
|
|
265
|
+
}, {
|
|
266
|
+
kind: "field",
|
|
267
|
+
decorators: [property({
|
|
268
|
+
type: Object,
|
|
269
|
+
attribute: false
|
|
270
|
+
})],
|
|
271
|
+
key: "noticeOnly",
|
|
272
|
+
value: void 0
|
|
269
273
|
}, {
|
|
270
274
|
kind: "field",
|
|
271
275
|
decorators: [property({
|
|
@@ -411,8 +415,9 @@ let NoticeChoice = _decorate([customElement(`c4d-notice-choice`)], function (_in
|
|
|
411
415
|
kind: "method",
|
|
412
416
|
key: "defaultLoadSettings",
|
|
413
417
|
value: function defaultLoadSettings() {
|
|
414
|
-
loadSettings(countryPreferencesSettings => {
|
|
415
|
-
this.countrySettings = countryPreferencesSettings;
|
|
418
|
+
loadSettings(this.environment, countryPreferencesSettings => {
|
|
419
|
+
this.countrySettings = countryPreferencesSettings.preferences;
|
|
420
|
+
this.noticeOnly = countryPreferencesSettings.noticeOnly || ['us'];
|
|
416
421
|
}, error => {
|
|
417
422
|
console.error('error loading content', error);
|
|
418
423
|
});
|
|
@@ -429,8 +434,9 @@ let NoticeChoice = _decorate([customElement(`c4d-notice-choice`)], function (_in
|
|
|
429
434
|
} else if (supportedLanguages(language)) {
|
|
430
435
|
defaultLanguage = supportedLanguages(language);
|
|
431
436
|
}
|
|
432
|
-
loadSettings(countryPreferencesSettings => {
|
|
433
|
-
this.countrySettings = countryPreferencesSettings;
|
|
437
|
+
loadSettings(this.environment, countryPreferencesSettings => {
|
|
438
|
+
this.countrySettings = countryPreferencesSettings.preferences;
|
|
439
|
+
this.noticeOnly = countryPreferencesSettings.noticeOnly || ['us'];
|
|
434
440
|
}, () => {
|
|
435
441
|
this.countrySettings = this.defaultLoadSettings();
|
|
436
442
|
});
|
|
@@ -456,11 +462,7 @@ let NoticeChoice = _decorate([customElement(`c4d-notice-choice`)], function (_in
|
|
|
456
462
|
}
|
|
457
463
|
const hiddenFieldName = `NC_HIDDEN_${key}`;
|
|
458
464
|
newValues[hiddenFieldName] = option[hiddenFieldName];
|
|
459
|
-
|
|
460
|
-
this._onChange(hiddenFieldName, newValues.EMAIL ? 'OPT_IN' : 'OPT_OUT');
|
|
461
|
-
} else {
|
|
462
|
-
this._onChange(hiddenFieldName, newValues[key] ? 'OPT_IN' : 'OPT_OUT');
|
|
463
|
-
}
|
|
465
|
+
this._onChange(hiddenFieldName, newValues.EMAIL ? 'OPT_IN' : 'OPT_OUT');
|
|
464
466
|
});
|
|
465
467
|
if (JSON.stringify(this.values) !== JSON.stringify(newValues)) {
|
|
466
468
|
this.values = newValues;
|
|
@@ -472,10 +474,6 @@ let NoticeChoice = _decorate([customElement(`c4d-notice-choice`)], function (_in
|
|
|
472
474
|
key: "countryChangeAction",
|
|
473
475
|
value: function countryChangeAction() {
|
|
474
476
|
var _this$ncData, _this$country;
|
|
475
|
-
const splitValue = this.language;
|
|
476
|
-
if (splitValue == 'en') {
|
|
477
|
-
this.preText = this.preTextTemplate();
|
|
478
|
-
}
|
|
479
477
|
this.preventFormSubmission = false;
|
|
480
478
|
if ((_this$ncData = this.ncData) !== null && _this$ncData !== void 0 && _this$ncData.mandatoryCheckbox[(_this$country = this.country) === null || _this$country === void 0 ? void 0 : _this$country.toLocaleLowerCase()]) {
|
|
481
479
|
var _this$country2, _this$ncData2, _this$ncData3, _this$ncData4;
|
|
@@ -489,6 +487,7 @@ let NoticeChoice = _decorate([customElement(`c4d-notice-choice`)], function (_in
|
|
|
489
487
|
} else {
|
|
490
488
|
this._onChange('preventFormSubmission', 'formSubmissionYes');
|
|
491
489
|
}
|
|
490
|
+
|
|
492
491
|
/**
|
|
493
492
|
* @description if the user already interacted with the checkboxes,
|
|
494
493
|
* skip country default selection.
|
|
@@ -544,6 +543,11 @@ let NoticeChoice = _decorate([customElement(`c4d-notice-choice`)], function (_in
|
|
|
544
543
|
}
|
|
545
544
|
this.currentLanguage = defaultLanguage;
|
|
546
545
|
if (hasValue && oldVal !== newVal) {
|
|
546
|
+
loadSettings(this.environment, countryPreferencesSettings => {
|
|
547
|
+
this.countrySettings = countryPreferencesSettings.preferences;
|
|
548
|
+
}, error => {
|
|
549
|
+
console.error('error loading content', error);
|
|
550
|
+
});
|
|
547
551
|
loadContent(defaultLanguage, this.environment, ncData => {
|
|
548
552
|
this.ncData = ncData;
|
|
549
553
|
this.prepareCheckboxes();
|
|
@@ -577,42 +581,8 @@ let NoticeChoice = _decorate([customElement(`c4d-notice-choice`)], function (_in
|
|
|
577
581
|
}
|
|
578
582
|
break;
|
|
579
583
|
}
|
|
580
|
-
case 'combine-email-phone':
|
|
581
|
-
{
|
|
582
|
-
if (oldVal !== newVal) {
|
|
583
|
-
this.combineEmailPhone = JSON.parse(newVal);
|
|
584
|
-
}
|
|
585
|
-
break;
|
|
586
|
-
}
|
|
587
584
|
}
|
|
588
585
|
}
|
|
589
|
-
}, {
|
|
590
|
-
kind: "method",
|
|
591
|
-
key: "checkBoxChange",
|
|
592
|
-
value: function checkBoxChange($event) {
|
|
593
|
-
const id = $event.target.id;
|
|
594
|
-
const checked = $event.target.checked;
|
|
595
|
-
const newValues = _objectSpread({}, this.values);
|
|
596
|
-
newValues[id] = !!checked;
|
|
597
|
-
this.values = newValues;
|
|
598
|
-
this.changed = true;
|
|
599
|
-
const hiddenFieldName = `NC_HIDDEN_${id}`;
|
|
600
|
-
const hiddenFieldStatus = checked ? 'PERMISSION' : 'SUPPRESSION';
|
|
601
|
-
this.values[id] = {};
|
|
602
|
-
this.values[id]['checkBoxStatus'] = hiddenFieldStatus;
|
|
603
|
-
let statusPrechecked = '';
|
|
604
|
-
switch (id) {
|
|
605
|
-
case 'EMAIL':
|
|
606
|
-
statusPrechecked = this.emailPrechecked && !checked ? 'CU' : !this.emailPrechecked && checked ? 'UC' : this.emailPrechecked && checked ? 'CC' : 'UU';
|
|
607
|
-
break;
|
|
608
|
-
case 'PHONE':
|
|
609
|
-
statusPrechecked = this.telephonePrechecked && checked ? 'CC' : this.telephonePrechecked && !checked ? 'CU' : !this.telephonePrechecked && checked ? 'UC' : 'UU';
|
|
610
|
-
break;
|
|
611
|
-
}
|
|
612
|
-
this.values[id]['punsStatus'] = statusPrechecked;
|
|
613
|
-
this._onChange(hiddenFieldName, hiddenFieldStatus);
|
|
614
|
-
this._onChange(`${hiddenFieldName}_VALUE`, `NC_HIDDEN_${hiddenFieldStatus}`);
|
|
615
|
-
}
|
|
616
586
|
}, {
|
|
617
587
|
kind: "get",
|
|
618
588
|
static: true,
|
|
@@ -698,67 +668,6 @@ let NoticeChoice = _decorate([customElement(`c4d-notice-choice`)], function (_in
|
|
|
698
668
|
}
|
|
699
669
|
return itemTemplates;
|
|
700
670
|
}
|
|
701
|
-
}, {
|
|
702
|
-
kind: "method",
|
|
703
|
-
key: "checkBoxTemplate",
|
|
704
|
-
value: function checkBoxTemplate(checkbox, checked, hiddenBox) {
|
|
705
|
-
this._onChange(`${hiddenBox.id}_VALUE`, `NC_HIDDEN_${hiddenBox.value}`);
|
|
706
|
-
return html(_t6 || (_t6 = _`<span part="container">
|
|
707
|
-
<div
|
|
708
|
-
class="${0}--form-item cds--checkbox-wrapper"
|
|
709
|
-
part="checkbox-wrapper">
|
|
710
|
-
<input
|
|
711
|
-
type="checkbox"
|
|
712
|
-
class="${0}--checkbox"
|
|
713
|
-
part="checkbox"
|
|
714
|
-
id="${0}"
|
|
715
|
-
name="${0}"
|
|
716
|
-
?checked=${0}
|
|
717
|
-
@change="${0}" />
|
|
718
|
-
<label
|
|
719
|
-
for="${0}"
|
|
720
|
-
class="${0}--checkbox-label ${0}--nc__checkbox-${0}"
|
|
721
|
-
part="checkbox-label"
|
|
722
|
-
><span
|
|
723
|
-
class="${0}--checkbox-label-text"
|
|
724
|
-
part="checkbox-label-text"
|
|
725
|
-
dir="auto"
|
|
726
|
-
>${0}
|
|
727
|
-
</span>
|
|
728
|
-
</label>
|
|
729
|
-
<input
|
|
730
|
-
type="hidden"
|
|
731
|
-
id=${0}
|
|
732
|
-
name=${0}
|
|
733
|
-
value=${0} />
|
|
734
|
-
</div>
|
|
735
|
-
</span>`), prefix, prefix, checkbox.id, checkbox.id, checked, this.checkBoxChange, checkbox.id, prefix, prefix, checkbox.id, prefix, checkbox.labelText, hiddenBox.id, hiddenBox.id, hiddenBox.value);
|
|
736
|
-
}
|
|
737
|
-
}, {
|
|
738
|
-
kind: "method",
|
|
739
|
-
key: "preTextTemplate",
|
|
740
|
-
value: function preTextTemplate() {
|
|
741
|
-
if (this.ncData) {
|
|
742
|
-
var _this$country4;
|
|
743
|
-
const country = (_this$country4 = this.country) === null || _this$country4 === void 0 ? void 0 : _this$country4.toLocaleLowerCase();
|
|
744
|
-
const ecmTranslateContent = this.ncData;
|
|
745
|
-
let preText = ecmTranslateContent.preText;
|
|
746
|
-
if (ecmTranslateContent.state[country]) {
|
|
747
|
-
const state = this.state.toLocaleLowerCase() || '';
|
|
748
|
-
if (country === 'us' && (state === 'ca' || state === '' || typeof state === 'undefined')) {
|
|
749
|
-
preText = ecmTranslateContent.state[country]['ca'].preText;
|
|
750
|
-
} else {
|
|
751
|
-
preText = ecmTranslateContent.state[country][state] ? ecmTranslateContent.state[country][state].preText : ecmTranslateContent.preText;
|
|
752
|
-
}
|
|
753
|
-
}
|
|
754
|
-
if (ecmTranslateContent.country[country]) {
|
|
755
|
-
preText = ecmTranslateContent.country[country.toLowerCase()].preText;
|
|
756
|
-
}
|
|
757
|
-
return html(_t7 || (_t7 = _`${0}`), unsafeHTML(preText));
|
|
758
|
-
} else {
|
|
759
|
-
return html(_t8 || (_t8 = _``));
|
|
760
|
-
}
|
|
761
|
-
}
|
|
762
671
|
}, {
|
|
763
672
|
kind: "method",
|
|
764
673
|
key: "postTextTemplate",
|
|
@@ -782,43 +691,48 @@ let NoticeChoice = _decorate([customElement(`c4d-notice-choice`)], function (_in
|
|
|
782
691
|
if (postText !== '') {
|
|
783
692
|
postText = "<div part='ncPostTextContainer' id='ncPostTextContainer'>" + postText + '</div>';
|
|
784
693
|
}
|
|
785
|
-
return html(
|
|
694
|
+
return html(_t6 || (_t6 = _`${0}`), unsafeHTML(postText));
|
|
786
695
|
} else {
|
|
787
|
-
return html(
|
|
696
|
+
return html(_t7 || (_t7 = _``));
|
|
788
697
|
}
|
|
789
698
|
}
|
|
790
699
|
}, {
|
|
791
700
|
kind: "method",
|
|
792
701
|
key: "combinedPreTextTemplate",
|
|
793
702
|
value: function combinedPreTextTemplate() {
|
|
794
|
-
var _this$
|
|
703
|
+
var _this$country4, _this$state, _ecmTranslateContent$4;
|
|
795
704
|
if (!this.ncData) {
|
|
796
|
-
return html(
|
|
705
|
+
return html(_t8 || (_t8 = _``));
|
|
797
706
|
}
|
|
798
707
|
const ecmTranslateContent = this.ncData;
|
|
799
|
-
const country = ((_this$
|
|
708
|
+
const country = ((_this$country4 = this.country) === null || _this$country4 === void 0 ? void 0 : _this$country4.toLocaleLowerCase()) || '';
|
|
800
709
|
const state = ((_this$state = this.state) === null || _this$state === void 0 ? void 0 : _this$state.toLocaleLowerCase()) || '';
|
|
801
710
|
let preText = ecmTranslateContent.combinedConsent;
|
|
802
711
|
if (ecmTranslateContent.state[country]) {
|
|
803
|
-
if (
|
|
712
|
+
if ((this.noticeOnly || []).includes(country)) {
|
|
804
713
|
preText = state === 'ca' || state === '' ? ecmTranslateContent.state[country]['ca'].noticeOnly : ecmTranslateContent.noticeOnly;
|
|
805
714
|
} else {
|
|
806
715
|
var _ecmTranslateContent$;
|
|
807
716
|
preText = ((_ecmTranslateContent$ = ecmTranslateContent.state[country][state]) === null || _ecmTranslateContent$ === void 0 ? void 0 : _ecmTranslateContent$.combinedConsent) || ecmTranslateContent.combinedConsent;
|
|
808
717
|
}
|
|
809
|
-
} else if (
|
|
718
|
+
} else if ((this.noticeOnly || []).includes(country)) {
|
|
810
719
|
var _ecmTranslateContent$2, _ecmTranslateContent$3;
|
|
811
720
|
preText = state === 'ca' || state === '' || typeof state === 'undefined' ? (_ecmTranslateContent$2 = ecmTranslateContent.state) !== null && _ecmTranslateContent$2 !== void 0 && (_ecmTranslateContent$2 = _ecmTranslateContent$2[country]) !== null && _ecmTranslateContent$2 !== void 0 && (_ecmTranslateContent$2 = _ecmTranslateContent$2['ca']) !== null && _ecmTranslateContent$2 !== void 0 && _ecmTranslateContent$2.noticeOnly ? (_ecmTranslateContent$3 = ecmTranslateContent.state) === null || _ecmTranslateContent$3 === void 0 || (_ecmTranslateContent$3 = _ecmTranslateContent$3[country]) === null || _ecmTranslateContent$3 === void 0 || (_ecmTranslateContent$3 = _ecmTranslateContent$3['ca']) === null || _ecmTranslateContent$3 === void 0 ? void 0 : _ecmTranslateContent$3.noticeOnly : ecmTranslateContent.noticeOnly : ecmTranslateContent.noticeOnly;
|
|
812
721
|
}
|
|
813
722
|
if ((_ecmTranslateContent$4 = ecmTranslateContent.country) !== null && _ecmTranslateContent$4 !== void 0 && _ecmTranslateContent$4[country]) {
|
|
814
723
|
preText = ecmTranslateContent.country[country].combinedConsent;
|
|
815
724
|
}
|
|
816
|
-
if (
|
|
817
|
-
|
|
725
|
+
if (!(this.noticeOnly || []).includes(country)) {
|
|
726
|
+
let isPermissionOrSuppression = false;
|
|
727
|
+
if (typeof this.values.EMAIL === 'object') {
|
|
728
|
+
const checkStatus = this.values.EMAIL;
|
|
729
|
+
isPermissionOrSuppression = checkStatus.checkBoxStatus === 'PERMISSION';
|
|
730
|
+
}
|
|
731
|
+
const checked = typeof this.values.EMAIL === 'object' ? isPermissionOrSuppression : this.values.EMAIL;
|
|
818
732
|
preText = preText ? this.renderCheckbox(preText, checked) : this.renderCheckbox(ecmTranslateContent.preText, checked);
|
|
819
733
|
return preText;
|
|
820
734
|
}
|
|
821
|
-
return html(
|
|
735
|
+
return html(_t9 || (_t9 = _`${0}`), unsafeHTML(preText));
|
|
822
736
|
}
|
|
823
737
|
}, {
|
|
824
738
|
kind: "method",
|
|
@@ -830,7 +744,6 @@ let NoticeChoice = _decorate([customElement(`c4d-notice-choice`)], function (_in
|
|
|
830
744
|
Object.keys(this.checkboxes).map(id => {
|
|
831
745
|
newValues[id] = !!checked;
|
|
832
746
|
this.values = newValues;
|
|
833
|
-
console.log(this.combinedEmailPhonePrechecked);
|
|
834
747
|
const hiddenFieldName = `NC_HIDDEN_${id}`;
|
|
835
748
|
const hiddenFieldStatus = checked ? 'PERMISSION' : 'SUPPRESSION';
|
|
836
749
|
this.values[id] = {};
|
|
@@ -852,7 +765,7 @@ let NoticeChoice = _decorate([customElement(`c4d-notice-choice`)], function (_in
|
|
|
852
765
|
key: "renderCheckbox",
|
|
853
766
|
value: function renderCheckbox(preText, checked) {
|
|
854
767
|
const checkboxId = 'EMAIL_PHONE_CHECKBOX';
|
|
855
|
-
return html(
|
|
768
|
+
return html(_t10 || (_t10 = _`
|
|
856
769
|
<span part="container">
|
|
857
770
|
<div
|
|
858
771
|
class="${0}--form-item cds--checkbox-wrapper"
|
|
@@ -885,11 +798,30 @@ let NoticeChoice = _decorate([customElement(`c4d-notice-choice`)], function (_in
|
|
|
885
798
|
key: "renderCombinedEmailPhoneSection",
|
|
886
799
|
value: function renderCombinedEmailPhoneSection() {
|
|
887
800
|
const getPunsStatus = (key, checked) => {
|
|
888
|
-
var _this$
|
|
889
|
-
|
|
801
|
+
var _this$country5, _this$values$key, _this$values$key2;
|
|
802
|
+
const countryLowerCase = (_this$country5 = this.country) === null || _this$country5 === void 0 ? void 0 : _this$country5.toLocaleLowerCase();
|
|
803
|
+
const isNoticeOnly = (this.noticeOnly || []).includes(countryLowerCase);
|
|
804
|
+
if (isNoticeOnly) {
|
|
805
|
+
return 'NOTICE_ONLY';
|
|
806
|
+
}
|
|
807
|
+
const defaultCountryStatus = {
|
|
808
|
+
email: 'opt-in',
|
|
809
|
+
phone: 'opt-in'
|
|
810
|
+
};
|
|
811
|
+
const countryStatus = countryLowerCase ? this.countrySettings[countryLowerCase] || defaultCountryStatus : defaultCountryStatus;
|
|
812
|
+
const checkboxStatus = (_this$values$key = this.values[key]) === null || _this$values$key === void 0 ? void 0 : _this$values$key.checkBoxStatus;
|
|
813
|
+
if (checkboxStatus === 'SUPPRESSION') {
|
|
814
|
+
if (countryStatus.email === 'opt-in') {
|
|
815
|
+
return 'UU';
|
|
816
|
+
}
|
|
817
|
+
if (countryStatus.email === 'opt-out') {
|
|
818
|
+
return 'CU';
|
|
819
|
+
}
|
|
820
|
+
}
|
|
821
|
+
return ((_this$values$key2 = this.values[key]) === null || _this$values$key2 === void 0 ? void 0 : _this$values$key2.punsStatus) || (checked ? 'CC' : 'UU');
|
|
890
822
|
};
|
|
891
|
-
const createHiddenInput = (id, value) => html(
|
|
892
|
-
return html(
|
|
823
|
+
const createHiddenInput = (id, value) => html(_t11 || (_t11 = _`<input type="hidden" id=${0} name=${0} value=${0} />`), id, id, value);
|
|
824
|
+
return html(_t12 || (_t12 = _`
|
|
893
825
|
<section class="${0}--nc" part="section">
|
|
894
826
|
<p part="ncHeading" id="ncHeading" class="${0}--nc__pre-text ">
|
|
895
827
|
${0} ${0}
|
|
@@ -915,6 +847,13 @@ let NoticeChoice = _decorate([customElement(`c4d-notice-choice`)], function (_in
|
|
|
915
847
|
if (typeof checked !== 'object') {
|
|
916
848
|
this.combinedEmailPhonePrechecked = checked ? true : false;
|
|
917
849
|
}
|
|
850
|
+
if ((this.noticeOnly || []).includes(this.country.toLocaleLowerCase())) {
|
|
851
|
+
const countryStatus = this.country ? this.countrySettings[this.country.toLocaleLowerCase()] : {
|
|
852
|
+
email: 'opt-in',
|
|
853
|
+
phone: 'opt-in'
|
|
854
|
+
};
|
|
855
|
+
hiddenBox.value = countryStatus.email === 'opt-out' ? 'PERMISSION' : 'SUPPRESSION';
|
|
856
|
+
}
|
|
918
857
|
this._onChange(`NC_${key === 'PHONE' ? 'TELE' : key}_DETAIL`, `${key}_${punsStatus}`);
|
|
919
858
|
console.log(`${hiddenBox.id}_VALUE`, `NC_HIDDEN_${hiddenBox.value}`);
|
|
920
859
|
this._onChange(`${hiddenBox.id}_VALUE`, `NC_HIDDEN_${hiddenBox.value}`);
|
|
@@ -933,47 +872,7 @@ let NoticeChoice = _decorate([customElement(`c4d-notice-choice`)], function (_in
|
|
|
933
872
|
const mrsField = (_this$ncData9 = this.ncData) !== null && _this$ncData9 !== void 0 && _this$ncData9.mandatoryCheckbox[this.isMandatoryCheckboxDisplayed.countryCode].countryTransferText ? (_this$ncData10 = this.ncData) === null || _this$ncData10 === void 0 ? void 0 : _this$ncData10.mandatoryCheckbox[this.isMandatoryCheckboxDisplayed.countryCode].countryTransferText.mrs_field : (_this$ncData11 = this.ncData) === null || _this$ncData11 === void 0 ? void 0 : _this$ncData11.mandatoryCheckbox[this.isMandatoryCheckboxDisplayed.countryCode].chinaPIPLtext.mrs_field;
|
|
934
873
|
this._onChange(mrsField, 'countyBasedCheckedNo');
|
|
935
874
|
}
|
|
936
|
-
|
|
937
|
-
return this.renderCombinedEmailPhoneSection();
|
|
938
|
-
}
|
|
939
|
-
return html(_t16 || (_t16 = _`<section class="${0}--nc" part="section">
|
|
940
|
-
<p part='ncHeading' id="ncHeading" class="${0}--nc__pre-text">${0} ${0} </p>
|
|
941
|
-
<div part='${0}--checkbox-group' class="${0}--checkbox-group">
|
|
942
|
-
${0}
|
|
943
|
-
|
|
944
|
-
</div>
|
|
945
|
-
<div part='${0}--nc__post-text' class="${0}--nc__post-text"
|
|
946
|
-
>${0}</div>
|
|
947
|
-
<input type='hidden' id="preventFormSubmission" name="preventFormSubmission" value=${0} />
|
|
948
|
-
</div>
|
|
949
|
-
</section>`), prefix, c4dPrefix, this.countryBasedLegalNotice(), this.preTextTemplate(), prefix, prefix, Object.keys(this.checkboxes).length !== 0 ? Object.keys(this.checkboxes).length > 0 && Object.keys(this.checkboxes).map(key => {
|
|
950
|
-
const checked = this.values[key];
|
|
951
|
-
const checkbox = this.checkboxes[key];
|
|
952
|
-
const punsStatus = this.values[key]['punsStatus'] ? this.values[key]['punsStatus'] : checked ? 'CC' : 'UU';
|
|
953
|
-
const hiddenBox = {
|
|
954
|
-
id: 'NC_HIDDEN_' + key,
|
|
955
|
-
value: this.values[key]['checkBoxStatus'] ? this.values[key]['checkBoxStatus'] : this.values[key] ? 'PERMISSION' : 'SUPPRESSION'
|
|
956
|
-
};
|
|
957
|
-
switch (key) {
|
|
958
|
-
case 'EMAIL':
|
|
959
|
-
this.hiddenEmail = hiddenBox.value;
|
|
960
|
-
this.ncEmailDetail = punsStatus;
|
|
961
|
-
if (typeof checked !== 'object') {
|
|
962
|
-
this.emailPrechecked = checked ? true : false;
|
|
963
|
-
}
|
|
964
|
-
break;
|
|
965
|
-
case 'PHONE':
|
|
966
|
-
this.hiddenPhone = hiddenBox.value;
|
|
967
|
-
this.ncTeleDetail = punsStatus;
|
|
968
|
-
if (typeof checked !== 'object') {
|
|
969
|
-
this.telephonePrechecked = checked ? true : false;
|
|
970
|
-
}
|
|
971
|
-
break;
|
|
972
|
-
}
|
|
973
|
-
const punsValue = key === 'PHONE' ? 'TELE' : key;
|
|
974
|
-
this._onChange(`NC_${punsValue}_DETAIL`, `${key}_${punsStatus}`);
|
|
975
|
-
return this.checkBoxTemplate(checkbox, checked, hiddenBox);
|
|
976
|
-
}) : '', prefix, prefix, this.postTextTemplate(), this.preventFormSubmission);
|
|
875
|
+
return this.renderCombinedEmailPhoneSection();
|
|
977
876
|
}
|
|
978
877
|
}, {
|
|
979
878
|
kind: "field",
|