@epam/ai-dial-builder-form 1.2.0-rc.1 → 1.3.0-dev.13

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/index.d.ts CHANGED
@@ -23,7 +23,7 @@ export type { AvatarPickerFileManagerModalProps, AvatarPickerModalLabels, Avatar
23
23
  export type { DeploymentCreationFormFieldErrors, DeploymentCreationFormFieldLabels, DeploymentCreationFormIconLabels, DeploymentCreationFormLabels, DeploymentCreationFormLocaleEntry, DeploymentCreationFormLocaleLabels, DeploymentCreationFormLocaleOption, DeploymentCreationFormProps, DeploymentCreationFormStyles, DeploymentCreationFormValues, } from './models/deployment-creation-form';
24
24
  export type { DeploymentCreationFormErrorCodes, DeploymentCreationFormValidationOptions, } from './models/validation';
25
25
  export { DeploymentCreationFieldErrorCode } from './models/validation';
26
- export { NAME_PATTERN, SEMVER_VERSION_PATTERN, VERSION_PATTERN, validateDeploymentCreationFields, } from './utils/validate-deployment-creation-fields';
26
+ export { DEFAULT_DEPLOYMENT_VERSION, NAME_PATTERN, SEMVER_VERSION_PATTERN, VERSION_PATTERN, validateDeploymentCreationFields, } from './utils/validate-deployment-creation-fields';
27
27
  export { BUILDER_FORM_CLASS } from './constants/public-class-names';
28
28
  export { DEFAULT_METADATA_FORM_LABELS } from './constants/metadata-form';
29
29
  //# sourceMappingURL=index.d.ts.map
package/index.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,MAAM,wDAAwD,CAAC;AAC9F,YAAY,EACV,yBAAyB,EACzB,0BAA0B,EAC1B,0BAA0B,GAC3B,MAAM,uCAAuC,CAAC;AAC/C,YAAY,EAAE,wBAAwB,EAAE,MAAM,qCAAqC,CAAC;AACpF,YAAY,EACV,uBAAuB,EACvB,uBAAuB,EACvB,uBAAuB,EACvB,2BAA2B,GAC5B,MAAM,oCA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ubmit: n, isCancelDisabled: r = !1, isSubm
738
738
  })] });
739
739
  }), $ = /* @__PURE__ */ function(e) {
740
740
  return e.Required = "required", e.InvalidFormat = "invalid-format", e.TooLong = "too-long", e.ControlCharacters = "control-characters", e;
741
- }({}), xe = (e, t) => e.length === t.length && e.every((e, n) => e.id === t[n].id && e.language === t[n].language && e.name === t[n].name && e.description === t[n].description), Se = (e, t) => e.name === t.name && e.description === t.description && e.iconUrl === t.iconUrl && e.version === t.version && e.topics.length === t.topics.length && e.topics.every((e, n) => e === t.topics[n]) && xe(e.otherLocales, t.otherLocales), Ce = (e) => Object.values(e).every((e) => e == null), we = /^[a-zA-Z0-9 _.-]+$/, Te = /^[a-zA-Z0-9._-]+$/, Ee = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/, De = (n, r = {}) => {
741
+ }({}), xe = (e, t) => e.length === t.length && e.every((e, n) => e.id === t[n].id && e.language === t[n].language && e.name === t[n].name && e.description === t[n].description), Se = (e, t) => e.name === t.name && e.description === t.description && e.iconUrl === t.iconUrl && e.version === t.version && e.topics.length === t.topics.length && e.topics.every((e, n) => e === t.topics[n]) && xe(e.otherLocales, t.otherLocales), Ce = (e) => Object.values(e).every((e) => e == null), we = /^[a-zA-Z0-9 _.-]+$/, Te = /^[a-zA-Z0-9._-]+$/, Ee = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*)?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/, De = "1.0.0", Oe = (n, r = {}) => {
742
742
  let i = {}, s = n.name.trim();
743
743
  s ? a(s, t) ? i.name = $.TooLong : r.validateNamePattern && !we.test(s) ? i.name = $.InvalidFormat : o(s) && (i.name = $.ControlCharacters) : i.name = $.Required, a(n.description, e) && (i.description = $.TooLong);
744
744
  let c = n.version.trim();
745
745
  return r.validateVersionPattern && c && ((r.validateVersionPattern instanceof RegExp ? r.validateVersionPattern : Te).test(c) || (i.version = $.InvalidFormat)), i;
746
- }, Oe = new Set([$.TooLong, $.ControlCharacters]), ke = (e, t) => ({
746
+ }, ke = new Set([$.TooLong, $.ControlCharacters]), Ae = (e, t) => ({
747
747
  reseedKey: t,
748
748
  values: e,
749
749
  baseline: e,
750
750
  touched: {},
751
751
  hasAttemptedSubmit: !1,
752
752
  submitAttemptCount: 0
753
- }), Ae = ({ initialValues: e, validationOptions: t, reseedKey: n }) => {
754
- let [r, i] = B(() => ke(e, n));
755
- r.reseedKey !== n && i(ke(e, n));
756
- let a = t?.validateNamePattern, o = t?.validateVersionPattern, s = R(() => De(r.values, {
753
+ }), je = ({ initialValues: e, validationOptions: t, reseedKey: n }) => {
754
+ let [r, i] = B(() => Ae(e, n));
755
+ r.reseedKey !== n && i(Ae(e, n));
756
+ let a = t?.validateNamePattern, o = t?.validateVersionPattern, s = R(() => Oe(r.values, {
757
757
  validateNamePattern: a,
758
758
  validateVersionPattern: o
759
759
  }), [
@@ -762,7 +762,7 @@ var V = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
762
762
  o
763
763
  ]), c = R(() => {
764
764
  if (r.hasAttemptedSubmit) return s;
765
- let e = (e, t) => e && (t || Oe.has(e)) ? e : void 0;
765
+ let e = (e, t) => e && (t || ke.has(e)) ? e : void 0;
766
766
  return {
767
767
  name: e(s.name, r.touched[Q.Name]),
768
768
  version: e(s.version, r.touched[Q.Version]),
@@ -792,7 +792,7 @@ var V = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
792
792
  ...e,
793
793
  hasAttemptedSubmit: !0,
794
794
  submitAttemptCount: e.submitAttemptCount + 1
795
- })), Ce(l.current)), []), m = I((e) => i((t) => ke(e ?? u.current, t.reseedKey)), []), h = R(() => !Se(r.values, r.baseline), [r.values, r.baseline]);
795
+ })), Ce(l.current)), []), m = I((e) => i((t) => Ae(e ?? u.current, t.reseedKey)), []), h = R(() => !Se(r.values, r.baseline), [r.values, r.baseline]);
796
796
  return R(() => ({
797
797
  values: r.values,
798
798
  setValues: d,
@@ -818,4 +818,4 @@ var V = ({ labels: e, onCancel: t, onSubmit: n, isCancelDisabled: r = !1, isSubm
818
818
  ]);
819
819
  };
820
820
  //#endregion
821
- export { oe as AddAvatar, se as AvatarPickerModal, q as BUILDER_FORM_CLASS, K as BuilderFormContainer, ve as DEFAULT_METADATA_FORM_LABELS, $ as DeploymentCreationFieldErrorCode, pe as DeploymentCreationForm, ue as DeploymentLocalesField, ae as EditorLayout, Y as EditorSection, _e as EntityEditor, Q as MetadataField, be as MetadataForm, we as NAME_PATTERN, Ee as SEMVER_VERSION_PATTERN, Te as VERSION_PATTERN, Ae as useMetadataForm, De as validateDeploymentCreationFields };
821
+ export { oe as AddAvatar, se as AvatarPickerModal, q as BUILDER_FORM_CLASS, K as BuilderFormContainer, De as DEFAULT_DEPLOYMENT_VERSION, ve as DEFAULT_METADATA_FORM_LABELS, $ as DeploymentCreationFieldErrorCode, pe as DeploymentCreationForm, ue as DeploymentLocalesField, ae as EditorLayout, Y as EditorSection, _e as EntityEditor, Q as MetadataField, be as MetadataForm, we as NAME_PATTERN, Ee as SEMVER_VERSION_PATTERN, Te as VERSION_PATTERN, je as useMetadataForm, Oe as validateDeploymentCreationFields };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@epam/ai-dial-builder-form",
3
3
  "description": "Presentational builder form shells, editor layouts, and shared deployment field sets for composing and editing DIAL entities",
4
- "version": "1.2.0-rc.1",
4
+ "version": "1.3.0-dev.13",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "main": "./index.js",
@@ -20,7 +20,7 @@
20
20
  "@tabler/icons-react": "^3.44.0"
21
21
  },
22
22
  "peerDependencies": {
23
- "@epam/ai-dial-chat-shared": "1.2.0-rc.1",
23
+ "@epam/ai-dial-chat-shared": "1.3.0-dev.13",
24
24
  "@epam/ai-dial-ui-kit": "^0.15.0",
25
25
  "react": "^19.2.8"
26
26
  },
@@ -11,6 +11,8 @@ export declare const VERSION_PATTERN: RegExp;
11
11
  * accepted here is accepted when the same entity is edited there.
12
12
  */
13
13
  export declare const SEMVER_VERSION_PATTERN: RegExp;
14
+ /** Version a new deployment's create form opens with; a SemVer 2.0.0 value the host seeds into its create-mode metadata. */
15
+ export declare const DEFAULT_DEPLOYMENT_VERSION = "1.0.0";
14
16
  /** Validates the General-step fields and returns untranslated error codes; has no side effects. */
15
17
  export declare const validateDeploymentCreationFields: (values: DeploymentCreationFormValues, options?: DeploymentCreationFormValidationOptions) => DeploymentCreationFormErrorCodes;
16
18
  //# sourceMappingURL=validate-deployment-creation-fields.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"validate-deployment-creation-fields.d.ts","sourceRoot":"","sources":["../../src/utils/validate-deployment-creation-fields.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,KAAK,EACV,gCAAgC,EAChC,uCAAuC,EACxC,MAAM,sBAAsB,CAAC;AAG9B,iGAAiG;AACjG,eAAO,MAAM,YAAY,QAAuB,CAAC;AAEjD,4FAA4F;AAC5F,eAAO,MAAM,eAAe,QAAsB,CAAC;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,QACgJ,CAAC;AAEpL,mGAAmG;AACnG,eAAO,MAAM,gCAAgC,GAC3C,QAAQ,4BAA4B,EACpC,UAAS,uCAA4C,KACpD,gCA8BF,CAAC"}
1
+ {"version":3,"file":"validate-deployment-creation-fields.d.ts","sourceRoot":"","sources":["../../src/utils/validate-deployment-creation-fields.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,oCAAoC,CAAC;AACvF,OAAO,KAAK,EACV,gCAAgC,EAChC,uCAAuC,EACxC,MAAM,sBAAsB,CAAC;AAG9B,iGAAiG;AACjG,eAAO,MAAM,YAAY,QAAuB,CAAC;AAEjD,4FAA4F;AAC5F,eAAO,MAAM,eAAe,QAAsB,CAAC;AAEnD;;;;;GAKG;AACH,eAAO,MAAM,sBAAsB,QACgJ,CAAC;AAEpL,4HAA4H;AAC5H,eAAO,MAAM,0BAA0B,UAAU,CAAC;AAElD,mGAAmG;AACnG,eAAO,MAAM,gCAAgC,GAC3C,QAAQ,4BAA4B,EACpC,UAAS,uCAA4C,KACpD,gCA8BF,CAAC"}