@lblod/ember-rdfa-editor-lblod-plugins 2.1.2 → 4.0.1

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.
Files changed (101) hide show
  1. package/.woodpecker/.release.yml +1 -1
  2. package/.woodpecker/.test-scenarios.yml +17 -0
  3. package/.woodpecker/.test.yml +5 -5
  4. package/CHANGELOG.md +61 -1
  5. package/README.md +184 -141
  6. package/addon/components/article-structure-plugin/article-structure-card.hbs +1 -3
  7. package/addon/components/article-structure-plugin/article-structure-card.ts +14 -8
  8. package/addon/components/article-structure-plugin/structure-card.hbs +9 -4
  9. package/addon/components/article-structure-plugin/structure-card.ts +19 -15
  10. package/addon/components/besluit-plugin/besluit-plugin-card.ts +8 -4
  11. package/addon/components/besluit-type-plugin/toolbar-dropdown.hbs +2 -2
  12. package/addon/components/besluit-type-plugin/toolbar-dropdown.ts +12 -10
  13. package/addon/components/citation-plugin/citation-card.hbs +4 -0
  14. package/addon/components/citation-plugin/citation-card.ts +42 -33
  15. package/addon/components/citation-plugin/citation-insert.ts +32 -37
  16. package/addon/components/import-snippet-plugin/card.ts +9 -6
  17. package/addon/components/rdfa-date-plugin/card.ts +16 -20
  18. package/addon/components/rdfa-date-plugin/insert.hbs +0 -9
  19. package/addon/components/rdfa-date-plugin/insert.ts +12 -20
  20. package/addon/components/roadsign-regulation-plugin/roadsign-regulation-card.ts +3 -3
  21. package/addon/components/roadsign-regulation-plugin/roadsigns-modal.ts +5 -4
  22. package/addon/components/roadsign-regulation-plugin/roadsigns-table.ts +1 -1
  23. package/addon/components/standard-template-plugin/card.ts +2 -2
  24. package/addon/components/standard-template-plugin/template-provider.ts +6 -5
  25. package/addon/components/table-of-contents-plugin/ember-nodes/table-of-contents.ts +1 -1
  26. package/addon/components/table-of-contents-plugin/toolbar-button.ts +45 -8
  27. package/addon/components/variable-plugin/insert-variable-card.hbs +23 -9
  28. package/addon/components/variable-plugin/insert-variable-card.ts +19 -14
  29. package/addon/components/variable-plugin/template-variable-card.hbs +1 -1
  30. package/addon/components/variable-plugin/template-variable-card.ts +10 -7
  31. package/addon/components/variable-plugin/variable.hbs +8 -3
  32. package/addon/models/instruction.ts +1 -1
  33. package/addon/models/measure.ts +1 -1
  34. package/addon/models/sign.ts +1 -1
  35. package/addon/plugins/article-structure-plugin/commands/move-selected-structure.ts +1 -1
  36. package/addon/plugins/article-structure-plugin/index.ts +2 -32
  37. package/addon/plugins/article-structure-plugin/structures/article-paragraph.ts +17 -8
  38. package/addon/plugins/article-structure-plugin/structures/article.ts +7 -3
  39. package/addon/plugins/article-structure-plugin/structures/chapter.ts +1 -1
  40. package/addon/plugins/article-structure-plugin/structures/section.ts +1 -1
  41. package/addon/plugins/article-structure-plugin/structures/structure-header.ts +7 -2
  42. package/addon/plugins/article-structure-plugin/structures/subsection.ts +1 -1
  43. package/addon/plugins/article-structure-plugin/structures/title.ts +1 -1
  44. package/addon/plugins/besluit-plugin/utils/get-title-for-decision.ts +3 -6
  45. package/addon/plugins/citation-plugin/index.ts +17 -55
  46. package/addon/plugins/citation-plugin/utils/cited-text.ts +5 -4
  47. package/addon/plugins/rdfa-date-plugin/index.ts +5 -28
  48. package/addon/plugins/rdfa-date-plugin/nodes/date.ts +1 -6
  49. package/addon/plugins/standard-template-plugin/index.ts +0 -6
  50. package/addon/plugins/standard-template-plugin/utils/nodes.ts +1 -1
  51. package/addon/plugins/table-of-contents-plugin/index.ts +0 -7
  52. package/addon/plugins/variable-plugin/utils/constants.ts +1 -0
  53. package/addon/services/roadsign-registry.ts +1 -1
  54. package/app/styles/article-structure-plugin.scss +7 -0
  55. package/app/styles/besluit-plugin.scss +4 -0
  56. package/app/styles/variable-plugin.scss +1 -1
  57. package/components/article-structure-plugin/article-structure-card.d.ts +4 -5
  58. package/components/article-structure-plugin/structure-card.d.ts +4 -6
  59. package/components/besluit-plugin/besluit-plugin-card.d.ts +3 -3
  60. package/components/besluit-type-plugin/toolbar-dropdown.d.ts +3 -3
  61. package/components/citation-plugin/citation-card.d.ts +7 -8
  62. package/components/citation-plugin/citation-insert.d.ts +5 -10
  63. package/components/import-snippet-plugin/card.d.ts +3 -3
  64. package/components/rdfa-date-plugin/card.d.ts +6 -11
  65. package/components/rdfa-date-plugin/insert.d.ts +6 -12
  66. package/components/roadsign-regulation-plugin/roadsign-regulation-card.d.ts +3 -3
  67. package/components/roadsign-regulation-plugin/roadsigns-modal.d.ts +2 -2
  68. package/components/standard-template-plugin/card.d.ts +3 -3
  69. package/components/standard-template-plugin/template-provider.d.ts +3 -3
  70. package/components/table-of-contents-plugin/ember-nodes/table-of-contents.d.ts +1 -1
  71. package/components/table-of-contents-plugin/toolbar-button.d.ts +3 -3
  72. package/components/variable-plugin/insert-variable-card.d.ts +7 -8
  73. package/components/variable-plugin/template-variable-card.d.ts +3 -3
  74. package/package.json +26 -29
  75. package/plugins/article-structure-plugin/index.d.ts +2 -3
  76. package/plugins/besluit-plugin/utils/get-title-for-decision.d.ts +3 -3
  77. package/plugins/citation-plugin/index.d.ts +2 -12
  78. package/plugins/rdfa-date-plugin/index.d.ts +5 -5
  79. package/plugins/rdfa-date-plugin/nodes/date.d.ts +1 -6
  80. package/plugins/standard-template-plugin/index.d.ts +0 -2
  81. package/plugins/table-of-contents-plugin/index.d.ts +0 -2
  82. package/plugins/table-of-contents-plugin/nodes/table-of-contents.d.ts +1 -1
  83. package/plugins/variable-plugin/nodes.d.ts +1 -1
  84. package/translations/en-US.yaml +63 -61
  85. package/translations/nl-BE.yaml +65 -59
  86. package/addon/components/variable-plugin/variable.ts +0 -262
  87. package/addon/plugins/besluit-plugin/index.ts +0 -6
  88. package/addon/plugins/besluit-type-plugin/index.ts +0 -6
  89. package/addon/plugins/citation-plugin/marks/citation.ts +0 -27
  90. package/addon/plugins/import-snippet-plugin.ts +0 -6
  91. package/addon/plugins/rdfa-date-plugin/nodes/index.ts +0 -1
  92. package/addon/plugins/roadsign-regulation-plugin/index.ts +0 -6
  93. package/addon/plugins/variable-plugin/index.ts +0 -16
  94. package/components/variable-plugin/variable.d.ts +0 -43
  95. package/plugins/besluit-plugin/index.d.ts +0 -2
  96. package/plugins/besluit-type-plugin/index.d.ts +0 -2
  97. package/plugins/citation-plugin/marks/citation.d.ts +0 -2
  98. package/plugins/import-snippet-plugin.d.ts +0 -2
  99. package/plugins/rdfa-date-plugin/nodes/index.d.ts +0 -1
  100. package/plugins/roadsign-regulation-plugin/index.d.ts +0 -2
  101. package/plugins/variable-plugin/index.d.ts +0 -3
@@ -1,4 +1,3 @@
1
- import { unwrap } from '@lblod/ember-rdfa-editor/utils/option';
2
1
  import { StructureSpec } from '..';
3
2
  import {
4
3
  constructStructureBodyNodeSpec,
@@ -7,6 +6,7 @@ import {
7
6
  } from '../utils/structure';
8
7
  import { v4 as uuid } from 'uuid';
9
8
  import { SAY } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/constants';
9
+ import { unwrap } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/option';
10
10
 
11
11
  const PLACEHOLDERS = {
12
12
  title: 'article-structure-plugin.placeholder.chapter.heading',
@@ -5,8 +5,8 @@ import {
5
5
  } from '../utils/structure';
6
6
  import { v4 as uuid } from 'uuid';
7
7
  import { StructureSpec } from '..';
8
- import { unwrap } from '@lblod/ember-rdfa-editor/utils/option';
9
8
  import { SAY } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/constants';
9
+ import { unwrap } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/option';
10
10
 
11
11
  const PLACEHOLDERS = {
12
12
  title: 'article-structure-plugin.placeholder.section.heading',
@@ -21,6 +21,7 @@ export const structure_header: NodeSpec = {
21
21
  inline: false,
22
22
  defining: true,
23
23
  isolating: true,
24
+ selectable: false,
24
25
  attrs: {
25
26
  property: {
26
27
  default: SAY('heading').prefixed,
@@ -42,10 +43,14 @@ export const structure_header: NodeSpec = {
42
43
  { property: node.attrs.property as string },
43
44
  [
44
45
  'span',
45
- { property: ELI('number').prefixed, datatype: XSD('string').prefixed },
46
+ {
47
+ property: ELI('number').prefixed,
48
+ datatype: XSD('string').prefixed,
49
+ contenteditable: false,
50
+ },
46
51
  node.attrs.number,
47
52
  ],
48
- '. ',
53
+ ['span', { contenteditable: false }, '. '],
49
54
  [
50
55
  'span',
51
56
  {
@@ -5,8 +5,8 @@ import {
5
5
  romanize,
6
6
  } from '../utils/structure';
7
7
  import { v4 as uuid } from 'uuid';
8
- import { unwrap } from '@lblod/ember-rdfa-editor/utils/option';
9
8
  import { SAY } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/constants';
9
+ import { unwrap } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/option';
10
10
 
11
11
  const PLACEHOLDERS = {
12
12
  title: 'article-structure-plugin.placeholder.subsection.heading',
@@ -1,4 +1,3 @@
1
- import { unwrap } from '@lblod/ember-rdfa-editor/utils/option';
2
1
  import { StructureSpec } from '..';
3
2
  import {
4
3
  constructStructureBodyNodeSpec,
@@ -7,6 +6,7 @@ import {
7
6
  } from '../utils/structure';
8
7
  import { v4 as uuid } from 'uuid';
9
8
  import { SAY } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/constants';
9
+ import { unwrap } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/option';
10
10
 
11
11
  const PLACEHOLDERS = {
12
12
  heading: 'article-structure-plugin.placeholder.generic.heading',
@@ -1,9 +1,6 @@
1
- import { ProseStore } from '@lblod/ember-rdfa-editor/plugins/datastore';
1
+ import { SayStore } from '@lblod/ember-rdfa-editor/plugins/datastore';
2
2
 
3
- export function getTitleForDecision(
4
- decisionUri: string,
5
- datastore: ProseStore
6
- ) {
3
+ export function getTitleForDecision(decisionUri: string, datastore: SayStore) {
7
4
  const title = datastore
8
5
  .match(`>${decisionUri}`, '>http://data.europa.eu/eli/ontology#title')
9
6
  .asQuads()
@@ -21,7 +18,7 @@ export function getTitleForDecision(
21
18
  */
22
19
  export function getTitleNodesForDecision(
23
20
  decisionUri: string,
24
- datastore: ProseStore
21
+ datastore: SayStore
25
22
  ) {
26
23
  const mapping = datastore
27
24
  .match(`>${decisionUri}`, '>http://data.europa.eu/eli/ontology#title')
@@ -4,18 +4,17 @@ import {
4
4
  EditorState,
5
5
  EditorStateConfig,
6
6
  InlineDecorationSpec,
7
- MarkSpec,
8
7
  NodeType,
9
8
  PNode,
10
9
  ProsePlugin,
10
+ ResolvedPos,
11
11
  Schema,
12
- WidgetSpec,
13
12
  } from '@lblod/ember-rdfa-editor';
14
13
  import processMatch, {
15
14
  RegexpMatchArrayWithIndices,
16
15
  } from './utils/process-match';
17
- import { citation } from './marks/citation';
18
16
  import { changedDescendants } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/changed-descendants';
17
+ import { findParentNodeOfTypeClosestToPos } from '@curvenote/prosemirror-utils';
19
18
 
20
19
  const BASIC_MULTIPLANE_CHARACTER = '\u0021-\uFFFF'; // most of the characters used around the world
21
20
 
@@ -115,17 +114,6 @@ interface CitationPluginState {
115
114
 
116
115
  export type CitationPlugin = ProsePlugin<CitationPluginState>;
117
116
 
118
- export interface CitationPluginBundle {
119
- plugin: ProsePlugin<CitationPluginState>;
120
- widgets: {
121
- citationCard: WidgetSpec;
122
- citationInsert: WidgetSpec;
123
- };
124
- marks: {
125
- citation: MarkSpec;
126
- };
127
- }
128
-
129
117
  export interface CitationPluginNodeConfig {
130
118
  type: 'nodes';
131
119
  regex?: RegExp;
@@ -144,41 +132,7 @@ export type CitationPluginConfig =
144
132
  | CitationPluginNodeConfig
145
133
  | CitationPluginRangeConfig;
146
134
 
147
- export function setupCitationPlugin(
148
- config: CitationPluginConfig = {
149
- type: 'nodes',
150
- activeInNodeTypes(schema): Set<NodeType> {
151
- return new Set([schema.nodes.doc]);
152
- },
153
- }
154
- ): CitationPluginBundle {
155
- const plugin = citationPlugin(config);
156
- return {
157
- plugin,
158
- widgets: {
159
- citationCard: {
160
- desiredLocation: 'sidebar',
161
- componentName: 'citation-plugin/citation-card',
162
- widgetArgs: {
163
- plugin,
164
- },
165
- },
166
- citationInsert: {
167
- desiredLocation: 'insertSidebar',
168
- componentName: 'citation-plugin/citation-insert',
169
- widgetArgs: {
170
- config,
171
- plugin,
172
- },
173
- },
174
- },
175
- marks: {
176
- citation,
177
- },
178
- };
179
- }
180
-
181
- function citationPlugin(config: CitationPluginConfig): CitationPlugin {
135
+ export function citationPlugin(config: CitationPluginConfig): CitationPlugin {
182
136
  const citation: CitationPlugin = new ProsePlugin({
183
137
  state: {
184
138
  init(stateConfig: EditorStateConfig, state: EditorState) {
@@ -254,6 +208,7 @@ function calculateDecorationsInNodes(
254
208
  decsToAdd,
255
209
  schema,
256
210
  config.regex,
211
+ newDoc,
257
212
  decsToRemove,
258
213
  oldDecorations
259
214
  );
@@ -302,7 +257,12 @@ function calculateDecorationsInRanges(
302
257
  activeRanges: [number, number][]
303
258
  ): { decorations: DecorationSet; activeRanges: [number, number][] } {
304
259
  const decorationsToAdd: Decoration[] = [];
305
- const collector = collectDecorations(decorationsToAdd, schema, config.regex);
260
+ const collector = collectDecorations(
261
+ decorationsToAdd,
262
+ schema,
263
+ config.regex,
264
+ doc
265
+ );
306
266
 
307
267
  for (const [start, end] of activeRanges) {
308
268
  doc.nodesBetween(start, end, collector);
@@ -317,15 +277,17 @@ function collectDecorations(
317
277
  decsToAdd: Decoration[],
318
278
  schema: CitationSchema,
319
279
  regex: RegExp = CITATION_REGEX,
280
+ doc: PNode,
320
281
  decsToRemove?: Decoration[],
321
282
  oldDecs?: DecorationSet
322
283
  ) {
323
284
  return function (node: PNode, pos: number): boolean {
324
- if (
325
- node.isText &&
326
- node.text &&
327
- !schema.marks.citation.isInSet(node.marks)
328
- ) {
285
+ const resolvedPos: ResolvedPos = doc.resolve(pos);
286
+ const link = findParentNodeOfTypeClosestToPos(
287
+ resolvedPos,
288
+ schema.nodes.link
289
+ );
290
+ if (node.isText && node.text && !link) {
329
291
  if (decsToRemove && oldDecs) {
330
292
  decsToRemove.push(
331
293
  ...oldDecs.find(
@@ -8,12 +8,13 @@ export function citedText(
8
8
  title: string,
9
9
  uri: string
10
10
  ): PNode {
11
- return schema.text(title, [
12
- unwrap(schema.marks.citation).create({
11
+ return unwrap(schema.nodes.link).create(
12
+ {
13
13
  href: uri,
14
14
  property: 'eli:cites',
15
15
  typeof: 'eli:LegalExpression',
16
16
  __rdfaId: uuid(),
17
- }),
18
- ]);
17
+ },
18
+ [schema.text(title)]
19
+ );
19
20
  }
@@ -1,5 +1,3 @@
1
- import { WidgetSpec } from '@lblod/ember-rdfa-editor';
2
-
3
1
  export const defaultDateFormats: DateFormat[] = [
4
2
  {
5
3
  label: 'Short Date',
@@ -15,31 +13,6 @@ export const defaultDateFormats: DateFormat[] = [
15
13
  },
16
14
  ];
17
15
 
18
- const defaultOptions = {
19
- formats: defaultDateFormats,
20
- allowCustomFormat: true,
21
- };
22
-
23
- export function rdfaDateCardWidget(options?: DatePluginOptions): WidgetSpec {
24
- return {
25
- componentName: 'rdfa-date-plugin/card',
26
- desiredLocation: 'sidebar',
27
- widgetArgs: {
28
- options: options ? options : defaultOptions,
29
- },
30
- };
31
- }
32
-
33
- export function rdfaDateInsertWidget(options?: DatePluginOptions): WidgetSpec {
34
- return {
35
- componentName: 'rdfa-date-plugin/insert',
36
- desiredLocation: 'insertSidebar',
37
- widgetArgs: {
38
- options: options ? options : defaultOptions,
39
- },
40
- };
41
- }
42
-
43
16
  export type DateFormat = {
44
17
  label: string;
45
18
  key: string;
@@ -47,7 +20,11 @@ export type DateFormat = {
47
20
  dateTimeFormat: string;
48
21
  };
49
22
 
50
- type DatePluginOptions = {
23
+ export type DateOptions = {
24
+ placeholder: {
25
+ insertDate: string;
26
+ insertDateTime: string;
27
+ };
51
28
  formats: DateFormat[];
52
29
  allowCustomFormat: boolean;
53
30
  };
@@ -5,14 +5,9 @@ import {
5
5
  XSD,
6
6
  } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/constants';
7
7
  import { hasRDFaAttribute } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/namespace';
8
+ import { DateOptions } from '..';
8
9
  import { formatDate, validateDateFormat } from '../utils';
9
10
 
10
- export type DateOptions = {
11
- placeholder: {
12
- insertDate: string;
13
- insertDateTime: string;
14
- };
15
- };
16
11
  const date: (options: DateOptions) => NodeSpec = (options) => {
17
12
  return {
18
13
  group: 'inline',
@@ -1,4 +1,3 @@
1
- import { WidgetSpec } from '@lblod/ember-rdfa-editor';
2
1
  import {
3
2
  besluit,
4
3
  title,
@@ -12,11 +11,6 @@ import {
12
11
  besluitArticleStructure,
13
12
  } from './utils/nodes';
14
13
 
15
- export const standardTemplateWidget: WidgetSpec = {
16
- desiredLocation: 'insertSidebar',
17
- componentName: 'standard-template-plugin/card',
18
- };
19
-
20
14
  export const besluitNodes = {
21
15
  besluit,
22
16
  title,
@@ -249,7 +249,7 @@ export const besluit_article_header: NodeSpec = {
249
249
  delete toplevelAttrs.datatype;
250
250
  return [
251
251
  'div',
252
- toplevelAttrs,
252
+ { ...toplevelAttrs, contenteditable: false },
253
253
  'Artikel ',
254
254
  [
255
255
  'span',
@@ -1,10 +1,3 @@
1
- import { WidgetSpec } from '@lblod/ember-rdfa-editor';
2
-
3
1
  export type TableOfContentsConfig = {
4
2
  nodeHierarchy: string[];
5
3
  }[];
6
-
7
- export const tableOfContentsWidget: WidgetSpec = {
8
- componentName: 'table-of-contents-plugin/toolbar-button',
9
- desiredLocation: 'toolbarRight',
10
- };
@@ -57,6 +57,7 @@ export const DEFAULT_VARIABLE_TYPES: Record<string, VariableType> = {
57
57
  return unwrap(
58
58
  schema.nodes.date.createAndFill({
59
59
  mappingResource: `http://data.lblod.info/mappings/${uuidv4()}`,
60
+ value: null,
60
61
  })
61
62
  );
62
63
  },
@@ -7,8 +7,8 @@ import Instruction from '../models/instruction';
7
7
  import Measure from '../models/measure';
8
8
  import Sign from '../models/sign';
9
9
  import { IBindings } from 'fetch-sparql-endpoint';
10
- import { optionMapOr, unwrap } from '@lblod/ember-rdfa-editor/utils/option';
11
10
  import dataFactory from '@rdfjs/data-model';
11
+ import { optionMapOr, unwrap } from '../utils/option';
12
12
 
13
13
  const PREFIXES = `
14
14
  PREFIX ex: <http://example.org#>
@@ -0,0 +1,7 @@
1
+ [typeof="say:Paragraph"] {
2
+ display: flex;
3
+
4
+ [property="eli:number"], [contenteditable="false"], [property="say:body"] {
5
+ margin-top: 0;
6
+ }
7
+ }
@@ -1,3 +1,7 @@
1
1
  .title-alert .au-c-button {
2
2
  padding: 0;
3
+ }
4
+
5
+ .besluit-toolbar-pill {
6
+ padding: 0 1.2rem;
3
7
  }
@@ -46,7 +46,7 @@
46
46
  .ember-node {
47
47
  .variable {
48
48
  [contenteditable] {
49
- white-space: pre-wrap;
49
+ white-space: break-spaces;
50
50
  word-break: break-all;
51
51
  word-wrap: break-word;
52
52
  outline: 0px;
@@ -1,16 +1,15 @@
1
1
  import Component from '@glimmer/component';
2
- import { ProseController } from '@lblod/ember-rdfa-editor';
3
2
  import IntlService from 'ember-intl/services/intl';
4
3
  import { ArticleStructurePluginOptions, StructureSpec } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/article-structure-plugin';
4
+ import { SayController } from '@lblod/ember-rdfa-editor';
5
5
  type Args = {
6
- controller: ProseController;
7
- widgetArgs: {
8
- options: ArticleStructurePluginOptions;
9
- };
6
+ controller: SayController;
7
+ options: ArticleStructurePluginOptions;
10
8
  };
11
9
  export default class EditorPluginsArticleStructureCardComponent extends Component<Args> {
12
10
  intl: IntlService;
13
11
  get structureTypes(): ArticleStructurePluginOptions;
12
+ get controller(): SayController;
14
13
  insertStructure(spec: StructureSpec): void;
15
14
  canInsertStructure: (spec: StructureSpec) => boolean;
16
15
  }
@@ -1,17 +1,15 @@
1
1
  import Component from '@glimmer/component';
2
- import { ProseController } from '@lblod/ember-rdfa-editor';
2
+ import { SayController } from '@lblod/ember-rdfa-editor';
3
3
  import { ArticleStructurePluginOptions } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/article-structure-plugin';
4
4
  import IntlService from 'ember-intl/services/intl';
5
5
  type Args = {
6
- controller: ProseController;
7
- widgetArgs: {
8
- options: ArticleStructurePluginOptions;
9
- };
6
+ controller: SayController;
7
+ options: ArticleStructurePluginOptions;
10
8
  };
11
9
  export default class EditorPluginsStructureCardComponent extends Component<Args> {
12
10
  intl: IntlService;
13
11
  removeStructureContent: boolean;
14
- get controller(): ProseController;
12
+ get controller(): SayController;
15
13
  moveStructure(direction: 'up' | 'down'): void;
16
14
  removeStructure(): void;
17
15
  setRemoveStructureContent(value: boolean): void;
@@ -1,12 +1,12 @@
1
1
  import Component from '@glimmer/component';
2
- import { ProseController } from '@lblod/ember-rdfa-editor';
2
+ import { SayController } from '@lblod/ember-rdfa-editor';
3
3
  import IntlService from 'ember-intl/services/intl';
4
4
  type Args = {
5
- controller: ProseController;
5
+ controller: SayController;
6
6
  };
7
7
  export default class BesluitPluginCardComponent extends Component<Args> {
8
8
  intl: IntlService;
9
- get controller(): ProseController;
9
+ get controller(): SayController;
10
10
  focus(): void;
11
11
  insertTitle(): void;
12
12
  get canInsertTitle(): boolean;
@@ -1,5 +1,5 @@
1
1
  import Component from '@glimmer/component';
2
- import { ProseController } from '@lblod/ember-rdfa-editor/core/prosemirror';
2
+ import { SayController } from '@lblod/ember-rdfa-editor';
3
3
  import CurrentSessionService from '@lblod/frontend-gelinkt-notuleren/services/current-session';
4
4
  import { ResolvedPNode } from '@lblod/ember-rdfa-editor/plugins/datastore';
5
5
  import { BesluitType } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/besluit-type-plugin/utils/fetchBesluitTypes';
@@ -9,7 +9,7 @@ declare module 'ember__owner' {
9
9
  }
10
10
  }
11
11
  type Args = {
12
- controller: ProseController;
12
+ controller: SayController;
13
13
  };
14
14
  export default class EditorPluginsToolbarDropdownComponent extends Component<Args> {
15
15
  currentSession: CurrentSessionService;
@@ -26,7 +26,7 @@ export default class EditorPluginsToolbarDropdownComponent extends Component<Arg
26
26
  subSubBesluit?: BesluitType;
27
27
  cardExpanded: boolean;
28
28
  constructor(parent: unknown, args: Args);
29
- get controller(): ProseController;
29
+ get controller(): SayController;
30
30
  get doc(): import("prosemirror-model").Node;
31
31
  types: import("ember-resources/util/function").State<BesluitType[]>;
32
32
  get currentBesluitRange(): ResolvedPNode | undefined;
@@ -2,12 +2,10 @@ import Component from '@glimmer/component';
2
2
  import { Article, Decision } from '../../plugins/citation-plugin/utils/vlaamse-codex';
3
3
  import { Option } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/option';
4
4
  import { CitationDecoration, CitationPlugin } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/citation-plugin';
5
- import { ProseController } from '@lblod/ember-rdfa-editor';
5
+ import { SayController } from '@lblod/ember-rdfa-editor';
6
6
  interface Args {
7
- controller: ProseController;
8
- widgetArgs: {
9
- plugin: CitationPlugin;
10
- };
7
+ controller: SayController;
8
+ plugin: CitationPlugin;
11
9
  }
12
10
  export default class CitationCardComponent extends Component<Args> {
13
11
  pageNumber: number;
@@ -20,13 +18,14 @@ export default class CitationCardComponent extends Component<Args> {
20
18
  decision: Decision | null;
21
19
  cardText: string | null;
22
20
  cardLegislationType: string | null;
23
- get controller(): ProseController;
21
+ documentLegislationType: Option<string>;
22
+ documentText: Option<string>;
23
+ update(): void;
24
+ get controller(): SayController;
24
25
  get showCard(): false | Option<CitationDecoration>;
25
26
  get plugin(): CitationPlugin;
26
27
  get decorations(): import("prosemirror-view").DecorationSet | undefined;
27
28
  get activeDecoration(): Option<CitationDecoration>;
28
- get documentLegislationType(): Option<string>;
29
- get documentText(): Option<string>;
30
29
  get searchText(): string;
31
30
  get legislationTypes(): string[];
32
31
  get selectedLegislationType(): {
@@ -1,13 +1,10 @@
1
1
  import Component from '@glimmer/component';
2
- import { ProseController } from '@lblod/ember-rdfa-editor';
2
+ import { SayController } from '@lblod/ember-rdfa-editor';
3
3
  import { Article, Decision } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/citation-plugin/utils/vlaamse-codex';
4
- import { CitationPlugin, CitationPluginConfig } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/citation-plugin';
4
+ import { CitationPluginConfig } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/citation-plugin';
5
5
  interface Args {
6
- controller: ProseController;
7
- widgetArgs: {
8
- plugin: CitationPlugin;
9
- config: CitationPluginConfig;
10
- };
6
+ controller: SayController;
7
+ config: CitationPluginConfig;
11
8
  }
12
9
  export default class EditorPluginsCitationInsertComponent extends Component<Args> {
13
10
  showModal: boolean;
@@ -22,9 +19,7 @@ export default class EditorPluginsCitationInsertComponent extends Component<Args
22
19
  };
23
20
  selectLegislationType(type: string): void;
24
21
  get disableInsert(): boolean;
25
- get plugin(): CitationPlugin;
26
- get activeRanges(): [number, number][] | undefined;
27
- get controller(): ProseController;
22
+ get controller(): SayController;
28
23
  openModal(): void;
29
24
  closeModal(): void;
30
25
  insertDecisionCitation(decision: Decision): void;
@@ -1,13 +1,13 @@
1
1
  import Component from '@glimmer/component';
2
- import { ProseController } from '@lblod/ember-rdfa-editor/core/prosemirror';
2
+ import { SayController } from '@lblod/ember-rdfa-editor';
3
3
  import ImportRdfaSnippet from '@lblod/ember-rdfa-editor-lblod-plugins/services/import-rdfa-snippet';
4
4
  import { RdfaSnippet } from '@lblod/ember-rdfa-editor-lblod-plugins/services/import-rdfa-snippet';
5
5
  type Args = {
6
- controller: ProseController;
6
+ controller: SayController;
7
7
  };
8
8
  export default class ImportSnippetPluginCard extends Component<Args> {
9
9
  importRdfaSnippet: ImportRdfaSnippet;
10
- get controller(): ProseController;
10
+ get controller(): SayController;
11
11
  get snippets(): RdfaSnippet[];
12
12
  get insertRange(): import("prosemirror-state").Selection | {
13
13
  from: number;
@@ -1,25 +1,20 @@
1
1
  import Component from '@glimmer/component';
2
- import { ProseController } from '@lblod/ember-rdfa-editor/core/prosemirror';
2
+ import { SayController } from '@lblod/ember-rdfa-editor';
3
3
  import { PNode } from '@lblod/ember-rdfa-editor';
4
- import { DateFormat } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/rdfa-date-plugin';
4
+ import { DateFormat, DateOptions } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/rdfa-date-plugin';
5
5
  import { ValidationError } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/rdfa-date-plugin/utils';
6
6
  import IntlService from 'ember-intl/services/intl';
7
7
  import { Option } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/option';
8
8
  type Args = {
9
- controller: ProseController;
10
- widgetArgs: {
11
- options: {
12
- formats: [DateFormat];
13
- allowCustomFormat: boolean;
14
- };
15
- };
9
+ controller: SayController;
10
+ options: DateOptions;
16
11
  };
17
12
  export default class RdfaDatePluginCardComponent extends Component<Args> {
18
13
  intl: IntlService;
19
14
  helpModalOpen: boolean;
20
15
  tooltipOpen: boolean;
21
16
  get formats(): DateFormat[];
22
- get controller(): ProseController;
17
+ get controller(): SayController;
23
18
  get selection(): import("prosemirror-state").Selection;
24
19
  get selectedDateNode(): Option<PNode>;
25
20
  get documentDate(): Option<Date>;
@@ -33,7 +28,7 @@ export default class RdfaDatePluginCardComponent extends Component<Args> {
33
28
  get dateFormatType(): string;
34
29
  get customDateFormatError(): ValidationError | null;
35
30
  get humanError(): string | null;
36
- get pickerDate(): Date;
31
+ get pickerDate(): Option<Date>;
37
32
  showTooltip(): void;
38
33
  hideTooltip(): void;
39
34
  changeDate(date: Date): void;
@@ -1,22 +1,16 @@
1
1
  import Component from '@glimmer/component';
2
- import { ProseController } from '@lblod/ember-rdfa-editor/core/prosemirror';
3
- import { DateFormat } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/rdfa-date-plugin';
2
+ import { SayController } from '@lblod/ember-rdfa-editor';
3
+ import { DateFormat, DateOptions } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/rdfa-date-plugin';
4
4
  import { Option } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/option';
5
5
  type Args = {
6
- controller: ProseController;
7
- widgetArgs: {
8
- options: {
9
- formats: [DateFormat];
10
- allowCustomFormat: boolean;
11
- };
12
- };
6
+ controller: SayController;
7
+ options: DateOptions;
13
8
  };
14
9
  export default class RdfaDatePluginInsertComponent extends Component<Args> {
15
- get controller(): ProseController;
10
+ get controller(): SayController;
16
11
  get schema(): import("prosemirror-model").Schema<any, any>;
17
12
  get formats(): DateFormat[];
18
13
  get defaultDateFormat(): Option<string>;
19
- get defaultDateTimeFormat(): Option<string>;
20
- insertDate(onlyDate: boolean): void;
14
+ insertDate(): void;
21
15
  }
22
16
  export {};
@@ -1,13 +1,13 @@
1
1
  import Component from '@glimmer/component';
2
- import { ProseController } from '@lblod/ember-rdfa-editor/core/prosemirror';
2
+ import { SayController } from '@lblod/ember-rdfa-editor';
3
3
  type Args = {
4
- controller: ProseController;
4
+ controller: SayController;
5
5
  };
6
6
  export default class RoadsignRegulationCard extends Component<Args> {
7
7
  modalOpen: boolean;
8
8
  openModal(): void;
9
9
  closeModal(): void;
10
- get controller(): ProseController;
10
+ get controller(): SayController;
11
11
  get schema(): import("prosemirror-model").Schema<any, any>;
12
12
  get showCard(): boolean;
13
13
  }