@gooddata/sdk-ui-dashboard 10.7.0-alpha.4 → 10.7.0-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/esm/__version.d.ts +1 -1
- package/esm/__version.js +1 -1
- package/esm/locales.d.ts.map +1 -1
- package/esm/locales.js +0 -18
- package/esm/locales.js.map +1 -1
- package/esm/presentation/localization/bundles/en-US.json +0 -205
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/AttachmentFiltersList.js +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/AttachmentFiltersList.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/Attachments.js +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/components/Attachments/Attachments.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/constants.d.ts +0 -19
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/constants.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/constants.js +0 -19
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/constants.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js +2 -2
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useEditScheduledEmail.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useSaveScheduledEmailToBackend.js +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useSaveScheduledEmailToBackend.js.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/automationFilters.d.ts +5 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/automationFilters.d.ts.map +1 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/automationFilters.js +31 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/automationFilters.js.map +1 -0
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/utils.d.ts +0 -9
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/utils.d.ts.map +1 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/utils.js +0 -38
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailManagementDialog/utils.js.map +1 -1
- package/package.json +15 -15
- package/styles/css/dashboard.css +3 -370
- package/styles/css/dashboard.css.map +1 -1
- package/styles/css/main.css +3 -370
- package/styles/css/main.css.map +1 -1
- package/styles/css/scheduled_mail.css +3 -370
- package/styles/css/scheduled_mail.css.map +1 -1
- package/styles/scss/scheduled_mail.scss +3 -413
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useWorkspaceUsers.d.ts +0 -31
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useWorkspaceUsers.d.ts.map +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useWorkspaceUsers.js +0 -28
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/hooks/useWorkspaceUsers.js.map +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/interfaces.d.ts +0 -98
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/interfaces.d.ts.map +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/interfaces.js +0 -11
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/interfaces.js.map +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/datetime.d.ts +0 -12
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/datetime.d.ts.map +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/datetime.js +0 -44
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/datetime.js.map +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/getAutomationFilters.d.ts +0 -3
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/getAutomationFilters.d.ts.map +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/getAutomationFilters.js +0 -13
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/getAutomationFilters.js.map +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/scheduledMailRecipients.d.ts +0 -3
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/scheduledMailRecipients.d.ts.map +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/scheduledMailRecipients.js +0 -24
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/scheduledMailRecipients.js.map +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/scheduledMailSummary.d.ts +0 -4
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/scheduledMailSummary.d.ts.map +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/scheduledMailSummary.js +0 -69
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/scheduledMailSummary.js.map +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/stripLocalIdentifierFromFilters.d.ts +0 -15
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/stripLocalIdentifierFromFilters.d.ts.map +0 -1
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/stripLocalIdentifierFromFilters.js +0 -10
- package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/stripLocalIdentifierFromFilters.js.map +0 -1
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
// (C) 2019-2023 GoodData Corporation
|
|
2
|
-
import isDate from "lodash/isDate.js";
|
|
3
|
-
import format from "date-fns/format/index.js";
|
|
4
|
-
import { PLATFORM_DATE_FORMAT } from "../constants.js";
|
|
5
|
-
import capitalize from "lodash/capitalize.js";
|
|
6
|
-
export function convertDateToPlatformDateString(date) {
|
|
7
|
-
return isDate(date) ? format(date, PLATFORM_DATE_FORMAT) : date;
|
|
8
|
-
}
|
|
9
|
-
export function convertDateToDisplayDateString(date, dateFormat) {
|
|
10
|
-
// In schedule email dialog, use date string as sub-fix of attached file name
|
|
11
|
-
// to avoid "/" character in file name
|
|
12
|
-
const DISPLAY_DATE_FORMAT_MAPPER = {
|
|
13
|
-
"MM/dd/yyyy": "MM-dd-yyyy",
|
|
14
|
-
"dd/MM/yyyy": "dd-MM-yyyy",
|
|
15
|
-
"M/d/yy": "M-d-yy",
|
|
16
|
-
};
|
|
17
|
-
const displayDateFormat = DISPLAY_DATE_FORMAT_MAPPER[dateFormat] || dateFormat;
|
|
18
|
-
return isDate(date) ? format(date, displayDateFormat) : date;
|
|
19
|
-
}
|
|
20
|
-
export function getDate(date) {
|
|
21
|
-
return date.getDate();
|
|
22
|
-
}
|
|
23
|
-
export function getDayName(date) {
|
|
24
|
-
return format(date, "eeee");
|
|
25
|
-
}
|
|
26
|
-
export function getIntlDayName(intl, startDate) {
|
|
27
|
-
return capitalize(intl.formatDate(startDate, { weekday: "long" }));
|
|
28
|
-
}
|
|
29
|
-
export function convertSun2MonWeekday(dayIndex) {
|
|
30
|
-
return dayIndex === 0 ? 7 : dayIndex;
|
|
31
|
-
}
|
|
32
|
-
export function getDay(date) {
|
|
33
|
-
return convertSun2MonWeekday(date.getDay());
|
|
34
|
-
}
|
|
35
|
-
export function getWeek(date) {
|
|
36
|
-
return Math.ceil(date.getDate() / 7);
|
|
37
|
-
}
|
|
38
|
-
export function getMonth(date) {
|
|
39
|
-
return date.getMonth() + 1;
|
|
40
|
-
}
|
|
41
|
-
export function getYear(date) {
|
|
42
|
-
return date.getFullYear();
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=datetime.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"datetime.js","sourceRoot":"","sources":["../../../../../src/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/datetime.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,MAAM,MAAM,kBAAkB,CAAC;AACtC,OAAO,MAAM,MAAM,0BAA0B,CAAC;AAE9C,OAAO,EAAE,oBAAoB,EAAE,MAAM,iBAAiB,CAAC;AAEvD,OAAO,UAAU,MAAM,sBAAsB,CAAC;AAG9C,MAAM,UAAU,+BAA+B,CAAC,IAA6B;IACzE,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,oBAAoB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACpE,CAAC;AAGD,MAAM,UAAU,8BAA8B,CAC1C,IAA6B,EAC7B,UAAkB;IAElB,6EAA6E;IAC7E,sCAAsC;IACtC,MAAM,0BAA0B,GAA2B;QACvD,YAAY,EAAE,YAAY;QAC1B,YAAY,EAAE,YAAY;QAC1B,QAAQ,EAAE,QAAQ;KACrB,CAAC;IACF,MAAM,iBAAiB,GAAG,0BAA0B,CAAC,UAAU,CAAC,IAAI,UAAU,CAAC;IAC/E,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,iBAAiB,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;AACjE,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAAU;IAC9B,OAAO,IAAI,CAAC,OAAO,EAAE,CAAC;AAC1B,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,IAAU;IACjC,OAAO,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC;AAChC,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,IAAe,EAAE,SAAe;IAC3D,OAAO,UAAU,CAAC,IAAI,CAAC,UAAU,CAAC,SAAS,EAAE,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,qBAAqB,CAAC,QAAgB;IAClD,OAAO,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,IAAU;IAC7B,OAAO,qBAAqB,CAAC,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC;AAChD,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAAU;IAC9B,OAAO,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,CAAC;AACzC,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,IAAU;IAC/B,OAAO,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;AAC/B,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,IAAU;IAC9B,OAAO,IAAI,CAAC,WAAW,EAAE,CAAC;AAC9B,CAAC"}
|
package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/getAutomationFilters.d.ts
DELETED
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
import { IAutomationMetadataObject, IAutomationMetadataObjectDefinition } from "@gooddata/sdk-model";
|
|
2
|
-
export declare const getAutomationDashboardFilters: (automation: IAutomationMetadataObject | IAutomationMetadataObjectDefinition | undefined) => import("@gooddata/sdk-model").FilterContextItem[] | undefined;
|
|
3
|
-
//# sourceMappingURL=getAutomationFilters.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getAutomationFilters.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/getAutomationFilters.ts"],"names":[],"mappings":"AAEA,OAAO,EACH,yBAAyB,EACzB,mCAAmC,EAGtC,MAAM,qBAAqB,CAAC;AAE7B,eAAO,MAAM,6BAA6B,eAC1B,yBAAyB,GAAG,mCAAmC,GAAG,SAAS,kEAW1F,CAAC"}
|
package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/getAutomationFilters.js
DELETED
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
// (C) 2024 GoodData Corporation
|
|
2
|
-
import { isExportDefinitionDashboardContent, isFilterContextItem, } from "@gooddata/sdk-model";
|
|
3
|
-
export const getAutomationDashboardFilters = (automation) => {
|
|
4
|
-
if (!automation) {
|
|
5
|
-
return undefined;
|
|
6
|
-
}
|
|
7
|
-
return automation.exportDefinitions
|
|
8
|
-
?.find((exportDefinition) => {
|
|
9
|
-
return isExportDefinitionDashboardContent(exportDefinition.requestPayload.content);
|
|
10
|
-
})
|
|
11
|
-
?.requestPayload?.content.filters?.filter(isFilterContextItem);
|
|
12
|
-
};
|
|
13
|
-
//# sourceMappingURL=getAutomationFilters.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getAutomationFilters.js","sourceRoot":"","sources":["../../../../../src/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/getAutomationFilters.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAGH,kCAAkC,EAClC,mBAAmB,GACtB,MAAM,qBAAqB,CAAC;AAE7B,MAAM,CAAC,MAAM,6BAA6B,GAAG,CACzC,UAAuF,EACzF,EAAE;IACA,IAAI,CAAC,UAAU,EAAE,CAAC;QACd,OAAO,SAAS,CAAC;IACrB,CAAC;IAED,OAAO,UAAU,CAAC,iBAAiB;QAC/B,EAAE,IAAI,CAAC,CAAC,gBAAgB,EAAE,EAAE;QACxB,OAAO,kCAAkC,CAAC,gBAAgB,CAAC,cAAc,CAAC,OAAO,CAAC,CAAC;IACvF,CAAC,CAAC;QACF,EAAE,cAAc,EAAE,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,mBAAmB,CAAC,CAAC;AACvE,CAAC,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scheduledMailRecipients.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/scheduledMailRecipients.ts"],"names":[],"mappings":"AACA,OAAO,EAEH,uBAAuB,EAE1B,MAAM,kBAAkB,CAAC;AAM1B,eAAO,MAAM,6BAA6B,eAC1B,uBAAuB,EAAE,KACtC,uBAAuB,EAIzB,CAAC"}
|
package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/scheduledMailRecipients.js
DELETED
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
// (C) 2019-2024 GoodData Corporation
|
|
2
|
-
import { isScheduleEmailExistingRecipient, } from "../interfaces.js";
|
|
3
|
-
import isEmpty from "lodash/isEmpty.js";
|
|
4
|
-
import flatMap from "lodash/flatMap.js";
|
|
5
|
-
const scheduleEmailRecipientDelimiter = /[,;\s]/;
|
|
6
|
-
export const splitScheduledEmailRecipients = (recipients) => {
|
|
7
|
-
return flatMap(recipients, (recipient) => {
|
|
8
|
-
return splitScheduledEmailRecipientByDelimiter(recipient, scheduleEmailRecipientDelimiter);
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
const splitScheduledEmailRecipientByDelimiter = (recipient, delimiter) => {
|
|
12
|
-
if (isScheduleEmailExistingRecipient(recipient)) {
|
|
13
|
-
return [recipient];
|
|
14
|
-
}
|
|
15
|
-
return splitScheduledEmailExternalRecipientByDelimiter(recipient, delimiter);
|
|
16
|
-
};
|
|
17
|
-
const splitScheduledEmailExternalRecipientByDelimiter = (recipient, delimiter) => {
|
|
18
|
-
return recipient.email
|
|
19
|
-
.split(delimiter)
|
|
20
|
-
.map((val) => val.trim())
|
|
21
|
-
.filter((val) => !isEmpty(val))
|
|
22
|
-
.map((email) => ({ email }));
|
|
23
|
-
};
|
|
24
|
-
//# sourceMappingURL=scheduledMailRecipients.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scheduledMailRecipients.js","sourceRoot":"","sources":["../../../../../src/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/scheduledMailRecipients.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,OAAO,EAGH,gCAAgC,GACnC,MAAM,kBAAkB,CAAC;AAC1B,OAAO,OAAO,MAAM,mBAAmB,CAAC;AACxC,OAAO,OAAO,MAAM,mBAAmB,CAAC;AAExC,MAAM,+BAA+B,GAAG,QAAQ,CAAC;AAEjD,MAAM,CAAC,MAAM,6BAA6B,GAAG,CACzC,UAAqC,EACZ,EAAE;IAC3B,OAAO,OAAO,CAAC,UAAU,EAAE,CAAC,SAAS,EAAE,EAAE;QACrC,OAAO,uCAAuC,CAAC,SAAS,EAAE,+BAA+B,CAAC,CAAC;IAC/F,CAAC,CAAC,CAAC;AACP,CAAC,CAAC;AAEF,MAAM,uCAAuC,GAAG,CAC5C,SAAkC,EAClC,SAAiB,EACQ,EAAE;IAC3B,IAAI,gCAAgC,CAAC,SAAS,CAAC,EAAE,CAAC;QAC9C,OAAO,CAAC,SAAS,CAAC,CAAC;IACvB,CAAC;IACD,OAAO,+CAA+C,CAAC,SAAS,EAAE,SAAS,CAAC,CAAC;AACjF,CAAC,CAAC;AAEF,MAAM,+CAA+C,GAAG,CACpD,SAA0C,EAC1C,SAAiB,EACgB,EAAE;IACnC,OAAO,SAAS,CAAC,KAAK;SACjB,KAAK,CAAC,SAAS,CAAC;SAChB,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,CAAC,IAAI,EAAE,CAAC;SACxB,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;SAC9B,GAAG,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;AACrC,CAAC,CAAC"}
|
package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/scheduledMailSummary.d.ts
DELETED
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import { IntlShape } from "react-intl";
|
|
2
|
-
import { IScheduleEmailRepeat } from "../interfaces.js";
|
|
3
|
-
export declare function getScheduledEmailSummaryString(intl: IntlShape, recurrency: IScheduleEmailRepeat, startDate: Date): string;
|
|
4
|
-
//# sourceMappingURL=scheduledMailSummary.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scheduledMailSummary.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/scheduledMailSummary.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAGvC,OAAO,EAGH,oBAAoB,EACvB,MAAM,kBAAkB,CAAC;AAkF1B,wBAAgB,8BAA8B,CAC1C,IAAI,EAAE,SAAS,EACf,UAAU,EAAE,oBAAoB,EAChC,SAAS,EAAE,IAAI,GAChB,MAAM,CAOR"}
|
package/esm/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/scheduledMailSummary.js
DELETED
|
@@ -1,69 +0,0 @@
|
|
|
1
|
-
import { invariant } from "ts-invariant";
|
|
2
|
-
import { REPEAT_TYPES, REPEAT_FREQUENCIES, FREQUENCY_TYPE, REPEAT_EXECUTE_ON } from "../constants.js";
|
|
3
|
-
import { getDayName, getWeek, getDate } from "./datetime.js";
|
|
4
|
-
import { messages } from "../../../../locales.js";
|
|
5
|
-
const AM = "AM";
|
|
6
|
-
const PM = "PM";
|
|
7
|
-
function getRepeatFrequencyType(repeatFrequency) {
|
|
8
|
-
// eslint-disable-next-line no-prototype-builtins
|
|
9
|
-
const result = FREQUENCY_TYPE.find((type) => repeatFrequency.hasOwnProperty(type));
|
|
10
|
-
invariant(result, "Unknown scheduled email frequency");
|
|
11
|
-
return result;
|
|
12
|
-
}
|
|
13
|
-
function getScheduledEmailRepeatString(intl, options, startDate) {
|
|
14
|
-
const { repeatType, repeatPeriod, repeatFrequency } = options;
|
|
15
|
-
const isCustomRepeatType = repeatType === REPEAT_TYPES.CUSTOM;
|
|
16
|
-
const day = getDayName(startDate);
|
|
17
|
-
const week = getWeek(startDate);
|
|
18
|
-
if (!isCustomRepeatType) {
|
|
19
|
-
return intl.formatMessage(messages[`scheduleDialogEmailRepeats_${repeatType}`], { day, week });
|
|
20
|
-
}
|
|
21
|
-
const every = intl.formatMessage({
|
|
22
|
-
id: "dialogs.schedule.email.repeats.every",
|
|
23
|
-
});
|
|
24
|
-
const repeatFrequencyType = getRepeatFrequencyType(repeatFrequency);
|
|
25
|
-
const frequencies = intl.formatMessage(messages[`scheduleDialogEmailRepeatsFrequencies_${repeatFrequencyType}`], {
|
|
26
|
-
n: repeatPeriod,
|
|
27
|
-
});
|
|
28
|
-
const appliedRepeatExecuteOn = repeatFrequencyType === REPEAT_FREQUENCIES.WEEK
|
|
29
|
-
? REPEAT_EXECUTE_ON.DAY_OF_WEEK
|
|
30
|
-
: repeatFrequency.month?.type;
|
|
31
|
-
const executeOn = repeatFrequencyType !== REPEAT_FREQUENCIES.DAY
|
|
32
|
-
? intl.formatMessage(messages[`scheduleDialogEmailRepeatsExecuteOn_${appliedRepeatExecuteOn}`], {
|
|
33
|
-
date: getDate(startDate),
|
|
34
|
-
day: getDayName(startDate),
|
|
35
|
-
week: getWeek(startDate),
|
|
36
|
-
})
|
|
37
|
-
: "";
|
|
38
|
-
// every 2 months on the first Friday
|
|
39
|
-
return `${every} ${repeatPeriod} ${frequencies} ${executeOn}`.trim();
|
|
40
|
-
}
|
|
41
|
-
function getFormattedTime(time) {
|
|
42
|
-
const { hour, minute } = time;
|
|
43
|
-
const timeSuffix = getTimePeriod(hour);
|
|
44
|
-
const formattedMinute = getFormattedMinute(minute);
|
|
45
|
-
const formattedHour = getFormattedHour(hour);
|
|
46
|
-
// 12:00 AM
|
|
47
|
-
return `${formattedHour}:${formattedMinute} ${timeSuffix}`;
|
|
48
|
-
}
|
|
49
|
-
function getTimePeriod(hour) {
|
|
50
|
-
return hour >= 12 ? PM : AM;
|
|
51
|
-
}
|
|
52
|
-
function getFormattedMinute(minute) {
|
|
53
|
-
return minute < 10 ? "0" + minute : "" + minute;
|
|
54
|
-
}
|
|
55
|
-
function getFormattedHour(hour) {
|
|
56
|
-
let formattedHour = hour > 12 ? hour - 12 : hour;
|
|
57
|
-
if (hour === 0) {
|
|
58
|
-
formattedHour = 12;
|
|
59
|
-
}
|
|
60
|
-
return formattedHour;
|
|
61
|
-
}
|
|
62
|
-
export function getScheduledEmailSummaryString(intl, recurrency, startDate) {
|
|
63
|
-
const repeatDays = getScheduledEmailRepeatString(intl, recurrency, startDate);
|
|
64
|
-
const atLocalization = intl.formatMessage({ id: "gs.date.at" });
|
|
65
|
-
const time = getFormattedTime(recurrency.time);
|
|
66
|
-
// every 2 months on the first Friday at 12:00 AM
|
|
67
|
-
return `${repeatDays} ${atLocalization} ${time}`;
|
|
68
|
-
}
|
|
69
|
-
//# sourceMappingURL=scheduledMailSummary.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"scheduledMailSummary.js","sourceRoot":"","sources":["../../../../../src/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/scheduledMailSummary.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAOzC,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,cAAc,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AAEtG,OAAO,EAAE,UAAU,EAAE,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7D,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,MAAM,EAAE,GAAG,IAAI,CAAC;AAChB,MAAM,EAAE,GAAG,IAAI,CAAC;AAEhB,SAAS,sBAAsB,CAAC,eAA8C;IAC1E,iDAAiD;IACjD,MAAM,MAAM,GAAG,cAAc,CAAC,IAAI,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,eAAe,CAAC,cAAc,CAAC,IA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AU,EAAE,SAAS,CAAC,CAAC;IAC9E,MAAM,cAAc,GAAG,IAAI,CAAC,aAAa,CAAC,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,CAAC;IAChE,MAAM,IAAI,GAAG,gBAAgB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;IAE/C,iDAAiD;IACjD,OAAO,GAAG,UAAU,IAAI,cAAc,IAAI,IAAI,EAAE,CAAC;AACrD,CAAC"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FilterContextItem } from "@gooddata/sdk-model";
|
|
2
|
-
export declare const stripLocalIdentifierFromFilters: (filters: FilterContextItem[]) => (import("@gooddata/sdk-model").IDashboardDateFilter | {
|
|
3
|
-
attributeFilter: Pick<{
|
|
4
|
-
displayForm: import("@gooddata/sdk-model").ObjRef;
|
|
5
|
-
negativeSelection: boolean;
|
|
6
|
-
attributeElements: import("@gooddata/sdk-model").IAttributeElements;
|
|
7
|
-
localIdentifier?: string | undefined;
|
|
8
|
-
filterElementsBy?: import("@gooddata/sdk-model").IDashboardAttributeFilterParent[] | undefined;
|
|
9
|
-
filterElementsByDate?: import("@gooddata/sdk-model").IDashboardAttributeFilterByDate[] | undefined;
|
|
10
|
-
validateElementsBy?: import("@gooddata/sdk-model").ObjRef[] | undefined;
|
|
11
|
-
title?: string | undefined;
|
|
12
|
-
selectionMode?: import("@gooddata/sdk-model").DashboardAttributeFilterSelectionMode | undefined;
|
|
13
|
-
}, "title" | "displayForm" | "selectionMode" | "validateElementsBy" | "negativeSelection" | "attributeElements" | "filterElementsBy" | "filterElementsByDate">;
|
|
14
|
-
})[];
|
|
15
|
-
//# sourceMappingURL=stripLocalIdentifierFromFilters.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stripLocalIdentifierFromFilters.d.ts","sourceRoot":"","sources":["../../../../../src/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/stripLocalIdentifierFromFilters.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAA8B,MAAM,qBAAqB,CAAC;AAGpF,eAAO,MAAM,+BAA+B,YAAa,iBAAiB,EAAE;;;;;;;;;;;;IAOtE,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
// (C) 2022 GoodData Corporation
|
|
2
|
-
import { isDashboardAttributeFilter } from "@gooddata/sdk-model";
|
|
3
|
-
import omit from "lodash/omit.js";
|
|
4
|
-
export const stripLocalIdentifierFromFilters = (filters) => filters.map((filter) => {
|
|
5
|
-
if (isDashboardAttributeFilter(filter)) {
|
|
6
|
-
return { attributeFilter: omit(filter.attributeFilter, "localIdentifier") };
|
|
7
|
-
}
|
|
8
|
-
return filter;
|
|
9
|
-
});
|
|
10
|
-
//# sourceMappingURL=stripLocalIdentifierFromFilters.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"stripLocalIdentifierFromFilters.js","sourceRoot":"","sources":["../../../../../src/presentation/scheduledEmail/DefaultScheduledEmailDialog/utils/stripLocalIdentifierFromFilters.ts"],"names":[],"mappings":"AAAA,gCAAgC;AAEhC,OAAO,EAAqB,0BAA0B,EAAE,MAAM,qBAAqB,CAAC;AACpF,OAAO,IAAI,MAAM,gBAAgB,CAAC;AAElC,MAAM,CAAC,MAAM,+BAA+B,GAAG,CAAC,OAA4B,EAAE,EAAE,CAC5E,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE;IACnB,IAAI,0BAA0B,CAAC,MAAM,CAAC,EAAE,CAAC;QACrC,OAAO,EAAE,eAAe,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe,EAAE,iBAAiB,CAAC,EAAE,CAAC;IAChF,CAAC;IAED,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC,CAAC"}
|