sf-i-events
Version:
Superflows Navigation Component
1,224 lines (1,201 loc) • 2.02 MB
JavaScript
/**
* @license
* Copyright 2022 Superflow.dev
* SPDX-License-Identifier: MIT
*/
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;
};
import { LitElement, html, css } from 'lit';
import { customElement, query, queryAssignedElements, property } from 'lit/decorators.js';
// import {customElement, query, property} from 'lit/decorators.js';
import Util from './util';
import { Chart, registerables } from 'chart.js';
// import {LitElement, html, css} from 'lit';
// import {customElement} from 'lit/decorators.js';
/*
Modes: View, Add, Edit, Delete, Admin
DB: partitionKey, rangeKey, values
*/
/**
* SfIEvents element.
* @fires renderComplete - When the list is populated
* @fires valueChanged - When the value is changed
* @property apiId - backend api id
* @property label - input label
* @property name - name of the input
* @property mode - mode of operation
* @property selectedId - id to preselect
* @property selectedValue - callback function
*/
let SfIEvents = class SfIEvents extends LitElement {
constructor() {
super();
this.SEARCH_BLOCK_SIZE = 10;
this.FLOW_GRAPH_COMPLETENESS = "completeness";
this.FLOW_GRAPH_TIMELINESS = "timeliness";
this.FLOW_GRAPH_COMPLIANCE = "compliance";
this.FLOW_GRAPH_RISKAREAS = "riskarea";
this.FLOW_GRAPH_RISKSEVERITY = "risk";
this.FLOW_GRAPH_LOCATION = "locationname";
this.FLOW_GRAPH_FUNCTION = "functions";
this.FLOW_GRAPH_OBLIGATIONTYPE = "obligationtype";
this.FLOW_GRAPH_JURISDICTION = "jurisdiction";
this.FLOW_GRAPH_FREQUENCY = "frequency";
this.FLOW_GRAPH_SUBCATEGORY = "subcategory";
this.TAB_GROUP_BUSINESS_UNDERSTANDING = "businessunderstanding";
this.TAB_GROUP_GOVERNANCE_MAPPING = "governancemapping";
this.TAB_GROUP_CUSTOMIZATION = "customize";
this.TAB_GROUP_ROLLOUT = "rollout";
this.TAB_YEAR = "year";
this.TAB_FIND = "find";
this.TAB_STREAM = "stream";
this.TAB_UPCOMING = "upcoming";
this.TAB_THIS = "this";
this.TAB_PAST = "past";
this.TAB_CUSTOM = "custom";
this.TAB_ADHOC = "adhoc";
this.TAB_REGISTERS = "registers";
this.TAB_ALL_ROLES = "allroles";
this.TAB_REPORTER = "reporter";
this.TAB_APPROVER = "approver";
this.TAB_FUNCTION_HEAD = "functionhead";
this.TAB_AUDITOR = "auditor";
this.TAB_VIEWER = "viewer";
this.TAB_STATUTES = "statutes";
this.TAB_COMPLIANCES = "compliances";
this.TAB_NOTICES = "notices";
this.TAB_ENTITIES = "entities";
this.TAB_LOCATIONS = "locations";
this.TAB_TAGS = "tags";
this.TAB_REPORTERS = "reporters";
this.TAB_APPROVERS = "approvers";
this.TAB_FUNCTION_HEADS = "functionheads";
this.TAB_MAKER_CHECKERS = "makercheckers";
this.TAB_AUDITORS = "auditors";
this.TAB_DOCS = "docs";
this.TAB_VIEWERS = "viewers";
this.TAB_DUEDATES = "duedates";
this.TAB_EXTENSIONS = "extensions";
this.TAB_TRIGGERS = "triggers";
this.TAB_ALERTSCHEDULES = "alertschedules";
this.TAB_ACTIVATIONS = "activations";
this.TAB_INVALIDATION = "invalidations";
this.TAB_INTERNALCONTROLS = "internalcontrols";
this.TAB_REPORTEDLOCATIONS = "reportedlocations";
this.TAB_SIGNOFF = "signoff";
this.TAB_FUNCTIONS = "functions";
this.TAB_COUNTRIES = "countries";
this.TAB_CALENDAR = "calendar";
this.TAB_SUSPENSE = "suspense";
this.TAB_RCM_COMPLIANCES = "compliances";
this.TAB_RCM_PROJECTS = "projects";
this.TAB_RCM_DATE = "date";
this.TAB_RCM_CONFIRM = "confirm";
this.TAB_RCM_JOBS = "jobs";
this.TAB_ALL = "all";
this.TAB_PENDING_ON_ME = "pending on me";
this.TAB_PENDING_ON_REPORTER = "pending on reporter";
this.TAB_PENDING_ON_APPROVER = "pending on approver";
this.TAB_DONE = "done";
this.COLOR_APPROVED = "#50cf01";
this.COLOR_NOT_STARTED = "#A4A9AD";
this.COLOR_PENDING_APPROVAL = "#ffe505";
this.COLOR_REJECTED = "#C80036";
this.COLOR_PAST_DUE_DATE = "#ffe505";
this.COLOR_LATE_EXECUTED = "#840B0F";
this.COLOR_LATE_APPROVED = "#EE2F36";
this.COLOR_LATE_REPORTED = "#Ef9C66";
this.COLOR_SCHEDULED = "#888888";
this.COLOR_NOT_COMPLIED = "#C80036";
this.COLOR_PARTIALLY_COMPLIED = "#F79256";
this.COLOR_COMPLIED = "#50cf01";
this.COLOR_COMPLIED_WITH_EXCEPTION = "#ffe505";
this.COLOR_REPORTED_NON_COMPLIANCE = "#840B0F";
this.STATUS_NOT_STARTED = "not-started";
this.STATUS_PENDING_APPROVAL = "pending-approval";
this.STATUS_REJECTED = "rejected";
this.STATUS_APPROVED = "approved";
this.CERTIFICATE_HTML = `
<html>
<head>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@200;300;400;600&display=swap" rel="stylesheet">
<style>
body {
font-family: Source Sans Pro;
margin: 2px;
padding: 20px;
background-color: #efefef;
}
.certificate-section {
background-image: url('https://flagggrc-images.s3.amazonaws.com/certificate_background.jpg');
background-size: cover;
background-position: center;
box-shadow: inset 2px 2px 6px rgba(5, 5, 5, 0.2);
border-top: solid 1px rgba(255, 255, 255, 0.8);
border-left: solid 1px rgba(255, 255, 255, 0.8);
border-bottom: solid 1px rgba(255, 255, 255, 0.8);
border-right: solid 1px rgba(255, 255, 255, 0.8);
overflow:hidden;
padding-top: 10px;
padding-bottom: 20px;
padding-left: 20px;
padding-right: 20px;
border-radius: 10px;
position: relative;
z-index: 1;
}
.certificate-section h1 {
font-family: Belanosima;
font-weight: 600;
}
.person-designation {
text-transform: capitalize;
}
.status-format {
text-transform: uppercase;
}
.text-center {
text-align: center;
}
.d-flex {
display: flex;
}
.justify-center {
justify-content: center;
}
.justify-between {
justify-content: space-between;
}
.align-center {
align-items: center;
}
.w-25 {
width: 25%;
}
.w-16 {
width: 16%;
}
.w-14 {
width: 14%;
}
.w-12 {
width: 12%;
}
.w-100 {
width: 100%;
}
.text-center {
text-align: center;
}
table {
box-shadow: 1px 1px 10px 0 rgba(0, 0, 0, 0.25), -1px -1px 10px 0 rgba(255, 255, 255, 0.6);
border-top: solid 1px rgba(255, 255, 255, 0.8);
border-left: solid 1px rgba(255, 255, 255, 0.8);
border-bottom: solid 1px rgba(255, 255, 255, 0.8);
border-right: solid 1px rgba(255, 255, 255, 0.8);
overflow:hidden;
}
th {
background-color: #6a6a6a;
color: white;
padding: 5px;
}
.td-thin {
min-width: 150px;
}
.td-wide {
min-width: 300px;
}
td {
padding: 5px;
font-size: 70%;
vertical-align: top;
min-width: 200px;
}
td span {
font-size: 130% !important;
}
.td-odd {
background-color: #efefef;
}
.td-even {
background-color: #dedede;
}
.color-pending {
color: #ffe505;
}
.color-pending-approval {
color: #ffe505;
}
.color-not-started {
color: #888888;
}
.color-not-complied {
color: #C80036;
}
.color-partially-complied {
color: #F79256;
}
.color-scheduled {
color: #888888;
}
.color-complied {
color: #50cf01;
}
.color-done {
color: #50cf01;
}
.color-rejected {
color: #C80036;
}
.color-approved {
color: #50cf01;
}
.color-past-due-date {
color: #ffe505;
}
.color-late-executed {
color: #840B0F;
}
.color-late-approved {
color: #EE2F36;
}
.color-late-reported {
color: #Ef9C66;
}
.watermark {
background-image: url(https://flagggrc-images.s3.amazonaws.com/logo.png);
background-position: center;
background-repeat: repeat;
background-size: 200px 53.58px;
transform: translateZ(0);
image-rendering: pixelated;
opacity: 0.05;
left: 0;
right: 0;
top: 0;
bottom: 0;
position: absolute;
z-inidex: 0;
}
</style>
</head>
<body>
<div class="certificate-section">
<h1 class="text-center">Certificate</h1>
<div class="watermark"></div>
<p>I, PERSON_NAME, working as <span class="person-designation">PERSON_DESIGNATION</span> in PERSON_COMPANY, hereby declare that I am entrusted with the responsibility of ensuring compliance with various laws applicable to the company in the administration of business and the affairs of the company</p>
<p>After having examined and considered all relevant information and based on the information furnished by the concerned officers, I, do hereby certify that the Finance / Technical / Administration / Legal wings / department of PERSON_COMPANY for the period PERSON_PERIOD, has in the conduct of business:</p>
<ol>
<li>Complied with all applicable laws, enactments, orders, rules, regulations, and other statutory requirements of the Central, State and other Statutory and local authorities concerning the business and affairs of the company;</li>
<li>Paid all applicable statutory dues on due dates;</li>
<li>Maintained proper registers, records, documents and books and filed proper returns, forms and statements and furnished necessary particulars to the relevant authorities; and</li>
<li>Not done or committed any act or entered into any transactions in violation of any statutory provisions</li>
</ol>
<br /><br />
<div class="d-flex justify-between align-center">
<div>
<div>Date: PERSON_DATE</div>
<div>Criteria: PERSON_CRITERIA</div>
</div>
<div>
<div>Name: PERSON_NAME</div>
<div class="person-designation">Role: PERSON_DESIGNATION</div>
</div>
</div>
</div>
<br /><br />
<div class="watermark"></div>
<h3>Compliance Status</h3>
PERSON_COMPLIANCE_STATUS
<br /><br />
<h3>Compliances List</h3>
PERSON_COMPLIANCES
</body>
</html>
`;
this.COMPLIANCES_HTML = `
<html>
<head>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com/">
<link rel="preconnect" href="https://fonts.gstatic.com/" crossorigin="">
<link href="https://fonts.googleapis.com/css2?family=DM+Sans:wght@100;300;400;700;900&family=Oleo+Script&family=Oswald:wght@700&display=swap" rel="stylesheet">
<style>
body {
font-family: DM Sans;
margin: 2px;
padding: 20px;
}
.status-format {
text-transform: uppercase;
}
.text-center {
text-align: center;
}
.d-flex {
display: flex;
}
.justify-center {
justify-content: center;
}
.justify-between {
justify-content: space-between;
}
.align-center {
align-items: center;
}
.flex-wrap {
flex-wrap: wrap;
}
.mt-10 {
margin-top: 10px;
}
.w-25 {
width: 25%;
}
.w-16 {
width: 16%;
}
.w-14 {
width: 14%;
}
.w-12 {
width: 12%;
}
.w-100 {
width: 100%;
}
.w-200px {
width: 200px;
}
.text-center {
text-align: center;
}
table {
box-shadow: 1px 1px 10px 0 rgba(0, 0, 0, 0.25), -1px -1px 10px 0 rgba(255, 255, 255, 0.6);
border-top: solid 1px rgba(255, 255, 255, 0.8);
border-left: solid 1px rgba(255, 255, 255, 0.8);
border-bottom: solid 1px rgba(255, 255, 255, 0.8);
border-right: solid 1px rgba(255, 255, 255, 0.8);
overflow:auto;
}
th {
background-color: #6a6a6a;
color: white;
padding: 5px;
}
.td-thin {
min-width: 150px;
}
.td-wide {
min-width: 300px;
}
.td-head {
font-weight: 400;
padding-left: 5px;
vertical-align: middle;
font-size: 80%;
text-transform: capitalize;
text-align: left;
}
td {
padding: 5px;
font-size: 70%;
vertical-align: top;
min-width: 200px;
}
td span {
font-size: 130% !important;
}
.td-odd {
background-color: #efefef;
}
.td-even {
background-color: #dedede;
}
.color-pending {
color: #ffe505;
}
.color-pending-approval {
color: #ffe505;
}
.color-not-started {
color: #888888;
}
.color-not-complied {
color: #C80036;
}
.color-partially-complied {
color: #F79256;
}
.color-complied {
color: #50cf01;
}
.color-complied-with-gaps {
color: #ffe505;
}
.color-reported-non-compliance {
color: #840B0F;
}
.color-scheduled {
color: #888888;
}
.color-done {
color: #50cf01;
}
.color-rejected {
color: #C80036;
}
.color-approved {
color: #50cf01;
}
.color-past-due-date {
color: #ffe505;
}
.color-late-executed {
color: #840B0F;
}
.color-late-approved {
color: #EE2F36;
}
.color-late-reported {
color: #Ef9C66;
}
.h-100 {
height: 100vh;
}
.abs {
position: absolute;
}
.watermark {
background-image: url(https://flagggrc-images.s3.amazonaws.com/logo.png);
background-position: center;
background-repeat: no-repeat;
opacity: 5%;
width: 100%;
height: 100vh;
position: fixed;
}
.scroll-x {
display: block;
overflow-x: auto;
}
</style>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jspdf/2.5.1/jspdf.umd.min.js"></script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/dompurify/3.0.5/purify.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/html2canvas/1.4.1/html2canvas.min.js"></script>
</head>
<body>
<div>
<h1>Compliance Report</h1>
<div class="d-flex justify-between align-center">
<div>
<div>Report generated for PROJECT_NAME on REPORT_DATE</div>
</div>
</div>
<div class="d-flex justify-between align-center">
FILTERS_DATA
</div>
<br />
<div class="watermark"></div>
<div class="report">
PERSON_COMPLIANCES
</div>
</div>
<script>
</script>
</body>
</html>
`;
this.MAPPING_HTML = `
<html>
<head>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@200;300;400;600&display=swap" rel="stylesheet">
<script src="https://unpkg.com/@webcomponents/webcomponentsjs@latest/webcomponents-loader.js"></script>
<script type="module">
import {LitElement, html, css} from 'https://esm.run/lit-element/lit-element.js';
import {SfISelect} from 'https://esm.run/sf-i-select/sf-i-select.js';
import {SfISubSelect} from 'https://esm.run/sf-i-sub-select/sf-i-sub-select.js';
import {SfIForm} from 'https://esm.run/sf-i-form/sf-i-form.js';
import {SfIElasticText} from 'https://esm.run/sf-i-elastic-text/sf-i-elastic-text.js';
import {SfIUploader} from 'https://esm.run/sf-i-uploader/sf-i-uploader.js';
import {SfIMultitextarea} from 'https://esm.run/sf-i-multitextarea/sf-i-multitextarea.js';
// import {LitElement, html, css} from 'https://unpkg.com/lit-element@3.3.3/lit-element.js?module';
// import {SfNav} from 'https://unpkg.com/sf-nav@1.0.94/sf-nav.js?module';
// import {SfChartPie} from 'https://unpkg.com/sf-chart-pie@1.0.4/sf-chart-pie.js?module';
// import {SfChartBar} from 'https://unpkg.com/sf-chart-bar@1.0.6/sf-chart-bar.js?module';
// import {SfUserAuth} from 'https://unpkg.com/sf-user-auth@1.0.89/sf-user-auth.js?module';
// import {SfISelect} from 'https://unpkg.com/sf-i-select@1.0.91/sf-i-select.js?module';
// import {SfISubSelect} from 'https://unpkg.com/sf-i-sub-select@1.0.82/sf-i-sub-select.js?module';
// import {SfIForm} from 'https://unpkg.com/sf-i-form@1.0.125/sf-i-form.js?module';
// import {SfIEvents} from 'https://unpkg.com/sf-i-events@1.0.469/sf-i-events.js?module';
// import {SfIElasticText} from 'https://unpkg.com/sf-i-elastic-text@1.0.11/sf-i-elastic-text.js?module';
// import {SfIUploader} from 'https://unpkg.com/sf-i-uploader@1.0.60/sf-i-uploader.js?module';
// import {SfRandomText} from 'https://unpkg.com/sf-random-text@1.0.2/sf-random-text.js?module';
// import {SfIMultitextarea} from 'https://unpkg.com/sf-i-multitextarea@1.0.16/sf-i-multitextarea.js?module';
</script>
<style>
body {
font-family: Source Sans Pro;
margin: 2px;
padding: 20px;
background-color: #efefef;
}
.chosen {
background-color: #E5FAD4 !important;
}
.td-head {
text-transform: capitalize;
}
.status-format {
text-transform: uppercase;
}
.text-center {
text-align: center;
}
.d-flex {
display: flex;
}
.justify-center {
justify-content: center;
}
.justify-between {
justify-content: space-between;
}
.align-center {
align-items: center;
}
.w-25 {
width: 25%;
}
.w-16 {
width: 16%;
}
.w-14 {
width: 14%;
}
.w-12 {
width: 12%;
}
.w-100 {
width: 100%;
}
.text-center {
text-align: center;
}
table {
box-shadow: 1px 1px 10px 0 rgba(0, 0, 0, 0.25), -1px -1px 10px 0 rgba(255, 255, 255, 0.6);
border-top: solid 1px rgba(255, 255, 255, 0.8);
border-left: solid 1px rgba(255, 255, 255, 0.8);
border-bottom: solid 1px rgba(255, 255, 255, 0.8);
border-right: solid 1px rgba(255, 255, 255, 0.8);
overflow:hidden;
}
th {
background-color: #6a6a6a;
color: white;
padding: 5px;
}
td {
padding: 5px;
font-size: 70%;
vertical-align: top;
}
td span {
font-size: 130% !important;
}
.td-odd {
background-color: #efefef;
}
.td-even {
background-color: #dedede;
}
.color-pending {
color: #ffe505;
}
.color-pending-approval {
color: #ffe505;
}
.color-not-started {
color: #888888;
}
.color-not-complied {
color: #C80036;
}
.color-partially-complied {
color: #F79256;
}
.color-complied {
color: #50cf01;
}
.color-complied-with-gaps {
color: #ffe505;
}
.color-reported-non-compliance {
color: #840B0F;
}
.color-scheduled {
color: #888888;
}
.color-done {
color: #50cf01;
}
.color-rejected {
color: #C80036;
}
.color-approved {
color: #50cf01;
}
.color-past-due-date {
color: #ffe505;
}
.color-late-executed {
color: #840B0F;
}
.color-late-approved {
color: #EE2F36;
}
.color-late-reported {
color: #Ef9C66;
}
</style>
</head>
<body>
TABLE_DATA
</body>
</html>
`;
this.TAGGING_HTML = `
<html>
<head>
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@48,400,0,0" />
<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet">
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Source+Sans+Pro:wght@200;300;400;600&display=swap" rel="stylesheet">
<script src="https://unpkg.com/@webcomponents/webcomponentsjs@latest/webcomponents-loader.js"></script>
<script type="module">
import {LitElement, html, css} from 'https://esm.run/lit-element/lit-element.js';
import {SfISelect} from 'https://esm.run/sf-i-select/sf-i-select.js';
import {SfISubSelect} from 'https://esm.run/sf-i-sub-select/sf-i-sub-select.js';
import {SfIForm} from 'https://esm.run/sf-i-form/sf-i-form.js';
import {SfIElasticText} from 'https://esm.run/sf-i-elastic-text/sf-i-elastic-text.js';
import {SfIUploader} from 'https://esm.run/sf-i-uploader/sf-i-uploader.js';
import {SfIMultitextarea} from 'https://esm.run/sf-i-multitextarea/sf-i-multitextarea.js';
// import {LitElement, html, css} from 'https://unpkg.com/lit-element@3.3.3/lit-element.js?module';
// import {SfNav} from 'https://unpkg.com/sf-nav@1.0.94/sf-nav.js?module';
// import {SfChartPie} from 'https://unpkg.com/sf-chart-pie@1.0.4/sf-chart-pie.js?module';
// import {SfChartBar} from 'https://unpkg.com/sf-chart-bar@1.0.6/sf-chart-bar.js?module';
// import {SfUserAuth} from 'https://unpkg.com/sf-user-auth@1.0.89/sf-user-auth.js?module';
// import {SfISelect} from 'https://unpkg.com/sf-i-select@1.0.91/sf-i-select.js?module';
// import {SfISubSelect} from 'https://unpkg.com/sf-i-sub-select@1.0.82/sf-i-sub-select.js?module';
// import {SfIForm} from 'https://unpkg.com/sf-i-form@1.0.125/sf-i-form.js?module';
// import {SfIEvents} from 'https://unpkg.com/sf-i-events@1.0.469/sf-i-events.js?module';
// import {SfIElasticText} from 'https://unpkg.com/sf-i-elastic-text@1.0.11/sf-i-elastic-text.js?module';
// import {SfIUploader} from 'https://unpkg.com/sf-i-uploader@1.0.60/sf-i-uploader.js?module';
// import {SfRandomText} from 'https://unpkg.com/sf-random-text@1.0.2/sf-random-text.js?module';
// import {SfIMultitextarea} from 'https://unpkg.com/sf-i-multitextarea@1.0.16/sf-i-multitextarea.js?module';
</script>
<style>
body {
font-family: Source Sans Pro;
margin: 2px;
padding: 20px;
background-color: #efefef;
}
.chosen {
background-color: #E5FAD4 !important;
}
.td-head {
text-transform: capitalize;
}
.status-format {
text-transform: uppercase;
}
.text-center {
text-align: center;
}
.d-flex {
display: flex;
}
.justify-center {
justify-content: center;
}
.justify-between {
justify-content: space-between;
}
.align-center {
align-items: center;
}
.w-25 {
width: 25%;
}
.w-16 {
width: 16%;
}
.w-14 {
width: 14%;
}
.w-12 {
width: 12%;
}
.w-100 {
width: 100%;
}
.text-center {
text-align: center;
}
table {
box-shadow: 1px 1px 10px 0 rgba(0, 0, 0, 0.25), -1px -1px 10px 0 rgba(255, 255, 255, 0.6);
border-top: solid 1px rgba(255, 255, 255, 0.8);
border-left: solid 1px rgba(255, 255, 255, 0.8);
border-bottom: solid 1px rgba(255, 255, 255, 0.8);
border-right: solid 1px rgba(255, 255, 255, 0.8);
overflow:hidden;
}
th {
background-color: #6a6a6a;
color: white;
padding: 5px;
}
td {
padding: 5px;
font-size: 70%;
vertical-align: top;
}
td span {
font-size: 130% !important;
}
.td-odd {
background-color: #efefef;
}
.td-even {
background-color: #dedede;
}
.color-pending {
color: #ffe505;
}
.color-pending-approval {
color: #ffe505;
}
.color-not-started {
color: #888888;
}
.color-not-complied {
color: #C80036;
}
.color-partially-complied {
color: #F79256;
}
.color-complied {
color: #50cf01;
}
.color-scheduled {
color: #888888;
}
.color-done {
color: #50cf01;
}
.color-rejected {
color: #C80036;
}
.color-approved {
color: #50cf01;
}
.color-past-due-date {
color: #ffe505;
}
.color-late-executed {
color: #840B0F;
}
.color-late-approved {
color: #EE2F36;
}
.color-late-reported {
color: #Ef9C66;
}
</style>
</head>
<body>
TABLE_DATA
</body>
<script>
var preselectedValues = TABLE_VALUES;
const inputs = document.querySelectorAll('.tags-input');
for(var i = 0; i < inputs.length; i++) {
inputs[i].preselectedValues = preselectedValues[i];
}
</script>
</html>
`;
this.AUTOSAVE_FLAG = true;
this.EXCLUDE_COLS_FROM_REGS = ["updatetype", "question", "invalidations", "activations", "alertschedule", "clientquestion", "countryname", "countryid", "entityname", "entityid", "locationname", "locationid", "reporters", "approvers", "timeframe", "responsedays", "execmodule", "functions", "shortid", "shortnumid", "countries", "tagsmap", "reportersmap", "approversmap", "functionheadsmap", "auditorsmap", "viewersmap", "approved", "documents", "comments", "lastupdated", "dateofcompletion", "mmdd", "completeness", "timeliness", "compliance", "delta", "triggers", "lastmodifiedby", "lastmodifiedtime"];
this.CHARTS_LIST_BY_MODULES = { "compliances": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "notices": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "contracts": ["compliance", "timeliness", "completeness", "location"], "licenses": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"], "rcmresources": ["compliance", "timeliness", "completeness", "riskSeverity", "riskArea", "location", "function", "obligationType", "jurisdiction", "frequency", "subCategory"] };
this.chartSelectedLegend = [];
this.selectedFilters = null;
this.barCharDataSet2 = [];
this.barCharDataSet2Arr = [];
this.barCharDataSet3 = [];
this.barCharDataSet3Arr = [];
this.barCharDataSet4 = [];
this.barCharDataSet4Arr = [];
this.getallcountryevetsParams = "";
this.decryptProjectId = "";
this.decryptFileName = "";
this.filteronboarding = '[]';
this.getfilterOnboarding = () => {
return JSON.parse(this.filteronboarding);
};
this.getFilterOnboardingString = () => {
const jsonFilterOnboarding = JSON.parse(this.filteronboarding);
var html = '';
html += '<h5>Mapped Locations</h5>';
html += '<table>';
html += '<tr>';
html += '<th part="td-head">';
html += 'Country';
html += '</th>';
html += '<th part="td-head">';
html += 'State';
html += '</th>';
html += '<th part="td-head">';
html += 'Location';
html += '</th>';
html += '</tr>';
let count = 0;
for (var i = 0; i < jsonFilterOnboarding.length; i++) {
var country = jsonFilterOnboarding[i].country;
if (jsonFilterOnboarding[i].locations != null && Object.keys(jsonFilterOnboarding[i].locations).length > 0) {
for (var j = 0; j < Object.keys(jsonFilterOnboarding[i].locations).length; j++) {
const state = Object.keys(jsonFilterOnboarding[i].locations)[j];
var classBg = '';
if (count % 2 === 0) {
classBg = 'td-light';
}
else {
classBg = 'td-dark';
}
html += '<tr>';
html += '<td part="td-body1" class="' + classBg + '">';
html += country;
html += '</td>';
html += '<td part="td-body1" class="' + classBg + '">';
html += state;
html += '</td>';
html += '<td part="td-body1" class="' + classBg + '">';
//console.log('gettinglocations', (jsonFilterOnboarding[i]['locations'][state]));
var tempHtml = '';
for (var k = 0; k < (jsonFilterOnboarding[i]['locations'][state]).length; k++) {
const location = (jsonFilterOnboarding[i]['locations'][state])[k];
tempHtml += location;
if (k < ((jsonFilterOnboarding[i]['locations'][state]).length - 1)) {
tempHtml += ', ';
}
}
html += ('<div><sf-i-elastic-text exportparts="highlight,highlight-count" class="statute-summary id-9" text="' + tempHtml + '" minlength="50"></sf-i-elastic-text></div>');
html += '</td>';
html += '</tr>';
count++;
}
}
}
html += '</table>';
html += '<h5 class="mt-20">Mapped Laws</h5>';
html += '<table>';
html += '<tr>';
html += '<th part="td-head">';
html += 'Country';
html += '</th>';
html += '<th part="td-head">';
html += 'State';
html += '</th>';
html += '<th part="td-head">';
html += 'Subcategory';
html += '</th>';
html += '<th part="td-head">';
html += 'Exclusions';
html += '</th>';
html += '<th part="td-head">';
html += 'Inclusions';
html += '</th>';
html += '</tr>';
for (var i = 0; i < jsonFilterOnboarding.length; i++) {
var classBg = '';
if (i % 2 === 0) {
classBg = 'td-light';
}
else {
classBg = 'td-dark';
}
html += '<tr>';
html += '<td part="td-body1" class="' + classBg + '">';
html += jsonFilterOnboarding[i].country;
html += '</td>';
html += '<td part="td-body1" class="' + classBg + '">';
for (var j = 0; j < jsonFilterOnboarding[i].states.length; j++) {
html += ('<div>' + (jsonFilterOnboarding[i].states[j].length === 0 ? 'Federal' : jsonFilterOnboarding[i].states[j]) + '</div>');
}
html += '</td>';
html += '<td part="td-body1" class="' + classBg + '">';
for (var j = 0; j < jsonFilterOnboarding[i].subcategories.length; j++) {
html += ('<div>' + jsonFilterOnboarding[i].subcategories[j] + '</div>');
}
html += '</td>';
html += '<td part="td-body1" class="' + classBg + '">';
if (jsonFilterOnboarding[i].excludestatutes != null) {
for (var j = 0; j < jsonFilterOnboarding[i].excludestatutes.length; j++) {
html += ('<div><sf-i-elastic-text exportparts="highlight,highlight-count" class="statute-summary id-9" text="' + jsonFilterOnboarding[i].excludestatutes[j] + '" minlength="10"></sf-i-elastic-text></div>');
}
}
html += '</td>';
html += '<td part="td-body1" class="' + classBg + '">';
if (jsonFilterOnboarding[i].includestatutes != null) {
for (var j = 0; j < jsonFilterOnboarding[i].includestatutes.length; j++) {
html += ('<div><sf-i-elastic-text exportparts="highlight,highlight-count" class="statute-summary id-9" text="' + jsonFilterOnboarding[i].includestatutes[j] + '" minlength="20"></sf-i-elastic-text></div>');
}
}
html += '</td>';
html += '</tr>';
}
html += '</table>';
return html;
};
this.getLocations = () => {
return JSON.parse(this.locations);
};
this.getLocationsByCountry = (country, statute) => {
let locations = [];
if (this.getLocations()[country] != null) {
const states = Object.keys(this.getLocations()[country]);
for (var i = 0; i < states.length; i++) {
if (this.getfilterOnboarding().length === 0) {
locations.push(...this.getLocations()[country][states[i]]);
}
else {
for (var j = 0; j < this.getLocations()[country][states[i]].length; j++) {
for (var k = 0; k < this.getfilterOnboarding().length; k++) {
if (this.getfilterOnboarding()[k]['country'] == country) {
if (this.getfilterOnboarding()[k]['locations'] != null) {
if (this.getfilterOnboarding()[k]['locations'][states[i]] != null) {
var push = true;
if (this.getfilterOnboarding()[k]['locations'][states[i]].includes(this.getLocations()[country][states[i]][j])) {
if (this.getfilterOnboarding()[k]['excludelocations'] == null) {
}
else {
if (this.getfilterOnboarding()[k]['excludelocations'][statute] == null) {
}
else {
if (this.getfilterOnboarding()[k]['excludelocations'][statute][states[i]] == null) {
}
else {
if (statute == "Information Technology Act, 2000") {
//console.log("getLocationsByCountry", push, this.getfilterOnboarding()[k]['excludelocations'][statute][states[i]], this.getLocations()[country][states[i]][j], this.getfilterOnboarding()[k]['excludelocations'][statute][states[i]].includes(this.getLocations()[country][states[i]][j]));
}
if (this.getfilterOnboarding()[k]['excludelocations'][statute][states[i]].includes(this.getLocations()[country][states[i]][j])) {
//console.log("getLocationsByCountry", 'setting false');
push = false;
}
}
}
if (statute == "Information Technology Act, 2000") {
//console.log("getLocationsByCountry", push, this.getLocations()[country][states[i]][j]);
}
}
}
else {
push = false;
}
}
else {
push = false;
}
}
else {
push = false;
}
if (push) {
locations.push(this.getLocations()[country][states[i]][j]);
}
}
}
}
}
}
}
return locations;
};
this.getLocationsByState = (country, state, statute) => {
//console.log('getting getLocationsByState', country, state, this.getfilterOnboarding());
let locations = [];
if (this.getLocations()[country] != null) {
if (this.getLocations()[country][state] != null) {
if (this.getLocations()[country][state] != null) {
if (this.getfilterOnboarding().length === 0) {
locations.push(...this.getLocations()[country][state]);
}
else {
for (var k = 0; k < this.getfilterOnboarding().length; k++) {
if (this.getfilterOnboarding()[k]['country'] == country) {
for (var i = 0; i < this.getLocations()[country][state].length; i++) {
var push = true;
if (this.getfilterOnboarding()[k]['locations'] != null) {
if (this.getfilterOnboarding()[k]['locations'][state] != null) {
if (this.getfilterOnboarding()[k]['locations'][state].includes(this.getLocations()[country][state][i])) {
if (this.getfilterOnboarding()[k]['excludelocations'] == null) {
}
else {
if (this.getfilterOnboarding()[k]['excludelocations'][statute] == null) {
}
else {
if (this.getfilterOnboarding()[k]['excludelocations'][statute][state] == null) {
}
else {
if (this.getfilterOnboarding()[k]['excludelocations'][statute][state].includes(this.getLocations()[country][state][i])) {
push = false;
}
}
}
}
}
else {
push = false;
}
}
else {
push = false;
}
}
else {
push = false;
}
if (push) {
locations.push(this.getLocations()[country][state][i]);
}
}
}
}
}
}
}
}
//console.log('getting getLocationsByState return ', locations);
return locations;
};
this.selectedCbs = [];
this.contractStartDate = "";
this.disableflagggrcresponse = "";
this.disablesave = "";
this.disableclientresponse = "";
this.disablesignoff = "";
this.graphParam = "";
this.entityId = "";
this.locationId = "";
this.showRegisterExport = "false";
this.countryId = "";
this.functionId = "";
this.tagId = "";
this.myOnboardingTab = "";
this.myOnboardingTabGroup = "";
this.myRcmTab = this.TAB_RCM_COMPLIANCES;
this.myNoticesTab = this.TAB_COMPLIANCES;
this.myRole = "";
this.chart = null;
this.chartBase64 = null;
this.chart2 = null;
this.chart2Base64 = null;
this.chart3 = null;
this.chart3Base64 = null;
this.chart4 = null;
this.chart4Base64 = null;
this.calendar = [];
this.mappedValuesDueDates = {};
this.mappedValuesUsers = {};
this.mappedValuesTags = {};
this.unmappedEvents = null;
this.mappings = null;
this.triggers = null;
this.monthNames = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
this.events = null;
this.nextEvents = null;
this.notices = null;
this.statistics = null;
this.statisticsMeta = null;
this.statisticsFiltersData = null;
this.streamIndex = null;
this.eventsInWindow = null;
this.eventHideFields = null;
this.getEventHideFields = () => {
return JSON.parse(this.eventHideFields);
};
this.eventPreviewFields = null;
this.getEventPreviewFields = () => {
return JSON.parse(this.eventPreviewFields);
};
this.eventFields = null;
this.getEventFields = () => {
var _a;
return JSON.parse((_a = this.eventFields) !== null && _a !== void 0 ? _a : "[]");
};
this.eventFieldDependencies = null;
this.getEventFieldDependencies = () => {
return JSON.parse(this.eventFieldDependencies);
};
this.getApiBodyList = () => {
//console.log('calendar api body list', this.apiBodyList);
try {
return JSON.parse(this.apiBodyList);
}
catch (e) {
return {};
}
};
this.getApiBodyDetail = () => {
return JSON.parse(this.apiBodyDetail);
};
this.csvDataRegisters = "";
this.csvDataCompliances = "";
this.csvTableData = "";
this.csvDataStats = "";
this.csvGraphStats = "";
this.csvCompletenessStats = "";
this.csvTimelinessStats = "";
this.csvComplianceStats = "";
this.htmlDataCompliances = "";
this.htmlDataStats = "";
this.htmlDataSummary = "";
this.htmlStatsFilter = "";
this.period = "";
this.flowRcmNotification = 0;
this.flowGraph = "";
this.flow = "";
this.fill = "solid";
this.filterTags = [];
this.subfilter = "";
this.riskAreasData = null;
this.riskAreasPartStatusData = null;
this.riskAreasLateStatusData = null;
this.riskAreasComplianceStatusData = null;
this.riskSeverityData = null;
this.arrCols = ["country", "state", "obligationtitle", "statute", "category"];
this.arrRcmProjectCols = ["name"];
this.riskSeverityPartStatusData = null;
this.riskSeverityLateStatusData = null;
this.riskSeverityComplianceStatusData = nul