simple-boot-front 1.0.118 → 1.0.120

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.
Files changed (55) hide show
  1. package/.idea/dataSources.xml +12 -0
  2. package/.idea/inspectionProfiles/Project_Default.xml +6 -0
  3. package/.idea/jpa-buddy.xml +6 -0
  4. package/.idea/misc.xml +8 -0
  5. package/.idea/modules.xml +8 -0
  6. package/.idea/simple-boot-front.iml +9 -0
  7. package/.idea/vcs.xml +8 -0
  8. package/README.MD +6 -383
  9. package/package.json +11 -5
  10. package/SimpleBootFront.d.ts +0 -36
  11. package/SimpleBootFront.js +0 -325
  12. package/decorators/Component.d.ts +0 -11
  13. package/decorators/Component.js +0 -35
  14. package/decorators/Script.d.ts +0 -9
  15. package/decorators/Script.js +0 -31
  16. package/decorators/inject/InjectFrontSituationType.d.ts +0 -0
  17. package/decorators/inject/InjectFrontSituationType.js +0 -1
  18. package/fetch/Fetcher.d.ts +0 -4
  19. package/fetch/Fetcher.js +0 -9
  20. package/lifecycle/OnChangedRender.d.ts +0 -3
  21. package/lifecycle/OnChangedRender.js +0 -2
  22. package/lifecycle/OnDestroy.d.ts +0 -3
  23. package/lifecycle/OnDestroy.js +0 -2
  24. package/lifecycle/OnFinish.d.ts +0 -3
  25. package/lifecycle/OnFinish.js +0 -2
  26. package/lifecycle/OnInit.d.ts +0 -8
  27. package/lifecycle/OnInit.js +0 -2
  28. package/lifecycle/OnInitedChild.d.ts +0 -3
  29. package/lifecycle/OnInitedChild.js +0 -2
  30. package/option/SimFrontOption.d.ts +0 -14
  31. package/option/SimFrontOption.js +0 -45
  32. package/script/ScriptRunnable.d.ts +0 -7
  33. package/script/ScriptRunnable.js +0 -22
  34. package/service/CookieService.d.ts +0 -11
  35. package/service/CookieService.js +0 -54
  36. package/service/HttpService.d.ts +0 -3
  37. package/service/HttpService.js +0 -23
  38. package/service/MetaTagService.d.ts +0 -11
  39. package/service/MetaTagService.js +0 -52
  40. package/service/Navigation.d.ts +0 -18
  41. package/service/Navigation.js +0 -117
  42. package/service/ScriptService.d.ts +0 -7
  43. package/service/ScriptService.js +0 -39
  44. package/service/StorageService.d.ts +0 -12
  45. package/service/StorageService.js +0 -67
  46. package/service/view/View.d.ts +0 -6
  47. package/service/view/View.js +0 -29
  48. package/service/view/ViewService.d.ts +0 -7
  49. package/service/view/ViewService.js +0 -46
  50. package/throwable/RouterError.d.ts +0 -4
  51. package/throwable/RouterError.js +0 -27
  52. package/throwable/RouterIntentError.d.ts +0 -4
  53. package/throwable/RouterIntentError.js +0 -27
  54. package/throwable/RouterNotFount.d.ts +0 -4
  55. package/throwable/RouterNotFount.js +0 -27
@@ -0,0 +1,12 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="DataSourceManagerImpl" format="xml" multifile-model="true">
4
+ <data-source source="LOCAL" name="@localhost" uuid="7c47491e-bb76-4297-a573-4a7266d42a83">
5
+ <driver-ref>mariadb</driver-ref>
6
+ <synchronize>true</synchronize>
7
+ <jdbc-driver>org.mariadb.jdbc.Driver</jdbc-driver>
8
+ <jdbc-url>jdbc:mariadb://localhost:3306</jdbc-url>
9
+ <working-dir>$ProjectFileDir$</working-dir>
10
+ </data-source>
11
+ </component>
12
+ </project>
@@ -0,0 +1,6 @@
1
+ <component name="InspectionProjectProfileManager">
2
+ <profile version="1.0">
3
+ <option name="myName" value="Project Default" />
4
+ <inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
5
+ </profile>
6
+ </component>
@@ -0,0 +1,6 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="JpaBuddyIdeaProjectConfig">
4
+ <option name="renamerInitialized" value="true" />
5
+ </component>
6
+ </project>
package/.idea/misc.xml ADDED
@@ -0,0 +1,8 @@
1
+ <project version="4">
2
+ <component name="ProjectRootManager">
3
+ <output url="file://$PROJECT_DIR$/out" />
4
+ </component>
5
+ <component name="ProjectType">
6
+ <option name="id" value="jpab" />
7
+ </component>
8
+ </project>
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="ProjectModuleManager">
4
+ <modules>
5
+ <module fileurl="file://$PROJECT_DIR$/.idea/simple-boot-front.iml" filepath="$PROJECT_DIR$/.idea/simple-boot-front.iml" />
6
+ </modules>
7
+ </component>
8
+ </project>
@@ -0,0 +1,9 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <module type="JAVA_MODULE" version="4">
3
+ <component name="NewModuleRootManager" inherit-compiler-output="true">
4
+ <exclude-output />
5
+ <content url="file://$MODULE_DIR$" />
6
+ <orderEntry type="inheritedJdk" />
7
+ <orderEntry type="sourceFolder" forTests="false" />
8
+ </component>
9
+ </module>
package/.idea/vcs.xml ADDED
@@ -0,0 +1,8 @@
1
+ <?xml version="1.0" encoding="UTF-8"?>
2
+ <project version="4">
3
+ <component name="VcsDirectoryMappings">
4
+ <mapping directory="" vcs="Git" />
5
+ <mapping directory="$PROJECT_DIR$/libs/dom-render" vcs="Git" />
6
+ <mapping directory="$PROJECT_DIR$/libs/simple-boot-core" vcs="Git" />
7
+ </component>
8
+ </project>
package/README.MD CHANGED
@@ -1,388 +1,11 @@
1
- ![Single Page Application Framworks](assets/banner.png)
2
- ![typescript](https://img.shields.io/badge/-typescript-black?logo=typescript) [![npm](https://img.shields.io/badge/-npm-black?logo=npm)](https://www.npmjs.com/package/simple-boot-front) [![license](https://img.shields.io/badge/license-MIT-green)](LICENSE.md) [![Chat](https://img.shields.io/badge/discord-20%20online-brightgreen?logo=discord)](https://discord.gg/PW56dpns) [![Github](https://img.shields.io/badge/-github-black?logo=github)](https://github.com/visualkhh/simple-boot-front)
1
+ # ⚠️ This repository is no longer maintained ⚠️
3
2
 
4
- **Our primary goals are**
5
- * Single Page Application Framworks for Web
6
- * Provide a radically faster and widely accessible getting started experience for all front end.
3
+ This project has been moved to a new repository. Please visit the new repository for the latest updates, to report issues, or to contribute.
7
4
 
8
- ### dependencies
9
- * dom-render [![npm](https://img.shields.io/badge/-npm-black?logo=npm)](https://www.npmjs.com/package/dom-render)
10
- * simple-boot-core [![npm](https://img.shields.io/badge/-npm-black?logo=npm)](https://www.npmjs.com/package/simple-boot-core)
5
+ **New Repository:** https://github.com/dooboostore-develop/packages
11
6
 
7
+ **New NPM Package:** https://www.npmjs.com/package/@dooboostore/simple-boot-front
12
8
 
13
- # [📄 introduction page 🔗](https://simple-boot-front.github.io)
14
- - [https://simple-boot-front.github.io](https://simple-boot-front.github.io)
9
+ While this package may still be available on npm, it will no longer receive updates. Please update your dependencies to point to the new package if available.
15
10
 
16
-
17
- ---
18
- # 🚀 Quick start cli
19
- ```shell
20
- npm init simple-boot-front projectname
21
- cd projectname
22
- npm start
23
- # open browser: http://localhost:4500
24
- ```
25
-
26
- # 😃 examples, templates
27
- - [templates](./templates)
28
- - [examples](./examples)
29
-
30
- # directory structure
31
- ```
32
- ┌─ assets
33
- ├─ dist (out put directory)
34
- ├─ src (source)
35
- │ ├─ pages (your pages)
36
- │ │ ├ home.ts (sample page)
37
- │ │ └ user.ts (sample page)
38
- │ ├─ index.css (index route page css)
39
- │ ├─ index.html (index route page template)
40
- │ └─ index.ts (simple-boot-fornt start and route point)
41
- ├─ types (typescript type)
42
- │ └ index.d.ts (type definition)
43
- ├─ index.html start (point html)
44
- ├─ package.json (project config)
45
- ├─ rollup.config.js (rollup bundler config)
46
- └─ tsconfig.json (typescript config)
47
- ```
48
-
49
- ## source
50
- * simple-boot-front start and route point (set: ts, html, css)
51
- <details>
52
- <summary>pages/home.ts<strong>🔻(click)</strong></summary>
53
-
54
- ```typescript
55
- @Sim
56
- @Component({
57
- template: '<div>home</div>'
58
- })
59
- export class Home {
60
-
61
- }
62
- ```
63
- </details>
64
- <details>
65
- <summary>pages/user.ts<strong>🔻(click)</strong></summary>
66
-
67
- ```typescript
68
- @Sim
69
- @Component({
70
- template: '<div>user</div>'
71
- })
72
- export class User {
73
-
74
- }
75
- ```
76
- </details>
77
- <details>
78
- <summary>index.html<strong>🔻(click)</strong></summary>
79
-
80
- ```html
81
- <header>
82
- <nav>
83
- <ul>
84
- <li>
85
- <button router-link="/">home</button>
86
- </li>
87
- <li>
88
- <button router-link="/user">user</button>
89
- </li>
90
- </ul>
91
- </nav>
92
-
93
- </header>
94
- <main>
95
- <router dr-this="this.child" dr-this:type="outlet" dr-strip="false"></router>
96
- </main>
97
- <footer>
98
- footer
99
- </footer>
100
- ```
101
- </details>
102
-
103
- <details>
104
- <summary>index.css<strong>🔻(click)</strong></summary>
105
-
106
- ```css
107
- header, footer, main {
108
- border: #333333 1px solid;
109
- padding: 20px;
110
- margin: 20px;
111
- }
112
- ```
113
- </details>
114
-
115
- index.ts ▼
116
- ```typescript
117
- import template from './index.html'
118
- import style from './index.css'
119
- @Sim
120
- @Router({
121
- path: '',
122
- route: {
123
- '/': Home,
124
- '/user': User
125
- }
126
- })
127
- @Component({
128
- template,
129
- styles: [style]
130
- })
131
- export class Index implements RouterAction {
132
- child?: any;
133
- async canActivate(url: any, module: any) {
134
- this.child = module;
135
- }
136
- }
137
-
138
- const config = new SimFrontOption(window).setUrlType(UrlType.hash);
139
- const simpleApplication = new SimpleBootFront(Index, config);
140
- simpleApplication.run();
141
- ```
142
-
143
- ## Decorator
144
- <details>
145
- <summary>@Sim<strong>🔻(click)</strong></summary>
146
-
147
- Objects managed by the SimpleBootFront framework
148
- - parameter: SimConfig {schema: string}
149
-
150
- ```typescript
151
- @Sim({scheme: 'index'})
152
- ```
153
- </details>
154
-
155
-
156
- <details>
157
- <summary>@Component<strong>🔻(click)</strong></summary>
158
-
159
-
160
- ```html
161
- <!--template.html-->
162
- <h1>${this.title}</h1>
163
- <div>#innerHTML#</div>
164
- ```
165
- ```typescript
166
- import template from './index.html'
167
- import style from './index.css'
168
- @Sim
169
- @Component({
170
- selector: 'index', // default class name LowerCase
171
- template,
172
- styles: [style]
173
- })
174
- export class Index {
175
- public title = ''
176
- public setData(title: string) {
177
- this.title = title;
178
- }
179
- }
180
- ```
181
- ### using
182
- ```typescript
183
- constructor(index: Index){...}
184
- ```
185
- ```html
186
- <index></index>
187
- <!-- dr-set: $index.setData('data'); $element, $innerHTML, $attributes -->
188
- <index dr-set="$index.setData('hello component')">
189
- <ul>
190
- <li>content</li>
191
- </ul>
192
- </index>
193
- ```
194
- </details>
195
-
196
- <details>
197
- <summary>@Router<strong>🔻(click)</strong></summary>
198
-
199
- ```typescript
200
- import template from './index.html'
201
- import style from './index.css'
202
- @Sim
203
- @Router({
204
- path: '',
205
- route: {
206
- '/': Home,
207
- '/user': User,
208
- '/user/{id}': UserDetail
209
- }
210
- })
211
- @Component({
212
- template,
213
- styles: [style]
214
- })
215
- export class Index implements RouterAction {
216
- child?: any;
217
- canActivate(url: any, module: any): void {
218
- this.child = module;
219
- }
220
- }
221
- ```
222
-
223
- ### activeRoute
224
- ```typescript
225
- constructor(routerManager: RouterManager){
226
- // get path data
227
- routerManager.activeRouterModule.pathData.id; // /user/:id
228
- }
229
- ```
230
-
231
- ### component include
232
- ```html
233
- <route component="this.child"></route>
234
- ```
235
-
236
-
237
- ### router option
238
- - attribute
239
- - **router-active-class**: url === href attribute => class add (a-classname, b-classname)
240
- - value: add and remove class name
241
- - **router-inactive-class**: url !== href attribute => class add (a-classname, b-classname)
242
- - value: add and remove class name
243
- ```html
244
- <a router-link="/home" router-active-class="active" router-inactive-class="inactive">home</a>
245
- ```
246
- - **router-link**:
247
- - value: router link
248
-
249
- </details>
250
-
251
- <details>
252
- <summary>@Script<strong>🔻(click)</strong></summary>
253
-
254
- ```typescript
255
- @Sim({scheme: 'i18nScript'})
256
- @Script({
257
- name: 'i18n'
258
- })
259
- export class I18nScript extends ScriptRunnable {
260
- public language?: Language;
261
- constructor(public i18nService: I18nService) {
262
- super();
263
- i18nService.subject.subscribe(it => {
264
- this.language = it;
265
- this.render(); // <-- ref target rerender
266
- })
267
- }
268
- run(key: string): any {
269
- return this.language?.defaultData?.[key] ?? key;
270
- }
271
- }
272
- ```
273
- ### using script
274
- ```typescript
275
- counstructor(i18nScript: I18nScript) {...}
276
- counstructor(scriptService: ScriptService) {
277
- const i18nScript = scriptService.getScript('i18n');
278
- }
279
- ```
280
- ```html
281
- <div>${$scripts.i18n('Get Locale JSON')}</div>
282
- <div dr-if="$scripts.i18n('Get Locale JSON') === 'wow'"> is wow</div>
283
- ```
284
-
285
- </details>
286
-
287
- <details>
288
- <summary>@PostConstruct<strong>🔻(click)</strong></summary>
289
-
290
- Methods that you run for a separate initialization operation after the object is created
291
-
292
- ```typescript
293
- @PostConstruct
294
- post(projectService: ProjectService) {
295
- console.log('post Construct and dependency injection')
296
- }
297
- ```
298
- </details>
299
-
300
-
301
- <details>
302
- <summary>@After, @Before (AOP)<strong>🔻(click)</strong></summary>
303
-
304
- ```typescript
305
- fire($event: MouseEvent, view: View<Element>) {
306
- console.log('fire method')
307
- this.data = RandomUtils.random(0, 100);
308
- }
309
-
310
- @Before({property: 'fire'})
311
- before(obj: any, protoType: Function) {
312
- console.log('before', obj, protoType)
313
- }
314
-
315
- @After({property: 'fire'})
316
- after(obj: any, protoType: Function) {
317
- console.log('after', obj, protoType)
318
- }
319
- ```
320
- </details>
321
-
322
- <details>
323
- <summary>@ExceptionHandler<strong>🔻(click)</strong></summary>
324
-
325
- ```typescript
326
- @ExceptionHandler(TypeError)
327
- public exceptionTypeError(e: TypeError) {
328
- console.log('TypeError exception:')
329
- }
330
-
331
- @ExceptionHandler(SimError)
332
- public exception1(e: SimError) {
333
- console.log('SimError exception:')
334
- }
335
-
336
- @ExceptionHandler(RouterError)
337
- public exception3(e: RouterError) {
338
- console.log('NotFountRoute exception:')
339
- }
340
-
341
- @ExceptionHandler(SimNoSuch)
342
- public exception2(e: SimNoSuch) {
343
- console.log('NoSuchSim exception:')
344
- }
345
- ```
346
- </details>
347
-
348
-
349
- # Framework Core (simple-boot-core)
350
- [![npm version](https://img.shields.io/badge/-npm-black?logo=npm)](https://www.npmjs.com/package/simple-boot-core) [![Github](https://img.shields.io/badge/-github-black?logo=github)](https://github.com/visualkhh/simple-boot-core)
351
- * Object management.
352
- * Dependency Injection (DI)
353
- * Life cycle provided.
354
- * Aspect Oriented Programming (AOP)
355
- * ExceptionHandler (Global or Local)
356
- * Router System
357
- * Intent Event System
358
-
359
-
360
- # View template engine (dom-render)
361
- [![npm version](https://img.shields.io/badge/-npm-black?logo=npm)](https://www.npmjs.com/package/dom-render) [![Github](https://img.shields.io/badge/-github-black?logo=github)](https://github.com/visualkhh/dom-render)
362
- * view template engine
363
- * Dom control and reorder and render
364
- * all internal variables are managed by proxy. (DomRenderProxy)
365
-
366
- ----
367
-
368
-
369
-
370
- # LifeCycle
371
- ## Module LifeCycle interface
372
- * LifeCycle
373
- - onCreate(): Sim onCreate just one call
374
- * OnChangedRender
375
- - onChangedRender(): change rended in module event
376
- * OnFinish
377
- - onFinish(): lifecycle finish event
378
- * OnInit
379
- - onInit(): module load event
380
- * OnDestroy
381
- - onDestroy(): module destroy event
382
- * OnInitedChild
383
- - onInitedChild(): module and child module inited event
384
-
385
- ----
386
- # License
387
- * MIT
388
- * visualkhh@gmail.com
11
+ ---
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "simple-boot-front",
3
- "version": "1.0.118",
3
+ "version": "1.0.120",
4
4
  "main": "SimpleApplication.js",
5
5
  "license": "MIT",
6
6
  "description": "front end SPA frameworks",
@@ -47,10 +47,16 @@
47
47
  }
48
48
  }
49
49
  },
50
+ "workspaces": [
51
+ "libs/dom-render/dist",
52
+ "libs/simple-boot-core/dist",
53
+ "../dom-render/dist",
54
+ "../simple-boot-core/dist"
55
+ ],
50
56
  "scripts": {
51
57
  "build": "rm -rf dist && tsc --outDir dist --declarationDir dist",
52
- "npm-build": "rm -rf dist && mkdir dist && cp package-prod.json dist/package.json && cp README.MD dist && tsc --outDir dist --declarationDir dist",
53
- "npm-publish": "npm run npm-build && npm publish ./dist",
58
+ "npm:build": "rm -rf dist && mkdir dist && cp package-prod.json dist/package.json && cp README.MD dist && tsc --outDir dist --declarationDir dist",
59
+ "npm:publish": "npm run npm:build && npm publish ./dist",
54
60
  "tsc": "tsc",
55
61
  "tsc:watch": "rm -rf ./dist && mkdir dist && cp package.json dist && tsc --watch --outDir dist --declarationDir dist --sourceMap true",
56
62
  "build:ts:watch": "rm -rf ./dist && mkdir dist && cp package-prod.json dist/package.json && tsc --watch --outDir dist --declarationDir dist --sourceMap true",
@@ -72,7 +78,7 @@
72
78
  "typescript": "^4.4.3"
73
79
  },
74
80
  "dependencies": {
75
- "dom-render": "^1.0.93",
76
- "simple-boot-core": "^1.0.41"
81
+ "dom-render": "^1.0.97",
82
+ "simple-boot-core": "^1.0.42"
77
83
  }
78
84
  }
@@ -1,36 +0,0 @@
1
- import { SimFrontOption } from './option/SimFrontOption';
2
- import { ConstructorType } from 'simple-boot-core/types/Types';
3
- import { SimAtomic } from 'simple-boot-core/simstance/SimAtomic';
4
- import { SimpleApplication } from 'simple-boot-core/SimpleApplication';
5
- import { Navigation } from './service/Navigation';
6
- import { HttpService } from './service/HttpService';
7
- import { SimstanceManager } from 'simple-boot-core/simstance/SimstanceManager';
8
- import { IntentManager } from 'simple-boot-core/intent/IntentManager';
9
- import { RouterManager } from 'simple-boot-core/route/RouterManager';
10
- import { Config } from 'dom-render/configs/Config';
11
- import { TargetAttr } from 'dom-render/configs/TargetAttr';
12
- import { TargetElement } from 'dom-render/configs/TargetElement';
13
- import { RouterModule } from 'simple-boot-core/route/RouterModule';
14
- export declare class SimpleBootFront extends SimpleApplication {
15
- rootRouter: ConstructorType<any>;
16
- option: SimFrontOption;
17
- navigation: Navigation;
18
- domRendoerExcludeProxy: (typeof SimFrontOption | typeof SimstanceManager | typeof IntentManager | typeof RouterManager | typeof Navigation | typeof HttpService)[];
19
- domRenderTargetElements: TargetElement[];
20
- domRenderTargetAttrs: TargetAttr[];
21
- domRenderConfig: Config;
22
- constructor(rootRouter: ConstructorType<any>, option: SimFrontOption);
23
- getComponentInnerHtml(targetObj: any, id: string): string;
24
- createDomRender<T extends object>(obj: T): T;
25
- private initRun;
26
- initWriteRootRouter(): void;
27
- writeRootRouter(): SimAtomic<any>;
28
- goRouting(url: string): Promise<RouterModule<SimAtomic<object>, any>>;
29
- runRouting(otherInstanceSim?: Map<ConstructorType<any>, any>, url?: string): Promise<RouterModule<SimAtomic<Object>, any> | undefined>;
30
- run(otherInstanceSim?: Map<ConstructorType<any>, any>, url?: string): SimstanceManager;
31
- private afterSetting;
32
- initDomRenderScripts(): void;
33
- private initDomRenderTargetElements;
34
- getSimstanceManager(): SimstanceManager;
35
- go(url: string): void;
36
- }