@g1cloud/page-builder-editor 1.0.0-alpha.14 → 1.0.0-alpha.16

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@g1cloud/page-builder-editor",
3
3
  "private": false,
4
- "version": "1.0.0-alpha.14",
4
+ "version": "1.0.0-alpha.16",
5
5
  "engins": {
6
6
  "node": ">= 20.0.0"
7
7
  },
@@ -28,7 +28,7 @@
28
28
  "vue-router": "^4.3.2",
29
29
  "vue3-click-away": "^1.2.4",
30
30
  "yjs": "^13.6.14",
31
- "@g1cloud/page-builder-viewer": "1.0.0-alpha.14"
31
+ "@g1cloud/page-builder-viewer": "1.0.0-alpha.16"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@types/node": "^20.12.7",
@@ -1,49 +0,0 @@
1
- import { defineComponent, openBlock, createElementBlock, createElementVNode, toDisplayString } from "vue";
2
- import { useModal } from "@g1cloud/bluesea";
3
- import { u as usePageBuilderEditor, a as PageBuilderEditorEvent } from "./index-CuI4K01B.js";
4
- const _hoisted_1 = { class: "property-editor property-editor-product flex-align-center" };
5
- const _hoisted_2 = { class: "title" };
6
- const _hoisted_3 = ["textContent"];
7
- const _sfc_main = /* @__PURE__ */ defineComponent({
8
- __name: "PbPropertyEditorProduct",
9
- props: {
10
- property: {},
11
- value: {}
12
- },
13
- emits: ["update-property-value"],
14
- setup(__props, { emit: __emit }) {
15
- const pageBuilder = usePageBuilderEditor();
16
- useModal();
17
- const emit = __emit;
18
- const selectProducts = () => {
19
- var _a;
20
- let itemCodes = "";
21
- const selectedParts = pageBuilder.context.getSelectedParts();
22
- if (selectedParts && selectedParts.length === 1) {
23
- itemCodes = ((_a = selectedParts[0].properties) == null ? void 0 : _a.products) || "";
24
- }
25
- PageBuilderEditorEvent.emit.requestProducts({
26
- pageBuilderId: pageBuilder.instanceId,
27
- itemCodes,
28
- callback: (products) => {
29
- emit("update-property-value", { products: products.map((v) => v.itemCode).join(",") });
30
- }
31
- });
32
- };
33
- return (_ctx, _cache) => {
34
- return openBlock(), createElementBlock("div", _hoisted_1, [
35
- createElementVNode("div", _hoisted_2, [
36
- createElementVNode("label", {
37
- textContent: toDisplayString(_ctx.property.caption)
38
- }, null, 8, _hoisted_3)
39
- ]),
40
- createElementVNode("div", null, [
41
- createElementVNode("button", { onClick: selectProducts }, "Select Product")
42
- ])
43
- ]);
44
- };
45
- }
46
- });
47
- export {
48
- _sfc_main as default
49
- };
@@ -1,23 +0,0 @@
1
- import { PartProperty } from '../../../model/part-property.ts';
2
-
3
- declare const _default: import('vue').DefineComponent<__VLS_TypePropsToRuntimeProps<{
4
- property: PartProperty;
5
- value?: string | undefined;
6
- }>, {}, unknown, {}, {}, import('vue').ComponentOptionsMixin, import('vue').ComponentOptionsMixin, {
7
- "update-property-value": (properties: Record<string, string>) => void;
8
- }, string, import('vue').PublicProps, Readonly<import('vue').ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
9
- property: PartProperty;
10
- value?: string | undefined;
11
- }>>> & {
12
- "onUpdate-property-value"?: ((properties: Record<string, string>) => any) | undefined;
13
- }, {}, {}>;
14
- export default _default;
15
- type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
16
- type __VLS_TypePropsToRuntimeProps<T> = {
17
- [K in keyof T]-?: {} extends Pick<T, K> ? {
18
- type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>;
19
- } : {
20
- type: import('vue').PropType<T[K]>;
21
- required: true;
22
- };
23
- };