@geekron/strapi 0.1.5 → 0.1.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.
@@ -46779,7 +46779,22 @@ var registerColorPicker = (app) => {
46779
46779
  components: {
46780
46780
  Input: () => Promise.resolve({ default: ColorPickerInput })
46781
46781
  },
46782
- options: {}
46782
+ options: {
46783
+ advanced: [
46784
+ {
46785
+ name: "required",
46786
+ type: "checkbox",
46787
+ intlLabel: {
46788
+ id: "form.attribute.item.requiredField",
46789
+ defaultMessage: "Required field"
46790
+ },
46791
+ description: {
46792
+ id: "form.attribute.item.requiredField.description",
46793
+ defaultMessage: "Cannot create entry if empty"
46794
+ }
46795
+ }
46796
+ ]
46797
+ }
46783
46798
  });
46784
46799
  };
46785
46800
 
@@ -47314,6 +47329,7 @@ var DataSelector = ({
47314
47329
  const { formatMessage } = import_react_intl3.useIntl();
47315
47330
  const { contentTypes } = import_admin2.unstable_useContentManagerContext();
47316
47331
  const client = import_admin2.useFetchClient();
47332
+ const { toggleNotification } = import_admin2.useNotification();
47317
47333
  const displayedContentTypes = React3.useMemo(() => contentTypes?.filter((ct) => ct.isDisplayed && !ct.uid.startsWith("plugin:")) || [], [contentTypes]);
47318
47334
  const loadCollectionData = React3.useCallback(async (contentType, currentPage = 1, currentPageSize = 10) => {
47319
47335
  setIsDataLoading(true);
@@ -47350,8 +47366,19 @@ var DataSelector = ({
47350
47366
  onChange(selectedData);
47351
47367
  setIsOpen(false);
47352
47368
  }
47353
- } catch (error) {
47354
- console.error("Failed to load single type data:", error);
47369
+ } catch (err) {
47370
+ const error = err?.response?.data?.error;
47371
+ if (error.status === 404) {
47372
+ toggleNotification({
47373
+ type: "warning",
47374
+ message: formatMessage({
47375
+ id: getTrad("data-select.single-type-not-found"),
47376
+ defaultMessage: 'Content type "{displayName}" is not filled yet. Please fill in the content type information and save it before trying again.'
47377
+ }, { displayName: contentType.info.displayName })
47378
+ });
47379
+ } else {
47380
+ console.error("Failed to load single type data:", error);
47381
+ }
47355
47382
  } finally {
47356
47383
  setIsDataLoading(false);
47357
47384
  }
@@ -47362,7 +47389,7 @@ var DataSelector = ({
47362
47389
  setPageSize(10);
47363
47390
  await loadCollectionData(contentType, 1, 10);
47364
47391
  }
47365
- }, [client, onChange, loadCollectionData]);
47392
+ }, [client, onChange, loadCollectionData, toggleNotification, formatMessage]);
47366
47393
  const handleBackToContentTypes = React3.useCallback(() => {
47367
47394
  setSelectedContentType(null);
47368
47395
  setDataItems([]);
@@ -48817,7 +48844,22 @@ var registerDataNested = (app) => {
48817
48844
  components: {
48818
48845
  Input: () => Promise.resolve({ default: DataNested })
48819
48846
  },
48820
- options: {}
48847
+ options: {
48848
+ advanced: [
48849
+ {
48850
+ name: "required",
48851
+ type: "checkbox",
48852
+ intlLabel: {
48853
+ id: "form.attribute.item.requiredField",
48854
+ defaultMessage: "Required field"
48855
+ },
48856
+ description: {
48857
+ id: "form.attribute.item.requiredField.description",
48858
+ defaultMessage: "Cannot create entry if empty"
48859
+ }
48860
+ }
48861
+ ]
48862
+ }
48821
48863
  });
48822
48864
  };
48823
48865
 
@@ -48871,7 +48913,22 @@ var registerDataSelect = (app) => {
48871
48913
  components: {
48872
48914
  Input: () => Promise.resolve({ default: DataSelectInput })
48873
48915
  },
48874
- options: {}
48916
+ options: {
48917
+ advanced: [
48918
+ {
48919
+ name: "required",
48920
+ type: "checkbox",
48921
+ intlLabel: {
48922
+ id: "form.attribute.item.requiredField",
48923
+ defaultMessage: "Required field"
48924
+ },
48925
+ description: {
48926
+ id: "form.attribute.item.requiredField.description",
48927
+ defaultMessage: "Cannot create entry if empty"
48928
+ }
48929
+ }
48930
+ ]
48931
+ }
48875
48932
  });
48876
48933
  };
48877
48934
 
@@ -50810,7 +50867,22 @@ var registerIconPicker = (app) => {
50810
50867
  components: {
50811
50868
  Input: () => Promise.resolve({ default: IconPickerInput })
50812
50869
  },
50813
- options: {}
50870
+ options: {
50871
+ advanced: [
50872
+ {
50873
+ name: "required",
50874
+ type: "checkbox",
50875
+ intlLabel: {
50876
+ id: "form.attribute.item.requiredField",
50877
+ defaultMessage: "Required field"
50878
+ },
50879
+ description: {
50880
+ id: "form.attribute.item.requiredField.description",
50881
+ defaultMessage: "Cannot create entry if empty"
50882
+ }
50883
+ }
50884
+ ]
50885
+ }
50814
50886
  });
50815
50887
  };
50816
50888
 
@@ -50902,6 +50974,9 @@ var SlugInput = React8.forwardRef(({ hint, labelAction, label, name, required, a
50902
50974
  if (!value || documentId && field.initialValue === value) {
50903
50975
  return;
50904
50976
  }
50977
+ if (!attribute?.unique) {
50978
+ return;
50979
+ }
50905
50980
  try {
50906
50981
  setIsCheckingAvailability(true);
50907
50982
  const { data } = await fetchClient.post(`/website/fields/check-available`, {
@@ -50927,6 +51002,7 @@ var SlugInput = React8.forwardRef(({ hint, labelAction, label, name, required, a
50927
51002
  setIsCheckingAvailability(false);
50928
51003
  }
50929
51004
  }, [
51005
+ attribute?.unique,
50930
51006
  contentType?.kind,
50931
51007
  contentType?.uid,
50932
51008
  documentId,
@@ -51022,58 +51098,6 @@ var SlugInput = React8.forwardRef(({ hint, labelAction, label, name, required, a
51022
51098
  }, undefined, false, undefined, this);
51023
51099
  });
51024
51100
  var registerSlugInput = (app) => {
51025
- const options = [
51026
- {
51027
- name: "options.target",
51028
- type: "text",
51029
- intlLabel: {
51030
- id: `${pluginId}.fields.slugInput.options.targetField.label`,
51031
- defaultMessage: "Target field"
51032
- },
51033
- description: {
51034
- id: `${pluginId}.fields.slugInput.options.targetField.description`,
51035
- defaultMessage: "After filling in the information, a slug will be automatically generated following the target field."
51036
- }
51037
- },
51038
- {
51039
- name: "options.unique",
51040
- type: "boolean-radio-group",
51041
- size: 12,
51042
- defaultValue: true,
51043
- intlLabel: {
51044
- id: `${pluginId}.fields.slugInput.options.unique.label`,
51045
- defaultMessage: "Unique check"
51046
- },
51047
- description: {
51048
- id: `${pluginId}.fields.slugInput.options.unique.description`,
51049
- defaultMessage: "Enable unique value checking?"
51050
- },
51051
- radios: [
51052
- {
51053
- title: {
51054
- id: `${pluginId}.fields.slugInput.options.unique.true.label`,
51055
- defaultMessage: "Enable"
51056
- },
51057
- description: {
51058
- id: `${pluginId}.fields.slugInput.options.unique.true.description`,
51059
- defaultMessage: "When enabled, it will perform a uniqueness check on the value."
51060
- },
51061
- value: true
51062
- },
51063
- {
51064
- title: {
51065
- id: `${pluginId}.fields.slugInput.options.unique.false.label`,
51066
- defaultMessage: "Disable"
51067
- },
51068
- description: {
51069
- id: `${pluginId}.fields.slugInput.options.unique.false.description`,
51070
- defaultMessage: "Disabling unique value checks will prevent the use of unique values."
51071
- },
51072
- value: false
51073
- }
51074
- ]
51075
- }
51076
- ];
51077
51101
  app.customFields.register({
51078
51102
  name: "slugInput",
51079
51103
  pluginId,
@@ -51091,7 +51115,70 @@ var registerSlugInput = (app) => {
51091
51115
  Input: () => Promise.resolve({ default: SlugInput })
51092
51116
  },
51093
51117
  options: {
51094
- base: options
51118
+ base: [
51119
+ {
51120
+ name: "options.target",
51121
+ type: "text",
51122
+ intlLabel: {
51123
+ id: `${pluginId}.fields.slugInput.options.targetField.label`,
51124
+ defaultMessage: "Target field"
51125
+ },
51126
+ description: {
51127
+ id: `${pluginId}.fields.slugInput.options.targetField.description`,
51128
+ defaultMessage: "Auto-generate slug from a text field. Leave empty to disable."
51129
+ }
51130
+ }
51131
+ ],
51132
+ advanced: [
51133
+ {
51134
+ name: "required",
51135
+ type: "checkbox",
51136
+ intlLabel: {
51137
+ id: "form.attribute.item.requiredField",
51138
+ defaultMessage: "Required field"
51139
+ },
51140
+ description: {
51141
+ id: "form.attribute.item.requiredField.description",
51142
+ defaultMessage: "Cannot create entry if empty"
51143
+ }
51144
+ },
51145
+ {
51146
+ name: "unique",
51147
+ type: "checkbox",
51148
+ intlLabel: {
51149
+ id: "form.attribute.item.uniqueField",
51150
+ defaultMessage: "Unique field"
51151
+ },
51152
+ description: {
51153
+ id: "form.attribute.item.uniqueField.description",
51154
+ defaultMessage: "Cannot create entry with duplicate value"
51155
+ }
51156
+ },
51157
+ {
51158
+ name: "minLength",
51159
+ type: "number",
51160
+ intlLabel: {
51161
+ id: "form.attribute.item.minimum",
51162
+ defaultMessage: "Minimum length"
51163
+ },
51164
+ description: {
51165
+ id: "form.attribute.item.minimum.description",
51166
+ defaultMessage: "Minimum character count"
51167
+ }
51168
+ },
51169
+ {
51170
+ name: "maxLength",
51171
+ type: "number",
51172
+ intlLabel: {
51173
+ id: "form.attribute.item.maximum",
51174
+ defaultMessage: "Maximum length"
51175
+ },
51176
+ description: {
51177
+ id: "form.attribute.item.maximum.description",
51178
+ defaultMessage: "Maximum character count"
51179
+ }
51180
+ }
51181
+ ]
51095
51182
  }
51096
51183
  });
51097
51184
  };
@@ -20481,7 +20481,7 @@ var init_ApiErrorAlert = __esm(() => {
20481
20481
 
20482
20482
  // admin/src/components/DashboardStats.tsx
20483
20483
  import { Box as Box6, Grid as Grid2, Typography as Typography8 } from "@strapi/design-system";
20484
- import { useFetchClient as useFetchClient3, useNotification as useNotification2 } from "@strapi/strapi/admin";
20484
+ import { useFetchClient as useFetchClient3, useNotification as useNotification3 } from "@strapi/strapi/admin";
20485
20485
  import { useEffect as useEffect7, useState as useState12 } from "react";
20486
20486
  import { jsxDEV as jsxDEV28 } from "react/jsx-dev-runtime";
20487
20487
  var DashboardStats = ({
@@ -20491,7 +20491,7 @@ var DashboardStats = ({
20491
20491
  onLoaded
20492
20492
  }) => {
20493
20493
  const fetchClient = useFetchClient3();
20494
- const { toggleNotification } = useNotification2();
20494
+ const { toggleNotification } = useNotification3();
20495
20495
  const [isLoading, setIsLoading] = useState12(!externalData);
20496
20496
  const [error, setError] = useState12(null);
20497
20497
  const [stats, setStats] = useState12(externalData || {
@@ -20726,7 +20726,7 @@ import {
20726
20726
  Layouts,
20727
20727
  Page as Page2,
20728
20728
  useFetchClient as useFetchClient5,
20729
- useNotification as useNotification4
20729
+ useNotification as useNotification5
20730
20730
  } from "@strapi/strapi/admin";
20731
20731
  import { useCallback as useCallback6, useEffect as useEffect8, useState as useState13 } from "react";
20732
20732
  import { useNavigate } from "react-router-dom";
@@ -20734,7 +20734,7 @@ import { jsxDEV as jsxDEV31 } from "react/jsx-dev-runtime";
20734
20734
  var Inquiry = () => {
20735
20735
  const navigate = useNavigate();
20736
20736
  const fetchClient = useFetchClient5();
20737
- const { toggleNotification } = useNotification4();
20737
+ const { toggleNotification } = useNotification5();
20738
20738
  const [isLoading, setIsLoading] = useState13(true);
20739
20739
  const [error, setError] = useState13(null);
20740
20740
  const [data, setData] = useState13([]);
@@ -20953,7 +20953,7 @@ import {
20953
20953
  Layouts as Layouts2,
20954
20954
  Page as Page3,
20955
20955
  useFetchClient as useFetchClient6,
20956
- useNotification as useNotification5
20956
+ useNotification as useNotification6
20957
20957
  } from "@strapi/strapi/admin";
20958
20958
  import { useEffect as useEffect9, useState as useState14 } from "react";
20959
20959
  import { useNavigate as useNavigate2, useParams } from "react-router-dom";
@@ -20963,7 +20963,7 @@ var DetailTable, InquiryDetail = () => {
20963
20963
  const { id } = useParams();
20964
20964
  const navigate = useNavigate2();
20965
20965
  const fetchClient = useFetchClient6();
20966
- const { toggleNotification } = useNotification5();
20966
+ const { toggleNotification } = useNotification6();
20967
20967
  const [isLoading, setIsLoading] = useState14(true);
20968
20968
  const [isMarking, setIsMarking] = useState14(false);
20969
20969
  const [data, setData] = useState14(null);
@@ -21304,13 +21304,13 @@ import {
21304
21304
  Layouts as Layouts3,
21305
21305
  Page as Page4,
21306
21306
  useFetchClient as useFetchClient7,
21307
- useNotification as useNotification6
21307
+ useNotification as useNotification7
21308
21308
  } from "@strapi/strapi/admin";
21309
21309
  import { useCallback as useCallback7, useEffect as useEffect10, useState as useState15 } from "react";
21310
21310
  import { jsxDEV as jsxDEV33, Fragment as Fragment5 } from "react/jsx-dev-runtime";
21311
21311
  var Visitor = () => {
21312
21312
  const fetchClient = useFetchClient7();
21313
- const { toggleNotification } = useNotification6();
21313
+ const { toggleNotification } = useNotification7();
21314
21314
  const [isLoading, setIsLoading] = useState15(true);
21315
21315
  const [error, setError] = useState15(null);
21316
21316
  const [activeTab, setActiveTab] = useState15("dailyStats");
@@ -46820,7 +46820,22 @@ var registerColorPicker = (app) => {
46820
46820
  components: {
46821
46821
  Input: () => Promise.resolve({ default: ColorPickerInput })
46822
46822
  },
46823
- options: {}
46823
+ options: {
46824
+ advanced: [
46825
+ {
46826
+ name: "required",
46827
+ type: "checkbox",
46828
+ intlLabel: {
46829
+ id: "form.attribute.item.requiredField",
46830
+ defaultMessage: "Required field"
46831
+ },
46832
+ description: {
46833
+ id: "form.attribute.item.requiredField.description",
46834
+ defaultMessage: "Cannot create entry if empty"
46835
+ }
46836
+ }
46837
+ ]
46838
+ }
46824
46839
  });
46825
46840
  };
46826
46841
 
@@ -47186,7 +47201,8 @@ var import_react_intl3 = __toESM(require_react_intl(), 1);
47186
47201
  import { Box as Box2, Button as Button2, Flex as Flex2, Modal, Typography as Typography3 } from "@strapi/design-system";
47187
47202
  import {
47188
47203
  unstable_useContentManagerContext,
47189
- useFetchClient
47204
+ useFetchClient,
47205
+ useNotification
47190
47206
  } from "@strapi/strapi/admin";
47191
47207
  import * as React6 from "react";
47192
47208
  import { styled as styled10 } from "styled-components";
@@ -47358,6 +47374,7 @@ var DataSelector = ({
47358
47374
  const { formatMessage } = import_react_intl3.useIntl();
47359
47375
  const { contentTypes } = unstable_useContentManagerContext();
47360
47376
  const client = useFetchClient();
47377
+ const { toggleNotification } = useNotification();
47361
47378
  const displayedContentTypes = React6.useMemo(() => contentTypes?.filter((ct) => ct.isDisplayed && !ct.uid.startsWith("plugin:")) || [], [contentTypes]);
47362
47379
  const loadCollectionData = React6.useCallback(async (contentType, currentPage = 1, currentPageSize = 10) => {
47363
47380
  setIsDataLoading(true);
@@ -47394,8 +47411,19 @@ var DataSelector = ({
47394
47411
  onChange(selectedData);
47395
47412
  setIsOpen(false);
47396
47413
  }
47397
- } catch (error) {
47398
- console.error("Failed to load single type data:", error);
47414
+ } catch (err) {
47415
+ const error = err?.response?.data?.error;
47416
+ if (error.status === 404) {
47417
+ toggleNotification({
47418
+ type: "warning",
47419
+ message: formatMessage({
47420
+ id: getTrad("data-select.single-type-not-found"),
47421
+ defaultMessage: 'Content type "{displayName}" is not filled yet. Please fill in the content type information and save it before trying again.'
47422
+ }, { displayName: contentType.info.displayName })
47423
+ });
47424
+ } else {
47425
+ console.error("Failed to load single type data:", error);
47426
+ }
47399
47427
  } finally {
47400
47428
  setIsDataLoading(false);
47401
47429
  }
@@ -47406,7 +47434,7 @@ var DataSelector = ({
47406
47434
  setPageSize(10);
47407
47435
  await loadCollectionData(contentType, 1, 10);
47408
47436
  }
47409
- }, [client, onChange, loadCollectionData]);
47437
+ }, [client, onChange, loadCollectionData, toggleNotification, formatMessage]);
47410
47438
  const handleBackToContentTypes = React6.useCallback(() => {
47411
47439
  setSelectedContentType(null);
47412
47440
  setDataItems([]);
@@ -48861,7 +48889,22 @@ var registerDataNested = (app) => {
48861
48889
  components: {
48862
48890
  Input: () => Promise.resolve({ default: DataNested })
48863
48891
  },
48864
- options: {}
48892
+ options: {
48893
+ advanced: [
48894
+ {
48895
+ name: "required",
48896
+ type: "checkbox",
48897
+ intlLabel: {
48898
+ id: "form.attribute.item.requiredField",
48899
+ defaultMessage: "Required field"
48900
+ },
48901
+ description: {
48902
+ id: "form.attribute.item.requiredField.description",
48903
+ defaultMessage: "Cannot create entry if empty"
48904
+ }
48905
+ }
48906
+ ]
48907
+ }
48865
48908
  });
48866
48909
  };
48867
48910
 
@@ -48915,7 +48958,22 @@ var registerDataSelect = (app) => {
48915
48958
  components: {
48916
48959
  Input: () => Promise.resolve({ default: DataSelectInput })
48917
48960
  },
48918
- options: {}
48961
+ options: {
48962
+ advanced: [
48963
+ {
48964
+ name: "required",
48965
+ type: "checkbox",
48966
+ intlLabel: {
48967
+ id: "form.attribute.item.requiredField",
48968
+ defaultMessage: "Required field"
48969
+ },
48970
+ description: {
48971
+ id: "form.attribute.item.requiredField.description",
48972
+ defaultMessage: "Cannot create entry if empty"
48973
+ }
48974
+ }
48975
+ ]
48976
+ }
48919
48977
  });
48920
48978
  };
48921
48979
 
@@ -50861,7 +50919,22 @@ var registerIconPicker = (app) => {
50861
50919
  components: {
50862
50920
  Input: () => Promise.resolve({ default: IconPickerInput })
50863
50921
  },
50864
- options: {}
50922
+ options: {
50923
+ advanced: [
50924
+ {
50925
+ name: "required",
50926
+ type: "checkbox",
50927
+ intlLabel: {
50928
+ id: "form.attribute.item.requiredField",
50929
+ defaultMessage: "Required field"
50930
+ },
50931
+ description: {
50932
+ id: "form.attribute.item.requiredField.description",
50933
+ defaultMessage: "Cannot create entry if empty"
50934
+ }
50935
+ }
50936
+ ]
50937
+ }
50865
50938
  });
50866
50939
  };
50867
50940
 
@@ -50872,7 +50945,7 @@ import {
50872
50945
  unstable_useContentManagerContext as unstable_useContentManagerContext2,
50873
50946
  useFetchClient as useFetchClient2,
50874
50947
  useField as useField5,
50875
- useNotification
50948
+ useNotification as useNotification2
50876
50949
  } from "@strapi/strapi/admin";
50877
50950
 
50878
50951
  // node_modules/@uidotdev/usehooks/index.js
@@ -50920,7 +50993,7 @@ var SlugInput = React11.forwardRef(({ hint, labelAction, label, name, required,
50920
50993
  const { formatMessage } = import_react_intl6.useIntl();
50921
50994
  const field = useField5(name);
50922
50995
  const fetchClient = useFetchClient2();
50923
- const { toggleNotification } = useNotification();
50996
+ const { toggleNotification } = useNotification2();
50924
50997
  const {
50925
50998
  contentType,
50926
50999
  id: documentId,
@@ -50958,6 +51031,9 @@ var SlugInput = React11.forwardRef(({ hint, labelAction, label, name, required,
50958
51031
  if (!value || documentId && field.initialValue === value) {
50959
51032
  return;
50960
51033
  }
51034
+ if (!attribute?.unique) {
51035
+ return;
51036
+ }
50961
51037
  try {
50962
51038
  setIsCheckingAvailability(true);
50963
51039
  const { data } = await fetchClient.post(`/website/fields/check-available`, {
@@ -50983,6 +51059,7 @@ var SlugInput = React11.forwardRef(({ hint, labelAction, label, name, required,
50983
51059
  setIsCheckingAvailability(false);
50984
51060
  }
50985
51061
  }, [
51062
+ attribute?.unique,
50986
51063
  contentType?.kind,
50987
51064
  contentType?.uid,
50988
51065
  documentId,
@@ -51078,58 +51155,6 @@ var SlugInput = React11.forwardRef(({ hint, labelAction, label, name, required,
51078
51155
  }, undefined, false, undefined, this);
51079
51156
  });
51080
51157
  var registerSlugInput = (app) => {
51081
- const options = [
51082
- {
51083
- name: "options.target",
51084
- type: "text",
51085
- intlLabel: {
51086
- id: `${pluginId}.fields.slugInput.options.targetField.label`,
51087
- defaultMessage: "Target field"
51088
- },
51089
- description: {
51090
- id: `${pluginId}.fields.slugInput.options.targetField.description`,
51091
- defaultMessage: "After filling in the information, a slug will be automatically generated following the target field."
51092
- }
51093
- },
51094
- {
51095
- name: "options.unique",
51096
- type: "boolean-radio-group",
51097
- size: 12,
51098
- defaultValue: true,
51099
- intlLabel: {
51100
- id: `${pluginId}.fields.slugInput.options.unique.label`,
51101
- defaultMessage: "Unique check"
51102
- },
51103
- description: {
51104
- id: `${pluginId}.fields.slugInput.options.unique.description`,
51105
- defaultMessage: "Enable unique value checking?"
51106
- },
51107
- radios: [
51108
- {
51109
- title: {
51110
- id: `${pluginId}.fields.slugInput.options.unique.true.label`,
51111
- defaultMessage: "Enable"
51112
- },
51113
- description: {
51114
- id: `${pluginId}.fields.slugInput.options.unique.true.description`,
51115
- defaultMessage: "When enabled, it will perform a uniqueness check on the value."
51116
- },
51117
- value: true
51118
- },
51119
- {
51120
- title: {
51121
- id: `${pluginId}.fields.slugInput.options.unique.false.label`,
51122
- defaultMessage: "Disable"
51123
- },
51124
- description: {
51125
- id: `${pluginId}.fields.slugInput.options.unique.false.description`,
51126
- defaultMessage: "Disabling unique value checks will prevent the use of unique values."
51127
- },
51128
- value: false
51129
- }
51130
- ]
51131
- }
51132
- ];
51133
51158
  app.customFields.register({
51134
51159
  name: "slugInput",
51135
51160
  pluginId,
@@ -51147,7 +51172,70 @@ var registerSlugInput = (app) => {
51147
51172
  Input: () => Promise.resolve({ default: SlugInput })
51148
51173
  },
51149
51174
  options: {
51150
- base: options
51175
+ base: [
51176
+ {
51177
+ name: "options.target",
51178
+ type: "text",
51179
+ intlLabel: {
51180
+ id: `${pluginId}.fields.slugInput.options.targetField.label`,
51181
+ defaultMessage: "Target field"
51182
+ },
51183
+ description: {
51184
+ id: `${pluginId}.fields.slugInput.options.targetField.description`,
51185
+ defaultMessage: "Auto-generate slug from a text field. Leave empty to disable."
51186
+ }
51187
+ }
51188
+ ],
51189
+ advanced: [
51190
+ {
51191
+ name: "required",
51192
+ type: "checkbox",
51193
+ intlLabel: {
51194
+ id: "form.attribute.item.requiredField",
51195
+ defaultMessage: "Required field"
51196
+ },
51197
+ description: {
51198
+ id: "form.attribute.item.requiredField.description",
51199
+ defaultMessage: "Cannot create entry if empty"
51200
+ }
51201
+ },
51202
+ {
51203
+ name: "unique",
51204
+ type: "checkbox",
51205
+ intlLabel: {
51206
+ id: "form.attribute.item.uniqueField",
51207
+ defaultMessage: "Unique field"
51208
+ },
51209
+ description: {
51210
+ id: "form.attribute.item.uniqueField.description",
51211
+ defaultMessage: "Cannot create entry with duplicate value"
51212
+ }
51213
+ },
51214
+ {
51215
+ name: "minLength",
51216
+ type: "number",
51217
+ intlLabel: {
51218
+ id: "form.attribute.item.minimum",
51219
+ defaultMessage: "Minimum length"
51220
+ },
51221
+ description: {
51222
+ id: "form.attribute.item.minimum.description",
51223
+ defaultMessage: "Minimum character count"
51224
+ }
51225
+ },
51226
+ {
51227
+ name: "maxLength",
51228
+ type: "number",
51229
+ intlLabel: {
51230
+ id: "form.attribute.item.maximum",
51231
+ defaultMessage: "Maximum length"
51232
+ },
51233
+ description: {
51234
+ id: "form.attribute.item.maximum.description",
51235
+ defaultMessage: "Maximum character count"
51236
+ }
51237
+ }
51238
+ ]
51151
51239
  }
51152
51240
  });
51153
51241
  };
@@ -51173,13 +51261,13 @@ import {
51173
51261
  LinkButton,
51174
51262
  Typography as Typography9
51175
51263
  } from "@strapi/design-system";
51176
- import { useFetchClient as useFetchClient4, useNotification as useNotification3 } from "@strapi/strapi/admin";
51264
+ import { useFetchClient as useFetchClient4, useNotification as useNotification4 } from "@strapi/strapi/admin";
51177
51265
  import React12 from "react";
51178
51266
  import { jsxDEV as jsxDEV29 } from "react/jsx-dev-runtime";
51179
51267
  var WelcomeWidget = () => {
51180
51268
  const [refresh, setRefresh] = React12.useState(false);
51181
51269
  const fetchClient = useFetchClient4();
51182
- const { toggleNotification } = useNotification3();
51270
+ const { toggleNotification } = useNotification4();
51183
51271
  const handleRefresh = async () => {
51184
51272
  setRefresh(true);
51185
51273
  try {