@genexus/genexus-ide-ui 1.1.55 → 1.1.56

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.
@@ -0,0 +1,234 @@
1
+ import { r as t, g as e, h as s, H as i, a as o } from "./p-97107ecc.js";
2
+
3
+ import { L as n } from "./p-311eedf3.js";
4
+
5
+ import { v as a } from "./p-b32b6b1f.js";
6
+
7
+ import { c } from "./p-9a03ac9f.js";
8
+
9
+ const r = ":host{display:grid;block-size:100%;grid-template-rows:1fr max-content}.field-group{grid-auto-rows:max-content}.main{overflow:auto}.section{display:contents}.tooltip{position:absolute}";
10
+
11
+ var l = undefined && undefined.__classPrivateFieldGet || function(t, e, s, i) {
12
+ if (s === "a" && !i) throw new TypeError("Private accessor was defined without a getter");
13
+ if (typeof e === "function" ? t !== e || !i : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
+ return s === "m" ? i : s === "a" ? i.call(t) : i ? i.value : e.get(t);
15
+ };
16
+
17
+ var h = undefined && undefined.__classPrivateFieldSet || function(t, e, s, i, o) {
18
+ if (i === "m") throw new TypeError("Private method is not writable");
19
+ if (i === "a" && !o) throw new TypeError("Private accessor was defined without a setter");
20
+ if (typeof e === "function" ? t !== e || !o : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
21
+ return i === "a" ? o.call(t, s) : o ? o.value = s : e.set(t, s), s;
22
+ };
23
+
24
+ var d, f, u, p, v, w, b, m, k, y;
25
+
26
+ const g = [ "resets/box-sizing", "utils/form", "utils/spacing", "utils/layout", "chameleon/scrollbar", "components/checkbox", "components/button", "components/edit", "components/tooltip" ];
27
+
28
+ // ch-checkbox
29
+ const x = "on";
30
+
31
+ const M = "set-new-version-as-active";
32
+
33
+ const W = "create-linked-local-version";
34
+
35
+ const V = "create-as-protected-version";
36
+
37
+ const I = class {
38
+ constructor(i) {
39
+ t(this, i);
40
+ /**
41
+ * The component hard-coded strings translations.
42
+ */
43
+ // eslint-disable-next-line @stencil-community/own-props-must-be-private
44
+ d.set(this, void 0);
45
+ f.set(this, void 0);
46
+ u.set(this, e(`./gx-ide-assets/new-version/shortcuts.json`));
47
+ p.set(this, (t => {
48
+ const e = t.target;
49
+ if (e.id === M) {
50
+ this.setNewVersionAsActive = t.detail === x;
51
+ } else if (e.id === W) {
52
+ this.createLinkedLocalVersion = t.detail === x;
53
+ } else if (e.id === V) {
54
+ this.createAsProtectedVersion = t.detail === x;
55
+ }
56
+ }));
57
+ v.set(this, (t => {
58
+ this.versionName = t.detail;
59
+ if (!this.versionDescriptionEdited) {
60
+ this.versionDescription = t.detail;
61
+ }
62
+ }));
63
+ w.set(this, (t => {
64
+ this.versionDescription = t.detail;
65
+ if (this.versionDescription === "") {
66
+ this.versionDescriptionEdited = false;
67
+ this.versionDescription = this.versionName;
68
+ } else {
69
+ this.versionDescriptionEdited = true;
70
+ }
71
+ }));
72
+ b.set(this, (async () => {
73
+ this.cancelCallback();
74
+ }));
75
+ m.set(this, (async () => {
76
+ const t = {
77
+ versionName: this.versionName,
78
+ versionDescription: this.versionDescription,
79
+ setNewVersionAsActive: this.setNewVersionAsActive,
80
+ createLocalLinkedVersion: this.createLinkedLocalVersion,
81
+ createProtectedVersion: this.createAsProtectedVersion
82
+ };
83
+ const e = await this.createCallback(t);
84
+ this.validatableControls = a(e, this.validatableControls);
85
+ }));
86
+ k.set(this, (() => {
87
+ // populate validatableControls with the controls that could have errors.
88
+ const t = [ l(this, f, "f") ];
89
+ t.forEach((t => {
90
+ if (t.id) {
91
+ this.validatableControls.set(t.id, {
92
+ reference: t,
93
+ hasError: false,
94
+ message: undefined
95
+ });
96
+ }
97
+ }));
98
+ }));
99
+ // TODO: evaluate if this should be a global helper function.
100
+ // It is used on other dialogs as well.
101
+ y.set(this, (t => {
102
+ var e, i, o;
103
+ return ((i = (e = this.validatableControls) === null || e === void 0 ? void 0 : e.get(t === null || t === void 0 ? void 0 : t.id)) === null || i === void 0 ? void 0 : i.hasError) && ((o = this.validatableControls.get(t.id)) === null || o === void 0 ? void 0 : o.message) && s("ch-tooltip", {
104
+ class: "tooltip",
105
+ actionElement: t,
106
+ blockAlign: c.tooltipSettings.blockAlign,
107
+ inlineAlign: c.tooltipSettings.inlineAlign,
108
+ delay: c.tooltipSettings.delay
109
+ }, this.validatableControls.get(t.id).message);
110
+ }));
111
+ this.versionName = undefined;
112
+ this.versionDescription = undefined;
113
+ this.versionDescriptionEdited = false;
114
+ this.setNewVersionAsActive = false;
115
+ this.createLinkedLocalVersion = false;
116
+ this.createAsProtectedVersion = false;
117
+ this.validatableControls = new Map;
118
+ this.isRemoteOperation = false;
119
+ this.isFreezeOperation = false;
120
+ this.showLinkedLocalVersionCheckbox = false;
121
+ this.cancelCallback = undefined;
122
+ this.createCallback = undefined;
123
+ this.defaultInputValues = undefined;
124
+ }
125
+ defaultInputValuesChanged(t) {
126
+ this.versionName = t === null || t === void 0 ? void 0 : t.versionName;
127
+ this.versionDescription = t === null || t === void 0 ? void 0 : t.versionDescription;
128
+ }
129
+ async componentWillLoad() {
130
+ h(this, d, await n.getComponentStrings(this.el), "f");
131
+ this.defaultInputValuesChanged(this.defaultInputValues);
132
+ }
133
+ componentDidLoad() {
134
+ l(this, k, "f").call(this);
135
+ }
136
+ render() {
137
+ const t = !this.versionName || this.versionName.length === 0;
138
+ return s(i, {
139
+ class: "widget"
140
+ }, s("ch-theme", {
141
+ model: g
142
+ }), s("ch-shortcuts", {
143
+ src: l(this, u, "f")
144
+ }), s("section", {
145
+ class: "section"
146
+ }, s("div", {
147
+ class: "main scrollable field-group spacing-body"
148
+ }, s("div", {
149
+ class: "field field-block"
150
+ }, s("label", {
151
+ class: "label",
152
+ htmlFor: "version-name"
153
+ }, l(this, d, "f").labels.name), s("ch-edit", {
154
+ type: "text",
155
+ id: "version-name",
156
+ class: "input",
157
+ placeholder: l(this, d, "f").placeHolders.name,
158
+ value: this.versionName,
159
+ onInput: l(this, v, "f"),
160
+ ref: t => h(this, f, t, "f"),
161
+ autoFocus: true
162
+ }), l(this, y, "f").call(this, l(this, f, "f"))), s("div", {
163
+ class: "field field-block"
164
+ }, s("label", {
165
+ class: "label",
166
+ htmlFor: "version-description"
167
+ }, l(this, d, "f").labels.description), s("ch-edit", {
168
+ type: "text",
169
+ id: "version-description",
170
+ class: "input",
171
+ placeholder: l(this, d, "f").placeHolders.description,
172
+ value: this.versionDescription,
173
+ onInput: l(this, w, "f")
174
+ })), !this.isRemoteOperation ? s("div", {
175
+ class: "field field-inline"
176
+ }, s("ch-checkbox", {
177
+ class: "checkbox",
178
+ id: "set-new-version-as-active",
179
+ checkedValue: x,
180
+ onInput: l(this, p, "f"),
181
+ caption: l(this, d, "f").labels.setActive
182
+ })) : s("div", {
183
+ class: "layout layout--cols-2"
184
+ }, this.showLinkedLocalVersionCheckbox && s("div", {
185
+ class: "layout__panel"
186
+ }, s("ch-checkbox", {
187
+ class: "checkbox",
188
+ id: "create-linked-local-version",
189
+ checkedValue: x,
190
+ onInput: l(this, p, "f"),
191
+ caption: l(this, d, "f").labels.createLinkedLocalVersion
192
+ })), !this.isFreezeOperation && s("div", {
193
+ class: "layout__panel"
194
+ }, s("ch-checkbox", {
195
+ class: "checkbox",
196
+ id: "create-as-protected-version",
197
+ checkedValue: x,
198
+ onInput: l(this, p, "f"),
199
+ caption: l(this, d, "f").labels.createAsProtectedVersion
200
+ })))), s("footer", {
201
+ class: "control-footer-with-border spacing-body"
202
+ }, s("div", {
203
+ class: "buttons-spacer"
204
+ }, s("button", {
205
+ id: "cancel-button",
206
+ class: "button-secondary",
207
+ onClick: l(this, b, "f")
208
+ }, l(this, d, "f").buttons.cancel), s("button", {
209
+ id: "create-button",
210
+ class: "button-primary",
211
+ onClick: l(this, m, "f"),
212
+ disabled: t
213
+ }, l(this, d, "f").buttons.create)))));
214
+ }
215
+ static get assetsDirs() {
216
+ return [ "gx-ide-assets/new-version" ];
217
+ }
218
+ get el() {
219
+ return o(this);
220
+ }
221
+ static get watchers() {
222
+ return {
223
+ defaultInputValues: [ "defaultInputValuesChanged" ]
224
+ };
225
+ }
226
+ };
227
+
228
+ d = new WeakMap, f = new WeakMap, u = new WeakMap, p = new WeakMap, v = new WeakMap,
229
+ w = new WeakMap, b = new WeakMap, m = new WeakMap, k = new WeakMap, y = new WeakMap;
230
+
231
+ I.style = r;
232
+
233
+ export { I as gx_ide_new_version };
234
+ //# sourceMappingURL=p-3c14bdfc.entry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["newVersionCss","CSS_BUNDLES","CHECKED_VALUE","SET_NEW_VERSION_AS_ACTIVE_ID","CREATE_LINKED_LOCAL_VERSION_ID","CREATE_AS_PROTECTED_VERSION_ID","GxIdeNewVersion","_GxIdeNewVersion_componentLocale","set","this","_GxIdeNewVersion_versionNameEl","_GxIdeNewVersion_shortcutsSrc","getAssetPath","_GxIdeNewVersion_handleCheckBoxValueChange","event","target","id","setNewVersionAsActive","detail","createLinkedLocalVersion","createAsProtectedVersion","_GxIdeNewVersion_handleNameValueChange","versionName","versionDescriptionEdited","versionDescription","_GxIdeNewVersion_handleDescriptionValueChange","_GxIdeNewVersion_cancelClickHandler","async","cancelCallback","_GxIdeNewVersion_createClickHandler","newVersionData","createLocalLinkedVersion","createProtectedVersion","formSubmitResult","createCallback","validatableControls","validateControls","_GxIdeNewVersion_initializeValidatableControls","__classPrivateFieldGet","forEach","validatableControl","reference","hasError","message","undefined","_GxIdeNewVersion_evaluateTooltipRender","controlReference","_b","_a","get","_c","h","class","actionElement","blockAlign","config","tooltipSettings","inlineAlign","delay","Map","defaultInputValuesChanged","newDefaultInputValues","componentWillLoad","__classPrivateFieldSet","Locale","getComponentStrings","el","defaultInputValues","componentDidLoad","call","render","createButtonDisabled","length","Host","model","src","htmlFor","labels","name","type","placeholder","placeHolders","value","onInput","ref","autoFocus","description","isRemoteOperation","checkedValue","caption","setActive","showLinkedLocalVersionCheckbox","isFreezeOperation","onClick","buttons","cancel","disabled","create"],"sources":["src/components/new-version/new-version.scss?tag=gx-ide-new-version&encapsulation=shadow","src/components/new-version/new-version.tsx"],"sourcesContent":[":host {\n display: grid;\n block-size: 100%;\n grid-template-rows: 1fr max-content;\n}\n\n.field-group {\n grid-auto-rows: max-content;\n}\n\n.main {\n overflow: auto;\n}\n\n.section {\n display: contents;\n}\n\n.tooltip {\n position: absolute;\n}\n","import {\n Component,\n Element,\n getAssetPath,\n h,\n Host,\n Prop,\n State,\n Watch\n} from \"@stencil/core\";\n\nimport { ChCheckboxCustomEvent } from \"@genexus/chameleon-controls-library\";\nimport { MercuryBundles } from \"@genexus/mercury\";\nimport { Locale } from \"../../common/locale\";\nimport { FormSubmitResult } from \"../../components\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../common/form-validation\";\nimport { config } from \"../../common/config\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/form\",\n \"utils/spacing\",\n \"utils/layout\",\n \"chameleon/scrollbar\",\n \"components/checkbox\",\n \"components/button\",\n \"components/edit\",\n \"components/tooltip\"\n];\n\n// ch-checkbox\nconst CHECKED_VALUE = \"on\";\nconst SET_NEW_VERSION_AS_ACTIVE_ID = \"set-new-version-as-active\";\nconst CREATE_LINKED_LOCAL_VERSION_ID = \"create-linked-local-version\";\nconst CREATE_AS_PROTECTED_VERSION_ID = \"create-as-protected-version\";\n\n@Component({\n tag: \"gx-ide-new-version\",\n styleUrl: \"new-version.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/new-version\"]\n})\nexport class GxIdeNewVersion {\n /**\n * The component hard-coded strings translations.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n\n #versionNameEl!: HTMLChEditElement;\n #shortcutsSrc = getAssetPath(`./gx-ide-assets/new-version/shortcuts.json`);\n\n @Element() el: HTMLGxIdeNewVersionElement;\n\n /**\n * The version selected name\n */\n @State() versionName: string;\n\n /**\n * The version selected description\n */\n @State() versionDescription: string;\n\n /**\n * Indicates if the version description has been edited\n */\n @State() versionDescriptionEdited: boolean = false;\n\n /**\n * Checkbox value to set the new version as active\n */\n @State() setNewVersionAsActive: boolean = false;\n\n /**\n * Checkbox value to create new remote version linked to the local version\n */\n @State() createLinkedLocalVersion: boolean = false;\n\n /**\n * Checkbox value to create new remote version as protected version\n */\n @State() createAsProtectedVersion: boolean = false;\n\n @State() validatableControls = new Map<string, ControlValidation>();\n\n /**\n * Indicates if the component is going to be used to create a new remote version\n */\n @Prop() readonly isRemoteOperation: boolean = false;\n\n /**\n * Indicates if the component is going to be used to create a new remote frozen version\n */\n @Prop() readonly isFreezeOperation: boolean = false;\n\n /**\n * Indicates if the component must show the checkbox to create a linked local version\n */\n @Prop() readonly showLinkedLocalVersionCheckbox: boolean = false;\n\n /**\n * Callback that must be invoked when the 'Cancel' button is pressed.\n */\n @Prop() readonly cancelCallback: () => Promise<void>;\n\n /**\n * Callback that must be invoked when the 'Create' button is pressed.\n */\n @Prop() readonly createCallback: (\n newVersionData: NewVersionData\n ) => Promise<FormSubmitResult>;\n\n /**\n * This property is used to set the initial values of the input fields when the component is loaded.\n */\n @Prop() readonly defaultInputValues: NewVersionData;\n @Watch(\"defaultInputValues\")\n defaultInputValuesChanged(newDefaultInputValues: NewVersionData) {\n this.versionName = newDefaultInputValues?.versionName;\n this.versionDescription = newDefaultInputValues?.versionDescription;\n }\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.defaultInputValuesChanged(this.defaultInputValues);\n }\n\n componentDidLoad() {\n this.#initializeValidatableControls();\n }\n\n #handleCheckBoxValueChange = (\n event: ChCheckboxCustomEvent<any> | InputEvent\n ) => {\n const target = event.target as HTMLInputElement;\n if (target.id === SET_NEW_VERSION_AS_ACTIVE_ID) {\n this.setNewVersionAsActive = event.detail === CHECKED_VALUE;\n } else if (target.id === CREATE_LINKED_LOCAL_VERSION_ID) {\n this.createLinkedLocalVersion = event.detail === CHECKED_VALUE;\n } else if (target.id === CREATE_AS_PROTECTED_VERSION_ID) {\n this.createAsProtectedVersion = event.detail === CHECKED_VALUE;\n }\n };\n\n #handleNameValueChange = (event: CustomEvent<string> | InputEvent) => {\n this.versionName = event.detail as string;\n if (!this.versionDescriptionEdited) {\n this.versionDescription = event.detail as string;\n }\n };\n\n #handleDescriptionValueChange = (event: CustomEvent<string> | InputEvent) => {\n this.versionDescription = event.detail as string;\n if (this.versionDescription === \"\") {\n this.versionDescriptionEdited = false;\n this.versionDescription = this.versionName;\n } else {\n this.versionDescriptionEdited = true;\n }\n };\n\n #cancelClickHandler = async () => {\n this.cancelCallback();\n };\n\n #createClickHandler = async () => {\n const newVersionData: NewVersionData = {\n versionName: this.versionName,\n versionDescription: this.versionDescription,\n setNewVersionAsActive: this.setNewVersionAsActive,\n createLocalLinkedVersion: this.createLinkedLocalVersion,\n createProtectedVersion: this.createAsProtectedVersion\n };\n const formSubmitResult = await this.createCallback(newVersionData);\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n };\n\n #initializeValidatableControls = () => {\n // populate validatableControls with the controls that could have errors.\n const validatableControls: HTMLElement[] = [this.#versionNameEl];\n validatableControls.forEach(validatableControl => {\n if (validatableControl.id) {\n this.validatableControls.set(validatableControl.id, {\n reference: validatableControl,\n hasError: false,\n message: undefined\n });\n }\n });\n };\n\n // TODO: evaluate if this should be a global helper function.\n // It is used on other dialogs as well.\n #evaluateTooltipRender = (\n controlReference: HTMLElement\n ): HTMLChTooltipElement =>\n this.validatableControls?.get(controlReference?.id)?.hasError &&\n this.validatableControls.get(controlReference.id)?.message && (\n <ch-tooltip\n class=\"tooltip\"\n actionElement={controlReference as unknown as HTMLButtonElement}\n blockAlign={config.tooltipSettings.blockAlign}\n inlineAlign={config.tooltipSettings.inlineAlign}\n delay={config.tooltipSettings.delay}\n >\n {this.validatableControls.get(controlReference.id).message}\n </ch-tooltip>\n );\n\n render() {\n const createButtonDisabled =\n !this.versionName || this.versionName.length === 0;\n\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <ch-shortcuts src={this.#shortcutsSrc}></ch-shortcuts>\n <section class=\"section\">\n <div class=\"main scrollable field-group spacing-body\">\n <div class=\"field field-block\">\n <label class=\"label\" htmlFor=\"version-name\">\n {this.#componentLocale.labels.name}\n </label>\n <ch-edit\n type=\"text\"\n id=\"version-name\"\n class=\"input\"\n placeholder={this.#componentLocale.placeHolders.name}\n value={this.versionName}\n onInput={this.#handleNameValueChange}\n ref={(el: HTMLChEditElement) =>\n (this.#versionNameEl = el as HTMLChEditElement)\n }\n autoFocus\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#versionNameEl)}\n </div>\n <div class=\"field field-block\">\n <label class=\"label\" htmlFor=\"version-description\">\n {this.#componentLocale.labels.description}\n </label>\n <ch-edit\n type=\"text\"\n id=\"version-description\"\n class=\"input\"\n placeholder={this.#componentLocale.placeHolders.description}\n value={this.versionDescription}\n onInput={this.#handleDescriptionValueChange}\n ></ch-edit>\n </div>\n {!this.isRemoteOperation ? (\n <div class=\"field field-inline\">\n <ch-checkbox\n class=\"checkbox\"\n id=\"set-new-version-as-active\"\n checkedValue={CHECKED_VALUE}\n onInput={this.#handleCheckBoxValueChange}\n caption={this.#componentLocale.labels.setActive}\n ></ch-checkbox>\n </div>\n ) : (\n <div class=\"layout layout--cols-2\">\n {this.showLinkedLocalVersionCheckbox && (\n <div class=\"layout__panel\">\n <ch-checkbox\n class=\"checkbox\"\n id=\"create-linked-local-version\"\n checkedValue={CHECKED_VALUE}\n onInput={this.#handleCheckBoxValueChange}\n caption={\n this.#componentLocale.labels.createLinkedLocalVersion\n }\n ></ch-checkbox>\n </div>\n )}\n {!this.isFreezeOperation && (\n <div class=\"layout__panel\">\n <ch-checkbox\n class=\"checkbox\"\n id=\"create-as-protected-version\"\n checkedValue={CHECKED_VALUE}\n onInput={this.#handleCheckBoxValueChange}\n caption={\n this.#componentLocale.labels.createAsProtectedVersion\n }\n ></ch-checkbox>\n </div>\n )}\n </div>\n )}\n </div>\n\n <footer class=\"control-footer-with-border spacing-body\">\n <div class=\"buttons-spacer\">\n <button\n id=\"cancel-button\"\n class=\"button-secondary\"\n onClick={this.#cancelClickHandler}\n >\n {this.#componentLocale.buttons.cancel}\n </button>\n\n <button\n id=\"create-button\"\n class=\"button-primary\"\n onClick={this.#createClickHandler}\n disabled={createButtonDisabled}\n >\n {this.#componentLocale.buttons.create}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type NewVersionData = {\n versionName: string;\n versionDescription: string;\n setNewVersionAsActive?: boolean;\n createLocalLinkedVersion?: boolean;\n createProtectedVersion?: boolean;\n};\n"],"mappings":";;;;;;;;AAAA,MAAMA,IAAgB;;;;;;;;;;;;;;;;;ACqBtB,MAAMC,IAA8B,EAClC,qBACA,cACA,iBACA,gBACA,uBACA,uBACA,qBACA,mBACA;;cAIF;MAAMC,IAAgB;;AACtB,MAAMC,IAA+B;;AACrC,MAAMC,IAAiC;;AACvC,MAAMC,IAAiC;;MAQ1BC,IAAe;;;;;;;QAK1BC,EAAAC,IAAAC,WAAA;IAEAC,EAAAF,IAAAC,WAAA;IACAE,EAAAH,IAAAC,MAAgBG,EAAa;IAkF7BC,EAAAL,IAAAC,OACEK;MAEA,MAAMC,IAASD,EAAMC;MACrB,IAAIA,EAAOC,OAAOb,GAA8B;QAC9CM,KAAKQ,wBAAwBH,EAAMI,WAAWhB;aACzC,IAAIa,EAAOC,OAAOZ,GAAgC;QACvDK,KAAKU,2BAA2BL,EAAMI,WAAWhB;aAC5C,IAAIa,EAAOC,OAAOX,GAAgC;QACvDI,KAAKW,2BAA2BN,EAAMI,WAAWhB;;;IAIrDmB,EAAAb,IAAAC,OAA0BK;MACxBL,KAAKa,cAAcR,EAAMI;MACzB,KAAKT,KAAKc,0BAA0B;QAClCd,KAAKe,qBAAqBV,EAAMI;;;IAIpCO,EAAAjB,IAAAC,OAAiCK;MAC/BL,KAAKe,qBAAqBV,EAAMI;MAChC,IAAIT,KAAKe,uBAAuB,IAAI;QAClCf,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MACZ2D,SAAS7C,EAAA7B,MAAIgB,GAAA;UAGfhB,KAAK8E,oBACLpC,EAAA;MAAKC,OAAM;OACTD,EAAA;MACEC,OAAM;MACNpC,IAAG;MACHwE,cAActF;MACdiF,SAAS7C,EAAA7B,MAAII,GAAA;MACb4E,SAASnD,EAAA7B,MAAIF,GAAA,KAAkBsE,OAAOa;UAI1CvC,EAAA;MAAKC,OAAM;OACR3C,KAAKkF,kCACJxC,EAAA;MAAKC,OAAM;OACTD,EAAA;MACEC,OAAM;MACNpC,IAAG;MACHwE,cAActF;MACdiF,SAAS7C,EAAA7B,MAAII,GAAA;MACb4E,SACEnD,EAAA7B,MAAIF,GAAA,KAAkBsE,OAAO1D;UAKnCV,KAAKmF,qBACLzC,EAAA;MAAKC,OAAM;OACTD,EAAA;MACEC,OAAM;MACNpC,IAAG;MACHwE,cAActF;MACdiF,SAAS7C,EAAA7B,MAAII,GAAA;MACb4E,SACEnD,EAAA7B,MAAIF,GAAA,KAAkBsE,OAAOzD;WAS3C+B,EAAA;MAAQC,OAAM;OACZD,EAAA;MAAKC,OAAM;OACTD,EAAA;MACEnC,IAAG;MACHoC,OAAM;MACNyC,SAASvD,EAAA7B,MAAIiB,GAAA;OAEZY,EAAA7B,MAAIF,GAAA,KAAkBuF,QAAQC,SAGjC5C,EAAA;MACEnC,IAAG;MACHoC,OAAM;MACNyC,SAASvD,EAAA7B,MAAIoB,GAAA;MACbmE,UAAUzB;OAETjC,EAAA7B,MAAIF,GAAA,KAAkBuF,QAAQG"}
@@ -11,6 +11,10 @@ export declare class GxIdeNewVersion {
11
11
  * The version selected description
12
12
  */
13
13
  versionDescription: string;
14
+ /**
15
+ * Indicates if the version description has been edited
16
+ */
17
+ versionDescriptionEdited: boolean;
14
18
  /**
15
19
  * Checkbox value to set the new version as active
16
20
  */
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@genexus/genexus-ide-ui",
3
3
  "license": "Apache-2.0",
4
- "version": "1.1.55",
4
+ "version": "1.1.56",
5
5
  "description": "GeneXus IDE UI components",
6
6
  "main": "dist/index.cjs.js",
7
7
  "module": "dist/index.js",
@@ -1,218 +0,0 @@
1
- import { r as e, h as t, H as s, a as i } from "./p-97107ecc.js";
2
-
3
- import { L as o } from "./p-311eedf3.js";
4
-
5
- import { v as n } from "./p-b32b6b1f.js";
6
-
7
- import { c as a } from "./p-9a03ac9f.js";
8
-
9
- const c = ":host{display:grid;block-size:100%;grid-template-rows:1fr max-content}.field-group{grid-auto-rows:max-content}.main{overflow:auto}.section{display:contents}.tooltip{position:absolute}";
10
-
11
- var r = undefined && undefined.__classPrivateFieldGet || function(e, t, s, i) {
12
- if (s === "a" && !i) throw new TypeError("Private accessor was defined without a getter");
13
- if (typeof t === "function" ? e !== t || !i : !t.has(e)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
14
- return s === "m" ? i : s === "a" ? i.call(e) : i ? i.value : t.get(e);
15
- };
16
-
17
- var l = undefined && undefined.__classPrivateFieldSet || function(e, t, s, i, o) {
18
- if (i === "m") throw new TypeError("Private method is not writable");
19
- if (i === "a" && !o) throw new TypeError("Private accessor was defined without a setter");
20
- if (typeof t === "function" ? e !== t || !o : !t.has(e)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
21
- return i === "a" ? o.call(e, s) : o ? o.value = s : t.set(e, s), s;
22
- };
23
-
24
- var h, d, f, p, u, v, w, m, b;
25
-
26
- const k = [ "resets/box-sizing", "utils/form", "utils/spacing", "utils/layout", "chameleon/scrollbar", "components/checkbox", "components/button", "components/edit", "components/tooltip" ];
27
-
28
- // ch-checkbox
29
- const y = "on";
30
-
31
- const g = "set-new-version-as-active";
32
-
33
- const x = "create-linked-local-version";
34
-
35
- const M = "create-as-protected-version";
36
-
37
- const W = class {
38
- constructor(s) {
39
- e(this, s);
40
- /**
41
- * The component hard-coded strings translations.
42
- */
43
- // eslint-disable-next-line @stencil-community/own-props-must-be-private
44
- h.set(this, void 0);
45
- d.set(this, void 0);
46
- f.set(this, (e => {
47
- const t = e.target;
48
- if (t.id === g) {
49
- this.setNewVersionAsActive = e.detail === y;
50
- } else if (t.id === x) {
51
- this.createLinkedLocalVersion = e.detail === y;
52
- } else if (t.id === M) {
53
- this.createAsProtectedVersion = e.detail === y;
54
- }
55
- }));
56
- p.set(this, (e => {
57
- this.versionName = e.detail;
58
- }));
59
- u.set(this, (e => {
60
- this.versionDescription = e.detail;
61
- }));
62
- v.set(this, (async () => {
63
- this.cancelCallback();
64
- }));
65
- w.set(this, (async () => {
66
- const e = {
67
- versionName: this.versionName,
68
- versionDescription: this.versionDescription,
69
- setNewVersionAsActive: this.setNewVersionAsActive,
70
- createLocalLinkedVersion: this.createLinkedLocalVersion,
71
- createProtectedVersion: this.createAsProtectedVersion
72
- };
73
- const t = await this.createCallback(e);
74
- this.validatableControls = n(t, this.validatableControls);
75
- }));
76
- m.set(this, (() => {
77
- // populate validatableControls with the controls that could have errors.
78
- const e = [ r(this, d, "f") ];
79
- e.forEach((e => {
80
- if (e.id) {
81
- this.validatableControls.set(e.id, {
82
- reference: e,
83
- hasError: false,
84
- message: undefined
85
- });
86
- }
87
- }));
88
- }));
89
- // TODO: evaluate if this should be a global helper function.
90
- // It is used on other dialogs as well.
91
- b.set(this, (e => {
92
- var s, i, o;
93
- return ((i = (s = this.validatableControls) === null || s === void 0 ? void 0 : s.get(e === null || e === void 0 ? void 0 : e.id)) === null || i === void 0 ? void 0 : i.hasError) && ((o = this.validatableControls.get(e.id)) === null || o === void 0 ? void 0 : o.message) && t("ch-tooltip", {
94
- class: "tooltip",
95
- actionElement: e,
96
- blockAlign: a.tooltipSettings.blockAlign,
97
- inlineAlign: a.tooltipSettings.inlineAlign,
98
- delay: a.tooltipSettings.delay
99
- }, this.validatableControls.get(e.id).message);
100
- }));
101
- this.versionName = undefined;
102
- this.versionDescription = undefined;
103
- this.setNewVersionAsActive = false;
104
- this.createLinkedLocalVersion = false;
105
- this.createAsProtectedVersion = false;
106
- this.validatableControls = new Map;
107
- this.isRemoteOperation = false;
108
- this.isFreezeOperation = false;
109
- this.showLinkedLocalVersionCheckbox = false;
110
- this.cancelCallback = undefined;
111
- this.createCallback = undefined;
112
- this.defaultInputValues = undefined;
113
- }
114
- defaultInputValuesChanged(e) {
115
- this.versionName = e === null || e === void 0 ? void 0 : e.versionName;
116
- this.versionDescription = e === null || e === void 0 ? void 0 : e.versionDescription;
117
- }
118
- async componentWillLoad() {
119
- l(this, h, await o.getComponentStrings(this.el), "f");
120
- this.defaultInputValuesChanged(this.defaultInputValues);
121
- }
122
- componentDidLoad() {
123
- r(this, m, "f").call(this);
124
- }
125
- render() {
126
- const e = !this.versionName || this.versionName.length === 0;
127
- return t(s, {
128
- class: "widget"
129
- }, t("ch-theme", {
130
- model: k
131
- }), t("section", {
132
- class: "section"
133
- }, t("div", {
134
- class: "main scrollable field-group spacing-body"
135
- }, t("div", {
136
- class: "field field-block"
137
- }, t("label", {
138
- class: "label",
139
- htmlFor: "version-name"
140
- }, r(this, h, "f").labels.name), t("ch-edit", {
141
- type: "text",
142
- id: "version-name",
143
- class: "input",
144
- placeholder: r(this, h, "f").placeHolders.name,
145
- value: this.versionName,
146
- onInput: r(this, p, "f"),
147
- ref: e => l(this, d, e, "f")
148
- }), r(this, b, "f").call(this, r(this, d, "f"))), t("div", {
149
- class: "field field-block"
150
- }, t("label", {
151
- class: "label",
152
- htmlFor: "version-description"
153
- }, r(this, h, "f").labels.description), t("ch-edit", {
154
- type: "text",
155
- id: "version-description",
156
- class: "input",
157
- placeholder: r(this, h, "f").placeHolders.description,
158
- value: this.versionDescription,
159
- onInput: r(this, u, "f")
160
- })), !this.isRemoteOperation ? t("div", {
161
- class: "field field-inline"
162
- }, t("ch-checkbox", {
163
- class: "checkbox",
164
- id: "set-new-version-as-active",
165
- checkedValue: y,
166
- onInput: r(this, f, "f"),
167
- caption: r(this, h, "f").labels.setActive
168
- })) : t("div", {
169
- class: "layout layout--cols-2"
170
- }, this.showLinkedLocalVersionCheckbox && t("div", {
171
- class: "layout__panel"
172
- }, t("ch-checkbox", {
173
- class: "checkbox",
174
- id: "create-linked-local-version",
175
- checkedValue: y,
176
- onInput: r(this, f, "f"),
177
- caption: r(this, h, "f").labels.createLinkedLocalVersion
178
- })), !this.isFreezeOperation && t("div", {
179
- class: "layout__panel"
180
- }, t("ch-checkbox", {
181
- class: "checkbox",
182
- id: "create-as-protected-version",
183
- checkedValue: y,
184
- onInput: r(this, f, "f"),
185
- caption: r(this, h, "f").labels.createAsProtectedVersion
186
- })))), t("footer", {
187
- class: "control-footer-with-border spacing-body"
188
- }, t("div", {
189
- class: "buttons-spacer"
190
- }, t("button", {
191
- class: "button-secondary",
192
- onClick: r(this, v, "f")
193
- }, r(this, h, "f").buttons.cancel), t("button", {
194
- class: "button-primary",
195
- onClick: r(this, w, "f"),
196
- disabled: e
197
- }, r(this, h, "f").buttons.create)))));
198
- }
199
- static get assetsDirs() {
200
- return [ "gx-ide-assets/new-version" ];
201
- }
202
- get el() {
203
- return i(this);
204
- }
205
- static get watchers() {
206
- return {
207
- defaultInputValues: [ "defaultInputValuesChanged" ]
208
- };
209
- }
210
- };
211
-
212
- h = new WeakMap, d = new WeakMap, f = new WeakMap, p = new WeakMap, u = new WeakMap,
213
- v = new WeakMap, w = new WeakMap, m = new WeakMap, b = new WeakMap;
214
-
215
- W.style = c;
216
-
217
- export { W as gx_ide_new_version };
218
- //# sourceMappingURL=p-5f65a4bb.entry.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["newVersionCss","CSS_BUNDLES","CHECKED_VALUE","SET_NEW_VERSION_AS_ACTIVE_ID","CREATE_LINKED_LOCAL_VERSION_ID","CREATE_AS_PROTECTED_VERSION_ID","GxIdeNewVersion","_GxIdeNewVersion_componentLocale","set","this","_GxIdeNewVersion_versionNameEl","_GxIdeNewVersion_handleCheckBoxValueChange","event","target","id","setNewVersionAsActive","detail","createLinkedLocalVersion","createAsProtectedVersion","_GxIdeNewVersion_handleNameValueChange","versionName","_GxIdeNewVersion_handleDescriptionValueChange","versionDescription","_GxIdeNewVersion_cancelClickHandler","async","cancelCallback","_GxIdeNewVersion_createClickHandler","newVersionData","createLocalLinkedVersion","createProtectedVersion","formSubmitResult","createCallback","validatableControls","validateControls","_GxIdeNewVersion_initializeValidatableControls","__classPrivateFieldGet","forEach","validatableControl","reference","hasError","message","undefined","_GxIdeNewVersion_evaluateTooltipRender","controlReference","_b","_a","get","_c","h","class","actionElement","blockAlign","config","tooltipSettings","inlineAlign","delay","Map","defaultInputValuesChanged","newDefaultInputValues","componentWillLoad","__classPrivateFieldSet","Locale","getComponentStrings","el","defaultInputValues","componentDidLoad","call","render","createButtonDisabled","length","Host","model","htmlFor","labels","name","type","placeholder","placeHolders","value","onInput","ref","description","isRemoteOperation","checkedValue","caption","setActive","showLinkedLocalVersionCheckbox","isFreezeOperation","onClick","buttons","cancel","disabled","create"],"sources":["src/components/new-version/new-version.scss?tag=gx-ide-new-version&encapsulation=shadow","src/components/new-version/new-version.tsx"],"sourcesContent":[":host {\n display: grid;\n block-size: 100%;\n grid-template-rows: 1fr max-content;\n}\n\n.field-group {\n grid-auto-rows: max-content;\n}\n\n.main {\n overflow: auto;\n}\n\n.section {\n display: contents;\n}\n\n.tooltip {\n position: absolute;\n}\n","import { Component, Element, h, Host, Prop, State, Watch } from \"@stencil/core\";\n\nimport { ChCheckboxCustomEvent } from \"@genexus/chameleon-controls-library\";\nimport { MercuryBundles } from \"@genexus/mercury\";\nimport { Locale } from \"../../common/locale\";\nimport { FormSubmitResult } from \"../../components\";\nimport {\n ControlValidation,\n validateControls\n} from \"../../common/form-validation\";\nimport { config } from \"../../common/config\";\n\nconst CSS_BUNDLES: MercuryBundles = [\n \"resets/box-sizing\",\n \"utils/form\",\n \"utils/spacing\",\n \"utils/layout\",\n \"chameleon/scrollbar\",\n \"components/checkbox\",\n \"components/button\",\n \"components/edit\",\n \"components/tooltip\"\n];\n\n// ch-checkbox\nconst CHECKED_VALUE = \"on\";\nconst SET_NEW_VERSION_AS_ACTIVE_ID = \"set-new-version-as-active\";\nconst CREATE_LINKED_LOCAL_VERSION_ID = \"create-linked-local-version\";\nconst CREATE_AS_PROTECTED_VERSION_ID = \"create-as-protected-version\";\n\n@Component({\n tag: \"gx-ide-new-version\",\n styleUrl: \"new-version.scss\",\n shadow: true,\n assetsDirs: [\"gx-ide-assets/new-version\"]\n})\nexport class GxIdeNewVersion {\n /**\n * The component hard-coded strings translations.\n */\n // eslint-disable-next-line @stencil-community/own-props-must-be-private\n #componentLocale: any;\n\n #versionNameEl!: HTMLChEditElement;\n\n @Element() el: HTMLGxIdeNewVersionElement;\n\n /**\n * The version selected name\n */\n @State() versionName: string;\n\n /**\n * The version selected description\n */\n @State() versionDescription: string;\n\n /**\n * Checkbox value to set the new version as active\n */\n @State() setNewVersionAsActive: boolean = false;\n\n /**\n * Checkbox value to create new remote version linked to the local version\n */\n @State() createLinkedLocalVersion: boolean = false;\n\n /**\n * Checkbox value to create new remote version as protected version\n */\n @State() createAsProtectedVersion: boolean = false;\n\n @State() validatableControls = new Map<string, ControlValidation>();\n\n /**\n * Indicates if the component is going to be used to create a new remote version\n */\n @Prop() readonly isRemoteOperation: boolean = false;\n\n /**\n * Indicates if the component is going to be used to create a new remote frozen version\n */\n @Prop() readonly isFreezeOperation: boolean = false;\n\n /**\n * Indicates if the component must show the checkbox to create a linked local version\n */\n @Prop() readonly showLinkedLocalVersionCheckbox: boolean = false;\n\n /**\n * Callback that must be invoked when the 'Cancel' button is pressed.\n */\n @Prop() readonly cancelCallback: () => Promise<void>;\n\n /**\n * Callback that must be invoked when the 'Create' button is pressed.\n */\n @Prop() readonly createCallback: (\n newVersionData: NewVersionData\n ) => Promise<FormSubmitResult>;\n\n /**\n * This property is used to set the initial values of the input fields when the component is loaded.\n */\n @Prop() readonly defaultInputValues: NewVersionData;\n @Watch(\"defaultInputValues\")\n defaultInputValuesChanged(newDefaultInputValues: NewVersionData) {\n this.versionName = newDefaultInputValues?.versionName;\n this.versionDescription = newDefaultInputValues?.versionDescription;\n }\n\n async componentWillLoad() {\n this.#componentLocale = await Locale.getComponentStrings(this.el);\n this.defaultInputValuesChanged(this.defaultInputValues);\n }\n\n componentDidLoad() {\n this.#initializeValidatableControls();\n }\n\n #handleCheckBoxValueChange = (\n event: ChCheckboxCustomEvent<any> | InputEvent\n ) => {\n const target = event.target as HTMLInputElement;\n if (target.id === SET_NEW_VERSION_AS_ACTIVE_ID) {\n this.setNewVersionAsActive = event.detail === CHECKED_VALUE;\n } else if (target.id === CREATE_LINKED_LOCAL_VERSION_ID) {\n this.createLinkedLocalVersion = event.detail === CHECKED_VALUE;\n } else if (target.id === CREATE_AS_PROTECTED_VERSION_ID) {\n this.createAsProtectedVersion = event.detail === CHECKED_VALUE;\n }\n };\n\n #handleNameValueChange = (event: CustomEvent<string> | InputEvent) => {\n this.versionName = event.detail as string;\n };\n\n #handleDescriptionValueChange = (event: CustomEvent<string> | InputEvent) => {\n this.versionDescription = event.detail as string;\n };\n\n #cancelClickHandler = async () => {\n this.cancelCallback();\n };\n\n #createClickHandler = async () => {\n const newVersionData: NewVersionData = {\n versionName: this.versionName,\n versionDescription: this.versionDescription,\n setNewVersionAsActive: this.setNewVersionAsActive,\n createLocalLinkedVersion: this.createLinkedLocalVersion,\n createProtectedVersion: this.createAsProtectedVersion\n };\n const formSubmitResult = await this.createCallback(newVersionData);\n this.validatableControls = validateControls(\n formSubmitResult,\n this.validatableControls\n );\n };\n\n #initializeValidatableControls = () => {\n // populate validatableControls with the controls that could have errors.\n const validatableControls: HTMLElement[] = [this.#versionNameEl];\n validatableControls.forEach(validatableControl => {\n if (validatableControl.id) {\n this.validatableControls.set(validatableControl.id, {\n reference: validatableControl,\n hasError: false,\n message: undefined\n });\n }\n });\n };\n\n // TODO: evaluate if this should be a global helper function.\n // It is used on other dialogs as well.\n #evaluateTooltipRender = (\n controlReference: HTMLElement\n ): HTMLChTooltipElement =>\n this.validatableControls?.get(controlReference?.id)?.hasError &&\n this.validatableControls.get(controlReference.id)?.message && (\n <ch-tooltip\n class=\"tooltip\"\n actionElement={controlReference as unknown as HTMLButtonElement}\n blockAlign={config.tooltipSettings.blockAlign}\n inlineAlign={config.tooltipSettings.inlineAlign}\n delay={config.tooltipSettings.delay}\n >\n {this.validatableControls.get(controlReference.id).message}\n </ch-tooltip>\n );\n\n render() {\n const createButtonDisabled =\n !this.versionName || this.versionName.length === 0;\n\n return (\n <Host class=\"widget\">\n <ch-theme model={CSS_BUNDLES}></ch-theme>\n <section class=\"section\">\n <div class=\"main scrollable field-group spacing-body\">\n <div class=\"field field-block\">\n <label class=\"label\" htmlFor=\"version-name\">\n {this.#componentLocale.labels.name}\n </label>\n <ch-edit\n type=\"text\"\n id=\"version-name\"\n class=\"input\"\n placeholder={this.#componentLocale.placeHolders.name}\n value={this.versionName}\n onInput={this.#handleNameValueChange}\n ref={(el: HTMLChEditElement) =>\n (this.#versionNameEl = el as HTMLChEditElement)\n }\n ></ch-edit>\n {this.#evaluateTooltipRender(this.#versionNameEl)}\n </div>\n <div class=\"field field-block\">\n <label class=\"label\" htmlFor=\"version-description\">\n {this.#componentLocale.labels.description}\n </label>\n <ch-edit\n type=\"text\"\n id=\"version-description\"\n class=\"input\"\n placeholder={this.#componentLocale.placeHolders.description}\n value={this.versionDescription}\n onInput={this.#handleDescriptionValueChange}\n ></ch-edit>\n </div>\n {!this.isRemoteOperation ? (\n <div class=\"field field-inline\">\n <ch-checkbox\n class=\"checkbox\"\n id=\"set-new-version-as-active\"\n checkedValue={CHECKED_VALUE}\n onInput={this.#handleCheckBoxValueChange}\n caption={this.#componentLocale.labels.setActive}\n ></ch-checkbox>\n </div>\n ) : (\n <div class=\"layout layout--cols-2\">\n {this.showLinkedLocalVersionCheckbox && (\n <div class=\"layout__panel\">\n <ch-checkbox\n class=\"checkbox\"\n id=\"create-linked-local-version\"\n checkedValue={CHECKED_VALUE}\n onInput={this.#handleCheckBoxValueChange}\n caption={\n this.#componentLocale.labels.createLinkedLocalVersion\n }\n ></ch-checkbox>\n </div>\n )}\n {!this.isFreezeOperation && (\n <div class=\"layout__panel\">\n <ch-checkbox\n class=\"checkbox\"\n id=\"create-as-protected-version\"\n checkedValue={CHECKED_VALUE}\n onInput={this.#handleCheckBoxValueChange}\n caption={\n this.#componentLocale.labels.createAsProtectedVersion\n }\n ></ch-checkbox>\n </div>\n )}\n </div>\n )}\n </div>\n\n <footer class=\"control-footer-with-border spacing-body\">\n <div class=\"buttons-spacer\">\n <button\n class=\"button-secondary\"\n onClick={this.#cancelClickHandler}\n >\n {this.#componentLocale.buttons.cancel}\n </button>\n\n <button\n class=\"button-primary\"\n onClick={this.#createClickHandler}\n disabled={createButtonDisabled}\n >\n {this.#componentLocale.buttons.create}\n </button>\n </div>\n </footer>\n </section>\n </Host>\n );\n }\n}\n\nexport type NewVersionData = {\n versionName: string;\n versionDescription: string;\n setNewVersionAsActive?: boolean;\n createLocalLinkedVersion?: boolean;\n createProtectedVersion?: boolean;\n};\n"],"mappings":";;;;;;;;AAAA,MAAMA,IAAgB;;;;;;;;;;;;;;;;;ACYtB,MAAMC,IAA8B,EAClC,qBACA,cACA,iBACA,gBACA,uBACA,uBACA,qBACA,mBACA;;cAIF;MAAMC,IAAgB;;AACtB,MAAMC,IAA+B;;AACrC,MAAMC,IAAiC;;AACvC,MAAMC,IAAiC;;MAQ1BC,IAAe;;;;;;;QAK1BC,EAAAC,IAAAC,WAAA;IAEAC,EAAAF,IAAAC,WAAA;IA6EAE,EAAAH,IAAAC,OACEG;MAEA,MAAMC,IAASD,EAAMC;MACrB,IAAIA,EAAOC,OAAOX,GAA8B;QAC9CM,KAAKM,wBAAwBH,EAAMI,WAAWd;aACzC,IAAIW,EAAOC,OAAOV,GAAgC;QACvDK,KAAKQ,2BAA2BL,EAAMI,WAAWd;aAC5C,IAAIW,EAAOC,OAAOT,GAAgC;QACvDI,KAAKS,2BAA2BN,EAAMI,WAAWd;;;IAIrDiB,EAAAX,IAAAC,OAA0BG;MACxBH,KAAKW,cAAcR,EAAMI;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