UNPKG

profile-plus

Version:

30 lines 1.52 kB
"use strict"; var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) { var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d; if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r; return c > 3 && r && Object.defineProperty(target, key, r), r; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.BlockAction = void 0; const package_js_1 = require("../package.js"); const profile_plus_js_1 = require("../ontologies/profile-plus.js"); const Action_1 = require("lincd-schema/shapes/Action"); let BlockAction = class BlockAction extends Action_1.Action { static getBlockedPersonsByAgent(agent) { return this.getBlockActionsByAgent(agent).map((blockAction) => { return blockAction.object; }); } static getBlockActionsByAgent(agent) { return this.getLocalInstances().filter((blockAction) => { return blockAction.agent.namedNode === agent.namedNode; }); } }; exports.BlockAction = BlockAction; BlockAction.targetClass = profile_plus_js_1.profilePlus.BlockAction; exports.BlockAction = BlockAction = __decorate([ package_js_1.linkedShape ], BlockAction); //# sourceMappingURL=BlockAction.js.map