@kopexa/extension-controlref 1.0.0 → 2.0.0
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/chunk-4C72VBLP.mjs +52 -0
- package/dist/chunk-A7FWOQDN.mjs +210 -0
- package/dist/chunk-AQTNFDGA.mjs +57 -0
- package/dist/chunk-D53W4HWR.mjs +245 -0
- package/dist/chunk-FTEE5U3H.mjs +37 -0
- package/dist/chunk-GYDJVHHG.mjs +250 -0
- package/dist/chunk-IMHLTRZJ.mjs +29 -0
- package/dist/chunk-JM66CQVD.mjs +10 -0
- package/dist/chunk-LMKP3DDN.mjs +189 -0
- package/dist/chunk-RTBFRPB3.mjs +186 -0
- package/dist/chunk-TEDXYIGO.mjs +38 -0
- package/dist/chunk-WIS7ZNTO.mjs +4 -0
- package/dist/chunk-X46EFFCE.mjs +148 -0
- package/dist/chunk-XHD2KFKQ.mjs +16 -0
- package/dist/chunk-ZRKYAFRY.mjs +46 -0
- package/dist/chunk-ZUR6XKMG.mjs +21 -0
- package/dist/components/control-block-view.d.mts +6 -0
- package/dist/components/control-block-view.d.ts +6 -0
- package/dist/components/control-block-view.js +789 -0
- package/dist/components/control-block-view.mjs +11 -0
- package/dist/components/control-implementation-view.d.mts +6 -0
- package/dist/components/control-implementation-view.d.ts +6 -0
- package/dist/components/control-implementation-view.js +52 -0
- package/dist/components/control-implementation-view.mjs +7 -0
- package/dist/components/control-picker.d.mts +25 -0
- package/dist/components/control-picker.d.ts +25 -0
- package/dist/components/control-picker.js +522 -0
- package/dist/components/control-picker.mjs +10 -0
- package/dist/components/control-view.js +677 -122
- package/dist/components/control-view.mjs +5 -5
- package/dist/components/use-control.d.mts +20 -0
- package/dist/components/use-control.d.ts +20 -0
- package/dist/components/use-control.js +127 -0
- package/dist/components/use-control.mjs +9 -0
- package/dist/control-block.d.mts +35 -0
- package/dist/control-block.d.ts +35 -0
- package/dist/control-block.js +1012 -0
- package/dist/control-block.mjs +17 -0
- package/dist/control-implementation.d.mts +7 -0
- package/dist/control-implementation.d.ts +7 -0
- package/dist/control-implementation.js +92 -0
- package/dist/control-implementation.mjs +9 -0
- package/dist/control.d.mts +31 -1
- package/dist/control.d.ts +31 -1
- package/dist/control.js +819 -136
- package/dist/control.mjs +7 -6
- package/dist/defaults.d.mts +3 -9
- package/dist/defaults.d.ts +3 -9
- package/dist/defaults.js +3 -20
- package/dist/defaults.mjs +3 -6
- package/dist/index.d.mts +10 -10
- package/dist/index.d.ts +10 -10
- package/dist/index.js +1229 -569
- package/dist/index.mjs +58 -21
- package/dist/messages/index.d.mts +135 -0
- package/dist/messages/index.d.ts +135 -0
- package/dist/messages/index.js +137 -2
- package/dist/messages/index.mjs +1 -2
- package/dist/role.d.mts +17 -0
- package/dist/role.d.ts +17 -0
- package/dist/role.js +5 -0
- package/dist/role.mjs +2 -0
- package/dist/types.d.mts +23 -16
- package/dist/types.d.ts +23 -16
- package/dist/utils/create-control-block.d.mts +7 -0
- package/dist/utils/create-control-block.d.ts +7 -0
- package/dist/utils/create-control-block.js +85 -0
- package/dist/utils/create-control-block.mjs +10 -0
- package/dist/utils/create-control-implementation.d.mts +8 -0
- package/dist/utils/create-control-implementation.d.ts +8 -0
- package/dist/utils/create-control-implementation.js +39 -0
- package/dist/utils/create-control-implementation.mjs +7 -0
- package/dist/utils/getControlNodeTypes.d.mts +5 -0
- package/dist/utils/getControlNodeTypes.d.ts +5 -0
- package/dist/utils/getControlNodeTypes.js +44 -0
- package/dist/utils/getControlNodeTypes.mjs +7 -0
- package/dist/utils/index.d.mts +7 -2
- package/dist/utils/index.d.ts +7 -2
- package/dist/utils/index.js +35 -3
- package/dist/utils/index.mjs +7 -4
- package/dist/utils/status-indicator.d.mts +18 -0
- package/dist/utils/status-indicator.d.ts +18 -0
- package/dist/utils/status-indicator.js +80 -0
- package/dist/utils/status-indicator.mjs +7 -0
- package/package.json +9 -9
- package/dist/card-variant.d.mts +0 -12
- package/dist/card-variant.d.ts +0 -12
- package/dist/card-variant.js +0 -66
- package/dist/card-variant.mjs +0 -8
- package/dist/chunk-AC4KL3WX.mjs +0 -29
- package/dist/chunk-AZ5M5MVC.mjs +0 -36
- package/dist/chunk-DTFR234X.mjs +0 -244
- package/dist/chunk-EDD7DYLE.mjs +0 -29
- package/dist/chunk-GC5EBQ7G.mjs +0 -10
- package/dist/chunk-H2ECPGOG.mjs +0 -81
- package/dist/chunk-KLX7Q3HL.mjs +0 -109
- package/dist/chunk-LKRTUIEV.mjs +0 -46
- package/dist/chunk-NAJ6IC4Y.mjs +0 -43
- package/dist/chunk-QI3ZPZTR.mjs +0 -26
- package/dist/chunk-SNRVOTF5.mjs +0 -8
- package/dist/chunk-VP5POY44.mjs +0 -57
- package/dist/chunk-WIR5FCIC.mjs +0 -110
- package/dist/control-ref-view.d.mts +0 -6
- package/dist/control-ref-view.d.ts +0 -6
- package/dist/control-ref-view.js +0 -615
- package/dist/control-ref-view.mjs +0 -15
- package/dist/control-ref.d.mts +0 -28
- package/dist/control-ref.d.ts +0 -28
- package/dist/control-ref.js +0 -687
- package/dist/control-ref.mjs +0 -16
- package/dist/i18n.d.mts +0 -4
- package/dist/i18n.d.ts +0 -4
- package/dist/i18n.js +0 -128
- package/dist/i18n.mjs +0 -10
- package/dist/lang/de.d.mts +0 -24
- package/dist/lang/de.d.ts +0 -24
- package/dist/lang/de.js +0 -25
- package/dist/lang/de.mjs +0 -8
- package/dist/lang/en.d.mts +0 -24
- package/dist/lang/en.d.ts +0 -24
- package/dist/lang/en.js +0 -25
- package/dist/lang/en.mjs +0 -8
- package/dist/settings-dialog.d.mts +0 -19
- package/dist/settings-dialog.d.ts +0 -19
- package/dist/settings-dialog.js +0 -371
- package/dist/settings-dialog.mjs +0 -9
package/dist/index.mjs
CHANGED
|
@@ -1,44 +1,81 @@
|
|
|
1
1
|
"use client";
|
|
2
2
|
import {
|
|
3
|
-
|
|
4
|
-
} from "./chunk-
|
|
3
|
+
ControlBlock
|
|
4
|
+
} from "./chunk-RTBFRPB3.mjs";
|
|
5
|
+
import "./chunk-FTEE5U3H.mjs";
|
|
6
|
+
import "./chunk-XHD2KFKQ.mjs";
|
|
7
|
+
import "./chunk-ZUR6XKMG.mjs";
|
|
5
8
|
import {
|
|
6
|
-
|
|
7
|
-
} from "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-NAJ6IC4Y.mjs";
|
|
9
|
+
ControlImplementation
|
|
10
|
+
} from "./chunk-ZRKYAFRY.mjs";
|
|
11
|
+
import "./chunk-IMHLTRZJ.mjs";
|
|
10
12
|
import {
|
|
11
13
|
Control
|
|
12
|
-
} from "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
20
|
-
import "./chunk-
|
|
14
|
+
} from "./chunk-X46EFFCE.mjs";
|
|
15
|
+
import "./chunk-TEDXYIGO.mjs";
|
|
16
|
+
import "./chunk-LMKP3DDN.mjs";
|
|
17
|
+
import "./chunk-JM66CQVD.mjs";
|
|
18
|
+
import "./chunk-WIS7ZNTO.mjs";
|
|
19
|
+
import "./chunk-GYDJVHHG.mjs";
|
|
20
|
+
import "./chunk-A7FWOQDN.mjs";
|
|
21
|
+
import "./chunk-4C72VBLP.mjs";
|
|
22
|
+
import "./chunk-AQTNFDGA.mjs";
|
|
23
|
+
import "./chunk-D53W4HWR.mjs";
|
|
21
24
|
|
|
22
25
|
// src/index.ts
|
|
23
|
-
import {
|
|
26
|
+
import {
|
|
27
|
+
callOrReturn,
|
|
28
|
+
Extension,
|
|
29
|
+
getExtensionField
|
|
30
|
+
} from "@tiptap/core";
|
|
24
31
|
var ControlKit = Extension.create({
|
|
25
32
|
name: "controlKit",
|
|
26
33
|
addOptions() {
|
|
27
34
|
return {
|
|
28
35
|
control: {},
|
|
29
|
-
|
|
36
|
+
controlBlock: {},
|
|
37
|
+
controlImplementation: {}
|
|
30
38
|
};
|
|
31
39
|
},
|
|
32
40
|
addExtensions() {
|
|
33
41
|
const extensions = [];
|
|
34
42
|
if (this.options.control !== false) {
|
|
35
|
-
extensions.push(
|
|
43
|
+
extensions.push(
|
|
44
|
+
Control.configure({
|
|
45
|
+
...this.options.control,
|
|
46
|
+
resolver: this.options.resolver
|
|
47
|
+
})
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
if (this.options.controlBlock !== false) {
|
|
51
|
+
extensions.push(
|
|
52
|
+
ControlBlock.configure({
|
|
53
|
+
...this.options.controlBlock,
|
|
54
|
+
resolver: this.options.resolver
|
|
55
|
+
})
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
if (this.options.controlImplementation !== false) {
|
|
59
|
+
extensions.push(
|
|
60
|
+
ControlImplementation.configure(this.options.controlImplementation)
|
|
61
|
+
);
|
|
36
62
|
}
|
|
37
|
-
extensions.push(ControlRef);
|
|
38
63
|
return extensions;
|
|
64
|
+
},
|
|
65
|
+
extendNodeSchema(extension) {
|
|
66
|
+
const context = {
|
|
67
|
+
name: extension.name,
|
|
68
|
+
options: extension.options,
|
|
69
|
+
storage: extension.storage
|
|
70
|
+
};
|
|
71
|
+
return {
|
|
72
|
+
controlRole: callOrReturn(
|
|
73
|
+
getExtensionField(extension, "controlRole", context)
|
|
74
|
+
)
|
|
75
|
+
};
|
|
39
76
|
}
|
|
40
77
|
});
|
|
41
78
|
export {
|
|
42
|
-
|
|
43
|
-
|
|
79
|
+
ControlBlock,
|
|
80
|
+
ControlKit
|
|
44
81
|
};
|
|
@@ -44,6 +44,11 @@ declare const messages: {
|
|
|
44
44
|
defaultMessage: string;
|
|
45
45
|
description: string;
|
|
46
46
|
};
|
|
47
|
+
variant_hint: {
|
|
48
|
+
id: string;
|
|
49
|
+
defaultMessage: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
47
52
|
variant_chip: {
|
|
48
53
|
id: string;
|
|
49
54
|
defaultMessage: string;
|
|
@@ -99,6 +104,136 @@ declare const messages: {
|
|
|
99
104
|
defaultMessage: string;
|
|
100
105
|
description: string;
|
|
101
106
|
};
|
|
107
|
+
unmapped_control: {
|
|
108
|
+
id: string;
|
|
109
|
+
defaultMessage: string;
|
|
110
|
+
description: string;
|
|
111
|
+
};
|
|
112
|
+
control_with_title: {
|
|
113
|
+
id: string;
|
|
114
|
+
defaultMessage: string;
|
|
115
|
+
description: string;
|
|
116
|
+
};
|
|
117
|
+
search_hint: {
|
|
118
|
+
id: string;
|
|
119
|
+
defaultMessage: string;
|
|
120
|
+
description: string;
|
|
121
|
+
};
|
|
122
|
+
no_results: {
|
|
123
|
+
id: string;
|
|
124
|
+
defaultMessage: string;
|
|
125
|
+
description: string;
|
|
126
|
+
};
|
|
127
|
+
results_count: {
|
|
128
|
+
id: string;
|
|
129
|
+
defaultMessage: string;
|
|
130
|
+
description: string;
|
|
131
|
+
};
|
|
132
|
+
updated_at: {
|
|
133
|
+
id: string;
|
|
134
|
+
defaultMessage: string;
|
|
135
|
+
description: string;
|
|
136
|
+
};
|
|
137
|
+
selected: {
|
|
138
|
+
id: string;
|
|
139
|
+
defaultMessage: string;
|
|
140
|
+
description: string;
|
|
141
|
+
};
|
|
142
|
+
no_control_selected: {
|
|
143
|
+
id: string;
|
|
144
|
+
defaultMessage: string;
|
|
145
|
+
description: string;
|
|
146
|
+
};
|
|
147
|
+
clear: {
|
|
148
|
+
id: string;
|
|
149
|
+
defaultMessage: string;
|
|
150
|
+
description: string;
|
|
151
|
+
};
|
|
152
|
+
unmap: {
|
|
153
|
+
id: string;
|
|
154
|
+
defaultMessage: string;
|
|
155
|
+
description: string;
|
|
156
|
+
};
|
|
157
|
+
live_preview: {
|
|
158
|
+
id: string;
|
|
159
|
+
defaultMessage: string;
|
|
160
|
+
description: string;
|
|
161
|
+
};
|
|
162
|
+
display_options: {
|
|
163
|
+
id: string;
|
|
164
|
+
defaultMessage: string;
|
|
165
|
+
description: string;
|
|
166
|
+
};
|
|
167
|
+
show_status_indicator: {
|
|
168
|
+
id: string;
|
|
169
|
+
defaultMessage: string;
|
|
170
|
+
description: string;
|
|
171
|
+
};
|
|
172
|
+
searching: {
|
|
173
|
+
id: string;
|
|
174
|
+
defaultMessage: string;
|
|
175
|
+
description: string;
|
|
176
|
+
};
|
|
177
|
+
map_control_aria: {
|
|
178
|
+
id: string;
|
|
179
|
+
defaultMessage: string;
|
|
180
|
+
description: string;
|
|
181
|
+
};
|
|
182
|
+
outdated_badge: {
|
|
183
|
+
id: string;
|
|
184
|
+
defaultMessage: string;
|
|
185
|
+
description: string;
|
|
186
|
+
};
|
|
187
|
+
missing_badge: {
|
|
188
|
+
id: string;
|
|
189
|
+
defaultMessage: string;
|
|
190
|
+
description: string;
|
|
191
|
+
};
|
|
192
|
+
error_loading: {
|
|
193
|
+
id: string;
|
|
194
|
+
defaultMessage: string;
|
|
195
|
+
description: string;
|
|
196
|
+
};
|
|
197
|
+
error_timeout: {
|
|
198
|
+
id: string;
|
|
199
|
+
defaultMessage: string;
|
|
200
|
+
description: string;
|
|
201
|
+
};
|
|
202
|
+
missing_callout: {
|
|
203
|
+
id: string;
|
|
204
|
+
defaultMessage: string;
|
|
205
|
+
description: string;
|
|
206
|
+
};
|
|
207
|
+
outdated_callout: {
|
|
208
|
+
id: string;
|
|
209
|
+
defaultMessage: string;
|
|
210
|
+
description: string;
|
|
211
|
+
};
|
|
212
|
+
search_placeholder: {
|
|
213
|
+
id: string;
|
|
214
|
+
defaultMessage: string;
|
|
215
|
+
description: string;
|
|
216
|
+
};
|
|
217
|
+
control_implementations: {
|
|
218
|
+
id: string;
|
|
219
|
+
defaultMessage: string;
|
|
220
|
+
description: string;
|
|
221
|
+
};
|
|
222
|
+
header_status: {
|
|
223
|
+
id: string;
|
|
224
|
+
defaultMessage: string;
|
|
225
|
+
description: string;
|
|
226
|
+
};
|
|
227
|
+
header_status_aria: {
|
|
228
|
+
id: string;
|
|
229
|
+
defaultMessage: string;
|
|
230
|
+
description: string;
|
|
231
|
+
};
|
|
232
|
+
header_status_avv_tip: {
|
|
233
|
+
id: string;
|
|
234
|
+
defaultMessage: string;
|
|
235
|
+
description: string;
|
|
236
|
+
};
|
|
102
237
|
};
|
|
103
238
|
|
|
104
239
|
export { messages };
|
package/dist/messages/index.d.ts
CHANGED
|
@@ -44,6 +44,11 @@ declare const messages: {
|
|
|
44
44
|
defaultMessage: string;
|
|
45
45
|
description: string;
|
|
46
46
|
};
|
|
47
|
+
variant_hint: {
|
|
48
|
+
id: string;
|
|
49
|
+
defaultMessage: string;
|
|
50
|
+
description: string;
|
|
51
|
+
};
|
|
47
52
|
variant_chip: {
|
|
48
53
|
id: string;
|
|
49
54
|
defaultMessage: string;
|
|
@@ -99,6 +104,136 @@ declare const messages: {
|
|
|
99
104
|
defaultMessage: string;
|
|
100
105
|
description: string;
|
|
101
106
|
};
|
|
107
|
+
unmapped_control: {
|
|
108
|
+
id: string;
|
|
109
|
+
defaultMessage: string;
|
|
110
|
+
description: string;
|
|
111
|
+
};
|
|
112
|
+
control_with_title: {
|
|
113
|
+
id: string;
|
|
114
|
+
defaultMessage: string;
|
|
115
|
+
description: string;
|
|
116
|
+
};
|
|
117
|
+
search_hint: {
|
|
118
|
+
id: string;
|
|
119
|
+
defaultMessage: string;
|
|
120
|
+
description: string;
|
|
121
|
+
};
|
|
122
|
+
no_results: {
|
|
123
|
+
id: string;
|
|
124
|
+
defaultMessage: string;
|
|
125
|
+
description: string;
|
|
126
|
+
};
|
|
127
|
+
results_count: {
|
|
128
|
+
id: string;
|
|
129
|
+
defaultMessage: string;
|
|
130
|
+
description: string;
|
|
131
|
+
};
|
|
132
|
+
updated_at: {
|
|
133
|
+
id: string;
|
|
134
|
+
defaultMessage: string;
|
|
135
|
+
description: string;
|
|
136
|
+
};
|
|
137
|
+
selected: {
|
|
138
|
+
id: string;
|
|
139
|
+
defaultMessage: string;
|
|
140
|
+
description: string;
|
|
141
|
+
};
|
|
142
|
+
no_control_selected: {
|
|
143
|
+
id: string;
|
|
144
|
+
defaultMessage: string;
|
|
145
|
+
description: string;
|
|
146
|
+
};
|
|
147
|
+
clear: {
|
|
148
|
+
id: string;
|
|
149
|
+
defaultMessage: string;
|
|
150
|
+
description: string;
|
|
151
|
+
};
|
|
152
|
+
unmap: {
|
|
153
|
+
id: string;
|
|
154
|
+
defaultMessage: string;
|
|
155
|
+
description: string;
|
|
156
|
+
};
|
|
157
|
+
live_preview: {
|
|
158
|
+
id: string;
|
|
159
|
+
defaultMessage: string;
|
|
160
|
+
description: string;
|
|
161
|
+
};
|
|
162
|
+
display_options: {
|
|
163
|
+
id: string;
|
|
164
|
+
defaultMessage: string;
|
|
165
|
+
description: string;
|
|
166
|
+
};
|
|
167
|
+
show_status_indicator: {
|
|
168
|
+
id: string;
|
|
169
|
+
defaultMessage: string;
|
|
170
|
+
description: string;
|
|
171
|
+
};
|
|
172
|
+
searching: {
|
|
173
|
+
id: string;
|
|
174
|
+
defaultMessage: string;
|
|
175
|
+
description: string;
|
|
176
|
+
};
|
|
177
|
+
map_control_aria: {
|
|
178
|
+
id: string;
|
|
179
|
+
defaultMessage: string;
|
|
180
|
+
description: string;
|
|
181
|
+
};
|
|
182
|
+
outdated_badge: {
|
|
183
|
+
id: string;
|
|
184
|
+
defaultMessage: string;
|
|
185
|
+
description: string;
|
|
186
|
+
};
|
|
187
|
+
missing_badge: {
|
|
188
|
+
id: string;
|
|
189
|
+
defaultMessage: string;
|
|
190
|
+
description: string;
|
|
191
|
+
};
|
|
192
|
+
error_loading: {
|
|
193
|
+
id: string;
|
|
194
|
+
defaultMessage: string;
|
|
195
|
+
description: string;
|
|
196
|
+
};
|
|
197
|
+
error_timeout: {
|
|
198
|
+
id: string;
|
|
199
|
+
defaultMessage: string;
|
|
200
|
+
description: string;
|
|
201
|
+
};
|
|
202
|
+
missing_callout: {
|
|
203
|
+
id: string;
|
|
204
|
+
defaultMessage: string;
|
|
205
|
+
description: string;
|
|
206
|
+
};
|
|
207
|
+
outdated_callout: {
|
|
208
|
+
id: string;
|
|
209
|
+
defaultMessage: string;
|
|
210
|
+
description: string;
|
|
211
|
+
};
|
|
212
|
+
search_placeholder: {
|
|
213
|
+
id: string;
|
|
214
|
+
defaultMessage: string;
|
|
215
|
+
description: string;
|
|
216
|
+
};
|
|
217
|
+
control_implementations: {
|
|
218
|
+
id: string;
|
|
219
|
+
defaultMessage: string;
|
|
220
|
+
description: string;
|
|
221
|
+
};
|
|
222
|
+
header_status: {
|
|
223
|
+
id: string;
|
|
224
|
+
defaultMessage: string;
|
|
225
|
+
description: string;
|
|
226
|
+
};
|
|
227
|
+
header_status_aria: {
|
|
228
|
+
id: string;
|
|
229
|
+
defaultMessage: string;
|
|
230
|
+
description: string;
|
|
231
|
+
};
|
|
232
|
+
header_status_avv_tip: {
|
|
233
|
+
id: string;
|
|
234
|
+
defaultMessage: string;
|
|
235
|
+
description: string;
|
|
236
|
+
};
|
|
102
237
|
};
|
|
103
238
|
|
|
104
239
|
export { messages };
|
package/dist/messages/index.js
CHANGED
|
@@ -63,14 +63,19 @@ var messages = (0, import_react_intl.defineMessages)({
|
|
|
63
63
|
},
|
|
64
64
|
search_controls: {
|
|
65
65
|
id: "editor.controlref.search_controls",
|
|
66
|
-
defaultMessage: "Search controls
|
|
66
|
+
defaultMessage: "Search controls\u2026",
|
|
67
67
|
description: "Placeholder for search controls input"
|
|
68
68
|
},
|
|
69
69
|
variant: {
|
|
70
70
|
id: "editor.controlref.variant",
|
|
71
|
-
defaultMessage: "
|
|
71
|
+
defaultMessage: "Variante",
|
|
72
72
|
description: "Label for variant section"
|
|
73
73
|
},
|
|
74
|
+
variant_hint: {
|
|
75
|
+
id: "editor.controlref.variant_hint",
|
|
76
|
+
defaultMessage: "Choose a visual emphasis for this section.",
|
|
77
|
+
description: "Hint for variant section"
|
|
78
|
+
},
|
|
74
79
|
variant_chip: {
|
|
75
80
|
id: "editor.controlref.variant_chip",
|
|
76
81
|
defaultMessage: "Chip",
|
|
@@ -125,6 +130,136 @@ var messages = (0, import_react_intl.defineMessages)({
|
|
|
125
130
|
id: "editor.controlref.save_settings",
|
|
126
131
|
defaultMessage: "Save Settings",
|
|
127
132
|
description: "Label for save settings button"
|
|
133
|
+
},
|
|
134
|
+
unmapped_control: {
|
|
135
|
+
id: "editor.controlref.unmapped_control",
|
|
136
|
+
defaultMessage: "Unmapped Control",
|
|
137
|
+
description: "Fallback label when no control is selected"
|
|
138
|
+
},
|
|
139
|
+
control_with_title: {
|
|
140
|
+
id: "editor.controlref.control_with_title",
|
|
141
|
+
defaultMessage: "Control: {title}",
|
|
142
|
+
description: "Dialog title with selected control"
|
|
143
|
+
},
|
|
144
|
+
search_hint: {
|
|
145
|
+
id: "editor.controlref.search_hint",
|
|
146
|
+
defaultMessage: "Start typing to search by ID, title or status.",
|
|
147
|
+
description: "Empty search hint"
|
|
148
|
+
},
|
|
149
|
+
no_results: {
|
|
150
|
+
id: "editor.controlref.no_results",
|
|
151
|
+
defaultMessage: "No controls found for \u201C{query}\u201D. You can keep this chip unmapped.",
|
|
152
|
+
description: "Shown when no controls match search query"
|
|
153
|
+
},
|
|
154
|
+
results_count: {
|
|
155
|
+
id: "editor.controlref.results_count",
|
|
156
|
+
defaultMessage: "{count, plural, one {# result} other {# results}}",
|
|
157
|
+
description: "Number of search results"
|
|
158
|
+
},
|
|
159
|
+
updated_at: {
|
|
160
|
+
id: "editor.controlref.updated_at",
|
|
161
|
+
defaultMessage: "Updated {date}",
|
|
162
|
+
description: "Updated date label"
|
|
163
|
+
},
|
|
164
|
+
selected: {
|
|
165
|
+
id: "editor.controlref.selected",
|
|
166
|
+
defaultMessage: "Selected",
|
|
167
|
+
description: "Label for selected item area"
|
|
168
|
+
},
|
|
169
|
+
no_control_selected: {
|
|
170
|
+
id: "editor.controlref.no_control_selected",
|
|
171
|
+
defaultMessage: "No control selected",
|
|
172
|
+
description: "Empty state in selected area"
|
|
173
|
+
},
|
|
174
|
+
clear: {
|
|
175
|
+
id: "editor.controlref.clear",
|
|
176
|
+
defaultMessage: "Clear",
|
|
177
|
+
description: "Clear selection button"
|
|
178
|
+
},
|
|
179
|
+
unmap: {
|
|
180
|
+
id: "editor.controlref.unmap",
|
|
181
|
+
defaultMessage: "Unmap",
|
|
182
|
+
description: "Unmap selection button"
|
|
183
|
+
},
|
|
184
|
+
live_preview: {
|
|
185
|
+
id: "editor.controlref.live_preview",
|
|
186
|
+
defaultMessage: "Live preview",
|
|
187
|
+
description: "Live preview section title"
|
|
188
|
+
},
|
|
189
|
+
display_options: {
|
|
190
|
+
id: "editor.controlref.display_options",
|
|
191
|
+
defaultMessage: "Display options",
|
|
192
|
+
description: "Display options section title"
|
|
193
|
+
},
|
|
194
|
+
show_status_indicator: {
|
|
195
|
+
id: "editor.controlref.show_status_indicator",
|
|
196
|
+
defaultMessage: "Show status indicator",
|
|
197
|
+
description: "Toggle for showing indicator"
|
|
198
|
+
},
|
|
199
|
+
searching: {
|
|
200
|
+
id: "editor.controlref.searching",
|
|
201
|
+
defaultMessage: "Searching\u2026",
|
|
202
|
+
description: "Loading indicator text"
|
|
203
|
+
},
|
|
204
|
+
map_control_aria: {
|
|
205
|
+
id: "editor.controlref.map_control_aria",
|
|
206
|
+
defaultMessage: "Map control",
|
|
207
|
+
description: "ARIA label for mapping control"
|
|
208
|
+
},
|
|
209
|
+
outdated_badge: {
|
|
210
|
+
id: "editor.controlref.outdated_badge",
|
|
211
|
+
defaultMessage: "A newer revision exists",
|
|
212
|
+
description: "Badge for outdated controls"
|
|
213
|
+
},
|
|
214
|
+
missing_badge: {
|
|
215
|
+
id: "editor.controlref.missing_badge",
|
|
216
|
+
defaultMessage: "Control no longer exists",
|
|
217
|
+
description: "Badge for missing controls"
|
|
218
|
+
},
|
|
219
|
+
error_loading: {
|
|
220
|
+
id: "editor.controlref.error_loading",
|
|
221
|
+
defaultMessage: "Failed to load controls",
|
|
222
|
+
description: "Error message when failing to load controls"
|
|
223
|
+
},
|
|
224
|
+
error_timeout: {
|
|
225
|
+
id: "editor.controlref.error_timeout",
|
|
226
|
+
defaultMessage: "The request timed out. Please try again.",
|
|
227
|
+
description: "Error message when the request times out"
|
|
228
|
+
},
|
|
229
|
+
missing_callout: {
|
|
230
|
+
id: "editor.controlref.missing_callout",
|
|
231
|
+
defaultMessage: "The currently mapped control could not be found. It may have been deleted or you may not have access to it anymore. Please select a different control.",
|
|
232
|
+
description: "Callout message when the selected control is missing"
|
|
233
|
+
},
|
|
234
|
+
outdated_callout: {
|
|
235
|
+
id: "editor.controlref.outdated_callout",
|
|
236
|
+
defaultMessage: "A newer revision of the currently mapped control exists. Consider updating to the latest version by re-selecting it below.",
|
|
237
|
+
description: "Callout message when the selected control is outdated"
|
|
238
|
+
},
|
|
239
|
+
search_placeholder: {
|
|
240
|
+
id: "editor.controlref.search_placeholder",
|
|
241
|
+
defaultMessage: "e.g. CTRL-001, Asset Inventory\u2026",
|
|
242
|
+
description: "Placeholder for search controls input"
|
|
243
|
+
},
|
|
244
|
+
control_implementations: {
|
|
245
|
+
id: "editor.controlref.control_implementations",
|
|
246
|
+
defaultMessage: "Implementations",
|
|
247
|
+
description: "Label for control implementations section"
|
|
248
|
+
},
|
|
249
|
+
header_status: {
|
|
250
|
+
id: "editor.controlblock.header_status",
|
|
251
|
+
defaultMessage: "Show status in header",
|
|
252
|
+
description: "Label for show status in header toggle"
|
|
253
|
+
},
|
|
254
|
+
header_status_aria: {
|
|
255
|
+
id: "editor.controlblock.header_status_aria",
|
|
256
|
+
defaultMessage: "Toggle status chip in card header",
|
|
257
|
+
description: "ARIA label for show status in header toggle"
|
|
258
|
+
},
|
|
259
|
+
header_status_avv_tip: {
|
|
260
|
+
id: "editor.controlblock.header_status_avv_tip",
|
|
261
|
+
defaultMessage: "If this document is intended for use or export as a data processing agreement (AVV), disable this option unless you explicitly want to publish the current control status.",
|
|
262
|
+
description: "Tooltip for show status in header toggle when used in AVV documents"
|
|
128
263
|
}
|
|
129
264
|
});
|
|
130
265
|
// Annotate the CommonJS export names for ESM import in node:
|
package/dist/messages/index.mjs
CHANGED
package/dist/role.d.mts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ParentConfig } from '@tiptap/core';
|
|
2
|
+
|
|
3
|
+
declare module "@tiptap/core" {
|
|
4
|
+
interface NodeConfig<Options, Storage> {
|
|
5
|
+
/**
|
|
6
|
+
* A string or function to determine the role of the control field.
|
|
7
|
+
* @default 'control'
|
|
8
|
+
* @example () => 'control'
|
|
9
|
+
*/
|
|
10
|
+
controlRole?: string | ((this: {
|
|
11
|
+
name: string;
|
|
12
|
+
options: Options;
|
|
13
|
+
storage: Storage;
|
|
14
|
+
parent: ParentConfig<NodeConfig<Options>>["controlRole"];
|
|
15
|
+
}) => string);
|
|
16
|
+
}
|
|
17
|
+
}
|
package/dist/role.d.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ParentConfig } from '@tiptap/core';
|
|
2
|
+
|
|
3
|
+
declare module "@tiptap/core" {
|
|
4
|
+
interface NodeConfig<Options, Storage> {
|
|
5
|
+
/**
|
|
6
|
+
* A string or function to determine the role of the control field.
|
|
7
|
+
* @default 'control'
|
|
8
|
+
* @example () => 'control'
|
|
9
|
+
*/
|
|
10
|
+
controlRole?: string | ((this: {
|
|
11
|
+
name: string;
|
|
12
|
+
options: Options;
|
|
13
|
+
storage: Storage;
|
|
14
|
+
parent: ParentConfig<NodeConfig<Options>>["controlRole"];
|
|
15
|
+
}) => string);
|
|
16
|
+
}
|
|
17
|
+
}
|
package/dist/role.js
ADDED
package/dist/role.mjs
ADDED
package/dist/types.d.mts
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
import { CardVariantProps } from '@kopexa/theme';
|
|
2
2
|
|
|
3
|
+
type FallbackOptions = Record<string, unknown>;
|
|
4
|
+
type ControlNodeAttrs<T = FallbackOptions> = {
|
|
5
|
+
id: string | null;
|
|
6
|
+
title: string | null;
|
|
7
|
+
updatedAt: string | null;
|
|
8
|
+
status: string | null;
|
|
9
|
+
options: T | null;
|
|
10
|
+
};
|
|
11
|
+
type ControlBlockVariant = "default" | "muted" | "accent";
|
|
12
|
+
type ControlViewOptions = {
|
|
13
|
+
showStatus?: boolean | null;
|
|
14
|
+
variant?: ControlBlockVariant;
|
|
15
|
+
};
|
|
16
|
+
type ControlResolver = {
|
|
17
|
+
/**
|
|
18
|
+
* A method to retrieve a list of controls, potentially filtered by a search term.
|
|
19
|
+
* @param searchTerm - Optional term to filter controls.
|
|
20
|
+
* @returns A promise that resolves to an array of control objects.
|
|
21
|
+
*/
|
|
22
|
+
getControls: (searchTerm?: string) => Promise<Array<ControlSummary>>;
|
|
23
|
+
getControl: (id: string) => Promise<ControlSummary | null>;
|
|
24
|
+
};
|
|
3
25
|
type ControlSummary = {
|
|
4
26
|
id: string | null;
|
|
5
27
|
title: string | null;
|
|
@@ -14,24 +36,9 @@ type ControlImplementationRef = {
|
|
|
14
36
|
updatedAt?: string | null;
|
|
15
37
|
status?: string | null;
|
|
16
38
|
};
|
|
17
|
-
type Variant = "chip" | "card";
|
|
18
39
|
type CardBorder = CardVariantProps["border"];
|
|
19
40
|
type CardShadow = CardVariantProps["shadow"];
|
|
20
41
|
type CardRadius = CardVariantProps["radius"];
|
|
21
42
|
type CardSpacing = CardVariantProps["spacing"];
|
|
22
|
-
type ControlRefOptions = {
|
|
23
|
-
variant: Variant;
|
|
24
|
-
inlineShowStatus: boolean;
|
|
25
|
-
cardShowDescription: boolean;
|
|
26
|
-
cardShowImplementations: boolean;
|
|
27
|
-
cardBorder: CardBorder;
|
|
28
|
-
cardShadow: CardShadow;
|
|
29
|
-
cardRadius: CardRadius;
|
|
30
|
-
cardSpacing: CardSpacing;
|
|
31
|
-
};
|
|
32
|
-
type Getters = {
|
|
33
|
-
search: (q: string) => Promise<ControlSummary[]>;
|
|
34
|
-
getById: (id: string) => Promise<ControlSummary | null>;
|
|
35
|
-
};
|
|
36
43
|
|
|
37
|
-
export type { CardBorder, CardRadius, CardShadow, CardSpacing, ControlImplementationRef,
|
|
44
|
+
export type { CardBorder, CardRadius, CardShadow, CardSpacing, ControlBlockVariant, ControlImplementationRef, ControlNodeAttrs, ControlResolver, ControlSummary, ControlViewOptions };
|