@lblod/ember-rdfa-editor-lblod-plugins 18.0.0 → 18.1.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/CHANGELOG.md +12 -0
- package/addon/components/common/search/loading.hbs +2 -3
- package/addon/components/snippet-plugin/nodes/placeholder.gts +28 -0
- package/addon/components/snippet-plugin/snippet-insert-placeholder.gts +69 -0
- package/addon/components/snippet-plugin/snippet-list/snippet-list-modal.ts +14 -11
- package/addon/components/snippet-plugin/snippet-list-select-rdfa.ts +2 -5
- package/addon/components/snippet-plugin/snippet-list-select.ts +7 -6
- package/addon/components/standard-template-plugin/template-provider.ts +10 -2
- package/addon/components/variable-plugin/address/nodeview.hbs +1 -1
- package/addon/components/variable-plugin/address/nodeview.ts +1 -14
- package/addon/components/variable-plugin/date/nodeview.hbs +6 -2
- package/addon/components/variable-plugin/date/nodeview.ts +0 -14
- package/addon/plugins/snippet-plugin/nodes/snippet-placeholder.ts +93 -0
- package/app/components/snippet-plugin/nodes/placeholder.js +1 -0
- package/app/components/snippet-plugin/snippet-insert-placeholder.js +1 -0
- package/app/styles/snippet-plugin.scss +4 -0
- package/declarations/addon/components/snippet-plugin/nodes/placeholder.d.ts +8 -0
- package/declarations/addon/components/snippet-plugin/snippet-insert-placeholder.d.ts +17 -0
- package/declarations/addon/components/snippet-plugin/snippet-list/snippet-list-modal.d.ts +10 -8
- package/declarations/addon/components/snippet-plugin/snippet-list-select-rdfa.d.ts +1 -1
- package/declarations/addon/components/snippet-plugin/snippet-list-select.d.ts +7 -6
- package/declarations/addon/components/variable-plugin/address/nodeview.d.ts +0 -1
- package/declarations/addon/components/variable-plugin/date/nodeview.d.ts +0 -1
- package/declarations/addon/plugins/snippet-plugin/nodes/snippet-placeholder.d.ts +4 -0
- package/package.json +8 -8
- package/pnpm-lock.yaml +15 -100
- package/translations/en-US.yaml +4 -0
- package/translations/nl-BE.yaml +4 -0
- package/types/ember-truth-helpers/helpers/and.d.ts +80 -0
- package/types/ember-truth-helpers/helpers/eq.d.ts +2 -0
- package/types/ember-truth-helpers/helpers/not.d.ts +15 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @lblod/ember-rdfa-editor-lblod-plugins
|
|
2
2
|
|
|
3
|
+
## 18.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#419](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/pull/419) [`05c46c06c426141b73420c240834cdaf7e52a095`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/05c46c06c426141b73420c240834cdaf7e52a095) Thanks [@piemonkey](https://github.com/piemonkey)! - Add Snippet Placeholder component to signal the intended location for snippets to be inserted
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- [`e2cdeff70e8364b643d10355fa9de55c5a078ede`](https://github.com/lblod/ember-rdfa-editor-lblod-plugins/commit/e2cdeff70e8364b643d10355fa9de55c5a078ede) Thanks [@abeforgit](https://github.com/abeforgit)! - Fix template node lookup
|
|
12
|
+
|
|
13
|
+
The template card could not determine it was already in a decision node, due to the attribute comparison function being passed the node instead of the node's attrs
|
|
14
|
+
|
|
3
15
|
## 18.0.0
|
|
4
16
|
|
|
5
17
|
### Major Changes
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { on } from '@ember/modifier';
|
|
3
|
+
import t from 'ember-intl/helpers/t';
|
|
4
|
+
import AuAlert from '@appuniversum/ember-appuniversum/components/au-alert';
|
|
5
|
+
import { PlusTextIcon } from '@appuniversum/ember-appuniversum/components/icons/plus-text';
|
|
6
|
+
import { type EmberNodeArgs } from '@lblod/ember-rdfa-editor/utils/_private/ember-node';
|
|
7
|
+
|
|
8
|
+
interface Signature {
|
|
9
|
+
Args: EmberNodeArgs;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// We don't have a way to type template only components without ember-source 5, so create an empty
|
|
13
|
+
// class to allow for type checking
|
|
14
|
+
// eslint-disable-next-line ember/no-empty-glimmer-component-classes
|
|
15
|
+
export default class SnippetPluginPlaceholder extends Component<Signature> {
|
|
16
|
+
<template>
|
|
17
|
+
<AuAlert
|
|
18
|
+
@title={{t 'snippet-plugin.placeholder.title'}}
|
|
19
|
+
@skin='warning'
|
|
20
|
+
@icon={{PlusTextIcon}}
|
|
21
|
+
@size='small'
|
|
22
|
+
class='say-snippet-placeholder'
|
|
23
|
+
{{on 'click' @selectNode}}
|
|
24
|
+
>
|
|
25
|
+
{{t 'snippet-plugin.placeholder.text'}}
|
|
26
|
+
</AuAlert>
|
|
27
|
+
</template>
|
|
28
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
import { on } from '@ember/modifier';
|
|
2
|
+
import { action } from '@ember/object';
|
|
3
|
+
import Component from '@glimmer/component';
|
|
4
|
+
import { tracked } from '@glimmer/tracking';
|
|
5
|
+
import t from 'ember-intl/helpers/t';
|
|
6
|
+
import not from 'ember-truth-helpers/helpers/not';
|
|
7
|
+
import AuButton from '@appuniversum/ember-appuniversum/components/au-button';
|
|
8
|
+
import { AddIcon } from '@appuniversum/ember-appuniversum/components/icons/add';
|
|
9
|
+
import { type NodeType, type SayController } from '@lblod/ember-rdfa-editor';
|
|
10
|
+
import { type SnippetPluginConfig } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/snippet-plugin';
|
|
11
|
+
import { createSnippetPlaceholder } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/snippet-plugin/nodes/snippet-placeholder';
|
|
12
|
+
import SnippetListModal from '@lblod/ember-rdfa-editor-lblod-plugins/components/snippet-plugin/snippet-list/snippet-list-modal';
|
|
13
|
+
|
|
14
|
+
interface Signature {
|
|
15
|
+
Args: {
|
|
16
|
+
controller: SayController;
|
|
17
|
+
config: SnippetPluginConfig;
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
const empty: string[] = [];
|
|
21
|
+
export default class SnippetPluginSnippetInsertPlaceholder extends Component<Signature> {
|
|
22
|
+
@tracked isModalOpen = false;
|
|
23
|
+
|
|
24
|
+
get placeholderNode() {
|
|
25
|
+
return this.args.controller.schema.nodes['snippet_placeholder'] as
|
|
26
|
+
| NodeType
|
|
27
|
+
| undefined;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
@action openModal() {
|
|
31
|
+
this.isModalOpen = true;
|
|
32
|
+
}
|
|
33
|
+
@action closeModal() {
|
|
34
|
+
this.isModalOpen = false;
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
@action
|
|
38
|
+
insertPlaceholder(listIds: string[]) {
|
|
39
|
+
const node = createSnippetPlaceholder(listIds, this.args.controller.schema);
|
|
40
|
+
|
|
41
|
+
this.args.controller.withTransaction(
|
|
42
|
+
(tr) => {
|
|
43
|
+
return tr.replaceSelectionWith(node);
|
|
44
|
+
},
|
|
45
|
+
{ view: this.args.controller.mainEditorView },
|
|
46
|
+
);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
<template>
|
|
50
|
+
<li class='au-c-list__item'>
|
|
51
|
+
<AuButton
|
|
52
|
+
@icon={{AddIcon}}
|
|
53
|
+
@iconAlignment='left'
|
|
54
|
+
@skin='link'
|
|
55
|
+
@disabled={{(not this.placeholderNode)}}
|
|
56
|
+
{{on 'click' this.openModal}}
|
|
57
|
+
>
|
|
58
|
+
{{t 'snippet-plugin.insert.placeholder'}}
|
|
59
|
+
</AuButton>
|
|
60
|
+
</li>
|
|
61
|
+
<SnippetListModal
|
|
62
|
+
@config={{@config}}
|
|
63
|
+
@assignedSnippetListsIds={{empty}}
|
|
64
|
+
@onSaveSnippetListIds={{this.insertPlaceholder}}
|
|
65
|
+
@open={{this.isModalOpen}}
|
|
66
|
+
@closeModal={{this.closeModal}}
|
|
67
|
+
/>
|
|
68
|
+
</template>
|
|
69
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import { action } from '@ember/object';
|
|
3
|
-
import { restartableTask,
|
|
3
|
+
import { restartableTask, timeout } from 'ember-concurrency';
|
|
4
4
|
import { task as trackedTask } from 'ember-resources/util/ember-concurrency';
|
|
5
5
|
|
|
6
6
|
import { tracked } from '@glimmer/tracking';
|
|
@@ -16,14 +16,17 @@ import {
|
|
|
16
16
|
} from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/snippet-plugin';
|
|
17
17
|
import { trackedReset } from 'tracked-toolbox';
|
|
18
18
|
|
|
19
|
-
interface
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
19
|
+
interface Signature {
|
|
20
|
+
Args: {
|
|
21
|
+
config: SnippetPluginConfig;
|
|
22
|
+
onSaveSnippetListIds: (listIds: string[]) => void;
|
|
23
|
+
assignedSnippetListsIds: string[];
|
|
24
|
+
closeModal: () => void;
|
|
25
|
+
open: boolean;
|
|
26
|
+
};
|
|
24
27
|
}
|
|
25
28
|
|
|
26
|
-
export default class SnippetListModalComponent extends Component<
|
|
29
|
+
export default class SnippetListModalComponent extends Component<Signature> {
|
|
27
30
|
// Filtering
|
|
28
31
|
@tracked nameFilterText: string | null = null;
|
|
29
32
|
|
|
@@ -46,11 +49,11 @@ export default class SnippetListModalComponent extends Component<Args> {
|
|
|
46
49
|
}
|
|
47
50
|
|
|
48
51
|
@action
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
await this.args.onSaveSnippetListIds.perform(this.assignedSnippetListsIds);
|
|
52
|
+
saveAndClose() {
|
|
53
|
+
this.args.onSaveSnippetListIds(this.assignedSnippetListsIds);
|
|
53
54
|
this.args.closeModal();
|
|
55
|
+
// Clear selection for next time
|
|
56
|
+
this.assignedSnippetListsIds = [];
|
|
54
57
|
}
|
|
55
58
|
|
|
56
59
|
snippetListSearch = restartableTask(async () => {
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
-
import { task } from 'ember-concurrency';
|
|
3
2
|
|
|
4
3
|
import { isResourceNode } from '@lblod/ember-rdfa-editor/utils/node-utils';
|
|
5
4
|
|
|
@@ -50,7 +49,7 @@ export default class SnippetListSelectRdfaComponent extends Component<Args> {
|
|
|
50
49
|
);
|
|
51
50
|
}
|
|
52
51
|
|
|
53
|
-
saveChanges =
|
|
52
|
+
saveChanges = (snippetIds: string[]) => {
|
|
54
53
|
if (this.currentResource) {
|
|
55
54
|
this.args.controller?.doCommand(
|
|
56
55
|
updateSnippetIds({
|
|
@@ -63,7 +62,5 @@ export default class SnippetListSelectRdfaComponent extends Component<Args> {
|
|
|
63
62
|
},
|
|
64
63
|
);
|
|
65
64
|
}
|
|
66
|
-
|
|
67
|
-
await new Promise((resolve) => setTimeout(resolve, 0));
|
|
68
|
-
});
|
|
65
|
+
};
|
|
69
66
|
}
|
|
@@ -1,18 +1,19 @@
|
|
|
1
1
|
import { action } from '@ember/object';
|
|
2
|
-
import { Task } from 'ember-concurrency';
|
|
3
2
|
import Component from '@glimmer/component';
|
|
4
3
|
import { tracked } from '@glimmer/tracking';
|
|
5
4
|
import { UnorderedListIcon } from '@appuniversum/ember-appuniversum/components/icons/unordered-list';
|
|
6
5
|
|
|
7
6
|
import { SnippetPluginConfig } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/snippet-plugin';
|
|
8
7
|
|
|
9
|
-
interface
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
8
|
+
interface Signature {
|
|
9
|
+
Args: {
|
|
10
|
+
config: SnippetPluginConfig;
|
|
11
|
+
assignedSnippetListsIds: string[];
|
|
12
|
+
onSaveSnippetListIds: (listIds: string[]) => void;
|
|
13
|
+
};
|
|
13
14
|
}
|
|
14
15
|
|
|
15
|
-
export default class SnippetListSelectComponent extends Component<
|
|
16
|
+
export default class SnippetListSelectComponent extends Component<Signature> {
|
|
16
17
|
UnorderedListIcon = UnorderedListIcon;
|
|
17
18
|
@tracked showModal = false;
|
|
18
19
|
|
|
@@ -70,7 +70,11 @@ export default class TemplateProviderComponent extends Component<Args> {
|
|
|
70
70
|
}) ||
|
|
71
71
|
findAncestors($from, (node) => {
|
|
72
72
|
return template.contexts.some((type) =>
|
|
73
|
-
hasOutgoingNamedNodeTriple(
|
|
73
|
+
hasOutgoingNamedNodeTriple(
|
|
74
|
+
node.attrs,
|
|
75
|
+
RDF('type'),
|
|
76
|
+
HACKY_LOOKUP[type],
|
|
77
|
+
),
|
|
74
78
|
);
|
|
75
79
|
}).length;
|
|
76
80
|
const containsDisabledTypes =
|
|
@@ -81,7 +85,11 @@ export default class TemplateProviderComponent extends Component<Args> {
|
|
|
81
85
|
}) ||
|
|
82
86
|
findAncestors($from, (node) => {
|
|
83
87
|
return template.disabledInContexts.some((type) =>
|
|
84
|
-
hasOutgoingNamedNodeTriple(
|
|
88
|
+
hasOutgoingNamedNodeTriple(
|
|
89
|
+
node.attrs,
|
|
90
|
+
RDF('type'),
|
|
91
|
+
HACKY_LOOKUP[type],
|
|
92
|
+
),
|
|
85
93
|
);
|
|
86
94
|
}).length;
|
|
87
95
|
|
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
-
import { action } from '@ember/object';
|
|
3
2
|
import { service } from '@ember/service';
|
|
4
3
|
import IntlService from 'ember-intl/services/intl';
|
|
5
4
|
import { PencilIcon } from '@appuniversum/ember-appuniversum/components/icons/pencil';
|
|
6
5
|
|
|
7
|
-
import {
|
|
6
|
+
import { PNode, SayController } from '@lblod/ember-rdfa-editor';
|
|
8
7
|
import { Address } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/variable-plugin/variables/address';
|
|
9
8
|
import { getOutgoingTriple } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/namespace';
|
|
10
9
|
import { EXT } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/constants';
|
|
@@ -47,16 +46,4 @@ export default class AddressNodeviewComponent extends Component<Args> {
|
|
|
47
46
|
get label() {
|
|
48
47
|
return getOutgoingTriple(this.node.attrs, EXT('label'))?.object.value;
|
|
49
48
|
}
|
|
50
|
-
|
|
51
|
-
@action
|
|
52
|
-
selectThisNode() {
|
|
53
|
-
const tr = this.args.controller.activeEditorState.tr;
|
|
54
|
-
tr.setSelection(
|
|
55
|
-
NodeSelection.create(
|
|
56
|
-
this.args.controller.activeEditorState.doc,
|
|
57
|
-
this.args.getPos() as number,
|
|
58
|
-
),
|
|
59
|
-
);
|
|
60
|
-
this.args.controller.activeEditorView.dispatch(tr);
|
|
61
|
-
}
|
|
62
49
|
}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
{{! @glint-nocheck: not typesafe yet }}
|
|
2
|
-
<AuPill
|
|
3
|
-
|
|
2
|
+
<AuPill
|
|
3
|
+
@icon={{this.PencilIcon}}
|
|
4
|
+
@iconAlignment="right"
|
|
5
|
+
class="variable atomic"
|
|
6
|
+
{{on 'click' @selectNode}}
|
|
7
|
+
>
|
|
4
8
|
{{this.humanReadableDate}}
|
|
5
9
|
{{#if this.label}}
|
|
6
10
|
<span class="label">
|
|
@@ -1,12 +1,10 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
2
|
import {
|
|
3
3
|
DecorationSource,
|
|
4
|
-
NodeSelection,
|
|
5
4
|
PNode,
|
|
6
5
|
SayController,
|
|
7
6
|
SayView,
|
|
8
7
|
} from '@lblod/ember-rdfa-editor';
|
|
9
|
-
import { action } from '@ember/object';
|
|
10
8
|
import IntlService from 'ember-intl/services/intl';
|
|
11
9
|
import { service } from '@ember/service';
|
|
12
10
|
import {
|
|
@@ -40,18 +38,6 @@ export default class DateNodeviewComponent extends Component<Args> {
|
|
|
40
38
|
return this.controller.documentLanguage;
|
|
41
39
|
}
|
|
42
40
|
|
|
43
|
-
@action
|
|
44
|
-
onClick() {
|
|
45
|
-
const tr = this.args.controller.activeEditorState.tr;
|
|
46
|
-
tr.setSelection(
|
|
47
|
-
NodeSelection.create(
|
|
48
|
-
this.args.controller.activeEditorState.doc,
|
|
49
|
-
this.args.getPos() as number,
|
|
50
|
-
),
|
|
51
|
-
);
|
|
52
|
-
this.args.controller.activeEditorView.dispatch(tr);
|
|
53
|
-
}
|
|
54
|
-
|
|
55
41
|
get humanReadableDate() {
|
|
56
42
|
const value = getOutgoingTriple(this.args.node.attrs, EXT('content'))
|
|
57
43
|
?.object.value;
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import { v4 as uuidv4 } from 'uuid';
|
|
2
|
+
import {
|
|
3
|
+
getRdfaAttrs,
|
|
4
|
+
rdfaAttrSpec,
|
|
5
|
+
type Schema,
|
|
6
|
+
} from '@lblod/ember-rdfa-editor';
|
|
7
|
+
import { renderRdfaAware } from '@lblod/ember-rdfa-editor/core/schema';
|
|
8
|
+
import { sayDataFactory } from '@lblod/ember-rdfa-editor/core/say-data-factory';
|
|
9
|
+
import {
|
|
10
|
+
createEmberNodeSpec,
|
|
11
|
+
createEmberNodeView,
|
|
12
|
+
type EmberNodeConfig,
|
|
13
|
+
} from '@lblod/ember-rdfa-editor/utils/ember-node';
|
|
14
|
+
import SnippetPlaceholderComponent from '@lblod/ember-rdfa-editor-lblod-plugins/components/snippet-plugin/nodes/placeholder';
|
|
15
|
+
import {
|
|
16
|
+
EXT,
|
|
17
|
+
RDF,
|
|
18
|
+
} from '@lblod/ember-rdfa-editor-lblod-plugins/utils/constants';
|
|
19
|
+
import { hasOutgoingNamedNodeTriple } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/namespace';
|
|
20
|
+
import { getTranslationFunction } from '@lblod/ember-rdfa-editor-lblod-plugins/utils/translation';
|
|
21
|
+
import { getSnippetUriFromId } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/snippet-plugin';
|
|
22
|
+
import { SNIPPET_LIST_RDFA_PREDICATE } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/snippet-plugin/utils/rdfa-predicate';
|
|
23
|
+
|
|
24
|
+
export function createSnippetPlaceholder(listIds: string[], schema: Schema) {
|
|
25
|
+
const mappingResource = `http://example.net/lblod-snippet-placeholder/${uuidv4()}`;
|
|
26
|
+
|
|
27
|
+
return schema.nodes.snippet_placeholder.create({
|
|
28
|
+
rdfaNodeType: 'resource',
|
|
29
|
+
subject: mappingResource,
|
|
30
|
+
properties: [
|
|
31
|
+
{
|
|
32
|
+
predicate: RDF('type').full,
|
|
33
|
+
object: sayDataFactory.namedNode(EXT('SnippetPlaceholder').full),
|
|
34
|
+
},
|
|
35
|
+
...listIds.map((listId) => ({
|
|
36
|
+
predicate: SNIPPET_LIST_RDFA_PREDICATE.full,
|
|
37
|
+
object: sayDataFactory.namedNode(getSnippetUriFromId(listId)),
|
|
38
|
+
})),
|
|
39
|
+
],
|
|
40
|
+
});
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
const emberNodeConfig: EmberNodeConfig = {
|
|
44
|
+
name: 'snippet_placeholder',
|
|
45
|
+
inline: false,
|
|
46
|
+
group: 'block',
|
|
47
|
+
atom: true,
|
|
48
|
+
selectable: true,
|
|
49
|
+
editable: true,
|
|
50
|
+
attrs: {
|
|
51
|
+
...rdfaAttrSpec({ rdfaAware: true }),
|
|
52
|
+
typeof: { default: EXT('SnippetPlaceholder') },
|
|
53
|
+
},
|
|
54
|
+
component: SnippetPlaceholderComponent,
|
|
55
|
+
serialize(node, editorState) {
|
|
56
|
+
const t = getTranslationFunction(editorState);
|
|
57
|
+
return renderRdfaAware({
|
|
58
|
+
renderable: node,
|
|
59
|
+
tag: 'div',
|
|
60
|
+
attrs: node.attrs,
|
|
61
|
+
content: [
|
|
62
|
+
'div',
|
|
63
|
+
{},
|
|
64
|
+
t(
|
|
65
|
+
'snippet-plugin.insert.placeholder',
|
|
66
|
+
'Plaatshouder voor fragment invoegen',
|
|
67
|
+
),
|
|
68
|
+
],
|
|
69
|
+
});
|
|
70
|
+
},
|
|
71
|
+
parseDOM: [
|
|
72
|
+
{
|
|
73
|
+
tag: 'div',
|
|
74
|
+
getAttrs(node) {
|
|
75
|
+
if (typeof node === 'string') return false;
|
|
76
|
+
const rdfaAttrs = getRdfaAttrs(node, { rdfaAware: true });
|
|
77
|
+
if (
|
|
78
|
+
hasOutgoingNamedNodeTriple(
|
|
79
|
+
rdfaAttrs,
|
|
80
|
+
RDF('type'),
|
|
81
|
+
EXT('SnippetPlaceholder'),
|
|
82
|
+
)
|
|
83
|
+
) {
|
|
84
|
+
return rdfaAttrs;
|
|
85
|
+
}
|
|
86
|
+
return false;
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
],
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
export const snippetPlaceholder = createEmberNodeSpec(emberNodeConfig);
|
|
93
|
+
export const snippetPlaceholderView = createEmberNodeView(emberNodeConfig);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/snippet-plugin/nodes/placeholder';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { default } from '@lblod/ember-rdfa-editor-lblod-plugins/components/snippet-plugin/snippet-insert-placeholder';
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { type EmberNodeArgs } from '@lblod/ember-rdfa-editor/utils/_private/ember-node';
|
|
3
|
+
interface Signature {
|
|
4
|
+
Args: EmberNodeArgs;
|
|
5
|
+
}
|
|
6
|
+
export default class SnippetPluginPlaceholder extends Component<Signature> {
|
|
7
|
+
}
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import Component from '@glimmer/component';
|
|
2
|
+
import { type NodeType, type SayController } from '@lblod/ember-rdfa-editor';
|
|
3
|
+
import { type SnippetPluginConfig } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/snippet-plugin';
|
|
4
|
+
interface Signature {
|
|
5
|
+
Args: {
|
|
6
|
+
controller: SayController;
|
|
7
|
+
config: SnippetPluginConfig;
|
|
8
|
+
};
|
|
9
|
+
}
|
|
10
|
+
export default class SnippetPluginSnippetInsertPlaceholder extends Component<Signature> {
|
|
11
|
+
isModalOpen: boolean;
|
|
12
|
+
get placeholderNode(): NodeType | undefined;
|
|
13
|
+
openModal(): void;
|
|
14
|
+
closeModal(): void;
|
|
15
|
+
insertPlaceholder(listIds: string[]): void;
|
|
16
|
+
}
|
|
17
|
+
export {};
|
|
@@ -1,21 +1,23 @@
|
|
|
1
1
|
import Component from '@glimmer/component';
|
|
2
|
-
import { Task } from 'ember-concurrency';
|
|
3
2
|
import { OrderBy } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/snippet-plugin/utils/fetch-data';
|
|
4
3
|
import { SnippetPluginConfig, SnippetList } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/snippet-plugin';
|
|
5
|
-
interface
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
4
|
+
interface Signature {
|
|
5
|
+
Args: {
|
|
6
|
+
config: SnippetPluginConfig;
|
|
7
|
+
onSaveSnippetListIds: (listIds: string[]) => void;
|
|
8
|
+
assignedSnippetListsIds: string[];
|
|
9
|
+
closeModal: () => void;
|
|
10
|
+
open: boolean;
|
|
11
|
+
};
|
|
10
12
|
}
|
|
11
|
-
export default class SnippetListModalComponent extends Component<
|
|
13
|
+
export default class SnippetListModalComponent extends Component<Signature> {
|
|
12
14
|
nameFilterText: string | null;
|
|
13
15
|
sort: OrderBy;
|
|
14
16
|
error: unknown;
|
|
15
17
|
assignedSnippetListsIds: string[];
|
|
16
18
|
get config(): SnippetPluginConfig;
|
|
17
19
|
closeModal(): void;
|
|
18
|
-
saveAndClose():
|
|
20
|
+
saveAndClose(): void;
|
|
19
21
|
snippetListSearch: import("ember-concurrency").TaskForAsyncTaskFunction<unknown, () => Promise<SnippetList[]>>;
|
|
20
22
|
snippetListResource: import("ember-resources/util/ember-concurrency").TaskInstance<SnippetList[]>;
|
|
21
23
|
onChange(assignedSnippetListsIds: string[]): void;
|
|
@@ -16,6 +16,6 @@ export default class SnippetListSelectRdfaComponent extends Component<Args> {
|
|
|
16
16
|
get isResourceNode(): boolean;
|
|
17
17
|
get snippetListIdsProperties(): OutgoingTriple[];
|
|
18
18
|
get assignedSnippetListsIds(): string[];
|
|
19
|
-
saveChanges:
|
|
19
|
+
saveChanges: (snippetIds: string[]) => void;
|
|
20
20
|
}
|
|
21
21
|
export {};
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import { Task } from 'ember-concurrency';
|
|
2
1
|
import Component from '@glimmer/component';
|
|
3
2
|
import { SnippetPluginConfig } from '@lblod/ember-rdfa-editor-lblod-plugins/plugins/snippet-plugin';
|
|
4
|
-
interface
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
3
|
+
interface Signature {
|
|
4
|
+
Args: {
|
|
5
|
+
config: SnippetPluginConfig;
|
|
6
|
+
assignedSnippetListsIds: string[];
|
|
7
|
+
onSaveSnippetListIds: (listIds: string[]) => void;
|
|
8
|
+
};
|
|
8
9
|
}
|
|
9
|
-
export default class SnippetListSelectComponent extends Component<
|
|
10
|
+
export default class SnippetListSelectComponent extends Component<Signature> {
|
|
10
11
|
UnorderedListIcon: TOC<import("@appuniversum/ember-appuniversum/components/icons/unordered-list").UnorderedListIconSignature>;
|
|
11
12
|
showModal: boolean;
|
|
12
13
|
openModal(): void;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type Schema } from '@lblod/ember-rdfa-editor';
|
|
2
|
+
export declare function createSnippetPlaceholder(listIds: string[], schema: Schema): import("prosemirror-model").Node;
|
|
3
|
+
export declare const snippetPlaceholder: import("@lblod/ember-rdfa-editor/core/say-node-spec").default;
|
|
4
|
+
export declare const snippetPlaceholderView: (controller: import("@lblod/ember-rdfa-editor").SayController) => import("@lblod/ember-rdfa-editor/utils/ember-node").SayNodeViewConstructor;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lblod/ember-rdfa-editor-lblod-plugins",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.1.0",
|
|
4
4
|
"description": "Ember addon providing lblod specific plugins for the ember-rdfa-editor",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ember-addon",
|
|
@@ -31,17 +31,17 @@
|
|
|
31
31
|
},
|
|
32
32
|
"scripts": {
|
|
33
33
|
"build": "ember build --environment=production",
|
|
34
|
-
"lint": "
|
|
35
|
-
"lint:fix": "
|
|
34
|
+
"lint": "concurrently --group \"pnpm:lint:*(!fix)\"",
|
|
35
|
+
"lint:fix": "concurrently --group \"pnpm:lint:*:fix\"",
|
|
36
36
|
"lint:hbs": "ember-template-lint .",
|
|
37
37
|
"lint:hbs:fix": "ember-template-lint . --fix",
|
|
38
38
|
"lint:js": "eslint . --cache",
|
|
39
39
|
"lint:js:fix": "eslint . --fix",
|
|
40
40
|
"lint:types": "glint",
|
|
41
|
-
"start": "concurrently -c \"auto\" -P \"
|
|
41
|
+
"start": "concurrently -c \"auto\" -P \"pnpm:serve {@}\" \"pnpm:typecheck\" --",
|
|
42
42
|
"typecheck": "glint --watch --preserveWatchOutput",
|
|
43
43
|
"serve": "ember serve",
|
|
44
|
-
"test": "
|
|
44
|
+
"test": "concurrently --group pnpm:lint pnpm:test:*",
|
|
45
45
|
"test:ember": "ember test",
|
|
46
46
|
"test:ember-compatibility": "ember try:each",
|
|
47
47
|
"release": "release-it",
|
|
@@ -70,6 +70,7 @@
|
|
|
70
70
|
"ember-mu-transform-helpers": "^2.0.0",
|
|
71
71
|
"ember-resources": "^6.1.1",
|
|
72
72
|
"ember-template-imports": "^3.4.2",
|
|
73
|
+
"ember-truth-helpers": "^3.0.0",
|
|
73
74
|
"ember-velcro": "^2.1.0",
|
|
74
75
|
"fetch-sparql-endpoint": "^3.0.0",
|
|
75
76
|
"n2words": "^1.18.0",
|
|
@@ -97,7 +98,7 @@
|
|
|
97
98
|
"@glint/template": "^1.4.0",
|
|
98
99
|
"@graphy/content.ttl.write": "^4.3.7",
|
|
99
100
|
"@graphy/memory.dataset.fast": "4.3.3",
|
|
100
|
-
"@lblod/ember-rdfa-editor": "
|
|
101
|
+
"@lblod/ember-rdfa-editor": "9.7.1-dev.67f7224891c720868d2e8ef0e92ce46d76959257",
|
|
101
102
|
"@rdfjs/types": "^1.1.0",
|
|
102
103
|
"@release-it/keep-a-changelog": "^3.1.0",
|
|
103
104
|
"@tsconfig/ember": "^3.0.0",
|
|
@@ -163,7 +164,6 @@
|
|
|
163
164
|
"eslint-plugin-prettier": "^5.0.0",
|
|
164
165
|
"eslint-plugin-qunit": "^8.0.1",
|
|
165
166
|
"loader.js": "^4.7.0",
|
|
166
|
-
"npm-run-all": "^4.1.5",
|
|
167
167
|
"prettier": "^3.2.0",
|
|
168
168
|
"prettier-plugin-ember-template-tag": "^2.0.1",
|
|
169
169
|
"prosemirror-dev-tools": "^4.1.0",
|
|
@@ -180,7 +180,7 @@
|
|
|
180
180
|
"@appuniversum/ember-appuniversum": "^3.4.1",
|
|
181
181
|
"@ember/string": "3.x",
|
|
182
182
|
"@glint/template": "^1.1.0",
|
|
183
|
-
"@lblod/ember-rdfa-editor": "^9.7.0",
|
|
183
|
+
"@lblod/ember-rdfa-editor": "^9.7.0 || 9.7.0-dev.321de5f78663980e776632137c59d03fd231148b",
|
|
184
184
|
"ember-concurrency": "^2.3.7 || ^3.1.0",
|
|
185
185
|
"ember-intl": "^5.7.2 || ^6.1.0",
|
|
186
186
|
"ember-modifier": "^3.2.7",
|
package/pnpm-lock.yaml
CHANGED
|
@@ -58,16 +58,19 @@ dependencies:
|
|
|
58
58
|
version: 6.3.0
|
|
59
59
|
ember-concurrency:
|
|
60
60
|
specifier: ^2.3.7 || ^3.1.0
|
|
61
|
-
version:
|
|
61
|
+
version: 3.1.1(@babel/core@7.23.9)(ember-source@4.12.0)
|
|
62
62
|
ember-mu-transform-helpers:
|
|
63
63
|
specifier: ^2.0.0
|
|
64
64
|
version: 2.1.2
|
|
65
65
|
ember-resources:
|
|
66
66
|
specifier: ^6.1.1
|
|
67
|
-
version: 6.5.1(@glimmer/component@1.1.2)(@glimmer/tracking@1.1.2)(@glint/template@1.4.0)(ember-concurrency@
|
|
67
|
+
version: 6.5.1(@glimmer/component@1.1.2)(@glimmer/tracking@1.1.2)(@glint/template@1.4.0)(ember-concurrency@3.1.1)(ember-source@4.12.0)
|
|
68
68
|
ember-template-imports:
|
|
69
69
|
specifier: ^3.4.2
|
|
70
70
|
version: 3.4.2
|
|
71
|
+
ember-truth-helpers:
|
|
72
|
+
specifier: ^3.0.0
|
|
73
|
+
version: 3.1.1
|
|
71
74
|
ember-velcro:
|
|
72
75
|
specifier: ^2.1.0
|
|
73
76
|
version: 2.1.3(ember-modifier@3.2.7)(ember-source@4.12.0)
|
|
@@ -146,8 +149,8 @@ devDependencies:
|
|
|
146
149
|
specifier: 4.3.3
|
|
147
150
|
version: 4.3.3
|
|
148
151
|
'@lblod/ember-rdfa-editor':
|
|
149
|
-
specifier:
|
|
150
|
-
version: 9.7.
|
|
152
|
+
specifier: 9.7.1-dev.67f7224891c720868d2e8ef0e92ce46d76959257
|
|
153
|
+
version: 9.7.1-dev.67f7224891c720868d2e8ef0e92ce46d76959257(@appuniversum/ember-appuniversum@3.4.1)(@glint/template@1.4.0)(@lezer/common@1.2.1)(ember-changeset@4.1.2)(ember-cli-sass@11.0.1)(ember-intl@5.7.2)(ember-modifier@3.2.7)(ember-source@4.12.0)(webpack@5.90.3)
|
|
151
154
|
'@rdfjs/types':
|
|
152
155
|
specifier: ^1.1.0
|
|
153
156
|
version: 1.1.0
|
|
@@ -343,9 +346,6 @@ devDependencies:
|
|
|
343
346
|
loader.js:
|
|
344
347
|
specifier: ^4.7.0
|
|
345
348
|
version: 4.7.0
|
|
346
|
-
npm-run-all:
|
|
347
|
-
specifier: ^4.1.5
|
|
348
|
-
version: 4.1.5
|
|
349
349
|
prettier:
|
|
350
350
|
specifier: ^3.2.0
|
|
351
351
|
version: 3.2.5
|
|
@@ -2792,8 +2792,8 @@ packages:
|
|
|
2792
2792
|
'@jridgewell/resolve-uri': 3.1.2
|
|
2793
2793
|
'@jridgewell/sourcemap-codec': 1.4.15
|
|
2794
2794
|
|
|
2795
|
-
/@lblod/ember-rdfa-editor@9.7.
|
|
2796
|
-
resolution: {integrity: sha512-
|
|
2795
|
+
/@lblod/ember-rdfa-editor@9.7.1-dev.67f7224891c720868d2e8ef0e92ce46d76959257(@appuniversum/ember-appuniversum@3.4.1)(@glint/template@1.4.0)(@lezer/common@1.2.1)(ember-changeset@4.1.2)(ember-cli-sass@11.0.1)(ember-intl@5.7.2)(ember-modifier@3.2.7)(ember-source@4.12.0)(webpack@5.90.3):
|
|
2796
|
+
resolution: {integrity: sha512-PRKSju6sgYr0iWVmQTpH9XbkJ8Jx365s6KcrZubtSAKkchSdCX2L4qXWR7qzDFXN34wdGpdwISoHN9VR0N54Yg==}
|
|
2797
2797
|
engines: {node: 16.* || 18.* || >= 20}
|
|
2798
2798
|
peerDependencies:
|
|
2799
2799
|
'@appuniversum/ember-appuniversum': ^2.15.0 || ^3.0.0
|
|
@@ -2832,7 +2832,7 @@ packages:
|
|
|
2832
2832
|
ember-cli-babel: 8.2.0(@babel/core@7.23.9)
|
|
2833
2833
|
ember-cli-htmlbars: 6.3.0
|
|
2834
2834
|
ember-cli-sass: 11.0.1
|
|
2835
|
-
ember-focus-trap: 1.0.
|
|
2835
|
+
ember-focus-trap: 1.1.0(ember-source@4.12.0)
|
|
2836
2836
|
ember-intl: 5.7.2(typescript@5.3.3)
|
|
2837
2837
|
ember-modifier: 3.2.7(@babel/core@7.23.9)
|
|
2838
2838
|
ember-source: 4.12.0(@babel/core@7.23.9)(@glimmer/component@1.1.2)(@glint/template@1.4.0)(webpack@5.90.3)
|
|
@@ -8286,6 +8286,7 @@ packages:
|
|
|
8286
8286
|
transitivePeerDependencies:
|
|
8287
8287
|
- '@babel/core'
|
|
8288
8288
|
- supports-color
|
|
8289
|
+
dev: true
|
|
8289
8290
|
|
|
8290
8291
|
/ember-concurrency@3.1.1(@babel/core@7.23.9)(ember-source@4.12.0):
|
|
8291
8292
|
resolution: {integrity: sha512-doXFYYfy1C7jez+jDDlfahTp03QdjXeSY/W3Zbnx/q3UNJ9g10Shf2d7M/HvWo/TC22eU+6dPLIpqd/6q4pR+Q==}
|
|
@@ -8304,7 +8305,6 @@ packages:
|
|
|
8304
8305
|
transitivePeerDependencies:
|
|
8305
8306
|
- '@babel/core'
|
|
8306
8307
|
- supports-color
|
|
8307
|
-
dev: true
|
|
8308
8308
|
|
|
8309
8309
|
/ember-data-table@2.1.0:
|
|
8310
8310
|
resolution: {integrity: sha512-h/rI5K9woEafshFAjTfMVhfXK91aEjsXJO1zsYsY6aXZBfiNXWbCfrrnMk8W5Q3c8uPeNPyZ12W0//i/wQmGTg==}
|
|
@@ -8333,6 +8333,7 @@ packages:
|
|
|
8333
8333
|
transitivePeerDependencies:
|
|
8334
8334
|
- '@babel/core'
|
|
8335
8335
|
- supports-color
|
|
8336
|
+
dev: true
|
|
8336
8337
|
|
|
8337
8338
|
/ember-disable-prototype-extensions@1.1.3:
|
|
8338
8339
|
resolution: {integrity: sha512-SB9NcZ27OtoUk+gfalsc3QU17+54OoqR668qHcuvHByk4KAhGxCKlkm9EBlKJcGr7yceOOAJqohTcCEBqfRw9g==}
|
|
@@ -8408,16 +8409,6 @@ packages:
|
|
|
8408
8409
|
- webpack
|
|
8409
8410
|
dev: true
|
|
8410
8411
|
|
|
8411
|
-
/ember-focus-trap@1.0.2:
|
|
8412
|
-
resolution: {integrity: sha512-/8Cx9KI7uqoMaNN4Iyxc24P2JIvAcCL3cI1tYdZRHTwTd1sG6esEZWOnpxZOSE7m4xHww8HVUSiXzgyqD8YIhA==}
|
|
8413
|
-
engines: {node: 12.* || >= 14}
|
|
8414
|
-
dependencies:
|
|
8415
|
-
'@embroider/addon-shim': 1.8.7
|
|
8416
|
-
focus-trap: 6.9.4
|
|
8417
|
-
transitivePeerDependencies:
|
|
8418
|
-
- supports-color
|
|
8419
|
-
dev: true
|
|
8420
|
-
|
|
8421
8412
|
/ember-focus-trap@1.1.0(ember-source@4.12.0):
|
|
8422
8413
|
resolution: {integrity: sha512-KxbCKpAJaBVZm+bW4tHPoBJAZThmxa6pI+WQusL+bj0RtAnGUNkWsVy6UBMZ5QqTQzf4EvGHkCVACVp5lbAWMQ==}
|
|
8423
8414
|
engines: {node: 12.* || >= 14}
|
|
@@ -8657,7 +8648,7 @@ packages:
|
|
|
8657
8648
|
- supports-color
|
|
8658
8649
|
dev: true
|
|
8659
8650
|
|
|
8660
|
-
/ember-resources@6.5.1(@glimmer/component@1.1.2)(@glimmer/tracking@1.1.2)(@glint/template@1.4.0)(ember-concurrency@
|
|
8651
|
+
/ember-resources@6.5.1(@glimmer/component@1.1.2)(@glimmer/tracking@1.1.2)(@glint/template@1.4.0)(ember-concurrency@3.1.1)(ember-source@4.12.0):
|
|
8661
8652
|
resolution: {integrity: sha512-8eEdbSE0sioqjpB2CWw/dKF4Ftfe9tbebuSUfMDBmP3xxTIvxTDbvDnbd8A0IbQ0z/iQt6Va+/5cadzvkbMZtg==}
|
|
8662
8653
|
peerDependencies:
|
|
8663
8654
|
'@ember/test-waiters': ^3.0.0
|
|
@@ -8681,7 +8672,7 @@ packages:
|
|
|
8681
8672
|
'@glimmer/tracking': 1.1.2
|
|
8682
8673
|
'@glint/template': 1.4.0
|
|
8683
8674
|
ember-async-data: 1.0.3(ember-source@4.12.0)
|
|
8684
|
-
ember-concurrency:
|
|
8675
|
+
ember-concurrency: 3.1.1(@babel/core@7.23.9)(ember-source@4.12.0)
|
|
8685
8676
|
ember-source: 4.12.0(@babel/core@7.23.9)(@glimmer/component@1.1.2)(@glint/template@1.4.0)(webpack@5.90.3)
|
|
8686
8677
|
transitivePeerDependencies:
|
|
8687
8678
|
- supports-color
|
|
@@ -8860,7 +8851,6 @@ packages:
|
|
|
8860
8851
|
ember-cli-babel: 7.26.11
|
|
8861
8852
|
transitivePeerDependencies:
|
|
8862
8853
|
- supports-color
|
|
8863
|
-
dev: true
|
|
8864
8854
|
|
|
8865
8855
|
/ember-try-config@4.0.0:
|
|
8866
8856
|
resolution: {integrity: sha512-jAv7fqYJK7QYYekPc/8Nr7KOqDpv/asqM6F8xcRnbmf9UrD35BkSffY63qUuiD9e0aR5qiMNBIQzH8f65rGDqw==}
|
|
@@ -12031,16 +12021,6 @@ packages:
|
|
|
12031
12021
|
resolution: {integrity: sha512-5MP0uUeVCec89ZbNOT/i97Mc+q3SxXmiUGhRFOTmhrGPn//uWVQdCvcLJDy64MSBR5MidFdOR7B9viumoavy6g==}
|
|
12032
12022
|
dev: true
|
|
12033
12023
|
|
|
12034
|
-
/load-json-file@4.0.0:
|
|
12035
|
-
resolution: {integrity: sha512-Kx8hMakjX03tiGTLAIdJ+lL0htKnXjEZN6hk/tozf/WOuYGdZBJrZ+rCJRbVCugsjB3jMLn9746NsQIf5VjBMw==}
|
|
12036
|
-
engines: {node: '>=4'}
|
|
12037
|
-
dependencies:
|
|
12038
|
-
graceful-fs: 4.2.11
|
|
12039
|
-
parse-json: 4.0.0
|
|
12040
|
-
pify: 3.0.0
|
|
12041
|
-
strip-bom: 3.0.0
|
|
12042
|
-
dev: true
|
|
12043
|
-
|
|
12044
12024
|
/load-yaml-file@0.2.0:
|
|
12045
12025
|
resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==}
|
|
12046
12026
|
engines: {node: '>=6'}
|
|
@@ -12579,11 +12559,6 @@ packages:
|
|
|
12579
12559
|
dependencies:
|
|
12580
12560
|
readable-stream: 1.0.34
|
|
12581
12561
|
|
|
12582
|
-
/memorystream@0.3.1:
|
|
12583
|
-
resolution: {integrity: sha512-S3UwM3yj5mtUSEfP41UZmt/0SCoVYUcU1rkXv+BQ5Ig8ndL4sPoJNBUJERafdPb5jjHJGuMgytgKvKIf58XNBw==}
|
|
12584
|
-
engines: {node: '>= 0.10.0'}
|
|
12585
|
-
dev: true
|
|
12586
|
-
|
|
12587
12562
|
/meow@6.1.1:
|
|
12588
12563
|
resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==}
|
|
12589
12564
|
engines: {node: '>=8'}
|
|
@@ -13328,22 +13303,6 @@ packages:
|
|
|
13328
13303
|
validate-npm-package-name: 5.0.0
|
|
13329
13304
|
dev: true
|
|
13330
13305
|
|
|
13331
|
-
/npm-run-all@4.1.5:
|
|
13332
|
-
resolution: {integrity: sha512-Oo82gJDAVcaMdi3nuoKFavkIHBRVqQ1qvMb+9LHk/cF4P6B2m8aP04hGf7oL6wZ9BuGwX1onlLhpuoofSyoQDQ==}
|
|
13333
|
-
engines: {node: '>= 4'}
|
|
13334
|
-
hasBin: true
|
|
13335
|
-
dependencies:
|
|
13336
|
-
ansi-styles: 3.2.1
|
|
13337
|
-
chalk: 2.4.2
|
|
13338
|
-
cross-spawn: 6.0.5
|
|
13339
|
-
memorystream: 0.3.1
|
|
13340
|
-
minimatch: 3.1.2
|
|
13341
|
-
pidtree: 0.3.1
|
|
13342
|
-
read-pkg: 3.0.0
|
|
13343
|
-
shell-quote: 1.8.1
|
|
13344
|
-
string.prototype.padend: 3.1.5
|
|
13345
|
-
dev: true
|
|
13346
|
-
|
|
13347
13306
|
/npm-run-path@2.0.2:
|
|
13348
13307
|
resolution: {integrity: sha512-lJxZYlT4DW/bRUtFh1MQIWqmLwQfAxnqWG4HhEdjMlkrJYnJn0Jrr2u3mgxqaWsdiBc76TYkTG/mhrnYTuzfHw==}
|
|
13349
13308
|
engines: {node: '>=4'}
|
|
@@ -13868,14 +13827,6 @@ packages:
|
|
|
13868
13827
|
pbkdf2: 3.1.2
|
|
13869
13828
|
safe-buffer: 5.2.1
|
|
13870
13829
|
|
|
13871
|
-
/parse-json@4.0.0:
|
|
13872
|
-
resolution: {integrity: sha512-aOIos8bujGN93/8Ox/jPLh7RwVnPEysynVFE+fQZyg6jKELEHwzgKdLRFHUgXJL6kylijVSBC4BvN9OmsB48Rw==}
|
|
13873
|
-
engines: {node: '>=4'}
|
|
13874
|
-
dependencies:
|
|
13875
|
-
error-ex: 1.3.2
|
|
13876
|
-
json-parse-better-errors: 1.0.2
|
|
13877
|
-
dev: true
|
|
13878
|
-
|
|
13879
13830
|
/parse-json@5.2.0:
|
|
13880
13831
|
resolution: {integrity: sha512-ayCKvm/phCGxOkYRSCM82iDwct8/EonSEgCSxWxD7ve6jHggsFl4fZVQBPRNgQoKiuV/odhFrGzQXZwbifC8Rg==}
|
|
13881
13832
|
engines: {node: '>=8'}
|
|
@@ -13990,13 +13941,6 @@ packages:
|
|
|
13990
13941
|
resolution: {integrity: sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==}
|
|
13991
13942
|
dev: true
|
|
13992
13943
|
|
|
13993
|
-
/path-type@3.0.0:
|
|
13994
|
-
resolution: {integrity: sha512-T2ZUsdZFHgA3u4e5PfPbjd7HDDpxPnQb5jN0SrDsjNSuVXHJqtwTnWqG0B1jZrgmJ/7lj1EmVIByWt1gxGkWvg==}
|
|
13995
|
-
engines: {node: '>=4'}
|
|
13996
|
-
dependencies:
|
|
13997
|
-
pify: 3.0.0
|
|
13998
|
-
dev: true
|
|
13999
|
-
|
|
14000
13944
|
/path-type@4.0.0:
|
|
14001
13945
|
resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==}
|
|
14002
13946
|
engines: {node: '>=8'}
|
|
@@ -14020,17 +13964,6 @@ packages:
|
|
|
14020
13964
|
engines: {node: '>=8.6'}
|
|
14021
13965
|
dev: true
|
|
14022
13966
|
|
|
14023
|
-
/pidtree@0.3.1:
|
|
14024
|
-
resolution: {integrity: sha512-qQbW94hLHEqCg7nhby4yRC7G2+jYHY4Rguc2bjw7Uug4GIJuu1tvf2uHaZv5Q8zdt+WKJ6qK1FOI6amaWUo5FA==}
|
|
14025
|
-
engines: {node: '>=0.10'}
|
|
14026
|
-
hasBin: true
|
|
14027
|
-
dev: true
|
|
14028
|
-
|
|
14029
|
-
/pify@3.0.0:
|
|
14030
|
-
resolution: {integrity: sha512-C3FsVNH1udSEX48gGX1xfvwTWfsYWj5U+8/uK15BGzIGrKoUpghX8hWZwa/OFnakBiiVNmBvemTJR5mcy7iPcg==}
|
|
14031
|
-
engines: {node: '>=4'}
|
|
14032
|
-
dev: true
|
|
14033
|
-
|
|
14034
13967
|
/pify@4.0.1:
|
|
14035
13968
|
resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==}
|
|
14036
13969
|
engines: {node: '>=6'}
|
|
@@ -14771,15 +14704,6 @@ packages:
|
|
|
14771
14704
|
type-fest: 0.8.1
|
|
14772
14705
|
dev: true
|
|
14773
14706
|
|
|
14774
|
-
/read-pkg@3.0.0:
|
|
14775
|
-
resolution: {integrity: sha512-BLq/cCO9two+lBgiTYNqD6GdtK8s4NpaWrl6/rCO9w0TUS8oJl7cmToOZfRYllKTISY6nt1U7jQ53brmKqY6BA==}
|
|
14776
|
-
engines: {node: '>=4'}
|
|
14777
|
-
dependencies:
|
|
14778
|
-
load-json-file: 4.0.0
|
|
14779
|
-
normalize-package-data: 2.5.0
|
|
14780
|
-
path-type: 3.0.0
|
|
14781
|
-
dev: true
|
|
14782
|
-
|
|
14783
14707
|
/read-pkg@5.2.0:
|
|
14784
14708
|
resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==}
|
|
14785
14709
|
engines: {node: '>=8'}
|
|
@@ -15463,7 +15387,7 @@ packages:
|
|
|
15463
15387
|
resolution: {integrity: sha512-0Ju4+6A8iOnpL/Thra7dZsSlOHYAHIeMxfhWQRI1/VLcT3WDBZKKtQt/QkBOsiIN9ZpuvHE6cGZ0x4glCMmfiA==}
|
|
15464
15388
|
engines: {node: '>=12'}
|
|
15465
15389
|
dependencies:
|
|
15466
|
-
semver: 7.
|
|
15390
|
+
semver: 7.6.0
|
|
15467
15391
|
dev: true
|
|
15468
15392
|
|
|
15469
15393
|
/semver@5.7.2:
|
|
@@ -16104,15 +16028,6 @@ packages:
|
|
|
16104
16028
|
set-function-name: 2.0.2
|
|
16105
16029
|
side-channel: 1.0.5
|
|
16106
16030
|
|
|
16107
|
-
/string.prototype.padend@3.1.5:
|
|
16108
|
-
resolution: {integrity: sha512-DOB27b/2UTTD+4myKUFh+/fXWcu/UDyASIXfg+7VzoCNNGOfWvoyU/x5pvVHr++ztyt/oSYI1BcWBBG/hmlNjA==}
|
|
16109
|
-
engines: {node: '>= 0.4'}
|
|
16110
|
-
dependencies:
|
|
16111
|
-
call-bind: 1.0.7
|
|
16112
|
-
define-properties: 1.2.1
|
|
16113
|
-
es-abstract: 1.22.4
|
|
16114
|
-
dev: true
|
|
16115
|
-
|
|
16116
16031
|
/string.prototype.trim@1.2.8:
|
|
16117
16032
|
resolution: {integrity: sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ==}
|
|
16118
16033
|
engines: {node: '>= 0.4'}
|
package/translations/en-US.yaml
CHANGED
|
@@ -262,6 +262,10 @@ generic-rdfa-variable:
|
|
|
262
262
|
snippet-plugin:
|
|
263
263
|
insert:
|
|
264
264
|
title: Insert snippet
|
|
265
|
+
placeholder: Insert snippet placeholder
|
|
266
|
+
placeholder:
|
|
267
|
+
title: Insert snippet here
|
|
268
|
+
text: Select this then insert the desired snippet
|
|
265
269
|
modal:
|
|
266
270
|
title: Choose a snippet
|
|
267
271
|
select: Select
|
package/translations/nl-BE.yaml
CHANGED
|
@@ -266,6 +266,10 @@ generic-rdfa-variable:
|
|
|
266
266
|
snippet-plugin:
|
|
267
267
|
insert:
|
|
268
268
|
title: Fragment invoegen
|
|
269
|
+
placeholder: Plaatshouder voor fragment invoegen
|
|
270
|
+
placeholder:
|
|
271
|
+
title: Fragment hier invoegen
|
|
272
|
+
text: Selecteer dit en voeg het gewenste fragment in
|
|
269
273
|
modal:
|
|
270
274
|
title: Kies een fragment
|
|
271
275
|
select: Selecteer
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
// Temporary type since we still support ember-truth-helpers v3. v4 has its own types, so we can remove this when we drop v3 support.
|
|
2
|
+
import type Helper from '@ember/component/helper';
|
|
3
|
+
|
|
4
|
+
type TruthConvert<T> = T extends {
|
|
5
|
+
isTruthy: true;
|
|
6
|
+
}
|
|
7
|
+
? true
|
|
8
|
+
: T extends {
|
|
9
|
+
isTruthy: false;
|
|
10
|
+
}
|
|
11
|
+
? false
|
|
12
|
+
: T extends {
|
|
13
|
+
isTruthy: boolean;
|
|
14
|
+
}
|
|
15
|
+
? boolean
|
|
16
|
+
: T extends undefined | null
|
|
17
|
+
? false
|
|
18
|
+
: T extends boolean
|
|
19
|
+
? T
|
|
20
|
+
: T extends number
|
|
21
|
+
? T extends 0 | -0
|
|
22
|
+
? false
|
|
23
|
+
: number extends T
|
|
24
|
+
? boolean
|
|
25
|
+
: true
|
|
26
|
+
: T extends bigint
|
|
27
|
+
? T extends 0n
|
|
28
|
+
? false
|
|
29
|
+
: bigint extends T
|
|
30
|
+
? boolean
|
|
31
|
+
: true
|
|
32
|
+
: T extends string
|
|
33
|
+
? T extends ''
|
|
34
|
+
? false
|
|
35
|
+
: string extends T
|
|
36
|
+
? boolean
|
|
37
|
+
: true
|
|
38
|
+
: T extends never[]
|
|
39
|
+
? false
|
|
40
|
+
: T extends ArrayLike<unknown>
|
|
41
|
+
? boolean
|
|
42
|
+
: T extends object
|
|
43
|
+
? true
|
|
44
|
+
: boolean;
|
|
45
|
+
|
|
46
|
+
type MaybeTruthy =
|
|
47
|
+
| {
|
|
48
|
+
isTruthy: boolean;
|
|
49
|
+
}
|
|
50
|
+
| undefined
|
|
51
|
+
| null
|
|
52
|
+
| boolean
|
|
53
|
+
| number
|
|
54
|
+
| bigint
|
|
55
|
+
| string
|
|
56
|
+
| unknown[]
|
|
57
|
+
| object;
|
|
58
|
+
|
|
59
|
+
type FirstFalsy<T> = T extends [infer Item]
|
|
60
|
+
? Item
|
|
61
|
+
: T extends [infer Head, ...infer Tail]
|
|
62
|
+
? TruthConvert<Head> extends false
|
|
63
|
+
? Head
|
|
64
|
+
: TruthConvert<Head> extends true
|
|
65
|
+
? FirstFalsy<Tail>
|
|
66
|
+
: Head | FirstFalsy<Tail>
|
|
67
|
+
: undefined;
|
|
68
|
+
|
|
69
|
+
interface AndSignature<T extends MaybeTruthy[]> {
|
|
70
|
+
Args: {
|
|
71
|
+
Positional: T;
|
|
72
|
+
};
|
|
73
|
+
Return: FirstFalsy<T>;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
export default class AndHelper<const T extends MaybeTruthy[]> extends Helper<
|
|
77
|
+
AndSignature<T>
|
|
78
|
+
> {
|
|
79
|
+
compute(params: T): FirstFalsy<T>;
|
|
80
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
// Temporary type since we still support ember-truth-helpers v3. v4 has its own types, so we can remove this when we drop v3 support.
|
|
2
|
+
type MaybeTruthy =
|
|
3
|
+
| {
|
|
4
|
+
isTruthy: boolean;
|
|
5
|
+
}
|
|
6
|
+
| undefined
|
|
7
|
+
| null
|
|
8
|
+
| boolean
|
|
9
|
+
| number
|
|
10
|
+
| bigint
|
|
11
|
+
| string
|
|
12
|
+
| unknown[]
|
|
13
|
+
| object;
|
|
14
|
+
|
|
15
|
+
export default function not(...params: MaybeTruthy[]): boolean;
|