knt-shared 1.6.7 → 1.6.8

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 +1 @@
1
- {"version":3,"file":"BasicForm.vue.d.ts","sourceRoot":"","sources":["../../../src/components/Form/BasicForm.vue"],"names":[],"mappings":"AAuHA;AAeA,OAAO,KAAK,EAAC,UAAU,EAAE,cAAc,EAAiB,MAAM,SAAS,CAAC;AA4iBxE,iBAAS,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MA0W+D,GAAG;qBAE1D,GAAG;EAGjC;AA+BD,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;0BA9pBc;QACjC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;QAC5B,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KAC9B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;0BA5K4B,UAAU;mCAMD,UAAU;;;;;;;;;;;iCAoCZ,UAAU;0BAyKnB,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;6BAKd,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC;;;4BA4BpB,MAAM,GAAG,MAAM,EAAE;2BAKlB,OAAO,CAAC,UAAU,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,EAAE;0BAgC5C,MAAM,GAAG,MAAM,EAAE;wBAcnB,MAAM,KAAG,UAAU,GAAG,UAAU,EAAE,GAAG,SAAS;2BAU3C,UAAU,EAAE;0BAMb,OAAO,CAAC,cAAc,CAAC;0BAYvB,MAAM,YAAY,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;4EA4gBlE,CAAC;wBACkB,uBAAuB,CAAC,OAAO,eAAe,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;AAAvG,wBAAwG;AACxG,KAAK,sBAAsB,CAAC,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E,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;AACxD,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,IAAI,CAAC,GAAG;IAAE,QAAO;QAClD,MAAM,EAAE,CAAC,CAAC;KACT,CAAA;CAAE,CAAC"}
package/dist/index.cjs.js CHANGED
@@ -4311,21 +4311,18 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
4311
4311
  }
4312
4312
  return (component == null ? void 0 : component.name) || "Input";
4313
4313
  };
4314
- const isVNodeChild = (value) => {
4315
- return vue.isVNode(value) || typeof value === "string" || typeof value === "number";
4316
- };
4317
- const renderSlotContent = (slotConfig2, slotData) => {
4318
- if (isVNodeChild(slotConfig2)) {
4319
- return slotConfig2;
4314
+ const renderSlotContent = (slotConfig, slotData) => {
4315
+ if (vue.isVNode(slotConfig)) {
4316
+ return slotConfig;
4317
+ }
4318
+ if (typeof slotConfig === "string" || typeof slotConfig === "number") {
4319
+ return vue.h("span", String(slotConfig));
4320
4320
  }
4321
- if (typeof slotConfig2 === "function") {
4322
- return slotConfig2(slotData, formModel);
4321
+ if (typeof slotConfig === "function") {
4322
+ return slotConfig(slotData, formModel);
4323
4323
  }
4324
4324
  return null;
4325
4325
  };
4326
- const hasComponentSlots = (schema) => {
4327
- return !!(schema.componentSlots && Object.keys(schema.componentSlots).length > 0);
4328
- };
4329
4326
  const handleSubmit = async (data) => {
4330
4327
  try {
4331
4328
  submitLoading.value = true;
@@ -4553,13 +4550,14 @@ const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent({
4553
4550
  "onUpdate:modelValue": ($event) => formModel[schema.field] = $event,
4554
4551
  placeholder: getPlaceholderText(schema)
4555
4552
  }, { ref_for: true }, getComponentProps(schema)), vue.createSlots({ _: 2 }, [
4556
- hasComponentSlots(schema) ? {
4557
- name: slotName,
4558
- fn: vue.withCtx((slotData) => [
4559
- (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(renderSlotContent(slotConfig, slotData))))
4560
- ]),
4561
- key: "0"
4562
- } : void 0
4553
+ vue.renderList(schema.componentSlots, (slotConfig, slotName) => {
4554
+ return {
4555
+ name: slotName,
4556
+ fn: vue.withCtx((slotData) => [
4557
+ (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(renderSlotContent(slotConfig, slotData))))
4558
+ ])
4559
+ };
4560
+ })
4563
4561
  ]), 1040, ["modelValue", "onUpdate:modelValue", "placeholder"]))
4564
4562
  ];
4565
4563
  }),
@@ -6018,8 +6016,8 @@ const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent({
6018
6016
  });
6019
6017
  return result;
6020
6018
  });
6021
- const getFormSlotName = (slotName2) => {
6022
- const name = slotName2.toString();
6019
+ const getFormSlotName = (slotName) => {
6020
+ const name = slotName.toString();
6023
6021
  return name.startsWith("form-") ? name.slice(5) : name;
6024
6022
  };
6025
6023
  const tableRef = vue.ref();