@rhtml/modifiers 0.0.103 → 0.0.106
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/dist/angular/if.js +1 -1
- package/dist/angular/if.js.map +1 -1
- package/dist/angular/index.d.ts +2 -2
- package/dist/angular/index.js +3 -1
- package/dist/angular/index.js.map +1 -1
- package/dist/angular/ng-for.d.ts +10 -0
- package/dist/angular/ng-for.js +59 -0
- package/dist/angular/ng-for.js.map +1 -0
- package/dist/angular/registry.d.ts +3 -0
- package/dist/angular/registry.js +22 -0
- package/dist/angular/registry.js.map +1 -0
- package/dist/layout/flex-fill.d.ts +0 -3
- package/dist/layout/flex-fill.js +0 -5
- package/dist/layout/flex-fill.js.map +1 -1
- package/dist/layout/flex-order.d.ts +0 -3
- package/dist/layout/flex-order.js +0 -5
- package/dist/layout/flex-order.js.map +1 -1
- package/dist/layout/flex.d.ts +0 -3
- package/dist/layout/flex.js +0 -5
- package/dist/layout/flex.js.map +1 -1
- package/dist/layout/index.d.ts +2 -9
- package/dist/layout/index.js +2 -0
- package/dist/layout/index.js.map +1 -1
- package/dist/layout/layout.js +1 -4
- package/dist/layout/layout.js.map +1 -1
- package/dist/layout/registry.d.ts +3 -0
- package/dist/layout/registry.js +22 -0
- package/dist/layout/registry.js.map +1 -0
- package/package.json +2 -2
- package/src/angular/if.ts +1 -1
- package/src/angular/index.ts +3 -1
- package/src/angular/ng-for.ts +50 -0
- package/src/angular/registry.ts +13 -0
- package/src/layout/flex-fill.ts +0 -6
- package/src/layout/flex-order.ts +0 -6
- package/src/layout/flex.ts +0 -6
- package/src/layout/index.ts +2 -0
- package/src/layout/layout.ts +2 -9
- package/src/layout/registry.ts +13 -0
package/dist/angular/if.js
CHANGED
|
@@ -31,7 +31,7 @@ IfOperator = __decorate([
|
|
|
31
31
|
custom_attributes_1.Modifier({
|
|
32
32
|
selector: 'ngIf',
|
|
33
33
|
registry() {
|
|
34
|
-
return new custom_attributes_1.CustomAttributeRegistry(this
|
|
34
|
+
return new custom_attributes_1.CustomAttributeRegistry(this);
|
|
35
35
|
}
|
|
36
36
|
})
|
|
37
37
|
], IfOperator);
|
package/dist/angular/if.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"if.js","sourceRoot":"","sources":["../../src/angular/if.ts"],"names":[],"mappings":";;;;;;;;;AAAA,gEAIkC;AAQlC,IAAa,UAAU,GAAvB,MAAa,UAAW,SAAQ,6BAAS;IACvC,MAAM;QACJ,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;IAED,SAAS;QACP,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;IACpC,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;IAED,QAAQ;QACN,IAAI,IAAI,CAAC,KAAK,KAAK,MAAM,EAAE;YACzB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;SACnC;aAAM;YACL,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;SACrC;IACH,CAAC;CACF,CAAA;AApBY,UAAU;IANtB,4BAAQ,CAAC;QACR,QAAQ,EAAE,MAAM;QAChB,QAAQ;YACN,OAAO,IAAI,2CAAuB,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"if.js","sourceRoot":"","sources":["../../src/angular/if.ts"],"names":[],"mappings":";;;;;;;;;AAAA,gEAIkC;AAQlC,IAAa,UAAU,GAAvB,MAAa,UAAW,SAAQ,6BAAS;IACvC,MAAM;QACJ,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;IAED,SAAS;QACP,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;IACpC,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,QAAQ,EAAE,CAAC;IAClB,CAAC;IAED,QAAQ;QACN,IAAI,IAAI,CAAC,KAAK,KAAK,MAAM,EAAE;YACzB,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,IAAI,CAAC;SACnC;aAAM;YACL,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,OAAO,GAAG,MAAM,CAAC;SACrC;IACH,CAAC;CACF,CAAA;AApBY,UAAU;IANtB,4BAAQ,CAAC;QACR,QAAQ,EAAE,MAAM;QAChB,QAAQ;YACN,OAAO,IAAI,2CAAuB,CAAC,IAAI,CAAC,CAAC;QAC3C,CAAC;KACF,CAAC;GACW,UAAU,CAoBtB;AApBY,gCAAU"}
|
package/dist/angular/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export declare const AngularLayout: (typeof
|
|
1
|
+
import { Registry } from './registry';
|
|
2
|
+
export declare const AngularLayout: (typeof Registry)[];
|
package/dist/angular/index.js
CHANGED
|
@@ -2,5 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.AngularLayout = void 0;
|
|
4
4
|
const if_1 = require("./if");
|
|
5
|
-
|
|
5
|
+
const ng_for_1 = require("./ng-for");
|
|
6
|
+
const registry_1 = require("./registry");
|
|
7
|
+
exports.AngularLayout = [registry_1.Registry, if_1.IfOperator, ng_for_1.NgFor];
|
|
6
8
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/angular/index.ts"],"names":[],"mappings":";;;AAAA,6BAAkC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/angular/index.ts"],"names":[],"mappings":";;;AAAA,6BAAkC;AAClC,qCAAiC;AACjC,yCAAsC;AAEzB,QAAA,aAAa,GAAG,CAAC,mBAAQ,EAAE,eAAU,EAAE,cAAK,CAAC,CAAC"}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.NgFor = void 0;
|
|
13
|
+
const custom_attributes_1 = require("@rhtml/custom-attributes");
|
|
14
|
+
const lit_html_1 = require("@rxdi/lit-html");
|
|
15
|
+
let NgFor = class NgFor extends custom_attributes_1.Attribute {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
this.regexes = [/\${[^{]+}/g, /\@\{(.*?)(?!\@\{)\}/g, /{([^}]+)}/g];
|
|
19
|
+
}
|
|
20
|
+
OnInit() {
|
|
21
|
+
this.modify();
|
|
22
|
+
}
|
|
23
|
+
OnDestroy() {
|
|
24
|
+
//
|
|
25
|
+
}
|
|
26
|
+
OnUpdate() {
|
|
27
|
+
this.modify();
|
|
28
|
+
}
|
|
29
|
+
interpolate(object, string) {
|
|
30
|
+
return string.replace(this.regexes[2], match => match
|
|
31
|
+
.slice(2, -1)
|
|
32
|
+
.trim()
|
|
33
|
+
.split('.')
|
|
34
|
+
.reduce((el, k) => String(el[k]), object));
|
|
35
|
+
}
|
|
36
|
+
modify() {
|
|
37
|
+
const [, , , items] = this.ngFor.split(' ');
|
|
38
|
+
const template = this.element.innerHTML;
|
|
39
|
+
this.element.innerHTML = '';
|
|
40
|
+
lit_html_1.render(lit_html_1.html `
|
|
41
|
+
<r-for .of=${this.parent[items]}>
|
|
42
|
+
<r-let
|
|
43
|
+
.item=${i => lit_html_1.unsafeHTML(this.interpolate(i, template))}
|
|
44
|
+
></r-let>
|
|
45
|
+
</r-for>
|
|
46
|
+
`, this.element);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
__decorate([
|
|
50
|
+
custom_attributes_1.Input(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], NgFor.prototype, "ngFor", void 0);
|
|
53
|
+
NgFor = __decorate([
|
|
54
|
+
custom_attributes_1.Modifier({
|
|
55
|
+
selector: 'ngFor'
|
|
56
|
+
})
|
|
57
|
+
], NgFor);
|
|
58
|
+
exports.NgFor = NgFor;
|
|
59
|
+
//# sourceMappingURL=ng-for.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ng-for.js","sourceRoot":"","sources":["../../src/angular/ng-for.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,gEAAsE;AACtE,6CAA0D;AAK1D,IAAa,KAAK,GAAlB,MAAa,KAAM,SAAQ,6BAAS;IAApC;;QAIE,YAAO,GAAG,CAAC,YAAY,EAAE,sBAAsB,EAAE,YAAY,CAAC,CAAC;IAuCjE,CAAC;IArCC,MAAM;QACJ,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAED,SAAS;QACP,EAAE;IACJ,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAEO,WAAW,CAAC,MAAM,EAAE,MAAc;QACxC,OAAO,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,EAAE,CAC7C,KAAK;aACF,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;aACZ,IAAI,EAAE;aACN,KAAK,CAAC,GAAG,CAAC;aACV,MAAM,CAAC,CAAC,EAAE,EAAE,CAAS,EAAE,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,MAAM,CAAC,CACpD,CAAC;IACJ,CAAC;IAED,MAAM;QACJ,MAAM,CAAC,EAAE,AAAD,EAAG,AAAD,EAAG,KAAK,CAAC,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QAC5C,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,SAAS,CAAC;QACxC,IAAI,CAAC,OAAO,CAAC,SAAS,GAAG,EAAE,CAAC;QAC5B,iBAAM,CACJ,eAAI,CAAA;qBACW,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;;oBAEnB,CAAC,CAAC,EAAE,CAAC,qBAAU,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;;;OAG3D,EACD,IAAI,CAAC,OAAO,CACb,CAAC;IACJ,CAAC;CACF,CAAA;AAzCC;IADC,yBAAK,EAAE;;oCACM;AAFH,KAAK;IAHjB,4BAAQ,CAAC;QACR,QAAQ,EAAE,OAAO;KAClB,CAAC;GACW,KAAK,CA2CjB;AA3CY,sBAAK"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Registry = void 0;
|
|
10
|
+
const custom_attributes_1 = require("@rhtml/custom-attributes");
|
|
11
|
+
let Registry = class Registry extends custom_attributes_1.Attribute {
|
|
12
|
+
};
|
|
13
|
+
Registry = __decorate([
|
|
14
|
+
custom_attributes_1.Modifier({
|
|
15
|
+
selector: 'registry',
|
|
16
|
+
registry() {
|
|
17
|
+
return new custom_attributes_1.CustomAttributeRegistry(this);
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
], Registry);
|
|
21
|
+
exports.Registry = Registry;
|
|
22
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/angular/registry.ts"],"names":[],"mappings":";;;;;;;;;AAAA,gEAIkC;AAQlC,IAAa,QAAQ,GAArB,MAAa,QAAS,SAAQ,6BAAS;CAAG,CAAA;AAA7B,QAAQ;IANpB,4BAAQ,CAAC;QACR,QAAQ,EAAE,UAAU;QACpB,QAAQ;YACN,OAAO,IAAI,2CAAuB,CAAC,IAAI,CAAC,CAAC;QAC3C,CAAC;KACF,CAAC;GACW,QAAQ,CAAqB;AAA7B,4BAAQ"}
|
package/dist/layout/flex-fill.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flex-fill.js","sourceRoot":"","sources":["../../src/layout/flex-fill.ts"],"names":[],"mappings":";;;;;;;;;AAAA,gEAA+D;AAa/D,IAAa,QAAQ,GAArB,MAAa,QAAS,SAAQ,6BAAiB;IAA/C;;
|
|
1
|
+
{"version":3,"file":"flex-fill.js","sourceRoot":"","sources":["../../src/layout/flex-fill.ts"],"names":[],"mappings":";;;;;;;;;AAAA,gEAA+D;AAa/D,IAAa,QAAQ,GAArB,MAAa,QAAS,SAAQ,6BAAiB;IAA/C;;QACE,UAAK,GAAG,MAAM,CAAC;IAiCjB,CAAC;IA/BC,MAAM;QACJ,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAED,SAAS;QACP,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAEO,KAAK;QACX,IAAI,CAAC,SAAS,CAAC;YACb,MAAM,EAAE,IAAI;YACZ,MAAM,EAAE,IAAI;YACZ,YAAY,EAAE,IAAI;YAClB,WAAW,EAAE,IAAI;YACjB,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnB,CAAC;IAEO,MAAM;QACZ,IAAI,CAAC,SAAS,CAAC;YACb,MAAM,EAAE,GAAG;YACX,MAAM,EAAE,IAAI,CAAC,KAAK;YAClB,YAAY,EAAE,IAAI,CAAC,KAAK;YACxB,WAAW,EAAE,IAAI,CAAC,KAAK;YACvB,KAAK,EAAE,IAAI,CAAC,KAAK;SAClB,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnB,CAAC;CACF,CAAA;AAlCY,QAAQ;IAHpB,4BAAQ,CAAC;QACR,QAAQ,EAAE,YAAY;KACvB,CAAC;GACW,QAAQ,CAkCpB;AAlCY,4BAAQ"}
|
|
@@ -9,11 +9,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.FlexOrder = void 0;
|
|
10
10
|
const custom_attributes_1 = require("@rhtml/custom-attributes");
|
|
11
11
|
let FlexOrder = class FlexOrder extends custom_attributes_1.Attribute {
|
|
12
|
-
static options() {
|
|
13
|
-
return {
|
|
14
|
-
selector: 'fxFlexOrder'
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
12
|
OnInit() {
|
|
18
13
|
this.modify();
|
|
19
14
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flex-order.js","sourceRoot":"","sources":["../../src/layout/flex-order.ts"],"names":[],"mappings":";;;;;;;;;AAAA,gEAA+D;AAS/D,IAAa,SAAS,GAAtB,MAAa,SAAU,SAAQ,6BAAiB;IAC9C,MAAM
|
|
1
|
+
{"version":3,"file":"flex-order.js","sourceRoot":"","sources":["../../src/layout/flex-order.ts"],"names":[],"mappings":";;;;;;;;;AAAA,gEAA+D;AAS/D,IAAa,SAAS,GAAtB,MAAa,SAAU,SAAQ,6BAAiB;IAC9C,MAAM;QACJ,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAED,SAAS;QACP,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAEO,KAAK;QACX,IAAI,CAAC,SAAS,CAAC;YACb,KAAK,EAAE,IAAI;SACZ,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnB,CAAC;IAEO,MAAM;QACZ,IAAI,CAAC,SAAS,CAAC;YACb,KAAK,EAAE,IAAI,CAAC,KAAK,IAAI,IAAI;SAC1B,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnB,CAAC;CACF,CAAA;AAxBY,SAAS;IAHrB,4BAAQ,CAAC;QACR,QAAQ,EAAE,aAAa;KACxB,CAAC;GACW,SAAS,CAwBrB;AAxBY,8BAAS"}
|
package/dist/layout/flex.d.ts
CHANGED
package/dist/layout/flex.js
CHANGED
|
@@ -9,11 +9,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
9
9
|
exports.Flex = void 0;
|
|
10
10
|
const custom_attributes_1 = require("@rhtml/custom-attributes");
|
|
11
11
|
let Flex = class Flex extends custom_attributes_1.Attribute {
|
|
12
|
-
static options() {
|
|
13
|
-
return {
|
|
14
|
-
selector: 'fxFlex'
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
12
|
OnInit() {
|
|
18
13
|
this.modify();
|
|
19
14
|
}
|
package/dist/layout/flex.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"flex.js","sourceRoot":"","sources":["../../src/layout/flex.ts"],"names":[],"mappings":";;;;;;;;;AAAA,gEAA+D;AAW/D,IAAa,IAAI,GAAjB,MAAa,IAAK,SAAQ,6BAAiB;IACzC,MAAM
|
|
1
|
+
{"version":3,"file":"flex.js","sourceRoot":"","sources":["../../src/layout/flex.ts"],"names":[],"mappings":";;;;;;;;;AAAA,gEAA+D;AAW/D,IAAa,IAAI,GAAjB,MAAa,IAAK,SAAQ,6BAAiB;IACzC,MAAM;QACJ,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAED,SAAS;QACP,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAEO,KAAK;QACX,IAAI,CAAC,SAAS,CAAC;YACb,YAAY,EAAE,IAAI;YAClB,WAAW,EAAE,IAAI;YACjB,IAAI,EAAE,IAAI;SACX,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnB,CAAC;IAEO,MAAM;QACZ,IAAI,CAAC,SAAS,CAAC;YACb,YAAY,EAAE,YAAY;YAC1B,WAAW,EAAE,IAAI,CAAC,KAAK,IAAI,IAAI;YAC/B,IAAI,EAAE,UAAU;SACjB,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnB,CAAC;CACF,CAAA;AA5BY,IAAI;IAHhB,4BAAQ,CAAC;QACR,QAAQ,EAAE,QAAQ;KACnB,CAAC;GACW,IAAI,CA4BhB;AA5BY,oBAAI"}
|
package/dist/layout/index.d.ts
CHANGED
|
@@ -1,10 +1,3 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import { FlexAlign } from './flex-align';
|
|
3
|
-
import { FlexFill } from './flex-fill';
|
|
4
|
-
import { FlexOffset } from './flex-offset';
|
|
5
|
-
import { FlexOrder } from './flex-order';
|
|
6
|
-
import { Layout } from './layout';
|
|
7
|
-
import { LayoutAlign } from './layout-align';
|
|
8
|
-
import { LayoutGap } from './layout-gap';
|
|
1
|
+
import { Registry } from './registry';
|
|
9
2
|
export * from './layout';
|
|
10
|
-
export declare const FlexLayout: (typeof
|
|
3
|
+
export declare const FlexLayout: (typeof Registry)[];
|
package/dist/layout/index.js
CHANGED
|
@@ -19,8 +19,10 @@ const flex_order_1 = require("./flex-order");
|
|
|
19
19
|
const layout_1 = require("./layout");
|
|
20
20
|
const layout_align_1 = require("./layout-align");
|
|
21
21
|
const layout_gap_1 = require("./layout-gap");
|
|
22
|
+
const registry_1 = require("./registry");
|
|
22
23
|
__exportStar(require("./layout"), exports);
|
|
23
24
|
exports.FlexLayout = [
|
|
25
|
+
registry_1.Registry,
|
|
24
26
|
layout_1.Layout,
|
|
25
27
|
layout_align_1.LayoutAlign,
|
|
26
28
|
layout_gap_1.LayoutGap,
|
package/dist/layout/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/layout/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,iCAA8B;AAC9B,6CAAyC;AACzC,2CAAuC;AACvC,+CAA2C;AAC3C,6CAAyC;AACzC,qCAAkC;AAClC,iDAA6C;AAC7C,6CAAyC;
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/layout/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;AAAA,iCAA8B;AAC9B,6CAAyC;AACzC,2CAAuC;AACvC,+CAA2C;AAC3C,6CAAyC;AACzC,qCAAkC;AAClC,iDAA6C;AAC7C,6CAAyC;AACzC,yCAAsC;AAEtC,2CAAyB;AAEZ,QAAA,UAAU,GAAG;IACxB,mBAAQ;IACR,eAAM;IACN,0BAAW;IACX,sBAAS;IACT,oBAAQ;IACR,WAAI;IACJ,sBAAS;IACT,wBAAU;IACV,sBAAS;CACV,CAAC"}
|
package/dist/layout/layout.js
CHANGED
|
@@ -41,10 +41,7 @@ let Layout = class Layout extends custom_attributes_1.Attribute {
|
|
|
41
41
|
};
|
|
42
42
|
Layout = __decorate([
|
|
43
43
|
custom_attributes_1.Modifier({
|
|
44
|
-
selector: 'fxLayout'
|
|
45
|
-
registry() {
|
|
46
|
-
return new custom_attributes_1.CustomAttributeRegistry(this.shadowRoot);
|
|
47
|
-
}
|
|
44
|
+
selector: 'fxLayout'
|
|
48
45
|
})
|
|
49
46
|
], Layout);
|
|
50
47
|
exports.Layout = Layout;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/layout/layout.ts"],"names":[],"mappings":";;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"layout.js","sourceRoot":"","sources":["../../src/layout/layout.ts"],"names":[],"mappings":";;;;;;;;;AAAA,gEAA+D;AAW/D,IAAa,MAAM,GAAnB,MAAa,MAAO,SAAQ,6BAAiB;IAA7C;;QACE,UAAK,GAAG,KAAK,CAAC;IA8BhB,CAAC;IA5BC,MAAM;QACJ,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAED,SAAS;QACP,IAAI,CAAC,KAAK,EAAE,CAAC;IACf,CAAC;IAED,QAAQ;QACN,IAAI,CAAC,MAAM,EAAE,CAAC;IAChB,CAAC;IAEO,KAAK;QACX,IAAI,CAAC,SAAS,CAAC;YACb,YAAY,EAAE,IAAI;YAClB,WAAW,EAAE,IAAI;YACjB,OAAO,EAAE,IAAI;SACd,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnB,CAAC;IACO,MAAM;QACZ,MAAM,QAAQ,GAAG,IAAI,CAAC,KAAK,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC;QACvC,MAAM,CAAC,QAAQ,EAAE,SAAS,CAAC,GAAG,QAAQ,CAAC;QACvC,IAAI,CAAC,SAAS,CAAC;YACb,YAAY,EAAE,MAAM;YACpB,WAAW,EAAE,QAAQ,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,IAAI,SAAS,EAAE,CAAC,CAAC,CAAC,QAAQ;YACxE,OAAO,EAAE,MAAM;SAChB,CAAC,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACnB,CAAC;CACF,CAAA;AA/BY,MAAM;IAHlB,4BAAQ,CAAC;QACR,QAAQ,EAAE,UAAU;KACrB,CAAC;GACW,MAAM,CA+BlB;AA/BY,wBAAM"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
+
exports.Registry = void 0;
|
|
10
|
+
const custom_attributes_1 = require("@rhtml/custom-attributes");
|
|
11
|
+
let Registry = class Registry extends custom_attributes_1.Attribute {
|
|
12
|
+
};
|
|
13
|
+
Registry = __decorate([
|
|
14
|
+
custom_attributes_1.Modifier({
|
|
15
|
+
selector: 'registry',
|
|
16
|
+
registry() {
|
|
17
|
+
return new custom_attributes_1.CustomAttributeRegistry(this);
|
|
18
|
+
}
|
|
19
|
+
})
|
|
20
|
+
], Registry);
|
|
21
|
+
exports.Registry = Registry;
|
|
22
|
+
//# sourceMappingURL=registry.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.js","sourceRoot":"","sources":["../../src/layout/registry.ts"],"names":[],"mappings":";;;;;;;;;AAAA,gEAIkC;AAQlC,IAAa,QAAQ,GAArB,MAAa,QAAS,SAAQ,6BAAS;CAAG,CAAA;AAA7B,QAAQ;IANpB,4BAAQ,CAAC;QACR,QAAQ,EAAE,UAAU;QACpB,QAAQ;YACN,OAAO,IAAI,2CAAuB,CAAC,IAAI,CAAC,CAAC;QAC3C,CAAC;KACF,CAAC;GACW,QAAQ,CAAqB;AAA7B,4BAAQ"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rhtml/modifiers",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.106",
|
|
4
4
|
"description": "Reactive HyperText Markup Language",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"start": "npx parcel ./examples/index.html --out-dir build/examples",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
19
|
"@rxdi/lit-html": "^0.7.133",
|
|
20
|
-
"@rhtml/custom-attributes": "0.0.
|
|
20
|
+
"@rhtml/custom-attributes": "0.0.106"
|
|
21
21
|
},
|
|
22
22
|
"devDependencies": {
|
|
23
23
|
"eslint": "^6.7.2",
|
package/src/angular/if.ts
CHANGED
package/src/angular/index.ts
CHANGED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
import { Attribute, Input, Modifier } from '@rhtml/custom-attributes';
|
|
2
|
+
import { html, render, unsafeHTML } from '@rxdi/lit-html';
|
|
3
|
+
|
|
4
|
+
@Modifier({
|
|
5
|
+
selector: 'ngFor'
|
|
6
|
+
})
|
|
7
|
+
export class NgFor extends Attribute {
|
|
8
|
+
@Input()
|
|
9
|
+
ngFor: string;
|
|
10
|
+
|
|
11
|
+
regexes = [/\${[^{]+}/g, /\@\{(.*?)(?!\@\{)\}/g, /{([^}]+)}/g];
|
|
12
|
+
|
|
13
|
+
OnInit() {
|
|
14
|
+
this.modify();
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
OnDestroy() {
|
|
18
|
+
//
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
OnUpdate() {
|
|
22
|
+
this.modify();
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
private interpolate(object, string: string) {
|
|
26
|
+
return string.replace(this.regexes[2], match =>
|
|
27
|
+
match
|
|
28
|
+
.slice(2, -1)
|
|
29
|
+
.trim()
|
|
30
|
+
.split('.')
|
|
31
|
+
.reduce((el, k: string) => String(el[k]), object)
|
|
32
|
+
);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
modify() {
|
|
36
|
+
const [, , , items] = this.ngFor.split(' ');
|
|
37
|
+
const template = this.element.innerHTML;
|
|
38
|
+
this.element.innerHTML = '';
|
|
39
|
+
render(
|
|
40
|
+
html`
|
|
41
|
+
<r-for .of=${this.parent[items]}>
|
|
42
|
+
<r-let
|
|
43
|
+
.item=${i => unsafeHTML(this.interpolate(i, template))}
|
|
44
|
+
></r-let>
|
|
45
|
+
</r-for>
|
|
46
|
+
`,
|
|
47
|
+
this.element
|
|
48
|
+
);
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Attribute,
|
|
3
|
+
CustomAttributeRegistry,
|
|
4
|
+
Modifier
|
|
5
|
+
} from '@rhtml/custom-attributes';
|
|
6
|
+
|
|
7
|
+
@Modifier({
|
|
8
|
+
selector: 'registry',
|
|
9
|
+
registry(this) {
|
|
10
|
+
return new CustomAttributeRegistry(this);
|
|
11
|
+
}
|
|
12
|
+
})
|
|
13
|
+
export class Registry extends Attribute {}
|
package/src/layout/flex-fill.ts
CHANGED
package/src/layout/flex-order.ts
CHANGED
package/src/layout/flex.ts
CHANGED
package/src/layout/index.ts
CHANGED
|
@@ -6,10 +6,12 @@ import { FlexOrder } from './flex-order';
|
|
|
6
6
|
import { Layout } from './layout';
|
|
7
7
|
import { LayoutAlign } from './layout-align';
|
|
8
8
|
import { LayoutGap } from './layout-gap';
|
|
9
|
+
import { Registry } from './registry';
|
|
9
10
|
|
|
10
11
|
export * from './layout';
|
|
11
12
|
|
|
12
13
|
export const FlexLayout = [
|
|
14
|
+
Registry,
|
|
13
15
|
Layout,
|
|
14
16
|
LayoutAlign,
|
|
15
17
|
LayoutGap,
|
package/src/layout/layout.ts
CHANGED
|
@@ -1,8 +1,4 @@
|
|
|
1
|
-
import {
|
|
2
|
-
Attribute,
|
|
3
|
-
CustomAttributeRegistry,
|
|
4
|
-
Modifier
|
|
5
|
-
} from '@rhtml/custom-attributes';
|
|
1
|
+
import { Attribute, Modifier } from '@rhtml/custom-attributes';
|
|
6
2
|
|
|
7
3
|
interface Styles {
|
|
8
4
|
'flex-flow': string;
|
|
@@ -11,10 +7,7 @@ interface Styles {
|
|
|
11
7
|
}
|
|
12
8
|
|
|
13
9
|
@Modifier({
|
|
14
|
-
selector: 'fxLayout'
|
|
15
|
-
registry(this) {
|
|
16
|
-
return new CustomAttributeRegistry(this.shadowRoot);
|
|
17
|
-
}
|
|
10
|
+
selector: 'fxLayout'
|
|
18
11
|
})
|
|
19
12
|
export class Layout extends Attribute<Styles> {
|
|
20
13
|
value = 'row';
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import {
|
|
2
|
+
Attribute,
|
|
3
|
+
CustomAttributeRegistry,
|
|
4
|
+
Modifier
|
|
5
|
+
} from '@rhtml/custom-attributes';
|
|
6
|
+
|
|
7
|
+
@Modifier({
|
|
8
|
+
selector: 'registry',
|
|
9
|
+
registry(this) {
|
|
10
|
+
return new CustomAttributeRegistry(this);
|
|
11
|
+
}
|
|
12
|
+
})
|
|
13
|
+
export class Registry extends Attribute {}
|