@newsletterstudio/umbraco 14.0.0-rc1 → 14.0.4
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/dist/backend-api/types.gen.d.ts +23 -1
- package/dist/core/components/ns-checkbox/ns-checkbox.element.d.ts +2 -0
- package/dist/core/components/ns-timeline/ns-timeline-event.element.d.ts +1 -1
- package/dist/core/components/ns-timeline/ns-timeline-icon.element.d.ts +0 -3
- package/dist/modules/mailing-list/edit/actions/import/ns-mailing-list-import-modal.element.d.ts +1 -0
- package/package.json +1 -1
- package/readme.md +7 -71
|
@@ -474,6 +474,24 @@ export type ImageEmailControlDataModel = {
|
|
|
474
474
|
*/
|
|
475
475
|
aspectRatio: string;
|
|
476
476
|
};
|
|
477
|
+
export type ImportFixedIssueRequestFrontendModel = {
|
|
478
|
+
recipient: ImportRecipientIssuesFrontendModel;
|
|
479
|
+
mailingListKey?: string | null;
|
|
480
|
+
workspaceKey?: string | null;
|
|
481
|
+
fieldMappings: Array<ImportRecipientsColumnMappingFieldValueFrontendModel>;
|
|
482
|
+
/**
|
|
483
|
+
* Indicates if the import should overwrite data if the recipient already exists
|
|
484
|
+
*/
|
|
485
|
+
updateExisting: boolean;
|
|
486
|
+
};
|
|
487
|
+
export type ImportRecipientIssuesFrontendModel = {
|
|
488
|
+
email: string;
|
|
489
|
+
firstname: string;
|
|
490
|
+
lastname: string;
|
|
491
|
+
fields: {
|
|
492
|
+
[key: string]: string;
|
|
493
|
+
};
|
|
494
|
+
};
|
|
477
495
|
export type ImportRecipientIssuesValueFrontendModel = {
|
|
478
496
|
email: string;
|
|
479
497
|
firstname: string;
|
|
@@ -522,6 +540,10 @@ export type ImportRecipientsPerformFileImportRequestFrontendModel = {
|
|
|
522
540
|
mailingListKey?: string | null;
|
|
523
541
|
tempFile: string;
|
|
524
542
|
fieldMappings: Array<ImportRecipientsColumnMappingFieldValueFrontendModel>;
|
|
543
|
+
/**
|
|
544
|
+
* Indicates if the import should overwrite data if the recipient already exists
|
|
545
|
+
*/
|
|
546
|
+
updateExisting: boolean;
|
|
525
547
|
};
|
|
526
548
|
export type ImportRecipientsResultsResponseFrontendModel = {
|
|
527
549
|
total: number;
|
|
@@ -1565,7 +1587,7 @@ export type EmailEditorGetMacrosData = {
|
|
|
1565
1587
|
};
|
|
1566
1588
|
export type EmailEditorGetMacrosResponse = Array<ListItemIdAndLabelValueFrontendModel>;
|
|
1567
1589
|
export type ImportRecipientsImportFixedIssueData = {
|
|
1568
|
-
requestBody?:
|
|
1590
|
+
requestBody?: ImportFixedIssueRequestFrontendModel;
|
|
1569
1591
|
};
|
|
1570
1592
|
export type ImportRecipientsImportFixedIssueResponse = Array<number>;
|
|
1571
1593
|
export type ImportRecipientsPerformFileImportData = {
|
|
@@ -23,11 +23,13 @@ export declare class NsCheckboxElement extends LitElement {
|
|
|
23
23
|
*/
|
|
24
24
|
label: string;
|
|
25
25
|
disabled: boolean;
|
|
26
|
+
description: string;
|
|
26
27
|
_input: HTMLInputElement;
|
|
27
28
|
connectedCallback(): Promise<void>;
|
|
28
29
|
disconnectedCallback(): void;
|
|
29
30
|
_handleChange(e: InputEvent): void;
|
|
30
31
|
render(): import("lit-html").TemplateResult<1>;
|
|
32
|
+
renderLabel(): import("lit-html").TemplateResult<1>;
|
|
31
33
|
static styles: import("lit").CSSResult[];
|
|
32
34
|
}
|
|
33
35
|
declare global {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
|
|
2
2
|
import '@newsletterstudio/umbraco/components';
|
|
3
3
|
import './ns-timeline-icon.element.js';
|
|
4
|
-
export type NsTimelineEventType = undefined | 'default' | 'campaign-delivered' | 'campaign-opened' | 'campaign-clicked' | 'campaign-view-in-browser' | 'campaign-delivery-error' | 'mailinglist-subscribed' | 'mailinglist-unsubscribed' | 'recipient-added' | 'transactional-delivered' | 'transactional-opened' | 'transactional-clicked' | 'transactional-error';
|
|
4
|
+
export type NsTimelineEventType = undefined | 'default' | 'campaign-delivered' | 'campaign-opened' | 'campaign-clicked' | 'campaign-view-in-browser' | 'campaign-delivery-error' | 'campaign-unsubscribe-performed' | 'mailinglist-subscribed' | 'mailinglist-unsubscribed' | 'recipient-added' | 'transactional-delivered' | 'transactional-opened' | 'transactional-clicked' | 'transactional-error';
|
|
5
5
|
/**
|
|
6
6
|
* ns-timeline-event
|
|
7
7
|
*/
|
|
@@ -6,9 +6,6 @@ import type { NsTimelineEventType } from './ns-timeline-event.element.js';
|
|
|
6
6
|
export declare class NsTimelineIconElement extends UmbLitElement {
|
|
7
7
|
#private;
|
|
8
8
|
look: NsTimelineEventType;
|
|
9
|
-
/**
|
|
10
|
-
*
|
|
11
|
-
*/
|
|
12
9
|
constructor();
|
|
13
10
|
render(): import("lit-html").TemplateResult<1>;
|
|
14
11
|
static styles: import("lit").CSSResult[];
|
package/dist/modules/mailing-list/edit/actions/import/ns-mailing-list-import-modal.element.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export declare class NsMailingListImportModalElement extends NsMailingListImport
|
|
|
17
17
|
errorMessagePerformImport?: string;
|
|
18
18
|
step: 'upload' | 'mappings' | 'processing' | 'importing' | 'done';
|
|
19
19
|
textValue: string;
|
|
20
|
+
updateExisting: boolean;
|
|
20
21
|
/** Parsed mappings from server */
|
|
21
22
|
mappings?: ImportRecipientsUploadFileAndParseForMappingResponse;
|
|
22
23
|
importResult?: ImportRecipientsResultsResponseFrontendModel;
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -1,74 +1,10 @@
|
|
|
1
|
-
# Newsletter Studio
|
|
2
|
-
|
|
1
|
+
# Newsletter Studio / Umbraco
|
|
2
|
+
Use this package to extend [Newsletter Studio](https://www.newsletterstudio.org) for Umbraco. Please refer to our [documentation](https://www.newsletterstudio.org/documentation/) for details on how use the extension points in the package.
|
|
3
3
|
|
|
4
|
-
|
|
5
|
-
Use
|
|
4
|
+
While not required, we recommend building extensions using the following technologies:
|
|
6
5
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
npm run build
|
|
11
|
-
```
|
|
6
|
+
* Lit
|
|
7
|
+
* TypeScript
|
|
8
|
+
* Vite
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
The NPM package is built using the npm cli, there is a script ready to execute the build.
|
|
15
|
-
|
|
16
|
-
### Build NPM Package
|
|
17
|
-
|
|
18
|
-
```bash
|
|
19
|
-
npm run build:npm
|
|
20
|
-
```
|
|
21
|
-
|
|
22
|
-
This script will run a Typescript-build, clean the output (in the dist-folder), cleanse the package.json file and use `npm pack` to create the package. After this we also need to publish the artifact to npmjs.org.
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
#TODO: How to publish NPM-package to npmjs.org
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
### Adding new exports / paths
|
|
29
|
-
In `tsconfig.json` there are a number of `paths` configured. These paths can be used internally to make our own code simpler **BUT** this also means that we probably need to export it in the published NPM-package.
|
|
30
|
-
|
|
31
|
-
When do we need to publish the path?
|
|
32
|
-
|
|
33
|
-
* IF the path is used in ANY OTHER component, class or type that is published - the new path also needs to be included in the published NPM-package.
|
|
34
|
-
|
|
35
|
-
To add a new path to the NPM package we need to:
|
|
36
|
-
|
|
37
|
-
* [ ] Add the path to the `tsconfig.json`
|
|
38
|
-
* [ ] Add the path to the `package.json`s `exports`-section (note that this is a relative path to the dist-folder created during build).
|
|
39
|
-
* [ ] Add the path to `vite.config.ts` to ensure that the outputed js-file always have the same name (no hash).
|
|
40
|
-
* [ ] Add the path as a a important map in `umbraco-package.json` (In `/NewsletterStudio/wwwroot/App_Plugins/newsletterstudio/`), have it point to the file outputted by vite.
|
|
41
|
-
|
|
42
|
-
### Local build/install of NPM package
|
|
43
|
-
When we want to try out a new version of the NPM-package we can create a new local build.
|
|
44
|
-
|
|
45
|
-
Run
|
|
46
|
-
|
|
47
|
-
```bash
|
|
48
|
-
npm run build:npm
|
|
49
|
-
```
|
|
50
|
-
|
|
51
|
-
This will output a `.tgz` file, move/copy this file into the project where we want to test it and install using any of the methods below.
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
```bash
|
|
55
|
-
# Install local package
|
|
56
|
-
npm install "D:\Development\Newsletter Studio\Arkiv\Releases\newsletterstudio-umbraco-14.0.0.tgz"
|
|
57
|
-
```
|
|
58
|
-
|
|
59
|
-
Or in package.json, just add the path to the file and run `npm install`
|
|
60
|
-
|
|
61
|
-
```json
|
|
62
|
-
{
|
|
63
|
-
...
|
|
64
|
-
"dependencies": {
|
|
65
|
-
"@newsletterstudio/umbraco": "./../npm-package-src/newsletter-studio-umbraco-ui-0.0.0.tgz",
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
```
|
|
69
|
-
|
|
70
|
-
## Debugging
|
|
71
|
-
We have several debugging concepts in the package:
|
|
72
|
-
* `<umb-debug visible></umb-debug>` to show Umbraco contexts
|
|
73
|
-
* `<ns-json-debug .data=${}>` to render a object as json inside a pre-element.
|
|
74
|
-
* `<ns-validation-errors-debug></ns-validation-errors-debug>` to show validation errors from the closest context.
|
|
10
|
+
The [NewsletterStudioContrib](https://github.com/enkelmedia/NewsletterStudioContrib)-project on Github provides several examples and can be used as a starting point for the build setup.
|