@iyulab/chat-components 0.6.0 → 0.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/CHANGELOG.md +51 -0
- package/README.md +15 -39
- package/dist/_virtual/{_@oxc-project_runtime@0.130.0/helpers → _@oxc-project_runtime@0.139.0/helpers/esm}/decorate.js +2 -2
- package/dist/_virtual/{_@oxc-project_runtime@0.130.0/helpers → _@oxc-project_runtime@0.139.0/helpers/esm}/decorateMetadata.js +2 -2
- package/dist/_virtual/_glob-assets_raw/alert-triangle-fill.svg.4cfc4305.js +4 -0
- package/dist/_virtual/_glob-assets_raw/arrows-sort.svg.dda43a85.js +4 -0
- package/dist/_virtual/_glob-assets_raw/code.svg.c69bc144.js +4 -0
- package/dist/_virtual/_glob-assets_raw/download.svg.bce82177.js +4 -0
- package/dist/_virtual/_glob-assets_raw/element-prompt.md.7047ffcc.js +4 -0
- package/dist/_virtual/_glob-assets_raw/external-link.svg.a9f7f02d.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file-code.svg.0e706f93.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file-music.svg.b9970203.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file-spreadsheet.svg.8c03bdfa.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file-text.svg.85bdd923.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file-type-pdf.svg.bc12db6d.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file-zip.svg.76dde660.js +4 -0
- package/dist/_virtual/_glob-assets_raw/file.svg.28f5d6f1.js +4 -0
- package/dist/_virtual/_glob-assets_raw/photo.svg.cc273cc1.js +4 -0
- package/dist/_virtual/_glob-assets_raw/player-stop-fill.svg.5378b752.js +4 -0
- package/dist/_virtual/_glob-assets_raw/send.svg.02326253.js +4 -0
- package/dist/_virtual/_glob-assets_raw/sort-ascending-letters.svg.14a3df67.js +4 -0
- package/dist/_virtual/_glob-assets_raw/sort-descending-letters.svg.3e03647c.js +4 -0
- package/dist/_virtual/_glob-assets_raw/video.svg.c183f03c.js +4 -0
- package/dist/_virtual/_glob-assets_raw/world.svg.cd9903c8.js +4 -0
- package/dist/components/UDataElement.d.ts +48 -0
- package/dist/components/UDataElement.js +80 -0
- package/dist/components/blocks/UCodeBlock.d.ts +0 -4
- package/dist/components/blocks/UCodeBlock.js +6 -12
- package/dist/components/{views/UView.d.ts → blocks/UElementBlock.d.ts} +18 -8
- package/dist/components/{views/UView.js → blocks/UElementBlock.js} +31 -21
- package/dist/components/{views/UView.styles.js → blocks/UElementBlock.styles.js} +1 -1
- package/dist/components/blocks/UFileBlock.d.ts +15 -5
- package/dist/components/blocks/UFileBlock.js +81 -68
- package/dist/components/blocks/UFileBlock.styles.js +86 -29
- package/dist/components/blocks/UMarkedBlock.d.ts +3 -1
- package/dist/components/blocks/UMarkedBlock.js +23 -18
- package/dist/components/blocks/URefBlock.js +2 -2
- package/dist/components/blocks/UTableBlock.d.ts +2 -2
- package/dist/components/blocks/UTableBlock.js +9 -8
- package/dist/components/blocks/UTableBlock.styles.js +1 -1
- package/dist/components/blocks/UTextBlock.d.ts +2 -0
- package/dist/components/blocks/UTextBlock.js +4 -5
- package/dist/components/message/UMessage.js +2 -2
- package/dist/components/prompt/UPrompt.d.ts +0 -5
- package/dist/components/prompt/UPrompt.js +18 -27
- package/dist/components/prompt/UPrompt.styles.js +9 -10
- package/dist/components/references/URefCard.d.ts +6 -5
- package/dist/components/references/URefCard.js +14 -11
- package/dist/components/references/URefCardGroup.js +2 -2
- package/dist/components/references/URefTag.js +5 -4
- package/dist/{components/views/UChartView.d.ts → components-extra/UChartBlock.d.ts} +4 -4
- package/dist/{components/views/UChartView.js → components-extra/UChartBlock.js} +22 -34
- package/dist/components-extra/UChartBlock.schema.d.ts +3 -0
- package/dist/components-extra/UChartBlock.schema.js +34 -0
- package/dist/{components/views/UChartView.styles.js → components-extra/UChartBlock.styles.js} +1 -1
- package/dist/{components/views/UImagesView.d.ts → components-extra/UImagesBlock.d.ts} +4 -4
- package/dist/{components/views/UImagesView.js → components-extra/UImagesBlock.js} +15 -15
- package/dist/components-extra/UImagesBlock.schema.d.ts +3 -0
- package/dist/components-extra/UImagesBlock.schema.js +31 -0
- package/dist/{components/views/UImagesView.styles.js → components-extra/UImagesBlock.styles.js} +5 -5
- package/dist/{components/views/UMapView.d.ts → components-extra/UMapBlock.d.ts} +4 -4
- package/dist/{components/views/UMapView.js → components-extra/UMapBlock.js} +18 -18
- package/dist/components-extra/UMapBlock.schema.d.ts +3 -0
- package/dist/components-extra/UMapBlock.schema.js +33 -0
- package/dist/{components/views/UMapView.styles.js → components-extra/UMapBlock.styles.js} +1 -1
- package/dist/{components/views/UVideoView.d.ts → components-extra/UVideoBlock.d.ts} +4 -4
- package/dist/{components/views/UVideoView.js → components-extra/UVideoBlock.js} +10 -10
- package/dist/components-extra/UVideoBlock.schema.d.ts +3 -0
- package/dist/components-extra/UVideoBlock.schema.js +28 -0
- package/dist/{components/views/UVideoView.styles.js → components-extra/UVideoBlock.styles.js} +1 -1
- package/dist/events/SendEvent.d.ts +0 -5
- package/dist/events/StopEvent.d.ts +0 -5
- package/dist/extra.d.ts +6 -0
- package/dist/extra.js +14 -0
- package/dist/index.d.ts +5 -17
- package/dist/index.js +6 -16
- package/dist/react/UCodeBlock.js +2 -2
- package/dist/react/UElementBlock.d.ts +9 -0
- package/dist/react/UElementBlock.js +10 -0
- package/dist/react/UFileBlock.js +2 -2
- package/dist/react/UImagesBlock.d.ts +9 -0
- package/dist/react/UImagesBlock.js +10 -0
- package/dist/react/UMapBlock.d.ts +9 -0
- package/dist/react/UMapBlock.js +10 -0
- package/dist/react/UMarkedBlock.js +2 -2
- package/dist/react/UMessage.js +2 -2
- package/dist/react/UPrompt.js +2 -2
- package/dist/react/URefBlock.js +2 -2
- package/dist/react/URefCard.js +2 -2
- package/dist/react/URefCardGroup.js +2 -2
- package/dist/react/URefTag.js +2 -2
- package/dist/react/UTableBlock.js +2 -2
- package/dist/react/UTextBlock.d.ts +1 -0
- package/dist/react/UTextBlock.js +5 -3
- package/dist/react/UVideoBlock.d.ts +9 -0
- package/dist/react/UVideoBlock.js +10 -0
- package/dist/react/index.d.ts +4 -11
- package/dist/react/index.js +4 -11
- package/dist/types/BlockItem.d.ts +1 -24
- package/dist/types/{JsonSchema.d.ts → Schema.d.ts} +13 -0
- package/dist/utilities/HtmlBuilder.d.ts +28 -0
- package/dist/utilities/HtmlBuilder.js +41 -0
- package/dist/utilities/PromptBuilder.d.ts +21 -0
- package/dist/utilities/PromptBuilder.js +60 -0
- package/dist/utilities/icons.d.ts +1 -0
- package/dist/utilities/icons.js +52 -0
- package/dist/utilities/sanitizers.d.ts +35 -0
- package/dist/utilities/sanitizers.js +75 -0
- package/package.json +18 -19
- package/skills/iyulab-chat-components/SKILL.md +18 -33
- package/skills/iyulab-chat-components/references/components/{chart-view.md → chart-block.md} +16 -12
- package/skills/iyulab-chat-components/references/components/code-block.md +1 -5
- package/skills/iyulab-chat-components/references/components/element-block.md +57 -0
- package/skills/iyulab-chat-components/references/components/file-block.md +22 -25
- package/skills/iyulab-chat-components/references/components/{images-view.md → images-block.md} +10 -10
- package/skills/iyulab-chat-components/references/components/{map-view.md → map-block.md} +9 -9
- package/skills/iyulab-chat-components/references/components/marked-block.md +5 -4
- package/skills/iyulab-chat-components/references/components/message.md +1 -2
- package/skills/iyulab-chat-components/references/components/prompt.md +12 -21
- package/skills/iyulab-chat-components/references/components/{video-view.md → video-block.md} +10 -10
- package/skills/iyulab-chat-components/references/extra-system.md +95 -0
- package/skills/iyulab-chat-components/references/types.md +17 -31
- package/skills/iyulab-chat-components/references/usage.md +13 -81
- package/skills/iyulab-chat-components/references/utilities/html-builder.md +35 -0
- package/skills/iyulab-chat-components/references/utilities/prompt-builder.md +73 -0
- package/dist/_virtual/_glob-assets_raw/intent-prompt.md.1907474e.js +0 -4
- package/dist/_virtual/_glob-assets_raw/view-prompt.md.e0dbcffe.js +0 -4
- package/dist/chart.d.ts +0 -1
- package/dist/chart.js +0 -2
- package/dist/components/blocks/UJsonBlock.d.ts +0 -49
- package/dist/components/blocks/UJsonBlock.js +0 -130
- package/dist/components/blocks/UJsonBlock.styles.js +0 -115
- package/dist/components/blocks/UThinkBlock.d.ts +0 -35
- package/dist/components/blocks/UThinkBlock.js +0 -87
- package/dist/components/blocks/UThinkBlock.styles.js +0 -74
- package/dist/components/blocks/UToolBlock.d.ts +0 -24
- package/dist/components/blocks/UToolBlock.js +0 -70
- package/dist/components/blocks/UToolBlock.styles.js +0 -66
- package/dist/components/buttons/UAttachButton.d.ts +0 -26
- package/dist/components/buttons/UAttachButton.js +0 -63
- package/dist/components/buttons/UAttachButton.styles.js +0 -14
- package/dist/components/buttons/UCopyButton.d.ts +0 -24
- package/dist/components/buttons/UCopyButton.js +0 -59
- package/dist/components/buttons/UCopyButton.styles.js +0 -18
- package/dist/components/buttons/UVoteButton.d.ts +0 -19
- package/dist/components/buttons/UVoteButton.js +0 -64
- package/dist/components/buttons/UVoteButton.styles.d.ts +0 -1
- package/dist/components/buttons/UVoteButton.styles.js +0 -19
- package/dist/components/intents/UQuestionIntent.d.ts +0 -22
- package/dist/components/intents/UQuestionIntent.js +0 -41
- package/dist/components/intents/UQuestionIntent.styles.d.ts +0 -1
- package/dist/components/intents/UQuestionIntent.styles.js +0 -43
- package/dist/components/views/UChartView.styles.d.ts +0 -1
- package/dist/components/views/UImagesView.styles.d.ts +0 -1
- package/dist/components/views/UMapView.styles.d.ts +0 -1
- package/dist/components/views/UVideoView.styles.d.ts +0 -1
- package/dist/components/views/UView.styles.d.ts +0 -1
- package/dist/events/AttachEvent.d.ts +0 -9
- package/dist/events/ChoiceEvent.d.ts +0 -9
- package/dist/react/UAttachButton.d.ts +0 -11
- package/dist/react/UAttachButton.js +0 -12
- package/dist/react/UCopyButton.d.ts +0 -9
- package/dist/react/UCopyButton.js +0 -10
- package/dist/react/UImagesView.d.ts +0 -9
- package/dist/react/UImagesView.js +0 -10
- package/dist/react/UJsonBlock.d.ts +0 -9
- package/dist/react/UJsonBlock.js +0 -10
- package/dist/react/UMapView.d.ts +0 -9
- package/dist/react/UMapView.js +0 -10
- package/dist/react/UQuestionIntent.d.ts +0 -11
- package/dist/react/UQuestionIntent.js +0 -12
- package/dist/react/UThinkBlock.d.ts +0 -9
- package/dist/react/UThinkBlock.js +0 -10
- package/dist/react/UToolBlock.d.ts +0 -9
- package/dist/react/UToolBlock.js +0 -10
- package/dist/react/UVideoView.d.ts +0 -9
- package/dist/react/UVideoView.js +0 -10
- package/dist/react/UView.d.ts +0 -9
- package/dist/react/UView.js +0 -10
- package/dist/react/UVoteButton.d.ts +0 -9
- package/dist/react/UVoteButton.js +0 -10
- package/dist/types/Intents.d.ts +0 -26
- package/dist/types/Intents.js +0 -30
- package/dist/types/JsonNode.d.ts +0 -20
- package/dist/types/Views.d.ts +0 -34
- package/dist/types/Views.js +0 -148
- package/dist/utilities/IntentPromptBuilder.d.ts +0 -40
- package/dist/utilities/IntentPromptBuilder.js +0 -95
- package/dist/utilities/ViewPromptBuilder.d.ts +0 -28
- package/dist/utilities/ViewPromptBuilder.js +0 -78
- package/dist/utilities/dom-agent/DOMAgent.d.ts +0 -74
- package/dist/utilities/dom-agent/DOMController.d.ts +0 -78
- package/dist/utilities/dom-agent/DOMPromptBuilder.d.ts +0 -54
- package/dist/utilities/dom-agent/DOMScanner.d.ts +0 -83
- package/dist/utilities/dom-agent/index.d.ts +0 -9
- package/dist/utilities/dom-agent/types.d.ts +0 -209
- package/skills/iyulab-chat-components/references/components/attach-button.md +0 -69
- package/skills/iyulab-chat-components/references/components/copy-button.md +0 -46
- package/skills/iyulab-chat-components/references/components/json-block.md +0 -41
- package/skills/iyulab-chat-components/references/components/question-intent.md +0 -75
- package/skills/iyulab-chat-components/references/components/think-block.md +0 -48
- package/skills/iyulab-chat-components/references/components/tool-block.md +0 -57
- package/skills/iyulab-chat-components/references/components/view.md +0 -51
- package/skills/iyulab-chat-components/references/components/vote-button.md +0 -60
- package/skills/iyulab-chat-components/references/utilities/intent-prompt-builder.md +0 -123
- package/skills/iyulab-chat-components/references/utilities/view-prompt-builder.md +0 -112
- /package/dist/components/{buttons/UCopyButton.styles.d.ts → blocks/UElementBlock.styles.d.ts} +0 -0
- /package/dist/{components/blocks/UJsonBlock.styles.d.ts → components-extra/UChartBlock.styles.d.ts} +0 -0
- /package/dist/{components/blocks/UThinkBlock.styles.d.ts → components-extra/UImagesBlock.styles.d.ts} +0 -0
- /package/dist/{components/blocks/UToolBlock.styles.d.ts → components-extra/UMapBlock.styles.d.ts} +0 -0
- /package/dist/{components/buttons/UAttachButton.styles.d.ts → components-extra/UVideoBlock.styles.d.ts} +0 -0
|
@@ -1,14 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import "../../utilities/icons.js";
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
|
|
4
|
+
import { UDataElement } from "../UDataElement.js";
|
|
3
5
|
import { styles } from "./UTableBlock.styles.js";
|
|
4
6
|
import { html } from "lit";
|
|
5
7
|
import { customElement, property, state } from "lit/decorators.js";
|
|
6
8
|
import { unsafeHTML } from "lit/directives/unsafe-html.js";
|
|
7
9
|
import "@iyulab/components/dist/components/icon/UIcon.js";
|
|
10
|
+
import "@iyulab/components/dist/components/skeleton/USkeleton.js";
|
|
8
11
|
import "@iyulab/components/dist/components/button/UButton.js";
|
|
9
|
-
import { UDataElement } from "@iyulab/components/dist/components/UDataElement.js";
|
|
10
12
|
import { repeat } from "lit/directives/repeat.js";
|
|
11
|
-
import "@iyulab/components/dist/components/skeleton/USkeleton.js";
|
|
12
13
|
//#region src/components/blocks/UTableBlock.ts
|
|
13
14
|
var UTableBlock = class UTableBlock extends UDataElement {
|
|
14
15
|
constructor(..._args) {
|
|
@@ -47,11 +48,11 @@ var UTableBlock = class UTableBlock extends UDataElement {
|
|
|
47
48
|
<div class="toolbar-right">
|
|
48
49
|
<u-button @click=${this.handleDownloadXLS} title="Excel Download">
|
|
49
50
|
XLS
|
|
50
|
-
<u-icon slot="suffix" lib="
|
|
51
|
+
<u-icon slot="suffix" lib="internal-chat" name="download"></u-icon>
|
|
51
52
|
</u-button>
|
|
52
53
|
<u-button @click=${this.handleDownloadCSV} title="CSV Download">
|
|
53
54
|
CSV
|
|
54
|
-
<u-icon slot="suffix" lib="
|
|
55
|
+
<u-icon slot="suffix" lib="internal-chat" name="download"></u-icon>
|
|
55
56
|
</u-button>
|
|
56
57
|
</div>
|
|
57
58
|
</div>
|
|
@@ -70,8 +71,8 @@ var UTableBlock = class UTableBlock extends UDataElement {
|
|
|
70
71
|
${unsafeHTML(h.text)}
|
|
71
72
|
<u-icon
|
|
72
73
|
class="sort-icon"
|
|
73
|
-
lib="
|
|
74
|
-
name=${isActive ? this.sort.dir === "asc" ? "sort-
|
|
74
|
+
lib="internal-chat"
|
|
75
|
+
name=${isActive ? this.sort.dir === "asc" ? "sort-ascending-letters" : "sort-descending-letters" : "arrows-sort"}
|
|
75
76
|
></u-icon>
|
|
76
77
|
</th>
|
|
77
78
|
`;
|
|
@@ -2,6 +2,8 @@ import { PropertyValues } from 'lit';
|
|
|
2
2
|
import { UElement } from '@iyulab/components/dist/components/UElement.js';
|
|
3
3
|
/**
|
|
4
4
|
* 텍스트를 표시하거나 편집할 수 있는 블록 컴포넌트입니다.
|
|
5
|
+
*
|
|
6
|
+
* @event input - 텍스트가 변경될 때 발생하는 이벤트입니다. 이벤트의 `data` 속성에 변경된 텍스트가 포함됩니다.
|
|
5
7
|
*/
|
|
6
8
|
export declare class UTextBlock extends UElement {
|
|
7
9
|
static styles: import('lit').CSSResultGroup[];
|
|
@@ -1,11 +1,10 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
|
|
3
3
|
import { styles } from "./UTextBlock.styles.js";
|
|
4
4
|
import { html } from "lit";
|
|
5
5
|
import { customElement, property, query } from "lit/decorators.js";
|
|
6
6
|
import { UElement } from "@iyulab/components/dist/components/UElement.js";
|
|
7
7
|
//#region src/components/blocks/UTextBlock.ts
|
|
8
|
-
var _ref, _ref2;
|
|
9
8
|
var UTextBlock = class UTextBlock extends UElement {
|
|
10
9
|
constructor(..._args) {
|
|
11
10
|
super(..._args);
|
|
@@ -88,8 +87,8 @@ __decorate([property({ type: String }), __decorateMetadata("design:type", String
|
|
|
88
87
|
__decorate([property({ type: Number }), __decorateMetadata("design:type", Number)], UTextBlock.prototype, "minRows", void 0);
|
|
89
88
|
__decorate([property({ type: Number }), __decorateMetadata("design:type", Number)], UTextBlock.prototype, "maxRows", void 0);
|
|
90
89
|
__decorate([property({ type: String }), __decorateMetadata("design:type", String)], UTextBlock.prototype, "value", void 0);
|
|
91
|
-
__decorate([query("textarea"), __decorateMetadata("design:type", typeof
|
|
92
|
-
__decorate([query("pre"), __decorateMetadata("design:type", typeof
|
|
90
|
+
__decorate([query("textarea"), __decorateMetadata("design:type", typeof HTMLTextAreaElement === "undefined" ? Object : HTMLTextAreaElement)], UTextBlock.prototype, "textareaEl", void 0);
|
|
91
|
+
__decorate([query("pre"), __decorateMetadata("design:type", typeof HTMLPreElement === "undefined" ? Object : HTMLPreElement)], UTextBlock.prototype, "preEl", void 0);
|
|
93
92
|
UTextBlock = __decorate([customElement("u-text-block")], UTextBlock);
|
|
94
93
|
//#endregion
|
|
95
94
|
export { UTextBlock };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
|
|
3
3
|
import { styles } from "./UMessage.styles.js";
|
|
4
4
|
import { html } from "lit";
|
|
5
5
|
import { customElement, property } from "lit/decorators.js";
|
|
@@ -25,11 +25,6 @@ export declare class UPrompt extends UElement {
|
|
|
25
25
|
* 텍스트 또는 첨부 파일이 없는 경우에는 아무런 동작도 하지 않습니다.
|
|
26
26
|
*/
|
|
27
27
|
submit(): void;
|
|
28
|
-
/**
|
|
29
|
-
* 0.4.x 호환을 위한 legacy 이벤트를 함께 발행합니다.
|
|
30
|
-
* `u-submit`/`u-cancel`은 0.6.0에서 제거 예정.
|
|
31
|
-
*/
|
|
32
|
-
private dispatchLegacy;
|
|
33
28
|
private handleRemoveFile;
|
|
34
29
|
private handleTextBlockInput;
|
|
35
30
|
private handleTextBlockKeydown;
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import "../../utilities/icons.js";
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
|
|
3
4
|
import "../blocks/UFileBlock.js";
|
|
4
5
|
import { styles } from "./UPrompt.styles.js";
|
|
5
6
|
import { html } from "lit";
|
|
6
7
|
import { customElement, property } from "lit/decorators.js";
|
|
7
8
|
import "@iyulab/components/dist/components/icon/UIcon.js";
|
|
8
|
-
import "@iyulab/components/dist/components/button/UButton.js";
|
|
9
9
|
import { UElement } from "@iyulab/components/dist/components/UElement.js";
|
|
10
|
+
import "@iyulab/components/dist/components/button/UButton.js";
|
|
10
11
|
import { repeat } from "lit/directives/repeat.js";
|
|
11
12
|
//#region src/components/prompt/UPrompt.ts
|
|
12
13
|
var UPrompt = class UPrompt extends UElement {
|
|
@@ -38,7 +39,6 @@ var UPrompt = class UPrompt extends UElement {
|
|
|
38
39
|
<u-file-block
|
|
39
40
|
data-index=${index}
|
|
40
41
|
.removable=${true}
|
|
41
|
-
.status=${file.status}
|
|
42
42
|
.name=${file.name}
|
|
43
43
|
.type=${file.mimeType}
|
|
44
44
|
.size=${file.size}
|
|
@@ -63,11 +63,12 @@ var UPrompt = class UPrompt extends UElement {
|
|
|
63
63
|
<slot name="right-actions"></slot>
|
|
64
64
|
|
|
65
65
|
<u-button class="send-btn" part="send-btn"
|
|
66
|
+
variant="ghost"
|
|
66
67
|
?disabled=${!this.loading && !this.value}
|
|
67
68
|
@click=${this.handleSendButtonClick}>
|
|
68
69
|
<u-icon
|
|
69
|
-
lib="
|
|
70
|
-
name=${this.loading ? "stop-
|
|
70
|
+
lib="internal-chat"
|
|
71
|
+
name=${this.loading ? "player-stop-fill" : "send"}
|
|
71
72
|
></u-icon>
|
|
72
73
|
</u-button>
|
|
73
74
|
</div>
|
|
@@ -81,33 +82,23 @@ var UPrompt = class UPrompt extends UElement {
|
|
|
81
82
|
*/
|
|
82
83
|
submit() {
|
|
83
84
|
if (this.loading) {
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
85
|
+
this.fire("stop", {
|
|
86
|
+
bubbles: false,
|
|
87
|
+
composed: false,
|
|
88
|
+
detail: {}
|
|
89
|
+
});
|
|
87
90
|
return;
|
|
88
91
|
}
|
|
89
92
|
const hasValue = this.value && this.value.trim() !== "";
|
|
90
93
|
const hasFiles = this.files && this.files.length > 0;
|
|
91
|
-
if (hasValue || hasFiles) {
|
|
92
|
-
|
|
94
|
+
if (hasValue || hasFiles) this.fire("send", {
|
|
95
|
+
bubbles: false,
|
|
96
|
+
composed: false,
|
|
97
|
+
detail: {
|
|
93
98
|
value: this.value?.trim() ?? "",
|
|
94
99
|
files: this.files ? [...this.files] : void 0
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
this.dispatchLegacy("u-submit", sendDetail);
|
|
98
|
-
}
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* 0.4.x 호환을 위한 legacy 이벤트를 함께 발행합니다.
|
|
102
|
-
* `u-submit`/`u-cancel`은 0.6.0에서 제거 예정.
|
|
103
|
-
*/
|
|
104
|
-
dispatchLegacy(name, detail) {
|
|
105
|
-
this.dispatchEvent(new CustomEvent(name, {
|
|
106
|
-
bubbles: true,
|
|
107
|
-
composed: true,
|
|
108
|
-
cancelable: true,
|
|
109
|
-
detail
|
|
110
|
-
}));
|
|
100
|
+
}
|
|
101
|
+
});
|
|
111
102
|
}
|
|
112
103
|
handleRemoveFile(e) {
|
|
113
104
|
e.stopPropagation();
|
|
@@ -6,14 +6,14 @@ var styles = css`
|
|
|
6
6
|
display: flex;
|
|
7
7
|
flex-direction: column;
|
|
8
8
|
padding: 12px;
|
|
9
|
-
border: 1px solid var(--u-border-color
|
|
9
|
+
border: 1px solid var(--u-border-color);
|
|
10
10
|
border-radius: 8px;
|
|
11
11
|
background-color: var(--u-bg-color);
|
|
12
12
|
}
|
|
13
13
|
:host(:focus-within) {
|
|
14
14
|
outline: none;
|
|
15
|
-
border-color: var(--u-
|
|
16
|
-
box-shadow: 0 0 0 1px var(--u-
|
|
15
|
+
border-color: var(--u-border-color-strong);
|
|
16
|
+
box-shadow: 0 0 0 1px var(--u-border-color-weak);
|
|
17
17
|
}
|
|
18
18
|
:host([loading])::before {
|
|
19
19
|
content: '';
|
|
@@ -60,15 +60,14 @@ var styles = css`
|
|
|
60
60
|
justify-content: space-between;
|
|
61
61
|
gap: 8px;
|
|
62
62
|
}
|
|
63
|
-
|
|
63
|
+
|
|
64
64
|
.send-btn {
|
|
65
|
+
flex-shrink: 0;
|
|
66
|
+
width: 32px;
|
|
67
|
+
height: 32px;
|
|
68
|
+
padding: 0;
|
|
65
69
|
font-size: 16px;
|
|
66
|
-
|
|
67
|
-
background-color: var(--u-neutral-800);
|
|
68
|
-
}
|
|
69
|
-
.send-btn[disabled] {
|
|
70
|
-
opacity: 0.5;
|
|
71
|
-
cursor: not-allowed;
|
|
70
|
+
border-radius: 50%;
|
|
72
71
|
}
|
|
73
72
|
|
|
74
73
|
@keyframes border-shimmer {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { UDataElement } from '
|
|
1
|
+
import { UDataElement } from '../UDataElement.js';
|
|
2
2
|
/**
|
|
3
3
|
* 참조 소스를 카드 형태로 표시하는 공통 컴포넌트입니다.
|
|
4
4
|
* Web과 Document 타입 모두 지원합니다.
|
|
5
5
|
*/
|
|
6
6
|
export declare class URefCard extends UDataElement {
|
|
7
|
-
static styles:
|
|
7
|
+
static styles: import('lit').CSSResultGroup[];
|
|
8
8
|
/** 카드 타입 (web 또는 document) */
|
|
9
9
|
type: 'web' | 'document';
|
|
10
10
|
/** 외부 링크 URL */
|
|
@@ -17,10 +17,11 @@ export declare class URefCard extends UDataElement {
|
|
|
17
17
|
tags?: string[];
|
|
18
18
|
render(): import('lit-html').TemplateResult<1>;
|
|
19
19
|
/**
|
|
20
|
-
*
|
|
21
|
-
*
|
|
20
|
+
* script-payload(UMarkedBlock 툴팁)와 property 바인딩(URefBlock) 두 사용
|
|
21
|
+
* 패턴을 모두 지원합니다. script 자식이 없으면 property 기반 렌더로
|
|
22
|
+
* 간주하고 조용히 건너뜁니다.
|
|
22
23
|
*/
|
|
23
|
-
protected
|
|
24
|
+
protected load(data?: object): Promise<void>;
|
|
24
25
|
/** 링크 클릭 핸들러 */
|
|
25
26
|
private handleAnchorClick;
|
|
26
27
|
/** URL에서 Google의 파비콘 URL을 반환합니다. */
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import "../../utilities/icons.js";
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
|
|
4
|
+
import { UDataElement } from "../UDataElement.js";
|
|
3
5
|
import { styles } from "./URefCard.styles.js";
|
|
4
6
|
import { html } from "lit";
|
|
5
7
|
import { customElement, property } from "lit/decorators.js";
|
|
6
8
|
import "@iyulab/components/dist/components/icon/UIcon.js";
|
|
7
|
-
import { arrayAttrConverter } from "@iyulab/components/dist/utilities/converters.js";
|
|
8
9
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
9
|
-
import {
|
|
10
|
+
import { arrayAttrConverter } from "@iyulab/components/dist/utilities/converters.js";
|
|
10
11
|
//#region src/components/references/URefCard.ts
|
|
11
12
|
var URefCard = class URefCard extends UDataElement {
|
|
12
13
|
constructor(..._args) {
|
|
@@ -33,9 +34,9 @@ var URefCard = class URefCard extends UDataElement {
|
|
|
33
34
|
<div style="flex: 1;"></div>
|
|
34
35
|
|
|
35
36
|
<div class="badge" type=${this.type}>
|
|
36
|
-
<u-icon
|
|
37
|
-
lib="
|
|
38
|
-
name=${this.type === "web" ? "
|
|
37
|
+
<u-icon
|
|
38
|
+
lib="internal-chat"
|
|
39
|
+
name=${this.type === "web" ? "world" : "file"}
|
|
39
40
|
></u-icon>
|
|
40
41
|
${this.type.toUpperCase()}
|
|
41
42
|
</div>
|
|
@@ -52,11 +53,13 @@ var URefCard = class URefCard extends UDataElement {
|
|
|
52
53
|
`;
|
|
53
54
|
}
|
|
54
55
|
/**
|
|
55
|
-
*
|
|
56
|
-
*
|
|
56
|
+
* script-payload(UMarkedBlock 툴팁)와 property 바인딩(URefBlock) 두 사용
|
|
57
|
+
* 패턴을 모두 지원합니다. script 자식이 없으면 property 기반 렌더로
|
|
58
|
+
* 간주하고 조용히 건너뜁니다.
|
|
57
59
|
*/
|
|
58
|
-
|
|
59
|
-
|
|
60
|
+
async load(data) {
|
|
61
|
+
if (!data && !this.querySelector("script[type=\"application/json\"]")) return;
|
|
62
|
+
return super.load(data);
|
|
60
63
|
}
|
|
61
64
|
/** 링크 클릭 핸들러 */
|
|
62
65
|
handleAnchorClick(e) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
|
|
3
3
|
import { URefCard } from "./URefCard.js";
|
|
4
4
|
import { styles } from "./URefCardGroup.styles.js";
|
|
5
5
|
import { html } from "lit";
|
|
@@ -1,12 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import "../../utilities/icons.js";
|
|
2
|
+
import __decorateMetadata from "../../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
|
|
3
4
|
import { styles } from "./URefTag.styles.js";
|
|
4
5
|
import { html } from "lit";
|
|
5
6
|
import { customElement, property } from "lit/decorators.js";
|
|
6
7
|
import "@iyulab/components/dist/components/icon/UIcon.js";
|
|
7
|
-
import "@iyulab/components/dist/components/tooltip/UTooltip.js";
|
|
8
8
|
import { UElement } from "@iyulab/components/dist/components/UElement.js";
|
|
9
9
|
import { ifDefined } from "lit/directives/if-defined.js";
|
|
10
|
+
import "@iyulab/components/dist/components/tooltip/UTooltip.js";
|
|
10
11
|
//#region src/components/references/URefTag.ts
|
|
11
12
|
var URefTag = class URefTag extends UElement {
|
|
12
13
|
static {
|
|
@@ -19,7 +20,7 @@ var URefTag = class URefTag extends UElement {
|
|
|
19
20
|
<slot></slot>
|
|
20
21
|
</a>
|
|
21
22
|
|
|
22
|
-
<u-icon lib="
|
|
23
|
+
<u-icon lib="internal-chat" name="external-link"></u-icon>
|
|
23
24
|
|
|
24
25
|
<u-tooltip interactive placement="bottom" distance="4">
|
|
25
26
|
<slot name="tooltip"></slot>
|
|
@@ -2,9 +2,9 @@ import { nothing, PropertyValues } from 'lit';
|
|
|
2
2
|
import { ChartType, ChartData, ChartOptions } from 'chart.js/auto';
|
|
3
3
|
import { UElement } from '@iyulab/components/dist/components/UElement.js';
|
|
4
4
|
/**
|
|
5
|
-
* Chart.js를 사용하여 다양한 차트를 렌더링하는
|
|
5
|
+
* Chart.js를 사용하여 다양한 차트를 렌더링하는 블록 컴포넌트입니다.
|
|
6
6
|
*/
|
|
7
|
-
export declare class
|
|
7
|
+
export declare class UChartBlock extends UElement {
|
|
8
8
|
static styles: import('lit').CSSResultGroup[];
|
|
9
9
|
/** 차트 유형 (bar, line, pie 등) */
|
|
10
10
|
type?: ChartType;
|
|
@@ -21,7 +21,7 @@ export declare class UChartView extends UElement {
|
|
|
21
21
|
connectedCallback(): void;
|
|
22
22
|
disconnectedCallback(): void;
|
|
23
23
|
protected updated(changedProperties: PropertyValues): void;
|
|
24
|
-
render(): import('lit-html').TemplateResult<1
|
|
24
|
+
render(): typeof nothing | import('lit-html').TemplateResult<1>;
|
|
25
25
|
/** Chart.js로 차트 생성 */
|
|
26
26
|
private createChart;
|
|
27
27
|
/** 기존 차트 인스턴스 제거 */
|
|
@@ -34,6 +34,6 @@ export declare class UChartView extends UElement {
|
|
|
34
34
|
}
|
|
35
35
|
declare global {
|
|
36
36
|
interface HTMLElementTagNameMap {
|
|
37
|
-
"u-chart-
|
|
37
|
+
"u-chart-block": UChartBlock;
|
|
38
38
|
}
|
|
39
39
|
}
|
|
@@ -1,20 +1,15 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import
|
|
1
|
+
import "../utilities/icons.js";
|
|
2
|
+
import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorateMetadata.js";
|
|
3
|
+
import __decorate from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
|
|
4
|
+
import { styles } from "./UChartBlock.styles.js";
|
|
4
5
|
import { html, nothing } from "lit";
|
|
5
6
|
import { customElement, property, query, state } from "lit/decorators.js";
|
|
6
7
|
import "@iyulab/components/dist/components/icon/UIcon.js";
|
|
7
|
-
import "@iyulab/components/dist/components/button/UButton.js";
|
|
8
8
|
import { UElement } from "@iyulab/components/dist/components/UElement.js";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
var
|
|
13
|
-
async function loadChartJS() {
|
|
14
|
-
if (!ChartCtor) ChartCtor = (await import("chart.js/auto")).Chart;
|
|
15
|
-
return ChartCtor;
|
|
16
|
-
}
|
|
17
|
-
var UChartView = class UChartView extends UElement {
|
|
9
|
+
import "@iyulab/components/dist/components/button/UButton.js";
|
|
10
|
+
import { Chart } from "chart.js/auto";
|
|
11
|
+
//#region src/components-extra/UChartBlock.ts
|
|
12
|
+
var UChartBlock = class UChartBlock extends UElement {
|
|
18
13
|
constructor(..._args) {
|
|
19
14
|
super(..._args);
|
|
20
15
|
this.error = null;
|
|
@@ -54,21 +49,21 @@ var UChartView = class UChartView extends UElement {
|
|
|
54
49
|
<div class="toolbar-right">
|
|
55
50
|
<u-button title="PNG Download" @click=${this.handleDownloadPNG}>
|
|
56
51
|
PNG
|
|
57
|
-
<u-icon slot="suffix" lib="
|
|
52
|
+
<u-icon slot="suffix" lib="internal-chat" name="download"></u-icon>
|
|
58
53
|
</u-button>
|
|
59
54
|
<u-button title="JSON Download" @click=${this.handleDownloadJSON}>
|
|
60
55
|
JSON
|
|
61
|
-
<u-icon slot="suffix" lib="
|
|
56
|
+
<u-icon slot="suffix" lib="internal-chat" name="download"></u-icon>
|
|
62
57
|
</u-button>
|
|
63
58
|
<u-button title="Full Screen" @click=${this.handleFullscreen}>
|
|
64
|
-
<u-icon lib="
|
|
59
|
+
<u-icon lib="internal-chat" name="external-link"></u-icon>
|
|
65
60
|
</u-button>
|
|
66
61
|
</div>
|
|
67
62
|
</div>
|
|
68
63
|
<div class="viewport">
|
|
69
64
|
<canvas></canvas>
|
|
70
65
|
<div class="error-overlay" ?hidden=${!this.error}>
|
|
71
|
-
<u-icon lib="
|
|
66
|
+
<u-icon lib="internal-chat" name="alert-triangle-fill"></u-icon>
|
|
72
67
|
<span>${this.error}</span>
|
|
73
68
|
</div>
|
|
74
69
|
</div>
|
|
@@ -80,20 +75,13 @@ var UChartView = class UChartView extends UElement {
|
|
|
80
75
|
if (!this.type || !this.data) return;
|
|
81
76
|
this.destroyChart();
|
|
82
77
|
this.error = null;
|
|
83
|
-
let Chart;
|
|
84
|
-
try {
|
|
85
|
-
Chart = await loadChartJS();
|
|
86
|
-
} catch {
|
|
87
|
-
this.error = "chart.js를 로드할 수 없습니다. chart.js 패키지가 설치되어 있는지 확인하세요.";
|
|
88
|
-
return;
|
|
89
|
-
}
|
|
90
78
|
const ctx = this.canvas.getContext("2d");
|
|
91
79
|
if (!ctx) {
|
|
92
80
|
this.error = "Canvas 2D context를 가져올 수 없습니다.";
|
|
93
81
|
return;
|
|
94
82
|
}
|
|
95
83
|
try {
|
|
96
|
-
this.applyTheme(
|
|
84
|
+
this.applyTheme();
|
|
97
85
|
this.chartjs = new Chart(ctx, {
|
|
98
86
|
type: this.type,
|
|
99
87
|
data: this.data,
|
|
@@ -115,7 +103,7 @@ var UChartView = class UChartView extends UElement {
|
|
|
115
103
|
}
|
|
116
104
|
}
|
|
117
105
|
/** 현재 테마의 CSS 변수를 읽어 Chart.defaults에 전역 적용 */
|
|
118
|
-
applyTheme(
|
|
106
|
+
applyTheme() {
|
|
119
107
|
const css = (v) => getComputedStyle(this).getPropertyValue(v).trim();
|
|
120
108
|
const textColor = css("--u-txt-color");
|
|
121
109
|
const weakColor = css("--u-txt-color-weak");
|
|
@@ -156,12 +144,12 @@ var UChartView = class UChartView extends UElement {
|
|
|
156
144
|
else target.requestFullscreen?.();
|
|
157
145
|
}
|
|
158
146
|
};
|
|
159
|
-
__decorate([property({ type: String }), __decorateMetadata("design:type", Object)],
|
|
160
|
-
__decorate([property({ type: Object }), __decorateMetadata("design:type", Object)],
|
|
161
|
-
__decorate([property({ type: Object }), __decorateMetadata("design:type", Object)],
|
|
162
|
-
__decorate([query("canvas"), __decorateMetadata("design:type", typeof
|
|
163
|
-
__decorate([query(".viewport"), __decorateMetadata("design:type", typeof
|
|
164
|
-
__decorate([state(), __decorateMetadata("design:type", Object)],
|
|
165
|
-
|
|
147
|
+
__decorate([property({ type: String }), __decorateMetadata("design:type", Object)], UChartBlock.prototype, "type", void 0);
|
|
148
|
+
__decorate([property({ type: Object }), __decorateMetadata("design:type", Object)], UChartBlock.prototype, "data", void 0);
|
|
149
|
+
__decorate([property({ type: Object }), __decorateMetadata("design:type", Object)], UChartBlock.prototype, "options", void 0);
|
|
150
|
+
__decorate([query("canvas"), __decorateMetadata("design:type", typeof HTMLCanvasElement === "undefined" ? Object : HTMLCanvasElement)], UChartBlock.prototype, "canvas", void 0);
|
|
151
|
+
__decorate([query(".viewport"), __decorateMetadata("design:type", typeof HTMLElement === "undefined" ? Object : HTMLElement)], UChartBlock.prototype, "viewport", void 0);
|
|
152
|
+
__decorate([state(), __decorateMetadata("design:type", Object)], UChartBlock.prototype, "error", void 0);
|
|
153
|
+
UChartBlock = __decorate([customElement("u-chart-block")], UChartBlock);
|
|
166
154
|
//#endregion
|
|
167
|
-
export {
|
|
155
|
+
export { UChartBlock };
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
//#region src/components-extra/UChartBlock.schema.ts
|
|
2
|
+
var schema = {
|
|
3
|
+
tag: "u-chart-block",
|
|
4
|
+
description: "Display charts using Chart.js v4 format. Use standard Chart.js configuration (type, data, options). The block accepts the exact same structure as Chart.js - no conversion needed.",
|
|
5
|
+
properties: {
|
|
6
|
+
type: {
|
|
7
|
+
type: "string",
|
|
8
|
+
enum: [
|
|
9
|
+
"bar",
|
|
10
|
+
"line",
|
|
11
|
+
"pie",
|
|
12
|
+
"doughnut",
|
|
13
|
+
"radar",
|
|
14
|
+
"polarArea",
|
|
15
|
+
"bubble",
|
|
16
|
+
"scatter"
|
|
17
|
+
],
|
|
18
|
+
description: "Chart.js chart type"
|
|
19
|
+
},
|
|
20
|
+
data: {
|
|
21
|
+
type: "object",
|
|
22
|
+
description: "Chart.js data configuration",
|
|
23
|
+
additionalProperties: true
|
|
24
|
+
},
|
|
25
|
+
options: {
|
|
26
|
+
type: "object",
|
|
27
|
+
description: "Chart.js options configuration (optional)",
|
|
28
|
+
additionalProperties: true
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
required: ["type", "data"]
|
|
32
|
+
};
|
|
33
|
+
//#endregion
|
|
34
|
+
export { schema as default };
|
|
@@ -6,9 +6,9 @@ export interface ImageSlide {
|
|
|
6
6
|
caption?: string;
|
|
7
7
|
}
|
|
8
8
|
/**
|
|
9
|
-
* u-carousel 기반 가로 슬라이드 + 슬라이딩 라이트박스 형태의 이미지
|
|
9
|
+
* u-carousel 기반 가로 슬라이드 + 슬라이딩 라이트박스 형태의 이미지 블록입니다.
|
|
10
10
|
*/
|
|
11
|
-
export declare class
|
|
11
|
+
export declare class UImagesBlock extends UElement {
|
|
12
12
|
static styles: import('lit').CSSResultGroup[];
|
|
13
13
|
/** 이미지 슬라이드 배열 */
|
|
14
14
|
items: ImageSlide[];
|
|
@@ -16,7 +16,7 @@ export declare class UImagesView extends UElement {
|
|
|
16
16
|
private index;
|
|
17
17
|
connectedCallback(): void;
|
|
18
18
|
disconnectedCallback(): void;
|
|
19
|
-
render(): import('lit-html').TemplateResult<1
|
|
19
|
+
render(): typeof nothing | import('lit-html').TemplateResult<1>;
|
|
20
20
|
private renderLightbox;
|
|
21
21
|
open: (i: number) => void;
|
|
22
22
|
close: () => void;
|
|
@@ -28,6 +28,6 @@ export declare class UImagesView extends UElement {
|
|
|
28
28
|
}
|
|
29
29
|
declare global {
|
|
30
30
|
interface HTMLElementTagNameMap {
|
|
31
|
-
"u-images-
|
|
31
|
+
"u-images-block": UImagesBlock;
|
|
32
32
|
}
|
|
33
33
|
}
|
|
@@ -1,14 +1,14 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import { styles } from "./
|
|
1
|
+
import __decorateMetadata from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorateMetadata.js";
|
|
2
|
+
import __decorate from "../_virtual/_@oxc-project_runtime@0.139.0/helpers/esm/decorate.js";
|
|
3
|
+
import { styles } from "./UImagesBlock.styles.js";
|
|
4
4
|
import { html, nothing } from "lit";
|
|
5
5
|
import { customElement, property, state } from "lit/decorators.js";
|
|
6
6
|
import "@iyulab/components/dist/components/icon/UIcon.js";
|
|
7
7
|
import { UElement } from "@iyulab/components/dist/components/UElement.js";
|
|
8
8
|
import { repeat } from "lit/directives/repeat.js";
|
|
9
9
|
import "@iyulab/components/dist/components/carousel/UCarousel.js";
|
|
10
|
-
//#region src/components/
|
|
11
|
-
var
|
|
10
|
+
//#region src/components-extra/UImagesBlock.ts
|
|
11
|
+
var UImagesBlock = class UImagesBlock extends UElement {
|
|
12
12
|
constructor(..._args) {
|
|
13
13
|
super(..._args);
|
|
14
14
|
this.items = [];
|
|
@@ -64,12 +64,12 @@ var UImagesView = class UImagesView extends UElement {
|
|
|
64
64
|
.gap=${8}
|
|
65
65
|
>
|
|
66
66
|
${repeat(this.items, (item, i) => html`
|
|
67
|
-
<div class="slide"
|
|
67
|
+
<div class="slide"
|
|
68
68
|
@click=${() => this.open(i)}>
|
|
69
|
-
<img
|
|
70
|
-
src=${item.src}
|
|
71
|
-
alt=${item.alt || ""}
|
|
72
|
-
loading="lazy"
|
|
69
|
+
<img
|
|
70
|
+
src=${item.src}
|
|
71
|
+
alt=${item.alt || ""}
|
|
72
|
+
loading="lazy"
|
|
73
73
|
/>
|
|
74
74
|
<div class="caption"
|
|
75
75
|
?hidden=${!item.caption}>
|
|
@@ -99,7 +99,7 @@ var UImagesView = class UImagesView extends UElement {
|
|
|
99
99
|
${idx + 1} / ${total}
|
|
100
100
|
</div>
|
|
101
101
|
<button class="lb-close" @click=${this.close}>
|
|
102
|
-
<u-icon lib="internal" name="x
|
|
102
|
+
<u-icon lib="internal" name="x"></u-icon>
|
|
103
103
|
</button>
|
|
104
104
|
</header>
|
|
105
105
|
|
|
@@ -137,8 +137,8 @@ var UImagesView = class UImagesView extends UElement {
|
|
|
137
137
|
`;
|
|
138
138
|
}
|
|
139
139
|
};
|
|
140
|
-
__decorate([property({ type: Array }), __decorateMetadata("design:type", Array)],
|
|
141
|
-
__decorate([state(), __decorateMetadata("design:type", Object)],
|
|
142
|
-
|
|
140
|
+
__decorate([property({ type: Array }), __decorateMetadata("design:type", Array)], UImagesBlock.prototype, "items", void 0);
|
|
141
|
+
__decorate([state(), __decorateMetadata("design:type", Object)], UImagesBlock.prototype, "index", void 0);
|
|
142
|
+
UImagesBlock = __decorate([customElement("u-images-block")], UImagesBlock);
|
|
143
143
|
//#endregion
|
|
144
|
-
export {
|
|
144
|
+
export { UImagesBlock };
|