@neovici/cosmoz-form 3.4.0-beta.7 → 3.4.0-beta.8

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.
@@ -5,6 +5,7 @@ import { Renderable, Resolvable } from '../types';
5
5
  import { Props as AddProps } from '../use-validated-form$';
6
6
  interface Props<T extends object> extends DialogProps, AddProps<T> {
7
7
  heading: string;
8
+ subtitle?: string;
8
9
  description?: Renderable;
9
10
  auto?: boolean;
10
11
  uncancelable?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"form-dialog.d.ts","sourceRoot":"","sources":["../../src/form-dialog/form-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAChC,OAAO,EAAU,KAAK,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,gCAAgC,CAAC;AAWxC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AAE9E,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;IACjE,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AA+CD,MAAM,WAAW,MAAM,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,KAAK,CAAC,CAAC,CAAC;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,EAAE,QAAQ,MAAM,CAAC,CAAC,CAAC,KAAG,UAoBhE,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,MAAM,EAC3C,aAAa,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS;;;;cAO7C,CAAC"}
1
+ {"version":3,"file":"form-dialog.d.ts","sourceRoot":"","sources":["../../src/form-dialog/form-dialog.ts"],"names":[],"mappings":"AAAA,OAAO,wBAAwB,CAAC;AAChC,OAAO,EAAU,KAAK,IAAI,WAAW,EAAE,MAAM,wBAAwB,CAAC;AACtE,OAAO,gCAAgC,CAAC;AAWxC,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAClD,OAAO,EAAE,KAAK,IAAI,QAAQ,EAAqB,MAAM,wBAAwB,CAAC;AAE9E,UAAU,KAAK,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,WAAW,EAAE,QAAQ,CAAC,CAAC,CAAC;IACjE,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,WAAW,CAAC,EAAE,UAAU,CAAC;IACzB,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,QAAQ,CAAC,EAAE,MAAM,CAAC;CAClB;AAyDD,MAAM,WAAW,MAAM,CAAC,CAAC,SAAS,MAAM,CAAE,SAAQ,KAAK,CAAC,CAAC,CAAC;IACzD,IAAI,CAAC,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,UAAU,GAAI,CAAC,SAAS,MAAM,EAAE,QAAQ,MAAM,CAAC,CAAC,CAAC,KAAG,UAoBhE,CAAC;AAEF,eAAO,MAAM,WAAW,GAAI,CAAC,SAAS,MAAM,EAC3C,aAAa,UAAU,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS;;;;cAO7C,CAAC"}
@@ -14,7 +14,7 @@ import buttonStyles from '../styles/button';
14
14
  import { useValidatedForm$ } from '../use-validated-form$';
15
15
  import styles from './style.css';
16
16
  const FormDialog = (host) => {
17
- const { auto, uncancelable, hideCancelButton, saveText = t('OK') } = host, { onSave, disabled, save$, progress, ...form } = useValidatedForm$(host);
17
+ const { description, auto, uncancelable, hideCancelButton, saveText = t('OK'), } = host, { onSave, disabled, save$, progress, ...form } = useValidatedForm$(host);
18
18
  useEffect(() => {
19
19
  if (!auto) {
20
20
  return;
@@ -24,6 +24,7 @@ const FormDialog = (host) => {
24
24
  return html ` <style>
25
25
  ${buttonStyles} ${renderStyles(form)}${styles}
26
26
  </style>
27
+ ${when(description, () => html `<div class="description">${description}</div>`)}
27
28
  <div class="form" part="form">${renderFields(form)}</div>
28
29
  <div class="buttons">
29
30
  ${renderFailure$(save$)}
@@ -48,7 +49,7 @@ export const formDialog = (props) => {
48
49
  name=${ifDefined(props.name)}
49
50
  ?allow-empty=${props.allowEmpty}
50
51
  .title=${props.heading}
51
- .subtitle=${props.description}
52
+ .subtitle=${props.subtitle}
52
53
  .icon=${props.icon}
53
54
  .description=${props.description}
54
55
  .fields=${props.fields}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@neovici/cosmoz-form",
3
- "version": "3.4.0-beta.7",
3
+ "version": "3.4.0-beta.8",
4
4
  "description": "A pionjs component",
5
5
  "keywords": [
6
6
  "web-components",
@@ -70,7 +70,7 @@
70
70
  "@lit-labs/virtualizer": "^2.1.1",
71
71
  "@neovici/cosmoz-autocomplete": "^13.7.0-beta.4",
72
72
  "@neovici/cosmoz-button": "^1.1.0",
73
- "@neovici/cosmoz-dialog": "^5.1.0-beta.1",
73
+ "@neovici/cosmoz-dialog": "^5.1.0-beta.3",
74
74
  "@neovici/cosmoz-icons": "^1.4.0",
75
75
  "@neovici/cosmoz-input": "^6.0.0-beta.5",
76
76
  "@neovici/cosmoz-spinner": "^1.0.2",