« get me outta code hell

bam (Thing subclasses: several steps, one file) - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/thing/group.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2022-02-12 17:38:27 -0400
committer(quasar) nebula <qznebula@protonmail.com>2022-02-12 17:40:01 -0400
commit95bd943d62473e53de11cd6368e540cd48e4231a (patch)
treea6e1f0a21222eaeb01a270d8202a31616903649b /src/thing/group.js
parentcfa02cb03a363c46408db7f0ec54bd3a7e4ad018 (diff)
bam (Thing subclasses: several steps, one file)
Diffstat (limited to 'src/thing/group.js')
-rw-r--r--src/thing/group.js73
1 files changed, 0 insertions, 73 deletions
diff --git a/src/thing/group.js b/src/thing/group.js
deleted file mode 100644
index 3b92e957..00000000
--- a/src/thing/group.js
+++ /dev/null
@@ -1,73 +0,0 @@
-import CacheableObject from './cacheable-object.js';
-import Thing from './thing.js';
-
-import {
-    isColor,
-    isDirectory,
-    isName,
-    isString,
-    isURL,
-    validateArrayItems,
-    validateReferenceList,
-} from './validators.js';
-
-export class GroupCategory extends CacheableObject {
-    static propertyDescriptors = {
-        // Update & expose
-
-        name: {
-            flags: {update: true, expose: true},
-            update: {default: 'Unnamed Group Category', validate: isName}
-        },
-
-        color: {
-            flags: {update: true, expose: true},
-            update: {validate: isColor}
-        },
-
-        groupsByRef: {
-            flags: {update: true, expose: true},
-            update: {validate: validateReferenceList('group')}
-        },
-    };
-}
-
-export default class Group extends Thing {
-    static [Thing.referenceType] = 'group';
-
-    static propertyDescriptors = {
-        // Update & expose
-
-        name: {
-            flags: {update: true, expose: true},
-            update: {default: 'Unnamed Group', validate: isName}
-        },
-
-        directory: {
-            flags: {update: true, expose: true},
-            update: {validate: isDirectory},
-            expose: Thing.directoryExpose
-        },
-
-        description: {
-            flags: {update: true, expose: true},
-            update: {validate: isString}
-        },
-
-        urls: {
-            flags: {update: true, expose: true},
-            update: {validate: validateArrayItems(isURL)}
-        },
-
-        // Expose only
-
-        descriptionShort: {
-            flags: {expose: true},
-
-            expose: {
-                dependencies: ['description'],
-                compute: ({ description }) => description.split('<hr class="split">')[0]
-            }
-        }
-    };
-}