@saasquatch/mint-components 2.1.10-0 → 2.1.10-1
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/{ShadowViewAddon-a26deae6.js → ShadowViewAddon-c97e80de.js} +422 -19
- 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 -27
- package/dist/cjs/sqm-big-stat_45.cjs.entry.js +264 -36
- package/dist/cjs/sqm-code-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-email-verification.cjs.entry.js +1 -1
- package/dist/cjs/sqm-empty_4.cjs.entry.js +1 -1
- package/dist/cjs/{sqm-portal-container-view-70a47420.js → sqm-portal-container-view-757f921b.js} +5 -6
- package/dist/cjs/{sqm-portal-email-verification-view-c81fe7f1.js → sqm-portal-email-verification-view-abb773a7.js} +1 -1
- package/dist/cjs/sqm-portal-email-verification.cjs.entry.js +2 -2
- package/dist/cjs/sqm-portal-forgot-password_6.cjs.entry.js +5 -5
- package/dist/cjs/{sqm-portal-profile-view-639337e3.js → sqm-portal-profile-view-3515e1e5.js} +1 -1
- package/dist/cjs/sqm-portal-profile.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-registration-form-view-020f661c.js → sqm-portal-registration-form-view-a45f7a52.js} +1 -1
- package/dist/cjs/{sqm-portal-reset-password-view-6b1acd90.js → sqm-portal-reset-password-view-a767b044.js} +1 -1
- package/dist/cjs/sqm-portal-reset-password.cjs.entry.js +2 -2
- package/dist/cjs/{sqm-portal-verify-email-view-424e406a.js → sqm-portal-verify-email-view-717d0633.js} +1 -1
- package/dist/cjs/sqm-referral-table_11.cjs.entry.js +1 -1
- package/dist/cjs/sqm-rewards-table-customer-note-cell.cjs.entry.js +1 -1
- package/dist/cjs/sqm-stencilbook.cjs.entry.js +168 -25
- package/dist/cjs/{sqm-text-span-view-f274fdf2.js → sqm-text-span-view-b9e10f5d.js} +1 -1
- package/dist/cjs/sqm-text-span.cjs.entry.js +1 -1
- package/dist/collection/components/sqm-password-field/sqm-password-field.js +1 -0
- package/dist/collection/components/sqm-portal-container/sqm-portal-container-view.js +6 -7
- package/dist/collection/components/sqm-portal-google-login/sqm-portal-google-login.js +1 -1
- package/dist/collection/components/sqm-portal-login/sqm-portal-login.js +1 -1
- package/dist/collection/components/sqm-share-code/sqm-share-code.js +0 -1
- package/dist/collection/components/sqm-share-link/ShareLink.stories.js +136 -11
- package/dist/collection/components/sqm-share-link/UseShareLink.stories.js +14 -5
- package/dist/collection/components/sqm-share-link/sqm-share-link-view.js +192 -0
- package/dist/collection/components/sqm-share-link/sqm-share-link.js +935 -48
- package/dist/collection/components/sqm-share-link/useShareLink.js +227 -14
- package/dist/collection/components/sqm-text-span/sqm-text-span-view.js +1 -1
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/formDefinitions.js +1 -19
- package/dist/collection/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.js +0 -50
- package/dist/collection/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.js +1 -59
- package/dist/esm/{ShadowViewAddon-47f1e579.js → ShadowViewAddon-33f1a8f7.js} +424 -22
- 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 -27
- package/dist/esm/sqm-big-stat_45.entry.js +264 -36
- package/dist/esm/sqm-code-verification.entry.js +1 -1
- package/dist/esm/sqm-email-verification.entry.js +1 -1
- package/dist/esm/sqm-empty_4.entry.js +1 -1
- package/dist/esm/{sqm-portal-container-view-a8c708cd.js → sqm-portal-container-view-200c9df8.js} +6 -7
- package/dist/esm/{sqm-portal-email-verification-view-426370f1.js → sqm-portal-email-verification-view-04528277.js} +1 -1
- package/dist/esm/sqm-portal-email-verification.entry.js +2 -2
- package/dist/esm/sqm-portal-forgot-password_6.entry.js +5 -5
- package/dist/esm/{sqm-portal-profile-view-f015fd6a.js → sqm-portal-profile-view-b5ea620f.js} +1 -1
- package/dist/esm/sqm-portal-profile.entry.js +2 -2
- package/dist/esm/{sqm-portal-registration-form-view-2f4936ef.js → sqm-portal-registration-form-view-79265df5.js} +1 -1
- package/dist/esm/{sqm-portal-reset-password-view-cfbc0eb0.js → sqm-portal-reset-password-view-f84c04cf.js} +1 -1
- package/dist/esm/sqm-portal-reset-password.entry.js +2 -2
- package/dist/esm/{sqm-portal-verify-email-view-1a638fae.js → sqm-portal-verify-email-view-c61536b7.js} +1 -1
- package/dist/esm/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm/sqm-rewards-table-customer-note-cell.entry.js +1 -1
- package/dist/esm/sqm-stencilbook.entry.js +168 -25
- package/dist/esm/{sqm-text-span-view-738acfb3.js → sqm-text-span-view-72f43dff.js} +1 -1
- package/dist/esm/sqm-text-span.entry.js +1 -1
- package/dist/esm-es5/ShadowViewAddon-33f1a8f7.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_45.entry.js +1 -1
- package/dist/esm-es5/sqm-code-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-empty_4.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-container-view-200c9df8.js +1 -0
- package/dist/esm-es5/{sqm-portal-email-verification-view-426370f1.js → sqm-portal-email-verification-view-04528277.js} +1 -1
- package/dist/esm-es5/sqm-portal-email-verification.entry.js +1 -1
- package/dist/esm-es5/sqm-portal-forgot-password_6.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-profile-view-f015fd6a.js → sqm-portal-profile-view-b5ea620f.js} +1 -1
- package/dist/esm-es5/sqm-portal-profile.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-registration-form-view-2f4936ef.js → sqm-portal-registration-form-view-79265df5.js} +1 -1
- package/dist/esm-es5/{sqm-portal-reset-password-view-cfbc0eb0.js → sqm-portal-reset-password-view-f84c04cf.js} +1 -1
- package/dist/esm-es5/sqm-portal-reset-password.entry.js +1 -1
- package/dist/esm-es5/{sqm-portal-verify-email-view-1a638fae.js → sqm-portal-verify-email-view-c61536b7.js} +1 -1
- package/dist/esm-es5/sqm-referral-table_11.entry.js +1 -1
- package/dist/esm-es5/sqm-rewards-table-customer-note-cell.entry.js +1 -1
- package/dist/esm-es5/sqm-stencilbook.entry.js +1 -1
- package/dist/esm-es5/{sqm-text-span-view-738acfb3.js → sqm-text-span-view-72f43dff.js} +1 -1
- package/dist/esm-es5/sqm-text-span.entry.js +1 -1
- package/dist/mint-components/mint-components.esm.js +1 -1
- package/dist/mint-components/{p-ab0ea688.system.entry.js → p-00b235c5.system.entry.js} +1 -1
- package/dist/mint-components/p-08930b83.js +499 -0
- package/dist/mint-components/p-0b1e90fe.system.js +1 -0
- package/dist/mint-components/p-1021a49f.system.entry.js +1 -0
- package/dist/mint-components/{p-25558a33.entry.js → p-13292317.entry.js} +1 -1
- package/dist/mint-components/{p-d65991d0.entry.js → p-13d1b10d.entry.js} +1 -1
- package/dist/mint-components/{p-d4570314.entry.js → p-1d92c169.entry.js} +1 -1
- package/dist/mint-components/{p-7161e1a6.js → p-2668335b.js} +1 -1
- package/dist/mint-components/{p-6e512063.entry.js → p-3af3e2c1.entry.js} +1 -1
- package/dist/mint-components/{p-5ff7b000.entry.js → p-40bad95a.entry.js} +1 -1
- package/dist/mint-components/{p-f35d856a.system.js → p-43c31fd5.system.js} +1 -1
- package/dist/mint-components/p-5492dd51.system.entry.js +1 -0
- package/dist/mint-components/p-5bc5c61e.entry.js +1 -0
- package/dist/mint-components/{p-dac20392.system.js → p-686dd5eb.system.js} +1 -1
- package/dist/mint-components/{p-7b909aa5.system.js → p-7562cd98.system.js} +1 -1
- package/dist/mint-components/p-76271ec4.entry.js +9 -0
- package/dist/mint-components/p-78b40f71.system.js +1 -0
- package/dist/mint-components/{p-cb0a5990.entry.js → p-7939e4af.entry.js} +1 -1
- package/dist/mint-components/{p-e6ace3ab.js → p-832aea99.js} +1 -1
- package/dist/mint-components/{p-6640bbd6.entry.js → p-8784539d.entry.js} +21 -21
- package/dist/mint-components/{p-b9f57e84.system.entry.js → p-8899ff38.system.entry.js} +1 -1
- package/dist/mint-components/{p-fbe00c97.system.entry.js → p-892797eb.system.entry.js} +1 -1
- package/dist/mint-components/{p-d997001a.js → p-8962e023.js} +1 -1
- package/dist/mint-components/{p-dd368927.system.entry.js → p-9390586b.system.entry.js} +1 -1
- package/dist/mint-components/{p-3c46b4dd.system.js → p-a4825ec2.system.js} +1 -1
- package/dist/mint-components/{p-058aefe1.entry.js → p-af407cce.entry.js} +1 -1
- package/dist/mint-components/{p-56ca7e3c.js → p-b3ad957c.js} +1 -1
- package/dist/mint-components/{p-70570e4d.system.entry.js → p-b96e90a2.system.entry.js} +1 -1
- package/dist/mint-components/{p-c67f8558.system.entry.js → p-bba16a46.system.entry.js} +1 -1
- package/dist/mint-components/{p-669d52c4.js → p-bee4af5d.js} +1 -1
- package/dist/mint-components/p-c3c8d4ee.system.entry.js +1 -0
- package/dist/mint-components/{p-cabf6326.js → p-c813ec64.js} +1 -1
- package/dist/mint-components/p-ca098be1.system.js +1 -1
- package/dist/mint-components/{p-18133026.system.entry.js → p-d3b1ab20.system.entry.js} +1 -1
- package/dist/mint-components/{p-3687d433.entry.js → p-d4f332a7.entry.js} +1 -1
- package/dist/mint-components/{p-692e14c5.system.js → p-d55c50af.system.js} +1 -1
- package/dist/mint-components/p-dd12c32a.system.entry.js +1 -0
- package/dist/mint-components/p-e30abc44.js +1 -0
- package/dist/mint-components/{p-fb5c9802.entry.js → p-e506bf7f.entry.js} +1 -1
- package/dist/mint-components/{p-aefc6c4f.system.entry.js → p-e9485160.system.entry.js} +1 -1
- package/dist/mint-components/{p-f0baeed0.entry.js → p-f6528f8a.entry.js} +1 -1
- package/dist/mint-components/{p-5141769d.system.entry.js → p-f7ca4cc4.system.entry.js} +1 -1
- package/dist/mint-components/{p-e4f17c21.system.js → p-f8026ed6.system.js} +1 -1
- package/dist/types/components/sqm-share-link/ShareLink.stories.d.ts +9 -0
- package/dist/types/components/sqm-share-link/UseShareLink.stories.d.ts +6 -0
- package/dist/types/components/sqm-share-link/sqm-share-link-view.d.ts +41 -0
- package/dist/types/components/sqm-share-link/sqm-share-link.d.ts +195 -2
- package/dist/types/components/sqm-share-link/useShareLink.d.ts +33 -4
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/formDefinitions.d.ts +0 -6
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/sqm-banking-info-form.d.ts +0 -8
- package/dist/types/components/tax-and-cash/sqm-banking-info-form/useBankingInfoForm.d.ts +0 -2
- package/dist/types/components/tax-and-cash/sqm-tax-and-cash/sqm-tax-and-cash.d.ts +0 -10
- package/dist/types/components.d.ts +349 -38
- package/docs/docs.docx +0 -0
- package/docs/raisins.json +1 -1
- package/grapesjs/grapesjs.js +1 -1
- package/package.json +2 -2
- package/dist/esm-es5/ShadowViewAddon-47f1e579.js +0 -1
- package/dist/esm-es5/sqm-portal-container-view-a8c708cd.js +0 -1
- package/dist/mint-components/p-0614dcbc.entry.js +0 -9
- package/dist/mint-components/p-217dedde.js +0 -463
- package/dist/mint-components/p-55676213.entry.js +0 -1
- package/dist/mint-components/p-57ac2160.system.entry.js +0 -1
- package/dist/mint-components/p-abc28aeb.system.entry.js +0 -1
- package/dist/mint-components/p-b699f76e.system.js +0 -1
- package/dist/mint-components/p-b6a1e2ac.js +0 -1
- package/dist/mint-components/p-bf545082.system.entry.js +0 -1
- package/dist/mint-components/p-ce050888.system.js +0 -1
- package/dist/mint-components/p-e3497e0e.system.entry.js +0 -1
- package/dist/types/global/android.d.ts +0 -7
- package/dist/types/global/demo.d.ts +0 -2
- package/dist/types/stories/features.d.ts +0 -4
- package/dist/types/stories/templates.d.ts +0 -4
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
import { h } from "@stencil/core";
|
|
2
|
+
import { intl } from "../../global/global";
|
|
3
|
+
import { createStyleSheet } from "../../styling/JSS";
|
|
4
|
+
import { CopyTextView } from "../views/copy-text-view";
|
|
5
|
+
const vanillaStyle = `
|
|
6
|
+
:host {
|
|
7
|
+
display: block;
|
|
8
|
+
width: 100%;
|
|
9
|
+
}
|
|
10
|
+
`;
|
|
11
|
+
export function ShareLinkView(props) {
|
|
12
|
+
const { copyTextViewProps, allowCustomization, customizeLinkLabel, saveLabelText, savingLabelText, cancelLabelText, editLabelText, charactersRemainingText, validatingLabelText, isEditing, editValue, domainPrefix, editsRemaining, limitReached, validationError, isValidating, isSaving, characterLimit, minCharacters, charactersRemaining, editLimitText, editLimitReachedText, supportLinkText, customizeDisabled, customizeDisabledTooltip, onCustomizeClick, onEditValueChange, onSave, onCancel, minCharactersText, } = props;
|
|
13
|
+
const style = {
|
|
14
|
+
Container: {
|
|
15
|
+
display: "flex",
|
|
16
|
+
flexDirection: "column",
|
|
17
|
+
gap: "var(--sl-spacing-xx-small)",
|
|
18
|
+
width: "100%",
|
|
19
|
+
},
|
|
20
|
+
CustomizeLinkText: {
|
|
21
|
+
paddingTop: "var(--sl-spacing-xx-small)",
|
|
22
|
+
margin: "0",
|
|
23
|
+
fontSize: "var(--sl-font-size-small)",
|
|
24
|
+
fontWeight: "600",
|
|
25
|
+
cursor: "pointer",
|
|
26
|
+
color: "var(--sl-color-neutral-900)",
|
|
27
|
+
textAlign: "left",
|
|
28
|
+
"&:hover": {
|
|
29
|
+
textDecoration: "underline",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
CustomizeLinkDisabled: {
|
|
33
|
+
paddingTop: "var(--sl-spacing-xx-small)",
|
|
34
|
+
margin: "0",
|
|
35
|
+
fontSize: "var(--sl-font-size-small)",
|
|
36
|
+
fontWeight: "600",
|
|
37
|
+
color: "var(--sl-color-neutral-400)",
|
|
38
|
+
cursor: "default",
|
|
39
|
+
textAlign: "left",
|
|
40
|
+
},
|
|
41
|
+
EditContainer: {
|
|
42
|
+
display: "flex",
|
|
43
|
+
flexDirection: "column",
|
|
44
|
+
gap: "var(--sl-spacing-x-small)",
|
|
45
|
+
width: "100%",
|
|
46
|
+
},
|
|
47
|
+
EditInputWrapper: {
|
|
48
|
+
display: "flex",
|
|
49
|
+
alignItems: "center",
|
|
50
|
+
width: "100%",
|
|
51
|
+
border: "var(--sqm-border-thickness, 1px) solid var(--sqm-input-border-color, #d1d5db)",
|
|
52
|
+
borderRadius: "var(--sqm-border-radius-normal, 4px)",
|
|
53
|
+
background: "var(--sqm-input-background, #fff)",
|
|
54
|
+
overflow: "hidden",
|
|
55
|
+
"&:focus-within": {
|
|
56
|
+
borderColor: "#999999",
|
|
57
|
+
boxShadow: "0 0 0 var(--sl-focus-ring-width) var(--sl-input-focus-ring-color)",
|
|
58
|
+
},
|
|
59
|
+
},
|
|
60
|
+
DomainPrefix: {
|
|
61
|
+
padding: "0 0 0 var(--sl-spacing-medium)",
|
|
62
|
+
fontSize: "var(--sl-font-size-medium)",
|
|
63
|
+
color: "var(--sl-color-neutral-500)",
|
|
64
|
+
whiteSpace: "nowrap",
|
|
65
|
+
userSelect: "none",
|
|
66
|
+
lineHeight: "var(--sl-input-height-medium)",
|
|
67
|
+
},
|
|
68
|
+
EditInput: {
|
|
69
|
+
"&::part(base)": {
|
|
70
|
+
border: "none",
|
|
71
|
+
borderRadius: "0",
|
|
72
|
+
},
|
|
73
|
+
"&::part(input)": {
|
|
74
|
+
margin: 0,
|
|
75
|
+
},
|
|
76
|
+
},
|
|
77
|
+
EditLabel: {
|
|
78
|
+
margin: "0",
|
|
79
|
+
fontSize: "var(--sl-font-size-small)",
|
|
80
|
+
color: "var(--sl-color-neutral-500)",
|
|
81
|
+
},
|
|
82
|
+
HelperText: {
|
|
83
|
+
paddingTop: "var(--sl-spacing-xx-small)",
|
|
84
|
+
margin: "0",
|
|
85
|
+
fontSize: "var(--sl-font-size-small)",
|
|
86
|
+
color: "var(--sl-color-neutral-500)",
|
|
87
|
+
},
|
|
88
|
+
ErrorText: {
|
|
89
|
+
margin: "0",
|
|
90
|
+
fontSize: "var(--sl-font-size-small)",
|
|
91
|
+
color: "var(--sqm-danger-color-text, #dc2626)",
|
|
92
|
+
},
|
|
93
|
+
ActionRow: {
|
|
94
|
+
display: "flex",
|
|
95
|
+
gap: "var(--sl-spacing-medium)",
|
|
96
|
+
alignItems: "center",
|
|
97
|
+
},
|
|
98
|
+
SaveButton: {
|
|
99
|
+
cursor: "pointer",
|
|
100
|
+
fontFamily: "var(--sl-font-sans)",
|
|
101
|
+
fontSize: "var(--sl-font-size-small)",
|
|
102
|
+
fontWeight: "600",
|
|
103
|
+
padding: "var(--sl-spacing-x-small) var(--sl-spacing-medium)",
|
|
104
|
+
borderRadius: "var(--sqm-border-radius-normal, 4px)",
|
|
105
|
+
border: "1px solid var(--sl-color-neutral-900)",
|
|
106
|
+
background: "var(--sl-color-neutral-900)",
|
|
107
|
+
color: "#fff",
|
|
108
|
+
"&:disabled": {
|
|
109
|
+
opacity: "0.5",
|
|
110
|
+
cursor: "default",
|
|
111
|
+
},
|
|
112
|
+
},
|
|
113
|
+
CancelButton: {
|
|
114
|
+
margin: "0",
|
|
115
|
+
fontSize: "var(--sl-font-size-small)",
|
|
116
|
+
fontWeight: "600",
|
|
117
|
+
cursor: "pointer",
|
|
118
|
+
background: "none",
|
|
119
|
+
border: "none",
|
|
120
|
+
fontFamily: "var(--sl-font-sans)",
|
|
121
|
+
color: "var(--sl-color-neutral-500)",
|
|
122
|
+
"&::part(label)": {
|
|
123
|
+
padding: "0",
|
|
124
|
+
},
|
|
125
|
+
},
|
|
126
|
+
LimitReachedContainer: {
|
|
127
|
+
display: "flex",
|
|
128
|
+
alignItems: "center",
|
|
129
|
+
gap: "var(--sl-spacing-x-small)",
|
|
130
|
+
},
|
|
131
|
+
};
|
|
132
|
+
const sheet = createStyleSheet(style);
|
|
133
|
+
const styleString = sheet.toString();
|
|
134
|
+
const errorMessageType = (validationError === null || validationError === void 0 ? void 0 : validationError.code) === "EXISTING_CODE_CONFLICT" ? "info" : "warning";
|
|
135
|
+
const showCharactersRemaining = charactersRemaining <= 14;
|
|
136
|
+
const editLimitMessage = intl.formatMessage({
|
|
137
|
+
id: "editLimitText",
|
|
138
|
+
defaultMessage: editLimitText,
|
|
139
|
+
}, { editsRemaining });
|
|
140
|
+
// Editing state
|
|
141
|
+
if (isEditing) {
|
|
142
|
+
return (h("div", { class: sheet.classes.Container },
|
|
143
|
+
h("style", { type: "text/css" },
|
|
144
|
+
styleString,
|
|
145
|
+
vanillaStyle),
|
|
146
|
+
h("p", { class: sheet.classes.EditLabel }, editLabelText),
|
|
147
|
+
h("div", { class: sheet.classes.EditInputWrapper },
|
|
148
|
+
h("span", { class: sheet.classes.DomainPrefix }, domainPrefix),
|
|
149
|
+
h("sl-input", { class: sheet.classes.EditInput, type: "text", value: editValue, onInput: (e) => onEditValueChange(e.target.value), onKeyDown: (e) => {
|
|
150
|
+
if (e.key === "/" || e.key === "@")
|
|
151
|
+
e.preventDefault();
|
|
152
|
+
}, disabled: isSaving, maxLength: characterLimit })),
|
|
153
|
+
h("p", { class: sheet.classes.HelperText },
|
|
154
|
+
editLimitMessage,
|
|
155
|
+
" ",
|
|
156
|
+
charactersRemaining > 12 && minCharactersText,
|
|
157
|
+
showCharactersRemaining &&
|
|
158
|
+
` ${intl.formatMessage({
|
|
159
|
+
id: "charactersRemainingText",
|
|
160
|
+
defaultMessage: charactersRemainingText,
|
|
161
|
+
}, { charactersRemaining })}`),
|
|
162
|
+
validationError && (h("sqm-form-message", { type: errorMessageType, style: { paddingBottom: "var(--sl-spacing-xx-small)" } },
|
|
163
|
+
h("p", { part: "alert-title" }, validationError.title),
|
|
164
|
+
validationError.description)),
|
|
165
|
+
isValidating && (h("p", { class: sheet.classes.HelperText }, validatingLabelText)),
|
|
166
|
+
h("div", { class: sheet.classes.ActionRow },
|
|
167
|
+
h("button", { class: sheet.classes.SaveButton, onClick: onSave, disabled: isSaving ||
|
|
168
|
+
isValidating ||
|
|
169
|
+
!!validationError ||
|
|
170
|
+
!editValue ||
|
|
171
|
+
editValue.length < minCharacters }, isSaving ? savingLabelText : saveLabelText),
|
|
172
|
+
h("sl-button", { type: "text", class: sheet.classes.CancelButton, onClick: onCancel, disabled: isSaving }, cancelLabelText))));
|
|
173
|
+
}
|
|
174
|
+
// Default / Customized / Limit reached states
|
|
175
|
+
return (h("div", { class: sheet.classes.Container },
|
|
176
|
+
h("style", { type: "text/css" },
|
|
177
|
+
styleString,
|
|
178
|
+
vanillaStyle),
|
|
179
|
+
h(CopyTextView, Object.assign({}, copyTextViewProps)),
|
|
180
|
+
allowCustomization &&
|
|
181
|
+
(customizeDisabled ? (h("sl-tooltip", { content: customizeDisabledTooltip, placement: "top", style: { display: "inline-block", width: "fit-content" } },
|
|
182
|
+
h("p", { class: sheet.classes.CustomizeLinkDisabled }, customizeLinkLabel))) : (h("div", { class: sheet.classes.LimitReachedContainer },
|
|
183
|
+
h("p", { class: limitReached
|
|
184
|
+
? sheet.classes.CustomizeLinkDisabled
|
|
185
|
+
: sheet.classes.CustomizeLinkText, onClick: limitReached ? undefined : onCustomizeClick }, customizeLinkLabel),
|
|
186
|
+
allowCustomization && limitReached && (h("p", { class: sheet.classes.HelperText }, intl.formatMessage({
|
|
187
|
+
id: "editLimitReached",
|
|
188
|
+
defaultMessage: editLimitReachedText,
|
|
189
|
+
}, {
|
|
190
|
+
supportLink: (h("a", { target: "_blank", href: "https://help.impact.com/other/readme/get-help-and-support" }, supportLinkText)),
|
|
191
|
+
}))))))));
|
|
192
|
+
}
|