nodality 1.0.0-beta.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/animator.cjs.js +1 -0
- package/dist/animator.esm.js +1 -0
- package/dist/audionew.cjs.js +1 -0
- package/dist/audionew.esm.js +1 -0
- package/dist/base.cjs.js +1 -0
- package/dist/base.esm.js +1 -0
- package/dist/betaDesktopBar.esm.js +1 -0
- package/dist/betaMobileBar.esm.js +1 -0
- package/dist/bundle.umd.js +1 -0
- package/dist/button.cjs.js +1 -0
- package/dist/button.esm.js +1 -0
- package/dist/cardGetter.cjs.js +1 -0
- package/dist/cardGetter.esm.js +1 -0
- package/dist/center.cjs.js +1 -0
- package/dist/center.esm.js +1 -0
- package/dist/checkbox.cjs.js +1 -0
- package/dist/checkbox.esm.js +1 -0
- package/dist/code.cjs.js +1 -0
- package/dist/code.esm.js +1 -0
- package/dist/container.cjs.js +1 -0
- package/dist/container.esm.js +1 -0
- package/dist/datalist.cjs.js +1 -0
- package/dist/datalist.esm.js +1 -0
- package/dist/designer.cjs.js +1 -0
- package/dist/designer.esm.js +1 -0
- package/dist/dropdown.cjs.js +1 -0
- package/dist/dropdown.esm.js +1 -0
- package/dist/elementMapper.cjs.js +1 -0
- package/dist/elementMapper.esm.js +1 -0
- package/dist/finalresult.esm.js +1 -0
- package/dist/flexCard.cjs.js +1 -0
- package/dist/flexCard.esm.js +1 -0
- package/dist/flexGrid.cjs.js +1 -0
- package/dist/flexGrid.esm.js +1 -0
- package/dist/flexRow.cjs.js +1 -0
- package/dist/flexRow.esm.js +1 -0
- package/dist/floatingInput.cjs.js +1 -0
- package/dist/floatingInput.esm.js +1 -0
- package/dist/free.cjs.js +1 -0
- package/dist/free.esm.js +1 -0
- package/dist/horizontalScroller.esm.js +1 -0
- package/dist/image.cjs.js +1 -0
- package/dist/image.esm.js +1 -0
- package/dist/imagePicker.cjs.js +1 -0
- package/dist/imagePicker.esm.js +1 -0
- package/dist/index.cjs.js +1 -0
- package/dist/index.esm.js +1 -0
- package/dist/link.cjs.js +1 -0
- package/dist/link.esm.js +1 -0
- package/dist/linkGetter.cjs.js +1 -0
- package/dist/linkGetter.esm.js +1 -0
- package/dist/metaAdder.cjs.js +1 -0
- package/dist/metaAdder.esm.js +1 -0
- package/dist/modal2025.cjs.js +1 -0
- package/dist/modal2025.esm.js +1 -0
- package/dist/multiswitchers.esm.js +1 -0
- package/dist/newNavBar.cjs.js +1 -0
- package/dist/newNavBar.esm.js +1 -0
- package/dist/picker.cjs.js +1 -0
- package/dist/picker.esm.js +1 -0
- package/dist/progress.cjs.js +1 -0
- package/dist/progress.esm.js +1 -0
- package/dist/radio.cjs.js +1 -0
- package/dist/radio.esm.js +1 -0
- package/dist/range.cjs.js +1 -0
- package/dist/range.esm.js +1 -0
- package/dist/sideBar.cjs.js +1 -0
- package/dist/sideBar.esm.js +1 -0
- package/dist/sideNavBar.cjs.js +1 -0
- package/dist/sideNavBar.esm.js +1 -0
- package/dist/simpleBar.cjs.js +1 -0
- package/dist/simpleBar.esm.js +1 -0
- package/dist/stack.cjs.js +1 -0
- package/dist/stack.esm.js +1 -0
- package/dist/table.cjs.js +1 -0
- package/dist/table.esm.js +1 -0
- package/dist/text.cjs.js +1 -0
- package/dist/text.esm.js +1 -0
- package/dist/textField.cjs.js +1 -0
- package/dist/textField.esm.js +1 -0
- package/dist/wrap.cjs.js +1 -0
- package/dist/wrap.esm.js +1 -0
- package/dist/zoomCard.cjs.js +1 -0
- package/dist/zoomCard.esm.js +1 -0
- package/layout/<head> +59 -0
- package/layout/DEADJOE +49 -0
- package/layout/DEPRECATED-PARAGRAPH.js +103 -0
- package/layout/animator.js +1915 -0
- package/layout/audio.js +145 -0
- package/layout/audionew.js +70 -0
- package/layout/base-2.js +92 -0
- package/layout/base.js +161 -0
- package/layout/betaDesktopBar.js +126 -0
- package/layout/betaMobileBar.js +293 -0
- package/layout/box.js +29 -0
- package/layout/button.js +516 -0
- package/layout/cards.js +136 -0
- package/layout/center.js +143 -0
- package/layout/checkbox.js +183 -0
- package/layout/cleanRow.js +775 -0
- package/layout/code.js +60 -0
- package/layout/container.js +1005 -0
- package/layout/custom.js +289 -0
- package/layout/divImage.js +209 -0
- package/layout/dropdown.js +154 -0
- package/layout/dropdown2025.js +152 -0
- package/layout/edit.sh +39 -0
- package/layout/emptyElement.js +21 -0
- package/layout/externalStylesheet.js +19 -0
- package/layout/flexCard.js +220 -0
- package/layout/flexGrid.js +192 -0
- package/layout/flexrow.js +866 -0
- package/layout/footer.js +83 -0
- package/layout/formComponents/custom.js +0 -0
- package/layout/formComponents/dataList.js +183 -0
- package/layout/formComponents/edit.sh +39 -0
- package/layout/formComponents/floatingInput.js +163 -0
- package/layout/formComponents/form-all.js +161 -0
- package/layout/formComponents/form.js +76 -0
- package/layout/formComponents/imagePicker.js +266 -0
- package/layout/formComponents/picker.js +208 -0
- package/layout/formComponents/radio.js +231 -0
- package/layout/formComponents/radiogroup.js +231 -0
- package/layout/formComponents/range.js +158 -0
- package/layout/free.js +232 -0
- package/layout/grid-new.js +299 -0
- package/layout/grid.js +190 -0
- package/layout/gridSwitcher.js +188 -0
- package/layout/group.js +163 -0
- package/layout/header.js +175 -0
- package/layout/hello.html +126 -0
- package/layout/horizontalScroller.js +222 -0
- package/layout/image-old.js +487 -0
- package/layout/image.js +1039 -0
- package/layout/index.js +183 -0
- package/layout/label.js +50 -0
- package/layout/link.js +1085 -0
- package/layout/list-OLD.js +0 -0
- package/layout/list.js +127 -0
- package/layout/metaAdder.js +17 -0
- package/layout/modal2025.js +142 -0
- package/layout/modernwrap.js +92 -0
- package/layout/multiswitcher.js +224 -0
- package/layout/multiswitcherBeta.js +63 -0
- package/layout/navBar-OLD.js +261 -0
- package/layout/navBar.js +371 -0
- package/layout/navFactor/customDiv.js +60 -0
- package/layout/navFactor/edit.sh +39 -0
- package/layout/newFlatAdder.js +41 -0
- package/layout/newNavBar copy 2.js +915 -0
- package/layout/newNavBar copy.js +774 -0
- package/layout/newNavBar.js +925 -0
- package/layout/offsetContainer.js +395 -0
- package/layout/progress.js +111 -0
- package/layout/remWin.sh +20 -0
- package/layout/row.js +208 -0
- package/layout/savedNewNavBar.js +437 -0
- package/layout/scrollvideo.js +120 -0
- package/layout/sideBar.js +183 -0
- package/layout/sideNavBar.js +313 -0
- package/layout/simpleBar.js +25 -0
- package/layout/slider2025.js +198 -0
- package/layout/spacer.js +44 -0
- package/layout/stack.js +76 -0
- package/layout/styler.js +113 -0
- package/layout/switcher.js +102 -0
- package/layout/table.js +155 -0
- package/layout/text.js +1685 -0
- package/layout/textField.js +282 -0
- package/layout/ulist.js +147 -0
- package/layout/video.js +70 -0
- package/layout/withoutNew.js +60 -0
- package/layout/wrap.js +140 -0
- package/layout/zoomCard.js +219 -0
- package/lib/cardGetter.js +80 -0
- package/lib/designer.js +875 -0
- package/lib/elementMapper.js +1428 -0
- package/lib/linkGetter.js +202 -0
- package/package.json +33 -0
|
@@ -0,0 +1,775 @@
|
|
|
1
|
+
import {Animator} from "./animator.js";
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
class CleanRow extends Animator {
|
|
5
|
+
constructor(frs, saveEl) {
|
|
6
|
+
super();
|
|
7
|
+
this.code = []; // 191455
|
|
8
|
+
this.saveEl = saveEl;
|
|
9
|
+
this.frs = frs;
|
|
10
|
+
this.res = null;
|
|
11
|
+
this.setup();
|
|
12
|
+
this.responsive();
|
|
13
|
+
this.code.push(", new FlexRow()");
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
getType(){
|
|
17
|
+
return "FlexRowLayoutElement";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
set(options){
|
|
23
|
+
|
|
24
|
+
let obj = options;
|
|
25
|
+
|
|
26
|
+
console.log("ORLOV");
|
|
27
|
+
console.log(obj);
|
|
28
|
+
|
|
29
|
+
if (obj && obj.id && obj.stroke || obj && obj.id && obj.gradient || obj && obj.id && obj.span || obj && obj.id && obj.backgroundOp){
|
|
30
|
+
|
|
31
|
+
if (obj.gradient){
|
|
32
|
+
this.globalGradient = obj.gradient.op.gradient;
|
|
33
|
+
|
|
34
|
+
} // OK
|
|
35
|
+
|
|
36
|
+
if (obj.stroke){
|
|
37
|
+
super.setAny({globalBlast: `${obj.stroke.op.width} ${obj.stroke.op.color}`});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
// Filter just the elements with layout element
|
|
41
|
+
let ft = [obj.stroke, obj.gradient, obj.animation, obj.span, obj.backgroundOp]//obj.gradient.filter(el => el.op.name !== "layout");
|
|
42
|
+
ft = ft.filter(el => el != undefined);
|
|
43
|
+
|
|
44
|
+
let arr = [];
|
|
45
|
+
|
|
46
|
+
for (var i = 0; i < ft.length; i++){
|
|
47
|
+
arr.push({
|
|
48
|
+
range: ft[i].range,
|
|
49
|
+
log: ft[i].op.name,
|
|
50
|
+
target: ft[i].target
|
|
51
|
+
});
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
console.log("-----RDAAA----");
|
|
55
|
+
console.log(arr);
|
|
56
|
+
console.log(obj.id);
|
|
57
|
+
this.res.setAttribute("id", obj.id);
|
|
58
|
+
this.betaReact(arr, obj.id);
|
|
59
|
+
// this.protoReact(arr, obj.id);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
//-------------------------------------------------------------------------------------------
|
|
63
|
+
if (options.padding){
|
|
64
|
+
this.padding(options.padding);
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
if (options.background){
|
|
68
|
+
this.res.style.backgroundColor = "#ecf0f1";
|
|
69
|
+
this.res.style.cornerRadius = "#3rem";
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (options.alignTo){
|
|
73
|
+
|
|
74
|
+
this.res.style.justifyContent = options.alignTo;
|
|
75
|
+
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
if (options.background){
|
|
84
|
+
this.res.style.backgroundColor = options.background;
|
|
85
|
+
this.code.push(`\n background: "${options.background}",`);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
if (options.justify){
|
|
89
|
+
this.res.style.justifyContent = options.justify;
|
|
90
|
+
this.code.push(`\n justify: "${options.justify}",`);
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
if (options.border) {
|
|
94
|
+
|
|
95
|
+
if (options.border[0] === "top") {
|
|
96
|
+
this.res.style.borderTop = `${options.border[1]} solid white`;
|
|
97
|
+
// border: ["top", "1px"],
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
if (options.border[0] === "all") {
|
|
101
|
+
this.res.style.border = `${options.border[1]} solid white`;
|
|
102
|
+
// border: ["top", "1px"],
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
this.code.push(`\n border: ["${options.border[0]}", "${options.border[1]}"],`);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
if (options.borderObj){
|
|
111
|
+
this.res.style.border = `${options.borderObj.width} solid ${options.borderObj.color}`
|
|
112
|
+
this.res.style.borderRadius = options.borderObj.radius;
|
|
113
|
+
|
|
114
|
+
let stringified = JSON.stringify(options.borderObj);
|
|
115
|
+
this.code.push(`\n borderObj: ${stringified},`);
|
|
116
|
+
|
|
117
|
+
/*borderObj: {
|
|
118
|
+
side: "all",
|
|
119
|
+
width: "3px",
|
|
120
|
+
color: "rgba(236, 227, 215, 0.5)"
|
|
121
|
+
},*/
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
options.width && (this.res.style.width = options.width);
|
|
125
|
+
options.width && this.code.push(`\n width: "${options.width}",`);
|
|
126
|
+
|
|
127
|
+
options.height && (this.res.style.height = options.height);
|
|
128
|
+
options.height && this.code.push(`\n height: "${options.height}",`);
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
if (options.align){
|
|
132
|
+
let stringified = JSON.stringify(options.align);
|
|
133
|
+
this.res.style.alignItems = "flex-start";
|
|
134
|
+
this.code.push(`\n alignIts: "flex-start",`);
|
|
135
|
+
this.res.style.alignItems = "flex-start";
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
// options.align && alert("K")
|
|
139
|
+
|
|
140
|
+
options.wrap && this.wrap();
|
|
141
|
+
options.wrap && this.code.push(`\n wrap: true,`)
|
|
142
|
+
|
|
143
|
+
if (options.alignIts){
|
|
144
|
+
let stringified = JSON.stringify(options.alignIts);
|
|
145
|
+
this.res.style.alignItems = "flex-start";
|
|
146
|
+
this.code.push(`\n alignIts: ${stringified},`);
|
|
147
|
+
|
|
148
|
+
}
|
|
149
|
+
// options.alignIts && alert("J");
|
|
150
|
+
//alignIts: "flex-start",
|
|
151
|
+
|
|
152
|
+
options.owrap && this.onlyWrap();
|
|
153
|
+
options.owrap && this.code.push(`\n owrap: true,`)
|
|
154
|
+
|
|
155
|
+
if (options.owrap != undefined){
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
if (options.owrap === false){ // DANGEROUS
|
|
159
|
+
// alert("FIRES AFTER OJ");
|
|
160
|
+
this.res.style.flexWrap = "nowrap";
|
|
161
|
+
this.res.style.background = "yellow";
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// console.warn(options);
|
|
166
|
+
|
|
167
|
+
// options.columnAlways && (this.columnAlways = true);
|
|
168
|
+
options.columnAlways && alert("JIJ" + options.columnAlways);
|
|
169
|
+
|
|
170
|
+
options.toColumn && this.toColumn(options.toColumn); // OK
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
options.column && this.makeCol(); // OK
|
|
174
|
+
|
|
175
|
+
|
|
176
|
+
|
|
177
|
+
if (options.colat){
|
|
178
|
+
|
|
179
|
+
options.colat && this.toColumnAt(options.colat);
|
|
180
|
+
this.code.push(`\n colat: "${options.colat}",`);
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
//alert(options.arrpad);
|
|
185
|
+
options.arrayPadding && this.arrayPadding(options.arrayPadding.sides, options.arrayPadding.value);
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
options.arrayMargin && this.arrayMargin(options.arrayMargin.sides, options.arrayMargin.value);
|
|
189
|
+
this.arrayMarginValue = options.arrayMargin;
|
|
190
|
+
options.arrayMargin && this.code.push(`\n arrayMargin: {sides: [${options.arrayMargin.sides.map(m => `"${m}"`).join(", ")}], value: "${options.arrayMargin.value}"},`); // 2345 06/03
|
|
191
|
+
|
|
192
|
+
// alert(options.multipad);
|
|
193
|
+
|
|
194
|
+
options.multipad && this.makeMultiPad(options.multipad);
|
|
195
|
+
|
|
196
|
+
if (options.align){
|
|
197
|
+
//alert("K")
|
|
198
|
+
|
|
199
|
+
this.makeJustify(options.justify);
|
|
200
|
+
// this.setAlign(options.align);
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
if (options.justify){
|
|
204
|
+
this.makeAlign(options.justify);
|
|
205
|
+
// this.setAlign(options.align);
|
|
206
|
+
}
|
|
207
|
+
//this.res.style.justifyContent = "flex-start";
|
|
208
|
+
//alert(this.res.style.justifyContent);
|
|
209
|
+
if (options.justifo === "flex-start"){
|
|
210
|
+
|
|
211
|
+
this.res.style.justifyContent = "flex-start";
|
|
212
|
+
} else {
|
|
213
|
+
//alert(options.justify);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
options.radius && (this.res.style.borderRadius = "1rem");
|
|
217
|
+
//---------------------------------------------------------------------------------
|
|
218
|
+
|
|
219
|
+
|
|
220
|
+
|
|
221
|
+
|
|
222
|
+
|
|
223
|
+
|
|
224
|
+
return this;
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
|
|
229
|
+
|
|
230
|
+
setArea(area){
|
|
231
|
+
this.res.style.gridArea = area;
|
|
232
|
+
return this;
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
toColumnAt(at){ // THIS IS THE ONE!!!
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
if (!this.columnAlways){
|
|
239
|
+
// alert(this.columnAlways);
|
|
240
|
+
|
|
241
|
+
|
|
242
|
+
const toCol = () => {
|
|
243
|
+
|
|
244
|
+
let media = window.matchMedia(`(max-width: ${at})`);
|
|
245
|
+
let mobileMedia = window.matchMedia(`(max-device-width: 415px)`);
|
|
246
|
+
|
|
247
|
+
if (media.matches || mobileMedia.matches){
|
|
248
|
+
|
|
249
|
+
this.res.style.flexDirection = "column";
|
|
250
|
+
} else {
|
|
251
|
+
this.res.style.flexDirection = "row";
|
|
252
|
+
|
|
253
|
+
}
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
toCol();
|
|
257
|
+
window.addEventListener("resize", toCol);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
|
|
261
|
+
|
|
262
|
+
|
|
263
|
+
|
|
264
|
+
return this;
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
// 1:32:56, 1:33:24 talk 17/08
|
|
268
|
+
|
|
269
|
+
|
|
270
|
+
onlyWrap(){
|
|
271
|
+
// alert("oj")
|
|
272
|
+
this.res.style.flexWrap = "wrap";
|
|
273
|
+
this.res.style.backgroundColor = "green";
|
|
274
|
+
return this;
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
wrap(){
|
|
278
|
+
this.res.style.flexWrap = "wrap";
|
|
279
|
+
this.res.style.justifyContent = "space-between";
|
|
280
|
+
return this;
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
aligns(st){
|
|
285
|
+
|
|
286
|
+
if (st === "start"){
|
|
287
|
+
this.res.style.alignItems = "flex-start";
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
|
|
291
|
+
if (st === "end"){
|
|
292
|
+
this.res.style.alignItems = "flex-end";
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
if (st === "center"){
|
|
296
|
+
this.res.style.alignItems = "center";
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
|
|
300
|
+
// alert(st);
|
|
301
|
+
|
|
302
|
+
return this;
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
|
|
306
|
+
toColumn(at){
|
|
307
|
+
alert("ON")
|
|
308
|
+
|
|
309
|
+
const toCol = () => {
|
|
310
|
+
let media = window.matchMedia(`(max-width: ${at})`);
|
|
311
|
+
let mobileMedia = window.matchMedia(`(max-device-width: 415px)`);
|
|
312
|
+
// alert(media);
|
|
313
|
+
|
|
314
|
+
//console.log(mobileMedia);
|
|
315
|
+
|
|
316
|
+
if (media.matches || mobileMedia.matches){
|
|
317
|
+
this.res.style.flexDirection = "column";
|
|
318
|
+
} else {
|
|
319
|
+
this.res.style.flexDirection = "row";
|
|
320
|
+
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
toCol();
|
|
325
|
+
window.addEventListener("resize", toCol);
|
|
326
|
+
|
|
327
|
+
|
|
328
|
+
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
return this;
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
|
|
335
|
+
toCode(){
|
|
336
|
+
return this.code; // 21:40:09
|
|
337
|
+
}
|
|
338
|
+
|
|
339
|
+
arrayPadding(arr, value) {
|
|
340
|
+
if (arr.includes("left")){
|
|
341
|
+
this.res.style.paddingLeft = value;
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
if (arr.includes("right")){
|
|
345
|
+
//alert("P")
|
|
346
|
+
this.res.style.paddingRight = value;
|
|
347
|
+
}
|
|
348
|
+
|
|
349
|
+
if (arr.includes("top")){
|
|
350
|
+
this.res.style.paddingTop = value;
|
|
351
|
+
}
|
|
352
|
+
|
|
353
|
+
if (arr.includes("bottom")){
|
|
354
|
+
this.res.style.paddingBottom = value;
|
|
355
|
+
}
|
|
356
|
+
|
|
357
|
+
|
|
358
|
+
return this;
|
|
359
|
+
}
|
|
360
|
+
|
|
361
|
+
borderAround(data){
|
|
362
|
+
this.res.style.border = data;
|
|
363
|
+
return this;
|
|
364
|
+
}
|
|
365
|
+
|
|
366
|
+
|
|
367
|
+
|
|
368
|
+
cornerRadius(el){
|
|
369
|
+
this.res.style.borderRadius = el;
|
|
370
|
+
return this;
|
|
371
|
+
}
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
|
|
375
|
+
|
|
376
|
+
makeJustify(opt){
|
|
377
|
+
//alert("KJ");
|
|
378
|
+
if (opt === "start"){
|
|
379
|
+
|
|
380
|
+
// alert("HJ");
|
|
381
|
+
this.res.style.justifyContent = "flex-start";
|
|
382
|
+
}
|
|
383
|
+
|
|
384
|
+
return this;
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
|
|
388
|
+
makeAlign(opt){
|
|
389
|
+
//alert("KJ");
|
|
390
|
+
if (opt === "center"){
|
|
391
|
+
|
|
392
|
+
// alert("HJ");
|
|
393
|
+
this.res.style.alignItems = "center";
|
|
394
|
+
} else {
|
|
395
|
+
|
|
396
|
+
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
|
|
400
|
+
//alert(opt)
|
|
401
|
+
this.res.style.justifyContent = opt;
|
|
402
|
+
// let stringified = JSON.stringify(options.alignTo);
|
|
403
|
+
//this.code.push(`\n alignTo: "${stringified}",`);
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
return this;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
|
|
410
|
+
makeCol(){
|
|
411
|
+
this.res.style.flexDirection = "column";
|
|
412
|
+
return this;
|
|
413
|
+
}
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
makeMultiPad(obj){
|
|
417
|
+
|
|
418
|
+
for (var i = 0; i < obj.length; i++){
|
|
419
|
+
if (obj[i].side === "left"){
|
|
420
|
+
|
|
421
|
+
this.res.style.paddingLeft = obj[i].value;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
if (obj[i].side === "right"){
|
|
425
|
+
this.res.style.paddingRight = obj[i].value;
|
|
426
|
+
}
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
return this;
|
|
430
|
+
}
|
|
431
|
+
|
|
432
|
+
|
|
433
|
+
|
|
434
|
+
padding(vals){
|
|
435
|
+
this.res.style.padding = vals;
|
|
436
|
+
return this;
|
|
437
|
+
}
|
|
438
|
+
|
|
439
|
+
center() {
|
|
440
|
+
// this.res.style.justifyItems = "center";
|
|
441
|
+
return this;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
toColumn(){
|
|
445
|
+
this.res.style.flexDirection = "column";
|
|
446
|
+
return this;
|
|
447
|
+
}
|
|
448
|
+
|
|
449
|
+
|
|
450
|
+
|
|
451
|
+
setClass(classa){
|
|
452
|
+
this.res.setAttribute("class", classa);
|
|
453
|
+
return this;
|
|
454
|
+
}
|
|
455
|
+
|
|
456
|
+
toCenter(classa) {
|
|
457
|
+
this.res.style.marginLeft = "auto";
|
|
458
|
+
this.res.style.marginRight = "auto";
|
|
459
|
+
this.res.setAttribute("class", classa);
|
|
460
|
+
return this;
|
|
461
|
+
}
|
|
462
|
+
|
|
463
|
+
setup() {
|
|
464
|
+
let flex = document.createElement("div");
|
|
465
|
+
flex.style.display = "flex";
|
|
466
|
+
flex.style.justifyContent = "space-around";
|
|
467
|
+
flex.style.alignItems = "center";
|
|
468
|
+
flex.style.margin = 0;
|
|
469
|
+
// flex.style.width = "100%";
|
|
470
|
+
this.res = flex;
|
|
471
|
+
|
|
472
|
+
|
|
473
|
+
//console.log("FREDERICK!");
|
|
474
|
+
//console.log(this);
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
return this;
|
|
479
|
+
|
|
480
|
+
// 19:36:06 Houdini Roger kilimanjaro 06/03 audiovisual
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
|
|
484
|
+
noSpaceAround(){
|
|
485
|
+
this.res.style.justifyContent = "";
|
|
486
|
+
return this;
|
|
487
|
+
}
|
|
488
|
+
|
|
489
|
+
|
|
490
|
+
|
|
491
|
+
|
|
492
|
+
itemAlignCenter(){
|
|
493
|
+
this.res.style.justifyContent = "center";
|
|
494
|
+
this.res.style.alignItems = "center";
|
|
495
|
+
return this;
|
|
496
|
+
}
|
|
497
|
+
|
|
498
|
+
|
|
499
|
+
/*
|
|
500
|
+
{
|
|
501
|
+
if
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
*/
|
|
505
|
+
|
|
506
|
+
arrayMargin(arr, value) {
|
|
507
|
+
|
|
508
|
+
//alert(arr);
|
|
509
|
+
//alert(value);
|
|
510
|
+
|
|
511
|
+
// alert(window.matchMedia("(max-device-width: 415px)").matches)
|
|
512
|
+
//alert("K")
|
|
513
|
+
if (!value){ // LTRB
|
|
514
|
+
this.res.style.marginLeft = `${arr[0]}px`;
|
|
515
|
+
this.res.style.marginTop = `${arr[1]}px`;
|
|
516
|
+
this.res.style.marginRight = `${arr[2]}px`;
|
|
517
|
+
this.res.style.marginBottom = `${arr[3]}px`;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
|
|
521
|
+
// alert("ROW.js 452"); //003337
|
|
522
|
+
//alert(value);
|
|
523
|
+
if (arr.includes("left")){
|
|
524
|
+
this.res.style.marginLeft = `${value}px`;
|
|
525
|
+
}
|
|
526
|
+
|
|
527
|
+
if (arr.includes("right")){
|
|
528
|
+
this.res.style.marginRight = `${value}px`;
|
|
529
|
+
} // 161357 Surovikin line
|
|
530
|
+
|
|
531
|
+
if (arr.includes("top")){
|
|
532
|
+
// alert(value)
|
|
533
|
+
this.res.style.marginTop = `${value}px`;
|
|
534
|
+
}
|
|
535
|
+
|
|
536
|
+
if (arr.includes("bottom")){
|
|
537
|
+
this.res.style.marginBottom = `${value}px`;
|
|
538
|
+
}
|
|
539
|
+
return this;
|
|
540
|
+
}
|
|
541
|
+
|
|
542
|
+
|
|
543
|
+
|
|
544
|
+
frame(obj){
|
|
545
|
+
this.res.style.width = obj.width;
|
|
546
|
+
this.res.style.height = obj.height;
|
|
547
|
+
|
|
548
|
+
|
|
549
|
+
let media = window.matchMedia("(max-device-width: 415px)");
|
|
550
|
+
|
|
551
|
+
if (media.matches && obj.mobile){
|
|
552
|
+
this.res.style.width = obj.mobile
|
|
553
|
+
}
|
|
554
|
+
|
|
555
|
+
return this;
|
|
556
|
+
}
|
|
557
|
+
|
|
558
|
+
background(color){
|
|
559
|
+
this.res.style.background = color;
|
|
560
|
+
return this;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
radius(val){
|
|
564
|
+
this.res.style.borderRadius = `${val}px`;
|
|
565
|
+
return this;
|
|
566
|
+
}
|
|
567
|
+
|
|
568
|
+
shadow(x, y, radius){
|
|
569
|
+
this.res.style.boxShadow = "0px 1px 10px 0px rgb(145 145 145)"; //`${x}px ${y}px ${radius}px #000`;
|
|
570
|
+
return this;
|
|
571
|
+
}
|
|
572
|
+
|
|
573
|
+
onTap(e){
|
|
574
|
+
this.res.addEventListener("click", e);
|
|
575
|
+
return this;
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
|
|
579
|
+
items(arr) {
|
|
580
|
+
//console.log("2 images enter flex row")
|
|
581
|
+
//console.warn(arr); // 2 images enter flexRow or there is problem in FlexRow code gen
|
|
582
|
+
|
|
583
|
+
//console.warn(this.res);
|
|
584
|
+
|
|
585
|
+
this.els = arr;
|
|
586
|
+
|
|
587
|
+
this.code.push(".items([");
|
|
588
|
+
|
|
589
|
+
/*
|
|
590
|
+
console.log("FL ITEM---");
|
|
591
|
+
console.log(arr);
|
|
592
|
+
console.log("/FL ITEM---");*/
|
|
593
|
+
|
|
594
|
+
for (var i = 0; i < arr.length; i++) {
|
|
595
|
+
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
|
|
599
|
+
// console.error(arr[i].render);
|
|
600
|
+
|
|
601
|
+
if (arr[i] != undefined){
|
|
602
|
+
if (arr[i].render instanceof Function){ // 170736
|
|
603
|
+
let r = arr[i].render();
|
|
604
|
+
// r.style.width = "100%";
|
|
605
|
+
//r.style.flex = 1;
|
|
606
|
+
this.res.appendChild(r);
|
|
607
|
+
} else {
|
|
608
|
+
this.res.appendChild(arr[i]);
|
|
609
|
+
}
|
|
610
|
+
}
|
|
611
|
+
|
|
612
|
+
|
|
613
|
+
|
|
614
|
+
//this.code.push("L");
|
|
615
|
+
|
|
616
|
+
|
|
617
|
+
/* if (arr[i].toCode instanceof Array){
|
|
618
|
+
// console.warn(arr[i].toCode().flatMap(x => x));
|
|
619
|
+
this.code.push(arr[i].toCode().flatMap(x => x));
|
|
620
|
+
} else {
|
|
621
|
+
if (arr[i].toCode){
|
|
622
|
+
this.code.push(arr[i].toCode());
|
|
623
|
+
|
|
624
|
+
|
|
625
|
+
|
|
626
|
+
|
|
627
|
+
}
|
|
628
|
+
}*/
|
|
629
|
+
|
|
630
|
+
|
|
631
|
+
if (arr[i] != undefined){
|
|
632
|
+
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
|
|
636
|
+
if (arr[i].render instanceof Function){
|
|
637
|
+
let item = arr[i].render();//.render();
|
|
638
|
+
this.res.appendChild(item);
|
|
639
|
+
|
|
640
|
+
|
|
641
|
+
if (arr[i].toCode !== undefined){
|
|
642
|
+
// console.log("arr[i]");
|
|
643
|
+
// console.log(arr[i]);
|
|
644
|
+
this.code.push(arr[i].toCode().flatMap(l=>l)); // 20:10:00 Nice!
|
|
645
|
+
// 12:25:10 Wow!!!
|
|
646
|
+
|
|
647
|
+
|
|
648
|
+
// Image codegen problem
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
}
|
|
652
|
+
|
|
653
|
+
|
|
654
|
+
|
|
655
|
+
|
|
656
|
+
//console.log("FREDERICK!");
|
|
657
|
+
//console.log(this.code);
|
|
658
|
+
|
|
659
|
+
//this.code = this.code.flatMap(x => x).flatMap(x => x);
|
|
660
|
+
}
|
|
661
|
+
|
|
662
|
+
|
|
663
|
+
this.code.push("])");
|
|
664
|
+
|
|
665
|
+
|
|
666
|
+
// this.code = this.code.flatMap(x => x);
|
|
667
|
+
// console.log(this.code);
|
|
668
|
+
|
|
669
|
+
|
|
670
|
+
|
|
671
|
+
return this;
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
|
|
675
|
+
|
|
676
|
+
/*
|
|
677
|
+
|
|
678
|
+
this.code.push(".add([ \n");
|
|
679
|
+
for (var i = 0; i < els.length; i++){
|
|
680
|
+
let item = els[i].render();//.render();
|
|
681
|
+
this.res.appendChild(item);
|
|
682
|
+
|
|
683
|
+
|
|
684
|
+
if (els[i].toCode !== undefined){
|
|
685
|
+
|
|
686
|
+
this.code.push(els[i].toCode().flatMap(l=>l)); // 20:10:00 Nice!
|
|
687
|
+
// 12:25:10 Wow!!!
|
|
688
|
+
|
|
689
|
+
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
//122616 06/03 Houdini M2 chip
|
|
694
|
+
this.code.push("])");
|
|
695
|
+
|
|
696
|
+
|
|
697
|
+
return this;
|
|
698
|
+
*/
|
|
699
|
+
|
|
700
|
+
|
|
701
|
+
|
|
702
|
+
|
|
703
|
+
adjustRatiosForLayout(){
|
|
704
|
+
|
|
705
|
+
if (this.els[1].getWidth == undefined){
|
|
706
|
+
return this;
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
if (this.els[1].getHeight == undefined){
|
|
710
|
+
return this; // 171653 fix
|
|
711
|
+
} // 171354
|
|
712
|
+
|
|
713
|
+
window.addEventListener("resize", () => {
|
|
714
|
+
this.resizeValues();
|
|
715
|
+
});
|
|
716
|
+
|
|
717
|
+
|
|
718
|
+
this.resizeValues();
|
|
719
|
+
|
|
720
|
+
|
|
721
|
+
|
|
722
|
+
|
|
723
|
+
// 18:29:04
|
|
724
|
+
|
|
725
|
+
return this;
|
|
726
|
+
}
|
|
727
|
+
|
|
728
|
+
|
|
729
|
+
resizeValues(){
|
|
730
|
+
let newWidth = window.innerWidth * 0.7;
|
|
731
|
+
let aspect = (this.els[1].getHeight() / this.els[1].getWidth());
|
|
732
|
+
let goal = newWidth * aspect;
|
|
733
|
+
|
|
734
|
+
this.res.children[0].style.height = `${goal}px`;
|
|
735
|
+
this.res.children[0].style.width = `30%`;
|
|
736
|
+
this.res.children[1].style.width = `70%`;
|
|
737
|
+
}
|
|
738
|
+
|
|
739
|
+
responsive(h){
|
|
740
|
+
let media = window.matchMedia(`(max-device-width: 415px)`);
|
|
741
|
+
|
|
742
|
+
const adjust = () => {
|
|
743
|
+
if (window.innerWidth < h || media.matches){
|
|
744
|
+
this.res.style.gridTemplateColumns = "1fr";
|
|
745
|
+
} else {
|
|
746
|
+
this.res.style.gridTemplateColumns = "1fr 1fr";
|
|
747
|
+
}
|
|
748
|
+
}
|
|
749
|
+
|
|
750
|
+
|
|
751
|
+
if (window.innerWidth < h || media.matches){
|
|
752
|
+
this.res.style.gridTemplateColumns = "1fr";
|
|
753
|
+
} else {
|
|
754
|
+
this.res.style.gridTemplateColumns = "1fr 1fr";
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
|
|
758
|
+
window.addEventListener("resize", adjust);
|
|
759
|
+
|
|
760
|
+
|
|
761
|
+
return this; // :D
|
|
762
|
+
return this;
|
|
763
|
+
}
|
|
764
|
+
|
|
765
|
+
|
|
766
|
+
render(el) {
|
|
767
|
+
// console.log("BORDER:" + this.res.style.border);
|
|
768
|
+
if (el){
|
|
769
|
+
document.querySelector(el).appendChild(this.res);
|
|
770
|
+
} else {
|
|
771
|
+
return this.res;
|
|
772
|
+
}
|
|
773
|
+
}
|
|
774
|
+
}
|
|
775
|
+
export { CleanRow };
|