@ng-formworks/daisyui 17.2.7 → 18.0.0
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/LICENSE +21 -0
- package/esm2022/lib/daisui-cssframework.mjs +223 -0
- package/esm2022/lib/daisyui-framework.component.mjs +53 -0
- package/esm2022/lib/daisyui-framework.module.mjs +59 -0
- package/esm2022/lib/daisyui-framework.prefixed.component.mjs +53 -0
- package/esm2022/lib/daisyui-framework.service.mjs +14 -0
- package/esm2022/lib/daisyui.framework.mjs +39 -0
- package/esm2022/lib/tokens.defs.mjs +7 -0
- package/esm2022/lib/widgets/daisyui-tabs.component.mjs +123 -0
- package/esm2022/ng-formworks-daisyui.mjs +5 -0
- package/esm2022/public-api.mjs +11 -0
- package/fesm2022/ng-formworks-daisyui.mjs +557 -0
- package/fesm2022/ng-formworks-daisyui.mjs.map +1 -0
- package/index.d.ts +5 -0
- package/lib/daisui-cssframework.d.ts +3 -0
- package/lib/daisyui-framework.component.d.ts +28 -0
- package/lib/daisyui-framework.module.d.ts +12 -0
- package/lib/daisyui-framework.prefixed.component.d.ts +28 -0
- package/lib/daisyui-framework.service.d.ts +6 -0
- package/lib/daisyui.framework.d.ts +11 -0
- package/{src/lib/tokens.defs.ts → lib/tokens.defs.d.ts} +6 -10
- package/lib/widgets/daisyui-tabs.component.d.ts +20 -0
- package/package.json +67 -58
- package/{src/public-api.ts → public-api.d.ts} +7 -12
- package/css_names_extractor.js +0 -133
- package/ng-package.json +0 -14
- package/src/daisyui_class_names.css +0 -1
- package/src/daisyui_class_names_prefixed_tw.css +0 -1
- package/src/daisyui_class_names_prefixed_tw_dui.css +0 -1
- package/src/lib/daisui-cssframework.ts +0 -237
- package/src/lib/daisyui-framework.component.scss +0 -48
- package/src/lib/daisyui-framework.component.spec.ts +0 -21
- package/src/lib/daisyui-framework.component.ts +0 -70
- package/src/lib/daisyui-framework.module.ts +0 -39
- package/src/lib/daisyui-framework.prefixed.component.scss +0 -48
- package/src/lib/daisyui-framework.prefixed.component.ts +0 -70
- package/src/lib/daisyui-framework.service.spec.ts +0 -16
- package/src/lib/daisyui-framework.service.ts +0 -9
- package/src/lib/daisyui-ng-formworks-themes-prefixed.scss +0 -61
- package/src/lib/daisyui-ng-formworks-themes.scss +0 -61
- package/src/lib/daisyui.framework.ts +0 -36
- package/src/lib/tailwind-output-prefixed.scss +0 -11772
- package/src/lib/tailwind-output.scss +0 -11402
- package/src/lib/widgets/daisyui-tabs.component.ts +0 -92
- package/tailwind-input.css +0 -3
- package/tailwind.config.js +0 -24
- package/tailwind.prefixed.config.js +0 -26
- package/tsconfig.lib.json +0 -21
- package/tsconfig.lib.prod.json +0 -10
- package/tsconfig.spec.json +0 -14
|
@@ -1,237 +0,0 @@
|
|
|
1
|
-
import { css_fw } from "@ng-formworks/cssframework";
|
|
2
|
-
|
|
3
|
-
export const cssFrameworkCfgDaisyUI:css_fw.frameworkcfg={
|
|
4
|
-
"name": "daisyui",
|
|
5
|
-
"text":"DaisyUI",
|
|
6
|
-
"scripts": [],
|
|
7
|
-
"stylesheets": [
|
|
8
|
-
//"/assets/cssframework/daisyui-framework.css"
|
|
9
|
-
],
|
|
10
|
-
"widgetstyles": {
|
|
11
|
-
"__themes__": [
|
|
12
|
-
{"name":"daisyui_default","text":"default"},
|
|
13
|
-
{"name":"light","text":"light"},
|
|
14
|
-
{"name":"dark","text":"dark"},
|
|
15
|
-
{"name":"cupcake","text":"cupcake"},
|
|
16
|
-
{"name":"cmyk","text":"cmyk"},
|
|
17
|
-
{"name":"pastel","text":"pastel"},
|
|
18
|
-
{"name":"daisyui_leaf","text":"leaf"}
|
|
19
|
-
|
|
20
|
-
],
|
|
21
|
-
"$ref": {
|
|
22
|
-
"fieldHtmlClass": "btn btn-sm btn-accent float-right"
|
|
23
|
-
},
|
|
24
|
-
"__array_item_nonref__": {
|
|
25
|
-
"htmlClass": "border shadow-md p-1"
|
|
26
|
-
},
|
|
27
|
-
"__form_group__": {
|
|
28
|
-
"htmlClass": "mb-1"
|
|
29
|
-
},
|
|
30
|
-
"__control_label__": {
|
|
31
|
-
"labelHtmlClass": "control-label"
|
|
32
|
-
},
|
|
33
|
-
"__active__": {
|
|
34
|
-
"activeClass": "active"
|
|
35
|
-
},
|
|
36
|
-
"__required_asterisk__": "text-danger",
|
|
37
|
-
"__screen_reader__": "sr-only",
|
|
38
|
-
"__remove_item__": "float-right text-2xl opacity-50",
|
|
39
|
-
"__help_block__": "help-block",
|
|
40
|
-
"__field_addon_left__": "input-group-addon",
|
|
41
|
-
"__field_addon_right__": "input-group-addon",
|
|
42
|
-
"alt-date": {
|
|
43
|
-
"fieldHtmlClass": "input input-md input-bordered w-full"
|
|
44
|
-
},
|
|
45
|
-
"alt-datetime": {
|
|
46
|
-
"fieldHtmlClass": "input input-md input-bordered w-full"
|
|
47
|
-
},
|
|
48
|
-
"__array__": {
|
|
49
|
-
"htmlClass": "border shadow-md p-1"
|
|
50
|
-
},
|
|
51
|
-
"array": {},
|
|
52
|
-
"authfieldset": {},
|
|
53
|
-
"advancedfieldset": {},
|
|
54
|
-
"button": {
|
|
55
|
-
"fieldHtmlClass": "btn btn-sm btn-info"
|
|
56
|
-
},
|
|
57
|
-
"checkbox": {
|
|
58
|
-
"fieldHtmlClass": "checkbox"
|
|
59
|
-
},
|
|
60
|
-
"checkboxes": {
|
|
61
|
-
"fieldHtmlClass": "checkbox"
|
|
62
|
-
},
|
|
63
|
-
"checkboxbuttons": {
|
|
64
|
-
"fieldHtmlClass": "w-px",
|
|
65
|
-
"labelHtmlClass": "tabs tabs-boxed",
|
|
66
|
-
"htmlClass": "btn-group",
|
|
67
|
-
"itemLabelHtmlClass": "btn",
|
|
68
|
-
"activeClass": "btn-info"
|
|
69
|
-
},
|
|
70
|
-
"checkboxes-inline": {
|
|
71
|
-
"fieldHtmlClass": "checkbox",
|
|
72
|
-
"htmlClass": "inline-flex",
|
|
73
|
-
"itemLabelHtmlClass": "checkbox-inline"
|
|
74
|
-
},
|
|
75
|
-
"date": {
|
|
76
|
-
"fieldHtmlClass": "input input-md input-bordered w-full"
|
|
77
|
-
},
|
|
78
|
-
"datetime-local": {
|
|
79
|
-
"fieldHtmlClass": "input input-md input-bordered w-full"
|
|
80
|
-
},
|
|
81
|
-
"fieldset": {},
|
|
82
|
-
"integer": {
|
|
83
|
-
"fieldHtmlClass": "input input-md input-bordered w-full max-w-xs"
|
|
84
|
-
},
|
|
85
|
-
"number": {
|
|
86
|
-
"fieldHtmlClass": "input input-md input-bordered w-full max-w-xs"
|
|
87
|
-
},
|
|
88
|
-
"optionfieldset": {},
|
|
89
|
-
"password": {
|
|
90
|
-
"fieldHtmlClass": "input input-md input-bordered w-full"
|
|
91
|
-
},
|
|
92
|
-
"radiobuttons": {
|
|
93
|
-
"fieldHtmlClass": "w-px",
|
|
94
|
-
"labelHtmlClass": "tabs tabs-boxed",
|
|
95
|
-
"htmlClass": "btn-group",
|
|
96
|
-
"itemLabelHtmlClass": "btn",
|
|
97
|
-
"activeClass": "btn-info"
|
|
98
|
-
},
|
|
99
|
-
"radio": {
|
|
100
|
-
"fieldHtmlClass": "radio"
|
|
101
|
-
},
|
|
102
|
-
"radios": {
|
|
103
|
-
"fieldHtmlClass": "radio"
|
|
104
|
-
},
|
|
105
|
-
"radios-inline": {
|
|
106
|
-
"htmlClass": "inline-flex",
|
|
107
|
-
"fieldHtmlClass": "radio",
|
|
108
|
-
"itemLabelHtmlClass": "radio-inline"
|
|
109
|
-
},
|
|
110
|
-
"range": {
|
|
111
|
-
"fieldHtmlClass": "range range-info"
|
|
112
|
-
},
|
|
113
|
-
"section": {},
|
|
114
|
-
"selectfieldset": {},
|
|
115
|
-
"select": {
|
|
116
|
-
"fieldHtmlClass": "select select-md select-bordered w-full"
|
|
117
|
-
},
|
|
118
|
-
"submit": {
|
|
119
|
-
"fieldHtmlClass": "btn btn-sm btn-info rounded-full"
|
|
120
|
-
},
|
|
121
|
-
"text": {
|
|
122
|
-
"fieldHtmlClass": "input input-md input-bordered w-full"
|
|
123
|
-
},
|
|
124
|
-
"tabs": {
|
|
125
|
-
"labelHtmlClass": "tabs-md tabs-boxed",
|
|
126
|
-
"htmlClass": "",
|
|
127
|
-
"itemLabelHtmlClass": "tab",
|
|
128
|
-
"activeClass": "tab-active"
|
|
129
|
-
},
|
|
130
|
-
"tabarray": {
|
|
131
|
-
"labelHtmlClass": "tabs tabs-boxed",
|
|
132
|
-
"htmlClass": "",
|
|
133
|
-
"itemLabelHtmlClass": "tab",
|
|
134
|
-
"activeClass": "tab-active"
|
|
135
|
-
},
|
|
136
|
-
"textarea": {
|
|
137
|
-
"fieldHtmlClass": "textarea textarea-bordered w-full"
|
|
138
|
-
},
|
|
139
|
-
"default": {
|
|
140
|
-
"fieldHtmlClass": "form-control"
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
//need to classify which classnames are controlled by DaisyU and which
|
|
145
|
-
//are controlled by tailwind
|
|
146
|
-
//-ones controlled by tailwind will have prefix tw-{{class name}}
|
|
147
|
-
//-ones controlled by daisyui will have prefix tw-dui-{{class name}}
|
|
148
|
-
export function getCssFrameworkCfgPrefixed(cssFrameworkCfg:css_fw.frameworkcfg,prefixDUI="tw-dui",prefixTW="tw"):css_fw.frameworkcfg{
|
|
149
|
-
|
|
150
|
-
let classNamesIgnored=[
|
|
151
|
-
|
|
152
|
-
'control-label',
|
|
153
|
-
'help-block','input-group-addon','checkbox-inline'
|
|
154
|
-
|
|
155
|
-
];
|
|
156
|
-
|
|
157
|
-
//TODO use regexs
|
|
158
|
-
//-regex won't work the actual prefix classname needs to be
|
|
159
|
-
//available as string literals as tailwind seems to scans for the
|
|
160
|
-
//actual names so for ex: 'tw-' + 'bg-primary' wont be picked up,
|
|
161
|
-
//has to be 'tw-bg-primary'
|
|
162
|
-
|
|
163
|
-
//NB this is not used in code, but need during the taiwind scanning
|
|
164
|
-
//to output the class names
|
|
165
|
-
let classNamesTW=[
|
|
166
|
-
'w-full','mb-1','shadow-md','p-1',
|
|
167
|
-
'sr-only','text-2xl', 'opacity-50',
|
|
168
|
-
'float-right',
|
|
169
|
-
'w-px',
|
|
170
|
-
'border',
|
|
171
|
-
'max-w-xs','rounded-full','form-control','inline-flex',
|
|
172
|
-
'tw-w-full','tw-mb-1','tw-shadow-md','tw-p-1',
|
|
173
|
-
'tw-sr-only','tw-text-2xl', 'tw-opacity-50',
|
|
174
|
-
'tw-float-right',
|
|
175
|
-
'tw-w-px',
|
|
176
|
-
'tw-max-w-xs','tw-rounded-full','tw-form-control','tw-inline-flex',
|
|
177
|
-
'tw-border'
|
|
178
|
-
|
|
179
|
-
];
|
|
180
|
-
|
|
181
|
-
let classNamesDUI=[
|
|
182
|
-
'btn', 'btn-sm', 'btn-accent','btn-info','btn-group',
|
|
183
|
-
'input', 'input-md' ,'input-bordered',
|
|
184
|
-
'checkbox','tab','tabs', 'tabs-boxed','tabs-md',"tab-active",
|
|
185
|
-
'radio','radio-inline',
|
|
186
|
-
'range', 'range-info',
|
|
187
|
-
'select', 'select-md', 'select-bordered',
|
|
188
|
-
'textarea','textarea-bordered'
|
|
189
|
-
|
|
190
|
-
];
|
|
191
|
-
let replaceClasses=(classList:string[]|string,prefDUI:string,prefTW:string,ignoredClasses:string[])=>{
|
|
192
|
-
if(!Array.isArray(classList)){
|
|
193
|
-
classList=classList.split(" ");
|
|
194
|
-
}
|
|
195
|
-
return classList.map(cname=>{
|
|
196
|
-
if(ignoredClasses.indexOf(cname)>=0){
|
|
197
|
-
return cname;
|
|
198
|
-
}
|
|
199
|
-
if(classNamesDUI.indexOf(cname)>=0){
|
|
200
|
-
return prefDUI+"-"+cname;
|
|
201
|
-
}
|
|
202
|
-
return prefTW+"-"+cname;
|
|
203
|
-
});
|
|
204
|
-
}
|
|
205
|
-
|
|
206
|
-
let cssFrameworkCfgPrefixed=JSON.parse(JSON.stringify(cssFrameworkCfg));
|
|
207
|
-
let widgetNamesIgnore=["__themes__"];
|
|
208
|
-
let widgetNamesNoSubLevel=[
|
|
209
|
-
"__required_asterisk__",
|
|
210
|
-
"__screen_reader__",
|
|
211
|
-
"__remove_item__",
|
|
212
|
-
"__help_block__",
|
|
213
|
-
"__field_addon_left__",
|
|
214
|
-
"__field_addon_right__",
|
|
215
|
-
];
|
|
216
|
-
Object.keys(cssFrameworkCfgPrefixed.widgetstyles).forEach(widgetName=>{
|
|
217
|
-
if(widgetNamesIgnore.indexOf(widgetName)>=0){
|
|
218
|
-
return;
|
|
219
|
-
}
|
|
220
|
-
if(widgetNamesNoSubLevel.indexOf(widgetName)>=0){
|
|
221
|
-
let cnames= cssFrameworkCfgPrefixed.widgetstyles[widgetName];
|
|
222
|
-
cnames=replaceClasses(cnames,prefixDUI,prefixTW,classNamesIgnored);
|
|
223
|
-
cssFrameworkCfgPrefixed.widgetstyles[widgetName]=cnames;
|
|
224
|
-
return;
|
|
225
|
-
}
|
|
226
|
-
let widgetClassMap=cssFrameworkCfgPrefixed.widgetstyles[widgetName];
|
|
227
|
-
Object.keys(widgetClassMap).forEach(classListName=>{
|
|
228
|
-
let classListAsArr:string[]|string=widgetClassMap[classListName];
|
|
229
|
-
classListAsArr=replaceClasses(classListAsArr,prefixDUI,prefixTW,classNamesIgnored);
|
|
230
|
-
widgetClassMap[classListName]=classListAsArr;
|
|
231
|
-
})
|
|
232
|
-
|
|
233
|
-
})
|
|
234
|
-
return cssFrameworkCfgPrefixed;
|
|
235
|
-
|
|
236
|
-
}
|
|
237
|
-
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
:host ::ng-deep {
|
|
2
|
-
.list-group-item .form-control-feedback {
|
|
3
|
-
top: 40px;
|
|
4
|
-
}
|
|
5
|
-
.checkbox,
|
|
6
|
-
.radio {
|
|
7
|
-
margin-top: 0;
|
|
8
|
-
margin-bottom: 0;
|
|
9
|
-
}
|
|
10
|
-
.checkbox-inline,
|
|
11
|
-
.checkbox-inline+.checkbox-inline,
|
|
12
|
-
.checkbox-inline+.radio-inline,
|
|
13
|
-
.radio-inline,
|
|
14
|
-
.radio-inline+.radio-inline,
|
|
15
|
-
.radio-inline+.checkbox-inline {
|
|
16
|
-
margin-left: 0;
|
|
17
|
-
margin-right: 10px;
|
|
18
|
-
}
|
|
19
|
-
.checkbox-inline:last-child,
|
|
20
|
-
.radio-inline:last-child {
|
|
21
|
-
margin-right: 0;
|
|
22
|
-
}
|
|
23
|
-
.ng-invalid.ng-touched {
|
|
24
|
-
border: 1px solid #f44336;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.checkbox-inline,
|
|
29
|
-
.checkbox-inline+.checkbox-inline,
|
|
30
|
-
.checkbox-inline+.radio-inline,
|
|
31
|
-
.radio-inline,
|
|
32
|
-
.radio-inline+.radio-inline,
|
|
33
|
-
.radio-inline+.checkbox-inline {
|
|
34
|
-
margin-left: 0;
|
|
35
|
-
margin-right: 10px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.checkbox-inline:last-child,
|
|
39
|
-
.radio-inline:last-child {
|
|
40
|
-
margin-right: 0;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.ng-invalid.ng-touched {
|
|
44
|
-
border: 1px solid #f44336;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@import './tailwind-output.scss';
|
|
48
|
-
@import './daisyui-ng-formworks-themes.scss';
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { DaisyUIFrameworkComponent } from './daisyui-framework.component';
|
|
4
|
-
|
|
5
|
-
describe('DaisyUIFrameworkComponent', () => {
|
|
6
|
-
let component: DaisyUIFrameworkComponent;
|
|
7
|
-
let fixture: ComponentFixture<DaisyUIFrameworkComponent>;
|
|
8
|
-
|
|
9
|
-
beforeEach(() => {
|
|
10
|
-
TestBed.configureTestingModule({
|
|
11
|
-
declarations: [DaisyUIFrameworkComponent]
|
|
12
|
-
});
|
|
13
|
-
fixture = TestBed.createComponent(DaisyUIFrameworkComponent);
|
|
14
|
-
component = fixture.componentInstance;
|
|
15
|
-
fixture.detectChanges();
|
|
16
|
-
});
|
|
17
|
-
|
|
18
|
-
it('should create', () => {
|
|
19
|
-
expect(component).toBeTruthy();
|
|
20
|
-
});
|
|
21
|
-
});
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChangeDetectorRef,
|
|
3
|
-
Component,
|
|
4
|
-
Input,
|
|
5
|
-
OnChanges,
|
|
6
|
-
OnInit,
|
|
7
|
-
ViewEncapsulation
|
|
8
|
-
} from '@angular/core';
|
|
9
|
-
import { JsonSchemaFormService } from '@ng-formworks/core';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* DaisyUI framework for Angular JSON Schema Form.
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
|
-
@Component({
|
|
16
|
-
// tslint:disable-next-line:component-selector
|
|
17
|
-
selector: 'daisyui-framework',
|
|
18
|
-
template: `
|
|
19
|
-
<div>
|
|
20
|
-
<css-framework [layoutNode]="layoutNode"
|
|
21
|
-
[layoutIndex]="layoutIndex"
|
|
22
|
-
[dataIndex]="dataIndex"
|
|
23
|
-
>
|
|
24
|
-
</css-framework>
|
|
25
|
-
</div>
|
|
26
|
-
`,
|
|
27
|
-
styleUrls: ['./daisyui-framework.component.scss'],
|
|
28
|
-
encapsulation:ViewEncapsulation.None
|
|
29
|
-
})
|
|
30
|
-
export class DaisyUIFrameworkComponent implements OnInit, OnChanges {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
frameworkInitialized = false;
|
|
34
|
-
widgetOptions: any; // Options passed to child widget
|
|
35
|
-
widgetLayoutNode: any; // layoutNode passed to child widget
|
|
36
|
-
options: any; // Options used in this framework
|
|
37
|
-
formControl: any = null;
|
|
38
|
-
debugOutput: any = '';
|
|
39
|
-
debug: any = '';
|
|
40
|
-
parentArray: any = null;
|
|
41
|
-
isOrderable = false;
|
|
42
|
-
@Input() layoutNode: any;
|
|
43
|
-
@Input() layoutIndex: number[];
|
|
44
|
-
@Input() dataIndex: number[];
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
constructor(
|
|
49
|
-
public changeDetector: ChangeDetectorRef,
|
|
50
|
-
public jsf: JsonSchemaFormService
|
|
51
|
-
) {
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
ngOnInit() {
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
ngOnChanges() {
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { CommonModule } from '@angular/common';
|
|
2
|
-
import { NgModule } from '@angular/core';
|
|
3
|
-
import { Framework, FrameworkLibraryService, JsonSchemaFormModule, JsonSchemaFormService, WidgetLibraryModule, WidgetLibraryService } from '@ng-formworks/core';
|
|
4
|
-
|
|
5
|
-
import { CssFrameworkModule } from '@ng-formworks/cssframework';
|
|
6
|
-
import { DaisyUIFrameworkComponent } from './daisyui-framework.component';
|
|
7
|
-
import { DaisyUIFrameworkComponentPrefixed } from './daisyui-framework.prefixed.component';
|
|
8
|
-
import { DaisyUIFramework } from './daisyui.framework';
|
|
9
|
-
import { DaisyUITabsComponent } from './widgets/daisyui-tabs.component';
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
@NgModule({
|
|
14
|
-
declarations: [
|
|
15
|
-
DaisyUIFrameworkComponent,
|
|
16
|
-
DaisyUIFrameworkComponentPrefixed,
|
|
17
|
-
DaisyUITabsComponent
|
|
18
|
-
],
|
|
19
|
-
imports: [
|
|
20
|
-
JsonSchemaFormModule,
|
|
21
|
-
CommonModule,
|
|
22
|
-
WidgetLibraryModule,
|
|
23
|
-
CssFrameworkModule
|
|
24
|
-
],
|
|
25
|
-
exports: [
|
|
26
|
-
DaisyUIFrameworkComponent,
|
|
27
|
-
DaisyUIFrameworkComponentPrefixed,
|
|
28
|
-
JsonSchemaFormModule,
|
|
29
|
-
DaisyUITabsComponent
|
|
30
|
-
],
|
|
31
|
-
providers: [
|
|
32
|
-
JsonSchemaFormService,
|
|
33
|
-
FrameworkLibraryService,
|
|
34
|
-
WidgetLibraryService,
|
|
35
|
-
|
|
36
|
-
{ provide: Framework, useClass: DaisyUIFramework, multi: true }
|
|
37
|
-
]
|
|
38
|
-
})
|
|
39
|
-
export class DaisyUIFrameworkModule { }
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
:host ::ng-deep {
|
|
2
|
-
.list-group-item .form-control-feedback {
|
|
3
|
-
top: 40px;
|
|
4
|
-
}
|
|
5
|
-
.checkbox,
|
|
6
|
-
.radio {
|
|
7
|
-
margin-top: 0;
|
|
8
|
-
margin-bottom: 0;
|
|
9
|
-
}
|
|
10
|
-
.checkbox-inline,
|
|
11
|
-
.checkbox-inline+.checkbox-inline,
|
|
12
|
-
.checkbox-inline+.radio-inline,
|
|
13
|
-
.radio-inline,
|
|
14
|
-
.radio-inline+.radio-inline,
|
|
15
|
-
.radio-inline+.checkbox-inline {
|
|
16
|
-
margin-left: 0;
|
|
17
|
-
margin-right: 10px;
|
|
18
|
-
}
|
|
19
|
-
.checkbox-inline:last-child,
|
|
20
|
-
.radio-inline:last-child {
|
|
21
|
-
margin-right: 0;
|
|
22
|
-
}
|
|
23
|
-
.ng-invalid.ng-touched {
|
|
24
|
-
border: 1px solid #f44336;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.checkbox-inline,
|
|
29
|
-
.checkbox-inline+.checkbox-inline,
|
|
30
|
-
.checkbox-inline+.radio-inline,
|
|
31
|
-
.radio-inline,
|
|
32
|
-
.radio-inline+.radio-inline,
|
|
33
|
-
.radio-inline+.checkbox-inline {
|
|
34
|
-
margin-left: 0;
|
|
35
|
-
margin-right: 10px;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
.checkbox-inline:last-child,
|
|
39
|
-
.radio-inline:last-child {
|
|
40
|
-
margin-right: 0;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.ng-invalid.ng-touched {
|
|
44
|
-
border: 1px solid #f44336;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
@import './tailwind-output-prefixed.scss';
|
|
48
|
-
@import './daisyui-ng-formworks-themes-prefixed.scss';
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
ChangeDetectorRef,
|
|
3
|
-
Component,
|
|
4
|
-
Input,
|
|
5
|
-
OnChanges,
|
|
6
|
-
OnInit,
|
|
7
|
-
ViewEncapsulation
|
|
8
|
-
} from '@angular/core';
|
|
9
|
-
import { JsonSchemaFormService } from '@ng-formworks/core';
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* DaisyUI framework for Angular JSON Schema Form.
|
|
13
|
-
*
|
|
14
|
-
*/
|
|
15
|
-
@Component({
|
|
16
|
-
// tslint:disable-next-line:component-selector
|
|
17
|
-
selector: 'daisyui-framework-prefixed',
|
|
18
|
-
template: `
|
|
19
|
-
<div>
|
|
20
|
-
<css-framework [layoutNode]="layoutNode"
|
|
21
|
-
[layoutIndex]="layoutIndex"
|
|
22
|
-
[dataIndex]="dataIndex"
|
|
23
|
-
>
|
|
24
|
-
</css-framework>
|
|
25
|
-
</div>
|
|
26
|
-
`,
|
|
27
|
-
styleUrls: ['./daisyui-framework.prefixed.component.scss'],
|
|
28
|
-
encapsulation:ViewEncapsulation.None
|
|
29
|
-
})
|
|
30
|
-
export class DaisyUIFrameworkComponentPrefixed implements OnInit, OnChanges {
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
frameworkInitialized = false;
|
|
34
|
-
widgetOptions: any; // Options passed to child widget
|
|
35
|
-
widgetLayoutNode: any; // layoutNode passed to child widget
|
|
36
|
-
options: any; // Options used in this framework
|
|
37
|
-
formControl: any = null;
|
|
38
|
-
debugOutput: any = '';
|
|
39
|
-
debug: any = '';
|
|
40
|
-
parentArray: any = null;
|
|
41
|
-
isOrderable = false;
|
|
42
|
-
@Input() layoutNode: any;
|
|
43
|
-
@Input() layoutIndex: number[];
|
|
44
|
-
@Input() dataIndex: number[];
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
constructor(
|
|
49
|
-
public changeDetector: ChangeDetectorRef,
|
|
50
|
-
public jsf: JsonSchemaFormService
|
|
51
|
-
) {
|
|
52
|
-
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
ngOnInit() {
|
|
58
|
-
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
ngOnChanges() {
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
}
|
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
import { TestBed } from '@angular/core/testing';
|
|
2
|
-
|
|
3
|
-
import { DaisyuiFrameworkService } from './daisyui-framework.service';
|
|
4
|
-
|
|
5
|
-
describe('DaisyuiFrameworkService', () => {
|
|
6
|
-
let service: DaisyuiFrameworkService;
|
|
7
|
-
|
|
8
|
-
beforeEach(() => {
|
|
9
|
-
TestBed.configureTestingModule({});
|
|
10
|
-
service = TestBed.inject(DaisyuiFrameworkService);
|
|
11
|
-
});
|
|
12
|
-
|
|
13
|
-
it('should be created', () => {
|
|
14
|
-
expect(service).toBeTruthy();
|
|
15
|
-
});
|
|
16
|
-
});
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
[data-theme="daisyui_leaf"] .dui-btn {
|
|
2
|
-
border-radius: 60% 60% 60% 60%;
|
|
3
|
-
/* - not working for radio groups margin: 2px;*/
|
|
4
|
-
border: 2px solid lightgrey;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
[data-theme="daisyui_leaf"] .tw-dui-btn-sm {
|
|
8
|
-
height: 2.5rem
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
[data-theme="daisyui_leaf"] .leaf {
|
|
12
|
-
/*width: 8em;
|
|
13
|
-
height: 3em;
|
|
14
|
-
*/
|
|
15
|
-
border-radius: 1% 100% 1% 100%;
|
|
16
|
-
rotate: 165deg;
|
|
17
|
-
margin: 2px;
|
|
18
|
-
border: 2px solid lightgrey;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
[data-theme="daisyui_leaf"] .leaf>span {
|
|
22
|
-
display: inline-block;
|
|
23
|
-
rotate: 195deg;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
[data-theme="daisyui_leaf"] .tw-dui-input {
|
|
27
|
-
border-top-left-radius: 9999px;
|
|
28
|
-
border-bottom-right-radius: 9999px
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
[data-theme="daisyui_leaf"] .tw-dui-select {
|
|
32
|
-
border-top-left-radius: 9999px;
|
|
33
|
-
border-bottom-right-radius: 9999px
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
[data-theme="daisyui_default"] .tw-dui-btn {
|
|
37
|
-
border-radius: 9999px
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
[data-theme="daisyui_leaf"] {
|
|
41
|
-
--rounded-btn: 2rem
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
[data-theme="daisyui_leaf"] .tw-dui-border {
|
|
45
|
-
border-radius: 1rem;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/*this rule should apply to the element that has both data-theme="daisyui_leaf"
|
|
50
|
-
and class="border", whereas the previous one applies strictly to
|
|
51
|
-
descendants data-theme="daisyui_leaf" elements having class="border"
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
|
-
.border[data-theme="daisyui_leaf"] {
|
|
55
|
-
border-radius: 1rem;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
[data-theme="daisyui_leaf"] input[type=number] {
|
|
59
|
-
border-top-left-radius: 9999px;
|
|
60
|
-
border-bottom-right-radius: 5000px;
|
|
61
|
-
}
|
|
@@ -1,61 +0,0 @@
|
|
|
1
|
-
[data-theme="daisyui_leaf"] .btn {
|
|
2
|
-
border-radius: 60% 60% 60% 60%;
|
|
3
|
-
/* - not working for radio groups margin: 2px;*/
|
|
4
|
-
border: 2px solid lightgrey;
|
|
5
|
-
}
|
|
6
|
-
|
|
7
|
-
[data-theme="daisyui_leaf"] .btn-sm {
|
|
8
|
-
height: 2.5rem
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
[data-theme="daisyui_leaf"] .leaf {
|
|
12
|
-
/*width: 8em;
|
|
13
|
-
height: 3em;
|
|
14
|
-
*/
|
|
15
|
-
border-radius: 1% 100% 1% 100%;
|
|
16
|
-
rotate: 165deg;
|
|
17
|
-
margin: 2px;
|
|
18
|
-
border: 2px solid lightgrey;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
[data-theme="daisyui_leaf"] .leaf>span {
|
|
22
|
-
display: inline-block;
|
|
23
|
-
rotate: 195deg;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
[data-theme="daisyui_leaf"] .input {
|
|
27
|
-
border-top-left-radius: 9999px;
|
|
28
|
-
border-bottom-right-radius: 9999px
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
[data-theme="daisyui_leaf"] .select {
|
|
32
|
-
border-top-left-radius: 9999px;
|
|
33
|
-
border-bottom-right-radius: 9999px
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
[data-theme="daisyui_default"] .btn {
|
|
37
|
-
border-radius: 9999px
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
[data-theme="daisyui_leaf"] {
|
|
41
|
-
--rounded-btn: 2rem
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
[data-theme="daisyui_leaf"] .border {
|
|
45
|
-
border-radius: 1rem;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
/*this rule should apply to the element that has both data-theme="daisyui_leaf"
|
|
50
|
-
and class="border", whereas the previous one applies strictly to
|
|
51
|
-
descendants data-theme="daisyui_leaf" elements having class="border"
|
|
52
|
-
*/
|
|
53
|
-
|
|
54
|
-
.border[data-theme="daisyui_leaf"] {
|
|
55
|
-
border-radius: 1rem;
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
[data-theme="daisyui_leaf"] input[type=number] {
|
|
59
|
-
border-top-left-radius: 9999px;
|
|
60
|
-
border-bottom-right-radius: 5000px;
|
|
61
|
-
}
|