@quandis/qbo4.ui 4.0.1-CI-20240515-222031 → 4.0.1-CI-20240604-124747

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/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "author": "Quandis, Inc.",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
- "version": "4.0.1-CI-20240515-222031",
6
+ "version": "4.0.1-CI-20240604-124747",
7
7
  "workspaces": [
8
8
  "code"
9
9
  ],
@@ -23,31 +23,31 @@
23
23
  "src/"
24
24
  ],
25
25
  "dependencies": {
26
- "@codemirror/commands": "^6.4.0",
26
+ "@codemirror/commands": "^6.5.0",
27
27
  "@codemirror/lang-html": "^6.4.9",
28
- "@joint/core": "^4.0.2",
29
- "@quandis/qbo4.logging": "^4.0.1-CI-20240407-122601",
28
+ "@joint/core": "^4.0.4",
29
+ "@quandis/qbo4.logging": "^4.0.1-CI-20240528-220411",
30
30
  "bootstrap": "^5.3.3",
31
31
  "bootstrap-icons": "^1.11.3",
32
- "codemirror": "^6.0.1",
32
+ "codemirror": "6.0.1",
33
33
  "lit": "^3.1.3",
34
34
  "reflect-metadata": "^0.2.2",
35
35
  "tsyringe": "^4.8.0",
36
- "zero-md": "^2.5.3"
36
+ "zero-md": "^3.0.0"
37
37
  },
38
38
  "devDependencies": {
39
39
  "@esm-bundle/chai": "^4.3.4",
40
- "@fullhuman/postcss-purgecss": "^5.0.0",
40
+ "@fullhuman/postcss-purgecss": "^6.0.0",
41
41
  "autoprefixer": "^10.4.19",
42
42
  "clean-css": "^5.3.3",
43
- "glob": "^10.3.10",
44
- "html-webpack-plugin": "^5.5.3",
45
- "mini-css-extract-plugin": "^2.7.6",
43
+ "glob": "^10.4.1",
44
+ "html-webpack-plugin": "^5.6.0",
45
+ "mini-css-extract-plugin": "^2.9.0",
46
46
  "postcss": "^8.4.38",
47
47
  "postcss-loader": "^8.1.1",
48
- "sass": "^1.72.0",
49
- "typescript": "^5.4.3",
50
- "webpack": "^5.88.2",
48
+ "sass": "^1.77.4",
49
+ "typescript": "^5.4.5",
50
+ "webpack": "^5.91.0",
51
51
  "webpack-cli": "^5.1.4",
52
52
  "webpack-merge": "^5.10.0"
53
53
  }
@@ -9,7 +9,7 @@ var __metadata = (this && this.__metadata) || function (k, v) {
9
9
  };
10
10
  import { html, LitElement } from 'lit';
11
11
  import { customElement, property } from 'lit/decorators.js';
12
- import { ZeroMd } from 'zero-md';
12
+ import ZeroMd from 'zero-md';
13
13
  const md = ZeroMd;
14
14
  /**
15
15
  * Renders CodeMirror to edit HTML.
@@ -1,6 +1,6 @@
1
1
  import { html, css, LitElement } from 'lit';
2
2
  import { customElement, property } from 'lit/decorators.js';
3
- import { ZeroMd } from 'zero-md'
3
+ import ZeroMd from 'zero-md'
4
4
  const md = ZeroMd;
5
5
  /**
6
6
  * Renders CodeMirror to edit HTML.
@@ -20,7 +20,7 @@ import { QboFormElement, getApiService } from './Program.js';
20
20
  let QboSelect = class QboSelect extends QboFormElement {
21
21
  constructor() {
22
22
  super(...arguments);
23
- this.apiEndpoint = 'qbo';
23
+ this.apiEndpoint = 'default';
24
24
  this.loading = false;
25
25
  this.optionText = null;
26
26
  this.optionValue = null;
@@ -40,8 +40,10 @@ let QboSelect = class QboSelect extends QboFormElement {
40
40
  async connectedCallback() {
41
41
  this.optionText ??= this.optionValue;
42
42
  super.connectedCallback();
43
- const service = getApiService(this.apiEndpoint);
44
- this.jsonData = await service.fetch(null, {});
43
+ if (this.jsonData !== null) {
44
+ const service = getApiService(this.apiEndpoint);
45
+ this.jsonData = await service.fetch(null, {});
46
+ }
45
47
  }
46
48
  createRenderRoot() {
47
49
  return this.renderInHost ? this : super.createRenderRoot();
@@ -14,7 +14,7 @@ import { IApiService, QboFormElement, getApiService } from './Program.js';
14
14
  export class QboSelect extends QboFormElement
15
15
  {
16
16
  @property({ type: String })
17
- apiEndpoint = 'qbo';
17
+ apiEndpoint = 'default';
18
18
 
19
19
  @property({ type: Boolean })
20
20
  loading = false;
@@ -53,9 +53,10 @@ export class QboSelect extends QboFormElement
53
53
  async connectedCallback() {
54
54
  this.optionText ??= this.optionValue;
55
55
  super.connectedCallback();
56
-
57
- const service: IApiService = getApiService(this.apiEndpoint);
58
- this.jsonData = await service.fetch(null, { });
56
+ if (this.jsonData !== null) {
57
+ const service: IApiService = getApiService(this.apiEndpoint);
58
+ this.jsonData = await service.fetch(null, {});
59
+ }
59
60
  }
60
61
 
61
62
  createRenderRoot() {
@@ -8,5 +8,6 @@ export declare class QboCode extends LitElement {
8
8
  get value(): string | undefined;
9
9
  connectedCallback(): Promise<void>;
10
10
  editor: EditorView | null;
11
- render(): void;
11
+ firstUpdated(): Promise<void>;
12
+ render(): import("lit-html").TemplateResult<1>;
12
13
  }
@@ -8,12 +8,11 @@ var __metadata = (this && this.__metadata) || function (k, v) {
8
8
  if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
9
9
  };
10
10
  import 'reflect-metadata';
11
- import { LitElement } from 'lit';
11
+ import { html, LitElement } from 'lit';
12
12
  import { customElement, property } from 'lit/decorators.js';
13
13
  import { basicSetup } from "codemirror";
14
- import { EditorView, keymap } from "@codemirror/view";
14
+ import { EditorView } from "@codemirror/view";
15
15
  import { html as htmlcode } from "@codemirror/lang-html";
16
- import { indentWithTab } from "@codemirror/commands";
17
16
  /**
18
17
  * Renders CodeMirror to edit HTML.
19
18
  */
@@ -27,21 +26,27 @@ let QboCode = class QboCode extends LitElement {
27
26
  async connectedCallback() {
28
27
  super.connectedCallback();
29
28
  }
30
- render() {
29
+ async firstUpdated() {
31
30
  const code = this.querySelector('*[slot=code]')?.innerHTML ?? this.innerHTML;
31
+ console.log('basicSetup: ', basicSetup);
32
+ console.log('htmlcode: ', htmlcode);
32
33
  this.editor ??= new EditorView({
33
34
  doc: code.trim(),
34
35
  extensions: [
35
36
  basicSetup,
36
- htmlcode(),
37
- keymap.of([indentWithTab]),
38
- EditorView.updateListener.of((e) => {
39
- this.dispatchEvent(new CustomEvent('change', { detail: { code: this.value } }));
40
- })
37
+ htmlcode()
38
+ //keymap.of([indentWithTab]),
39
+ //EditorView.updateListener.of((e) => {
40
+ // this.dispatchEvent(new CustomEvent('change', { detail: { code: this.value } }));
41
+ //})
41
42
  ],
42
- parent: this.shadowRoot,
43
+ parent: this.shadowRoot?.querySelector('div')
44
+ // parent: <DocumentFragment>this.shadowRoot,
43
45
  });
44
46
  }
47
+ render() {
48
+ return html `<div></div>`;
49
+ }
45
50
  };
46
51
  __decorate([
47
52
  property(),
@@ -21,20 +21,27 @@ export class QboCode extends LitElement
21
21
 
22
22
  editor: EditorView | null = null;
23
23
 
24
- render() {
24
+ async firstUpdated() {
25
25
  const code = this.querySelector('*[slot=code]')?.innerHTML ?? this.innerHTML;
26
+ console.log('basicSetup: ', basicSetup);
27
+ console.log('htmlcode: ', htmlcode);
26
28
  this.editor ??= new EditorView({
27
29
  doc: code.trim(),
28
30
  extensions: [
29
31
  basicSetup,
30
- htmlcode(),
31
- keymap.of([indentWithTab]),
32
- EditorView.updateListener.of((e) => {
33
- this.dispatchEvent(new CustomEvent('change', { detail: { code: this.value } }));
34
- })
32
+ htmlcode()
33
+ //keymap.of([indentWithTab]),
34
+ //EditorView.updateListener.of((e) => {
35
+ // this.dispatchEvent(new CustomEvent('change', { detail: { code: this.value } }));
36
+ //})
35
37
  ],
36
- parent: <DocumentFragment>this.shadowRoot,
38
+ parent: this.shadowRoot?.querySelector('div') as HTMLElement
39
+ // parent: <DocumentFragment>this.shadowRoot,
37
40
  });
38
41
  }
42
+
43
+ render() {
44
+ return html`<div></div>`;
45
+ }
39
46
  }
40
47