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,QAAO,CAAAC,cAAA,EAAAC,YAAA,EAAAC,UAAA,EAAAC,YAAA,OAAAzB,GAAA3B,EAAAA,EAAAA,GAAAb,EAAAc,UAAA,wBASPoD,EAAAA,SAAO,CAAAJ,cAAA,EAAAC,YAAA,EAAAC,UAAA,EAAAC,YAAA,iBAAwB,CAAC7D,KAAKoD,SAAS,IAAAf,GAAA5B,EAAAA,EAAAA,GAAAb,EAAAc,UAAA,iBAK9CoD,EAAAA,SAAO,CAAAJ,cAAA,EAAAC,YAAA,EAAAC,UAAA,EAAAC,YAAA,kBAAiB7D,KAAKoD,QAAQ,IAAAd,GAAA7B,EAAAA,EAAAA,GAAAb,EAAAc,UAAA,gBAKrCoD,EAAAA,SAAO,CAAAJ,cAAA,EAAAC,YAAA,EAAAC,UAAA,EAAAC,YAAA,iBAAgB,KAAK,IAAAtB,IAAA9B,EAAAA,EAAAA,GAAAb,EAAAc,UAAA,qBAAAhB,GAAA,CAAAgE,cAAA,EAAAC,YAAA,EAAAC,UAAA,EAAAC,YAAA,QAAApD,EAAAA,EAAAA,GAAAb,EAAAc,UAAA,mBAY5BqD,EAAAA,QAAMpD,OAAAC,yBAAAhB,EAAAc,UAAA,mBAAAd,EAAAc,YAAAD,EAAAA,EAAAA,GAAAb,EAAAc,UAAA,yBAAAiB,GAAAhB,OAAAC,yBAAAhB,EAAAc,UAAA,yBAAAd,EAAAc,WAqBwBG,EArBxBjB,KAAAiB,IAlC4BC,EAAAA,EAAAA,sBAAAC,EAAAU,G","sources":["./components/access-control/access-plans/row/access-plan-list-view-row/index.hbs","./components/access-control/access-plans/row/access-plan-list-view-row/index.ts","./components/access-control/access-plans/list/access-plan-list-view/index.hbs","./components/access-control/access-plans/list/access-plan-list-view/index.ts"],"sourcesContent":["import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"\\n \\n
\\n \\n {{@accessPlan.name}}\\n
\\n \\n \\n \\n \\n \\n
\\n {{#each this.accessPointsDetails as |accessPointsDetail|}}\\n \\n \\n \\n {{if @accessPlan.isAllAccess (t \\'generic.all\\') accessPointsDetail.count}}\\n \\n \\n {{/each}}\\n
\\n \\n \\n \\n \\n {{#if @useRestrictedAccessColumn}}\\n \\n {{#if this.displayRestrictedAccessEnabled}}\\n
\\n \\n\\n {{!-- Popover tooltip explaining restricted access --}}\\n \\n

{{t \\'generic.access-control.restrictedAccessPopoverText\\'}}

\\n \\n
\\n {{/if}}\\n \\n {{/if}}\\n \\n {{#if @useStatusPill}}\\n \\n {{/if}}\\n {{#if @showEditButton}}\\n \\n \\n \\n {{/if}}\\n \\n\\n\\n\",{ moduleName: \"customer-site/components/access-control/access-plans/row/access-plan-list-view-row/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport { computed } from '@ember/object';\nimport { intlPath } from '@adc/i18n/path';\nimport { getAccessPointDetailRows } from '../../item/base-access-plan-details/index';\nimport BaseAccessPlanRow from '../base-access-plan/index';\n\nimport type { AccessPlanDetailRowType, ActiveAccessPoint } from '../../item/base-access-plan-details/index';\nimport './_style.scss';\n\n/**\n * Displays a single Access Plan\n */\n@intlPath({ path: 'access-control/access-plans/row/access-plan-list-view-row' })\nexport default class AccessPlanListViewRow extends BaseAccessPlanRow {\n @computed('args.accessPlan.{accessPoints.@each.deviceType}', 'args.planDetailTotals')\n get accessPointsDetails(): Array {\n const accessPlan = this.args.accessPlan;\n if (!accessPlan) {\n return [];\n }\n\n const accessPointDetailRows = getAccessPointDetailRows.call(this, accessPlan, this.args.planDetailTotals);\n\n return ['partitions', 'locks', 'doors', 'elevators']\n .map((deviceType: ActiveAccessPoint) => accessPointDetailRows[deviceType])\n .rejectBy('hidden');\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'AccessControl::AccessPlans::Row::AccessPlanListViewRow': typeof AccessPlanListViewRow;\n }\n}\n","import { precompileTemplate } from \"@ember/template-compilation\";\nexport default precompileTemplate(\"{{#if (and (media \\'isMobile\\') (not @useListViewOnMobile))}}\\n {{#each @accessPlans as |accessPlan|}}\\n \\n {{/each}}\\n{{else}}\\n
\\n \\n \\n \\n \\n \\n \\n {{#if @useRestrictedAccessColumn}}\\n \\n {{/if}}\\n \\n \\n \\n \\n \\n \\n \\n {{#if @useRestrictedAccessColumn}}\\n \\n {{/if}}\\n \\n \\n \\n {{#each this.sortedAccessPlans as |accessPlan|}}\\n \\n {{/each}}\\n \\n
\\n \\n {{t \\'generic.access-control.accessPlanName\\'}}\\n \\n \\n \\n \\n {{t \\'generic.users\\'}}\\n \\n \\n {{t \\'generic.access-control.accessPoints\\'}}{{t \\'generic.schedule\\'}}{{t \\'generic.access-control.restrictedAccess\\'}}\\n {{#if @useAddDeleteButton}}\\n \\n {{/if}}\\n
\\n
\\n{{/if}}\\n\\n\",{ moduleName: \"customer-site/components/access-control/access-plans/list/access-plan-list-view/index.hbs\" })","/* import __COLOCATED_TEMPLATE__ from './index.hbs'; */\nimport Component from '@glimmer/component';\nimport { tracked } from '@glimmer/tracking';\nimport { action, computed } from '@ember/object';\nimport { sort } from '@ember/object/computed';\nimport { inject as service } from '@ember/service';\nimport { intlPath } from '@adc/i18n/path';\nimport { AccessPlanSortByNameSelected, AccessPlanSortByUsersSelected } from '../../../../../enums/TrackedEvent';\n\nimport type ADCIntlService from '@adc/i18n/services/adc-intl';\nimport type { AccessPlansIndexRouteModel } from 'customer-site/classes/access-control/access-plans/base-index-route';\nimport type AccessControlAccessPlanModel from 'customer-site/models/access-control/access-control-access-plan';\nimport type { PlanDetailsTotalKey } from 'customer-site/models/access-control/access-control-access-plan';\nimport type ContextManager from 'customer-site/services/context-manager';\nimport type Stats from 'customer-site/services/stats';\nimport './_style.scss';\n\ninterface CommonArgs {\n accessPlans?: Awaited;\n planDetailTotals?: Record;\n useListViewOnMobile?: boolean;\n disableAddDeleteButton?: boolean;\n useRestrictedAccessColumn?: boolean;\n useStatusPill?: boolean;\n shortenUsersText?: boolean;\n}\n\nexport interface AccessPlanListViewSignature {\n Args:\n | (CommonArgs & {\n useAddDeleteButton?: false | undefined;\n openAddDeleteModalAction?: VoidFunction;\n })\n | (CommonArgs & {\n useAddDeleteButton: true;\n openAddDeleteModalAction: VoidFunction;\n });\n}\n\n/**\n * Displays a list of Access Plans in a list view\n */\n@intlPath({ path: 'access-control/access-plans/list/access-plan-list-view' })\nexport default class AccessPlanListView extends Component {\n @service declare stats: Stats;\n @service declare intl: ADCIntlService;\n @service declare contextManager: ContextManager;\n\n nameSort = 'name';\n\n usersSort = 'users.length';\n\n /**\n * Keeps track of the current column being sorted\n */\n @tracked accessPlansSortOrder = [this.nameSort];\n\n /**\n * Used to keep track of the current column for icon orientation\n */\n @tracked currentColumn = this.nameSort;\n\n /**\n * Used to keep track of the current order for icon orientation\n */\n @tracked currentOrder = 'asc';\n\n /**\n * Sorts the array of access plan models for list\n */\n @sort('args.accessPlans', 'accessPlansSortOrder')\n declare sortedAccessPlans: AccessControlAccessPlanModel[];\n\n /**\n * Determines what order the list should be sorted in based on\n * the current and past sort order\n */\n @action sortAccessPlans(column: string): void {\n const [currentSort] = this.accessPlansSortOrder;\n let order = ':asc';\n\n // If the same column is selected check if it is already descending\n // if it is switch to ascending and vise versa\n if (currentSort.includes(column)) {\n order = `${currentSort.includes(':desc') ? ':asc' : ':desc'}`;\n }\n\n // set the sort order, currentCol and currentOrd\n this.accessPlansSortOrder = [`${column}${order}`];\n this.currentColumn = column;\n this.currentOrder = order.slice(1);\n\n // Log what sort is being selected\n this.stats.logEvent(\n this.currentColumn === this.nameSort ? AccessPlanSortByNameSelected : AccessPlanSortByUsersSelected\n );\n }\n\n @computed('args.useStatusPill')\n get listViewColGroupClass(): string {\n if (this.args.useStatusPill) {\n return 'col-group-status-pill';\n }\n\n return 'col-group-temporary-access';\n }\n}\n\ndeclare module '@glint/environment-ember-loose/registry' {\n export default interface Registry {\n 'AccessControl::AccessPlans::List::AccessPlanListView': typeof AccessPlanListView;\n }\n}\n"],"names":["createTemplateFactory","scope","uiColoredIcon_","buttonSimple_","t_","on","svgSymbol_","scheduleTypeView_","guidFor_","popoverMenu_","guidFor_0","t_0","statusToggle_","dropdownActions_","buttonIcon_","AccessPlanListViewRow","_dec","intlPath","path","_dec2","computed","_class2","BaseAccessPlanRow","accessPointsDetails","accessPlan","this","args","accessPointDetailRows","getAccessPointDetailRows","call","planDetailTotals","map","deviceType","rejectBy","_applyDecoratedDescriptor","prototype","Object","getOwnPropertyDescriptor","_class","setComponentTemplate","TEMPLATE","and_","media_","not_","accessControlAccessPlansRowAccessPlan_","await_","tc_","eq_","fn","accessControlAccessPlansRowAccessPlanListViewRow_","AccessPlanListView","sort","_dec3","Component","constructor","arguments","_initializerDefineProperty","_descriptor","_descriptor2","_descriptor3","_defineProperty","_descriptor4","_descriptor5","_descriptor6","_descriptor7","sortAccessPlans","column","currentSort","accessPlansSortOrder","order","includes","concat","currentColumn","currentOrder","slice","stats","logEvent","nameSort","AccessPlanSortByNameSelected","AccessPlanSortByUsersSelected","listViewColGroupClass","useStatusPill","service","configurable","enumerable","writable","initializer","tracked","action"],"sourceRoot":""}