@pie-element/complex-rubric 7.1.2-next.0 → 7.1.2-next.2

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 (52) hide show
  1. package/dist/author/index.js +29 -29
  2. package/dist/browser/author/index.js +1791 -2053
  3. package/dist/browser/author/index.js.map +1 -1
  4. package/dist/index.iife.js +7 -7
  5. package/dist/runtime-support.d.ts +12 -0
  6. package/dist/runtime-support.js +12 -0
  7. package/package.json +12 -9
  8. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_Symbol.js +0 -5
  9. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_apply.js +0 -12
  10. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_arrayLikeKeys.js +0 -15
  11. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseGetTag.js +0 -10
  12. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsArguments.js +0 -9
  13. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsNative.js +0 -11
  14. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseIsTypedArray.js +0 -11
  15. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseKeysIn.js +0 -13
  16. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseRest.js +0 -9
  17. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseSetToString.js +0 -14
  18. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseTimes.js +0 -7
  19. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_baseUnary.js +0 -8
  20. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_coreJsData.js +0 -5
  21. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_defineProperty.js +0 -10
  22. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_freeGlobal.js +0 -4
  23. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getNative.js +0 -9
  24. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getRawTag.js +0 -14
  25. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_getValue.js +0 -6
  26. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIndex.js +0 -8
  27. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isIterateeCall.js +0 -12
  28. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isMasked.js +0 -11
  29. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_isPrototype.js +0 -8
  30. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nativeKeysIn.js +0 -8
  31. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_nodeUtil.js +0 -9
  32. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_objectToString.js +0 -7
  33. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_overRest.js +0 -13
  34. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_root.js +0 -5
  35. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_setToString.js +0 -6
  36. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_shortOut.js +0 -14
  37. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/_toSource.js +0 -15
  38. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/constant.js +0 -8
  39. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js +0 -16
  40. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/eq.js +0 -6
  41. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/identity.js +0 -6
  42. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArguments.js +0 -10
  43. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArray.js +0 -4
  44. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isArrayLike.js +0 -8
  45. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isBuffer.js +0 -6
  46. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isFunction.js +0 -11
  47. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isLength.js +0 -7
  48. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObject.js +0 -7
  49. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isObjectLike.js +0 -6
  50. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/isTypedArray.js +0 -7
  51. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/keysIn.js +0 -9
  52. package/dist/node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/stubFalse.js +0 -6
@@ -1,57 +1,57 @@
1
- import e from "../node_modules/.bun/lodash-es@4.18.1/node_modules/lodash-es/defaults.js";
2
- import t from "./main.js";
3
- import n from "./defaults.js";
4
- import { ModelUpdatedEvent as r } from "@pie-element/shared-configure-events";
5
- import i from "react";
6
- import { createRoot as a } from "react-dom/client";
7
- import o from "@pie-element/rubric/author";
8
- import s from "@pie-element/multi-trait-rubric/author";
9
- import c from "debug";
1
+ import e from "./main.js";
2
+ import t from "./defaults.js";
3
+ import { ModelUpdatedEvent as n } from "@pie-element/shared-configure-events";
4
+ import r from "react";
5
+ import { createRoot as i } from "react-dom/client";
6
+ import a from "@pie-element/rubric/author";
7
+ import o from "@pie-element/multi-trait-rubric/author";
8
+ import s from "debug";
9
+ import { defaults as c } from "@pie-element/shared-lodash";
10
10
  //#region src/author/index.ts
11
- var l = r.TYPE, u = "rubric-configure", d = "multi-trait-rubric-configure", f = class extends o {}, p = class extends s {};
11
+ var l = n.TYPE, u = "rubric-configure", d = "multi-trait-rubric-configure", f = class extends a {}, p = class extends o {};
12
12
  customElements.get(u) || customElements.define(u, f), customElements.get(d) || customElements.define(d, p);
13
- var m = (t, r) => ({
14
- configuration: e(t, n.configuration),
15
- model: r
16
- }), h = class e extends HTMLElement {
17
- static createDefaultModel = ({ rubrics: { simpleRubric: e = {}, rubricless: t = {}, multiTraitRubric: r = {} } = {
13
+ var m = (e, n) => ({
14
+ configuration: c(e, t.configuration),
15
+ model: n
16
+ }), h = class a extends HTMLElement {
17
+ static createDefaultModel = ({ rubrics: { simpleRubric: e = {}, rubricless: n = {}, multiTraitRubric: r = {} } = {
18
18
  simpleRubric: {},
19
19
  rubricless: {},
20
20
  multiTraitRubric: {}
21
21
  }, ...i } = {}, a = {}) => ({
22
- ...n?.model || {},
22
+ ...t?.model || {},
23
23
  ...a,
24
24
  ...i,
25
25
  rubrics: {
26
26
  simpleRubric: {
27
- ...(n?.model?.rubrics || {}).simpleRubric,
27
+ ...(t?.model?.rubrics || {}).simpleRubric,
28
28
  ...(a.rubrics || {}).simpleRubric,
29
29
  ...e
30
30
  },
31
31
  multiTraitRubric: {
32
- ...(n?.model?.rubrics || {}).multiTraitRubric,
32
+ ...(t?.model?.rubrics || {}).multiTraitRubric,
33
33
  ...(a.rubrics || {}).multiTraitRubric,
34
34
  ...r
35
35
  },
36
36
  rubricless: {
37
- ...(n?.model?.rubrics || {}).rubricless,
37
+ ...(t?.model?.rubrics || {}).rubricless,
38
38
  ...(a.rubrics || {}).rubricless,
39
- ...t
39
+ ...n
40
40
  }
41
41
  }
42
42
  });
43
43
  constructor() {
44
- super(), this._root = null, this.canUpdateModel = !1, c.log("constructor called"), this._model = e.createDefaultModel(), this._configuration = n.configuration, this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
44
+ super(), this._root = null, this.canUpdateModel = !1, s.log("constructor called"), this._model = a.createDefaultModel(), this._configuration = t.configuration, this.onConfigurationChanged = this.onConfigurationChanged.bind(this);
45
45
  }
46
- set model(t) {
47
- this._model = e.createDefaultModel(t, this._model), this.canUpdateModel = !0, this._render();
46
+ set model(e) {
47
+ this._model = a.createDefaultModel(e, this._model), this.canUpdateModel = !0, this._render();
48
48
  }
49
49
  dispatchModelUpdated(e) {
50
50
  let t = !!e;
51
- this.dispatchEvent(new r(this._model, t));
51
+ this.dispatchEvent(new n(this._model, t));
52
52
  }
53
- onModelChanged = (t, n) => {
54
- this._model = e.createDefaultModel(t, this._model), this.dispatchModelUpdated(n), this._render();
53
+ onModelChanged = (e, t) => {
54
+ this._model = a.createDefaultModel(e, this._model), this.dispatchModelUpdated(t), this._render();
55
55
  };
56
56
  set configuration(e) {
57
57
  let t = m(e, this._model);
@@ -64,20 +64,20 @@ var m = (t, r) => ({
64
64
  if (e.target === this) return;
65
65
  e.preventDefault(), e.stopImmediatePropagation();
66
66
  let t = e.target && e.target.getAttribute("id");
67
- t && (e.update && (this._model.rubrics[t] = e.update), this.dispatchEvent(new r(this._model)));
67
+ t && (e.update && (this._model.rubrics[t] = e.update), this.dispatchEvent(new n(this._model)));
68
68
  };
69
69
  connectedCallback() {
70
70
  this.addEventListener(l, this.onModelUpdated), this._render();
71
71
  }
72
72
  _render() {
73
- let e = i.createElement(t, {
73
+ let t = r.createElement(e, {
74
74
  model: this._model,
75
75
  configuration: this._configuration,
76
76
  onModelChanged: this.onModelChanged,
77
77
  onConfigurationChanged: this.onConfigurationChanged,
78
78
  canUpdateModel: this.canUpdateModel
79
79
  });
80
- this._root ||= a(this), this._root.render(e);
80
+ this._root ||= i(this), this._root.render(t);
81
81
  }
82
82
  disconnectedCallback() {
83
83
  this.removeEventListener(l, this.onModelUpdated), this._root && this._root.unmount();