Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions docs/src/create-flux-plugin/basics/subjects.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,21 +48,18 @@ export default class Todo {
@Property({
through: 'rdf://title',
writable: true,
resolveLanguage: 'literal',
})
title: string;

@Property({
through: 'rdf://description',
writable: true,
resolveLanguage: 'literal',
})
desc: string;

@Property({
through: 'rdf://status',
writable: true,
resolveLanguage: 'literal',
})
done: boolean;
}
Expand Down
7 changes: 3 additions & 4 deletions packages/api/src/community/index.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
import { Ad4mModel, HasMany, Flag, Model, Property, fileToDataUri } from '@coasys/ad4m';
import { community, languages } from '@coasys/flux-constants';
import { community } from '@coasys/flux-constants';
import { EntryType } from '@coasys/flux-types';
import Channel from '../channel';

const { FILE_STORAGE_LANGUAGE } = languages;
const { DESCRIPTION, IMAGE, NAME, THUMBNAIL, ENTRY_TYPE, CHANNEL } = community;

interface FileData {
Expand All @@ -25,14 +24,14 @@ export class Community extends Ad4mModel {

@Property({
through: IMAGE,
resolveLanguage: FILE_STORAGE_LANGUAGE,
resolveLiteral: false,
transform: fileToDataUri,
})
image: string | FileData;

@Property({
through: THUMBNAIL,
resolveLanguage: FILE_STORAGE_LANGUAGE,
resolveLiteral: false,
transform: fileToDataUri,
})
thumbnail: string | FileData;
Expand Down
5 changes: 2 additions & 3 deletions packages/api/src/post/index.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
import { Ad4mModel, HasMany, Flag, Model, Property, fileToDataUri } from '@coasys/ad4m';
import { community, languages } from '@coasys/flux-constants';
import { community } from '@coasys/flux-constants';

import { EntryType } from '@coasys/flux-types';
import Message from '../message';

const { BODY, IMAGE, TITLE, URL, ENTRY_TYPE } = community;
const { FILE_STORAGE_LANGUAGE } = languages;

@Model({ name: 'Post' })
export class Post extends Ad4mModel {
Expand All @@ -20,7 +19,7 @@ export class Post extends Ad4mModel {

@Property({
through: IMAGE,
resolveLanguage: FILE_STORAGE_LANGUAGE,
resolveLiteral: false,
transform: fileToDataUri,
})
image: string;
Expand Down
1 change: 0 additions & 1 deletion views/kanban-view/src/components/Board/TaskModel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import { Ad4mModel, Model, Property, HasMany } from '@coasys/ad4m';
export class Task extends Ad4mModel {
@Property({
through: 'rdf://name',
resolveLanguage: 'literal',
required: true,
writable: true,
initial: 'New task',
Expand Down
2 changes: 1 addition & 1 deletion views/table-view/src/components/NewClass/NewClass.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ async function buildSHACLShape(
};

if (language) {
propShape.resolveLanguage = language;
propShape.resolveLiteral = false;
}

if (options.length > 0) {
Expand Down
Loading