@tipp/ui 2.3.23 → 2.3.24
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/app/index.js +100 -99
- package/dist/app/platform/coach-question-list.js +29 -29
- package/dist/app/platform/contents-card.js +29 -29
- package/dist/app/platform/curriculum-card.js +6 -6
- package/dist/app/platform/edit-coaching-time.js +78 -77
- package/dist/app/platform/edit-service-type.js +79 -78
- package/dist/app/platform/goal-manage-card-edit.js +78 -77
- package/dist/app/platform/goal-manage-card-read.js +29 -29
- package/dist/app/platform/on-offline-radio-card.js +78 -77
- package/dist/app/platform/report-card.js +29 -29
- package/dist/app/platform/reservation-card.js +79 -78
- package/dist/app/platform/session-card.js +81 -80
- package/dist/app/platform/session-review-simple-read.js +29 -29
- package/dist/app/platform/userInfos/coaching-customer-info/index.js +32 -32
- package/dist/app/platform/userInfos/coaching-customer-info/large.js +29 -29
- package/dist/app/platform/userInfos/coaching-customer-info/medium.js +29 -29
- package/dist/app/platform/userInfos/coaching-customer-info/small.js +29 -29
- package/dist/app/platform/userInfos/session-user-info-detail.js +29 -29
- package/dist/app/platform/userInfos/utils.js +28 -28
- package/dist/atoms/bullet-text.js +2 -2
- package/dist/atoms/dialog.js +2 -2
- package/dist/atoms/field-error-wrapper.js +2 -2
- package/dist/atoms/index.js +62 -62
- package/dist/atoms/list.js +2 -2
- package/dist/atoms/pagination.js +3 -3
- package/dist/chunk-3JADWKXT.js +230 -0
- package/dist/chunk-3JADWKXT.js.map +1 -0
- package/dist/chunk-6UXCNYVO.js +106 -0
- package/dist/chunk-6UXCNYVO.js.map +1 -0
- package/dist/chunk-77H5BUYO.js +55 -0
- package/dist/chunk-77H5BUYO.js.map +1 -0
- package/dist/chunk-7FIDFRJL.js +196 -0
- package/dist/chunk-7FIDFRJL.js.map +1 -0
- package/dist/chunk-ABMGYODX.js +196 -0
- package/dist/chunk-ABMGYODX.js.map +1 -0
- package/dist/chunk-ADLR7QZR.js +69 -0
- package/dist/chunk-ADLR7QZR.js.map +1 -0
- package/dist/chunk-BP5FU7EO.js +196 -0
- package/dist/chunk-BP5FU7EO.js.map +1 -0
- package/dist/chunk-E5W5TCRU.js +89 -0
- package/dist/chunk-E5W5TCRU.js.map +1 -0
- package/dist/chunk-FZ4F7FCO.js +63 -0
- package/dist/chunk-FZ4F7FCO.js.map +1 -0
- package/dist/chunk-HFVVQEOZ.js +1 -0
- package/dist/chunk-HFVVQEOZ.js.map +1 -0
- package/dist/chunk-I46BFZL6.js +69 -0
- package/dist/chunk-I46BFZL6.js.map +1 -0
- package/dist/chunk-JQH27TXL.js +89 -0
- package/dist/chunk-JQH27TXL.js.map +1 -0
- package/dist/chunk-K7LTEKQS.js +56 -0
- package/dist/chunk-K7LTEKQS.js.map +1 -0
- package/dist/chunk-SKA66SQI.js +144 -0
- package/dist/chunk-SKA66SQI.js.map +1 -0
- package/dist/chunk-TQMIIK56.js +230 -0
- package/dist/chunk-TQMIIK56.js.map +1 -0
- package/dist/chunk-XB2GOVFT.js +69 -0
- package/dist/chunk-XB2GOVFT.js.map +1 -0
- package/dist/chunk-Y7I4BEAO.js +69 -0
- package/dist/chunk-Y7I4BEAO.js.map +1 -0
- package/dist/context/index.js +5 -5
- package/dist/index.cjs +59 -34
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +159 -155
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/index.js +16 -16
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-comp.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-body.js +9 -9
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-footer.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-header.js +3 -3
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-layout.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-radio.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-option.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-satisfaction-text.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/ReviewQuestion/review-question-text.js +5 -5
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/complete-review.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/index.js +20 -20
- package/dist/molecules/curriculumV2/CurriculumContents/CurriculumReviewSteps/start-review.js +6 -6
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-ai-traning.js +3 -3
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-file-download.js +3 -3
- package/dist/molecules/curriculumV2/CurriculumContents/curriculum-review.js +22 -22
- package/dist/molecules/curriculumV2/CurriculumContents/index.js +26 -26
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/curriculum-item-title.js +2 -2
- package/dist/molecules/curriculumV2/CurriculumSidebar/Items/section-item.js +4 -4
- package/dist/molecules/curriculumV2/CurriculumSidebar/index.js +8 -8
- package/dist/molecules/curriculumV2/CurriculumSidebar/sidebar-item.js +5 -5
- package/dist/molecules/curriculumV2/curriculum-sub-nav.js +4 -4
- package/dist/molecules/curriculumV2/curriculum-v2-layout.js +2 -2
- package/dist/molecules/curriculumV2/index.js +35 -35
- package/dist/molecules/date-picker/date-picker-button.js +6 -6
- package/dist/molecules/date-picker/index.js +5 -5
- package/dist/molecules/description-json-render.js +5 -5
- package/dist/molecules/download-card.js +2 -2
- package/dist/molecules/dynamic-field.js +5 -5
- package/dist/molecules/dynamic-form-editor-field-editor-panel.js +4 -4
- package/dist/molecules/dynamic-form-editor-field-list-panel.js +3 -3
- package/dist/molecules/dynamic-form-editor-issues-panel.js +3 -3
- package/dist/molecules/dynamic-form-editor-preview-panel.js +8 -8
- package/dist/molecules/dynamic-form-editor.js +15 -15
- package/dist/molecules/dynamic-form-response-item.cjs +59 -34
- package/dist/molecules/dynamic-form-response-item.cjs.map +1 -1
- package/dist/molecules/dynamic-form-response-item.js +2 -1
- package/dist/molecules/dynamic-form.js +6 -6
- package/dist/molecules/expand-table/index.js +4 -4
- package/dist/molecules/force-refresh.js +2 -2
- package/dist/molecules/ghost-post.js +4 -4
- package/dist/molecules/index.cjs +57 -34
- package/dist/molecules/index.cjs.map +1 -1
- package/dist/molecules/index.js +73 -72
- package/dist/molecules/learning-post.js +5 -5
- package/dist/molecules/navigation.js +3 -3
- package/dist/molecules/one-on-one-guide-list.js +3 -3
- package/dist/molecules/stepper.js +4 -4
- package/dist/molecules/tag-selector.js +5 -5
- package/dist/molecules/time-select.js +3 -2
- package/dist/molecules/training-info-guideline.js +7 -7
- package/dist/utils/get-dynamic-form-display-value.cjs +80 -0
- package/dist/utils/get-dynamic-form-display-value.cjs.map +1 -0
- package/dist/utils/get-dynamic-form-display-value.d.cts +5 -0
- package/dist/utils/get-dynamic-form-display-value.d.ts +5 -0
- package/dist/utils/get-dynamic-form-display-value.js +8 -0
- package/dist/utils/get-dynamic-form-display-value.js.map +1 -0
- package/dist/utils/get-dynamic-form-display-value.test.cjs +124 -0
- package/dist/utils/get-dynamic-form-display-value.test.cjs.map +1 -0
- package/dist/utils/get-dynamic-form-display-value.test.d.cts +2 -0
- package/dist/utils/get-dynamic-form-display-value.test.d.ts +2 -0
- package/dist/utils/get-dynamic-form-display-value.test.js +75 -0
- package/dist/utils/get-dynamic-form-display-value.test.js.map +1 -0
- package/dist/utils/index.cjs +54 -0
- package/dist/utils/index.cjs.map +1 -1
- package/dist/utils/index.d.cts +2 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +9 -5
- package/package.json +1 -1
- package/src/molecules/dynamic-form-response-item.tsx +6 -44
- package/src/utils/get-dynamic-form-display-value.test.ts +81 -0
- package/src/utils/get-dynamic-form-display-value.ts +74 -0
- package/src/utils/index.ts +2 -1
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
import {
|
|
2
2
|
GhostPost
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-5JQOU3IR.js";
|
|
4
4
|
import "../chunk-7FKRQQYK.js";
|
|
5
|
+
import "../chunk-BESTU2AY.js";
|
|
6
|
+
import "../chunk-4Y5BEXVN.js";
|
|
7
|
+
import "../chunk-LDBWASUA.js";
|
|
5
8
|
import "../chunk-25HMMI7R.js";
|
|
6
9
|
import "../chunk-ZVDAEY5Q.js";
|
|
7
10
|
import "../chunk-LQY4RKWI.js";
|
|
8
|
-
import "../chunk-4Y5BEXVN.js";
|
|
9
|
-
import "../chunk-BESTU2AY.js";
|
|
10
|
-
import "../chunk-LDBWASUA.js";
|
|
11
11
|
import "../chunk-CRTRMMJ7.js";
|
|
12
12
|
export {
|
|
13
13
|
GhostPost
|
package/dist/molecules/index.cjs
CHANGED
|
@@ -2603,6 +2603,58 @@ function getCalloutIconComponent(iconName) {
|
|
|
2603
2603
|
return (_a = iconByName[iconName]) != null ? _a : DEFAULT_ICON;
|
|
2604
2604
|
}
|
|
2605
2605
|
|
|
2606
|
+
// src/utils/get-dynamic-form-display-value.ts
|
|
2607
|
+
function isEmptyDisplayValue(value) {
|
|
2608
|
+
return value === void 0 || value === null || value === "";
|
|
2609
|
+
}
|
|
2610
|
+
function findOptionLabel(options, value) {
|
|
2611
|
+
const valueString = String(value);
|
|
2612
|
+
const found = options.find(
|
|
2613
|
+
(option) => String(option.value) === valueString
|
|
2614
|
+
);
|
|
2615
|
+
return found == null ? void 0 : found.label;
|
|
2616
|
+
}
|
|
2617
|
+
function joinLabelsOrValues(options, values) {
|
|
2618
|
+
const labels = values.map((v) => {
|
|
2619
|
+
const label = findOptionLabel(options, v);
|
|
2620
|
+
return label != null ? label : String(v);
|
|
2621
|
+
});
|
|
2622
|
+
return labels.join(", ");
|
|
2623
|
+
}
|
|
2624
|
+
function getDynamicFormDisplayValue(field, value) {
|
|
2625
|
+
if (isEmptyDisplayValue(value)) return "";
|
|
2626
|
+
switch (field.type) {
|
|
2627
|
+
case "dropdown":
|
|
2628
|
+
case "choice":
|
|
2629
|
+
case "radio_cards": {
|
|
2630
|
+
const label = findOptionLabel(field.options, value);
|
|
2631
|
+
return label != null ? label : String(value);
|
|
2632
|
+
}
|
|
2633
|
+
case "image_radio_card": {
|
|
2634
|
+
const label = findOptionLabel(field.options, value);
|
|
2635
|
+
return label != null ? label : String(value);
|
|
2636
|
+
}
|
|
2637
|
+
case "choices": {
|
|
2638
|
+
if (Array.isArray(value)) {
|
|
2639
|
+
return joinLabelsOrValues(field.options, value);
|
|
2640
|
+
}
|
|
2641
|
+
const label = findOptionLabel(field.options, value);
|
|
2642
|
+
return label != null ? label : String(value);
|
|
2643
|
+
}
|
|
2644
|
+
case "yes_no": {
|
|
2645
|
+
if (value === true || value === "true" || value === "yes") return "\uB3D9\uC758";
|
|
2646
|
+
if (value === false || value === "false" || value === "no") return "\uBE44\uB3D9\uC758";
|
|
2647
|
+
return String(value);
|
|
2648
|
+
}
|
|
2649
|
+
case "short_text":
|
|
2650
|
+
case "long_text":
|
|
2651
|
+
case "number":
|
|
2652
|
+
case "email":
|
|
2653
|
+
default:
|
|
2654
|
+
return String(value);
|
|
2655
|
+
}
|
|
2656
|
+
}
|
|
2657
|
+
|
|
2606
2658
|
// src/molecules/time-select.tsx
|
|
2607
2659
|
var import_jsx_runtime37 = require("react/jsx-runtime");
|
|
2608
2660
|
var getOptionValue = (date, timeValue) => {
|
|
@@ -5487,12 +5539,6 @@ function createYupValidation(field, validation) {
|
|
|
5487
5539
|
function isRecord2(value) {
|
|
5488
5540
|
return Boolean(value) && typeof value === "object" && !Array.isArray(value);
|
|
5489
5541
|
}
|
|
5490
|
-
function isFieldOption2(value) {
|
|
5491
|
-
if (!isRecord2(value)) return false;
|
|
5492
|
-
const label = value.label;
|
|
5493
|
-
const optionValue = value.value;
|
|
5494
|
-
return typeof label === "string" && (typeof optionValue === "string" || typeof optionValue === "number");
|
|
5495
|
-
}
|
|
5496
5542
|
function DynamicFormResponseItem({
|
|
5497
5543
|
payload,
|
|
5498
5544
|
questionType,
|
|
@@ -5502,47 +5548,24 @@ function DynamicFormResponseItem({
|
|
|
5502
5548
|
if (value === void 0 || value === null || value === "") {
|
|
5503
5549
|
return "\uC751\uB2F5 \uC5C6\uC74C";
|
|
5504
5550
|
}
|
|
5505
|
-
|
|
5506
|
-
|
|
5507
|
-
|
|
5508
|
-
|
|
5509
|
-
if (!options2.every(isFieldOption2)) return void 0;
|
|
5510
|
-
return options2;
|
|
5511
|
-
};
|
|
5512
|
-
const options = getOptions2(config);
|
|
5551
|
+
if (config) {
|
|
5552
|
+
const displayValue = getDynamicFormDisplayValue(config, value);
|
|
5553
|
+
return displayValue === "" ? "\uC751\uB2F5 \uC5C6\uC74C" : displayValue;
|
|
5554
|
+
}
|
|
5513
5555
|
switch (questionType) {
|
|
5514
5556
|
case "text":
|
|
5515
5557
|
case "textarea":
|
|
5516
5558
|
return String(value);
|
|
5517
5559
|
case "radio":
|
|
5518
5560
|
case "select":
|
|
5519
|
-
case "choice":
|
|
5520
|
-
case "radio_cards":
|
|
5521
|
-
case "image_radio_card":
|
|
5522
|
-
if (options) {
|
|
5523
|
-
const option = options.find((opt) => String(opt.value) === String(value));
|
|
5524
|
-
return option ? option.label : String(value);
|
|
5525
|
-
}
|
|
5526
5561
|
return String(value);
|
|
5527
5562
|
case "checkbox":
|
|
5528
5563
|
case "choices":
|
|
5529
5564
|
if (Array.isArray(value)) {
|
|
5530
|
-
|
|
5531
|
-
return value.map((val) => {
|
|
5532
|
-
const option = options.find(
|
|
5533
|
-
(opt) => String(opt.value) === String(val)
|
|
5534
|
-
);
|
|
5535
|
-
return option ? option.label : String(val);
|
|
5536
|
-
}).join(", ");
|
|
5537
|
-
}
|
|
5538
|
-
return value.join(", ");
|
|
5565
|
+
return value.map((v) => String(v)).join(", ");
|
|
5539
5566
|
}
|
|
5540
5567
|
return String(value);
|
|
5541
5568
|
case "rating":
|
|
5542
|
-
if (options) {
|
|
5543
|
-
const option = options.find((opt) => opt.value === value);
|
|
5544
|
-
return option ? option.label : String(value);
|
|
5545
|
-
}
|
|
5546
5569
|
return String(value);
|
|
5547
5570
|
case "number":
|
|
5548
5571
|
return String(value);
|