@stsdti/funky-ui-kit 1.4.2 → 1.4.4
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/dist/funky-ui-kit.es.js +33 -22
- package/dist/funky-ui-kit.es.js.map +1 -1
- package/package.json +1 -1
- package/web-types.json +9 -1
package/dist/funky-ui-kit.es.js
CHANGED
|
@@ -8064,7 +8064,7 @@ function toPathString(pathArray) {
|
|
|
8064
8064
|
}
|
|
8065
8065
|
}, "");
|
|
8066
8066
|
}
|
|
8067
|
-
function bindOneWay(source, destination, { sourcePath = null, destinationPath = null, immutable = true, immediate = true, deep = true } = {}) {
|
|
8067
|
+
function bindOneWay(source, destination, { sourcePath = null, destinationPath = null, immutable = true, immediate = true, deep = true, transform = null } = {}) {
|
|
8068
8068
|
if (isReactive(source) || isReactive(destination)) {
|
|
8069
8069
|
immutable = false;
|
|
8070
8070
|
}
|
|
@@ -8075,17 +8075,18 @@ function bindOneWay(source, destination, { sourcePath = null, destinationPath =
|
|
|
8075
8075
|
return immutable ? lodashExports.cloneDeep(val) : val;
|
|
8076
8076
|
},
|
|
8077
8077
|
(newValue) => {
|
|
8078
|
+
let result = transform ? transform(newValue) : newValue;
|
|
8078
8079
|
const rawDestination = unref(destination);
|
|
8079
8080
|
if (!destinationPath) {
|
|
8080
|
-
destination.value = immutable ? lodashExports.cloneDeep(
|
|
8081
|
+
destination.value = immutable ? lodashExports.cloneDeep(result) : result;
|
|
8081
8082
|
return;
|
|
8082
8083
|
}
|
|
8083
8084
|
if (immutable) {
|
|
8084
8085
|
const cloned = lodashExports.cloneDeep(rawDestination);
|
|
8085
|
-
lodashExports.set(cloned, destinationPath, lodashExports.cloneDeep(
|
|
8086
|
+
lodashExports.set(cloned, destinationPath, lodashExports.cloneDeep(result));
|
|
8086
8087
|
destination.value = cloned;
|
|
8087
8088
|
} else {
|
|
8088
|
-
lodashExports.set(rawDestination, destinationPath,
|
|
8089
|
+
lodashExports.set(rawDestination, destinationPath, result);
|
|
8089
8090
|
}
|
|
8090
8091
|
},
|
|
8091
8092
|
{ immediate, deep }
|
|
@@ -29325,10 +29326,13 @@ function useTableFilters(tableFilters, emits) {
|
|
|
29325
29326
|
fromUrl ? filters.value[bagKey] = fromUrl : null;
|
|
29326
29327
|
}
|
|
29327
29328
|
}
|
|
29328
|
-
const setFilterWithLock = (
|
|
29329
|
-
|
|
29330
|
-
|
|
29331
|
-
|
|
29329
|
+
const setFilterWithLock = (dictionary) => {
|
|
29330
|
+
const fields = Object.keys(dictionary);
|
|
29331
|
+
Object.assign(filters.value, dictionary);
|
|
29332
|
+
blockedFilters.value = [.../* @__PURE__ */ new Set([...blockedFilters.value, ...fields])];
|
|
29333
|
+
for (const field of fields) {
|
|
29334
|
+
setPayloadIsDisabled(field);
|
|
29335
|
+
}
|
|
29332
29336
|
};
|
|
29333
29337
|
const externalContext = {
|
|
29334
29338
|
// Refs
|
|
@@ -81511,11 +81515,9 @@ const _sfc_main$7 = {
|
|
|
81511
81515
|
index
|
|
81512
81516
|
}, () => [
|
|
81513
81517
|
createVNode(_component_app_button, {
|
|
81514
|
-
|
|
81515
|
-
onClick: ($event) => _ctx.$emit(
|
|
81516
|
-
|
|
81517
|
-
action.name === "removed" ? index : { file, index }
|
|
81518
|
-
)
|
|
81518
|
+
disabled: action.name === "removed" && __props.disabled,
|
|
81519
|
+
onClick: ($event) => _ctx.$emit(action.emit, action.name === "removed" ? index : { file, index }),
|
|
81520
|
+
class: "btn-transparent"
|
|
81519
81521
|
}, {
|
|
81520
81522
|
icon: withCtx(() => [
|
|
81521
81523
|
createVNode(_component_app_icon, {
|
|
@@ -81523,7 +81525,7 @@ const _sfc_main$7 = {
|
|
|
81523
81525
|
}, null, 8, ["value"])
|
|
81524
81526
|
]),
|
|
81525
81527
|
_: 2
|
|
81526
|
-
}, 1032, ["onClick"])
|
|
81528
|
+
}, 1032, ["disabled", "onClick"])
|
|
81527
81529
|
]);
|
|
81528
81530
|
}), 64))
|
|
81529
81531
|
])) : createCommentVNode("", true)
|
|
@@ -82667,6 +82669,10 @@ const _sfc_main = {
|
|
|
82667
82669
|
__name: "AppBoard",
|
|
82668
82670
|
props: /* @__PURE__ */ mergeModels({
|
|
82669
82671
|
list: {},
|
|
82672
|
+
isMultiSelect: {
|
|
82673
|
+
type: Boolean,
|
|
82674
|
+
default: false
|
|
82675
|
+
},
|
|
82670
82676
|
cellWidth: {
|
|
82671
82677
|
default: 150
|
|
82672
82678
|
}
|
|
@@ -82676,20 +82682,25 @@ const _sfc_main = {
|
|
|
82676
82682
|
}),
|
|
82677
82683
|
emits: ["update:modelValue"],
|
|
82678
82684
|
setup(__props) {
|
|
82679
|
-
const selectedCells = useModel(__props, "modelValue");
|
|
82680
82685
|
const props2 = __props;
|
|
82686
|
+
const modelValue = useModel(__props, "modelValue", {
|
|
82687
|
+
get: (value) => {
|
|
82688
|
+
return makeArray(value);
|
|
82689
|
+
},
|
|
82690
|
+
set: (value) => {
|
|
82691
|
+
return props2.isMultiSelect ? value : lodashExports.head(value);
|
|
82692
|
+
}
|
|
82693
|
+
});
|
|
82681
82694
|
const isSelected = (item) => {
|
|
82682
|
-
return
|
|
82695
|
+
return modelValue.value.some((selectedItem) => lodashExports.isEqual(selectedItem, item));
|
|
82683
82696
|
};
|
|
82684
82697
|
const selectCell = (item) => {
|
|
82685
|
-
|
|
82686
|
-
|
|
82687
|
-
|
|
82688
|
-
|
|
82689
|
-
selectedCells.value = [...selectedCells.value, item];
|
|
82698
|
+
let newValue;
|
|
82699
|
+
newValue = isSelected(item) ? modelValue.value.filter((selectedItem) => !lodashExports.isEqual(selectedItem, item)) : [...modelValue.value, item];
|
|
82700
|
+
newValue = props2.isMultiSelect ? newValue : lodashExports.tail(newValue);
|
|
82701
|
+
modelValue.value = newValue;
|
|
82690
82702
|
};
|
|
82691
82703
|
const boardStyle = computed(() => ({
|
|
82692
|
-
"app-board": true,
|
|
82693
82704
|
gridTemplateColumns: `repeat(auto-fill, ${props2.cellWidth}px)`
|
|
82694
82705
|
}));
|
|
82695
82706
|
const getCellClass = (item) => {
|