-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/_notimplemented/password-hash.vue b/zero.Backoffice.UI/_notimplemented/password-hash.vue
deleted file mode 100644
index 9dbf6c28..00000000
--- a/zero.Backoffice.UI/_notimplemented/password-hash.vue
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/_notimplemented/setup/Steps/step-application.vue b/zero.Backoffice.UI/_notimplemented/setup/Steps/step-application.vue
deleted file mode 100644
index a4a73819..00000000
--- a/zero.Backoffice.UI/_notimplemented/setup/Steps/step-application.vue
+++ /dev/null
@@ -1,31 +0,0 @@
-
-
-
your application
-
With zero you can manage multiple applications with one installation. Start by adding your first application.
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/_notimplemented/setup/Steps/step-database.vue b/zero.Backoffice.UI/_notimplemented/setup/Steps/step-database.vue
deleted file mode 100644
index a292c4cb..00000000
--- a/zero.Backoffice.UI/_notimplemented/setup/Steps/step-database.vue
+++ /dev/null
@@ -1,35 +0,0 @@
-
-
-
database configuration
-
Zero uses RavenDB as it’s database. If you want a more sophisticated setup (i.e. cluster) you can override the IDocumentStore service which is registered as a singleton.
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/_notimplemented/setup/Steps/step-finish.vue b/zero.Backoffice.UI/_notimplemented/setup/Steps/step-finish.vue
deleted file mode 100644
index 71a55e92..00000000
--- a/zero.Backoffice.UI/_notimplemented/setup/Steps/step-finish.vue
+++ /dev/null
@@ -1,43 +0,0 @@
-
-
-
-
-
You are done!
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/_notimplemented/setup/Steps/step-install.vue b/zero.Backoffice.UI/_notimplemented/setup/Steps/step-install.vue
deleted file mode 100644
index 318c76d4..00000000
--- a/zero.Backoffice.UI/_notimplemented/setup/Steps/step-install.vue
+++ /dev/null
@@ -1,179 +0,0 @@
-
-
-
-
-
Installing
-
-
-
-
Oh no!
-
The setup of zero failed with following error(s):
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/_notimplemented/setup/Steps/step-user.vue b/zero.Backoffice.UI/_notimplemented/setup/Steps/step-user.vue
deleted file mode 100644
index d528fd1e..00000000
--- a/zero.Backoffice.UI/_notimplemented/setup/Steps/step-user.vue
+++ /dev/null
@@ -1,39 +0,0 @@
-
-
-
welcome to zero
-
First we need some basic credentials from you to create a login. This login is the solely superadmin which is required to change critical application data.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/_notimplemented/setup/setup.js b/zero.Backoffice.UI/_notimplemented/setup/setup.js
deleted file mode 100644
index ff9aebd5..00000000
--- a/zero.Backoffice.UI/_notimplemented/setup/setup.js
+++ /dev/null
@@ -1,9 +0,0 @@
-import Vue from 'vue';
-import Setup from './setup.vue';
-//import 'filter/generic.js'
-//import 'directive/filedrop.js'
-
-import GlobalComponents from 'zero/components/globals.js';
-import Directives from 'zero/directives/globals.js';
-
-new Vue(Setup).$mount('#application');
\ No newline at end of file
diff --git a/zero.Backoffice.UI/_notimplemented/setup/setup.scss b/zero.Backoffice.UI/_notimplemented/setup/setup.scss
deleted file mode 100644
index 7b9d6b88..00000000
--- a/zero.Backoffice.UI/_notimplemented/setup/setup.scss
+++ /dev/null
@@ -1,6 +0,0 @@
-// configuration
-@import "Core/all";
-
-// modules
-@import "Modules/button";
-@import "Setup/all";
\ No newline at end of file
diff --git a/zero.Backoffice.UI/_notimplemented/setup/setup.vue b/zero.Backoffice.UI/_notimplemented/setup/setup.vue
deleted file mode 100644
index ce90c7d8..00000000
--- a/zero.Backoffice.UI/_notimplemented/setup/setup.vue
+++ /dev/null
@@ -1,133 +0,0 @@
-
-
-
zero
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/_notimplemented/tableeditor.vue b/zero.Backoffice.UI/_notimplemented/tableeditor.vue
deleted file mode 100644
index 915a5a3c..00000000
--- a/zero.Backoffice.UI/_notimplemented/tableeditor.vue
+++ /dev/null
@@ -1,175 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/account/_password-change.vue b/zero.Backoffice.UI/app/account/_password-change.vue
deleted file mode 100644
index a87e0922..00000000
--- a/zero.Backoffice.UI/app/account/_password-change.vue
+++ /dev/null
@@ -1,82 +0,0 @@
-
-
-
-
-
By default all properties of your entity are synced with its blueprint. You can disable synchronisation per property so it won't be overridden on changes.
-
-
-
- Synchronized
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/editor/compile.ts b/zero.Backoffice.UI/app/editor/compile.ts
deleted file mode 100644
index a0259a9b..00000000
--- a/zero.Backoffice.UI/app/editor/compile.ts
+++ /dev/null
@@ -1,365 +0,0 @@
-import { Component, markRaw } from "vue";
-import { ZeroEditorField, ZeroEditorDisplay } from "zero/schemas";
-import { Zero } from "../core";
-import { ZeroEditor, ZeroEditorMeta } from "./editor";
-import { createBlueprintConfig } from "./editor-blueprint";
-import { ZeroEditorCanvasBase, ZeroEditorTab } from "./editor-canvas";
-import { ZeroEditorFieldConfiguration, ZeroEditorFieldFilterPreview } from "./editor-field";
-import { localize } from '../services/localization';
-import { selectorToArray, setObjectValue } from '../utils';
-import List from "../schemas/list/list";
-
-
-let appliedExtensionsTo: string[] = [];
-let appliedListExtensionsTo: string[] = [];
-
-export interface ZeroCompiledEditor
-{
- alias: string;
- blueprint: any;
- display: ZeroEditorDisplay;
- tabs: ZeroCompiledEditorTab[];
- origin: ZeroEditor;
- meta: ZeroEditorMeta;
-}
-
-
-export interface ZeroCompiledEditorTab
-{
- alias: string;
- name: string;
- sort: number;
- class: string | null;
- count: (model: any) => number | null;
- disabled: (model: any) => boolean;
- hidden: (model: any) => boolean;
- fieldsets: ZeroCompiledEditorFieldset[];
- component: Component | null;
-}
-
-
-export interface ZeroCompiledEditorFieldset
-{
- fields: ZeroCompiledEditorField[];
- hasColumns: boolean;
-}
-
-
-export interface ZeroCompiledEditorChangeEvent
-{
- value: any;
- oldValue: any;
- model: any;
- component: Component;
-}
-
-
-export interface ZeroCompiledEditorField
-{
- path: string;
- configuration: ZeroEditorFieldConfiguration;
- fieldType: string;
- options: any | null;
- component: Component;
- selector: string[];
-
- getValue: (model: any) => any;
- optional: (model: any, parent: any) => boolean;
- readonly: (model: any, parent: any) => boolean;
- hidden: (model: any, parent: any) => boolean;
- label: string;
- hideLabel: boolean;
- description: string | null;
- helpText: string | null;
- classes: string | null;
- horizontal: boolean;
- sort: number;
- columns: number;
- preview?: ZeroEditorFieldFilterPreview;
- onChange: (event: ZeroCompiledEditorChangeEvent) => void;
-}
-
-
-export function compileField(zero: Zero, editor: ZeroEditor, field: ZeroEditorField): ZeroCompiledEditorField | undefined
-{
- let component = null;
-
- try
- {
- component = markRaw(field.customComponent || zero.getFieldTypeComponent(field.fieldType));
-
- if (!component)
- {
- return undefined;
- }
- }
- catch
- {
- return undefined;
- }
-
- let selector = selectorToArray(field.path);
-
- let model = {
- configuration: field.configuration,
- fieldType: field.fieldType,
- options: field.options,
- path: field.path,
- component,
- selector,
-
- getValue(model: any)
- {
- let currentValue = model;
- let result = null;
- let found = false;
-
- if (!selector || !selector.length || !currentValue)
- {
- found = true;
- result = null;
- }
- else
- {
- for (var key of selector)
- {
- if (currentValue && key in currentValue)
- {
- found = true;
- currentValue = currentValue[key];
- }
- else
- {
- break;
- }
- }
-
- result = found ? currentValue : null;
- }
-
- return result;
- },
-
- optional(model: any, parent: any)
- {
- if (typeof field.configuration.optional === 'boolean')
- {
- return field.configuration.optional;
- }
- if (typeof field.configuration.optional === 'function')
- {
- return field.configuration.optional(model, parent);
- }
- return false;
- },
-
- readonly(model: any, parent: any)
- {
- if (typeof field.configuration.readonly === 'boolean')
- {
- return field.configuration.readonly;
- }
- if (typeof field.configuration.readonly === 'function')
- {
- return field.configuration.readonly(model, parent);
- }
- return false;
- },
-
- hidden(model: any, parent: any)
- {
- if (typeof field.configuration.hidden === 'boolean')
- {
- return field.configuration.hidden;
- }
- if (typeof field.configuration.hidden === 'function')
- {
- return field.configuration.hidden(model, parent);
- }
- return false;
- },
-
- label: editor.onLabelCreate(field),
- description: localize(editor.onDescriptionCreate(field), { hideEmpty: true }),
- hideLabel: field.configuration.hideLabel,
- helpText: field.configuration.helpText,
- classes: field.configuration.classes,
- horizontal: field.configuration.horizontal,
- sort: field.configuration.sort,
- columns: 12,
- preview: field.configuration.preview ? {
- icon: field.configuration.preview.icon || 'fth-square',
- selected: field.configuration.preview.selected || (x => !!x),
- value: field.configuration.preview.value || (x => x ? x : null)
- } : null,
-
- onChange(event: ZeroCompiledEditorChangeEvent)
- {
- (field.configuration.changeHandlers || []).forEach(handler =>
- {
- handler(event);
- });
- }
-
- } as ZeroCompiledEditorField;
-
- return model;
-}
-
-
-export function compileEditor(zero: Zero, editor: ZeroEditor): ZeroCompiledEditor | null
-{
- if (!editor)
- {
- return null;
- }
-
- if (appliedExtensionsTo.indexOf(editor.alias) < 0)
- {
- appliedExtensionsTo.push(editor.alias);
-
- let extensions = zero.getSchemaExtensions(editor.alias);
-
- extensions.forEach(extension =>
- {
- extension.extension(editor);
- });
- }
-
- let model = {
- alias: editor.alias,
- blueprint: null,
- display: editor.display,
- tabs: [],
- origin: editor,
- meta: editor.meta
- } as ZeroCompiledEditor;
-
- let tabs = [...editor.tabs.sort((a, b) => a.sort - b.sort)];
-
- // add default tab if necessary
- if (!tabs.length && (editor.fields.length || editor.fieldsets.length))
- {
- let tab = new ZeroEditorTab('content', '@ui.tab_content');
- tab.fieldsets.push(new ZeroEditorCanvasBase());
- tabs.push(tab);
- }
-
- tabs.forEach((editorTab, tabIndex) =>
- {
- let tab = {
- name: editorTab.name,
- sort: editorTab.sort,
- alias: editorTab.alias,
- class: editorTab.class,
- count: editorTab.count,
- disabled: editorTab.disabled,
- hidden: editorTab.hidden,
- fieldsets: [],
- component: editorTab.component
- } as ZeroCompiledEditorTab;
-
- let fieldsets = [];
-
- // add fieldsets (which are not part of a tab) to the first tab
- if (tabIndex == 0 && editor.fieldsets.length)
- {
- fieldsets.push(...editor.fieldsets);
- }
-
- // push registered fieldsets
- fieldsets.push(...editorTab.fieldsets.sort((a, b) => a.sort - b.sort));
-
- // add default fieldset if none are defined
- if (!fieldsets.length)
- {
- const fakeFieldset = new ZeroEditorCanvasBase();
- fakeFieldset.isFake = false;
- fieldsets.push(fakeFieldset);
- }
-
- fieldsets.forEach((editorFieldset, fieldsetIndex) =>
- {
- let fieldset = {
- sort: editorFieldset.sort,
- fields: [],
- hasColumns: !editorFieldset.isFake
- } as ZeroCompiledEditorFieldset;
-
- let fields = [];
-
- // add fields (which are not part of a fieldset) to the first fieldset
- if (fieldsetIndex == fieldsets.length - 1)
- {
- if (editor.fields.length)
- {
- fields.push(...editor.fields);
- }
- if (editorTab.fields.length)
- {
- fields.push(...editorTab.fields);
- }
- }
-
- // push registered fields
- // @ts-ignore
- fields.push(...editorFieldset.fields.sort((a, b) => a.configuration.sort - b.configuration.sort));
-
- fields.forEach(editorField =>
- {
- const field = compileField(zero, editor, editorField);
-
- if (field == null)
- {
- console.error('Could not find registered field type [' + editorField.fieldType + ']');
- }
- else
- {
- fieldset.fields.push(field);
- }
- });
-
-
- if (fieldset.fields.length)
- {
- tab.fieldsets.push(fieldset);
- }
- });
-
-
- if (tab.fieldsets.length || tab.component != null)
- {
- model.tabs.push(tab);
- }
- });
-
-
- model.blueprint = createBlueprintConfig(model.alias, model);
-
- return model;
-}
-
-
-
-
-export function compileList(zero: Zero, list: List): List | null
-{
- if (!list)
- {
- return null;
- }
-
- if (appliedListExtensionsTo.indexOf(list.alias) < 0)
- {
- appliedListExtensionsTo.push(list.alias);
-
- let extensions = zero.getSchemaExtensions(list.alias);
-
- extensions.forEach(extension =>
- {
- extension.extension(list);
- });
- }
-
- return list;
-}
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/editor/editor-blueprint.ts b/zero.Backoffice.UI/app/editor/editor-blueprint.ts
deleted file mode 100644
index 11329102..00000000
--- a/zero.Backoffice.UI/app/editor/editor-blueprint.ts
+++ /dev/null
@@ -1,170 +0,0 @@
-
-import { localize } from '../services/localization';
-import { arrayRemove } from '../utils/arrays';
-import { useUiStore } from '../ui/store';
-import { ZeroCompiledEditor } from './compile';
-
-function unlocked(config, model, field)
-{
- if (!config || !model || !model.blueprint)
- {
- return true;
- }
-
- return canUnlock(config, model, field)
- && (model.blueprint.desync.indexOf(field.path) > -1
- || model.blueprint.desync.find(x => field.path.indexOf(x + '.') === 0) != null);
-}
-
-
-function canUnlock(config, model, field)
-{
- if (!config || !model || !model.blueprint)
- {
- return false;
- }
-
- return config.unlocked.indexOf(field.path) > -1
- || config.unlocked.find(x => field.path.indexOf(x + '.') === 0) != null;
-}
-
-
-function isBlueprintChild(config, route, model)
-{
- return model && route.query.scope != 'shared' && !!model.blueprint;
-}
-
-
-function isBlueprintParent(config, route, model)
-{
- return model && route.query.scope == 'shared' && !model.blueprint;
-}
-
-
-async function lock(config, model, field)
-{
- arrayRemove(model.blueprint.desync, field.path);
- //let blueprint = await BlueprintApi.getById(model.blueprint.id);
- //return blueprint[field.path];
-}
-
-
-function unlock(config, model, field)
-{
- model.blueprint.desync.push(field.path);
-}
-
-
-/**
- * [TODO] description
- * @typedef {object} EditorBlueprint
- * @param {string} alias - Alias which is used to match an editor
- * @param {function} unlocked - Whether a field is unlocked and can be changed
- * @param {function} canUnlock - Whether a field can be unlocked
- * @param {EditorBlueprintField[]} fields - Fields which can be altered in synchronization
- */
-
-/**
- * [TODO] description
- * @typedef {object} EditorBlueprintField
- * @param {string} path - Property path
- * @param {string} label - Label which describes the property
- * @param {string} description - Additional description for this property
- * @param {function} synced - Whether this field is synchronized with the parent
- */
-
-/**
- * [TODO] description
- * @param {string} alias - Alias for the tab
- * @returns {EditorBlueprint}
- */
-export function createBlueprintConfig(alias: string, editor: ZeroCompiledEditor)
-{
- const store = useUiStore();
- let blueprintAlias = editor.alias;
- let canBeBlueprinted = store.blueprints.indexOf(blueprintAlias) > -1;
-
- if (!blueprintAlias || !canBeBlueprinted)
- {
- return {
- alias: blueprintAlias,
- isEnabled: false,
- unlocked: () => true,
- canUnlock: () => false,
- isBlueprintParent: () => false,
- isBlueprintChild: () => false,
- lock: () => { },
- unlock: () => { },
- fields: []
- };
- }
-
- let config = {
- unlocked: []
- }
-
- // check for blueprint availability
- //config.isParent = this.value && this.$route.query.scope === 'shared';
- //config.isNewParent = config.isParent && !this.value.id;
- //config.isChild = !config.isParent && this.value && !!this.value.blueprint;
-
- // get all editor fields
- let fields = [];
- let processed = ['blueprint'];
- let defaults = ['name', /*'alias',*/ 'isActive', 'sort', /*'key'*/];
-
- // add blueprint setting for default fields
- defaults.forEach(alias =>
- {
- processed.push(alias);
-
- //if (config.unlocked.indexOf(alias) > -1)
- //{
- fields.push({
- path: alias,
- label: localize("@ui.entityfields." + alias),
- description: localize("@ui.entityfields." + alias + "_text", { hideEmpty: true }),
- synced: model => !model.blueprint || model.blueprint.desync.indexOf(alias) < 0
- });
- //}
- });
-
- // add blueprint setting for custom fields
- editor.tabs.forEach(tab =>
- {
- tab.fieldsets.forEach(set =>
- {
- set.fields.forEach(field =>
- {
- let alias = field.path;
-
- if (processed.indexOf(alias) < 0)
- {
- processed.push(alias);
-
- if (config.unlocked.indexOf(alias) > -1 || config.unlocked.find(x => alias.indexOf(x + '.') === 0))
- {
- fields.push({
- path: alias,
- label: field.label,
- description: field.description,
- synced: model => !model.blueprint || model.blueprint.desync.indexOf(alias) < 0
- });
- }
- }
- });
- });
- });
-
- return {
- alias: blueprintAlias,
- isEnabled: true,
- unlocked: (model, field) => unlocked(config, model, field),
- canUnlock: (model, field) => canUnlock(config, model, field),
- unlock: async (model, field) => await unlock(config, model, field),
- lock: async (model, field) => await lock(config, model, field),
- isBlueprintParent: (route, model) => isBlueprintParent(config, route, model),
- isBlueprintChild: (route, model) => isBlueprintChild(config, route, model),
- fields: fields
- };
-};
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/editor/editor-canvas.ts b/zero.Backoffice.UI/app/editor/editor-canvas.ts
deleted file mode 100644
index 8788f184..00000000
--- a/zero.Backoffice.UI/app/editor/editor-canvas.ts
+++ /dev/null
@@ -1,101 +0,0 @@
-import { ZeroEditorField } from "zero/schemas";
-import { ZeroEditorFieldImpl, ZeroEditorFieldConfiguration, createFieldProxy } from "./editor-field";
-import { arrayRemove } from '../utils';
-import { Component } from "vue";
-
-
-export class ZeroEditorCanvasBase
-{
- fields: ZeroEditorField[] = [];
- sort: number = 0;
- isFake: boolean = false;
-
- field(path: string, config?: ZeroEditorFieldConfiguration): ZeroEditorField
- {
- const field = new ZeroEditorFieldImpl(path, config);
-
- if (!config || typeof config.sort === 'undefined')
- {
- field.configuration.sort = (this.fields.length + 1) * 10;
- }
-
- const proxy = createFieldProxy(field) as ZeroEditorField;
- this.fields.push(proxy);
- return proxy;
- }
-
- getField(path: string): ZeroEditorField | undefined
- {
- return this.fields.find(x => x.path == path);
- }
-
- removeField(path: string): void
- {
- let field = this.getField(path);
-
- if (field)
- {
- arrayRemove(this.fields, field);
- }
- }
-}
-
-
-interface OnFieldsetCreate
-{
- (set: ZeroEditorCanvasBase): void;
-}
-
-
-export class ZeroEditorCanvasBaseWithFieldset extends ZeroEditorCanvasBase
-{
- fieldsets: ZeroEditorCanvasBase[] = [];
-
- fieldset(onCreate: OnFieldsetCreate): void
- {
- const fieldset = new ZeroEditorCanvasBase();
- fieldset.sort = (this.fieldsets.length + 1) * 10;
- this.fieldsets.push(fieldset);
- onCreate(fieldset);
- }
-}
-
-
-export class ZeroEditorCanvas extends ZeroEditorCanvasBaseWithFieldset
-{
- tabs: ZeroEditorTab[] = [];
-
- tab(alias: string, name: string): ZeroEditorTab
- {
- const tab = new ZeroEditorTab(alias, name);
- tab.sort = (this.tabs.length + 1) * 10;
- this.tabs.push(tab);
- return tab;
- }
-
- getTab(alias: string): ZeroEditorTab | undefined
- {
- return this.tabs.find(x => x.alias == alias);
- }
-}
-
-
-export class ZeroEditorTab extends ZeroEditorCanvasBaseWithFieldset
-{
- alias: string;
- name: string;
- count: (model: any) => number | undefined = () => undefined;
- hidden: (model: any) => boolean = () => false;
- disabled: (model: any) => boolean = () => false;
- class: string | null = null;
- component: Component | null = null;
-
- constructor(alias: string, name: string)
- {
- super();
- this.alias = alias;
- this.name = name;
- }
-
-
-}
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/editor/editor-field.ts b/zero.Backoffice.UI/app/editor/editor-field.ts
deleted file mode 100644
index 7f2cf8e9..00000000
--- a/zero.Backoffice.UI/app/editor/editor-field.ts
+++ /dev/null
@@ -1,205 +0,0 @@
-import { Component, markRaw } from "vue";
-import { ZeroEditorField } from "zero/schemas";
-import { extendObject } from '../utils/objects';
-
-export declare type BooleanExpression = (model: any, value: any) => boolean;
-
-
-export const createFieldProxy = (field: ZeroEditorFieldImpl) => new Proxy(field, {
- get: function (target: ZeroEditorFieldImpl, prop: string | symbol, receiver: any): any
- {
- // handle internals
- if (prop in target)
- {
- // @ts-ignore
- return target[prop];
- }
-
- // handle dynamic fields + extensions
- return (args: any) =>
- {
- target.fieldType = prop;
- target.options = args;
- return target;
- };
- }
-})// as EditorField;
-
-
-// @ts-ignore
-export class ZeroEditorFieldImpl implements ZeroEditorField
-{
- path: string;
- configuration: ZeroEditorFieldConfiguration;
- fieldType: string | symbol;
- options?: any;
- customComponent?: Component;
-
- constructor(path: string, config?: ZeroEditorFieldConfiguration)
- {
- this.path = path;
- this.configuration = extendObject(createDefaultFieldConfiguration(), config || {}) as ZeroEditorFieldConfiguration;
- }
-
-
- /**
- * Set this field as optional
- * @param {function|boolean} [condition] - Optionally only require this field when a condition is fulfilled or reset the required state with true/false
- */
- setOptional(condition: Function | boolean): ZeroEditorField
- {
- this.configuration.optional = condition;
- return this;
- }
-
- /**
- * Whether the input next to the headline or below
- * @param {boolean} isHorizontal
- * @returns {EditorField}
- */
- setHorizontal(isHorizontal: boolean): ZeroEditorField
- {
- this.configuration.horizontal = !isHorizontal;
- return this;
- }
-
-
- /**
- * Set this field to disabled
- */
- setReadonly(condition: Function | boolean): ZeroEditorField
- {
- this.configuration.readonly = condition;
- return this;
- }
-
-
- /**
- * Conditionally hide this field
- * @param {function} condition - function which returns a boolean and gets passed the current model
- */
- setHidden(condition: Function | boolean): ZeroEditorField
- {
- this.configuration.hidden = condition;
- return this;
- }
-
-
- /**
- * Set a custom component for a field
- * @param {Component} component - The component to render (can be an async component too)
- * @param {T} [options] = Custom options to pass to this editor
- */
- component(component: Component, options?: any): ZeroEditorField
- {
- this.customComponent = markRaw(component);
- this.options = options;
- return this;
- }
-
-
- /**
- * The expression argument is called when the value of the field changes
- * @param {function} callback - function which is called
- */
- onChange(callback: Function): ZeroEditorField
- {
- this.configuration.changeHandlers.push(callback);
- return this;
- }
-}
-
-
-
-export function createDefaultFieldConfiguration(): ZeroEditorFieldConfiguration
-{
- return {
- optional: false,
- readonly: false,
- hidden: false,
- label: null,
- hideLabel: false,
- description: null,
- helpText: null,
- classes: null,
- horizontal: false,
- sort: 0,
- preview: undefined,
- changeHandlers: [],
- alsoFor: []
- } as ZeroEditorFieldConfiguration;
-}
-
-
-export interface ZeroEditorFieldConfiguration
-{
- /**
- * Whether this field is optional or required (additional validation is done on the server)
- */
- optional?: Function | boolean;
- /**
- * Whether this field is readonly and can't be changed
- */
- readonly?: Function | boolean;
- /**
- * Conditionally hide the field
- */
- hidden?: Function | boolean;
- /**
- * A custom label for this field (otherwise it's generated via `onLabelCreate`)
- **/
- label?: string | null,
- /**
- * Hide the field label
- **/
- hideLabel?: boolean,
- /**
- * A custom description for this field (otherwise it's generated via `onDescriptionCreate`)
- **/
- description?: string | null,
- /**
- * Display a help text below the field
- **/
- helpText?: string | null,
- /**
- * Append HTML class to the generated property
- **/
- classes?: string | null,
- /**
- * Whether to render the label next to the input
- **/
- horizontal?: boolean,
- /**
- * Sort order for fields within the editor canvas
- **/
- sort?: number,
- /**
- * Sort order for fields within the editor canvas
- **/
- preview?: ZeroEditorFieldFilterPreview,
- /**
- * Handlers which get called on value change
- **/
- changeHandlers?: Array,
- /**
- * This field will also handle error output for the other defined fields
- **/
- alsoFor?: string[] | string | null,
-}
-
-
-export interface ZeroEditorFieldFilterPreview
-{
- /**
- * Icon which is displayed next to the filter option
- */
- icon?: string;
- /**
- * Checks whether the selected value for the filter option is valid and if it should be marked as selected
- */
- selected?: (value: any, model: any) => boolean;
- /**
- * Renders the filter value which is previewed
- */
- value?: (value: any, model: any) => string;
-}
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/editor/editor-types.d.ts b/zero.Backoffice.UI/app/editor/editor-types.d.ts
deleted file mode 100644
index 4a45ac4c..00000000
--- a/zero.Backoffice.UI/app/editor/editor-types.d.ts
+++ /dev/null
@@ -1,89 +0,0 @@
-import { Component } from "vue";
-import { ZeroEditorFieldConfiguration } from "./editor-field";
-
-declare module 'zero/schemas'
-{
- export interface FieldSupportsMaxLength
- {
- maxLength?: number;
- }
-
-
- export interface FieldSupportsPlaceholder
- {
- placeholder?: string | null;
- }
-
-
- export type TextFieldOptions = FieldSupportsMaxLength | FieldSupportsPlaceholder;
- export type NumberFieldOptions = FieldSupportsMaxLength | FieldSupportsPlaceholder;
-
-
- export type ZeroEditorDisplay = 'tabs' | 'boxes';
-
-
- export interface ZeroEditorField
- {
- /**
- * Model path
- */
- path: string;
-
- /**
- * Field configuration
- */
- configuration: ZeroEditorFieldConfiguration;
-
- /**
- * Type of the field which has to be registered in the zero runtime
- */
- fieldType: string | symbol;
-
- /**
- * Custom options which are passed to the component
- */
- options?: any;
-
- /**
- * Set a custom render component for this field
- */
- customComponent?: Component;
-
- /**
- * Set this field as optional
- * @param {function|boolean} [condition] - Optionally only require this field when a condition is fulfilled or reset the required state with true/false
- */
- setOptional(condition: Function | boolean): ZeroEditorField;
-
- /**
- * Whether the input next to the headline or below
- * @param {boolean} isHorizontal
- * @returns {EditorField}
- */
- setHorizontal(isHorizontal: boolean): ZeroEditorField;
-
- /**
- * Set this field to disabled
- */
- setReadonly(condition: Function | boolean): ZeroEditorField;
-
- /**
- * Conditionally hide this field
- * @param {function} condition - function which returns a boolean and gets passed the current model
- */
- setHidden(condition: Function | boolean): ZeroEditorField;
-
- /**
- * Set a custom component for a field
- * @param {Component} component - The component to render (can be an async component too)
- * @param {T} [options] = Custom options to pass to this editor
- */
- component(component: Component, options?: any): ZeroEditorField;
-
- /**
- * The expression argument is called when the value of the field changes
- * @param {function} callback - function which is called
- */
- onChange(callback: Function): ZeroEditorField;
- }
-}
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/editor/editor.ts b/zero.Backoffice.UI/app/editor/editor.ts
deleted file mode 100644
index 4033e09a..00000000
--- a/zero.Backoffice.UI/app/editor/editor.ts
+++ /dev/null
@@ -1,77 +0,0 @@
-import { Component } from "vue";
-import { ZeroEditorField, ZeroSchema, ZeroEditorDisplay } from "zero/schemas";
-import { ZeroEditorCanvas } from "./editor-canvas";
-
-export class ZeroEditor extends ZeroEditorCanvas implements ZeroSchema
-{
- alias: string;
-
- resourcePrefix?: string;
-
- system: boolean = false;
-
- display: ZeroEditorDisplay = 'tabs';
-
- meta: ZeroEditorMeta = {};
-
- onLabelCreate = (field: ZeroEditorField): string =>
- {
- return field.configuration.label || (this.resourcePrefix ? this.resourcePrefix + field.path : '@nolabel[' + field.path + ']');
- };
-
- onDescriptionCreate = (field: ZeroEditorField): string | null =>
- {
- return field.configuration.description || (this.resourcePrefix ? this.resourcePrefix + field.path + '_text' : '@nodesc[' + field.path + ']');
- };
-
- constructor(alias: string)
- {
- super();
- this.alias = alias;
- }
-}
-
-
-export interface ZeroEditorMeta
-{
- getUrl?: (model: any) => Promise;
- allowUrlPreview: boolean;
-}
-
-
-export class ZeroModuleEditor extends ZeroEditor
-{
- _preview: ZeroModuleEditorPreview | null = null;
-
- constructor(alias: string)
- {
- super(alias);
- }
-
- preview(component: Component, buildProps?: (model: any) => any, options?: ZeroModuleEditorPreviewOptions): void
- {
- this._preview = {
- component,
- buildProps: buildProps || (_ => ({})),
- options: options || {}
- };
- }
-
- getPreview(): ZeroModuleEditorPreview | null
- {
- return this._preview;
- }
-}
-
-export interface ZeroModuleEditorPreviewOptions
-{
- canEdit?: boolean;
- hideLabel?: boolean;
-}
-
-export interface ZeroModuleEditorPreview
-{
- component: Component;
- buildProps?: (model: any) => any;
- options?: ZeroModuleEditorPreviewOptions;
-}
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/editor/fields/checklist.vue b/zero.Backoffice.UI/app/editor/fields/checklist.vue
deleted file mode 100644
index 5e9e5a83..00000000
--- a/zero.Backoffice.UI/app/editor/fields/checklist.vue
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/editor/fields/colorPicker.vue b/zero.Backoffice.UI/app/editor/fields/colorPicker.vue
deleted file mode 100644
index 4398f1a5..00000000
--- a/zero.Backoffice.UI/app/editor/fields/colorPicker.vue
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/editor/fields/createFields.ts b/zero.Backoffice.UI/app/editor/fields/createFields.ts
deleted file mode 100644
index 1419f5b1..00000000
--- a/zero.Backoffice.UI/app/editor/fields/createFields.ts
+++ /dev/null
@@ -1,28 +0,0 @@
-import { defineAsyncComponent } from "vue";
-import { ZeroPluginOptions } from "../../core";
-
-
-export default function createFields(app: ZeroPluginOptions): void
-{
- app.fieldType('text', defineAsyncComponent(() => import('./text.vue')));
- app.fieldType('number', defineAsyncComponent(() => import('./number.vue')));
- app.fieldType('password', defineAsyncComponent(() => import('./password.vue')));
- app.fieldType('toggle', defineAsyncComponent(() => import('./toggle.vue')));
- app.fieldType('rte', defineAsyncComponent(() => import('./rte.vue')));
- app.fieldType('output', defineAsyncComponent(() => import('./output.vue')));
- app.fieldType('state', defineAsyncComponent(() => import('./state.vue')));
- app.fieldType('textarea', defineAsyncComponent(() => import('./textarea.vue')));
- app.fieldType('select', defineAsyncComponent(() => import('./select.vue')));
- app.fieldType('tags', defineAsyncComponent(() => import('./tags.vue')));
- app.fieldType('checklist', defineAsyncComponent(() => import('./checklist.vue')));
- app.fieldType('inputlist', defineAsyncComponent(() => import('./inputlist.vue')));
- app.fieldType('nested', defineAsyncComponent(() => import('./nested.vue')));
- app.fieldType('datePicker', defineAsyncComponent(() => import('./datePicker.vue')));
- app.fieldType('dateRangePicker', defineAsyncComponent(() => import('./dateRangePicker.vue')));
- app.fieldType('timePicker', defineAsyncComponent(() => import('./timePicker.vue')));
- app.fieldType('iconPicker', defineAsyncComponent(() => import('./iconPicker.vue')));
- app.fieldType('colorPicker', defineAsyncComponent(() => import('./colorPicker.vue')));
- app.fieldType('culturePicker', defineAsyncComponent(() => import('./culturePicker.vue')));
- app.fieldType('radio', defineAsyncComponent(() => import('./radio.vue')));
- app.fieldType('file', defineAsyncComponent(() => import('./file.vue')));
-}
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/editor/fields/culturePicker.vue b/zero.Backoffice.UI/app/editor/fields/culturePicker.vue
deleted file mode 100644
index 3612959d..00000000
--- a/zero.Backoffice.UI/app/editor/fields/culturePicker.vue
+++ /dev/null
@@ -1,37 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/editor/fields/datePicker.vue b/zero.Backoffice.UI/app/editor/fields/datePicker.vue
deleted file mode 100644
index 61523227..00000000
--- a/zero.Backoffice.UI/app/editor/fields/datePicker.vue
+++ /dev/null
@@ -1,36 +0,0 @@
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/editor/fields/dateRangePicker.vue b/zero.Backoffice.UI/app/editor/fields/dateRangePicker.vue
deleted file mode 100644
index 97872fdb..00000000
--- a/zero.Backoffice.UI/app/editor/fields/dateRangePicker.vue
+++ /dev/null
@@ -1,54 +0,0 @@
-
-
- Could not find editor
- Please register an editor schema with the alias: [{{config}}]
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/env.d.ts b/zero.Backoffice.UI/app/env.d.ts
deleted file mode 100644
index 3bda204a..00000000
--- a/zero.Backoffice.UI/app/env.d.ts
+++ /dev/null
@@ -1,15 +0,0 @@
-///
-
-declare module 'vue' {
- import { CompatVue } from '@vue/runtime-dom'
- const Vue: CompatVue
- export default Vue
- export * from '@vue/runtime-dom'
-}
-
-declare module '*.vue' {
- import { DefineComponent } from 'vue'
- // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
- const component: DefineComponent<{}, {}, any>
- export default component
-}
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/index.ts b/zero.Backoffice.UI/app/index.ts
deleted file mode 100644
index e0c3aac7..00000000
--- a/zero.Backoffice.UI/app/index.ts
+++ /dev/null
@@ -1,2 +0,0 @@
-
-export * from './core';
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/main.ts b/zero.Backoffice.UI/app/main.ts
deleted file mode 100644
index 9036f775..00000000
--- a/zero.Backoffice.UI/app/main.ts
+++ /dev/null
@@ -1,12 +0,0 @@
-
-import { createApp } from 'vue';
-import { createPinia } from 'pinia';
-import App from './app.vue';
-import { createZeroPlugin } from './core';
-import './axios.config.ts';
-
-const app = createApp(App)
- .use(createPinia())
- .use(createZeroPlugin());
-
-app.mount('#app');
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/modules/applications/api.ts b/zero.Backoffice.UI/app/modules/applications/api.ts
deleted file mode 100644
index 79a11eab..00000000
--- a/zero.Backoffice.UI/app/modules/applications/api.ts
+++ /dev/null
@@ -1,16 +0,0 @@
-import { get, post, put, del, ApiRequestConfig, ApiRequestQuery } from '../../services/request';
-
-export default {
-
- getEmpty: async (flavor?: string, config?: ApiRequestConfig) => await get("applications/empty", { ...config, params: { flavor }, system: true }),
-
- getById: async (id: string, changeVector?: string, config?: ApiRequestConfig) => await get('applications/' + id, { ...config, params: { changeVector }, system: true }),
-
- getByQuery: async (query: ApiRequestQuery, config?: ApiRequestConfig) => await get('applications', { ...config, params: { ...query }, system: true }),
-
- create: async (model: any, config?: ApiRequestConfig) => await post('applications', model, { ...config, system: true }),
-
- update: async (model: any, config?: ApiRequestConfig) => await put('applications/' + model.id, model, { ...config, system: true }),
-
- delete: async (id: string, config?: ApiRequestConfig) => await del('applications/' + id, null, { ...config, system: true }),
-};
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/modules/applications/application.vue b/zero.Backoffice.UI/app/modules/applications/application.vue
deleted file mode 100644
index 6a7c02a0..00000000
--- a/zero.Backoffice.UI/app/modules/applications/application.vue
+++ /dev/null
@@ -1,11 +0,0 @@
-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/modules/applications/applications.vue b/zero.Backoffice.UI/app/modules/applications/applications.vue
deleted file mode 100644
index 6f144708..00000000
--- a/zero.Backoffice.UI/app/modules/applications/applications.vue
+++ /dev/null
@@ -1,40 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/modules/applications/index.ts b/zero.Backoffice.UI/app/modules/applications/index.ts
deleted file mode 100644
index 5ba38ba8..00000000
--- a/zero.Backoffice.UI/app/modules/applications/index.ts
+++ /dev/null
@@ -1,11 +0,0 @@
-import api from './api';
-//import editor from './editor';
-//import list from './list';
-import plugin from './plugin';
-
-export {
- api as applicationApi,
- //editor as countrySchema,
- //list as countryListSchema,
- plugin as applicationPlugin
-};
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/modules/applications/partials/application-items.vue b/zero.Backoffice.UI/app/modules/applications/partials/application-items.vue
deleted file mode 100644
index dcac93fe..00000000
--- a/zero.Backoffice.UI/app/modules/applications/partials/application-items.vue
+++ /dev/null
@@ -1,122 +0,0 @@
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/modules/media/components/ui-mediapicker.vue b/zero.Backoffice.UI/app/modules/media/components/ui-mediapicker.vue
deleted file mode 100644
index dcb83e31..00000000
--- a/zero.Backoffice.UI/app/modules/media/components/ui-mediapicker.vue
+++ /dev/null
@@ -1,185 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/modules/media/components/ui-videopicker.vue b/zero.Backoffice.UI/app/modules/media/components/ui-videopicker.vue
deleted file mode 100644
index 36dc606e..00000000
--- a/zero.Backoffice.UI/app/modules/media/components/ui-videopicker.vue
+++ /dev/null
@@ -1,170 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/modules/media/index.ts b/zero.Backoffice.UI/app/modules/media/index.ts
deleted file mode 100644
index 882091cd..00000000
--- a/zero.Backoffice.UI/app/modules/media/index.ts
+++ /dev/null
@@ -1,10 +0,0 @@
-import api from './api';
-import editor from './schemas/editor';
-//import list from './schemas/list';
-import plugin from './plugin';
-
-export {
- api as mediaApi,
- editor as mediaSchema,
- plugin as mediaPlugin
-};
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/modules/media/overlays/editfolder.vue b/zero.Backoffice.UI/app/modules/media/overlays/editfolder.vue
deleted file mode 100644
index 848f3df4..00000000
--- a/zero.Backoffice.UI/app/modules/media/overlays/editfolder.vue
+++ /dev/null
@@ -1,74 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/zero.Backoffice.UI/app/modules/media/overlays/media.vue b/zero.Backoffice.UI/app/modules/media/overlays/media.vue
deleted file mode 100644
index f6f5d00a..00000000
--- a/zero.Backoffice.UI/app/modules/media/overlays/media.vue
+++ /dev/null
@@ -1,322 +0,0 @@
-
-
-
-
-
-