@bagelink/vue 0.0.134 → 0.0.138

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.
@@ -1,25 +1,20 @@
1
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
2
- context: Record<string, any>;
3
- form: {
4
- sure: string;
5
- delete: string;
6
- cancel: string;
7
- label: string;
8
- email: string;
9
- phone: string;
10
- add: string;
1
+ export interface ContactArrContext {
2
+ label?: string;
3
+ formPlaceholders?: {
4
+ sure?: string;
5
+ delete?: string;
6
+ cancel?: string;
7
+ label?: string;
8
+ email?: string;
9
+ phone?: string;
10
+ add?: string;
11
11
  };
12
+ [key: string]: any;
13
+ }
14
+ declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
15
+ context: ContactArrContext;
12
16
  }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
13
- context: Record<string, any>;
14
- form: {
15
- sure: string;
16
- delete: string;
17
- cancel: string;
18
- label: string;
19
- email: string;
20
- phone: string;
21
- add: string;
22
- };
17
+ context: ContactArrContext;
23
18
  }>>>, {}, {}>;
24
19
  export default _default;
25
20
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
@@ -1 +1 @@
1
- {"version":3,"file":"ContactArrayFormKit.vue.d.ts","sourceRoot":"","sources":["../../../src/components/formkit/ContactArrayFormKit.vue"],"names":[],"mappings":"AA2EA;;aAmUU,OAAO,MAAM,EAAE,GAAG,CAAC;UACtB;QACL,IAAI,EAAE,MAAM,CAAA;QACZ,MAAM,EAAE,MAAM,CAAA;QACd,MAAM,EAAE,MAAM,CAAA;QACd,KAAK,EAAE,MAAM,CAAA;QACb,KAAK,EAAE,MAAM,CAAA;QACb,KAAK,EAAE,MAAM,CAAA;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AC;IACF,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACnB;;aA0SS,iBAAiB;;aAAjB,iBAAiB;;AAF3B,wBAQG;AAGH,KAAK,sBAAsB,CAAC,CAAC,IAAI,CAAC,SAAS,SAAS,GAAG,KAAK,GAAG,CAAC,CAAC;AACjE,KAAK,6BAA6B,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,CAAC,CAAC,GAAG,EAAE,SAAS,IAAI,CAAC,CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC"}
@@ -9,4 +9,5 @@ declare const PersonPreviewInput: import("@formkit/core").FormKitTypeDefinition;
9
9
  export { TextVariablesInput, ContactArrayInput, PersonPreviewInput, AddressInput, BankDetailsInput, MiscFieldsInput, ToggleSwitchInput, FileUploadInput, };
10
10
  export type { BankDetailsContext } from './BankDetailsArray.vue';
11
11
  export type { AddressArrContext } from './AddressArray.vue';
12
+ export type { ContactArrContext } from './ContactArrayFormKit.vue';
12
13
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/formkit/index.ts"],"names":[],"mappings":"AAUA,QAAA,MAAM,iBAAiB,+CAAmC,CAAC;AAC3D,QAAA,MAAM,YAAY,+CAA4B,CAAC;AAC/C,QAAA,MAAM,gBAAgB,+CAAgC,CAAC;AACvD,QAAA,MAAM,eAAe,+CAA8B,CAAC;AACpD,QAAA,MAAM,iBAAiB,+CAAsB,CAAC;AAC9C,QAAA,MAAM,eAAe,+CAA4B,CAAC;AAClD,QAAA,MAAM,kBAAkB,+CAAoC,CAAC;AAC7D,QAAA,MAAM,kBAAkB,+CAAmB,CAAC;AAE5C,OAAO,EACN,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,eAAe,GACf,CAAC;AAEF,YAAW,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAChE,YAAW,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/formkit/index.ts"],"names":[],"mappings":"AAUA,QAAA,MAAM,iBAAiB,+CAAmC,CAAC;AAC3D,QAAA,MAAM,YAAY,+CAA4B,CAAC;AAC/C,QAAA,MAAM,gBAAgB,+CAAgC,CAAC;AACvD,QAAA,MAAM,eAAe,+CAA8B,CAAC;AACpD,QAAA,MAAM,iBAAiB,+CAAsB,CAAC;AAC9C,QAAA,MAAM,eAAe,+CAA4B,CAAC;AAClD,QAAA,MAAM,kBAAkB,+CAAoC,CAAC;AAC7D,QAAA,MAAM,kBAAkB,+CAAmB,CAAC;AAE5C,OAAO,EACN,kBAAkB,EAClB,iBAAiB,EACjB,kBAAkB,EAClB,YAAY,EACZ,gBAAgB,EAChB,eAAe,EACf,iBAAiB,EACjB,eAAe,GACf,CAAC;AAEF,YAAW,EAAE,kBAAkB,EAAE,MAAM,wBAAwB,CAAC;AAChE,YAAW,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAC3D,YAAW,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC"}
@@ -1,14 +1,22 @@
1
1
  import type { FormKitSchemaDefinition } from '@formkit/core';
2
2
  import type { RouteLocationNormalizedLoaded, Router } from 'vue-router';
3
- declare const _default: import("vue").DefineComponent<__VLS_TypePropsToRuntimeProps<{
3
+ declare const _default: import("vue").DefineComponent<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
4
4
  whatsappTemplateSchema: () => FormKitSchemaDefinition;
5
5
  router: Router;
6
6
  route: RouteLocationNormalizedLoaded;
7
- }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_TypePropsToRuntimeProps<{
7
+ previewLabel?: string | undefined;
8
+ }>, {
9
+ previewLabel: string;
10
+ }>, {}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToRuntimeProps<{
8
11
  whatsappTemplateSchema: () => FormKitSchemaDefinition;
9
12
  router: Router;
10
13
  route: RouteLocationNormalizedLoaded;
11
- }>>>, {}, {}>;
14
+ previewLabel?: string | undefined;
15
+ }>, {
16
+ previewLabel: string;
17
+ }>>>, {
18
+ previewLabel: string;
19
+ }, {}>;
12
20
  export default _default;
13
21
  type __VLS_NonUndefinedable<T> = T extends undefined ? never : T;
14
22
  type __VLS_TypePropsToRuntimeProps<T> = {
@@ -19,4 +27,12 @@ type __VLS_TypePropsToRuntimeProps<T> = {
19
27
  required: true;
20
28
  };
21
29
  };
30
+ type __VLS_WithDefaults<P, D> = {
31
+ [K in keyof Pick<P, keyof P>]: K extends keyof D ? __VLS_Prettify<P[K] & {
32
+ default: D[K];
33
+ }> : P[K];
34
+ };
35
+ type __VLS_Prettify<T> = {
36
+ [K in keyof T]: T[K];
37
+ } & {};
22
38
  //# sourceMappingURL=MsgTemplate.vue.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MsgTemplate.vue.d.ts","sourceRoot":"","sources":["../../../../src/components/whatsapp/form/MsgTemplate.vue"],"names":[],"mappings":"AAiCA;AAIA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAC7D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CAAC,EAAE,CAAC,CAAC,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,sBAAsB,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAA;KAAE,GAAG;QAAE,IAAI,EAAE,OAAO,KAAK,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;QAAC,QAAQ,EAAE,IAAI,CAAA;KAAE;CAAE,CAAC;AAC9M,KAAK,kBAAkB,CAAC,CAAC,EAAE,CAAC,IAAI;KAE1B,CAAC,IAAI,MAAM,IAAI,CAAC,CAAC,EAAE,MAAM,CAAC,CAAC,GAAG,CAAC,SAAS,MAAM,CAAC,GAAG,cAAc,CAAC,CAAC,CAAC,CAAC,CAAC,GAAG;QACxE,OAAO,EAAE,CAAC,CAAC,CAAC,CAAC,CAAA;KACb,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CACT,CAAC;AACN,KAAK,cAAc,CAAC,CAAC,IAAI;KAAG,CAAC,IAAI,MAAM,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAAG,GAAG,EAAE,CAAC"}
package/dist/index.cjs CHANGED
@@ -17045,8 +17045,7 @@ const _hoisted_7$7 = ["onUpdate:modelValue", "placeholder"];
17045
17045
  const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
17046
17046
  __name: "ContactArrayFormKit",
17047
17047
  props: {
17048
- context: {},
17049
- form: {}
17048
+ context: {}
17050
17049
  },
17051
17050
  setup(__props) {
17052
17051
  const bagel = useBagel();
@@ -17093,30 +17092,36 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
17093
17092
  return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$C, [
17094
17093
  vue.createElementVNode("div", _hoisted_2$x, [
17095
17094
  (vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(vue.unref(val), (contact, i2) => {
17096
- var _a, _b;
17095
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
17097
17096
  return vue.openBlock(), vue.createElementBlock("div", {
17098
17097
  class: "bglform-contact mb-2",
17099
17098
  key: i2
17100
17099
  }, [
17101
17100
  vue.unref(deleteCandidate) === i2 ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_3$u, [
17102
- vue.createElementVNode("p", _hoisted_4$g, vue.toDisplayString(_ctx.form.sure), 1),
17101
+ vue.createElementVNode("p", _hoisted_4$g, vue.toDisplayString((_b = (_a = _ctx.context) == null ? void 0 : _a.formPlaceholders) == null ? void 0 : _b.sure), 1),
17103
17102
  vue.createVNode(vue.unref(Btn), {
17104
17103
  thin: "",
17105
17104
  color: "red",
17106
17105
  onClick: ($event) => deleteContact(contact.id)
17107
17106
  }, {
17108
- default: vue.withCtx(() => [
17109
- vue.createTextVNode(vue.toDisplayString(_ctx.form.delete), 1)
17110
- ]),
17107
+ default: vue.withCtx(() => {
17108
+ var _a2, _b2;
17109
+ return [
17110
+ vue.createTextVNode(vue.toDisplayString((_b2 = (_a2 = _ctx.context) == null ? void 0 : _a2.formPlaceholders) == null ? void 0 : _b2.delete), 1)
17111
+ ];
17112
+ }),
17111
17113
  _: 2
17112
17114
  }, 1032, ["onClick"]),
17113
17115
  vue.createVNode(vue.unref(Btn), {
17114
17116
  thin: "",
17115
17117
  onClick: _cache[0] || (_cache[0] = ($event) => vue.isRef(deleteCandidate) ? deleteCandidate.value = -1 : deleteCandidate = -1)
17116
17118
  }, {
17117
- default: vue.withCtx(() => [
17118
- vue.createTextVNode(vue.toDisplayString(_ctx.form.cancel), 1)
17119
- ]),
17119
+ default: vue.withCtx(() => {
17120
+ var _a2, _b2;
17121
+ return [
17122
+ vue.createTextVNode(vue.toDisplayString((_b2 = (_a2 = _ctx.context) == null ? void 0 : _a2.formPlaceholders) == null ? void 0 : _b2.cancel), 1)
17123
+ ];
17124
+ }),
17120
17125
  _: 1
17121
17126
  })
17122
17127
  ])) : vue.createCommentVNode("", true),
@@ -17128,22 +17133,22 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
17128
17133
  class: "bglform-contact-label",
17129
17134
  "onUpdate:modelValue": ($event) => contact.label = $event,
17130
17135
  type: "text",
17131
- placeholder: _ctx.form.label
17136
+ placeholder: (_d = (_c = _ctx.context) == null ? void 0 : _c.formPlaceholders) == null ? void 0 : _d.label
17132
17137
  }, null, 8, _hoisted_5$e), [
17133
17138
  [vue.vModelText, contact.label]
17134
17139
  ]),
17135
- ((_a = _ctx.context) == null ? void 0 : _a.id) === "email" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
17140
+ ((_e = _ctx.context) == null ? void 0 : _e.id) === "email" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
17136
17141
  key: 1,
17137
17142
  "onUpdate:modelValue": ($event) => contact.email = $event,
17138
- placeholder: _ctx.form.email,
17143
+ placeholder: (_g = (_f = _ctx.context) == null ? void 0 : _f.formPlaceholders) == null ? void 0 : _g.email,
17139
17144
  type: "email"
17140
17145
  }, null, 8, _hoisted_6$b)), [
17141
17146
  [vue.vModelText, contact.email]
17142
17147
  ]) : vue.createCommentVNode("", true),
17143
- ((_b = _ctx.context) == null ? void 0 : _b.id) === "phone" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
17148
+ ((_h = _ctx.context) == null ? void 0 : _h.id) === "phone" ? vue.withDirectives((vue.openBlock(), vue.createElementBlock("input", {
17144
17149
  key: 2,
17145
17150
  "onUpdate:modelValue": ($event) => contact.phone = $event,
17146
- placeholder: _ctx.form.phone,
17151
+ placeholder: (_j = (_i = _ctx.context) == null ? void 0 : _i.formPlaceholders) == null ? void 0 : _j.phone,
17147
17152
  type: "tel"
17148
17153
  }, null, 8, _hoisted_7$7)), [
17149
17154
  [vue.vModelText, contact.phone]
@@ -17165,9 +17170,9 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
17165
17170
  onClick: _cache[1] || (_cache[1] = ($event) => vue.unref(val).push({}))
17166
17171
  }, {
17167
17172
  default: vue.withCtx(() => {
17168
- var _a;
17173
+ var _a, _b, _c;
17169
17174
  return [
17170
- vue.createTextVNode(vue.toDisplayString(_ctx.form.add) + " " + vue.toDisplayString((_a = _ctx.context) == null ? void 0 : _a.label), 1)
17175
+ vue.createTextVNode(vue.toDisplayString((_b = (_a = _ctx.context) == null ? void 0 : _a.formPlaceholders) == null ? void 0 : _b.add) + " " + vue.toDisplayString((_c = _ctx.context) == null ? void 0 : _c.label), 1)
17171
17176
  ];
17172
17177
  }),
17173
17178
  _: 1
@@ -17177,7 +17182,7 @@ const _sfc_main$t = /* @__PURE__ */ vue.defineComponent({
17177
17182
  };
17178
17183
  }
17179
17184
  });
17180
- const ContactArrayFormKit = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-438c5b36"]]);
17185
+ const ContactArrayFormKit = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-33e63930"]]);
17181
17186
  const _hoisted_1$B = { class: "bagel-input" };
17182
17187
  const _hoisted_2$w = { class: "mt-1" };
17183
17188
  const _hoisted_3$t = {
@@ -28318,9 +28323,10 @@ const _hoisted_7 = { class: "whatsapp-footer" };
28318
28323
  const _sfc_main = /* @__PURE__ */ vue.defineComponent({
28319
28324
  __name: "MsgTemplate",
28320
28325
  props: {
28321
- whatsappTemplateSchema: { type: Function },
28326
+ whatsappTemplateSchema: {},
28322
28327
  router: {},
28323
- route: {}
28328
+ route: {},
28329
+ previewLabel: { default: "Preview" }
28324
28330
  },
28325
28331
  setup(__props) {
28326
28332
  const props2 = __props;
@@ -28433,7 +28439,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
28433
28439
  vue.createElementVNode("div", {
28434
28440
  class: vue.normalizeClass(["whatsapp-preview", { whatsappHebrew: ((_a = vue.unref(localWhatsappData)) == null ? void 0 : _a.language) === "he" }])
28435
28441
  }, [
28436
- vue.createTextVNode(" Preview "),
28442
+ vue.createTextVNode(vue.toDisplayString(_ctx.previewLabel) + " ", 1),
28437
28443
  vue.createElementVNode("div", _hoisted_5, [
28438
28444
  vue.createElementVNode("b", null, vue.toDisplayString((_c = (_b = vue.unref(localWhatsappData)) == null ? void 0 : _b.headerText) == null ? void 0 : _c.replace(regex2, replaceHeader)), 1),
28439
28445
  vue.createElementVNode("p", _hoisted_6, vue.toDisplayString((_e = (_d = vue.unref(localWhatsappData)) == null ? void 0 : _d.bodyText) == null ? void 0 : _e.replace(regex2, replaceBody)), 1),
@@ -28446,7 +28452,7 @@ const _sfc_main = /* @__PURE__ */ vue.defineComponent({
28446
28452
  };
28447
28453
  }
28448
28454
  });
28449
- const MsgTemplate = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b1fdb496"]]);
28455
+ const MsgTemplate = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7031e613"]]);
28450
28456
  exports.AddressInput = AddressInput;
28451
28457
  exports.BagelVue = BagelVue;
28452
28458
  exports.BankDetailsInput = BankDetailsInput;
package/dist/index.mjs CHANGED
@@ -17043,8 +17043,7 @@ const _hoisted_7$7 = ["onUpdate:modelValue", "placeholder"];
17043
17043
  const _sfc_main$t = /* @__PURE__ */ defineComponent({
17044
17044
  __name: "ContactArrayFormKit",
17045
17045
  props: {
17046
- context: {},
17047
- form: {}
17046
+ context: {}
17048
17047
  },
17049
17048
  setup(__props) {
17050
17049
  const bagel = useBagel();
@@ -17091,30 +17090,36 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
17091
17090
  return openBlock(), createElementBlock("div", _hoisted_1$C, [
17092
17091
  createElementVNode("div", _hoisted_2$x, [
17093
17092
  (openBlock(true), createElementBlock(Fragment$1, null, renderList(unref(val), (contact, i2) => {
17094
- var _a, _b;
17093
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j;
17095
17094
  return openBlock(), createElementBlock("div", {
17096
17095
  class: "bglform-contact mb-2",
17097
17096
  key: i2
17098
17097
  }, [
17099
17098
  unref(deleteCandidate) === i2 ? (openBlock(), createElementBlock("div", _hoisted_3$u, [
17100
- createElementVNode("p", _hoisted_4$g, toDisplayString(_ctx.form.sure), 1),
17099
+ createElementVNode("p", _hoisted_4$g, toDisplayString((_b = (_a = _ctx.context) == null ? void 0 : _a.formPlaceholders) == null ? void 0 : _b.sure), 1),
17101
17100
  createVNode(unref(Btn), {
17102
17101
  thin: "",
17103
17102
  color: "red",
17104
17103
  onClick: ($event) => deleteContact(contact.id)
17105
17104
  }, {
17106
- default: withCtx(() => [
17107
- createTextVNode(toDisplayString(_ctx.form.delete), 1)
17108
- ]),
17105
+ default: withCtx(() => {
17106
+ var _a2, _b2;
17107
+ return [
17108
+ createTextVNode(toDisplayString((_b2 = (_a2 = _ctx.context) == null ? void 0 : _a2.formPlaceholders) == null ? void 0 : _b2.delete), 1)
17109
+ ];
17110
+ }),
17109
17111
  _: 2
17110
17112
  }, 1032, ["onClick"]),
17111
17113
  createVNode(unref(Btn), {
17112
17114
  thin: "",
17113
17115
  onClick: _cache[0] || (_cache[0] = ($event) => isRef(deleteCandidate) ? deleteCandidate.value = -1 : deleteCandidate = -1)
17114
17116
  }, {
17115
- default: withCtx(() => [
17116
- createTextVNode(toDisplayString(_ctx.form.cancel), 1)
17117
- ]),
17117
+ default: withCtx(() => {
17118
+ var _a2, _b2;
17119
+ return [
17120
+ createTextVNode(toDisplayString((_b2 = (_a2 = _ctx.context) == null ? void 0 : _a2.formPlaceholders) == null ? void 0 : _b2.cancel), 1)
17121
+ ];
17122
+ }),
17118
17123
  _: 1
17119
17124
  })
17120
17125
  ])) : createCommentVNode("", true),
@@ -17126,22 +17131,22 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
17126
17131
  class: "bglform-contact-label",
17127
17132
  "onUpdate:modelValue": ($event) => contact.label = $event,
17128
17133
  type: "text",
17129
- placeholder: _ctx.form.label
17134
+ placeholder: (_d = (_c = _ctx.context) == null ? void 0 : _c.formPlaceholders) == null ? void 0 : _d.label
17130
17135
  }, null, 8, _hoisted_5$e), [
17131
17136
  [vModelText, contact.label]
17132
17137
  ]),
17133
- ((_a = _ctx.context) == null ? void 0 : _a.id) === "email" ? withDirectives((openBlock(), createElementBlock("input", {
17138
+ ((_e = _ctx.context) == null ? void 0 : _e.id) === "email" ? withDirectives((openBlock(), createElementBlock("input", {
17134
17139
  key: 1,
17135
17140
  "onUpdate:modelValue": ($event) => contact.email = $event,
17136
- placeholder: _ctx.form.email,
17141
+ placeholder: (_g = (_f = _ctx.context) == null ? void 0 : _f.formPlaceholders) == null ? void 0 : _g.email,
17137
17142
  type: "email"
17138
17143
  }, null, 8, _hoisted_6$b)), [
17139
17144
  [vModelText, contact.email]
17140
17145
  ]) : createCommentVNode("", true),
17141
- ((_b = _ctx.context) == null ? void 0 : _b.id) === "phone" ? withDirectives((openBlock(), createElementBlock("input", {
17146
+ ((_h = _ctx.context) == null ? void 0 : _h.id) === "phone" ? withDirectives((openBlock(), createElementBlock("input", {
17142
17147
  key: 2,
17143
17148
  "onUpdate:modelValue": ($event) => contact.phone = $event,
17144
- placeholder: _ctx.form.phone,
17149
+ placeholder: (_j = (_i = _ctx.context) == null ? void 0 : _i.formPlaceholders) == null ? void 0 : _j.phone,
17145
17150
  type: "tel"
17146
17151
  }, null, 8, _hoisted_7$7)), [
17147
17152
  [vModelText, contact.phone]
@@ -17163,9 +17168,9 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
17163
17168
  onClick: _cache[1] || (_cache[1] = ($event) => unref(val).push({}))
17164
17169
  }, {
17165
17170
  default: withCtx(() => {
17166
- var _a;
17171
+ var _a, _b, _c;
17167
17172
  return [
17168
- createTextVNode(toDisplayString(_ctx.form.add) + " " + toDisplayString((_a = _ctx.context) == null ? void 0 : _a.label), 1)
17173
+ createTextVNode(toDisplayString((_b = (_a = _ctx.context) == null ? void 0 : _a.formPlaceholders) == null ? void 0 : _b.add) + " " + toDisplayString((_c = _ctx.context) == null ? void 0 : _c.label), 1)
17169
17174
  ];
17170
17175
  }),
17171
17176
  _: 1
@@ -17175,7 +17180,7 @@ const _sfc_main$t = /* @__PURE__ */ defineComponent({
17175
17180
  };
17176
17181
  }
17177
17182
  });
17178
- const ContactArrayFormKit = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-438c5b36"]]);
17183
+ const ContactArrayFormKit = /* @__PURE__ */ _export_sfc(_sfc_main$t, [["__scopeId", "data-v-33e63930"]]);
17179
17184
  const _hoisted_1$B = { class: "bagel-input" };
17180
17185
  const _hoisted_2$w = { class: "mt-1" };
17181
17186
  const _hoisted_3$t = {
@@ -28316,9 +28321,10 @@ const _hoisted_7 = { class: "whatsapp-footer" };
28316
28321
  const _sfc_main = /* @__PURE__ */ defineComponent({
28317
28322
  __name: "MsgTemplate",
28318
28323
  props: {
28319
- whatsappTemplateSchema: { type: Function },
28324
+ whatsappTemplateSchema: {},
28320
28325
  router: {},
28321
- route: {}
28326
+ route: {},
28327
+ previewLabel: { default: "Preview" }
28322
28328
  },
28323
28329
  setup(__props) {
28324
28330
  const props2 = __props;
@@ -28431,7 +28437,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28431
28437
  createElementVNode("div", {
28432
28438
  class: normalizeClass(["whatsapp-preview", { whatsappHebrew: ((_a = unref(localWhatsappData)) == null ? void 0 : _a.language) === "he" }])
28433
28439
  }, [
28434
- createTextVNode(" Preview "),
28440
+ createTextVNode(toDisplayString(_ctx.previewLabel) + " ", 1),
28435
28441
  createElementVNode("div", _hoisted_5, [
28436
28442
  createElementVNode("b", null, toDisplayString((_c = (_b = unref(localWhatsappData)) == null ? void 0 : _b.headerText) == null ? void 0 : _c.replace(regex2, replaceHeader)), 1),
28437
28443
  createElementVNode("p", _hoisted_6, toDisplayString((_e = (_d = unref(localWhatsappData)) == null ? void 0 : _d.bodyText) == null ? void 0 : _e.replace(regex2, replaceBody)), 1),
@@ -28444,7 +28450,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
28444
28450
  };
28445
28451
  }
28446
28452
  });
28447
- const MsgTemplate = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-b1fdb496"]]);
28453
+ const MsgTemplate = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-7031e613"]]);
28448
28454
  export {
28449
28455
  AddressInput,
28450
28456
  BagelVue,
package/dist/style.css CHANGED
@@ -1159,34 +1159,34 @@ th[data-v-fa7146ce] {
1159
1159
  border: none;
1160
1160
  }
1161
1161
 
1162
- .bglform-contact[data-v-438c5b36] {
1162
+ .bglform-contact[data-v-33e63930] {
1163
1163
  display: flex;
1164
1164
  align-items: center;
1165
1165
  gap: 0.5rem;
1166
1166
  max-width: 700px;
1167
1167
  position: relative;
1168
1168
  }
1169
- .bglform-contact-label[data-v-438c5b36] {
1169
+ .bglform-contact-label[data-v-33e63930] {
1170
1170
  flex-basis: 140px;
1171
1171
  }
1172
- .bglform-contact input[type='checkbox'][data-v-438c5b36] {
1172
+ .bglform-contact input[type='checkbox'][data-v-33e63930] {
1173
1173
  width: 30px;
1174
1174
  min-width: 0;
1175
1175
  }
1176
- .light.thin.btn-txt.btn[data-v-438c5b36] {
1176
+ .light.thin.btn-txt.btn[data-v-33e63930] {
1177
1177
  padding-left: calc(var(--btn-padding) / 4);
1178
1178
  padding-right: calc(var(--btn-padding) / 4);
1179
1179
  }
1180
- .add-btn[data-v-438c5b36] {
1180
+ .add-btn[data-v-33e63930] {
1181
1181
  display: flex;
1182
1182
  gap: 0.5rem;
1183
1183
  align-items: center;
1184
1184
  margin-inline-start: 1rem;
1185
1185
  }
1186
- .add-btn[data-v-438c5b36]:active {
1186
+ .add-btn[data-v-33e63930]:active {
1187
1187
  background: none !important;
1188
1188
  }
1189
- .add-btn[data-v-438c5b36]::before {
1189
+ .add-btn[data-v-33e63930]::before {
1190
1190
  content: '+';
1191
1191
  font-size: 10px;
1192
1192
  background: var(--bgl-blue-light);
@@ -1198,12 +1198,12 @@ th[data-v-fa7146ce] {
1198
1198
  justify-content: center;
1199
1199
  color: var(--bgl-blue);
1200
1200
  }
1201
- .add-btn[data-v-438c5b36]:hover::before {
1201
+ .add-btn[data-v-33e63930]:hover::before {
1202
1202
  background: var(--bgl-blue);
1203
1203
  color: var(--bgl-white);
1204
1204
  }
1205
1205
  @media screen and (max-width: 910px) {
1206
- .bglform-contact-label[data-v-438c5b36] {
1206
+ .bglform-contact-label[data-v-33e63930] {
1207
1207
  min-width: 0;
1208
1208
  }
1209
1209
  }
@@ -2225,10 +2225,10 @@ input[type='email'][data-v-ed81a514] {
2225
2225
  }
2226
2226
  }
2227
2227
 
2228
- .btn-end[data-v-b1fdb496] {
2228
+ .btn-end[data-v-7031e613] {
2229
2229
  text-align: end;
2230
2230
  }
2231
- .whatsapp-preview[data-v-b1fdb496] {
2231
+ .whatsapp-preview[data-v-7031e613] {
2232
2232
  direction: ltr;
2233
2233
  width: 400px;
2234
2234
  padding: 1rem;
@@ -2240,18 +2240,18 @@ input[type='email'][data-v-ed81a514] {
2240
2240
  top: 15px;
2241
2241
  flex: 1 1 40%;
2242
2242
  }
2243
- .whatsapp-wrap[data-v-b1fdb496] {
2243
+ .whatsapp-wrap[data-v-7031e613] {
2244
2244
  display: flex;
2245
2245
  gap: 1rem;
2246
2246
  max-width: 1200px;
2247
2247
  overflow: auto;
2248
2248
  height: 100%;
2249
2249
  }
2250
- .create-template-form[data-v-b1fdb496] {
2250
+ .create-template-form[data-v-7031e613] {
2251
2251
  flex: 1 0 50%;
2252
2252
  min-width: 300px;
2253
2253
  }
2254
- .whatsapp-msg[data-v-b1fdb496] {
2254
+ .whatsapp-msg[data-v-7031e613] {
2255
2255
  background: var(--whatsapp-green);
2256
2256
  border-radius: 0.5rem;
2257
2257
  border-start-start-radius: 0px;
@@ -2262,7 +2262,7 @@ input[type='email'][data-v-ed81a514] {
2262
2262
  position: relative;
2263
2263
  min-height: 30px;
2264
2264
  }
2265
- .whatsapp-msg[data-v-b1fdb496]::after {
2265
+ .whatsapp-msg[data-v-7031e613]::after {
2266
2266
  content: '';
2267
2267
  inset-inline-start: -5px;
2268
2268
  border-radius: 0.1rem;
@@ -2273,27 +2273,27 @@ input[type='email'][data-v-ed81a514] {
2273
2273
  background: var(--whatsapp-green);
2274
2274
  position: absolute;
2275
2275
  }
2276
- .whatsapp-body[data-v-b1fdb496] {
2276
+ .whatsapp-body[data-v-7031e613] {
2277
2277
  margin: 2px 0;
2278
2278
  }
2279
- .whatsapp-footer[data-v-b1fdb496] {
2279
+ .whatsapp-footer[data-v-7031e613] {
2280
2280
  margin: 0;
2281
2281
  opacity: 0.6;
2282
2282
  font-size: 0.8rem;
2283
2283
  }
2284
- .whatsappHebrew[data-v-b1fdb496] {
2284
+ .whatsappHebrew[data-v-7031e613] {
2285
2285
  direction: rtl;
2286
2286
  }
2287
- .whatsappHebrew .whatsapp-msg[data-v-b1fdb496]::after {
2287
+ .whatsappHebrew .whatsapp-msg[data-v-7031e613]::after {
2288
2288
  transform: skew(-45deg);
2289
2289
  }
2290
2290
  @media screen and (max-width: 1200px) {
2291
- .whatsapp-preview[data-v-b1fdb496] {
2291
+ .whatsapp-preview[data-v-7031e613] {
2292
2292
  width: 300px;
2293
2293
  }
2294
2294
  }
2295
2295
  @media screen and (max-width: 910px) {
2296
- .whatsapp-preview[data-v-b1fdb496] {
2296
+ .whatsapp-preview[data-v-7031e613] {
2297
2297
  display: none;
2298
2298
  }
2299
2299
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@bagelink/vue",
3
3
  "type": "module",
4
- "version": "0.0.134",
4
+ "version": "0.0.138",
5
5
  "description": "Bagel core sdk packages",
6
6
  "author": {
7
7
  "name": "Neveh Allon",
@@ -11,20 +11,20 @@
11
11
  v-if="deleteCandidate === i"
12
12
  >
13
13
  <p class="txt14">
14
- {{ form.sure }}
14
+ {{ context?.formPlaceholders?.sure }}
15
15
  </p>
16
16
  <Btn
17
17
  thin
18
18
  color="red"
19
19
  @click="deleteContact(contact.id)"
20
20
  >
21
- {{ form.delete }}
21
+ {{ context?.formPlaceholders?.delete }}
22
22
  </Btn>
23
23
  <Btn
24
24
  thin
25
25
  @click="deleteCandidate = -1"
26
26
  >
27
- {{ form.cancel }}
27
+ {{ context?.formPlaceholders?.cancel }}
28
28
  </Btn>
29
29
  </div>
30
30
  <Checkbox
@@ -35,18 +35,18 @@
35
35
  class="bglform-contact-label"
36
36
  v-model="contact.label"
37
37
  type="text"
38
- :placeholder="form.label"
38
+ :placeholder="context?.formPlaceholders?.label"
39
39
  >
40
40
 
41
41
  <input
42
42
  v-model="contact.email"
43
- :placeholder="form.email"
43
+ :placeholder="context?.formPlaceholders?.email"
44
44
  v-if="context?.id === 'email'"
45
45
  type="email"
46
46
  >
47
47
  <input
48
48
  v-model="contact.phone"
49
- :placeholder="form.phone"
49
+ :placeholder="context?.formPlaceholders?.phone"
50
50
  v-if="context?.id === 'phone'"
51
51
  type="tel"
52
52
  >
@@ -68,7 +68,7 @@
68
68
  thin
69
69
  @click="val.push({})"
70
70
  >
71
- {{ form.add }} {{ context?.label }}
71
+ {{ context?.formPlaceholders?.add }} {{ context?.label }}
72
72
  </Btn>
73
73
  </div>
74
74
  </div>
@@ -81,19 +81,23 @@ import { watch } from 'vue';
81
81
  import { Btn, useBagel } from '@bagelink/vue';
82
82
  import Checkbox from '../form/inputs/Checkbox.vue';
83
83
 
84
+ export interface ContactArrContext {
85
+ label?: string;
86
+ formPlaceholders?: {
87
+ sure?: string
88
+ delete?: string
89
+ cancel?: string
90
+ label?: string
91
+ email?: string
92
+ phone?: string
93
+ add?: string
94
+ };
95
+ [key: string]: any;
96
+ }
84
97
  const bagel = useBagel();
85
98
 
86
99
  const props = defineProps<{
87
- context: Record<string, any>;
88
- form: {
89
- sure: string
90
- delete: string
91
- cancel: string
92
- label: string
93
- email: string
94
- phone: string
95
- add: string
96
- }
100
+ context: ContactArrContext
97
101
  }>();
98
102
 
99
103
  let val = $ref<any[]>([]);
@@ -30,3 +30,4 @@ export {
30
30
 
31
31
  export type{ BankDetailsContext } from './BankDetailsArray.vue';
32
32
  export type{ AddressArrContext } from './AddressArray.vue';
33
+ export type{ ContactArrContext } from './ContactArrayFormKit.vue';
@@ -14,7 +14,7 @@
14
14
  class="whatsapp-preview"
15
15
  :class="{ whatsappHebrew: localWhatsappData?.language === 'he' }"
16
16
  >
17
- Preview
17
+ {{ previewLabel }}
18
18
  <div class="whatsapp-msg">
19
19
  <b>{{
20
20
  localWhatsappData?.headerText?.replace(regex, replaceHeader)
@@ -46,11 +46,15 @@ import {
46
46
  FooterComponent,
47
47
  } from '../interfaces';
48
48
 
49
- const props = defineProps<{
50
- whatsappTemplateSchema: () => FormKitSchemaDefinition;
51
- router: Router;
52
- route: RouteLocationNormalizedLoaded;
53
- }>();
49
+ const props = withDefaults(
50
+ defineProps<{
51
+ whatsappTemplateSchema: () => FormKitSchemaDefinition;
52
+ router: Router;
53
+ route: RouteLocationNormalizedLoaded;
54
+ previewLabel?: string;
55
+ }>(),
56
+ { previewLabel: 'Preview' },
57
+ );
54
58
 
55
59
  const bagel = useBagel();
56
60