@brightspace-hmc/siren-sdk
Advanced tools
Comparing version 2.119.0 to 2.120.0
{ | ||
"name": "@brightspace-hmc/siren-sdk", | ||
"version": "2.119.0", | ||
"version": "2.120.0", | ||
"type": "module", | ||
@@ -5,0 +5,0 @@ "description": "", |
@@ -257,1 +257,2 @@ import 'd2l-fetch/d2l-fetch.js'; | ||
export const appendHiddenFields = _appendHiddenFields; | ||
export const getSirenFields = _getSirenFields; |
@@ -847,2 +847,3 @@ export const Rels = { | ||
courseMergeLogDetail: 'course-merge-log-detail', | ||
sortCourseMergeLogsByStartTime: 'sort-course-merge-logs-by-start-time', | ||
timeFilter: 'time-filter' | ||
@@ -849,0 +850,0 @@ } |
@@ -6,4 +6,4 @@ /** | ||
import { Actions, Rels } from '../../hypermedia-constants.js'; | ||
import { getEntityUrl, getSirenFields, performSirenAction } from '../../es6/SirenAction.js'; | ||
import { BaseCollectionEntity } from './BaseCollectionEntity.js'; | ||
import { performSirenAction } from '../../es6/SirenAction.js'; | ||
@@ -31,2 +31,26 @@ export class CourseMergeLogDetailCollectionEntity extends BaseCollectionEntity { | ||
hasSortAction() { | ||
return this._entity.hasActionByName(Actions.ipsis.sisCourseMerge.sortCourseMergeLogsByStartTime); | ||
} | ||
getSortAction() { | ||
if (!this.hasSortAction()) { | ||
return; | ||
} | ||
return this._entity.getActionByName(Actions.ipsis.sisCourseMerge.sortCourseMergeLogsByStartTime); | ||
} | ||
courseMergeLogsSortHref(sort) { | ||
const action = this.getSortAction(); | ||
if (!action) { | ||
return; | ||
} | ||
const fields = [{ name: 'sortByStartTimeAsc', value: sort }]; | ||
const existingFields = getSirenFields(action); | ||
return getEntityUrl(action, [...existingFields, ...fields]); | ||
} | ||
canGetLogs() { | ||
@@ -52,2 +76,6 @@ return this._entity?.properties?.canGetLogs; | ||
isSortAscending() { | ||
return this._entity?.properties?.sortByStartTimeAsc; | ||
} | ||
filtersHref() { | ||
@@ -54,0 +82,0 @@ if (!this._entity.hasLinkByRel(Rels.filters)) { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
403399
11182