@plitzi/sdk-authoring 0.35.2 → 0.35.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @plitzi/sdk-authoring
2
2
 
3
+ ## 0.35.3
4
+
5
+ ### Patch Changes
6
+
7
+ - 0211dc4: A form speaks the site's language when it refuses a value.
8
+
9
+ - **Every rule of a `formControl` can say what it wants to say.** `requiredMessage`, `minLengthMessage`,
10
+ `maxLengthMessage` and `formatMessage` join `patternMessage` and `matchesMessage`; left empty, each falls back to
11
+ the English sentence it said before. `formatMessage` is said when the value does not have the shape the control's
12
+ type asks for — an address, for an `email` — one attribute for every type that has a shape. Offered in the builder under the rule they belong to.
13
+ - **A `form` can turn the browser's own checks off (`noValidate`, "Skip Browser Validation" in the builder).** Left on
14
+ — the default, as before — the browser answers first for a blank required field and a malformed address, in a
15
+ bubble no style reaches and in the browser's language, while every other rule answers under the control. Turned
16
+ on, the form's rules are the only ones, and all of them answer under the control.
17
+ - **An `email` control checks the address itself,** by the same definition the browser uses, so the format is still
18
+ asked for when the browser's checks are off.
19
+
3
20
  ## 0.35.2
4
21
 
5
22
  ### Minor Changes
package/dist/index.d.ts CHANGED
@@ -1743,6 +1743,7 @@ declare const elementDeclarations: {
1743
1743
  readonly method: "get";
1744
1744
  readonly actionUrl: "";
1745
1745
  readonly managedByInteractions: false;
1746
+ readonly noValidate: false;
1746
1747
  readonly errors: {};
1747
1748
  readonly values: {};
1748
1749
  };
@@ -1790,6 +1791,7 @@ declare const elementDeclarations: {
1790
1791
  } & ElementAttributesBrand<Partial<{
1791
1792
  values: Record<string, unknown>;
1792
1793
  method: "get" | "post";
1794
+ noValidate: boolean;
1793
1795
  actionUrl: string;
1794
1796
  managedByInteractions: boolean;
1795
1797
  errors: Record<string, string>;
@@ -1807,8 +1809,12 @@ declare const elementDeclarations: {
1807
1809
  readonly disabled: false;
1808
1810
  readonly options: readonly [];
1809
1811
  readonly required: true;
1812
+ readonly requiredMessage: "";
1810
1813
  readonly minLength: 0;
1814
+ readonly minLengthMessage: "";
1811
1815
  readonly maxLength: 0;
1816
+ readonly maxLengthMessage: "";
1817
+ readonly formatMessage: "";
1812
1818
  readonly pattern: "";
1813
1819
  readonly patternMessage: "";
1814
1820
  readonly matches: "";
@@ -4347,6 +4353,7 @@ export declare const form: {
4347
4353
  (props?: ElementProps<Partial<{
4348
4354
  values: Record<string, unknown>;
4349
4355
  method: "get" | "post";
4356
+ noValidate: boolean;
4350
4357
  actionUrl: string;
4351
4358
  managedByInteractions: boolean;
4352
4359
  errors: Record<string, string>;
@@ -4354,6 +4361,7 @@ export declare const form: {
4354
4361
  (children: ElementSpec[], props?: ElementProps<Partial<{
4355
4362
  values: Record<string, unknown>;
4356
4363
  method: "get" | "post";
4364
+ noValidate: boolean;
4357
4365
  actionUrl: string;
4358
4366
  managedByInteractions: boolean;
4359
4367
  errors: Record<string, string>;
@@ -4387,9 +4395,17 @@ declare type FormControlProps = {
4387
4395
  /**
4388
4396
  * The rules a value has to meet before the form submits, checked by the form at submit time and by the control when
4389
4397
  * it loses focus. `0` and `''` mean no rule. See `validateField` for what each one says when it is broken.
4398
+ *
4399
+ * Each `…Message` is the sentence shown under the control when that rule is broken, in the site's language; empty
4400
+ * falls back to an English one. `formatMessage` speaks for the shape the control's own type asks of its value — an
4401
+ * address, for an `email` — so it is one attribute however many types come to have a shape.
4390
4402
  */
4403
+ requiredMessage: string;
4391
4404
  minLength: number;
4405
+ minLengthMessage: string;
4392
4406
  maxLength: number;
4407
+ maxLengthMessage: string;
4408
+ formatMessage: string;
4393
4409
  pattern: string;
4394
4410
  patternMessage: string;
4395
4411
  /** The `name` of another control in the same form this one has to repeat — a password confirmation, typically. */
package/dist/index.js CHANGED
@@ -850,6 +850,7 @@ var t$31 = e()({
850
850
  method: "get",
851
851
  actionUrl: "",
852
852
  managedByInteractions: !1,
853
+ noValidate: !1,
853
854
  errors: {},
854
855
  values: {}
855
856
  },
@@ -950,8 +951,12 @@ var a$7 = e()({
950
951
  disabled: !1,
951
952
  options: [],
952
953
  required: !0,
954
+ requiredMessage: "",
953
955
  minLength: 0,
956
+ minLengthMessage: "",
954
957
  maxLength: 0,
958
+ maxLengthMessage: "",
959
+ formatMessage: "",
955
960
  pattern: "",
956
961
  patternMessage: "",
957
962
  matches: "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@plitzi/sdk-authoring",
3
- "version": "0.35.2",
3
+ "version": "0.35.3",
4
4
  "license": "AGPL-3.0",
5
5
  "files": [
6
6
  "dist/index.js",
@@ -44,11 +44,11 @@
44
44
  "devDependencies": {
45
45
  "@microsoft/api-extractor": "^7.59.1",
46
46
  "@plitzi/plitzi-ui": "^1.6.21",
47
- "@plitzi/sdk-elements": "0.35.2",
48
- "@plitzi/sdk-interactions": "0.35.2",
49
- "@plitzi/sdk-schema": "0.35.2",
50
- "@plitzi/sdk-shared": "0.35.2",
51
- "@plitzi/sdk-style": "0.35.2",
47
+ "@plitzi/sdk-elements": "0.35.3",
48
+ "@plitzi/sdk-interactions": "0.35.3",
49
+ "@plitzi/sdk-schema": "0.35.3",
50
+ "@plitzi/sdk-shared": "0.35.3",
51
+ "@plitzi/sdk-style": "0.35.3",
52
52
  "@types/react": "^19.3.0",
53
53
  "eslint": "^9.39.5",
54
54
  "typescript": "^6.0.3",