optimize build tool chain.
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
import React from 'react';
|
||||
|
||||
import { KintoneRestAPIClient } from '@kintone/rest-api-client';
|
||||
import { Properties as KintoneFormFieldProperties } from '@kintone/rest-api-client/lib/src/client/types';
|
||||
import moize from 'moize';
|
||||
import invariant from 'tiny-invariant';
|
||||
import { PLUGIN_ID } from '../common/global';
|
||||
import { naturalCompare } from '../common/stringUtils';
|
||||
import { KintoneFormFieldProperties } from '../common/types';
|
||||
import KintonePluginAlert from '../common/ui/KintonePluginAlert';
|
||||
import KintonePluginButton from '../common/ui/KintonePluginButton';
|
||||
import KintonePluginDesc from '../common/ui/KintonePluginDesc';
|
||||
@@ -27,7 +28,9 @@ const Settings: React.FC = () => {
|
||||
const appId = kintone.app.getId();
|
||||
invariant(appId, 'The app ID is not available. Please ensure you are on a Kintone app page.');
|
||||
const properties = React.use(cachedFormFieldsProperties(appId));
|
||||
const fileFields = Object.values(properties).filter((property) => property.type === 'FILE');
|
||||
const fileFields = Object.values(properties)
|
||||
.filter((property) => property.type === 'FILE')
|
||||
.sort((a, b) => naturalCompare(`${a.label} (${a.code})`, `${b.label} (${b.code})`));
|
||||
const options: KintonePluginSelectOptionData[] = [
|
||||
{ value: '', label: 'Select a File field', disabled: true }, // Default option
|
||||
...fileFields.map((property) => ({
|
||||
|
Reference in New Issue
Block a user