Skip to content
This repository was archived by the owner on Jan 24, 2023. It is now read-only.

Commit cb0b7f5

Browse files
committed
feat: syncronized simpli-web-sdk
1 parent e2617b9 commit cb0b7f5

5 files changed

Lines changed: 25 additions & 243 deletions

File tree

packages/@simpli/cli-scaffold/generator/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ module.exports = (api, options) => {
5656
'normalize-scss': '7.0.1',
5757
'register-service-worker': '1.5.2',
5858
'simple-line-icons': '2.4.1',
59-
'simpli-web-sdk': '^1.0.0',
59+
'simpli-web-sdk': '^1.1.0',
6060
'vue': '^2.5.17',
6161
'vue-chartjs': '3.4.0',
6262
'vue-chartkick': '0.5.0',

packages/@simpli/cli-scaffold/generator/injected/src/views/list/ListTemplateView.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -53,16 +53,16 @@
5353
</thead>
5454

5555
<tbody>
56-
<tr v-for="(data, i) in collection.data" :key="i">
56+
<tr v-for="(item, i) in collection.items" :key="i">
5757
<td class="horiz nowrap">
58-
<a @click="pushByName('edit<%-model.name%>', collection.items[i].$id)" class="icon icon-pencil"></a>
58+
<a @click="pushByName('edit<%-model.name%>', item.$id)" class="icon icon-pencil"></a>
5959
<%_ if (model.resource.deletable) { _%>
60-
<a @click="openRemoveModal(collection.items[i])" class="icon icon-trash"></a>
60+
<a @click="openRemoveModal(item)" class="icon icon-trash"></a>
6161
<%_ } _%>
6262
</td>
6363

64-
<td v-for="(value, key) in data" :key="key">
65-
<resource-render v-model="collection.items[i]" :field="key"/>
64+
<td v-for="(field, j) in item.fieldsToRender" :key="j">
65+
<resource-render v-model="collection.items[i]" :field="field"/>
6666
</td>
6767
</tr>
6868
</tbody>

packages/@simpli/cli-scaffold/generator/injected/src/views/persist/PersistTemplateView.vue

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
</h1>
88
</section>
99

10-
<section class="container fluid">
10+
<section class="container small">
1111
<await init name="find<%-origin.name%>Resp" class="my-20">
1212
<form class="elevated padded" @submit.prevent="$await.run(persist, 'persist')">
1313

14-
<div v-for="(schemaRow, field) in model.<%-model.resp.originAttr%>.$schema" :key="field">
14+
<div v-for="(field, i) in model.<%-model.resp.originAttr%>.fieldsToInput" :key="i">
1515
<%_ if (model.arrayAtrrs.length) { _%>
1616
<resource-input v-model="model.<%-model.resp.originAttr%>" :field="field" :selectItems="resource[field]"/>
1717
<%_ } else { _%>

packages/@simpli/cli-scaffold/generator/template/src/scss/app.scss

Lines changed: 1 addition & 219 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
@import "~simple-line-icons/scss/simple-line-icons";
66
@import "~linelay/build";
77
@import "~simpli-web-sdk/scss/main";
8+
@import "~simpli-web-sdk/scss/utils";
89
/********************************************************/
910

1011
@import "base";
@@ -47,113 +48,6 @@
4748
}
4849
}
4950

50-
.display {
51-
@extend .pal-black.text;
52-
53-
font-size: 36px;
54-
font-weight: 600;
55-
letter-spacing: 1px;
56-
57-
&.contrast {
58-
@extend .pal-white.text;
59-
}
60-
61-
@media screen and (max-width: $display-large) {
62-
font-size: 32px;
63-
}
64-
65-
@media screen and (max-width: $display-medium) {
66-
font-size: 28px;
67-
}
68-
69-
@media screen and (max-width: $display-small) {
70-
font-size: 4.5vw;
71-
}
72-
73-
&.huge {
74-
font-size: 48px;
75-
76-
@media screen and (max-width: $display-large) {
77-
font-size: 42px;
78-
}
79-
80-
@media screen and (max-width: $display-medium) {
81-
font-size: 36px;
82-
}
83-
84-
@media screen and (max-width: $display-small) {
85-
font-size: 5.5vw;
86-
}
87-
}
88-
89-
&.big {
90-
font-size: 42px;
91-
92-
@media screen and (max-width: $display-large) {
93-
font-size: 37px;
94-
}
95-
96-
@media screen and (max-width: $display-medium) {
97-
font-size: 32px;
98-
}
99-
100-
@media screen and (max-width: $display-small) {
101-
font-size: 5vw;
102-
}
103-
}
104-
105-
&.small {
106-
font-size: 30px;
107-
font-weight: 300;
108-
109-
@media screen and (max-width: $display-large) {
110-
font-size: 27px;
111-
}
112-
113-
@media screen and (max-width: $display-medium) {
114-
font-size: 24px;
115-
}
116-
117-
@media screen and (max-width: $display-small) {
118-
font-size: 21px;
119-
}
120-
}
121-
122-
&.tiny {
123-
font-size: 24px;
124-
font-weight: 300;
125-
126-
@media screen and (max-width: $display-large) {
127-
font-size: 22px;
128-
}
129-
130-
@media screen and (max-width: $display-medium) {
131-
font-size: 20px;
132-
}
133-
134-
@media screen and (max-width: $display-small) {
135-
font-size: 18px;
136-
}
137-
}
138-
139-
&.mini {
140-
font-size: 18px;
141-
font-weight: 300;
142-
143-
@media screen and (max-width: $display-large) {
144-
font-size: 17px;
145-
}
146-
147-
@media screen and (max-width: $display-medium) {
148-
font-size: 16px;
149-
}
150-
151-
@media screen and (max-width: $display-small) {
152-
font-size: 15px;
153-
}
154-
}
155-
}
156-
15751
.elevated {
15852
@extend .pal-white-90.bg;
15953
@extend .pal-black-10.box-shadow.deep-15;
@@ -189,115 +83,3 @@
18983
}
19084
}
19185
}
192-
193-
.row {
194-
max-width: calc(100% + #{2 * $padding-base});
195-
margin: -$padding-base;
196-
margin-bottom: $padding-base;
197-
198-
.col {
199-
padding: $padding-base;
200-
margin: 0;
201-
202-
&.inline {
203-
padding-top: 0;
204-
padding-bottom: 0;
205-
}
206-
}
207-
208-
&.wide {
209-
max-width: calc(100% + #{$padding-base * 4});
210-
margin: -#{$padding-base * 2};
211-
margin-bottom: #{$padding-base * 2};
212-
213-
.col {
214-
padding: #{$padding-base * 2};
215-
216-
&.inline {
217-
padding-top: 0;
218-
padding-bottom: 0;
219-
}
220-
}
221-
}
222-
223-
&.compact {
224-
max-width: calc(100% + #{$padding-base});
225-
margin: -#{$padding-base / 2};
226-
margin-bottom: #{$padding-base / 2};
227-
228-
.col {
229-
padding: #{$padding-base / 2};
230-
231-
&.inline {
232-
padding-top: 0;
233-
padding-bottom: 0;
234-
}
235-
}
236-
}
237-
238-
@media only screen and (max-width: $display-small) {
239-
&, &.compact, &.wide {
240-
max-width: calc(100% + #{$padding-base / 2});
241-
margin: -#{$padding-base / 4};
242-
margin-bottom: #{$padding-base / 4};
243-
244-
.col {
245-
padding: #{$padding-base / 4};
246-
247-
&.inline {
248-
padding-top: 0;
249-
padding-bottom: 0;
250-
}
251-
}
252-
}
253-
}
254-
}
255-
256-
.container {
257-
width: $container-large-desktop;
258-
margin: auto;
259-
260-
@media screen and (max-width: $display-extra-large) {
261-
width: $container-desktop;
262-
}
263-
264-
@media screen and (max-width: $display-large) {
265-
width: $container-tablet;
266-
}
267-
268-
@media screen and (max-width: $display-medium) {
269-
width: auto;
270-
margin: auto 10px;
271-
}
272-
273-
&.fluid {
274-
width: auto;
275-
margin: auto 80px;
276-
277-
&.wide {
278-
margin: auto 200px;
279-
}
280-
281-
@media screen and (max-width: $display-large) {
282-
&.center-mobile {
283-
text-align: center;
284-
}
285-
286-
margin: auto 40px;
287-
&.wide {
288-
margin: auto 100px;
289-
}
290-
}
291-
292-
@media screen and (max-width: $display-medium) {
293-
&.center-mobile {
294-
text-align: center;
295-
}
296-
297-
margin: auto 10px;
298-
&.wide {
299-
margin: auto 20px;
300-
}
301-
}
302-
}
303-
}

0 commit comments

Comments
 (0)