@ptcwebops/ptcw-design 2.7.4 → 2.7.6

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.
Files changed (64) hide show
  1. package/dist/cjs/fl-tab-content_3.cjs.entry.js +6 -2
  2. package/dist/cjs/loader.cjs.js +1 -1
  3. package/dist/cjs/ptc-announcement.cjs.entry.js +2 -2
  4. package/dist/cjs/ptc-brightcov-video.cjs.entry.js +57 -0
  5. package/dist/cjs/ptc-featured-list.cjs.entry.js +7 -1
  6. package/dist/cjs/ptc-filter-dropdown_4.cjs.entry.js +249 -0
  7. package/dist/cjs/ptc-filter-level-theater.cjs.entry.js +63 -0
  8. package/dist/cjs/ptc-theater-video-modal.cjs.entry.js +88 -0
  9. package/dist/cjs/ptcw-design.cjs.js +1 -1
  10. package/dist/collection/collection-manifest.json +6 -0
  11. package/dist/collection/components/ptc-announcement/ptc-announcement.css +65 -7
  12. package/dist/collection/components/ptc-announcement/ptc-announcement.js +1 -1
  13. package/dist/collection/components/ptc-brightcov-video/ptc-brightcov-video.css +18 -0
  14. package/dist/collection/components/ptc-brightcov-video/ptc-brightcov-video.js +79 -0
  15. package/dist/collection/components/ptc-featured-list/fl-tab-header/fl-tab-header.css +9 -0
  16. package/dist/collection/components/ptc-featured-list/fl-tab-header/fl-tab-header.js +11 -2
  17. package/dist/collection/components/ptc-featured-list/ptc-featured-list.css +13 -10
  18. package/dist/collection/components/ptc-featured-list/ptc-featured-list.js +6 -0
  19. package/dist/collection/components/ptc-filter-dropdown/ptc-filter-dropdown.css +118 -0
  20. package/dist/collection/components/ptc-filter-dropdown/ptc-filter-dropdown.js +134 -0
  21. package/dist/collection/components/ptc-filter-level-theater/ptc-filter-level-theater.css +222 -0
  22. package/dist/collection/components/ptc-filter-level-theater/ptc-filter-level-theater.js +98 -0
  23. package/dist/collection/components/ptc-theater-video/ptc-theater-video.css +68 -0
  24. package/dist/collection/components/ptc-theater-video/ptc-theater-video.js +140 -0
  25. package/dist/collection/components/ptc-theater-video-modal/ptc-theater-video-modal.css +5705 -0
  26. package/dist/collection/components/ptc-theater-video-modal/ptc-theater-video-modal.js +123 -0
  27. package/dist/collection/components/ptc-theater-video-playlist/ptc-theater-video-playlist.css +12 -0
  28. package/dist/collection/components/ptc-theater-video-playlist/ptc-theater-video-playlist.js +99 -0
  29. package/dist/custom-elements/index.d.ts +36 -0
  30. package/dist/custom-elements/index.js +391 -8
  31. package/dist/esm/fl-tab-content_3.entry.js +6 -2
  32. package/dist/esm/loader.js +1 -1
  33. package/dist/esm/ptc-announcement.entry.js +2 -2
  34. package/dist/esm/ptc-brightcov-video.entry.js +53 -0
  35. package/dist/esm/ptc-featured-list.entry.js +7 -1
  36. package/dist/esm/ptc-filter-dropdown_4.entry.js +242 -0
  37. package/dist/esm/ptc-filter-level-theater.entry.js +59 -0
  38. package/dist/esm/ptc-theater-video-modal.entry.js +84 -0
  39. package/dist/esm/ptcw-design.js +1 -1
  40. package/dist/ptcw-design/p-17a5ae95.entry.js +1 -0
  41. package/dist/ptcw-design/p-553505a6.entry.js +1 -0
  42. package/dist/ptcw-design/p-565dd14e.entry.js +1 -0
  43. package/dist/ptcw-design/p-6449b769.entry.js +1 -0
  44. package/dist/ptcw-design/p-739ab9b5.entry.js +1 -0
  45. package/dist/ptcw-design/p-cf70a004.entry.js +1 -0
  46. package/dist/ptcw-design/p-fb88e7a6.entry.js +1 -0
  47. package/dist/ptcw-design/ptcw-design.css +1 -1
  48. package/dist/ptcw-design/ptcw-design.esm.js +1 -1
  49. package/dist/types/components/ptc-brightcov-video/ptc-brightcov-video.d.ts +6 -0
  50. package/dist/types/components/ptc-featured-list/fl-tab-header/fl-tab-header.d.ts +2 -0
  51. package/dist/types/components/ptc-filter-dropdown/ptc-filter-dropdown.d.ts +24 -0
  52. package/dist/types/components/ptc-filter-level-theater/ptc-filter-level-theater.d.ts +14 -0
  53. package/dist/types/components/ptc-theater-video/ptc-theater-video.d.ts +11 -0
  54. package/dist/types/components/ptc-theater-video-modal/ptc-theater-video-modal.d.ts +15 -0
  55. package/dist/types/components/ptc-theater-video-playlist/ptc-theater-video-playlist.d.ts +12 -0
  56. package/dist/types/components.d.ts +107 -0
  57. package/package.json +1 -1
  58. package/readme.md +1 -1
  59. package/dist/cjs/ptc-social-share.cjs.entry.js +0 -80
  60. package/dist/esm/ptc-social-share.entry.js +0 -76
  61. package/dist/ptcw-design/p-12acb46f.entry.js +0 -1
  62. package/dist/ptcw-design/p-515f4332.entry.js +0 -1
  63. package/dist/ptcw-design/p-ac63caae.entry.js +0 -1
  64. package/dist/ptcw-design/p-f1ea577b.entry.js +0 -1
@@ -0,0 +1,123 @@
1
+ import { Host, h } from '@stencil/core';
2
+ export class PtcTheaterVideoModal {
3
+ constructor() {
4
+ this.cards = undefined;
5
+ this.showModal = false;
6
+ this.currentCardIndex = 0;
7
+ this.filteredTagName = undefined;
8
+ }
9
+ // @Listen('filterCliked', { target: 'document' })
10
+ // handleFilterClick(event: CustomEvent) {
11
+ // const filters = event.detail;
12
+ // this.filteredTagName = filters['selected-tag'].trim();
13
+ // }
14
+ async updateData(data, currentModalIndex) {
15
+ // debugger
16
+ console.log(data);
17
+ console.log(this.filteredTagName);
18
+ this.cards = data;
19
+ // this.cards = data.filter((item) => {
20
+ // const videoTagArr = item.vtagName.split(",").map((j) => j.trim());
21
+ // if (this.filteredTagName !== undefined && this.filteredTagName !== 'reset') {
22
+ // return videoTagArr.includes(this.filteredTagName);
23
+ // } else {
24
+ // return true;
25
+ // }
26
+ // });
27
+ console.log(this.cards);
28
+ console.log(currentModalIndex);
29
+ this.currentCardIndex = currentModalIndex;
30
+ this.showModal = true;
31
+ }
32
+ closeCardModal() {
33
+ this.showModal = false;
34
+ this.cards = [];
35
+ }
36
+ showNextCard() {
37
+ if (this.currentCardIndex < this.cards.length - 1) {
38
+ this.currentCardIndex++;
39
+ this.updateVideoPlayer(this.cards[this.currentCardIndex].videoId);
40
+ }
41
+ }
42
+ showPrevCard() {
43
+ if (this.currentCardIndex > 0) {
44
+ this.currentCardIndex--;
45
+ this.updateVideoPlayer(this.cards[this.currentCardIndex].videoId);
46
+ }
47
+ }
48
+ componentDidUpdate() {
49
+ this.initializeVideo();
50
+ }
51
+ initializeVideo() {
52
+ const videoTag = this.hostEl.querySelector(`#bcPlayer`);
53
+ if (videoTag) {
54
+ if (globalThis.bc) {
55
+ new globalThis.bc(videoTag, {
56
+ /* your player options */
57
+ });
58
+ }
59
+ }
60
+ }
61
+ updateVideoPlayer(vId) {
62
+ // debugger
63
+ globalThis.videojs.getPlayer('bcPlayer').ready(function () {
64
+ const myPlayer = this;
65
+ if (vId) {
66
+ myPlayer.catalog.getVideo(vId, function (error, video) {
67
+ myPlayer.catalog.load(video);
68
+ console.log('Video Modal' + error);
69
+ });
70
+ }
71
+ });
72
+ }
73
+ render() {
74
+ return (h(Host, null, h("slot", null), this.showModal && (h("div", { class: "modal" }, h("div", { class: "modal-container ptc-container" }, h("div", { onClick: () => this.closeCardModal(), class: 'vm-close' }, h("svg", { xmlns: "http://www.w3.org/2000/svg", width: "18", height: "18", viewBox: "0 0 18 18", fill: "none" }, h("g", { "clip-path": "url(#clip0_214_927)" }, h("path", { d: "M18 2.8125L15.1875 0L9 6.1875L2.8125 0L0 2.8125L6.1875 9L0 15.1875L2.8125 18L9 11.8125L15.1875 18L18 15.1875L11.8125 9L18 2.8125Z", fill: "white" })), h("defs", null, h("clipPath", { id: "clip0_214_927" }, h("rect", { width: "18", height: "18", fill: "white" }))))), h("div", { class: "is-grid has-col-gap-xl has-row-gap-lg" }, h("div", { class: 'is-col is-col-7-lg' }, h("div", { class: "v-modal-left" }, h("div", { class: 'v-nav' }, h("button", { onClick: () => this.showPrevCard(), disabled: this.currentCardIndex === 0 }, "Previous Video"), h("div", { class: 'v-number' }, " ", this.currentCardIndex + 1, " of ", this.cards.length), h("button", { onClick: () => this.showNextCard(), disabled: this.currentCardIndex === this.cards.length - 1 }, "Next Video")), h("div", { class: 'aspect-ratio-container ' }, h("div", { class: 'video-container' }, h("video-js", { id: "bcPlayer", "data-account": "1532789042001", "data-player": "HknUe20R", "data-embed": "default", "data-video-id": this.cards[this.currentCardIndex].videoId, controls: "", "data-application-id": "", class: `dpm-vj-${this.currentCardIndex} video-js vjs-fills` }))), h("div", { class: "card-description-content" }, h("ptc-title", { type: "h3", "title-size": "large", "title-color": "white", upperline: "no-upperline", "title-shadow": "", "title-height": "densest", "title-margin": "margin-top-1", "title-weight": "w-7" }, this.cards[this.currentCardIndex].title), h("ptc-para", { "font-size": "medium", "font-weight": "w-4", "para-color": "white", "para-line-h": "line-height-p" }, this.cards[this.currentCardIndex].cardDescription)))), h("div", { class: 'is-col is-col-5-lg' }, h("div", { class: "video-modal-description" }, h("div", { innerHTML: this.cards[this.currentCardIndex].descriptionModal })))))))));
75
+ }
76
+ static get is() { return "ptc-theater-video-modal"; }
77
+ static get encapsulation() { return "scoped"; }
78
+ static get originalStyleUrls() {
79
+ return {
80
+ "$": ["ptc-theater-video-modal.scss"]
81
+ };
82
+ }
83
+ static get styleUrls() {
84
+ return {
85
+ "$": ["ptc-theater-video-modal.css"]
86
+ };
87
+ }
88
+ static get states() {
89
+ return {
90
+ "cards": {},
91
+ "showModal": {},
92
+ "currentCardIndex": {},
93
+ "filteredTagName": {}
94
+ };
95
+ }
96
+ static get methods() {
97
+ return {
98
+ "updateData": {
99
+ "complexType": {
100
+ "signature": "(data: any, currentModalIndex: any) => Promise<void>",
101
+ "parameters": [{
102
+ "tags": [],
103
+ "text": ""
104
+ }, {
105
+ "tags": [],
106
+ "text": ""
107
+ }],
108
+ "references": {
109
+ "Promise": {
110
+ "location": "global"
111
+ }
112
+ },
113
+ "return": "Promise<void>"
114
+ },
115
+ "docs": {
116
+ "text": "",
117
+ "tags": []
118
+ }
119
+ }
120
+ };
121
+ }
122
+ static get elementRef() { return "hostEl"; }
123
+ }
@@ -0,0 +1,12 @@
1
+ :host {
2
+ display: block;
3
+ }
4
+ :host .card-list {
5
+ display: flex;
6
+ overflow-x: auto;
7
+ }
8
+ @media only screen and (min-width: 768px) {
9
+ :host .card-list {
10
+ display: block;
11
+ }
12
+ }
@@ -0,0 +1,99 @@
1
+ import { h } from '@stencil/core';
2
+ export class PtcTheaterVideoPlaylist {
3
+ constructor() {
4
+ this.cards = [];
5
+ this.currentCardIndex = 0;
6
+ this.filteredTagName = undefined;
7
+ }
8
+ componentDidLoad() {
9
+ this.setupCards();
10
+ this.sortCards('');
11
+ }
12
+ handleFilterClick(event) {
13
+ const filters = event.detail;
14
+ this.filteredTagName = filters['selected-tag'];
15
+ this.sortCards(this.filteredTagName);
16
+ this.setupCards();
17
+ }
18
+ sortCards(filterVideo) {
19
+ const cardElements = this.host.querySelectorAll('ptc-theater-video');
20
+ cardElements.forEach((cardElement) => {
21
+ const tagNames = cardElement.getAttribute('vtag-name').split(",").map((item) => {
22
+ return item.trim();
23
+ });
24
+ const trimFilterVideo = filterVideo.trim();
25
+ if (trimFilterVideo !== "" && trimFilterVideo !== 'reset') {
26
+ if (tagNames.includes(trimFilterVideo)) {
27
+ cardElement.classList.add('show');
28
+ cardElement.classList.remove('hide');
29
+ }
30
+ else {
31
+ cardElement.classList.add('hide');
32
+ cardElement.classList.remove('show');
33
+ }
34
+ }
35
+ else {
36
+ cardElement.classList.add('show');
37
+ cardElement.classList.remove('hide');
38
+ }
39
+ });
40
+ }
41
+ setupCards() {
42
+ let cardData = {};
43
+ const cardElements = this.host.querySelectorAll('ptc-theater-video');
44
+ cardElements.forEach((cardElement, index) => {
45
+ cardData = {
46
+ title: cardElement.querySelector('.vcard-title').textContent,
47
+ cardDescription: cardElement.cardDescription,
48
+ descriptionModal: cardElement.querySelector('.description').innerHTML,
49
+ videoId: cardElement.getAttribute('video-id'),
50
+ vtagName: cardElement.getAttribute('vtag-name'),
51
+ cardNumber: cardElement.getAttribute('card-number'),
52
+ index: index
53
+ };
54
+ cardElement.addEventListener('click', () => {
55
+ this.showCardDetails(index);
56
+ });
57
+ this.cards.push(cardData);
58
+ });
59
+ }
60
+ showCardDetails(index) {
61
+ this.currentCardIndex = index;
62
+ // this.showModal = true;
63
+ const modalElement = document.querySelector('ptc-theater-video-modal');
64
+ if (modalElement) {
65
+ modalElement.updateData(this.cards, this.currentCardIndex);
66
+ }
67
+ }
68
+ render() {
69
+ return (h("div", { class: "card-list" }, h("slot", null)));
70
+ }
71
+ static get is() { return "ptc-theater-video-playlist"; }
72
+ static get encapsulation() { return "shadow"; }
73
+ static get originalStyleUrls() {
74
+ return {
75
+ "$": ["ptc-theater-video-playlist.scss"]
76
+ };
77
+ }
78
+ static get styleUrls() {
79
+ return {
80
+ "$": ["ptc-theater-video-playlist.css"]
81
+ };
82
+ }
83
+ static get states() {
84
+ return {
85
+ "currentCardIndex": {},
86
+ "filteredTagName": {}
87
+ };
88
+ }
89
+ static get elementRef() { return "host"; }
90
+ static get listeners() {
91
+ return [{
92
+ "name": "filterCliked",
93
+ "method": "handleFilterClick",
94
+ "target": "document",
95
+ "capture": false,
96
+ "passive": false
97
+ }];
98
+ }
99
+ }
@@ -134,6 +134,12 @@ export const PtcBreadcrumb: {
134
134
  new (): PtcBreadcrumb;
135
135
  };
136
136
 
137
+ interface PtcBrightcovVideo extends Components.PtcBrightcovVideo, HTMLElement {}
138
+ export const PtcBrightcovVideo: {
139
+ prototype: PtcBrightcovVideo;
140
+ new (): PtcBrightcovVideo;
141
+ };
142
+
137
143
  interface PtcButton extends Components.PtcButton, HTMLElement {}
138
144
  export const PtcButton: {
139
145
  prototype: PtcButton;
@@ -224,6 +230,18 @@ export const PtcFeaturedList: {
224
230
  new (): PtcFeaturedList;
225
231
  };
226
232
 
233
+ interface PtcFilterDropdown extends Components.PtcFilterDropdown, HTMLElement {}
234
+ export const PtcFilterDropdown: {
235
+ prototype: PtcFilterDropdown;
236
+ new (): PtcFilterDropdown;
237
+ };
238
+
239
+ interface PtcFilterLevelTheater extends Components.PtcFilterLevelTheater, HTMLElement {}
240
+ export const PtcFilterLevelTheater: {
241
+ prototype: PtcFilterLevelTheater;
242
+ new (): PtcFilterLevelTheater;
243
+ };
244
+
227
245
  interface PtcFilterTag extends Components.PtcFilterTag, HTMLElement {}
228
246
  export const PtcFilterTag: {
229
247
  prototype: PtcFilterTag;
@@ -626,6 +644,24 @@ export const PtcTextfield: {
626
644
  new (): PtcTextfield;
627
645
  };
628
646
 
647
+ interface PtcTheaterVideo extends Components.PtcTheaterVideo, HTMLElement {}
648
+ export const PtcTheaterVideo: {
649
+ prototype: PtcTheaterVideo;
650
+ new (): PtcTheaterVideo;
651
+ };
652
+
653
+ interface PtcTheaterVideoModal extends Components.PtcTheaterVideoModal, HTMLElement {}
654
+ export const PtcTheaterVideoModal: {
655
+ prototype: PtcTheaterVideoModal;
656
+ new (): PtcTheaterVideoModal;
657
+ };
658
+
659
+ interface PtcTheaterVideoPlaylist extends Components.PtcTheaterVideoPlaylist, HTMLElement {}
660
+ export const PtcTheaterVideoPlaylist: {
661
+ prototype: PtcTheaterVideoPlaylist;
662
+ new (): PtcTheaterVideoPlaylist;
663
+ };
664
+
629
665
  interface PtcTitle extends Components.PtcTitle, HTMLElement {}
630
666
  export const PtcTitle: {
631
667
  prototype: PtcTitle;