@paperless/core 3.6.6 → 3.7.1
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/build/{p-7ead64a1.js → p-11d3bf6d.js} +1 -1
- package/dist/build/p-30e187cd.entry.js +1 -0
- package/dist/build/p-7447d78d.entry.js +1 -0
- package/dist/build/p-ad0caa7e.entry.js +1 -0
- package/dist/build/paperless.esm.js +1 -1
- package/dist/cjs/p-calendar.cjs.entry.js +4 -1
- package/dist/cjs/p-datepicker.cjs.entry.js +6 -3
- package/dist/cjs/p-select.cjs.entry.js +25 -13
- package/dist/collection/components/molecules/calendar/calendar.component.js +4 -1
- package/dist/collection/components/molecules/datepicker/datepicker.component.js +6 -3
- package/dist/collection/components/molecules/select/select.component.js +25 -13
- package/dist/components/{p-B6Eg4keN.js → p-CqInd6A4.js} +1 -1
- package/dist/components/p-calendar.js +1 -1
- package/dist/components/p-datepicker.js +1 -1
- package/dist/components/p-select.js +1 -1
- package/dist/esm/p-calendar.entry.js +4 -1
- package/dist/esm/p-datepicker.entry.js +6 -3
- package/dist/esm/p-select.entry.js +25 -13
- package/dist/index.html +1 -1
- package/dist/paperless/p-30e187cd.entry.js +1 -0
- package/dist/paperless/p-7447d78d.entry.js +1 -0
- package/dist/paperless/p-ad0caa7e.entry.js +1 -0
- package/dist/paperless/paperless.esm.js +1 -1
- package/dist/sw.js +1 -1
- package/dist/sw.js.map +1 -1
- package/hydrate/index.js +35 -17
- package/hydrate/index.mjs +35 -17
- package/package.json +1 -1
- package/dist/build/p-62f87c18.entry.js +0 -1
- package/dist/build/p-8e7069b0.entry.js +0 -1
- package/dist/build/p-df709c40.entry.js +0 -1
- package/dist/paperless/p-62f87c18.entry.js +0 -1
- package/dist/paperless/p-8e7069b0.entry.js +0 -1
- package/dist/paperless/p-df709c40.entry.js +0 -1
|
@@ -21,10 +21,7 @@ const multiItem = cva([
|
|
|
21
21
|
const textContainer = cva('block w-full overflow-hidden text-start', {
|
|
22
22
|
variants: {
|
|
23
23
|
variant: {
|
|
24
|
-
placeholder:
|
|
25
|
-
text-storm-400
|
|
26
|
-
dark:text-white
|
|
27
|
-
`,
|
|
24
|
+
placeholder: 'text-storm-400',
|
|
28
25
|
default: null,
|
|
29
26
|
},
|
|
30
27
|
enableTextWrap: {
|
|
@@ -32,14 +29,26 @@ const textContainer = cva('block w-full overflow-hidden text-start', {
|
|
|
32
29
|
false: 'text-ellipsis whitespace-nowrap',
|
|
33
30
|
},
|
|
34
31
|
error: {
|
|
35
|
-
true:
|
|
32
|
+
true: false,
|
|
33
|
+
false: 'dark:text-white',
|
|
34
|
+
},
|
|
35
|
+
},
|
|
36
|
+
compoundVariants: [
|
|
37
|
+
{
|
|
38
|
+
variant: 'placeholder',
|
|
39
|
+
error: true,
|
|
40
|
+
class: `
|
|
36
41
|
text-negative-red-700
|
|
37
42
|
group-hover/button:text-negative-red-800
|
|
38
43
|
dark:text-negative-red-alternative
|
|
39
44
|
`,
|
|
40
|
-
false: null,
|
|
41
45
|
},
|
|
42
|
-
|
|
46
|
+
{
|
|
47
|
+
variant: 'default',
|
|
48
|
+
error: true,
|
|
49
|
+
class: 'dark:text-negative-red-alternative',
|
|
50
|
+
},
|
|
51
|
+
],
|
|
43
52
|
});
|
|
44
53
|
export class Select {
|
|
45
54
|
/**
|
|
@@ -253,7 +262,10 @@ export class Select {
|
|
|
253
262
|
return this._getParsedItems();
|
|
254
263
|
}
|
|
255
264
|
get _displayValue() {
|
|
256
|
-
const placeholder = (h("div", { class: textContainer({
|
|
265
|
+
const placeholder = (h("div", { class: textContainer({
|
|
266
|
+
variant: 'placeholder',
|
|
267
|
+
error: !!this.error?.length,
|
|
268
|
+
}) }, this.placeholder));
|
|
257
269
|
if (!this._selectedItem) {
|
|
258
270
|
return placeholder;
|
|
259
271
|
}
|
|
@@ -329,8 +341,8 @@ export class Select {
|
|
|
329
341
|
if (this.error?.length) {
|
|
330
342
|
buttonIcon = 'warning';
|
|
331
343
|
}
|
|
332
|
-
return (h(ThemedHost, { key: '
|
|
333
|
-
this._selectedItem?.[this.iconClassKey], size: this.size, slot: 'trigger', variant: 'secondary', onClick: ev => this._onClick(ev) }, h("div", { key: '
|
|
344
|
+
return (h(ThemedHost, { key: 'c15b8ad5b4581bc9d73caec74094d05a5eccdc87' }, h("p-field-container", { key: '79a06c8be8884124cccdb17baf8d386d34f01e47', error: this.error, forceShowTooltip: !!this.error?.length && !this._showDropdown, helper: this.helper, label: this.label, prefix: this.prefix, required: this.required, showOptional: this.showOptional, variant: 'write' }, h("p-dropdown", { key: '9844250bac67e239336290deb4203ae6ecf62be4', applyChevron: false, applyFullWidth: true, applyMaxWidth: false, "disable-trigger-click": this.disabled, insideClick: true, manual: true, manualChevron: true, scrollable: this.enableAutocomplete ? 'large' : true, show: this._showDropdown, slot: 'content', strategy: this.strategy, onIsOpen: ev => this._onDropdownOpen(ev) }, h("p-button", { key: 'c33d47717e74742095e0bb6597ed74393782924a', active: this._showDropdown, chevron: this.showChevron ? (this._showDropdown ? 'up' : 'down') : false, class: 'w-full', error: !!this.error?.length, icon: buttonIcon, iconClass: this.applyClassOnSelectedItem &&
|
|
345
|
+
this._selectedItem?.[this.iconClassKey], size: this.size, slot: 'trigger', variant: 'secondary', onClick: ev => this._onClick(ev) }, h("div", { key: 'b8153f212f6fbcaf9654f71cd15cfe274b95125c', class: 'relative min-w-0 flex-1', ref: ref => (this._inputRef = ref) }, this._displayValue)), this.loading ? this._getLoadingItems() : this._getItems(), this.showAddItem && this._getAddItem()))));
|
|
334
346
|
}
|
|
335
347
|
documentClickHandler(event) {
|
|
336
348
|
if (!this._showDropdown || childOfComposed(event, this._el)) {
|
|
@@ -571,7 +583,7 @@ export class Select {
|
|
|
571
583
|
_getDisplay(item, isSelection = false, isSelectedInMenu = false) {
|
|
572
584
|
let content = (h("div", { class: textContainer({
|
|
573
585
|
variant: 'default',
|
|
574
|
-
error: !!this.error?.length,
|
|
586
|
+
error: !!this.error?.length && isSelection,
|
|
575
587
|
enableTextWrap: this.enableTextWrap && !isSelection,
|
|
576
588
|
}) }, item[isSelection
|
|
577
589
|
? (this.selectionDisplayKey ?? this.displayKey)
|
|
@@ -579,7 +591,7 @@ export class Select {
|
|
|
579
591
|
if (this.avatarKey) {
|
|
580
592
|
content = (h("span", { class: 'flex items-center gap-2' }, h("p-avatar", { letters: item[this.avatarLettersKey], size: 'sm', src: item[this.avatarKey] }), h("div", { class: textContainer({
|
|
581
593
|
variant: 'default',
|
|
582
|
-
error: !!this.error?.length,
|
|
594
|
+
error: !!this.error?.length && isSelection,
|
|
583
595
|
enableTextWrap: this.enableTextWrap && !isSelection,
|
|
584
596
|
}) }, item[this.dropdownDisplayKey ?? this.displayKey])));
|
|
585
597
|
}
|
|
@@ -592,7 +604,7 @@ export class Select {
|
|
|
592
604
|
? (item?.[this.iconClassKey] ?? '')
|
|
593
605
|
: ''), variant: item[this.iconKey] })), h("div", { class: textContainer({
|
|
594
606
|
variant: 'default',
|
|
595
|
-
error: !!this.error?.length,
|
|
607
|
+
error: !!this.error?.length && isSelection,
|
|
596
608
|
enableTextWrap: this.enableTextWrap && !isSelection,
|
|
597
609
|
}) }, item[this.dropdownDisplayKey ?? this.displayKey])));
|
|
598
610
|
}
|