@cooperco/cooper-component-library 0.1.129 → 0.1.130

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 (45) hide show
  1. package/dist/cms/containerCollectionModule.query.ts +0 -6
  2. package/dist/cms/contentful/queries/containerCollectionModule.query.js +0 -6
  3. package/dist/cms/contentful/queries/containerCollectionModule.query.ts +0 -6
  4. package/dist/cms/contentful/queries/index.d.ts +0 -1
  5. package/dist/cms/contentful/queries/index.js +0 -1
  6. package/dist/cms/contentful/queries/index.ts +0 -2
  7. package/dist/cms/index.ts +0 -2
  8. package/dist/cms/queries/containerCollectionModule.query.ts +0 -6
  9. package/dist/cms/queries/index.ts +0 -2
  10. package/dist/lib/component-lib.js +3253 -3634
  11. package/dist/lib/component-lib.umd.cjs +23 -23
  12. package/dist/lib/css/main.css +18 -48
  13. package/dist/lib/style.css +1 -1
  14. package/dist/types/cms/contentful/queries/index.d.ts +0 -1
  15. package/dist/types/src/components/ContainerCollectionModule/ContainerCollectionModule.d.ts +1 -4
  16. package/dist/types/src/components/components.d.ts +0 -1
  17. package/dist/types/src/components/types.d.ts +0 -1
  18. package/dist/types/src/config/defaultPassthrough/index.d.ts +0 -1
  19. package/dist/types/src/config/defaultPassthrough/types.d.ts +1 -3
  20. package/dist/types/src/types.d.ts +0 -1
  21. package/package.json +1 -1
  22. package/dist/cms/0095-create-table-module.cjs +0 -174
  23. package/dist/cms/0096-update-container-collection-filtered-table.cjs +0 -57
  24. package/dist/cms/contentful/migrations/scripts/0095-create-table-module.cjs +0 -174
  25. package/dist/cms/contentful/migrations/scripts/0096-update-container-collection-filtered-table.cjs +0 -57
  26. package/dist/cms/contentful/queries/tableModule.query.d.ts +0 -2
  27. package/dist/cms/contentful/queries/tableModule.query.js +0 -60
  28. package/dist/cms/contentful/queries/tableModule.query.ts +0 -62
  29. package/dist/cms/migrations/scripts/0095-create-table-module.cjs +0 -174
  30. package/dist/cms/migrations/scripts/0096-update-container-collection-filtered-table.cjs +0 -57
  31. package/dist/cms/queries/tableModule.query.ts +0 -62
  32. package/dist/cms/scripts/0095-create-table-module.cjs +0 -174
  33. package/dist/cms/scripts/0096-update-container-collection-filtered-table.cjs +0 -57
  34. package/dist/cms/tableModule.query.ts +0 -62
  35. package/dist/types/cms/contentful/queries/tableModule.query.d.ts +0 -2
  36. package/dist/types/src/components/TableModule/TableModule.d.ts +0 -51
  37. package/dist/types/src/components/TableModule/TableModule.vue.d.ts +0 -3
  38. /package/dist/cms/{0097-tabmodule-inline-body-copy.cjs → 0095-tabmodule-inline-body-copy.cjs} +0 -0
  39. /package/dist/cms/{0098-delete-body-copy-content-type.cjs → 0096-delete-body-copy-content-type.cjs} +0 -0
  40. /package/dist/cms/contentful/migrations/scripts/{0097-tabmodule-inline-body-copy.cjs → 0095-tabmodule-inline-body-copy.cjs} +0 -0
  41. /package/dist/cms/contentful/migrations/scripts/{0098-delete-body-copy-content-type.cjs → 0096-delete-body-copy-content-type.cjs} +0 -0
  42. /package/dist/cms/migrations/scripts/{0097-tabmodule-inline-body-copy.cjs → 0095-tabmodule-inline-body-copy.cjs} +0 -0
  43. /package/dist/cms/migrations/scripts/{0098-delete-body-copy-content-type.cjs → 0096-delete-body-copy-content-type.cjs} +0 -0
  44. /package/dist/cms/scripts/{0097-tabmodule-inline-body-copy.cjs → 0095-tabmodule-inline-body-copy.cjs} +0 -0
  45. /package/dist/cms/scripts/{0098-delete-body-copy-content-type.cjs → 0096-delete-body-copy-content-type.cjs} +0 -0
@@ -21,4 +21,3 @@ export * from './helloBanner.query.js';
21
21
  export * from './placeholderModule.query.js';
22
22
  export * from './splitModule.query.js';
23
23
  export * from './containerCollectionModule.query.js';
24
- export * from './tableModule.query.js';
@@ -1,13 +1,10 @@
1
1
  import { Component, ComponentPassthrough } from '../../types';
2
2
  import { SplitModule } from '../SplitModule/SplitModule';
3
- import { TableModule } from '../TableModule/TableModule';
4
3
  export interface ContainerCollectionModule extends Component {
5
4
  __typename?: 'ContainerCollection';
6
5
  entryName?: string;
7
6
  headline?: string;
8
- subheadline?: string;
9
- variant?: 'Default' | 'FilteredTable';
10
- modules: (SplitModule | TableModule)[];
7
+ modules: SplitModule[];
11
8
  backgroundColor?: string;
12
9
  pt?: ComponentPassthrough;
13
10
  }
@@ -26,4 +26,3 @@ export { default as Video } from './Video/Video.vue';
26
26
  export { default as AnimationWrapper } from './AnimationWrapper/AnimationWrapper.vue';
27
27
  export { default as HelloBanner } from './HelloBanner/HelloBanner.vue';
28
28
  export { default as ChartModule } from './ChartModule/ChartModule.vue';
29
- export { default as TableModule } from './TableModule/TableModule.vue';
@@ -26,4 +26,3 @@ export type { ChartDrillDown as ChartDrillDownType } from './ChartModule/ChartMo
26
26
  export type { PlaceholderModule as PlaceholderModuleType } from './PlaceholderModule/PlaceholderModule';
27
27
  export { PlaceholderModuleName } from './PlaceholderModule/PlaceholderModule';
28
28
  export type { PlaceholderModuleNameValue } from './PlaceholderModule/PlaceholderModule';
29
- export type { TableModule as TableModuleType } from './TableModule/TableModule';
@@ -73,4 +73,3 @@ export declare const TileLabelPt: {
73
73
  export declare const VideoPt: GenericComponentPassthrough;
74
74
  export declare const ChartModulePt: GenericComponentPassthrough;
75
75
  export declare const HelloBannerPt: HelloBannerPassthrough;
76
- export declare const TableModulePt: GenericComponentPassthrough;
@@ -11,8 +11,7 @@ import { TileLabelPassthrough } from '../../components/TileLabel/TileLabel';
11
11
  import { ChartModulePassthrough } from '../../components/ChartModule/ChartModule';
12
12
  import { HelloBannerPassthrough } from '../../components/HelloBanner/HelloBanner';
13
13
  import { SplitModulePassthrough } from '../../components/SplitModule/SplitModule';
14
- import { TableModulePassthrough } from '../../components/TableModule/TableModule';
15
- export interface GenericComponentPassthrough extends ComponentPassthrough, TileLabelPassthrough, AccordionPassthrough, AccordionItemPassthrough, CarouselPassthrough, ContainerModulePassthrough, ContentModulePassthrough, CTAPassthrough, SplitModulePassthrough, TableModulePassthrough, TestimonialModulePassthrough, TileContentPassthrough, HelloBannerPassthrough, ChartModulePassthrough {
14
+ export interface GenericComponentPassthrough extends ComponentPassthrough, TileLabelPassthrough, AccordionPassthrough, AccordionItemPassthrough, CarouselPassthrough, ContainerModulePassthrough, ContentModulePassthrough, CTAPassthrough, SplitModulePassthrough, TestimonialModulePassthrough, TileContentPassthrough, HelloBannerPassthrough, ChartModulePassthrough {
16
15
  }
17
16
  export interface AccordionPtVariants {
18
17
  List: AccordionPassthrough;
@@ -56,5 +55,4 @@ export interface Pt_Overrides {
56
55
  TileLabel?: GenericComponentPassthrough;
57
56
  Video?: GenericComponentPassthrough;
58
57
  ChartModule?: ChartModulePassthrough;
59
- TableModule?: TableModulePassthrough;
60
58
  }
@@ -48,7 +48,6 @@ export declare const ModuleTypeName: {
48
48
  readonly CardsModule: "CardsModule";
49
49
  readonly ChartModule: "ChartModule";
50
50
  readonly PlaceholderModule: "PlaceholderModule";
51
- readonly TableModule: "TableModule";
52
51
  };
53
52
  export declare const TileCollectionVariant: {
54
53
  readonly Icon: "IconTile";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cooperco/cooper-component-library",
3
3
  "private": false,
4
- "version": "0.1.129",
4
+ "version": "0.1.130",
5
5
  "type": "module",
6
6
  "files": [
7
7
  "dist"
@@ -1,174 +0,0 @@
1
- const addEntryNameField = require('../helpers/addEntryNameField.cjs')
2
-
3
- module.exports = {
4
- // @ts-check
5
- /** @type { import('contentful-migration').MigrationFunction } */
6
- up: function (migration) {
7
- const tableModule = migration.createContentType('tableModule', {
8
- name: 'Table Module',
9
- displayField: 'entryName',
10
- })
11
-
12
- // Add mandatory entryName field
13
- addEntryNameField(tableModule)
14
-
15
- // Title
16
- tableModule.createField('title', {
17
- name: 'Title',
18
- type: 'Symbol',
19
- required: false,
20
- })
21
-
22
- // Description (RichText)
23
- tableModule.createField('description', {
24
- name: 'Description',
25
- type: 'RichText',
26
- required: false,
27
- validations: [
28
- {
29
- enabledMarks: ['bold', 'italic', 'underline'],
30
- message: 'Only bold, italic, and underline marks are allowed',
31
- },
32
- {
33
- enabledNodeTypes: [
34
- 'ordered-list',
35
- 'unordered-list',
36
- 'hr',
37
- 'hyperlink',
38
- 'embedded-entry-inline',
39
- ],
40
- },
41
- {
42
- nodes: {
43
- 'embedded-entry-inline': [
44
- {
45
- linkContentType: ['highlightedText'],
46
- message: 'You can only embed Highlighted Text.',
47
- },
48
- ],
49
- },
50
- },
51
- ],
52
- })
53
-
54
- // Body Copy Alignment
55
- tableModule.createField('bodyCopyAlignment', {
56
- name: 'Body Copy Alignment',
57
- type: 'Symbol',
58
- required: false,
59
- validations: [
60
- {
61
- in: ['Left', 'Center', 'Right'],
62
- },
63
- ],
64
- })
65
- tableModule.changeFieldControl('bodyCopyAlignment', 'builtin', 'dropdown', {
66
- helpText: 'Override the description copy text alignment independently. If not set, it will follow the default alignment.',
67
- })
68
-
69
- // Table Highlight
70
- tableModule.createField('tableHighlight', {
71
- name: 'Table Highlight',
72
- type: 'Symbol',
73
- required: false,
74
- validations: [
75
- {
76
- in: ['Row', 'Column'],
77
- },
78
- ],
79
- })
80
- tableModule.changeFieldControl('tableHighlight', 'builtin', 'dropdown', {
81
- helpText: 'Highlight a specific row or column in the table.',
82
- })
83
-
84
- // Table (RichText with table node enabled)
85
- tableModule.createField('table', {
86
- name: 'Table',
87
- type: 'RichText',
88
- required: true,
89
- validations: [
90
- {
91
- enabledMarks: ['bold', 'italic', 'underline'],
92
- message: 'Only bold, italic, and underline marks are allowed',
93
- },
94
- {
95
- enabledNodeTypes: [
96
- 'table',
97
- 'hyperlink',
98
- 'embedded-entry-inline',
99
- 'unordered-list',
100
- 'ordered-list',
101
- ],
102
- },
103
- {
104
- nodes: {
105
- 'embedded-entry-inline': [
106
- {
107
- linkContentType: ['highlightedText'],
108
- message: 'You can only embed Highlighted Text.',
109
- },
110
- ],
111
- },
112
- },
113
- ],
114
- })
115
-
116
- // Filter columns (Symbol list)
117
- tableModule.createField('filterColumns', {
118
- name: 'Filter Columns',
119
- type: 'Array',
120
- required: false,
121
- items: {
122
- type: 'Symbol',
123
- validations: [],
124
- },
125
- })
126
- tableModule.changeFieldControl('filterColumns', 'builtin', 'tagEditor', {
127
- helpText: 'Enter the exact column heading(s) to make filterable. Max 4 suggested.',
128
- })
129
-
130
- // Footer (RichText)
131
- tableModule.createField('footer', {
132
- name: 'Footer',
133
- type: 'RichText',
134
- required: false,
135
- validations: [
136
- {
137
- enabledMarks: ['bold', 'italic', 'underline'],
138
- message: 'Only bold, italic, and underline marks are allowed',
139
- },
140
- {
141
- enabledNodeTypes: ['hyperlink', 'embedded-entry-inline'],
142
- },
143
- {
144
- nodes: {
145
- 'embedded-entry-inline': [
146
- {
147
- linkContentType: ['highlightedText'],
148
- message: 'You can only embed Highlighted Text.',
149
- },
150
- ],
151
- },
152
- },
153
- ],
154
- })
155
-
156
- // Background Color
157
- tableModule.createField('backgroundColor', {
158
- name: 'Background Color',
159
- type: 'Symbol',
160
- required: false,
161
- })
162
-
163
- // Change field control for Color Picker App
164
- tableModule.changeFieldControl(
165
- 'backgroundColor',
166
- 'app',
167
- process.env.COLOR_PICKER_APP_ID
168
- )
169
- },
170
-
171
- down: async function (migration) {
172
- await migration.deleteContentType('tableModule')
173
- },
174
- }
@@ -1,57 +0,0 @@
1
- module.exports = {
2
- // @ts-check
3
- /** @type { import('contentful-migration').MigrationFunction } */
4
- up: function (migration) {
5
- const collection = migration.editContentType('containerCollectionModule')
6
-
7
- // Delete the variant field from Contentful
8
- collection.deleteField('variant')
9
-
10
- // Subheadline field
11
- collection.createField('subheadline', {
12
- name: 'Subheadline',
13
- type: 'Symbol',
14
- required: false,
15
- })
16
-
17
- // Order the fields
18
- collection.moveField('subheadline').afterField('headline')
19
-
20
- // Update link validations for modules collection to accept splitModule and tableModule
21
- collection.editField('modules').items({
22
- type: 'Link',
23
- linkType: 'Entry',
24
- validations: [
25
- {
26
- linkContentType: ['splitModule', 'tableModule'],
27
- },
28
- ],
29
- })
30
-
31
- // Add helper text to modules field
32
- collection.changeFieldControl('modules', 'builtin', 'entryCardsEditor', {
33
- helpText:
34
- 'Add Table Modules to render filtered tables with tabs, or Split Modules for standard collections.',
35
- })
36
- },
37
-
38
- // @ts-check
39
- /** @type { import('contentful-migration').MigrationFunction } */
40
- down: function (migration) {
41
- const collection = migration.editContentType('containerCollectionModule')
42
-
43
- // Delete subheadline field
44
- collection.deleteField('subheadline')
45
-
46
- // Revert validations on modules collection to splitModule only
47
- collection.editField('modules').items({
48
- type: 'Link',
49
- linkType: 'Entry',
50
- validations: [
51
- {
52
- linkContentType: ['splitModule'],
53
- },
54
- ],
55
- })
56
- },
57
- }
@@ -1,174 +0,0 @@
1
- const addEntryNameField = require('../helpers/addEntryNameField.cjs')
2
-
3
- module.exports = {
4
- // @ts-check
5
- /** @type { import('contentful-migration').MigrationFunction } */
6
- up: function (migration) {
7
- const tableModule = migration.createContentType('tableModule', {
8
- name: 'Table Module',
9
- displayField: 'entryName',
10
- })
11
-
12
- // Add mandatory entryName field
13
- addEntryNameField(tableModule)
14
-
15
- // Title
16
- tableModule.createField('title', {
17
- name: 'Title',
18
- type: 'Symbol',
19
- required: false,
20
- })
21
-
22
- // Description (RichText)
23
- tableModule.createField('description', {
24
- name: 'Description',
25
- type: 'RichText',
26
- required: false,
27
- validations: [
28
- {
29
- enabledMarks: ['bold', 'italic', 'underline'],
30
- message: 'Only bold, italic, and underline marks are allowed',
31
- },
32
- {
33
- enabledNodeTypes: [
34
- 'ordered-list',
35
- 'unordered-list',
36
- 'hr',
37
- 'hyperlink',
38
- 'embedded-entry-inline',
39
- ],
40
- },
41
- {
42
- nodes: {
43
- 'embedded-entry-inline': [
44
- {
45
- linkContentType: ['highlightedText'],
46
- message: 'You can only embed Highlighted Text.',
47
- },
48
- ],
49
- },
50
- },
51
- ],
52
- })
53
-
54
- // Body Copy Alignment
55
- tableModule.createField('bodyCopyAlignment', {
56
- name: 'Body Copy Alignment',
57
- type: 'Symbol',
58
- required: false,
59
- validations: [
60
- {
61
- in: ['Left', 'Center', 'Right'],
62
- },
63
- ],
64
- })
65
- tableModule.changeFieldControl('bodyCopyAlignment', 'builtin', 'dropdown', {
66
- helpText: 'Override the description copy text alignment independently. If not set, it will follow the default alignment.',
67
- })
68
-
69
- // Table Highlight
70
- tableModule.createField('tableHighlight', {
71
- name: 'Table Highlight',
72
- type: 'Symbol',
73
- required: false,
74
- validations: [
75
- {
76
- in: ['Row', 'Column'],
77
- },
78
- ],
79
- })
80
- tableModule.changeFieldControl('tableHighlight', 'builtin', 'dropdown', {
81
- helpText: 'Highlight a specific row or column in the table.',
82
- })
83
-
84
- // Table (RichText with table node enabled)
85
- tableModule.createField('table', {
86
- name: 'Table',
87
- type: 'RichText',
88
- required: true,
89
- validations: [
90
- {
91
- enabledMarks: ['bold', 'italic', 'underline'],
92
- message: 'Only bold, italic, and underline marks are allowed',
93
- },
94
- {
95
- enabledNodeTypes: [
96
- 'table',
97
- 'hyperlink',
98
- 'embedded-entry-inline',
99
- 'unordered-list',
100
- 'ordered-list',
101
- ],
102
- },
103
- {
104
- nodes: {
105
- 'embedded-entry-inline': [
106
- {
107
- linkContentType: ['highlightedText'],
108
- message: 'You can only embed Highlighted Text.',
109
- },
110
- ],
111
- },
112
- },
113
- ],
114
- })
115
-
116
- // Filter columns (Symbol list)
117
- tableModule.createField('filterColumns', {
118
- name: 'Filter Columns',
119
- type: 'Array',
120
- required: false,
121
- items: {
122
- type: 'Symbol',
123
- validations: [],
124
- },
125
- })
126
- tableModule.changeFieldControl('filterColumns', 'builtin', 'tagEditor', {
127
- helpText: 'Enter the exact column heading(s) to make filterable. Max 4 suggested.',
128
- })
129
-
130
- // Footer (RichText)
131
- tableModule.createField('footer', {
132
- name: 'Footer',
133
- type: 'RichText',
134
- required: false,
135
- validations: [
136
- {
137
- enabledMarks: ['bold', 'italic', 'underline'],
138
- message: 'Only bold, italic, and underline marks are allowed',
139
- },
140
- {
141
- enabledNodeTypes: ['hyperlink', 'embedded-entry-inline'],
142
- },
143
- {
144
- nodes: {
145
- 'embedded-entry-inline': [
146
- {
147
- linkContentType: ['highlightedText'],
148
- message: 'You can only embed Highlighted Text.',
149
- },
150
- ],
151
- },
152
- },
153
- ],
154
- })
155
-
156
- // Background Color
157
- tableModule.createField('backgroundColor', {
158
- name: 'Background Color',
159
- type: 'Symbol',
160
- required: false,
161
- })
162
-
163
- // Change field control for Color Picker App
164
- tableModule.changeFieldControl(
165
- 'backgroundColor',
166
- 'app',
167
- process.env.COLOR_PICKER_APP_ID
168
- )
169
- },
170
-
171
- down: async function (migration) {
172
- await migration.deleteContentType('tableModule')
173
- },
174
- }
@@ -1,57 +0,0 @@
1
- module.exports = {
2
- // @ts-check
3
- /** @type { import('contentful-migration').MigrationFunction } */
4
- up: function (migration) {
5
- const collection = migration.editContentType('containerCollectionModule')
6
-
7
- // Delete the variant field from Contentful
8
- collection.deleteField('variant')
9
-
10
- // Subheadline field
11
- collection.createField('subheadline', {
12
- name: 'Subheadline',
13
- type: 'Symbol',
14
- required: false,
15
- })
16
-
17
- // Order the fields
18
- collection.moveField('subheadline').afterField('headline')
19
-
20
- // Update link validations for modules collection to accept splitModule and tableModule
21
- collection.editField('modules').items({
22
- type: 'Link',
23
- linkType: 'Entry',
24
- validations: [
25
- {
26
- linkContentType: ['splitModule', 'tableModule'],
27
- },
28
- ],
29
- })
30
-
31
- // Add helper text to modules field
32
- collection.changeFieldControl('modules', 'builtin', 'entryCardsEditor', {
33
- helpText:
34
- 'Add Table Modules to render filtered tables with tabs, or Split Modules for standard collections.',
35
- })
36
- },
37
-
38
- // @ts-check
39
- /** @type { import('contentful-migration').MigrationFunction } */
40
- down: function (migration) {
41
- const collection = migration.editContentType('containerCollectionModule')
42
-
43
- // Delete subheadline field
44
- collection.deleteField('subheadline')
45
-
46
- // Revert validations on modules collection to splitModule only
47
- collection.editField('modules').items({
48
- type: 'Link',
49
- linkType: 'Entry',
50
- validations: [
51
- {
52
- linkContentType: ['splitModule'],
53
- },
54
- ],
55
- })
56
- },
57
- }
@@ -1,2 +0,0 @@
1
- import type { DocumentNode } from 'graphql';
2
- export declare const getTableModule: DocumentNode;
@@ -1,60 +0,0 @@
1
- import { gql } from 'graphql-tag';
2
- export const getTableModule = gql `
3
- query tableModuleQuery($id: String!, $preview: Boolean = false) {
4
- tableModule(id: $id, preview: $preview) {
5
- sys {
6
- id
7
- }
8
- title
9
- description {
10
- json
11
- links {
12
- entries {
13
- inline {
14
- sys {
15
- id
16
- }
17
- ... on HighlightedText {
18
- text
19
- }
20
- }
21
- }
22
- }
23
- }
24
- table {
25
- json
26
- links {
27
- entries {
28
- inline {
29
- sys {
30
- id
31
- }
32
- ... on HighlightedText {
33
- text
34
- }
35
- }
36
- }
37
- }
38
- }
39
- filterColumns
40
- footer {
41
- json
42
- links {
43
- entries {
44
- inline {
45
- sys {
46
- id
47
- }
48
- ... on HighlightedText {
49
- text
50
- }
51
- }
52
- }
53
- }
54
- }
55
- backgroundColor
56
- bodyCopyAlignment
57
- tableHighlight
58
- }
59
- }
60
- `;
@@ -1,62 +0,0 @@
1
- import { gql } from 'graphql-tag'
2
- import type { DocumentNode } from 'graphql'
3
-
4
- export const getTableModule: DocumentNode = gql`
5
- query tableModuleQuery($id: String!, $preview: Boolean = false) {
6
- tableModule(id: $id, preview: $preview) {
7
- sys {
8
- id
9
- }
10
- title
11
- description {
12
- json
13
- links {
14
- entries {
15
- inline {
16
- sys {
17
- id
18
- }
19
- ... on HighlightedText {
20
- text
21
- }
22
- }
23
- }
24
- }
25
- }
26
- table {
27
- json
28
- links {
29
- entries {
30
- inline {
31
- sys {
32
- id
33
- }
34
- ... on HighlightedText {
35
- text
36
- }
37
- }
38
- }
39
- }
40
- }
41
- filterColumns
42
- footer {
43
- json
44
- links {
45
- entries {
46
- inline {
47
- sys {
48
- id
49
- }
50
- ... on HighlightedText {
51
- text
52
- }
53
- }
54
- }
55
- }
56
- }
57
- backgroundColor
58
- bodyCopyAlignment
59
- tableHighlight
60
- }
61
- }
62
- `