@rchemist/listgrid 0.2.6
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/LICENSE +201 -0
- package/README.md +343 -0
- package/dist/adapters/next/NextListGridProvider.d.ts +5 -0
- package/dist/adapters/next/NextListGridProvider.js +7 -0
- package/dist/adapters/next/NextRouterAdapter.d.ts +2 -0
- package/dist/adapters/next/NextRouterAdapter.js +34 -0
- package/dist/adapters/next/NextUrlStateAdapter.d.ts +2 -0
- package/dist/adapters/next/NextUrlStateAdapter.js +31 -0
- package/dist/adapters/next/index.d.ts +4 -0
- package/dist/adapters/next/index.js +12 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +3 -0
- package/dist/listgrid/api/ApiClient.d.ts +20 -0
- package/dist/listgrid/api/ApiClient.js +32 -0
- package/dist/listgrid/api/index.d.ts +4 -0
- package/dist/listgrid/api/index.js +2 -0
- package/dist/listgrid/api/types.d.ts +21 -0
- package/dist/listgrid/api/types.js +30 -0
- package/dist/listgrid/auth/AuthContext.d.ts +12 -0
- package/dist/listgrid/auth/AuthContext.js +25 -0
- package/dist/listgrid/auth/SessionProvider.d.ts +4 -0
- package/dist/listgrid/auth/SessionProvider.js +16 -0
- package/dist/listgrid/auth/index.d.ts +6 -0
- package/dist/listgrid/auth/index.js +17 -0
- package/dist/listgrid/auth/types.d.ts +15 -0
- package/dist/listgrid/auth/types.js +12 -0
- package/dist/listgrid/common/func.d.ts +16 -0
- package/dist/listgrid/common/func.js +351 -0
- package/dist/listgrid/common/type.d.ts +35 -0
- package/dist/listgrid/common/type.js +46 -0
- package/dist/listgrid/components/api/ApiSpecificationButton.d.ts +5 -0
- package/dist/listgrid/components/api/ApiSpecificationButton.js +16 -0
- package/dist/listgrid/components/api/Type.d.ts +23 -0
- package/dist/listgrid/components/api/Type.js +8 -0
- package/dist/listgrid/components/api/ViewApiSpecification.d.ts +2 -0
- package/dist/listgrid/components/api/ViewApiSpecification.js +32 -0
- package/dist/listgrid/components/fields/ApplyFullAddressFields.d.ts +45 -0
- package/dist/listgrid/components/fields/ApplyFullAddressFields.js +177 -0
- package/dist/listgrid/components/fields/BirthdayField.d.ts +39 -0
- package/dist/listgrid/components/fields/BirthdayField.js +205 -0
- package/dist/listgrid/components/fields/BooleanField.d.ts +38 -0
- package/dist/listgrid/components/fields/BooleanField.js +141 -0
- package/dist/listgrid/components/fields/CheckboxField.d.ts +23 -0
- package/dist/listgrid/components/fields/CheckboxField.js +33 -0
- package/dist/listgrid/components/fields/ColorField.d.ts +18 -0
- package/dist/listgrid/components/fields/ColorField.js +63 -0
- package/dist/listgrid/components/fields/ColorPresetField.d.ts +19 -0
- package/dist/listgrid/components/fields/ColorPresetField.js +56 -0
- package/dist/listgrid/components/fields/CustomOptionField.d.ts +45 -0
- package/dist/listgrid/components/fields/CustomOptionField.js +176 -0
- package/dist/listgrid/components/fields/DateField.d.ts +34 -0
- package/dist/listgrid/components/fields/DateField.js +116 -0
- package/dist/listgrid/components/fields/DatetimeField.d.ts +29 -0
- package/dist/listgrid/components/fields/DatetimeField.js +93 -0
- package/dist/listgrid/components/fields/EmailField.d.ts +37 -0
- package/dist/listgrid/components/fields/EmailField.js +144 -0
- package/dist/listgrid/components/fields/FileField.d.ts +36 -0
- package/dist/listgrid/components/fields/FileField.js +157 -0
- package/dist/listgrid/components/fields/HtmlField.d.ts +24 -0
- package/dist/listgrid/components/fields/HtmlField.js +70 -0
- package/dist/listgrid/components/fields/ImageField.d.ts +34 -0
- package/dist/listgrid/components/fields/ImageField.js +125 -0
- package/dist/listgrid/components/fields/InlineMapField.d.ts +40 -0
- package/dist/listgrid/components/fields/InlineMapField.js +85 -0
- package/dist/listgrid/components/fields/LinkField.d.ts +26 -0
- package/dist/listgrid/components/fields/LinkField.js +61 -0
- package/dist/listgrid/components/fields/ManyToOneField.d.ts +80 -0
- package/dist/listgrid/components/fields/ManyToOneField.js +416 -0
- package/dist/listgrid/components/fields/MappedJoinField.d.ts +16 -0
- package/dist/listgrid/components/fields/MappedJoinField.js +29 -0
- package/dist/listgrid/components/fields/MarkdownField.d.ts +20 -0
- package/dist/listgrid/components/fields/MarkdownField.js +58 -0
- package/dist/listgrid/components/fields/MessageViewField.d.ts +20 -0
- package/dist/listgrid/components/fields/MessageViewField.js +27 -0
- package/dist/listgrid/components/fields/MonthField.d.ts +25 -0
- package/dist/listgrid/components/fields/MonthField.js +68 -0
- package/dist/listgrid/components/fields/MultiSelectField.d.ts +59 -0
- package/dist/listgrid/components/fields/MultiSelectField.js +74 -0
- package/dist/listgrid/components/fields/MultipleAssetField.d.ts +31 -0
- package/dist/listgrid/components/fields/MultipleAssetField.js +200 -0
- package/dist/listgrid/components/fields/NumberField.d.ts +54 -0
- package/dist/listgrid/components/fields/NumberField.js +216 -0
- package/dist/listgrid/components/fields/PasswordField.d.ts +23 -0
- package/dist/listgrid/components/fields/PasswordField.js +70 -0
- package/dist/listgrid/components/fields/PhoneNumberField.d.ts +39 -0
- package/dist/listgrid/components/fields/PhoneNumberField.js +91 -0
- package/dist/listgrid/components/fields/Preset.d.ts +68 -0
- package/dist/listgrid/components/fields/Preset.js +306 -0
- package/dist/listgrid/components/fields/ProfileField.d.ts +14 -0
- package/dist/listgrid/components/fields/ProfileField.js +25 -0
- package/dist/listgrid/components/fields/QrField.d.ts +21 -0
- package/dist/listgrid/components/fields/QrField.js +31 -0
- package/dist/listgrid/components/fields/RuleField.d.ts +11 -0
- package/dist/listgrid/components/fields/RuleField.js +24 -0
- package/dist/listgrid/components/fields/SelectField.d.ts +223 -0
- package/dist/listgrid/components/fields/SelectField.js +379 -0
- package/dist/listgrid/components/fields/SelectFieldRenderer.d.ts +35 -0
- package/dist/listgrid/components/fields/SelectFieldRenderer.js +363 -0
- package/dist/listgrid/components/fields/StatusChangeReasonModal.d.ts +18 -0
- package/dist/listgrid/components/fields/StatusChangeReasonModal.js +25 -0
- package/dist/listgrid/components/fields/StringField.d.ts +34 -0
- package/dist/listgrid/components/fields/StringField.js +131 -0
- package/dist/listgrid/components/fields/TagField.d.ts +35 -0
- package/dist/listgrid/components/fields/TagField.js +75 -0
- package/dist/listgrid/components/fields/TelephoneNumberField.d.ts +35 -0
- package/dist/listgrid/components/fields/TelephoneNumberField.js +121 -0
- package/dist/listgrid/components/fields/TextareaField.d.ts +27 -0
- package/dist/listgrid/components/fields/TextareaField.js +47 -0
- package/dist/listgrid/components/fields/TimeField.d.ts +21 -0
- package/dist/listgrid/components/fields/TimeField.js +40 -0
- package/dist/listgrid/components/fields/XrefAvailableDateMappingField.d.ts +22 -0
- package/dist/listgrid/components/fields/XrefAvailableDateMappingField.js +39 -0
- package/dist/listgrid/components/fields/XrefMappingField.d.ts +30 -0
- package/dist/listgrid/components/fields/XrefMappingField.js +59 -0
- package/dist/listgrid/components/fields/XrefPreferMappingField.d.ts +30 -0
- package/dist/listgrid/components/fields/XrefPreferMappingField.js +53 -0
- package/dist/listgrid/components/fields/XrefPriceMappingField.d.ts +33 -0
- package/dist/listgrid/components/fields/XrefPriceMappingField.js +56 -0
- package/dist/listgrid/components/fields/YearField.d.ts +32 -0
- package/dist/listgrid/components/fields/YearField.js +99 -0
- package/dist/listgrid/components/fields/abstract/AbstractDateField.d.ts +33 -0
- package/dist/listgrid/components/fields/abstract/AbstractDateField.js +61 -0
- package/dist/listgrid/components/fields/abstract/AbstractManyToOneField.d.ts +97 -0
- package/dist/listgrid/components/fields/abstract/AbstractManyToOneField.js +50 -0
- package/dist/listgrid/components/fields/abstract/CheckButtonValidationField.d.ts +22 -0
- package/dist/listgrid/components/fields/abstract/CheckButtonValidationField.js +92 -0
- package/dist/listgrid/components/fields/abstract/FormField.d.ts +250 -0
- package/dist/listgrid/components/fields/abstract/FormField.js +606 -0
- package/dist/listgrid/components/fields/abstract/ListableFormField.d.ts +140 -0
- package/dist/listgrid/components/fields/abstract/ListableFormField.js +285 -0
- package/dist/listgrid/components/fields/abstract/OptionalField.d.ts +96 -0
- package/dist/listgrid/components/fields/abstract/OptionalField.js +310 -0
- package/dist/listgrid/components/fields/abstract/index.d.ts +6 -0
- package/dist/listgrid/components/fields/abstract/index.js +12 -0
- package/dist/listgrid/components/fields/address/AddressFieldView.d.ts +9 -0
- package/dist/listgrid/components/fields/address/AddressFieldView.js +92 -0
- package/dist/listgrid/components/fields/address/AddressMapField.d.ts +33 -0
- package/dist/listgrid/components/fields/address/AddressMapField.js +49 -0
- package/dist/listgrid/components/fields/address/KakaoMap.d.ts +10 -0
- package/dist/listgrid/components/fields/address/KakaoMap.js +50 -0
- package/dist/listgrid/components/fields/address/PostCodeSelector.d.ts +9 -0
- package/dist/listgrid/components/fields/address/PostCodeSelector.js +125 -0
- package/dist/listgrid/components/fields/contentasset/ContentAssetField.d.ts +61 -0
- package/dist/listgrid/components/fields/contentasset/ContentAssetField.js +80 -0
- package/dist/listgrid/components/fields/contentasset/ContentAssetItem.d.ts +17 -0
- package/dist/listgrid/components/fields/contentasset/ContentAssetItem.js +67 -0
- package/dist/listgrid/components/fields/contentasset/components/AddContentDialog.d.ts +11 -0
- package/dist/listgrid/components/fields/contentasset/components/AddContentDialog.js +68 -0
- package/dist/listgrid/components/fields/contentasset/components/ContentAssetItemUI.d.ts +30 -0
- package/dist/listgrid/components/fields/contentasset/components/ContentAssetItemUI.js +38 -0
- package/dist/listgrid/components/fields/contentasset/hooks/useContentAsset.d.ts +36 -0
- package/dist/listgrid/components/fields/contentasset/hooks/useContentAsset.js +188 -0
- package/dist/listgrid/components/fields/contentasset/index.d.ts +2 -0
- package/dist/listgrid/components/fields/contentasset/index.js +1 -0
- package/dist/listgrid/components/fields/contentasset/types.d.ts +50 -0
- package/dist/listgrid/components/fields/contentasset/types.js +48 -0
- package/dist/listgrid/components/fields/filter/DatetimeFilter.d.ts +7 -0
- package/dist/listgrid/components/fields/filter/DatetimeFilter.js +46 -0
- package/dist/listgrid/components/fields/filter/NumberFilter.d.ts +7 -0
- package/dist/listgrid/components/fields/filter/NumberFilter.js +74 -0
- package/dist/listgrid/components/fields/rule/RuleBasedFieldView.d.ts +15 -0
- package/dist/listgrid/components/fields/rule/RuleBasedFieldView.js +351 -0
- package/dist/listgrid/components/fields/rule/RuleBasedSelector.d.ts +13 -0
- package/dist/listgrid/components/fields/rule/RuleBasedSelector.js +75 -0
- package/dist/listgrid/components/fields/rule/RuleCondition.d.ts +14 -0
- package/dist/listgrid/components/fields/rule/RuleCondition.js +173 -0
- package/dist/listgrid/components/fields/rule/RuleFieldRenderer.d.ts +7 -0
- package/dist/listgrid/components/fields/rule/RuleFieldRenderer.js +21 -0
- package/dist/listgrid/components/fields/rule/RuleFieldView.d.ts +7 -0
- package/dist/listgrid/components/fields/rule/RuleFieldView.js +28 -0
- package/dist/listgrid/components/fields/rule/Type.d.ts +54 -0
- package/dist/listgrid/components/fields/rule/Type.js +72 -0
- package/dist/listgrid/components/fields/view/CardManyToOneView.d.ts +93 -0
- package/dist/listgrid/components/fields/view/CardManyToOneView.js +409 -0
- package/dist/listgrid/components/fields/view/CopyableTextView.d.ts +11 -0
- package/dist/listgrid/components/fields/view/CopyableTextView.js +44 -0
- package/dist/listgrid/components/fields/view/DynamicSelectFieldView.d.ts +28 -0
- package/dist/listgrid/components/fields/view/DynamicSelectFieldView.js +119 -0
- package/dist/listgrid/components/fields/view/LinkFieldView.d.ts +14 -0
- package/dist/listgrid/components/fields/view/LinkFieldView.js +41 -0
- package/dist/listgrid/components/fields/view/ManyToOneListView.d.ts +8 -0
- package/dist/listgrid/components/fields/view/ManyToOneListView.js +25 -0
- package/dist/listgrid/components/fields/view/ManyToOneMultiFilterView.d.ts +12 -0
- package/dist/listgrid/components/fields/view/ManyToOneMultiFilterView.js +142 -0
- package/dist/listgrid/components/fields/view/ManyToOneView.d.ts +8 -0
- package/dist/listgrid/components/fields/view/ManyToOneView.js +322 -0
- package/dist/listgrid/components/fields/view/MultipleAssetUpload.d.ts +7 -0
- package/dist/listgrid/components/fields/view/MultipleAssetUpload.js +47 -0
- package/dist/listgrid/components/fields/view/PhoneNumberFieldView.d.ts +19 -0
- package/dist/listgrid/components/fields/view/PhoneNumberFieldView.js +82 -0
- package/dist/listgrid/components/fields/view/PhoneNumberListView.d.ts +9 -0
- package/dist/listgrid/components/fields/view/PhoneNumberListView.js +49 -0
- package/dist/listgrid/components/fields/view/SelectBoxManyToOneView.d.ts +47 -0
- package/dist/listgrid/components/fields/view/SelectBoxManyToOneView.js +286 -0
- package/dist/listgrid/components/fields/view/SmsModal.d.ts +6 -0
- package/dist/listgrid/components/fields/view/SmsModal.js +124 -0
- package/dist/listgrid/components/fields/view/TreeSelectView.d.ts +11 -0
- package/dist/listgrid/components/fields/view/TreeSelectView.js +118 -0
- package/dist/listgrid/components/fields/view/XrefAvailableDateMappingView.d.ts +19 -0
- package/dist/listgrid/components/fields/view/XrefAvailableDateMappingView.js +305 -0
- package/dist/listgrid/components/fields/view/XrefMappingView.d.ts +16 -0
- package/dist/listgrid/components/fields/view/XrefMappingView.js +173 -0
- package/dist/listgrid/components/fields/view/XrefPiceMappingView.d.ts +19 -0
- package/dist/listgrid/components/fields/view/XrefPiceMappingView.js +319 -0
- package/dist/listgrid/components/fields/view/XrefPreferMappingView.d.ts +19 -0
- package/dist/listgrid/components/fields/view/XrefPreferMappingView.js +261 -0
- package/dist/listgrid/components/fields/view/XrefPriorityMappingView.d.ts +19 -0
- package/dist/listgrid/components/fields/view/XrefPriorityMappingView.js +180 -0
- package/dist/listgrid/components/form/FieldRenderer.d.ts +23 -0
- package/dist/listgrid/components/form/FieldRenderer.js +292 -0
- package/dist/listgrid/components/form/SubCollectionRenderer.d.ts +22 -0
- package/dist/listgrid/components/form/SubCollectionRenderer.js +46 -0
- package/dist/listgrid/components/form/ViewEntityForm.d.ts +14 -0
- package/dist/listgrid/components/form/ViewEntityForm.js +124 -0
- package/dist/listgrid/components/form/ViewFieldGroup.d.ts +27 -0
- package/dist/listgrid/components/form/ViewFieldGroup.js +164 -0
- package/dist/listgrid/components/form/ViewTab.d.ts +24 -0
- package/dist/listgrid/components/form/ViewTab.js +68 -0
- package/dist/listgrid/components/form/ViewTabPanel.d.ts +14 -0
- package/dist/listgrid/components/form/ViewTabPanel.js +32 -0
- package/dist/listgrid/components/form/context/EntityFormThemeContext.d.ts +52 -0
- package/dist/listgrid/components/form/context/EntityFormThemeContext.js +129 -0
- package/dist/listgrid/components/form/context/index.d.ts +1 -0
- package/dist/listgrid/components/form/context/index.js +1 -0
- package/dist/listgrid/components/form/hooks/useAlertManager.d.ts +12 -0
- package/dist/listgrid/components/form/hooks/useAlertManager.js +103 -0
- package/dist/listgrid/components/form/hooks/useEntityFormAutoSave.d.ts +23 -0
- package/dist/listgrid/components/form/hooks/useEntityFormAutoSave.js +145 -0
- package/dist/listgrid/components/form/hooks/useEntityFormInitializer.d.ts +24 -0
- package/dist/listgrid/components/form/hooks/useEntityFormInitializer.js +109 -0
- package/dist/listgrid/components/form/hooks/useEntityFormLogic.d.ts +63 -0
- package/dist/listgrid/components/form/hooks/useEntityFormLogic.js +513 -0
- package/dist/listgrid/components/form/hooks/useEntityFormSave.d.ts +28 -0
- package/dist/listgrid/components/form/hooks/useEntityFormSave.js +89 -0
- package/dist/listgrid/components/form/hooks/useEntityFormTitle.d.ts +12 -0
- package/dist/listgrid/components/form/hooks/useEntityFormTitle.js +53 -0
- package/dist/listgrid/components/form/themes/defaultTheme.d.ts +11 -0
- package/dist/listgrid/components/form/themes/defaultTheme.js +129 -0
- package/dist/listgrid/components/form/themes/index.d.ts +1 -0
- package/dist/listgrid/components/form/themes/index.js +1 -0
- package/dist/listgrid/components/form/types/ViewEntityForm.types.d.ts +169 -0
- package/dist/listgrid/components/form/types/ViewEntityForm.types.js +1 -0
- package/dist/listgrid/components/form/types/ViewEntityFormAlerts.types.d.ts +26 -0
- package/dist/listgrid/components/form/types/ViewEntityFormAlerts.types.js +1 -0
- package/dist/listgrid/components/form/types/ViewEntityFormButtons.types.d.ts +49 -0
- package/dist/listgrid/components/form/types/ViewEntityFormButtons.types.js +1 -0
- package/dist/listgrid/components/form/types/ViewEntityFormTheme.types.d.ts +518 -0
- package/dist/listgrid/components/form/types/ViewEntityFormTheme.types.js +1 -0
- package/dist/listgrid/components/form/ui/AlertItem.d.ts +7 -0
- package/dist/listgrid/components/form/ui/AlertItem.js +18 -0
- package/dist/listgrid/components/form/ui/CreateStepButtons.d.ts +25 -0
- package/dist/listgrid/components/form/ui/CreateStepButtons.js +18 -0
- package/dist/listgrid/components/form/ui/CreateStepView.d.ts +39 -0
- package/dist/listgrid/components/form/ui/CreateStepView.js +50 -0
- package/dist/listgrid/components/form/ui/ViewEntityError.d.ts +13 -0
- package/dist/listgrid/components/form/ui/ViewEntityError.js +90 -0
- package/dist/listgrid/components/form/ui/ViewEntityFormAlerts.d.ts +3 -0
- package/dist/listgrid/components/form/ui/ViewEntityFormAlerts.js +24 -0
- package/dist/listgrid/components/form/ui/ViewEntityFormButtons.d.ts +24 -0
- package/dist/listgrid/components/form/ui/ViewEntityFormButtons.js +208 -0
- package/dist/listgrid/components/form/ui/ViewEntityFormErrors.d.ts +25 -0
- package/dist/listgrid/components/form/ui/ViewEntityFormErrors.js +9 -0
- package/dist/listgrid/components/form/ui/ViewEntityFormFields.d.ts +38 -0
- package/dist/listgrid/components/form/ui/ViewEntityFormFields.js +25 -0
- package/dist/listgrid/components/form/ui/ViewEntityFormSkeleton.d.ts +16 -0
- package/dist/listgrid/components/form/ui/ViewEntityFormSkeleton.js +79 -0
- package/dist/listgrid/components/form/ui/ViewEntityFormTitle.d.ts +15 -0
- package/dist/listgrid/components/form/ui/ViewEntityFormTitle.js +21 -0
- package/dist/listgrid/components/form/ui/ViewFieldError.d.ts +5 -0
- package/dist/listgrid/components/form/ui/ViewFieldError.js +12 -0
- package/dist/listgrid/components/form/ui/ViewHelpIcon.d.ts +5 -0
- package/dist/listgrid/components/form/ui/ViewHelpIcon.js +13 -0
- package/dist/listgrid/components/form/ui/ViewHelpText.d.ts +5 -0
- package/dist/listgrid/components/form/ui/ViewHelpText.js +10 -0
- package/dist/listgrid/components/form/ui/buttons/ClosePopupButton.d.ts +8 -0
- package/dist/listgrid/components/form/ui/buttons/ClosePopupButton.js +32 -0
- package/dist/listgrid/components/form/ui/buttons/DeleteButton.d.ts +2 -0
- package/dist/listgrid/components/form/ui/buttons/DeleteButton.js +101 -0
- package/dist/listgrid/components/form/ui/buttons/ListButton.d.ts +2 -0
- package/dist/listgrid/components/form/ui/buttons/ListButton.js +55 -0
- package/dist/listgrid/components/form/ui/buttons/SaveButton.d.ts +2 -0
- package/dist/listgrid/components/form/ui/buttons/SaveButton.js +55 -0
- package/dist/listgrid/components/helper/FieldRendererHelper.d.ts +23 -0
- package/dist/listgrid/components/helper/FieldRendererHelper.js +27 -0
- package/dist/listgrid/components/helper/ShowNotifications.d.ts +13 -0
- package/dist/listgrid/components/helper/ShowNotifications.js +58 -0
- package/dist/listgrid/components/list/AdvancedSearchForm.d.ts +17 -0
- package/dist/listgrid/components/list/AdvancedSearchForm.js +113 -0
- package/dist/listgrid/components/list/AdvancedSearchFormV2.d.ts +19 -0
- package/dist/listgrid/components/list/AdvancedSearchFormV2.js +347 -0
- package/dist/listgrid/components/list/ListGridHeader.d.ts +2 -0
- package/dist/listgrid/components/list/ListGridHeader.js +21 -0
- package/dist/listgrid/components/list/QuickSearchBar.d.ts +22 -0
- package/dist/listgrid/components/list/QuickSearchBar.js +17 -0
- package/dist/listgrid/components/list/RowItem.d.ts +2 -0
- package/dist/listgrid/components/list/RowItem.js +70 -0
- package/dist/listgrid/components/list/SubCollectionButtons.d.ts +2 -0
- package/dist/listgrid/components/list/SubCollectionButtons.js +36 -0
- package/dist/listgrid/components/list/ViewFieldSelector.d.ts +10 -0
- package/dist/listgrid/components/list/ViewFieldSelector.js +48 -0
- package/dist/listgrid/components/list/ViewListGrid.d.ts +2 -0
- package/dist/listgrid/components/list/ViewListGrid.js +359 -0
- package/dist/listgrid/components/list/context/EntityFormScopeContext.d.ts +39 -0
- package/dist/listgrid/components/list/context/EntityFormScopeContext.js +75 -0
- package/dist/listgrid/components/list/context/ListGridThemeContext.d.ts +70 -0
- package/dist/listgrid/components/list/context/ListGridThemeContext.js +157 -0
- package/dist/listgrid/components/list/context/index.d.ts +2 -0
- package/dist/listgrid/components/list/context/index.js +1 -0
- package/dist/listgrid/components/list/hooks/searchFormUrlSync.d.ts +42 -0
- package/dist/listgrid/components/list/hooks/searchFormUrlSync.js +212 -0
- package/dist/listgrid/components/list/hooks/urlStateParsers.d.ts +63 -0
- package/dist/listgrid/components/list/hooks/urlStateParsers.js +241 -0
- package/dist/listgrid/components/list/hooks/useCardSubCollectionData.d.ts +34 -0
- package/dist/listgrid/components/list/hooks/useCardSubCollectionData.js +181 -0
- package/dist/listgrid/components/list/hooks/useListGridHeader.d.ts +6 -0
- package/dist/listgrid/components/list/hooks/useListGridHeader.js +92 -0
- package/dist/listgrid/components/list/hooks/useListGridLogic.d.ts +2 -0
- package/dist/listgrid/components/list/hooks/useListGridLogic.js +625 -0
- package/dist/listgrid/components/list/hooks/useListGridUrlState.d.ts +45 -0
- package/dist/listgrid/components/list/hooks/useListGridUrlState.js +131 -0
- package/dist/listgrid/components/list/hooks/useQuickSearchBar.d.ts +22 -0
- package/dist/listgrid/components/list/hooks/useQuickSearchBar.js +104 -0
- package/dist/listgrid/components/list/hooks/useSubCollectionExpansion.d.ts +21 -0
- package/dist/listgrid/components/list/hooks/useSubCollectionExpansion.js +62 -0
- package/dist/listgrid/components/list/themes/defaultListGridTheme.d.ts +14 -0
- package/dist/listgrid/components/list/themes/defaultListGridTheme.js +169 -0
- package/dist/listgrid/components/list/themes/index.d.ts +4 -0
- package/dist/listgrid/components/list/themes/index.js +4 -0
- package/dist/listgrid/components/list/themes/variants/mainTheme.d.ts +8 -0
- package/dist/listgrid/components/list/themes/variants/mainTheme.js +37 -0
- package/dist/listgrid/components/list/themes/variants/modalTheme.d.ts +8 -0
- package/dist/listgrid/components/list/themes/variants/modalTheme.js +47 -0
- package/dist/listgrid/components/list/themes/variants/subCollectionTheme.d.ts +8 -0
- package/dist/listgrid/components/list/themes/variants/subCollectionTheme.js +101 -0
- package/dist/listgrid/components/list/types/ListGridHeader.types.d.ts +35 -0
- package/dist/listgrid/components/list/types/ListGridHeader.types.js +3 -0
- package/dist/listgrid/components/list/types/RowItem.types.d.ts +57 -0
- package/dist/listgrid/components/list/types/RowItem.types.js +1 -0
- package/dist/listgrid/components/list/types/SubCollectionButtons.type.d.ts +29 -0
- package/dist/listgrid/components/list/types/SubCollectionButtons.type.js +1 -0
- package/dist/listgrid/components/list/types/ViewListGrid.types.d.ts +152 -0
- package/dist/listgrid/components/list/types/ViewListGrid.types.js +2 -0
- package/dist/listgrid/components/list/types/ViewListGridTheme.types.d.ts +374 -0
- package/dist/listgrid/components/list/types/ViewListGridTheme.types.js +1 -0
- package/dist/listgrid/components/list/ui/CardFieldRenderer.d.ts +31 -0
- package/dist/listgrid/components/list/ui/CardFieldRenderer.js +71 -0
- package/dist/listgrid/components/list/ui/CardFieldSection.d.ts +27 -0
- package/dist/listgrid/components/list/ui/CardFieldSection.js +108 -0
- package/dist/listgrid/components/list/ui/CardItem.d.ts +28 -0
- package/dist/listgrid/components/list/ui/CardItem.js +376 -0
- package/dist/listgrid/components/list/ui/CardSubCollectionModal.d.ts +38 -0
- package/dist/listgrid/components/list/ui/CardSubCollectionModal.js +80 -0
- package/dist/listgrid/components/list/ui/CardSubCollectionView.d.ts +44 -0
- package/dist/listgrid/components/list/ui/CardSubCollectionView.js +238 -0
- package/dist/listgrid/components/list/ui/DataTransferModal.d.ts +12 -0
- package/dist/listgrid/components/list/ui/DataTransferModal.js +10 -0
- package/dist/listgrid/components/list/ui/EntireChecker.d.ts +11 -0
- package/dist/listgrid/components/list/ui/EntireChecker.js +46 -0
- package/dist/listgrid/components/list/ui/FieldSelector.d.ts +11 -0
- package/dist/listgrid/components/list/ui/FieldSelector.js +40 -0
- package/dist/listgrid/components/list/ui/FilterButton.d.ts +7 -0
- package/dist/listgrid/components/list/ui/FilterButton.js +5 -0
- package/dist/listgrid/components/list/ui/FilterDropdown.d.ts +15 -0
- package/dist/listgrid/components/list/ui/FilterDropdown.js +106 -0
- package/dist/listgrid/components/list/ui/FilterView.d.ts +12 -0
- package/dist/listgrid/components/list/ui/FilterView.js +22 -0
- package/dist/listgrid/components/list/ui/HeaderActionButtons.d.ts +10 -0
- package/dist/listgrid/components/list/ui/HeaderActionButtons.js +39 -0
- package/dist/listgrid/components/list/ui/HeaderField.d.ts +19 -0
- package/dist/listgrid/components/list/ui/HeaderField.js +32 -0
- package/dist/listgrid/components/list/ui/HeaderFieldFilter.d.ts +14 -0
- package/dist/listgrid/components/list/ui/HeaderFieldFilter.js +166 -0
- package/dist/listgrid/components/list/ui/HeaderTitle.d.ts +4 -0
- package/dist/listgrid/components/list/ui/HeaderTitle.js +13 -0
- package/dist/listgrid/components/list/ui/InlineSubCollectionView.d.ts +30 -0
- package/dist/listgrid/components/list/ui/InlineSubCollectionView.js +260 -0
- package/dist/listgrid/components/list/ui/MemoizedFilterField.d.ts +14 -0
- package/dist/listgrid/components/list/ui/MemoizedFilterField.js +67 -0
- package/dist/listgrid/components/list/ui/QuickSearchInput.d.ts +9 -0
- package/dist/listgrid/components/list/ui/QuickSearchInput.js +17 -0
- package/dist/listgrid/components/list/ui/SearchBarActions.d.ts +19 -0
- package/dist/listgrid/components/list/ui/SearchBarActions.js +39 -0
- package/dist/listgrid/components/list/ui/SortField.d.ts +8 -0
- package/dist/listgrid/components/list/ui/SortField.js +42 -0
- package/dist/listgrid/components/list/ui/SubCollectionInlineView.d.ts +23 -0
- package/dist/listgrid/components/list/ui/SubCollectionInlineView.js +47 -0
- package/dist/listgrid/components/list/ui/SubCollectionModal.d.ts +15 -0
- package/dist/listgrid/components/list/ui/SubCollectionModal.js +34 -0
- package/dist/listgrid/components/list/ui/SubCollectionViewModal.d.ts +13 -0
- package/dist/listgrid/components/list/ui/SubCollectionViewModal.js +33 -0
- package/dist/listgrid/components/list/ui/SyncTopScrollbar.d.ts +18 -0
- package/dist/listgrid/components/list/ui/SyncTopScrollbar.js +91 -0
- package/dist/listgrid/components/list/ui/TableSubCollectionView.d.ts +25 -0
- package/dist/listgrid/components/list/ui/TableSubCollectionView.js +213 -0
- package/dist/listgrid/components/list/ui/ViewColumn.d.ts +2 -0
- package/dist/listgrid/components/list/ui/ViewColumn.js +56 -0
- package/dist/listgrid/components/list/ui/ViewListGridSkeleton.d.ts +20 -0
- package/dist/listgrid/components/list/ui/ViewListGridSkeleton.js +82 -0
- package/dist/listgrid/components/list/ui/ViewRows.d.ts +15 -0
- package/dist/listgrid/components/list/ui/ViewRows.js +283 -0
- package/dist/listgrid/components/list/ui/buttons/CacheClearButton.d.ts +9 -0
- package/dist/listgrid/components/list/ui/buttons/CacheClearButton.js +35 -0
- package/dist/listgrid/components/list/ui/buttons/CreateButton.d.ts +13 -0
- package/dist/listgrid/components/list/ui/buttons/CreateButton.js +13 -0
- package/dist/listgrid/components/list/ui/buttons/PriorityButton.d.ts +11 -0
- package/dist/listgrid/components/list/ui/buttons/PriorityButton.js +49 -0
- package/dist/listgrid/components/list/ui/headerFilterStore.d.ts +8 -0
- package/dist/listgrid/components/list/ui/headerFilterStore.js +13 -0
- package/dist/listgrid/components/list/utils/mappedByFieldFilter.d.ts +21 -0
- package/dist/listgrid/components/list/utils/mappedByFieldFilter.js +54 -0
- package/dist/listgrid/components/list/utils/performanceLogger.d.ts +48 -0
- package/dist/listgrid/components/list/utils/performanceLogger.js +67 -0
- package/dist/listgrid/components/revision/RevisionField.d.ts +13 -0
- package/dist/listgrid/components/revision/RevisionField.js +194 -0
- package/dist/listgrid/config/AdvancedSearchOpenCache.d.ts +3 -0
- package/dist/listgrid/config/AdvancedSearchOpenCache.js +48 -0
- package/dist/listgrid/config/CardSubCollectionField.d.ts +133 -0
- package/dist/listgrid/config/CardSubCollectionField.js +164 -0
- package/dist/listgrid/config/CommonType.d.ts +4 -0
- package/dist/listgrid/config/CommonType.js +15 -0
- package/dist/listgrid/config/Config.d.ts +251 -0
- package/dist/listgrid/config/Config.js +299 -0
- package/dist/listgrid/config/EntityField.d.ts +148 -0
- package/dist/listgrid/config/EntityField.js +1 -0
- package/dist/listgrid/config/EntityFieldGroup.d.ts +37 -0
- package/dist/listgrid/config/EntityFieldGroup.js +55 -0
- package/dist/listgrid/config/EntityForm.d.ts +101 -0
- package/dist/listgrid/config/EntityForm.js +859 -0
- package/dist/listgrid/config/EntityFormButton.d.ts +56 -0
- package/dist/listgrid/config/EntityFormButton.js +42 -0
- package/dist/listgrid/config/EntityFormMethod.d.ts +32 -0
- package/dist/listgrid/config/EntityFormMethod.js +152 -0
- package/dist/listgrid/config/EntityFormTypes.d.ts +62 -0
- package/dist/listgrid/config/EntityFormTypes.js +1 -0
- package/dist/listgrid/config/EntityItem.d.ts +86 -0
- package/dist/listgrid/config/EntityItem.js +1 -0
- package/dist/listgrid/config/EntityTab.d.ts +26 -0
- package/dist/listgrid/config/EntityTab.js +68 -0
- package/dist/listgrid/config/InlineSubCollectionField.d.ts +184 -0
- package/dist/listgrid/config/InlineSubCollectionField.js +194 -0
- package/dist/listgrid/config/ListGrid.d.ts +56 -0
- package/dist/listgrid/config/ListGrid.js +183 -0
- package/dist/listgrid/config/ListGridViewFieldCache.d.ts +3 -0
- package/dist/listgrid/config/ListGridViewFieldCache.js +53 -0
- package/dist/listgrid/config/OnChangeEntityForm.d.ts +43 -0
- package/dist/listgrid/config/OnChangeEntityForm.js +266 -0
- package/dist/listgrid/config/RuntimeConfig.d.ts +18 -0
- package/dist/listgrid/config/RuntimeConfig.js +22 -0
- package/dist/listgrid/config/SubCollectionField.d.ts +119 -0
- package/dist/listgrid/config/SubCollectionField.js +241 -0
- package/dist/listgrid/config/TableSubCollectionField.d.ts +66 -0
- package/dist/listgrid/config/TableSubCollectionField.js +132 -0
- package/dist/listgrid/config/form/EntityFormActions.d.ts +69 -0
- package/dist/listgrid/config/form/EntityFormActions.js +459 -0
- package/dist/listgrid/config/form/EntityFormBase.d.ts +204 -0
- package/dist/listgrid/config/form/EntityFormBase.js +526 -0
- package/dist/listgrid/config/form/EntityFormData.d.ts +32 -0
- package/dist/listgrid/config/form/EntityFormData.js +184 -0
- package/dist/listgrid/config/form/EntityFormExtensions.d.ts +37 -0
- package/dist/listgrid/config/form/EntityFormExtensions.js +105 -0
- package/dist/listgrid/config/form/EntityFormValidation.d.ts +28 -0
- package/dist/listgrid/config/form/EntityFormValidation.js +128 -0
- package/dist/listgrid/extensions/EntityFormExtension.types.d.ts +52 -0
- package/dist/listgrid/extensions/EntityFormExtension.types.js +19 -0
- package/dist/listgrid/extensions/FieldExtensions.d.ts +5 -0
- package/dist/listgrid/extensions/FieldExtensions.js +21 -0
- package/dist/listgrid/form/SearchForm.d.ts +153 -0
- package/dist/listgrid/form/SearchForm.js +689 -0
- package/dist/listgrid/form/TagsInput/types.d.ts +133 -0
- package/dist/listgrid/form/TagsInput/types.js +1 -0
- package/dist/listgrid/form/Type.d.ts +50 -0
- package/dist/listgrid/form/Type.js +95 -0
- package/dist/listgrid/index.d.ts +205 -0
- package/dist/listgrid/index.js +244 -0
- package/dist/listgrid/loading/index.d.ts +6 -0
- package/dist/listgrid/loading/index.js +17 -0
- package/dist/listgrid/menu/MenuPermissionChecker.d.ts +15 -0
- package/dist/listgrid/menu/MenuPermissionChecker.js +15 -0
- package/dist/listgrid/menu/index.d.ts +1 -0
- package/dist/listgrid/menu/index.js +1 -0
- package/dist/listgrid/message/MessageProvider.d.ts +19 -0
- package/dist/listgrid/message/MessageProvider.js +62 -0
- package/dist/listgrid/message/index.d.ts +1 -0
- package/dist/listgrid/message/index.js +1 -0
- package/dist/listgrid/misc/index.d.ts +64 -0
- package/dist/listgrid/misc/index.js +478 -0
- package/dist/listgrid/router/RouterProvider.d.ts +12 -0
- package/dist/listgrid/router/RouterProvider.js +34 -0
- package/dist/listgrid/router/index.d.ts +3 -0
- package/dist/listgrid/router/index.js +1 -0
- package/dist/listgrid/router/types.d.ts +34 -0
- package/dist/listgrid/router/types.js +6 -0
- package/dist/listgrid/store/index.d.ts +24 -0
- package/dist/listgrid/store/index.js +40 -0
- package/dist/listgrid/transfer/DataExportProcessor.d.ts +18 -0
- package/dist/listgrid/transfer/DataExportProcessor.js +102 -0
- package/dist/listgrid/transfer/DataExportService.d.ts +37 -0
- package/dist/listgrid/transfer/DataExportService.js +225 -0
- package/dist/listgrid/transfer/DataExporter.d.ts +10 -0
- package/dist/listgrid/transfer/DataExporter.js +85 -0
- package/dist/listgrid/transfer/DataImportDescription.d.ts +8 -0
- package/dist/listgrid/transfer/DataImportDescription.js +18 -0
- package/dist/listgrid/transfer/DataImportProcessor.d.ts +24 -0
- package/dist/listgrid/transfer/DataImportProcessor.js +59 -0
- package/dist/listgrid/transfer/DataImportResultView.d.ts +13 -0
- package/dist/listgrid/transfer/DataImportResultView.js +64 -0
- package/dist/listgrid/transfer/DataImportSample.d.ts +10 -0
- package/dist/listgrid/transfer/DataImportSample.js +105 -0
- package/dist/listgrid/transfer/DataImporter.d.ts +8 -0
- package/dist/listgrid/transfer/DataImporter.js +335 -0
- package/dist/listgrid/transfer/DynamicDataImporter.d.ts +4 -0
- package/dist/listgrid/transfer/DynamicDataImporter.js +13 -0
- package/dist/listgrid/transfer/ExcelPasswordField.d.ts +9 -0
- package/dist/listgrid/transfer/ExcelPasswordField.js +23 -0
- package/dist/listgrid/transfer/Provider/ExcelProvider.d.ts +24 -0
- package/dist/listgrid/transfer/Provider/ExcelProvider.js +194 -0
- package/dist/listgrid/transfer/Type.d.ts +176 -0
- package/dist/listgrid/transfer/Type.js +568 -0
- package/dist/listgrid/ui/GlobalModalManager.d.ts +22 -0
- package/dist/listgrid/ui/GlobalModalManager.js +65 -0
- package/dist/listgrid/ui/UIProvider.d.ts +151 -0
- package/dist/listgrid/ui/UIProvider.js +292 -0
- package/dist/listgrid/ui/index.d.ts +2 -0
- package/dist/listgrid/ui/index.js +2 -0
- package/dist/listgrid/urlState/UrlStateProvider.d.ts +8 -0
- package/dist/listgrid/urlState/UrlStateProvider.js +20 -0
- package/dist/listgrid/urlState/index.d.ts +4 -0
- package/dist/listgrid/urlState/index.js +2 -0
- package/dist/listgrid/urlState/types.d.ts +21 -0
- package/dist/listgrid/urlState/types.js +14 -0
- package/dist/listgrid/utils/BooleanUtil.d.ts +1 -0
- package/dist/listgrid/utils/BooleanUtil.js +9 -0
- package/dist/listgrid/utils/CompareUtil.d.ts +7 -0
- package/dist/listgrid/utils/CompareUtil.js +87 -0
- package/dist/listgrid/utils/PhoneUtil.d.ts +19 -0
- package/dist/listgrid/utils/PhoneUtil.js +38 -0
- package/dist/listgrid/utils/RequestUtil.d.ts +6 -0
- package/dist/listgrid/utils/RequestUtil.js +6 -0
- package/dist/listgrid/utils/StringUtil.d.ts +32 -0
- package/dist/listgrid/utils/StringUtil.js +316 -0
- package/dist/listgrid/utils/classNames.d.ts +21 -0
- package/dist/listgrid/utils/classNames.js +29 -0
- package/dist/listgrid/utils/cn.d.ts +12 -0
- package/dist/listgrid/utils/cn.js +15 -0
- package/dist/listgrid/utils/hash.d.ts +1 -0
- package/dist/listgrid/utils/hash.js +15 -0
- package/dist/listgrid/utils/i18n.d.ts +16 -0
- package/dist/listgrid/utils/i18n.js +31 -0
- package/dist/listgrid/utils/index.d.ts +10 -0
- package/dist/listgrid/utils/index.js +17 -0
- package/dist/listgrid/utils/jsonUtils.d.ts +4 -0
- package/dist/listgrid/utils/jsonUtils.js +77 -0
- package/dist/listgrid/utils/lazy.d.ts +10 -0
- package/dist/listgrid/utils/lazy.js +13 -0
- package/dist/listgrid/utils/simpleCrypt.d.ts +4 -0
- package/dist/listgrid/utils/simpleCrypt.js +79 -0
- package/dist/listgrid/validations/CustomValidation.d.ts +8 -0
- package/dist/listgrid/validations/CustomValidation.js +10 -0
- package/dist/listgrid/validations/EmailValidation.d.ts +4 -0
- package/dist/listgrid/validations/EmailValidation.js +7 -0
- package/dist/listgrid/validations/IpAddressValidation.d.ts +26 -0
- package/dist/listgrid/validations/IpAddressValidation.js +57 -0
- package/dist/listgrid/validations/MinMaxNumberValidation.d.ts +14 -0
- package/dist/listgrid/validations/MinMaxNumberValidation.js +28 -0
- package/dist/listgrid/validations/PasswordValidation.d.ts +4 -0
- package/dist/listgrid/validations/PasswordValidation.js +7 -0
- package/dist/listgrid/validations/PhoneNumberValidation.d.ts +12 -0
- package/dist/listgrid/validations/PhoneNumberValidation.js +24 -0
- package/dist/listgrid/validations/RegexFormularValidation.d.ts +7 -0
- package/dist/listgrid/validations/RegexFormularValidation.js +28 -0
- package/dist/listgrid/validations/RegexValidation.d.ts +8 -0
- package/dist/listgrid/validations/RegexValidation.js +17 -0
- package/dist/listgrid/validations/RequiredValidation.d.ts +7 -0
- package/dist/listgrid/validations/RequiredValidation.js +12 -0
- package/dist/listgrid/validations/StringValidation.d.ts +17 -0
- package/dist/listgrid/validations/StringValidation.js +33 -0
- package/dist/listgrid/validations/TelephoneNumberValidation.d.ts +12 -0
- package/dist/listgrid/validations/TelephoneNumberValidation.js +24 -0
- package/dist/listgrid/validations/Validation.d.ts +63 -0
- package/dist/listgrid/validations/Validation.js +72 -0
- package/dist/listgrid/view/ViewEntityFormWrapper.d.ts +16 -0
- package/dist/listgrid/view/ViewEntityFormWrapper.js +98 -0
- package/dist/listgrid/view/ViewListGridWrapper.d.ts +10 -0
- package/dist/listgrid/view/ViewListGridWrapper.js +96 -0
- package/dist/styles/base.css +116 -0
- package/dist/styles/components.css +1404 -0
- package/dist/styles/layouts.css +3206 -0
- package/dist/styles/primitives.css +1542 -0
- package/dist/styles/tokens.css +218 -0
- package/dist/styles.css +6486 -0
- package/docs/PRIMITIVES.md +271 -0
- package/package.json +201 -0
|
@@ -0,0 +1,374 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* ViewListGrid 컴포넌트 테마 타입 정의
|
|
3
|
+
*
|
|
4
|
+
* ListGrid와 하위 컴포넌트들의 모든 스타일 요소를 커스터마이징할 수 있습니다.
|
|
5
|
+
* EntityFormTheme과 함께 통합 테마 시스템의 일부로 사용됩니다.
|
|
6
|
+
*
|
|
7
|
+
* @example
|
|
8
|
+
* ```tsx
|
|
9
|
+
* const myListGridTheme: ViewListGridClassNames = {
|
|
10
|
+
* panel: {
|
|
11
|
+
* container: 'mt-5 border rounded-xl',
|
|
12
|
+
* },
|
|
13
|
+
* table: {
|
|
14
|
+
* container: 'table-hover w-full',
|
|
15
|
+
* },
|
|
16
|
+
* };
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
export interface ViewListGridClassNames {
|
|
20
|
+
/**
|
|
21
|
+
* 최상위 컨테이너 스타일
|
|
22
|
+
*/
|
|
23
|
+
root?: string;
|
|
24
|
+
/**
|
|
25
|
+
* 로딩 상태 스타일
|
|
26
|
+
*/
|
|
27
|
+
loading?: {
|
|
28
|
+
/** 로딩 컨테이너 */
|
|
29
|
+
container?: string;
|
|
30
|
+
/** 로딩 오버레이 영역 */
|
|
31
|
+
overlay?: string;
|
|
32
|
+
/** 로딩 스켈레톤 */
|
|
33
|
+
skeleton?: string;
|
|
34
|
+
};
|
|
35
|
+
/**
|
|
36
|
+
* 헤더 영역 스타일 (ListGridHeader)
|
|
37
|
+
*/
|
|
38
|
+
header?: {
|
|
39
|
+
/** 헤더 전체 컨테이너 */
|
|
40
|
+
container?: string;
|
|
41
|
+
/** 제목 영역 외부 컨테이너 */
|
|
42
|
+
titleContainer?: string;
|
|
43
|
+
/** 제목 영역 내부 래퍼 */
|
|
44
|
+
titleWrapper?: string;
|
|
45
|
+
/** 제목 텍스트 */
|
|
46
|
+
titleText?: string;
|
|
47
|
+
/** 버튼 그룹 컨테이너 */
|
|
48
|
+
buttonGroup?: string;
|
|
49
|
+
};
|
|
50
|
+
/**
|
|
51
|
+
* 패널 스타일 (메인 컨텐츠 영역)
|
|
52
|
+
*/
|
|
53
|
+
panel?: {
|
|
54
|
+
/** 패널 컨테이너 */
|
|
55
|
+
container?: string;
|
|
56
|
+
/** Main Entity 스타일 */
|
|
57
|
+
mainEntity?: string;
|
|
58
|
+
/** SubCollection 스타일 */
|
|
59
|
+
subCollection?: string;
|
|
60
|
+
/** 기본 스타일 (isMainEntity, isSubCollection 모두 false) */
|
|
61
|
+
default?: string;
|
|
62
|
+
};
|
|
63
|
+
/**
|
|
64
|
+
* 서브콜렉션 버튼 영역 (SubCollectionButtons)
|
|
65
|
+
*/
|
|
66
|
+
subCollectionButtons?: {
|
|
67
|
+
/** 컨테이너 */
|
|
68
|
+
container?: string;
|
|
69
|
+
/** 버튼 그룹 */
|
|
70
|
+
buttonGroup?: string;
|
|
71
|
+
/** 추가 버튼 */
|
|
72
|
+
addButton?: string;
|
|
73
|
+
/** 삭제 버튼 */
|
|
74
|
+
deleteButton?: string;
|
|
75
|
+
/** 기타 액션 버튼 */
|
|
76
|
+
actionButton?: string;
|
|
77
|
+
};
|
|
78
|
+
/**
|
|
79
|
+
* 검색바 스타일 (QuickSearchBar)
|
|
80
|
+
*/
|
|
81
|
+
searchBar?: {
|
|
82
|
+
/** 검색바 전체 컨테이너 */
|
|
83
|
+
container?: string;
|
|
84
|
+
/** 내부 래퍼 */
|
|
85
|
+
innerWrapper?: string;
|
|
86
|
+
/** 레이아웃 래퍼 (flex) */
|
|
87
|
+
layoutWrapper?: string;
|
|
88
|
+
};
|
|
89
|
+
/**
|
|
90
|
+
* 검색 인풋 스타일 (QuickSearchInput)
|
|
91
|
+
*/
|
|
92
|
+
searchInput?: {
|
|
93
|
+
/** 인풋 컨테이너 */
|
|
94
|
+
container?: string;
|
|
95
|
+
/** 인풋 필드 */
|
|
96
|
+
input?: string;
|
|
97
|
+
/** 검색 아이콘 */
|
|
98
|
+
icon?: string;
|
|
99
|
+
/** 검색 버튼 */
|
|
100
|
+
button?: string;
|
|
101
|
+
/** 클리어 버튼 */
|
|
102
|
+
clearButton?: string;
|
|
103
|
+
};
|
|
104
|
+
/**
|
|
105
|
+
* 검색바 액션 버튼 (SearchBarActions)
|
|
106
|
+
*/
|
|
107
|
+
searchBarActions?: {
|
|
108
|
+
/** 컨테이너 */
|
|
109
|
+
container?: string;
|
|
110
|
+
/** 페이지 사이즈 셀렉트 */
|
|
111
|
+
pageSizeSelect?: string;
|
|
112
|
+
/** 필터 버튼 */
|
|
113
|
+
filterButton?: string;
|
|
114
|
+
/** 필드 선택기 버튼 */
|
|
115
|
+
fieldSelectorButton?: string;
|
|
116
|
+
/** 고급 검색 버튼 */
|
|
117
|
+
advancedSearchButton?: string;
|
|
118
|
+
};
|
|
119
|
+
/**
|
|
120
|
+
* 고급 검색 폼 스타일 (AdvancedSearchForm)
|
|
121
|
+
*/
|
|
122
|
+
advancedSearch?: {
|
|
123
|
+
/** 폼 컨테이너 */
|
|
124
|
+
container?: string;
|
|
125
|
+
/** 폼 패널 */
|
|
126
|
+
panel?: string;
|
|
127
|
+
/** 필드 그리드 */
|
|
128
|
+
fieldGrid?: string;
|
|
129
|
+
/** 버튼 영역 */
|
|
130
|
+
buttonArea?: string;
|
|
131
|
+
/** 검색 버튼 */
|
|
132
|
+
searchButton?: string;
|
|
133
|
+
/** 초기화 버튼 */
|
|
134
|
+
resetButton?: string;
|
|
135
|
+
/** 닫기 버튼 */
|
|
136
|
+
closeButton?: string;
|
|
137
|
+
};
|
|
138
|
+
/**
|
|
139
|
+
* 테이블 스타일
|
|
140
|
+
*/
|
|
141
|
+
table?: {
|
|
142
|
+
/** 테이블 responsive 래퍼 */
|
|
143
|
+
responsiveWrapper?: string;
|
|
144
|
+
/** 테이블 컨테이너 */
|
|
145
|
+
container?: string;
|
|
146
|
+
/** 테이블 요소 */
|
|
147
|
+
table?: string;
|
|
148
|
+
/** 테이블 헤더 (thead) */
|
|
149
|
+
thead?: string;
|
|
150
|
+
/** 헤더 행 (tr) */
|
|
151
|
+
headerRow?: string;
|
|
152
|
+
/** 테이블 바디 (tbody) */
|
|
153
|
+
tbody?: string;
|
|
154
|
+
/** 컨텐츠 래퍼 (비-팝업 모드) */
|
|
155
|
+
contentWrapper?: string;
|
|
156
|
+
};
|
|
157
|
+
/**
|
|
158
|
+
* 테이블 헤더 셀 스타일 (HeaderField)
|
|
159
|
+
*/
|
|
160
|
+
headerCell?: {
|
|
161
|
+
/** 헤더 셀 (th) */
|
|
162
|
+
cell?: string;
|
|
163
|
+
/** 정렬 가능 헤더 */
|
|
164
|
+
sortable?: string;
|
|
165
|
+
/** 정렬 중인 헤더 */
|
|
166
|
+
sorted?: string;
|
|
167
|
+
/** 정렬 아이콘 */
|
|
168
|
+
sortIcon?: string;
|
|
169
|
+
/** 필터 아이콘 */
|
|
170
|
+
filterIcon?: string;
|
|
171
|
+
/** 체크박스 헤더 셀 */
|
|
172
|
+
checkboxCell?: string;
|
|
173
|
+
/** 드래그 핸들 헤더 셀 */
|
|
174
|
+
dragHandleCell?: string;
|
|
175
|
+
/** 새창 열기 헤더 셀 */
|
|
176
|
+
openNewWindowCell?: string;
|
|
177
|
+
/** 선택 버튼 헤더 셀 */
|
|
178
|
+
selectCell?: string;
|
|
179
|
+
};
|
|
180
|
+
/**
|
|
181
|
+
* 테이블 행 스타일 (ViewRows)
|
|
182
|
+
*/
|
|
183
|
+
row?: {
|
|
184
|
+
/** 행 (tr) */
|
|
185
|
+
row?: string;
|
|
186
|
+
/** 호버 상태 */
|
|
187
|
+
hover?: string;
|
|
188
|
+
/** 선택된 행 */
|
|
189
|
+
selected?: string;
|
|
190
|
+
/** 짝수 행 */
|
|
191
|
+
even?: string;
|
|
192
|
+
/** 홀수 행 */
|
|
193
|
+
odd?: string;
|
|
194
|
+
/** 드래그 중인 행 */
|
|
195
|
+
dragging?: string;
|
|
196
|
+
/** 클릭 가능한 행 */
|
|
197
|
+
clickable?: string;
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* 테이블 셀 스타일 (ViewColumn)
|
|
201
|
+
*/
|
|
202
|
+
cell?: {
|
|
203
|
+
/** 셀 (td) */
|
|
204
|
+
cell?: string;
|
|
205
|
+
/** 체크박스 셀 */
|
|
206
|
+
checkboxCell?: string;
|
|
207
|
+
/** 번호 셀 */
|
|
208
|
+
numberCell?: string;
|
|
209
|
+
/** 드래그 핸들 셀 */
|
|
210
|
+
dragHandleCell?: string;
|
|
211
|
+
/** 새창 열기 셀 */
|
|
212
|
+
openNewWindowCell?: string;
|
|
213
|
+
/** 선택 버튼 셀 */
|
|
214
|
+
selectCell?: string;
|
|
215
|
+
/** 데이터 셀 */
|
|
216
|
+
dataCell?: string;
|
|
217
|
+
};
|
|
218
|
+
/**
|
|
219
|
+
* 체크박스 스타일 (EntireChecker)
|
|
220
|
+
*/
|
|
221
|
+
checkbox?: {
|
|
222
|
+
/** 체크박스 컨테이너 */
|
|
223
|
+
container?: string;
|
|
224
|
+
/** 체크박스 인풋 */
|
|
225
|
+
input?: string;
|
|
226
|
+
/** 전체 선택 체크박스 */
|
|
227
|
+
selectAll?: string;
|
|
228
|
+
/** 개별 체크박스 */
|
|
229
|
+
item?: string;
|
|
230
|
+
/** 선택된 상태 */
|
|
231
|
+
checked?: string;
|
|
232
|
+
/** 부분 선택 상태 */
|
|
233
|
+
indeterminate?: string;
|
|
234
|
+
};
|
|
235
|
+
/**
|
|
236
|
+
* 빈 상태 스타일
|
|
237
|
+
*/
|
|
238
|
+
empty?: {
|
|
239
|
+
/** 빈 상태 컨테이너 */
|
|
240
|
+
container?: string;
|
|
241
|
+
/** 빈 상태 메시지 */
|
|
242
|
+
message?: string;
|
|
243
|
+
/** 빈 상태 아이콘 */
|
|
244
|
+
icon?: string;
|
|
245
|
+
};
|
|
246
|
+
/**
|
|
247
|
+
* 페이지네이션 스타일
|
|
248
|
+
*/
|
|
249
|
+
pagination?: {
|
|
250
|
+
/** 페이지네이션 컨테이너 */
|
|
251
|
+
container?: string;
|
|
252
|
+
/** 페이지네이션 래퍼 */
|
|
253
|
+
wrapper?: string;
|
|
254
|
+
};
|
|
255
|
+
/**
|
|
256
|
+
* 알림 메시지 스타일
|
|
257
|
+
*/
|
|
258
|
+
notifications?: {
|
|
259
|
+
/** 알림 컨테이너 */
|
|
260
|
+
container?: string;
|
|
261
|
+
/** 에러 알림 */
|
|
262
|
+
error?: string;
|
|
263
|
+
/** 성공 알림 */
|
|
264
|
+
success?: string;
|
|
265
|
+
/** 경고 알림 */
|
|
266
|
+
warning?: string;
|
|
267
|
+
/** 정보 알림 */
|
|
268
|
+
info?: string;
|
|
269
|
+
};
|
|
270
|
+
/**
|
|
271
|
+
* 필드 선택기 스타일 (FieldSelector)
|
|
272
|
+
*/
|
|
273
|
+
fieldSelector?: {
|
|
274
|
+
/** 선택기 컨테이너 */
|
|
275
|
+
container?: string;
|
|
276
|
+
/** 드롭다운 패널 */
|
|
277
|
+
dropdown?: string;
|
|
278
|
+
/** 필드 아이템 */
|
|
279
|
+
item?: string;
|
|
280
|
+
/** 선택된 필드 */
|
|
281
|
+
selectedItem?: string;
|
|
282
|
+
/** 체크박스 */
|
|
283
|
+
checkbox?: string;
|
|
284
|
+
};
|
|
285
|
+
/**
|
|
286
|
+
* 필터 드롭다운 스타일 (FilterDropdown)
|
|
287
|
+
*/
|
|
288
|
+
filterDropdown?: {
|
|
289
|
+
/** 드롭다운 컨테이너 */
|
|
290
|
+
container?: string;
|
|
291
|
+
/** 드롭다운 패널 */
|
|
292
|
+
panel?: string;
|
|
293
|
+
/** 필터 인풋 */
|
|
294
|
+
input?: string;
|
|
295
|
+
/** 적용 버튼 */
|
|
296
|
+
applyButton?: string;
|
|
297
|
+
/** 초기화 버튼 */
|
|
298
|
+
resetButton?: string;
|
|
299
|
+
};
|
|
300
|
+
/**
|
|
301
|
+
* 모달 스타일 (SubCollectionViewModal 등)
|
|
302
|
+
*/
|
|
303
|
+
modal?: {
|
|
304
|
+
/** 모달 오버레이 */
|
|
305
|
+
overlay?: string;
|
|
306
|
+
/** 모달 컨테이너 */
|
|
307
|
+
container?: string;
|
|
308
|
+
/** 모달 헤더 */
|
|
309
|
+
header?: string;
|
|
310
|
+
/** 모달 바디 */
|
|
311
|
+
body?: string;
|
|
312
|
+
/** 모달 푸터 */
|
|
313
|
+
footer?: string;
|
|
314
|
+
/** 닫기 버튼 */
|
|
315
|
+
closeButton?: string;
|
|
316
|
+
};
|
|
317
|
+
/**
|
|
318
|
+
* 데이터 전송 모달 스타일 (DataTransferModal)
|
|
319
|
+
*/
|
|
320
|
+
dataTransferModal?: {
|
|
321
|
+
/** 모달 컨테이너 */
|
|
322
|
+
container?: string;
|
|
323
|
+
/** 옵션 그리드 */
|
|
324
|
+
optionGrid?: string;
|
|
325
|
+
/** 옵션 아이템 */
|
|
326
|
+
optionItem?: string;
|
|
327
|
+
/** 진행률 바 */
|
|
328
|
+
progressBar?: string;
|
|
329
|
+
};
|
|
330
|
+
/**
|
|
331
|
+
* 우선순위 조절 스타일 (PriorityButton, 드래그 핸들)
|
|
332
|
+
*/
|
|
333
|
+
priority?: {
|
|
334
|
+
/** 드래그 핸들 */
|
|
335
|
+
dragHandle?: string;
|
|
336
|
+
/** 드래그 핸들 아이콘 */
|
|
337
|
+
dragHandleIcon?: string;
|
|
338
|
+
/** 우선순위 버튼 */
|
|
339
|
+
button?: string;
|
|
340
|
+
/** 활성화 상태 */
|
|
341
|
+
active?: string;
|
|
342
|
+
};
|
|
343
|
+
/**
|
|
344
|
+
* 팝업 모드 스타일 (options.popup이 true일 때)
|
|
345
|
+
*/
|
|
346
|
+
popup?: {
|
|
347
|
+
/** 팝업 컨테이너 */
|
|
348
|
+
container?: string;
|
|
349
|
+
/** 스크롤 영역 */
|
|
350
|
+
scrollArea?: string;
|
|
351
|
+
/** 팝업 테이블 */
|
|
352
|
+
table?: string;
|
|
353
|
+
};
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* ListGrid 테마 변형 타입
|
|
357
|
+
*/
|
|
358
|
+
export type ListGridThemeVariant = 'default' | 'main' | 'subCollection' | 'modal' | 'popup';
|
|
359
|
+
/**
|
|
360
|
+
* ListGrid 테마 컨텍스트 값 타입
|
|
361
|
+
*/
|
|
362
|
+
export interface ListGridThemeContextValue {
|
|
363
|
+
/** 클래스 이름 객체 */
|
|
364
|
+
classNames: ViewListGridClassNames;
|
|
365
|
+
/**
|
|
366
|
+
* 기본 클래스와 커스텀 클래스를 병합
|
|
367
|
+
* @param base 기본 Tailwind 클래스
|
|
368
|
+
* @param custom 커스텀 클래스 (선택사항)
|
|
369
|
+
* @returns 병합된 클래스 문자열
|
|
370
|
+
*/
|
|
371
|
+
cn: (base: string, custom?: string) => string;
|
|
372
|
+
/** 현재 적용된 변형 */
|
|
373
|
+
variant: ListGridThemeVariant;
|
|
374
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EntityForm } from '../../../config/EntityForm';
|
|
3
|
+
import { EntityField } from '../../../config/EntityField';
|
|
4
|
+
import { FieldType } from '../../../config/Config';
|
|
5
|
+
import { Session } from '../../../auth/types';
|
|
6
|
+
export interface CardFieldRendererProps {
|
|
7
|
+
/** Form field to render */
|
|
8
|
+
field: EntityField;
|
|
9
|
+
/** Item data */
|
|
10
|
+
item: any;
|
|
11
|
+
/** Entity form instance for the item */
|
|
12
|
+
itemEntityForm: EntityForm;
|
|
13
|
+
/** Parent entity form */
|
|
14
|
+
parentEntityForm: EntityForm;
|
|
15
|
+
/** User session */
|
|
16
|
+
session?: Session;
|
|
17
|
+
/** Whether this field should use full width (col-span-2) */
|
|
18
|
+
isFullWidth?: boolean;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Determines if a field type should span the full width of the card
|
|
22
|
+
*/
|
|
23
|
+
export declare const isFullWidthFieldType: (fieldType: FieldType) => boolean;
|
|
24
|
+
/**
|
|
25
|
+
* CardFieldRenderer
|
|
26
|
+
* Displays a field value in VIEW mode (read-only formatted)
|
|
27
|
+
* Uses field.viewValue() to leverage each field type's formatting logic
|
|
28
|
+
* (e.g., NumberField uses formatPrice, SelectField uses Badge)
|
|
29
|
+
*/
|
|
30
|
+
export declare const CardFieldRenderer: React.FC<CardFieldRendererProps>;
|
|
31
|
+
export default CardFieldRenderer;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useState, useMemo } from 'react';
|
|
4
|
+
// Field types that should span full width in the card grid
|
|
5
|
+
const FULL_WIDTH_FIELD_TYPES = ['textarea', 'html', 'markdown', 'contentAsset'];
|
|
6
|
+
/**
|
|
7
|
+
* Determines if a field type should span the full width of the card
|
|
8
|
+
*/
|
|
9
|
+
export const isFullWidthFieldType = (fieldType) => {
|
|
10
|
+
return FULL_WIDTH_FIELD_TYPES.includes(fieldType);
|
|
11
|
+
};
|
|
12
|
+
/**
|
|
13
|
+
* CardFieldRenderer
|
|
14
|
+
* Displays a field value in VIEW mode (read-only formatted)
|
|
15
|
+
* Uses field.viewValue() to leverage each field type's formatting logic
|
|
16
|
+
* (e.g., NumberField uses formatPrice, SelectField uses Badge)
|
|
17
|
+
*/
|
|
18
|
+
export const CardFieldRenderer = ({ field, item, itemEntityForm, parentEntityForm, session, isFullWidth, }) => {
|
|
19
|
+
// State for the rendered value
|
|
20
|
+
const [renderedValue, setRenderedValue] = useState('—');
|
|
21
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
22
|
+
// Determine if this field should be full width
|
|
23
|
+
const shouldBeFullWidth = useMemo(() => {
|
|
24
|
+
return isFullWidth ?? isFullWidthFieldType(field.type);
|
|
25
|
+
}, [field.type, isFullWidth]);
|
|
26
|
+
// Get field label
|
|
27
|
+
const label = useMemo(() => {
|
|
28
|
+
const fieldLabel = field.getLabel();
|
|
29
|
+
if (typeof fieldLabel === 'string') {
|
|
30
|
+
return fieldLabel;
|
|
31
|
+
}
|
|
32
|
+
return field.getName();
|
|
33
|
+
}, [field]);
|
|
34
|
+
// Use field.viewValue() to get properly formatted value
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
let isMounted = true;
|
|
37
|
+
const renderValue = async () => {
|
|
38
|
+
try {
|
|
39
|
+
// Call field's viewValue method for proper formatting
|
|
40
|
+
const result = await field.viewValue({
|
|
41
|
+
item,
|
|
42
|
+
entityForm: itemEntityForm,
|
|
43
|
+
});
|
|
44
|
+
if (isMounted) {
|
|
45
|
+
setRenderedValue(result.result ?? '—');
|
|
46
|
+
setIsLoading(false);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
catch (error) {
|
|
50
|
+
console.error('CardFieldRenderer: Error rendering field value:', error);
|
|
51
|
+
if (isMounted) {
|
|
52
|
+
// Fallback to raw value display
|
|
53
|
+
const rawValue = item[field.getName()];
|
|
54
|
+
setRenderedValue(rawValue !== undefined && rawValue !== null ? String(rawValue) : '—');
|
|
55
|
+
setIsLoading(false);
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
renderValue();
|
|
60
|
+
return () => {
|
|
61
|
+
isMounted = false;
|
|
62
|
+
};
|
|
63
|
+
}, [field, item, itemEntityForm]);
|
|
64
|
+
return (_jsxs("div", { className: `
|
|
65
|
+
group/field flex flex-col py-2.5
|
|
66
|
+
${shouldBeFullWidth ? 'col-span-2' : ''}
|
|
67
|
+
`, children: [_jsx("dt", { className: "\n text-[11px] font-medium uppercase tracking-wider\n text-gray-400\n mb-1\n transition-colors duration-150\n group-hover/field:text-gray-500\n dark:text-gray-500\n dark:group-hover/field:text-gray-400\n ", children: label }), _jsx("dd", { className: "\n text-[13px] font-medium leading-relaxed\n text-gray-700 dark:text-gray-200\n min-h-[20px]\n ", children: isLoading ? (_jsx("span", { className: "\n inline-block h-5 w-24\n animate-pulse rounded-md\n bg-gradient-to-r from-gray-100 via-gray-50 to-gray-100\n dark:from-gray-800 dark:via-gray-700 dark:to-gray-800\n bg-[length:200%_100%]\n " })) : (_jsx("span", { className: `
|
|
68
|
+
${shouldBeFullWidth ? 'whitespace-pre-wrap break-words' : 'line-clamp-2'}
|
|
69
|
+
`, children: renderedValue })) })] }));
|
|
70
|
+
};
|
|
71
|
+
export default CardFieldRenderer;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EntityForm } from '../../../config/EntityForm';
|
|
3
|
+
import { EntityField } from '../../../config/EntityField';
|
|
4
|
+
import { EntityFieldGroup } from '../../../config/EntityFieldGroup';
|
|
5
|
+
import { Session } from '../../../auth/types';
|
|
6
|
+
/**
|
|
7
|
+
* CardFieldSection - Renders a FieldGroup as an independent card
|
|
8
|
+
* Each FieldGroup is visually separated with its own container
|
|
9
|
+
* Follows ViewFieldGroup logic for:
|
|
10
|
+
* - Collapsable support
|
|
11
|
+
* - Description with help icon
|
|
12
|
+
* - Session-aware visibility
|
|
13
|
+
*/
|
|
14
|
+
export interface CardFieldSectionProps {
|
|
15
|
+
/** EntityFieldGroup to render */
|
|
16
|
+
fieldGroup: EntityFieldGroup;
|
|
17
|
+
/** Fields within this group */
|
|
18
|
+
fields: EntityField[];
|
|
19
|
+
/** Item data */
|
|
20
|
+
item: any;
|
|
21
|
+
/** EntityForm instance (with id set for proper visibility) */
|
|
22
|
+
entityForm: EntityForm;
|
|
23
|
+
/** Session for permission/visibility checks */
|
|
24
|
+
session?: Session;
|
|
25
|
+
}
|
|
26
|
+
export declare const CardFieldSection: React.FC<CardFieldSectionProps>;
|
|
27
|
+
export default CardFieldSection;
|
|
@@ -0,0 +1,108 @@
|
|
|
1
|
+
'use client';
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useEffect, useState, useMemo } from 'react';
|
|
4
|
+
import { FormField } from '../../fields/abstract';
|
|
5
|
+
import { IconChevronUp, IconInfoCircle, IconHelp } from '@tabler/icons-react';
|
|
6
|
+
import { Tooltip } from '../../../ui';
|
|
7
|
+
import { Icon } from '@iconify/react';
|
|
8
|
+
import { isBlank } from '../../../utils/StringUtil';
|
|
9
|
+
const CardFieldRow = ({ field, item, entityForm, session }) => {
|
|
10
|
+
const [renderedValue, setRenderedValue] = useState(null);
|
|
11
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
12
|
+
const [required, setRequired] = useState(false);
|
|
13
|
+
const [tooltip, setTooltip] = useState('');
|
|
14
|
+
const [helpText, setHelpText] = useState('');
|
|
15
|
+
const label = useMemo(() => {
|
|
16
|
+
const fieldLabel = field.getLabel();
|
|
17
|
+
return typeof fieldLabel === 'string' ? fieldLabel : field.getName();
|
|
18
|
+
}, [field]);
|
|
19
|
+
// Load field properties (required, tooltip, helpText) following FieldRenderer pattern
|
|
20
|
+
useEffect(() => {
|
|
21
|
+
let isMounted = true;
|
|
22
|
+
const loadFieldProperties = async () => {
|
|
23
|
+
try {
|
|
24
|
+
// Get required status
|
|
25
|
+
const isRequired = await field.isRequired({ entityForm, session });
|
|
26
|
+
if (isMounted)
|
|
27
|
+
setRequired(isRequired);
|
|
28
|
+
// Get tooltip
|
|
29
|
+
const tooltipValue = await field.getTooltip({ entityForm, session });
|
|
30
|
+
if (isMounted)
|
|
31
|
+
setTooltip(tooltipValue);
|
|
32
|
+
// Get helpText
|
|
33
|
+
const helpTextValue = await field.getHelpText({ entityForm, session });
|
|
34
|
+
if (isMounted)
|
|
35
|
+
setHelpText(helpTextValue);
|
|
36
|
+
}
|
|
37
|
+
catch (error) {
|
|
38
|
+
console.error('Error loading field properties:', error);
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
loadFieldProperties();
|
|
42
|
+
return () => {
|
|
43
|
+
isMounted = false;
|
|
44
|
+
};
|
|
45
|
+
}, [field, entityForm, session]);
|
|
46
|
+
// Render field value
|
|
47
|
+
useEffect(() => {
|
|
48
|
+
let isMounted = true;
|
|
49
|
+
const renderValue = async () => {
|
|
50
|
+
try {
|
|
51
|
+
// Pass compact: true to skip icons in card context
|
|
52
|
+
const result = await field.viewValue({ item, entityForm, compact: true });
|
|
53
|
+
if (isMounted) {
|
|
54
|
+
// Keep the result as-is; show placeholder for empty values
|
|
55
|
+
if (result.result === null ||
|
|
56
|
+
result.result === '—' ||
|
|
57
|
+
result.result === '-' ||
|
|
58
|
+
result.result === '') {
|
|
59
|
+
setRenderedValue('—'); // Show placeholder for empty values
|
|
60
|
+
}
|
|
61
|
+
else {
|
|
62
|
+
setRenderedValue(result.result);
|
|
63
|
+
}
|
|
64
|
+
setIsLoading(false);
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
catch (error) {
|
|
68
|
+
if (isMounted) {
|
|
69
|
+
setRenderedValue('—'); // Show placeholder on error
|
|
70
|
+
setIsLoading(false);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
};
|
|
74
|
+
renderValue();
|
|
75
|
+
return () => {
|
|
76
|
+
isMounted = false;
|
|
77
|
+
};
|
|
78
|
+
}, [field, item, entityForm]);
|
|
79
|
+
const showTooltip = !isBlank(tooltip);
|
|
80
|
+
const showHelpText = !isBlank(helpText);
|
|
81
|
+
return (_jsxs("div", { className: "rcm-card-field-row", children: [_jsxs("dt", { className: "rcm-card-field-label", children: [_jsx("span", { children: label }), required && (_jsx(Tooltip, { label: "\uD544\uC218\uAC12", color: "red", withArrow: true, children: _jsx(Icon, { icon: "healthicons:star-small", className: "rcm-field-icon rcm-field-icon-required" }) })), showTooltip && (_jsx(Tooltip, { label: tooltip, color: "gray", withArrow: true, position: "top-end", children: _jsx(IconHelp, { className: "rcm-card-field-help-icon" }) }))] }), _jsx("dd", { className: "rcm-card-field-value", children: isLoading ? (_jsx("span", { className: "rcm-card-field-loading" })) : (_jsxs("div", { className: "rcm-card-field-value-inner", children: [_jsx("div", { children: renderedValue }), showHelpText && _jsx("div", { className: "rcm-card-field-help-text", children: helpText })] })) })] }));
|
|
82
|
+
};
|
|
83
|
+
export const CardFieldSection = ({ fieldGroup, fields, item, entityForm, session, }) => {
|
|
84
|
+
// Collapsable state (following ViewFieldGroup pattern)
|
|
85
|
+
const [isOpen, setIsOpen] = useState(() => fieldGroup.config?.open ?? true);
|
|
86
|
+
// Filter to only FormFields (visibility is already determined by EntityForm.getVisibleFields())
|
|
87
|
+
// Do NOT filter by value - EntityForm's visibility settings should be respected
|
|
88
|
+
const visibleFields = useMemo(() => {
|
|
89
|
+
return fields.filter((field) => {
|
|
90
|
+
return field instanceof FormField;
|
|
91
|
+
});
|
|
92
|
+
}, [fields]);
|
|
93
|
+
// Don't render empty sections
|
|
94
|
+
if (visibleFields.length === 0) {
|
|
95
|
+
return null;
|
|
96
|
+
}
|
|
97
|
+
// Check if this is a labeled group (has a non-empty label)
|
|
98
|
+
const hasLabel = fieldGroup.label && fieldGroup.label.trim() !== '';
|
|
99
|
+
// Check if group has description for help icon
|
|
100
|
+
const hasDescription = !isBlank(fieldGroup.description);
|
|
101
|
+
// Toggle collapse state
|
|
102
|
+
const handleToggle = (e) => {
|
|
103
|
+
e.stopPropagation();
|
|
104
|
+
setIsOpen(!isOpen);
|
|
105
|
+
};
|
|
106
|
+
return (_jsxs("div", { className: "rcm-card-section", children: [hasLabel && (_jsx("div", { className: "rcm-card-section-header", onClick: handleToggle, children: _jsxs("div", { className: "rcm-card-section-header-row", children: [_jsx("h4", { className: "rcm-card-section-title", children: fieldGroup.label }), _jsxs("div", { className: "rcm-card-section-header-actions", children: [hasDescription && (_jsx(Tooltip, { label: fieldGroup.description, color: "gray", withArrow: true, position: "top-end", children: _jsx(IconInfoCircle, { className: "rcm-card-section-help-icon" }) })), _jsx("button", { type: "button", className: "rcm-card-section-toggle", "aria-label": isOpen ? 'Collapse' : 'Expand', children: _jsx(IconChevronUp, { className: `rcm-card-section-chevron ${isOpen ? '' : 'rcm-rotate-180'}` }) })] })] }) })), isOpen && (_jsx("dl", { className: "rcm-card-section-body", children: visibleFields.map((field) => (_jsx(CardFieldRow, { field: field, item: item, entityForm: entityForm, ...(session !== undefined ? { session } : {}) }, field.getName()))) }))] }));
|
|
107
|
+
};
|
|
108
|
+
export default CardFieldSection;
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EntityForm } from '../../../config/EntityForm';
|
|
3
|
+
import { CardSubCollectionRelation, CardConfig } from '../../../config/CardSubCollectionField';
|
|
4
|
+
import { Session } from '../../../auth/types';
|
|
5
|
+
export interface CardItemProps {
|
|
6
|
+
item: any;
|
|
7
|
+
entityForm: EntityForm;
|
|
8
|
+
parentEntityForm: EntityForm;
|
|
9
|
+
parentId: string;
|
|
10
|
+
cardConfig?: CardConfig;
|
|
11
|
+
relation: CardSubCollectionRelation;
|
|
12
|
+
readonly?: boolean;
|
|
13
|
+
session?: Session;
|
|
14
|
+
onClick?: () => void;
|
|
15
|
+
onEdit?: () => void;
|
|
16
|
+
onDelete?: () => void;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* CardItem - Tremor-inspired Card Design with Tab → FieldGroup → Field hierarchy
|
|
20
|
+
*
|
|
21
|
+
* IMPORTANT: This component follows ViewEntityForm's logic exactly:
|
|
22
|
+
* 1. Clone entityForm and set item.id so getRenderType() returns 'update'
|
|
23
|
+
* 2. Use setFetchedValues() to populate all field values from item
|
|
24
|
+
* 3. Use getViewableTabs(), getViewableFieldGroups(), getVisibleFields() for visibility
|
|
25
|
+
* 4. All field settings (hidden, readonly, helpText, tooltip) are respected
|
|
26
|
+
*/
|
|
27
|
+
export declare const CardItem: React.FC<CardItemProps>;
|
|
28
|
+
export default CardItem;
|