adminforth 2.22.0-next.13 → 2.22.0-next.14
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/spa/src/adminforth.ts +1 -0
- package/dist/spa/src/components/AcceptModal.vue +2 -0
- package/dist/spa/src/stores/modal.ts +6 -2
- package/dist/spa/src/types/FrontendAPI.ts +4 -0
- package/dist/types/FrontendAPI.d.ts +4 -0
- package/dist/types/FrontendAPI.d.ts.map +1 -1
- package/dist/types/FrontendAPI.js.map +1 -1
- package/package.json +1 -1
|
@@ -132,6 +132,7 @@ class FrontendAPI implements FrontendAPIInterface {
|
|
|
132
132
|
return new Promise((resolve, reject) => {
|
|
133
133
|
this.modalStore.setModalContent({
|
|
134
134
|
content: params.message,
|
|
135
|
+
contentHTML: params.messageHtml,
|
|
135
136
|
acceptText: params.yes || 'Yes',
|
|
136
137
|
cancelText: params.no || 'Cancel'
|
|
137
138
|
})
|
|
@@ -14,6 +14,8 @@
|
|
|
14
14
|
<path stroke="currentColor" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M10 11V6m0 8h.01M19 10a9 9 0 1 1-18 0 9 9 0 0 1 18 0Z"/>
|
|
15
15
|
</svg>
|
|
16
16
|
<h3 class="afcl-confirmation-title mb-5 text-lg font-normal text-lightAcceptModalText dark:text-darkAcceptModalText">{{ modalStore?.modalContent?.content }}</h3>
|
|
17
|
+
<h3 class="prose afcl-confirmation-title mb-5 text-lg font-normal text-lightAcceptModalText dark:text-darkAcceptModalText" v-html="modalStore?.modalContent?.contentHTML"></h3>
|
|
18
|
+
|
|
17
19
|
<button @click="()=>{ modalStore.onAcceptFunction(true);modalStore.togleModal()}" type="button" class="afcl-confirmation-accept-button text-lightAcceptModalConfirmButtonText bg-lightAcceptModalConfirmButtonBackground hover:bg-lightAcceptModalConfirmButtonBackgroundHover focus:ring-4 focus:outline-none focus:ring-lightAcceptModalConfirmButtonFocus font-medium rounded-lg text-sm inline-flex items-center px-5 py-2.5 text-center dark:text-darkAcceptModalConfirmButtonText dark:bg-darkAcceptModalConfirmButtonBackground dark:hover:bg-darkAcceptModalConfirmButtonBackgroundHover dark:focus:ring-darkAcceptModalConfirmButtonFocus">
|
|
18
20
|
{{ modalStore?.modalContent?.acceptText }}
|
|
19
21
|
</button>
|
|
@@ -4,6 +4,7 @@ import { defineStore } from 'pinia'
|
|
|
4
4
|
type ModalContentType = {
|
|
5
5
|
title?: string;
|
|
6
6
|
content?: string;
|
|
7
|
+
contentHTML?: string;
|
|
7
8
|
acceptText?: string;
|
|
8
9
|
cancelText?: string;
|
|
9
10
|
}
|
|
@@ -12,7 +13,8 @@ import { defineStore } from 'pinia'
|
|
|
12
13
|
export const useModalStore = defineStore('modal', () => {
|
|
13
14
|
const modalContent = ref({
|
|
14
15
|
title: 'title',
|
|
15
|
-
content: '
|
|
16
|
+
content: '',
|
|
17
|
+
contentHTML: '',
|
|
16
18
|
acceptText: 'acceptText',
|
|
17
19
|
cancelText: 'cancelText',
|
|
18
20
|
});
|
|
@@ -31,7 +33,8 @@ export const useModalStore = defineStore('modal', () => {
|
|
|
31
33
|
function setModalContent(content: ModalContentType) {
|
|
32
34
|
modalContent.value = {
|
|
33
35
|
title: content.title || 'title',
|
|
34
|
-
content: content.content || '
|
|
36
|
+
content: content.content || '',
|
|
37
|
+
contentHTML: content.contentHTML || '',
|
|
35
38
|
acceptText: content.acceptText || 'acceptText',
|
|
36
39
|
cancelText: content.cancelText || 'cancelText',
|
|
37
40
|
};
|
|
@@ -41,6 +44,7 @@ export const useModalStore = defineStore('modal', () => {
|
|
|
41
44
|
modalContent.value = {
|
|
42
45
|
title: 'title',
|
|
43
46
|
content: 'content',
|
|
47
|
+
contentHTML: '',
|
|
44
48
|
acceptText: 'acceptText',
|
|
45
49
|
cancelText: 'cancelText',
|
|
46
50
|
};
|
|
@@ -159,6 +159,10 @@ export type ConfirmParams = {
|
|
|
159
159
|
* The message to display in the dialog
|
|
160
160
|
*/
|
|
161
161
|
message?: string;
|
|
162
|
+
/**
|
|
163
|
+
* Message to display in the dialog as HTML (can be used instead of message)
|
|
164
|
+
*/
|
|
165
|
+
messageHtml?: string;
|
|
162
166
|
/**
|
|
163
167
|
* The text to display in the "accept" button
|
|
164
168
|
*/
|
|
@@ -156,6 +156,10 @@ export type ConfirmParams = {
|
|
|
156
156
|
* The message to display in the dialog
|
|
157
157
|
*/
|
|
158
158
|
message?: string;
|
|
159
|
+
/**
|
|
160
|
+
* Message to display in the dialog as HTML (can be used instead of message)
|
|
161
|
+
*/
|
|
162
|
+
messageHtml?: string;
|
|
159
163
|
/**
|
|
160
164
|
* The text to display in the "accept" button
|
|
161
165
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrontendAPI.d.ts","sourceRoot":"","sources":["../../types/FrontendAPI.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAA6B,YAAY,EAAE,MAAM,aAAa,CAAC;AAE3E,MAAM,WAAW,oBAAoB;IAEjC;;;;;;;;;;;;;;;;;;;OAmBG;IACH,OAAO,CAAC,MAAM,EAAE,aAAa,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEjD;;;;;;;;;;;;;;;OAeG;IACH,KAAK,CAAC,MAAM,EAAC,WAAW,GAAG,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC;IAG3D,IAAI,EAAE;QAEF;;WAEG;QACH,OAAO,IAAI,OAAO,CAAC;YAAE,KAAK,CAAC,EAAG,MAAM,CAAA;SAAE,CAAC,CAAC;QAExC;;;;WAIG;QACH,aAAa,IAAI,OAAO,CAAC;YAAE,KAAK,CAAC,EAAG,MAAM,CAAA;SAAE,CAAC,CAAC;QAE9C;;WAEG;QACH,gBAAgB,CAAE,EAAE,EAAE,GAAG,GAAG,OAAO,CAAC;YAAE,KAAK,CAAC,EAAG,MAAM,CAAA;SAAE,CAAC,CAAC;QAEzD;;WAEG;QACH,sBAAsB,IAAI,IAAI,CAAC;QAE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,GAAG,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAC,EAAE,CAAC;CAE3C,CAAA;AAID,oBAAY,YAAY;IACpB,MAAM,WAAW;IACjB,OAAO,YAAY;IACnB,OAAO,YAAY;IACnB,IAAI,SAAS;CACd"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FrontendAPI.js","sourceRoot":"","sources":["../../types/FrontendAPI.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"FrontendAPI.js","sourceRoot":"","sources":["../../types/FrontendAPI.ts"],"names":[],"mappings":"AA+MA,MAAM,CAAN,IAAY,YAKT;AALH,WAAY,YAAY;IACpB,iCAAiB,CAAA;IACjB,mCAAmB,CAAA;IACnB,mCAAmB,CAAA;IACnB,6BAAa,CAAA;AACf,CAAC,EALS,YAAY,KAAZ,YAAY,QAKrB"}
|