@stsdti/funky-ui-kit 1.4.3 → 1.4.5

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.
@@ -81328,8 +81328,8 @@ const _sfc_main$8 = {
81328
81328
  __name: "AppFormModal",
81329
81329
  props: {
81330
81330
  form: {},
81331
- title: {
81332
- default: "Editare / Creare"
81331
+ resourceName: {
81332
+ default: "resursă"
81333
81333
  },
81334
81334
  buttons: {},
81335
81335
  clickToClose: {
@@ -81341,6 +81341,10 @@ const _sfc_main$8 = {
81341
81341
  setup(__props, { expose: __expose, emit: __emit }) {
81342
81342
  const emits = __emit;
81343
81343
  const props2 = __props;
81344
+ const title = computed(() => {
81345
+ var _a3;
81346
+ return (((_a3 = formContext.item) == null ? void 0 : _a3.id) ? "Editare" : "Creare") + " " + props2.resourceName;
81347
+ });
81344
81348
  let formContext = reactive({});
81345
81349
  const isModalVisible = ref(false);
81346
81350
  const button = {
@@ -81397,7 +81401,7 @@ const _sfc_main$8 = {
81397
81401
  class: "animated fadeIn"
81398
81402
  }, {
81399
81403
  title: withCtx(() => [
81400
- createElementVNode("div", null, toDisplayString(__props.title), 1)
81404
+ createElementVNode("div", null, toDisplayString(title.value), 1)
81401
81405
  ]),
81402
81406
  "heading-elements": withCtx(() => [
81403
81407
  createVNode(_component_app_button_group, { value: buttonsList.value }, null, 8, ["value"])
@@ -82669,6 +82673,10 @@ const _sfc_main = {
82669
82673
  __name: "AppBoard",
82670
82674
  props: /* @__PURE__ */ mergeModels({
82671
82675
  list: {},
82676
+ isMultiSelect: {
82677
+ type: Boolean,
82678
+ default: false
82679
+ },
82672
82680
  cellWidth: {
82673
82681
  default: 150
82674
82682
  }
@@ -82678,20 +82686,25 @@ const _sfc_main = {
82678
82686
  }),
82679
82687
  emits: ["update:modelValue"],
82680
82688
  setup(__props) {
82681
- const selectedCells = useModel(__props, "modelValue");
82682
82689
  const props2 = __props;
82690
+ const modelValue = useModel(__props, "modelValue", {
82691
+ get: (value) => {
82692
+ return makeArray(value);
82693
+ },
82694
+ set: (value) => {
82695
+ return props2.isMultiSelect ? value : lodashExports.head(value);
82696
+ }
82697
+ });
82683
82698
  const isSelected = (item) => {
82684
- return selectedCells.value.some((selectedItem) => lodashExports.isEqual(selectedItem, item));
82699
+ return modelValue.value.some((selectedItem) => lodashExports.isEqual(selectedItem, item));
82685
82700
  };
82686
82701
  const selectCell = (item) => {
82687
- if (isSelected(item)) {
82688
- selectedCells.value = selectedCells.value.filter((selectedItem) => !lodashExports.isEqual(selectedItem, item));
82689
- return;
82690
- }
82691
- selectedCells.value = [...selectedCells.value, item];
82702
+ let newValue;
82703
+ newValue = isSelected(item) ? modelValue.value.filter((selectedItem) => !lodashExports.isEqual(selectedItem, item)) : [...modelValue.value, item];
82704
+ newValue = props2.isMultiSelect ? newValue : lodashExports.tail(newValue);
82705
+ modelValue.value = newValue;
82692
82706
  };
82693
82707
  const boardStyle = computed(() => ({
82694
- "app-board": true,
82695
82708
  gridTemplateColumns: `repeat(auto-fill, ${props2.cellWidth}px)`
82696
82709
  }));
82697
82710
  const getCellClass = (item) => {