fds-vue-core 6.0.10 → 6.0.13
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/apply.css +1 -1
- package/dist/fds-vue-core.cjs.js +69 -36
- package/dist/fds-vue-core.cjs.js.map +1 -1
- package/dist/fds-vue-core.css +1 -1
- package/dist/fds-vue-core.es.js +69 -36
- package/dist/fds-vue-core.es.js.map +1 -1
- package/package.json +42 -22
- package/scripts/vuln-commit.mjs +129 -0
- package/src/apply.css +1 -1
- package/src/components/FdsSearchSelectPro/FdsSearchSelectPro.stories.ts +60 -30
- package/src/components/FdsSearchSelectPro/FdsSearchSelectPro.vue +18 -33
- package/src/components/FdsSearchSelectPro/types.ts +2 -0
- package/src/components/FdsSearchSelectPro/useSearchSelectProItems.ts +5 -0
- package/src/style.css +1 -1
package/dist/apply.css
CHANGED
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
}
|
|
40
40
|
.link,
|
|
41
41
|
.html a {
|
|
42
|
-
@apply text-blue-600 hover:text-blue-700 active:text-blue-800 underline focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500;
|
|
42
|
+
@apply text-blue-600 hover:text-blue-700 active:text-blue-800 underline focus-visible:outline-dashed focus-visible:outline-2 focus-visible:outline-offset-4 focus-visible:outline-blue-500 cursor-pointer;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
45
|
.link--with-parens::before {
|
package/dist/fds-vue-core.cjs.js
CHANGED
|
@@ -2510,14 +2510,38 @@ const parseHeaders = (rawHeaders) => {
|
|
|
2510
2510
|
return parsed;
|
|
2511
2511
|
};
|
|
2512
2512
|
const $internals = /* @__PURE__ */ Symbol("internals");
|
|
2513
|
+
const isValidHeaderValue = (value) => !/[\r\n]/.test(value);
|
|
2514
|
+
function assertValidHeaderValue(value, header) {
|
|
2515
|
+
if (value === false || value == null) {
|
|
2516
|
+
return;
|
|
2517
|
+
}
|
|
2518
|
+
if (utils$1.isArray(value)) {
|
|
2519
|
+
value.forEach((v) => assertValidHeaderValue(v, header));
|
|
2520
|
+
return;
|
|
2521
|
+
}
|
|
2522
|
+
if (!isValidHeaderValue(String(value))) {
|
|
2523
|
+
throw new Error(`Invalid character in header content ["${header}"]`);
|
|
2524
|
+
}
|
|
2525
|
+
}
|
|
2513
2526
|
function normalizeHeader(header) {
|
|
2514
2527
|
return header && String(header).trim().toLowerCase();
|
|
2515
2528
|
}
|
|
2529
|
+
function stripTrailingCRLF(str) {
|
|
2530
|
+
let end = str.length;
|
|
2531
|
+
while (end > 0) {
|
|
2532
|
+
const charCode = str.charCodeAt(end - 1);
|
|
2533
|
+
if (charCode !== 10 && charCode !== 13) {
|
|
2534
|
+
break;
|
|
2535
|
+
}
|
|
2536
|
+
end -= 1;
|
|
2537
|
+
}
|
|
2538
|
+
return end === str.length ? str : str.slice(0, end);
|
|
2539
|
+
}
|
|
2516
2540
|
function normalizeValue(value) {
|
|
2517
2541
|
if (value === false || value == null) {
|
|
2518
2542
|
return value;
|
|
2519
2543
|
}
|
|
2520
|
-
return utils$1.isArray(value) ? value.map(normalizeValue) : String(value);
|
|
2544
|
+
return utils$1.isArray(value) ? value.map(normalizeValue) : stripTrailingCRLF(String(value));
|
|
2521
2545
|
}
|
|
2522
2546
|
function parseTokens(str) {
|
|
2523
2547
|
const tokens = /* @__PURE__ */ Object.create(null);
|
|
@@ -2573,6 +2597,7 @@ let AxiosHeaders$1 = class AxiosHeaders {
|
|
|
2573
2597
|
}
|
|
2574
2598
|
const key = utils$1.findKey(self2, lHeader);
|
|
2575
2599
|
if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
|
|
2600
|
+
assertValidHeaderValue(_value, _header);
|
|
2576
2601
|
self2[key || _header] = normalizeValue(_value);
|
|
2577
2602
|
}
|
|
2578
2603
|
}
|
|
@@ -3366,14 +3391,16 @@ const factory = (env) => {
|
|
|
3366
3391
|
const encodeText = isFetchSupported && (typeof TextEncoder === "function" ? /* @__PURE__ */ ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) : async (str) => new Uint8Array(await new Request(str).arrayBuffer()));
|
|
3367
3392
|
const supportsRequestStream = isRequestSupported && isReadableStreamSupported && test(() => {
|
|
3368
3393
|
let duplexAccessed = false;
|
|
3394
|
+
const body = new ReadableStream$1();
|
|
3369
3395
|
const hasContentType = new Request(platform.origin, {
|
|
3370
|
-
body
|
|
3396
|
+
body,
|
|
3371
3397
|
method: "POST",
|
|
3372
3398
|
get duplex() {
|
|
3373
3399
|
duplexAccessed = true;
|
|
3374
3400
|
return "half";
|
|
3375
3401
|
}
|
|
3376
3402
|
}).headers.has("Content-Type");
|
|
3403
|
+
body.cancel();
|
|
3377
3404
|
return duplexAccessed && !hasContentType;
|
|
3378
3405
|
});
|
|
3379
3406
|
const supportsResponseStream = isResponseSupported && isReadableStreamSupported && test(() => utils$1.isReadableStream(new Response("").body));
|
|
@@ -3655,7 +3682,7 @@ function dispatchRequest(config) {
|
|
|
3655
3682
|
}
|
|
3656
3683
|
);
|
|
3657
3684
|
}
|
|
3658
|
-
const VERSION$1 = "1.
|
|
3685
|
+
const VERSION$1 = "1.15.0";
|
|
3659
3686
|
const validators$1 = {};
|
|
3660
3687
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((type, i) => {
|
|
3661
3688
|
validators$1[type] = function validator2(thing) {
|
|
@@ -3745,12 +3772,23 @@ let Axios$1 = class Axios {
|
|
|
3745
3772
|
if (err instanceof Error) {
|
|
3746
3773
|
let dummy = {};
|
|
3747
3774
|
Error.captureStackTrace ? Error.captureStackTrace(dummy) : dummy = new Error();
|
|
3748
|
-
const stack =
|
|
3775
|
+
const stack = (() => {
|
|
3776
|
+
if (!dummy.stack) {
|
|
3777
|
+
return "";
|
|
3778
|
+
}
|
|
3779
|
+
const firstNewlineIndex = dummy.stack.indexOf("\n");
|
|
3780
|
+
return firstNewlineIndex === -1 ? "" : dummy.stack.slice(firstNewlineIndex + 1);
|
|
3781
|
+
})();
|
|
3749
3782
|
try {
|
|
3750
3783
|
if (!err.stack) {
|
|
3751
3784
|
err.stack = stack;
|
|
3752
|
-
} else if (stack
|
|
3753
|
-
|
|
3785
|
+
} else if (stack) {
|
|
3786
|
+
const firstNewlineIndex = stack.indexOf("\n");
|
|
3787
|
+
const secondNewlineIndex = firstNewlineIndex === -1 ? -1 : stack.indexOf("\n", firstNewlineIndex + 1);
|
|
3788
|
+
const stackWithoutTwoTopLines = secondNewlineIndex === -1 ? "" : stack.slice(secondNewlineIndex + 1);
|
|
3789
|
+
if (!String(err.stack).endsWith(stackWithoutTwoTopLines)) {
|
|
3790
|
+
err.stack += "\n" + stack;
|
|
3791
|
+
}
|
|
3754
3792
|
}
|
|
3755
3793
|
} catch (e) {
|
|
3756
3794
|
}
|
|
@@ -10760,9 +10798,14 @@ const useSearchSelectProItems = ({
|
|
|
10760
10798
|
selectedItems.value = selectedItems.value.filter((item) => currentIds.has(getItemIdentifier(item)));
|
|
10761
10799
|
};
|
|
10762
10800
|
const hasInternalMoreItems = vue.computed(() => matchingItems.value.length > displayedItems.value.length);
|
|
10801
|
+
const hasMoreServerPages = vue.computed(() => {
|
|
10802
|
+
if (props.page === void 0 || props.totalPages === void 0) return false;
|
|
10803
|
+
return props.page < props.totalPages;
|
|
10804
|
+
});
|
|
10763
10805
|
const shouldShowLoadMore = vue.computed(() => {
|
|
10764
10806
|
if (isMultiple.value && showSelectedOnly.value) return false;
|
|
10765
10807
|
if (hasInternalMoreItems.value) return true;
|
|
10808
|
+
if (hasMoreServerPages.value) return true;
|
|
10766
10809
|
if (props.maxItems && props.maxItems > 0) return false;
|
|
10767
10810
|
return props.showLoadMore;
|
|
10768
10811
|
});
|
|
@@ -10841,6 +10884,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
10841
10884
|
loading: { type: Boolean, default: false },
|
|
10842
10885
|
searchFields: { default: () => [] },
|
|
10843
10886
|
preserveOrder: { type: Boolean, default: false },
|
|
10887
|
+
debounceMs: { default: 500 },
|
|
10844
10888
|
initialValue: { default: "" },
|
|
10845
10889
|
displayValue: { default: "" },
|
|
10846
10890
|
disabled: { type: Boolean, default: false },
|
|
@@ -11044,20 +11088,23 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
11044
11088
|
}
|
|
11045
11089
|
return digits;
|
|
11046
11090
|
};
|
|
11047
|
-
|
|
11048
|
-
|
|
11049
|
-
|
|
11050
|
-
|
|
11051
|
-
|
|
11052
|
-
|
|
11091
|
+
let changeTimeout = null;
|
|
11092
|
+
let inputTimeout = null;
|
|
11093
|
+
const debouncedEmitChange = (value) => {
|
|
11094
|
+
if (changeTimeout) clearTimeout(changeTimeout);
|
|
11095
|
+
const delay = Math.max(0, props.debounceMs ?? 500);
|
|
11096
|
+
changeTimeout = setTimeout(() => {
|
|
11097
|
+
const formattedValue = formatPidWithDash(value);
|
|
11098
|
+
emit("change", formattedValue);
|
|
11099
|
+
}, delay);
|
|
11100
|
+
};
|
|
11101
|
+
const debouncedEmitInput = (ev) => {
|
|
11102
|
+
if (inputTimeout) clearTimeout(inputTimeout);
|
|
11103
|
+
const delay = Math.max(0, props.debounceMs ?? 500);
|
|
11104
|
+
inputTimeout = setTimeout(() => {
|
|
11105
|
+
emit("input", ev);
|
|
11106
|
+
}, delay);
|
|
11053
11107
|
};
|
|
11054
|
-
const debouncedEmitChange = debounce((value) => {
|
|
11055
|
-
const formattedValue = formatPidWithDash(value);
|
|
11056
|
-
emit("change", formattedValue);
|
|
11057
|
-
}, 500);
|
|
11058
|
-
const debouncedEmitInput = debounce((ev) => {
|
|
11059
|
-
emit("input", ev);
|
|
11060
|
-
}, 500);
|
|
11061
11108
|
vue.watch(
|
|
11062
11109
|
() => searchTerm.value,
|
|
11063
11110
|
(newValue) => {
|
|
@@ -11090,12 +11137,6 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
11090
11137
|
valid.value = false;
|
|
11091
11138
|
}
|
|
11092
11139
|
};
|
|
11093
|
-
const totalPages = vue.computed(() => {
|
|
11094
|
-
if (props.page !== void 0 && props.totalPages !== void 0) {
|
|
11095
|
-
return props.totalPages;
|
|
11096
|
-
}
|
|
11097
|
-
return null;
|
|
11098
|
-
});
|
|
11099
11140
|
const handleInput = (e) => {
|
|
11100
11141
|
const target = e.target;
|
|
11101
11142
|
const { value } = target;
|
|
@@ -11166,9 +11207,6 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
11166
11207
|
}
|
|
11167
11208
|
return result;
|
|
11168
11209
|
};
|
|
11169
|
-
const handlePagination = (_payload) => {
|
|
11170
|
-
emit("paginate", _payload.detail);
|
|
11171
|
-
};
|
|
11172
11210
|
const selectItem = (item) => {
|
|
11173
11211
|
selectedItem.value = item;
|
|
11174
11212
|
setValidSelectedState();
|
|
@@ -11348,6 +11386,8 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
11348
11386
|
});
|
|
11349
11387
|
vue.onBeforeUnmount(() => {
|
|
11350
11388
|
window.removeEventListener("mouseup", onClickOutside);
|
|
11389
|
+
if (changeTimeout) clearTimeout(changeTimeout);
|
|
11390
|
+
if (inputTimeout) clearTimeout(inputTimeout);
|
|
11351
11391
|
const input = getInputElement();
|
|
11352
11392
|
if (input) {
|
|
11353
11393
|
input.removeEventListener("keydown", handleInputKeyDown);
|
|
@@ -11519,14 +11559,7 @@ const _sfc_main$i = /* @__PURE__ */ vue.defineComponent({
|
|
|
11519
11559
|
vue.createElementVNode("span", null, vue.toDisplayString(__props.loadingMore ? resolvedLoadingMoreLabel.value : resolvedLoadMoreLabel.value), 1)
|
|
11520
11560
|
], 42, _hoisted_12)
|
|
11521
11561
|
])) : vue.createCommentVNode("", true)
|
|
11522
|
-
], 32)
|
|
11523
|
-
__props.page !== void 0 && totalPages.value !== null && totalPages.value > 1 ? (vue.openBlock(), vue.createBlock(_sfc_main$l, {
|
|
11524
|
-
key: 0,
|
|
11525
|
-
current: __props.page,
|
|
11526
|
-
max: totalPages.value,
|
|
11527
|
-
onPaginate: handlePagination,
|
|
11528
|
-
class: "my-4! px-2"
|
|
11529
|
-
}, null, 8, ["current", "max"])) : vue.createCommentVNode("", true)
|
|
11562
|
+
], 32)
|
|
11530
11563
|
], 64)) : !__props.loading ? (vue.openBlock(), vue.createElementBlock("ul", _hoisted_13, [
|
|
11531
11564
|
vue.createElementVNode("li", _hoisted_14, vue.toDisplayString(__props.noResultPrompt), 1)
|
|
11532
11565
|
])) : vue.createCommentVNode("", true)
|