@undp/carbon-library 2.1.11 → 2.1.12-CARBON-Sprint-58.1
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/cjs/index.js +75 -1
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/types/Definitions/Enums/company.management.columns.enum.d.ts +2 -1
- package/dist/cjs/types/Definitions/Enums/programme.management.columns.enum.d.ts +1 -0
- package/dist/esm/index.js +78 -4
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/types/Definitions/Enums/company.management.columns.enum.d.ts +2 -1
- package/dist/esm/types/Definitions/Enums/programme.management.columns.enum.d.ts +1 -0
- package/dist/index.d.ts +3 -1
- package/dist/locales/i18n/addCompany/en.json +1 -0
- package/dist/locales/i18n/addProgramme/en.json +1 -1
- package/dist/locales/i18n/addUser/en.json +1 -1
- package/dist/locales/i18n/company/en.json +3 -2
- package/dist/locales/i18n/creditTransfer/en.json +2 -1
- package/dist/locales/i18n/nav/en.json +2 -2
- package/dist/locales/i18n/ndcAction/en.json +14 -13
- package/dist/locales/i18n/programme/en.json +10 -9
- package/dist/locales/i18n/user/en.json +1 -1
- package/dist/locales/i18n/userProfile/en.json +1 -0
- package/dist/locales/i18n/view/en.json +9 -8
- package/package.json +1 -1
@@ -8,6 +8,7 @@ export declare enum ProgrammeManagementColumns {
|
|
8
8
|
creditTransferred = "creditTransferred",
|
9
9
|
certifierId = "certifierId",
|
10
10
|
serialNo = "serialNo",
|
11
|
+
action = "action",
|
11
12
|
emissionReductionExpected = "emissionReductionExpected",
|
12
13
|
emissionReductionAchieved = "emissionReductionAchieved",
|
13
14
|
emissionReductionAchievedandCreditIssued = "emissionReductionAchievedandCreditIssued"
|
package/dist/esm/index.js
CHANGED
@@ -1,14 +1,14 @@
|
|
1
|
-
import { PlusOutlined, FilterOutlined, DownloadOutlined, BankOutlined, SafetyOutlined, AuditOutlined, ExperimentOutlined, UploadOutlined, UserOutlined, MinusCircleOutlined, StarOutlined, ToolOutlined, EyeOutlined, SearchOutlined,
|
2
|
-
import { Input, Radio, Space, Row, Col, Button, Dropdown, Table, Empty, message, Form, Steps, Select, Upload, InputNumber, Tooltip, Modal, Alert, Card, Skeleton, Tag, Checkbox, DatePicker,
|
1
|
+
import { EllipsisOutlined, PlusOutlined, FilterOutlined, DownloadOutlined, BankOutlined, SafetyOutlined, AuditOutlined, ExperimentOutlined, UploadOutlined, UserOutlined, MinusCircleOutlined, StarOutlined, ToolOutlined, EyeOutlined, SearchOutlined, EditOutlined, DeleteOutlined, FileAddOutlined, CheckCircleOutlined, ExclamationCircleOutlined, BookOutlined, CaretDownOutlined, LockOutlined, EyeInvisibleOutlined, GlobalOutlined, FlagOutlined, LineChartOutlined, LikeOutlined, DislikeOutlined, PlusCircleOutlined, LockFilled, CloseCircleOutlined } from '@ant-design/icons';
|
2
|
+
import { Input, Popover, Radio, Space, Row, Col, Button, Dropdown, Table, Empty, List, Typography, message, Form, Steps, Select, Upload, InputNumber, Tooltip, Modal, Alert, Card, Skeleton, Tag, Checkbox, DatePicker, Spin, Tabs, Progress, Collapse } from 'antd';
|
3
3
|
import React, { createContext, useState, useEffect, useCallback, useContext, useRef } from 'react';
|
4
4
|
import { DateTime } from 'luxon';
|
5
5
|
import { Buffer } from 'buffer';
|
6
6
|
import axios, { HttpStatusCode } from 'axios';
|
7
|
+
import * as Icon from 'react-bootstrap-icons';
|
8
|
+
import { InfoCircle, Lock, PersonDash, PlayCircle, PauseCircle, CircleFill, Clipboard2Pulse, HandThumbsUp, XCircle, ClockHistory, BoxArrowInRight, ShieldX, BoxArrowRight, ShieldCheck, Gem, ShieldExclamation, ClipboardCheck } from 'react-bootstrap-icons';
|
7
9
|
import PhoneInput, { formatPhoneNumberIntl, formatPhoneNumber, isPossiblePhoneNumber } from 'react-phone-number-input';
|
8
10
|
import validator from 'validator';
|
9
11
|
import { plainToClass } from 'class-transformer';
|
10
|
-
import * as Icon from 'react-bootstrap-icons';
|
11
|
-
import { InfoCircle, Lock, PersonDash, PlayCircle, PauseCircle, CircleFill, Clipboard2Pulse, HandThumbsUp, XCircle, ClockHistory, BoxArrowInRight, ShieldX, BoxArrowRight, ShieldCheck, Gem, ShieldExclamation, ClipboardCheck } from 'react-bootstrap-icons';
|
12
12
|
import 'react-phone-number-input/style.css';
|
13
13
|
import mapboxgl from 'mapbox-gl';
|
14
14
|
import 'mapbox-gl/dist/mapbox-gl.css';
|
@@ -429,6 +429,7 @@ var CompanyManagementColumns;
|
|
429
429
|
CompanyManagementColumns["programmeCount"] = "programmeCount";
|
430
430
|
CompanyManagementColumns["creditBalance"] = "creditBalance";
|
431
431
|
CompanyManagementColumns["companyState"] = "status";
|
432
|
+
CompanyManagementColumns["action"] = "action";
|
432
433
|
})(CompanyManagementColumns || (CompanyManagementColumns = {}));
|
433
434
|
|
434
435
|
var css_248z$y = ".profile-icon {\n border-radius: 100%;\n margin-right: 15px;\n font-size: 15px;\n width: 40px;\n height: 40px;\n display: flex;\n justify-content: center;\n align-items: center; }\n .profile-icon img {\n width: 26px; }\n";
|
@@ -852,6 +853,19 @@ var CompanyManagementComponent = function (props) {
|
|
852
853
|
var handleFilterVisibleChange = function () {
|
853
854
|
setFilterVisible(true);
|
854
855
|
};
|
856
|
+
var actionMenu = function (record) {
|
857
|
+
return (React.createElement(List, { className: "action-menu", size: "small", dataSource: [
|
858
|
+
{
|
859
|
+
text: t("company:view"),
|
860
|
+
icon: React.createElement(Icon.InfoCircle, null),
|
861
|
+
click: function () {
|
862
|
+
onNavigateToCompanyProfile(record);
|
863
|
+
},
|
864
|
+
},
|
865
|
+
], renderItem: function (item) { return (React.createElement(List.Item, { onClick: item.click },
|
866
|
+
React.createElement(Typography.Text, { className: "action-icon color-primary" }, item.icon),
|
867
|
+
React.createElement("span", null, item.text))); } }));
|
868
|
+
};
|
855
869
|
var columns = [
|
856
870
|
{
|
857
871
|
title: "",
|
@@ -932,6 +946,17 @@ var CompanyManagementComponent = function (props) {
|
|
932
946
|
return getCompanyStateComponent(item);
|
933
947
|
},
|
934
948
|
},
|
949
|
+
{
|
950
|
+
title: t(""),
|
951
|
+
width: 6,
|
952
|
+
align: "right",
|
953
|
+
key: CompanyManagementColumns.action,
|
954
|
+
render: function (_, record) {
|
955
|
+
var menu = actionMenu(record);
|
956
|
+
return menu && (React.createElement(Popover, { placement: "bottomRight", content: menu, trigger: "click" },
|
957
|
+
React.createElement(EllipsisOutlined, { rotate: 90, style: { fontWeight: 600, fontSize: "1rem", cursor: "pointer" } })));
|
958
|
+
},
|
959
|
+
},
|
935
960
|
].filter(function (column) { return visibleColumns.includes(column.key); });
|
936
961
|
var filterOr = function () {
|
937
962
|
if (searchByTermOrganisation !== null &&
|
@@ -1231,6 +1256,7 @@ var ProgrammeManagementColumns;
|
|
1231
1256
|
ProgrammeManagementColumns["creditTransferred"] = "creditTransferred";
|
1232
1257
|
ProgrammeManagementColumns["certifierId"] = "certifierId";
|
1233
1258
|
ProgrammeManagementColumns["serialNo"] = "serialNo";
|
1259
|
+
ProgrammeManagementColumns["action"] = "action";
|
1234
1260
|
ProgrammeManagementColumns["emissionReductionExpected"] = "emissionReductionExpected";
|
1235
1261
|
ProgrammeManagementColumns["emissionReductionAchieved"] = "emissionReductionAchieved";
|
1236
1262
|
ProgrammeManagementColumns["emissionReductionAchievedandCreditIssued"] = "emissionReductionAchievedandCreditIssued";
|
@@ -8116,6 +8142,19 @@ var ProgrammeManagementComponent = function (props) {
|
|
8116
8142
|
setCheckAll(e.target.checked);
|
8117
8143
|
onStatusQuery(nw);
|
8118
8144
|
};
|
8145
|
+
var actionMenu = function (record) {
|
8146
|
+
return (React.createElement(List, { className: "action-menu", size: "small", dataSource: [
|
8147
|
+
{
|
8148
|
+
text: t("programme:view"),
|
8149
|
+
icon: React.createElement(Icon.InfoCircle, null),
|
8150
|
+
click: function () {
|
8151
|
+
onNavigateToProgrammeView(record);
|
8152
|
+
},
|
8153
|
+
},
|
8154
|
+
], renderItem: function (item) { return (React.createElement(List.Item, { onClick: item.click },
|
8155
|
+
React.createElement(Typography.Text, { className: "action-icon color-primary" }, item.icon),
|
8156
|
+
React.createElement("span", null, item.text))); } }));
|
8157
|
+
};
|
8119
8158
|
var columns = [
|
8120
8159
|
{
|
8121
8160
|
title: t("programme:title"),
|
@@ -8263,6 +8302,17 @@ var ProgrammeManagementComponent = function (props) {
|
|
8263
8302
|
key: ProgrammeManagementColumns.serialNo,
|
8264
8303
|
align: "left",
|
8265
8304
|
},
|
8305
|
+
{
|
8306
|
+
title: t(""),
|
8307
|
+
width: 6,
|
8308
|
+
align: "right",
|
8309
|
+
key: ProgrammeManagementColumns.action,
|
8310
|
+
render: function (_, record) {
|
8311
|
+
var menu = actionMenu(record);
|
8312
|
+
return menu && (React.createElement(Popover, { placement: "bottomRight", content: menu, trigger: "click" },
|
8313
|
+
React.createElement(EllipsisOutlined, { rotate: 90, style: { fontWeight: 600, fontSize: "1rem", cursor: "pointer" } })));
|
8314
|
+
},
|
8315
|
+
},
|
8266
8316
|
].filter(function (column) { return visibleColumns.includes(column.key); });
|
8267
8317
|
var getAllProgramme = function () { return __awaiter(void 0, void 0, void 0, function () {
|
8268
8318
|
var filter, filterOr, sort, response, error_1;
|
@@ -19498,6 +19548,19 @@ var NdcActionManagementComponent = function (props) {
|
|
19498
19548
|
}
|
19499
19549
|
}
|
19500
19550
|
};
|
19551
|
+
var actionMenu = function (record) {
|
19552
|
+
return (React.createElement(List, { className: "action-menu", size: "small", dataSource: [
|
19553
|
+
{
|
19554
|
+
text: t("ndcAction:view"),
|
19555
|
+
icon: React.createElement(Icon.InfoCircle, null),
|
19556
|
+
click: function () {
|
19557
|
+
onNavigateToNdcManagementView(record);
|
19558
|
+
},
|
19559
|
+
},
|
19560
|
+
], renderItem: function (item) { return (React.createElement(List.Item, { onClick: item.click },
|
19561
|
+
React.createElement(Typography.Text, { className: "action-icon color-primary" }, item.icon),
|
19562
|
+
React.createElement("span", null, item.text))); } }));
|
19563
|
+
};
|
19501
19564
|
var columns = [
|
19502
19565
|
{
|
19503
19566
|
title: t("ndcAction:ndcColumnsActionId"),
|
@@ -19582,6 +19645,17 @@ var NdcActionManagementComponent = function (props) {
|
|
19582
19645
|
React.createElement(Tag, { className: "clickable", color: getNdcStatusTagType(Obj.status) }, addSpaces(Obj.status))));
|
19583
19646
|
},
|
19584
19647
|
},
|
19648
|
+
{
|
19649
|
+
title: t(""),
|
19650
|
+
width: 6,
|
19651
|
+
align: "right",
|
19652
|
+
key: "action",
|
19653
|
+
render: function (_, record) {
|
19654
|
+
var menu = actionMenu(record);
|
19655
|
+
return menu && (React.createElement(Popover, { placement: "bottomRight", content: menu, trigger: "click" },
|
19656
|
+
React.createElement(EllipsisOutlined, { rotate: 90, style: { fontWeight: 600, fontSize: "1rem", cursor: "pointer" } })));
|
19657
|
+
},
|
19658
|
+
},
|
19585
19659
|
];
|
19586
19660
|
var getNdcActionData = function () { return __awaiter(void 0, void 0, void 0, function () {
|
19587
19661
|
var filter, interFilterOr, sort, filterBy, response, error_1;
|