@tailor-cms/ce-flashcards-edit 0.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.
- package/README.md +1 -0
- package/dist/components/Edit.vue.d.ts +18 -0
- package/dist/components/SideToolbar.vue.d.ts +11 -0
- package/dist/components/TopToolbar.vue.d.ts +11 -0
- package/dist/index.cjs +99 -0
- package/dist/index.css +5 -0
- package/dist/index.d.ts +7 -0
- package/dist/index.js +92 -0
- package/package.json +49 -0
package/README.md
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
# Content element `Edit` component
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import type { Element } from '@tailor-cms/ce-flashcards-manifest';
|
|
2
|
+
import type { ElementReferences } from '@tailor-cms/cek-common';
|
|
3
|
+
type __VLS_Props = {
|
|
4
|
+
element: Element;
|
|
5
|
+
isDragged: boolean;
|
|
6
|
+
isReadonly: boolean;
|
|
7
|
+
isFocused: boolean;
|
|
8
|
+
references?: ElementReferences;
|
|
9
|
+
};
|
|
10
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
11
|
+
save: (data: import("@tailor-cms/cek-common").ElementConfig) => any;
|
|
12
|
+
link: (key?: string | undefined) => any;
|
|
13
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
14
|
+
onSave?: ((data: import("@tailor-cms/cek-common").ElementConfig) => any) | undefined;
|
|
15
|
+
onLink?: ((key?: string | undefined) => any) | undefined;
|
|
16
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
17
|
+
declare const _default: typeof __VLS_export;
|
|
18
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Element } from '@tailor-cms/ce-flashcards-manifest';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
element: Element;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
save: (data: import("@tailor-cms/cek-common").ElementConfig) => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
onSave?: ((data: import("@tailor-cms/cek-common").ElementConfig) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { Element } from '@tailor-cms/ce-flashcards-manifest';
|
|
2
|
+
type __VLS_Props = {
|
|
3
|
+
element: Element;
|
|
4
|
+
};
|
|
5
|
+
declare const __VLS_export: import("vue").DefineComponent<__VLS_Props, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
|
6
|
+
save: (data: import("@tailor-cms/cek-common").ElementConfig) => any;
|
|
7
|
+
}, string, import("vue").PublicProps, Readonly<__VLS_Props> & Readonly<{
|
|
8
|
+
onSave?: ((data: import("@tailor-cms/cek-common").ElementConfig) => any) | undefined;
|
|
9
|
+
}>, {}, {}, {}, {}, string, import("vue").ComponentProvideOptions, false, {}, any>;
|
|
10
|
+
declare const _default: typeof __VLS_export;
|
|
11
|
+
export default _default;
|
package/dist/index.cjs
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
require('./index.css');let vue = require("vue");
|
|
6
|
+
//#region ../manifest/dist/index.mjs
|
|
7
|
+
var type = "FLASHCARDS";
|
|
8
|
+
var name = "Flashcards";
|
|
9
|
+
var initState = (_config) => ({});
|
|
10
|
+
var ui = {
|
|
11
|
+
icon: "mdi-cards-outline",
|
|
12
|
+
forceFullWidth: true
|
|
13
|
+
};
|
|
14
|
+
var isEmpty = (_data) => false;
|
|
15
|
+
var manifest$1 = {
|
|
16
|
+
type,
|
|
17
|
+
version: "1.0",
|
|
18
|
+
name,
|
|
19
|
+
ssr: false,
|
|
20
|
+
initState,
|
|
21
|
+
isEmpty,
|
|
22
|
+
ui,
|
|
23
|
+
mocks: {
|
|
24
|
+
displayContexts: [{
|
|
25
|
+
name: "Test preset 1",
|
|
26
|
+
data: { state: "I have a value" }
|
|
27
|
+
}, {
|
|
28
|
+
name: "Test preset 2",
|
|
29
|
+
data: { state: "I have a different value" }
|
|
30
|
+
}],
|
|
31
|
+
referencesData: { linked: [{ title: "Mock linked element" }] }
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/components/Edit.vue?vue&type=script&setup=true&lang.ts
|
|
36
|
+
var _hoisted_1 = { class: "tce-container" };
|
|
37
|
+
var Edit_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ (0, vue.defineComponent)({
|
|
38
|
+
__name: "Edit",
|
|
39
|
+
props: {
|
|
40
|
+
element: {},
|
|
41
|
+
isDragged: { type: Boolean },
|
|
42
|
+
isReadonly: { type: Boolean },
|
|
43
|
+
isFocused: { type: Boolean },
|
|
44
|
+
references: {}
|
|
45
|
+
},
|
|
46
|
+
emits: ["save", "link"],
|
|
47
|
+
setup(__props) {
|
|
48
|
+
return (_ctx, _cache) => {
|
|
49
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_1, [(0, vue.createElementVNode)("div", null, "This is Edit version of the content element id: " + (0, vue.toDisplayString)(__props.element?.id), 1)]);
|
|
50
|
+
};
|
|
51
|
+
}
|
|
52
|
+
});
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region \0plugin-vue:export-helper
|
|
55
|
+
var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
56
|
+
const target = sfc.__vccOpts || sfc;
|
|
57
|
+
for (const [key, val] of props) target[key] = val;
|
|
58
|
+
return target;
|
|
59
|
+
};
|
|
60
|
+
//#endregion
|
|
61
|
+
//#region src/components/Edit.vue
|
|
62
|
+
var Edit_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Edit_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-b645d660"]]);
|
|
63
|
+
//#endregion
|
|
64
|
+
//#region src/components/SideToolbar.vue
|
|
65
|
+
var SideToolbar_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
66
|
+
__name: "SideToolbar",
|
|
67
|
+
props: { element: {} },
|
|
68
|
+
emits: ["save"],
|
|
69
|
+
setup(__props) {
|
|
70
|
+
return (_ctx, _cache) => {
|
|
71
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", null, [(0, vue.createElementVNode)("p", null, "Edit element side toolbar " + (0, vue.toDisplayString)(__props.element?.id), 1)]);
|
|
72
|
+
};
|
|
73
|
+
}
|
|
74
|
+
});
|
|
75
|
+
//#endregion
|
|
76
|
+
//#region src/components/TopToolbar.vue
|
|
77
|
+
var TopToolbar_default = /* @__PURE__ */ (0, vue.defineComponent)({
|
|
78
|
+
__name: "TopToolbar",
|
|
79
|
+
props: { element: {} },
|
|
80
|
+
emits: ["save"],
|
|
81
|
+
setup(__props) {
|
|
82
|
+
return (_ctx, _cache) => {
|
|
83
|
+
return (0, vue.openBlock)(), (0, vue.createElementBlock)("div", null, [(0, vue.createElementVNode)("p", null, "Edit element top toolbar " + (0, vue.toDisplayString)(__props.element?.id), 1)]);
|
|
84
|
+
};
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region src/index.ts
|
|
89
|
+
var manifest = {
|
|
90
|
+
...manifest$1,
|
|
91
|
+
Edit: Edit_default,
|
|
92
|
+
SideToolbar: SideToolbar_default,
|
|
93
|
+
TopToolbar: TopToolbar_default
|
|
94
|
+
};
|
|
95
|
+
//#endregion
|
|
96
|
+
exports.Edit = Edit_default;
|
|
97
|
+
exports.SideToolbar = SideToolbar_default;
|
|
98
|
+
exports.TopToolbar = TopToolbar_default;
|
|
99
|
+
exports.default = manifest;
|
package/dist/index.css
ADDED
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { ElementManifest } from '@tailor-cms/ce-flashcards-manifest';
|
|
2
|
+
import Edit from './components/Edit.vue';
|
|
3
|
+
import SideToolbar from './components/SideToolbar.vue';
|
|
4
|
+
import TopToolbar from './components/TopToolbar.vue';
|
|
5
|
+
declare const manifest: ElementManifest;
|
|
6
|
+
export default manifest;
|
|
7
|
+
export { Edit, SideToolbar, TopToolbar };
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
import { createElementBlock, createElementVNode, defineComponent, openBlock, toDisplayString } from "vue";
|
|
2
|
+
import './index.css';//#region ../manifest/dist/index.mjs
|
|
3
|
+
var type = "FLASHCARDS";
|
|
4
|
+
var name = "Flashcards";
|
|
5
|
+
var initState = (_config) => ({});
|
|
6
|
+
var ui = {
|
|
7
|
+
icon: "mdi-cards-outline",
|
|
8
|
+
forceFullWidth: true
|
|
9
|
+
};
|
|
10
|
+
var isEmpty = (_data) => false;
|
|
11
|
+
var manifest$1 = {
|
|
12
|
+
type,
|
|
13
|
+
version: "1.0",
|
|
14
|
+
name,
|
|
15
|
+
ssr: false,
|
|
16
|
+
initState,
|
|
17
|
+
isEmpty,
|
|
18
|
+
ui,
|
|
19
|
+
mocks: {
|
|
20
|
+
displayContexts: [{
|
|
21
|
+
name: "Test preset 1",
|
|
22
|
+
data: { state: "I have a value" }
|
|
23
|
+
}, {
|
|
24
|
+
name: "Test preset 2",
|
|
25
|
+
data: { state: "I have a different value" }
|
|
26
|
+
}],
|
|
27
|
+
referencesData: { linked: [{ title: "Mock linked element" }] }
|
|
28
|
+
}
|
|
29
|
+
};
|
|
30
|
+
//#endregion
|
|
31
|
+
//#region src/components/Edit.vue?vue&type=script&setup=true&lang.ts
|
|
32
|
+
var _hoisted_1 = { class: "tce-container" };
|
|
33
|
+
var Edit_vue_vue_type_script_setup_true_lang_default = /*@__PURE__*/ defineComponent({
|
|
34
|
+
__name: "Edit",
|
|
35
|
+
props: {
|
|
36
|
+
element: {},
|
|
37
|
+
isDragged: { type: Boolean },
|
|
38
|
+
isReadonly: { type: Boolean },
|
|
39
|
+
isFocused: { type: Boolean },
|
|
40
|
+
references: {}
|
|
41
|
+
},
|
|
42
|
+
emits: ["save", "link"],
|
|
43
|
+
setup(__props) {
|
|
44
|
+
return (_ctx, _cache) => {
|
|
45
|
+
return openBlock(), createElementBlock("div", _hoisted_1, [createElementVNode("div", null, "This is Edit version of the content element id: " + toDisplayString(__props.element?.id), 1)]);
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
});
|
|
49
|
+
//#endregion
|
|
50
|
+
//#region \0plugin-vue:export-helper
|
|
51
|
+
var _plugin_vue_export_helper_default = (sfc, props) => {
|
|
52
|
+
const target = sfc.__vccOpts || sfc;
|
|
53
|
+
for (const [key, val] of props) target[key] = val;
|
|
54
|
+
return target;
|
|
55
|
+
};
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region src/components/Edit.vue
|
|
58
|
+
var Edit_default = /*#__PURE__*/ _plugin_vue_export_helper_default(Edit_vue_vue_type_script_setup_true_lang_default, [["__scopeId", "data-v-b645d660"]]);
|
|
59
|
+
//#endregion
|
|
60
|
+
//#region src/components/SideToolbar.vue
|
|
61
|
+
var SideToolbar_default = /* @__PURE__ */ defineComponent({
|
|
62
|
+
__name: "SideToolbar",
|
|
63
|
+
props: { element: {} },
|
|
64
|
+
emits: ["save"],
|
|
65
|
+
setup(__props) {
|
|
66
|
+
return (_ctx, _cache) => {
|
|
67
|
+
return openBlock(), createElementBlock("div", null, [createElementVNode("p", null, "Edit element side toolbar " + toDisplayString(__props.element?.id), 1)]);
|
|
68
|
+
};
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region src/components/TopToolbar.vue
|
|
73
|
+
var TopToolbar_default = /* @__PURE__ */ defineComponent({
|
|
74
|
+
__name: "TopToolbar",
|
|
75
|
+
props: { element: {} },
|
|
76
|
+
emits: ["save"],
|
|
77
|
+
setup(__props) {
|
|
78
|
+
return (_ctx, _cache) => {
|
|
79
|
+
return openBlock(), createElementBlock("div", null, [createElementVNode("p", null, "Edit element top toolbar " + toDisplayString(__props.element?.id), 1)]);
|
|
80
|
+
};
|
|
81
|
+
}
|
|
82
|
+
});
|
|
83
|
+
//#endregion
|
|
84
|
+
//#region src/index.ts
|
|
85
|
+
var manifest = {
|
|
86
|
+
...manifest$1,
|
|
87
|
+
Edit: Edit_default,
|
|
88
|
+
SideToolbar: SideToolbar_default,
|
|
89
|
+
TopToolbar: TopToolbar_default
|
|
90
|
+
};
|
|
91
|
+
//#endregion
|
|
92
|
+
export { Edit_default as Edit, SideToolbar_default as SideToolbar, TopToolbar_default as TopToolbar, manifest as default };
|
package/package.json
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@tailor-cms/ce-flashcards-edit",
|
|
3
|
+
"description": "Tailor CMS flashcards element authoring component",
|
|
4
|
+
"author": "Studion <info@gostudion.com> (https://github.com/tailor-cms)",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"version": "0.0.1",
|
|
7
|
+
"exports": {
|
|
8
|
+
".": {
|
|
9
|
+
"import": "./dist/index.js",
|
|
10
|
+
"require": "./dist/index.cjs"
|
|
11
|
+
}
|
|
12
|
+
},
|
|
13
|
+
"main": "./dist/index.cjs",
|
|
14
|
+
"types": "./types/index.d.ts",
|
|
15
|
+
"files": [
|
|
16
|
+
"dist"
|
|
17
|
+
],
|
|
18
|
+
"peerDependencies": {
|
|
19
|
+
"vue": "^3.5.29"
|
|
20
|
+
},
|
|
21
|
+
"dependencies": {
|
|
22
|
+
"@tailor-cms/cek-common": "^2.0.1"
|
|
23
|
+
},
|
|
24
|
+
"devDependencies": {
|
|
25
|
+
"@tailor-cms/eslint-config": "^2.0.1",
|
|
26
|
+
"@vitejs/plugin-vue": "^6.0.7",
|
|
27
|
+
"typescript": "^6.0.3",
|
|
28
|
+
"vite": "^8.0.16",
|
|
29
|
+
"vite-plugin-lib-inject-css": "^2.2.2",
|
|
30
|
+
"vue-tsc": "^3.3.3",
|
|
31
|
+
"vuetify": "^4.1.0",
|
|
32
|
+
"@tailor-cms/ce-flashcards-manifest": "0.0.1"
|
|
33
|
+
},
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
},
|
|
37
|
+
"engines": {
|
|
38
|
+
"node": ">=24"
|
|
39
|
+
},
|
|
40
|
+
"scripts": {
|
|
41
|
+
"dev": "vite build --watch",
|
|
42
|
+
"build": "pnpm nuke:dist && vue-tsc && vite build",
|
|
43
|
+
"lint": "eslint ./src",
|
|
44
|
+
"lint:fix": "pnpm lint --fix",
|
|
45
|
+
"nuke": "pnpm dlx del-cli dist node_modules",
|
|
46
|
+
"nuke:dist": "pnpm dlx del-cli dist",
|
|
47
|
+
"prepublish": "pnpm build"
|
|
48
|
+
}
|
|
49
|
+
}
|