@salesforcedevs/dw-components 0.67.0 → 0.70.0-alpha.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/lwc.config.json CHANGED
@@ -18,7 +18,6 @@
18
18
  "dw/podcastsGrid",
19
19
  "dw/podcastsPromo",
20
20
  "dw/rcgTable",
21
- "dw/searchResults",
22
21
  "dw/slackCta",
23
22
  "dw/slackSuccess"
24
23
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@salesforcedevs/dw-components",
3
- "version": "0.67.0",
3
+ "version": "0.70.0-alpha.0",
4
4
  "description": "Lightning web components for https://developer.salesforce.com",
5
5
  "license": "MIT",
6
6
  "engines": {
@@ -11,7 +11,6 @@
11
11
  },
12
12
  "dependencies": {
13
13
  "classnames": "^2.2.6",
14
- "coveo-search-ui": "^2.10082.5",
15
14
  "lodash.clonedeep": "^4.5.0",
16
15
  "lodash.orderby": "^4.6.0",
17
16
  "lodash.uniqby": "^4.7.0",
@@ -22,6 +21,5 @@
22
21
  "@types/lodash.clonedeep": "^4.5.7",
23
22
  "@types/lodash.orderby": "^4.6.7",
24
23
  "@types/lodash.uniqby": "^4.7.7"
25
- },
26
- "gitHead": "187d8abcbea7dd2ec9f0352c3563662c44abbde8"
24
+ }
27
25
  }
@@ -65,7 +65,7 @@
65
65
  if:true={showArchives}
66
66
  onclick={onClick}
67
67
  variant="link"
68
- href='/content-archive?c__filter=%5B"Blogs"%5D'
68
+ href='/content-archive?site=Blogs'
69
69
  text="VIEW ARCHIVES"
70
70
  ></dx-hr>
71
71
  </div>
@@ -26,7 +26,7 @@
26
26
  </button>
27
27
  </div>
28
28
  <dx-filter-menu
29
- name="site"
29
+ name="content-type"
30
30
  title={contentTypeTitle}
31
31
  options={contentTypeList}
32
32
  onchange={handleUpdateSiteFilter}
@@ -36,6 +36,7 @@
36
36
  title={dateTitle}
37
37
  options={dateList}
38
38
  variant="nested"
39
+ filters-dates-loading={filtersDatesLoading}
39
40
  onchange={handleFiltersEvent}
40
41
  ></dx-filter-menu>
41
42
  <template if:false={hideBlogFilters}>
@@ -73,7 +74,7 @@
73
74
  </button>
74
75
  </div>
75
76
  <dx-filter-menu
76
- name="site"
77
+ name="contentType"
77
78
  title={contentTypeTitle}
78
79
  options={contentTypeList}
79
80
  onchange={handleUpdateSiteFilter}
@@ -82,6 +83,7 @@
82
83
  name="dates"
83
84
  title={dateTitle}
84
85
  options={dateList}
86
+ filters-dates-loading={filtersDatesLoading}
85
87
  variant="nested"
86
88
  onchange={handleFiltersEvent}
87
89
  ></dx-filter-menu>
@@ -156,17 +158,17 @@
156
158
  </template>
157
159
  </div>
158
160
  <div class="filter-chips-container">
159
- <template if:true={selectedFilterMenuData.site.length}>
161
+ <template if:true={selectedFilterMenuData.contentType.length}>
160
162
  <div class="chip-item-container">
161
163
  <p class="chip-title">Type</p>
162
164
  <template
163
- for:each={selectedFilterMenuData.site}
165
+ for:each={selectedFilterMenuData.contentType}
164
166
  for:item="postType"
165
167
  >
166
168
  <span class="chip-item" key={postType.name}>
167
169
  {postType.name}
168
170
  <dx-button
169
- name="site"
171
+ name="contentType"
170
172
  value={postType}
171
173
  onclick={removeFilterItem}
172
174
  variant="inline"
@@ -1,13 +1,23 @@
1
1
  import { LightningElement } from "lwc";
2
2
  import cx from "classnames";
3
- import { getArchivePosts, getArchiveFilterList } from "./utils";
3
+ import { PER_PAGE_COUNT, getArchivePosts, getArchiveFilterList } from "./utils";
4
4
  import { sortSplittedPostsByMonth } from "dxUtils/dates";
5
- import { Filters } from "./contentArchive.types";
6
5
  import { getUrlParamValue, setUrlParamValue } from "dxUtils/queryCoordinator";
6
+ import {
7
+ Filters,
8
+ FilterMenuData,
9
+ FilterMenuNames
10
+ } from "./contentArchive.types";
7
11
 
8
12
  const MOBILE_MATCH = "767px";
9
13
 
10
- const QUERY_SITE_FILTER = "content-type";
14
+ enum FilterNames {
15
+ QUERY_CONTENT_FILTER = "contentType",
16
+ QUERY_AUTHOR_FILTER = "authors",
17
+ QUERY_DATES_FILTER = "dates",
18
+ QUERY_CATEGORIES_FILTER = "categories"
19
+ }
20
+
11
21
  const PODCASTS = { id: 2, name: "Podcasts" };
12
22
  const BLOGS = { id: 1, name: "Blogs" };
13
23
  export default class ContentArchive extends LightningElement {
@@ -20,8 +30,9 @@ export default class ContentArchive extends LightningElement {
20
30
  private totalPages: number = 1;
21
31
  private loading: boolean = true;
22
32
  private filtersLoading: boolean = true;
33
+ private filtersDatesLoading: boolean = false;
23
34
  private modalOpen: boolean = false;
24
- private cardType: string = "expanded";
35
+ private cardType: "expanded" | "minimal" = "expanded";
25
36
 
26
37
  private postsByDate: {} = {};
27
38
  private dateList: any[] = [];
@@ -32,27 +43,26 @@ export default class ContentArchive extends LightningElement {
32
43
  private mobileMatchMedia!: MediaQueryList;
33
44
 
34
45
  private selectedFilterMenuData: Filters = {
35
- site: [],
46
+ contentType: [],
36
47
  dates: [],
37
48
  authors: [],
38
49
  categories: []
39
50
  };
51
+
40
52
  private posts: any[] = [];
41
53
 
54
+ get isEmptyState() {
55
+ return this.totalResults === 0 && !this.loading;
56
+ }
57
+
42
58
  get currentPageLength() {
43
59
  if (this.loading) {
44
60
  return "Loading Results...";
45
61
  }
46
-
47
- let currentFirstResultNumber = 0;
48
- const currentLastResultNumber = this.currentPage * this.posts.length;
49
-
50
- if (this.currentPage > 1) {
51
- currentFirstResultNumber =
52
- currentLastResultNumber - this.posts.length;
53
- } else if (this.currentPage === 1 && !this.isEmptyState) {
54
- currentFirstResultNumber = 1;
55
- }
62
+ let currentFirstResultNumber = (this.currentPage - 1) * PER_PAGE_COUNT;
63
+ const currentLastResultNumber =
64
+ currentFirstResultNumber + this.posts.length;
65
+ currentFirstResultNumber += 1;
56
66
 
57
67
  return `Showing ${currentFirstResultNumber} - ${currentLastResultNumber} of ${this.totalResults}`;
58
68
  }
@@ -70,10 +80,6 @@ export default class ContentArchive extends LightningElement {
70
80
  return this.totalResults ? `Archive Results ${pageInfo}` : "No results";
71
81
  }
72
82
 
73
- get isEmptyState() {
74
- return this.totalResults === 0 && !this.loading;
75
- }
76
-
77
83
  get spinnerSize() {
78
84
  return this.isMobile ? "medium" : "large";
79
85
  }
@@ -102,15 +108,15 @@ export default class ContentArchive extends LightningElement {
102
108
 
103
109
  get hideBlogFilters() {
104
110
  return (
105
- this.selectedFilterMenuData.site.length === 1 &&
106
- this.selectedFilterMenuData.site[0].id === 2
111
+ this.selectedFilterMenuData.contentType.length === 1 &&
112
+ this.selectedFilterMenuData.contentType[0].id === 2
107
113
  );
108
114
  }
109
115
 
110
116
  get contentTypeTitle() {
111
117
  return `Content Type ${
112
- this.selectedFilterMenuData.site.length > 0
113
- ? `(${this.selectedFilterMenuData.site.length})`
118
+ this.selectedFilterMenuData.contentType.length > 0
119
+ ? `(${this.selectedFilterMenuData.contentType.length})`
114
120
  : ""
115
121
  }`;
116
122
  }
@@ -136,11 +142,17 @@ export default class ContentArchive extends LightningElement {
136
142
  }`;
137
143
  }
138
144
 
145
+ get selectedPostType() {
146
+ return this.selectedFilterMenuData.contentType.length === 1
147
+ ? this.selectedFilterMenuData.contentType[0].name.toLowerCase()
148
+ : "all";
149
+ }
150
+
139
151
  private filterSelectedDates(
140
- currentDateList: Array<{ name: string }>,
141
152
  selectedDate: string,
142
153
  toRemove: boolean = false
143
154
  ) {
155
+ const currentDateList = this.selectedFilterMenuData.dates;
144
156
  return currentDateList.filter((currentDateItem: { name: string }) => {
145
157
  const year = currentDateItem.name.slice(-4);
146
158
 
@@ -169,9 +181,8 @@ export default class ContentArchive extends LightningElement {
169
181
  selectedFilters = null;
170
182
  }
171
183
 
172
- setUrlParamValue(QUERY_SITE_FILTER, selectedFilters);
173
-
174
184
  this.updateSelectedFilters(value, name, checked);
185
+ this.fetchArchiveFilterDateList();
175
186
  }
176
187
 
177
188
  private handleFiltersEvent(e: CustomEvent) {
@@ -181,8 +192,9 @@ export default class ContentArchive extends LightningElement {
181
192
 
182
193
  private updateSelectedFilters(
183
194
  value: any,
184
- name: keyof Filters,
185
- checked: any
195
+ name: FilterMenuNames,
196
+ checked: any,
197
+ suppressFetch: boolean = false
186
198
  ) {
187
199
  let copy = {
188
200
  ...this.selectedFilterMenuData
@@ -198,26 +210,25 @@ export default class ContentArchive extends LightningElement {
198
210
  const regex = /^(\d{4})$/g;
199
211
 
200
212
  if (regex.test(value.name) && copy[name].length > 0) {
201
- copy[name] = this.filterSelectedDates(copy[name], value.name);
213
+ copy[name] = this.filterSelectedDates(value.name);
202
214
  } else if (regex.test(value.name.slice(-4))) {
203
- copy[name] = this.filterSelectedDates(
204
- copy[name],
205
- value.name,
206
- true
207
- );
215
+ copy[name] = this.filterSelectedDates(value.name, true);
208
216
  }
209
217
 
210
- copy[name].push(value);
218
+ if (!copy[name].find((item) => item.name === value.name)) {
219
+ copy[name].push(value);
220
+ }
211
221
  }
212
222
 
213
223
  // Remove filters when only podcast is selected
214
224
  if (
215
- name === "site" &&
225
+ name === FilterNames.QUERY_CONTENT_FILTER &&
216
226
  copy[name].length === 1 &&
217
227
  !copy[name].some((item: { id: number }) => item.id === 1)
218
228
  ) {
229
+ setUrlParamValue({ QUERY_AUTHOR_FILTER: [] });
219
230
  copy = {
220
- site: [...copy.site],
231
+ contentType: [...copy.contentType],
221
232
  categories: [...copy.categories],
222
233
  dates: [...copy.dates],
223
234
  authors: []
@@ -226,21 +237,26 @@ export default class ContentArchive extends LightningElement {
226
237
 
227
238
  // Checkmark the blog type if value is a blog author
228
239
  if (name === "authors" && checked) {
240
+ setUrlParamValue({ [FilterNames.QUERY_CONTENT_FILTER]: ["Blogs"] });
229
241
  copy = {
230
- site: [{ id: 1, name: "Blogs" }],
242
+ contentType: [{ id: 1, name: "Blogs" }],
231
243
  categories: [...copy.categories],
232
244
  dates: [...copy.dates],
233
245
  authors: [...copy.authors]
234
246
  };
235
247
  }
236
248
 
249
+ setUrlParamValue({ [name]: copy[name].map((a) => a.name) });
250
+
237
251
  this.selectedFilterMenuData = copy;
238
252
  this.currentPage = 1;
239
253
  this.updateCheckedStatus();
240
- this.fetchPostsByCardType();
254
+ if (!suppressFetch) {
255
+ this.fetchPostsByCardType();
256
+ }
241
257
  }
242
258
 
243
- private updateCheckedStatus() {
259
+ private async updateCheckedStatus() {
244
260
  const filterMenuElements =
245
261
  this.template.querySelectorAll("dx-filter-menu");
246
262
 
@@ -299,7 +315,7 @@ export default class ContentArchive extends LightningElement {
299
315
 
300
316
  private handleFilterClear() {
301
317
  this.selectedFilterMenuData = {
302
- site: [],
318
+ contentType: [],
303
319
  dates: [],
304
320
  authors: [],
305
321
  categories: []
@@ -308,7 +324,12 @@ export default class ContentArchive extends LightningElement {
308
324
  this.updateCheckedStatus();
309
325
  this.fetchPostsByCardType();
310
326
 
311
- setUrlParamValue(QUERY_SITE_FILTER, null);
327
+ setUrlParamValue({
328
+ [FilterNames.QUERY_CONTENT_FILTER]: [],
329
+ [FilterNames.QUERY_AUTHOR_FILTER]: [],
330
+ [FilterNames.QUERY_CATEGORIES_FILTER]: [],
331
+ [FilterNames.QUERY_DATES_FILTER]: []
332
+ });
312
333
  }
313
334
 
314
335
  private goToPage(e: CustomEvent) {
@@ -320,7 +341,7 @@ export default class ContentArchive extends LightningElement {
320
341
  this.fetchPostsByCardType();
321
342
  }
322
343
 
323
- private fetchPostsByCardType() {
344
+ private async fetchPostsByCardType() {
324
345
  if (this.cardType === "minimal") {
325
346
  this.fetchPosts(20);
326
347
  } else {
@@ -331,24 +352,39 @@ export default class ContentArchive extends LightningElement {
331
352
  private async fetchArchiveFilterList() {
332
353
  if (!this.dateList.length) {
333
354
  this.filtersLoading = true;
334
- const { dates, authors, categories } = await getArchiveFilterList();
355
+
356
+ const { dates, authors, categories } = await getArchiveFilterList(
357
+ this.selectedPostType
358
+ );
335
359
 
336
360
  this.dateList = this.splitOptionsByDate(dates);
337
361
  this.authorList = authors;
338
362
  this.categoryList = categories;
339
363
  this.filtersLoading = false;
364
+
365
+ requestAnimationFrame(() => this.updateAllFiltersFromUrl());
340
366
  }
341
367
  }
342
368
 
369
+ private async fetchArchiveFilterDateList() {
370
+ this.filtersDatesLoading = true;
371
+
372
+ const { dates } = await getArchiveFilterList(this.selectedPostType);
373
+
374
+ this.dateList = this.splitOptionsByDate(dates);
375
+
376
+ this.filtersDatesLoading = false;
377
+ }
378
+
343
379
  private async fetchPosts(numberOfPosts: number) {
344
380
  this.loading = true;
345
381
 
346
- const { posts, totalResults, totalPages } = await getArchivePosts(
347
- numberOfPosts,
348
- this.currentPage,
349
- this.cardType,
350
- this.selectedFilterMenuData
351
- );
382
+ const { posts, totalResults, totalPages } = await getArchivePosts({
383
+ count: numberOfPosts,
384
+ page: this.currentPage,
385
+ contentType: this.cardType,
386
+ filterMenuData: this.selectedFilterMenuData
387
+ });
352
388
 
353
389
  this.posts = posts;
354
390
  this.totalResults = totalResults;
@@ -420,53 +456,44 @@ export default class ContentArchive extends LightningElement {
420
456
  requestAnimationFrame(() => this.updateCheckedStatus());
421
457
  };
422
458
 
423
- connectedCallback(): void {
459
+ async connectedCallback(): Promise<void> {
424
460
  this.mobileMatchMedia = window.matchMedia(
425
461
  `(max-width: ${MOBILE_MATCH})`
426
462
  );
427
463
  this.onMobileChange(this.mobileMatchMedia);
428
464
  this.mobileMatchMedia.addEventListener("change", this.onMobileChange);
429
465
 
430
- const presetFilters: Array<string> =
431
- getUrlParamValue(QUERY_SITE_FILTER);
432
-
433
- if (presetFilters.length === 1) {
434
- if (presetFilters[0] === BLOGS.name) {
435
- this.presetSiteFilter(BLOGS);
436
- } else {
437
- this.presetSiteFilter(PODCASTS);
438
- }
439
- } else if (presetFilters.length === 2) {
440
- this.presetSiteFilter();
441
- }
442
-
443
466
  if (this.posts.length === 0) {
444
467
  this.fetchArchiveFilterList();
445
468
  this.fetchPostsByCardType();
446
469
  }
447
470
  }
448
471
 
449
- presetSiteFilter(
450
- filter: { id: number; name: string } | undefined = undefined
451
- ) {
452
- // check both content types when no filter is provided
453
- if (!filter) {
454
- this.selectedFilterMenuData = {
455
- ...this.selectedFilterMenuData,
456
- site: [BLOGS, PODCASTS]
457
- };
458
- this._contentTypeList.forEach((option) => {
459
- option.checked = true;
460
- });
461
- this.updateCheckedStatus();
462
- } else {
463
- // set either blogs OR podcasts
464
- this._contentTypeList.forEach((option) => {
465
- if (option.name === filter.name) {
466
- option.checked = true;
472
+ private updateAllFiltersFromUrl() {
473
+ const filters: FilterMenuData = {
474
+ [FilterNames.QUERY_AUTHOR_FILTER]: this.authorList,
475
+ [FilterNames.QUERY_DATES_FILTER]: this.dateList,
476
+ [FilterNames.QUERY_CATEGORIES_FILTER]: this.categoryList,
477
+ [FilterNames.QUERY_CONTENT_FILTER]: this.contentTypeList
478
+ };
479
+
480
+ for (const [key, items] of Object.entries(filters)) {
481
+ const presetFilter: Array<string> = getUrlParamValue(key);
482
+
483
+ presetFilter.forEach((item) => {
484
+ const value = items.find(
485
+ (i) => i.name.toLowerCase() === item.toLowerCase()
486
+ );
487
+
488
+ if (value) {
489
+ this.updateSelectedFilters(
490
+ value,
491
+ key as FilterMenuNames,
492
+ true,
493
+ true
494
+ );
467
495
  }
468
496
  });
469
- this.updateSelectedFilters(filter, "site", true);
470
497
  }
471
498
  }
472
499
  }
@@ -1,10 +1,3 @@
1
- export interface Filters {
2
- site: any[];
3
- dates: any[];
4
- authors: any[];
5
- categories: any[];
6
- }
7
-
8
1
  export type ArchivePostAuthor = {
9
2
  id: number;
10
3
  link: string;
@@ -73,14 +66,25 @@ export type ArchiveContent = {
73
66
  totalPages: number;
74
67
  };
75
68
 
69
+ export type FilterMenuNames =
70
+ | "contentType"
71
+ | "dates"
72
+ | "authors"
73
+ | "categories";
74
+
75
+ export type Filters = {
76
+ [key in FilterMenuNames]: any[];
77
+ };
78
+
76
79
  export type FilterMenuItem = {
77
- id: string;
80
+ id: string | number;
78
81
  name: string;
79
82
  shortName?: string;
83
+ checked?: boolean;
80
84
  };
81
85
 
82
86
  export type FilterMenuData = {
83
- site: Array<FilterMenuItem>;
87
+ contentType: Array<FilterMenuItem>;
84
88
  dates: Array<FilterMenuItem>;
85
89
  categories: Array<FilterMenuItem>;
86
90
  authors: Array<FilterMenuItem>;
@@ -2,23 +2,26 @@ import qs from "query-string";
2
2
  import {
3
3
  ArchivePost,
4
4
  ArchivePostNormalized,
5
- FilterMenuData
5
+ FilterMenuData,
6
+ FilterMenuItem
6
7
  } from "./contentArchive.types";
7
8
  import altData from "./altData.js";
8
9
 
9
- let controller: AbortController | null = null;
10
+ let postsController: AbortController | null = null;
11
+ let filtersController: AbortController | null = null;
10
12
 
11
13
  const ARCHIVE_BASE_URL = "https://developer.salesforce.com/blogs/wp-json/wp/v2";
12
14
  const ARCHIVE_CONTENT_URL = `${ARCHIVE_BASE_URL}/latest-post-per-site`;
13
15
  const ARCHIVE_FILTER_LIST_URL = `${ARCHIVE_BASE_URL}/archives-filters?order=DESC`;
16
+ export const PER_PAGE_COUNT = 10;
14
17
 
15
18
  async function postsFetchHandler(url: string) {
16
- if (controller) {
17
- controller.abort();
19
+ if (postsController) {
20
+ postsController.abort();
18
21
  }
19
22
 
20
- controller = new AbortController();
21
- const { signal } = controller;
23
+ postsController = new AbortController();
24
+ const { signal } = postsController;
22
25
 
23
26
  const response = await fetch(url, { signal });
24
27
 
@@ -74,19 +77,35 @@ function normalizePosts(posts: Array<ArchivePost>, contentType: string) {
74
77
  }));
75
78
  }
76
79
 
77
- export async function getArchivePosts(
78
- count: number = 10,
79
- page: number = 1,
80
- contentType: string = "minimal",
81
- filterMenuData: FilterMenuData
82
- ): Promise<ArchivePostNormalized> {
80
+ export async function getArchivePosts({
81
+ count = PER_PAGE_COUNT,
82
+ page = 1,
83
+ contentType = "minimal",
84
+ filterMenuData = {
85
+ contentType: [],
86
+ dates: [],
87
+ authors: [],
88
+ categories: []
89
+ }
90
+ }: {
91
+ count: number;
92
+ page: number;
93
+ contentType: "minimal" | "expanded";
94
+ filterMenuData: FilterMenuData;
95
+ }): Promise<ArchivePostNormalized> {
83
96
  const filterQuery = {
84
- site: filterMenuData.site.map((siteType) => siteType.id),
85
- dates: filterMenuData.dates.map((date) =>
97
+ site: filterMenuData.contentType.map(
98
+ (siteType: FilterMenuItem) => siteType.id
99
+ ),
100
+ dates: filterMenuData.dates.map((date: FilterMenuItem) =>
86
101
  date.shortName ? date.shortName : date.id
87
102
  ),
88
- author: filterMenuData.authors.map((author) => author.id),
89
- category: filterMenuData.categories.map((category) => category.id)
103
+ author: filterMenuData.authors.map(
104
+ (author: FilterMenuItem) => author.id
105
+ ),
106
+ category: filterMenuData.categories.map(
107
+ (category: FilterMenuItem) => category.id
108
+ )
90
109
  };
91
110
 
92
111
  const COMMON_FIELDS = [
@@ -150,8 +169,20 @@ export async function getArchivePosts(
150
169
  };
151
170
  }
152
171
 
153
- export async function getArchiveFilterList() {
154
- const response = await fetch(ARCHIVE_FILTER_LIST_URL);
172
+ export async function getArchiveFilterList(postType: string = "all") {
173
+ if (filtersController) {
174
+ filtersController.abort();
175
+ }
176
+
177
+ filtersController = new AbortController();
178
+ const { signal } = filtersController;
179
+
180
+ const response = await fetch(
181
+ `${ARCHIVE_FILTER_LIST_URL}${
182
+ postType !== "all" ? `&post-type=${postType}` : ""
183
+ }`,
184
+ { signal }
185
+ );
155
186
 
156
187
  if (response.ok) {
157
188
  return response.json();
@@ -22,7 +22,7 @@
22
22
  if:true={showArchives}
23
23
  onclick={onClick}
24
24
  variant="link"
25
- href='/content-archive?c__filter=%5B"Podcasts"%5D'
25
+ href='/content-archive?site=Podcasts'
26
26
  text="VIEW ARCHIVES"
27
27
  ></dx-hr>
28
28
  </div>
package/LICENSE DELETED
@@ -1,12 +0,0 @@
1
- Copyright (c) 2020, Salesforce.com, Inc.
2
- All rights reserved.
3
-
4
- Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
5
-
6
- * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
7
-
8
- * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
9
-
10
- * Neither the name of Salesforce.com nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
11
-
12
- THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.