@saasquatch/mint-components 2.4.2-1 → 2.4.2
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/dist/cjs/{GenericTableView-2a5a39c8.js → GenericTableView-be5648e4.js} +5 -40
- package/dist/cjs/loader.cjs.js +1 -1
- package/dist/cjs/mint-components.cjs.js +1 -1
- package/dist/cjs/sqm-banking-info-form_10.cjs.entry.js +1 -1
- package/dist/cjs/sqm-big-stat_47.cjs.entry.js +4 -0
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
- package/dist/cjs/sqm-rewards-table_9.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +1 -1
- package/dist/collection/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.js +25 -0
- package/dist/collection/tables/GenericTableView.js +5 -40
- package/dist/esm/{GenericTableView-2555736c.js → GenericTableView-8c72ac30.js} +5 -40
- package/dist/esm/loader.js +1 -1
- package/dist/esm/mint-components.js +1 -1
- package/dist/esm/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm/sqm-big-stat_47.entry.js +4 -0
- package/dist/esm/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/GenericTableView-8c72ac30.js +1 -0
- package/dist/esm-es5/loader.js +1 -1
- package/dist/esm-es5/mint-components.js +1 -1
- package/dist/esm-es5/sqm-banking-info-form_10.entry.js +1 -1
- package/dist/esm-es5/sqm-big-stat_47.entry.js +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table_9.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-b1dcabb0.entry.js → p-05466678.entry.js} +1 -1
- package/dist/mint-components/{p-515262c7.system.entry.js → p-241e7226.system.entry.js} +1 -1
- package/dist/mint-components/{p-672070dc.entry.js → p-2a2332a6.entry.js} +1 -1
- package/dist/mint-components/{p-d9d9ae3c.entry.js → p-2e33148c.entry.js} +1 -1
- package/dist/mint-components/{p-1fb6c81b.system.entry.js → p-3784c92c.system.entry.js} +1 -1
- package/dist/mint-components/p-6c31a79b.system.entry.js +1 -0
- package/dist/mint-components/{p-32192739.entry.js → p-7c657e1f.entry.js} +1 -1
- package/dist/mint-components/{p-b9648151.system.entry.js → p-933bae53.system.entry.js} +1 -1
- package/dist/mint-components/p-b1eb2a6a.js +1 -0
- package/dist/mint-components/p-bfb00685.system.js +1 -1
- package/dist/mint-components/p-d5eb601d.system.js +1 -0
- package/dist/mint-components/{p-fa0146e5.entry.js → p-e2fb11af.entry.js} +1 -1
- package/dist/mint-components/{p-0b177618.system.entry.js → p-f7218609.system.entry.js} +1 -1
- package/dist/types/components/sqm-marketing-emails-checkbox/sqm-marketing-emails-checkbox.d.ts +4 -0
- package/dist/types/components.d.ts +8 -0
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +1 -1
- package/dist/esm-es5/GenericTableView-2555736c.js +0 -1
- package/dist/mint-components/p-471b9c1d.js +0 -1
- package/dist/mint-components/p-e8793c49.system.js +0 -1
- package/dist/mint-components/p-ede41e5e.system.entry.js +0 -1
|
@@ -6,9 +6,6 @@ export function GenericTableView(props) {
|
|
|
6
6
|
const { columns, rows } = elements;
|
|
7
7
|
const { show } = states;
|
|
8
8
|
const hiddenCols = data.hiddenColumns && data.hiddenColumns.split(",").map(Number);
|
|
9
|
-
// Non-string columns are the editor's raisins plop targets, so the header has to stay rendered for them
|
|
10
|
-
const hasDropZones = !!(columns === null || columns === void 0 ? void 0 : columns.some((column) => typeof column !== "string"));
|
|
11
|
-
const showLabels = data.textOverrides.showLabels;
|
|
12
9
|
const mobile = "@media (max-width: " + data.mdBreakpoint + "px)";
|
|
13
10
|
const tablet = `@media (min-width: ${Boolean(rows.length < 2) ? data.mdBreakpoint : data.smBreakpoint}px) and (max-width: ${data.mdBreakpoint}px)`;
|
|
14
11
|
// Due to mobile media queries being dependant on props, not feasiable to move out of render function
|
|
@@ -29,13 +26,6 @@ export function GenericTableView(props) {
|
|
|
29
26
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
30
27
|
overflowWrap: "anywhere",
|
|
31
28
|
},
|
|
32
|
-
"& th.collapsed": {
|
|
33
|
-
fontSize: "0",
|
|
34
|
-
padding: "14px 0",
|
|
35
|
-
},
|
|
36
|
-
"& th.drop-zone": {
|
|
37
|
-
width: "30px",
|
|
38
|
-
},
|
|
39
29
|
"& td": {
|
|
40
30
|
padding: "var(--sl-spacing-small)",
|
|
41
31
|
paddingLeft: "0",
|
|
@@ -43,35 +33,10 @@ export function GenericTableView(props) {
|
|
|
43
33
|
textOverflow: "ellipsis",
|
|
44
34
|
},
|
|
45
35
|
[mobile]: {
|
|
46
|
-
// Body rows become blocks here, so the header has to leave the table layout to stay full width
|
|
47
36
|
"& thead": {
|
|
48
|
-
display: hasDropZones ? "block" : "none",
|
|
49
|
-
},
|
|
50
|
-
// Columns read top-to-bottom inside a card, so the drop zones between them stack the same way
|
|
51
|
-
"& thead tr": {
|
|
52
|
-
display: "flex",
|
|
53
|
-
flexDirection: "column",
|
|
54
|
-
},
|
|
55
|
-
"& thead th.label": {
|
|
56
|
-
padding: "0",
|
|
57
|
-
lineHeight: "20px",
|
|
58
|
-
fontSize: "var(--sl-font-size-small)",
|
|
59
|
-
color: "var(--sl-color-neutral-500)",
|
|
60
|
-
},
|
|
61
|
-
"& thead th.drop-zone": {
|
|
62
|
-
width: "auto",
|
|
63
|
-
padding: "14px 0",
|
|
64
|
-
lineHeight: "0",
|
|
65
|
-
position: "relative",
|
|
66
|
-
},
|
|
67
|
-
// The plop target is inline-styled position:absolute, so it needs the cell as its containing block to span it
|
|
68
|
-
"& thead th.drop-zone slot::slotted(raisins-plop-target)": {
|
|
69
|
-
width: "100%",
|
|
70
|
-
},
|
|
71
|
-
"& tbody td.drop-zone": {
|
|
72
37
|
display: "none",
|
|
73
38
|
},
|
|
74
|
-
"&
|
|
39
|
+
"& tr": {
|
|
75
40
|
display: "block",
|
|
76
41
|
background: "inherit",
|
|
77
42
|
border: "var(--sqm-border-thickness, 1px) solid var(--sqm-border-color)",
|
|
@@ -128,11 +93,11 @@ export function GenericTableView(props) {
|
|
|
128
93
|
return (h("div", null,
|
|
129
94
|
h("style", { type: "text/css" }, styleString),
|
|
130
95
|
h("table", { class: sheet.classes.Table },
|
|
131
|
-
|
|
96
|
+
data.textOverrides.showLabels && (h("thead", null,
|
|
132
97
|
h("tr", null, columns === null || columns === void 0 ? void 0 : columns.map((column) => {
|
|
133
98
|
if (typeof column === "string")
|
|
134
|
-
return
|
|
135
|
-
return h("th", {
|
|
99
|
+
return h("th", null, column);
|
|
100
|
+
return h("th", { style: { width: "30px" } }, column);
|
|
136
101
|
})))),
|
|
137
102
|
h("tbody", null,
|
|
138
103
|
show === "loading" && elements.loadingElement,
|
|
@@ -143,7 +108,7 @@ export function GenericTableView(props) {
|
|
|
143
108
|
return typeof columns[j] === "string" ? (h("td", { class: (hiddenCols === null || hiddenCols === void 0 ? void 0 : hiddenCols.includes(j)) ? "hidden" : "", "data-label": columns[j] + ":", style: {
|
|
144
109
|
gridTemplateColumns: (hiddenCols === null || hiddenCols === void 0 ? void 0 : hiddenCols.includes(j)) ? "1fr"
|
|
145
110
|
: "0.5fr 0.5fr",
|
|
146
|
-
} }, cell)) : (h("td",
|
|
111
|
+
} }, cell)) : (h("td", null, cell));
|
|
147
112
|
})));
|
|
148
113
|
})))),
|
|
149
114
|
h("div", { class: sheet.classes.ButtonContainer, part: states.namespace + "-button-wrapper" },
|
|
@@ -7,9 +7,6 @@ function GenericTableView(props) {
|
|
|
7
7
|
const { columns, rows } = elements;
|
|
8
8
|
const { show } = states;
|
|
9
9
|
const hiddenCols = data.hiddenColumns && data.hiddenColumns.split(",").map(Number);
|
|
10
|
-
// Non-string columns are the editor's raisins plop targets, so the header has to stay rendered for them
|
|
11
|
-
const hasDropZones = !!(columns === null || columns === void 0 ? void 0 : columns.some((column) => typeof column !== "string"));
|
|
12
|
-
const showLabels = data.textOverrides.showLabels;
|
|
13
10
|
const mobile = "@media (max-width: " + data.mdBreakpoint + "px)";
|
|
14
11
|
const tablet = `@media (min-width: ${Boolean(rows.length < 2) ? data.mdBreakpoint : data.smBreakpoint}px) and (max-width: ${data.mdBreakpoint}px)`;
|
|
15
12
|
// Due to mobile media queries being dependant on props, not feasiable to move out of render function
|
|
@@ -30,13 +27,6 @@ function GenericTableView(props) {
|
|
|
30
27
|
fontWeight: "var(--sl-font-weight-semibold)",
|
|
31
28
|
overflowWrap: "anywhere",
|
|
32
29
|
},
|
|
33
|
-
"& th.collapsed": {
|
|
34
|
-
fontSize: "0",
|
|
35
|
-
padding: "14px 0",
|
|
36
|
-
},
|
|
37
|
-
"& th.drop-zone": {
|
|
38
|
-
width: "30px",
|
|
39
|
-
},
|
|
40
30
|
"& td": {
|
|
41
31
|
padding: "var(--sl-spacing-small)",
|
|
42
32
|
paddingLeft: "0",
|
|
@@ -44,35 +34,10 @@ function GenericTableView(props) {
|
|
|
44
34
|
textOverflow: "ellipsis",
|
|
45
35
|
},
|
|
46
36
|
[mobile]: {
|
|
47
|
-
// Body rows become blocks here, so the header has to leave the table layout to stay full width
|
|
48
37
|
"& thead": {
|
|
49
|
-
display: hasDropZones ? "block" : "none",
|
|
50
|
-
},
|
|
51
|
-
// Columns read top-to-bottom inside a card, so the drop zones between them stack the same way
|
|
52
|
-
"& thead tr": {
|
|
53
|
-
display: "flex",
|
|
54
|
-
flexDirection: "column",
|
|
55
|
-
},
|
|
56
|
-
"& thead th.label": {
|
|
57
|
-
padding: "0",
|
|
58
|
-
lineHeight: "20px",
|
|
59
|
-
fontSize: "var(--sl-font-size-small)",
|
|
60
|
-
color: "var(--sl-color-neutral-500)",
|
|
61
|
-
},
|
|
62
|
-
"& thead th.drop-zone": {
|
|
63
|
-
width: "auto",
|
|
64
|
-
padding: "14px 0",
|
|
65
|
-
lineHeight: "0",
|
|
66
|
-
position: "relative",
|
|
67
|
-
},
|
|
68
|
-
// The plop target is inline-styled position:absolute, so it needs the cell as its containing block to span it
|
|
69
|
-
"& thead th.drop-zone slot::slotted(raisins-plop-target)": {
|
|
70
|
-
width: "100%",
|
|
71
|
-
},
|
|
72
|
-
"& tbody td.drop-zone": {
|
|
73
38
|
display: "none",
|
|
74
39
|
},
|
|
75
|
-
"&
|
|
40
|
+
"& tr": {
|
|
76
41
|
display: "block",
|
|
77
42
|
background: "inherit",
|
|
78
43
|
border: "var(--sqm-border-thickness, 1px) solid var(--sqm-border-color)",
|
|
@@ -129,11 +94,11 @@ function GenericTableView(props) {
|
|
|
129
94
|
return (h("div", null,
|
|
130
95
|
h("style", { type: "text/css" }, styleString),
|
|
131
96
|
h("table", { class: sheet.classes.Table },
|
|
132
|
-
|
|
97
|
+
data.textOverrides.showLabels && (h("thead", null,
|
|
133
98
|
h("tr", null, columns === null || columns === void 0 ? void 0 : columns.map((column) => {
|
|
134
99
|
if (typeof column === "string")
|
|
135
|
-
return
|
|
136
|
-
return h("th", {
|
|
100
|
+
return h("th", null, column);
|
|
101
|
+
return h("th", { style: { width: "30px" } }, column);
|
|
137
102
|
})))),
|
|
138
103
|
h("tbody", null,
|
|
139
104
|
show === "loading" && elements.loadingElement,
|
|
@@ -144,7 +109,7 @@ function GenericTableView(props) {
|
|
|
144
109
|
return typeof columns[j] === "string" ? (h("td", { class: (hiddenCols === null || hiddenCols === void 0 ? void 0 : hiddenCols.includes(j)) ? "hidden" : "", "data-label": columns[j] + ":", style: {
|
|
145
110
|
gridTemplateColumns: (hiddenCols === null || hiddenCols === void 0 ? void 0 : hiddenCols.includes(j)) ? "1fr"
|
|
146
111
|
: "0.5fr 0.5fr",
|
|
147
|
-
} }, cell)) : (h("td",
|
|
112
|
+
} }, cell)) : (h("td", null, cell));
|
|
148
113
|
})));
|
|
149
114
|
})))),
|
|
150
115
|
h("div", { class: sheet.classes.ButtonContainer, part: states.namespace + "-button-wrapper" },
|