@saltcorn/builder 0.8.7-beta.3 → 0.8.7-beta.5

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@saltcorn/builder",
3
- "version": "0.8.7-beta.3",
3
+ "version": "0.8.7-beta.5",
4
4
  "description": "Drag and drop view builder for Saltcorn, open-source no-code platform",
5
5
  "main": "index.js",
6
6
  "homepage": "https://saltcorn.com",
@@ -172,18 +172,16 @@ const ActionSettings = () => {
172
172
  <MinRoleSettingRow minRole={minRole} setProp={setProp} />
173
173
  </tbody>
174
174
  </table>
175
- {options.mode === "show" || name === "Delete" || name === "Reset" ? (
176
- <div className="form-check">
177
- <input
178
- className="form-check-input"
179
- name="block"
180
- type="checkbox"
181
- checked={confirm}
182
- onChange={setAProp("confirm", { checked: true })}
183
- />
184
- <label className="form-check-label">User confirmation?</label>
185
- </div>
186
- ) : null}
175
+ <div className="form-check">
176
+ <input
177
+ className="form-check-input"
178
+ name="block"
179
+ type="checkbox"
180
+ checked={confirm}
181
+ onChange={setAProp("confirm", { checked: true })}
182
+ />
183
+ <label className="form-check-label">User confirmation?</label>
184
+ </div>
187
185
  {action_style !== "on_page_load" ? (
188
186
  <BlockSetting block={block} setProp={setProp} />
189
187
  ) : null}
@@ -32,6 +32,7 @@ const Table = ({
32
32
  bs_striped,
33
33
  bs_bordered,
34
34
  bs_borderless,
35
+ bs_wauto,
35
36
  }) => {
36
37
  const {
37
38
  selected,
@@ -45,7 +46,7 @@ const Table = ({
45
46
  bs_style && bs_striped ? "table-striped" : ""
46
47
  } ${bs_style && bs_bordered ? "table-bordered" : ""} ${
47
48
  bs_style && bs_borderless ? "table-borderless" : ""
48
- }`}
49
+ } ${bs_style && bs_wauto ? "w-auto" : ""}`}
49
50
  ref={(dom) => connect(drag(dom))}
50
51
  >
51
52
  <tbody>
@@ -107,6 +108,12 @@ const fields = [
107
108
  type: "Bool",
108
109
  showIf: { bs_style: true },
109
110
  },
111
+ {
112
+ label: "Auto width",
113
+ name: "bs_wauto",
114
+ type: "Bool",
115
+ showIf: { bs_style: true },
116
+ },
110
117
  ];
111
118
 
112
119
  /**
@@ -260,6 +260,7 @@ const layoutToNodes = (layout, query, actions, parent = "ROOT") => {
260
260
  bs_small={segment.bs_small || false}
261
261
  bs_striped={segment.bs_striped || false}
262
262
  bs_bordered={segment.bs_bordered || false}
263
+ bs_wauto={segment.bs_wauto || false}
263
264
  bs_borderless={segment.bs_borderless || false}
264
265
  contents={(segment.contents || []).map((row) =>
265
266
  (row || []).map(toTag)
@@ -466,6 +467,7 @@ const craftToSaltcorn = (nodes, startFrom = "ROOT") => {
466
467
  bs_striped: node.props.bs_striped,
467
468
  bs_bordered: node.props.bs_bordered,
468
469
  bs_borderless: node.props.bs_borderless,
470
+ bs_wauto: node.props.bs_wauto,
469
471
  };
470
472
  }
471
473