mount-observer 0.0.66 → 0.0.68

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/MountObserver.js CHANGED
@@ -423,7 +423,11 @@ export class MountObserver extends EventTarget {
423
423
  this.#mount(elsToMount, initializing);
424
424
  }
425
425
  async #inspectWithin(within, initializing) {
426
- await bindish(within, within, { assigner: this.#mountInit.assigner });
426
+ //the line below had an await for bindish, consistent with the rest of the code, but it was
427
+ //getting into a catch-22 scenario frequently, blocking the code for resuming.
428
+ //This was observed with per-each package, demo/ScopeScript.html, clicking refresh a few times
429
+ //one will see the inconsistent behavior if await is added below.
430
+ bindish(within, within, { assigner: this.#mountInit.assigner });
427
431
  await this.composeFragment(within, 0);
428
432
  const match = await this.#selector();
429
433
  const els = Array.from(within.querySelectorAll(match));
package/MountObserver.ts CHANGED
@@ -442,7 +442,11 @@ export class MountObserver extends EventTarget implements IMountObserver{
442
442
  }
443
443
 
444
444
  async #inspectWithin(within: Node, initializing: boolean){
445
- await bindish(within as DocumentFragment, within, {assigner: this.#mountInit.assigner});
445
+ //the line below had an await for bindish, consistent with the rest of the code, but it was
446
+ //getting into a catch-22 scenario frequently, blocking the code for resuming.
447
+ //This was observed with per-each package, demo/ScopeScript.html, clicking refresh a few times
448
+ //one will see the inconsistent behavior if await is added below.
449
+ bindish(within as DocumentFragment, within, {assigner: this.#mountInit.assigner});
446
450
  await this.composeFragment(within as DocumentFragment, 0);
447
451
  const match = await this.#selector();
448
452
  const els = Array.from((within as Element).querySelectorAll(match));
package/Newish.ts CHANGED
@@ -48,7 +48,7 @@ export class Newish implements EventListenerObject {
48
48
  ce = isInstance ? initPropVals : new resolvedConstructor() as Ishcycle;
49
49
  if(initPropVals !== undefined && !isInstance) this.queue.push(initPropVals);
50
50
  }else{
51
- ce = new ctr();
51
+ ce = new (ctr as any)();
52
52
  if(initPropVals !== undefined) this.queue.push(initPropVals);
53
53
  }
54
54
  if('tbd' in ce && typeof ce['tbd'] === 'function'){
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mount-observer",
3
- "version": "0.0.66",
3
+ "version": "0.0.68",
4
4
  "description": "Observe and act on css matches.",
5
5
  "main": "MountObserver.js",
6
6
  "module": "MountObserver.js",
package/refid/regIsh.js CHANGED
@@ -23,11 +23,5 @@ export function regIsh(scope, name, ctr) {
23
23
  }
24
24
  };
25
25
  };
26
- ctr.prototype['#arr='] = function (newArr) {
27
- if (newArr === undefined) {
28
- return this[arr];
29
- }
30
- this[arr] = newArr;
31
- };
32
26
  document.dispatchEvent(new Event(guid));
33
27
  }
package/refid/regIsh.ts CHANGED
@@ -26,11 +26,6 @@ export function regIsh(scope: Element | ShadowRoot | Document, name: string, ctr
26
26
  }
27
27
  };
28
28
  };
29
- ctr.prototype['#arr='] = function(newArr?: any[]){
30
- if(newArr === undefined){
31
- return this[arr];
32
- }
33
- this[arr] = newArr;
34
- }
29
+
35
30
  document.dispatchEvent(new Event(guid));
36
31
  }
@@ -216,7 +216,7 @@ export interface BindishOptions{
216
216
  * to indicate that the initial
217
217
  */
218
218
  csr?: boolean,
219
- ctr?: {new() : Ishcycle},
219
+ ctr?: IshCtr,
220
220
  initPropVals?: any,
221
221
  }
222
222
 
@@ -12,7 +12,8 @@ export interface EndUserProps extends IEnhancement{
12
12
  export interface AllProps extends EndUserProps{
13
13
  listProp: string;
14
14
  itemProp: string;
15
- ish: EventTarget & HasIshList;
15
+ ish: HasIshList;
16
+ ishContainer: Element;
16
17
  itemTemplate: HTMLTemplateElement;
17
18
  emc: any;
18
19
  //updateCnt: number;
@@ -191,6 +191,7 @@ export interface IshConfig<TProps = any, TActions = TProps, ETProps = TProps>{
191
191
  xform?: XForm<TProps, TActions>;
192
192
  inScopeXForms?: {[key: CSSQuery]: XForm<TProps, TActions>};
193
193
  ishListCountProp?: keyof TProps & string;
194
+ defaultIshList?: any[];
194
195
  }
195
196
  export interface OConfig<TProps = any, TActions = TProps, ETProps = TProps> extends IshConfig<TProps, TActions, ETProps>{
196
197
  mainTemplate?: string | HTMLTemplateElement;
@@ -556,7 +556,8 @@ export type StringWithAutocompleteOptions<TOptions> =
556
556
  | TOptions;
557
557
 
558
558
  export interface Clone$Options{
559
- ish: EventTarget & HasIshList
559
+ ish: HasIshList,
560
+ ishContainer: Element,
560
561
  seedEl: Element,
561
562
  idxStart: number,
562
563
  itemProp: string,
@@ -564,4 +565,6 @@ export interface Clone$Options{
564
565
  itemTemplate: HTMLTemplateElement;
565
566
  baseCrumb: string,
566
567
  idleTimeout: number,
568
+ //model?: any,
569
+ listProp?: string,
567
570
  }